@kage-core/kage-graph-mcp 1.1.36 → 1.1.38
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/README.md +101 -2
- package/dist/cli.js +451 -3
- package/dist/daemon.js +344 -7
- package/dist/index.js +382 -3
- package/dist/kernel.js +3790 -76
- package/package.json +1 -1
- package/viewer/app.js +1448 -86
- package/viewer/data.html +8 -15
- package/viewer/graph.html +8 -15
- package/viewer/index.html +19 -15
- package/viewer/intel.html +8 -15
- package/viewer/memory.html +79 -15
- package/viewer/owners.html +8 -15
- package/viewer/review.html +20 -16
- package/viewer/styles.css +751 -124
package/README.md
CHANGED
|
@@ -34,6 +34,9 @@ Roo Code, Kilo Code, Claude Desktop, Aider, generic MCP (`kage setup list`).
|
|
|
34
34
|
|
|
35
35
|
- Repo-local memory for decisions, runbooks, bug fixes, gotchas, conventions,
|
|
36
36
|
and code explanations.
|
|
37
|
+
- Claude Code ambient hooks for prompt-time recall, tool-result observation,
|
|
38
|
+
failure capture, pre-compact/session-end distillation, and stop-time review
|
|
39
|
+
refresh.
|
|
37
40
|
- A code graph for files, symbols, imports, confidence-scored calls, routes
|
|
38
41
|
(FastAPI / Flask / Django / Rails / Laravel / Spring / Go / Rust / ASP.NET),
|
|
39
42
|
tests, and packages.
|
|
@@ -42,7 +45,37 @@ Roo Code, Kilo Code, Claude Desktop, Aider, generic MCP (`kage setup list`).
|
|
|
42
45
|
ownership silos, module health.
|
|
43
46
|
- Conservative cleanup review input (unreferenced files, unused exports,
|
|
44
47
|
internal-looking unused symbols). Never deletes code.
|
|
45
|
-
- A local viewer for memory, code graph, risks, review, and metrics
|
|
48
|
+
- A local viewer for memory, code graph, risks, review, and metrics, served
|
|
49
|
+
with conservative browser security headers.
|
|
50
|
+
- Local memory-access tracking in `.agent_memory/reports/memory-access.json`
|
|
51
|
+
so agents can learn which memories are reused and recommend what to verify,
|
|
52
|
+
ground, or clean up without changing shareable packet files on every recall.
|
|
53
|
+
- Memory lifecycle reporting in `.agent_memory/reports/lifecycle.json` so
|
|
54
|
+
teammates can review healthy, hot, stale, disputed, ungrounded, pending, and
|
|
55
|
+
generated packets with concrete actions.
|
|
56
|
+
- Memory timeline reporting in `.agent_memory/reports/timeline.json` so
|
|
57
|
+
handoffs show recently added, updated, pending, and retired repo knowledge.
|
|
58
|
+
- Memory lineage reporting in `.agent_memory/reports/lineage.json` so
|
|
59
|
+
superseded packets point at the current replacement memory agents should use.
|
|
60
|
+
- Memory audit reporting in `.agent_memory/audit/events.jsonl` and
|
|
61
|
+
`.agent_memory/reports/memory-audit.json` so memory mutations are reviewable.
|
|
62
|
+
- Memory handoff reporting in `.agent_memory/reports/handoff.json` so the next
|
|
63
|
+
teammate or agent gets one queue across inbox, lifecycle, audit, timeline,
|
|
64
|
+
lineage, and distillable session learnings.
|
|
65
|
+
- Project profile reporting in `.agent_memory/reports/profile.json` so agents
|
|
66
|
+
get a compact orientation across repo shape, top concepts, key files,
|
|
67
|
+
commands, memory focus, and next actions.
|
|
68
|
+
- Capability audit reporting in `.agent_memory/reports/capabilities.json` so
|
|
69
|
+
teams can see evidence-backed readiness across memory, collaboration,
|
|
70
|
+
benchmark proof, and dashboard/viewer proof.
|
|
71
|
+
- Pinned context slots in `.agent_memory/slots/slots.json` so teams can review
|
|
72
|
+
tiny always-relevant repo guidance that Kage includes before task-specific
|
|
73
|
+
recall.
|
|
74
|
+
- Session replay digest in `.agent_memory/reports/replay.json` so teams can
|
|
75
|
+
review observed agent timelines, paths, commands, durable candidates, and
|
|
76
|
+
distill actions without exposing raw transcript text.
|
|
77
|
+
- A viewer benchmark proof ledger that shows measured results, thresholds,
|
|
78
|
+
exact commands, and next actions for retrieval, scale, and repo trust gates.
|
|
46
79
|
|
|
47
80
|
No hosted service, external database, or API key is required.
|
|
48
81
|
|
|
@@ -52,8 +85,24 @@ No hosted service, external database, or API key is required.
|
|
|
52
85
|
kage recall "how do I run tests" --project .
|
|
53
86
|
kage code-graph "auth routes tests" --project .
|
|
54
87
|
kage risk --project . --targets src/auth.ts --json
|
|
88
|
+
kage profile --project . --json
|
|
89
|
+
kage capabilities --project . --json
|
|
90
|
+
kage slots set --project . --label project_context --content "Always run retry tests after changing retry modules." --paths src/retry.ts --tags retry,tests
|
|
91
|
+
kage slots --project . --json
|
|
55
92
|
kage learn --project . --learning "Use npm test after parser changes."
|
|
93
|
+
kage sessions --project . # observed sessions and distillation actions
|
|
94
|
+
kage replay --project . # privacy-preserving observed-session timeline
|
|
95
|
+
kage memory-access --project . # hot/cold memories and review actions
|
|
96
|
+
kage memory-audit --project . # auditable memory mutations
|
|
97
|
+
kage handoff --project . # combined teammate/agent handoff queue
|
|
98
|
+
kage lifecycle --project . # memory health, freshness, grounding, and feedback
|
|
99
|
+
kage timeline --project . # recent memory changes for handoff
|
|
100
|
+
kage lineage --project . # current replacements for retired memories
|
|
101
|
+
kage supersede --project . --packet <old-id> --replacement <new-id> --reason "why"
|
|
102
|
+
kage benchmark --memory-quality # coding-memory retrieval proof
|
|
103
|
+
kage benchmark --scale --sizes 240,1000,5000 # large-memory recall proof
|
|
56
104
|
kage refresh --project .
|
|
105
|
+
kage embeddings build --project . # optional dense local recall
|
|
57
106
|
kage hook install --project .
|
|
58
107
|
kage pr check --project .
|
|
59
108
|
kage viewer --project .
|
|
@@ -62,6 +111,14 @@ kage viewer --project .
|
|
|
62
111
|
MCP agents should start with `kage_context`. When the query or target list
|
|
63
112
|
mentions file paths, it also includes risk and dependency-path context.
|
|
64
113
|
|
|
114
|
+
Normal recall is local and dependency-free. For repos that need denser semantic
|
|
115
|
+
matching, install `@xenova/transformers` in the same Node environment as Kage,
|
|
116
|
+
then run `kage embeddings build --project .`. The default lexical layer is
|
|
117
|
+
Unicode-aware and adds CJK bigrams for memory written without spaces. Dense
|
|
118
|
+
embeddings write an optional rebuildable
|
|
119
|
+
`.agent_memory/indexes/embeddings-local.json` artifact, and
|
|
120
|
+
`kage recall "query" --project . --embeddings --explain` uses it.
|
|
121
|
+
|
|
65
122
|
For stale or wrong memory:
|
|
66
123
|
|
|
67
124
|
```bash
|
|
@@ -79,6 +136,46 @@ kage setup claude-code --project . --write
|
|
|
79
136
|
kage setup generic-mcp --project .
|
|
80
137
|
```
|
|
81
138
|
|
|
139
|
+
`kage setup claude-code --write` installs the MCP server plus SessionStart,
|
|
140
|
+
UserPromptSubmit, PostToolUse, PostToolUseFailure, PreCompact, Stop, and
|
|
141
|
+
SessionEnd hooks. The hooks observe reusable work signals, inject relevant
|
|
142
|
+
repo memory on new prompts, and distill durable learnings before compaction or
|
|
143
|
+
handoff.
|
|
144
|
+
|
|
145
|
+
`kage setup verify-agent --agent claude-code --project .` checks those hooks,
|
|
146
|
+
not only the MCP config. If a teammate has the server configured but missing
|
|
147
|
+
ambient hooks, verification reports the missing events and tells them to rerun
|
|
148
|
+
setup.
|
|
149
|
+
|
|
150
|
+
`kage setup doctor --project . --json` also includes the Claude hook summary,
|
|
151
|
+
so teams can audit partial installs before relying on automatic capture.
|
|
152
|
+
MCP agents can call `kage_setup_doctor` for the same audit without shelling out.
|
|
153
|
+
|
|
154
|
+
## REST daemon
|
|
155
|
+
|
|
156
|
+
HTTP-only agents can use the same memory system through the local daemon:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
kage daemon start --project .
|
|
160
|
+
curl -X POST http://127.0.0.1:3111/kage/context \
|
|
161
|
+
-H 'content-type: application/json' \
|
|
162
|
+
-d '{"query":"how does auth work?","limit":5}'
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Useful endpoints:
|
|
166
|
+
|
|
167
|
+
- `POST /kage/context` - combined recall, graph facts, validation, risk, and dependency context.
|
|
168
|
+
- `POST /kage/recall` - repo memory recall.
|
|
169
|
+
- `POST /kage/capture` and `POST /kage/learn` - write durable repo memory.
|
|
170
|
+
- `POST /kage/feedback` - mark recalled memory helpful, wrong, or stale.
|
|
171
|
+
- `POST /kage/observe` and `POST /kage/distill` - session observation and durable learning distillation.
|
|
172
|
+
- `GET /kage/replay` - privacy-preserving session replay digest without raw transcript text.
|
|
173
|
+
- `GET /kage/setup-doctor` - supported-agent setup and Claude hook readiness.
|
|
174
|
+
- `GET /kage/profile` - compact project profile for agent orientation.
|
|
175
|
+
- `GET /kage/capabilities` - evidence-backed memory system readiness across memory, collaboration, benchmarks, and viewer proof.
|
|
176
|
+
- `GET /kage/context-slots`, `POST /kage/context-slots`, `DELETE /kage/context-slots/:label` - pinned repo context slots.
|
|
177
|
+
- `GET /kage/metrics`, `/kage/quality`, `/kage/inbox`, `/kage/benchmark`, `/kage/handoff`, `/kage/lifecycle`, `/kage/timeline`, `/kage/lineage`, `/kage/memory-audit` - human and agent review reports.
|
|
178
|
+
|
|
82
179
|
## Storage
|
|
83
180
|
|
|
84
181
|
Kage writes to `.agent_memory/`. Packets are durable repo memory; everything
|
|
@@ -90,7 +187,9 @@ else is rebuildable with `kage refresh`.
|
|
|
90
187
|
| `.agent_memory/graph/` | memory graph (rebuildable) |
|
|
91
188
|
| `.agent_memory/code_graph/` | source-derived code facts (rebuildable) |
|
|
92
189
|
| `.agent_memory/structural/` | files, symbols, imports |
|
|
93
|
-
| `.agent_memory/
|
|
190
|
+
| `.agent_memory/slots/` | pinned repo context slots |
|
|
191
|
+
| `.agent_memory/indexes/` | recall indexes, including optional embeddings |
|
|
192
|
+
| `.agent_memory/reports/` | profile, capabilities, context-slots, replay, risk, contributors, decisions, module health, workspace, quality, benchmark, handoff, lifecycle, timeline, lineage |
|
|
94
193
|
|
|
95
194
|
Repo-local packets are git-visible and reviewable. Generated indexes and
|
|
96
195
|
graphs are rebuildable.
|