Run memory maintenance during sleep

This commit is contained in:
Meta Vens 2026-05-17 12:10:26 +01:00
commit 868e242ce4
9 changed files with 151 additions and 21 deletions

View file

@ -633,7 +633,7 @@ That gives the loop a compact digest of recent commit motion across every tracke
The moderator state is now typed CultCache state, not an editable Ghostlight-shaped JSON projection. The typed documents own profile, moderation cursor/open cases, speech receipts, thought memory/incubation, scheduled runtime, and candidate interventions. The old JSON projection, state template, and context exporter are gone.
The typed rumination runner can still think about GameCult projects, archived Discord seams, indexed repos, recent cross-repo commit motion, and lore, but durable changes must come back as typed operation payloads. The child does not edit state.
The mood-drift task is currently a typed sleep/speaking-pressure pass. Memory maintenance now has its first replacement runner at `scripts/run-void-memory-maintenance.ps1`: it reads typed self-state, loads `prompts/void-memory-maintenance.md`, and applies only memory/incubation/candidate typed operation proposals. Use `-StateFilePath` for fixture stores. Dream residue, identity crystallization, value pressure, and other agency behavior still have to come back through that operation boundary. No compatibility séance.
The mood-drift task owns the sleep transition. When Void is napping, it invokes `scripts/run-void-memory-maintenance.ps1` once per nap unless the pass already completed for that nap. Memory maintenance reads typed self-state, loads `prompts/void-memory-maintenance.md`, and applies only memory/incubation/candidate typed operation proposals. Use `-StateFilePath` for fixture stores, and `--skip-memory-maintenance` on `simulate-void-mood.mjs` for smoke runs that must not invoke Codex. Dream residue, identity crystallization, value pressure, and other agency behavior still have to come back through that operation boundary. No compatibility séance.
Directly invoked live replies read the same typed private self-state as a distilled self-state attachment. When the sleep projection says Void is napping, the direct reply path skips the expensive room-read sidecar, avoids normal attentive service-work, and answers in brief sleepy grumbles instead.
The moderation loop now speaks through the local bot token instead of approval-gated side-effecting MCP tools, so unattended runs can DM or post without making Codex stop and ask your permission every time it finds a mouthful of words.