MCPcopy Create free account
hub / github.com/EvoMap/evolver / getMemoryGraph

Function getMemoryGraph

src/webui/observer/personality.js:23–33  ·  view source on GitHub ↗
(query = {})

Source from the content-addressed store, hash-verified

21}
22
23function getMemoryGraph(query = {}) {
24 const limit = Math.min(Number(query.limit) || 50, 500);
25 const graphPath = path.join(getEvolutionDir(), 'memory_graph.jsonl');
26 if (!fs.existsSync(graphPath)) return { exists: false, items: [] };
27 const rows = readJsonl(graphPath, { last: limit }).map(redactValue);
28 return {
29 exists: true,
30 total: countLines(graphPath),
31 items: rows.reverse(),
32 };
33}
34
35function countLines(filePath) {
36 try {

Callers

nothing calls this directly

Calls 3

getEvolutionDirFunction · 0.85
countLinesFunction · 0.85
readJsonlFunction · 0.70

Tested by

no test coverage detected