mirror of
https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
synced 2026-10-03 16:04:06 +00:00
fix: update plugin entry to OpenClaw SDK format and improve installation docs
- Change plugin-entry.ts export to SDK-compliant object format - Add explicit id, name, description fields - Use register(api) method for tool registration - Update README with correct installation steps - Document plugin enable and gateway restart commands
This commit is contained in:
@ -1,15 +1,20 @@
|
||||
import { GraphMemoryToolSchema, createGraphMemoryTool } from './runtime/core/tools/builtin/graph_memory_tool.js';
|
||||
|
||||
export default function registerGraphMemoryPlugin(api: {
|
||||
registerTool: (tool: {
|
||||
name: string;
|
||||
description: string;
|
||||
parameters: typeof GraphMemoryToolSchema;
|
||||
execute: (id: string, params: Record<string, unknown>) => Promise<{
|
||||
content: Array<{ type: 'text'; text: string }>;
|
||||
}>;
|
||||
}) => void;
|
||||
}): void {
|
||||
const tool = createGraphMemoryTool();
|
||||
api.registerTool(tool);
|
||||
}
|
||||
export default {
|
||||
id: 'graph-memory',
|
||||
name: 'Graph Memory',
|
||||
description: '让 AI 拥有真正的长期记忆能力 - 基于图数据库的记忆系统',
|
||||
register(api: {
|
||||
registerTool: (tool: {
|
||||
name: string;
|
||||
description: string;
|
||||
parameters: typeof GraphMemoryToolSchema;
|
||||
execute: (id: string, params: Record<string, unknown>) => Promise<{
|
||||
content: Array<{ type: 'text'; text: string }>;
|
||||
}>;
|
||||
}) => void;
|
||||
}): void {
|
||||
const tool = createGraphMemoryTool();
|
||||
api.registerTool(tool);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user