diff --git a/package-lock.json b/package-lock.json index 63f0332..cab8a25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "memory-powermem", "version": "0.4.0", + "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@langchain/openai": "^1.4.1", diff --git a/src/index.ts b/src/index.ts index 0f2682a..d67767f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -304,7 +304,7 @@ const memoryPlugin = { kind: "memory" as const, configSchema: powerMemConfigSchema, - async register(api: OpenClawPluginApi) { + register(api: OpenClawPluginApi) { const gw = api as GatewayApi; const raw = api.pluginConfig; const toParse = diff --git a/src/openclaw-plugin-sdk.d.ts b/src/openclaw-plugin-sdk.d.ts index 510791a..b446fcb 100644 --- a/src/openclaw-plugin-sdk.d.ts +++ b/src/openclaw-plugin-sdk.d.ts @@ -53,14 +53,14 @@ declare module "openclaw/plugin-sdk/memory-core" { }) => void; }; - /** Memory plugin entry; `register` may be async when using dynamic imports (e.g. dual-write). */ + /** Memory plugin entry; `register` must be synchronous (OpenClaw loads CLI metadata before awaiting). */ export type OpenClawMemoryPlugin = { id: string; name: string; description: string; kind: "memory"; configSchema: unknown; - register: (api: OpenClawPluginApi) => void | Promise; + register: (api: OpenClawPluginApi) => void; }; }