mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-28 18:33:37 +00:00
refactor: remove memory-core runtime barrel
This commit is contained in:
@@ -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"];
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from "./memory/index.js";
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user