Closes#66328.
Before this change, every dreaming installation that did not explicitly
set `plugins.entries.memory-core.config.dreaming.storage.mode` accepted
the silent default of `"inline"`, which routes Light Sleep and REM Sleep
phase blocks (the structured staged-candidate lists with their
`<!-- openclaw:dreaming:{phase}:start -->` markers) into
`memory/YYYY-MM-DD.md`. On heavy days the inline blocks dominate the
daily memory file - the reporter measured 340 lines for the Light phase
alone, and a second cross-host check on a v2026.4.12 install observed
475 inline lines from Light plus 14 from REM in a single sweep, leaving
the daily file unusable as a "what happened today" record.
The `"separate"` storage mode that was already wired up in
`writeDailyDreamingPhaseBlock` writes the same content to
`memory/dreaming/{phase}/YYYY-MM-DD.md` instead, leaving the daily file
untouched. `stripManagedDailyDreamingLines` was already in place so the
daily-ingestion scanner does not re-record dream blocks as recall
candidates either way, but flipping the default also avoids the
incidental round-trip where the dreaming pipeline writes inline output
and then reads its own output back as fresh recall material in the next
cycle.
Operators who want the previous behavior can still opt in explicitly:
plugins.entries.memory-core.config.dreaming.storage.mode: "inline"
The host helper `normalizeStorageMode` continues to accept all three
documented modes (`inline | separate | both`); only the unset-default
fallback changes.
Test changes:
- src/memory-host-sdk/dreaming.test.ts adds two new assertions: one
pinning the new default shape and one confirming explicit `"inline"`
still round-trips for opt-in callers.
- extensions/memory-core/src/dreaming.test.ts updates four
default-output assertions in `resolveShortTermPromotionDreamingConfig`
to expect `mode: "separate"`.
- extensions/memory-core/src/dreaming-phases.test.ts pins
`LIGHT_DREAMING_TEST_CONFIG` and the inline-mode harness in
"checkpoints daily ingestion and skips unchanged daily files" to
`storage.mode: "inline"` with a comment, since those tests rely on
inline-mode side effects on `memory/<day>.md` and now need to opt in
explicitly.
The schema accept-test in extensions/memory-core/src/config.test.ts and
the inline-mode write-path tests in
extensions/memory-core/src/dreaming-markdown.test.ts intentionally keep
asserting `mode: "inline"` because they cover input handling and the
inline write path itself, both of which still need to work.