gitnexus 1.6.6-rc.99 → 1.6.6

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 (541) hide show
  1. package/README.md +122 -68
  2. package/dist/_shared/graph/types.d.ts +17 -1
  3. package/dist/_shared/graph/types.d.ts.map +1 -1
  4. package/dist/_shared/index.d.ts +3 -5
  5. package/dist/_shared/index.d.ts.map +1 -1
  6. package/dist/_shared/index.js +2 -4
  7. package/dist/_shared/index.js.map +1 -1
  8. package/dist/_shared/scope-resolution/module-scope-index.d.ts +1 -2
  9. package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -1
  10. package/dist/_shared/scope-resolution/module-scope-index.js +1 -2
  11. package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -1
  12. package/dist/_shared/scope-resolution/parsed-file.d.ts +24 -0
  13. package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -1
  14. package/dist/_shared/scope-resolution/reference-site.d.ts +13 -1
  15. package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -1
  16. package/dist/_shared/scope-resolution/registries/context.d.ts +1 -0
  17. package/dist/_shared/scope-resolution/registries/context.d.ts.map +1 -1
  18. package/dist/_shared/scope-resolution/registries/context.js +6 -0
  19. package/dist/_shared/scope-resolution/registries/context.js.map +1 -1
  20. package/dist/_shared/scope-resolution/registries/evidence.d.ts +2 -3
  21. package/dist/_shared/scope-resolution/registries/evidence.d.ts.map +1 -1
  22. package/dist/_shared/scope-resolution/registries/evidence.js +2 -3
  23. package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -1
  24. package/dist/_shared/scope-resolution/registries/macro-registry.d.ts +29 -0
  25. package/dist/_shared/scope-resolution/registries/macro-registry.d.ts.map +1 -0
  26. package/dist/_shared/scope-resolution/registries/macro-registry.js +32 -0
  27. package/dist/_shared/scope-resolution/registries/macro-registry.js.map +1 -0
  28. package/dist/_shared/scope-resolution/symbol-definition.d.ts +9 -0
  29. package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
  30. package/dist/_shared/scope-resolution/types.d.ts +1 -1
  31. package/dist/_shared/scope-resolution/types.d.ts.map +1 -1
  32. package/dist/cli/ai-context.d.ts +35 -1
  33. package/dist/cli/ai-context.js +111 -12
  34. package/dist/cli/analyze-config.d.ts +92 -0
  35. package/dist/cli/analyze-config.js +364 -0
  36. package/dist/cli/analyze.d.ts +17 -1
  37. package/dist/cli/analyze.js +224 -71
  38. package/dist/cli/cli-message.d.ts +1 -1
  39. package/dist/cli/doctor.d.ts +18 -0
  40. package/dist/cli/doctor.js +32 -0
  41. package/dist/cli/i18n/en.d.ts +2 -2
  42. package/dist/cli/i18n/en.js +2 -2
  43. package/dist/cli/i18n/resources.d.ts +2 -2
  44. package/dist/cli/i18n/zh-CN.js +2 -2
  45. package/dist/cli/index.js +4 -2
  46. package/dist/cli/resolve-invocation.d.ts +21 -0
  47. package/dist/cli/resolve-invocation.js +68 -0
  48. package/dist/cli/setup.d.ts +33 -0
  49. package/dist/cli/setup.js +96 -35
  50. package/dist/cli/skill-gen.js +2 -2
  51. package/dist/cli/wiki.js +20 -4
  52. package/dist/core/embeddings/embedder.d.ts +1 -1
  53. package/dist/core/embeddings/embedder.js +14 -1
  54. package/dist/core/embeddings/runtime-support.d.ts +41 -0
  55. package/dist/core/embeddings/runtime-support.js +65 -0
  56. package/dist/core/group/extractors/grpc-patterns/proto.js +2 -1
  57. package/dist/core/group/extractors/http-patterns/java.js +15 -1
  58. package/dist/core/ingestion/call-processor.d.ts +57 -227
  59. package/dist/core/ingestion/call-processor.js +172 -2595
  60. package/dist/core/ingestion/call-routing.d.ts +6 -5
  61. package/dist/core/ingestion/call-routing.js +6 -6
  62. package/dist/core/ingestion/call-types.d.ts +0 -75
  63. package/dist/core/ingestion/class-extractors/configs/c-cpp.js +26 -1
  64. package/dist/core/ingestion/class-extractors/configs/ruby.js +3 -0
  65. package/dist/core/ingestion/class-extractors/generic.js +9 -11
  66. package/dist/core/ingestion/class-types.d.ts +23 -0
  67. package/dist/core/ingestion/cobol/cobol-preprocessor.d.ts +11 -0
  68. package/dist/core/ingestion/cobol/cobol-preprocessor.js +227 -73
  69. package/dist/core/ingestion/cobol-processor.d.ts +1 -0
  70. package/dist/core/ingestion/cobol-processor.js +51 -2
  71. package/dist/core/ingestion/emit-references.js +8 -2
  72. package/dist/core/ingestion/export-detection.d.ts +2 -1
  73. package/dist/core/ingestion/export-detection.js +2 -6
  74. package/dist/core/ingestion/field-extractors/configs/dart.d.ts +0 -6
  75. package/dist/core/ingestion/field-extractors/configs/dart.js +62 -44
  76. package/dist/core/ingestion/field-extractors/configs/go.d.ts +0 -9
  77. package/dist/core/ingestion/field-extractors/configs/go.js +40 -1
  78. package/dist/core/ingestion/field-extractors/configs/jvm.js +43 -4
  79. package/dist/core/ingestion/field-extractors/configs/php.js +1 -2
  80. package/dist/core/ingestion/field-extractors/configs/swift.d.ts +12 -1
  81. package/dist/core/ingestion/field-extractors/configs/swift.js +31 -6
  82. package/dist/core/ingestion/field-extractors/generic.d.ts +6 -0
  83. package/dist/core/ingestion/field-extractors/generic.js +5 -4
  84. package/dist/core/ingestion/field-extractors/typescript.js +0 -29
  85. package/dist/core/ingestion/filesystem-walker.d.ts +0 -9
  86. package/dist/core/ingestion/filesystem-walker.js +0 -11
  87. package/dist/core/ingestion/finalize-orchestrator.js +14 -2
  88. package/dist/core/ingestion/import-resolvers/configs/swift.d.ts +21 -0
  89. package/dist/core/ingestion/import-resolvers/configs/swift.js +72 -11
  90. package/dist/core/ingestion/import-resolvers/python.d.ts +1 -1
  91. package/dist/core/ingestion/import-resolvers/standard.d.ts +2 -2
  92. package/dist/core/ingestion/import-resolvers/standard.js +6 -5
  93. package/dist/core/ingestion/import-resolvers/utils.d.ts +2 -5
  94. package/dist/core/ingestion/import-resolvers/utils.js +1 -9
  95. package/dist/core/ingestion/language-provider.d.ts +39 -119
  96. package/dist/core/ingestion/language-provider.js +0 -2
  97. package/dist/core/ingestion/languages/c/capture-side-channel.d.ts +62 -0
  98. package/dist/core/ingestion/languages/c/capture-side-channel.js +65 -0
  99. package/dist/core/ingestion/languages/c/captures.js +41 -23
  100. package/dist/core/ingestion/languages/c/import-decomposer.d.ts +9 -0
  101. package/dist/core/ingestion/languages/c/import-decomposer.js +15 -0
  102. package/dist/core/ingestion/languages/c/import-target.js +52 -9
  103. package/dist/core/ingestion/languages/c/index.d.ts +2 -1
  104. package/dist/core/ingestion/languages/c/index.js +2 -1
  105. package/dist/core/ingestion/languages/c/query.js +15 -0
  106. package/dist/core/ingestion/languages/c/scope-resolver.js +47 -4
  107. package/dist/core/ingestion/languages/c/static-linkage.d.ts +8 -0
  108. package/dist/core/ingestion/languages/c/static-linkage.js +46 -1
  109. package/dist/core/ingestion/languages/c-cpp.js +16 -7
  110. package/dist/core/ingestion/languages/cobol/captures.js +25 -2
  111. package/dist/core/ingestion/languages/cpp/adl.d.ts +88 -4
  112. package/dist/core/ingestion/languages/cpp/adl.js +380 -160
  113. package/dist/core/ingestion/languages/cpp/arity-metadata.js +2 -8
  114. package/dist/core/ingestion/languages/cpp/capture-side-channel.d.ts +65 -0
  115. package/dist/core/ingestion/languages/cpp/capture-side-channel.js +78 -0
  116. package/dist/core/ingestion/languages/cpp/captures.js +162 -54
  117. package/dist/core/ingestion/languages/cpp/file-local-linkage.d.ts +18 -52
  118. package/dist/core/ingestion/languages/cpp/file-local-linkage.js +49 -1
  119. package/dist/core/ingestion/languages/cpp/import-decomposer.d.ts +7 -0
  120. package/dist/core/ingestion/languages/cpp/import-decomposer.js +12 -0
  121. package/dist/core/ingestion/languages/cpp/index.d.ts +1 -0
  122. package/dist/core/ingestion/languages/cpp/index.js +1 -0
  123. package/dist/core/ingestion/languages/cpp/inline-namespaces.d.ts +8 -0
  124. package/dist/core/ingestion/languages/cpp/inline-namespaces.js +21 -0
  125. package/dist/core/ingestion/languages/cpp/query.js +21 -0
  126. package/dist/core/ingestion/languages/cpp/range-bindings.js +20 -5
  127. package/dist/core/ingestion/languages/cpp/scope-resolver.js +52 -5
  128. package/dist/core/ingestion/languages/cpp/two-phase-lookup.d.ts +20 -0
  129. package/dist/core/ingestion/languages/cpp/two-phase-lookup.js +83 -3
  130. package/dist/core/ingestion/languages/csharp/captures.js +205 -41
  131. package/dist/core/ingestion/languages/csharp/index.d.ts +3 -4
  132. package/dist/core/ingestion/languages/csharp/index.js +3 -4
  133. package/dist/core/ingestion/languages/csharp/interpret.js +17 -3
  134. package/dist/core/ingestion/languages/csharp/namespace-siblings.d.ts +17 -7
  135. package/dist/core/ingestion/languages/csharp/namespace-siblings.js +129 -124
  136. package/dist/core/ingestion/languages/csharp/qualified-type-names.d.ts +14 -0
  137. package/dist/core/ingestion/languages/csharp/qualified-type-names.js +59 -0
  138. package/dist/core/ingestion/languages/csharp/query.js +13 -0
  139. package/dist/core/ingestion/languages/csharp/receiver-binding.js +10 -6
  140. package/dist/core/ingestion/languages/csharp/scope-resolver.js +8 -1
  141. package/dist/core/ingestion/languages/csharp.js +0 -5
  142. package/dist/core/ingestion/languages/dart/arity-metadata.d.ts +25 -0
  143. package/dist/core/ingestion/languages/dart/arity-metadata.js +35 -0
  144. package/dist/core/ingestion/languages/dart/arity.d.ts +19 -0
  145. package/dist/core/ingestion/languages/dart/arity.js +31 -0
  146. package/dist/core/ingestion/languages/dart/built-ins.d.ts +11 -0
  147. package/dist/core/ingestion/languages/dart/built-ins.js +34 -0
  148. package/dist/core/ingestion/languages/dart/cache-stats.d.ts +13 -0
  149. package/dist/core/ingestion/languages/dart/cache-stats.js +24 -0
  150. package/dist/core/ingestion/languages/dart/captures.d.ts +29 -0
  151. package/dist/core/ingestion/languages/dart/captures.js +445 -0
  152. package/dist/core/ingestion/languages/dart/expand-wildcards.d.ts +13 -0
  153. package/dist/core/ingestion/languages/dart/expand-wildcards.js +31 -0
  154. package/dist/core/ingestion/languages/dart/import-target.d.ts +15 -0
  155. package/dist/core/ingestion/languages/dart/import-target.js +65 -0
  156. package/dist/core/ingestion/languages/dart/index.d.ts +28 -0
  157. package/dist/core/ingestion/languages/dart/index.js +28 -0
  158. package/dist/core/ingestion/languages/dart/interpret.d.ts +24 -0
  159. package/dist/core/ingestion/languages/dart/interpret.js +95 -0
  160. package/dist/core/ingestion/languages/dart/merge-bindings.d.ts +10 -0
  161. package/dist/core/ingestion/languages/dart/merge-bindings.js +39 -0
  162. package/dist/core/ingestion/languages/dart/query.d.ts +26 -0
  163. package/dist/core/ingestion/languages/dart/query.js +142 -0
  164. package/dist/core/ingestion/languages/dart/receiver-binding.d.ts +24 -0
  165. package/dist/core/ingestion/languages/dart/receiver-binding.js +87 -0
  166. package/dist/core/ingestion/languages/dart/scope-resolver.d.ts +29 -0
  167. package/dist/core/ingestion/languages/dart/scope-resolver.js +194 -0
  168. package/dist/core/ingestion/languages/dart/signature-bindings.d.ts +23 -0
  169. package/dist/core/ingestion/languages/dart/signature-bindings.js +51 -0
  170. package/dist/core/ingestion/languages/dart/simple-hooks.d.ts +20 -0
  171. package/dist/core/ingestion/languages/dart/simple-hooks.js +47 -0
  172. package/dist/core/ingestion/languages/dart.d.ts +0 -1
  173. package/dist/core/ingestion/languages/dart.js +15 -29
  174. package/dist/core/ingestion/languages/go/arity-metadata.d.ts +1 -0
  175. package/dist/core/ingestion/languages/go/arity-metadata.js +31 -1
  176. package/dist/core/ingestion/languages/go/captures.js +162 -3
  177. package/dist/core/ingestion/languages/go/interface-impls.js +476 -50
  178. package/dist/core/ingestion/languages/go/interpret.js +21 -11
  179. package/dist/core/ingestion/languages/go/method-owners.js +20 -8
  180. package/dist/core/ingestion/languages/go/query.js +15 -7
  181. package/dist/core/ingestion/languages/go/range-binding.js +24 -9
  182. package/dist/core/ingestion/languages/go/receiver-binding.js +1 -1
  183. package/dist/core/ingestion/languages/go/scope-resolver.js +2 -2
  184. package/dist/core/ingestion/languages/go/simple-hooks.js +10 -5
  185. package/dist/core/ingestion/languages/go/type-binding.d.ts +1 -0
  186. package/dist/core/ingestion/languages/go/type-binding.js +40 -2
  187. package/dist/core/ingestion/languages/go.d.ts +0 -1
  188. package/dist/core/ingestion/languages/go.js +0 -5
  189. package/dist/core/ingestion/languages/index.d.ts +0 -5
  190. package/dist/core/ingestion/languages/index.js +0 -3
  191. package/dist/core/ingestion/languages/java/captures.js +252 -23
  192. package/dist/core/ingestion/languages/java/interpret.js +12 -6
  193. package/dist/core/ingestion/languages/java/package-siblings.js +18 -5
  194. package/dist/core/ingestion/languages/java/query.js +16 -1
  195. package/dist/core/ingestion/languages/java/scope-resolver.d.ts +2 -8
  196. package/dist/core/ingestion/languages/java/scope-resolver.js +2 -8
  197. package/dist/core/ingestion/languages/java.js +0 -5
  198. package/dist/core/ingestion/languages/javascript/captures.js +185 -11
  199. package/dist/core/ingestion/languages/javascript/query.js +107 -1
  200. package/dist/core/ingestion/languages/kotlin/capture-side-channel.d.ts +57 -0
  201. package/dist/core/ingestion/languages/kotlin/capture-side-channel.js +60 -0
  202. package/dist/core/ingestion/languages/kotlin/captures.js +213 -22
  203. package/dist/core/ingestion/languages/kotlin/companion-scopes.d.ts +7 -0
  204. package/dist/core/ingestion/languages/kotlin/companion-scopes.js +10 -0
  205. package/dist/core/ingestion/languages/kotlin/index.d.ts +1 -0
  206. package/dist/core/ingestion/languages/kotlin/index.js +1 -0
  207. package/dist/core/ingestion/languages/kotlin/query.js +30 -0
  208. package/dist/core/ingestion/languages/kotlin/scope-resolver.d.ts +5 -7
  209. package/dist/core/ingestion/languages/kotlin/scope-resolver.js +22 -7
  210. package/dist/core/ingestion/languages/kotlin.js +8 -5
  211. package/dist/core/ingestion/languages/php/captures.js +135 -19
  212. package/dist/core/ingestion/languages/php/import-decomposer.js +21 -63
  213. package/dist/core/ingestion/languages/php/index.d.ts +3 -4
  214. package/dist/core/ingestion/languages/php/index.js +3 -4
  215. package/dist/core/ingestion/languages/php/query.js +5 -0
  216. package/dist/core/ingestion/languages/php/receiver-binding.js +8 -4
  217. package/dist/core/ingestion/languages/php.js +0 -4
  218. package/dist/core/ingestion/languages/python/captures.js +128 -13
  219. package/dist/core/ingestion/languages/python/depends-references.js +1 -1
  220. package/dist/core/ingestion/languages/python/import-target.d.ts +4 -5
  221. package/dist/core/ingestion/languages/python/import-target.js +108 -16
  222. package/dist/core/ingestion/languages/python/index-stats.d.ts +18 -0
  223. package/dist/core/ingestion/languages/python/index-stats.js +25 -0
  224. package/dist/core/ingestion/languages/python/index.d.ts +3 -4
  225. package/dist/core/ingestion/languages/python/index.js +3 -4
  226. package/dist/core/ingestion/languages/python/query.js +17 -0
  227. package/dist/core/ingestion/languages/python/scope-resolver.js +7 -6
  228. package/dist/core/ingestion/languages/python.d.ts +0 -2
  229. package/dist/core/ingestion/languages/python.js +0 -7
  230. package/dist/core/ingestion/languages/ruby/captures.js +174 -31
  231. package/dist/core/ingestion/languages/ruby/import-target.js +2 -1
  232. package/dist/core/ingestion/languages/ruby/interpret.js +2 -1
  233. package/dist/core/ingestion/languages/ruby/query.js +10 -0
  234. package/dist/core/ingestion/languages/ruby/scope-resolver.js +61 -11
  235. package/dist/core/ingestion/languages/ruby.js +4 -53
  236. package/dist/core/ingestion/languages/rust/captures.js +95 -13
  237. package/dist/core/ingestion/languages/rust/query.js +64 -1
  238. package/dist/core/ingestion/languages/rust/range-binding.js +40 -12
  239. package/dist/core/ingestion/languages/rust/receiver-binding.js +9 -0
  240. package/dist/core/ingestion/languages/rust/scope-resolver.js +75 -1
  241. package/dist/core/ingestion/languages/rust.d.ts +0 -2
  242. package/dist/core/ingestion/languages/rust.js +0 -6
  243. package/dist/core/ingestion/languages/swift/arity-metadata.d.ts +24 -0
  244. package/dist/core/ingestion/languages/swift/arity-metadata.js +41 -0
  245. package/dist/core/ingestion/languages/swift/arity.d.ts +29 -0
  246. package/dist/core/ingestion/languages/swift/arity.js +42 -0
  247. package/dist/core/ingestion/languages/swift/base-type.d.ts +20 -0
  248. package/dist/core/ingestion/languages/swift/base-type.js +27 -0
  249. package/dist/core/ingestion/languages/swift/cache-stats.d.ts +15 -0
  250. package/dist/core/ingestion/languages/swift/cache-stats.js +26 -0
  251. package/dist/core/ingestion/languages/swift/captures.d.ts +35 -0
  252. package/dist/core/ingestion/languages/swift/captures.js +495 -0
  253. package/dist/core/ingestion/languages/swift/implicit-imports.d.ts +34 -0
  254. package/dist/core/ingestion/languages/swift/implicit-imports.js +57 -0
  255. package/dist/core/ingestion/languages/swift/import-decomposer.d.ts +24 -0
  256. package/dist/core/ingestion/languages/swift/import-decomposer.js +84 -0
  257. package/dist/core/ingestion/languages/swift/import-target.d.ts +33 -0
  258. package/dist/core/ingestion/languages/swift/import-target.js +81 -0
  259. package/dist/core/ingestion/languages/swift/index.d.ts +37 -0
  260. package/dist/core/ingestion/languages/swift/index.js +37 -0
  261. package/dist/core/ingestion/languages/swift/interpret.d.ts +15 -0
  262. package/dist/core/ingestion/languages/swift/interpret.js +89 -0
  263. package/dist/core/ingestion/languages/swift/merge-bindings.d.ts +20 -0
  264. package/dist/core/ingestion/languages/swift/merge-bindings.js +48 -0
  265. package/dist/core/ingestion/languages/swift/query.d.ts +46 -0
  266. package/dist/core/ingestion/languages/swift/query.js +194 -0
  267. package/dist/core/ingestion/languages/swift/receiver-binding.d.ts +40 -0
  268. package/dist/core/ingestion/languages/swift/receiver-binding.js +161 -0
  269. package/dist/core/ingestion/languages/swift/scope-resolver.d.ts +50 -0
  270. package/dist/core/ingestion/languages/swift/scope-resolver.js +189 -0
  271. package/dist/core/ingestion/languages/swift/sibling-type-bindings.d.ts +34 -0
  272. package/dist/core/ingestion/languages/swift/sibling-type-bindings.js +65 -0
  273. package/dist/core/ingestion/languages/swift/signature-bindings.d.ts +25 -0
  274. package/dist/core/ingestion/languages/swift/signature-bindings.js +66 -0
  275. package/dist/core/ingestion/languages/swift/simple-hooks.d.ts +37 -0
  276. package/dist/core/ingestion/languages/swift/simple-hooks.js +60 -0
  277. package/dist/core/ingestion/languages/swift/target-grouping.d.ts +51 -0
  278. package/dist/core/ingestion/languages/swift/target-grouping.js +93 -0
  279. package/dist/core/ingestion/languages/swift/target-siblings.d.ts +30 -0
  280. package/dist/core/ingestion/languages/swift/target-siblings.js +71 -0
  281. package/dist/core/ingestion/languages/swift.d.ts +0 -5
  282. package/dist/core/ingestion/languages/swift.js +11 -87
  283. package/dist/core/ingestion/languages/typescript/array-callback.d.ts +3 -29
  284. package/dist/core/ingestion/languages/typescript/array-callback.js +4 -43
  285. package/dist/core/ingestion/languages/typescript/captures.js +147 -17
  286. package/dist/core/ingestion/languages/typescript/index.d.ts +3 -4
  287. package/dist/core/ingestion/languages/typescript/index.js +3 -4
  288. package/dist/core/ingestion/languages/typescript/query.d.ts +2 -3
  289. package/dist/core/ingestion/languages/typescript/query.js +125 -4
  290. package/dist/core/ingestion/languages/typescript/receiver-binding.js +0 -1
  291. package/dist/core/ingestion/languages/typescript.d.ts +2 -3
  292. package/dist/core/ingestion/languages/typescript.js +46 -23
  293. package/dist/core/ingestion/languages/vue/captures.d.ts +46 -0
  294. package/dist/core/ingestion/languages/vue/captures.js +67 -0
  295. package/dist/core/ingestion/languages/vue/import-target.d.ts +27 -0
  296. package/dist/core/ingestion/languages/vue/import-target.js +58 -0
  297. package/dist/core/ingestion/languages/vue/index.d.ts +49 -0
  298. package/dist/core/ingestion/languages/vue/index.js +49 -0
  299. package/dist/core/ingestion/languages/vue/scope-resolver.d.ts +55 -0
  300. package/dist/core/ingestion/languages/vue/scope-resolver.js +292 -0
  301. package/dist/core/ingestion/languages/vue.js +12 -4
  302. package/dist/core/ingestion/local-symbol-pruner.d.ts +11 -0
  303. package/dist/core/ingestion/local-symbol-pruner.js +63 -0
  304. package/dist/core/ingestion/method-extractors/configs/dart.js +14 -1
  305. package/dist/core/ingestion/method-extractors/configs/jvm.js +37 -20
  306. package/dist/core/ingestion/method-extractors/configs/php.js +0 -1
  307. package/dist/core/ingestion/method-extractors/configs/swift.js +11 -4
  308. package/dist/core/ingestion/method-types.d.ts +2 -2
  309. package/dist/core/ingestion/model/index.d.ts +0 -3
  310. package/dist/core/ingestion/model/index.js +0 -8
  311. package/dist/core/ingestion/model/resolve.d.ts +7 -43
  312. package/dist/core/ingestion/model/resolve.js +7 -226
  313. package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +46 -1
  314. package/dist/core/ingestion/model/semantic-model.d.ts +4 -6
  315. package/dist/core/ingestion/model/semantic-model.js +1 -1
  316. package/dist/core/ingestion/model/symbol-table.d.ts +3 -4
  317. package/dist/core/ingestion/model/symbol-table.js +3 -4
  318. package/dist/core/ingestion/parsing-processor.d.ts +30 -24
  319. package/dist/core/ingestion/parsing-processor.js +76 -640
  320. package/dist/core/ingestion/pipeline-phases/communities.d.ts +1 -1
  321. package/dist/core/ingestion/pipeline-phases/communities.js +5 -2
  322. package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +9 -8
  323. package/dist/core/ingestion/pipeline-phases/cross-file.js +16 -12
  324. package/dist/core/ingestion/pipeline-phases/index.d.ts +1 -0
  325. package/dist/core/ingestion/pipeline-phases/index.js +1 -0
  326. package/dist/core/ingestion/pipeline-phases/mro.d.ts +1 -1
  327. package/dist/core/ingestion/pipeline-phases/mro.js +2 -2
  328. package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +44 -22
  329. package/dist/core/ingestion/pipeline-phases/parse-impl.js +426 -565
  330. package/dist/core/ingestion/pipeline-phases/parse.d.ts +13 -33
  331. package/dist/core/ingestion/pipeline-phases/parse.js +2 -2
  332. package/dist/core/ingestion/pipeline-phases/processes.d.ts +1 -1
  333. package/dist/core/ingestion/pipeline-phases/processes.js +5 -3
  334. package/dist/core/ingestion/pipeline-phases/prune-local-symbols.d.ts +14 -0
  335. package/dist/core/ingestion/pipeline-phases/prune-local-symbols.js +26 -0
  336. package/dist/core/ingestion/pipeline.d.ts +27 -19
  337. package/dist/core/ingestion/pipeline.js +4 -2
  338. package/dist/core/ingestion/resolve-references.js +15 -3
  339. package/dist/core/ingestion/route-extractors/laravel.d.ts +10 -0
  340. package/dist/core/ingestion/route-extractors/laravel.js +88 -9
  341. package/dist/core/ingestion/scope-extractor-bridge.d.ts +2 -1
  342. package/dist/core/ingestion/scope-extractor-bridge.js +2 -2
  343. package/dist/core/ingestion/scope-extractor.js +13 -0
  344. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +181 -15
  345. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +21 -10
  346. package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +10 -2
  347. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +7 -1
  348. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +58 -6
  349. package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +24 -5
  350. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +68 -1
  351. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +189 -29
  352. package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +21 -1
  353. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +1 -1
  354. package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +8 -11
  355. package/dist/core/ingestion/scope-resolution/pipeline/phase.js +171 -50
  356. package/dist/core/ingestion/scope-resolution/pipeline/registry.d.ts +3 -4
  357. package/dist/core/ingestion/scope-resolution/pipeline/registry.js +9 -4
  358. package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +28 -5
  359. package/dist/core/ingestion/scope-resolution/pipeline/run.js +191 -24
  360. package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +31 -0
  361. package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +72 -0
  362. package/dist/core/ingestion/scope-resolution/scope/walkers.js +440 -39
  363. package/dist/core/ingestion/scope-resolution/workspace-index.d.ts +18 -2
  364. package/dist/core/ingestion/scope-resolution/workspace-index.js +94 -7
  365. package/dist/core/ingestion/tree-sitter-queries.d.ts +14 -14
  366. package/dist/core/ingestion/tree-sitter-queries.js +380 -158
  367. package/dist/core/ingestion/ts-js-hoc-utils.d.ts +12 -0
  368. package/dist/core/ingestion/ts-js-hoc-utils.js +105 -0
  369. package/dist/core/ingestion/type-env.d.ts +2 -1
  370. package/dist/core/ingestion/type-env.js +6 -8
  371. package/dist/core/ingestion/type-extractors/c-cpp.js +8 -10
  372. package/dist/core/ingestion/type-extractors/csharp.js +18 -34
  373. package/dist/core/ingestion/type-extractors/go.js +2 -10
  374. package/dist/core/ingestion/type-extractors/jvm.js +6 -5
  375. package/dist/core/ingestion/type-extractors/php.js +1 -1
  376. package/dist/core/ingestion/type-extractors/python.js +1 -1
  377. package/dist/core/ingestion/type-extractors/ruby.js +2 -2
  378. package/dist/core/ingestion/type-extractors/rust.js +0 -16
  379. package/dist/core/ingestion/type-extractors/shared.d.ts +2 -2
  380. package/dist/core/ingestion/type-extractors/shared.js +25 -11
  381. package/dist/core/ingestion/type-extractors/swift.js +5 -5
  382. package/dist/core/ingestion/type-extractors/types.d.ts +1 -1
  383. package/dist/core/ingestion/type-extractors/typescript.js +1 -1
  384. package/dist/core/ingestion/utils/ast-helpers.d.ts +119 -1
  385. package/dist/core/ingestion/utils/ast-helpers.js +260 -13
  386. package/dist/core/ingestion/utils/callable-labels.d.ts +13 -0
  387. package/dist/core/ingestion/utils/callable-labels.js +14 -0
  388. package/dist/core/ingestion/utils/deferred-resolution-profile.d.ts +10 -0
  389. package/dist/core/ingestion/utils/deferred-resolution-profile.js +30 -0
  390. package/dist/core/ingestion/utils/heap-probe.d.ts +20 -0
  391. package/dist/core/ingestion/utils/heap-probe.js +39 -0
  392. package/dist/core/ingestion/utils/heritage-marker.d.ts +33 -0
  393. package/dist/core/ingestion/utils/heritage-marker.js +41 -0
  394. package/dist/core/ingestion/utils/qualified-name.d.ts +37 -0
  395. package/dist/core/ingestion/utils/qualified-name.js +67 -0
  396. package/dist/core/ingestion/variable-extractors/configs/c-cpp.js +49 -0
  397. package/dist/core/ingestion/variable-extractors/configs/dart.js +76 -62
  398. package/dist/core/ingestion/variable-extractors/configs/go.js +74 -7
  399. package/dist/core/ingestion/variable-extractors/configs/jvm.js +35 -8
  400. package/dist/core/ingestion/variable-extractors/generic.js +40 -12
  401. package/dist/core/ingestion/variable-types.d.ts +9 -0
  402. package/dist/core/ingestion/vue-sfc-extractor.d.ts +97 -7
  403. package/dist/core/ingestion/vue-sfc-extractor.js +433 -11
  404. package/dist/core/ingestion/workers/parse-worker.d.ts +0 -11
  405. package/dist/core/ingestion/workers/parse-worker.js +358 -187
  406. package/dist/core/ingestion/workers/worker-pool.d.ts +78 -9
  407. package/dist/core/ingestion/workers/worker-pool.js +346 -49
  408. package/dist/core/lbug/csv-generator.js +20 -2
  409. package/dist/core/lbug/lbug-adapter.js +29 -10
  410. package/dist/core/lbug/native-check.js +17 -5
  411. package/dist/core/lbug/pool-adapter.d.ts +0 -19
  412. package/dist/core/lbug/pool-adapter.js +40 -77
  413. package/dist/core/lbug/query-result-utils.d.ts +19 -0
  414. package/dist/core/lbug/query-result-utils.js +28 -0
  415. package/dist/core/run-analyze.d.ts +9 -2
  416. package/dist/core/run-analyze.js +24 -3
  417. package/dist/core/tree-sitter/parser-loader.d.ts +13 -0
  418. package/dist/core/tree-sitter/parser-loader.js +4 -0
  419. package/dist/core/tree-sitter/safe-parse.d.ts +70 -3
  420. package/dist/core/tree-sitter/safe-parse.js +214 -11
  421. package/dist/core/wiki/generator.js +13 -5
  422. package/dist/core/wiki/graph-queries.d.ts +3 -0
  423. package/dist/core/wiki/graph-queries.js +9 -1
  424. package/dist/core/wiki/llm-client.d.ts +1 -1
  425. package/dist/core/wiki/llm-client.js +7 -2
  426. package/dist/core/wiki/local-cli-client.d.ts +2 -1
  427. package/dist/core/wiki/local-cli-client.js +62 -4
  428. package/dist/mcp/compatible-stdio-transport.d.ts +3 -0
  429. package/dist/mcp/compatible-stdio-transport.js +22 -0
  430. package/dist/mcp/core/embedder.d.ts +1 -1
  431. package/dist/mcp/core/embedder.js +13 -1
  432. package/dist/mcp/local/local-backend.d.ts +37 -5
  433. package/dist/mcp/local/local-backend.js +227 -129
  434. package/dist/mcp/resources.js +3 -3
  435. package/dist/mcp/server.js +9 -1
  436. package/dist/storage/git.d.ts +11 -0
  437. package/dist/storage/git.js +30 -0
  438. package/dist/storage/parse-cache.d.ts +23 -1
  439. package/dist/storage/parse-cache.js +138 -32
  440. package/dist/storage/parsedfile-store.d.ts +142 -0
  441. package/dist/storage/parsedfile-store.js +367 -0
  442. package/dist/storage/repo-manager.d.ts +2 -1
  443. package/dist/storage/scope-index-store.d.ts +114 -0
  444. package/dist/storage/scope-index-store.js +236 -0
  445. package/dist/types/pipeline.d.ts +6 -3
  446. package/hooks/antigravity/gitnexus-antigravity-hook.cjs +2 -1
  447. package/hooks/claude/gitnexus-hook.cjs +2 -1
  448. package/hooks/claude/resolve-analyze-cmd.cjs +323 -0
  449. package/package.json +4 -5
  450. package/scripts/bench-scope-resolution.ts +1 -3
  451. package/scripts/cross-platform-tests.ts +4 -1
  452. package/skills/gitnexus-cli.md +8 -6
  453. package/skills/gitnexus-debugging.md +15 -15
  454. package/skills/gitnexus-exploring.md +11 -11
  455. package/skills/gitnexus-guide.md +1 -1
  456. package/skills/gitnexus-impact-analysis.md +10 -10
  457. package/skills/gitnexus-pr-review.md +19 -19
  458. package/skills/gitnexus-refactoring.md +25 -25
  459. package/web/assets/{agent-BRX-afm3.js → agent-EkX7webX.js} +156 -131
  460. package/web/assets/{architectureDiagram-UL44E2DR-B1oYB8-c.js → architectureDiagram-UL44E2DR-BoczH8cv.js} +1 -1
  461. package/web/assets/{chunk-LCXTWHL2-SPC6pgWI.js → chunk-LCXTWHL2-By5HB3b-.js} +1 -1
  462. package/web/assets/{chunk-RG4AUYOV-DZXr4Yv3.js → chunk-RG4AUYOV-BQE_DkpL.js} +1 -1
  463. package/web/assets/{classDiagram-KGZ6W3CR-BqpOj8L9.js → classDiagram-KGZ6W3CR-Dj_02GUH.js} +1 -1
  464. package/web/assets/{classDiagram-v2-72OJOZXJ-FmElywK2.js → classDiagram-v2-72OJOZXJ-D-NArMpf.js} +1 -1
  465. package/web/assets/{diagram-3NCE3AQN-BWtJXMDq.js → diagram-3NCE3AQN-VXtXDO95.js} +1 -1
  466. package/web/assets/{diagram-GF46GFSD-Hh-fChxU.js → diagram-GF46GFSD-B1qab2Ah.js} +1 -1
  467. package/web/assets/{diagram-QXG6HAR7-DYeQHxGU.js → diagram-QXG6HAR7-BSCHGzzT.js} +1 -1
  468. package/web/assets/{diagram-WEQXMOUZ-DYGU4T0y.js → diagram-WEQXMOUZ-DHtknmNT.js} +1 -1
  469. package/web/assets/{erDiagram-L5TCEMPS-bN3wlP2A.js → erDiagram-L5TCEMPS-Db-IYTmm.js} +1 -1
  470. package/web/assets/{flowDiagram-H6V6AXG4-YACVtF3-.js → flowDiagram-H6V6AXG4-BHDoyVoW.js} +1 -1
  471. package/web/assets/{index-BhnAdWTt.js → index-BR0IhgbR.js} +10 -10
  472. package/web/assets/{infoDiagram-3YFTVSEB-BWBzD28-.js → infoDiagram-3YFTVSEB-6h8wbWEe.js} +1 -1
  473. package/web/assets/{ishikawaDiagram-BNXS4ZKH-B8qYT-j9.js → ishikawaDiagram-BNXS4ZKH-Dx2OkPk1.js} +1 -1
  474. package/web/assets/{kanban-definition-75IXJCU3-BeoPr5Tl.js → kanban-definition-75IXJCU3-CIIEZfqV.js} +1 -1
  475. package/web/assets/{mindmap-definition-2TDM6QVE-CdLLN_so.js → mindmap-definition-2TDM6QVE-DUAqydRq.js} +1 -1
  476. package/web/assets/{pieDiagram-CU6KROY3-DEd2a_k_.js → pieDiagram-CU6KROY3-BntYuYZa.js} +1 -1
  477. package/web/assets/{requirementDiagram-JXO7QTGE-QNeTo5C_.js → requirementDiagram-JXO7QTGE-QCD6I29n.js} +1 -1
  478. package/web/assets/{sequenceDiagram-VS2MUI6T-BHC7q7yJ.js → sequenceDiagram-VS2MUI6T-DScFwLz2.js} +1 -1
  479. package/web/assets/{stateDiagram-7D4R322I-KONnc2Px.js → stateDiagram-7D4R322I-AkRAm6Hl.js} +1 -1
  480. package/web/assets/{stateDiagram-v2-36443NZ5-C2QfuMlu.js → stateDiagram-v2-36443NZ5-BCK1vigR.js} +1 -1
  481. package/web/assets/{timeline-definition-O6YCAMPW-D4t4NJx1.js → timeline-definition-O6YCAMPW-BvpIVXjX.js} +1 -1
  482. package/web/assets/{vennDiagram-MWXL3ELB-6bctC9Yg.js → vennDiagram-MWXL3ELB-BYGWk6dK.js} +1 -1
  483. package/web/assets/{wardleyDiagram-CUQ6CDDI-BPZYNTvC.js → wardleyDiagram-CUQ6CDDI-Dk1z7H2T.js} +1 -1
  484. package/web/assets/{xychartDiagram-N2JHSOCM-lBI9O6DW.js → xychartDiagram-N2JHSOCM-2N6NCSWN.js} +1 -1
  485. package/web/index.html +1 -1
  486. package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +0 -63
  487. package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +0 -1
  488. package/dist/_shared/scope-resolution/shadow/aggregate.js +0 -122
  489. package/dist/_shared/scope-resolution/shadow/aggregate.js.map +0 -1
  490. package/dist/_shared/scope-resolution/shadow/diff.d.ts +0 -59
  491. package/dist/_shared/scope-resolution/shadow/diff.d.ts.map +0 -1
  492. package/dist/_shared/scope-resolution/shadow/diff.js +0 -79
  493. package/dist/_shared/scope-resolution/shadow/diff.js.map +0 -1
  494. package/dist/core/ingestion/ast-cache.d.ts +0 -26
  495. package/dist/core/ingestion/ast-cache.js +0 -48
  496. package/dist/core/ingestion/heritage-extractors/configs/go.d.ts +0 -13
  497. package/dist/core/ingestion/heritage-extractors/configs/go.js +0 -20
  498. package/dist/core/ingestion/heritage-extractors/configs/ruby.d.ts +0 -18
  499. package/dist/core/ingestion/heritage-extractors/configs/ruby.js +0 -65
  500. package/dist/core/ingestion/heritage-extractors/generic.d.ts +0 -23
  501. package/dist/core/ingestion/heritage-extractors/generic.js +0 -47
  502. package/dist/core/ingestion/heritage-processor.d.ts +0 -54
  503. package/dist/core/ingestion/heritage-processor.js +0 -367
  504. package/dist/core/ingestion/heritage-types.d.ts +0 -73
  505. package/dist/core/ingestion/heritage-types.js +0 -2
  506. package/dist/core/ingestion/import-processor.d.ts +0 -23
  507. package/dist/core/ingestion/import-processor.js +0 -377
  508. package/dist/core/ingestion/model/heritage-map.d.ts +0 -105
  509. package/dist/core/ingestion/model/heritage-map.js +0 -294
  510. package/dist/core/ingestion/model/resolution-context.d.ts +0 -93
  511. package/dist/core/ingestion/model/resolution-context.js +0 -337
  512. package/dist/core/ingestion/named-bindings/csharp.d.ts +0 -3
  513. package/dist/core/ingestion/named-bindings/csharp.js +0 -37
  514. package/dist/core/ingestion/named-bindings/java.d.ts +0 -3
  515. package/dist/core/ingestion/named-bindings/java.js +0 -29
  516. package/dist/core/ingestion/named-bindings/kotlin.d.ts +0 -3
  517. package/dist/core/ingestion/named-bindings/kotlin.js +0 -36
  518. package/dist/core/ingestion/named-bindings/php.d.ts +0 -3
  519. package/dist/core/ingestion/named-bindings/php.js +0 -61
  520. package/dist/core/ingestion/named-bindings/python.d.ts +0 -3
  521. package/dist/core/ingestion/named-bindings/python.js +0 -49
  522. package/dist/core/ingestion/named-bindings/rust.d.ts +0 -3
  523. package/dist/core/ingestion/named-bindings/rust.js +0 -66
  524. package/dist/core/ingestion/named-bindings/types.d.ts +0 -16
  525. package/dist/core/ingestion/named-bindings/types.js +0 -6
  526. package/dist/core/ingestion/named-bindings/typescript.d.ts +0 -3
  527. package/dist/core/ingestion/named-bindings/typescript.js +0 -58
  528. package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +0 -17
  529. package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +0 -209
  530. package/dist/core/ingestion/pipeline-phases/orm-extraction.d.ts +0 -22
  531. package/dist/core/ingestion/pipeline-phases/orm-extraction.js +0 -92
  532. package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.d.ts +0 -70
  533. package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.js +0 -312
  534. package/dist/core/ingestion/registry-primary-flag.d.ts +0 -89
  535. package/dist/core/ingestion/registry-primary-flag.js +0 -122
  536. package/dist/core/ingestion/shadow-harness.d.ts +0 -113
  537. package/dist/core/ingestion/shadow-harness.js +0 -148
  538. package/dist/core/ingestion/utils/ruby-self-call.d.ts +0 -52
  539. package/dist/core/ingestion/utils/ruby-self-call.js +0 -59
  540. package/scripts/ci-list-migrated-languages.ts +0 -24
  541. package/scripts/run-parity.ts +0 -128
