openclaw/extensions/memory-core/index.ts
Vj a0ea122d92 chore: full rebrand clawdbot -> moltbot
- Replace all CLAWDBOT_* env vars with MOLTBOT_*
- Replace all .clawdbot paths with .moltbot
- Update daemon labels to bot.molt.*
- Update plugin SDK imports to moltbot/plugin-sdk
- Remove clawdbot bin alias from package.json
- Preserve legacy compatibility in compat/legacy-names.ts
2026-01-29 11:24:27 +00:00

37 lines
1.0 KiB
TypeScript

import type { MoltbotPluginApi } from "moltbot/plugin-sdk";
import { emptyPluginConfigSchema } from "moltbot/plugin-sdk";
const memoryCorePlugin = {
id: "memory-core",
name: "Memory (Core)",
description: "File-backed memory search tools and CLI",
kind: "memory",
configSchema: emptyPluginConfigSchema(),
register(api: MoltbotPluginApi) {
api.registerTool(
(ctx) => {
const memorySearchTool = api.runtime.tools.createMemorySearchTool({
config: ctx.config,
agentSessionKey: ctx.sessionKey,
});
const memoryGetTool = api.runtime.tools.createMemoryGetTool({
config: ctx.config,
agentSessionKey: ctx.sessionKey,
});
if (!memorySearchTool || !memoryGetTool) return null;
return [memorySearchTool, memoryGetTool];
},
{ names: ["memory_search", "memory_get"] },
);
api.registerCli(
({ program }) => {
api.runtime.tools.registerMemoryCli(program);
},
{ commands: ["memory"] },
);
},
};
export default memoryCorePlugin;