@colbymchenry/codegraph-win32-arm64 1.5.0 → 1.6.1

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 (693) hide show
  1. package/bin/codegraph +5 -0
  2. package/lib/dist/.test-build-engine.json +1 -0
  3. package/lib/dist/.test-build-viewer.json +1 -0
  4. package/lib/dist/bin/codegraph.d.ts +1 -0
  5. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  6. package/lib/dist/bin/codegraph.js +744 -320
  7. package/lib/dist/bin/codegraph.js.map +1 -1
  8. package/lib/dist/bin/viewer-gate.d.ts +17 -0
  9. package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
  10. package/lib/dist/bin/viewer-gate.js +31 -0
  11. package/lib/dist/bin/viewer-gate.js.map +1 -0
  12. package/lib/dist/context/formatter.d.ts +7 -1
  13. package/lib/dist/context/formatter.d.ts.map +1 -1
  14. package/lib/dist/context/formatter.js +12 -6
  15. package/lib/dist/context/formatter.js.map +1 -1
  16. package/lib/dist/context/index.d.ts +12 -0
  17. package/lib/dist/context/index.d.ts.map +1 -1
  18. package/lib/dist/context/index.js +103 -16
  19. package/lib/dist/context/index.js.map +1 -1
  20. package/lib/dist/db/index.d.ts +58 -2
  21. package/lib/dist/db/index.d.ts.map +1 -1
  22. package/lib/dist/db/index.js +187 -32
  23. package/lib/dist/db/index.js.map +1 -1
  24. package/lib/dist/db/migrations.d.ts +1 -1
  25. package/lib/dist/db/migrations.d.ts.map +1 -1
  26. package/lib/dist/db/migrations.js +64 -1
  27. package/lib/dist/db/migrations.js.map +1 -1
  28. package/lib/dist/db/queries.d.ts +583 -6
  29. package/lib/dist/db/queries.d.ts.map +1 -1
  30. package/lib/dist/db/queries.js +1417 -57
  31. package/lib/dist/db/queries.js.map +1 -1
  32. package/lib/dist/db/schema.sql +27 -4
  33. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  34. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  35. package/lib/dist/db/sqlite-adapter.js +56 -7
  36. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  37. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  38. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  39. package/lib/dist/db/synthesis-stage.js +89 -0
  40. package/lib/dist/db/synthesis-stage.js.map +1 -0
  41. package/lib/dist/db/wal-valve.d.ts +32 -12
  42. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  43. package/lib/dist/db/wal-valve.js +65 -22
  44. package/lib/dist/db/wal-valve.js.map +1 -1
  45. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  46. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  47. package/lib/dist/db/wsl-shared-index.js +121 -0
  48. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  49. package/lib/dist/directory.d.ts +130 -2
  50. package/lib/dist/directory.d.ts.map +1 -1
  51. package/lib/dist/directory.js +306 -23
  52. package/lib/dist/directory.js.map +1 -1
  53. package/lib/dist/errors.d.ts +14 -0
  54. package/lib/dist/errors.d.ts.map +1 -1
  55. package/lib/dist/errors.js +16 -1
  56. package/lib/dist/errors.js.map +1 -1
  57. package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
  58. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  59. package/lib/dist/extraction/cfml-extractor.js +15 -3
  60. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  61. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  62. package/lib/dist/extraction/dfm-extractor.js +14 -10
  63. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  64. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  65. package/lib/dist/extraction/extraction-version.js +1 -1
  66. package/lib/dist/extraction/function-ref.d.ts +6 -4
  67. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  68. package/lib/dist/extraction/function-ref.js +41 -14
  69. package/lib/dist/extraction/function-ref.js.map +1 -1
  70. package/lib/dist/extraction/generated-detection.d.ts +48 -12
  71. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  72. package/lib/dist/extraction/generated-detection.js +176 -11
  73. package/lib/dist/extraction/generated-detection.js.map +1 -1
  74. package/lib/dist/extraction/grammars.d.ts +38 -0
  75. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  76. package/lib/dist/extraction/grammars.js +115 -3
  77. package/lib/dist/extraction/grammars.js.map +1 -1
  78. package/lib/dist/extraction/index.d.ts +218 -14
  79. package/lib/dist/extraction/index.d.ts.map +1 -1
  80. package/lib/dist/extraction/index.js +874 -176
  81. package/lib/dist/extraction/index.js.map +1 -1
  82. package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
  83. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  84. package/lib/dist/extraction/languages/c-cpp.js +310 -19
  85. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  86. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  87. package/lib/dist/extraction/languages/dart.js +8 -3
  88. package/lib/dist/extraction/languages/dart.js.map +1 -1
  89. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  90. package/lib/dist/extraction/languages/erlang.js +58 -22
  91. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  92. package/lib/dist/extraction/languages/javascript.js +1 -1
  93. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  94. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  95. package/lib/dist/extraction/languages/kotlin.js +169 -36
  96. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  97. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  98. package/lib/dist/extraction/languages/lua.js +4 -1
  99. package/lib/dist/extraction/languages/lua.js.map +1 -1
  100. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  101. package/lib/dist/extraction/languages/objc.js +4 -0
  102. package/lib/dist/extraction/languages/objc.js.map +1 -1
  103. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  104. package/lib/dist/extraction/languages/python.js +71 -0
  105. package/lib/dist/extraction/languages/python.js.map +1 -1
  106. package/lib/dist/extraction/languages/rust.d.ts +20 -0
  107. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  108. package/lib/dist/extraction/languages/rust.js +50 -20
  109. package/lib/dist/extraction/languages/rust.js.map +1 -1
  110. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  111. package/lib/dist/extraction/languages/scala.js +18 -3
  112. package/lib/dist/extraction/languages/scala.js.map +1 -1
  113. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  114. package/lib/dist/extraction/languages/typescript.js +9 -2
  115. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  116. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  117. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  118. package/lib/dist/extraction/liquid-extractor.js +98 -22
  119. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  120. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  121. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  122. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  123. package/lib/dist/extraction/parse-pool.d.ts +7 -0
  124. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  125. package/lib/dist/extraction/parse-pool.js +20 -1
  126. package/lib/dist/extraction/parse-pool.js.map +1 -1
  127. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  128. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  129. package/lib/dist/extraction/syntax-tokens.js +381 -0
  130. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  131. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  132. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  133. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  134. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  135. package/lib/dist/extraction/tree-sitter-types.d.ts +31 -3
  136. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  137. package/lib/dist/extraction/tree-sitter.d.ts +101 -18
  138. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  139. package/lib/dist/extraction/tree-sitter.js +926 -132
  140. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  141. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  142. package/lib/dist/file-limits.d.ts +40 -0
  143. package/lib/dist/file-limits.d.ts.map +1 -0
  144. package/lib/dist/file-limits.js +147 -0
  145. package/lib/dist/file-limits.js.map +1 -0
  146. package/lib/dist/graph/branch-guards.d.ts +248 -0
  147. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  148. package/lib/dist/graph/branch-guards.js +2231 -0
  149. package/lib/dist/graph/branch-guards.js.map +1 -0
  150. package/lib/dist/graph/dead-code.d.ts +251 -0
  151. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  152. package/lib/dist/graph/dead-code.js +776 -0
  153. package/lib/dist/graph/dead-code.js.map +1 -0
  154. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  155. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  156. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  157. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  158. package/lib/dist/graph/index.d.ts +4 -0
  159. package/lib/dist/graph/index.d.ts.map +1 -1
  160. package/lib/dist/graph/index.js +16 -1
  161. package/lib/dist/graph/index.js.map +1 -1
  162. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  163. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  164. package/lib/dist/graph/named-symbol-flow.js +552 -0
  165. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  166. package/lib/dist/graph/queries.d.ts.map +1 -1
  167. package/lib/dist/graph/queries.js +2 -0
  168. package/lib/dist/graph/queries.js.map +1 -1
  169. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  170. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  171. package/lib/dist/graph/symbol-lookup.js +181 -0
  172. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  173. package/lib/dist/graph/traversal.d.ts +9 -0
  174. package/lib/dist/graph/traversal.d.ts.map +1 -1
  175. package/lib/dist/graph/traversal.js +62 -36
  176. package/lib/dist/graph/traversal.js.map +1 -1
  177. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  178. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  179. package/lib/dist/graph/type-hierarchy.js +382 -0
  180. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  181. package/lib/dist/index.d.ts +273 -11
  182. package/lib/dist/index.d.ts.map +1 -1
  183. package/lib/dist/index.js +511 -34
  184. package/lib/dist/index.js.map +1 -1
  185. package/lib/dist/installer/index.d.ts +4 -3
  186. package/lib/dist/installer/index.d.ts.map +1 -1
  187. package/lib/dist/installer/index.js +11 -8
  188. package/lib/dist/installer/index.js.map +1 -1
  189. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  190. package/lib/dist/installer/targets/antigravity.js +14 -2
  191. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  192. package/lib/dist/installer/targets/claude.d.ts +3 -0
  193. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  194. package/lib/dist/installer/targets/claude.js +72 -12
  195. package/lib/dist/installer/targets/claude.js.map +1 -1
  196. package/lib/dist/installer/targets/codex.d.ts +23 -8
  197. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  198. package/lib/dist/installer/targets/codex.js +74 -47
  199. package/lib/dist/installer/targets/codex.js.map +1 -1
  200. package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
  201. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  202. package/lib/dist/installer/targets/copilot-cli.js +215 -0
  203. package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
  204. package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  205. package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  206. package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
  207. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  208. package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
  209. package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  210. package/lib/dist/installer/targets/copilot-vscode.js +219 -0
  211. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
  212. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  213. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  214. package/lib/dist/installer/targets/opencode.js +73 -22
  215. package/lib/dist/installer/targets/opencode.js.map +1 -1
  216. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  217. package/lib/dist/installer/targets/registry.js +6 -0
  218. package/lib/dist/installer/targets/registry.js.map +1 -1
  219. package/lib/dist/installer/targets/shared.d.ts +14 -3
  220. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  221. package/lib/dist/installer/targets/shared.js +39 -11
  222. package/lib/dist/installer/targets/shared.js.map +1 -1
  223. package/lib/dist/installer/targets/toml.d.ts +6 -5
  224. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  225. package/lib/dist/installer/targets/toml.js +99 -20
  226. package/lib/dist/installer/targets/toml.js.map +1 -1
  227. package/lib/dist/installer/targets/types.d.ts +12 -5
  228. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  229. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  230. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  231. package/lib/dist/mcp/answer-freshness.js +68 -0
  232. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  233. package/lib/dist/mcp/daemon-manager.d.ts +1 -1
  234. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  235. package/lib/dist/mcp/daemon-manager.js +17 -1
  236. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  237. package/lib/dist/mcp/daemon-paths.d.ts +8 -0
  238. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  239. package/lib/dist/mcp/daemon-paths.js +65 -2
  240. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  241. package/lib/dist/mcp/daemon-registry.d.ts +17 -4
  242. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  243. package/lib/dist/mcp/daemon-registry.js +133 -23
  244. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  245. package/lib/dist/mcp/daemon.d.ts +26 -13
  246. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  247. package/lib/dist/mcp/daemon.js +126 -32
  248. package/lib/dist/mcp/daemon.js.map +1 -1
  249. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  250. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  251. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  252. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  253. package/lib/dist/mcp/engine.d.ts +31 -9
  254. package/lib/dist/mcp/engine.d.ts.map +1 -1
  255. package/lib/dist/mcp/engine.js +190 -64
  256. package/lib/dist/mcp/engine.js.map +1 -1
  257. package/lib/dist/mcp/explore-dedup.d.ts +140 -0
  258. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
  259. package/lib/dist/mcp/explore-dedup.js +239 -0
  260. package/lib/dist/mcp/explore-dedup.js.map +1 -0
  261. package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
  262. package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  263. package/lib/dist/mcp/explore-diagnostics.js +558 -0
  264. package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
  265. package/lib/dist/mcp/explore-session-state.d.ts +217 -0
  266. package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
  267. package/lib/dist/mcp/explore-session-state.js +322 -0
  268. package/lib/dist/mcp/explore-session-state.js.map +1 -0
  269. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  270. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  271. package/lib/dist/mcp/index-freshness-worker.js +30 -0
  272. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  273. package/lib/dist/mcp/index-freshness.d.ts +7 -0
  274. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  275. package/lib/dist/mcp/index-freshness.js +94 -0
  276. package/lib/dist/mcp/index-freshness.js.map +1 -0
  277. package/lib/dist/mcp/index.d.ts +27 -1
  278. package/lib/dist/mcp/index.d.ts.map +1 -1
  279. package/lib/dist/mcp/index.js +159 -14
  280. package/lib/dist/mcp/index.js.map +1 -1
  281. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  282. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  283. package/lib/dist/mcp/liveness-watchdog.js +14 -3
  284. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  285. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  286. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  287. package/lib/dist/mcp/project-lifecycle.js +181 -0
  288. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  289. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  290. package/lib/dist/mcp/proxy.js +15 -1
  291. package/lib/dist/mcp/proxy.js.map +1 -1
  292. package/lib/dist/mcp/query-pool.d.ts +2 -2
  293. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  294. package/lib/dist/mcp/query-pool.js +9 -7
  295. package/lib/dist/mcp/query-pool.js.map +1 -1
  296. package/lib/dist/mcp/query-worker.js +2 -2
  297. package/lib/dist/mcp/query-worker.js.map +1 -1
  298. package/lib/dist/mcp/server-instructions.d.ts +2 -2
  299. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  300. package/lib/dist/mcp/server-instructions.js +13 -5
  301. package/lib/dist/mcp/server-instructions.js.map +1 -1
  302. package/lib/dist/mcp/session.d.ts +16 -0
  303. package/lib/dist/mcp/session.d.ts.map +1 -1
  304. package/lib/dist/mcp/session.js +36 -13
  305. package/lib/dist/mcp/session.js.map +1 -1
  306. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  307. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  308. package/lib/dist/mcp/startup-handshake.js +10 -2
  309. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  310. package/lib/dist/mcp/tools.d.ts +544 -38
  311. package/lib/dist/mcp/tools.d.ts.map +1 -1
  312. package/lib/dist/mcp/tools.js +4246 -770
  313. package/lib/dist/mcp/tools.js.map +1 -1
  314. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  315. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  316. package/lib/dist/mcp/writer-lock.js +260 -0
  317. package/lib/dist/mcp/writer-lock.js.map +1 -0
  318. package/lib/dist/project-config.d.ts +23 -0
  319. package/lib/dist/project-config.d.ts.map +1 -1
  320. package/lib/dist/project-config.js +39 -2
  321. package/lib/dist/project-config.js.map +1 -1
  322. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  323. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  324. package/lib/dist/resolution/alias-binding.js +127 -0
  325. package/lib/dist/resolution/alias-binding.js.map +1 -0
  326. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  327. package/lib/dist/resolution/c-fnptr-synthesizer.js +21 -19
  328. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  329. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  330. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  331. package/lib/dist/resolution/callback-synthesizer.js +330 -154
  332. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  333. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  334. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  335. package/lib/dist/resolution/cpp-constructor.js +123 -0
  336. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  337. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  338. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  339. package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
  340. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  341. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  342. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  343. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  344. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  345. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  346. package/lib/dist/resolution/frameworks/csharp.js +96 -2
  347. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  348. package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
  349. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  350. package/lib/dist/resolution/frameworks/expo-router.js +785 -0
  351. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  352. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  353. package/lib/dist/resolution/frameworks/express.js +251 -16
  354. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  355. package/lib/dist/resolution/frameworks/index.d.ts +5 -0
  356. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  357. package/lib/dist/resolution/frameworks/index.js +29 -1
  358. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  359. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  360. package/lib/dist/resolution/frameworks/java.js +79 -47
  361. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  362. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  363. package/lib/dist/resolution/frameworks/nestjs.js +6 -14
  364. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  365. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  366. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  367. package/lib/dist/resolution/frameworks/nextjs.js +328 -0
  368. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  369. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  370. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  371. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  372. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  373. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  374. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  375. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  376. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  377. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  378. package/lib/dist/resolution/frameworks/python.js +166 -0
  379. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  380. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  381. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  382. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  383. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  384. package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
  385. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  386. package/lib/dist/resolution/frameworks/react-router.js +187 -0
  387. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  388. package/lib/dist/resolution/frameworks/react.d.ts +2 -1
  389. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  390. package/lib/dist/resolution/frameworks/react.js +188 -139
  391. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  392. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  393. package/lib/dist/resolution/frameworks/svelte.js +6 -1
  394. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  395. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  396. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  397. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  398. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  399. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  400. package/lib/dist/resolution/frameworks/swift.js +11 -1
  401. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  402. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  403. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  404. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  405. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  406. package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
  407. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  408. package/lib/dist/resolution/frameworks/vue-router.js +377 -0
  409. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  410. package/lib/dist/resolution/import-resolver.d.ts +38 -0
  411. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  412. package/lib/dist/resolution/import-resolver.js +394 -28
  413. package/lib/dist/resolution/import-resolver.js.map +1 -1
  414. package/lib/dist/resolution/index.d.ts +89 -25
  415. package/lib/dist/resolution/index.d.ts.map +1 -1
  416. package/lib/dist/resolution/index.js +567 -149
  417. package/lib/dist/resolution/index.js.map +1 -1
  418. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  419. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  420. package/lib/dist/resolution/js-builtins.js +46 -0
  421. package/lib/dist/resolution/js-builtins.js.map +1 -0
  422. package/lib/dist/resolution/name-matcher.d.ts +99 -22
  423. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  424. package/lib/dist/resolution/name-matcher.js +2192 -87
  425. package/lib/dist/resolution/name-matcher.js.map +1 -1
  426. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  427. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  428. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  429. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  430. package/lib/dist/resolution/path-aliases.d.ts +6 -4
  431. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  432. package/lib/dist/resolution/path-aliases.js +125 -17
  433. package/lib/dist/resolution/path-aliases.js.map +1 -1
  434. package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
  435. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  436. package/lib/dist/resolution/react-router-synthesizer.js +126 -0
  437. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  438. package/lib/dist/resolution/resolver-pool.d.ts +2 -0
  439. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  440. package/lib/dist/resolution/resolver-pool.js +4 -0
  441. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  442. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  443. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  444. package/lib/dist/resolution/strip-comments.js +58 -0
  445. package/lib/dist/resolution/strip-comments.js.map +1 -1
  446. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  447. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  448. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  449. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  450. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  451. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  452. package/lib/dist/resolution/synth-utils.js +75 -0
  453. package/lib/dist/resolution/synth-utils.js.map +1 -0
  454. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  455. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  456. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  457. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  458. package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
  459. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  460. package/lib/dist/resolution/tier-synthesizer.js +931 -0
  461. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  462. package/lib/dist/resolution/types.d.ts +78 -2
  463. package/lib/dist/resolution/types.d.ts.map +1 -1
  464. package/lib/dist/resolution/types.js +64 -0
  465. package/lib/dist/resolution/types.js.map +1 -1
  466. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  467. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  468. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  469. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  470. package/lib/dist/search/identifier-segments.d.ts +10 -0
  471. package/lib/dist/search/identifier-segments.d.ts.map +1 -1
  472. package/lib/dist/search/identifier-segments.js +29 -0
  473. package/lib/dist/search/identifier-segments.js.map +1 -1
  474. package/lib/dist/search/query-paths.d.ts +106 -0
  475. package/lib/dist/search/query-paths.d.ts.map +1 -0
  476. package/lib/dist/search/query-paths.js +513 -0
  477. package/lib/dist/search/query-paths.js.map +1 -0
  478. package/lib/dist/search/query-utils.d.ts +16 -1
  479. package/lib/dist/search/query-utils.d.ts.map +1 -1
  480. package/lib/dist/search/query-utils.js +48 -10
  481. package/lib/dist/search/query-utils.js.map +1 -1
  482. package/lib/dist/sync/watch-policy.d.ts +14 -0
  483. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  484. package/lib/dist/sync/watch-policy.js +19 -0
  485. package/lib/dist/sync/watch-policy.js.map +1 -1
  486. package/lib/dist/sync/watcher.d.ts +74 -35
  487. package/lib/dist/sync/watcher.d.ts.map +1 -1
  488. package/lib/dist/sync/watcher.js +281 -99
  489. package/lib/dist/sync/watcher.js.map +1 -1
  490. package/lib/dist/telemetry/index.d.ts +4 -2
  491. package/lib/dist/telemetry/index.d.ts.map +1 -1
  492. package/lib/dist/telemetry/index.js +92 -41
  493. package/lib/dist/telemetry/index.js.map +1 -1
  494. package/lib/dist/types.d.ts +21 -2
  495. package/lib/dist/types.d.ts.map +1 -1
  496. package/lib/dist/types.js +2 -0
  497. package/lib/dist/types.js.map +1 -1
  498. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  499. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  500. package/lib/dist/ui-server/api/deadcode.js +136 -0
  501. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  502. package/lib/dist/ui-server/api/effects.d.ts +87 -0
  503. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  504. package/lib/dist/ui-server/api/effects.js +499 -0
  505. package/lib/dist/ui-server/api/effects.js.map +1 -0
  506. package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
  507. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  508. package/lib/dist/ui-server/api/entrypoints.js +279 -0
  509. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  510. package/lib/dist/ui-server/api/events.d.ts +183 -0
  511. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  512. package/lib/dist/ui-server/api/events.js +430 -0
  513. package/lib/dist/ui-server/api/events.js.map +1 -0
  514. package/lib/dist/ui-server/api/file.d.ts +66 -0
  515. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  516. package/lib/dist/ui-server/api/file.js +235 -0
  517. package/lib/dist/ui-server/api/file.js.map +1 -0
  518. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  519. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  520. package/lib/dist/ui-server/api/filecode.js +205 -0
  521. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  522. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  523. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  524. package/lib/dist/ui-server/api/flow.js +612 -0
  525. package/lib/dist/ui-server/api/flow.js.map +1 -0
  526. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  527. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  528. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  529. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  530. package/lib/dist/ui-server/api/index.d.ts +90 -0
  531. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  532. package/lib/dist/ui-server/api/index.js +332 -0
  533. package/lib/dist/ui-server/api/index.js.map +1 -0
  534. package/lib/dist/ui-server/api/map.d.ts +238 -0
  535. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  536. package/lib/dist/ui-server/api/map.js +681 -0
  537. package/lib/dist/ui-server/api/map.js.map +1 -0
  538. package/lib/dist/ui-server/api/node.d.ts +81 -0
  539. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  540. package/lib/dist/ui-server/api/node.js +388 -0
  541. package/lib/dist/ui-server/api/node.js.map +1 -0
  542. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  543. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  544. package/lib/dist/ui-server/api/nodes.js +45 -0
  545. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  546. package/lib/dist/ui-server/api/program.d.ts +139 -0
  547. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  548. package/lib/dist/ui-server/api/program.js +315 -0
  549. package/lib/dist/ui-server/api/program.js.map +1 -0
  550. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  551. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  552. package/lib/dist/ui-server/api/respond.js +186 -0
  553. package/lib/dist/ui-server/api/respond.js.map +1 -0
  554. package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
  555. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  556. package/lib/dist/ui-server/api/route-roots.js +96 -0
  557. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  558. package/lib/dist/ui-server/api/routes.d.ts +59 -0
  559. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  560. package/lib/dist/ui-server/api/routes.js +108 -0
  561. package/lib/dist/ui-server/api/routes.js.map +1 -0
  562. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  563. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  564. package/lib/dist/ui-server/api/screens.js +611 -0
  565. package/lib/dist/ui-server/api/screens.js.map +1 -0
  566. package/lib/dist/ui-server/api/search.d.ts +29 -0
  567. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  568. package/lib/dist/ui-server/api/search.js +232 -0
  569. package/lib/dist/ui-server/api/search.js.map +1 -0
  570. package/lib/dist/ui-server/api/session.d.ts +52 -0
  571. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  572. package/lib/dist/ui-server/api/session.js +196 -0
  573. package/lib/dist/ui-server/api/session.js.map +1 -0
  574. package/lib/dist/ui-server/api/source.d.ts +200 -0
  575. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  576. package/lib/dist/ui-server/api/source.js +422 -0
  577. package/lib/dist/ui-server/api/source.js.map +1 -0
  578. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  579. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  580. package/lib/dist/ui-server/api/stats.js +164 -0
  581. package/lib/dist/ui-server/api/stats.js.map +1 -0
  582. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  583. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  584. package/lib/dist/ui-server/api/steps.js +1446 -0
  585. package/lib/dist/ui-server/api/steps.js.map +1 -0
  586. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  587. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  588. package/lib/dist/ui-server/api/trail-store.js +323 -0
  589. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  590. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  591. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  592. package/lib/dist/ui-server/api/trails.js +369 -0
  593. package/lib/dist/ui-server/api/trails.js.map +1 -0
  594. package/lib/dist/ui-server/api/when.d.ts +125 -0
  595. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  596. package/lib/dist/ui-server/api/when.js +251 -0
  597. package/lib/dist/ui-server/api/when.js.map +1 -0
  598. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  599. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  600. package/lib/dist/ui-server/api/wire.js +231 -0
  601. package/lib/dist/ui-server/api/wire.js.map +1 -0
  602. package/lib/dist/ui-server/assets.d.ts +40 -0
  603. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  604. package/lib/dist/ui-server/assets.js +110 -0
  605. package/lib/dist/ui-server/assets.js.map +1 -0
  606. package/lib/dist/ui-server/constants.d.ts +32 -0
  607. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  608. package/lib/dist/ui-server/constants.js +35 -0
  609. package/lib/dist/ui-server/constants.js.map +1 -0
  610. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  611. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  612. package/lib/dist/ui-server/highlight/index.js +307 -0
  613. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  614. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  615. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  616. package/lib/dist/ui-server/highlight/languages.js +50 -0
  617. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  618. package/lib/dist/ui-server/index.d.ts +92 -0
  619. package/lib/dist/ui-server/index.d.ts.map +1 -0
  620. package/lib/dist/ui-server/index.js +399 -0
  621. package/lib/dist/ui-server/index.js.map +1 -0
  622. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  623. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  624. package/lib/dist/ui-server/open-browser.js +79 -0
  625. package/lib/dist/ui-server/open-browser.js.map +1 -0
  626. package/lib/dist/ui-server/security.d.ts +127 -0
  627. package/lib/dist/ui-server/security.d.ts.map +1 -0
  628. package/lib/dist/ui-server/security.js +332 -0
  629. package/lib/dist/ui-server/security.js.map +1 -0
  630. package/lib/dist/ui-server/static.d.ts +45 -0
  631. package/lib/dist/ui-server/static.d.ts.map +1 -0
  632. package/lib/dist/ui-server/static.js +165 -0
  633. package/lib/dist/ui-server/static.js.map +1 -0
  634. package/lib/dist/utils.d.ts +14 -2
  635. package/lib/dist/utils.d.ts.map +1 -1
  636. package/lib/dist/utils.js +25 -10
  637. package/lib/dist/utils.js.map +1 -1
  638. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  639. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  640. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  641. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  642. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  643. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  644. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  645. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  646. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  647. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  648. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  649. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  650. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  651. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  652. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  653. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  654. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  655. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  656. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  657. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  658. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  659. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  660. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  661. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  662. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  663. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  664. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  665. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  666. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  667. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  668. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  669. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  670. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  671. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  672. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  673. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  674. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  675. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  676. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  677. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  678. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  679. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  680. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  681. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  682. package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
  683. package/lib/dist/viewer/index.html +16 -0
  684. package/lib/kernel/codegraph-kernel.node +2 -2
  685. package/lib/node_modules/.package-lock.json +4 -4
  686. package/lib/node_modules/picomatch/README.md +56 -51
  687. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  688. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  689. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  690. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  691. package/lib/node_modules/picomatch/package.json +4 -4
  692. package/lib/package.json +9 -2
  693. package/package.json +1 -1
