@magic5644/graph-it-live 1.0.0 → 1.0.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 +88 -17
- package/dist/astWorker.js +1 -1
- package/dist/graph-it.js +193 -173
- package/dist/indexerWorker.js +140 -140
- package/dist/mcpWorker.js +138 -138
- package/dist/queries/csharp.scm +95 -0
- package/dist/queries/go.scm +70 -0
- package/dist/queries/java.scm +71 -0
- package/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
- package/dist/wasm/tree-sitter-go.wasm +0 -0
- package/dist/wasm/tree-sitter-java.wasm +0 -0
- package/package.json +18 -18
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
; C# Tree-sitter query for call graph extraction
|
|
2
|
+
; Capture names:
|
|
3
|
+
; @def.function — method definitions (static or instance)
|
|
4
|
+
; @def.class — class, struct, record definitions
|
|
5
|
+
; @def.method — additional method style
|
|
6
|
+
; @def.interface — interface definitions
|
|
7
|
+
; @def.type — delegate / enum declarations
|
|
8
|
+
; @call — CALLS relation (method/function invocations)
|
|
9
|
+
; @inherit — INHERITS relation (base class)
|
|
10
|
+
; @impl — IMPLEMENTS relation (interfaces)
|
|
11
|
+
; @uses — USES relation (type references)
|
|
12
|
+
|
|
13
|
+
; --------------------------------------------------------------------------
|
|
14
|
+
; DEFINITIONS
|
|
15
|
+
; --------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
; Class declaration
|
|
18
|
+
(class_declaration
|
|
19
|
+
name: (identifier) @def.class)
|
|
20
|
+
|
|
21
|
+
; Struct declaration
|
|
22
|
+
(struct_declaration
|
|
23
|
+
name: (identifier) @def.class)
|
|
24
|
+
|
|
25
|
+
; Record declaration
|
|
26
|
+
(record_declaration
|
|
27
|
+
name: (identifier) @def.class)
|
|
28
|
+
|
|
29
|
+
; Interface declaration
|
|
30
|
+
(interface_declaration
|
|
31
|
+
name: (identifier) @def.interface)
|
|
32
|
+
|
|
33
|
+
; Enum declaration
|
|
34
|
+
(enum_declaration
|
|
35
|
+
name: (identifier) @def.type)
|
|
36
|
+
|
|
37
|
+
; Delegate declaration
|
|
38
|
+
(delegate_declaration
|
|
39
|
+
name: (identifier) @def.type)
|
|
40
|
+
|
|
41
|
+
; Method declaration (instance and static)
|
|
42
|
+
(method_declaration
|
|
43
|
+
name: (identifier) @def.function)
|
|
44
|
+
|
|
45
|
+
; Constructor
|
|
46
|
+
(constructor_declaration
|
|
47
|
+
name: (identifier) @def.function)
|
|
48
|
+
|
|
49
|
+
; Property (get/set accessor methods)
|
|
50
|
+
(property_declaration
|
|
51
|
+
name: (identifier) @def.variable)
|
|
52
|
+
|
|
53
|
+
; --------------------------------------------------------------------------
|
|
54
|
+
; CALLS
|
|
55
|
+
; --------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
; Direct invocation: Foo()
|
|
58
|
+
(invocation_expression
|
|
59
|
+
function: (identifier) @call)
|
|
60
|
+
|
|
61
|
+
; Member access invocation: obj.Method() — captures method name
|
|
62
|
+
(invocation_expression
|
|
63
|
+
function: (member_access_expression
|
|
64
|
+
name: (identifier) @call))
|
|
65
|
+
|
|
66
|
+
; --------------------------------------------------------------------------
|
|
67
|
+
; INHERITS
|
|
68
|
+
; --------------------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
; Base class in class_declaration: class Foo : Bar
|
|
71
|
+
(base_list
|
|
72
|
+
(primary_constructor_base_type
|
|
73
|
+
(identifier) @inherit))
|
|
74
|
+
|
|
75
|
+
(base_list
|
|
76
|
+
(simple_base_type
|
|
77
|
+
(identifier) @inherit))
|
|
78
|
+
|
|
79
|
+
; --------------------------------------------------------------------------
|
|
80
|
+
; IMPLEMENTS
|
|
81
|
+
; --------------------------------------------------------------------------
|
|
82
|
+
|
|
83
|
+
; Interface in base list — tree-sitter C# does not distinguish base-class from
|
|
84
|
+
; interface in base_list, so we capture all base types as @impl if they start
|
|
85
|
+
; with a capital letter convention (best-effort for C#)
|
|
86
|
+
(base_list
|
|
87
|
+
(simple_base_type
|
|
88
|
+
(identifier) @impl))
|
|
89
|
+
|
|
90
|
+
; --------------------------------------------------------------------------
|
|
91
|
+
; USES (type references in fields, parameters, locals)
|
|
92
|
+
; --------------------------------------------------------------------------
|
|
93
|
+
|
|
94
|
+
; Named type references (e.g. MyService, List<T>)
|
|
95
|
+
(identifier) @uses
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
; Go Tree-sitter query for call graph extraction
|
|
2
|
+
; Capture names:
|
|
3
|
+
; @def.function — top-level function definitions
|
|
4
|
+
; @def.method — method definitions on types
|
|
5
|
+
; @def.class — struct type definitions
|
|
6
|
+
; @def.interface — interface type definitions
|
|
7
|
+
; @def.type — type alias declarations
|
|
8
|
+
; @call — CALLS relation (function/method invocations)
|
|
9
|
+
; @inherit — INHERITS relation (embedded types)
|
|
10
|
+
; @impl — IMPLEMENTS relation (interface satisfaction via method sets)
|
|
11
|
+
; @uses — USES relation (type references)
|
|
12
|
+
|
|
13
|
+
; --------------------------------------------------------------------------
|
|
14
|
+
; DEFINITIONS
|
|
15
|
+
; --------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
; Top-level function declaration
|
|
18
|
+
(function_declaration
|
|
19
|
+
name: (identifier) @def.function)
|
|
20
|
+
|
|
21
|
+
; Method declaration (with receiver)
|
|
22
|
+
(method_declaration
|
|
23
|
+
name: (field_identifier) @def.method)
|
|
24
|
+
|
|
25
|
+
; Struct type declaration
|
|
26
|
+
(type_declaration
|
|
27
|
+
(type_spec
|
|
28
|
+
name: (type_identifier) @def.class
|
|
29
|
+
type: (struct_type)))
|
|
30
|
+
|
|
31
|
+
; Interface type declaration
|
|
32
|
+
(type_declaration
|
|
33
|
+
(type_spec
|
|
34
|
+
name: (type_identifier) @def.interface
|
|
35
|
+
type: (interface_type)))
|
|
36
|
+
|
|
37
|
+
; Other type alias declarations
|
|
38
|
+
(type_declaration
|
|
39
|
+
(type_spec
|
|
40
|
+
name: (type_identifier) @def.type))
|
|
41
|
+
|
|
42
|
+
; --------------------------------------------------------------------------
|
|
43
|
+
; CALLS
|
|
44
|
+
; --------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
; Direct function call: foo()
|
|
47
|
+
(call_expression
|
|
48
|
+
function: (identifier) @call)
|
|
49
|
+
|
|
50
|
+
; Method/selector call: obj.Method()
|
|
51
|
+
(call_expression
|
|
52
|
+
function: (selector_expression
|
|
53
|
+
field: (field_identifier) @call))
|
|
54
|
+
|
|
55
|
+
; --------------------------------------------------------------------------
|
|
56
|
+
; INHERITS (embedded struct fields)
|
|
57
|
+
; --------------------------------------------------------------------------
|
|
58
|
+
|
|
59
|
+
; Struct embedding (anonymous field): type Foo struct { Bar }
|
|
60
|
+
(struct_type
|
|
61
|
+
(field_declaration_list
|
|
62
|
+
(field_declaration
|
|
63
|
+
type: (type_identifier) @inherit)))
|
|
64
|
+
|
|
65
|
+
; --------------------------------------------------------------------------
|
|
66
|
+
; USES (type references)
|
|
67
|
+
; --------------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
; Type identifiers used in declarations, parameters, variables
|
|
70
|
+
(type_identifier) @uses
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
; Java Tree-sitter query for call graph extraction
|
|
2
|
+
; Capture names:
|
|
3
|
+
; @def.function — method definitions
|
|
4
|
+
; @def.class — class declarations
|
|
5
|
+
; @def.interface — interface declarations
|
|
6
|
+
; @def.type — enum declarations
|
|
7
|
+
; @call — CALLS relation (method invocations)
|
|
8
|
+
; @inherit — INHERITS relation (extends)
|
|
9
|
+
; @impl — IMPLEMENTS relation (implements)
|
|
10
|
+
; @uses — USES relation (type references)
|
|
11
|
+
|
|
12
|
+
; --------------------------------------------------------------------------
|
|
13
|
+
; DEFINITIONS
|
|
14
|
+
; --------------------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
; Class declaration
|
|
17
|
+
(class_declaration
|
|
18
|
+
name: (identifier) @def.class)
|
|
19
|
+
|
|
20
|
+
; Interface declaration
|
|
21
|
+
(interface_declaration
|
|
22
|
+
name: (identifier) @def.interface)
|
|
23
|
+
|
|
24
|
+
; Enum declaration
|
|
25
|
+
(enum_declaration
|
|
26
|
+
name: (identifier) @def.type)
|
|
27
|
+
|
|
28
|
+
; Method declaration
|
|
29
|
+
(method_declaration
|
|
30
|
+
name: (identifier) @def.function)
|
|
31
|
+
|
|
32
|
+
; Constructor declaration
|
|
33
|
+
(constructor_declaration
|
|
34
|
+
name: (identifier) @def.function)
|
|
35
|
+
|
|
36
|
+
; --------------------------------------------------------------------------
|
|
37
|
+
; CALLS
|
|
38
|
+
; --------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
; Direct method invocation: foo()
|
|
41
|
+
(method_invocation
|
|
42
|
+
name: (identifier) @call)
|
|
43
|
+
|
|
44
|
+
; Object method invocation: obj.method() — captures method name
|
|
45
|
+
(method_invocation
|
|
46
|
+
object: (_)
|
|
47
|
+
name: (identifier) @call)
|
|
48
|
+
|
|
49
|
+
; --------------------------------------------------------------------------
|
|
50
|
+
; INHERITS (extends)
|
|
51
|
+
; --------------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
; class Foo extends Bar
|
|
54
|
+
(superclass
|
|
55
|
+
(type_identifier) @inherit)
|
|
56
|
+
|
|
57
|
+
; --------------------------------------------------------------------------
|
|
58
|
+
; IMPLEMENTS
|
|
59
|
+
; --------------------------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
; class Foo implements IBar, IBaz
|
|
62
|
+
(super_interfaces
|
|
63
|
+
(type_list
|
|
64
|
+
(type_identifier) @impl))
|
|
65
|
+
|
|
66
|
+
; --------------------------------------------------------------------------
|
|
67
|
+
; USES (type references)
|
|
68
|
+
; --------------------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
; Generic type identifiers used in declarations, parameters, fields
|
|
71
|
+
(type_identifier) @uses
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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 21 tools for GitHub Copilot, Cursor, Claude, Windsurf, and Antigravity. Generate AI-friendly codemaps. TypeScript, JavaScript, Python, Rust, Vue, Svelte, GraphQL.",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.2",
|
|
6
6
|
"publisher": "magic5644",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "magic56"
|
|
@@ -1085,39 +1085,39 @@
|
|
|
1085
1085
|
"@dagrejs/dagre": "^2.0.4",
|
|
1086
1086
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
1087
1087
|
"chokidar": "^5.0.0",
|
|
1088
|
-
"cytoscape": "^3.33.
|
|
1088
|
+
"cytoscape": "^3.33.2",
|
|
1089
1089
|
"cytoscape-fcose": "^2.2.0",
|
|
1090
|
-
"react": "^19.2.
|
|
1091
|
-
"react-dom": "^19.2.
|
|
1090
|
+
"react": "^19.2.5",
|
|
1091
|
+
"react-dom": "^19.2.5",
|
|
1092
1092
|
"reactflow": "^11.11.4",
|
|
1093
1093
|
"sql.js": "^1.14.1",
|
|
1094
1094
|
"tree-sitter-wasms": "^0.1.13",
|
|
1095
1095
|
"ts-morph": "^27.0.2",
|
|
1096
|
-
"web-tree-sitter": "^0.26.
|
|
1096
|
+
"web-tree-sitter": "^0.26.8",
|
|
1097
1097
|
"zod": "^4.3.6"
|
|
1098
1098
|
},
|
|
1099
1099
|
"devDependencies": {
|
|
1100
1100
|
"@eslint/js": "^10.0.1",
|
|
1101
1101
|
"@types/mocha": "^10.0.10",
|
|
1102
|
-
"@types/node": "^25.
|
|
1102
|
+
"@types/node": "^25.6.0",
|
|
1103
1103
|
"@types/react": "^19.2.14",
|
|
1104
1104
|
"@types/react-dom": "^19.2.3",
|
|
1105
1105
|
"@types/sql.js": "^1.4.11",
|
|
1106
1106
|
"@types/vscode": "^1.96.0",
|
|
1107
|
-
"@vitest/coverage-v8": "^4.1.
|
|
1108
|
-
"@vitest/ui": "^4.1.
|
|
1107
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
1108
|
+
"@vitest/ui": "^4.1.4",
|
|
1109
1109
|
"@vscode/test-electron": "^2.5.2",
|
|
1110
1110
|
"@vscode/vsce": "^3.7.2-7",
|
|
1111
|
-
"esbuild": "^0.27.
|
|
1111
|
+
"esbuild": "^0.27.7",
|
|
1112
1112
|
"esbuild-css-modules-plugin": "^3.1.5",
|
|
1113
|
-
"eslint": "^10.
|
|
1113
|
+
"eslint": "^10.2.0",
|
|
1114
1114
|
"fast-check": "^4.6.0",
|
|
1115
1115
|
"glob": "^13.0.6",
|
|
1116
|
-
"globals": "^17.
|
|
1116
|
+
"globals": "^17.5.0",
|
|
1117
1117
|
"mocha": "^11.7.5",
|
|
1118
1118
|
"typescript": "^6.0.2",
|
|
1119
|
-
"typescript-eslint": "^8.58.
|
|
1120
|
-
"vitest": "^4.1.
|
|
1119
|
+
"typescript-eslint": "^8.58.1",
|
|
1120
|
+
"vitest": "^4.1.4"
|
|
1121
1121
|
},
|
|
1122
1122
|
"overrides": {
|
|
1123
1123
|
"picomatch": "^4.0.4",
|
|
@@ -1131,6 +1131,10 @@
|
|
|
1131
1131
|
"serialize-javascript": ">=7.0.3"
|
|
1132
1132
|
}
|
|
1133
1133
|
},
|
|
1134
|
+
"publishConfig": {
|
|
1135
|
+
"access": "public",
|
|
1136
|
+
"registry": "https://registry.npmjs.org"
|
|
1137
|
+
},
|
|
1134
1138
|
"files": [
|
|
1135
1139
|
"bin/",
|
|
1136
1140
|
"dist/graph-it.js",
|
|
@@ -1142,9 +1146,5 @@
|
|
|
1142
1146
|
"dist/queries/",
|
|
1143
1147
|
"README.md",
|
|
1144
1148
|
"LICENSE"
|
|
1145
|
-
]
|
|
1146
|
-
"publishConfig": {
|
|
1147
|
-
"access": "public",
|
|
1148
|
-
"registry": "https://registry.npmjs.org"
|
|
1149
|
-
}
|
|
1149
|
+
]
|
|
1150
1150
|
}
|