gitnexus 1.4.9 → 1.5.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.
Files changed (186) hide show
  1. package/README.md +6 -5
  2. package/dist/cli/ai-context.d.ts +4 -1
  3. package/dist/cli/ai-context.js +19 -11
  4. package/dist/cli/analyze.d.ts +6 -0
  5. package/dist/cli/analyze.js +105 -251
  6. package/dist/cli/eval-server.js +20 -11
  7. package/dist/cli/index-repo.js +20 -22
  8. package/dist/cli/index.js +8 -7
  9. package/dist/cli/mcp.js +1 -1
  10. package/dist/cli/serve.js +29 -1
  11. package/dist/cli/setup.js +9 -9
  12. package/dist/cli/skill-gen.js +15 -9
  13. package/dist/cli/wiki.d.ts +2 -0
  14. package/dist/cli/wiki.js +141 -26
  15. package/dist/config/ignore-service.js +102 -22
  16. package/dist/config/supported-languages.d.ts +8 -42
  17. package/dist/config/supported-languages.js +8 -43
  18. package/dist/core/augmentation/engine.js +19 -7
  19. package/dist/core/embeddings/embedder.js +19 -15
  20. package/dist/core/embeddings/embedding-pipeline.js +6 -6
  21. package/dist/core/embeddings/http-client.js +3 -3
  22. package/dist/core/embeddings/text-generator.js +9 -24
  23. package/dist/core/embeddings/types.d.ts +1 -1
  24. package/dist/core/embeddings/types.js +1 -7
  25. package/dist/core/graph/graph.js +6 -2
  26. package/dist/core/graph/types.d.ts +9 -59
  27. package/dist/core/ingestion/ast-cache.js +3 -3
  28. package/dist/core/ingestion/call-processor.d.ts +20 -2
  29. package/dist/core/ingestion/call-processor.js +347 -144
  30. package/dist/core/ingestion/call-routing.js +10 -4
  31. package/dist/core/ingestion/call-sites/extract-language-call-site.d.ts +10 -0
  32. package/dist/core/ingestion/call-sites/extract-language-call-site.js +22 -0
  33. package/dist/core/ingestion/call-sites/java.d.ts +9 -0
  34. package/dist/core/ingestion/call-sites/java.js +30 -0
  35. package/dist/core/ingestion/cluster-enricher.js +6 -8
  36. package/dist/core/ingestion/cobol/cobol-copy-expander.js +10 -3
  37. package/dist/core/ingestion/cobol/cobol-preprocessor.js +287 -81
  38. package/dist/core/ingestion/cobol/jcl-parser.js +1 -1
  39. package/dist/core/ingestion/cobol/jcl-processor.js +1 -1
  40. package/dist/core/ingestion/cobol-processor.js +102 -56
  41. package/dist/core/ingestion/community-processor.js +21 -15
  42. package/dist/core/ingestion/entry-point-scoring.d.ts +1 -1
  43. package/dist/core/ingestion/entry-point-scoring.js +5 -6
  44. package/dist/core/ingestion/export-detection.js +32 -9
  45. package/dist/core/ingestion/field-extractor.d.ts +1 -1
  46. package/dist/core/ingestion/field-extractors/configs/c-cpp.js +8 -12
  47. package/dist/core/ingestion/field-extractors/configs/csharp.js +45 -2
  48. package/dist/core/ingestion/field-extractors/configs/dart.js +5 -3
  49. package/dist/core/ingestion/field-extractors/configs/go.js +3 -7
  50. package/dist/core/ingestion/field-extractors/configs/helpers.d.ts +5 -0
  51. package/dist/core/ingestion/field-extractors/configs/helpers.js +14 -0
  52. package/dist/core/ingestion/field-extractors/configs/jvm.js +7 -7
  53. package/dist/core/ingestion/field-extractors/configs/php.js +9 -11
  54. package/dist/core/ingestion/field-extractors/configs/python.js +1 -1
  55. package/dist/core/ingestion/field-extractors/configs/ruby.js +4 -3
  56. package/dist/core/ingestion/field-extractors/configs/rust.js +2 -5
  57. package/dist/core/ingestion/field-extractors/configs/swift.js +9 -7
  58. package/dist/core/ingestion/field-extractors/configs/typescript-javascript.js +2 -6
  59. package/dist/core/ingestion/field-extractors/generic.d.ts +5 -2
  60. package/dist/core/ingestion/field-extractors/generic.js +6 -0
  61. package/dist/core/ingestion/field-extractors/typescript.d.ts +1 -1
  62. package/dist/core/ingestion/field-extractors/typescript.js +1 -1
  63. package/dist/core/ingestion/field-types.d.ts +4 -2
  64. package/dist/core/ingestion/filesystem-walker.js +3 -3
  65. package/dist/core/ingestion/framework-detection.d.ts +1 -1
  66. package/dist/core/ingestion/framework-detection.js +355 -85
  67. package/dist/core/ingestion/heritage-processor.d.ts +24 -0
  68. package/dist/core/ingestion/heritage-processor.js +99 -8
  69. package/dist/core/ingestion/import-processor.js +44 -15
  70. package/dist/core/ingestion/import-resolvers/csharp.js +7 -3
  71. package/dist/core/ingestion/import-resolvers/dart.js +1 -1
  72. package/dist/core/ingestion/import-resolvers/go.js +4 -2
  73. package/dist/core/ingestion/import-resolvers/jvm.js +4 -4
  74. package/dist/core/ingestion/import-resolvers/php.js +4 -4
  75. package/dist/core/ingestion/import-resolvers/python.js +1 -1
  76. package/dist/core/ingestion/import-resolvers/rust.js +9 -3
  77. package/dist/core/ingestion/import-resolvers/standard.d.ts +1 -1
  78. package/dist/core/ingestion/import-resolvers/standard.js +6 -5
  79. package/dist/core/ingestion/import-resolvers/swift.js +2 -1
  80. package/dist/core/ingestion/import-resolvers/utils.js +26 -7
  81. package/dist/core/ingestion/language-config.js +5 -4
  82. package/dist/core/ingestion/language-provider.d.ts +7 -2
  83. package/dist/core/ingestion/languages/c-cpp.js +106 -21
  84. package/dist/core/ingestion/languages/cobol.js +1 -1
  85. package/dist/core/ingestion/languages/csharp.js +96 -19
  86. package/dist/core/ingestion/languages/dart.js +23 -7
  87. package/dist/core/ingestion/languages/go.js +1 -1
  88. package/dist/core/ingestion/languages/index.d.ts +1 -1
  89. package/dist/core/ingestion/languages/index.js +2 -3
  90. package/dist/core/ingestion/languages/java.js +4 -1
  91. package/dist/core/ingestion/languages/kotlin.js +60 -13
  92. package/dist/core/ingestion/languages/php.js +102 -25
  93. package/dist/core/ingestion/languages/python.js +28 -5
  94. package/dist/core/ingestion/languages/ruby.js +56 -14
  95. package/dist/core/ingestion/languages/rust.js +55 -11
  96. package/dist/core/ingestion/languages/swift.js +112 -27
  97. package/dist/core/ingestion/languages/typescript.js +95 -19
  98. package/dist/core/ingestion/markdown-processor.js +5 -5
  99. package/dist/core/ingestion/method-extractors/configs/csharp.d.ts +2 -0
  100. package/dist/core/ingestion/method-extractors/configs/csharp.js +283 -0
  101. package/dist/core/ingestion/method-extractors/configs/jvm.d.ts +3 -0
  102. package/dist/core/ingestion/method-extractors/configs/jvm.js +326 -0
  103. package/dist/core/ingestion/method-extractors/generic.d.ts +5 -0
  104. package/dist/core/ingestion/method-extractors/generic.js +137 -0
  105. package/dist/core/ingestion/method-types.d.ts +61 -0
  106. package/dist/core/ingestion/method-types.js +2 -0
  107. package/dist/core/ingestion/mro-processor.d.ts +1 -1
  108. package/dist/core/ingestion/mro-processor.js +12 -8
  109. package/dist/core/ingestion/named-binding-processor.js +2 -2
  110. package/dist/core/ingestion/named-bindings/rust.js +3 -1
  111. package/dist/core/ingestion/parsing-processor.js +74 -24
  112. package/dist/core/ingestion/pipeline.d.ts +2 -1
  113. package/dist/core/ingestion/pipeline.js +208 -102
  114. package/dist/core/ingestion/process-processor.js +12 -10
  115. package/dist/core/ingestion/resolution-context.js +3 -3
  116. package/dist/core/ingestion/route-extractors/middleware.js +31 -7
  117. package/dist/core/ingestion/route-extractors/php.js +2 -1
  118. package/dist/core/ingestion/route-extractors/response-shapes.js +8 -4
  119. package/dist/core/ingestion/structure-processor.d.ts +1 -1
  120. package/dist/core/ingestion/structure-processor.js +4 -4
  121. package/dist/core/ingestion/symbol-table.d.ts +1 -1
  122. package/dist/core/ingestion/symbol-table.js +22 -6
  123. package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -1
  124. package/dist/core/ingestion/tree-sitter-queries.js +1 -1
  125. package/dist/core/ingestion/type-env.d.ts +2 -2
  126. package/dist/core/ingestion/type-env.js +75 -50
  127. package/dist/core/ingestion/type-extractors/c-cpp.js +33 -30
  128. package/dist/core/ingestion/type-extractors/csharp.js +24 -14
  129. package/dist/core/ingestion/type-extractors/dart.js +6 -8
  130. package/dist/core/ingestion/type-extractors/go.js +7 -6
  131. package/dist/core/ingestion/type-extractors/jvm.js +10 -21
  132. package/dist/core/ingestion/type-extractors/php.js +26 -13
  133. package/dist/core/ingestion/type-extractors/python.js +11 -15
  134. package/dist/core/ingestion/type-extractors/ruby.js +8 -3
  135. package/dist/core/ingestion/type-extractors/rust.js +6 -8
  136. package/dist/core/ingestion/type-extractors/shared.js +134 -50
  137. package/dist/core/ingestion/type-extractors/swift.js +16 -13
  138. package/dist/core/ingestion/type-extractors/typescript.js +23 -15
  139. package/dist/core/ingestion/utils/ast-helpers.d.ts +8 -8
  140. package/dist/core/ingestion/utils/ast-helpers.js +72 -35
  141. package/dist/core/ingestion/utils/call-analysis.d.ts +2 -0
  142. package/dist/core/ingestion/utils/call-analysis.js +96 -49
  143. package/dist/core/ingestion/utils/event-loop.js +1 -1
  144. package/dist/core/ingestion/workers/parse-worker.d.ts +7 -2
  145. package/dist/core/ingestion/workers/parse-worker.js +364 -84
  146. package/dist/core/ingestion/workers/worker-pool.js +5 -10
  147. package/dist/core/lbug/csv-generator.js +54 -15
  148. package/dist/core/lbug/lbug-adapter.d.ts +5 -0
  149. package/dist/core/lbug/lbug-adapter.js +86 -23
  150. package/dist/core/lbug/schema.d.ts +3 -6
  151. package/dist/core/lbug/schema.js +6 -30
  152. package/dist/core/run-analyze.d.ts +49 -0
  153. package/dist/core/run-analyze.js +257 -0
  154. package/dist/core/tree-sitter/parser-loader.d.ts +1 -1
  155. package/dist/core/tree-sitter/parser-loader.js +1 -1
  156. package/dist/core/wiki/cursor-client.js +2 -7
  157. package/dist/core/wiki/generator.js +38 -23
  158. package/dist/core/wiki/graph-queries.js +10 -10
  159. package/dist/core/wiki/html-viewer.js +7 -3
  160. package/dist/core/wiki/llm-client.d.ts +23 -2
  161. package/dist/core/wiki/llm-client.js +96 -26
  162. package/dist/core/wiki/prompts.js +7 -6
  163. package/dist/mcp/core/embedder.js +1 -1
  164. package/dist/mcp/core/lbug-adapter.d.ts +4 -1
  165. package/dist/mcp/core/lbug-adapter.js +17 -7
  166. package/dist/mcp/local/local-backend.js +247 -95
  167. package/dist/mcp/resources.js +14 -6
  168. package/dist/mcp/server.js +13 -5
  169. package/dist/mcp/staleness.js +5 -1
  170. package/dist/mcp/tools.js +100 -23
  171. package/dist/server/analyze-job.d.ts +53 -0
  172. package/dist/server/analyze-job.js +146 -0
  173. package/dist/server/analyze-worker.d.ts +13 -0
  174. package/dist/server/analyze-worker.js +59 -0
  175. package/dist/server/api.js +795 -44
  176. package/dist/server/git-clone.d.ts +25 -0
  177. package/dist/server/git-clone.js +91 -0
  178. package/dist/storage/git.js +1 -3
  179. package/dist/storage/repo-manager.d.ts +5 -2
  180. package/dist/storage/repo-manager.js +4 -4
  181. package/dist/types/pipeline.d.ts +1 -21
  182. package/dist/types/pipeline.js +1 -18
  183. package/hooks/claude/gitnexus-hook.cjs +52 -22
  184. package/package.json +13 -13
  185. package/dist/core/ingestion/utils/language-detection.d.ts +0 -9
  186. package/dist/core/ingestion/utils/language-detection.js +0 -70