@@ -70,17 +70,6 @@ export class TypeScriptFieldExtractor extends BaseFieldExtractor {
70
70
  }
71
71
  }
72
72
  }
73
- // Check for modifier node (tree-sitter typescript may group these)
74
- const modifiers = node.childForFieldName('modifiers');
75
- if (modifiers) {
76
- for (let i = 0; i < modifiers.childCount; i++) {
77
- const modifier = modifiers.child(i);
78
- const modText = modifier?.text.trim();
79
- if (modText && TypeScriptFieldExtractor.VISIBILITY_MODIFIERS.has(modText)) {
80
- return modText;
81
- }
82
- }
83
- }
84
73
  // TypeScript class members are public by default
85
74
  return 'public';
86
75
  }
@@ -94,15 +83,6 @@ export class TypeScriptFieldExtractor extends BaseFieldExtractor {
94
83
  return true;
95
84
  }
96
85
  }
97
- const modifiers = node.childForFieldName('modifiers');
98
- if (modifiers) {
99
- for (let i = 0; i < modifiers.childCount; i++) {
100
- const modifier = modifiers.child(i);
101
- if (modifier && modifier.text === 'static') {
102
- return true;
103
- }
104
- }
105
- }
106
86
  return false;
107
87
  }
108
88
  /**
@@ -115,15 +95,6 @@ export class TypeScriptFieldExtractor extends BaseFieldExtractor {
115
95
  return true;
116
96
  }
117
97
  }
118
- const modifiers = node.childForFieldName('modifiers');
119
- if (modifiers) {
120
- for (let i = 0; i < modifiers.childCount; i++) {
121
- const modifier = modifiers.child(i);
122
- if (modifier && modifier.text === 'readonly') {
123
- return true;
124
- }
125
- }
126
- }
127
98
  return false;
128
99
  }
129
100
  /**
@@ -1,7 +1,3 @@
1
- export interface FileEntry {
2
- path: string;
3
- content: string;
4
- }
5
1
  /** Lightweight entry — path + size from stat, no content in memory */
