mirror of https://github.com/openclaw/openclaw.git
refactor: remove memory-core runtime barrel
This commit is contained in:
parent
c9ab095099
commit
f6de4cd766
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue