mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 05:00:20 +00:00
refactor: move memory engine into memory plugin
This commit is contained in:
@@ -26,3 +26,8 @@ export async function getActiveMemorySearchManager(params: {
|
||||
export function resolveActiveMemoryBackendConfig(params: { cfg: OpenClawConfig; agentId: string }) {
|
||||
return ensureMemoryRuntime(params.cfg)?.resolveMemoryBackendConfig(params) ?? null;
|
||||
}
|
||||
|
||||
export async function closeActiveMemorySearchManagers(cfg?: OpenClawConfig): Promise<void> {
|
||||
const runtime = ensureMemoryRuntime(cfg);
|
||||
await runtime?.closeAllMemorySearchManagers?.();
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ export type MemoryPluginRuntime = {
|
||||
cfg: OpenClawConfig;
|
||||
agentId: string;
|
||||
}): MemoryRuntimeBackendConfig;
|
||||
closeAllMemorySearchManagers?(): Promise<void>;
|
||||
};
|
||||
|
||||
type MemoryPluginState = {
|
||||
|
||||
Reference in New Issue
Block a user