gitnexus 1.6.5-rc.8 → 1.6.5

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 (335) hide show
  1. package/dist/_shared/scope-resolution/finalize-algorithm.js +10 -2
  2. package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -1
  3. package/dist/_shared/scope-resolution/method-dispatch-index.d.ts +26 -0
  4. package/dist/_shared/scope-resolution/method-dispatch-index.d.ts.map +1 -1
  5. package/dist/_shared/scope-resolution/method-dispatch-index.js +22 -3
  6. package/dist/_shared/scope-resolution/method-dispatch-index.js.map +1 -1
  7. package/dist/_shared/scope-resolution/registries/lookup-core.js +18 -1
  8. package/dist/_shared/scope-resolution/registries/lookup-core.js.map +1 -1
  9. package/dist/_shared/scope-resolution/symbol-definition.d.ts +2 -0
  10. package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -1
  11. package/dist/cli/ai-context.d.ts +1 -0
  12. package/dist/cli/ai-context.js +70 -16
  13. package/dist/cli/analyze.d.ts +30 -2
  14. package/dist/cli/analyze.js +45 -5
  15. package/dist/cli/index.js +8 -1
  16. package/dist/cli/setup.js +18 -0
  17. package/dist/cli/wiki.d.ts +2 -0
  18. package/dist/cli/wiki.js +11 -0
  19. package/dist/core/augmentation/engine.js +24 -4
  20. package/dist/core/embeddings/http-client.js +22 -6
  21. package/dist/core/incremental/shadow-candidates.d.ts +44 -0
  22. package/dist/core/incremental/shadow-candidates.js +74 -0
  23. package/dist/core/incremental/subgraph-extract.d.ts +64 -0
  24. package/dist/core/incremental/subgraph-extract.js +111 -0
  25. package/dist/core/ingestion/call-processor.d.ts +12 -1
  26. package/dist/core/ingestion/call-processor.js +183 -47
  27. package/dist/core/ingestion/class-extractors/configs/c-cpp.js +38 -0
  28. package/dist/core/ingestion/class-extractors/generic.js +8 -0
  29. package/dist/core/ingestion/class-types.d.ts +15 -0
  30. package/dist/core/ingestion/community-processor.js +18 -0
  31. package/dist/core/ingestion/import-resolvers/standard.d.ts +5 -0
  32. package/dist/core/ingestion/import-resolvers/standard.js +31 -1
  33. package/dist/core/ingestion/import-resolvers/utils.js +4 -0
  34. package/dist/core/ingestion/languages/c-cpp.js +20 -2
  35. package/dist/core/ingestion/languages/cpp/adl.d.ts +141 -0
  36. package/dist/core/ingestion/languages/cpp/adl.js +478 -0
  37. package/dist/core/ingestion/languages/cpp/arity-metadata.d.ts +18 -0
  38. package/dist/core/ingestion/languages/cpp/arity-metadata.js +170 -0
  39. package/dist/core/ingestion/languages/cpp/arity.d.ts +17 -0
  40. package/dist/core/ingestion/languages/cpp/arity.js +31 -0
  41. package/dist/core/ingestion/languages/cpp/captures.d.ts +2 -0
  42. package/dist/core/ingestion/languages/cpp/captures.js +1131 -0
  43. package/dist/core/ingestion/languages/cpp/conversion-rank.d.ts +31 -0
  44. package/dist/core/ingestion/languages/cpp/conversion-rank.js +47 -0
  45. package/dist/core/ingestion/languages/cpp/file-local-linkage.d.ts +118 -0
  46. package/dist/core/ingestion/languages/cpp/file-local-linkage.js +266 -0
  47. package/dist/core/ingestion/languages/cpp/header-scan.d.ts +8 -0
  48. package/dist/core/ingestion/languages/cpp/header-scan.js +50 -0
  49. package/dist/core/ingestion/languages/cpp/import-decomposer.d.ts +19 -0
  50. package/dist/core/ingestion/languages/cpp/import-decomposer.js +111 -0
  51. package/dist/core/ingestion/languages/cpp/import-target.d.ts +10 -0
  52. package/dist/core/ingestion/languages/cpp/import-target.js +13 -0
  53. package/dist/core/ingestion/languages/cpp/index.d.ts +11 -0
  54. package/dist/core/ingestion/languages/cpp/index.js +11 -0
  55. package/dist/core/ingestion/languages/cpp/inline-namespaces.d.ts +67 -0
  56. package/dist/core/ingestion/languages/cpp/inline-namespaces.js +176 -0
  57. package/dist/core/ingestion/languages/cpp/interpret.d.ts +35 -0
  58. package/dist/core/ingestion/languages/cpp/interpret.js +113 -0
  59. package/dist/core/ingestion/languages/cpp/merge-bindings.d.ts +13 -0
  60. package/dist/core/ingestion/languages/cpp/merge-bindings.js +29 -0
  61. package/dist/core/ingestion/languages/cpp/query.d.ts +3 -0
  62. package/dist/core/ingestion/languages/cpp/query.js +508 -0
  63. package/dist/core/ingestion/languages/cpp/range-bindings.d.ts +20 -0
  64. package/dist/core/ingestion/languages/cpp/range-bindings.js +212 -0
  65. package/dist/core/ingestion/languages/cpp/scope-resolver.d.ts +17 -0
  66. package/dist/core/ingestion/languages/cpp/scope-resolver.js +246 -0
  67. package/dist/core/ingestion/languages/cpp/simple-hooks.d.ts +24 -0
  68. package/dist/core/ingestion/languages/cpp/simple-hooks.js +62 -0
  69. package/dist/core/ingestion/languages/cpp/two-phase-lookup.d.ts +76 -0
  70. package/dist/core/ingestion/languages/cpp/two-phase-lookup.js +195 -0
  71. package/dist/core/ingestion/languages/java/arity-metadata.d.ts +18 -0
  72. package/dist/core/ingestion/languages/java/arity-metadata.js +40 -0
  73. package/dist/core/ingestion/languages/java/arity.d.ts +10 -0
  74. package/dist/core/ingestion/languages/java/arity.js +24 -0
  75. package/dist/core/ingestion/languages/java/cache-stats.d.ts +15 -0
  76. package/dist/core/ingestion/languages/java/cache-stats.js +26 -0
  77. package/dist/core/ingestion/languages/java/captures.d.ts +17 -0
  78. package/dist/core/ingestion/languages/java/captures.js +187 -0
  79. package/dist/core/ingestion/languages/java/import-decomposer.d.ts +18 -0
  80. package/dist/core/ingestion/languages/java/import-decomposer.js +85 -0
  81. package/dist/core/ingestion/languages/java/import-target.d.ts +17 -0
  82. package/dist/core/ingestion/languages/java/import-target.js +100 -0
  83. package/dist/core/ingestion/languages/java/index.d.ts +29 -0
  84. package/dist/core/ingestion/languages/java/index.js +29 -0
  85. package/dist/core/ingestion/languages/java/interpret.d.ts +13 -0
  86. package/dist/core/ingestion/languages/java/interpret.js +131 -0
  87. package/dist/core/ingestion/languages/java/merge-bindings.d.ts +12 -0
  88. package/dist/core/ingestion/languages/java/merge-bindings.js +40 -0
  89. package/dist/core/ingestion/languages/java/query.d.ts +30 -0
  90. package/dist/core/ingestion/languages/java/query.js +192 -0
  91. package/dist/core/ingestion/languages/java/receiver-binding.d.ts +11 -0
  92. package/dist/core/ingestion/languages/java/receiver-binding.js +95 -0
  93. package/dist/core/ingestion/languages/java/scope-resolver.d.ts +50 -0
  94. package/dist/core/ingestion/languages/java/scope-resolver.js +74 -0
  95. package/dist/core/ingestion/languages/java/simple-hooks.d.ts +13 -0
  96. package/dist/core/ingestion/languages/java/simple-hooks.js +34 -0
  97. package/dist/core/ingestion/languages/java.js +11 -0
  98. package/dist/core/ingestion/languages/php/arity-metadata.d.ts +28 -0
  99. package/dist/core/ingestion/languages/php/arity-metadata.js +63 -0
  100. package/dist/core/ingestion/languages/php/arity.d.ts +25 -0
  101. package/dist/core/ingestion/languages/php/arity.js +40 -0
  102. package/dist/core/ingestion/languages/php/cache-stats.d.ts +15 -0
  103. package/dist/core/ingestion/languages/php/cache-stats.js +26 -0
  104. package/dist/core/ingestion/languages/php/captures.d.ts +34 -0
  105. package/dist/core/ingestion/languages/php/captures.js +739 -0
  106. package/dist/core/ingestion/languages/php/import-decomposer.d.ts +28 -0
  107. package/dist/core/ingestion/languages/php/import-decomposer.js +265 -0
  108. package/dist/core/ingestion/languages/php/import-target.d.ts +47 -0
  109. package/dist/core/ingestion/languages/php/import-target.js +100 -0
  110. package/dist/core/ingestion/languages/php/index.d.ts +68 -0
  111. package/dist/core/ingestion/languages/php/index.js +72 -0
  112. package/dist/core/ingestion/languages/php/interpret.d.ts +36 -0
  113. package/dist/core/ingestion/languages/php/interpret.js +241 -0
  114. package/dist/core/ingestion/languages/php/merge-bindings.d.ts +19 -0
  115. package/dist/core/ingestion/languages/php/merge-bindings.js +47 -0
  116. package/dist/core/ingestion/languages/php/namespace-siblings.d.ts +51 -0
  117. package/dist/core/ingestion/languages/php/namespace-siblings.js +288 -0
  118. package/dist/core/ingestion/languages/php/query.d.ts +32 -0
  119. package/dist/core/ingestion/languages/php/query.js +326 -0
  120. package/dist/core/ingestion/languages/php/receiver-binding.d.ts +36 -0
  121. package/dist/core/ingestion/languages/php/receiver-binding.js +128 -0
  122. package/dist/core/ingestion/languages/php/scope-resolver.d.ts +23 -0
  123. package/dist/core/ingestion/languages/php/scope-resolver.js +358 -0
  124. package/dist/core/ingestion/languages/php/simple-hooks.d.ts +42 -0
  125. package/dist/core/ingestion/languages/php/simple-hooks.js +111 -0
  126. package/dist/core/ingestion/languages/php.d.ts +0 -7
  127. package/dist/core/ingestion/languages/php.js +15 -0
  128. package/dist/core/ingestion/markdown-processor.js +6 -1
  129. package/dist/core/ingestion/model/symbol-table.d.ts +1 -0
  130. package/dist/core/ingestion/model/symbol-table.js +3 -0
  131. package/dist/core/ingestion/parsing-processor.d.ts +22 -2
  132. package/dist/core/ingestion/parsing-processor.js +123 -50
  133. package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +54 -2
  134. package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +5 -0
  135. package/dist/core/ingestion/pipeline-phases/parse-impl.js +119 -11
  136. package/dist/core/ingestion/pipeline-phases/parse.d.ts +14 -0
  137. package/dist/core/ingestion/pipeline.d.ts +13 -0
  138. package/dist/core/ingestion/registry-primary-flag.js +2 -0
  139. package/dist/core/ingestion/scope-extractor.js +4 -0
  140. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +167 -0
  141. package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +3 -0
  142. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +1 -0
  143. package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +12 -0
  144. package/dist/core/ingestion/scope-resolution/graph-bridge/method-dispatch.d.ts +1 -1
  145. package/dist/core/ingestion/scope-resolution/graph-bridge/method-dispatch.js +12 -2
  146. package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +16 -0
  147. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +36 -0
  148. package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +204 -13
  149. package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +1 -1
  150. package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.d.ts +55 -4
  151. package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.js +186 -5
  152. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +10 -1
  153. package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +207 -9
  154. package/dist/core/ingestion/scope-resolution/pipeline/phase.js +13 -1
  155. package/dist/core/ingestion/scope-resolution/pipeline/registry.js +6 -0
  156. package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +17 -0
  157. package/dist/core/ingestion/scope-resolution/pipeline/run.js +86 -8
  158. package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +30 -0
  159. package/dist/core/ingestion/scope-resolution/scope/walkers.js +90 -8
  160. package/dist/core/ingestion/tree-sitter-queries.d.ts +2 -2
  161. package/dist/core/ingestion/tree-sitter-queries.js +23 -0
  162. package/dist/core/ingestion/utils/ast-helpers.js +6 -1
  163. package/dist/core/ingestion/utils/template-arguments.d.ts +11 -0
  164. package/dist/core/ingestion/utils/template-arguments.js +65 -0
  165. package/dist/core/ingestion/workers/parse-worker.d.ts +3 -0
  166. package/dist/core/ingestion/workers/parse-worker.js +42 -1
  167. package/dist/core/lbug/lbug-adapter.d.ts +39 -0
  168. package/dist/core/lbug/lbug-adapter.js +348 -48
  169. package/dist/core/run-analyze.d.ts +2 -0
  170. package/dist/core/run-analyze.js +323 -29
  171. package/dist/core/search/hybrid-search.d.ts +3 -0
  172. package/dist/core/search/hybrid-search.js +23 -6
  173. package/dist/core/wiki/generator.js +4 -3
  174. package/dist/core/wiki/html-viewer.js +2 -1
  175. package/dist/core/wiki/llm-client.d.ts +4 -0
  176. package/dist/core/wiki/llm-client.js +3 -3
  177. package/dist/core/wiki/mermaid-sanitizer.d.ts +2 -0
  178. package/dist/core/wiki/mermaid-sanitizer.js +100 -0
  179. package/dist/mcp/local/local-backend.js +20 -7
  180. package/dist/storage/file-hash.d.ts +47 -0
  181. package/dist/storage/file-hash.js +86 -0
  182. package/dist/storage/parse-cache.d.ts +73 -0
  183. package/dist/storage/parse-cache.js +253 -0
  184. package/dist/storage/repo-manager.d.ts +41 -1
  185. package/dist/storage/repo-manager.js +61 -6
  186. package/hooks/claude/gitnexus-hook.cjs +42 -4
  187. package/hooks/claude/hook-db-lock-probe.cjs +238 -0
  188. package/hooks/claude/hook-lock.cjs +119 -0
  189. package/hooks/claude/win-rm-list-json.ps1 +76 -0
  190. package/package.json +1 -1
  191. package/scripts/build.js +6 -2
  192. package/vendor/node_modules/node-addon-api/node_addon_api.target.mk +16 -16
  193. package/vendor/node_modules/node-addon-api/node_addon_api_except.target.mk +16 -16
  194. package/vendor/node_modules/node-addon-api/node_addon_api_except_all.target.mk +16 -16
  195. package/vendor/node_modules/node-addon-api/node_addon_api_maybe.target.mk +16 -16
  196. package/web/assets/{agent-BpHQleHE.js → agent-D2kLt6Dl.js} +91 -91
  197. package/web/assets/architecture-7EHR7CIX-6QZW5X65-BETj2x4g.js +1 -0
  198. package/web/assets/architectureDiagram-UL44E2DR-DvIkEGkp.js +36 -0
  199. package/web/assets/blockDiagram-7IZFK4PR-B4niSLvR.js +132 -0
  200. package/web/assets/{c4Diagram-DFAF54RM-DeJV1rCn.js → c4Diagram-Y2BXMSZH-DIzEXalR.js} +6 -6
  201. package/web/assets/chunk-2T2R6R2M-n6s9JZqv.js +4 -0
  202. package/web/assets/chunk-2UTLFMKG-CMBB1TMN.js +1 -0
  203. package/web/assets/{chunk-7RZVMHOQ-BdIU-RGO.js → chunk-3SSMPTDK-BzGeeheI.js} +1 -1
  204. package/web/assets/chunk-4R4BOZG6-mKhL59ul.js +159 -0
  205. package/web/assets/chunk-5IMINLNL-CnTLsXIV.js +1 -0
  206. package/web/assets/chunk-5VCL7Z4A-w1BCx98Z.js +1 -0
  207. package/web/assets/chunk-6764PJDD-ChwMM2z4.js +1 -0
  208. package/web/assets/chunk-67TQ5CYL-CChC2cAv.js +124 -0
  209. package/web/assets/chunk-7J6CGLKN-DT-b53FT.js +10 -0
  210. package/web/assets/chunk-7W6UQGC5-CgFyfZ6k.js +1 -0
  211. package/web/assets/chunk-AQ6EADP3-CCFje6lL.js +1 -0
  212. package/web/assets/{chunk-KSICW3F5-C2tZmXwv.js → chunk-AZZRMDJM-5E9ARdDQ.js} +1 -1
  213. package/web/assets/chunk-C62D2QBJ-CDAWj26E.js +1 -0
  214. package/web/assets/chunk-CEXFNPSA-D68Tk6ls.js +1 -0
  215. package/web/assets/chunk-INKRHTLW-ELpfuk9h.js +70 -0
  216. package/web/assets/chunk-J5EP6P6S-DxWW0yvu.js +1 -0
  217. package/web/assets/{chunk-AEOMTBSW-D7qjBMHW.js → chunk-JQRUD6KW-Dcq_Qnyy.js} +1 -1
  218. package/web/assets/chunk-KGFNY3KK-W-VR57xb.js +62 -0
  219. package/web/assets/chunk-KGYTTC2M-C6PHeuay.js +1 -0
  220. package/web/assets/chunk-KNLZD3CH-BuZBOcso.js +1 -0
  221. package/web/assets/chunk-KRXBNO2N-DH2NPM7I.js +1 -0
  222. package/web/assets/chunk-LCXTWHL2-CqJ0oo1x.js +231 -0
  223. package/web/assets/chunk-LII3EMHJ-3X33tCpU.js +1 -0
  224. package/web/assets/chunk-QA3QBVWF-D5Ha3GgB.js +2 -0
  225. package/web/assets/chunk-RERM46MO-DQNbXtfw.js +1 -0
  226. package/web/assets/chunk-RG4AUYOV-D0M6vdq9.js +206 -0
  227. package/web/assets/chunk-RKZBBQEN-BmTPLSyv.js +1 -0
  228. package/web/assets/chunk-RLI5ZMPA-DExu2DOK.js +1 -0
  229. package/web/assets/chunk-T2UQINTJ-kGYG7ppP.js +1 -0
  230. package/web/assets/chunk-T5OCTHI4--9wWpVws.js +1 -0
  231. package/web/assets/chunk-UP6H54XL-DsKdC6jC.js +1 -0
  232. package/web/assets/chunk-UXSXWOXI-DR81EqLr.js +1 -0
  233. package/web/assets/chunk-UY5QBCOK-Du-c56gs.js +1 -0
  234. package/web/assets/chunk-W44A43WB-lrCpuupA.js +1 -0
  235. package/web/assets/chunk-ZXARS5L4-CSZRiyOf.js +1 -0
  236. package/web/assets/classDiagram-KGZ6W3CR-BB-saqC1.js +1 -0
  237. package/web/assets/classDiagram-v2-72OJOZXJ-Bp2bAlS5.js +1 -0
  238. package/web/assets/cose-bilkent-UX7MHV2Q-BHv2bbtl.js +1 -0
  239. package/web/assets/dagre-ND4H6XIP-DsIr9MOv.js +4 -0
  240. package/web/assets/diagram-3NCE3AQN-BUxnDPOY.js +43 -0
  241. package/web/assets/diagram-GF46GFSD-BJTyqqvI.js +24 -0
  242. package/web/assets/diagram-HNR7UZ2L-fUWreZzx.js +3 -0
  243. package/web/assets/diagram-QXG6HAR7-DilMHamP.js +24 -0
  244. package/web/assets/diagram-WEQXMOUZ-8KUrarg1.js +10 -0
  245. package/web/assets/erDiagram-L5TCEMPS-Doj9mSiW.js +85 -0
  246. package/web/assets/eventmodeling-FCH6USID-MREXMVOE-B3myHUst.js +1 -0
  247. package/web/assets/{flowDiagram-OTCZ4VVT-aAZw4c_M.js → flowDiagram-H6V6AXG4-BOSR-i3p.js} +12 -12
  248. package/web/assets/ganttDiagram-JCBTUEKG-BHQssTz6.js +292 -0
  249. package/web/assets/gitGraph-WXDBUCRP-R675I2BI-DF3rtf4A.js +1 -0
  250. package/web/assets/gitGraphDiagram-S2ZK5IYY-CCwVLT__.js +106 -0
  251. package/web/assets/index-j4-NuleT.js +623 -0
  252. package/web/assets/info-J43DQDTF-KCYPFFUO-R4XV_akJ.js +1 -0
  253. package/web/assets/infoDiagram-3YFTVSEB-Ce_TvtaV.js +2 -0
  254. package/web/assets/{ishikawaDiagram-YMYX4NHK-BF8AtDaj.js → ishikawaDiagram-BNXS4ZKH-4MXIDCSF.js} +6 -6
  255. package/web/assets/journeyDiagram-M6C3CM3L-DNPYCpvq.js +139 -0
  256. package/web/assets/kanban-definition-75IXJCU3-yYdfm8Kk.js +89 -0
  257. package/web/assets/{katex-GD7MH7QM-CJiOjBBJ.js → katex-K3KEBU37-CrVLz8l7.js} +1 -1
  258. package/web/assets/mindmap-definition-2TDM6QVE-DFNEKM77.js +96 -0
  259. package/web/assets/packet-YPE3B663-LP52Z2RK-CgQPdNZa.js +1 -0
  260. package/web/assets/pie-LRSECV5Y-TCRJHUBD-BzWOwc_c.js +1 -0
  261. package/web/assets/pieDiagram-CU6KROY3-iZAqpvhd.js +30 -0
  262. package/web/assets/quadrantDiagram-VICAPDV7-bAm6Hi_5.js +7 -0
  263. package/web/assets/radar-GUYGQ44K-RDLRG3WG-B7KG0FN7.js +1 -0
  264. package/web/assets/requirementDiagram-JXO7QTGE-CtDijhnf.js +84 -0
  265. package/web/assets/sankeyDiagram-URQDO5SZ-LFJz53u5.js +40 -0
  266. package/web/assets/sequenceDiagram-VS2MUI6T-BdjvyCHM.js +162 -0
  267. package/web/assets/stateDiagram-7D4R322I-e5odN9fG.js +1 -0
  268. package/web/assets/stateDiagram-v2-36443NZ5-vPsvjR2D.js +1 -0
  269. package/web/assets/timeline-definition-O6YCAMPW-DPAksNQp.js +120 -0
  270. package/web/assets/treeView-BLDUP644-QA4HXRO3-CRSxEwLO.js +1 -0
  271. package/web/assets/treemap-LRROVOQU-LLAWBHMP-a0PfKoVn.js +1 -0
  272. package/web/assets/vennDiagram-MWXL3ELB-Dtlfdt7J.js +34 -0
  273. package/web/assets/wardley-L42UT6IY-5TKZOOLJ-BKQ6e5mC.js +1 -0
  274. package/web/assets/wardleyDiagram-CUQ6CDDI-B23uRMUC.js +78 -0
  275. package/web/assets/{xychartDiagram-ZHJ5623Y-DZ7fP1_3.js → xychartDiagram-N2JHSOCM-DxwHeksW.js} +6 -6
  276. package/web/index.html +13 -2
  277. package/web/assets/architecture-YZFGNWBL-S5CXDPWN-BUzkWgDl.js +0 -1
  278. package/web/assets/architectureDiagram-EMZXCZ2Q-CXbzok1G.js +0 -36
  279. package/web/assets/blockDiagram-IGV67L2C-DA1QJ4ZB.js +0 -132
  280. package/web/assets/chunk-3GS5O3IE-B8hpnia8.js +0 -231
  281. package/web/assets/chunk-3YCYZ6SJ-B-BVu21C.js +0 -1
  282. package/web/assets/chunk-6NTNNK5N-DW-jYSDr.js +0 -1
  283. package/web/assets/chunk-A34GCYZU-BbZl-IKy.js +0 -1
  284. package/web/assets/chunk-DJ7UZH7F-B5tMfF87.js +0 -1
  285. package/web/assets/chunk-DKKBVRCY-Djm-6K_e.js +0 -4
  286. package/web/assets/chunk-DU5LTGQ6-QPoynYcp.js +0 -1
  287. package/web/assets/chunk-FXACKDTF-jieSmbe2.js +0 -159
  288. package/web/assets/chunk-H3VCZNTA-8EMHZ3SV.js +0 -1
  289. package/web/assets/chunk-HN6EAY2L-CgE_agsD.js +0 -1
  290. package/web/assets/chunk-O5ABG6QK-DEZV1O19.js +0 -1
  291. package/web/assets/chunk-PK6DOVAG-BXv0JnsJ.js +0 -206
  292. package/web/assets/chunk-RNJOYNJ4-BiBkF9dN.js +0 -1
  293. package/web/assets/chunk-RWUO3TPN-DTWzAhQ1.js +0 -1
  294. package/web/assets/chunk-TBF5ZNIQ-BSl6s9lT.js +0 -1
  295. package/web/assets/chunk-TU3PZOEN-DE5Qhc0N.js +0 -1
  296. package/web/assets/chunk-TYMNRAUI-D1NDLIMG.js +0 -1
  297. package/web/assets/chunk-VELTKBKT-C9dVN39o.js +0 -1
  298. package/web/assets/chunk-W7ZLLLMY-Bu-cdLzs.js +0 -1
  299. package/web/assets/chunk-WSB5WSVC-Dor71SOz.js +0 -1
  300. package/web/assets/chunk-XGPFEOL4-CUonLRle.js +0 -1
  301. package/web/assets/classDiagram-PPOCWD7C-Cdd6UdVv.js +0 -1
  302. package/web/assets/classDiagram-v2-23LJLIIU-DNhxY2Ib.js +0 -1
  303. package/web/assets/cose-bilkent-PNC4W37J-DdZq7Qz_.js +0 -1
  304. package/web/assets/dagre-E77IOHMT-Cfj_6e17.js +0 -4
  305. package/web/assets/diagram-H7BISOXX-BNvpsrBv.js +0 -43
  306. package/web/assets/diagram-JC5VWROH-Cn0rtDbJ.js +0 -24
  307. package/web/assets/diagram-LXUTUG65-CHfoVKNm.js +0 -10
  308. package/web/assets/diagram-WEHSV5V5-BLxHksnu.js +0 -24
  309. package/web/assets/erDiagram-GCSMX5X6-DfdN6iqF.js +0 -85
  310. package/web/assets/ganttDiagram-MUNLMDZQ-BEfC_7Or.js +0 -292
  311. package/web/assets/gitGraph-7Q5UKJZL-54BCDZD5-B6ZeRLP0.js +0 -1
  312. package/web/assets/gitGraphDiagram-3HKGZ4G3-CG0kC8Q5.js +0 -106
  313. package/web/assets/index-3NUCUW2s.js +0 -886
  314. package/web/assets/info-OMHHGYJF-BF2H5H6G-BIOsZy0W.js +0 -1
  315. package/web/assets/infoDiagram-MN7RKWGX-DUoMH-pq.js +0 -2
  316. package/web/assets/journeyDiagram-SO5T7YLQ-BW8oKa3N.js +0 -139
  317. package/web/assets/kanban-definition-LJHFXRCJ-DzbOsR-2.js +0 -89
  318. package/web/assets/mindmap-definition-2EUWGEK5-BIXGQALq.js +0 -96
  319. package/web/assets/packet-4T2RLAQJ-EV4IVRXR-Bs7ysNMU.js +0 -1
  320. package/web/assets/pie-ZZUOXDRM-N23DN5KN-Csi8nnbH.js +0 -1
  321. package/web/assets/pieDiagram-3IATQBI2-QY-u7P6a.js +0 -30
  322. package/web/assets/quadrantDiagram-E256RVCF-Di4aNiU8.js +0 -7
  323. package/web/assets/radar-PYXPWWZC-P6TP7ZYP-DJlyXh2-.js +0 -1
  324. package/web/assets/requirementDiagram-M5DCFWZL-CzUUrhQD.js +0 -84
  325. package/web/assets/sankeyDiagram-L3NBLAOT-D2fbMiIU.js +0 -10
  326. package/web/assets/sequenceDiagram-ZOUHS735-BNdkqguh.js +0 -157
  327. package/web/assets/stateDiagram-MLPALWAM-51_Q2w2L.js +0 -1
  328. package/web/assets/stateDiagram-v2-B5LQ5ZB2-8nHs2aNE.js +0 -1
  329. package/web/assets/timeline-definition-5SPVSISX-DkMiGj4Z.js +0 -120
  330. package/web/assets/treeView-SZITEDCU-5DXDK3XO-Cy6P0_CZ.js +0 -1
  331. package/web/assets/treemap-W4RFUUIX-WYLRDWKO-C_pp1R7A.js +0 -1
  332. package/web/assets/vennDiagram-IE5QUKF5-BCxMmf9q.js +0 -34
  333. package/web/assets/wardley-RL74JXVD-BCRCBASE-CMStJhpn.js +0 -1
  334. package/web/assets/wardleyDiagram-XU3VSMPF-ijlLF77s.js +0 -20
  335. /package/web/assets/{context-builder-CqQNhRj1.js → context-builder-_HS0v2ma.js} +0 -0
