gitnexus 1.5.1 → 1.5.3

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 (82) hide show
  1. package/dist/cli/wiki.js +15 -44
  2. package/dist/config/supported-languages.d.ts +1 -1
  3. package/dist/config/supported-languages.js +1 -1
  4. package/dist/core/graph/types.d.ts +2 -2
  5. package/dist/core/ingestion/call-processor.js +1 -1
  6. package/dist/core/ingestion/cobol-processor.js +1 -1
  7. package/dist/core/ingestion/entry-point-scoring.d.ts +1 -1
  8. package/dist/core/ingestion/entry-point-scoring.js +1 -1
  9. package/dist/core/ingestion/field-extractor.d.ts +1 -1
  10. package/dist/core/ingestion/field-extractors/configs/c-cpp.js +1 -1
  11. package/dist/core/ingestion/field-extractors/configs/csharp.js +1 -1
  12. package/dist/core/ingestion/field-extractors/configs/dart.js +1 -1
  13. package/dist/core/ingestion/field-extractors/configs/go.js +1 -1
  14. package/dist/core/ingestion/field-extractors/configs/helpers.d.ts +5 -1
  15. package/dist/core/ingestion/field-extractors/configs/helpers.js +13 -3
  16. package/dist/core/ingestion/field-extractors/configs/jvm.js +1 -1
  17. package/dist/core/ingestion/field-extractors/configs/php.js +1 -1
  18. package/dist/core/ingestion/field-extractors/configs/python.js +1 -1
  19. package/dist/core/ingestion/field-extractors/configs/ruby.js +1 -1
  20. package/dist/core/ingestion/field-extractors/configs/rust.js +1 -1
  21. package/dist/core/ingestion/field-extractors/configs/swift.js +1 -1
  22. package/dist/core/ingestion/field-extractors/configs/typescript-javascript.js +1 -1
  23. package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
  24. package/dist/core/ingestion/field-extractors/typescript.d.ts +1 -1
  25. package/dist/core/ingestion/field-extractors/typescript.js +1 -1
  26. package/dist/core/ingestion/field-types.d.ts +1 -1
  27. package/dist/core/ingestion/framework-detection.d.ts +1 -1
  28. package/dist/core/ingestion/framework-detection.js +1 -1
  29. package/dist/core/ingestion/heritage-processor.d.ts +1 -1
  30. package/dist/core/ingestion/heritage-processor.js +1 -1
  31. package/dist/core/ingestion/import-processor.js +1 -1
  32. package/dist/core/ingestion/import-resolvers/csharp.js +1 -1
  33. package/dist/core/ingestion/import-resolvers/dart.js +1 -1
  34. package/dist/core/ingestion/import-resolvers/go.js +1 -1
  35. package/dist/core/ingestion/import-resolvers/jvm.js +1 -1
  36. package/dist/core/ingestion/import-resolvers/python.js +1 -1
  37. package/dist/core/ingestion/import-resolvers/rust.js +1 -1
  38. package/dist/core/ingestion/import-resolvers/standard.d.ts +1 -1
  39. package/dist/core/ingestion/import-resolvers/standard.js +1 -1
  40. package/dist/core/ingestion/language-provider.d.ts +2 -2
  41. package/dist/core/ingestion/languages/c-cpp.js +1 -1
  42. package/dist/core/ingestion/languages/cobol.js +1 -1
  43. package/dist/core/ingestion/languages/csharp.js +1 -1
  44. package/dist/core/ingestion/languages/dart.js +1 -1
  45. package/dist/core/ingestion/languages/go.js +1 -1
  46. package/dist/core/ingestion/languages/index.d.ts +1 -1
  47. package/dist/core/ingestion/languages/index.js +1 -1
  48. package/dist/core/ingestion/languages/java.js +1 -1
  49. package/dist/core/ingestion/languages/kotlin.js +1 -1
  50. package/dist/core/ingestion/languages/php.js +1 -1
  51. package/dist/core/ingestion/languages/python.js +1 -1
  52. package/dist/core/ingestion/languages/ruby.js +1 -1
  53. package/dist/core/ingestion/languages/rust.js +1 -1
  54. package/dist/core/ingestion/languages/swift.js +1 -1
  55. package/dist/core/ingestion/languages/typescript.js +5 -1
  56. package/dist/core/ingestion/method-extractors/configs/csharp.js +1 -1
  57. package/dist/core/ingestion/method-extractors/configs/jvm.js +1 -1
  58. package/dist/core/ingestion/method-extractors/configs/typescript-javascript.d.ts +3 -0
  59. package/dist/core/ingestion/method-extractors/configs/typescript-javascript.js +261 -0
  60. package/dist/core/ingestion/method-types.d.ts +1 -1
  61. package/dist/core/ingestion/mro-processor.d.ts +1 -1
  62. package/dist/core/ingestion/parsing-processor.js +1 -1
  63. package/dist/core/ingestion/pipeline.d.ts +1 -1
  64. package/dist/core/ingestion/pipeline.js +1 -1
  65. package/dist/core/ingestion/process-processor.js +1 -1
  66. package/dist/core/ingestion/symbol-table.d.ts +1 -1
  67. package/dist/core/ingestion/tree-sitter-queries.d.ts +3 -3
  68. package/dist/core/ingestion/tree-sitter-queries.js +17 -1
  69. package/dist/core/ingestion/type-env.d.ts +2 -2
  70. package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -1
  71. package/dist/core/ingestion/utils/ast-helpers.js +7 -0
  72. package/dist/core/ingestion/workers/parse-worker.d.ts +2 -2
  73. package/dist/core/ingestion/workers/parse-worker.js +2 -2
  74. package/dist/core/lbug/schema.d.ts +2 -2
  75. package/dist/core/lbug/schema.js +1 -1
  76. package/dist/core/tree-sitter/parser-loader.d.ts +1 -1
  77. package/dist/core/tree-sitter/parser-loader.js +1 -1
  78. package/dist/core/wiki/html-viewer.js +6 -4
  79. package/dist/core/wiki/llm-client.js +4 -6
  80. package/dist/server/api.js +1 -1
  81. package/package.json +3 -3
  82. package/scripts/build.js +4 -0
@@ -9,7 +9,7 @@
9
9
  * - mroStrategy: 'c3' (Python C3 linearization for multiple inheritance)
10
10
  * - namedBindingExtractor: present (from X import Y)
11
11
  */
12
- import { SupportedLanguages } from 'gitnexus-shared';
12
+ import { SupportedLanguages } from '../../../_shared/index.js';
13
13
  import { defineLanguage } from '../language-provider.js';
14
14
  import { typeConfig as pythonConfig } from '../type-extractors/python.js';
15
15
  import { pythonExportChecker } from '../export-detection.js';
@@ -6,7 +6,7 @@
6
6
  * to handle require, include/extend (heritage), and attr_accessor/
7
7
  * attr_reader/attr_writer (property definitions) as call expressions.
8
8
  */
9
- import { SupportedLanguages } from 'gitnexus-shared';
9
+ import { SupportedLanguages } from '../../../_shared/index.js';
10
10
  import { defineLanguage } from '../language-provider.js';
11
11
  import { typeConfig as rubyConfig } from '../type-extractors/ruby.js';
12
12
  import { routeRubyCall } from '../call-routing.js';
@@ -9,7 +9,7 @@
9
9
  * - mroStrategy: 'qualified-syntax' (Rust uses trait qualification, not MRO)
10
10
  * - namedBindingExtractor: present (use X::{a, b} extracts named bindings)
11
11
  */
12
- import { SupportedLanguages } from 'gitnexus-shared';
12
+ import { SupportedLanguages } from '../../../_shared/index.js';
13
13
  import { defineLanguage } from '../language-provider.js';
14
14
  import { typeConfig as rustConfig } from '../type-extractors/rust.js';
15
15
  import { rustExportChecker } from '../export-detection.js';
@@ -9,7 +9,7 @@
9
9
  * - heritageDefaultEdge: 'IMPLEMENTS' (protocols are more common than class inheritance)
10
10
  * - implicitImportWirer: all files in the same SPM target see each other
11
11
  */
12
- import { SupportedLanguages } from 'gitnexus-shared';
12
+ import { SupportedLanguages } from '../../../_shared/index.js';
13
13
  import { defineLanguage } from '../language-provider.js';
14
14
  import { typeConfig as swiftConfig } from '../type-extractors/swift.js';
15
15
  import { swiftExportChecker } from '../export-detection.js';
@@ -6,7 +6,7 @@
6
6
  * (extractTsNamedBindings). They differ in file extensions, tree-sitter
7
7
  * queries (TypeScript grammar has interface/type nodes), and language ID.
8
8
  */
9
- import { SupportedLanguages } from 'gitnexus-shared';
9
+ import { SupportedLanguages } from '../../../_shared/index.js';
10
10
  import { defineLanguage } from '../language-provider.js';
11
11
  import { typeConfig as typescriptConfig } from '../type-extractors/typescript.js';
12
12
  import { tsExportChecker } from '../export-detection.js';
@@ -16,6 +16,8 @@ import { TYPESCRIPT_QUERIES, JAVASCRIPT_QUERIES } from '../tree-sitter-queries.j
16
16
  import { typescriptFieldExtractor } from '../field-extractors/typescript.js';
17
17
  import { createFieldExtractor } from '../field-extractors/generic.js';
18
18
  import { javascriptConfig } from '../field-extractors/configs/typescript-javascript.js';
