@kage-core/kage-graph-mcp 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kage-core/kage-graph-mcp",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Local-first repo memory, code graph, and recall MCP server for coding agents",
5
5
  "main": "dist/index.js",
6
6
  "files": [
package/viewer/app.js CHANGED
@@ -233,7 +233,7 @@
233
233
  if (reviewPath) jobs.push(fetchText(reviewPath).then(function (text) { state.reviewText = text; }).catch(function () { state.reviewText = ""; }));
234
234
  if (pendingPath) jobs.push(loadPending(pendingPath).then(function (packets) { state.pendingPackets = packets; }));
235
235
  if (!graphPaths.length && !jobs.length) {
236
- setAutoLoad("manual mode", false);
236
+ loadHostedDefault();
237
237
  return;
238
238
  }
239
239
  setAutoLoad("loading project graph", false);
@@ -258,6 +258,37 @@
258
258
  });
259
259
  }
260
260
 
261
+ function loadHostedDefault() {
262
+ setAutoLoad("loading hosted repo graph", false);
263
+ Promise.all([
264
+ fetchJson("./data/kage/graph.json"),
265
+ fetchJson("./data/kage/code_graph/graph.json"),
266
+ fetchJson("./data/kage/metrics.json").catch(function () { return null; })
267
+ ]).then(function (items) {
268
+ var merged = mergeNormalizedGraphs([normalizeGraph(items[0]), normalizeGraph(items[1])]);
269
+ state.metrics = items[2];
270
+ loadNormalizedGraph(merged, "Kage repo graph");
271
+ setAutoLoad("Kage repo graph loaded", true);
272
+ }).catch(function () {
273
+ loadHostedDemo();
274
+ });
275
+ }
276
+
277
+ function loadHostedDemo() {
278
+ setAutoLoad("loading bundled demo graph", false);
279
+ Promise.all([
280
+ fetchJson("./demo/graph.json"),
281
+ fetchJson("./demo/metrics.json").catch(function () { return null; })
282
+ ]).then(function (items) {
283
+ var graph = items[0];
284
+ state.metrics = items[1];
285
+ loadNormalizedGraph(normalizeGraph(graph), "bundled demo graph");
286
+ setAutoLoad("bundled demo graph loaded", true);
287
+ }).catch(function () {
288
+ setAutoLoad("manual mode", false);
289
+ });
290
+ }
291
+
261
292
  function inferMemoryRoot(path) {
262
293
  var marker = "/.agent_memory/";
263
294
  var index = path.indexOf(marker);
@@ -0,0 +1,267 @@
1
+ {
2
+ "entities": [
3
+ {
4
+ "id": "repo:kage",
5
+ "type": "repo",
6
+ "name": "Kage",
7
+ "summary": "Repo memory and source graph for coding agents.",
8
+ "aliases": ["kage-core/Kage"],
9
+ "evidence": ["episode:demo-launch"]
10
+ },
11
+ {
12
+ "id": "memory:viewer-balance",
13
+ "type": "memory",
14
+ "name": "Viewer balances memory and code",
15
+ "summary": "Combined mode reserves visible space for memory packets before filling the rest with code graph nodes.",
16
+ "aliases": ["viewer", "memory graph", "code graph"],
17
+ "evidence": ["episode:demo-viewer"]
18
+ },
19
+ {
20
+ "id": "memory:kage-context",
21
+ "type": "memory",
22
+ "name": "kage_context starts agent sessions",
23
+ "summary": "Agents should call kage_context at session start to receive repo memory, code graph, metrics, and policy hints.",
24
+ "aliases": ["codex", "claude code", "mcp"],
25
+ "evidence": ["episode:demo-context"]
26
+ },
27
+ {
28
+ "id": "memory:repo-local",
29
+ "type": "memory",
30
+ "name": "Repo-local memory is git-native",
31
+ "summary": "Approved repo memory is written as JSON packets under .agent_memory/packets and travels with the repo.",
32
+ "aliases": ["git", "packets"],
33
+ "evidence": ["episode:demo-repo-memory"]
34
+ },
35
+ {
36
+ "id": "memory:review-boundary",
37
+ "type": "memory",
38
+ "name": "Org/global promotion is reviewed",
39
+ "summary": "Agents can write repo-local memory, but org/global/public promotion requires explicit human review.",
40
+ "aliases": ["trust", "review"],
41
+ "evidence": ["episode:demo-trust"]
42
+ },
43
+ {
44
+ "id": "type:decision",
45
+ "type": "memory_type",
46
+ "name": "decision",
47
+ "summary": "Durable architectural or product choice.",
48
+ "aliases": [],
49
+ "evidence": ["episode:demo-viewer"]
50
+ },
51
+ {
52
+ "id": "type:runbook",
53
+ "type": "memory_type",
54
+ "name": "runbook",
55
+ "summary": "How to run, test, debug, or operate the repo.",
56
+ "aliases": [],
57
+ "evidence": ["episode:demo-context"]
58
+ },
59
+ {
60
+ "id": "command:kage-viewer",
61
+ "type": "command",
62
+ "name": "kage viewer --project .",
63
+ "summary": "Launches the local auto-loaded Memory Terminal for a repo.",
64
+ "aliases": ["viewer"],
65
+ "evidence": ["episode:demo-viewer"]
66
+ },
67
+ {
68
+ "id": "command:kage-refresh",
69
+ "type": "command",
70
+ "name": "kage refresh --project .",
71
+ "summary": "Rebuilds indexes, code graph, memory graph, metrics, and stale memory metadata.",
72
+ "aliases": ["refresh"],
73
+ "evidence": ["episode:demo-context"]
74
+ },
75
+ {
76
+ "id": "path:mcp-viewer-app",
77
+ "type": "path",
78
+ "name": "mcp/viewer/app.js",
79
+ "summary": "Static Memory Terminal canvas graph and inspector.",
80
+ "aliases": ["viewer app"],
81
+ "evidence": ["episode:demo-viewer"]
82
+ },
83
+ {
84
+ "id": "path:mcp-kernel",
85
+ "type": "path",
86
+ "name": "mcp/kernel.ts",
87
+ "summary": "Memory kernel, validation, indexing, graph, recall, setup, metrics, and PR checks.",
88
+ "aliases": ["kernel"],
89
+ "evidence": ["episode:demo-context"]
90
+ },
91
+ {
92
+ "id": "tag:viewer",
93
+ "type": "tag",
94
+ "name": "viewer",
95
+ "summary": "Graph and memory terminal experience.",
96
+ "aliases": [],
97
+ "evidence": ["episode:demo-viewer"]
98
+ },
99
+ {
100
+ "id": "tag:repo-memory",
101
+ "type": "tag",
102
+ "name": "repo-memory",
103
+ "summary": "Git-native memory packets shared across agents.",
104
+ "aliases": [],
105
+ "evidence": ["episode:demo-repo-memory"]
106
+ },
107
+ {
108
+ "id": "tag:mcp",
109
+ "type": "tag",
110
+ "name": "mcp",
111
+ "summary": "Model Context Protocol integration for coding agents.",
112
+ "aliases": [],
113
+ "evidence": ["episode:demo-context"]
114
+ }
115
+ ],
116
+ "edges": [
117
+ {
118
+ "id": "edge:repo:viewer",
119
+ "from": "repo:kage",
120
+ "to": "memory:viewer-balance",
121
+ "relation": "contains_memory",
122
+ "fact": "Kage contains a viewer memory about balancing memory and code graph nodes.",
123
+ "confidence": 0.95,
124
+ "evidence": ["episode:demo-viewer"]
125
+ },
126
+ {
127
+ "id": "edge:repo:context",
128
+ "from": "repo:kage",
129
+ "to": "memory:kage-context",
130
+ "relation": "contains_memory",
131
+ "fact": "Kage contains a session-start memory about kage_context.",
132
+ "confidence": 0.95,
133
+ "evidence": ["episode:demo-context"]
134
+ },
135
+ {
136
+ "id": "edge:repo:local",
137
+ "from": "repo:kage",
138
+ "to": "memory:repo-local",
139
+ "relation": "contains_memory",
140
+ "fact": "Kage contains a memory about git-native repo-local packets.",
141
+ "confidence": 0.95,
142
+ "evidence": ["episode:demo-repo-memory"]
143
+ },
144
+ {
145
+ "id": "edge:repo:review",
146
+ "from": "repo:kage",
147
+ "to": "memory:review-boundary",
148
+ "relation": "contains_memory",
149
+ "fact": "Kage contains a trust-boundary memory for org/global promotion.",
150
+ "confidence": 0.95,
151
+ "evidence": ["episode:demo-trust"]
152
+ },
153
+ {
154
+ "id": "edge:viewer:type",
155
+ "from": "memory:viewer-balance",
156
+ "to": "type:decision",
157
+ "relation": "has_type",
158
+ "fact": "Viewer balance is a product decision.",
159
+ "confidence": 0.9,
160
+ "evidence": ["episode:demo-viewer"]
161
+ },
162
+ {
163
+ "id": "edge:context:type",
164
+ "from": "memory:kage-context",
165
+ "to": "type:runbook",
166
+ "relation": "has_type",
167
+ "fact": "kage_context is operational runbook memory.",
168
+ "confidence": 0.9,
169
+ "evidence": ["episode:demo-context"]
170
+ },
171
+ {
172
+ "id": "edge:viewer:path",
173
+ "from": "memory:viewer-balance",
174
+ "to": "path:mcp-viewer-app",
175
+ "relation": "affects_path",
176
+ "fact": "Viewer balance applies to the static viewer app.",
177
+ "confidence": 0.92,
178
+ "evidence": ["episode:demo-viewer"]
179
+ },
180
+ {
181
+ "id": "edge:context:path",
182
+ "from": "memory:kage-context",
183
+ "to": "path:mcp-kernel",
184
+ "relation": "affects_path",
185
+ "fact": "kage_context is implemented through the memory kernel and MCP server.",
186
+ "confidence": 0.88,
187
+ "evidence": ["episode:demo-context"]
188
+ },
189
+ {
190
+ "id": "edge:viewer:command",
191
+ "from": "memory:viewer-balance",
192
+ "to": "command:kage-viewer",
193
+ "relation": "documents_command",
194
+ "fact": "The viewer memory documents the kage viewer command.",
195
+ "confidence": 0.9,
196
+ "evidence": ["episode:demo-viewer"]
197
+ },
198
+ {
199
+ "id": "edge:context:refresh",
200
+ "from": "memory:kage-context",
201
+ "to": "command:kage-refresh",
202
+ "relation": "documents_command",
203
+ "fact": "Agent context should be refreshed after meaningful changes.",
204
+ "confidence": 0.86,
205
+ "evidence": ["episode:demo-context"]
206
+ },
207
+ {
208
+ "id": "edge:viewer:tag",
209
+ "from": "memory:viewer-balance",
210
+ "to": "tag:viewer",
211
+ "relation": "mentions_tag",
212
+ "fact": "Viewer balance is tagged viewer.",
213
+ "confidence": 0.9,
214
+ "evidence": ["episode:demo-viewer"]
215
+ },
216
+ {
217
+ "id": "edge:local:tag",
218
+ "from": "memory:repo-local",
219
+ "to": "tag:repo-memory",
220
+ "relation": "mentions_tag",
221
+ "fact": "Repo-local memory is tagged repo-memory.",
222
+ "confidence": 0.9,
223
+ "evidence": ["episode:demo-repo-memory"]
224
+ },
225
+ {
226
+ "id": "edge:context:tag",
227
+ "from": "memory:kage-context",
228
+ "to": "tag:mcp",
229
+ "relation": "mentions_tag",
230
+ "fact": "kage_context is exposed through MCP.",
231
+ "confidence": 0.9,
232
+ "evidence": ["episode:demo-context"]
233
+ }
234
+ ],
235
+ "episodes": [
236
+ {
237
+ "id": "episode:demo-launch",
238
+ "summary": "Kage demo graph for the hosted Memory Terminal.",
239
+ "source": "hosted_demo",
240
+ "created_at": "2026-05-03T00:00:00.000Z"
241
+ },
242
+ {
243
+ "id": "episode:demo-viewer",
244
+ "summary": "The viewer should show memory and code graph together, not an empty shell.",
245
+ "source": "hosted_demo",
246
+ "created_at": "2026-05-03T00:00:00.000Z"
247
+ },
248
+ {
249
+ "id": "episode:demo-context",
250
+ "summary": "Agents use kage_context and refresh to avoid rediscovery.",
251
+ "source": "hosted_demo",
252
+ "created_at": "2026-05-03T00:00:00.000Z"
253
+ },
254
+ {
255
+ "id": "episode:demo-repo-memory",
256
+ "summary": "Repo-local packets are git-native durable memory.",
257
+ "source": "hosted_demo",
258
+ "created_at": "2026-05-03T00:00:00.000Z"
259
+ },
260
+ {
261
+ "id": "episode:demo-trust",
262
+ "summary": "Org/global sharing is review-gated.",
263
+ "source": "hosted_demo",
264
+ "created_at": "2026-05-03T00:00:00.000Z"
265
+ }
266
+ ]
267
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "schema_version": 1,
3
+ "project_dir": "hosted-demo",
4
+ "repo_key": "kage-core-kage",
5
+ "generated_at": "2026-05-03T00:00:00.000Z",
6
+ "code_graph": {
7
+ "files": 12,
8
+ "symbols": 1894,
9
+ "imports": 37,
10
+ "calls": 2317,
11
+ "routes": 3,
12
+ "tests": 64,
13
+ "packages_and_scripts": 9,
14
+ "languages": {
15
+ "typescript": 6,
16
+ "javascript": 3,
17
+ "markdown": 3
18
+ },
19
+ "parsers": {
20
+ "typescript": 6,
21
+ "javascript": 3,
22
+ "metadata": 3
23
+ },
24
+ "source_symbols_by_parser": {
25
+ "typescript": 1620,
26
+ "javascript": 274
27
+ },
28
+ "indexer_coverage_percent": 100
29
+ },
30
+ "memory_graph": {
31
+ "approved_packets": 22,
32
+ "pending_packets": 0,
33
+ "episodes": 5,
34
+ "entities": 14,
35
+ "edges": 13,
36
+ "evidence_backed_edges": 13,
37
+ "evidence_coverage_percent": 100,
38
+ "average_quality_score": 97,
39
+ "duplicate_candidate_pairs": 0
40
+ },
41
+ "savings": {
42
+ "estimated_indexed_source_tokens": 113882,
43
+ "estimated_memory_tokens": 1800,
44
+ "estimated_recall_context_tokens": 1800,
45
+ "estimated_tokens_saved_per_recall": 112082
46
+ },
47
+ "harness": {
48
+ "policy_installed": true,
49
+ "validation_ok": true,
50
+ "warnings": 0,
51
+ "errors": 0,
52
+ "readiness_score": 100
53
+ },
54
+ "pain": {
55
+ "setup_runbook_coverage_percent": 100,
56
+ "bug_fix_coverage_percent": 80,
57
+ "decision_coverage_percent": 100,
58
+ "code_flow_coverage_percent": 100,
59
+ "recall_hit_rate_percent": 100,
60
+ "estimated_rediscovery_avoided": 9,
61
+ "estimated_tokens_saved": 112082,
62
+ "time_to_first_use_seconds": 60
63
+ },
64
+ "quality": {
65
+ "totals": {
66
+ "approved": 22,
67
+ "pending": 0,
68
+ "high_signal": 21,
69
+ "needs_review": 1,
70
+ "duplicate": 0,
71
+ "stale": 0,
72
+ "too_generic": 0
73
+ },
74
+ "memory_type_coverage": {
75
+ "decision": 10,
76
+ "runbook": 5,
77
+ "gotcha": 3,
78
+ "reference": 4
79
+ },
80
+ "useful_memory_ratio_percent": 97,
81
+ "duplicate_burden": 0,
82
+ "stale_wrong_feedback_rate_percent": 0,
83
+ "evidence_coverage_percent": 100,
84
+ "path_grounding_coverage_percent": 100,
85
+ "approved_to_pending_ratio": 22
86
+ }
87
+ }