Extract Persona social context projection
This commit is contained in:
parent
562cc5dd32
commit
6bdf2750d1
7 changed files with 170 additions and 249 deletions
141
apps/persona-scheduler/src/persona-social-context-projector.ts
Normal file
141
apps/persona-scheduler/src/persona-social-context-projector.ts
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
import type { RepoDiscordIdentity, VoidSelfStateTypedProjection } from "@voidbot/core";
|
||||
import type { SourceMessage } from "@voidbot/shared";
|
||||
import type { ChannelSnapshot } from "./turn-context-source.js";
|
||||
|
||||
export interface PersonaHumanPronounGuidance {
|
||||
actorId: string;
|
||||
actorName: string;
|
||||
guidance: string;
|
||||
resolvedPronounSet?: string;
|
||||
policy: string;
|
||||
confidence?: number;
|
||||
evidenceExcerpt?: string;
|
||||
}
|
||||
|
||||
export function renderPersonaHumanPronounFacts(guidance: PersonaHumanPronounGuidance[]): string | undefined {
|
||||
if (guidance.length === 0) return undefined;
|
||||
return [
|
||||
"Known human pronoun guidance:",
|
||||
...guidance.map((entry) => [
|
||||
`- ${entry.actorName}: ${entry.guidance}`,
|
||||
entry.resolvedPronounSet ? `Resolved set: ${entry.resolvedPronounSet}.` : "",
|
||||
entry.policy ? `Policy: ${entry.policy}.` : "",
|
||||
typeof entry.confidence === "number" ? `Confidence: ${entry.confidence.toFixed(2)}.` : "",
|
||||
entry.evidenceExcerpt ? `Evidence: "${entry.evidenceExcerpt.replace(/\s+/g, " ").trim().slice(0, 180)}"` : "",
|
||||
].filter(Boolean).join(" ")),
|
||||
"Use this when referring to humans in social or relationship prose. If guidance is absent for someone, use their name or neutral phrasing rather than guessing.",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
export function renderPersonaRoomTexture(input: {
|
||||
identity: RepoDiscordIdentity;
|
||||
recentMessages: SourceMessage[];
|
||||
channelSnapshots: ChannelSnapshot[];
|
||||
topicAttractorFacts?: string;
|
||||
}): string | undefined {
|
||||
const stats = observePersonaRoomTexture(input);
|
||||
if (!stats) return undefined;
|
||||
const temporary = stats.texture === "heavy" || stats.agentShare >= 0.55 ? [
|
||||
"- Temporary affect pressure candidates: play, rest, and social_contact may be hungry because the room is carrying sustained work/agent weight.",
|
||||
"- These are not stored needs and not orders. Project whether this character gets mischievous, bored, sharp, withdrawn, socially hungry, status-testing, or still work-focused.",
|
||||
] : [];
|
||||
return [
|
||||
"Room texture facts:",
|
||||
`- Observed messages: ${stats.total}; humans: ${stats.humanMessages}; agents/bots: ${stats.agentMessages}; distinct speakers: ${stats.speakerCount}.`,
|
||||
`- Long messages: ${stats.longMessages}; short messages: ${stats.shortMessages}; average length: ${stats.averageCharacters} characters.`,
|
||||
`- This Face's own recent messages in the attached window: ${stats.ownMessages}.`,
|
||||
`- Structural texture: ${stats.texture}. This is evidence about conversational weight, not a command to speak or joke.`,
|
||||
...temporary,
|
||||
...(input.topicAttractorFacts ? [input.topicAttractorFacts] : []),
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
export function renderPersonaRoomWeather(input: {
|
||||
identity: RepoDiscordIdentity;
|
||||
recentMessages: SourceMessage[];
|
||||
channelSnapshots: ChannelSnapshot[];
|
||||
}): string {
|
||||
const stats = observePersonaRoomTexture(input);
|
||||
if (!stats) return "- No current room weather was available.";
|
||||
const pressure = stats.texture === "heavy" || stats.agentShare >= 0.55
|
||||
? "The room is currently structurally work-heavy or agent-heavy. Treat that as conversational weather: it may create boredom, play hunger, restlessness, social hunger, withdrawal, or sharper status-testing, depending on who you are. This is not an order to joke; it is permission to feel the weight instead of answering every opening with more work."
|
||||
: stats.texture === "light"
|
||||
? "The room is currently light enough for compact social motion. You still need an actual reason to speak, but not a work ticket."
|
||||
: "The room is mixed. Use the transcript to decide whether the living pressure is social, practical, or private.";
|
||||
return [`- Messages observed: ${stats.total}; humans: ${stats.humanMessages}; agents/bots: ${stats.agentMessages}; distinct speakers: ${stats.speakerCount}.`, `- Texture: ${stats.texture}; your own recent messages in this window: ${stats.ownMessages}.`, `- ${pressure}`].join("\n");
|
||||
}
|
||||
|
||||
export function renderPersonaRelationshipFreshness(input: {
|
||||
identityName: string;
|
||||
state: VoidSelfStateTypedProjection;
|
||||
registryIdentities: RepoDiscordIdentity[];
|
||||
observedAt: Date;
|
||||
}): string | undefined {
|
||||
const peerKeys = peerSocialKeys(input.registryIdentities);
|
||||
const staleBonds = input.state.faceAffect.socialBonds
|
||||
.filter((bond) => bond.status === "active" && bond.target.kind === "person" && isPeerTarget(bond.target, peerKeys))
|
||||
.map((bond) => ({ target: targetLabel(bond.target), kind: bond.stance, intensity: bond.intensity, ageHours: ageHoursSince(bond.updatedAt, input.observedAt.getTime()), summary: bond.summary, action: bond.actionImplication }))
|
||||
.filter((entry) => entry.ageHours >= 48)
|
||||
.sort((left, right) => (right.ageHours * right.intensity) - (left.ageHours * left.intensity))
|
||||
.slice(0, 5);
|
||||
const staleReads = input.state.faceAffect.statusReads
|
||||
.filter((read) => !read.retiredAt && read.target.kind === "person" && isPeerTarget(read.target, peerKeys))
|
||||
.map((read) => ({ target: targetLabel(read.target), kind: read.status, intensity: read.intensity, ageHours: ageHoursSince(read.updatedAt, input.observedAt.getTime()), summary: read.summary, action: read.actionImplication }))
|
||||
.filter((entry) => entry.ageHours >= 72)
|
||||
.sort((left, right) => (right.ageHours * right.intensity) - (left.ageHours * left.intensity))
|
||||
.slice(0, 5);
|
||||
const entries = [
|
||||
...staleBonds.map((entry) => `- ${entry.target}: ${entry.kind} bond has gone ${formatAgeHours(entry.ageHours)} without contact. ${sentence(entry.summary)} Touch-base pull: ${sentence(entry.action)}`),
|
||||
...staleReads.map((entry) => `- ${entry.target}: ${entry.kind} status read has gone ${formatAgeHours(entry.ageHours)} without contact. ${sentence(entry.summary)} Touch-base pull: ${sentence(entry.action)}`),
|
||||
].slice(0, 6);
|
||||
return entries.length === 0 ? undefined : [
|
||||
`Relationship freshness pressure for ${input.identityName}:`,
|
||||
...entries,
|
||||
"These are not commands to dump feelings. They are swarm social graph itch. A compact tease, check-in, challenge, compliment, question, or repair with another Face can be a successful public turn.",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
function peerSocialKeys(identities: RepoDiscordIdentity[]): Set<string> { return new Set(identities.flatMap((identity) => [identity.id, identity.displayName, identity.repoName]).map(normalizeSocialLabel).filter(Boolean)); }
|
||||
function isPeerTarget(target: { id: string; label?: string }, peerKeys: Set<string>): boolean { return [target.id, target.label].map(normalizeSocialLabel).some((key) => key.length > 0 && peerKeys.has(key)); }
|
||||
function ageHoursSince(value: string | undefined, nowMs: number): number { const then = Date.parse(value ?? ""); return Number.isFinite(then) ? Math.max(0, (nowMs - then) / 3_600_000) : 999; }
|
||||
function formatAgeHours(hours: number): string { return hours >= 48 ? `${Math.round(hours / 24)} days` : `${Math.round(hours)} hours`; }
|
||||
function targetLabel(target: { label?: string; id?: string; kind?: string } | undefined): string { return target?.label ?? target?.id ?? target?.kind ?? "an unnamed target"; }
|
||||
function normalizeSocialLabel(value: string | undefined): string { return (value ?? "").toLowerCase().replace(/[^a-z0-9]/g, ""); }
|
||||
function sentence(value: string | undefined): string { const clean = (value ?? "").replace(/\s+/g, " ").trim(); return !clean ? "" : /[.!?]$/.test(clean) ? clean : `${clean}.`; }
|
||||
|
||||
export interface PersonaRoomTextureObservation {
|
||||
total: number;
|
||||
agentMessages: number;
|
||||
humanMessages: number;
|
||||
ownMessages: number;
|
||||
longMessages: number;
|
||||
shortMessages: number;
|
||||
averageCharacters: number;
|
||||
speakerCount: number;
|
||||
texture: "heavy" | "light" | "mixed";
|
||||
agentShare: number;
|
||||
}
|
||||
|
||||
export function observePersonaRoomTexture(input: { identity: RepoDiscordIdentity; recentMessages: SourceMessage[]; channelSnapshots: ChannelSnapshot[] }): PersonaRoomTextureObservation | undefined {
|
||||
const messages = [...input.recentMessages, ...input.channelSnapshots.flatMap((snapshot) => snapshot.messages)];
|
||||
if (messages.length === 0) return undefined;
|
||||
const ownToken = normalizeSocialLabel(input.identity.displayName);
|
||||
const total = messages.length;
|
||||
const agentMessages = messages.filter((message) => message.isBot).length;
|
||||
const lengths = messages.map((message) => message.content.replace(/\s+/g, " ").trim().slice(0, 10_000).length);
|
||||
const longMessages = lengths.filter((length) => length >= 220).length;
|
||||
const shortMessages = lengths.filter((length) => length <= 90).length;
|
||||
const averageCharacters = Math.round(lengths.reduce((sum, length) => sum + length, 0) / total);
|
||||
return {
|
||||
total,
|
||||
agentMessages,
|
||||
humanMessages: total - agentMessages,
|
||||
ownMessages: messages.filter((message) => normalizeSocialLabel(message.authorName) === ownToken).length,
|
||||
longMessages,
|
||||
shortMessages,
|
||||
averageCharacters,
|
||||
speakerCount: new Set(messages.map((message) => normalizeSocialLabel(message.authorName || message.authorId)).filter(Boolean)).size,
|
||||
texture: (longMessages >= Math.ceil(total * 0.45) || averageCharacters >= 180 ? "heavy" : shortMessages >= Math.ceil(total * 0.55) ? "light" : "mixed") as "heavy" | "light" | "mixed",
|
||||
agentShare: agentMessages / total,
|
||||
};
|
||||
}
|
||||
|
|
@ -154,6 +154,7 @@ Git history and smoke artifacts carry routine proof. `state/evidence.jsonl` shou
|
|||
- Persona memory projection policy is isolated in `persona-memory-projector.ts`. It owns the deterministic/model choice, projector prompt template, minimum model-output invariant, and schema/path leak rejection through an injected text-model port. Repo Faces and typed native Personas use the same boundary. The large deterministic state-packet renderer is still in the heartbeat shell and is the next extraction target.
|
||||
- The pure typed-state core of that packet now also lives in `persona-memory-projector.ts`: private identity texture, activation vectors, runtime/rest/speaking pressure, needs, bonds, status reads, mood dimensions, and durable/short-term memories. The shell still owns agency/incubation/candidate/receipt rendering and the ordering of externally acquired social, room, clarity, maintenance, and curiosity facts; those are the remaining packet-builder debris.
|
||||
- `persona-memory-projector.ts` now owns the full typed-state packet contract, including clarity-conditioned agency pressure, incubation, deferred speech, recent receipts, final ordering of named external fact sections, final vocabulary transformation, and leak validation. Prompt assembly parity is covered by `--assemble-prompt nibu` producing the same 153,917-character prompt before and after the cut. The shell still computes social/relationship/room/clarity/maintenance fact strings; moving those pure renderers behind a social-context projection boundary is next.
|
||||
- `persona-social-context-projector.ts` now owns time-explicit relationship-freshness projection, room-texture observation, memory-facing room facts, turn-facing room weather, and human-pronoun guidance rendering. Relationship age receives `observedAt`; it no longer hides `Date.now()`. Discord messages and pronoun records are supplied inputs. Social-graph topology, peer openings, relationship pressure, and human-clarity rendering remain in the shell as the next extraction slice.
|
||||
- Home-repo activity acquisition is isolated in `repo-activity-source.ts`. It owns source-repo/cursor resolution and the bounded read-only exporter invocation, returning typed observations that prompt composition renders without subprocess or JSON-parsing authority.
|
||||
- Deployment authority detail: Idunn executes `/srv/odin/deploy-manifests/voidbot`; `/usr/local/sbin/deploy-voidbot` is only the identical inspection/recovery copy. Install both from `gamecult-ops/scripts/deploy-voidbot.sh`. `/srv/build/VoidBot/.git` and `/srv/build/cultcache-ts/.git` must remain wholly `idunn`-owned because lazy partial-clone reads can fetch objects; root owns releases and service promotion, never build-repo Git state.
|
||||
- Dynamic heat is live as derived semantic response pressure. `semantic-pressure-source.ts` batches canonical Face affinity cards and recent permitted-channel human-message embeddings through the existing RAG embedder, applies recency decay/noisy-OR aggregation, and returns bounded projections for at most three scheduler-eligible Faces. It does not write scheduler state. `initiative-engine.ts` alone commits inspectable evidence, `dynamicHeat`, one-time semantic interrupt receipts, and readiness changes. Direct mentions remain obligations, and model/Discord failures fail cool without bypassing rest, active jobs, or scheduler capacity.
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ VoidBot runs on Yggdrasil. Idunn owns deployment and consumes upstream repositor
|
|||
- Repo Face proposal/article PRs, PR comments, registered-identity Discord posts, and r/GameCultOrg Reddit thread posts now cross through parent-owned action blocks before Bifrost bridge commands. Bylined essays use the Interpreter-owned `ARTICLE` block: the Face writes naturally, the Interpreter extracts structured title/description/author/date/tags/path/body fields, and deterministic worker code renders/validates YAML frontmatter before calling `BIFROST_ROOT/tools/bifrost-bridge.mjs` for a draft PR and persona announcement. Subreddit threads use the Interpreter-owned `REDDIT THREAD` block: the Face writes a public title/body/share line, and deterministic worker code calls Bifrost `reddit-post` with Persona flair. The old `VOIDBOT_REPO_IDENTITY_ARTICLE` JSON sentinel is cut. Proposal PR and PR-comment sentinels still exist as compatibility rails. This is not merely helper placement: Bifrost's original governance/labor platform role makes it the owner of governed public crossings for GameCult work, including GitHub, r/GameCultOrg Reddit transport/thread access, Discord-native work/member/swarm interactions, dispatch receipts, CultNet/CultCache intake, and future collaboration interfaces. Heimdall is the OAuth/account/capability gate; Bifrost is the bridge/request/routing/receipt authority. VoidBot still owns room/thread cognition, moderation judgment, archive/source retrieval, and Face personality.
|
||||
- Repo Face turns now receive a Bifrost governance digest from `BIFROST_ROOT/tools/governance-threads.mjs digest --repo <repo> --agent <identity>` alongside recent Discord context. Bifrost typed CultCache topics/comments are the canonical home for feature requests, Face opinions, missing questions, approvals, and dispatch receipts; Discord is a mirror/evidence source. When `BIFROST_DISCORD_CHANNEL_ID` is configured for `#bifrost`, repo Face Discord context ignores mirrored bot chatter there because the authoritative activity arrives through the Bifrost digest. Human `#bifrost` messages should only become governance comments after Bifrost/Heimdall can link the Discord id to a registered actor. Repo-local asks that would send a human or Codex to add/fix/name/scaffold/document/test/investigate/implement belong on Bifrost with enough room/repo context for a claimed Codex turn; a Face may still speak characterfully in Aquarium, but not as the only dispatch surface. Legacy `UPDATE REQUEST` packets are parsed only as compatibility input and reconciled into Bifrost topics instead of immediate transport enqueue. Local `#bifrost` is channel `1506760343836430376`; work proposals, governance mirrors, and Bifrost dispatch receipts should go there, while Aquarium remains the casual/social swarm room.
|
||||
- Repo character turns now have a state-projector plus turn-Interpreter shape. The state-in boundary is `prompts/repo-face-state-projector.prompt.md`: typed state and identity material are translated into lived character prose before the child sees it. The state projector must surface values, drives, wounds, fascinations, aesthetic taste, dignity, mood, needs, social reads, bonds, agency pressure, and the personality-specific meaning of sparse or dense social topology when the state contains those facts. The deterministic state packet feeding that projector is intentionally verbose and parent-facing: it exposes private notes, values, activation vectors, runtime rest/speaking pressure, affect needs, bonds, status reads, mood dimensions, durable memories, short-term residue, agency pressures, incubating thoughts, candidate speech pressure, recent speech residue, social graph facts, room weather, and semantic curiosity graph attractors so every included variable can appear directly or bend behavior. The curiosity graph is built by seeding history/source vector retrieval from current room context, nearby channels, typed Face state, and home-jurisdiction identity, then decoding retrieved chunks into weighted attractor clusters with prominence, saturation, novelty, density, jurisdiction fit, suggested motion, and evidence labels. The projector owns turning those neutral facts into lived curiosity, boredom, fatigue, territorial pull, underexplored intrigue, or a closing/pivot impulse; deterministic code must not decide the feeling. Deterministic code may also attach neutral graph facts such as mapped people and unmapped registered peers to the projector packet, but it must not decide whether that feels like anxiety, territorial scouting, or nothing. Deterministic code attaches recent read-only home-repo activity before chat, using the Face's own state path as the repo-activity cursor source, so current implementation motion is visible as body context. Current-room and nearby-channel logs no longer cross a model conversation projector; deterministic code attaches raw oldest-to-newest transcript evidence with explicit recency/correction rules so the Face can notice human reframes directly. Deterministic code also attaches a social-affordance surface that matches active typed person-bonds/status reads to recent raw messages from that person, so relationship state arrives as a live hook rather than private decorative lore. Deterministic code still owns full prompt assembly and inspection through `scripts/run-repo-face-heartbeats.ts --assemble-prompt <identity>`; that path composes stable doctrine, allowed rooms, research/archive capability guidance, Bifrost digest, projected memory/affect prose, home-repo activity, live social affordances, and raw conversation evidence into the exact child prompt. It must not invent personality, mood, affect, or social memory from typed state. Situational obligations such as direct-call priority or first-public-introduction duty are emitted only when the scheduler packet proves they apply, not as standing prompt law. The child character writes a natural in-character turn on full `gpt-5.4` and may describe desired speech, repo/article proposals, social reads, needs, mood shifts, or memory-worthy thoughts without emitting action DSL blocks. The cheaper Spark/Mini parent Interpreter decides route/retry/drop and translates warranted effects into structured `STATE NOTE` and `SAY` blocks for the worker while governance dispatch remains paused. `STATE NOTE` blocks become typed short-term memory, affect needs, social bonds, status reads, mood dimensions, or agency pressure. The worker still accepts legacy compact JSON sentinels and legacy `UPDATE REQUEST` blocks for compatibility, but the live prompt path keeps transport and state syntax out of the character's roleplay surface.
|
||||
- `apps/persona-scheduler` is the resident daemon organ that owns the serialized Persona wall-clock pulse on Yggdrasil. It invokes the remaining turn orchestrator without overlap and remains alive between pulses. `apps/persona-scheduler/src/initiative-engine.ts` owns the pure scheduling state machine: participant reconciliation, deterministic base speed/bias/threshold derivation, operator heat/speed projection, semantic-pressure commits, wall-clock advancement, active-turn freeze/completion recovery, queue-success/failure/dry-run commits, stale rescheduling, pending-mention priority, rest/idle eligibility, and ready ordering. Explicit blocked/withdrawn status, active load, semantic receipts, and initiative position survive reconciliation; new Faces without a usable mouth fail closed. `apps/persona-scheduler/src/state-store.ts` owns scheduler persistence and legacy migration. It stores one typed `voidbot.persona_scheduler_state` record in `repo-face-heartbeats.cc`, migrates the former JSON document once with a `storage_migrated` witness, rejects malformed CultCache instead of replacing it, and writes JSON only as a derived dashboard/debug projection. `packages/core/src/repo-face-heartbeat-queue.ts` resolves both legacy `.json` configuration and current `.cc` configuration to the same canonical path; the Discord bot publishes one immutable `voidbot.persona_attention_command` CultCache inbox document per addressed message. The scheduler store ingests and deduplicates those commands, persists them as pending attention, then acknowledges inbox files only after the durable commit; a crash before acknowledgement replays safely. `apps/persona-scheduler/src/active-turn-source.ts` owns the Postgres/legacy-lock liveness adapter. It recognizes only Persona turn request IDs, applies the bounded stale threshold, marks dead queue claims failed, and returns active/stale witnesses; it never writes scheduler state. `apps/persona-scheduler/src/persona-state-source.ts` owns read-only typed Persona-state acquisition and present-time physiology projection. It reports typed mind plus rest facts without creating missing state or writing sleep/speaking-pressure state; the initiative engine alone applies rest eligibility. `apps/persona-scheduler/src/persona-memory-context-source.ts` owns the derived vector refresh and semantic recall query for one supplied typed Mind observation. It returns typed hits/unavailability and cannot reacquire canonical state, render prompt prose, or queue work. `apps/persona-scheduler/src/persona-memory-projector.ts` owns deterministic/model projection policy, its prompt template, output sufficiency, leak rejection, all typed-state sections including clarity-conditioned agency/incubation/candidate/receipt pressure, and final ordering of named external fact sections. It cannot acquire state, retrieve vectors, or queue work. `apps/persona-scheduler/src/discord-activity-source.ts` owns neutral Discord activity acquisition: it deduplicates explicit watched channels, excludes bot traffic, reports raw human messages, and derives idle-cooling times from scheduler history without writing state or selecting work. `apps/persona-scheduler/src/semantic-pressure-source.ts` owns embedding-backed affinity observation and returns bounded projections for eligible Personas and permitted channels. It cannot mutate initiative; `initiative-engine.ts` alone applies pressure, dynamic heat, interrupt readiness, dedupe receipts, and transition history. `apps/persona-scheduler/src/turn-context-source.ts` owns current-room and nearby-channel Discord evidence plus the bounded image-attachment cache. It returns chronological source messages and explicit snapshot failure witnesses; it has no access to Persona state, prompt composition, or the job queue. `scripts/run-repo-face-heartbeats.ts` projects the identity registry into neutral participant specs and affinity candidates, computes the still-unextracted social/relationship/room/clarity/maintenance fact strings, passes them by name to the projector, and invokes external queue actuators pending further extraction. External adapters report facts; only the initiative engine mutates load, counters, recovery position, pressure, and queue-transition history. Repo Faces and native Personas queue ordinary `repo-face-rumination` jobs through the canonical job queue. Built-in Void participates only when its separate moderation heartbeat organ is enabled; the hosted scheduler does not launch Windows PowerShell.
|
||||
- `apps/persona-scheduler` is the resident daemon organ that owns the serialized Persona wall-clock pulse on Yggdrasil. It invokes the remaining turn orchestrator without overlap and remains alive between pulses. `apps/persona-scheduler/src/initiative-engine.ts` owns the pure scheduling state machine: participant reconciliation, deterministic base speed/bias/threshold derivation, operator heat/speed projection, semantic-pressure commits, wall-clock advancement, active-turn freeze/completion recovery, queue-success/failure/dry-run commits, stale rescheduling, pending-mention priority, rest/idle eligibility, and ready ordering. Explicit blocked/withdrawn status, active load, semantic receipts, and initiative position survive reconciliation; new Faces without a usable mouth fail closed. `apps/persona-scheduler/src/state-store.ts` owns scheduler persistence and legacy migration. It stores one typed `voidbot.persona_scheduler_state` record in `repo-face-heartbeats.cc`, migrates the former JSON document once with a `storage_migrated` witness, rejects malformed CultCache instead of replacing it, and writes JSON only as a derived dashboard/debug projection. `packages/core/src/repo-face-heartbeat-queue.ts` resolves both legacy `.json` configuration and current `.cc` configuration to the same canonical path; the Discord bot publishes one immutable `voidbot.persona_attention_command` CultCache inbox document per addressed message. The scheduler store ingests and deduplicates those commands, persists them as pending attention, then acknowledges inbox files only after the durable commit; a crash before acknowledgement replays safely. `apps/persona-scheduler/src/active-turn-source.ts` owns the Postgres/legacy-lock liveness adapter. It recognizes only Persona turn request IDs, applies the bounded stale threshold, marks dead queue claims failed, and returns active/stale witnesses; it never writes scheduler state. `apps/persona-scheduler/src/persona-state-source.ts` owns read-only typed Persona-state acquisition and present-time physiology projection. It reports typed mind plus rest facts without creating missing state or writing sleep/speaking-pressure state; the initiative engine alone applies rest eligibility. `apps/persona-scheduler/src/persona-memory-context-source.ts` owns the derived vector refresh and semantic recall query for one supplied typed Mind observation. It returns typed hits/unavailability and cannot reacquire canonical state, render prompt prose, or queue work. `apps/persona-scheduler/src/persona-memory-projector.ts` owns deterministic/model projection policy, its prompt template, output sufficiency, leak rejection, all typed-state sections including clarity-conditioned agency/incubation/candidate/receipt pressure, and final ordering of named external fact sections. `apps/persona-scheduler/src/persona-social-context-projector.ts` owns time-explicit relationship freshness, room-texture observation, memory-facing room facts, turn-facing room weather, and pronoun-guidance rendering from supplied facts. Neither projector may acquire Discord, reopen Persona state, retrieve vectors, or queue work. `apps/persona-scheduler/src/discord-activity-source.ts` owns neutral Discord activity acquisition: it deduplicates explicit watched channels, excludes bot traffic, reports raw human messages, and derives idle-cooling times from scheduler history without writing state or selecting work. `apps/persona-scheduler/src/semantic-pressure-source.ts` owns embedding-backed affinity observation and returns bounded projections for eligible Personas and permitted channels. It cannot mutate initiative; `initiative-engine.ts` alone applies pressure, dynamic heat, interrupt readiness, dedupe receipts, and transition history. `apps/persona-scheduler/src/turn-context-source.ts` owns current-room and nearby-channel Discord evidence plus the bounded image-attachment cache. It returns chronological source messages and explicit snapshot failure witnesses; it has no access to Persona state, prompt composition, or the job queue. `scripts/run-repo-face-heartbeats.ts` projects the identity registry into neutral participant specs and affinity candidates, still computes social-graph/peer-opening/relationship-pressure/human-clarity/maintenance facts, passes all facts by name to the projector, and invokes external queue actuators pending further extraction. External adapters report facts; only the initiative engine mutates load, counters, recovery position, pressure, and queue-transition history. Repo Faces and native Personas queue ordinary `repo-face-rumination` jobs through the canonical job queue. Built-in Void participates only when its separate moderation heartbeat organ is enabled; the hosted scheduler does not launch Windows PowerShell.
|
||||
- `apps/persona-scheduler/src/bifrost-governance-source.ts` owns the remaining Bifrost governance digest subprocess contract. It supplies the CLI path, arguments, timeout, JSON parsing, and typed command/parse failure topics; Persona prompt composition receives a `BifrostGovernanceDigest` and cannot invoke Bifrost directly.
|
||||
- The scheduler state has one write authority. `initiative-engine.ts` commits participant reconciliation, operator controls, pause/disabled skips, stale-turn recovery witnesses, semantic pressure, pending-attention consumption, queue outcomes, and tick finalization. `run-repo-face-heartbeats.ts` contains no direct participant/state assignment or history append; its sources and actuators return facts to engine commits.
|
||||
- `apps/persona-scheduler/src/turn-actuator.ts` is the worker-queue output port. Given a completed prompt, output channel, evidence fields, provider, identity, timestamp, and narrow `createJob` capability, it builds the canonical worker actor/guild `ContextBundle`, creates one approved `repo-face-rumination` job, and returns `{created, activeJobId, requestMessageId}`. It cannot choose a Persona, mutate scheduler state, or compose prompt content. The orchestration shell no longer knows `ContextBuilder`, job approval defaults, worker command names, or `createJob` mechanics.
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ import {
|
|||
type PersonaMemoryRecallObservation,
|
||||
} from "../apps/persona-scheduler/dist/persona-memory-context-source.js";
|
||||
import { composePersonaMemoryPacket, projectPersonaMemorySurface, renderPersonaPressureSections, renderPersonaTypedStateSections } from "../apps/persona-scheduler/dist/persona-memory-projector.js";
|
||||
import { observePersonaRoomTexture, renderPersonaHumanPronounFacts, renderPersonaRelationshipFreshness, renderPersonaRoomTexture, renderPersonaRoomWeather, type PersonaHumanPronounGuidance as RepoFaceHumanPronounGuidance } from "../apps/persona-scheduler/dist/persona-social-context-projector.js";
|
||||
import {
|
||||
readDiscordActivitySnapshot,
|
||||
type IdleCoolingSnapshot,
|
||||
|
|
@ -649,9 +650,9 @@ function buildHeartbeatPrompt(input: {
|
|||
semanticMemoryRecallSurface: input.semanticMemoryRecallSurface ?? "- No semantic Persona memory recall was attached for this turn.",
|
||||
repoActivitySurface: input.repoActivitySurface ?? "- No recent home repo activity was attached for this turn.",
|
||||
conversationMemorySurface: input.conversationMemorySurface ?? "- No recent conversation transcript was attached for this turn.",
|
||||
humanPronounDirective: renderRepoFaceHumanPronounFacts(input.humanPronounGuidance ?? [])
|
||||
humanPronounDirective: renderPersonaHumanPronounFacts(input.humanPronounGuidance ?? [])
|
||||
?? "Known human pronoun guidance:\n- No explicit human pronoun guidance is attached for this turn. Use names or neutral phrasing instead of guessing.",
|
||||
roomWeatherDirective: renderRepoFaceRoomWeatherDirective(input.identity, {
|
||||
roomWeatherDirective: renderPersonaRoomWeather({ identity: input.identity,
|
||||
recentMessages: input.recentMessages,
|
||||
channelSnapshots: input.channelSnapshots,
|
||||
}),
|
||||
|
|
@ -1136,7 +1137,12 @@ function renderRepoFaceStatePacket(
|
|||
: undefined;
|
||||
const clarityPressureActive = Boolean(humanClarityFacts);
|
||||
|
||||
const relationshipFreshnessFacts = renderRepoFaceRelationshipFreshnessFacts(name, state, registryIdentities);
|
||||
const relationshipFreshnessFacts = renderPersonaRelationshipFreshness({
|
||||
identityName: name,
|
||||
state,
|
||||
registryIdentities,
|
||||
observedAt: new Date(),
|
||||
});
|
||||
const socialGraphFacts = renderRepoFaceSocialGraphFacts(identity, registryIdentities, state);
|
||||
const peerOpeningFacts = roomContext
|
||||
? renderRepoFacePeerOpeningFacts(identity, registryIdentities, roomContext)
|
||||
|
|
@ -1144,9 +1150,13 @@ function renderRepoFaceStatePacket(
|
|||
const socialPressureFacts = roomContext
|
||||
? renderRepoFaceRelationshipPressureFacts(identity, registryIdentities, state, roomContext)
|
||||
: undefined;
|
||||
const pronounFacts = renderRepoFaceHumanPronounFacts(humanPronounGuidance);
|
||||
const pronounFacts = renderPersonaHumanPronounFacts(humanPronounGuidance);
|
||||
const roomTextureFacts = roomContext
|
||||
? renderRepoFaceRoomTextureFacts(identity, roomContext)
|
||||
? renderPersonaRoomTexture({
|
||||
identity,
|
||||
...roomContext,
|
||||
topicAttractorFacts: renderRepoFaceTopicAttractorFacts(identity, roomContext.recentMessages),
|
||||
})
|
||||
: undefined;
|
||||
|
||||
const selfMaintenancePressureFacts = !clarityPressureActive
|
||||
|
|
@ -1237,96 +1247,6 @@ function renderRepoFaceSelfMaintenancePressureFacts(
|
|||
].join("\n");
|
||||
}
|
||||
|
||||
function renderRepoFaceRelationshipFreshnessFacts(
|
||||
name: string,
|
||||
state: VoidSelfStateTypedProjection,
|
||||
registryIdentities: RepoDiscordIdentity[],
|
||||
): string | undefined {
|
||||
const nowMs = Date.now();
|
||||
const peerKeys = repoFacePeerSocialKeys(registryIdentities);
|
||||
const staleBonds = (state.faceAffect.socialBonds ?? [])
|
||||
.filter((bond) => bond.status === "active" && bond.target.kind === "person" && isRepoFacePeerTarget(bond.target, peerKeys))
|
||||
.map((bond) => ({
|
||||
target: targetLabel(bond.target),
|
||||
kind: bond.stance,
|
||||
intensity: bond.intensity,
|
||||
ageHours: ageHoursSince(bond.updatedAt, nowMs),
|
||||
summary: bond.summary,
|
||||
action: bond.actionImplication,
|
||||
}))
|
||||
.filter((entry) => entry.ageHours >= 48)
|
||||
.sort((left, right) => (right.ageHours * right.intensity) - (left.ageHours * left.intensity))
|
||||
.slice(0, 5);
|
||||
const staleReads = (state.faceAffect.statusReads ?? [])
|
||||
.filter((read) => !read.retiredAt && read.target.kind === "person" && isRepoFacePeerTarget(read.target, peerKeys))
|
||||
.map((read) => ({
|
||||
target: targetLabel(read.target),
|
||||
kind: read.status,
|
||||
intensity: read.intensity,
|
||||
ageHours: ageHoursSince(read.updatedAt, nowMs),
|
||||
summary: read.summary,
|
||||
action: read.actionImplication,
|
||||
}))
|
||||
.filter((entry) => entry.ageHours >= 72)
|
||||
.sort((left, right) => (right.ageHours * right.intensity) - (left.ageHours * left.intensity))
|
||||
.slice(0, 5);
|
||||
const entries = [
|
||||
...staleBonds.map((entry) =>
|
||||
`- ${entry.target}: ${entry.kind} bond has gone ${formatAgeHours(entry.ageHours)} without contact. ${asSentence(entry.summary)} Touch-base pull: ${asSentence(entry.action)}`,
|
||||
),
|
||||
...staleReads.map((entry) =>
|
||||
`- ${entry.target}: ${entry.kind} status read has gone ${formatAgeHours(entry.ageHours)} without contact. ${asSentence(entry.summary)} Touch-base pull: ${asSentence(entry.action)}`,
|
||||
),
|
||||
].slice(0, 6);
|
||||
|
||||
if (entries.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return [
|
||||
`Relationship freshness pressure for ${name}:`,
|
||||
...entries,
|
||||
"These are not commands to dump feelings. They are swarm social graph itch. A compact tease, check-in, challenge, compliment, question, or repair with another Face can be a successful public turn.",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
function repoFacePeerSocialKeys(registryIdentities: RepoDiscordIdentity[]): Set<string> {
|
||||
const keys = new Set<string>();
|
||||
for (const identity of registryIdentities) {
|
||||
for (const value of [identity.id, identity.displayName, identity.repoName]) {
|
||||
const key = normalizeSocialLabel(value);
|
||||
if (key.length > 0) {
|
||||
keys.add(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
function isRepoFacePeerTarget(
|
||||
target: { id: string; label?: string },
|
||||
peerKeys: Set<string>,
|
||||
): boolean {
|
||||
return [target.id, target.label]
|
||||
.map(normalizeSocialLabel)
|
||||
.some((key) => key.length > 0 && peerKeys.has(key));
|
||||
}
|
||||
|
||||
function ageHoursSince(value: string | undefined, nowMs: number): number {
|
||||
const then = Date.parse(value ?? "");
|
||||
if (!Number.isFinite(then)) {
|
||||
return 999;
|
||||
}
|
||||
return Math.max(0, (nowMs - then) / 3_600_000);
|
||||
}
|
||||
|
||||
function formatAgeHours(hours: number): string {
|
||||
if (hours >= 48) {
|
||||
return `${Math.round(hours / 24)} days`;
|
||||
}
|
||||
return `${Math.round(hours)} hours`;
|
||||
}
|
||||
|
||||
function cleanRepoFaceProjectorLoopVocabulary(
|
||||
identity: RepoDiscordIdentity,
|
||||
surface: string,
|
||||
|
|
@ -1396,63 +1316,6 @@ function targetLabel(target: { label?: string; id?: string; kind?: string } | un
|
|||
return target.label ?? target.id ?? target.kind ?? "an unnamed target";
|
||||
}
|
||||
|
||||
function renderRepoFaceRoomTextureFacts(
|
||||
identity: RepoDiscordIdentity,
|
||||
input: {
|
||||
recentMessages: SourceMessage[];
|
||||
channelSnapshots: ChannelSnapshot[];
|
||||
},
|
||||
): string | undefined {
|
||||
const stats = collectRepoFaceRoomTextureStats(identity, input);
|
||||
if (!stats) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const temporaryPressures = stats.texture === "heavy" || stats.agentShare >= 0.55
|
||||
? [
|
||||
"- Temporary affect pressure candidates: play, rest, and social_contact may be hungry because the room is carrying sustained work/agent weight.",
|
||||
"- These are not stored needs and not orders. Project whether this character gets mischievous, bored, sharp, withdrawn, socially hungry, status-testing, or still work-focused.",
|
||||
]
|
||||
: [];
|
||||
const topicAttractorFacts = renderRepoFaceTopicAttractorFacts(identity, input.recentMessages);
|
||||
|
||||
return [
|
||||
"Room texture facts:",
|
||||
`- Observed messages: ${stats.total}; humans: ${stats.humanMessages}; agents/bots: ${stats.agentMessages}; distinct speakers: ${stats.speakerCount}.`,
|
||||
`- Long messages: ${stats.longMessages}; short messages: ${stats.shortMessages}; average length: ${stats.averageCharacters} characters.`,
|
||||
`- This Face's own recent messages in the attached window: ${stats.ownMessages}.`,
|
||||
`- Structural texture: ${stats.texture}. This is evidence about conversational weight, not a command to speak or joke.`,
|
||||
...temporaryPressures,
|
||||
...(topicAttractorFacts ? [topicAttractorFacts] : []),
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
function renderRepoFaceRoomWeatherDirective(
|
||||
identity: RepoDiscordIdentity,
|
||||
input: {
|
||||
recentMessages: SourceMessage[];
|
||||
channelSnapshots: ChannelSnapshot[];
|
||||
},
|
||||
): string {
|
||||
const stats = collectRepoFaceRoomTextureStats(identity, input);
|
||||
if (!stats) {
|
||||
return "- No current room weather was available.";
|
||||
}
|
||||
|
||||
const pressure =
|
||||
stats.texture === "heavy" || stats.agentShare >= 0.55
|
||||
? "The room is currently structurally work-heavy or agent-heavy. Treat that as conversational weather: it may create boredom, play hunger, restlessness, social hunger, withdrawal, or sharper status-testing, depending on who you are. This is not an order to joke; it is permission to feel the weight instead of answering every opening with more work."
|
||||
: stats.texture === "light"
|
||||
? "The room is currently light enough for compact social motion. You still need an actual reason to speak, but not a work ticket."
|
||||
: "The room is mixed. Use the transcript to decide whether the living pressure is social, practical, or private.";
|
||||
|
||||
return [
|
||||
`- Messages observed: ${stats.total}; humans: ${stats.humanMessages}; agents/bots: ${stats.agentMessages}; distinct speakers: ${stats.speakerCount}.`,
|
||||
`- Texture: ${stats.texture}; your own recent messages in this window: ${stats.ownMessages}.`,
|
||||
`- ${pressure}`,
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
interface RepoFaceCuriosityNode {
|
||||
id: string;
|
||||
text: string;
|
||||
|
|
@ -2058,68 +1921,6 @@ function collectLoopVocabularyTerms(content: string): string[] {
|
|||
return terms.filter((term) => normalized.includes(term));
|
||||
}
|
||||
|
||||
interface RepoFaceRoomTextureStats {
|
||||
total: number;
|
||||
agentMessages: number;
|
||||
humanMessages: number;
|
||||
ownMessages: number;
|
||||
longMessages: number;
|
||||
shortMessages: number;
|
||||
averageCharacters: number;
|
||||
speakerCount: number;
|
||||
texture: "heavy" | "light" | "mixed";
|
||||
agentShare: number;
|
||||
}
|
||||
|
||||
function collectRepoFaceRoomTextureStats(
|
||||
identity: RepoDiscordIdentity,
|
||||
input: {
|
||||
recentMessages: SourceMessage[];
|
||||
channelSnapshots: ChannelSnapshot[];
|
||||
},
|
||||
): RepoFaceRoomTextureStats | undefined {
|
||||
const messages = [
|
||||
...input.recentMessages,
|
||||
...input.channelSnapshots.flatMap((snapshot) => snapshot.messages),
|
||||
];
|
||||
if (messages.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const ownToken = normalizeSocialLabel(identity.displayName);
|
||||
const total = messages.length;
|
||||
const agentMessages = messages.filter((message) => message.isBot).length;
|
||||
const humanMessages = total - agentMessages;
|
||||
const ownMessages = messages.filter((message) => normalizeSocialLabel(message.authorName) === ownToken).length;
|
||||
const longMessages = messages.filter((message) => collapseWhitespace(message.content, 10_000).length >= 220).length;
|
||||
const shortMessages = messages.filter((message) => collapseWhitespace(message.content, 10_000).length <= 90).length;
|
||||
const averageCharacters = Math.round(
|
||||
messages.reduce((sum, message) => sum + collapseWhitespace(message.content, 10_000).length, 0) / total,
|
||||
);
|
||||
const speakerCount = new Set(
|
||||
messages.map((message) => normalizeSocialLabel(message.authorName || message.authorId)).filter(Boolean),
|
||||
).size;
|
||||
const texture =
|
||||
longMessages >= Math.ceil(total * 0.45) || averageCharacters >= 180
|
||||
? "heavy"
|
||||
: shortMessages >= Math.ceil(total * 0.55)
|
||||
? "light"
|
||||
: "mixed";
|
||||
|
||||
return {
|
||||
total,
|
||||
agentMessages,
|
||||
humanMessages,
|
||||
ownMessages,
|
||||
longMessages,
|
||||
shortMessages,
|
||||
averageCharacters,
|
||||
speakerCount,
|
||||
texture,
|
||||
agentShare: agentMessages / total,
|
||||
};
|
||||
}
|
||||
|
||||
function renderRepoFaceSocialGraphFacts(
|
||||
identity: RepoDiscordIdentity,
|
||||
registryIdentities: RepoDiscordIdentity[],
|
||||
|
|
@ -2401,16 +2202,6 @@ function socialPressureLanguageKinds(content: string): string[] {
|
|||
return kinds;
|
||||
}
|
||||
|
||||
interface RepoFaceHumanPronounGuidance {
|
||||
actorId: string;
|
||||
actorName: string;
|
||||
guidance: string;
|
||||
resolvedPronounSet?: string;
|
||||
policy: string;
|
||||
confidence?: number;
|
||||
evidenceExcerpt?: string;
|
||||
}
|
||||
|
||||
async function loadRepoFaceHumanPronounGuidance(
|
||||
config: ReturnType<typeof loadConfig>,
|
||||
roomContext?: {
|
||||
|
|
@ -2497,28 +2288,6 @@ function pronounEvidenceRank(profile: InteractionMemoryProfile, entry: Interacti
|
|||
return resolvedSetBonus + (sourceRank[entry.source] ?? 0) + stanceBonus + confidenceBonus + recencyBonus;
|
||||
}
|
||||
|
||||
function renderRepoFaceHumanPronounFacts(
|
||||
guidance: RepoFaceHumanPronounGuidance[],
|
||||
): string | undefined {
|
||||
if (guidance.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return [
|
||||
"Known human pronoun guidance:",
|
||||
...guidance.map((entry) =>
|
||||
[
|
||||
`- ${entry.actorName}: ${entry.guidance}`,
|
||||
entry.resolvedPronounSet ? `Resolved set: ${entry.resolvedPronounSet}.` : "",
|
||||
entry.policy ? `Policy: ${entry.policy}.` : "",
|
||||
typeof entry.confidence === "number" ? `Confidence: ${entry.confidence.toFixed(2)}.` : "",
|
||||
entry.evidenceExcerpt ? `Evidence: "${collapseWhitespace(entry.evidenceExcerpt, 180)}"` : "",
|
||||
].filter(Boolean).join(" "),
|
||||
),
|
||||
"Use this when referring to humans in social or relationship prose. If guidance is absent for someone, use their name or neutral phrasing rather than guessing.",
|
||||
].join("\n");
|
||||
}
|
||||
|
||||
function collectRepoFaceSocialRelations(
|
||||
state: VoidSelfStateTypedProjection,
|
||||
): Array<{ targetLabel: string; pressure: string; intensity: number }> {
|
||||
|
|
@ -3167,7 +2936,7 @@ function renderTurnSituationDirective(input: {
|
|||
);
|
||||
}
|
||||
|
||||
const roomStats = collectRepoFaceRoomTextureStats(input.identity, {
|
||||
const roomStats = observePersonaRoomTexture({ identity: input.identity,
|
||||
recentMessages: input.recentMessages,
|
||||
channelSnapshots: input.channelSnapshots,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ import { readRepoActivity } from "../apps/persona-scheduler/dist/repo-activity-s
|
|||
import { readPersonaStateObservation } from "../apps/persona-scheduler/dist/persona-state-source.js";
|
||||
import { readPersonaMemoryRecall } from "../apps/persona-scheduler/dist/persona-memory-context-source.js";
|
||||
import { composePersonaMemoryPacket, projectPersonaMemorySurface, renderPersonaPressureSections, renderPersonaTypedStateSections } from "../apps/persona-scheduler/dist/persona-memory-projector.js";
|
||||
import { observePersonaRoomTexture, renderPersonaHumanPronounFacts, renderPersonaRoomWeather } from "../apps/persona-scheduler/dist/persona-social-context-projector.js";
|
||||
|
||||
function participant(identityId: string, nextTurnAt: number): InitiativeParticipant {
|
||||
return {
|
||||
|
|
@ -445,6 +446,14 @@ assert.deepEqual(await readPersonaMemoryRecall({
|
|||
status: "unavailable",
|
||||
reason: "No typed Persona state observation was supplied.",
|
||||
}, "semantic recall fails explicitly before touching vector infrastructure when the typed Mind observation is absent");
|
||||
const roomObservation = observePersonaRoomTexture({
|
||||
identity: routedIdentity,
|
||||
recentMessages: [{ id: "human-1", authorId: "human", authorName: "Operator", content: "hello", timestamp: "2026-07-15T21:00:00.000Z", isBot: false, channelId: "aquarium" }],
|
||||
channelSnapshots: [],
|
||||
});
|
||||
assert.equal(roomObservation?.texture, "light", "social-context projection derives room weather from supplied messages without acquiring Discord state");
|
||||
assert.match(renderPersonaRoomWeather({ identity: routedIdentity, recentMessages: [], channelSnapshots: [] }), /No current room weather/, "absent room evidence stays explicit");
|
||||
assert.match(renderPersonaHumanPronounFacts([{ actorId: "human", actorName: "Operator", guidance: "use they/them", policy: "explicit", confidence: 1 }]) ?? "", /Confidence: 1\.00/, "pronoun guidance presentation belongs to the social-context projector");
|
||||
assert.equal(await projectPersonaMemorySurface({
|
||||
identityId: "nibu",
|
||||
characterIdentity: "Nibu",
|
||||
|
|
|
|||
|
|
@ -416,3 +416,4 @@
|
|||
{"ts":"2026-07-16T00:00:35Z","type":"implementation","status":"ok","note":"Extracted Persona memory projection policy into persona-memory-projector.ts. One boundary now owns deterministic/model selection, projector prompt construction, minimum output, and schema/path leak rejection through an injected text-model port; repo Faces and typed native Personas share it. Smoke proves model-free projection and negative leak rejection."}
|
||||
{"ts":"2026-07-16T00:11:13Z","type":"implementation","status":"ok","note":"Moved the pure typed Persona-state core into persona-memory-projector.ts: identity texture, activation/runtime pressure, needs, bonds, status, mood, and durable/short-term memory. Deleted duplicate shell renderers and repaired the stale leak-validator reference. Execution-level --assemble-prompt nibu succeeded under file storage, covering the script path that tsc -b omits."}
|
||||
{"ts":"2026-07-16T00:21:54Z","type":"implementation","status":"ok","note":"Moved clarity-conditioned agency/incubation/candidate/receipt rendering and final named external-fact ordering into persona-memory-projector.ts. The shell now senses social/room/clarity/maintenance facts and passes them explicitly. Prompt assembly remained byte-length equivalent at 153917 characters; smoke covers explicit external-fact ordering."}
|
||||
{"ts":"2026-07-16T00:33:49Z","type":"implementation","status":"ok","note":"Created persona-social-context-projector.ts and moved time-explicit relationship freshness, room texture observation/rendering, room weather, and pronoun guidance there. Deleted duplicate shell implementations. Prompt assembly and scheduler dry-run execute successfully; smoke proves supplied-message room projection and pronoun rendering."}
|
||||
|
|
|
|||
|
|
@ -278,4 +278,4 @@ rejected_paths:
|
|||
|
||||
current_status:
|
||||
summary: VoidBot's bot/worker/provider/RAG/Postgres/Qdrant/CultCache structure is live. Repo Face/persona heartbeat jobs run through the direct `openai_api` provider configured for MiMo `mimo-v2.5-pro`, with the expensive state-projector pass still disabled. The 2026-07-04 transport repair replaced the old Bifrost HTTP/token bridge shortcut with typed Bifrost CultMesh Discord command and receipt documents advertised in the Bifrost provider store at `cultmesh://asgard.starfire.bifrost/commands/discord-post`. VoidBot stores the Bifrost target as a CultMesh URI, writes command docs to `E:/Projects/Bifrost/.bifrost/provider-store.cc`, optionally pumps Bifrost's command processor, and waits for typed receipts before completing repo Face Discord delivery. Bifrost's provider advertisement exposes `discord.post` command metadata for Odin/Eve agents, and a bounded Weksa live-fire completed visibly. Eve live state now runs end to end through CultLib dev retained publications, Hermodr ordered SSE, Eve component bindings, and VoidBot typed control state. Receipts acknowledge intent only. Heat initial load, provider-driven change, and browser-command change were visibly verified without reload through the same subscription.
|
||||
next_action: Extract social/room fact projection from `scripts/run-repo-face-heartbeats.ts` into a pure Persona social-context projector consuming typed state, registry identities, raw `turn-context-source` observations, and human-pronoun guidance. Keep Discord acquisition in `turn-context-source.ts`, curiosity retrieval in its source, and final packet ordering in `persona-memory-projector.ts`.
|
||||
next_action: Move social-graph topology, peer-opening, relationship-pressure, and human-clarity renderers from `scripts/run-repo-face-heartbeats.ts` into `persona-social-context-projector.ts`. Pass the resulting typed projection to `persona-memory-projector.ts`; keep Discord acquisition and interaction-memory loading outside both projectors.
|
||||
|
|
|
|||
Loading…
Reference in a new issue