mirror of
https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
synced 2026-10-15 12:15:32 +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:
4
ts/package-lock.json
generated
4
ts/package-lock.json
generated
@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "trulymem-waterflow",
|
||||
"name": "@trulymem/openclaw-graph-memory",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "trulymem-waterflow",
|
||||
"name": "@trulymem/openclaw-graph-memory",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@sinclair/typebox": "^0.34.49",
|
||||
|
||||
@ -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