mirror of
https://gitcode.com/JianFeeeee/TrulyMEM-TrueHumanMEM.git
synced 2026-09-26 20:33:25 +00:00
- 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
20 lines
658 B
TypeScript
20 lines
658 B
TypeScript
import { GraphMemoryToolSchema, createGraphMemoryTool } from './runtime/core/tools/builtin/graph_memory_tool.js';
|
|
|
|
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);
|
|
}
|
|
}; |