mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-03 01:01:34 +00:00
* fix(memory-core): scope dream narrative sessions to their owning agent Dreaming narratives built unscoped subagent session keys (`dreaming-narrative-<phase>-<hash>`). Sessions live in per-agent SQLite stores, so the plugin-runtime ownership pre-check could not resolve a store and every narrative call failed with "Cannot resolve SQLite session scope without an agent id" — the whole diary pipeline produced nothing while the sweep still logged "dreaming promotion complete". The agent id was available all along: `resolveMemoryDreamingWorkspaces` returns it per workspace and the hook context carries the triggering agent. Both were dropped. Session keys are now `agent:<id>:dreaming-narrative-...`, while runIds stay unscoped so the orphan-transcript scrub marker still matches. An unexpected narrative failure now writes the same dated fallback diary entry the other failure branches write, and the promotion summary warns instead of informing when every workspace failed. * fix(memory-core): narrow the narrative export surface and type the sweep test double * test(memory-core): drop the now-unused missing-path helper * fix(memory-core): scope the narrative run id and keep empty sweeps a no-op * fix(memory-core): route the ownerless narrative fallback through detached dispatch