@colbymchenry/codegraph-win32-arm64 1.6.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 (622) 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 +599 -291
  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/index.d.ts.map +1 -1
  13. package/lib/dist/context/index.js +43 -2
  14. package/lib/dist/context/index.js.map +1 -1
  15. package/lib/dist/db/index.d.ts +21 -2
  16. package/lib/dist/db/index.d.ts.map +1 -1
  17. package/lib/dist/db/index.js +86 -31
  18. package/lib/dist/db/index.js.map +1 -1
  19. package/lib/dist/db/migrations.d.ts +1 -1
  20. package/lib/dist/db/migrations.d.ts.map +1 -1
  21. package/lib/dist/db/migrations.js +40 -1
  22. package/lib/dist/db/migrations.js.map +1 -1
  23. package/lib/dist/db/queries.d.ts +423 -3
  24. package/lib/dist/db/queries.d.ts.map +1 -1
  25. package/lib/dist/db/queries.js +1026 -33
  26. package/lib/dist/db/queries.js.map +1 -1
  27. package/lib/dist/db/schema.sql +11 -1
  28. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  29. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  30. package/lib/dist/db/sqlite-adapter.js +56 -7
  31. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  32. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  33. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  34. package/lib/dist/db/synthesis-stage.js +89 -0
  35. package/lib/dist/db/synthesis-stage.js.map +1 -0
  36. package/lib/dist/db/wal-valve.d.ts +32 -12
  37. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  38. package/lib/dist/db/wal-valve.js +65 -22
  39. package/lib/dist/db/wal-valve.js.map +1 -1
  40. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  41. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  42. package/lib/dist/db/wsl-shared-index.js +121 -0
  43. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  44. package/lib/dist/directory.d.ts +101 -2
  45. package/lib/dist/directory.d.ts.map +1 -1
  46. package/lib/dist/directory.js +254 -23
  47. package/lib/dist/directory.js.map +1 -1
  48. package/lib/dist/errors.d.ts +14 -0
  49. package/lib/dist/errors.d.ts.map +1 -1
  50. package/lib/dist/errors.js +16 -1
  51. package/lib/dist/errors.js.map +1 -1
  52. package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
  53. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  54. package/lib/dist/extraction/cfml-extractor.js +15 -3
  55. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  56. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  57. package/lib/dist/extraction/dfm-extractor.js +14 -10
  58. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  59. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  60. package/lib/dist/extraction/extraction-version.js +1 -1
  61. package/lib/dist/extraction/function-ref.d.ts +6 -4
  62. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  63. package/lib/dist/extraction/function-ref.js +35 -14
  64. package/lib/dist/extraction/function-ref.js.map +1 -1
  65. package/lib/dist/extraction/grammars.d.ts +38 -0
  66. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  67. package/lib/dist/extraction/grammars.js +77 -1
  68. package/lib/dist/extraction/grammars.js.map +1 -1
  69. package/lib/dist/extraction/index.d.ts +113 -15
  70. package/lib/dist/extraction/index.d.ts.map +1 -1
  71. package/lib/dist/extraction/index.js +599 -132
  72. package/lib/dist/extraction/index.js.map +1 -1
  73. package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
  74. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  75. package/lib/dist/extraction/languages/c-cpp.js +291 -15
  76. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  77. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  78. package/lib/dist/extraction/languages/dart.js +8 -3
  79. package/lib/dist/extraction/languages/dart.js.map +1 -1
  80. package/lib/dist/extraction/languages/javascript.js +1 -1
  81. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  82. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  83. package/lib/dist/extraction/languages/kotlin.js +169 -36
  84. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  85. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  86. package/lib/dist/extraction/languages/lua.js +4 -1
  87. package/lib/dist/extraction/languages/lua.js.map +1 -1
  88. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  89. package/lib/dist/extraction/languages/python.js +71 -0
  90. package/lib/dist/extraction/languages/python.js.map +1 -1
  91. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  92. package/lib/dist/extraction/languages/rust.js +3 -0
  93. package/lib/dist/extraction/languages/rust.js.map +1 -1
  94. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  95. package/lib/dist/extraction/languages/scala.js +18 -3
  96. package/lib/dist/extraction/languages/scala.js.map +1 -1
  97. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  98. package/lib/dist/extraction/languages/typescript.js +9 -2
  99. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  100. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  101. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  102. package/lib/dist/extraction/liquid-extractor.js +98 -22
  103. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  104. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  105. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  106. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  107. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  108. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  109. package/lib/dist/extraction/syntax-tokens.js +381 -0
  110. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  111. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  112. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  113. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  114. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  115. package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
  116. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  117. package/lib/dist/extraction/tree-sitter.d.ts +96 -17
  118. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  119. package/lib/dist/extraction/tree-sitter.js +820 -82
  120. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  121. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  122. package/lib/dist/file-limits.d.ts +40 -0
  123. package/lib/dist/file-limits.d.ts.map +1 -0
  124. package/lib/dist/file-limits.js +147 -0
  125. package/lib/dist/file-limits.js.map +1 -0
  126. package/lib/dist/graph/branch-guards.d.ts +248 -0
  127. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  128. package/lib/dist/graph/branch-guards.js +2231 -0
  129. package/lib/dist/graph/branch-guards.js.map +1 -0
  130. package/lib/dist/graph/dead-code.d.ts +251 -0
  131. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  132. package/lib/dist/graph/dead-code.js +776 -0
  133. package/lib/dist/graph/dead-code.js.map +1 -0
  134. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  135. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  136. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  137. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  138. package/lib/dist/graph/index.d.ts +4 -0
  139. package/lib/dist/graph/index.d.ts.map +1 -1
  140. package/lib/dist/graph/index.js +16 -1
  141. package/lib/dist/graph/index.js.map +1 -1
  142. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  143. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  144. package/lib/dist/graph/named-symbol-flow.js +552 -0
  145. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  146. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  147. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  148. package/lib/dist/graph/symbol-lookup.js +181 -0
  149. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  150. package/lib/dist/graph/traversal.d.ts +9 -0
  151. package/lib/dist/graph/traversal.d.ts.map +1 -1
  152. package/lib/dist/graph/traversal.js +61 -35
  153. package/lib/dist/graph/traversal.js.map +1 -1
  154. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  155. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  156. package/lib/dist/graph/type-hierarchy.js +382 -0
  157. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  158. package/lib/dist/index.d.ts +251 -11
  159. package/lib/dist/index.d.ts.map +1 -1
  160. package/lib/dist/index.js +395 -34
  161. package/lib/dist/index.js.map +1 -1
  162. package/lib/dist/installer/index.d.ts.map +1 -1
  163. package/lib/dist/installer/index.js +3 -2
  164. package/lib/dist/installer/index.js.map +1 -1
  165. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  166. package/lib/dist/installer/targets/antigravity.js +14 -2
  167. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  168. package/lib/dist/installer/targets/claude.d.ts +3 -0
  169. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  170. package/lib/dist/installer/targets/claude.js +35 -7
  171. package/lib/dist/installer/targets/claude.js.map +1 -1
  172. package/lib/dist/installer/targets/codex.d.ts +2 -1
  173. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  174. package/lib/dist/installer/targets/codex.js +14 -4
  175. package/lib/dist/installer/targets/codex.js.map +1 -1
  176. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  177. package/lib/dist/installer/targets/copilot-cli.js +7 -1
  178. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  179. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  180. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  181. package/lib/dist/installer/targets/opencode.js +73 -22
  182. package/lib/dist/installer/targets/opencode.js.map +1 -1
  183. package/lib/dist/installer/targets/shared.d.ts +14 -3
  184. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  185. package/lib/dist/installer/targets/shared.js +39 -11
  186. package/lib/dist/installer/targets/shared.js.map +1 -1
  187. package/lib/dist/installer/targets/types.d.ts +7 -0
  188. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  189. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  190. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  191. package/lib/dist/mcp/answer-freshness.js +68 -0
  192. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  193. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  194. package/lib/dist/mcp/daemon-manager.js +16 -0
  195. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  196. package/lib/dist/mcp/daemon-paths.d.ts +2 -0
  197. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  198. package/lib/dist/mcp/daemon-paths.js +12 -3
  199. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  200. package/lib/dist/mcp/daemon-registry.d.ts +7 -4
  201. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  202. package/lib/dist/mcp/daemon-registry.js +91 -29
  203. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  204. package/lib/dist/mcp/daemon.d.ts +17 -7
  205. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  206. package/lib/dist/mcp/daemon.js +116 -24
  207. package/lib/dist/mcp/daemon.js.map +1 -1
  208. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  209. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  210. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  211. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  212. package/lib/dist/mcp/engine.d.ts +28 -9
  213. package/lib/dist/mcp/engine.d.ts.map +1 -1
  214. package/lib/dist/mcp/engine.js +146 -62
  215. package/lib/dist/mcp/engine.js.map +1 -1
  216. package/lib/dist/mcp/explore-dedup.d.ts +5 -2
  217. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
  218. package/lib/dist/mcp/explore-dedup.js +8 -5
  219. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  220. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  221. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  222. package/lib/dist/mcp/index-freshness-worker.js +30 -0
  223. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  224. package/lib/dist/mcp/index-freshness.d.ts +7 -0
  225. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  226. package/lib/dist/mcp/index-freshness.js +94 -0
  227. package/lib/dist/mcp/index-freshness.js.map +1 -0
  228. package/lib/dist/mcp/index.d.ts +3 -1
  229. package/lib/dist/mcp/index.d.ts.map +1 -1
  230. package/lib/dist/mcp/index.js +95 -11
  231. package/lib/dist/mcp/index.js.map +1 -1
  232. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  233. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  234. package/lib/dist/mcp/liveness-watchdog.js +11 -2
  235. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  236. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  237. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  238. package/lib/dist/mcp/project-lifecycle.js +181 -0
  239. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  240. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  241. package/lib/dist/mcp/proxy.js +9 -0
  242. package/lib/dist/mcp/proxy.js.map +1 -1
  243. package/lib/dist/mcp/query-pool.d.ts +2 -2
  244. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  245. package/lib/dist/mcp/query-pool.js +9 -7
  246. package/lib/dist/mcp/query-pool.js.map +1 -1
  247. package/lib/dist/mcp/query-worker.js +2 -2
  248. package/lib/dist/mcp/query-worker.js.map +1 -1
  249. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  250. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  251. package/lib/dist/mcp/server-instructions.js +6 -3
  252. package/lib/dist/mcp/server-instructions.js.map +1 -1
  253. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  254. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  255. package/lib/dist/mcp/startup-handshake.js +10 -2
  256. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  257. package/lib/dist/mcp/tools.d.ts +276 -36
  258. package/lib/dist/mcp/tools.d.ts.map +1 -1
  259. package/lib/dist/mcp/tools.js +2295 -980
  260. package/lib/dist/mcp/tools.js.map +1 -1
  261. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  262. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  263. package/lib/dist/mcp/writer-lock.js +260 -0
  264. package/lib/dist/mcp/writer-lock.js.map +1 -0
  265. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  266. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  267. package/lib/dist/resolution/alias-binding.js +127 -0
  268. package/lib/dist/resolution/alias-binding.js.map +1 -0
  269. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  270. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  271. package/lib/dist/resolution/callback-synthesizer.js +291 -143
  272. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  273. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  274. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  275. package/lib/dist/resolution/cpp-constructor.js +123 -0
  276. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  277. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  278. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  279. package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
  280. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  281. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  282. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  283. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  284. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  285. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  286. package/lib/dist/resolution/frameworks/csharp.js +96 -2
  287. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  288. package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
  289. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  290. package/lib/dist/resolution/frameworks/expo-router.js +785 -0
  291. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  292. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  293. package/lib/dist/resolution/frameworks/express.js +251 -16
  294. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  295. package/lib/dist/resolution/frameworks/index.d.ts +5 -0
  296. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  297. package/lib/dist/resolution/frameworks/index.js +29 -1
  298. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  299. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  300. package/lib/dist/resolution/frameworks/java.js +79 -47
  301. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  302. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  303. package/lib/dist/resolution/frameworks/nestjs.js +6 -14
  304. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  305. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  306. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  307. package/lib/dist/resolution/frameworks/nextjs.js +328 -0
  308. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  309. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  310. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  311. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  312. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  313. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  314. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  315. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  316. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  317. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  318. package/lib/dist/resolution/frameworks/python.js +166 -0
  319. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  320. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  321. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  322. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  323. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  324. package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
  325. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  326. package/lib/dist/resolution/frameworks/react-router.js +187 -0
  327. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  328. package/lib/dist/resolution/frameworks/react.d.ts +2 -1
  329. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  330. package/lib/dist/resolution/frameworks/react.js +188 -139
  331. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  332. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  333. package/lib/dist/resolution/frameworks/svelte.js +6 -1
  334. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  335. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  336. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  337. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  338. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  339. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  340. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  341. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  342. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  343. package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
  344. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  345. package/lib/dist/resolution/frameworks/vue-router.js +377 -0
  346. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  347. package/lib/dist/resolution/import-resolver.d.ts +38 -0
  348. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  349. package/lib/dist/resolution/import-resolver.js +376 -26
  350. package/lib/dist/resolution/import-resolver.js.map +1 -1
  351. package/lib/dist/resolution/index.d.ts +89 -25
  352. package/lib/dist/resolution/index.d.ts.map +1 -1
  353. package/lib/dist/resolution/index.js +552 -145
  354. package/lib/dist/resolution/index.js.map +1 -1
  355. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  356. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  357. package/lib/dist/resolution/js-builtins.js +46 -0
  358. package/lib/dist/resolution/js-builtins.js.map +1 -0
  359. package/lib/dist/resolution/name-matcher.d.ts +69 -22
  360. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  361. package/lib/dist/resolution/name-matcher.js +1902 -87
  362. package/lib/dist/resolution/name-matcher.js.map +1 -1
  363. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  364. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  365. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  366. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  367. package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
  368. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  369. package/lib/dist/resolution/react-router-synthesizer.js +126 -0
  370. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  371. package/lib/dist/resolution/resolver-pool.d.ts +2 -0
  372. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  373. package/lib/dist/resolution/resolver-pool.js +4 -0
  374. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  375. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  376. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  377. package/lib/dist/resolution/strip-comments.js +58 -0
  378. package/lib/dist/resolution/strip-comments.js.map +1 -1
  379. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  380. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  381. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  382. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  383. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  384. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  385. package/lib/dist/resolution/synth-utils.js +75 -0
  386. package/lib/dist/resolution/synth-utils.js.map +1 -0
  387. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  388. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  389. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  390. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  391. package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
  392. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  393. package/lib/dist/resolution/tier-synthesizer.js +931 -0
  394. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  395. package/lib/dist/resolution/types.d.ts +78 -2
  396. package/lib/dist/resolution/types.d.ts.map +1 -1
  397. package/lib/dist/resolution/types.js +64 -0
  398. package/lib/dist/resolution/types.js.map +1 -1
  399. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  400. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  401. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  402. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  403. package/lib/dist/search/query-paths.d.ts +50 -1
  404. package/lib/dist/search/query-paths.d.ts.map +1 -1
  405. package/lib/dist/search/query-paths.js +227 -12
  406. package/lib/dist/search/query-paths.js.map +1 -1
  407. package/lib/dist/search/query-utils.d.ts +15 -0
  408. package/lib/dist/search/query-utils.d.ts.map +1 -1
  409. package/lib/dist/search/query-utils.js +35 -7
  410. package/lib/dist/search/query-utils.js.map +1 -1
  411. package/lib/dist/sync/watch-policy.d.ts +14 -0
  412. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  413. package/lib/dist/sync/watch-policy.js +19 -0
  414. package/lib/dist/sync/watch-policy.js.map +1 -1
  415. package/lib/dist/sync/watcher.d.ts +52 -35
  416. package/lib/dist/sync/watcher.d.ts.map +1 -1
  417. package/lib/dist/sync/watcher.js +236 -100
  418. package/lib/dist/sync/watcher.js.map +1 -1
  419. package/lib/dist/telemetry/index.d.ts +4 -2
  420. package/lib/dist/telemetry/index.d.ts.map +1 -1
  421. package/lib/dist/telemetry/index.js +92 -41
  422. package/lib/dist/telemetry/index.js.map +1 -1
  423. package/lib/dist/types.d.ts +1 -1
  424. package/lib/dist/types.d.ts.map +1 -1
  425. package/lib/dist/types.js +1 -0
  426. package/lib/dist/types.js.map +1 -1
  427. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  428. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  429. package/lib/dist/ui-server/api/deadcode.js +136 -0
  430. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  431. package/lib/dist/ui-server/api/effects.d.ts +87 -0
  432. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  433. package/lib/dist/ui-server/api/effects.js +499 -0
  434. package/lib/dist/ui-server/api/effects.js.map +1 -0
  435. package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
  436. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  437. package/lib/dist/ui-server/api/entrypoints.js +279 -0
  438. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  439. package/lib/dist/ui-server/api/events.d.ts +183 -0
  440. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  441. package/lib/dist/ui-server/api/events.js +430 -0
  442. package/lib/dist/ui-server/api/events.js.map +1 -0
  443. package/lib/dist/ui-server/api/file.d.ts +66 -0
  444. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  445. package/lib/dist/ui-server/api/file.js +235 -0
  446. package/lib/dist/ui-server/api/file.js.map +1 -0
  447. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  448. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  449. package/lib/dist/ui-server/api/filecode.js +205 -0
  450. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  451. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  452. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  453. package/lib/dist/ui-server/api/flow.js +612 -0
  454. package/lib/dist/ui-server/api/flow.js.map +1 -0
  455. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  456. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  457. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  458. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  459. package/lib/dist/ui-server/api/index.d.ts +90 -0
  460. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  461. package/lib/dist/ui-server/api/index.js +332 -0
  462. package/lib/dist/ui-server/api/index.js.map +1 -0
  463. package/lib/dist/ui-server/api/map.d.ts +238 -0
  464. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  465. package/lib/dist/ui-server/api/map.js +681 -0
  466. package/lib/dist/ui-server/api/map.js.map +1 -0
  467. package/lib/dist/ui-server/api/node.d.ts +81 -0
  468. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  469. package/lib/dist/ui-server/api/node.js +388 -0
  470. package/lib/dist/ui-server/api/node.js.map +1 -0
  471. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  472. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  473. package/lib/dist/ui-server/api/nodes.js +45 -0
  474. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  475. package/lib/dist/ui-server/api/program.d.ts +139 -0
  476. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  477. package/lib/dist/ui-server/api/program.js +315 -0
  478. package/lib/dist/ui-server/api/program.js.map +1 -0
  479. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  480. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  481. package/lib/dist/ui-server/api/respond.js +186 -0
  482. package/lib/dist/ui-server/api/respond.js.map +1 -0
  483. package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
  484. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  485. package/lib/dist/ui-server/api/route-roots.js +96 -0
  486. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  487. package/lib/dist/ui-server/api/routes.d.ts +59 -0
  488. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  489. package/lib/dist/ui-server/api/routes.js +108 -0
  490. package/lib/dist/ui-server/api/routes.js.map +1 -0
  491. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  492. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  493. package/lib/dist/ui-server/api/screens.js +611 -0
  494. package/lib/dist/ui-server/api/screens.js.map +1 -0
  495. package/lib/dist/ui-server/api/search.d.ts +29 -0
  496. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  497. package/lib/dist/ui-server/api/search.js +232 -0
  498. package/lib/dist/ui-server/api/search.js.map +1 -0
  499. package/lib/dist/ui-server/api/session.d.ts +52 -0
  500. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  501. package/lib/dist/ui-server/api/session.js +196 -0
  502. package/lib/dist/ui-server/api/session.js.map +1 -0
  503. package/lib/dist/ui-server/api/source.d.ts +200 -0
  504. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  505. package/lib/dist/ui-server/api/source.js +422 -0
  506. package/lib/dist/ui-server/api/source.js.map +1 -0
  507. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  508. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  509. package/lib/dist/ui-server/api/stats.js +164 -0
  510. package/lib/dist/ui-server/api/stats.js.map +1 -0
  511. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  512. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  513. package/lib/dist/ui-server/api/steps.js +1446 -0
  514. package/lib/dist/ui-server/api/steps.js.map +1 -0
  515. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  516. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  517. package/lib/dist/ui-server/api/trail-store.js +323 -0
  518. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  519. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  520. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  521. package/lib/dist/ui-server/api/trails.js +369 -0
  522. package/lib/dist/ui-server/api/trails.js.map +1 -0
  523. package/lib/dist/ui-server/api/when.d.ts +125 -0
  524. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  525. package/lib/dist/ui-server/api/when.js +251 -0
  526. package/lib/dist/ui-server/api/when.js.map +1 -0
  527. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  528. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  529. package/lib/dist/ui-server/api/wire.js +231 -0
  530. package/lib/dist/ui-server/api/wire.js.map +1 -0
  531. package/lib/dist/ui-server/assets.d.ts +40 -0
  532. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  533. package/lib/dist/ui-server/assets.js +110 -0
  534. package/lib/dist/ui-server/assets.js.map +1 -0
  535. package/lib/dist/ui-server/constants.d.ts +32 -0
  536. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  537. package/lib/dist/ui-server/constants.js +35 -0
  538. package/lib/dist/ui-server/constants.js.map +1 -0
  539. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  540. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  541. package/lib/dist/ui-server/highlight/index.js +307 -0
  542. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  543. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  544. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  545. package/lib/dist/ui-server/highlight/languages.js +50 -0
  546. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  547. package/lib/dist/ui-server/index.d.ts +92 -0
  548. package/lib/dist/ui-server/index.d.ts.map +1 -0
  549. package/lib/dist/ui-server/index.js +399 -0
  550. package/lib/dist/ui-server/index.js.map +1 -0
  551. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  552. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  553. package/lib/dist/ui-server/open-browser.js +79 -0
  554. package/lib/dist/ui-server/open-browser.js.map +1 -0
  555. package/lib/dist/ui-server/security.d.ts +127 -0
  556. package/lib/dist/ui-server/security.d.ts.map +1 -0
  557. package/lib/dist/ui-server/security.js +332 -0
  558. package/lib/dist/ui-server/security.js.map +1 -0
  559. package/lib/dist/ui-server/static.d.ts +45 -0
  560. package/lib/dist/ui-server/static.d.ts.map +1 -0
  561. package/lib/dist/ui-server/static.js +165 -0
  562. package/lib/dist/ui-server/static.js.map +1 -0
  563. package/lib/dist/utils.d.ts +14 -2
  564. package/lib/dist/utils.d.ts.map +1 -1
  565. package/lib/dist/utils.js +25 -10
  566. package/lib/dist/utils.js.map +1 -1
  567. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  568. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  569. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  570. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  571. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  572. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  573. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  574. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  575. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  576. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  577. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  578. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  579. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  580. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  581. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  582. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  583. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  584. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  585. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  586. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  587. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  588. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  589. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  590. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  591. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  592. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  593. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  594. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  595. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  596. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  597. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  598. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  599. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  600. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  601. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  602. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  603. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  604. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  605. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  606. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  607. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  608. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  609. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  610. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  611. package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
  612. package/lib/dist/viewer/index.html +16 -0
  613. package/lib/kernel/codegraph-kernel.node +2 -2
  614. package/lib/node_modules/.package-lock.json +4 -4
  615. package/lib/node_modules/picomatch/README.md +56 -51
  616. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  617. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  618. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  619. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  620. package/lib/node_modules/picomatch/package.json +4 -4
  621. package/lib/package.json +9 -2
  622. package/package.json +1 -1
