Keep durable memory anchors in context
This commit is contained in:
parent
ae9fedd3eb
commit
9558eab6f3
2 changed files with 31 additions and 2 deletions
|
|
@ -180,11 +180,20 @@ export function renderVoidSelfStateSummary(
|
|||
.sort((left, right) => right.priority - left.priority)
|
||||
.slice(0, 4)
|
||||
.map((value) => value.label);
|
||||
const memories = state.thoughtMemory.memories
|
||||
.filter((memory) => !memory.retiredAt)
|
||||
const activeMemories = state.thoughtMemory.memories
|
||||
.filter((memory) => !memory.retiredAt);
|
||||
const memories = activeMemories
|
||||
.slice(-6)
|
||||
.reverse()
|
||||
.map((memory) => renderTypedMemory(memory, identityName));
|
||||
const detailedMemoryIds = new Set(
|
||||
activeMemories
|
||||
.slice(-6)
|
||||
.map((memory) => memory.memoryId),
|
||||
);
|
||||
const memoryAnchors = activeMemories
|
||||
.filter((memory) => !detailedMemoryIds.has(memory.memoryId))
|
||||
.map((memory) => renderTypedMemoryAnchor(memory));
|
||||
const shortTermMemories = state.thoughtMemory.shortTerm
|
||||
.slice(-6)
|
||||
.reverse()
|
||||
|
|
@ -239,6 +248,9 @@ export function renderVoidSelfStateSummary(
|
|||
memories.length > 0
|
||||
? [`- What ${identityName} remembers:`, ...memories].join("\n")
|
||||
: `- What ${identityName} remembers: nothing durable yet.`,
|
||||
memoryAnchors.length > 0
|
||||
? [`- Other durable memory anchors still in reach:`, ...memoryAnchors].join("\n")
|
||||
: `- Other durable memory anchors still in reach: none.`,
|
||||
shortTermMemories.length > 0
|
||||
? ["- Short-term residue awaiting sleep:", ...shortTermMemories].join("\n")
|
||||
: "- Short-term residue awaiting sleep: none.",
|
||||
|
|
@ -429,6 +441,22 @@ function renderTypedMemory(
|
|||
return lines.join("\n");
|
||||
}
|
||||
|
||||
function renderTypedMemoryAnchor(
|
||||
memory: VoidThoughtMemory["memories"][number],
|
||||
): string {
|
||||
const target = memory.target.label ?? memory.target.id;
|
||||
const summary = truncateOptionalText(memory.summary, 180) ?? memory.summary;
|
||||
const tags = memory.tags
|
||||
.filter((tag) =>
|
||||
tag.startsWith("repo:") ||
|
||||
tag.startsWith("topic:") ||
|
||||
tag.startsWith("value:") ||
|
||||
tag.startsWith("identity:")
|
||||
)
|
||||
.slice(0, 4);
|
||||
return `- ${target}: ${summary}${tags.length > 0 ? ` [${tags.join(", ")}]` : ""}`;
|
||||
}
|
||||
|
||||
function renderTypedIncubationThread(thread: VoidThoughtMemory["incubation"][number]): string {
|
||||
const target = thread.target.label ?? thread.target.id;
|
||||
const lines = [`- ${thread.topic}: ${thread.summary}`];
|
||||
|
|
|
|||
|
|
@ -283,3 +283,4 @@
|
|||
{"ts":"2026-05-22T19:23:18Z","type":"maintenance","status":"ok","note":"Ran swarm-wide .cc hygiene after Mimir exposed retained tombstones. Repo Face state files now repair through pruned writes: all registered repo Faces retain 8 global typed documents with zero retired entries; collapse loop terms LocalCastBridge/wet-voice/canary were removed from active repo Face .cc state except Nibu's legitimate Aetheria witness vocabulary. Void's own self-state was also repaired, shrinking from about 171KB to 135KB and removing 5 retired memories, 5 retired agency pressures, and 11 retired interventions."}
|
||||
{"ts":"2026-05-22T19:24:10Z","type":"maintenance","status":"ok","note":"Completed swarm-wide state pocket-cleaning. Repaired all registered repo Face .cc files and Void self-state with pruned write semantics, removed old proof-loop receipts/state from Aqua/Epiphany/Libby/Bifrost and stale LocalCastBridge memories/cursor entries from Void, verified registered Face state files have 8 envelopes and zero retired entries; only Nibu retains witness wording as active Aetheria continuity/residue vocabulary."}
|
||||
{"ts":"2026-05-22T19:45:13Z","type":"fix","status":"ok","note":"Pruned terminal audit residue from current self-state: write normalization now drops terminal open cases and keeps only queued/deferred candidate interventions. Repaired Void self-state from about 125KB to 95KB by removing 21 terminal candidates and 2 answered cases; speech receipts remain bounded audit evidence. Updated speech and memory lifecycle fixtures for the new contract."}
|
||||
{"ts":"2026-05-22T19:48:34Z","type":"fix","status":"ok","note":"Changed Void self-state projection so durable memory is not recency-only recall. Normal context now renders full detail for the newest/salient memories plus compact anchors for the remaining active durable memories; Void's current rendered self-state summary grows from about 14KB to 18KB while keeping all 25 durable memories visible by target/summary/tags."}
|
||||
|
|
|
|||
Loading…
Reference in a new issue