19
+ import { createMethodExtractor } from '../method-extractors/generic.js';
20
+ import { typescriptMethodConfig, javascriptMethodConfig, } from '../method-extractors/configs/typescript-javascript.js';
19
21
  const BUILT_INS = new Set([
20
22
  'console',
21
23
  'log',
@@ -121,6 +123,7 @@ export const typescriptProvider = defineLanguage({
121
123
  importResolver: resolveTypescriptImport,
122
124
  namedBindingExtractor: extractTsNamedBindings,
123
125
  fieldExtractor: typescriptFieldExtractor,
126
+ methodExtractor: createMethodExtractor(typescriptMethodConfig),
124
127
  builtInNames: BUILT_INS,
125
128
  });
126
129
  export const javascriptProvider = defineLanguage({
@@ -132,5 +135,6 @@ export const javascriptProvider = defineLanguage({
132
135
  importResolver: resolveJavascriptImport,
133
136
  namedBindingExtractor: extractTsNamedBindings,
134
137
  fieldExtractor: createFieldExtractor(javascriptConfig),
138
+ methodExtractor: createMethodExtractor(javascriptMethodConfig),
135
139
  builtInNames: BUILT_INS,
136
140
  });
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/method-extractors/configs/csharp.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { findVisibility, hasModifier, hasKeyword, collectModifierTexts, } from '../../field-extractors/configs/helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  // ---------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
1
  // gitnexus/src/core/ingestion/method-extractors/configs/jvm.ts
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../../../_shared/index.js';
3
3
  import { findVisibility, hasModifier } from '../../field-extractors/configs/helpers.js';
4
4
  import { extractSimpleTypeName } from '../../type-extractors/shared.js';
5
5
  // ---------------------------------------------------------------------------
@@ -0,0 +1,3 @@
1
+ import type { MethodExtractionConfig } from '../../method-types.js';
2
+ export declare const typescriptMethodConfig: MethodExtractionConfig;
3
+ export declare const javascriptMethodConfig: MethodExtractionConfig;
@@ -0,0 +1,261 @@
1
+ // gitnexus/src/core/ingestion/method-extractors/configs/typescript-javascript.ts
2
+ // Verified against tree-sitter-typescript ^0.23.2, tree-sitter-javascript ^0.23.0
3
+ import { SupportedLanguages } from '../../../../_shared/index.js';
4
+ import { hasKeyword } from '../../field-extractors/configs/helpers.js';
5
+ import { extractSimpleTypeName } from '../../type-extractors/shared.js';
6
+ // ---------------------------------------------------------------------------
7
+ // TS/JS helpers
8
+ // ---------------------------------------------------------------------------
9
+ const VISIBILITY_KEYWORDS = new Set(['public', 'private', 'protected']);
10
+ /**
11
+ * Extract parameters from formal_parameters.
12
+ *
13
+ * Handles both TS node types (required_parameter, optional_parameter, rest_parameter)
14
+ * and JS node types (identifier, assignment_pattern, rest_pattern), plus destructured
15
+ * parameters (object_pattern, array_pattern) in both grammars.
16
+ */
17
+ function extractTsJsParameters(node) {
18
+ const paramList = node.childForFieldName('parameters');
19
+ if (!paramList)
20
+ return [];
21
+ const params = [];
22
+ for (let i = 0; i < paramList.namedChildCount; i++) {
23
+ const param = paramList.namedChild(i);
24
+ if (!param)
25
+ continue;
26
+ switch (param.type) {
27
+ case 'required_parameter': {
28
+ const patternNode = param.childForFieldName('pattern');
29
+ if (!patternNode)
30
+ break;
31
+ // Skip TS `this` parameter — it's a compile-time type constraint, not a real param
32
+ if (patternNode.type === 'this')
33
+ break;
34
+ // Rest parameter: pattern is a rest_pattern (...args) — extract inner identifier
35
+ const isRest = patternNode.type === 'rest_pattern';
36
+ const nameNode = isRest ? patternNode.firstNamedChild : patternNode;
37
+ if (!nameNode)
38
+ break;
39
+ // type field is a type_annotation — unwrap to get the inner type node
40
+ const typeAnnotation = param.childForFieldName('type');
41
+ const typeNode = typeAnnotation?.firstNamedChild;
42
+ // Default value: presence of a 'value' field means isOptional
43
+ const hasDefault = !!param.childForFieldName('value');
44
+ params.push({
45
+ name: nameNode.text,
46
+ type: typeNode
47
+ ? (extractSimpleTypeName(typeNode) ?? typeNode.text?.trim() ?? null)
48
+ : null,
49
+ isOptional: hasDefault,
50
+ isVariadic: isRest,
51
+ });
52
+ break;
53
+ }
54
+ case 'optional_parameter': {
55
+ const nameNode = param.childForFieldName('pattern');
56
+ if (!nameNode)
57
+ break;
58
+ const typeAnnotation = param.childForFieldName('type');
59
+ const typeNode = typeAnnotation?.firstNamedChild;
60
+ params.push({
61
+ name: nameNode.text,
62
+ type: typeNode
63
+ ? (extractSimpleTypeName(typeNode) ?? typeNode.text?.trim() ?? null)
64
+ : null,
65
+ isOptional: true,
66
+ isVariadic: false,
67
+ });
68
+ break;
69
+ }
70
+ case 'rest_parameter': {
71
+ const nameNode = param.childForFieldName('pattern');
72
+ if (!nameNode)
73
+ break;
74
+ const typeAnnotation = param.childForFieldName('type');
75
+ const typeNode = typeAnnotation?.firstNamedChild;
76
+ params.push({
77
+ name: nameNode.text,
78
+ type: typeNode
79
+ ? (extractSimpleTypeName(typeNode) ?? typeNode.text?.trim() ?? null)
80
+ : null,
81
+ isOptional: false,
82
+ isVariadic: true,
83
+ });
84
+ break;
85
+ }
86
+ case 'identifier': {
87
+ // JS: bare parameter name, no type info
88
+ params.push({ name: param.text, type: null, isOptional: false, isVariadic: false });
89
+ break;
90
+ }
91
+ case 'assignment_pattern': {
92
+ // JS: param = defaultValue — the left side is the name, isOptional = true
93
+ const left = param.childForFieldName('left');
94
+ if (left) {
95
+ params.push({ name: left.text, type: null, isOptional: true, isVariadic: false });
96
+ }
97
+ break;
98
+ }
99
+ case 'rest_pattern': {
100
+ // JS: ...args
101
+ const inner = param.firstNamedChild;
102
+ if (inner) {
103
+ params.push({ name: inner.text, type: null, isOptional: false, isVariadic: true });
104
+ }
105
+ break;
106
+ }
107
+ case 'object_pattern':
108
+ case 'array_pattern': {
109
+ // Destructured parameter — use full text as name
110
+ params.push({ name: param.text, type: null, isOptional: false, isVariadic: false });
111
+ break;
112
+ }
113
+ }
114
+ }
115
+ return params;
116
+ }
117
+ /**
118
+ * Extract return type from return_type field, unwrapping type_annotation.
119
+ *
120
+ * tree-sitter-typescript uses `return_type` as the field name (not `type` like JVM).
121
+ * The return_type field points to a type_annotation node that must be unwrapped.
122
+ */
123
+ function extractTsJsReturnType(node) {
124
+ const returnType = node.childForFieldName('return_type');
125
+ if (returnType) {
126
+ if (returnType.type === 'type_annotation') {
127
+ const inner = returnType.firstNamedChild;
128
+ if (inner)
129
+ return extractSimpleTypeName(inner) ?? inner.text?.trim();
130
+ }
131
+ return extractSimpleTypeName(returnType) ?? returnType.text?.trim();
132
+ }
133
+ return undefined;
134
+ }
135
+ /**
136
+ * Extract visibility from accessibility_modifier or #private name.
137
+ *
138
+ * tree-sitter-typescript emits accessibility_modifier as a named child of method nodes
139
+ * (not as a modifiers wrapper like JVM). Pass 1 scans for that child; pass 2 checks for
140
+ * ES2022 private_property_identifier (#name). Default: public.
141
+ */
142
+ function extractTsJsVisibility(node) {
143
+ // Pass 1: check for accessibility_modifier named child (TS-specific)
144
+ for (let i = 0; i < node.namedChildCount; i++) {
145
+ const child = node.namedChild(i);
146
+ if (child && child.type === 'accessibility_modifier') {
147
+ const t = child.text.trim();
148
+ if (VISIBILITY_KEYWORDS.has(t))
149
+ return t;
150
+ }
151
+ }
152
+ // Pass 2: ES2022 private methods (#name) are inherently private
153
+ const nameNode = node.childForFieldName('name');
154
+ if (nameNode && nameNode.type === 'private_property_identifier')
155
+ return 'private';
156
+ // No accessibility_modifier found — default to public.
157
+ // Note: tree-sitter-typescript does not wrap modifiers in a 'modifiers' node
158
+ // (unlike JVM), so there is no wrapper to scan.
159
+ return 'public';
160
+ }
161
+ /**
162
+ * Extract decorator names, prefixed with '@'.
163
+ *
164
+ * In tree-sitter-typescript, decorators are **siblings** of the method_definition in the
165
+ * class_body — they are NOT children of the method node. We find them by walking backwards
166
+ * from the method node through its preceding siblings in the parent body.
167
+ */
168
+ function extractTsJsDecorators(node) {
169
+ const decorators = [];
170
+ // Walk backwards via previousNamedSibling to collect consecutive decorator siblings.
171
+ // This avoids the O(N) index-finding scan through the parent's children.
172
+ let sibling = node.previousNamedSibling;
173
+ while (sibling && sibling.type === 'decorator') {
174
+ const name = extractDecoratorName(sibling);
175
+ if (name)
176
+ decorators.unshift(name);
177
+ sibling = sibling.previousNamedSibling;
178
+ }
179
+ return decorators;
180
+ }
181
+ function extractDecoratorName(decorator) {
182
+ const expr = decorator.firstNamedChild;
183
+ if (!expr)
184
+ return undefined;
185
+ if (expr.type === 'call_expression') {
186
+ const fn = expr.childForFieldName('function');
187
+ return fn ? '@' + fn.text : undefined;
188
+ }
189
+ if (expr.type === 'identifier')
190
+ return '@' + expr.text;
191
+ if (expr.type === 'member_expression')
192
+ return '@' + expr.text;
193
+ return undefined;
194
+ }
195
+ // ---------------------------------------------------------------------------
196
+ // Config
197
+ // ---------------------------------------------------------------------------
198
+ // TS and JS share the same config base. TS-only node types (abstract_class_declaration,
199
+ // interface_declaration, abstract_method_signature, method_signature, interface_body) are
200
+ // included because the JS grammar never produces these nodes — they are harmless no-ops.
201
+ // This mirrors the field extractor's typescript-javascript.ts shared pattern.
202
+ //
203
+ // Note: TS and JS share a method config but NOT a field extractor because the TS field
204
+ // extractor needs a hand-written class for type_alias_declaration object literals and
205
+ // nested type discovery. Methods have no such requirement.
206
+ const shared = {
207
+ typeDeclarationNodes: [
208
+ 'class_declaration',
209
+ 'abstract_class_declaration',
210
+ 'interface_declaration',
211
+ ],
212
+ // Note: TS constructors are method_definition nodes (name = 'constructor'), so no
213
+ // explicit constructor_declaration entry is needed (unlike JVM/C# configs).
214
+ // Known gaps:
215
+ // - call_signature and construct_signature (e.g., interface Fn { (x: string): void; })
216
+ // are not extracted — they have no name field and are uncommon in practice.
217
+ // - class_expression (const Foo = class { ... }) — methods inside class expressions
218
+ // are not discovered because class_expression is not in typeDeclarationNodes.
219
+ // - declare module / declare global augmentations — methods inside ambient_module_declaration
220
+ // wrappers are not surfaced because the top-level walker doesn't descend into them.
221
+ methodNodeTypes: ['method_definition', 'method_signature', 'abstract_method_signature'],
222
+ bodyNodeTypes: ['class_body', 'interface_body'],
223
+ extractName(node) {
224
+ const nameNode = node.childForFieldName('name');
225
+ return nameNode?.text;
226
+ },
227
+ extractReturnType: extractTsJsReturnType,
228
+ extractParameters: extractTsJsParameters,
229
+ extractVisibility: extractTsJsVisibility,
230
+ isStatic(node) {
231
+ return hasKeyword(node, 'static');
232
+ },
233
+ isAbstract(node, ownerNode) {
234
+ // Explicit abstract keyword on the method itself
235
+ if (hasKeyword(node, 'abstract'))
236
+ return true;
237
+ // Interface methods are implicitly abstract — TS interfaces never have method bodies
238
+ // (unlike Java default methods), so no !body check needed
239
+ if (ownerNode.type === 'interface_declaration')
240
+ return true;
241
+ return false;
242
+ },
243
+ isFinal(_node) {
244
+ return false; // TS/JS has no final/sealed methods
245
+ },
246
+ extractAnnotations: extractTsJsDecorators,
247
+ isAsync(node) {
248
+ return hasKeyword(node, 'async');
249
+ },
250
+ isOverride(node) {
251
+ return hasKeyword(node, 'override');
252
+ },
253
+ };
254
+ export const typescriptMethodConfig = {
255
+ ...shared,
256
+ language: SupportedLanguages.TypeScript,
257
+ };
258
+ export const javascriptMethodConfig = {
259
+ ...shared,
260
+ language: SupportedLanguages.JavaScript,
261
+ };
@@ -1,4 +1,4 @@
1
- import type { SupportedLanguages } from 'gitnexus-shared';
1
+ import type { SupportedLanguages } from '../../_shared/index.js';
2
2
  import type { FieldVisibility } from './field-types.js';
3
3
  import type { SyntaxNode } from './utils/ast-helpers.js';
4
4
  export type MethodVisibility = FieldVisibility;
@@ -19,7 +19,7 @@
19
19
  * Cypher: MATCH (c:Class)-[r:CodeRelation {type: 'OVERRIDES'}]->(m:Method)
20
20
  */
21
21
  import { KnowledgeGraph } from '../graph/types.js';
22
- import { SupportedLanguages } from 'gitnexus-shared';
22
+ import { SupportedLanguages } from '../../_shared/index.js';
23
23
  export interface MROEntry {
24
24
  classId: string;
25
25
  className: string;
@@ -2,7 +2,7 @@ import Parser from 'tree-sitter';
2
2
  import { loadParser, loadLanguage, isLanguageAvailable } from '../tree-sitter/parser-loader.js';
3
3
  import { getProvider } from './languages/index.js';
4
4
  import { generateId } from '../../lib/utils.js';
5
- import { getLanguageFromFilename } from 'gitnexus-shared';
5
+ import { getLanguageFromFilename } from '../../_shared/index.js';
6
6
  import { yieldToEventLoop } from './utils/event-loop.js';
7
7
  import { getDefinitionNodeFromCaptures, findEnclosingClassId, extractMethodSignature, getLabelFromCaptures, CLASS_CONTAINER_TYPES, } from './utils/ast-helpers.js';
8
8
  import { detectFrameworkFromAST } from './framework-detection.js';
@@ -1,4 +1,4 @@
1
- import { type PipelineProgress } from 'gitnexus-shared';
1
+ import { type PipelineProgress } from '../../_shared/index.js';
2
2
  import { PipelineResult } from '../../types/pipeline.js';
3
3
  /** A group of files with no mutual dependencies, safe to process in parallel. */
4
4
  type IndependentFileGroup = readonly string[];
@@ -18,7 +18,7 @@ import { processCommunities } from './community-processor.js';
18
18
  import { processProcesses } from './process-processor.js';
19
19
  import { createResolutionContext } from './resolution-context.js';
20
20
  import { createASTCache } from './ast-cache.js';
21
- import { getLanguageFromFilename } from 'gitnexus-shared';
21
+ import { getLanguageFromFilename } from '../../_shared/index.js';
22
22
  import { walkRepositoryPaths, readFileContents } from './filesystem-walker.js';
23
23
  import { isLanguageAvailable } from '../tree-sitter/parser-loader.js';
24
24
  import { providers, getProviderForFile } from './languages/index.js';
@@ -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 'gitnexus-shared';
13
+ import { SupportedLanguages } from '../../_shared/index.js';
14
14
  const isDev = process.env.NODE_ENV === 'development';
15
15
  const DEFAULT_CONFIG = {
16
16
  maxTraceDepth: 10,
@@ -1,4 +1,4 @@
1
- import type { NodeLabel } from 'gitnexus-shared';
1
+ import type { NodeLabel } from '../../_shared/index.js';
2
2
  export interface SymbolDefinition {
3
3
  nodeId: string;
4
4
  filePath: string;
@@ -1,5 +1,5 @@
1
- export declare const TYPESCRIPT_QUERIES = "\n(class_declaration\n name: (type_identifier) @name) @definition.class\n\n(interface_declaration\n name: (type_identifier) @name) @definition.interface\n\n(function_declaration\n name: (identifier) @name) @definition.function\n\n; TypeScript overload signatures (function_signature is a separate node type from function_declaration)\n(function_signature\n name: (identifier) @name) @definition.function\n\n(method_definition\n name: (property_identifier) @name) @definition.method\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function))) @definition.function\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function)))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression)))) @definition.function\n\n(import_statement\n source: (string) @import.source) @import\n\n; Re-export statements: export { X } from './y'\n(export_statement\n source: (string) @import.source) @import\n\n(call_expression\n function: (identifier) @call.name) @call\n\n(call_expression\n function: (member_expression\n property: (property_identifier) @call.name)) @call\n\n; Constructor calls: new Foo()\n(new_expression\n constructor: (identifier) @call.name) @call\n\n; Class properties \u2014 public_field_definition covers most TS class fields\n(public_field_definition\n name: (property_identifier) @name) @definition.property\n\n; Private class fields: #address: Address\n(public_field_definition\n name: (private_property_identifier) @name) @definition.property\n\n; Constructor parameter properties: constructor(public address: Address)\n(required_parameter\n (accessibility_modifier)\n pattern: (identifier) @name) @definition.property\n\n; Heritage queries - class extends\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (extends_clause\n value: (identifier) @heritage.extends))) @heritage\n\n; Heritage queries - class implements interface\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (implements_clause\n (type_identifier) @heritage.implements))) @heritage.impl\n\n; Write access: obj.field = value\n(assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; HTTP consumers: fetch('/path'), axios.get('/path'), $.get('/path'), etc.\n; fetch() \u2014 global function\n(call_expression\n function: (identifier) @_fetch_fn (#eq? @_fetch_fn \"fetch\")\n arguments: (arguments\n [(string (string_fragment) @route.url)\n (template_string) @route.template_url])) @route.fetch\n\n; axios.get/post/put/delete/patch('/path'), $.get/post/ajax({url:'/path'})\n(call_expression\n function: (member_expression\n property: (property_identifier) @http_client.method)\n arguments: (arguments\n (string (string_fragment) @http_client.url))) @http_client\n\n; Decorators: @Controller, @Get, @Post, etc.\n(decorator\n (call_expression\n function: (identifier) @decorator.name\n arguments: (arguments (string (string_fragment) @decorator.arg)?))) @decorator\n\n; Express/Hono route registration: app.get('/path', handler), router.post('/path', fn)\n(call_expression\n function: (member_expression\n property: (property_identifier) @express_route.method)\n arguments: (arguments\n (string (string_fragment) @express_route.path))) @express_route\n";
2
- export declare const JAVASCRIPT_QUERIES = "\n(class_declaration\n name: (identifier) @name) @definition.class\n\n(function_declaration\n name: (identifier) @name) @definition.function\n\n(method_definition\n name: (property_identifier) @name) @definition.method\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function))) @definition.function\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function)))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression)))) @definition.function\n\n(import_statement\n source: (string) @import.source) @import\n\n; Re-export statements: export { X } from './y'\n(export_statement\n source: (string) @import.source) @import\n\n(call_expression\n function: (identifier) @call.name) @call\n\n(call_expression\n function: (member_expression\n property: (property_identifier) @call.name)) @call\n\n; Constructor calls: new Foo()\n(new_expression\n constructor: (identifier) @call.name) @call\n\n; Class fields \u2014 field_definition captures JS class fields (class User { address = ... })\n(field_definition\n property: (property_identifier) @name) @definition.property\n\n; Heritage queries - class extends (JavaScript uses different AST than TypeScript)\n; In tree-sitter-javascript, class_heritage directly contains the parent identifier\n(class_declaration\n name: (identifier) @heritage.class\n (class_heritage\n (identifier) @heritage.extends)) @heritage\n\n; Write access: obj.field = value\n(assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; HTTP consumers: fetch('/path'), axios.get('/path'), $.get('/path'), etc.\n(call_expression\n function: (identifier) @_fetch_fn (#eq? @_fetch_fn \"fetch\")\n arguments: (arguments\n [(string (string_fragment) @route.url)\n (template_string) @route.template_url])) @route.fetch\n\n; axios.get/post, $.get/post/ajax\n(call_expression\n function: (member_expression\n property: (property_identifier) @http_client.method)\n arguments: (arguments\n (string (string_fragment) @http_client.url))) @http_client\n\n; Express/Hono route registration\n(call_expression\n function: (member_expression\n property: (property_identifier) @express_route.method)\n arguments: (arguments\n (string (string_fragment) @express_route.path))) @express_route\n";
1
+ export declare const TYPESCRIPT_QUERIES = "\n(class_declaration\n name: (type_identifier) @name) @definition.class\n\n(interface_declaration\n name: (type_identifier) @name) @definition.interface\n\n(function_declaration\n name: (identifier) @name) @definition.function\n\n; TypeScript overload signatures (function_signature is a separate node type from function_declaration)\n(function_signature\n name: (identifier) @name) @definition.function\n\n(method_definition\n name: (property_identifier) @name) @definition.method\n\n; ES2022 #private methods (private_property_identifier not matched by property_identifier)\n(method_definition\n name: (private_property_identifier) @name) @definition.method\n\n; Abstract method signatures in abstract classes\n(abstract_method_signature\n name: (property_identifier) @name) @definition.method\n\n; Interface method signatures\n(method_signature\n name: (property_identifier) @name) @definition.method\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function))) @definition.function\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function)))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression)))) @definition.function\n\n(import_statement\n source: (string) @import.source) @import\n\n; Re-export statements: export { X } from './y'\n(export_statement\n source: (string) @import.source) @import\n\n(call_expression\n function: (identifier) @call.name) @call\n\n(call_expression\n function: (member_expression\n property: (property_identifier) @call.name)) @call\n\n; Constructor calls: new Foo()\n(new_expression\n constructor: (identifier) @call.name) @call\n\n; Class properties \u2014 public_field_definition covers most TS class fields\n(public_field_definition\n name: (property_identifier) @name) @definition.property\n\n; Private class fields: #address: Address\n(public_field_definition\n name: (private_property_identifier) @name) @definition.property\n\n; Constructor parameter properties: constructor(public address: Address)\n(required_parameter\n (accessibility_modifier)\n pattern: (identifier) @name) @definition.property\n\n; Heritage queries - class extends\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (extends_clause\n value: (identifier) @heritage.extends))) @heritage\n\n; Heritage queries - class implements interface\n(class_declaration\n name: (type_identifier) @heritage.class\n (class_heritage\n (implements_clause\n (type_identifier) @heritage.implements))) @heritage.impl\n\n; Write access: obj.field = value\n(assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; HTTP consumers: fetch('/path'), axios.get('/path'), $.get('/path'), etc.\n; fetch() \u2014 global function\n(call_expression\n function: (identifier) @_fetch_fn (#eq? @_fetch_fn \"fetch\")\n arguments: (arguments\n [(string (string_fragment) @route.url)\n (template_string) @route.template_url])) @route.fetch\n\n; axios.get/post/put/delete/patch('/path'), $.get/post/ajax({url:'/path'})\n(call_expression\n function: (member_expression\n property: (property_identifier) @http_client.method)\n arguments: (arguments\n (string (string_fragment) @http_client.url))) @http_client\n\n; Decorators: @Controller, @Get, @Post, etc.\n(decorator\n (call_expression\n function: (identifier) @decorator.name\n arguments: (arguments (string (string_fragment) @decorator.arg)?))) @decorator\n\n; Express/Hono route registration: app.get('/path', handler), router.post('/path', fn)\n(call_expression\n function: (member_expression\n property: (property_identifier) @express_route.method)\n arguments: (arguments\n (string (string_fragment) @express_route.path))) @express_route\n";
2
+ export declare const JAVASCRIPT_QUERIES = "\n(class_declaration\n name: (identifier) @name) @definition.class\n\n(function_declaration\n name: (identifier) @name) @definition.function\n\n(method_definition\n name: (property_identifier) @name) @definition.method\n\n; ES2022 #private methods\n(method_definition\n name: (private_property_identifier) @name) @definition.method\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function))) @definition.function\n\n(lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (arrow_function)))) @definition.function\n\n(export_statement\n declaration: (lexical_declaration\n (variable_declarator\n name: (identifier) @name\n value: (function_expression)))) @definition.function\n\n(import_statement\n source: (string) @import.source) @import\n\n; Re-export statements: export { X } from './y'\n(export_statement\n source: (string) @import.source) @import\n\n(call_expression\n function: (identifier) @call.name) @call\n\n(call_expression\n function: (member_expression\n property: (property_identifier) @call.name)) @call\n\n; Constructor calls: new Foo()\n(new_expression\n constructor: (identifier) @call.name) @call\n\n; Class fields \u2014 field_definition captures JS class fields (class User { address = ... })\n(field_definition\n property: (property_identifier) @name) @definition.property\n\n; Heritage queries - class extends (JavaScript uses different AST than TypeScript)\n; In tree-sitter-javascript, class_heritage directly contains the parent identifier\n(class_declaration\n name: (identifier) @heritage.class\n (class_heritage\n (identifier) @heritage.extends)) @heritage\n\n; Write access: obj.field = value\n(assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment_expression\n left: (member_expression\n object: (_) @assignment.receiver\n property: (property_identifier) @assignment.property)\n right: (_)) @assignment\n\n; HTTP consumers: fetch('/path'), axios.get('/path'), $.get('/path'), etc.\n(call_expression\n function: (identifier) @_fetch_fn (#eq? @_fetch_fn \"fetch\")\n arguments: (arguments\n [(string (string_fragment) @route.url)\n (template_string) @route.template_url])) @route.fetch\n\n; axios.get/post, $.get/post/ajax\n(call_expression\n function: (member_expression\n property: (property_identifier) @http_client.method)\n arguments: (arguments\n (string (string_fragment) @http_client.url))) @http_client\n\n; Express/Hono route registration\n(call_expression\n function: (member_expression\n property: (property_identifier) @express_route.method)\n arguments: (arguments\n (string (string_fragment) @express_route.path))) @express_route\n";
3
3
  export declare const PYTHON_QUERIES = "\n(class_definition\n name: (identifier) @name) @definition.class\n\n(function_definition\n name: (identifier) @name) @definition.function\n\n(import_statement\n name: (dotted_name) @import.source) @import\n\n; import numpy as np \u2192 aliased_import captures the module name so the\n; import path is resolved and named-binding extraction stores \"np\" \u2192 \"numpy\".\n(import_statement\n name: (aliased_import\n name: (dotted_name) @import.source)) @import\n\n(import_from_statement\n module_name: (dotted_name) @import.source) @import\n\n(import_from_statement\n module_name: (relative_import) @import.source) @import\n\n(call\n function: (identifier) @call.name) @call\n\n(call\n function: (attribute\n attribute: (identifier) @call.name)) @call\n\n; Class attribute type annotations \u2014 PEP 526: address: Address or address: Address = Address()\n; Both bare annotations (address: Address) and annotated assignments (name: str = \"test\")\n; are parsed as (assignment left: ... type: ...) in tree-sitter-python.\n(expression_statement\n (assignment\n left: (identifier) @name\n type: (type)) @definition.property)\n\n; Heritage queries - Python class inheritance\n(class_definition\n name: (identifier) @heritage.class\n superclasses: (argument_list\n (identifier) @heritage.extends)) @heritage\n\n; Write access: obj.field = value\n(assignment\n left: (attribute\n object: (_) @assignment.receiver\n attribute: (identifier) @assignment.property)\n right: (_)) @assignment\n\n; Write access: obj.field += value (compound assignment)\n(augmented_assignment\n left: (attribute\n object: (_) @assignment.receiver\n attribute: (identifier) @assignment.property)\n right: (_)) @assignment\n\n; Python HTTP clients: requests.get('/path'), httpx.post('/path'), session.get('/path')\n(call\n function: (attribute\n attribute: (identifier) @http_client.method)\n arguments: (argument_list\n (string (string_content) @http_client.url))) @http_client\n\n; Python decorators: @app.route, @router.get, etc.\n(decorator\n (call\n function: (attribute\n object: (identifier) @decorator.receiver\n attribute: (identifier) @decorator.name)\n arguments: (argument_list\n (string (string_content) @decorator.arg)?))) @decorator\n";
4
4
  export declare const JAVA_QUERIES = "\n; Classes, Interfaces, Enums, Annotations\n(class_declaration name: (identifier) @name) @definition.class\n(interface_declaration name: (identifier) @name) @definition.interface\n(enum_declaration name: (identifier) @name) @definition.enum\n(annotation_type_declaration name: (identifier) @name) @definition.annotation\n\n; Methods & Constructors\n(method_declaration name: (identifier) @name) @definition.method\n(constructor_declaration name: (identifier) @name) @definition.constructor\n\n; Fields \u2014 typed field declarations inside class bodies\n(field_declaration\n declarator: (variable_declarator\n name: (identifier) @name)) @definition.property\n\n; Imports - capture any import declaration child as source\n(import_declaration (_) @import.source) @import\n\n; Calls\n(method_invocation name: (identifier) @call.name) @call\n(method_invocation object: (_) name: (identifier) @call.name) @call\n\n; Constructor calls: new Foo()\n(object_creation_expression type: (type_identifier) @call.name) @call\n\n; Heritage - extends class\n(class_declaration name: (identifier) @heritage.class\n (superclass (type_identifier) @heritage.extends)) @heritage\n\n; Heritage - implements interfaces\n(class_declaration name: (identifier) @heritage.class\n (super_interfaces (type_list (type_identifier) @heritage.implements))) @heritage.impl\n\n; Write access: obj.field = value\n(assignment_expression\n left: (field_access\n object: (_) @assignment.receiver\n field: (identifier) @assignment.property)\n right: (_)) @assignment\n";
5
5
  export declare const C_QUERIES = "\n; Functions (direct declarator)\n(function_definition declarator: (function_declarator declarator: (identifier) @name)) @definition.function\n(declaration declarator: (function_declarator declarator: (identifier) @name)) @definition.function\n\n; Functions returning pointers (pointer_declarator wraps function_declarator)\n(function_definition declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) @name))) @definition.function\n(declaration declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) @name))) @definition.function\n\n; Functions returning double pointers (nested pointer_declarator)\n(function_definition declarator: (pointer_declarator declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) @name)))) @definition.function\n\n; Structs, Unions, Enums, Typedefs\n(struct_specifier name: (type_identifier) @name) @definition.struct\n(union_specifier name: (type_identifier) @name) @definition.union\n(enum_specifier name: (type_identifier) @name) @definition.enum\n(type_definition declarator: (type_identifier) @name) @definition.typedef\n\n; Macros\n(preproc_function_def name: (identifier) @name) @definition.macro\n(preproc_def name: (identifier) @name) @definition.macro\n\n; Includes\n(preproc_include path: (_) @import.source) @import\n\n; Calls\n(call_expression function: (identifier) @call.name) @call\n(call_expression function: (field_expression field: (field_identifier) @call.name)) @call\n";
@@ -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 'gitnexus-shared';
15
+ import { SupportedLanguages } from '../../_shared/index.js';
16
16
  export declare const LANGUAGE_QUERIES: Record<SupportedLanguages, string>;
@@ -23,6 +23,18 @@ export const TYPESCRIPT_QUERIES = `
23
23
  (method_definition
24
24
  name: (property_identifier) @name) @definition.method
25
25
 
26
+ ; ES2022 #private methods (private_property_identifier not matched by property_identifier)
27
+ (method_definition
28
+ name: (private_property_identifier) @name) @definition.method
29
+
30
+ ; Abstract method signatures in abstract classes
31
+ (abstract_method_signature
32
+ name: (property_identifier) @name) @definition.method
33
+
34
+ ; Interface method signatures
35
+ (method_signature
36
+ name: (property_identifier) @name) @definition.method
37
+
26
38
  (lexical_declaration
27
39
  (variable_declarator
28
40
  name: (identifier) @name
@@ -143,6 +155,10 @@ export const JAVASCRIPT_QUERIES = `
143
155
  (method_definition
144
156
  name: (property_identifier) @name) @definition.method
145
157
 
158
+ ; ES2022 #private methods
159
+ (method_definition
160
+ name: (private_property_identifier) @name) @definition.method
161
+
146
162
  (lexical_declaration
147
163
  (variable_declarator
148
164
  name: (identifier) @name
@@ -1131,7 +1147,7 @@ export const DART_QUERIES = `
1131
1147
  (mixins
1132
1148
  (type_identifier) @heritage.trait))) @heritage
1133
1149
  `;
1134
- import { SupportedLanguages } from 'gitnexus-shared';
1150
+ import { SupportedLanguages } from '../../_shared/index.js';
1135
1151
  export const LANGUAGE_QUERIES = {
1136
1152
  [SupportedLanguages.TypeScript]: TYPESCRIPT_QUERIES,
1137
1153
  [SupportedLanguages.JavaScript]: JAVASCRIPT_QUERIES,
@@ -1,7 +1,7 @@
1
1
  import { type SyntaxNode } from './utils/ast-helpers.js';
2
- import { SupportedLanguages } from 'gitnexus-shared';
2
+ import { SupportedLanguages } from '../../_shared/index.js';
3
3
  import type { SymbolTable } from './symbol-table.js';
4
- import type { NodeLabel } from 'gitnexus-shared';
4
+ import type { NodeLabel } from '../../_shared/index.js';
5
5
  /**
6
6
  * Per-file type environment with receiver resolution.
7
7
  * Built once per file via `buildTypeEnv`, used for receiver-type filtering,
@@ -1,5 +1,5 @@
1
1
  import type Parser from 'tree-sitter';
2
- import type { NodeLabel } from 'gitnexus-shared';
2
+ import type { NodeLabel } from '../../../_shared/index.js';
3
3
  import type { LanguageProvider } from '../language-provider.js';
4
4
  /** Tree-sitter AST node. Re-exported for use across ingestion modules. */
5
5
  export type SyntaxNode = Parser.SyntaxNode;
@@ -632,6 +632,13 @@ export const extractMethodSignature = (node) => {
632
632
  param.type === 'self_parameter') {
633
633
  continue;
634
634
  }
635
+ // TypeScript: `this` parameter is a compile-time type constraint, not a real param
636
+ // e.g., handle(this: void, event: Event) — only count 'event'
637
+ if (param.type === 'required_parameter') {
638
+ const patternNode = param.childForFieldName('pattern');
639
+ if (patternNode?.type === 'this')
640
+ continue;
641
+ }
635
642
  // Kotlin: default values are siblings of the parameter node inside
636
643
  // function_value_parameters, so they appear as named children (e.g.
637
644
  // string_literal, integer_literal, boolean_literal, call_expression).
@@ -1,8 +1,8 @@
1
- import { SupportedLanguages } from 'gitnexus-shared';
1
+ import { SupportedLanguages } from '../../../_shared/index.js';
2
2
  import { type MixedChainStep } from '../utils/call-analysis.js';
3
3
  import type { ConstructorBinding } from '../type-env.js';
4
4
  import type { NamedBinding } from '../named-bindings/types.js';
5
- import type { NodeLabel } from 'gitnexus-shared';
5
+ import type { NodeLabel } from '../../../_shared/index.js';
6
6
  interface ParsedNode {
7
7
  id: string;
8
8
  label: string;
@@ -12,7 +12,7 @@ import Rust from 'tree-sitter-rust';
12
12
  import PHP from 'tree-sitter-php';
13
13
  import Ruby from 'tree-sitter-ruby';
14
14
  import { createRequire } from 'node:module';
15
- import { SupportedLanguages } from 'gitnexus-shared';
15
+ import { SupportedLanguages } from '../../../_shared/index.js';
16
16
  import { getProvider } from '../languages/index.js';
17
17
  import { getTreeSitterBufferSize, TREE_SITTER_MAX_BUFFER } from '../constants.js';
18
18
  // tree-sitter-swift is an optionalDependency — may not be installed
@@ -34,7 +34,7 @@ try {
34
34
  Kotlin = _require('tree-sitter-kotlin');
35
35
  }
36
36
  catch { }
37
- import { getLanguageFromFilename } from 'gitnexus-shared';
37
+ import { getLanguageFromFilename } from '../../../_shared/index.js';
38
38
  import { FUNCTION_NODE_TYPES, extractFunctionName, getDefinitionNodeFromCaptures, findEnclosingClassId, getLabelFromCaptures, extractMethodSignature, findDescendant, extractStringContent, } from '../utils/ast-helpers.js';
39
39
  import { countCallArguments, inferCallForm, extractReceiverName, extractReceiverNode, extractMixedChain, extractCallArgTypes, } from '../utils/call-analysis.js';
40
40
  import { extractParsedCallSite } from '../call-sites/extract-language-call-site.js';