fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0
2026-04-16
·
via Recent Commits to openclaw:main
File tree
extensions/memory-core/src
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,6 +20,8 @@ Docs: https://docs.openclaw.ai
|
20 | 20 | - Agents/context + Memory: trim default startup/skills prompt budgets, cap `memory_get` excerpts by default with explicit continuation metadata, and keep QMD reads aligned with the same bounded excerpt contract so long sessions pull less context by default without losing deterministic follow-up reads. |
21 | 21 | - Matrix/commands: skip DM pairing-store reads on room traffic now that room control-command authorization ignores pairing-store entries, keeping the room path narrower without changing room auth behavior. (#67325) Thanks @gumadeiras. |
22 | 22 | - Memory-core/dreaming: skip dreaming narrative transcripts from session-store metadata before bootstrap records land so dream diary prompt/prose lines do not pollute session ingestion. (#67315) thanks @jalehman. |
| 23 | +- Agents/local models: clarify low-context preflight hints for self-hosted models, point config-backed caps at the relevant OpenClaw setting, and stop suggesting larger models when `agents.defaults.contextTokens` is the real limit. (#66236) Thanks @ImLukeF. |
| 24 | +- Dreaming/memory-core: change the default `dreaming.storage.mode` from `inline` to `separate` so Dreaming phase blocks (`## Light Sleep`, `## REM Sleep`) land in `memory/dreaming/{phase}/YYYY-MM-DD.md` instead of being injected into `memory/YYYY-MM-DD.md`. Daily memory files no longer get dominated by structured candidate output, and the daily-ingestion scanner that already strips dream marker blocks no longer has to compete with hundreds of phase-block lines on every run. Operators who want the previous behavior can opt in by setting `plugins.entries.memory-core.config.dreaming.storage.mode: "inline"`. (#66412) Thanks @mjamiv. |
23 | 25 | |
24 | 26 | ## 2026.4.15-beta.1 |
25 | 27 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -27,6 +27,11 @@ const LIGHT_DREAMING_TEST_CONFIG: OpenClawConfig = {
|
27 | 27 | dreaming: { |
28 | 28 | enabled: true, |
29 | 29 | timezone: "UTC", |
| 30 | +// The existing tests in this file were written when "inline" was the |
| 31 | +// default storage mode and assert against `memory/<day>.md` directly. |
| 32 | +// Pin the storage mode explicitly so they keep covering inline mode |
| 33 | +// after the default flipped to "separate" in #66328. |
| 34 | +storage: { mode: "inline", separateReports: false }, |
30 | 35 | phases: { |
31 | 36 | light: { |
32 | 37 | enabled: true, |
@@ -305,6 +310,10 @@ describe("memory-core dreaming phases", () => {
|
305 | 310 | config: { |
306 | 311 | dreaming: { |
307 | 312 | enabled: true, |
| 313 | +// This test asserts inline-mode side effects on the daily |
| 314 | +// file; pin storage explicitly after the default flipped to |
| 315 | +// "separate" in #66328. |
| 316 | +storage: { mode: "inline", separateReports: false }, |
308 | 317 | phases: { |
309 | 318 | light: { |
310 | 319 | enabled: true, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -184,7 +184,7 @@ describe("short-term dreaming config", () => {
|
184 | 184 | maxAgeDays: 30, |
185 | 185 | verboseLogging: false, |
186 | 186 | storage: { |
187 | | -mode: "inline", |
| 187 | +mode: "separate", |
188 | 188 | separateReports: false, |
189 | 189 | }, |
190 | 190 | }); |
@@ -223,7 +223,7 @@ describe("short-term dreaming config", () => {
|
223 | 223 | maxAgeDays: 30, |
224 | 224 | verboseLogging: true, |
225 | 225 | storage: { |
226 | | -mode: "inline", |
| 226 | +mode: "separate", |
227 | 227 | separateReports: false, |
228 | 228 | }, |
229 | 229 | }); |
@@ -259,7 +259,7 @@ describe("short-term dreaming config", () => {
|
259 | 259 | maxAgeDays: 45, |
260 | 260 | verboseLogging: false, |
261 | 261 | storage: { |
262 | | -mode: "inline", |
| 262 | +mode: "separate", |
263 | 263 | separateReports: false, |
264 | 264 | }, |
265 | 265 | }); |
@@ -294,7 +294,7 @@ describe("short-term dreaming config", () => {
|
294 | 294 | maxAgeDays: 30, |
295 | 295 | verboseLogging: false, |
296 | 296 | storage: { |
297 | | -mode: "inline", |
| 297 | +mode: "separate", |
298 | 298 | separateReports: false, |
299 | 299 | }, |
300 | 300 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -615,7 +615,7 @@ export async function runShortTermDreamingPromotionIfTriggered(params: {
|
615 | 615 | bodyLines: reportLines, |
616 | 616 | nowMs: sweepNowMs, |
617 | 617 | timezone: params.config.timezone, |
618 | | -storage: params.config.storage ?? { mode: "inline", separateReports: false }, |
| 618 | +storage: params.config.storage ?? { mode: "separate", separateReports: false }, |
619 | 619 | }); |
620 | 620 | // Generate dream diary narrative from promoted memories. |
621 | 621 | if (params.subagent && (candidates.length > 0 || applied.applied > 0)) { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -90,6 +90,31 @@ describe("memory dreaming host helpers", () => {
|
90 | 90 | }); |
91 | 91 | }); |
92 | 92 | |
| 93 | +it("defaults storage mode to separate so phase blocks do not pollute daily memory files", () => { |
| 94 | +const resolved = resolveMemoryDreamingConfig({ |
| 95 | +pluginConfig: {}, |
| 96 | +}); |
| 97 | + |
| 98 | +expect(resolved.storage).toEqual({ |
| 99 | +mode: "separate", |
| 100 | +separateReports: false, |
| 101 | +}); |
| 102 | +}); |
| 103 | + |
| 104 | +it("preserves explicit inline storage mode for callers that opt in", () => { |
| 105 | +const resolved = resolveMemoryDreamingConfig({ |
| 106 | +pluginConfig: { |
| 107 | +dreaming: { |
| 108 | +storage: { |
| 109 | +mode: "inline", |
| 110 | +}, |
| 111 | +}, |
| 112 | +}, |
| 113 | +}); |
| 114 | + |
| 115 | +expect(resolved.storage.mode).toBe("inline"); |
| 116 | +}); |
| 117 | + |
93 | 118 | it("applies top-level dreaming frequency across all phases", () => { |
94 | 119 | const resolved = resolveMemoryDreamingConfig({ |
95 | 120 | pluginConfig: { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,7 +12,7 @@ import {
|
12 | 12 | export const DEFAULT_MEMORY_DREAMING_ENABLED = false; |
13 | 13 | export const DEFAULT_MEMORY_DREAMING_TIMEZONE = undefined; |
14 | 14 | export const DEFAULT_MEMORY_DREAMING_VERBOSE_LOGGING = false; |
15 | | -export const DEFAULT_MEMORY_DREAMING_STORAGE_MODE = "inline"; |
| 15 | +export const DEFAULT_MEMORY_DREAMING_STORAGE_MODE = "separate"; |
16 | 16 | export const DEFAULT_MEMORY_DREAMING_SEPARATE_REPORTS = false; |
17 | 17 | export const DEFAULT_MEMORY_DREAMING_FREQUENCY = "0 3 * * *"; |
18 | 18 | export const DEFAULT_MEMORY_DREAMING_PLUGIN_ID = "memory-core"; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。