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
@@ -7,7 +7,7 @@
7
7
  * C uses 'first-wins' MRO (no inheritance). C++ uses 'leftmost-base' MRO
8
8
  * for its left-to-right multiple inheritance resolution order.
9
9
  */
10
- import { SupportedLanguages } from '../../../config/supported-languages.js';
10
+ import { SupportedLanguages } from 'gitnexus-shared';
11
11
  import { defineLanguage } from '../language-provider.js';
12
12
  import { typeConfig as cCppConfig } from '../type-extractors/c-cpp.js';
13
13
  import { cCppExportChecker } from '../export-detection.js';
@@ -15,27 +15,112 @@ import { resolveCImport, resolveCppImport } from '../import-resolvers/standard.j
15
15
  import { C_QUERIES, CPP_QUERIES } from '../tree-sitter-queries.js';
16
16
  import { isCppInsideClassOrStruct } from '../utils/ast-helpers.js';
17
17
  import { createFieldExtractor } from '../field-extractors/generic.js';
18
- import { cConfig as cFieldConfig, cppConfig as cppFieldConfig } from '../field-extractors/configs/c-cpp.js';
18
+ import { cConfig as cFieldConfig, cppConfig as cppFieldConfig, } from '../field-extractors/configs/c-cpp.js';
19
19
  const C_BUILT_INS = new Set([
20
- 'printf', 'fprintf', 'sprintf', 'snprintf', 'vprintf', 'vfprintf', 'vsprintf', 'vsnprintf',
21
- 'scanf', 'fscanf', 'sscanf',
22
- 'malloc', 'calloc', 'realloc', 'free', 'memcpy', 'memmove', 'memset', 'memcmp',
23
- 'strlen', 'strcpy', 'strncpy', 'strcat', 'strncat', 'strcmp', 'strncmp', 'strstr', 'strchr', 'strrchr',
24
- 'atoi', 'atol', 'atof', 'strtol', 'strtoul', 'strtoll', 'strtoull', 'strtod',
25
- 'sizeof', 'offsetof', 'typeof',
26
- 'assert', 'abort', 'exit', '_exit',
27
- 'fopen', 'fclose', 'fread', 'fwrite', 'fseek', 'ftell', 'rewind', 'fflush', 'fgets', 'fputs',
28
- 'likely', 'unlikely', 'BUG', 'BUG_ON', 'WARN', 'WARN_ON', 'WARN_ONCE',
29
- 'IS_ERR', 'PTR_ERR', 'ERR_PTR', 'IS_ERR_OR_NULL',
30
- 'ARRAY_SIZE', 'container_of', 'list_for_each_entry', 'list_for_each_entry_safe',
31
- 'min', 'max', 'clamp', 'abs', 'swap',
32
- 'pr_info', 'pr_warn', 'pr_err', 'pr_debug', 'pr_notice', 'pr_crit', 'pr_emerg',
33
- 'printk', 'dev_info', 'dev_warn', 'dev_err', 'dev_dbg',
34
- 'GFP_KERNEL', 'GFP_ATOMIC',
35
- 'spin_lock', 'spin_unlock', 'spin_lock_irqsave', 'spin_unlock_irqrestore',
36
- 'mutex_lock', 'mutex_unlock', 'mutex_init',
37
- 'kfree', 'kmalloc', 'kzalloc', 'kcalloc', 'krealloc', 'kvmalloc', 'kvfree',
38
- 'get', 'put',
20
+ 'printf',
21
+ 'fprintf',
22
+ 'sprintf',
23
+ 'snprintf',
24
+ 'vprintf',
25
+ 'vfprintf',
26
+ 'vsprintf',
27
+ 'vsnprintf',
28
+ 'scanf',
29
+ 'fscanf',
30
+ 'sscanf',
31
+ 'malloc',
32
+ 'calloc',
33
+ 'realloc',
34
+ 'free',
35
+ 'memcpy',
36
+ 'memmove',
37
+ 'memset',
38
+ 'memcmp',
39
+ 'strlen',
40
+ 'strcpy',
41
+ 'strncpy',
42
+ 'strcat',
43
+ 'strncat',
44
+ 'strcmp',
45
+ 'strncmp',
46
+ 'strstr',
47
+ 'strchr',
48
+ 'strrchr',
49
+ 'atoi',
50
+ 'atol',
51
+ 'atof',
52
+ 'strtol',
53
+ 'strtoul',
54
+ 'strtoll',
55
+ 'strtoull',
56
+ 'strtod',
57
+ 'sizeof',
58
+ 'offsetof',
59
+ 'typeof',
60
+ 'assert',
61
+ 'abort',
62
+ 'exit',
63
+ '_exit',
64
+ 'fopen',
65
+ 'fclose',
66
+ 'fread',
67
+ 'fwrite',
68
+ 'fseek',
69
+ 'ftell',
70
+ 'rewind',
71
+ 'fflush',
72
+ 'fgets',
73
+ 'fputs',
74
+ 'likely',
75
+ 'unlikely',
76
+ 'BUG',
77
+ 'BUG_ON',
78
+ 'WARN',
79
+ 'WARN_ON',
80
+ 'WARN_ONCE',
81
+ 'IS_ERR',
82
+ 'PTR_ERR',
83
+ 'ERR_PTR',
84
+ 'IS_ERR_OR_NULL',
85
+ 'ARRAY_SIZE',
86
+ 'container_of',
87
+ 'list_for_each_entry',
88
+ 'list_for_each_entry_safe',
89
+ 'min',
90
+ 'max',
91
+ 'clamp',
92
+ 'abs',
93
+ 'swap',
94
+ 'pr_info',
95
+ 'pr_warn',
96
+ 'pr_err',
97
+ 'pr_debug',
98
+ 'pr_notice',
99
+ 'pr_crit',
100
+ 'pr_emerg',
101
+ 'printk',
102
+ 'dev_info',
103
+ 'dev_warn',
104
+ 'dev_err',
105
+ 'dev_dbg',
106
+ 'GFP_KERNEL',
107
+ 'GFP_ATOMIC',
108
+ 'spin_lock',
109
+ 'spin_unlock',
110
+ 'spin_lock_irqsave',
111
+ 'spin_unlock_irqrestore',
112
+ 'mutex_lock',
113
+ 'mutex_unlock',
114
+ 'mutex_init',
115
+ 'kfree',
116
+ 'kmalloc',
117
+ 'kzalloc',
118
+ 'kcalloc',
119
+ 'krealloc',
120
+ 'kvmalloc',
121
+ 'kvfree',
122
+ 'get',
123
+ 'put',
39
124
  ]);
