@sdsrs/code-graph 0.132.0 → 0.134.0
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
CHANGED
|
@@ -18,7 +18,7 @@ A high-performance code knowledge graph server implementing the [Model Context P
|
|
|
18
18
|
- **Dead code detection** — Find unreferenced symbols with smart Orphan/Exported-Unused classification
|
|
19
19
|
- **Impact analysis** — Determine the blast radius of code changes by tracing all dependents
|
|
20
20
|
- **Incremental indexing** — Merkle tree change detection with file system watcher for real-time updates. Smart event filtering skips metadata-only changes (chmod, xattr)
|
|
21
|
-
- **Context compression** — Token-aware snippet extraction for LLM context windows (L0→full code, L1→summaries, L2→file groups, L3→directory overview).
|
|
21
|
+
- **Context compression** — Token-aware snippet extraction for LLM context windows (L0→full code, L1→summaries, L2→file groups, L3→directory overview). Every MCP tool except `ast_search` takes `compact: true`, which drops code bodies from the response; what else it trims is per-tool (`get_ast_node` keeps the signature, `module_overview` drops it), and how much it saves depends on the tool and the repo, so no fixed figure is quoted here
|
|
22
22
|
- **Embedding model** — Optional local embedding via Candle (feature-gated `embed-model`). Context reordered to prioritize structural relations over code for better embedding quality
|
|
23
23
|
- **Self-healing** — Automatic SQLite corruption recovery with rebuild. Startup repair for incomplete indexing (Phase 3 failures)
|
|
24
24
|
- **MCP protocol** — JSON-RPC 2.0 over stdio, plug-and-play with Claude Code, Cursor, Windsurf, and other MCP clients
|
|
@@ -124,6 +124,34 @@ rather than dressed up.
|
|
|
124
124
|
| Reading a file to edit it | Read |
|
|
125
125
|
| Finding files by name pattern | Glob |
|
|
126
126
|
|
|
127
|
+
### What the Graph Does Not See
|
|
128
|
+
|
|
129
|
+
Call edges are resolved by name, so a few spellings produce no edge. These are
|
|
130
|
+
known boundaries, not bugs to report:
|
|
131
|
+
|
|
132
|
+
- **A method call reached through a module path.** `module::Type::method()`
|
|
133
|
+
produces no call edge — the same whether the path starts with the crate name,
|
|
134
|
+
`crate::`, or a bare module. A bare `Type::method()` does resolve, and so does
|
|
135
|
+
a *free function* through the same kind of path: `my_crate::cli::cmd_grep()`
|
|
136
|
+
binds, which `path_qualifier_strips_own_crate_name` in
|
|
137
|
+
`tests/integration_call_qualifier.rs` exists to keep true. It is the `Type::`
|
|
138
|
+
segment in front of the method that drops the edge, not the length of the path.
|
|
139
|
+
Measured on this repo at v0.132.0: `Database::open` has 173 caller edges and
|
|
140
|
+
**none** of them come from the 53 call sites in `tests/cli_e2e.rs` spelled
|
|
141
|
+
`code_graph_mcp::storage::db::Database::open(...)`.
|
|
142
|
+
- **A receiver call whose method name is shared by several types.** `obj.method()`
|
|
143
|
+
normally resolves: the receiver has no statically-known type, so the resolver
|
|
144
|
+
binds it when exactly one same-language method carries that name
|
|
145
|
+
(`receiver_call_resolves_unique_method`). When several types define the same
|
|
146
|
+
name it is dropped rather than fanned out
|
|
147
|
+
(`receiver_call_with_ambiguous_method_name_stays_unresolved`).
|
|
148
|
+
- **Cross-file constant and type-position uses, callbacks, and function
|
|
149
|
+
pointers.** None of these are call edges, but none are invisible either: they
|
|
150
|
+
are carried as the `references` relation, which `find_references` returns and
|
|
151
|
+
`impact` reports separately as `value reference(s) — callbacks / fn-pointers /
|
|
152
|
+
type positions`. Together with the row above, this is why `include_dead`
|
|
153
|
+
results are candidates to verify rather than a verdict.
|
|
154
|
+
|
|
127
155
|
## Architecture
|
|
128
156
|
|
|
129
157
|
```
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
node-version: '20'
|
|
36
36
|
- name: Build snapshot
|
|
37
37
|
run: |
|
|
38
|
-
npx -y -p @sdsrs/code-graph@0.
|
|
38
|
+
npx -y -p @sdsrs/code-graph@0.134.0 code-graph-mcp snapshot create --out snapshot.db
|
|
39
39
|
zstd -9 snapshot.db -o snapshot.db.zst
|
|
40
40
|
mv snapshot.db.zst "code-graph-snapshot-${GITHUB_SHA:0:7}.db.zst"
|
|
41
41
|
- name: Upload to release
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdsrs/code-graph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.134.0",
|
|
4
4
|
"description": "MCP server that indexes codebases into an AST knowledge graph with semantic search, call graph traversal, and HTTP route tracing",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"node": ">=16"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@sdsrs/code-graph-linux-x64": "0.
|
|
39
|
-
"@sdsrs/code-graph-linux-arm64": "0.
|
|
40
|
-
"@sdsrs/code-graph-darwin-x64": "0.
|
|
41
|
-
"@sdsrs/code-graph-darwin-arm64": "0.
|
|
42
|
-
"@sdsrs/code-graph-win32-x64": "0.
|
|
38
|
+
"@sdsrs/code-graph-linux-x64": "0.134.0",
|
|
39
|
+
"@sdsrs/code-graph-linux-arm64": "0.134.0",
|
|
40
|
+
"@sdsrs/code-graph-darwin-x64": "0.134.0",
|
|
41
|
+
"@sdsrs/code-graph-darwin-arm64": "0.134.0",
|
|
42
|
+
"@sdsrs/code-graph-win32-x64": "0.134.0"
|
|
43
43
|
}
|
|
44
44
|
}
|