@@ -0,0 +1,13 @@
1
+ import { resolveCImportTarget } from '../c/import-target.js';
2
+ /**
3
+ * Resolve a C++ #include path to a file in the workspace.
4
+ * C++ #include path resolution is identical to C:
5
+ * 1. Same-directory sibling (relative lookup)
6
+ * 2. Exact match
7
+ * 3. Suffix match with depth + lexicographic tiebreak
8
+ *
9
+ * Re-exports the C implementation since the #include semantics are shared.
10
+ */
11
+ export function resolveCppImportTarget(targetRaw, fromFile, allFilePaths) {
12
+ return resolveCImportTarget(targetRaw, fromFile, allFilePaths);
13
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * C++ scope-resolution hooks (RFC #909 Ring 3).
3
+ */
4
+ export { emitCppScopeCaptures } from './captures.js';
5
+ export { interpretCppImport, interpretCppTypeBinding, normalizeCppTypeName } from './interpret.js';
6
+ export { splitCppInclude, splitCppUsingDecl } from './import-decomposer.js';
7
+ export { cppArityCompatibility } from './arity.js';
8
+ export { cppMergeBindings } from './merge-bindings.js';
9
+ export { cppBindingScopeFor, cppImportOwningScope, cppReceiverBinding } from './simple-hooks.js';
10
+ export { resolveCppImportTarget } from './import-target.js';
11
+ export { markFileLocal, isFileLocal, clearFileLocalNames, expandCppWildcardNames, } from './file-local-linkage.js';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * C++ scope-resolution hooks (RFC #909 Ring 3).
3
+ */
4
+ export { emitCppScopeCaptures } from './captures.js';
5
+ export { interpretCppImport, interpretCppTypeBinding, normalizeCppTypeName } from './interpret.js';
6
+ export { splitCppInclude, splitCppUsingDecl } from './import-decomposer.js';
7
+ export { cppArityCompatibility } from './arity.js';
8
+ export { cppMergeBindings } from './merge-bindings.js';
9
+ export { cppBindingScopeFor, cppImportOwningScope, cppReceiverBinding } from './simple-hooks.js';
10
+ export { resolveCppImportTarget } from './import-target.js';
11
+ export { markFileLocal, isFileLocal, clearFileLocalNames, expandCppWildcardNames, } from './file-local-linkage.js';
@@ -0,0 +1,67 @@
1
+ /**
2
+ * C++ inline namespace support (U5 of plan 2026-05-13-001).
3
+ *
4
+ * `inline namespace v1 { void foo(); }` has two ISO C++ semantics that
5
+ * GitNexus must model:
6
+ *
7
+ * 1. **Transitive unqualified visibility.** Names declared in an inline
8
+ * namespace are reachable by unqualified lookup from the enclosing
9
+ * namespace's scope, as if they were declared directly there.
10
+ * `populateCppNonGloballyVisible` (file-local-linkage.ts) treats
11
+ * inline-namespace members as globally visible for cross-file
12
+ * unqualified lookup.
13
+ *
14
+ * 2. **Transitive qualified visibility.** `outer::foo()` resolves to
15
+ * `outer::v1::foo()` when `v1` is inline. The qualified-namespace
16
+ * receiver resolver (`resolveCppQualifiedNamespaceMember`) walks
17
+ * inline-namespace children transitively when collecting candidates.
18
+ *
19
+ * State lifecycle: capture-time `markCppInlineNamespaceRange` records each
20
+ * inline namespace's source range; `populateCppInlineNamespaceScopes`
21
+ * resolves ranges to `ScopeId`s during `populateOwners`. Cleared via
22
+ * `clearCppInlineNamespaces`, called from `clearFileLocalNames`.
23
+ *
24
+ * STL idiom this enables: `std::__1::vector` (libc++) and `std::__cxx11`
25
+ * (libstdc++) are inline namespaces of `std`. With this support,
26
+ * `std::vector` qualified calls resolve to the inline-namespace
27
+ * declaration transparently.
28
+ */
29
+ import type { ParsedFile, ScopeId, SymbolDefinition } from '../../../../_shared/index.js';
30
+ import type { ScopeResolutionIndexes } from '../../model/scope-resolution-indexes.js';
31
+ interface RangeKey {
32
+ readonly startLine: number;
33
+ readonly startCol: number;
34
+ readonly endLine: number;
35
+ readonly endCol: number;
36
+ }
37
+ /** Capture-time: record a namespace_definition's range as inline.
38
+ * Called from `emitCppScopeCaptures` when the tree-sitter AST shows an
39
+ * `inline` keyword child on `namespace_definition`. */
40
+ export declare function markCppInlineNamespaceRange(filePath: string, range: RangeKey): void;
41
+ /** Clear all inline-namespace state. Called from `clearFileLocalNames`. */
42
+ export declare function clearCppInlineNamespaces(): void;
43
+ /** Resolve captured ranges to actual ScopeIds by matching scope ranges
44
+ * against the inline-namespace ranges recorded for this file. Run from
45
+ * the cpp resolver's `populateOwners` hook so the per-pipeline Set is
46
+ * populated before any resolution pass consults it. */
47
+ export declare function populateCppInlineNamespaceScopes(parsed: ParsedFile): void;
48
+ /** Predicate consumed by `populateCppNonGloballyVisible` to exempt
49
+ * inline-namespace members from cross-file unqualified-lookup
50
+ * exclusion (they remain reachable as if declared at the enclosing
51
+ * namespace's level). */
52
+ export declare function isCppInlineNamespaceScope(scopeId: ScopeId): boolean;
53
+ /**
54
+ * Walk every parsed file looking for a Namespace scope whose qualified
55
+ * name matches `receiverName`, collect its callable ownedDefs matching
56
+ * `memberName`, transitively descending into any inline-namespace
57
+ * children (since they're members of the enclosing namespace under ISO
58
+ * C++).
59
+ *
60
+ * Returns the most specific (innermost) match — for `outer::foo()`
61
+ * where `inline namespace v1` declares `foo`, returns `v1::foo`. When
62
+ * multiple inline-namespace children declare the same name, ISO C++
63
+ * leaves the call ambiguous; returns `'ambiguous'` so the caller
64
+ * suppresses edge emission rather than picking arbitrarily (#1564).
65
+ */
66
+ export declare function resolveCppQualifiedNamespaceMember(receiverName: string, memberName: string, parsedFiles: readonly ParsedFile[], _scopes: ScopeResolutionIndexes): SymbolDefinition | 'ambiguous' | undefined;
67
+ export {};
@@ -0,0 +1,176 @@
1
+ /**
2
+ * C++ inline namespace support (U5 of plan 2026-05-13-001).
3
+ *
4
+ * `inline namespace v1 { void foo(); }` has two ISO C++ semantics that
5
+ * GitNexus must model:
6
+ *
7
+ * 1. **Transitive unqualified visibility.** Names declared in an inline
8
+ * namespace are reachable by unqualified lookup from the enclosing
9
+ * namespace's scope, as if they were declared directly there.
10
+ * `populateCppNonGloballyVisible` (file-local-linkage.ts) treats
11
+ * inline-namespace members as globally visible for cross-file
12
+ * unqualified lookup.
13
+ *
14
+ * 2. **Transitive qualified visibility.** `outer::foo()` resolves to
15
+ * `outer::v1::foo()` when `v1` is inline. The qualified-namespace
16
+ * receiver resolver (`resolveCppQualifiedNamespaceMember`) walks
17
+ * inline-namespace children transitively when collecting candidates.
18
+ *
19
+ * State lifecycle: capture-time `markCppInlineNamespaceRange` records each
20
+ * inline namespace's source range; `populateCppInlineNamespaceScopes`
21
+ * resolves ranges to `ScopeId`s during `populateOwners`. Cleared via
22
+ * `clearCppInlineNamespaces`, called from `clearFileLocalNames`.
23
+ *
24
+ * STL idiom this enables: `std::__1::vector` (libc++) and `std::__cxx11`
25
+ * (libstdc++) are inline namespaces of `std`. With this support,
26
+ * `std::vector` qualified calls resolve to the inline-namespace
27
+ * declaration transparently.
28
+ */
29
+ import { isOverloadAmbiguousAfterNormalization, narrowOverloadCandidates, } from '../../scope-resolution/passes/overload-narrowing.js';
30
+ const inlineNamespaceRangesByFile = new Map();
31
+ const inlineNamespaceScopeIds = new Set();
32
+ function rangeKey(r) {
33
+ return `${r.startLine}:${r.startCol}:${r.endLine}:${r.endCol}`;
34
+ }
35
+ /** Capture-time: record a namespace_definition's range as inline.
36
+ * Called from `emitCppScopeCaptures` when the tree-sitter AST shows an
37
+ * `inline` keyword child on `namespace_definition`. */
38
+ export function markCppInlineNamespaceRange(filePath, range) {
39
+ let set = inlineNamespaceRangesByFile.get(filePath);
40
+ if (set === undefined) {
41
+ set = new Set();
42
+ inlineNamespaceRangesByFile.set(filePath, set);
43
+ }
44
+ set.add(rangeKey(range));
45
+ }
46
+ /** Clear all inline-namespace state. Called from `clearFileLocalNames`. */
47
+ export function clearCppInlineNamespaces() {
48
+ inlineNamespaceRangesByFile.clear();
49
+ inlineNamespaceScopeIds.clear();
50
+ }
51
+ /** Resolve captured ranges to actual ScopeIds by matching scope ranges
52
+ * against the inline-namespace ranges recorded for this file. Run from
53
+ * the cpp resolver's `populateOwners` hook so the per-pipeline Set is
54
+ * populated before any resolution pass consults it. */
55
+ export function populateCppInlineNamespaceScopes(parsed) {
56
+ const ranges = inlineNamespaceRangesByFile.get(parsed.filePath);
57
+ if (ranges === undefined || ranges.size === 0)
58
+ return;
59
+ for (const scope of parsed.scopes) {
60
+ if (scope.kind !== 'Namespace')
61
+ continue;
62
+ if (ranges.has(rangeKey(scope.range))) {
63
+ inlineNamespaceScopeIds.add(scope.id);
64
+ }
65
+ }
66
+ }
67
+ /** Predicate consumed by `populateCppNonGloballyVisible` to exempt
68
+ * inline-namespace members from cross-file unqualified-lookup
69
+ * exclusion (they remain reachable as if declared at the enclosing
70
+ * namespace's level). */
71
+ export function isCppInlineNamespaceScope(scopeId) {
72
+ return inlineNamespaceScopeIds.has(scopeId);
73
+ }
74
+ /**
75
+ * Walk every parsed file looking for a Namespace scope whose qualified
76
+ * name matches `receiverName`, collect its callable ownedDefs matching
77
+ * `memberName`, transitively descending into any inline-namespace
78
+ * children (since they're members of the enclosing namespace under ISO
79
+ * C++).
80
+ *
81
+ * Returns the most specific (innermost) match — for `outer::foo()`
82
+ * where `inline namespace v1` declares `foo`, returns `v1::foo`. When
83
+ * multiple inline-namespace children declare the same name, ISO C++
84
+ * leaves the call ambiguous; returns `'ambiguous'` so the caller
85
+ * suppresses edge emission rather than picking arbitrarily (#1564).
86
+ */
87
+ export function resolveCppQualifiedNamespaceMember(receiverName, memberName, parsedFiles, _scopes) {
88
+ const allHits = [];
89
+ const seenNodeId = new Set();
90
+ for (const parsed of parsedFiles) {
91
+ const scopesById = new Map();
92
+ for (const sc of parsed.scopes)
93
+ scopesById.set(sc.id, sc);
94
+ for (const scope of parsed.scopes) {
95
+ if (scope.kind !== 'Namespace')
96
+ continue;
97
+ const nsDef = findNamespaceDefInScope(scope);
98
+ if (nsDef === undefined)
99
+ continue;
100
+ const nsName = nsDef.qualifiedName?.split('.').pop() ?? nsDef.qualifiedName ?? '';
101
+ if (nsName !== receiverName)
102
+ continue;
103
+ // Found a matching namespace scope in this file. Collect ALL
104
+ // members transitively through any inline-namespace children.
105
+ const hits = findMemberInNamespaceTransitive(scope, scopesById, memberName);
106
+ for (const hit of hits) {
107
+ if (seenNodeId.has(hit.nodeId))
108
+ continue;
109
+ seenNodeId.add(hit.nodeId);
110
+ allHits.push(hit);
111
+ }
112
+ }
113
+ }
114
+ if (allHits.length === 0)
115
+ return undefined;
116
+ if (allHits.length === 1)
117
+ return allHits[0];
118
+ // Multi-candidate: the `resolveQualifiedReceiverMember` hook has no
119
+ // access to call-site arity or argument types, so
120
+ // `narrowOverloadCandidates` cannot actually narrow here — the call
121
+ // with `(allHits, undefined, undefined)` is effectively a pass-through.
122
+ // We retain it so that `isOverloadAmbiguousAfterNormalization` can
123
+ // still detect int/long-style normalization collisions on this path,
124
+ // but for any multi-hit case where candidates have genuinely distinct
125
+ // signatures (e.g. `foo(int)` vs `foo(double)` in different inline
126
+ // children), we conservatively suppress rather than pick arbitrarily.
127
+ // A future enhancement could thread call-site argument info through
128
+ // the `resolveQualifiedReceiverMember` contract to enable real
129
+ // narrowing here.
130
+ const narrowed = narrowOverloadCandidates(allHits, undefined, undefined);
131
+ if (narrowed.length === 1)
132
+ return narrowed[0];
133
+ if (narrowed.length === 0)
134
+ return undefined;
135
+ if (isOverloadAmbiguousAfterNormalization(narrowed, undefined))
136
+ return 'ambiguous';
137
+ // Multiple surviving candidates (distinct signatures) — conservative
138
+ // suppress because we lack call-site info to disambiguate.
139
+ return 'ambiguous';
140
+ }
141
+ /** Recursively search a namespace scope and any inline-namespace
142
+ * descendants for callable defs with the given simple name. Non-inline
143
+ * nested namespaces are NOT traversed — they require explicit
144
+ * qualification (`outer::nested::foo`). Returns ALL matches so the
145
+ * caller can detect same-name ambiguity across inline children (#1564). */
146
+ function findMemberInNamespaceTransitive(scope, scopesById, memberName) {
147
+ const results = [];
148
+ // Check this scope's own ownedDefs first.
149
+ for (const def of scope.ownedDefs) {
150
+ if (def.type !== 'Function' && def.type !== 'Method' && def.type !== 'Constructor')
151
+ continue;
152
+ const simple = def.qualifiedName?.split('.').pop() ?? def.qualifiedName ?? '';
153
+ if (simple === memberName)
154
+ results.push(def);
155
+ }
156
+ // Descend into inline-namespace children.
157
+ for (const childScope of scopesById.values()) {
158
+ if (childScope.parent !== scope.id)
159
+ continue;
160
+ if (childScope.kind !== 'Namespace')
161
+ continue;
162
+ if (!inlineNamespaceScopeIds.has(childScope.id))
163
+ continue;
164
+ const childHits = findMemberInNamespaceTransitive(childScope, scopesById, memberName);
165
+ for (const hit of childHits)
166
+ results.push(hit);
167
+ }
168
+ return results;
169
+ }
170
+ function findNamespaceDefInScope(scope) {
171
+ for (const def of scope.ownedDefs) {
172
+ if (def.type === 'Namespace')
173
+ return def;
174
+ }
175
+ return undefined;
176
+ }
@@ -0,0 +1,35 @@
1
+ import type { CaptureMatch, ParsedImport, ParsedTypeBinding } from '../../../../_shared/index.js';
2
+ /**
3
+ * Interpret a C++ import capture into a ParsedImport.
4
+ *
5
+ * C++ has three import forms:
6
+ * 1. #include "file.h" → wildcard import (all symbols from header)
7
+ * 2. using namespace X; → wildcard import (all symbols from namespace X)
8
+ * 3. using X::name; → named import (single symbol from namespace X)
9
+ *
10
+ * System headers (#include <...>) are not resolved to local files.
11
+ */
12
+ export declare function interpretCppImport(captures: CaptureMatch): ParsedImport | null;
13
+ /**
14
+ * Interpret a C++ type-binding capture into a ParsedTypeBinding.
15
+ *
16
+ * Source classification (strongest → weakest):
17
+ * - `'parameter-annotation'` — function parameter type
18
+ * - `'annotation'` — explicit type declaration (`User user;`)
19
+ * - `'assignment-inferred'` — typed init (`User user = ...`)
20
+ * - `'constructor'` — constructor call (`auto u = User(...)` / `User{}`)
21
+ * - `'return'` — function return type
22
+ * - `'field'` — class field type
23
+ * - `'alias'` — `auto x = existingVar`
24
+ */
25
+ export declare function interpretCppTypeBinding(captures: CaptureMatch): ParsedTypeBinding | null;
26
+ /**
27
+ * Normalize a C++ type name: strip pointer/array/reference syntax,
28
+ * qualifiers, while preserving template arguments for specialization-aware
29
+ * receiver binding (`List<User>` vs `List<Order>`).
30
+ *
31
+ * Keeping template arguments here allows receiver-bound fallback to match
32
+ * specialization-specific class defs first; non-template behavior is preserved
33
+ * by base-name fallback in resolveClassBindingForName.
34
+ */
35
+ export declare function normalizeCppTypeName(text: string): string;
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Interpret a C++ import capture into a ParsedImport.
3
+ *
4
+ * C++ has three import forms:
5
+ * 1. #include "file.h" → wildcard import (all symbols from header)
6
+ * 2. using namespace X; → wildcard import (all symbols from namespace X)
7
+ * 3. using X::name; → named import (single symbol from namespace X)
8
+ *
9
+ * System headers (#include <...>) are not resolved to local files.
10
+ */
11
+ export function interpretCppImport(captures) {
12
+ const source = captures['@import.source']?.text;
13
+ if (source === undefined)
14
+ return null;
15
+ // System headers are not resolved to local files
16
+ if (captures['@import.system'] !== undefined)
17
+ return null;
18
+ const kind = captures['@import.kind']?.text;
19
+ if (kind === 'named') {
20
+ // using X::name — named import
21
+ const importedName = captures['@import.name']?.text;
22
+ if (importedName === undefined)
23
+ return null;
24
+ return { kind: 'named', targetRaw: source, localName: importedName, importedName };
25
+ }
26
+ // #include or using namespace — wildcard import
27
+ return { kind: 'wildcard', targetRaw: source };
28
+ }
29
+ /**
30
+ * Interpret a C++ type-binding capture into a ParsedTypeBinding.
31
+ *
32
+ * Source classification (strongest → weakest):
33
+ * - `'parameter-annotation'` — function parameter type
34
+ * - `'annotation'` — explicit type declaration (`User user;`)
35
+ * - `'assignment-inferred'` — typed init (`User user = ...`)
36
+ * - `'constructor'` — constructor call (`auto u = User(...)` / `User{}`)
37
+ * - `'return'` — function return type
38
+ * - `'field'` — class field type
39
+ * - `'alias'` — `auto x = existingVar`
40
+ */
41
+ export function interpretCppTypeBinding(captures) {
42
+ const name = captures['@type-binding.name']?.text;
43
+ const type = captures['@type-binding.type']?.text;
44
+ if (name === undefined || type === undefined)
45
+ return null;
46
+ let source = 'annotation';
47
+ if (captures['@type-binding.parameter'] !== undefined) {
48
+ source = 'parameter-annotation';
49
+ }
50
+ else if (captures['@type-binding.constructor'] !== undefined) {
51
+ source = 'constructor-inferred';
52
+ }
53
+ else if (captures['@type-binding.return'] !== undefined) {
54
+ source = 'return-annotation';
55
+ }
56
+ else if (captures['@type-binding.field'] !== undefined) {
57
+ // Field types are structurally equivalent to annotations — the type
58
+ // is explicitly written, not inferred.
59
+ source = 'annotation';
60
+ }
61
+ else if (captures['@type-binding.member-access'] !== undefined) {
62
+ // auto addr = user.address — the type is inferred from the member access.
63
+ // Synthesize a dotted rawName ("receiver.field") so compound-receiver
64
+ // can resolve the chain: look up receiver's class, then field's type.
65
+ const receiver = captures['@type-binding.member-access-receiver']?.text;
66
+ if (receiver !== undefined) {
67
+ return { boundName: name, rawTypeName: `${receiver}.${type}`, source: 'assignment-inferred' };
68
+ }
69
+ source = 'assignment-inferred';
70
+ }
71
+ else if (captures['@type-binding.alias'] !== undefined) {
72
+ // auto alias = existingVar — the type is inferred from the RHS variable.
73
+ source = 'assignment-inferred';
74
+ }
75
+ else if (captures['@type-binding.assignment'] !== undefined) {
76
+ source = 'assignment-inferred';
77
+ }
78
+ else if (captures['@type-binding.annotation'] !== undefined) {
79
+ source = 'annotation';
80
+ }
81
+ return { boundName: name, rawTypeName: normalizeCppTypeName(type), source };
82
+ }
83
+ /**
84
+ * Normalize a C++ type name: strip pointer/array/reference syntax,
85
+ * qualifiers, while preserving template arguments for specialization-aware
86
+ * receiver binding (`List<User>` vs `List<Order>`).
87
+ *
88
+ * Keeping template arguments here allows receiver-bound fallback to match
89
+ * specialization-specific class defs first; non-template behavior is preserved
90
+ * by base-name fallback in resolveClassBindingForName.
91
+ */
92
+ export function normalizeCppTypeName(text) {
93
+ let t = text.trim();
94
+ // Strip const, volatile, restrict, static, extern, inline, mutable, constexpr
95
+ t = t
96
+ .replace(/\b(const|volatile|restrict|static|extern|inline|mutable|constexpr|consteval)\b/g, '')
97
+ .trim();
98
+ // Strip pointer stars
99
+ while (t.endsWith('*'))
100
+ t = t.slice(0, -1).trim();
101
+ while (t.startsWith('*'))
102
+ t = t.slice(1).trim();
103
+ // Strip reference markers
104
+ while (t.endsWith('&'))
105
+ t = t.slice(0, -1).trim();
106
+ // Strip array brackets
107
+ t = t.replace(/\[.*?\]/g, '').trim();
108
+ // Strip struct/union/enum/class prefixes
109
+ t = t.replace(/^(struct|union|enum|class)\s+/, '');
110
+ // Strip leading :: (global namespace qualifier)
111
+ t = t.replace(/^::/, '');
112
+ return t;
113
+ }
@@ -0,0 +1,13 @@
1
+ import type { BindingRef } from '../../../../_shared/index.js';
2
+ /**
3
+ * C++ merge bindings: first-wins by tier.
4
+ *
5
+ * C++ tier precedence:
6
+ * local(0) > namespace(1) > import(2) > reexport(3) > wildcard(4)
7
+ *
8
+ * Unlike C (no namespaces), C++ uses the `namespace` tier for symbols
9
+ * brought in via `using namespace X;` that are then locally referenced.
10
+ * The tier ordering ensures local definitions shadow namespace imports,
11
+ * which in turn shadow wildcard #include imports.
12
+ */
13
+ export declare function cppMergeBindings(existing: readonly BindingRef[], incoming: readonly BindingRef[], _scopeId: string): BindingRef[];
@@ -0,0 +1,29 @@
1
+ const TIER = {
2
+ local: 0,
3
+ namespace: 1,
4
+ import: 2,
5
+ reexport: 3,
6
+ wildcard: 4,
7
+ };
8
+ /**
9
+ * C++ merge bindings: first-wins by tier.
10
+ *
11
+ * C++ tier precedence:
12
+ * local(0) > namespace(1) > import(2) > reexport(3) > wildcard(4)
13
+ *
14
+ * Unlike C (no namespaces), C++ uses the `namespace` tier for symbols
15
+ * brought in via `using namespace X;` that are then locally referenced.
16
+ * The tier ordering ensures local definitions shadow namespace imports,
17
+ * which in turn shadow wildcard #include imports.
18
+ */
19
+ export function cppMergeBindings(existing, incoming, _scopeId) {
20
+ const seen = new Set();
21
+ return [...existing, ...incoming]
22
+ .sort((a, b) => (TIER[a.origin] ?? 99) - (TIER[b.origin] ?? 99) || a.def.nodeId.localeCompare(b.def.nodeId))
23
+ .filter((binding) => {
24
+ if (seen.has(binding.def.nodeId))
25
+ return false;
26
+ seen.add(binding.def.nodeId);
27
+ return true;
28
+ });
29
+ }
@@ -0,0 +1,3 @@
1
+ import Parser from 'tree-sitter';
2
+ export declare function getCppParser(): Parser;
3
+ export declare function getCppScopeQuery(): Parser.Query;