@@ -45,21 +45,40 @@ exports.ReferenceResolver = void 0;
45
45
  exports.createResolver = createResolver;
46
46
  const fs = __importStar(require("fs"));
47
47
  const path = __importStar(require("path"));
48
+ const synthesis_stage_1 = require("../db/synthesis-stage");
49
+ const types_1 = require("./types");
48
50
  const name_matcher_1 = require("./name-matcher");
51
+ const cpp_macro_visibility_1 = require("./cpp-macro-visibility");
52
+ const cpp_constructor_1 = require("./cpp-constructor");
49
53
  const import_resolver_1 = require("./import-resolver");
50
54
  const resolver_pool_1 = require("./resolver-pool");
55
+ const alias_binding_1 = require("./alias-binding");
51
56
  const frameworks_1 = require("./frameworks");
52
57
  const callback_synthesizer_1 = require("./callback-synthesizer");
53
58
  const cooperative_yield_1 = require("./cooperative-yield");
59
+ const file_limits_1 = require("../file-limits");
54
60
  const path_aliases_1 = require("./path-aliases");
55
61
  const go_module_1 = require("./go-module");
56
62
  const workspace_packages_1 = require("./workspace-packages");
57
63
  const errors_1 = require("../errors");
64
+ const utils_1 = require("../utils");
58
65
  const lru_cache_1 = require("./lru-cache");