40
125
  /** Label override shared by C and C++: skip function_definition captures inside class/struct
41
126
  * bodies (they're duplicates of definition.method captures). */
@@ -9,7 +9,7 @@
9
9
  * This provider exists to satisfy the SupportedLanguages exhaustiveness
10
10
  * checks and to declare parseStrategy: 'standalone'.
11
11
  */
12
- import { SupportedLanguages } from '../../../config/supported-languages.js';
12
+ import { SupportedLanguages } from 'gitnexus-shared';
13
13
  import { defineLanguage } from '../language-provider.js';
14
14
  export const cobolProvider = defineLanguage({
15
15
  id: SupportedLanguages.Cobol,
@@ -5,7 +5,7 @@
5
5
  * and an implements-split MRO strategy for multiple interface implementation.
6
6
  * Interface names follow the I-prefix convention (e.g., IDisposable).
7
7
  */
8
- import { SupportedLanguages } from '../../../config/supported-languages.js';
8
+ import { SupportedLanguages } from 'gitnexus-shared';
9
9
  import { defineLanguage } from '../language-provider.js';
10
10
  import { typeConfig as csharpConfig } from '../type-extractors/csharp.js';
11
11
  import { csharpExportChecker } from '../export-detection.js';
@@ -14,25 +14,101 @@ import { extractCSharpNamedBindings } from '../named-bindings/csharp.js';
14
14
  import { CSHARP_QUERIES } from '../tree-sitter-queries.js';
15
15
  import { createFieldExtractor } from '../field-extractors/generic.js';
16
16
  import { csharpConfig as csharpFieldConfig } from '../field-extractors/configs/csharp.js';
17
+ import { createMethodExtractor } from '../method-extractors/generic.js';
18
+ import { csharpMethodConfig } from '../method-extractors/configs/csharp.js';
17
19
  const BUILT_INS = new Set([
18
- 'Console', 'WriteLine', 'ReadLine', 'Write',
19
- 'Task', 'Run', 'Wait', 'WhenAll', 'WhenAny', 'FromResult', 'Delay', 'ContinueWith',
20
- 'ConfigureAwait', 'GetAwaiter', 'GetResult',
21
- 'ToString', 'GetType', 'Equals', 'GetHashCode', 'ReferenceEquals',
22
- 'Add', 'Remove', 'Contains', 'Clear', 'Count', 'Any', 'All',
23
- 'Where', 'Select', 'SelectMany', 'OrderBy', 'OrderByDescending', 'GroupBy',
24
- 'First', 'FirstOrDefault', 'Single', 'SingleOrDefault', 'Last', 'LastOrDefault',
25
- 'ToList', 'ToArray', 'ToDictionary', 'AsEnumerable', 'AsQueryable',
26
- 'Aggregate', 'Sum', 'Average', 'Min', 'Max', 'Distinct', 'Skip', 'Take',
27
- 'String', 'Format', 'IsNullOrEmpty', 'IsNullOrWhiteSpace', 'Concat', 'Join',
28
- 'Trim', 'TrimStart', 'TrimEnd', 'Split', 'Replace', 'StartsWith', 'EndsWith',
29
- 'Convert', 'ToInt32', 'ToDouble', 'ToBoolean', 'ToByte',
30
- 'Math', 'Abs', 'Ceiling', 'Floor', 'Round', 'Pow', 'Sqrt',
31
- 'Dispose', 'Close',
32
- 'TryParse', 'Parse',
33
- 'AddRange', 'RemoveAt', 'RemoveAll', 'FindAll', 'Exists', 'TrueForAll',
34
- 'ContainsKey', 'TryGetValue', 'AddOrUpdate',
35
- 'Throw', 'ThrowIfNull',
20
+ 'Console',
21
+ 'WriteLine',
22
+ 'ReadLine',
23
+ 'Write',
24
+ 'Task',
25
+ 'Run',
26
+ 'Wait',
27
+ 'WhenAll',
28
+ 'WhenAny',
29
+ 'FromResult',
30
+ 'Delay',
31
+ 'ContinueWith',
32
+ 'ConfigureAwait',
33
+ 'GetAwaiter',
34
+ 'GetResult',
35
+ 'ToString',
36
+ 'GetType',
37
+ 'Equals',
38
+ 'GetHashCode',
39
+ 'ReferenceEquals',
40
+ 'Add',
41
+ 'Remove',
42
+ 'Contains',
43
+ 'Clear',
44
+ 'Count',
45
+ 'Any',
46
+ 'All',
47
+ 'Where',
48
+ 'Select',
49
+ 'SelectMany',
50
+ 'OrderBy',
51
+ 'OrderByDescending',
52
+ 'GroupBy',
53
+ 'First',
54
+ 'FirstOrDefault',
55
+ 'Single',
56
+ 'SingleOrDefault',
57
+ 'Last',
58
+ 'LastOrDefault',
59
+ 'ToList',
60
+ 'ToArray',
61
+ 'ToDictionary',
62
+ 'AsEnumerable',
63
+ 'AsQueryable',
64
+ 'Aggregate',
65
+ 'Sum',
66
+ 'Average',
67
+ 'Min',
68
+ 'Max',
69
+ 'Distinct',
70
+ 'Skip',
71
+ 'Take',
72
+ 'String',
73
+ 'Format',
74
+ 'IsNullOrEmpty',
75
+ 'IsNullOrWhiteSpace',
76
+ 'Concat',
77
+ 'Join',
78
+ 'Trim',
79
+ 'TrimStart',
80
+ 'TrimEnd',
81
+ 'Split',
82
+ 'Replace',
83
+ 'StartsWith',
84
+ 'EndsWith',
85
+ 'Convert',
86
+ 'ToInt32',
87
+ 'ToDouble',
88
+ 'ToBoolean',
89
+ 'ToByte',
90
+ 'Math',
91
+ 'Abs',
92
+ 'Ceiling',
93
+ 'Floor',
94
+ 'Round',
95
+ 'Pow',
96
+ 'Sqrt',
97
+ 'Dispose',
98
+ 'Close',
99
+ 'TryParse',
100
+ 'Parse',
101
+ 'AddRange',
102
+ 'RemoveAt',
103
+ 'RemoveAll',
104
+ 'FindAll',
105
+ 'Exists',
106
+ 'TrueForAll',
107
+ 'ContainsKey',
108
+ 'TryGetValue',
109
+ 'AddOrUpdate',
110
+ 'Throw',
111
+ 'ThrowIfNull',
36
112
  ]);
37
113
  export const csharpProvider = defineLanguage({
38
114
  id: SupportedLanguages.CSharp,
@@ -45,5 +121,6 @@ export const csharpProvider = defineLanguage({
45
121
  interfaceNamePattern: /^I[A-Z]/,
46
122
  mroStrategy: 'implements-split',
47
123
  fieldExtractor: createFieldExtractor(csharpFieldConfig),
124
+ methodExtractor: createMethodExtractor(csharpMethodConfig),
48
125
  builtInNames: BUILT_INS,
49
126
  });
@@ -10,7 +10,7 @@
10
10
  * The hook resolves the enclosing function by inspecting the previous sibling.
11
11
  */
12
12
  import { FUNCTION_NODE_TYPES, extractFunctionName } from '../utils/ast-helpers.js';
13
- import { SupportedLanguages } from '../../../config/supported-languages.js';
13
+ import { SupportedLanguages } from 'gitnexus-shared';
14
14
  import { defineLanguage } from '../language-provider.js';
15
15
  import { typeConfig as dartConfig } from '../type-extractors/dart.js';
16
16
  import { dartExportChecker } from '../export-detection.js';
@@ -37,12 +37,28 @@ const dartEnclosingFunctionFinder = (node) => {
37
37
  return funcName ? { funcName, label } : null;
38
38
  };
39
39
  const BUILT_INS = new Set([
40
- 'setState', 'mounted', 'debugPrint',
41
- 'runApp', 'showDialog', 'showModalBottomSheet',
42
- 'Navigator', 'push', 'pushNamed', 'pushReplacement', 'pop', 'maybePop',
43
- 'ScaffoldMessenger', 'showSnackBar',
44
- 'deactivate', 'reassemble', 'debugDumpApp', 'debugDumpRenderTree',
45
- 'then', 'catchError', 'whenComplete', 'listen',
40
+ 'setState',
41
+ 'mounted',
42
+ 'debugPrint',
43
+ 'runApp',
44
+ 'showDialog',
45
+ 'showModalBottomSheet',
46
+ 'Navigator',
47
+ 'push',
48
+ 'pushNamed',
49
+ 'pushReplacement',
50
+ 'pop',
51
+ 'maybePop',
52
+ 'ScaffoldMessenger',
53
+ 'showSnackBar',
54
+ 'deactivate',
55
+ 'reassemble',
56
+ 'debugDumpApp',
57
+ 'debugDumpRenderTree',
58
+ 'then',
59
+ 'catchError',
60
+ 'whenComplete',
61
+ 'listen',
46
62
  ]);
47
63
  export const dartProvider = defineLanguage({
48
64
  id: SupportedLanguages.Dart,
@@ -8,7 +8,7 @@
8
8
  * - importSemantics: 'wildcard' (Go imports entire packages)
9
9
  * - callRouter: present (Go method calls may need routing)
10
10
  */
11
- import { SupportedLanguages } from '../../../config/supported-languages.js';
11
+ import { SupportedLanguages } from 'gitnexus-shared';
12
12
  import { defineLanguage } from '../language-provider.js';
13
13
  import { typeConfig as goConfig } from '../type-extractors/go.js';
14
14
  import { goExportChecker } from '../export-detection.js';
@@ -7,7 +7,7 @@
7
7
  * 3. Add one line to the `providers` table below
8
8
  * 4. Run `tsc --noEmit` to verify
9
9
  */
10
- import { SupportedLanguages } from '../../../config/supported-languages.js';
10
+ import { SupportedLanguages } from 'gitnexus-shared';
11
11
  import type { LanguageProvider } from '../language-provider.js';
12
12
  export declare const providers: {
13
13
  javascript: LanguageProvider;
@@ -7,7 +7,7 @@
7
7
  * 3. Add one line to the `providers` table below
8
8
  * 4. Run `tsc --noEmit` to verify
9
9
  */
10
- import { SupportedLanguages } from '../../../config/supported-languages.js';
10
+ import { SupportedLanguages } from 'gitnexus-shared';
11
11
  import { typescriptProvider, javascriptProvider } from './typescript.js';
12
12
  import { pythonProvider } from './python.js';
13
13
  import { javaProvider } from './java.js';
@@ -59,5 +59,4 @@ export function getProviderForFile(filePath) {
59
59
  }
60
60
  /** Pre-computed list of providers that have implicit import wiring (e.g., Swift).
61
61
  * Built once at module load — avoids iterating all 13 providers per call. */
62
- export const providersWithImplicitWiring = Object.values(providers)
63
- .filter((p) => p.implicitImportWirer != null);
62
+ export const providersWithImplicitWiring = Object.values(providers).filter((p) => p.implicitImportWirer != null);
@@ -6,7 +6,7 @@
6
6
  * EXTENDS by default with implements-split MRO for multiple
7
7
  * interface implementation.
8
8
  */
9
- import { SupportedLanguages } from '../../../config/supported-languages.js';
9
+ import { SupportedLanguages } from 'gitnexus-shared';
10
10
  import { defineLanguage } from '../language-provider.js';
11
11
  import { javaTypeConfig } from '../type-extractors/jvm.js';
12
12
  import { javaExportChecker } from '../export-detection.js';
@@ -15,6 +15,8 @@ import { extractJavaNamedBindings } from '../named-bindings/java.js';
15
15
  import { JAVA_QUERIES } from '../tree-sitter-queries.js';
16
16
  import { createFieldExtractor } from '../field-extractors/generic.js';
17
17
  import { javaConfig } from '../field-extractors/configs/jvm.js';
18
+ import { createMethodExtractor } from '../method-extractors/generic.js';
19
+ import { javaMethodConfig } from '../method-extractors/configs/jvm.js';
18
20
  export const javaProvider = defineLanguage({
19
21
  id: SupportedLanguages.Java,
20
22
  extensions: ['.java'],
@@ -26,4 +28,5 @@ export const javaProvider = defineLanguage({
26
28
  interfaceNamePattern: /^I[A-Z]/,
27
29
  mroStrategy: 'implements-split',
28
30
  fieldExtractor: createFieldExtractor(javaConfig),
31
+ methodExtractor: createMethodExtractor(javaMethodConfig),
29
32
  });
@@ -6,7 +6,7 @@
6
6
  * Heritage uses EXTENDS by default with implements-split MRO for
7
7
  * multiple interface implementation.
8
8
  */
9
- import { SupportedLanguages } from '../../../config/supported-languages.js';
9
+ import { SupportedLanguages } from 'gitnexus-shared';
10
10
  import { defineLanguage } from '../language-provider.js';
11
11
  import { kotlinTypeConfig } from '../type-extractors/jvm.js';
12
12
  import { kotlinExportChecker } from '../export-detection.js';
@@ -17,19 +17,65 @@ import { KOTLIN_QUERIES } from '../tree-sitter-queries.js';
17
17
  import { isKotlinClassMethod } from '../utils/ast-helpers.js';
18
18
  import { createFieldExtractor } from '../field-extractors/generic.js';
19
19
  import { kotlinConfig } from '../field-extractors/configs/jvm.js';
20
+ import { createMethodExtractor } from '../method-extractors/generic.js';
21
+ import { kotlinMethodConfig } from '../method-extractors/configs/jvm.js';
20
22
  const BUILT_INS = new Set([
21
- 'println', 'print', 'readLine', 'require', 'requireNotNull', 'check', 'assert', 'lazy', 'error',
22
- 'listOf', 'mapOf', 'setOf', 'mutableListOf', 'mutableMapOf', 'mutableSetOf',
23
- 'arrayOf', 'sequenceOf', 'also', 'apply', 'run', 'with', 'takeIf', 'takeUnless',
24
- 'TODO', 'buildString', 'buildList', 'buildMap', 'buildSet',
25
- 'repeat', 'synchronized',
26
- 'launch', 'async', 'runBlocking', 'withContext', 'coroutineScope',
27
- 'supervisorScope', 'delay',
28
- 'flow', 'flowOf', 'collect', 'emit', 'onEach', 'catch',
29
- 'buffer', 'conflate', 'distinctUntilChanged',
30
- 'flatMapLatest', 'flatMapMerge', 'combine',
31
- 'stateIn', 'shareIn', 'launchIn',
32
- 'to', 'until', 'downTo', 'step',
23
+ 'println',
24
+ 'print',
25
+ 'readLine',
26
+ 'require',
27
+ 'requireNotNull',
28
+ 'check',
29
+ 'assert',
30
+ 'lazy',
31
+ 'error',
32
+ 'listOf',
33
+ 'mapOf',
34
+ 'setOf',
35
+ 'mutableListOf',
36
+ 'mutableMapOf',
37
+ 'mutableSetOf',
38
+ 'arrayOf',
39
+ 'sequenceOf',
40
+ 'also',
41
+ 'apply',
42
+ 'run',
43
+ 'with',
44
+ 'takeIf',
45
+ 'takeUnless',
46
+ 'TODO',
47
+ 'buildString',
48
+ 'buildList',
49
+ 'buildMap',
50
+ 'buildSet',
51
+ 'repeat',
52
+ 'synchronized',
53
+ 'launch',
54
+ 'async',
55
+ 'runBlocking',
56
+ 'withContext',
57
+ 'coroutineScope',
58
+ 'supervisorScope',
59
+ 'delay',
60
+ 'flow',
61
+ 'flowOf',
62
+ 'collect',
63
+ 'emit',
64
+ 'onEach',
65
+ 'catch',
66
+ 'buffer',
67
+ 'conflate',
68
+ 'distinctUntilChanged',
69
+ 'flatMapLatest',
70
+ 'flatMapMerge',
71
+ 'combine',
72
+ 'stateIn',
73
+ 'shareIn',
74
+ 'launchIn',
75
+ 'to',
76
+ 'until',
77
+ 'downTo',
78
+ 'step',
33
79
  ]);
34
80
  export const kotlinProvider = defineLanguage({
35
81
  id: SupportedLanguages.Kotlin,
@@ -42,6 +88,7 @@ export const kotlinProvider = defineLanguage({
42
88
  importPathPreprocessor: appendKotlinWildcard,
43
89
  mroStrategy: 'implements-split',
44
90
  fieldExtractor: createFieldExtractor(kotlinConfig),
91
+ methodExtractor: createMethodExtractor(kotlinMethodConfig),
45
92
  builtInNames: BUILT_INS,
46
93
  labelOverride: (functionNode, defaultLabel) => {
47
94
  if (defaultLabel !== 'Function')
@@ -5,7 +5,7 @@
5
5
  * and standard export/import resolution. PHP files can use a variety of
6
6
  * extensions from legacy versions through modern PHP 8.
7
7
  */
8
- import { SupportedLanguages } from '../../../config/supported-languages.js';
8
+ import { SupportedLanguages } from 'gitnexus-shared';
9
9
  import { defineLanguage } from '../language-provider.js';
10
10
  import { typeConfig as phpConfig } from '../type-extractors/php.js';
11
11
  import { phpExportChecker } from '../export-detection.js';
@@ -16,30 +16,107 @@ import { findDescendant, extractStringContent } from '../utils/ast-helpers.js';
16
16
  import { createFieldExtractor } from '../field-extractors/generic.js';
17
17
  import { phpConfig as phpFieldConfig } from '../field-extractors/configs/php.js';
18
18
  const BUILT_INS = new Set([
19
- 'echo', 'isset', 'empty', 'unset', 'list', 'array', 'compact', 'extract',
20
- 'count', 'strlen', 'strpos', 'strrpos', 'substr', 'strtolower', 'strtoupper', 'trim',
21
- 'ltrim', 'rtrim', 'str_replace', 'str_contains', 'str_starts_with', 'str_ends_with',
22
- 'sprintf', 'vsprintf', 'printf', 'number_format',
23
- 'array_map', 'array_filter', 'array_reduce', 'array_push', 'array_pop', 'array_shift',
24
- 'array_unshift', 'array_slice', 'array_splice', 'array_merge', 'array_keys', 'array_values',
25
- 'array_key_exists', 'in_array', 'array_search', 'array_unique', 'usort', 'rsort',
26
- 'json_encode', 'json_decode', 'serialize', 'unserialize',
27
- 'intval', 'floatval', 'strval', 'boolval', 'is_null', 'is_string', 'is_int', 'is_array',
28
- 'is_object', 'is_numeric', 'is_bool', 'is_float',
29
- 'var_dump', 'print_r', 'var_export',
30
- 'date', 'time', 'strtotime', 'mktime', 'microtime',
31
- 'file_exists', 'file_get_contents', 'file_put_contents', 'is_file', 'is_dir',
32
- 'preg_match', 'preg_match_all', 'preg_replace', 'preg_split',
33
- 'header', 'session_start', 'session_destroy', 'ob_start', 'ob_end_clean', 'ob_get_clean',
34
- 'dd', 'dump',
19
+ 'echo',
20
+ 'isset',
21
+ 'empty',
22
+ 'unset',
23
+ 'list',
24
+ 'array',
25
+ 'compact',
26
+ 'extract',
27
+ 'count',
28
+ 'strlen',
29
+ 'strpos',
30
+ 'strrpos',
31
+ 'substr',
32
+ 'strtolower',
33
+ 'strtoupper',
34
+ 'trim',
35
+ 'ltrim',
36
+ 'rtrim',
37
+ 'str_replace',
38
+ 'str_contains',
39
+ 'str_starts_with',
40
+ 'str_ends_with',
41
+ 'sprintf',
42
+ 'vsprintf',
43
+ 'printf',
44
+ 'number_format',
45
+ 'array_map',
46
+ 'array_filter',
47
+ 'array_reduce',
48
+ 'array_push',
49
+ 'array_pop',
50
+ 'array_shift',
51
+ 'array_unshift',
52
+ 'array_slice',
53
+ 'array_splice',
54
+ 'array_merge',
55
+ 'array_keys',
56
+ 'array_values',
57
+ 'array_key_exists',
58
+ 'in_array',
59
+ 'array_search',
60
+ 'array_unique',
61
+ 'usort',
62
+ 'rsort',
63
+ 'json_encode',
64
+ 'json_decode',
65
+ 'serialize',
66
+ 'unserialize',
67
+ 'intval',
68
+ 'floatval',
69
+ 'strval',
70
+ 'boolval',
71
+ 'is_null',
72
+ 'is_string',
73
+ 'is_int',
74
+ 'is_array',
75
+ 'is_object',
76
+ 'is_numeric',
77
+ 'is_bool',
78
+ 'is_float',
79
+ 'var_dump',
80
+ 'print_r',
81
+ 'var_export',
82
+ 'date',
83
+ 'time',
84
+ 'strtotime',
85
+ 'mktime',
86
+ 'microtime',
87
+ 'file_exists',
88
+ 'file_get_contents',
89
+ 'file_put_contents',
90
+ 'is_file',
91
+ 'is_dir',
92
+ 'preg_match',
93
+ 'preg_match_all',
94
+ 'preg_replace',
95
+ 'preg_split',
96
+ 'header',
97
+ 'session_start',
98
+ 'session_destroy',
99
+ 'ob_start',
100
+ 'ob_end_clean',
101
+ 'ob_get_clean',
102
+ 'dd',
103
+ 'dump',
35
104
  ]);
36
105
  /** Eloquent model properties whose array values are worth indexing. */
37
106
  const ELOQUENT_ARRAY_PROPS = new Set(['fillable', 'casts', 'hidden', 'guarded', 'with', 'appends']);
38
107
  /** Eloquent relationship method names. */
39
108
  const ELOQUENT_RELATIONS = new Set([
40
- 'hasMany', 'hasOne', 'belongsTo', 'belongsToMany',
41
- 'morphTo', 'morphMany', 'morphOne', 'morphToMany', 'morphedByMany',
42
- 'hasManyThrough', 'hasOneThrough',
109
+ 'hasMany',
110
+ 'hasOne',
111
+ 'belongsTo',
112
+ 'belongsToMany',
113
+ 'morphTo',
114
+ 'morphMany',
115
+ 'morphOne',
116
+ 'morphToMany',
117
+ 'morphedByMany',
118
+ 'hasManyThrough',
119
+ 'hasOneThrough',
43
120
  ]);
44
121
  /**
45
122
  * For a PHP property_declaration node, extract array values as a description string.
@@ -52,7 +129,7 @@ function extractPhpPropertyDescription(propName, propDeclNode) {
52
129
  if (!arrayNode)
53
130
  return null;
54
131
  const items = [];
55
- for (const child of (arrayNode.children ?? [])) {
132
+ for (const child of arrayNode.children ?? []) {
56
133
  if (child.type !== 'array_element_initializer')
57
134
  continue;
58
135
  const children = child.children ?? [];
@@ -84,7 +161,7 @@ function extractEloquentRelationDescription(methodNode) {
84
161
  if (objectNode && nameNode && ELOQUENT_RELATIONS.has(nameNode.text))
85
162
  return node;
86
163
  }
87
- for (const child of (node.children ?? [])) {
164
+ for (const child of node.children ?? []) {
88
165
  const found = findRelationCall(child);
89
166
  if (found)
90
167
  return found;
@@ -102,7 +179,8 @@ function extractEloquentRelationDescription(methodNode) {
102
179
  if (firstArg) {
103
180
  const classConstant = firstArg.children?.find((c) => c.type === 'class_constant_access_expression');
104
181
  if (classConstant) {
105
- targetModel = classConstant.children?.find((c) => c.type === 'name')?.text ?? null;
182
+ targetModel =
183
+ classConstant.children?.find((c) => c.type === 'name')?.text ?? null;
106
184
  }
107
185
  }
108
186
  }
@@ -127,8 +205,7 @@ function phpDescriptionExtractor(nodeLabel, nodeName, captureMap) {
127
205
  }
128
206
  /** Detect Laravel route files by path convention. */
129
207
  function isPhpRouteFile(filePath) {
130
- return filePath.endsWith('.php') &&
131
- (filePath.includes('/routes/') || filePath.startsWith('routes/'));
208
+ return (filePath.endsWith('.php') && (filePath.includes('/routes/') || filePath.startsWith('routes/')));
132
209
  }
133
210
  export const phpProvider = defineLanguage({
134
211
  id: SupportedLanguages.PHP,