@@ -1,12 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SYNTH_PROGRESS_STEPS = exports.SYNTH_PASSES = void 0;
4
+ exports.hasSynthesisPattern = hasSynthesisPattern;
4
5
  exports.synthesizeCallbackEdges = synthesizeCallbackEdges;
5
6
  const generated_detection_1 = require("../extraction/generated-detection");
6
7
  const strip_comments_1 = require("./strip-comments");
7
8
  const c_fnptr_synthesizer_1 = require("./c-fnptr-synthesizer");
8
9
  const goframe_synthesizer_1 = require("./goframe-synthesizer");
10
+ const expo_router_synthesizer_1 = require("./expo-router-synthesizer");
11
+ const next_router_synthesizer_1 = require("./next-router-synthesizer");
12
+ const react_router_synthesizer_1 = require("./react-router-synthesizer");
13
+ const tanstack_router_synthesizer_1 = require("./tanstack-router-synthesizer");
14
+ const vue_router_synthesizer_1 = require("./vue-router-synthesizer");
15
+ const sveltekit_synthesizer_1 = require("./sveltekit-synthesizer");
9
16
  const cooperative_yield_1 = require("./cooperative-yield");
17
+ const tier_synthesizer_1 = require("./tier-synthesizer");
18
+ const synth_utils_1 = require("./synth-utils");
19
+ const import_resolver_1 = require("./import-resolver");
20
+ const name_matcher_1 = require("./name-matcher");
10
21
  const REGISTRAR_NAME = /^(on[A-Z]\w*|subscribe|addListener|addEventListener|register|watch|listen|addCallback)$/;