66
+ const js_builtins_1 = require("./js-builtins");
59
67
  /** Node kinds that can declare supertypes (extends/implements). */
60
68
  const SUPERTYPE_BEARING_KINDS = new Set([
61
69
  'class', 'struct', 'interface', 'trait', 'protocol', 'enum',
62
70
  ]);
71
+ /**
72
+ * The only edges resolving a reference reads (getSupertypes' walk). The batch
73
+ * loop commits a batch that made any of these before the next batch fans out;
74
+ * its other edges land while that batch resolves. A resolution strategy that
75
+ * reads another edge kind must be added here.
76
+ */
77
+ const RESOLUTION_READ_EDGE_KINDS = ['implements', 'extends'];
78
+ // SUPERTYPE_TARGET_KINDS (the kinds an extends/implements edge may TARGET)
79
+ // lives in ./types — the name-matcher needs the same set to restrict its
80
+ // candidate pool before ranking. It is deliberately wider than
81
+ // SUPERTYPE_BEARING_KINDS above, which is about the DECLARING side.
63
82
  /**
64
83
  * Languages whose chained static-factory/fluent calls defer to the conformance
65
84
  * second pass. Dotted-receiver languages resolve via matchDottedCallChain; the
@@ -92,13 +111,6 @@ function resolveCacheLimit() {
92
111
  // Re-export types
93
112
  __exportStar(require("./types"), exports);
94
113
  // Pre-built Sets for O(1) built-in lookups (allocated once, shared across all instances)
95
- const JS_BUILT_INS = new Set([
96
- 'console', 'window', 'document', 'global', 'process',
97
- 'Promise', 'Array', 'Object', 'String', 'Number', 'Boolean',
98
- 'Date', 'Math', 'JSON', 'RegExp', 'Error', 'Map', 'Set',
99
- 'setTimeout', 'setInterval', 'clearTimeout', 'clearInterval',
100
- 'fetch', 'require', 'module', 'exports', '__dirname', '__filename',
101
- ]);
102
114
  const REACT_HOOKS = new Set([
103
115
  'useState', 'useEffect', 'useContext', 'useReducer', 'useCallback',
104
116
  'useMemo', 'useRef', 'useLayoutEffect', 'useImperativeHandle', 'useDebugValue',
@@ -219,8 +231,9 @@ class ReferenceResolver {
219
231
  context;
220
232
  frameworks = [];
221
233
  // Chained static-factory/fluent call refs the first pass couldn't resolve,
222
- // collected in-memory (the batched resolver deletes unresolved refs from the
223
- // DB, so they can't be re-read). Drained by resolveChainedCallsViaConformance
234
+ // collected in-memory and left pending in the DB until the post-pass
235
+ // finishes, so a restart can recover the queue (#1577). Drained by
236
+ // resolveChainedCallsViaConformance
224
237
  // once implements/extends edges exist, to resolve methods on a supertype the
225
238
  // receiver conforms to (#750).
226
239
  deferredChainRefs = [];
@@ -229,6 +242,7 @@ class ReferenceResolver {
229
242
  // same reason as deferredChainRefs and drained by
230
243
  // resolveDeferredThisMemberRefs once implements/extends edges exist (#808).
231
244
  deferredThisMemberRefs = [];
245
+ deferredRowIds = new Set();
232
246
  // Per-`.razor`/`.cshtml`-file `@using` namespace set (own directives + folder
233
247
  // `_Imports.razor`, cascading to the project root). Used to disambiguate a
234
248
  // markup type ref to the right C# namespace.
@@ -244,6 +258,12 @@ class ReferenceResolver {
244
258
  lowerNameCache; // lower(name) → nodes cache
245
259
  qualifiedNameCache; // qualified_name → nodes cache
246
260
  fileLinesCache; // file → split lines cache
261
+ // id → node for the resolver's own point reads. Every resolved reference
262
+ // re-reads its target a few times (kind gate, language gate, alias
263
+ // following, edge creation) and targets recur ~5× on large repos; the query
264
+ // layer's cache is too small for that working set. Same stable window as the
265
+ // name caches above; absent ids are not cached.
266
+ nodeByIdCache;
247
267
  methodMatchCache; // lang\0Type::method → matching method nodes
248
268
  // Per-(language, methodName) owner index for getMethodMatches: buckets a
249
269
  // method name's candidates by their qualifiedName's last two segments so a
@@ -280,6 +300,8 @@ class ReferenceResolver {
280
300
  // resolution pass (same lifetime assumption as nameCache); clearCaches() resets
281
301
  // it between passes. Callers must treat the returned array as read-only.
282
302
  nodesByKindCache = new Map();
303
+ // Filesystem existence probes behind context.fileExists (paths not in knownFiles).
304
+ fileExistsMemo = new Map();
283
305
  knownNames = null; // all known symbol names for fast pre-filtering
284
306
  knownFiles = null;
285
307
  cachesWarmed = false;
@@ -308,6 +330,7 @@ class ReferenceResolver {
308
330
  // Split-lines arrays are heavier than content strings; refs arrive
309
331
  // file-ordered, so a small cache still hits nearly always.
310
332
  this.fileLinesCache = new lru_cache_1.LRUCache(contentLimit);
333
+ this.nodeByIdCache = new lru_cache_1.LRUCache(Math.max(limit * 4, 20_000));
311
334
  this.methodMatchCache = new lru_cache_1.LRUCache(limit);
312
335
  this.context = this.createContext();
313
336
  }
@@ -386,6 +409,16 @@ class ReferenceResolver {
386
409
  this.knownNames = names;
387
410
  this.cachesWarmed = true;
388
411
  }
412
+ /** `queries.getNodeById` through the resolver's own id → node cache. */
413
+ nodeById(id) {
414
+ const cached = this.nodeByIdCache.get(id);
415
+ if (cached !== undefined)
416
+ return cached;
417
+ const node = this.queries.getNodeById(id);
418
+ if (node)
419
+ this.nodeByIdCache.set(id, node);
420
+ return node;
421
+ }
389
422
  /**
390
423
  * Clear internal caches
391
424
  */
