@magic5644/graph-it-live 1.24.1 → 1.24.2
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 +2 -2
- package/dist/graph-it.js +185 -185
- package/dist/mcpServer.mjs +32 -32
- package/dist/mcpWorker.js +125 -125
- package/docs/CLI.md +5 -3
- package/package.json +5 -5
package/docs/CLI.md
CHANGED
|
@@ -1362,7 +1362,7 @@ A compatible change (an optional parameter or member added, a union or enum that
|
|
|
1362
1362
|
|
|
1363
1363
|
A changed file that cannot be read safely at the base or the head (a symbolic link, a path resolving outside the workspace, a binary file, more than 2 MiB) is skipped with the limitation `Could not compare <file>; <reason>` and the result is partial; the other files are still reviewed. A file replaced by a symbolic link (a Git type change) is listed the same way. Missing optional evidence, unsupported file types, and file limits are reported as limitations rather than invented findings. The command does not fail solely because the risk is high; use the Action's `fail-on-risk` input to gate CI.
|
|
1364
1364
|
|
|
1365
|
-
`--max-files` defaults to `200` and accepts
|
|
1365
|
+
`--max-files` defaults to `200` and accepts any integer of at least `1` (no upper bound). Time and memory grow with it: the base and head text of every analysed file stays in memory during the review. Through MCP, `review_pr` and `scan_dead_code` stop after 10 minutes (other tools after 1 minute), and other tool calls wait until they end. Branch Watch keeps its own `graph-it-live.branchWatch.maxFiles` setting at most `2000`, because it reruns by itself after edits. The default output is text. Markdown output includes a consumer table, a list of consumers to check and the moved symbols; JSON and TOON expose the complete structured result. Invalid refs and invalid limits exit non-zero.
|
|
1366
1366
|
|
|
1367
1367
|
`cycles` lists the import cycles the diff creates (`introduced`) or enlarges (`aggravated`), with every file in the cycle; a cycle that already existed and that the diff leaves intact is not listed, and a cycle the diff removes is not reported. Type-only and dynamic `import()` edges count like any import, since the dependency graph records them. A file in such a cycle gives its changed symbols a `cycles` score factor; a cycle alone, with no changed signature, is reported without raising the risk. Cycles are read from the whole import graphs of both sides, with no file budget: the head graph from the warmed index of the checked-out tree (or from the Git objects of `--head` when it names another ref), the base graph from the Git objects of `--base` (or of its merge base with `--head`, as the changed-file list). With `graphit.architecture.json`, the architecture rules check the same two graphs, so each side is parsed once. `limitations` says when files of either graph could not be analyzed, and when the cycle data cannot be read at all. A Rust `mod x;` declaration never closes a cycle. Side-effect-only imports (`import "./x"`) are recorded as edges of type `side-effect`, so they can close a cycle; `import "./x.css"` is an edge only when the file resolves.
|
|
1368
1368
|
|
|
@@ -1990,7 +1990,7 @@ graph-it tool get_index_status
|
|
|
1990
1990
|
|
|
1991
1991
|
#### `invalidate_files`
|
|
1992
1992
|
|
|
1993
|
-
**What it does:** Removes specific files from the in-memory cache, forcing them to be re-analyzed on next access. Use after programmatic file edits.
|
|
1993
|
+
**What it does:** Removes specific files from the in-memory cache, forcing them to be re-analyzed on next access. Use after programmatic file edits. One call accepts at most 10,000 paths (a payload bound, also on the VS Code tool): split larger lists, or use `rebuild_index` for the whole workspace.
|
|
1994
1994
|
|
|
1995
1995
|
```bash
|
|
1996
1996
|
graph-it tool invalidate_files --filePaths='["/abs/path/to/file.ts"]'
|
|
@@ -2156,7 +2156,9 @@ graph-it tool scan_dead_code
|
|
|
2156
2156
|
graph-it tool scan_dead_code --scopePath=/abs/path/to/src/utils/
|
|
2157
2157
|
```
|
|
2158
2158
|
|
|
2159
|
-
**Output fields:** `rootDir`, `scopePath`, `scannedFiles`, `filesWithDeadCode`, `totalUnusedSymbols`, `entries[]`, `skippedFiles`, `truncated`, `filesBeyondLimit`, `analysisTimeMs`. When `truncated` is `true`, `maxFiles` stopped the scan and `filesBeyondLimit` files were not analysed: raise `--maxFiles` or narrow `--scopePath` before concluding there is no dead code.
|
|
2159
|
+
**Output fields:** `rootDir`, `scopePath`, `scannedFiles`, `filesWithDeadCode`, `totalUnusedSymbols`, `entries[]`, `skippedFiles`, `truncated`, `filesBeyondLimit`, `analysisTimeMs`. When `truncated` is `true`, `maxFiles` stopped the scan and `filesBeyondLimit` files were not analysed: the result is partial, so raise `--maxFiles` or narrow `--scopePath` before concluding there is no dead code.
|
|
2160
|
+
|
|
2161
|
+
`--maxFiles` is optional: without it, every analysable file in scope is scanned, like `graph-it architecture --maxFiles`. The MCP tool and the VS Code language-model tool use the same default. Any integer of at least `1` is accepted, with no upper bound. Memory stays flat on a full scan; duration grows linearly with the file count (about 90 s for 12,000 files on a recent laptop). The MCP server stops a `scan_dead_code` call after 10 minutes (other tools after 1 minute), and other MCP tool calls wait until it ends; `graph-it tool` and the VS Code tool have no time limit, and VS Code chat can cancel the scan.
|
|
2160
2162
|
|
|
2161
2163
|
---
|
|
2162
2164
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@magic5644/graph-it-live",
|
|
3
3
|
"displayName": "Graph-It-Live",
|
|
4
4
|
"description": "AI-first dependency graph & code intelligence for VS Code. Visualize file imports, symbol call hierarchies, and cross-file call graphs. Detect circular dependencies, dead code, and breaking changes. Built-in MCP Server with 25 tools for GitHub Copilot, Cursor, Claude, Windsurf, and Antigravity. Generate AI-friendly codemaps. TypeScript, JavaScript, C#, Go, Java, Python, Rust, Vue, Svelte, GraphQL.",
|
|
5
|
-
"version": "1.24.
|
|
5
|
+
"version": "1.24.2",
|
|
6
6
|
"publisher": "magic5644",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "magic56"
|
|
@@ -1490,7 +1490,7 @@
|
|
|
1490
1490
|
"displayName": "Graph-It-Live: Scan Dead Code",
|
|
1491
1491
|
"icon": "$(trash)",
|
|
1492
1492
|
"userDescription": "Workspace-wide scan for unused exported symbols (dead code) across the entire project or a scoped directory",
|
|
1493
|
-
"modelDescription": "Lists the unused exported symbols across a whole workspace or directory.\n\nWHEN: auditing code quality, or cleaning up before a refactor; use find_unused_symbols for a single file.\nWHY: combines the reverse index with per-file symbol analysis, so the scan stays linear instead of comparing every file against every other.\nRETURNS: files scanned, files holding dead code, total unused symbols, per-file unused symbol lists, scan duration, and truncated with filesBeyondLimit when maxFiles stopped the scan.\nLIMITS: scopePath must be an absolute path inside the workspace; results are incomplete while background indexing runs; an export reached only through a dynamic lookup can still be listed.",
|
|
1493
|
+
"modelDescription": "Lists the unused exported symbols across a whole workspace or directory.\n\nWHEN: auditing code quality, or cleaning up before a refactor; use find_unused_symbols for a single file.\nWHY: combines the reverse index with per-file symbol analysis, so the scan stays linear instead of comparing every file against every other.\nRETURNS: files scanned, files holding dead code, total unused symbols, per-file unused symbol lists, scan duration, and truncated with filesBeyondLimit when maxFiles stopped the scan. Without maxFiles every analysable file in scope is scanned (no upper bound). truncated=true means a partial result: report it as partial, never as the whole workspace.\nLIMITS: scopePath must be an absolute path inside the workspace; results are incomplete while background indexing runs; duration grows with file count (about 90 s for 12,000 files); an export reached only through a dynamic lookup can still be listed.",
|
|
1494
1494
|
"inputSchema": {
|
|
1495
1495
|
"type": "object",
|
|
1496
1496
|
"properties": {
|
|
@@ -1500,7 +1500,7 @@
|
|
|
1500
1500
|
},
|
|
1501
1501
|
"maxFiles": {
|
|
1502
1502
|
"type": "number",
|
|
1503
|
-
"description": "Optional
|
|
1503
|
+
"description": "Optional cap on analysed files (default: every analysable file in scope, no upper bound). When the cap stops the scan, truncated=true and filesBeyondLimit > 0: the result is partial."
|
|
1504
1504
|
},
|
|
1505
1505
|
"response_format": {
|
|
1506
1506
|
"type": "string",
|
|
@@ -1527,7 +1527,7 @@
|
|
|
1527
1527
|
"displayName": "Graph-It-Live: Review PR",
|
|
1528
1528
|
"icon": "$(git-pull-request)",
|
|
1529
1529
|
"userDescription": "Review a local Git diff against a base ref and report its risk with per-symbol evidence",
|
|
1530
|
-
"modelDescription": "Reviews a local Git diff and reports the risk it carries, with per-symbol evidence.\n\nWHEN: before opening a pull request, or as a CI gate.\nWHY: combines the parsed signatures of both revisions with the workspace index, so signature changes are scored against their real callers.\nRETURNS: deterministic risk level, per-symbol evidence, impact counts, and an explicit list of what could not be analysed. With graphit.architecture.json, `architecture` says whether the diff degrades or improves the declared rules: new, resolved and unchanged violations per rule, unit cycles, rules-file edits; a new error violation raises the risk. A changed .vue lists the props and events it adds or removes by name (no type check), a contract typed by an imported type or built at runtime as partial.\nLIMITS: runs git in the first workspace folder; impact counts are incomplete while background indexing runs.",
|
|
1530
|
+
"modelDescription": "Reviews a local Git diff and reports the risk it carries, with per-symbol evidence.\n\nWHEN: before opening a pull request, or as a CI gate.\nWHY: combines the parsed signatures of both revisions with the workspace index, so signature changes are scored against their real callers.\nRETURNS: deterministic risk level, per-symbol evidence, impact counts, and an explicit list of what could not be analysed. With graphit.architecture.json, `architecture` says whether the diff degrades or improves the declared rules: new, resolved and unchanged violations per rule, unit cycles, rules-file edits; a new error violation raises the risk. A changed .vue lists the props and events it adds or removes by name (no type check), a contract typed by an imported type or built at runtime as partial.\nLIMITS: runs git in the first workspace folder; impact counts are incomplete while background indexing runs; maxFiles caps changed files (default 200, no upper bound), time and memory grow with it.",
|
|
1531
1531
|
"inputSchema": {
|
|
1532
1532
|
"type": "object",
|
|
1533
1533
|
"properties": {
|
|
@@ -1541,7 +1541,7 @@
|
|
|
1541
1541
|
},
|
|
1542
1542
|
"maxFiles": {
|
|
1543
1543
|
"type": "number",
|
|
1544
|
-
"description": "Optional maximum number of changed files to analyse (
|
|
1544
|
+
"description": "Optional maximum number of changed files to analyse (default 200, no upper bound)"
|
|
1545
1545
|
},
|
|
1546
1546
|
"maxDepth": {
|
|
1547
1547
|
"type": "number",
|