11
22
  const DISPATCHER_NAME = /(emit|trigger|notify|dispatch|fire|publish|flush)/i;
12
23
  const MAX_CALLBACKS_PER_CHANNEL = 40;
@@ -15,6 +26,7 @@ const ON_RE = /\.(?:on|once|addListener)\(\s*['"]([^'"]+)['"]\s*,\s*(?:function\
15
26
  const EMIT_RE = /\.(?:emit|fire|dispatchEvent)\(\s*['"]([^'"]+)['"]/g;
16
27
  const SETSTATE_RE = /this\.setState\s*\(/;
17
28
  const FLUTTER_SETSTATE_RE = /\bsetState\s*\(/; // Flutter: setState((){…}) / this.setState
29
+ const JS_FAMILY = ['typescript', 'javascript', 'tsx', 'jsx'];
18
30
  const JSX_TAG_RE = /<([A-Z][A-Za-z0-9_]*)[\s/>]/g;
19
31
  const MAX_JSX_CHILDREN = 30;
20
32
  // Vue SFC templates: kebab-case child components (<el-button> → ElButton) and
@@ -85,35 +97,6 @@ function sliceLines(content, startLine, endLine) {
85
97
  return null;
86
98
  return content.split('\n').slice(startLine - 1, endLine).join('\n');
87
99
  }
88
- /**
89
- * Per-match line resolver over `src`, 1-based at `baseLine`. The inline
90
- * `src.slice(0, idx).split('\n').length` idiom is O(source-length) PER MATCH,
91
- * which goes quadratic on a match-dense source (a generated function full of
92
- * `.push(` calls re-scanned tens of thousands of times was most of the #1235
93
- * indexing wedge). Builds the newline index once — lazily, since most sources
94
- * never produce a match — then answers each call with a binary search.
95
- */
96
- function makeLineAt(src, baseLine) {
97
- let nl = null;
98
- return (idx) => {
99
- if (!nl) {
100
- nl = [];
101
- for (let i = src.indexOf('\n'); i !== -1; i = src.indexOf('\n', i + 1))
102
- nl.push(i);
103
- }
104
- // Count newlines strictly before idx.
105
- let lo = 0;
106
- let hi = nl.length;
107
- while (lo < hi) {
108
- const mid = (lo + hi) >> 1;
109
- if (nl[mid] < idx)
110
- lo = mid + 1;
111
- else
112
- hi = mid;
113
- }
114
- return baseLine + lo;
115
- };
116
- }
117
100
  function registrarField(src) {
118
101
  const m = src.match(/this\.(\w+)\.(?:add|push|set)\(/);
119
102
  return m ? m[1] : null;
@@ -127,21 +110,6 @@ function dispatcherField(src) {
127
110
  return forEach[1];
128
111
  return null;
129
112
  }
130
- const FN_KINDS = new Set(['method', 'function', 'component']);
131
- /** Innermost function/method node whose line range contains `line`. */
132
- function enclosingFn(nodesInFile, line) {
133
- let best = null;
134
- for (const n of nodesInFile) {
135
- if (!FN_KINDS.has(n.kind))
136
- continue;
137
- const end = n.endLine ?? n.startLine;
138
- if (n.startLine <= line && end >= line) {
139
- if (!best || n.startLine >= best.startLine)
140
- best = n; // prefer the tightest (latest-starting) encloser
141
- }
142
- }
143
- return best;
144
- }
145
113
  /**
146
114
  * Stream method + function nodes lazily. The synthesizers only scan-and-filter
147
115
  * down to a tiny matched subset, so materializing every function/method (which
@@ -185,7 +153,7 @@ async function fieldChannelEdges(queries, ctx, onYield) {
185
153
  const chDispatchers = dispatchers.filter((d) => d.node.filePath === reg.node.filePath && d.field === reg.field);
186
154
  if (chDispatchers.length === 0)
187
155
  continue;
188
- const argRe = new RegExp(`${reg.node.name}\\s*\\(\\s*(?:this\\.)?(\\w+)`);
156
+ const argRe = new RegExp(`${reg.node.name}\\s*\\(\\s*(this\\.\\w+|\\w+)\\s*(?=[,)])`);
189
157
  let added = 0;
190
158
  for (const e of queries.getIncomingEdges(reg.node.id, ['calls'])) {
191
159
  if (added >= MAX_CALLBACKS_PER_CHANNEL)
@@ -199,8 +167,15 @@ async function fieldChannelEdges(queries, ctx, onYield) {
199
167
  const am = line?.match(argRe);
200
168
  if (!am)
201
169
  continue;
202
- const fn = ctx.getNodesByName(am[1]).find((n) => n.kind === 'method' || n.kind === 'function');
203
- if (!fn)
170
+ // Reuse the resolved value at this registration site: it retains the
171
+ // receiver's class/inheritance and import binding, unlike a name lookup.
172
+ const refs = queries.getOutgoingEdges(caller.id, ['references']).filter((r) => r.line === e.line && r.metadata?.fnRef === true && r.metadata.refName === am[1]);
173
+ if (refs.length !== 1)
174
+ continue;
175
+ const fn = queries.getNodeById(refs[0].target);
176
+ if (!fn || (fn.kind !== 'method' && fn.kind !== 'function'))
177
+ continue;
178
+ if (!am[1].startsWith('this.') && fn.filePath !== caller.filePath && refs[0].metadata?.resolvedBy !== 'import')
204
179
  continue;
205
180
  for (const disp of chDispatchers) {
206
181
  if (disp.node.id === fn.id)
@@ -271,7 +246,7 @@ async function closureCollectionEdges(queries, ctx, onYield) {
271
246
  const hasAppend = src.includes('.append(') || src.includes('.add(') || src.includes('.push(') || src.includes('.insert(');
272
247
  if (!hasForEach && !hasAppend)
273
248
  continue;
274
- const lineAt = makeLineAt(src, m.startLine ?? 1);
249
+ const lineAt = (0, synth_utils_1.makeLineAt)(src, m.startLine ?? 1);
275
250
  if (hasForEach) {
276
251
  CC_DISPATCH_RE.lastIndex = 0;
277
252
  let d;
@@ -345,12 +320,12 @@ async function eventEmitterEdges(ctx, onYield) {
345
320
  if (!hasEmit && !hasOn)
346
321
  continue;
347
322
  const nodesInFile = ctx.getNodesInFile(file);
348
- const lineOf = makeLineAt(content, 1);
323
+ const lineOf = (0, synth_utils_1.makeLineAt)(content, 1);
349
324
  if (hasEmit) {
350
325
  EMIT_RE.lastIndex = 0;
351
326
  let m;
352
327
  while ((m = EMIT_RE.exec(content))) {
353
- const disp = enclosingFn(nodesInFile, lineOf(m.index));
328
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, lineOf(m.index));
354
329
  if (!disp)
355
330
  continue;
356
331
  const set = emitsByEvent.get(m[1]) ?? new Set();
@@ -542,11 +517,9 @@ async function arkuiStateBuildEdges(queries, ctx, onYield) {
542
517
  let scanned255 = 0;
543
518
  const edges = [];
544
519
  const seen = new Set();
545
- for (const struct of queries.iterateNodesByKind('struct')) {
520
+ for (const struct of queries.iterateNodesByKindIn('struct', ['arkts'])) {
546
521
  if ((++scanned255 & 63) === 0)
547
522
  await onYield();
548
- if (struct.language !== 'arkts')
549
- continue;
550
523
  const children = queries.getOutgoingEdges(struct.id, ['contains'])
551
524
  .map((e) => queries.getNodeById(e.target))
552
525
  .filter((n) => !!n);
@@ -884,22 +857,17 @@ async function goImplementsEdges(queries, onYield) {
884
857
  // never the whole struct kind — that array is O(nodes) on struct-heavy
885
858
  // repos like the Linux kernel (#1212).
886
859
  const goStructs = [];
887
- for (const s of queries.iterateNodesByKind('struct')) {
860
+ for (const s of queries.iterateNodesByKindIn('struct', ['go'])) {
888
861
  if ((++scanned255 & 63) === 0)
889
862
  await onYield();
890
- if (s.language === 'go')
891
- goStructs.push(s);
863
+ goStructs.push(s);
892
864
  }
893
865
  const structMethods = new Map();
894
866
  for (const s of goStructs)
895
867
  structMethods.set(s.id, methodNameSet(s.id));
896
- for (const iface of queries.iterateNodesByKind('interface')) {
897
- if ((++scanned255 & 63) === 0)
898
- await onYield();
868
+ for (const iface of queries.iterateNodesByKindIn('interface', ['go'])) {
899
869
  if ((++scanned255 & 63) === 0)
900
870
  await onYield();
901
- if (iface.language !== 'go')
902
- continue;
903
871
  const want = methodNameSet(iface.id);
904
872
  if (want.size === 0)
905
873
  continue; // empty interface (`any`) — would match everything
@@ -952,9 +920,10 @@ async function goImplementsEdges(queries, onYield) {
952
920
  *
953
921
  * Go guarantees a method's receiver type is declared in the SAME PACKAGE as the
954
922
  * method, and a Go package is a single directory — so this is a deterministic
955
- * structural link, not a heuristic: find the same-named type in the method's own
956
- * directory and add the missing `contains` edge (no `provenance: 'heuristic'`,
957
- * matching the same-file edges extraction already emits). Skips methods that
923
+ * structural link, not a heuristic: find the same-named type in the method's
924
+ * own directory and add the missing `contains` edge with no provenance, matching
925
+ * same-file extraction. Tag synthesis ownership so an incremental
926
+ * refresh can replace it alongside implicit `implements`. Skips methods that
958
927
  * already have a type parent (the same-file case). (#583, cross-file half)
959
928
  */
960
929
  async function goCrossFileMethodContainsEdges(queries, onYield) {
@@ -966,13 +935,9 @@ async function goCrossFileMethodContainsEdges(queries, onYield) {
966
935
  const i = p.replace(/\\/g, '/').lastIndexOf('/');
967
936
  return i >= 0 ? p.slice(0, i) : '';
968
937
  };
969
- for (const method of queries.iterateNodesByKind('method')) {
970
- if ((++scanned255 & 63) === 0)
971
- await onYield();
938
+ for (const method of queries.iterateNodesByKindIn('method', ['go'])) {
972
939
  if ((++scanned255 & 63) === 0)
973
940
  await onYield();
974
- if (method.language !== 'go')
975
- continue;
976
941
  // The receiver type is encoded in the method's qualifiedName as `Recv::name`
977
942
  // (extraction sets `${receiverType}::${name}` for receiver methods).
978
943
  const qn = method.qualifiedName;
@@ -1007,7 +972,8 @@ async function goCrossFileMethodContainsEdges(queries, onYield) {
1007
972
  if (seen.has(key))
1008
973
  continue;
1009
974
  seen.add(key);
1010
- edges.push({ source: owner.id, target: method.id, kind: 'contains', line: method.startLine });
975
+ edges.push({ source: owner.id, target: method.id, kind: 'contains', line: method.startLine,
976
+ metadata: { synthesizedBy: 'go-method-contains' } });
1011
977
  }
1012
978
  return edges;
1013
979
  }
@@ -1206,11 +1172,9 @@ async function goGrpcStubImplEdges(queries, onYield) {
1206
1172
  const methodNamesByStruct = new Map();
1207
1173
  const methodNodesByStruct = new Map();
1208
1174
  const goStructs = [];
1209
- for (const s of queries.iterateNodesByKind('struct')) {
1175
+ for (const s of queries.iterateNodesByKindIn('struct', ['go'])) {
1210
1176
  if ((++scanned255 & 63) === 0)
1211
1177
  await onYield();
1212
- if (s.language !== 'go')
1213
- continue;
1214
1178
  goStructs.push(s);
1215
1179
  const ms = queries
1216
1180
  .getOutgoingEdges(s.id, ['contains'])
@@ -1282,6 +1246,60 @@ async function goGrpcStubImplEdges(queries, onYield) {
1282
1246
  }
1283
1247
  return edges;
1284
1248
  }
1249
+ /** Kinds a JSX tag can name. A tag that resolves only to a type is markup we drop. */
1250
+ const JSX_CHILD_KINDS = new Set(['component', 'function', 'class']);
1251
+ /**
1252
+ * The languages a JSX tag can plausibly name a component in. Preferred over a
1253
+ * same-named symbol in another language, never required — a React Native tag
1254
+ * whose only match is the native class it bridges to (`requireNativeComponent`)
1255
+ * still links there.
1256
+ */
1257
+ const JSX_CHILD_LANGUAGES = [...JS_FAMILY, 'vue', 'svelte'];
1258
+ /** `localName` → the project file it is imported from, for one file's imports. */
1259
+ function importedFrom(ctx, file, language) {
1260
+ const out = new Map();
1261
+ for (const im of ctx.getImportMappings(file, language)) {
1262
+ // The mappings name the module as written; the file it is comes from the
1263
+ // same resolution the import resolver uses (aliases, extensions, index files).
1264
+ const resolved = im.resolvedPath ?? (0, import_resolver_1.resolveImportPath)(im.source, file, language, ctx);
1265
+ if (resolved)
1266
+ out.set(im.localName, resolved);
1267
+ }
1268
+ return out;
1269
+ }
1270
+ /**
1271
+ * The component a JSX tag names, among every node that shares the name.
1272
+ *
1273
+ * A tag is written in one file, and that file already says which `FrameCard` it
1274
+ * means: the one it declares, or the one it imports. Taking the FIRST node of
1275
+ * that name — which is what this did — is a coin flip once a name repeats, and
1276
+ * it costs twice over. The parent gets an edge to a component it never renders,
1277
+ * and the component it does render is left with no caller at all, so every walk
1278
+ * back from that subtree dead-ends: on an Expo app whose `<FrameCard/>` was one
1279
+ * of two, the folder sheet's `openBackgroundNoiseDetail` stood alone on Screens
1280
+ * with no screen behind it, while the edge pointed at an unrelated card in
1281
+ * another sheet.
1282
+ *
1283
+ * Same file first — a small component declared beside its use is the commonest
1284
+ * shape, and the one an import can never disambiguate. Then the file the name
1285
+ * is imported from. Then the language, which only decides a tie: a `.tsx` tag
1286
+ * naming both a TS component and a same-named Swift class means the TS one.
1287
+ */
1288
+ function jsxChild(ctx, name, file, importsOf) {
1289
+ const candidates = ctx.getNodesByName(name).filter((n) => JSX_CHILD_KINDS.has(n.kind));
1290
+ if (candidates.length <= 1)
1291
+ return candidates[0];
1292
+ const local = candidates.find((n) => n.filePath === file);
1293
+ if (local)
1294
+ return local;
1295
+ const from = importsOf().get(name);
1296
+ if (from) {
1297
+ const imported = candidates.find((n) => n.filePath === from);
1298
+ if (imported)
1299
+ return imported;
1300
+ }
1301
+ return candidates.find((n) => JSX_CHILD_LANGUAGES.includes(n.language)) ?? candidates[0];
1302
+ }
1285
1303
  /**
1286
1304
  * Phase 5: React JSX child rendering. A component that returns `<Child .../>`
1287
1305
  * mounts Child — React calls it — but JSX instantiation isn't a static call edge,
@@ -1310,6 +1328,9 @@ async function reactJsxChildEdges(ctx, onYield) {
1310
1328
  const parents = ctx.getNodesInFile(file).filter((n) => PARENT_KINDS.has(n.kind) && JS_FAMILY.includes(n.language));
1311
1329
  if (parents.length === 0)
1312
1330
  continue;
1331
+ // Read once per file, and only when a name actually turns out ambiguous.
1332
+ let imports = null;
1333
+ const importsOf = () => (imports ??= importedFrom(ctx, file, parents[0].language));
1313
1334
  for (const parent of parents) {
1314
1335
  const src = sliceLines(content, parent.startLine, parent.endLine);
1315
1336
  if (!src || (!src.includes('</') && !src.includes('/>')))
@@ -1323,8 +1344,8 @@ async function reactJsxChildEdges(ctx, onYield) {
1323
1344
  for (const name of names) {
1324
1345
  if (added >= MAX_JSX_CHILDREN)
1325
1346
  break;
1326
- const child = ctx.getNodesByName(name).find((n) => n.kind === 'component' || n.kind === 'function' || n.kind === 'class');
1327
- if (!child || child.id === parent.id)
1347
+ const child = jsxChild(ctx, name, file, importsOf);
1348
+ if (!child || child.id === parent.id || (0, name_matcher_1.crossesCodeBoundary)(parent.language, child.language))
1328
1349
  continue;
1329
1350
  const key = `${parent.id}>${child.id}`;
1330
1351
  if (seen.has(key))
@@ -1406,7 +1427,8 @@ async function vueTemplateEdges(ctx, onYield) {
1406
1427
  }
1407
1428
  let added = 0;
1408
1429
  const addEdge = (target, meta) => {
1409
- if (added >= MAX_JSX_CHILDREN || !target || target.id === comp.id)
1430
+ if (added >= MAX_JSX_CHILDREN || !target || target.id === comp.id ||
1431
+ (0, name_matcher_1.crossesCodeBoundary)(comp.language, target.language))
1410
1432
  return;
1411
1433
  const k = `${comp.id}>${target.id}>${meta.synthesizedBy}`;
1412
1434
  if (seen.has(k))
@@ -1483,10 +1505,13 @@ async function vueTemplateEdges(ctx, onYield) {
1483
1505
  * DeviceEventEmitter.addListener("locationUpdate", handler);
1484
1506
  *
1485
1507
  * Synthesize: native dispatch site → JS handler, keyed by the literal
1486
- * event name. Only matches NAMED handlers (the existing `ON_RE` named-
1487
- * capture form). Inline arrow handlers like `addListener('x', d => …)`
1488
- * aren't named at extraction time and would need link-through-body
1489
- * support; matches the deliberate scope of the in-language synthesizer.
1508
+ * event name. A NAMED handler (`addListener('x', handleX)`) is the target
1509
+ * when it is a node; an unnamed one — a parameter passed through, or an
1510
+ * inline `(data) => {…}` written in a `useEffect` — is attributed to the
1511
+ * enclosing function, where the event demonstrably lands. (The in-language
1512
+ * synthesizer stays named-only; this channel pairs across a language
1513
+ * boundary on a literal, which is the evidence that makes the wider
1514
+ * attribution safe.)
1490
1515
  *
1491
1516
  * Provenance `'heuristic'`, synthesizedBy `'rn-event-channel'`.
1492
1517
  */
@@ -1526,9 +1551,9 @@ async function rnEventEdges(ctx, onYield) {
1526
1551
  if (!content)
1527
1552
  continue;
1528
1553
  const nodesInFile = ctx.getNodesInFile(file);
1529
- const lineOf = makeLineAt(content, 1);
1554
+ const lineOf = (0, synth_utils_1.makeLineAt)(content, 1);
1530
1555
  const addDispatcher = (event, line) => {
1531
- const disp = enclosingFn(nodesInFile, line);
1556
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
1532
1557
  if (!disp)
1533
1558
  return;
1534
1559
  const set = nativeDispatchersByEvent.get(event) ?? new Set();
@@ -1594,6 +1619,8 @@ async function rnEventEdges(ctx, onYield) {
1594
1619
  // function (the abstraction layer), giving a reachability-correct
1595
1620
  // hop even when the actual user-side handler lives one call up.
1596
1621
  const ADDLISTENER_ANY = /\.(?:on|once|addListener)\(\s*['"]([^'"]+)['"]\s*,\s*([A-Za-z_][\w.]*)/g;
1622
+ // The inline form: `.addListener('x', (data) => {…})` / `function () {…}`.
1623
+ const ADDLISTENER_INLINE = /\.(?:on|once|addListener)\(\s*['"]([^'"]+)['"]\s*,\s*(?:async\s*)?(?:\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>|function\s*\()/g;
1597
1624
  ADDLISTENER_ANY.lastIndex = 0;
1598
1625
  let m;
1599
1626
  while ((m = ADDLISTENER_ANY.exec(content))) {
@@ -1611,7 +1638,7 @@ async function rnEventEdges(ctx, onYield) {
1611
1638
  // Fall back to the enclosing function — the subscribe-wrapper
1612
1639
  // pattern means the event fires THROUGH this function on its
1613
1640
  // way to user code. Reachability-correct attribution.
1614
- const enclosing = enclosingFn(nodesInFile, lineOf(m.index));
1641
+ const enclosing = (0, synth_utils_1.enclosingFn)(nodesInFile, lineOf(m.index));
1615
1642
  targetId = enclosing?.id ?? null;
1616
1643
  }
1617
1644
  if (!targetId) {
@@ -1641,6 +1668,26 @@ async function rnEventEdges(ctx, onYield) {
1641
1668
  map.set(targetId, `${file}:${lineOf(m.index)}`);
1642
1669
  jsHandlersByEvent.set(event, map);
1643
1670
  }
1671
+ // Inline listeners — the shape a React component registers inside a
1672
+ // `useEffect`: `nativeEmitter.addListener('onCaptureComplete', (data) =>
1673
+ // { … router.push('/review') })`. There is no handler symbol to name,
1674
+ // so the subscription is attributed to the enclosing function exactly
1675
+ // as the unnamed-argument form above is: the native event lands in that
1676
+ // component, and its body is where a reader looks next. This channel
1677
+ // only — the in-language synthesizer keeps its named-handler policy.
1678
+ ADDLISTENER_INLINE.lastIndex = 0;
1679
+ while ((m = ADDLISTENER_INLINE.exec(content))) {
1680
+ const event = m[1];
1681
+ if (!event)
1682
+ continue;
1683
+ const enclosing = (0, synth_utils_1.enclosingFn)(nodesInFile, lineOf(m.index));
1684
+ if (!enclosing)
1685
+ continue;
1686
+ const map = jsHandlersByEvent.get(event) ?? new Map();
1687
+ if (!map.has(enclosing.id))
1688
+ map.set(enclosing.id, `${file}:${lineOf(m.index)}`);
1689
+ jsHandlersByEvent.set(event, map);
1690
+ }
1644
1691
  }
1645
1692
  }
1646
1693
  const edges = [];
@@ -1787,11 +1834,9 @@ async function rnCrossPlatformEdges(queries, onYield) {
1787
1834
  // impls in ≥2 native languages can pair, so the per-method JS-caller check
1788
1835
  // below only runs for genuine cross-platform candidates.
1789
1836
  const byName = new Map();
1790
- for (const m of queries.iterateNodesByKind('method')) {
1837
+ for (const m of queries.iterateNodesByKindIn('method', [...NATIVE])) {
1791
1838
  if ((++scanned255 & 63) === 0)
1792
1839
  await onYield();
1793
- if (!NATIVE.has(m.language))
1794
- continue;
1795
1840
  const key = norm(m.name);
1796
1841
  const arr = byName.get(key);
1797
1842
  if (arr)
@@ -1923,21 +1968,18 @@ async function mybatisJavaXmlEdges(queries, onYield) {
1923
1968
  // stream below. Same rowid stream order as matching inline, so the edge
1924
1969
  // output is byte-identical when mappers do exist.
1925
1970
  const xmlMethods = [];
1926
- for (const m of queries.iterateNodesByKind('method')) {
1971
+ for (const m of queries.iterateNodesByKindIn('method', ['xml'])) {
1927
1972
  if ((++scanned255 & 63) === 0)
1928
1973
  await onYield();
1929
- if (m.language === 'xml')
1930
- xmlMethods.push(m);
1974
+ xmlMethods.push(m);
1931
1975
  }
1932
1976
  if (xmlMethods.length === 0)
1933
1977
  return edges;
1934
1978
  // Index Java methods by `<ClassName>::<methodName>` for O(1) lookup.
1935
1979
  const javaIndex = new Map();
1936
- for (const m of queries.iterateNodesByKind('method')) {
1980
+ for (const m of queries.iterateNodesByKindIn('method', ['java', 'kotlin'])) {
1937
1981
  if ((++scanned255 & 63) === 0)
1938
1982
  await onYield();
1939
- if (m.language !== 'java' && m.language !== 'kotlin')
1940
- continue;
1941
1983
  const parts = m.qualifiedName.split('::');
1942
1984
  const last = parts[parts.length - 1];
1943
1985
  const cls = parts[parts.length - 2];
@@ -2069,11 +2111,9 @@ async function ginMiddlewareChainEdges(queries, ctx, onYield) {
2069
2111
  let scannedFiles = 0;
2070
2112
  // 1. Find the chain dispatcher(s): a Go method that invokes a `handlers` slice by index.
2071
2113
  const dispatchers = [];
2072
- for (const n of queries.iterateNodesByKind('method')) {
2114
+ for (const n of queries.iterateNodesByKindIn('method', ['go'])) {
2073
2115
  if ((++scanned255 & 63) === 0)
2074
2116
  await onYield();
2075
- if (n.language !== 'go')
2076
- continue;
2077
2117
  const content = ctx.readFile(n.filePath);
2078
2118
  const src = content && sliceLines(content, n.startLine, n.endLine);
2079
2119
  if (src && GIN_DISPATCH_RE.test(src))
@@ -2207,12 +2247,17 @@ async function svelteKitLoadEdges(ctx, onYield) {
2207
2247
  if (!allFiles.has(loaderFile))
2208
2248
  continue;
2209
2249
  for (const hook of ctx.getNodesInFile(loaderFile)) {
2210
- if (!HOOK_KINDS.has(hook.kind) || !HOOKS.has(hook.name))
2250
+ // `load` and `actions` by name, and every function the loader file
2251
+ // declares — a form action is an arrow inside `actions`, and it is a
2252
+ // node of its own (`default`, `logout`), where the redirect that ends
2253
+ // the submission is actually written.
2254
+ const named = HOOK_KINDS.has(hook.kind) && HOOKS.has(hook.name);
2255
+ if (!named && hook.kind !== 'function' && hook.kind !== 'method')
2211
2256
  continue;
2212
2257
  edges.push({
2213
2258
  source: page.id,
2214
2259
  target: hook.id,
2215
- kind: 'references',
2260
+ kind: 'calls',
2216
2261
  line: page.startLine,
2217
2262
  provenance: 'heuristic',
2218
2263
  metadata: {
@@ -2310,12 +2355,38 @@ async function reduxThunkEdges(queries, ctx, onYield) {
2310
2355
  // the SAME file (the cross-file barrel-namespace variant, e.g. trezor's getMethod, is
2311
2356
  // deferred). Gated on a real object literal with ≥2 entries that RESOLVE to callables (a
2312
2357
  // `{ width: 5 }` literal resolves to nothing → no edges); fan-out capped.
2313
- const REGISTRY_ASSIGN_RE = /(?:(?:const|let|var)\s+([A-Za-z_$][\w$]*)|((?:this\.)?[A-Za-z_$][\w$]*))\s*=\s*\{/g;
2314
- const REGISTRY_DISPATCH_RE = /(?:\bnew\s+)?((?:this\.)?[A-Za-z_$][\w$]*)\s*\[\s*([A-Za-z_$][\w$.]*)\s*\]\s*(?:\(|\.[A-Za-z_$])/g;
2358
+ // Both scans only START a name at an identifier's first character (or at a `this.`): the
2359
+ // engine otherwise retries the greedy name at every later character of every identifier in
2360
+ // the file. A match found from inside an identifier always has one from the identifier's
2361
+ // start (same name tail, same continuation), so the result is unchanged — except where the
2362
+ // scan itself resumes mid-identifier after a dispatch ending in `.method`, which
2363
+ // `nextRegistryDispatch` covers with the unguarded pattern.
2364
+ const REGISTRY_NAME_START = String.raw `(?:(?<![A-Za-z_$])(?<![A-Za-z_$][\w$]+)|(?=this\.))`;
2365
+ const REGISTRY_ASSIGN_RE = new RegExp(String.raw `(?:(?:const|let|var)\s+([A-Za-z_$][\w$]*)|${REGISTRY_NAME_START}((?:this\.)?[A-Za-z_$][\w$]*))\s*=\s*\{`, 'g');
2366
+ const REGISTRY_DISPATCH_SRC = String.raw `(?:\bnew\s+)?((?:this\.)?[A-Za-z_$][\w$]*)\s*\[\s*([A-Za-z_$][\w$.]*)\s*\]\s*(?:\(|\.[A-Za-z_$])`;
2367
+ const REGISTRY_DISPATCH_AT = new RegExp(REGISTRY_DISPATCH_SRC, 'y');
2368
+ // `\bnew` can follow a `$` inside an identifier run, hence the extra `(?<!\w)` start.
2369
+ const REGISTRY_DISPATCH_RE = new RegExp(String.raw `(?:(?<!\w)|${REGISTRY_NAME_START})${REGISTRY_DISPATCH_SRC}`, 'g');
2370
+ const IDENT_RUN_CHAR = /[\w$]/;
2315
2371
  const REGISTRY_MIN_ENTRIES = 2;
2316
2372
  const REGISTRY_FANOUT_CAP = 40;
2317
2373
  const REGISTRY_CLASS_ENTRY = new Set(['execute', 'run', 'handle', 'perform', 'process', 'call', 'apply', 'dispatch']);
2318
2374
  const REGISTRY_JS_EXT = /\.(?:ts|tsx|js|jsx|mjs|cjs)$/;
2375
+ /** The first registry dispatch at or after `from`, exactly as a `g` scan of the unguarded
2376
+ * pattern resuming at `from` would find it. */
2377
+ function nextRegistryDispatch(src, from) {
2378
+ let at = from;
2379
+ if (at > 0 && at < src.length && IDENT_RUN_CHAR.test(src[at - 1]) && IDENT_RUN_CHAR.test(src[at])) {
2380
+ for (; at < src.length && IDENT_RUN_CHAR.test(src[at]); at++) {
2381
+ REGISTRY_DISPATCH_AT.lastIndex = at;
2382
+ const m = REGISTRY_DISPATCH_AT.exec(src);
2383
+ if (m)
2384
+ return m;
2385
+ }
2386
+ }
2387
+ REGISTRY_DISPATCH_RE.lastIndex = at;
2388
+ return REGISTRY_DISPATCH_RE.exec(src);
2389
+ }
2319
2390
  /** From the index of an opening `{`, return the brace-balanced body up to its matching `}`. */
2320
2391
  function braceBody(src, openIdx) {
2321
2392
  let depth = 0;
@@ -2404,13 +2475,12 @@ async function objectRegistryEdges(ctx, onYield) {
2404
2475
  const safe = (0, strip_comments_1.stripCommentsForRegex)(content, /\.(?:jsx?|mjs|cjs)$/.test(file) ? 'javascript' : 'typescript');
2405
2476
  // 1. Dispatch sites: `(new )?<ref>[<ident-key>]` followed by a call or a chained method.
2406
2477
  // A quoted-string key (`['save']`) does NOT match — that's a static access, not dispatch.
2407
- REGISTRY_DISPATCH_RE.lastIndex = 0;
2478
+ const lineOf = (0, synth_utils_1.makeLineAt)(safe, 1);
2408
2479
  const dispatches = [];
2409
- let dm;
2410
- while ((dm = REGISTRY_DISPATCH_RE.exec(safe))) {
2480
+ for (let dm = nextRegistryDispatch(safe, 0); dm; dm = nextRegistryDispatch(safe, dm.index + dm[0].length)) {
2411
2481
  const win = safe.slice(dm.index, dm.index + 160);
2412
2482
  const cm = /\]\s*\([^)]*\)\s*\.\s*([A-Za-z_$][\w$]*)/.exec(win) || /\]\s*\.\s*([A-Za-z_$][\w$]*)/.exec(win);
2413
- dispatches.push({ ref: dm[1], line: safe.slice(0, dm.index).split('\n').length, chained: cm ? cm[1] : null });
2483
+ dispatches.push({ ref: dm[1], line: lineOf(dm.index), chained: cm ? cm[1] : null });
2414
2484
  }
2415
2485
  if (!dispatches.length)
2416
2486
  continue;
@@ -2431,7 +2501,7 @@ async function objectRegistryEdges(ctx, onYield) {
2431
2501
  continue;
2432
2502
  const names = registryEntryNames(body); // depth-0 `key: Identifier` entries only
2433
2503
  if (names.length >= REGISTRY_MIN_ENTRIES) {
2434
- registries.set(lhs, { names, line: safe.slice(0, am.index).split('\n').length });
2504
+ registries.set(lhs, { names, line: lineOf(am.index) });
2435
2505
  }
2436
2506
  }
2437
2507
  if (!registries.size)
@@ -2442,7 +2512,7 @@ async function objectRegistryEdges(ctx, onYield) {
2442
2512
  const reg = registries.get(norm(d.ref));
2443
2513
  if (!reg)
2444
2514
  continue;
2445
- const disp = enclosingFn(nodesInFile, d.line);
2515
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, d.line);
2446
2516
  if (!disp)
2447
2517
  continue;
2448
2518
  let added = 0;
@@ -2601,7 +2671,7 @@ async function piniaStoreEdges(ctx, onYield) {
2601
2671
  continue;
2602
2672
  const method = cm[2];
2603
2673
  const line = safe.slice(0, cm.index).split('\n').length;
2604
- const disp = enclosingFn(nodesInFile, line) ?? fallbackDispatcher;
2674
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line) ?? fallbackDispatcher;
2605
2675
  if (!disp)
2606
2676
  continue;
2607
2677
  const target = ctx
@@ -2699,7 +2769,7 @@ async function vuexDispatchEdges(ctx, onYield) {
2699
2769
  while ((m = VUEX_DISPATCH_RE.exec(safe)) && added < VUEX_FANOUT_CAP) {
2700
2770
  const key = m[1];
2701
2771
  const line = safe.slice(0, m.index).split('\n').length;
2702
- const disp = enclosingFn(nodesInFile, line) ?? fallback;
2772
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line) ?? fallback;
2703
2773
  if (!disp)
2704
2774
  continue;
2705
2775
  const target = resolve(key, file);
@@ -2804,7 +2874,7 @@ async function celeryDispatchEdges(ctx, onYield) {
2804
2874
  while ((m = CELERY_DISPATCH_RE.exec(safe)) && added < CELERY_FANOUT_CAP) {
2805
2875
  const name = m[1];
2806
2876
  const line = safe.slice(0, m.index).split('\n').length;
2807
- const disp = enclosingFn(nodesInFile, line);
2877
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
2808
2878
  if (!disp)
2809
2879
  continue; // module-level dispatch — no source symbol to attribute
2810
2880
  const target = resolve(name, file);
@@ -2946,7 +3016,7 @@ async function springEventEdges(ctx, onYield) {
2946
3016
  if (!targets || !targets.length)
2947
3017
  continue;
2948
3018
  const line = safe.slice(0, m.index).split('\n').length;
2949
- const disp = enclosingFn(nodesInFile, line);
3019
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
2950
3020
  if (!disp)
2951
3021
  continue;
2952
3022
  for (const target of targets) {
@@ -3074,7 +3144,7 @@ async function mediatrDispatchEdges(ctx, onYield) {
3074
3144
  if (!MEDIATR_RECEIVER_RE.test(m[1]))
3075
3145
  continue; // not a mediator (MessagingCenter, HttpClient, …)
3076
3146
  const line = safe.slice(0, m.index).split('\n').length;
3077
- const disp = enclosingFn(nodesInFile, line);
3147
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
3078
3148
  if (!disp)
3079
3149
  continue;
3080
3150
  const type = resolveMediatrArgType(m[2], safeLines, disp.startLine, line);
@@ -3174,7 +3244,7 @@ async function sidekiqDispatchEdges(ctx, onYield) {
3174
3244
  let added = 0;
3175
3245
  while ((m = SIDEKIQ_DISPATCH_RE.exec(safe)) && added < SIDEKIQ_FANOUT_CAP) {
3176
3246
  const line = safe.slice(0, m.index).split('\n').length;
3177
- const disp = enclosingFn(nodesInFile, line);
3247
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
3178
3248
  if (!disp)
3179
3249
  continue;
3180
3250
  const target = resolve(m[1]);
@@ -3366,13 +3436,11 @@ async function nixOptionPathEdges(queries, onYield) {
3366
3436
  const byFile = new Map();
3367
3437
  let scanned = 0;
3368
3438
  for (const kind of ['variable', 'function']) {
3369
- for (const node of queries.iterateNodesByKind(kind)) {
3439
+ for (const node of queries.iterateNodesByKindIn(kind, ['nix'])) {
3370
3440
  if ((++scanned255 & 63) === 0)
3371
3441
  await onYield();
3372
3442
  if ((++scanned & 0x3fff) === 0 && onYield)
3373
3443
  await onYield();
3374
- if (node.language !== 'nix')
3375
- continue;
3376
3444
  const segs = nixLeadingPlainSegments(node.name);
3377
3445
  if (segs.length === 0)
3378
3446
  continue;
@@ -3397,7 +3465,7 @@ async function nixOptionPathEdges(queries, onYield) {
3397
3465
  // own namespace (`attrsOf (submodule { options = ...; })`) — its internals
3398
3466
  // are not globally addressable, so the sentinel blocks registration below it
3399
3467
  // while still excluding the region from write candidates.
3400
- const SUBMODULE = 'submodule';
3468
+ const SUBMODULE = '\u0000submodule';
3401
3469
  const decls = new Map();
3402
3470
  const writes = [];
3403
3471
  const register = (path, rec) => {
@@ -3487,11 +3555,10 @@ async function erlangBehaviourDispatchEdges(queries, ctx, onYield) {
3487
3555
  // Cheap language gate: no Erlang modules → no cost beyond one streamed
3488
3556
  // kind scan (never a materialized array of every namespace — #1212).
3489
3557
  const erlangModules = [];
3490
- for (const n of queries.iterateNodesByKind('namespace')) {
3558
+ for (const n of queries.iterateNodesByKindIn('namespace', ['erlang'])) {
3491
3559
  if ((++scanned255 & 63) === 0)
3492
3560
  await onYield();
3493
- if (n.language === 'erlang')
3494
- erlangModules.push(n);
3561
+ erlangModules.push(n);
3495
3562
  }
3496
3563
  if (erlangModules.length === 0)
3497
3564
  return [];
@@ -3602,7 +3669,7 @@ async function erlangBehaviourDispatchEdges(queries, ctx, onYield) {
3602
3669
  if (targets.length === 0 || targets.length > ERLANG_BEHAVIOUR_FANOUT_CAP)
3603
3670
  continue;
3604
3671
  const line = safe.slice(0, m.index).split('\n').length;
3605
- const disp = enclosingFn(nodesInFile, line);
3672
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
3606
3673
  if (!disp)
3607
3674
  continue;
3608
3675
  for (const target of targets) {
@@ -3757,7 +3824,7 @@ async function laravelEventEdges(ctx, onYield) {
3757
3824
  if (!targets)
3758
3825
  continue;
3759
3826
  const line = safe.slice(0, m.index).split('\n').length;
3760
- const disp = enclosingFn(nodesInFile, line);
3827
+ const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
3761
3828
  if (!disp)
3762
3829
  continue;
3763
3830
  for (const target of targets.values()) {
@@ -3781,27 +3848,43 @@ async function laravelEventEdges(ctx, onYield) {
3781
3848
  }
3782
3849
  return edges;
3783
3850
  }
3784
- /**
3785
- * Synthesize dispatcher→callback edges (field observers + EventEmitters +
3786
- * React re-render + JSX children + Vue templates + SvelteKit load + RN event
3787
- * channel + Fabric native-impl + MyBatis Java↔XML + Gin middleware chain +
3788
- * Redux-thunk dispatch chain + object-literal registry dispatch + RTK Query
3789
- * generated-hook → endpoint + Pinia useStore().action() + Vuex string dispatch +
3790
- * Celery task .delay()/.apply_async() → task body + Spring publishEvent → @EventListener +
3791
- * MediatR Send/Publish → IRequestHandler/INotificationHandler +
3792
- * Sidekiq Worker.perform_async → #perform + Laravel event(new X) → listener handle).
3793
- * Returns the count added. Never throws into indexing — callers wrap in try/catch.
3794
- */
3795
- /**
3796
- * Number of progress steps synthesizeCallbackEdges reports: one per `__mark()`
3797
- * call (every synthesis pass, plus the dedupe-merge and edge-insert steps).
3798
- * Cosmetic only — drift just makes the progress bar end early or jump — and a
3799
- * test pins it to the actual step count (registry passes + the fixed
3800
- * pre/post marks) so adding a pass without bumping this fails loudly instead
3801
- * of silently skewing the bar.
3802
- */
3803
- const JS_FAMILY = ['typescript', 'javascript', 'tsx', 'jsx'];
3804
3851
  const ALWAYS = () => true;
3852
+ /** Conservative input gates for SYNTH_PASSES; keep these in sync when adding a pass. */
3853
+ function hasSynthesisPattern(filePath, content) {
3854
+ // These passes consume declarations/layouts as well as dispatch sites. A
3855
+ // header or markup edit can change a channel whose endpoints live elsewhere.
3856
+ if (/\.(?:vue|svelte|dfm|fmx|nix|xml)$/.test(filePath))
3857
+ return true;
3858
+ if (/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx|cppm|ipp|inl|tcc|def|inc|tbl)$/i.test(filePath) &&
3859
+ /\b(?:struct|union|typedef|virtual|override)\b|#\s*(?:include|define|if)|=|->|\[/.test(content))
3860
+ return true;
3861
+ if (/\b(?:class|interface|protocol|trait|impl|extends|implements|expect|actual)\b/.test(content))
3862
+ return true;
3863
+ if (/\.go$/.test(filePath) && /\b(?:struct|interface)\b|\bfunc\s*\(/.test(content))
3864
+ return true;
3865
+ if ((0, tier_synthesizer_1.hasCrossTierPattern)(content))
3866
+ return true;
3867
+ if (/\b(?:render|build|setState|defineStore|createStore|createApi|Store|href|sendEvent|sendEventWithName)\b|<\/|\/>/.test(content))
3868
+ return true;
3869
+ if (/\.(?:forEach|append|add|push|insert|fire|dispatchEvent|addListener|Use|GET|POST|PUT|PATCH|DELETE|OPTIONS|HEAD|Any|Handle)\s*\(/.test(content))
3870
+ return true;
3871
+ if (/[\w$]\s*\[\s*[A-Za-z_$]/.test(content) || /\b(?:dispatch|commit)\s*\(/.test(content))
3872
+ return true;
3873
+ const patterns = [THUNK_DECL_RE, CELERY_TASK_DECORATOR_RE, CELERY_DISPATCH_RE,
3874
+ SPRING_LISTENER_ANNO_RE, SPRING_APP_LISTENER_RE, SPRING_PUBLISH_RE,
3875
+ MEDIATR_HANDLER_BASE_RE, MEDIATR_DISPATCH_RE, SIDEKIQ_WORKER_RE, SIDEKIQ_DISPATCH_RE,
3876
+ ERLANG_CALLBACK_DECL_RE, ERLANG_DISPATCH_RE, LARAVEL_DISPATCH_RE, ARKUI_EMITTER_CALL_RE,
3877
+ ARKUI_ROUTER_RE];
3878
+ for (const re of patterns) {
3879
+ re.lastIndex = 0;
3880
+ const matches = re.test(content);
3881
+ re.lastIndex = 0;
3882
+ if (matches)
3883
+ return true;
3884
+ }
3885
+ // Field-backed observers use method-name gates rather than fixed call names.
3886
+ return (content.match(/[A-Za-z_$][\w$]*/g) ?? []).some((name) => REGISTRAR_NAME.test(name) || DISPATCHER_NAME.test(name));
3887
+ }
3805
3888
  /**
3806
3889
  * The independent passes, in MERGE ORDER — the first-seen dedup in
3807
3890
  * synthesizeCallbackEdges follows this array, so reordering entries changes
@@ -3812,6 +3895,11 @@ const ALWAYS = () => true;
3812
3895
  exports.SYNTH_PASSES = [
3813
3896
  { name: 'fieldEdges', gate: ALWAYS, run: (q, c, y) => fieldChannelEdges(q, c, y) },
3814
3897
  { name: 'closureCollEdges', gate: ALWAYS, run: (q, c, y) => closureCollectionEdges(q, c, y) },
3898
+ // Cross-tier channels — a client's `fetch('/api/x')` onto its own route,
3899
+ // a queue job onto its consumer, a bus / socket event onto its handler.
3900
+ // Before the in-process emitter pass: the same (source, target) pair
3901
+ // keeps the more specific edge — the one that says which tier it crosses.
3902
+ { name: 'tierEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, tier_synthesizer_1.crossTierEdges)(c, y) },
3815
3903
  { name: 'emitterEdges', gate: ALWAYS, run: (_q, c, y) => eventEmitterEdges(c, y) },
3816
3904
  { name: 'renderEdges', gate: ALWAYS, run: (q, c, y) => reactRenderEdges(q, c, y) },
3817
3905
  { name: 'jsxEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => reactJsxChildEdges(c, y) },
@@ -3868,8 +3956,31 @@ exports.SYNTH_PASSES = [
3868
3956
  run: (q, c, y, sub) => (0, c_fnptr_synthesizer_1.cFnPointerDispatchEdges)(q, c, y, sub),
3869
3957
  },
3870
3958
  { name: 'goframeEdges', gate: (has) => has('go'), run: (_q, c, y) => (0, goframe_synthesizer_1.goframeRouteEdges)(c, y) },
3959
+ // `router.push(await helper())` — the helper's return literals are the screens.
3960
+ { name: 'expoRouterReturnEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, expo_router_synthesizer_1.expoRouterReturnEdges)(c, y) },
3961
+ // `<Link href="/x">` / an internal `<a href>` — markup, not a call; the component navigates.
3962
+ { name: 'nextLinkEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, next_router_synthesizer_1.nextLinkEdges)(c, y) },
3963
+ { name: 'reactRouterLinkEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, react_router_synthesizer_1.reactRouterLinkEdges)(c, y) },
3964
+ { name: 'tanstackLinkEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, tanstack_router_synthesizer_1.tanstackLinkEdges)(c, y) },
3965
+ { name: 'vueRouterLinkEdges', gate: (has) => has('vue', ...JS_FAMILY), run: (_q, c, y) => (0, vue_router_synthesizer_1.vueRouterLinkEdges)(c, y) },
3966
+ { name: 'svelteKitPageEdges', gate: (has) => has('svelte'), run: (_q, c, y) => (0, sveltekit_synthesizer_1.svelteKitPageComponentEdges)(c, y) },
3967
+ { name: 'svelteKitLinkEdges', gate: (has) => has('svelte'), run: (_q, c, y) => (0, sveltekit_synthesizer_1.svelteKitLinkEdges)(c, y) },
3871
3968
  { name: 'nixOptionEdges', gate: (has) => has('nix'), run: (q, _c, y) => nixOptionPathEdges(q, y) },
3872
3969
  ];
3970
+ /**
3971
+ * Rough relative cost of the passes that run longest on large repos. Only
3972
+ * the pooled dispatch ORDER reads it — heaviest first, so the longest passes
3973
+ * start before the short ones fill the workers; unlisted passes keep registry
3974
+ * order after these. A wrong hint costs wall time, never edges.
3975
+ */
3976
+ const SYNTH_PASS_COST_HINT = {
3977
+ cFnPtrEdges: 100, registryEdges: 60, tierEdges: 55, jsxEdges: 25, rnEventEdgesList: 24,
3978
+ ifaceEdges: 18, flutterEdges: 16, cppEdges: 15, emitterEdges: 12, fieldEdges: 11,
3979
+ mybatisEdges: 10, vuexEdges: 8, closureCollEdges: 6, piniaEdges: 5, renderEdges: 4,
3980
+ };
3981
+ function synthPassCostHint(name) {
3982
+ return SYNTH_PASS_COST_HINT[name] ?? 0;
3983
+ }
3873
3984
  /** Fixed non-registry steps: goMethodContains, goImplements, dedupe-merge, insertMergedEdges. */
3874
3985
  const FIXED_SYNTH_STEPS = 4;
3875
3986
  exports.SYNTH_PROGRESS_STEPS = exports.SYNTH_PASSES.length + FIXED_SYNTH_STEPS;
@@ -3881,7 +3992,10 @@ pool,
3881
3992
  // WAL-valve writer backstop (WalCheckpointValve.backpressure), called at
3882
3993
  // pool-idle points in the edge-insert loops below — the passes themselves
3883
3994
  // only read; every write in this function happens with the pool idle.
3884
- backpressure) {
3995
+ backpressure,
3996
+ // Main-thread work to run while the pool computes the passes (the main
3997
+ // thread otherwise only waits there) — e.g. building a deferred index.
3998
+ whilePoolBusy) {
3885
3999
  // Each sub-pass below is a whole-graph scan, and there are ~30 of them, all
3886
4000
  // running synchronously on the indexer's main thread. Their AGGREGATE can run
3887
4001
  // for well over a minute on a large repo — long enough for the #850 liveness
@@ -4007,8 +4121,23 @@ backpressure) {
4007
4121
  // synthesized edges; the index still completes.
4008
4122
  const MAIN_RETRY_MAX_NODES = 1_500_000;
4009
4123
  const graphNodes = queries.getNodeAndEdgeCount().nodes;
4124
+ // Files whose text could feed a pass (inputs that produce NO edges included,
4125
+ // e.g. an over-cap channel: deleting one may make the full pass viable). It
4126
+ // depends only on the files, so with a pool the main thread reads them while
4127
+ // the workers run the passes instead of after.
4128
+ const collectInputs = async () => {
4129
+ const found = [];
4130
+ for (const file of ctx.getAllFiles()) {
4131
+ const content = ctx.readFile(file);
4132
+ if (content !== null && hasSynthesisPattern(file, content))
4133
+ found.push(file);
4134
+ await yieldToLoop();
4135
+ }
4136
+ return found;
4137
+ };
4138
+ let inputs = null;
4010
4139
  if (pool && gatedIn.length > 1) {
4011
- await Promise.all(gatedIn.map(async (i) => {
4140
+ const runPooled = async (i) => {
4012
4141
  const pass = exports.SYNTH_PASSES[i];
4013
4142
  try {
4014
4143
  const out = await pool.runSynthPass(pass.name);
@@ -4027,7 +4156,25 @@ backpressure) {
4027
4156
  // mismatch): retry this one pass on the main thread.
4028
4157
  await runPassOnMain(i);
4029
4158
  }
4030
- }));
4159
+ };
4160
+ // One pass per worker at a time, heaviest first. Handing every pass out
4161
+ // at once split them by count, and a worker interleaves what it holds, so
4162
+ // a heavy pass finished only with its worker's whole share: on vscode the
4163
+ // 6s registry pass ended ~16s in. Pulling keeps workers busy until the
4164
+ // queue drains. Edges merge by registry index below, so order is free.
4165
+ const lanes = Math.min(pool.size ?? gatedIn.length, gatedIn.length);
4166
+ const queue = [...gatedIn].sort((a, b) => synthPassCostHint(exports.SYNTH_PASSES[b].name) - synthPassCostHint(exports.SYNTH_PASSES[a].name) || a - b);
4167
+ const lane = async () => {
4168
+ for (let i = queue.shift(); i !== undefined; i = queue.shift())
4169
+ await runPooled(i);
4170
+ };
4171
+ const fanOut = Promise.all(Array.from({ length: lanes }, lane));
4172
+ // Observed now, awaited below: a rejection while the scan runs must not
4173
+ // surface as an unhandled one.
4174
+ fanOut.catch(() => undefined);
4175
+ whilePoolBusy?.();
4176
+ inputs = await collectInputs();
4177
+ await fanOut;
4031
4178
  }
4032
4179
  else {
4033
4180
  for (const i of gatedIn) {
@@ -4052,6 +4199,7 @@ backpressure) {
4052
4199
  await yieldToLoop();
4053
4200
  await foldIfOver();
4054
4201
  }
4202
+ queries.replaceSynthesisInputs(inputs ?? await collectInputs());
4055
4203
  __mark('insertMergedEdges');
4056
4204
  return merged.length + goImpl.length + goMethodContains.length;
4057
4205
  }