Files
openclaw-memoria-port/openclaw-memoria-port/openclaw.d.ts
Komisar 2ea0f8f3bd feat: port Memoria plugin to OpenClaw 2026.5.x hook system
Original plugin (git_proj/openclaw-memoria) uses deprecated registration pattern
and old hooks that don't work in current OpenClaw version. Ported to new API:

- Wrap entry point with definePluginEntry({ id, name, description, register })
  instead of legacy { register } export
- Update SDK imports from 'openclaw/plugin-sdk/core' (deprecated barrel)
  to narrow subpaths: 'openclaw/plugin-sdk/plugin-entry' and 'openclaw/plugin-sdk'
- Register as memory capability via manifest kind: 'memory'
- Add setup.providers section for provider auth configuration

Changed files: index.ts, recall.ts, continuous.ts, capture.ts, procedural-hooks.ts
New file: tsup.config.ts (ESM build with tsup)
Updated configs: package.json, tsconfig.json, openclaw.plugin.json

All 21 cognitive layers and business logic preserved unchanged.
Build output: dist/index.js (ESM) + dist/index.d.ts
2026-05-07 23:25:33 +03:00

17 lines
571 B
TypeScript

// Type stub for OpenClaw plugin SDK (provided at runtime by the gateway)
declare module "openclaw/plugin-sdk/core" {
export interface OpenClawPluginApi {
logger: {
info?: (...args: any[]) => void;
warn?: (...args: any[]) => void;
debug?: (...args: any[]) => void;
error?: (...args: any[]) => void;
};
pluginConfig: Record<string, any>;
config: Record<string, any>;
workspace: { path: string };
on: (event: string, handler: (...args: any[]) => any) => void;
modifyPrompt: (callback: (ctx: any) => any) => void;
}
}