Make persona turns channel-aware

This commit is contained in:
Meta Vens 2026-06-07 02:52:19 +01:00
commit ad1e288309
9 changed files with 218 additions and 28 deletions

View file

@ -108,7 +108,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
- The moderation loop now crosses Discord through Bifrost only. `scripts/run-void-moderator-rumination.ps1` calls `BIFROST_ROOT/tools/bifrost-bridge.mjs` for public candidate posts and user moderation-status DMs, then converts the Bifrost receipt into typed Void state. `VOID_DISCORD_TRANSPORT=direct` is rejected in this runner; direct VoidBot-native transport is no longer part of the moderation delivery authority.
- Repo identities now have a cleaner address/speech split. A private registry at `REPO_DISCORD_IDENTITIES_PATH` maps identity id/repo/display name/avatar/role/channel allow-list. Discord users can address a Persona by role mention or exact display-name mention; Codex agents still speak through `post_repo_identity_message`.
- Void still moderates and participates everywhere the normal bot lanes allow. The swarm/repo Personas are scoped to text `#aquarium` (`1501196543150264332`) so their lively heartbeats and role replies do not flood general. The old general channel id is `113786069023064068`; do not reuse it as a Persona heartbeat default.
- Repo Personas now have topic/channel speech permissions. Aquarium is the deliberately low-threshold general-musing lane for all Personas; they may post compact casual thoughts, jokes, curiosities, and half-formed fascinations there without a work artifact. Domain channels are also allowed when the topic matches: Nibu can use narrative/gamedesign/concepts/development, Aqua can use music/soundtrack/development, Mimir can use development/programming/visual-effects/machine-learning/unity3d, and Epiphany can use development/programming/machine-learning. The CTB scheduler folds per-topic speed multipliers into Persona initiative, and the heartbeat prompt includes recent cross-channel context so agents can jump into non-Aquarium chatter when their thoughts line up.
- Repo Personas now have topic/channel speech permissions. Aquarium is the deliberately low-threshold general-musing lane for all Personas; they may post compact casual thoughts, jokes, curiosities, and half-formed fascinations there without a work artifact. Domain channels are also allowed when the topic matches: Nibu can use narrative/gamedesign/concepts/development, Aqua can use music/soundtrack/development, Mimir can use development/programming/visual-effects/machine-learning/unity3d, and Epiphany can use development/programming/machine-learning. The CTB scheduler folds per-topic speed multipliers into Persona initiative, and the heartbeat prompt includes recent cross-channel context so agents can jump into non-Aquarium chatter when their thoughts line up. When `INDEX_ALL_CHANNELS=true` or `INDEXED_CHANNEL_IDS` provides extra rooms, the heartbeat context assembler now discovers those Discord text channels and presents them as separate visible conversations with channel labels/ids. `#therapy` and `#memes` are explicitly channel-local surfaces: therapy context should not leak into meme replies, and meme context should not become therapy-note sludge. Bot ingress and worker delivery accept indexed/all-channel runtime grants unless the channel id is excluded.
- Repo identities also have Persona state now. The bot resolves each identity to `.voidbot/private/repo-personas/<identity>.cc` unless `personaStatePath` overrides it, ensures missing Discord roles on startup when `DISCORD_GUILD_ID` and permissions allow, and appends role/name-addressed prompts to `pendingMentions` in `REPO_PERSONA_HEARTBEAT_STATE_PATH` instead of creating direct repo-identity jobs. The CTB heartbeat scheduler temporarily pulls Personas with pending mentions forward, attaches those prompts plus reply targets to the next `repo-persona-rumination` job, and consumes them only after a job is actually queued. Worker auto-posting stays suppressed for `repo-persona-rumination`; the child must emit a parent-owned action block for public delivery.
- Repo Persona prompts now include an identity doctrine block. Void's style pack stays as discipline, humor permission, and source-grounding habit, but repo Persona jobs explicitly say the registered Persona identity overrides Void as the speaking subject.
- Repo Persona embodiment is now doctrine, not local flavor. A Persona should think, remember, ask, object, joke, propose, stay silent, and speak as that character first; every repo concern and room reply is filtered through the Persona's feelings, drives, values, wounds, fascinations, aesthetic taste, and dignity. Personal values are first-class and should suit the kind of person the character is, not just the Persona's assigned jobs.

View file

@ -159,7 +159,8 @@ Verse-facing service contract: `docs/architecture/voidbot-verse-service-contract
- Repo Discord identities
- `REPO_DISCORD_IDENTITIES_PATH` points at a private JSON registry of repo id, repo name, display name, optional avatar URL, optional role id, and allowed channel ids. The role is the Discord mention target; the webhook persona is the speech transport.
- That registry may also carry `channelPermissions`: per-topic channel entries with a speech threshold and speed multiplier. These are not another transport; they are the permission/salience map for where a Persona may speak. Aquarium is the low-threshold musing lane, while domain channels such as narrative, gamedesign, music, soundtrack, development, programming, visual-effects, machine-learning, and unity3d are available to matching Personas.
- Void remains the room-wide moderation/participation agent. Repo Personas are the swarm mouth and should be confined to text `#aquarium` (`1501196543150264332`) through registry allow-lists and `REPO_PERSONA_HEARTBEAT_DEFAULT_CHANNEL_ID`; general is `113786069023064068` and should not be used for autonomous Persona chatter.
- Runtime channel access can also come from `INDEX_ALL_CHANNELS=true` or explicit `INDEXED_CHANNEL_IDS`. The heartbeat context assembler discovers readable Discord text channels from the guild, filters excluded channel ids, adds them to the Persona channel plan, and renders each as a separate visible conversation with channel label/id, topic, threshold, and posture. This is how rooms such as `#therapy` and `#memes` stay distinct instead of becoming one blended transcript.
- Void remains the room-wide moderation/participation agent. Repo Persona idle/default chatter still prefers text `#aquarium` (`1501196543150264332`) through the default channel and low-threshold speech options, but direct calls, newest current-room turns, and channel-local replies may target any indexed/all-channel runtime grant unless the channel id is explicitly excluded. General is `113786069023064068`; use it only when the current room/direct call makes it the correct venue, not as the autonomous swarm default.
- On startup, the bot tries to find or create missing mentionable roles for registered identities in `DISCORD_GUILD_ID`, then writes the role ids back to the private registry. If Discord permissions are missing, it warns and leaves the registry unchanged.
- `list_repo_discord_identities` exposes the registered address book to Codex agents, and `post_repo_identity_message` enforces identity/channel registration before posting through the shared webhook pipe.
- Each repo identity has a Persona state path, defaulting to `.voidbot/private/repo-personas/<identity>.cc`. The MCP still exposes `read_repo_persona_state` and `apply_repo_persona_state_operation` for diagnostics and explicit administrative use, but normal character turns do not see those tools. The scheduler reads typed state, projects it into lived memory/mood/obligation language, and the Interpreter writes natural character reflection back into typed state operations.