

























@@ -118,7 +118,7 @@ function createHarness(
118118}
119119120120function createMockNarrativeSubagent(response = "The archive hummed softly.") {
121-const run = vi.fn(async (_params: { sessionKey: string; message: string }) => ({
121+const run = vi.fn(async (_params: { sessionKey: string; message: string; model?: string }) => ({
122122runId: "dream-run-1",
123123}));
124124const waitForRun = vi.fn(async () => ({ status: "ok" }));
@@ -2321,7 +2321,33 @@ describe("memory-core dreaming phases", () => {
23212321it("passes staged light-dreaming snippets into the narrative pipeline", async () => {
23222322const workspaceDir = await createDreamingWorkspace();
23232323const subagent = createMockNarrativeSubagent("The backup plan glowed like cold storage.");
2324-const { beforeAgentReply } = createHarness(LIGHT_DREAMING_TEST_CONFIG, workspaceDir, subagent);
2324+const { beforeAgentReply } = createHarness(
2325+{
2326+plugins: {
2327+entries: {
2328+"memory-core": {
2329+config: {
2330+dreaming: {
2331+enabled: true,
2332+timezone: "UTC",
2333+model: "anthropic/claude-sonnet-4-6",
2334+storage: { mode: "inline", separateReports: false },
2335+phases: {
2336+light: {
2337+enabled: true,
2338+limit: 20,
2339+lookbackDays: 2,
2340+},
2341+},
2342+},
2343+},
2344+},
2345+},
2346+},
2347+},
2348+workspaceDir,
2349+subagent,
2350+);
2325235123262352await withDreamingTestClock(async () => {
23272353await writeDailyNote(workspaceDir, [
@@ -2338,6 +2364,7 @@ describe("memory-core dreaming phases", () => {
23382364const firstRun = subagent.run.mock.calls[0]?.[0];
23392365expect(firstRun?.message).toContain("Move backups to S3 Glacier.");
23402366expect(firstRun?.message).toContain("Keep retention at 365 days.");
2367+expect(firstRun?.model).toBe("anthropic/claude-sonnet-4-6");
23412368await expect(fs.readFile(path.join(workspaceDir, "DREAMS.md"), "utf-8")).resolves.toContain(
23422369"The backup plan glowed like cold storage.",
23432370);
@@ -2354,12 +2381,20 @@ describe("memory-core dreaming phases", () => {
23542381config: {
23552382dreaming: {
23562383enabled: true,
2384+execution: {
2385+defaults: {
2386+model: "openai/gpt-5.4",
2387+},
2388+},
23572389phases: {
23582390rem: {
23592391enabled: true,
23602392limit: 10,
23612393lookbackDays: 7,
23622394minPatternStrength: 0,
2395+execution: {
2396+model: "xai/grok-4.1-fast",
2397+},
23632398},
23642399},
23652400},
@@ -2392,6 +2427,7 @@ describe("memory-core dreaming phases", () => {
23922427const firstRun = subagent.run.mock.calls[0]?.[0];
23932428expect(firstRun?.message).toContain("Move backups to S3 Glacier.");
23942429expect(firstRun?.message).toContain("Keep retention at 365 days.");
2430+expect(firstRun?.model).toBe("xai/grok-4.1-fast");
23952431await expect(fs.readFile(path.join(workspaceDir, "DREAMS.md"), "utf-8")).resolves.toContain(
23962432"The traces braided themselves into a map.",
23972433);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。