@magic5644/graph-it-live 1.0.1 → 1.9.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.
@@ -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
+ ; Primary constructor base type: record Foo(int X) : Bar(X)
71
+ (base_list
72
+ (primary_constructor_base_type
73
+ (identifier) @inherit))
74
+
75
+ ; Simple base class / interface: class Foo : Bar, IFoo
76
+ ; In tree-sitter-c-sharp 0.20.x base_list directly contains _type nodes —
77
+ ; there is no 'simple_base_type' wrapper in this grammar version.
78
+ (base_list (identifier) @inherit)
79
+ (base_list (qualified_name) @inherit)
80
+
81
+ ; --------------------------------------------------------------------------
82
+ ; IMPLEMENTS
83
+ ; --------------------------------------------------------------------------
84
+
85
+ ; C# does not distinguish base-class from interface at the AST level.
86
+ ; Both appear as the same _type nodes directly under base_list.
87
+ (base_list (identifier) @impl)
88
+ (base_list (qualified_name) @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
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@magic5644/graph-it-live",
3
3
  "displayName": "Graph-It-Live",
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.1",
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, C#, Go, Java, Python, Rust, Vue, Svelte, GraphQL.",
5
+ "version": "1.9.0",
6
6
  "publisher": "magic5644",
7
7
  "author": {
8
8
  "name": "magic56"
@@ -31,6 +31,9 @@
31
31
  "typescript",
32
32
  "javascript",
33
33
  "python",
34
+ "java",
35
+ "go",
36
+ "csharp",
34
37
  "rust",
35
38
  "vue",
36
39
  "svelte",
@@ -1085,39 +1088,39 @@
1085
1088
  "@dagrejs/dagre": "^2.0.4",
1086
1089
  "@modelcontextprotocol/sdk": "^1.29.0",
1087
1090
  "chokidar": "^5.0.0",
1088
- "cytoscape": "^3.33.1",
1091
+ "cytoscape": "^3.33.2",
1089
1092
  "cytoscape-fcose": "^2.2.0",
1090
- "react": "^19.2.4",
1091
- "react-dom": "^19.2.4",
1093
+ "react": "^19.2.5",
1094
+ "react-dom": "^19.2.5",
1092
1095
  "reactflow": "^11.11.4",
1093
1096
  "sql.js": "^1.14.1",
1094
1097
  "tree-sitter-wasms": "^0.1.13",
1095
1098
  "ts-morph": "^27.0.2",
1096
- "web-tree-sitter": "^0.26.7",
1099
+ "web-tree-sitter": "^0.26.8",
1097
1100
  "zod": "^4.3.6"
1098
1101
  },
1099
1102
  "devDependencies": {
1100
1103
  "@eslint/js": "^10.0.1",
1101
1104
  "@types/mocha": "^10.0.10",
1102
- "@types/node": "^25.5.0",
1105
+ "@types/node": "^25.6.0",
1103
1106
  "@types/react": "^19.2.14",
1104
1107
  "@types/react-dom": "^19.2.3",
1105
1108
  "@types/sql.js": "^1.4.11",
1106
1109
  "@types/vscode": "^1.96.0",
1107
- "@vitest/coverage-v8": "^4.1.2",
1108
- "@vitest/ui": "^4.1.2",
1110
+ "@vitest/coverage-v8": "^4.1.4",
1111
+ "@vitest/ui": "^4.1.4",
1109
1112
  "@vscode/test-electron": "^2.5.2",
1110
1113
  "@vscode/vsce": "^3.7.2-7",
1111
- "esbuild": "^0.27.4",
1114
+ "esbuild": "^0.27.7",
1112
1115
  "esbuild-css-modules-plugin": "^3.1.5",
1113
- "eslint": "^10.1.0",
1116
+ "eslint": "^10.2.0",
1114
1117
  "fast-check": "^4.6.0",
1115
1118
  "glob": "^13.0.6",
1116
- "globals": "^17.4.0",
1119
+ "globals": "^17.5.0",
1117
1120
  "mocha": "^11.7.5",
1118
1121
  "typescript": "^6.0.2",
1119
- "typescript-eslint": "^8.58.0",
1120
- "vitest": "^4.1.2"
1122
+ "typescript-eslint": "^8.58.1",
1123
+ "vitest": "^4.1.4"
1121
1124
  },
1122
1125
  "overrides": {
1123
1126
  "picomatch": "^4.0.4",
@@ -1131,6 +1134,10 @@
1131
1134
  "serialize-javascript": ">=7.0.3"
1132
1135
  }
1133
1136
  },
1137
+ "publishConfig": {
1138
+ "access": "public",
1139
+ "registry": "https://registry.npmjs.org"
1140
+ },
1134
1141
  "files": [
1135
1142
  "bin/",
1136
1143
  "dist/graph-it.js",
@@ -1142,9 +1149,5 @@
1142
1149
  "dist/queries/",
1143
1150
  "README.md",
1144
1151
  "LICENSE"
1145
- ],
1146
- "publishConfig": {
1147
- "access": "public",
1148
- "registry": "https://registry.npmjs.org"
1149
- }
1152
+ ]
1150
1153
  }