depwire-cli 0.9.27 → 0.9.29
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/dist/{chunk-RGD3YJYQ.js → chunk-FUIZQCYB.js} +16 -10
- package/dist/{chunk-DA5LWNJ4.js → chunk-WUSXCZXA.js} +551 -104
- package/dist/index.js +13 -13
- package/dist/mcpb-entry.js +3 -3
- package/dist/sdk.d.ts +31 -2
- package/dist/sdk.js +3 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
parseTypeScriptFile,
|
|
17
17
|
scanSecurity,
|
|
18
18
|
searchSymbols
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WUSXCZXA.js";
|
|
20
20
|
|
|
21
21
|
// src/viz/data.ts
|
|
22
22
|
import { basename } from "path";
|
|
@@ -45,12 +45,18 @@ function prepareVizData(graph, projectRoot) {
|
|
|
45
45
|
if (!arc.edgeKinds.includes(edge.kind)) {
|
|
46
46
|
arc.edgeKinds.push(edge.kind);
|
|
47
47
|
}
|
|
48
|
+
if (edge.crossLanguage) {
|
|
49
|
+
arc.crossLanguage = true;
|
|
50
|
+
arc.edgeType = edge.edgeType || arc.edgeType;
|
|
51
|
+
}
|
|
48
52
|
} else {
|
|
49
53
|
arcMap.set(key, {
|
|
50
54
|
sourceFile: edge.sourceFile,
|
|
51
55
|
targetFile: edge.targetFile,
|
|
52
56
|
edgeCount: 1,
|
|
53
|
-
edgeKinds: [edge.kind]
|
|
57
|
+
edgeKinds: [edge.kind],
|
|
58
|
+
crossLanguage: edge.crossLanguage || false,
|
|
59
|
+
edgeType: edge.edgeType
|
|
54
60
|
});
|
|
55
61
|
}
|
|
56
62
|
}
|
|
@@ -238,7 +244,7 @@ Depwire visualization running at ${url2}`);
|
|
|
238
244
|
console.error(`File changed: ${filePath} \u2014 re-parsing project...`);
|
|
239
245
|
try {
|
|
240
246
|
const parsedFiles = await parseProject(projectRoot, options);
|
|
241
|
-
const newGraph = buildGraph(parsedFiles);
|
|
247
|
+
const newGraph = buildGraph(parsedFiles, projectRoot);
|
|
242
248
|
graph.clear();
|
|
243
249
|
newGraph.forEachNode((node, attrs) => {
|
|
244
250
|
graph.addNode(node, attrs);
|
|
@@ -257,7 +263,7 @@ Depwire visualization running at ${url2}`);
|
|
|
257
263
|
console.error(`File added: ${filePath} \u2014 re-parsing project...`);
|
|
258
264
|
try {
|
|
259
265
|
const parsedFiles = await parseProject(projectRoot, options);
|
|
260
|
-
const newGraph = buildGraph(parsedFiles);
|
|
266
|
+
const newGraph = buildGraph(parsedFiles, projectRoot);
|
|
261
267
|
graph.clear();
|
|
262
268
|
newGraph.forEachNode((node, attrs) => {
|
|
263
269
|
graph.addNode(node, attrs);
|
|
@@ -276,7 +282,7 @@ Depwire visualization running at ${url2}`);
|
|
|
276
282
|
console.error(`File deleted: ${filePath} \u2014 re-parsing project...`);
|
|
277
283
|
try {
|
|
278
284
|
const parsedFiles = await parseProject(projectRoot, options);
|
|
279
|
-
const newGraph = buildGraph(parsedFiles);
|
|
285
|
+
const newGraph = buildGraph(parsedFiles, projectRoot);
|
|
280
286
|
graph.clear();
|
|
281
287
|
newGraph.forEachNode((node, attrs) => {
|
|
282
288
|
graph.addNode(node, attrs);
|
|
@@ -509,7 +515,7 @@ async function connectToRepo(source, subdirectory, state) {
|
|
|
509
515
|
message: `No supported source files (.ts, .tsx, .js, .jsx, .py, .go) found in ${projectRoot}`
|
|
510
516
|
};
|
|
511
517
|
}
|
|
512
|
-
const graph = buildGraph(parsedFiles);
|
|
518
|
+
const graph = buildGraph(parsedFiles, projectRoot);
|
|
513
519
|
state.graph = graph;
|
|
514
520
|
state.projectRoot = projectRoot;
|
|
515
521
|
state.projectName = projectName;
|
|
@@ -939,7 +945,7 @@ function getToolsList() {
|
|
|
939
945
|
},
|
|
940
946
|
{
|
|
941
947
|
name: "impact_analysis",
|
|
942
|
-
description: "Analyze what would break if a symbol is changed, renamed, or removed. Shows direct dependents, transitive dependents (chain reaction), and all affected files. Pass a symbol name (e.g., 'Router') or a fully qualified ID (e.g., 'src/router.ts::Router') for exact matching. If multiple symbols share the same name, returns all matches for disambiguation. Use this before making changes to understand the blast radius.",
|
|
948
|
+
description: "Analyze what would break if a symbol is changed, renamed, or removed. Shows direct dependents, transitive dependents (chain reaction), and all affected files. Cross-language edges included \u2014 a TypeScript fetch call to a Python route will show the Python file as affected. Pass a symbol name (e.g., 'Router') or a fully qualified ID (e.g., 'src/router.ts::Router') for exact matching. If multiple symbols share the same name, returns all matches for disambiguation. Use this before making changes to understand the blast radius.",
|
|
943
949
|
inputSchema: {
|
|
944
950
|
type: "object",
|
|
945
951
|
properties: {
|
|
@@ -957,7 +963,7 @@ function getToolsList() {
|
|
|
957
963
|
},
|
|
958
964
|
{
|
|
959
965
|
name: "get_file_context",
|
|
960
|
-
description: "Get complete context about a file \u2014 all symbols defined in it, all imports, all exports, and all files that import from it.",
|
|
966
|
+
description: "Get complete context about a file \u2014 all symbols defined in it, all imports, all exports, and all files that import from it. Includes cross-language connections (REST API calls, subprocess invocations).",
|
|
961
967
|
inputSchema: {
|
|
962
968
|
type: "object",
|
|
963
969
|
properties: {
|
|
@@ -1094,7 +1100,7 @@ function getToolsList() {
|
|
|
1094
1100
|
},
|
|
1095
1101
|
{
|
|
1096
1102
|
name: "simulate_change",
|
|
1097
|
-
description: `Simulate an architectural change before touching any code. Returns health score delta, broken imports, and affected nodes. Zero file I/O \u2014 pure in-memory simulation.
|
|
1103
|
+
description: `Simulate an architectural change before touching any code. Returns health score delta, broken imports, and affected nodes. Zero file I/O \u2014 pure in-memory simulation. Cross-language edges included \u2014 deleting a Python route file will show TypeScript callers as affected.
|
|
1098
1104
|
|
|
1099
1105
|
Operations:
|
|
1100
1106
|
- delete: Simulate deleting a file. Shows every file that would break and the full blast radius.
|
|
@@ -1777,7 +1783,7 @@ async function handleUpdateProjectDocs(docType, state) {
|
|
|
1777
1783
|
const docsDir = join5(state.projectRoot, ".depwire");
|
|
1778
1784
|
console.error("Regenerating project documentation...");
|
|
1779
1785
|
const parsedFiles = await parseProject(state.projectRoot);
|
|
1780
|
-
const graph = buildGraph(parsedFiles);
|
|
1786
|
+
const graph = buildGraph(parsedFiles, state.projectRoot);
|
|
1781
1787
|
const parseTime = (Date.now() - startTime) / 1e3;
|
|
1782
1788
|
state.graph = graph;
|
|
1783
1789
|
const packageJsonPath = join5(__dirname, "../../package.json");
|