@@ -398,11 +431,13 @@ class ReferenceResolver {
398
431
  this.lowerNameCache.clear();
399
432
  this.qualifiedNameCache.clear();
400
433
  this.fileLinesCache.clear();
434
+ this.nodeByIdCache.clear();
401
435
  this.methodMatchCache.clear();
402
436
  this.methodOwnerIndexCache.clear();
403
437
  this.supertypeMemo.clear();
404
438
  this.supertypeGen++;
405
439
  this.nodesByKindCache.clear();
440
+ this.fileExistsMemo.clear();
406
441
  this.knownNames = null;
407
442
  this.knownFiles = null;
408
443
  this.cachesWarmed = false;
@@ -411,6 +446,7 @@ class ReferenceResolver {
411
446
  if (this.context) {
412
447
  (0, import_resolver_1.clearImportResolverMemos)(this.context);
413
448
  (0, name_matcher_1.clearNameMatcherMemos)(this.context);
449
+ (0, cpp_macro_visibility_1.clearCppMacroVisibility)(this.context);
414
450
  }
415
451
  }
416
452
  /** `readFile` through the LRU content cache (null = read failed, also cached). */
@@ -420,6 +456,14 @@ class ReferenceResolver {
420
456
  }
421
457
  const fullPath = path.join(this.projectRoot, filePath);
422
458
  try {
459
+ // Import resolvers may follow package metadata to an archive (`file:*.har`,
460
+ // for example). Reject anything extraction would not accept before UTF-8
461
+ // decoding can multiply a large binary blob into gigabytes of V8 heap.
462
+ const stats = fs.statSync(fullPath);
463
+ if (!stats.isFile() || stats.size > file_limits_1.MAX_SOURCE_FILE_SIZE_BYTES) {
464
+ this.fileCache.set(filePath, null);
465
+ return null;
466
+ }
423
467
  const content = fs.readFileSync(fullPath, 'utf-8');
424
468
  this.fileCache.set(filePath, content);
425
469
  return content;
@@ -430,17 +474,49 @@ class ReferenceResolver {
430
474
  return null;
431
475
  }
432
476
  }
477
+ /**
478
+ * `readFileCached(filePath)?.includes(needle)` for an ASCII needle, searched
479
+ * in the raw bytes: an ASCII byte sequence survives UTF-8 decoding
480
+ * unchanged, and decoding is most of reading a file nobody keeps.
481
+ */
482
+ fileContains(filePath, needle) {
483
+ if (this.fileCache.has(filePath))
484
+ return this.fileCache.get(filePath)?.includes(needle) ?? false;
485
+ const fullPath = path.join(this.projectRoot, filePath);
486
+ try {
487
+ const stats = fs.statSync(fullPath);
488
+ if (!stats.isFile() || stats.size > file_limits_1.MAX_SOURCE_FILE_SIZE_BYTES)
489
+ return false;
490
+ return fs.readFileSync(fullPath).includes(needle);
491
+ }
492
+ catch {
493
+ return false;
494
+ }
495
+ }
433
496
  /**
434
497
  * Create the resolution context
435
498
  */
436
499
  createContext() {
437
500
  return {
501
+ resolveImport: (ref) => (0, import_resolver_1.resolveViaImport)(ref, this.context),
438
502
  getNodesInFile: (filePath) => {
439
503
  if (!this.nodeCache.has(filePath)) {
440
504
  this.nodeCache.set(filePath, this.queries.getNodesByFile(filePath));
441
505
  }
442
506
  return this.nodeCache.get(filePath);
443
507
  },
508
+ fileHasExportedNode: (filePath) => {
509
+ const cached = this.nodeCache.get(filePath);
510
+ return cached !== undefined ? cached.some((n) => n.isExported) : this.queries.fileHasExportedNode(filePath);
511
+ },
512
+ getExportedNodesInFile: (filePath) => {
513
+ const cached = this.nodeCache.get(filePath);
514
+ return cached !== undefined ? cached.filter((n) => n.isExported) : this.queries.getExportedNodesByFile(filePath);
515
+ },
516
+ getNodesInFileNamed: (filePath, name) => {
517
+ const cached = this.nodeCache.get(filePath);
518
+ return cached !== undefined ? cached.filter((n) => n.name === name) : this.queries.getNodesByFileAndName(filePath, name);
519
+ },
444
520
  getNodesByName: (name) => {
445
521
  const cached = this.nameCache.get(name);
446
522
  if (cached !== undefined)
@@ -471,7 +547,7 @@ class ReferenceResolver {
471
547
  for (const m of candidates) {
472
548
  if (m.kind !== 'method')
473
549
  continue;
474
- if (m.language !== language)
550
+ if (!(0, name_matcher_1.sameLanguageFamily)(m.language, language))
475
551
  continue;
476
552
  const qn = m.qualifiedName;
477
553
  if (qn === want || qn.endsWith(`::${want}`))
@@ -498,7 +574,7 @@ class ReferenceResolver {
498
574
  for (const m of candidates) {
499
575
  if (m.kind !== 'method')
500
576
  continue;
501
- if (m.language !== language)
577
+ if (!(0, name_matcher_1.sameLanguageFamily)(m.language, language))
502
578
  continue;
503
579
  const qn = m.qualifiedName;
504
580
  const i2 = qn.lastIndexOf('::');
@@ -548,17 +624,40 @@ class ReferenceResolver {
548
624
  return true;
549
625
  }
550
626
  }
551
- // Fall back to filesystem for files not yet indexed
552
- const fullPath = path.join(this.projectRoot, filePath);
553
- try {
554
- return fs.existsSync(fullPath);
555
- }
556
- catch (error) {
557
- (0, errors_1.logDebug)('Error checking file existence', { filePath, error: String(error) });
558
- return false;
627
+ // Fall back to filesystem for files not yet indexed. `path.join` does
628
+ // not clamp, and relative-import resolution hands us paths carrying
629
+ // `../` segments, so the probe has to be contained (#1631): a path
630
+ // outside the root can never be an indexed project file, and the
631
+ // `knownFiles` check above already answered for everything that is.
632
+ // Lexical containment only: this is a per-candidate hot path, and the
633
+ // symlink half of `validatePathWithinRoot` costs two `realpathSync`
634
+ // calls per probe (~70x slower here). It would also be wrong to apply
635
+ // — indexing deliberately follows in-root symlinks whose targets live
636
+ // outside the root (#935), so only the `../` escape is refused.
637
+ // Memoized: import resolution probes the same candidate paths (every
638
+ // extension of a specifier) from every file that imports it, and the
639
+ // tree does not change within a resolution pass (same window as the
640
+ // file-content cache; dropped by clearCaches).
641
+ const probed = this.fileExistsMemo.get(filePath);
642
+ if (probed !== undefined)
643
+ return probed;
644
+ const fullPath = (0, utils_1.lexicalPathWithinRoot)(this.projectRoot, filePath);
645
+ let exists = false;
646
+ if (fullPath !== null) {
647
+ try {
648
+ exists = fs.existsSync(fullPath);
649
+ }
650
+ catch (error) {
651
+ (0, errors_1.logDebug)('Error checking file existence', { filePath, error: String(error) });
652
+ }
559
653
  }
654
+ if (this.fileExistsMemo.size >= 200_000)
655
+ this.fileExistsMemo.clear();
656
+ this.fileExistsMemo.set(filePath, exists);
657
+ return exists;
560
658
  },
561
659
  readFile: (filePath) => this.readFileCached(filePath),
660
+ fileContains: (filePath, needle) => this.fileContains(filePath, needle),
562
661
  getFileLines: (filePath) => {
563
662
  const cached = this.fileLinesCache.get(filePath);
564
663
  if (cached !== undefined)
@@ -599,7 +698,7 @@ class ReferenceResolver {
599
698
  return result;
600
699
  },
601
700
  getNodeById: (id) => {
602
- return this.queries.getNodeById(id);
701
+ return this.nodeById(id);
603
702
  },
604
703
  getSupertypes: (typeName, language) => {
605
704
  // Union the `implements`/`extends` targets of every same-named type node.
@@ -616,7 +715,9 @@ class ReferenceResolver {
616
715
  return hit.supers;
617
716
  const typeNodes = this.context
618
717
  .getNodesByName(typeName)
619
- .filter((n) => SUPERTYPE_BEARING_KINDS.has(n.kind) && n.language === language);
718
+ // Scala singletons can inherit members even though they cannot be parents.
719
+ .filter((n) => n.language === language && (SUPERTYPE_BEARING_KINDS.has(n.kind) ||
720
+ (n.language === 'scala' && n.kind === 'module')));
620
721
  let supers;
621
722
  if (typeNodes.length === 0) {
622
723
  supers = [];
@@ -624,8 +725,8 @@ class ReferenceResolver {
624
725
  else {
625
726
  const supertypes = new Set();
626
727
  for (const tn of typeNodes) {
627
- for (const edge of this.queries.getOutgoingEdges(tn.id, ['implements', 'extends'])) {
628
- const target = this.queries.getNodeById(edge.target);
728
+ for (const edge of this.queries.getOutgoingEdges(tn.id, RESOLUTION_READ_EDGE_KINDS)) {
729
+ const target = this.nodeById(edge.target);
629
730
  if (target?.name && target.name !== typeName)
630
731
  supertypes.add(target.name);
631
732
  }
@@ -699,6 +800,7 @@ class ReferenceResolver {
699
800
  resolveAll(unresolvedRefs, onProgress) {
700
801
  // Pre-load all nodes into memory for fast lookups
701
802
  this.warmCaches();
803
+ this.advanceSupertypeGeneration();
702
804
  const resolved = [];
703
805
  const unresolved = [];
704
806
  const byMethod = {};
@@ -844,9 +946,46 @@ class ReferenceResolver {
844
946
  return false;
845
947
  }
846
948
  /**
847
- * Resolve a single reference
949
+ * Resolve a single reference.
950
+ *
951
+ * Thin decorator over `resolveOneInner` so every strategy — framework,
952
+ * import, name-match, chain, CFML component path — passes through the
953
+ * inheritance target-kind gate at ONE seam. Filtering inside the
954
+ * name-matcher would have covered `matchByExactName` only.
955
+ * Calls that land on an alias binding then forward once to the callable
956
+ * the alias names (see ./alias-binding), regardless of the strategy.
848
957
  */
849
958
  resolveOne(ref) {
959
+ // A C/C++ "call" whose name is a function-like macro visible in this
960
+ // translation unit is a macro expansion, not a call — it must never bind
961
+ // to a same-named function in another file (#1838).
962
+ if ((0, cpp_macro_visibility_1.isVisibleCppMacro)(ref, this.context))
963
+ return null;
964
+ const candidate = this.gateTargetKind(this.resolveOneInner(ref), ref);
965
+ const resolved = candidate?.resolvedBy === 'framework'
966
+ ? this.gateFrameworkLanguage(candidate, ref)
967
+ : this.gateLanguage(candidate, ref);
968
+ if (!resolved || ref.referenceKind !== 'calls')
969
+ return resolved;
970
+ const target = this.nodeById(resolved.targetNodeId);
971
+ if (!target)
972
+ return resolved;
973
+ const dot = ref.referenceName.lastIndexOf('.');
974
+ const memberName = dot >= 0 ? ref.referenceName.slice(dot + 1) : null;
975
+ const forwarded = (0, alias_binding_1.resolveAliasBinding)(target, memberName, this.context);
976
+ if (!forwarded || forwarded.id === resolved.targetNodeId)
977
+ return resolved;
978
+ return this.gateLanguage({
979
+ ...resolved,
980
+ targetNodeId: forwarded.id,
981
+ confidence: Math.min(resolved.confidence, 0.85),
982
+ }, ref);
983
+ }
984
+ resolveOneInner(ref) {
985
+ // A local C++ object construction (`T obj(args)`, ref `ns::T::T/1`)
986
+ // resolves ONLY to a constructor of the lexically nearest `T` (#1839).
987
+ if ((0, cpp_constructor_1.isCppConstructorRef)(ref))
988
+ return (0, cpp_constructor_1.matchCppConstructor)(ref, this.context);
850
989
  // Skip built-in/external references
851
990
  if (this.isBuiltInOrExternal(ref)) {
852
991
  return null;
@@ -876,9 +1015,13 @@ class ReferenceResolver {
876
1015
  // indexed under the bare name, so the existence check strips the dot.
877
1016
  // Nix static path imports (`import ./x.nix`) name a FILE, not a symbol —
878
1017
  // they bypass the symbol-existence check and resolve via resolveViaImport.
879
- const existenceName = ref.language === 'arkts' && ref.referenceName.startsWith('.')
1018
+ let existenceName = ref.language === 'arkts' && ref.referenceName.startsWith('.')
880
1019
  ? ref.referenceName.slice(1)
881
1020
  : ref.referenceName;
1021
+ // Erlang refs carry the call-site arity (`f/1`, `mod::f/2` — #1610); the
1022
+ // name index stores bare names, so existence is checked arity-less.
1023
+ if (ref.language === 'erlang')
1024
+ existenceName = existenceName.replace(/\/\d{1,3}$/, '');
882
1025
  const tPre = this.profileStages ? process.hrtime.bigint() : 0n;
883
1026
  const preFilterPass = (0, import_resolver_1.isNixPathImportRef)(ref) ||
884
1027
  this.hasAnyPossibleMatch(existenceName) ||
@@ -887,7 +1030,7 @@ class ReferenceResolver {
887
1030
  if (this.profileStages)
888
1031
  this.stageAdd('preFilter', ref, preFilterPass, tPre);
889
1032
  if (!preFilterPass) {
890
- return null;
1033
+ return this.gateLanguage((0, name_matcher_1.matchJsStoreBindingCall)(ref, this.context), ref);
891
1034
  }
892
1035
  // Function-as-value refs (#756) get a dedicated, strictly-gated path:
893
1036
  // import-based resolution first (an imported callback resolves through its
@@ -900,10 +1043,19 @@ class ReferenceResolver {
900
1043
  if (ref.referenceName.startsWith('this.')) {
901
1044
  return this.gateLanguage(this.resolveThisMemberFnRef(ref), ref);
902
1045
  }
1046
+ if ((ref.language === 'python' || ref.language === 'go') && ref.referenceName.includes('.')) {
1047
+ return this.gateLanguage((0, name_matcher_1.matchFunctionRef)(ref, this.context), ref);
1048
+ }
903
1049
  const viaImport = this.gateLanguage((0, import_resolver_1.resolveViaImport)(ref, this.context), ref);
904
1050
  if (viaImport) {
905
- const target = this.queries.getNodeById(viaImport.targetNodeId);
906
- if (target && (target.kind === 'function' || target.kind === 'method')) {
1051
+ const target = this.nodeById(viaImport.targetNodeId);
1052
+ if (target &&
1053
+ (target.kind === 'function' ||
1054
+ target.kind === 'method' ||
1055
+ // Python (#1478): an imported class used as a value (`return
1056
+ // OrgSerializerFull`) resolves through its import like any
1057
+ // callback — mirrors matchFunctionRef's bareClassOk.
1058
+ (ref.language === 'python' && target.kind === 'class'))) {
907
1059
  return viaImport;
908
1060
  }
909
1061
  }
@@ -928,12 +1080,16 @@ class ReferenceResolver {
928
1080
  if (razorResult)
929
1081
  return razorResult;
930
1082
  }
1083
+ // An explicit PHP class import owns its static calls, including an
1084
+ // unavailable method. Do not let same-name fallbacks change the receiver
1085
+ // to an unrelated Service/Repository type (#1545).
1086
+ const phpStaticImport = (0, import_resolver_1.resolvePhpImportedStaticCall)(ref, this.context);
1087
+ if (phpStaticImport !== undefined)
1088
+ return this.gateLanguage(phpStaticImport, ref);
931
1089
  const candidates = [];
932
1090
  // Strategy 1: Try framework-specific resolution. Cross-language bridges
933
1091
  // are deliberately preserved (Drupal `routing.yml` → PHP controller, RN
934
- // JS → native `calls`) — `gateFrameworkLanguage` only drops a type/import
935
- // edge between two KNOWN families (see its doc), never a `calls` bridge or
936
- // a config↔code edge.
1092
+ // JS → native `calls`); other code references obey the shared family gate.
937
1093
  const tFw = this.profileStages ? process.hrtime.bigint() : 0n;
938
1094
  let fwEarly = null;
939
1095
  for (const framework of this.frameworks) {
@@ -950,7 +1106,21 @@ class ReferenceResolver {
950
1106
  this.stageAdd('frameworks', ref, fwEarly !== null, tFw);
951
1107
  if (fwEarly)
952
1108
  return fwEarly;
1109
+ // A retained untyped chain supplies effect/call-site evidence only. In
1110
+ // particular, importing its root does not make the root its call target.
1111
+ if ((0, name_matcher_1.isUnresolvedJsMemberCall)(ref))
1112
+ return null;
953
1113
  // Strategy 2: Try import-based resolution
1114
+ // A TS/JS/Python call-receiver chain (`useStore.getState().reset`, #1683)
1115
+ // names the ROOT's import, not the method's: letting resolveViaImport see
1116
+ // it binds the call to the imported store constant and the method is
1117
+ // never looked up. The name-matcher owns the chain shape for these
1118
+ // languages — the Java/Kotlin/C++ chains keep their existing path.
1119
+ if (ref.referenceKind === 'calls' &&
1120
+ CHAIN_SHAPE.test(ref.referenceName) &&
1121
+ (ref.language === 'typescript' || ref.language === 'javascript' || ref.language === 'tsx' || ref.language === 'jsx' || ref.language === 'python')) {
1122
+ return this.gateLanguage((0, name_matcher_1.matchReference)(ref, this.context), ref);
1123
+ }
954
1124
  const tImp = this.profileStages ? process.hrtime.bigint() : 0n;
955
1125
  const importResult = this.gateLanguage((0, import_resolver_1.resolveViaImport)(ref, this.context), ref);
956
1126
  if (this.profileStages)
@@ -987,8 +1157,15 @@ class ReferenceResolver {
987
1157
  // matcher would link each `mkOption` call to whichever file's inherit
988
1158
  // binding it happened to pick. Same-file matches only.
989
1159
  if (nameResult) {
990
- const target = this.queries.getNodeById(nameResult.targetNodeId);
991
- if (ref.language === 'nix') {
1160
+ const target = this.nodeById(nameResult.targetNodeId);
1161
+ // A definition its language makes file-local — a C `static`, a Kotlin
1162
+ // `private fun`, a Go unexported name in another package, a Rust
1163
+ // non-`pub` item outside its module subtree — cannot be what a name in
1164
+ // another file means, whichever strategy chose it (#1730).
1165
+ if (target && !(0, name_matcher_1.isVisibleAcrossFiles)(target, ref, this.context)) {
1166
+ nameResult = null;
1167
+ }
1168
+ else if (ref.language === 'nix') {
992
1169
  if (!target || target.filePath !== ref.filePath) {
993
1170
  nameResult = null;
994
1171
  }
@@ -1011,7 +1188,7 @@ class ReferenceResolver {
1011
1188
  if (ref.referenceKind === 'calls' &&
1012
1189
  CHAIN_LANGUAGES.has(ref.language) &&
1013
1190
  CHAIN_SHAPE.test(ref.referenceName)) {
1014
- this.deferredChainRefs.push(ref);
1191
+ this.deferReference(ref, this.deferredChainRefs);
1015
1192
  }
1016
1193
  else if (
1017
1194
  // PHP `$this->prop->method()` (encoded `this->prop.method`): its method
@@ -1020,7 +1197,7 @@ class ReferenceResolver {
1020
1197
  ref.referenceKind === 'calls' &&
1021
1198
  ref.language === 'php' &&
1022
1199
  PHP_PROP_SHAPE.test(ref.referenceName)) {
1023
- this.deferredChainRefs.push(ref);
1200
+ this.deferReference(ref, this.deferredChainRefs);
1024
1201
  }
1025
1202
  return null;
1026
1203
  }
@@ -1031,41 +1208,51 @@ class ReferenceResolver {
1031
1208
  * Create edges from resolved references
1032
1209
  */
1033
1210
  createEdges(resolved) {
1034
- return resolved.map((ref) => {
1211
+ return resolved.flatMap((ref) => {
1035
1212
  // `function_ref` (#756) is internal-only: it persists as a `references`
1036
1213
  // edge (the registration site depends on the callback), distinguishable
1037
1214
  // by metadata.resolvedBy === 'function-ref'. callers/impact already
1038
1215
  // traverse `references`, so registration sites surface with no
1039
1216
  // graph-layer changes.
1040
- let kind = ref.original.referenceKind === 'function_ref' ? 'references' : ref.original.referenceKind;
1217
+ let kind = ref.edgeKind ??
1218
+ (ref.original.referenceKind === 'function_ref' ? 'references' : ref.original.referenceKind);
1041
1219
  // Promote "extends" to "implements" when a class/struct targets an interface
1042
1220
  if (kind === 'extends') {
1043
- const targetNode = this.queries.getNodeById(ref.targetNodeId);
1221
+ const targetNode = this.nodeById(ref.targetNodeId);
1044
1222
  if (targetNode && (targetNode.kind === 'interface' || targetNode.kind === 'protocol')) {
1045
- const sourceNode = this.queries.getNodeById(ref.original.fromNodeId);
1223
+ const sourceNode = this.nodeById(ref.original.fromNodeId);
1046
1224
  if (sourceNode && sourceNode.kind !== 'interface' && sourceNode.kind !== 'protocol') {
1047
1225
  kind = 'implements';
1048
1226
  }
1049
1227
  }
1050
1228
  }
1051
1229
  // Promote "calls" to "instantiates" when the resolved target is a
1052
- // class/struct. Languages without a `new` keyword (Python, Ruby)
1230
+ // class/struct/union. Languages without a `new` keyword (Python, Ruby)
1053
1231
  // express instantiation as `Foo()` — extraction can't tell that
1054
1232
  // apart from a function call without symbol info, but resolution
1055
1233
  // can: if `Foo` resolves to a class, the call IS an instantiation.
1056
1234
  if (kind === 'calls') {
1057
- const targetNode = this.queries.getNodeById(ref.targetNodeId);
1058
- if (targetNode && (targetNode.kind === 'class' || targetNode.kind === 'struct')) {
1235
+ const targetNode = this.nodeById(ref.targetNodeId);
1236
+ if (targetNode &&
1237
+ (targetNode.kind === 'class' || targetNode.kind === 'struct' || targetNode.kind === 'union')) {
1059
1238
  kind = 'instantiates';
1060
1239
  }
1061
1240
  }
1062
- return {
1241
+ // One reference can name several targets — a navigation whose
1242
+ // destination is a conditional reaches every arm. Each becomes its own
1243
+ // edge, sharing this resolution's kind and confidence.
1244
+ const targets = [
1245
+ { targetNodeId: ref.targetNodeId, metadata: ref.metadata },
1246
+ ...(ref.alsoTargets ?? []),
1247
+ ];
1248
+ return targets.map((t) => ({
1063
1249
  source: ref.original.fromNodeId,
1064
- target: ref.targetNodeId,
1250
+ target: t.targetNodeId,
1065
1251
  kind,
1066
1252
  line: ref.original.line,
1067
1253
  column: ref.original.column,
1068
1254
  metadata: {
1255
+ ...(t.metadata ?? {}),
1069
1256
  confidence: ref.confidence,
1070
1257
  resolvedBy: ref.resolvedBy,
1071
1258
  // The ORIGINAL reference text (and kind, when edge-kind promotion
@@ -1086,7 +1273,7 @@ class ReferenceResolver {
1086
1273
  // exactly the edges this feature added.
1087
1274
  ...(ref.original.referenceKind === 'function_ref' ? { fnRef: true } : {}),
1088
1275
  },
1089
- };
1276
+ }));
1090
1277
  });
1091
1278
  }
1092
1279
  /**
@@ -1135,10 +1322,25 @@ class ReferenceResolver {
1135
1322
  }
1136
1323
  return { byRowId, legacyKeys };
1137
1324
  }
1325
+ /** A deferred attempt is unfinished work, not a final failure (#1577). */
1326
+ nonDeferredFailures(unresolved) {
1327
+ return unresolved.filter((ref) => ref.rowId == null || !this.deferredRowIds.has(ref.rowId));
1328
+ }
1329
+ deferReference(ref, queue) {
1330
+ queue.push(ref);
1331
+ if (ref.rowId != null)
1332
+ this.deferredRowIds.add(ref.rowId);
1333
+ }
1138
1334
  /**
1139
1335
  * Resolve and persist edges to database
1140
1336
  */
1141
1337
  resolveAndPersist(unresolvedRefs, onProgress) {
1338
+ const prerequisites = unresolvedRefs.filter(ReferenceResolver.isPrerequisite);
1339
+ if (prerequisites.length > 0 && prerequisites.length < unresolvedRefs.length) {
1340
+ const first = this.resolveAndPersist(prerequisites, (current) => onProgress?.(current, unresolvedRefs.length));
1341
+ const rest = this.resolveAndPersist(unresolvedRefs.filter((ref) => !ReferenceResolver.isPrerequisite(ref)), (current) => onProgress?.(prerequisites.length + current, unresolvedRefs.length));
1342
+ return ReferenceResolver.mergeResults(first, rest);
1343
+ }
1142
1344
  const result = this.resolveAll(unresolvedRefs, onProgress);
1143
1345
  // Create edges from resolved references
1144
1346
  const edges = this.createEdges(result.resolved);
@@ -1162,7 +1364,7 @@ class ReferenceResolver {
1162
1364
  // is still 'pending', so any pending row at rest belongs to an
1163
1365
  // interrupted run and the sweep can key off the pending count.
1164
1366
  if (result.unresolved.length > 0) {
1165
- const { byRowId, legacyKeys } = ReferenceResolver.partitionFailedCleanup(result.unresolved);
1367
+ const { byRowId, legacyKeys } = ReferenceResolver.partitionFailedCleanup(this.nonDeferredFailures(result.unresolved));
1166
1368
  this.queries.markReferencesFailedByRowIds(byRowId);
1167
1369
  this.queries.markReferencesFailed(legacyKeys);
1168
1370
  }
@@ -1178,8 +1380,18 @@ class ReferenceResolver {
1178
1380
  * a large edit lands many popular symbol names at once.
1179
1381
  */
1180
1382
  async resolveAndPersistListYielding(refs) {
1383
+ const prerequisites = refs.filter(ReferenceResolver.isPrerequisite);
1384
+ if (prerequisites.length > 0 && prerequisites.length < refs.length) {
1385
+ const first = await this.resolveAndPersistListYielding(prerequisites);
1386
+ const rest = await this.resolveAndPersistListYielding(refs.filter((ref) => !ReferenceResolver.isPrerequisite(ref)));
1387
+ return ReferenceResolver.mergeResults(first, rest);
1388
+ }
1181
1389
  const maybeYield = (0, cooperative_yield_1.createYielder)();
1182
1390
  const result = await this.resolveBatchYielding(refs, maybeYield);
1391
+ await this.persistResolutionResult(result, maybeYield);
1392
+ return result;
1393
+ }
1394
+ async persistResolutionResult(result, maybeYield) {
1183
1395
  const PERSIST_CHUNK = 1000;
1184
1396
  const edges = this.createEdges(result.resolved);
1185
1397
  for (let i = 0; i < edges.length; i += PERSIST_CHUNK) {
@@ -1195,7 +1407,7 @@ class ReferenceResolver {
1195
1407
  this.queries.deleteSpecificResolvedReferences(resolvedCleanup.legacyKeys.slice(i, i + PERSIST_CHUNK));
1196
1408
  await maybeYield();
1197
1409
  }
1198
- const failedCleanup = ReferenceResolver.partitionFailedCleanup(result.unresolved);
1410
+ const failedCleanup = ReferenceResolver.partitionFailedCleanup(this.nonDeferredFailures(result.unresolved));
1199
1411
  for (let i = 0; i < failedCleanup.byRowId.length; i += PERSIST_CHUNK) {
1200
1412
  this.queries.markReferencesFailedByRowIds(failedCleanup.byRowId.slice(i, i + PERSIST_CHUNK));
1201
1413
  await maybeYield();
@@ -1204,7 +1416,43 @@ class ReferenceResolver {
1204
1416
  this.queries.markReferencesFailed(failedCleanup.legacyKeys.slice(i, i + PERSIST_CHUNK));
1205
1417
  await maybeYield();
1206
1418
  }
1207
- return result;
1419
+ return edges.length;
1420
+ }
1421
+ /** Finalize the durable queue only AFTER its edges have been inserted. */
1422
+ async persistDeferredReferences(deferred, resolved) {
1423
+ for (const ref of deferred)
1424
+ if (ref.rowId != null)
1425
+ this.deferredRowIds.delete(ref.rowId);
1426
+ const matched = new Set(resolved.map((ref) => ref.original));
1427
+ const unresolved = deferred.filter((ref) => !matched.has(ref));
1428
+ const count = await this.persistResolutionResult({
1429
+ resolved,
1430
+ unresolved,
1431
+ stats: { total: deferred.length, resolved: resolved.length, unresolved: unresolved.length, byMethod: {} },
1432
+ }, (0, cooperative_yield_1.createYielder)());
1433
+ if (count > 0)
1434
+ this.clearCaches();
1435
+ return count;
1436
+ }
1437
+ /** Same two phases as the bounded DB reader: persist wiring before calls. */
1438
+ static isPrerequisite(ref) {
1439
+ return ref.referenceKind === 'imports' || ref.referenceKind === 'extends' || ref.referenceKind === 'implements';
1440
+ }
1441
+ static mergeResults(first, rest) {
1442
+ const byMethod = { ...first.stats.byMethod };
1443
+ for (const [method, count] of Object.entries(rest.stats.byMethod)) {
1444
+ byMethod[method] = (byMethod[method] ?? 0) + count;
1445
+ }
1446
+ return {
1447
+ resolved: first.resolved.concat(rest.resolved),
1448
+ unresolved: first.unresolved.concat(rest.unresolved),
1449
+ stats: {
1450
+ total: first.stats.total + rest.stats.total,
1451
+ resolved: first.stats.resolved + rest.stats.resolved,
1452
+ unresolved: first.stats.unresolved + rest.stats.unresolved,
1453
+ byMethod,
1454
+ },
1455
+ };
1208
1456
  }
1209
1457
  /**
1210
1458
  * Second resolution pass for chained static-factory / fluent calls whose
@@ -1248,14 +1496,7 @@ class ReferenceResolver {
1248
1496
  resolved.push(match);
1249
1497
  await maybeYield();
1250
1498
  }
1251
- if (resolved.length === 0)
1252
- return 0;
1253
- const edges = this.createEdges(resolved);
1254
- if (edges.length > 0) {
1255
- this.queries.insertEdges(edges);
1256
- this.clearCaches();
1257
- }
1258
- return edges.length;
1499
+ return this.persistDeferredReferences(deferred, resolved);
1259
1500
  }
1260
1501
  /**
1261
1502
  * Resolve one batch with a yield checkpoint between EVERY ref so the #850
@@ -1407,6 +1648,7 @@ class ReferenceResolver {
1407
1648
  unresolved.push(ref);
1408
1649
  }
1409
1650
  }
1651
+ this.deferredRowIds.clear(); // the admission side now owns both queues
1410
1652
  return {
1411
1653
  resolved,
1412
1654
  unresolved,
@@ -1429,8 +1671,10 @@ class ReferenceResolver {
1429
1671
  * would have.
1430
1672
  */
1431
1673
  appendDeferredFromWorkers(deferredChain, deferredThisMember) {
1432
- this.deferredChainRefs.push(...deferredChain);
1433
- this.deferredThisMemberRefs.push(...deferredThisMember);
1674
+ for (const ref of deferredChain)
1675
+ this.deferReference(ref, this.deferredChainRefs);
1676
+ for (const ref of deferredThisMember)
1677
+ this.deferReference(ref, this.deferredThisMemberRefs);
1434
1678
  }
1435
1679
  /**
1436
1680
  * Resolve and persist in batches to keep memory bounded.
@@ -1449,7 +1693,7 @@ class ReferenceResolver {
1449
1693
  // the valve's timer-driven passive passes stay perpetually partial against
1450
1694
  // the pool's continuous reads, which is how a kernel-scale resolution grew
1451
1695
  // a 22GB WAL on a 4.6GB DB (migration plan §7a.1).
1452
- parallel) {
1696
+ parallel, synthesize = true) {
1453
1697
  // Resolution runs on the indexer's MAIN thread, and the #850 liveness
1454
1698
  // watchdog SIGKILLs a process whose event loop stalls past its window (60s
1455
1699
  // by default). A single dense batch's resolveAll — or the synthesis pass
@@ -1604,8 +1848,26 @@ class ReferenceResolver {
1604
1848
  }
1605
1849
  try {
1606
1850
  try {
1851
+ // Orphans retain interruption/re-extraction order, not clean-index order.
1852
+ // A caller can precede its imports or supertypes by many batches (#1577).
1853
+ // Drain those prerequisites first, then start a fresh keyset cursor over
1854
+ // the remaining kinds. The disjoint filters let us prefetch across the
1855
+ // phase boundary before cleanup without re-reading the current batch.
1856
+ let prerequisites = true;
1857
+ let afterRowId = 0;
1858
+ const readNextBatch = () => {
1859
+ let next = this.queries.getUnresolvedReferencesBatchAfter(afterRowId, batchSize, prerequisites);
1860
+ if (next.length === 0 && prerequisites) {
1861
+ prerequisites = false;
1862
+ afterRowId = 0;
1863
+ next = this.queries.getUnresolvedReferencesBatchAfter(afterRowId, batchSize, prerequisites);
1864
+ }
1865
+ if (next.length > 0)
1866
+ afterRowId = next[next.length - 1].rowId;
1867
+ return next;
1868
+ };
1607
1869
  tLp = Date.now();
1608
- let batch = this.queries.getUnresolvedReferencesBatchAfter(0, batchSize);
1870
+ let batch = readNextBatch();
1609
1871
  lp('read', tLp);
1610
1872
  let inFlight = batch.length > 0 ? beginBatch(batch) : null;
1611
1873
  while (batch.length > 0 && inFlight) {
@@ -1615,7 +1877,7 @@ class ReferenceResolver {
1615
1877
  // enumeration yields the following batch (keyset — OFFSET re-walked the
1616
1878
  // accumulated failed prefix every read, 54.6s at kernel scale, §7a.2).
1617
1879
  tLp = Date.now();
1618
- const nextBatch = this.queries.getUnresolvedReferencesBatchAfter(batch[batch.length - 1].rowId, batchSize);
1880
+ const nextBatch = readNextBatch();
1619
1881
  lp('read', tLp);
1620
1882
  const tBatch = Date.now();
1621
1883
  const result = await settleBatch(inFlight, batch);
@@ -1688,27 +1950,36 @@ class ReferenceResolver {
1688
1950
  // the remainder idempotently on the next run/sweep (#1187).
1689
1951
  const PERSIST_CHUNK = 1000;
1690
1952
  const tPersist = Date.now();
1691
- // Persist edges BEFORE fanning out the next batch: later batches read
1692
- // this batch's edges — resolveMethodOnType walks supertype chains over
1693
- // `extends`/`implements` edges that earlier batches resolved, so a
1694
- // receiver typed as a subclass only reaches a method declared on its
1695
- // base class if those edges are visible. (Validated on dubbo: fanning
1696
- // out first downgraded exactly those supertype-method resolutions from
1697
- // the 0.9 typed-receiver path to the 0.65 word-overlap fallback.)
1953
+ // A batch that made `extends`/`implements` edges persists them BEFORE
1954
+ // fanning out the next batch: later batches read them —
1955
+ // resolveMethodOnType walks supertype chains over edges that earlier
1956
+ // batches resolved, so a receiver typed as a subclass only reaches a
1957
+ // method declared on its base class if those edges are visible.
1958
+ // (Validated on dubbo: fanning out first downgraded exactly those
1959
+ // supertype-method resolutions from the 0.9 typed-receiver path to the
1960
+ // 0.65 word-overlap fallback.) They are the only edges resolution reads
1961
+ // (RESOLUTION_READ_EDGE_KINDS), so a batch that made none — every batch
1962
+ // after the prerequisite phase readNextBatch drains first — fans the
1963
+ // next batch out now and inserts while it resolves: the same writes in
1964
+ // the same order, and nothing the workers read differs.
1698
1965
  tLp = Date.now();
1699
1966
  const edges = this.createEdges(result.resolved);
1700
1967
  lp('createEdges', tLp);
1968
+ const readEdge = edges.some((e) => RESOLUTION_READ_EDGE_KINDS.includes(e.kind));
1969
+ let nextInFlight = !readEdge && nextBatch.length > 0 ? beginBatch(nextBatch) : null;
1701
1970
  tLp = Date.now();
1702
1971
  for (let i = 0; i < edges.length; i += PERSIST_CHUNK) {
1703
1972
  this.queries.insertEdges(edges.slice(i, i + PERSIST_CHUNK));
1704
1973
  await maybeYield();
1705
1974
  }
1706
1975
  lp('insertEdges', tLp);
1707
- // NOW fan the next batch out — workers see exactly the edge state the
1708
- // sequential baseline would (every batch ≤ this one committed), while
1709
- // the main thread spends the REST of the persist (ref deletes + failed
1710
- // parking below) overlapped with their resolution — the double-buffer.
1711
- const nextInFlight = nextBatch.length > 0 ? beginBatch(nextBatch) : null;
1976
+ // NOW fan the next batch out (if not already) — workers see exactly the
1977
+ // edge state the sequential baseline would (every batch ≤ this one
1978
+ // committed), while the main thread spends the REST of the persist (ref
1979
+ // deletes + failed parking below) overlapped with their resolution —
1980
+ // the double-buffer.
1981
+ if (!nextInFlight && nextBatch.length > 0)
1982
+ nextInFlight = beginBatch(nextBatch);
1712
1983
  // Clean up resolved refs so they don't appear in the next batch —
1713
1984
  // by row id, so a same-key sibling ref in a LATER batch (same caller
1714
1985
  // calling the same callee at another line) is left pending for its own
@@ -1730,7 +2001,9 @@ class ReferenceResolver {
1730
2001
  // only see pending rows) but stay retryable when a later sync adds a
1731
2002
  // symbol that could satisfy them (#1240).
1732
2003
  tLp = Date.now();
1733
- const failedCleanup = ReferenceResolver.partitionFailedCleanup(result.unresolved);
2004
+ const failures = this.nonDeferredFailures(result.unresolved);
2005
+ const deferredCount = result.unresolved.length - failures.length;
2006
+ const failedCleanup = ReferenceResolver.partitionFailedCleanup(failures);
1734
2007
  for (let i = 0; i < failedCleanup.byRowId.length; i += PERSIST_CHUNK) {
1735
2008
  removedThisBatch += this.queries.markReferencesFailedByRowIds(failedCleanup.byRowId.slice(i, i + PERSIST_CHUNK));
1736
2009
  await maybeYield();
@@ -1760,17 +2033,11 @@ class ReferenceResolver {
1760
2033
  // first 5000 refs are all external/stdlib calls, resolution stopped at
1761
2034
  // batch one and left the rest of the table as permanent orphans (#1187).
1762
2035
  // The count-based guard below catches the true no-progress case.
1763
- // Non-progress guard (defense-in-depth). Each iteration enumerates from
1764
- // the head of the pending set, so the PENDING population MUST shrink
1765
- // every iteration — resolved refs are deleted and unresolvable ones are
1766
- // marked failed above, and both leave the pending set the batch reader
1767
- // sees. If it didn't shrink, a resolver returned a match whose
1768
- // `original.referenceName` differs from the stored row, so the keyed
1769
- // delete/update no-ops, and we'd re-read + re-resolve + re-insert the
1770
- // same rows forever (the runaway that grew a 99-file repo to 5M edges /
1771
- // 1.4 GB before the Go-fallback fix). Stop rather than grow the graph
1772
- // without bound. (An in-flight prefetched batch is abandoned unsettled —
1773
- // fan-out has no side effects until settleBatch appends its results.)
2036
+ // Non-progress guard (defense-in-depth). Ordinary attempts must leave
2037
+ // the pending set; a mismatched original reference can make legacy-key
2038
+ // cleanup a no-op. Keep the guard against that broken persistence even
2039
+ // though keyset pagination now advances independently of row cleanup.
2040
+ // An abandoned prefetched batch has no side effects until settleBatch.
1774
2041
  // Non-progress signal, now O(1): `changes` summed across this batch's
1775
2042
  // deletes + failed-parks is the DIRECT evidence the guard's old count
1776
2043
  // diff inferred — a resolver returning a mismatched name makes the keyed
@@ -1780,7 +2047,9 @@ class ReferenceResolver {
1780
2047
  // runs only on the suspicious path (claimed-work batch removed nothing —
1781
2048
  // e.g. every row was a sibling a legacy-key sweep already consumed),
1782
2049
  // where it arbitrates stop-vs-continue exactly as before.
1783
- if (removedThisBatch <= 0 && batch.length > 0) {
2050
+ // Deferred refs legitimately remain pending for the post-pass. The
2051
+ // keyset cursor advances past them; they must not trigger this guard.
2052
+ if (removedThisBatch + deferredCount <= 0 && batch.length > 0) {
1784
2053
  tLp = Date.now();
1785
2054
  const remaining = this.queries.getUnresolvedReferencesCount();
1786
2055
  lp('countGuard', tLp);
@@ -1817,6 +2086,21 @@ class ReferenceResolver {
1817
2086
  await bp;
1818
2087
  }
1819
2088
  }
2089
+ // Indexes the bulk-edge window's end deferred: built once, while the pool
2090
+ // is busy with synthesis when it is, and in any case before this returns.
2091
+ let deferredBuilt = !bulkEdgesActive || !parallel?.bulkEdgeLoad?.deferred;
2092
+ const buildDeferredIndexes = () => {
2093
+ if (deferredBuilt)
2094
+ return;
2095
+ deferredBuilt = true;
2096
+ const tDeferred = Date.now();
2097
+ try {
2098
+ parallel.bulkEdgeLoad.deferred();
2099
+ }
2100
+ catch { /* healed by schema.sql on the next open, like a crash in the window */ }
2101
+ if (process.env.CODEGRAPH_SYNTH_TIMINGS)
2102
+ console.error(`[phase-timing] deferred-edge-index: ${Date.now() - tDeferred}ms`);
2103
+ };
1820
2104
  // Dynamic-edge synthesis: now that all base `calls` edges are persisted,
1821
2105
  // synthesize observer/callback dispatch edges (dispatcher → registered
1822
2106
  // callbacks) that static parsing leaves out. Best-effort — never fail the
@@ -1826,11 +2110,13 @@ class ReferenceResolver {
1826
2110
  // loop. See docs/design/callback-edge-synthesis.md.
1827
2111
  const tSynth = Date.now();
1828
2112
  try {
1829
- aggregateStats.byMethod['callback-synthesis'] = await (0, callback_synthesizer_1.synthesizeCallbackEdges)(this.queries, this.context, onSynthesisProgress, pool, parallel?.backpressure);
2113
+ if (synthesize)
2114
+ aggregateStats.byMethod['callback-synthesis'] = await (0, callback_synthesizer_1.synthesizeCallbackEdges)(this.queries, this.context, onSynthesisProgress, pool, parallel?.backpressure, buildDeferredIndexes);
1830
2115
  }
1831
2116
  catch {
1832
2117
  // synthesis is additive and optional; ignore failures
1833
2118
  }
2119
+ buildDeferredIndexes();
1834
2120
  if (process.env.CODEGRAPH_SYNTH_TIMINGS)
1835
2121
  console.error(`[phase-timing] callback-synthesis: ${Date.now() - tSynth}ms`);
1836
2122
  }
@@ -1849,12 +2135,63 @@ class ReferenceResolver {
1849
2135
  stats: aggregateStats,
1850
2136
  };
1851
2137
  }
2138
+ /** Replace synthesis only after every base-resolution pass has finished. */
2139
+ async refreshSynthesis(dbPath, onProgress, backpressure) {
2140
+ this.clearCaches();
2141
+ const stage = new synthesis_stage_1.SynthesisStage(dbPath);
2142
+ try {
2143
+ const fresh = new ReferenceResolver(this.projectRoot, stage.queries);
2144
+ const count = await (0, callback_synthesizer_1.synthesizeCallbackEdges)(stage.queries, fresh.context, onProgress, null, backpressure);
2145
+ await stage.publish(backpressure);
2146
+ return count;
2147
+ }
2148
+ finally {
2149
+ stage.close();
2150
+ this.clearCaches();
2151
+ }
2152
+ }
1852
2153
  /**
1853
2154
  * Get detected frameworks
1854
2155
  */
1855
2156
  getDetectedFrameworks() {
1856
2157
  return this.frameworks.map((f) => f.name);
1857
2158
  }
2159
+ /**
2160
+ * True when `receiver` is a local name bound by an import that resolves to a
2161
+ * file IN THIS PROJECT — the only case where letting a python
2162
+ * built-in-method name through the filter is safe (#1681).
2163
+ *
2164
+ * Asking only whether SOME import bound the local name is not enough: every
2165
+ * import produces a mapping, stdlib and PyPI included, so that would also be
2166
+ * true for `os`, `requests`, `np`. Opening the filter for them lets
2167
+ * resolveViaImport find no project file, fall through to bare-name matching,
2168
+ * and bind `os.remove(p)` to whatever project method happens to be named
2169
+ * `remove` — reintroducing, through its own escape hatch, the fabricated-edge
2170
+ * class this filter exists to prevent.
2171
+ *
2172
+ * Resolving the specifier is the same question resolveViaImport will ask
2173
+ * next, so a receiver that passes here is one the qualified path can actually
2174
+ * serve; anything else stays a silent miss rather than a wrong edge.
2175
+ */
2176
+ isPythonProjectModule(ref, receiver) {
2177
+ for (const imp of this.context.getImportMappings(ref.filePath, ref.language)) {
2178
+ if (imp.localName !== receiver)
2179
+ continue;
2180
+ // `import pkg.mod` / `import pkg.mod as m` binds the module `source`
2181
+ // names. `from pkg import mod` binds `pkg.mod`, and `from . import mod`
2182
+ // binds `.mod` — join without doubling the dot that makes `.` mean the
2183
+ // current package.
2184
+ const specifier = imp.isNamespace
2185
+ ? imp.source
2186
+ : imp.source.endsWith('.')
2187
+ ? `${imp.source}${imp.exportedName}`
2188
+ : `${imp.source}.${imp.exportedName}`;
2189
+ if ((0, import_resolver_1.resolveImportPath)(specifier, ref.filePath, ref.language, this.context)) {
2190
+ return true;
2191
+ }
2192
+ }
2193
+ return false;
2194
+ }
1858
2195
  /**
1859
2196
  * Check if reference is to a built-in or external symbol
1860
2197
  */
@@ -1863,7 +2200,7 @@ class ReferenceResolver {
1863
2200
  const isJsTs = ref.language === 'typescript' || ref.language === 'javascript'
1864
2201
  || ref.language === 'tsx' || ref.language === 'jsx' || ref.language === 'arkts';
1865
2202
  // JavaScript/TypeScript built-ins
1866
- if (isJsTs && JS_BUILT_INS.has(name)) {
2203
+ if (isJsTs && js_builtins_1.JS_BUILT_INS.has(name)) {
1867
2204
  return true;
1868
2205
  }
1869
2206
  // ArkTS resource-reference intrinsics — `$r('app.string.x')` /
@@ -1897,10 +2234,27 @@ class ReferenceResolver {
1897
2234
  }
1898
2235
  // Filter built-in methods on non-class receivers
1899
2236
  // (e.g., items.append where items is a local list variable)
1900
- // But allow if the capitalized receiver matches a known codebase class
2237
+ // But allow if the capitalized receiver matches a known codebase class,
2238
+ // OR the receiver is itself an imported project module — a module can
2239
+ // export a top-level function sharing a common collection-method name
2240
+ // (`ledger.append`, `from . import ledger`), and that call is a real
2241
+ // project dependency, not `list.append` (#1681). Without this, the
2242
+ // qualified ref never reaches resolveViaImport / resolvePythonModuleMember.
1901
2243
  if (PYTHON_BUILT_IN_METHODS.has(method)) {
2244
+ // A module-scope collection binding is stronger evidence than a
2245
+ // coincidentally matching class name (#1652). Only use this file's
2246
+ // binding: an unrelated module may reuse the receiver for a collection.
2247
+ const isCollection = this.context.getNodesByName(receiver).some((node) => node.language === 'python' && node.filePath === ref.filePath &&
2248
+ (node.kind === 'variable' || node.kind === 'constant') &&
2249
+ node.qualifiedName === receiver &&
2250
+ /^=\s*(?:[\[{]|(?:dict|list|set|tuple|frozenset)\s*\(|\(\s*\)|\([^()]*,)/.test(node.signature ?? ''));
2251
+ if (isCollection)
2252
+ return true;
1902
2253
  const capitalized = receiver.charAt(0).toUpperCase() + receiver.slice(1);
1903
- if (!this.knownNames?.has(capitalized)) {
2254
+ const isKnownClass = this.context.getNodesByName(capitalized).some((node) => node.language === 'python' &&
2255
+ (node.kind === 'class' || node.kind === 'struct' || node.kind === 'interface'));
2256
+ const isProjectModule = !isKnownClass && this.isPythonProjectModule(ref, receiver);
2257
+ if (!isKnownClass && !isProjectModule) {
1904
2258
  return true;
1905
2259
  }
1906
2260
  }
@@ -1908,9 +2262,8 @@ class ReferenceResolver {
1908
2262
  // A bare name colliding with a builtin method (index, get, update, count…)
1909
2263
  // is only a builtin when NOTHING in the codebase declares it. A declared
1910
2264
  // symbol with that exact name — e.g. a Flask/FastAPI view `def index()` or
1911
- // `def get()` — is a real reference target. Mirrors the knownNames guard on
1912
- // the dotted branch above; without it, every handler named after a builtin
1913
- // method silently loses its route→handler edge.
2265
+ // `def get()` — is a real reference target. Without this guard, every
2266
+ // handler named after a builtin method silently loses its route→handler edge.
1914
2267
  if (PYTHON_BUILT_IN_METHODS.has(name) && !this.knownNames?.has(name)) {
1915
2268
  return true;
1916
2269
  }
@@ -1961,28 +2314,16 @@ class ReferenceResolver {
1961
2314
  * Get file path from node ID
1962
2315
  */
1963
2316
  getFilePathFromNodeId(nodeId) {
1964
- const node = this.queries.getNodeById(nodeId);
2317
+ const node = this.nodeById(nodeId);
1965
2318
  return node?.filePath || '';
1966
2319
  }
1967
2320
  /**
1968
2321
  * Get language from node ID
1969
2322
  */
1970
2323
  getLanguageFromNodeId(nodeId) {
1971
- const node = this.queries.getNodeById(nodeId);
2324
+ const node = this.nodeById(nodeId);
1972
2325
  return node?.language || 'unknown';
1973
2326
  }
1974
- /**
1975
- * Drop an import/name-strategy resolution that crosses a language family.
1976
- * Two regimes (mirrors `applyLanguageGate`'s candidate filter):
1977
- * - `references` (type usage): STRICT — a `Type.member` static read names a
1978
- * same-family type, never a coincidentally same-named symbol in another
1979
- * language. Drops any non-same-family target.
1980
- * - `imports` (import binding / `#include`): both-known — a C++ `#include
1981
- * "X.h"` must not resolve to a same-named ObjC header on another platform
1982
- * (basename collision), but a singleton-family / SFC language (`vue` →
1983
- * `.ts`) importing across is left alone.
1984
- * Applies to the import (strategy 2) + name-match (strategy 3) results.
1985
- */
1986
2327
  /**
1987
2328
  * Collect the `@using` namespaces in scope for a `.razor`/`.cshtml` file: its
1988
2329
  * own `@using` directives plus every `_Imports.razor` from the file's folder up
@@ -2140,7 +2481,7 @@ class ReferenceResolver {
2140
2481
  const member = ref.referenceName.slice('this.'.length);
2141
2482
  if (!member)
2142
2483
  return null;
2143
- const fromNode = this.queries.getNodeById(ref.fromNodeId);
2484
+ const fromNode = this.nodeById(ref.fromNodeId);
2144
2485
  if (!fromNode)
2145
2486
  return null;
2146
2487
  // A hook declared at class-body level (Ruby `before_action :authenticate`)
@@ -2165,7 +2506,7 @@ class ReferenceResolver {
2165
2506
  // Not on the class itself — possibly INHERITED. implements/extends
2166
2507
  // edges don't exist yet in this pass, so retry in the supertype pass
2167
2508
  // (resolveDeferredThisMemberRefs) instead of giving up.
2168
- this.deferredThisMemberRefs.push(ref);
2509
+ this.deferReference(ref, this.deferredThisMemberRefs);
2169
2510
  return null;
2170
2511
  }
2171
2512
  const target = candidates.reduce((a, b) => (a.startLine <= b.startLine ? a : b));
@@ -2196,10 +2537,41 @@ class ReferenceResolver {
2196
2537
  // periodically so the #850 liveness watchdog heartbeat can fire (#1091).
2197
2538
  const maybeYield = (0, cooperative_yield_1.createYielder)();
2198
2539
  const resolved = [];
2540
+ // Refs share supertypes (every `this.dispose` walks the same chain), and
2541
+ // nothing is written until the loop ends: read each type's supertype
2542
+ // edges, and each supertype's callable members by name, once.
2543
+ const supertypeEdges = new Map();
2544
+ const callableMembers = new Map();
2545
+ const supertypesOf = (id) => {
2546
+ let edges = supertypeEdges.get(id);
2547
+ if (!edges) {
2548
+ edges = this.queries.getOutgoingEdges(id, ['implements', 'extends']);
2549
+ supertypeEdges.set(id, edges);
2550
+ }
2551
+ return edges;
2552
+ };
2553
+ const callableMembersOf = (id) => {
2554
+ let byName = callableMembers.get(id);
2555
+ if (!byName) {
2556
+ byName = new Map();
2557
+ for (const c of this.queries.getOutgoingEdges(id, ['contains'])) {
2558
+ const m = this.nodeById(c.target);
2559
+ if (!m || (m.kind !== 'function' && m.kind !== 'method'))
2560
+ continue;
2561
+ const list = byName.get(m.name);
2562
+ if (list)
2563
+ list.push(m);
2564
+ else
2565
+ byName.set(m.name, [m]);
2566
+ }
2567
+ callableMembers.set(id, byName);
2568
+ }
2569
+ return byName;
2570
+ };
2199
2571
  for (const ref of deferred) {
2200
2572
  await maybeYield();
2201
2573
  const member = ref.referenceName.slice('this.'.length);
2202
- const fromNode = this.queries.getNodeById(ref.fromNodeId);
2574
+ const fromNode = this.nodeById(ref.fromNodeId);
2203
2575
  if (!fromNode || !member)
2204
2576
  continue;
2205
2577
  // Class-body-level hooks (Ruby) attribute to the CLASS node itself.
@@ -2239,24 +2611,18 @@ class ReferenceResolver {
2239
2611
  for (let depth = 0; depth < 5 && frontierNodes.length > 0 && !target; depth++) {
2240
2612
  const next = [];
2241
2613
  for (const typeNode of frontierNodes) {
2242
- for (const edge of this.queries.getOutgoingEdges(typeNode.id, ['implements', 'extends'])) {
2243
- const superNode = this.queries.getNodeById(edge.target);
2614
+ for (const edge of supertypesOf(typeNode.id)) {
2615
+ const superNode = this.nodeById(edge.target);
2244
2616
  if (!superNode || seenNodes.has(superNode.id))
2245
2617
  continue;
2246
2618
  seenNodes.add(superNode.id);
2247
2619
  if (!SUPERTYPE_BEARING_KINDS.has(superNode.kind))
2248
2620
  continue;
2249
2621
  // Member lookup anchored on the supertype's contains edges.
2250
- for (const c of this.queries.getOutgoingEdges(superNode.id, ['contains'])) {
2251
- const m = this.queries.getNodeById(c.target);
2252
- if (m &&
2253
- m.name === member &&
2254
- (m.kind === 'function' || m.kind === 'method') &&
2255
- (0, name_matcher_1.sameLanguageFamily)(m.language, ref.language)) {
2256
- target = m;
2257
- break;
2258
- }
2259
- }
2622
+ target =
2623
+ callableMembersOf(superNode.id)
2624
+ .get(member)
2625
+ ?.find((m) => (0, name_matcher_1.sameLanguageFamily)(m.language, ref.language)) ?? null;
2260
2626
  if (target)
2261
2627
  break;
2262
2628
  next.push(superNode);
@@ -2275,47 +2641,99 @@ class ReferenceResolver {
2275
2641
  });
2276
2642
  }
2277
2643
  }
2278
- if (resolved.length === 0)
2279
- return 0;
2280
- const edges = this.createEdges(resolved);
2281
- if (edges.length > 0) {
2282
- this.queries.insertEdges(edges);
2283
- this.clearCaches();
2284
- }
2285
- return edges.length;
2644
+ return this.persistDeferredReferences(deferred, resolved);
2286
2645
  }
2287
- gateLanguage(result, ref) {
2646
+ /**
2647
+ * Drop a resolution whose target cannot be what the reference names.
2648
+ * Applied at the `resolveOne` seam so it covers every strategy uniformly —
2649
+ * framework, import, name-match, chain, CFML component path.
2650
+ *
2651
+ * For `imports`: the target must be importable. A member that only exists
2652
+ * inside a type never is.
2653
+ *
2654
+ * For `extends`/`implements`, it cannot be describing a real supertype when:
2655
+ *
2656
+ * 1. The target's kind can never be a supertype (an enum member, a method,
2657
+ * a variable). `matchByExactName` additionally narrows its candidate
2658
+ * pool by the same set, so a legitimate supertype outranks a same-named
2659
+ * non-type rather than merely losing its edge.
2660
+ * 2. The name is imported from outside the repo, so NO local node is the
2661
+ * referent. Without this, filtering by kind alone just relocates the
2662
+ * false edge onto the next same-named local type.
2663
+ *
2664
+ * One exception to (1): a TypeScript VALUE that shares its name with a type
2665
+ * in the same file. `export const IFoo = createDecorator<IFoo>('foo')` beside
2666
+ * `export interface IFoo` is how VS Code declares every service, and an
2667
+ * import of `IFoo` resolves to the file with both — a strategy that takes the
2668
+ * first export of that name gets the value. The strategy found the right
2669
+ * file and name; the type declared there is the supertype, so the edge moves
2670
+ * to it rather than being dropped (dropping it lost ~900 `implements` edges
2671
+ * on vscode).
2672
+ *
2673
+ * Otherwise this only ever REMOVES an edge, never adds one. A dropped ref
2674
+ * stays in `unresolved_refs` as `failed`, which is the honest record for a
2675
+ * supertype that lives outside the repo — silent beats wrong.
2676
+ */
2677
+ gateTargetKind(result, ref) {
2288
2678
  if (!result)
2289
2679
  return result;
2290
- const tgt = this.getLanguageFromNodeId(result.targetNodeId);
2291
- if (!tgt || !ref.language)
2680
+ // A `#define` is a value, never a callee (#1838): a macro defined only in
2681
+ // an unrelated file is not what `NAME(x)` here expands to either.
2682
+ if (ref.referenceKind === 'calls') {
2683
+ const target = this.nodeById(result.targetNodeId);
2684
+ if (target?.kind === 'constant' && types_1.CPP_DEFINE_SIGNATURE.test(target.signature ?? ''))
2685
+ return null;
2686
+ }
2687
+ // An `imports` reference names something importable — never a member that
2688
+ // only exists inside a type.
2689
+ if (ref.referenceKind === 'imports') {
2690
+ const target = this.nodeById(result.targetNodeId);
2691
+ return target && !(0, types_1.isImportableKind)(target.kind) ? null : result;
2692
+ }
2693
+ if (!(0, types_1.isInheritanceRef)(ref))
2292
2694
  return result;
2293
- if ((ref.referenceKind === 'references' || ref.referenceKind === 'function_ref') && !(0, name_matcher_1.sameLanguageFamily)(tgt, ref.language))
2294
- return null;
2295
- if (ref.referenceKind === 'imports' && (0, name_matcher_1.crossesKnownFamily)(tgt, ref.language))
2695
+ const target = this.nodeById(result.targetNodeId);
2696
+ if (target && !(0, types_1.isSupertypeTarget)(target)) {
2697
+ const type = this.sameNamedTypeOfValue(target);
2698
+ if (!type)
2699
+ return null;
2700
+ result = { ...result, targetNodeId: type.id };
2701
+ }
2702
+ if ((0, import_resolver_1.isBoundToOutOfRepoImport)(ref, this.context))
2296
2703
  return null;
2297
2704
  return result;
2298
2705
  }
2706
+ /** The one supertype-kind node a TypeScript value shares its name and file with. */
2707
+ sameNamedTypeOfValue(value) {
2708
+ if (value.kind !== 'constant' && value.kind !== 'variable')
2709
+ return null;
2710
+ if (value.language !== 'typescript' && value.language !== 'tsx')
2711
+ return null;
2712
+ const types = this.context
2713
+ .getNodesInFile(value.filePath)
2714
+ .filter((n) => n.name === value.name && (0, types_1.isSupertypeTarget)(n));
2715
+ return types.length === 1 ? types[0] : null;
2716
+ }
2717
+ gateLanguage(result, ref) {
2718
+ if (!result)
2719
+ return result;
2720
+ return (0, name_matcher_1.gateLanguageMatch)(result, ref, this.context);
2721
+ }
2299
2722
  /**
2300
- * Drop a FRAMEWORK-strategy resolution that crosses two *known* language
2301
- * families for a type-usage (`references`) or import-binding (`imports`)
2302
- * edge. The framework strategy is intentionally ungated for cross-language
2303
- * bridges, but those legitimate bridges are either `calls` edges (RN/Expo
2304
- * JS → native) or config↔code edges whose config side (`yaml`/`blade`/…) is
2305
- * not a known programming-language family. A `references`/`imports` edge
2306
- * between two *known* families is always a coincidental name collision — the
2307
- * React/Svelte/Vue PascalCase component resolvers name-match `getNodesByName`
2308
- * without a language check, so a TS `<TestRunner>` ref happily matched a
2309
- * Kotlin `class TestRunner`. Gating only the both-known-cross-family case
2310
- * lets config bridges and `calls` bridges through untouched.
2723
+ * Framework calls carry bridge evidence (RN/Expo JS → native). Other
2724
+ * framework results obey the same code-family boundary as name matches;
2725
+ * markup/config transitions remain open.
2311
2726
  */
2312
2727
  gateFrameworkLanguage(result, ref) {
2313
2728
  if (!result)
2314
2729
  return result;
2315
- if (ref.referenceKind !== 'references' && ref.referenceKind !== 'imports')
2730
+ if (ref.referenceKind === 'calls')
2316
2731
  return result;
2317
2732
  const tgt = this.getLanguageFromNodeId(result.targetNodeId);
2318
- if (tgt && ref.language && (0, name_matcher_1.crossesKnownFamily)(tgt, ref.language))
2733
+ // Package imports cannot target prose found by a framework's name lookup.
2734
+ if (ref.referenceKind === 'imports' && tgt === 'markdown' && ref.language !== 'markdown')
2735
+ return null;
2736
+ if (tgt && ref.language && (0, name_matcher_1.crossesCodeBoundary)(tgt, ref.language))
2319
2737
  return null;
2320
2738
  return result;
2321
2739
  }