test(doctor): mock memory-core runtime seam

This commit is contained in:
Peter Steinberger
2026-04-08 20:12:39 +01:00
parent 5b4eb267b0
commit 5df4351c4d
3 changed files with 11 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
export {
removeBackfillDiaryEntries,
previewGroundedRemMarkdown,
writeBackfillDiaryEntries,
} from "../../../extensions/memory-core/api.js";

View File

@@ -36,11 +36,8 @@ vi.mock("../../plugins/memory-runtime.js", () => ({
getActiveMemorySearchManager: getMemorySearchManager,
}));
vi.mock("../../../extensions/memory-core/src/rem-evidence.js", () => ({
vi.mock("./doctor.memory-core-runtime.js", () => ({
previewGroundedRemMarkdown,
}));
vi.mock("../../../extensions/memory-core/src/dreaming-narrative.js", () => ({
writeBackfillDiaryEntries,
removeBackfillDiaryEntries,
}));

View File

@@ -1,10 +1,5 @@
import fs from "node:fs/promises";
import path from "node:path";
import {
removeBackfillDiaryEntries,
previewGroundedRemMarkdown,
writeBackfillDiaryEntries,
} from "../../../extensions/memory-core/api.js";
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";
import { loadConfig } from "../../config/config.js";
import type { OpenClawConfig } from "../../config/config.js";
@@ -19,6 +14,11 @@ import {
} from "../../memory-host-sdk/dreaming.js";
import { getActiveMemorySearchManager } from "../../plugins/memory-runtime.js";
import { formatError } from "../server-utils.js";
import {
removeBackfillDiaryEntries,
previewGroundedRemMarkdown,
writeBackfillDiaryEntries,
} from "./doctor.memory-core-runtime.js";
import { asRecord, normalizeTrimmedString } from "./record-shared.js";
import type { GatewayRequestHandlers } from "./types.js";