refactor: remove memory-core runtime barrel

This commit is contained in:
Peter Steinberger
2026-03-27 02:54:13 +00:00
parent c9ab095099
commit f6de4cd766
6 changed files with 6 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ import {
normalizeExtraMemoryPaths,
} from "openclaw/plugin-sdk/memory-core-host-runtime-files";
import type { MemoryCommandOptions, MemorySearchCommandOptions } from "./cli.types.js";
import { getMemorySearchManager } from "./runtime-api.js";
import { getMemorySearchManager } from "./memory/index.js";
type MemoryManager = NonNullable<Awaited<ReturnType<typeof getMemorySearchManager>>["manager"]>;
type MemoryManagerPurpose = Parameters<typeof getMemorySearchManager>[0]["purpose"];

View File

@@ -39,8 +39,8 @@ vi.mock("openclaw/plugin-sdk/memory-core-host-runtime-cli", async (importOrigina
};
});
vi.mock("./runtime-api.js", async (importOriginal) => {
const actual = await importOriginal<typeof import("./runtime-api.js")>();
vi.mock("./memory/index.js", async (importOriginal) => {
const actual = await importOriginal<typeof import("./memory/index.js")>();
return {
...actual,
getMemorySearchManager,

View File

@@ -1 +0,0 @@
export * from "./memory/index.js";

View File

@@ -1,6 +1,6 @@
import type { MemoryPluginRuntime } from "openclaw/plugin-sdk/memory-core-host-runtime-core";
import { resolveMemoryBackendConfig } from "openclaw/plugin-sdk/memory-core-host-runtime-files";
import { closeAllMemorySearchManagers, getMemorySearchManager } from "./runtime-api.js";
import { closeAllMemorySearchManagers, getMemorySearchManager } from "./memory/index.js";
export const memoryRuntime: MemoryPluginRuntime = {
async getMemorySearchManager(params) {

View File

@@ -2,4 +2,4 @@ export {
readAgentMemoryFile,
resolveMemoryBackendConfig,
} from "openclaw/plugin-sdk/memory-core-host-runtime-files";
export { getMemorySearchManager } from "./runtime-api.js";
export { getMemorySearchManager } from "./memory/index.js";

View File

@@ -8,7 +8,7 @@ import {
type MemoryToolRuntime = typeof import("./tools.runtime.js");
type MemorySearchManagerResult = Awaited<
ReturnType<(typeof import("./runtime-api.js"))["getMemorySearchManager"]>
ReturnType<(typeof import("./memory/index.js"))["getMemorySearchManager"]>
>;
let memoryToolRuntimePromise: Promise<MemoryToolRuntime> | null = null;