@@ -10,7 +10,7 @@
10
10
  * Processes help agents understand how features work through the codebase.
11
11
  */
12
12
  import { calculateEntryPointScore, isTestFile } from './entry-point-scoring.js';
13
- import { SupportedLanguages } from '../../config/supported-languages.js';
13
+ import { SupportedLanguages } from 'gitnexus-shared';
14
14
  const isDev = process.env.NODE_ENV === 'development';
15
15
  const DEFAULT_CONFIG = {
16
16
  maxTraceDepth: 10,
@@ -31,7 +31,7 @@ export const processProcesses = async (knowledgeGraph, memberships, onProgress,
31
31
  onProgress?.('Finding entry points...', 0);
32
32
  // Build lookup maps
33
33
  const membershipMap = new Map();
34
- memberships.forEach(m => membershipMap.set(m.nodeId, m.communityId));
34
+ memberships.forEach((m) => membershipMap.set(m.nodeId, m.communityId));
35
35
  const callsEdges = buildCallsGraph(knowledgeGraph);
36
36
  const reverseCallsEdges = buildReverseCallsGraph(knowledgeGraph);
37
37
  const nodeMap = new Map();
@@ -47,7 +47,7 @@ export const processProcesses = async (knowledgeGraph, memberships, onProgress,
47
47
  const entryId = entryPoints[i];
48
48
  const traces = traceFromEntryPoint(entryId, callsEdges, cfg);
49
49
  // Filter out traces that are too short
50
- traces.filter(t => t.length >= cfg.minSteps).forEach(t => allTraces.push(t));
50
+ traces.filter((t) => t.length >= cfg.minSteps).forEach((t) => allTraces.push(t));
51
51
  if (i % 10 === 0) {
52
52
  onProgress?.(`Tracing entry point ${i + 1}/${entryPoints.length}...`, 20 + (i / entryPoints.length) * 40);
53
53
  }
@@ -71,7 +71,7 @@ export const processProcesses = async (knowledgeGraph, memberships, onProgress,
71
71
  const terminalId = trace[trace.length - 1];
72
72
  // Get communities touched
73
73
  const communitiesSet = new Set();
74
- trace.forEach(nodeId => {
74
+ trace.forEach((nodeId) => {
75
75
  const comm = membershipMap.get(nodeId);
76
76
  if (comm)
77
77
  communitiesSet.add(comm);
@@ -108,7 +108,7 @@ export const processProcesses = async (knowledgeGraph, memberships, onProgress,
108
108
  });
109
109
  onProgress?.('Process detection complete!', 100);
110
110
  // Calculate stats
111
- const crossCommunityCount = processes.filter(p => p.processType === 'cross_community').length;
111
+ const crossCommunityCount = processes.filter((p) => p.processType === 'cross_community').length;
112
112
  const avgStepCount = processes.length > 0
113
113
  ? processes.reduce((sum, p) => sum + p.stepCount, 0) / processes.length
114
114
  : 0;
@@ -179,8 +179,7 @@ const findEntryPoints = (graph, reverseCallsEdges, callsEdges) => {
179
179
  if (callees.length === 0)
180
180
  continue;
181
181
  // Calculate entry point score using new scoring system
182
- const { score: baseScore, reasons } = calculateEntryPointScore(node.properties.name, node.properties.language ?? SupportedLanguages.JavaScript, node.properties.isExported ?? false, callers.length, callees.length, filePath // Pass filePath for framework detection
183
- );
182
+ const { score: baseScore, reasons } = calculateEntryPointScore(node.properties.name, (node.properties.language ?? SupportedLanguages.JavaScript), node.properties.isExported ?? false, callers.length, callees.length, filePath);
184
183
  let score = baseScore;
185
184
  const astFrameworkMultiplier = node.properties.astFrameworkMultiplier ?? 1.0;
186
185
  if (astFrameworkMultiplier > 1.0) {
@@ -206,7 +205,7 @@ const findEntryPoints = (graph, reverseCallsEdges, callsEdges) => {
206
205
  }
207
206
  return sorted
208
207
  .slice(0, 200) // Limit to prevent explosion
209
- .map(c => c.id);
208
+ .map((c) => c.id);
210
209
  };
211
210
  // ============================================================================
212
211
  // HELPER: Trace from entry point (BFS)
@@ -271,7 +270,7 @@ const deduplicateTraces = (traces) => {
271
270
  for (const trace of sorted) {
272
271
  // Check if this trace is a subset of any already-added trace
273
272
  const traceKey = trace.join('->');
274
- const isSubset = unique.some(existing => {
273
+ const isSubset = unique.some((existing) => {
275
274
  const existingKey = existing.join('->');
276
275
  return existingKey.includes(traceKey);
277
276
  });
@@ -311,5 +310,8 @@ const capitalize = (s) => {
311
310
  return s.charAt(0).toUpperCase() + s.slice(1);
312
311
  };
313
312
  const sanitizeId = (s) => {
314
- return s.replace(/[^a-zA-Z0-9]/g, '_').substring(0, 20).toLowerCase();
313
+ return s
314
+ .replace(/[^a-zA-Z0-9]/g, '_')
315
+ .substring(0, 20)
316
+ .toLowerCase();
315
317
  };
@@ -19,7 +19,7 @@ import { walkBindingChain } from './named-binding-processor.js';
19
19
  export const TIER_CONFIDENCE = {
20
20
  'same-file': 0.95,
21
21
  'import-scoped': 0.9,
22
- 'global': 0.5,
22
+ global: 0.5,
23
23
  };
24
24
  export const createResolutionContext = () => {
25
25
  const symbols = createSymbolTable();
@@ -53,7 +53,7 @@ export const createResolutionContext = () => {
53
53
  // Tier 2a: Import-scoped — definition in a file imported by fromFile
54
54
  const importedFiles = importMap.get(fromFile);
55
55
  if (importedFiles) {
56
- const importedDefs = allDefs.filter(def => importedFiles.has(def.filePath));
56
+ const importedDefs = allDefs.filter((def) => importedFiles.has(def.filePath));
57
57
  if (importedDefs.length > 0) {
58
58
  return { candidates: importedDefs, tier: 'import-scoped' };
59
59
  }
@@ -61,7 +61,7 @@ export const createResolutionContext = () => {
61
61
  // Tier 2b: Package-scoped — definition in a package dir imported by fromFile
62
62
  const importedPackages = packageMap.get(fromFile);
63
63
  if (importedPackages) {
64
- const packageDefs = allDefs.filter(def => {
64
+ const packageDefs = allDefs.filter((def) => {
65
65
  for (const dirSuffix of importedPackages) {
66
66
  if (isFileInPackageDir(def.filePath, dirSuffix))
67
67
  return true;
@@ -7,9 +7,27 @@
7
7
  const COMPOSER_NAMES = new Set(['middleware', 'default', 'chain', 'compose']);
8
8
  /** Keywords that terminate middleware chain walking (not wrapper function names) */
9
9
  export const MIDDLEWARE_STOP_KEYWORDS = new Set([
10
- 'async', 'await', 'function', 'new', 'return', 'if', 'for', 'while', 'switch',
11
- 'class', 'const', 'let', 'var', 'req', 'res', 'request', 'response',
12
- 'event', 'ctx', 'context', 'next',
10
+ 'async',
11
+ 'await',
12
+ 'function',
13
+ 'new',
14
+ 'return',
15
+ 'if',
16
+ 'for',
17
+ 'while',
18
+ 'switch',
19
+ 'class',
20
+ 'const',
21
+ 'let',
22
+ 'var',
23
+ 'req',
24
+ 'res',
25
+ 'request',
26
+ 'response',
27
+ 'event',
28
+ 'ctx',
29
+ 'context',
30
+ 'next',
13
31
  ]);
14
32
  /** Walk nested wrapper calls starting at `pos` in `content`, returning function names. */
15
33
  function walkNestedWrappers(content, pos) {
@@ -90,7 +108,10 @@ export function extractNextjsMiddlewareConfig(content) {
90
108
  const chainRe = /(?:chain|compose)\s*\(\s*\[([^\]]+)\]/;
91
109
  const chainMatch = chainRe.exec(content);
92
110
  if (chainMatch) {
93
- const fns = chainMatch[1].split(',').map(s => s.trim()).filter(Boolean);
111
+ const fns = chainMatch[1]
112
+ .split(',')
113
+ .map((s) => s.trim())
114
+ .filter(Boolean);
94
115
  wrappedFunctions.push(...fns);
95
116
  }
96
117
  // Pattern: export default withA(withB(handler))
@@ -132,9 +153,12 @@ export function compileMatcher(matcher) {
132
153
  /** Test a route URL against a pre-compiled matcher. */
133
154
  export function compiledMatcherMatchesRoute(cm, routeURL) {
134
155
  switch (cm.type) {
135
- case 'prefix': return routeURL === cm.prefix || routeURL.startsWith(cm.prefix + '/');
136
- case 'regex': return cm.re.test(routeURL);
137
- case 'exact': return routeURL === cm.value;
156
+ case 'prefix':
157
+ return routeURL === cm.prefix || routeURL.startsWith(cm.prefix + '/');
158
+ case 'regex':
159
+ return cm.re.test(routeURL);
160
+ case 'exact':
161
+ return routeURL === cm.value;
138
162
  }
139
163
  }
140
164
  export function middlewareMatcherMatchesRoute(matcher, routeURL) {
@@ -12,7 +12,8 @@ export function phpFileToRouteURL(filePath) {
12
12
  const fileName = normalized.split('/').pop().replace('.php', '');
13
13
  // Skip non-handler files — use word-boundary matching to avoid false negatives
14
14
  // on names like "contest", "attestation", "base64_encode"
15
- if (fileName.startsWith('_') || /(?:^|_)(helper|config|test|fixture|mock|setup|bootstrap)(?:_|$)/.test(fileName)) {
15
+ if (fileName.startsWith('_') ||
16
+ /(?:^|_)(helper|config|test|fixture|mock|setup|bootstrap)(?:_|$)/.test(fileName)) {
16
17
  return null;
17
18
  }
18
19
  return '/' + apiMatch[1];
@@ -96,7 +96,11 @@ export function extractResponseShapes(content) {
96
96
  if (strEnd !== -1) {
97
97
  // Scan forward for ':' without allocating a substring
98
98
  let p = strEnd + 1;
99
- while (p < content.length && (content[p] === ' ' || content[p] === '\t' || content[p] === '\n' || content[p] === '\r'))
99
+ while (p < content.length &&
100
+ (content[p] === ' ' ||
101
+ content[p] === '\t' ||
102
+ content[p] === '\n' ||
103
+ content[p] === '\r'))
100
104
  p++;
101
105
  if (content[p] === ':') {
102
106
  callKeys.push(content.slice(strStart, strEnd));
@@ -167,10 +171,10 @@ function detectPHPStatusCode(content, jsonEncodePos) {
167
171
  if (boundaryEnd !== -1) {
168
172
  before = before.slice(boundaryEnd);
169
173
  }
170
- return lastMatchGroup(before, /http_response_code\s*\(\s*(\d{3})\s*\)/g)
171
- ?? lastMatchGroup(before, /header\s*\(\s*['"]HTTP\/[\d.]+\s+(\d{3})/g)
174
+ return (lastMatchGroup(before, /http_response_code\s*\(\s*(\d{3})\s*\)/g) ??
175
+ lastMatchGroup(before, /header\s*\(\s*['"]HTTP\/[\d.]+\s+(\d{3})/g) ??
172
176
  // CGI/FastCGI format
173
- ?? lastMatchGroup(before, /header\s*\(\s*['"]Status:\s*(\d{3})/g);
177
+ lastMatchGroup(before, /header\s*\(\s*['"]Status:\s*(\d{3})/g));
174
178
  }
175
179
  function findMatchingBracket(content, openPos, open, close) {
176
180
  let depth = 0;
@@ -1,2 +1,2 @@
1
- import { KnowledgeGraph } from "../graph/types.js";
1
+ import { KnowledgeGraph } from '../graph/types.js';
2
2
  export declare const processStructure: (graph: KnowledgeGraph, paths: string[]) => void;
@@ -1,6 +1,6 @@
1
- import { generateId } from "../../lib/utils.js";
1
+ import { generateId } from '../../lib/utils.js';
2
2
  export const processStructure = (graph, paths) => {
3
- paths.forEach(path => {
3
+ paths.forEach((path) => {
4
4
  const parts = path.split('/');
5
5
  let currentPath = '';
6
6
  let parentId = '';
@@ -14,8 +14,8 @@ export const processStructure = (graph, paths) => {
14
14
  label: label,
15
15
  properties: {
16
16
  name: part,
17
- filePath: currentPath
18
- }
17
+ filePath: currentPath,
18
+ },
19
19
  };
20
20
  graph.addNode(node);
21
21
  if (parentId) {
@@ -1,4 +1,4 @@
1
- import type { NodeLabel } from '../graph/types.js';
1
+ import type { NodeLabel } from 'gitnexus-shared';
2
2
  export interface SymbolDefinition {
3
3
  nodeId: string;
4
4
  filePath: string;
@@ -19,9 +19,15 @@ export const createSymbolTable = () => {
19
19
  nodeId,
20
20
  filePath,
21
21
  type,
22
- ...(metadata?.parameterCount !== undefined ? { parameterCount: metadata.parameterCount } : {}),
23
- ...(metadata?.requiredParameterCount !== undefined ? { requiredParameterCount: metadata.requiredParameterCount } : {}),
24
- ...(metadata?.parameterTypes !== undefined ? { parameterTypes: metadata.parameterTypes } : {}),
22
+ ...(metadata?.parameterCount !== undefined
23
+ ? { parameterCount: metadata.parameterCount }
24
+ : {}),
25
+ ...(metadata?.requiredParameterCount !== undefined
26
+ ? { requiredParameterCount: metadata.requiredParameterCount }
27
+ : {}),
28
+ ...(metadata?.parameterTypes !== undefined
29
+ ? { parameterTypes: metadata.parameterTypes }
30
+ : {}),
25
31
  ...(metadata?.returnType !== undefined ? { returnType: metadata.returnType } : {}),
26
32
  ...(metadata?.declaredType !== undefined ? { declaredType: metadata.declaredType } : {}),
27
33
  ...(metadata?.ownerId !== undefined ? { ownerId: metadata.ownerId } : {}),
@@ -75,7 +81,7 @@ export const createSymbolTable = () => {
75
81
  // Build the callable index lazily on first use
76
82
  callableIndex = new Map();
77
83
  for (const [symName, defs] of globalIndex) {
78
- const callables = defs.filter(d => CALLABLE_TYPES.has(d.type));
84
+ const callables = defs.filter((d) => CALLABLE_TYPES.has(d.type));
79
85
  if (callables.length > 0)
80
86
  callableIndex.set(symName, callables);
81
87
  }
@@ -87,7 +93,7 @@ export const createSymbolTable = () => {
87
93
  };
88
94
  const getStats = () => ({
89
95
  fileCount: fileIndex.size,
90
- globalSymbolCount: globalIndex.size
96
+ globalSymbolCount: globalIndex.size,
91
97
  });
92
98
  const clear = () => {
93
99
  fileIndex.clear();
@@ -95,5 +101,15 @@ export const createSymbolTable = () => {
95
101
  callableIndex = null;
96
102
  fieldByOwner.clear();
97
103
  };
98
- return { add, lookupExact, lookupExactFull, lookupExactAll, lookupFuzzy, lookupFuzzyCallable, lookupFieldByOwner, getStats, clear };
104
+ return {
105
+ add,
106
+ lookupExact,
107
+ lookupExactFull,
108
+ lookupExactAll,
109
+ lookupFuzzy,
110
+ lookupFuzzyCallable,
111
+ lookupFieldByOwner,
112
+ getStats,
113
+ clear,
114
+ };
99
115
  };
@@ -12,5 +12,5 @@ export declare const RUBY_QUERIES = "\n; \u2500\u2500 Modules \u2500\u2500\u2500
12
12
  export declare const KOTLIN_QUERIES = "\n; \u2500\u2500 Interfaces \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; tree-sitter-kotlin (fwcd) has no interface_declaration node type.\n; Interfaces are class_declaration nodes with an anonymous \"interface\" keyword child.\n(class_declaration\n \"interface\"\n (type_identifier) @name) @definition.interface\n\n; \u2500\u2500 Classes (regular, data, sealed, enum) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; All have the anonymous \"class\" keyword child. enum class has both\n; \"enum\" and \"class\" children \u2014 the \"class\" child still matches.\n(class_declaration\n \"class\"\n (type_identifier) @name) @definition.class\n\n; \u2500\u2500 Object declarations (Kotlin singletons) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(object_declaration\n (type_identifier) @name) @definition.class\n\n; \u2500\u2500 Companion objects (named only) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(companion_object\n (type_identifier) @name) @definition.class\n\n; \u2500\u2500 Functions (top-level, member, extension) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(function_declaration\n (simple_identifier) @name) @definition.function\n\n; \u2500\u2500 Properties \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(property_declaration\n (variable_declaration\n (simple_identifier) @name)) @definition.property\n\n; Primary constructor val/var parameters (data class, value class, regular class)\n; binding_pattern_kind contains \"val\" or \"var\" \u2014 without it, the param is not a property\n(class_parameter\n (binding_pattern_kind)\n (simple_identifier) @name) @definition.property\n\n; \u2500\u2500 Enum entries \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(enum_entry\n (simple_identifier) @name) @definition.enum\n\n; \u2500\u2500 Type aliases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(type_alias\n (type_identifier) @name) @definition.type\n\n; \u2500\u2500 Imports \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_header\n (identifier) @import.source) @import\n\n; \u2500\u2500 Function calls (direct) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(call_expression\n (simple_identifier) @call.name) @call\n\n; \u2500\u2500 Method calls (via navigation: obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(call_expression\n (navigation_expression\n (navigation_suffix\n (simple_identifier) @call.name))) @call\n\n; \u2500\u2500 Constructor invocations \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(constructor_invocation\n (user_type\n (type_identifier) @call.name)) @call\n\n; \u2500\u2500 Infix function calls (e.g., a to b, x until y) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(infix_expression\n (simple_identifier) @call.name) @call\n\n; \u2500\u2500 Heritage: extends / implements via delegation_specifier \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Interface implementation (bare user_type): class Foo : Bar\n(class_declaration\n (type_identifier) @heritage.class\n (delegation_specifier\n (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Class extension (constructor_invocation): class Foo : Bar()\n(class_declaration\n (type_identifier) @heritage.class\n (delegation_specifier\n (constructor_invocation\n (user_type (type_identifier) @heritage.extends)))) @heritage\n\n; Write access: obj.field = value\n(assignment\n (directly_assignable_expression\n (_) @assignment.receiver\n (navigation_suffix\n (simple_identifier) @assignment.property))\n (_)) @assignment\n\n";
13
13
  export declare const SWIFT_QUERIES = "\n; Classes\n(class_declaration \"class\" name: (type_identifier) @name) @definition.class\n\n; Structs\n(class_declaration \"struct\" name: (type_identifier) @name) @definition.struct\n\n; Enums\n(class_declaration \"enum\" name: (type_identifier) @name) @definition.enum\n\n; Extensions (mapped to class \u2014 no dedicated label in schema)\n(class_declaration \"extension\" name: (user_type (type_identifier) @name)) @definition.class\n\n; Actors\n(class_declaration \"actor\" name: (type_identifier) @name) @definition.class\n\n; Protocols (mapped to interface)\n(protocol_declaration name: (type_identifier) @name) @definition.interface\n\n; Type aliases\n(typealias_declaration name: (type_identifier) @name) @definition.type\n\n; Functions (top-level and methods)\n(function_declaration name: (simple_identifier) @name) @definition.function\n\n; Protocol method declarations\n(protocol_function_declaration name: (simple_identifier) @name) @definition.method\n\n; Initializers\n(init_declaration) @definition.constructor\n\n; Properties (stored and computed)\n(property_declaration (pattern (simple_identifier) @name)) @definition.property\n\n; Enum cases\n(enum_entry (simple_identifier) @name) @definition.property\n\n; Imports\n(import_declaration (identifier (simple_identifier) @import.source)) @import\n\n; Calls - direct function calls\n(call_expression (simple_identifier) @call.name) @call\n\n; Calls - member/navigation calls (obj.method())\n(call_expression (navigation_expression (navigation_suffix (simple_identifier) @call.name))) @call\n\n; Heritage - class/struct/enum inheritance and protocol conformance\n(class_declaration name: (type_identifier) @heritage.class\n (inheritance_specifier inherits_from: (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Heritage - protocol inheritance\n(protocol_declaration name: (type_identifier) @heritage.class\n (inheritance_specifier inherits_from: (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Heritage - extension protocol conformance (e.g. extension Foo: SomeProtocol)\n; Extensions wrap the name in user_type unlike class/struct/enum declarations\n(class_declaration \"extension\" name: (user_type (type_identifier) @heritage.class)\n (inheritance_specifier inherits_from: (user_type (type_identifier) @heritage.extends))) @heritage\n\n; Write access: obj.field = value (tree-sitter-swift 0.7.1 uses named fields)\n(assignment\n target: (directly_assignable_expression\n (navigation_expression\n target: (_) @assignment.receiver\n suffix: (navigation_suffix\n suffix: (simple_identifier) @assignment.property)))\n result: (_)) @assignment\n\n";
14
14
  export declare const DART_QUERIES = "\n; \u2500\u2500 Classes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @name) @definition.class\n\n; \u2500\u2500 Mixins \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(mixin_declaration\n (identifier) @name) @definition.trait\n\n; \u2500\u2500 Extensions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(extension_declaration\n name: (identifier) @name) @definition.class\n\n; \u2500\u2500 Enums \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(enum_declaration\n name: (identifier) @name) @definition.enum\n\n; \u2500\u2500 Type aliases \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n; Anchor \"=\" after the name to avoid capturing the RHS type\n(type_alias\n (type_identifier) @name\n \"=\") @definition.type\n\n; \u2500\u2500 Top-level functions (parent is program, not method_signature) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(program\n (function_signature\n name: (identifier) @name) @definition.function)\n\n; \u2500\u2500 Abstract method declarations (function_signature inside class body declaration) \u2500\u2500\n(declaration\n (function_signature\n name: (identifier) @name)) @definition.method\n\n; \u2500\u2500 Methods (inside class/mixin/extension bodies) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (function_signature\n name: (identifier) @name)) @definition.method\n\n; \u2500\u2500 Constructors \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(constructor_signature\n name: (identifier) @name) @definition.constructor\n\n; \u2500\u2500 Factory constructors (anchor before param list to capture variant name, not class) \u2500\u2500\n(method_signature\n (factory_constructor_signature\n (identifier) @name . (formal_parameter_list))) @definition.constructor\n\n; \u2500\u2500 Field declarations (String name = '', Address address = Address()) \u2500\u2500\u2500\u2500\u2500\u2500\n(declaration\n (type_identifier)\n (initialized_identifier_list\n (initialized_identifier\n (identifier) @name))) @definition.property\n\n; \u2500\u2500 Nullable field declarations (String? name) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(declaration\n (nullable_type)\n (initialized_identifier_list\n (initialized_identifier\n (identifier) @name))) @definition.property\n\n; \u2500\u2500 Getters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (getter_signature\n name: (identifier) @name)) @definition.property\n\n; \u2500\u2500 Setters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(method_signature\n (setter_signature\n name: (identifier) @name)) @definition.property\n\n; \u2500\u2500 Imports \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_or_export\n (library_import\n (import_specification\n (configurable_uri) @import.source))) @import\n\n; \u2500\u2500 Calls: direct function/constructor calls (identifier immediately before argument_part) \u2500\u2500\n(expression_statement\n (identifier) @call.name\n .\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: method calls (obj.method()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(expression_statement\n (selector\n (unconditional_assignable_selector\n (identifier) @call.name))) @call\n\n; \u2500\u2500 Calls: in return statements (return User()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(return_statement\n (identifier) @call.name\n (selector (argument_part))) @call\n\n; \u2500\u2500 Calls: in variable assignments (var x = getUser()) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(initialized_variable_definition\n value: (identifier) @call.name\n (selector (argument_part))) @call\n\n; \u2500\u2500 Re-exports (export 'foo.dart') \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(import_or_export\n (library_export\n (configurable_uri) @import.source)) @import\n\n; \u2500\u2500 Write access: obj.field = value \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(assignment_expression\n left: (assignable_expression\n (identifier) @assignment.receiver\n (unconditional_assignable_selector\n (identifier) @assignment.property))\n right: (_)) @assignment\n\n; \u2500\u2500 Write access: this.field = value \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(assignment_expression\n left: (assignable_expression\n (this) @assignment.receiver\n (unconditional_assignable_selector\n (identifier) @assignment.property))\n right: (_)) @assignment\n\n; \u2500\u2500 Heritage: extends \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n superclass: (superclass\n (type_identifier) @heritage.extends)) @heritage\n\n; \u2500\u2500 Heritage: implements \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n interfaces: (interfaces\n (type_identifier) @heritage.implements)) @heritage.impl\n\n; \u2500\u2500 Heritage: with (mixins) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n(class_definition\n name: (identifier) @heritage.class\n superclass: (superclass\n (mixins\n (type_identifier) @heritage.trait))) @heritage\n";
15
- import { SupportedLanguages } from '../../config/supported-languages.js';
15
+ import { SupportedLanguages } from 'gitnexus-shared';
16
16
  export declare const LANGUAGE_QUERIES: Record<SupportedLanguages, string>;
@@ -1131,7 +1131,7 @@ export const DART_QUERIES = `
1131
1131
  (mixins
1132
1132
  (type_identifier) @heritage.trait))) @heritage
1133
1133
  `;
1134
- import { SupportedLanguages } from '../../config/supported-languages.js';
1134
+ import { SupportedLanguages } from 'gitnexus-shared';
1135
1135
  export const LANGUAGE_QUERIES = {
1136
1136
  [SupportedLanguages.TypeScript]: TYPESCRIPT_QUERIES,
1137
1137
  [SupportedLanguages.JavaScript]: JAVASCRIPT_QUERIES,
@@ -1,7 +1,7 @@
1
1
  import { type SyntaxNode } from './utils/ast-helpers.js';
2
- import { SupportedLanguages } from '../../config/supported-languages.js';
2
+ import { SupportedLanguages } from 'gitnexus-shared';
3
3
  import type { SymbolTable } from './symbol-table.js';
4
- import type { NodeLabel } from '../graph/types.js';
4
+ import type { NodeLabel } from 'gitnexus-shared';
5
5
  /**
6
6
  * Per-file type environment with receiver resolution.
7
7
  * Built once per file via `buildTypeEnv`, used for receiver-type filtering,