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
16 lines
398 B
TypeScript
16 lines
398 B
TypeScript
import { defineConfig } from "tsup";
|
|
import pkg from "./package.json";
|
|
|
|
export default defineConfig({
|
|
entry: ["index.ts"],
|
|
format: ["esm"],
|
|
splitting: true,
|
|
dts: true,
|
|
sourcemap: true,
|
|
clean: true,
|
|
external: [/^node:/, /^openclaw\//, "fs", "os", "path", "url", "readline", "module", "better-sqlite3"],
|
|
define: {
|
|
__MEMORIA_PLUGIN_VERSION__: JSON.stringify(pkg.version),
|
|
},
|
|
});
|