refactor: move tasks into bundled plugin

This commit is contained in:
Peter Steinberger
2026-03-31 14:48:22 +01:00
parent 584db0aff2
commit c75f4695b7
39 changed files with 2492 additions and 736 deletions

View File

@@ -39,6 +39,7 @@ export type BuildPluginApiParams = {
| "registerMemoryFlushPlan"
| "registerMemoryRuntime"
| "registerMemoryEmbeddingProvider"
| "registerOperationsRuntime"
| "on"
>
>;
@@ -69,6 +70,7 @@ const noopRegisterMemoryFlushPlan: OpenClawPluginApi["registerMemoryFlushPlan"]
const noopRegisterMemoryRuntime: OpenClawPluginApi["registerMemoryRuntime"] = () => {};
const noopRegisterMemoryEmbeddingProvider: OpenClawPluginApi["registerMemoryEmbeddingProvider"] =
() => {};
const noopRegisterOperationsRuntime: OpenClawPluginApi["registerOperationsRuntime"] = () => {};
const noopOn: OpenClawPluginApi["on"] = () => {};
export function buildPluginApi(params: BuildPluginApiParams): OpenClawPluginApi {
@@ -112,6 +114,7 @@ export function buildPluginApi(params: BuildPluginApiParams): OpenClawPluginApi
registerMemoryRuntime: handlers.registerMemoryRuntime ?? noopRegisterMemoryRuntime,
registerMemoryEmbeddingProvider:
handlers.registerMemoryEmbeddingProvider ?? noopRegisterMemoryEmbeddingProvider,
registerOperationsRuntime: handlers.registerOperationsRuntime ?? noopRegisterOperationsRuntime,
resolvePath: params.resolvePath,
on: handlers.on ?? noopOn,
};