(options: UpsertMemoryNodeOptions)
| 57 | } |
| 58 | |
| 59 | export async function toolUpsertMemoryNode(options: UpsertMemoryNodeOptions): Promise<string> { |
| 60 | const node = await upsertNode(options.rootDir, options.type, options.label, options.content, options.metadata); |
| 61 | const stats = await getGraphStats(options.rootDir); |
| 62 | return [ |
| 63 | `✅ Memory node upserted: ${node.label}`, |
| 64 | ` ID: ${node.id}`, |
| 65 | ` Type: ${node.type}`, |
| 66 | ` Access count: ${node.accessCount}`, |
| 67 | `\nGraph: ${stats.nodes} nodes, ${stats.edges} edges`, |
| 68 | ].join("\n"); |
| 69 | } |
| 70 | |
| 71 | export async function toolCreateRelation(options: CreateRelationOptions): Promise<string> { |
| 72 | const edge = await createRelation(options.rootDir, options.sourceId, options.targetId, options.relation, options.weight, options.metadata); |
no test coverage detected