6
2
  export interface ScannedFile {
7
3
  path: string;
@@ -21,8 +17,3 @@ export declare const walkRepositoryPaths: (repoPath: string, onProgress?: (curre
21
17
  * Returns a Map for O(1) lookup. Silently skips files that fail to read.
22
18
  */
23
19
  export declare const readFileContents: (repoPath: string, relativePaths: string[]) => Promise<Map<string, string>>;
24
- /**
25
- * Legacy API — scans and reads everything into memory.
26
- * Used by sequential fallback path only.
27
- */
28
- export declare const walkRepository: (repoPath: string, onProgress?: (current: number, total: number, filePath: string) => void) => Promise<FileEntry[]>;
@@ -111,14 +111,3 @@ export const readFileContents = async (repoPath, relativePaths) => {
111
111
  }
112
112
  return contents;
113
113
  };
114
- /**
115
- * Legacy API — scans and reads everything into memory.
116
- * Used by sequential fallback path only.
117
- */
118
- export const walkRepository = async (repoPath, onProgress) => {
119
- const scanned = await walkRepositoryPaths(repoPath, onProgress);
120
- const contents = await readFileContents(repoPath, scanned.map((f) => f.path));
121
- return scanned
122
- .filter((f) => contents.has(f.path))
123
- .map((f) => ({ path: f.path, content: contents.get(f.path) }));
124
- };
@@ -32,6 +32,8 @@
32
32
  * safely consult `model.scopes` without branching on presence.
33
33
  */
34
34
  import { buildDefIndex, buildMethodDispatchIndex, buildModuleScopeIndex, buildQualifiedNameIndex, buildScopeTree, finalize, } from '../../_shared/index.js';
35
+ import { parseTruthyEnv } from './utils/env.js';
36
+ import { TransitionalScopeTree } from '../../storage/scope-index-store.js';
35
37
  /**
36
38
  * Produce a fully materialized `ScopeResolutionIndexes` from the
37
39
  * workspace's per-file artifacts.
@@ -66,13 +68,19 @@ export function finalizeScopeModel(parsedFiles, options = {}) {
66
68
  allDefs.push(d);
67
69
  moduleEntries.push({ filePath: file.filePath, moduleScopeId: file.moduleScope });
68
70
  }
69
- const scopeTree = buildScopeTree(allScopes);
71
+ // Out-of-core scope index: when enabled, build a TransitionalScopeTree
72
+ // (validated + fully resident now; sealed to disk by run.ts just before emit so
73
+ // the heavy Scope.bindings payload is reclaimed). Default off → the in-heap
74
+ // buildScopeTree result exactly, byte-identical.
75
+ const scopeTree = parseTruthyEnv(process.env.GITNEXUS_DISK_SCOPE_INDEX)
76
+ ? new TransitionalScopeTree(allScopes)
77
+ : buildScopeTree(allScopes);
70
78
  const defs = buildDefIndex(allDefs);
71
79
  const qualifiedNames = buildQualifiedNameIndex(allDefs);
72
80
  const moduleScopes = buildModuleScopeIndex(moduleEntries);
73
81
  // ── Step 3: MethodDispatchIndex. Today we lack per-language MRO
74
82
  // strategies wired into this orchestrator (that belongs with the
75
- // HeritageMap bridge, a separate piece of work). Ship an EMPTY index
83
+ // MRO bridge, a separate piece of work). Ship an EMPTY index
76
84
  // so the bundle shape is consistent; the callbacks return `[]` for
77
85
  // every owner and `implementsOf` returns `[]`. Populating this
78
86
  // properly is tracked alongside the per-language provider hooks.
@@ -95,6 +103,10 @@ export function finalizeScopeModel(parsedFiles, options = {}) {
95
103
  // consumes the bundle. Most languages leave it empty.
96
104
  bindingAugmentations: new Map(),
97
105
  workspaceFqnBindings: new Map(),
106
+ workspaceTypeBindings: new Map(),
107
+ namespaceFqnBindings: new Map(),
108
+ namespaceTypeBindings: new Map(),
109
+ accessibleNamespacesByScope: new Map(),
98
110
  referenceSites: Object.freeze([...allReferenceSites]),
99
111
  sccs: finalizeOut.sccs,
100
112
  stats: finalizeOut.stats,
@@ -1,6 +1,27 @@
1
1
  /**
2
2
  * Swift import resolution config.
3
3
  * Package.swift target map strategy — no standard fallback (unresolved = external framework).
4
+ *
5
+ * ## Performance (anti-O(imports × files))
6
+ *
7
+ * The previous implementation rescanned the whole `normalizedFileList`
8
+ * on every import to collect the `.swift` files under the requested
9
+ * target's directory — O(imports × files) per run, the exact hot path
10
+ * fixed for Python in PR #1918. We now build a `target → files` index
11
+ * ONCE per run, memoized on the stable `allFileList` array reference
12
+ * (the same `ResolveCtx` — and therefore the same array — is passed to
13
+ * every strategy invocation, per `import-processor`'s build-once
14
+ * context). Lookup per import is then O(1).
15
+ *
16
+ * Behavior is preserved bit-for-bit: a file is attributed to a target
17
+ * iff its **forward-slash (backslash-normalized), case-sensitive** path
18
+ * starts with `<targetDir>/`, matching the old
19
+ * `normalizedFileList[i].startsWith(targetDir + '/')` comparison
20
+ * (`normalizedFileList` is only backslash→forward-slash normalized — NOT
21
+ * lowercased — so the match is case-sensitive); the returned paths are
22
+ * the original-case `allFileList` entries; and the per-target file ORDER
23
+ * follows `allFileList`, so the emitted `{ kind: 'files', files }` set and
24
+ * ordering are identical to the old scan.
4
25
  */
5
26
  import type { ImportResolutionConfig, ImportResolverStrategy } from '../types.js';
6
27
  /** Swift Package.swift target map resolution strategy. */
@@ -1,24 +1,85 @@
1
1
  /**
2
2
  * Swift import resolution config.
3
3
  * Package.swift target map strategy — no standard fallback (unresolved = external framework).
4
+ *
5
+ * ## Performance (anti-O(imports × files))
6
+ *
7
+ * The previous implementation rescanned the whole `normalizedFileList`
8
+ * on every import to collect the `.swift` files under the requested
9
+ * target's directory — O(imports × files) per run, the exact hot path
10
+ * fixed for Python in PR #1918. We now build a `target → files` index
11
+ * ONCE per run, memoized on the stable `allFileList` array reference
12
+ * (the same `ResolveCtx` — and therefore the same array — is passed to
13
+ * every strategy invocation, per `import-processor`'s build-once
14
+ * context). Lookup per import is then O(1).
15
+ *
16
+ * Behavior is preserved bit-for-bit: a file is attributed to a target
17
+ * iff its **forward-slash (backslash-normalized), case-sensitive** path
18
+ * starts with `<targetDir>/`, matching the old
19
+ * `normalizedFileList[i].startsWith(targetDir + '/')` comparison
20
+ * (`normalizedFileList` is only backslash→forward-slash normalized — NOT
21
+ * lowercased — so the match is case-sensitive); the returned paths are
22
+ * the original-case `allFileList` entries; and the per-target file ORDER
23
+ * follows `allFileList`, so the emitted `{ kind: 'files', files }` set and
24
+ * ordering are identical to the old scan.
4
25
  */
5
26
  import { SupportedLanguages } from '../../../../_shared/index.js';
27
+ /**
28
+ * Memoized on the `allFileList` array identity. `import-processor` builds
29
+ * the `ResolveCtx` once per run and threads the same object (and the same
30
+ * `allFileList`) through every strategy call, so the WeakMap is keyed on a
31
+ * stable reference and the index is built once — not once per import. A
32
+ * fresh run produces a fresh array → a fresh index, so cross-run staleness
33
+ * is impossible.
34
+ */
35
+ const SWIFT_TARGET_INDEX_CACHE = new WeakMap();
36
+ function getSwiftTargetIndex(ctx, targets) {
37
+ const key = ctx.allFileList;
38
+ const cached = SWIFT_TARGET_INDEX_CACHE.get(key);
39
+ if (cached !== undefined)
40
+ return cached;
41
+ // Pre-compute each target's directory prefix once (original case, to
42
+ // match the legacy comparison against the forward-slash-normalized,
43
+ // case-sensitive file list — see module docstring).
44
+ const targetPrefixes = [];
45
+ const byTarget = new Map();
46
+ for (const [name, dir] of targets) {
47
+ targetPrefixes.push({ name, prefix: dir + '/' });
48
+ byTarget.set(name, []);
49
+ }
50
+ // Single pass over the file list. `normalizedFileList` is forward-slash
51
+ // (backslash-normalized), case-sensitive, and index-aligned with
52
+ // `allFileList`; attribute the original-case path to every target whose
53
+ // prefix the normalized path starts with (a file under a nested target
54
+ // dir can legitimately belong to multiple configured targets — the
55
+ // legacy per-import scan would have returned it for each).
56
+ for (let i = 0; i < ctx.allFileList.length; i++) {
57
+ const norm = ctx.normalizedFileList[i];
58
+ if (!norm.endsWith('.swift'))
59
+ continue;
60
+ for (const { name, prefix } of targetPrefixes) {
61
+ if (norm.startsWith(prefix)) {
62
+ byTarget.get(name).push(ctx.allFileList[i]);
63
+ }
64
+ }
65
+ }
66
+ const index = { byTarget };
67
+ SWIFT_TARGET_INDEX_CACHE.set(key, index);
68
+ return index;
69
+ }
6
70
  /** Swift Package.swift target map resolution strategy. */
7
71
  export const swiftPackageStrategy = (rawImportPath, _filePath, ctx) => {
8
72
  const swiftPackageConfig = ctx.configs.swiftPackageConfig;
9
73
  if (swiftPackageConfig) {
10
- const targetDir = swiftPackageConfig.targets.get(rawImportPath);
11
- if (targetDir) {
12
- const dirPrefix = targetDir + '/';
13
- const files = [];
14
- for (let i = 0; i < ctx.normalizedFileList.length; i++) {
15
- if (ctx.normalizedFileList[i].startsWith(dirPrefix) &&
16
- ctx.normalizedFileList[i].endsWith('.swift')) {
17
- files.push(ctx.allFileList[i]);
18
- }
74
+ // Only the targets map is needed; build the index lazily so repos
75
+ // without a Package.swift config pay nothing.
76
+ if (swiftPackageConfig.targets.has(rawImportPath)) {
77
+ const index = getSwiftTargetIndex(ctx, swiftPackageConfig.targets);
78
+ const files = index.byTarget.get(rawImportPath);
79
+ if (files !== undefined && files.length > 0) {
80
+ // Copy so callers can't mutate the cached index bucket.
81
+ return { kind: 'files', files: [...files] };
19
82
  }
20
- if (files.length > 0)
21
- return { kind: 'files', files };
22
83
  }
23
84
  }
24
85
  return null; // External framework (Foundation, UIKit, etc.)
@@ -19,4 +19,4 @@
19
19
  *
20
20
  * Returns null to let the caller fall through to suffixResolve.
21
21
  */
22
- export declare function resolvePythonImportInternal(currentFile: string, importPath: string, allFiles: Set<string>): string | null;
22
+ export declare function resolvePythonImportInternal(currentFile: string, importPath: string, allFiles: ReadonlySet<string>): string | null;
@@ -17,8 +17,8 @@ export declare const RESOLVE_CACHE_CAP = 100000;
17
17
  * - TypeScript/JavaScript: rewrites tsconfig path aliases
18
18
  * - Rust: converts crate::/super::/self:: to relative paths
19
19
  *
20
- * Java wildcards and Go package imports are handled separately in processImports
21
- * because they resolve to multiple files.
20
+ * Java wildcards and Go package imports are handled by the scope-resolution
21
+ * phase because they resolve to multiple files.
22
22
  */
23
23
  export declare const resolveImportPath: (currentFile: string, importPath: string, allFiles: Set<string>, allFileList: string[], normalizedFileList: string[], resolveCache: Map<string, string | null>, language: SupportedLanguages, tsconfigPaths: TsconfigPaths | null, index?: SuffixIndex) => string | null;
24
24
  /**
@@ -16,8 +16,8 @@ export const RESOLVE_CACHE_CAP = 100_000;
16
16
  * - TypeScript/JavaScript: rewrites tsconfig path aliases
17
17
  * - Rust: converts crate::/super::/self:: to relative paths
18
18
  *
19
- * Java wildcards and Go package imports are handled separately in processImports
20
- * because they resolve to multiple files.
19
+ * Java wildcards and Go package imports are handled by the scope-resolution
20
+ * phase because they resolve to multiple files.
21
21
  */
22
22
  export const resolveImportPath = (currentFile, importPath, allFiles, allFileList, normalizedFileList, resolveCache, language, tsconfigPaths, index) => {
23
23
  const cacheKey = `${currentFile}::${importPath}`;
@@ -79,8 +79,8 @@ export const resolveImportPath = (currentFile, importPath, allFiles, allFileList
79
79
  else if (importPath.startsWith('{') && importPath.endsWith('}')) {
80
80
  // Top-level grouped imports: use {crate::a, crate::b}
81
81
  // Iterate each part and return the first that resolves. This function returns a single
82
- // string, so callers that need ALL edges must intercept before reaching here (see the
83
- // Rust grouped-import blocks in processImports / processImportsBatch). This fallback
82
+ // string, so callers that need ALL edges must intercept before reaching here (the
83
+ // scope-resolution phase handles Rust grouped-import blocks). This fallback
84
84
  // handles any path that reaches resolveImportPath directly.
85
85
  const inner = importPath.slice(1, -1);
86
86
  const parts = inner
@@ -128,7 +128,8 @@ export const resolveImportPath = (currentFile, importPath, allFiles, allFileList
128
128
  return cache(null);
129
129
  }
130
130
  // ---- Generic package/absolute import resolution (suffix matching) ----
131
- // Java wildcards are handled in processImports, not here
131
+ // Java wildcards are handled by the scope-resolution phase, not here; this
132
+ // resolver returns null for `.*` so it never produces a single-file match.
132
133
  if (importPath.endsWith('.*')) {
133
134
  return cache(null);
134
135
  }
@@ -1,6 +1,5 @@
1
1
  /**
2
- * Shared utilities for import resolution.
3
- * Extracted from import-processor.ts to reduce file size.
2
+ * Suffix-index helpers for import path resolution.
4
3
  */
5
4
  /** All file extensions to try during resolution */
6
5
  export declare const EXTENSIONS: string[];
@@ -8,7 +7,7 @@ export declare const EXTENSIONS: string[];
8
7
  * Try to match a path (with extensions) against the known file set.
9
8
  * Returns the matched file path or null.
10
9
  */
11
- export declare function tryResolveWithExtensions(basePath: string, allFiles: Set<string>): string | null;
10
+ export declare function tryResolveWithExtensions(basePath: string, allFiles: ReadonlySet<string>): string | null;
12
11
  /**
13
12
  * Build a suffix index for O(1) endsWith lookups.
14
13
  * Maps every possible path suffix to its original file path.
@@ -26,8 +25,6 @@ export interface SuffixIndex {
26
25
  /** Get all files in a directory suffix */
27
26
  getFilesInDir(dirSuffix: string, extension: string): string[];
28
27
  }
29
- /** Sentinel index that returns no results. Used to release memory after import resolution. */
30
- export declare const EMPTY_INDEX: SuffixIndex;
31
28
  export declare function buildSuffixIndex(normalizedFileList: string[], allFileList: string[]): SuffixIndex;
32
29
  /**
33
30
  * Suffix-based resolution using index. O(1) per lookup instead of O(files).
@@ -1,6 +1,5 @@
1
1
  /**
2
- * Shared utilities for import resolution.
3
- * Extracted from import-processor.ts to reduce file size.
2
+ * Suffix-index helpers for import path resolution.
4
3
  */
5
4
  /** All file extensions to try during resolution */
6
5
  export const EXTENSIONS = [
@@ -63,13 +62,6 @@ export function tryResolveWithExtensions(basePath, allFiles) {
63
62
  }
64
63
  return null;
65
64
  }
66
- const FROZEN_EMPTY_ARRAY = Object.freeze([]);
67
- /** Sentinel index that returns no results. Used to release memory after import resolution. */
68
- export const EMPTY_INDEX = Object.freeze({
69
- get: () => undefined,
70
- getInsensitive: () => undefined,
71
- getFilesInDir: () => FROZEN_EMPTY_ARRAY,
72
- });
73
65
  export function buildSuffixIndex(normalizedFileList, allFileList) {
74
66
  // Map: normalized suffix -> original file path
75
67
  const exactMap = new Map();
@@ -11,38 +11,17 @@
11
11
  import type { SupportedLanguages, MroStrategy, CaptureMatch, BindingRef, TypeRef, Scope, ScopeId, ScopeKind, ScopeTree, ParsedImport, ParsedTypeBinding, SymbolDefinition, Callsite, WorkspaceIndex } from '../../_shared/index.js';
12
12
  import type { LanguageTypeConfig } from './type-extractors/types.js';
13
13
  import type { CallRouter } from './call-routing.js';
14
- import type { CallExtractor, DispatchDecision, ImplicitReceiverOverride, ReceiverEnriched } from './call-types.js';
14
+ import type { CallExtractor } from './call-types.js';
15
15
  import type { ClassExtractor } from './class-types.js';
16
16
  import type { ExportChecker } from './export-detection.js';
17
17
  import type { FieldExtractor } from './field-extractor.js';
18
- import type { HeritageExtractor } from './heritage-types.js';
19
18
  import type { MethodExtractor } from './method-types.js';
20
19
  import type { VariableExtractor } from './variable-types.js';
21
20
  import type { ImportResolverFn } from './import-resolvers/types.js';
22
- import type { NamedBindingExtractorFn } from './named-bindings/types.js';
23
21
  import type { SyntaxNode } from './utils/ast-helpers.js';
24
22
  import type { NodeLabel } from '../../_shared/index.js';
25
23
  /** Tree-sitter query captures: capture name → AST node (or undefined if not captured). */
26
24
  export type CaptureMap = Record<string, SyntaxNode | undefined>;
27
- /**
28
- * How a language handles imports — determines wildcard synthesis behavior.
29
- *
30
- * Import resolution is a graph-traversal policy with multiple distinct strategies,
31
- * analogous to MRO for method resolution. Each tag picks a strategy:
32
- *
33
- * | Tag | Mechanism | Traversal | Languages |
34
- * |-----------------------|------------------------------------------------|---------------------|--------------------------------------------|
35
- * | `named` | Per-symbol imports | None (use-site) | JS/TS, Java, C#, Rust, PHP, Kotlin, Vue |
36
- * | `wildcard-transitive` | Textual paste, symbols chain through files | BFS closure | C, C++ (future: Obj-C, Fortran, Nim) |
37
- * | `wildcard-leaf` | Whole public API, single hop | None (direct only) | Go, Ruby, Swift, Dart |
38
- * | `namespace` | Qualified handle; symbols resolved at call site| None at import | Python |
39
- * | `explicit-reexport` | Opt-in per-symbol re-export (SCAFFOLD) | Topological DAG | (future: TS `export *`, Rust `pub use`) |
40
- *
41
- * The `explicit-reexport` tag is a compile-time scaffold; no provider claims it yet.
42
- * It falls through to `wildcard-leaf` behavior in synthesis so today's TS/Rust
43
- * handling is unchanged. A future PR will implement the DAG walk for `export *`.
44
- */
45
- export type ImportSemantics = 'named' | 'wildcard-transitive' | 'wildcard-leaf' | 'namespace' | 'explicit-reexport';
46
25
  /** Configuration for AST-based framework detection patterns. */
47
26
  export interface AstFrameworkPatternConfig {
48
27
  framework: string;
@@ -115,26 +94,10 @@ interface LanguageProviderConfig {
115
94
  /** Call routing for languages that express imports/heritage as calls (e.g., Ruby).
116
95
  * Default: no routing (all calls are normal call expressions). */
117
96
  readonly callRouter?: CallRouter;
118
- /** Named binding extraction from import statements.
119
- * Default: undefined (language uses wildcard/whole-module imports). */
120
- readonly namedBindingExtractor?: NamedBindingExtractorFn;
121
- /** How this language handles imports. See `ImportSemantics` for the full taxonomy.
122
- * - 'named': per-symbol imports (JS/TS, Java, C#, Rust, PHP, Kotlin)
123
- * - 'wildcard-transitive': textual-include closure; imports chain through files (C, C++)
124
- * - 'wildcard-leaf': whole-module single-hop imports; no transitive chaining (Go, Ruby, Swift, Dart)
125
- * - 'namespace': qualified namespace imports, needs moduleAliasMap (Python)
126
- * - 'explicit-reexport': opt-in per-symbol re-export (scaffold; no provider uses yet)
127
- * Default: 'named'. */
128
- readonly importSemantics?: ImportSemantics;
129
97
  /** Language-specific transformation of raw import path text before resolution.
130
98
  * Called after sanitization. E.g., Kotlin appends wildcard suffixes.
131
99
  * Default: undefined (no preprocessing). */
132
100
  readonly importPathPreprocessor?: (cleaned: string, importNode: SyntaxNode) => string;
133
- /** Wire implicit inter-file imports for languages where all files in a module
134
- * see each other (e.g., Swift targets, C header inclusion units).
135
- * Called with only THIS language's files (pre-grouped by the processor).
136
- * Default: undefined (no implicit imports). */
137
- readonly implicitImportWirer?: (languageFiles: string[], importMap: ReadonlyMap<string, ReadonlySet<string>>, addImportEdge: (src: string, target: string) => void, projectConfig: unknown) => void;
138
101
  /** Resolve a container node during enclosing-owner tree walks.
139
102
  * Called when a CLASS_CONTAINER_TYPES node is found while walking up.
140
103
  * - Return a different SyntaxNode to remap the container (e.g., Ruby
@@ -189,12 +152,6 @@ interface LanguageProviderConfig {
189
152
  * (e.g., 'Method' for Kotlin), or defaultLabel to keep as-is.
190
153
  * Default: undefined (standard label assignment). */
191
154
  readonly labelOverride?: (functionNode: SyntaxNode, defaultLabel: NodeLabel) => NodeLabel | null;
192
- /** Default edge type when parent symbol is ambiguous (interface vs class).
193
- * Default: 'EXTENDS'. */
194
- readonly heritageDefaultEdge?: 'EXTENDS' | 'IMPLEMENTS';
195
- /** Regex to detect interface names by convention (e.g., /^I[A-Z]/ for C#/Java).
196
- * When matched, IMPLEMENTS edge is used instead of heritageDefaultEdge. */
197
- readonly interfaceNamePattern?: RegExp;
198
155
  /** MRO strategy for multiple inheritance resolution.
199
156
  * Default: 'first-wins'. */
200
157
  readonly mroStrategy?: MroStrategy;
@@ -220,13 +177,6 @@ interface LanguageProviderConfig {
220
177
  * Uses the same provider-driven strategy pattern as method/field extraction so
221
178
  * namespace/package/module rules stay language-specific. */
222
179
  readonly classExtractor?: ClassExtractor;
223
- /** Heritage extractor for extracting extends/implements/trait-impl relationships
224
- * from tree-sitter @heritage.* captures and call-based heritage (e.g., Ruby
225
- * include/extend/prepend). Produced by createHeritageExtractor() — pass a
226
- * SupportedLanguages value for default behaviour or a full
227
- * HeritageExtractionConfig for languages with custom hooks (Go, Ruby).
228
- * All tree-sitter providers MUST supply this. */
229
- readonly heritageExtractor?: HeritageExtractor;
230
180
  /** Extract a semantic description for a definition node (e.g., PHP Eloquent
231
181
  * property arrays, relation method descriptions).
232
182
  * Default: undefined (no description extraction). */
@@ -235,66 +185,6 @@ interface LanguageProviderConfig {
235
185
  * When true, the worker extracts routes via the language's route extraction logic.
236
186
  * Default: undefined (no route files). */
237
187
  readonly isRouteFile?: (filePath: string) => boolean;
238
- /**
239
- * DAG stage 3 hook: synthesize an implicit receiver when the call site omits one.
240
- *
241
- * Runs after shared inference (TypeEnv → constructor-map → class-as-receiver →
242
- * mixed-chain). Return an `ImplicitReceiverOverride` to overlay all fields onto
243
- * `ReceiverEnriched`; return null to keep current state and proceed to stage 4.
244
- *
245
- * Constraints: MUST return null when an explicit receiver is already set, at
246
- * top-level scope, or for built-in methods. Do not mutate input params.
247
- * `hint` is opaque to shared stages; consumed by this language's `selectDispatch`.
248
- *
249
- * Ruby example: bare `serialize` in `Account#call_serialize` →
250
- * `{ callForm: 'member', receiverName: 'self', receiverTypeName: 'Account',
251
- * receiverSource: 'implicit-self', hint: 'instance' }`
252
- *
253
- * @see call-types.ts § ImplicitReceiverOverride
254
- * @see selectDispatch (stage 4, reads the hint)
255
- *
256
- * Default: undefined (no implicit-receiver inference).
257
- */
258
- readonly inferImplicitReceiver?: (params: {
259
- readonly calledName: string;
260
- readonly callForm: 'free' | 'member' | 'constructor' | undefined;
261
- readonly receiverName: string | undefined;
262
- readonly receiverTypeName: string | undefined;
263
- readonly callNode: SyntaxNode;
264
- readonly filePath: string;
265
- }) => ImplicitReceiverOverride | null;
266
- /**
267
- * DAG stage 4 hook: decide dispatch strategy (primary path, fallback, MRO view).
268
- *
269
- * Runs after stage 3. Return a `DispatchDecision` to override shared defaults;
270
- * return null to use `defaultDispatchDecision` (constructor→`'constructor'`,
271
- * member→`'owner-scoped'`, free→`'free'`). Most languages return null.
272
- *
273
- * The hook is responsible for its own gating. `ancestryView` only affects
274
- * `'ruby-mixin'` strategy. Singleton-ancestry miss NEVER falls through to
275
- * file-scoped fallback in stage 5 (enforced in resolveCallTarget).
276
- *
277
- * Ruby examples:
278
- * - `receiverSource='implicit-self', hint='instance'` →
279
- * `{primary: 'owner-scoped', fallback: 'free-arity-narrowed', ancestryView: 'instance'}`
280
- * - `receiverSource='class-as-receiver'` →
281
- * `{primary: 'owner-scoped', ancestryView: 'singleton'}` (miss null-routes)
282
- * - `receiverSource='implicit-self', hint='singleton'` →
283
- * `{primary: 'owner-scoped', fallback: 'free-arity-narrowed', ancestryView: 'singleton'}`
284
- *
285
- * @see call-types.ts § DispatchDecision
286
- * @see call-processor.ts § defaultDispatchDecision, resolveCallTarget
287
- *
288
- * Default: undefined (use `defaultDispatchDecision`).
289
- */
290
- readonly selectDispatch?: (params: {
291
- readonly calledName: string;
292
- readonly callForm: 'free' | 'member' | 'constructor' | undefined;
293
- readonly receiverName: string | undefined;
294
- readonly receiverTypeName: string | undefined;
295
- readonly receiverSource: ReceiverEnriched['receiverSource'];
296
- readonly hint: string | undefined;
297
- }) => DispatchDecision | null;
298
188
  /** Built-in/stdlib names that should be filtered from the call graph for this language.
299
189
  * Default: undefined (no language-specific filtering). */
300
190
  readonly builtInNames?: ReadonlySet<string>;
@@ -315,9 +205,8 @@ interface LanguageProviderConfig {
315
205
  * routing (scope / declaration / import / type-binding / reference)
316
206
  * lands on coherent records.
317
207
  *
318
- * Required for any provider participating in scope-based resolution.
319
- * Providers that have not yet migrated continue to run through the
320
- * legacy DAG path (feature-flagged per `REGISTRY_PRIMARY_<LANG>`).
208
+ * Required for any provider participating in scope-based resolution
209
+ * (the sole resolution path).
321
210
  *
322
211
  * **Sync return.** Tree-sitter query execution and COBOL's regex
323
212
  * tagger are both synchronous; no current or foreseeable provider
@@ -325,7 +214,7 @@ interface LanguageProviderConfig {
325
214
  * `parse-worker.ts` (#920) invoke it inline in its already-sync
326
215
  * per-file loop without cascading `async` through the batch pipeline.
327
216
  *
328
- * Default: undefined (language continues to use legacy DAG).
217
+ * Default: undefined (no scope-based captures emitted for this language).
329
218
  */
330
219
  readonly emitScopeCaptures?: (sourceText: string, filePath: string,
331
220
  /**
@@ -338,7 +227,40 @@ interface LanguageProviderConfig {
338
227
  * Cache miss (parameter omitted or undefined) is always safe and
339
228
  * MUST trigger a fresh parse.
340
229
  */
341
- cachedTree?: unknown) => readonly CaptureMatch[];
230
+ cachedTree?: unknown,
231
+ /**
232
+ * Optional metadata about how `sourceText` was produced.
233
+ *
234
+ * Most providers ignore this and treat `sourceText` as full file content.
235
+ * Vue uses it to distinguish:
236
+ * - `full-file`: full `.vue` SFC source
237
+ * - `pre-extracted-script`: worker-preprocessed bare `<script>` content
238
+ *
239
+ * Default: `{ sourceKind: 'full-file' }`.
240
+ */
241
+ sourceMeta?: {
242
+ readonly sourceKind?: 'full-file' | 'pre-extracted-script';
243
+ }) => readonly CaptureMatch[];
244
+ /**
245
+ * Snapshot the capture-time side-channel state that this provider's
246
+ * `emitScopeCaptures` just populated for `filePath` into module-level maps,
247
+ * returning a plain JSON-serializable value (or `undefined` when there is
248
+ * nothing to carry).
249
+ *
250
+ * Called in the parse worker IMMEDIATELY after `emitScopeCaptures` runs for
251
+ * a file (see `parse-worker.ts`), and the result is stored on the produced
252
+ * `ParsedFile.captureSideChannel`. Scope-resolution on the main thread reuses
253
+ * that serialized `ParsedFile` and skips re-extraction (#1983), so this hook
254
+ * is how the worker-computed marks survive the worker→main boundary and the
255
+ * disk store WITHOUT a main-thread re-parse. The main thread restores them
256
+ * via the matching `ScopeResolver.applyCaptureSideChannel` hook.
257
+ *
258
+ * MUST return plain data (objects / arrays / primitives) so it round-trips
259
+ * through `JSON.stringify` + the parsedfile-store interning reviver.
260
+ *
261
+ * Default: undefined (provider has no capture-time module-level side effects).
262
+ */
263
+ readonly collectCaptureSideChannel?: (filePath: string) => unknown;
342
264
  /**
343
265
  * Interpret a raw `@import.statement` capture group into a `ParsedImport`.
344
266
  * The central finalize algorithm resolves `ParsedImport.targetRaw` to a
@@ -482,9 +404,7 @@ interface LanguageProviderConfig {
482
404
  readonly arityCompatibility?: (def: SymbolDefinition, callsite: Callsite) => 'compatible' | 'unknown' | 'incompatible';
483
405
  }
484
406
  /** Runtime type — same as LanguageProviderConfig but with defaults guaranteed present. */
485
- export interface LanguageProvider extends Omit<LanguageProviderConfig, 'importSemantics' | 'heritageDefaultEdge' | 'mroStrategy'> {
486
- readonly importSemantics: ImportSemantics;
487
- readonly heritageDefaultEdge: 'EXTENDS' | 'IMPLEMENTS';
407
+ export interface LanguageProvider extends Omit<LanguageProviderConfig, 'mroStrategy'> {
488
408
  readonly mroStrategy: MroStrategy;
489
409
  /** Check if a name is a built-in/stdlib function that should be filtered from the call graph. */
490
410
  readonly isBuiltInName: (name: string) => boolean;
@@ -9,8 +9,6 @@
9
9
  * so adding a language to the enum without creating a provider is a compiler error.
10
10
  */
11
11
  const DEFAULTS = {
12
- importSemantics: 'named',
13
- heritageDefaultEdge: 'EXTENDS',
14
12
  mroStrategy: 'first-wins',
15
13
  };
16
14
  /** Define a language provider — required fields must be supplied, optional fields get sensible defaults. */