@sdsrs/code-graph 0.54.1 → 0.55.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.
@@ -4,7 +4,7 @@
4
4
  "author": {
5
5
  "name": "sdsrs"
6
6
  },
7
- "version": "0.54.1",
7
+ "version": "0.55.0",
8
8
  "keywords": [
9
9
  "code-graph",
10
10
  "ast",
@@ -60,7 +60,7 @@ type: reference
60
60
  | "Y 模块长啥样?" | `module_overview` / `overview Y/` | 替代逐文件 Read |
61
61
  | "找做 Z 的代码"(概念) | MCP `semantic_code_search`(RRF 混合);CLI `search`(纯 FTS5) | 不知道精确名;要向量召回走 MCP |
62
62
  | "返回 T 类型的函数" | `ast_search --returns T` | 结构化筛选 |
63
- | "X 在哪被引用?" | `find_references` / `refs X` | 含 callers/importers |
63
+ | "X 在哪被引用?" | `find_references` / `refs X` | 含 callers/importers;`refs X --min-confidence extracted` 滤掉跨文件裸名低置信边(inferred/ambiguous) |
64
64
  | "看 X 的源码 / 签名" | `get_ast_node` / `show X` | `include_impact=true` 影响面 / `include_similar=true` 嵌入近邻 |
65
65
  | "项目结构总览" | `project_map` / `map` | 起手势用 `--compact` |
66
66
  | "X 文件依赖谁?" / "Y 模块下的死代码" | `module_overview path=Y include_deps=true` / `include_dead=true` | 文件路径走 deps;目录/文件走 dead |
@@ -81,6 +81,10 @@ hidden 5 加载 schema —— 实操中走新 flag。CLI 子命令保持原样
81
81
  | "X 文件依赖谁?" | `code-graph-mcp deps src/x.rs` | `module_overview path="src/x.rs" include_deps=true` |
82
82
  | "相似/重复函数"(需 embedding) | `code-graph-mcp similar X` | `get_ast_node symbol_name=X include_similar=true` |
83
83
  | "未使用的代码" | `code-graph-mcp dead-code [path]` | `module_overview path=<path> include_dead=true` |
84
+ | "架构咽喉/桥节点是谁?" | `code-graph-mcp centrality` | —(CLI-only;betweenness 中心性,补 `map` 的 caller_count 度中心性) |
85
+ | "循环导入依赖(哪些文件互相 import)?" | `code-graph-mcp cycles` | —(CLI-only;文件级 import 环 = SCC;JS/TS/Py/Go 是坏味,Rust 内部环常良性) |
86
+ | "可疑/意外的跨模块耦合?" | `code-graph-mcp surprising` | —(CLI-only;跨文件 calls/refs 按 低置信(ambiguous>inferred)+跨模块+sole-bridge 打分) |
87
+ | "代码健康总览(想要一份报告)?" | `code-graph-mcp report` | —(CLI-only;汇总 summary+置信度 / hot / chokepoints / cycles / surprising / dead-code) |
84
88
 
85
89
  **dead-code 的 `ignore_paths`**:CLI 默认豁免 `["claude-plugin/", "benches/"]`
86
90
  (macro/shell 入口点);`--no-ignore` 关闭。MCP 端也接同名参数。
@@ -114,6 +118,11 @@ code-graph-mcp callgraph SYMBOL # 调用图
114
118
  code-graph-mcp impact SYMBOL # 影响面
115
119
  code-graph-mcp show SYMBOL # 节点详情
116
120
  code-graph-mcp refs SYMBOL --relation calls # 引用筛选
121
+ code-graph-mcp refs SYMBOL --min-confidence extracted # 只看精确边(滤跨文件裸名 inferred/ambiguous)
122
+ code-graph-mcp centrality # 架构咽喉(betweenness 桥节点;补 map 的 caller_count)
123
+ code-graph-mcp cycles # 循环导入依赖(文件级 import 环 / SCC)
124
+ code-graph-mcp surprising # 可疑跨模块耦合(低置信 + 跨模块 + sole-bridge 打分)
125
+ code-graph-mcp report # 代码健康总览(汇总 hot/chokepoints/cycles/surprising/dead-code)
117
126
  code-graph-mcp dead-code [path] # 未使用代码(默认豁免 claude-plugin/)
118
127
  code-graph-mcp dead-code --ignore tmp/ --ignore scripts/bin/ # 自定义豁免前缀
119
128
  code-graph-mcp dead-code --no-ignore # 关掉默认豁免,看完整列表
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdsrs/code-graph",
3
- "version": "0.54.1",
3
+ "version": "0.55.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.54.1",
39
- "@sdsrs/code-graph-linux-arm64": "0.54.1",
40
- "@sdsrs/code-graph-darwin-x64": "0.54.1",
41
- "@sdsrs/code-graph-darwin-arm64": "0.54.1",
42
- "@sdsrs/code-graph-win32-x64": "0.54.1"
38
+ "@sdsrs/code-graph-linux-x64": "0.55.0",
39
+ "@sdsrs/code-graph-linux-arm64": "0.55.0",
40
+ "@sdsrs/code-graph-darwin-x64": "0.55.0",
41
+ "@sdsrs/code-graph-darwin-arm64": "0.55.0",
42
+ "@sdsrs/code-graph-win32-x64": "0.55.0"
43
43
  }
44
44
  }