@sdsrs/code-graph 0.5.48 → 0.6.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
@@ -4,10 +4,11 @@ A high-performance code knowledge graph server implementing the [Model Context P
4
4
 
5
5
  ## Features
6
6
 
7
- - **Multi-language parsing** — Tree-sitter AST extraction for TypeScript, JavaScript, Go, Python, Rust, Java, C, C++, HTML, CSS
7
+ - **Multi-language parsing** — Tree-sitter AST extraction for 16 languages: TypeScript, JavaScript, Go, Python, Rust, Java, C, C++, C#, Kotlin, Ruby, PHP, Swift, Dart, HTML, CSS
8
8
  - **Semantic code search** — Hybrid BM25 full-text + vector semantic search with Reciprocal Rank Fusion (RRF), powered by sqlite-vec
9
9
  - **Call graph traversal** — Recursive CTE queries to trace callers/callees with cycle detection
10
- - **HTTP route tracing** — Map route paths to backend handler functions (Express, Flask/FastAPI, Go)
10
+ - **HTTP route tracing** — Map route paths to backend handler functions (Express, Flask/FastAPI, Go, ASP.NET, Rails, Laravel, Vapor)
11
+ - **Dead code detection** — Find unreferenced symbols with smart Orphan/Exported-Unused classification
11
12
  - **Impact analysis** — Determine the blast radius of code changes by tracing all dependents
12
13
  - **Incremental indexing** — Merkle tree change detection with file system watcher for real-time updates. Smart event filtering skips metadata-only changes (chmod, xattr)
13
14
  - **Context compression** — Token-aware snippet extraction for LLM context windows (L0→full code, L1→summaries, L2→file groups, L3→directory overview). Compact JSON output saves 15-20% tokens
@@ -44,6 +45,18 @@ Single binary, embedded SQLite, bundled sqlite-vec extension, optional local emb
44
45
 
45
46
  Every design decision — from token-aware compression to node_id-based snippet expansion — is optimized for LLM context windows. Works out of the box with Claude Code, Cursor, Windsurf, and any MCP-compatible client.
46
47
 
48
+ ## Performance
49
+
50
+ | Metric | Value |
51
+ |--------|-------|
52
+ | Indexing speed | **300+ files/second** (single-threaded, release build) |
53
+ | Incremental re-index | **<250ms** no-change detection via BLAKE3 Merkle tree |
54
+ | FTS search P50 / P99 | **<300us / <1ms** |
55
+ | Database overhead | **~3.5MB** per 800 nodes |
56
+ | Token savings | **5-20x fewer tokens** per code understanding task vs grep+read |
57
+
58
+ Run `code-graph-mcp benchmark` on your own project to measure.
59
+
47
60
  ## Efficiency: code-graph vs Traditional Tools
48
61
 
49
62
  Real-world benchmarks comparing code-graph-mcp tools against traditional approaches (Grep + Read + Glob) on a 33-file Rust project (~537 AST nodes).
@@ -215,6 +228,9 @@ npm uninstall -g @sdsrs/code-graph
215
228
  | `dependency_graph` | Visualize dependency relationships between modules |
216
229
  | `find_similar_code` | Find code snippets similar to a given pattern |
217
230
  | `get_ast_node` | Extract a specific code symbol with signature, body, and relations |
231
+ | `ast_search` | Search AST nodes by text and/or structural filters (type, return type, params) |
232
+ | `find_references` | Find all references to a symbol (callers, importers, inheritors) |
233
+ | `find_dead_code` | Find unused code — orphan symbols and exported-but-unused public APIs |
218
234
 
219
235
  ## Plugin Slash Commands
220
236
 
@@ -228,9 +244,26 @@ Available when installed as a Claude Code plugin:
228
244
  | `/status` | Show code-graph index status and embedding progress |
229
245
  | `/rebuild` | Force a full code-graph index rebuild |
230
246
 
231
- ## Supported Languages
232
-
233
- TypeScript, JavaScript, Go, Python, Rust, Java, C, C++, HTML, CSS
247
+ ## Supported Languages (16)
248
+
249
+ | Language | Extensions | Relations Extracted |
250
+ |----------|-----------|-------------------|
251
+ | TypeScript | .ts, .tsx | calls, imports, exports, inherits, implements, routes_to |
252
+ | JavaScript | .js, .jsx, .mjs, .cjs | calls, imports, exports, inherits, routes_to |
253
+ | Go | .go | calls, imports, routes_to |
254
+ | Python | .py, .pyi | calls, imports, inherits, routes_to |
255
+ | Rust | .rs | calls, imports, inherits, implements |
256
+ | Java | .java | calls, imports, inherits, implements |
257
+ | C# | .cs | calls, imports, inherits, implements |
258
+ | Kotlin | .kt, .kts | calls, imports, inherits |
259
+ | Ruby | .rb | calls, imports, inherits |
260
+ | PHP | .php | calls, imports, inherits, implements |
261
+ | Swift | .swift | calls, imports, inherits |
262
+ | Dart | .dart | calls, imports, implements |
263
+ | C | .c, .h | calls, imports |
264
+ | C++ | .cpp, .cc, .cxx, .hpp | calls, imports, inherits |
265
+ | HTML | .html, .htm | structural parsing |
266
+ | CSS | .css | structural parsing |
234
267
 
235
268
  ## Storage
236
269
 
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "sdsrs"
6
6
  },
7
- "version": "0.5.48",
7
+ "version": "0.6.0",
8
8
  "keywords": [
9
9
  "code-graph",
10
10
  "ast",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdsrs/code-graph",
3
- "version": "0.5.48",
3
+ "version": "0.6.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": {
@@ -33,10 +33,10 @@
33
33
  "node": ">=16"
34
34
  },
35
35
  "optionalDependencies": {
36
- "@sdsrs/code-graph-linux-x64": "0.5.48",
37
- "@sdsrs/code-graph-linux-arm64": "0.5.48",
38
- "@sdsrs/code-graph-darwin-x64": "0.5.48",
39
- "@sdsrs/code-graph-darwin-arm64": "0.5.48",
40
- "@sdsrs/code-graph-win32-x64": "0.5.48"
36
+ "@sdsrs/code-graph-linux-x64": "0.6.0",
37
+ "@sdsrs/code-graph-linux-arm64": "0.6.0",
38
+ "@sdsrs/code-graph-darwin-x64": "0.6.0",
39
+ "@sdsrs/code-graph-darwin-arm64": "0.6.0",
40
+ "@sdsrs/code-graph-win32-x64": "0.6.0"
41
41
  }
42
42
  }