@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.3

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 (1036) hide show
  1. package/bin/codegraph +1 -1
  2. package/bin/codegraph.cmd +1 -1
  3. package/lib/dist/.test-build-engine.json +1 -1
  4. package/lib/dist/.test-build-viewer.json +1 -1
  5. package/lib/dist/bin/codegraph.d.ts +3 -0
  6. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  7. package/lib/dist/bin/codegraph.js +425 -688
  8. package/lib/dist/bin/codegraph.js.map +1 -1
  9. package/lib/dist/bin/command-supervision.js +1 -57
  10. package/lib/dist/bin/command-supervision.js.map +1 -1
  11. package/lib/dist/bin/fatal-handler.js +0 -46
  12. package/lib/dist/bin/fatal-handler.js.map +1 -1
  13. package/lib/dist/bin/node-version-check.js +0 -33
  14. package/lib/dist/bin/node-version-check.js.map +1 -1
  15. package/lib/dist/bin/uninstall.js +0 -19
  16. package/lib/dist/bin/uninstall.js.map +1 -1
  17. package/lib/dist/bin/viewer-gate.js +0 -14
  18. package/lib/dist/bin/viewer-gate.js.map +1 -1
  19. package/lib/dist/compile-cache.d.ts +2 -0
  20. package/lib/dist/compile-cache.d.ts.map +1 -0
  21. package/lib/dist/compile-cache.js +45 -0
  22. package/lib/dist/compile-cache.js.map +1 -0
  23. package/lib/dist/context/formatter.js +3 -66
  24. package/lib/dist/context/formatter.js.map +1 -1
  25. package/lib/dist/context/index.d.ts +44 -1
  26. package/lib/dist/context/index.d.ts.map +1 -1
  27. package/lib/dist/context/index.js +123 -430
  28. package/lib/dist/context/index.js.map +1 -1
  29. package/lib/dist/context/markers.js +0 -17
  30. package/lib/dist/context/markers.js.map +1 -1
  31. package/lib/dist/db/index.d.ts +44 -1
  32. package/lib/dist/db/index.d.ts.map +1 -1
  33. package/lib/dist/db/index.js +123 -395
  34. package/lib/dist/db/index.js.map +1 -1
  35. package/lib/dist/db/migrations.d.ts +11 -1
  36. package/lib/dist/db/migrations.d.ts.map +1 -1
  37. package/lib/dist/db/migrations.js +71 -79
  38. package/lib/dist/db/migrations.js.map +1 -1
  39. package/lib/dist/db/name-substring-index.d.ts +63 -0
  40. package/lib/dist/db/name-substring-index.d.ts.map +1 -0
  41. package/lib/dist/db/name-substring-index.js +151 -0
  42. package/lib/dist/db/name-substring-index.js.map +1 -0
  43. package/lib/dist/db/node-sqlite.d.ts +19 -0
  44. package/lib/dist/db/node-sqlite.d.ts.map +1 -0
  45. package/lib/dist/db/node-sqlite.js +23 -0
  46. package/lib/dist/db/node-sqlite.js.map +1 -0
  47. package/lib/dist/db/open-error.d.ts +36 -0
  48. package/lib/dist/db/open-error.d.ts.map +1 -0
  49. package/lib/dist/db/open-error.js +63 -0
  50. package/lib/dist/db/open-error.js.map +1 -0
  51. package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
  52. package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
  53. package/lib/dist/db/parameter-flow-queries.js +168 -0
  54. package/lib/dist/db/parameter-flow-queries.js.map +1 -0
  55. package/lib/dist/db/queries.d.ts +610 -33
  56. package/lib/dist/db/queries.d.ts.map +1 -1
  57. package/lib/dist/db/queries.js +1345 -1419
  58. package/lib/dist/db/queries.js.map +1 -1
  59. package/lib/dist/db/reference-tail.d.ts +83 -0
  60. package/lib/dist/db/reference-tail.d.ts.map +1 -0
  61. package/lib/dist/db/reference-tail.js +68 -0
  62. package/lib/dist/db/reference-tail.js.map +1 -0
  63. package/lib/dist/db/schema.sql +18 -2
  64. package/lib/dist/db/sqlite-adapter.d.ts +18 -1
  65. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  66. package/lib/dist/db/sqlite-adapter.js +12 -62
  67. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  68. package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
  69. package/lib/dist/db/synthesis-stage.js +2 -6
  70. package/lib/dist/db/synthesis-stage.js.map +1 -1
  71. package/lib/dist/db/wal-valve.js +1 -153
  72. package/lib/dist/db/wal-valve.js.map +1 -1
  73. package/lib/dist/db/wsl-shared-index.js +0 -37
  74. package/lib/dist/db/wsl-shared-index.js.map +1 -1
  75. package/lib/dist/directory.d.ts +51 -0
  76. package/lib/dist/directory.d.ts.map +1 -1
  77. package/lib/dist/directory.js +76 -530
  78. package/lib/dist/directory.js.map +1 -1
  79. package/lib/dist/engine.d.ts +15 -0
  80. package/lib/dist/engine.d.ts.map +1 -0
  81. package/lib/dist/engine.js +34 -0
  82. package/lib/dist/engine.js.map +1 -0
  83. package/lib/dist/errors.d.ts +10 -0
  84. package/lib/dist/errors.d.ts.map +1 -1
  85. package/lib/dist/errors.js +8 -101
  86. package/lib/dist/errors.js.map +1 -1
  87. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
  88. package/lib/dist/extraction/astro-extractor.js +11 -101
  89. package/lib/dist/extraction/astro-extractor.js.map +1 -1
  90. package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
  91. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  92. package/lib/dist/extraction/cfml-extractor.js +66 -204
  93. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  94. package/lib/dist/extraction/commonjs-requires.js +0 -31
  95. package/lib/dist/extraction/commonjs-requires.js.map +1 -1
  96. package/lib/dist/extraction/dfm-extractor.js +0 -21
  97. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  98. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  99. package/lib/dist/extraction/extraction-version.js +1 -24
  100. package/lib/dist/extraction/extraction-version.js.map +1 -1
  101. package/lib/dist/extraction/function-ref.d.ts +40 -0
  102. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  103. package/lib/dist/extraction/function-ref.js +145 -206
  104. package/lib/dist/extraction/function-ref.js.map +1 -1
  105. package/lib/dist/extraction/generated-detection.js +0 -165
  106. package/lib/dist/extraction/generated-detection.js.map +1 -1
  107. package/lib/dist/extraction/grammars.d.ts +45 -4
  108. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  109. package/lib/dist/extraction/grammars.js +53 -430
  110. package/lib/dist/extraction/grammars.js.map +1 -1
  111. package/lib/dist/extraction/index.d.ts +197 -7
  112. package/lib/dist/extraction/index.d.ts.map +1 -1
  113. package/lib/dist/extraction/index.js +554 -1382
  114. package/lib/dist/extraction/index.js.map +1 -1
  115. package/lib/dist/extraction/kernel/decode.js +0 -16
  116. package/lib/dist/extraction/kernel/decode.js.map +1 -1
  117. package/lib/dist/extraction/kernel/index.d.ts +3 -1
  118. package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
  119. package/lib/dist/extraction/kernel/index.js +25 -133
  120. package/lib/dist/extraction/kernel/index.js.map +1 -1
  121. package/lib/dist/extraction/kernel/layout.js +42 -76
  122. package/lib/dist/extraction/kernel/layout.js.map +1 -1
  123. package/lib/dist/extraction/kernel/loader.js +0 -37
  124. package/lib/dist/extraction/kernel/loader.js.map +1 -1
  125. package/lib/dist/extraction/languages/arkts.js +0 -59
  126. package/lib/dist/extraction/languages/arkts.js.map +1 -1
  127. package/lib/dist/extraction/languages/c-cpp.d.ts +125 -28
  128. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  129. package/lib/dist/extraction/languages/c-cpp.js +789 -856
  130. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  131. package/lib/dist/extraction/languages/cfquery.js +0 -9
  132. package/lib/dist/extraction/languages/cfquery.js.map +1 -1
  133. package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
  134. package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
  135. package/lib/dist/extraction/languages/cfscript.js +80 -9
  136. package/lib/dist/extraction/languages/cfscript.js.map +1 -1
  137. package/lib/dist/extraction/languages/cobol.js +0 -114
  138. package/lib/dist/extraction/languages/cobol.js.map +1 -1
  139. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
  140. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
  141. package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
  142. package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
  143. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
  144. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
  145. package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
  146. package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
  147. package/lib/dist/extraction/languages/csharp.js +3 -55
  148. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  149. package/lib/dist/extraction/languages/dart.d.ts +84 -0
  150. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  151. package/lib/dist/extraction/languages/dart.js +329 -161
  152. package/lib/dist/extraction/languages/dart.js.map +1 -1
  153. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  154. package/lib/dist/extraction/languages/erlang.js +15 -102
  155. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  156. package/lib/dist/extraction/languages/go.d.ts +48 -0
  157. package/lib/dist/extraction/languages/go.d.ts.map +1 -1
  158. package/lib/dist/extraction/languages/go.js +102 -31
  159. package/lib/dist/extraction/languages/go.js.map +1 -1
  160. package/lib/dist/extraction/languages/index.js +0 -6
  161. package/lib/dist/extraction/languages/index.js.map +1 -1
  162. package/lib/dist/extraction/languages/java.d.ts.map +1 -1
  163. package/lib/dist/extraction/languages/java.js +67 -78
  164. package/lib/dist/extraction/languages/java.js.map +1 -1
  165. package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
  166. package/lib/dist/extraction/languages/javascript.js +2 -12
  167. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  168. package/lib/dist/extraction/languages/kotlin.d.ts +11 -0
  169. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  170. package/lib/dist/extraction/languages/kotlin.js +35 -184
  171. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  172. package/lib/dist/extraction/languages/lua.js +2 -39
  173. package/lib/dist/extraction/languages/lua.js.map +1 -1
  174. package/lib/dist/extraction/languages/luau.js +0 -14
  175. package/lib/dist/extraction/languages/luau.js.map +1 -1
  176. package/lib/dist/extraction/languages/nix.js +0 -16
  177. package/lib/dist/extraction/languages/nix.js.map +1 -1
  178. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  179. package/lib/dist/extraction/languages/objc.js +5 -16
  180. package/lib/dist/extraction/languages/objc.js.map +1 -1
  181. package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
  182. package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
  183. package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
  184. package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
  185. package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
  186. package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
  187. package/lib/dist/extraction/languages/pascal-system.js +23 -0
  188. package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
  189. package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
  190. package/lib/dist/extraction/languages/pascal.js +3 -4
  191. package/lib/dist/extraction/languages/pascal.js.map +1 -1
  192. package/lib/dist/extraction/languages/php.js +5 -42
  193. package/lib/dist/extraction/languages/php.js.map +1 -1
  194. package/lib/dist/extraction/languages/python.js +2 -20
  195. package/lib/dist/extraction/languages/python.js.map +1 -1
  196. package/lib/dist/extraction/languages/r.js +8 -78
  197. package/lib/dist/extraction/languages/r.js.map +1 -1
  198. package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
  199. package/lib/dist/extraction/languages/ruby.js +17 -25
  200. package/lib/dist/extraction/languages/ruby.js.map +1 -1
  201. package/lib/dist/extraction/languages/rust.d.ts +10 -0
  202. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  203. package/lib/dist/extraction/languages/rust.js +15 -47
  204. package/lib/dist/extraction/languages/rust.js.map +1 -1
  205. package/lib/dist/extraction/languages/scala.js +5 -41
  206. package/lib/dist/extraction/languages/scala.js.map +1 -1
  207. package/lib/dist/extraction/languages/solidity.js +1 -82
  208. package/lib/dist/extraction/languages/solidity.js.map +1 -1
  209. package/lib/dist/extraction/languages/swift.js +3 -47
  210. package/lib/dist/extraction/languages/swift.js.map +1 -1
  211. package/lib/dist/extraction/languages/terraform.js +6 -152
  212. package/lib/dist/extraction/languages/terraform.js.map +1 -1
  213. package/lib/dist/extraction/languages/typescript.d.ts +64 -0
  214. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  215. package/lib/dist/extraction/languages/typescript.js +73 -49
  216. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  217. package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
  218. package/lib/dist/extraction/languages/vbnet.js +9 -42
  219. package/lib/dist/extraction/languages/vbnet.js.map +1 -1
  220. package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
  221. package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
  222. package/lib/dist/extraction/lazy-frameworks.js +8 -0
  223. package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
  224. package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
  225. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  226. package/lib/dist/extraction/liquid-extractor.js +89 -148
  227. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  228. package/lib/dist/extraction/mybatis-extractor.js +0 -78
  229. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  230. package/lib/dist/extraction/parse-budget.js +0 -13
  231. package/lib/dist/extraction/parse-budget.js.map +1 -1
  232. package/lib/dist/extraction/parse-pool.d.ts +29 -5
  233. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  234. package/lib/dist/extraction/parse-pool.js +42 -174
  235. package/lib/dist/extraction/parse-pool.js.map +1 -1
  236. package/lib/dist/extraction/parse-worker.d.ts +1 -1
  237. package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
  238. package/lib/dist/extraction/parse-worker.js +5 -58
  239. package/lib/dist/extraction/parse-worker.js.map +1 -1
  240. package/lib/dist/extraction/razor-extractor.d.ts +9 -0
  241. package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
  242. package/lib/dist/extraction/razor-extractor.js +45 -69
  243. package/lib/dist/extraction/razor-extractor.js.map +1 -1
  244. package/lib/dist/extraction/razor-script.d.ts +23 -0
  245. package/lib/dist/extraction/razor-script.d.ts.map +1 -0
  246. package/lib/dist/extraction/razor-script.js +244 -0
  247. package/lib/dist/extraction/razor-script.js.map +1 -0
  248. package/lib/dist/extraction/sfc-script.d.ts +42 -0
  249. package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
  250. package/lib/dist/extraction/sfc-script.js +32 -31
  251. package/lib/dist/extraction/sfc-script.js.map +1 -1
  252. package/lib/dist/extraction/store-worker.d.ts +1 -1
  253. package/lib/dist/extraction/store-worker.d.ts.map +1 -1
  254. package/lib/dist/extraction/store-worker.js +1 -38
  255. package/lib/dist/extraction/store-worker.js.map +1 -1
  256. package/lib/dist/extraction/store-writer.js +2 -34
  257. package/lib/dist/extraction/store-writer.js.map +1 -1
  258. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
  259. package/lib/dist/extraction/svelte-extractor.js +11 -87
  260. package/lib/dist/extraction/svelte-extractor.js.map +1 -1
  261. package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
  262. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
  263. package/lib/dist/extraction/syntax-tokens.js +4 -152
  264. package/lib/dist/extraction/syntax-tokens.js.map +1 -1
  265. package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
  266. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  267. package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
  268. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  269. package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
  270. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  271. package/lib/dist/extraction/tree-sitter-types.js +0 -7
  272. package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
  273. package/lib/dist/extraction/tree-sitter.d.ts +447 -9
  274. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  275. package/lib/dist/extraction/tree-sitter.js +1908 -2544
  276. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  277. package/lib/dist/extraction/vue-extractor.d.ts +13 -0
  278. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
  279. package/lib/dist/extraction/vue-extractor.js +52 -92
  280. package/lib/dist/extraction/vue-extractor.js.map +1 -1
  281. package/lib/dist/extraction/vue-options-api.js +0 -32
  282. package/lib/dist/extraction/vue-options-api.js.map +1 -1
  283. package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
  284. package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
  285. package/lib/dist/extraction/vue-template-calls.js +497 -0
  286. package/lib/dist/extraction/vue-template-calls.js.map +1 -0
  287. package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  288. package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
  289. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  290. package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
  291. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
  292. package/lib/dist/file-limits.d.ts +8 -0
  293. package/lib/dist/file-limits.d.ts.map +1 -1
  294. package/lib/dist/file-limits.js +13 -28
  295. package/lib/dist/file-limits.js.map +1 -1
  296. package/lib/dist/graph/branch-guards.d.ts.map +1 -1
  297. package/lib/dist/graph/branch-guards.js +4 -251
  298. package/lib/dist/graph/branch-guards.js.map +1 -1
  299. package/lib/dist/graph/call-sites.d.ts +12 -0
  300. package/lib/dist/graph/call-sites.d.ts.map +1 -0
  301. package/lib/dist/graph/call-sites.js +17 -0
  302. package/lib/dist/graph/call-sites.js.map +1 -0
  303. package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
  304. package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
  305. package/lib/dist/graph/cobol-copybooks.js +45 -0
  306. package/lib/dist/graph/cobol-copybooks.js.map +1 -0
  307. package/lib/dist/graph/dead-code.d.ts +26 -4
  308. package/lib/dist/graph/dead-code.d.ts.map +1 -1
  309. package/lib/dist/graph/dead-code.js +157 -311
  310. package/lib/dist/graph/dead-code.js.map +1 -1
  311. package/lib/dist/graph/dynamic-boundary-report.js +1 -88
  312. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
  313. package/lib/dist/graph/file-cycles.d.ts +20 -0
  314. package/lib/dist/graph/file-cycles.d.ts.map +1 -0
  315. package/lib/dist/graph/file-cycles.js +79 -0
  316. package/lib/dist/graph/file-cycles.js.map +1 -0
  317. package/lib/dist/graph/go-package.d.ts +27 -0
  318. package/lib/dist/graph/go-package.d.ts.map +1 -0
  319. package/lib/dist/graph/go-package.js +49 -0
  320. package/lib/dist/graph/go-package.js.map +1 -0
  321. package/lib/dist/graph/index.d.ts +2 -0
  322. package/lib/dist/graph/index.d.ts.map +1 -1
  323. package/lib/dist/graph/index.js +4 -6
  324. package/lib/dist/graph/index.js.map +1 -1
  325. package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
  326. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
  327. package/lib/dist/graph/named-symbol-flow.js +82 -223
  328. package/lib/dist/graph/named-symbol-flow.js.map +1 -1
  329. package/lib/dist/graph/owning-package.d.ts +59 -0
  330. package/lib/dist/graph/owning-package.d.ts.map +1 -0
  331. package/lib/dist/graph/owning-package.js +120 -0
  332. package/lib/dist/graph/owning-package.js.map +1 -0
  333. package/lib/dist/graph/queries.d.ts +2 -2
  334. package/lib/dist/graph/queries.d.ts.map +1 -1
  335. package/lib/dist/graph/queries.js +2 -135
  336. package/lib/dist/graph/queries.js.map +1 -1
  337. package/lib/dist/graph/symbol-lookup.d.ts +15 -3
  338. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
  339. package/lib/dist/graph/symbol-lookup.js +47 -89
  340. package/lib/dist/graph/symbol-lookup.js.map +1 -1
  341. package/lib/dist/graph/synthesized-hop.d.ts +37 -0
  342. package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
  343. package/lib/dist/graph/synthesized-hop.js +62 -0
  344. package/lib/dist/graph/synthesized-hop.js.map +1 -0
  345. package/lib/dist/graph/test-code.d.ts +21 -0
  346. package/lib/dist/graph/test-code.d.ts.map +1 -0
  347. package/lib/dist/graph/test-code.js +50 -0
  348. package/lib/dist/graph/test-code.js.map +1 -0
  349. package/lib/dist/graph/traversal.d.ts +31 -2
  350. package/lib/dist/graph/traversal.d.ts.map +1 -1
  351. package/lib/dist/graph/traversal.js +98 -226
  352. package/lib/dist/graph/traversal.js.map +1 -1
  353. package/lib/dist/graph/type-hierarchy.js +0 -138
  354. package/lib/dist/graph/type-hierarchy.js.map +1 -1
  355. package/lib/dist/index.d.ts +190 -25
  356. package/lib/dist/index.d.ts.map +1 -1
  357. package/lib/dist/index.js +694 -1109
  358. package/lib/dist/index.js.map +1 -1
  359. package/lib/dist/installer/beta-signup.js +0 -39
  360. package/lib/dist/installer/beta-signup.js.map +1 -1
  361. package/lib/dist/installer/config-writer.js +0 -24
  362. package/lib/dist/installer/config-writer.js.map +1 -1
  363. package/lib/dist/installer/index.d.ts +9 -5
  364. package/lib/dist/installer/index.d.ts.map +1 -1
  365. package/lib/dist/installer/index.js +25 -159
  366. package/lib/dist/installer/index.js.map +1 -1
  367. package/lib/dist/installer/instructions-template.d.ts +1 -1
  368. package/lib/dist/installer/instructions-template.js +0 -37
  369. package/lib/dist/installer/instructions-template.js.map +1 -1
  370. package/lib/dist/installer/targets/antigravity.js +0 -113
  371. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  372. package/lib/dist/installer/targets/bob.d.ts +20 -0
  373. package/lib/dist/installer/targets/bob.d.ts.map +1 -0
  374. package/lib/dist/installer/targets/bob.js +83 -0
  375. package/lib/dist/installer/targets/bob.js.map +1 -0
  376. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  377. package/lib/dist/installer/targets/claude.js +1 -185
  378. package/lib/dist/installer/targets/claude.js.map +1 -1
  379. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  380. package/lib/dist/installer/targets/codex.js +17 -109
  381. package/lib/dist/installer/targets/codex.js.map +1 -1
  382. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  383. package/lib/dist/installer/targets/copilot-cli.js +2 -54
  384. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  385. package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
  386. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
  387. package/lib/dist/installer/targets/copilot-vscode.js +0 -58
  388. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
  389. package/lib/dist/installer/targets/cursor.js +7 -88
  390. package/lib/dist/installer/targets/cursor.js.map +1 -1
  391. package/lib/dist/installer/targets/droid.d.ts +18 -0
  392. package/lib/dist/installer/targets/droid.d.ts.map +1 -0
  393. package/lib/dist/installer/targets/droid.js +92 -0
  394. package/lib/dist/installer/targets/droid.js.map +1 -0
  395. package/lib/dist/installer/targets/dsh.d.ts +35 -0
  396. package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
  397. package/lib/dist/installer/targets/dsh.js +267 -0
  398. package/lib/dist/installer/targets/dsh.js.map +1 -0
  399. package/lib/dist/installer/targets/gemini.js +0 -37
  400. package/lib/dist/installer/targets/gemini.js.map +1 -1
  401. package/lib/dist/installer/targets/grok.d.ts +25 -0
  402. package/lib/dist/installer/targets/grok.d.ts.map +1 -0
  403. package/lib/dist/installer/targets/grok.js +96 -0
  404. package/lib/dist/installer/targets/grok.js.map +1 -0
  405. package/lib/dist/installer/targets/hermes.d.ts +19 -7
  406. package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
  407. package/lib/dist/installer/targets/hermes.js +218 -214
  408. package/lib/dist/installer/targets/hermes.js.map +1 -1
  409. package/lib/dist/installer/targets/json-config.d.ts +45 -0
  410. package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
  411. package/lib/dist/installer/targets/json-config.js +128 -0
  412. package/lib/dist/installer/targets/json-config.js.map +1 -0
  413. package/lib/dist/installer/targets/kimi.d.ts +21 -0
  414. package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
  415. package/lib/dist/installer/targets/kimi.js +97 -0
  416. package/lib/dist/installer/targets/kimi.js.map +1 -0
  417. package/lib/dist/installer/targets/kiro.js +1 -41
  418. package/lib/dist/installer/targets/kiro.js.map +1 -1
  419. package/lib/dist/installer/targets/opencode.js +0 -102
  420. package/lib/dist/installer/targets/opencode.js.map +1 -1
  421. package/lib/dist/installer/targets/pi.d.ts +24 -0
  422. package/lib/dist/installer/targets/pi.d.ts.map +1 -0
  423. package/lib/dist/installer/targets/pi.js +100 -0
  424. package/lib/dist/installer/targets/pi.js.map +1 -0
  425. package/lib/dist/installer/targets/qoder.d.ts +23 -0
  426. package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
  427. package/lib/dist/installer/targets/qoder.js +83 -0
  428. package/lib/dist/installer/targets/qoder.js.map +1 -0
  429. package/lib/dist/installer/targets/qwen.d.ts +21 -0
  430. package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
  431. package/lib/dist/installer/targets/qwen.js +115 -0
  432. package/lib/dist/installer/targets/qwen.js.map +1 -0
  433. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  434. package/lib/dist/installer/targets/registry.js +18 -25
  435. package/lib/dist/installer/targets/registry.js.map +1 -1
  436. package/lib/dist/installer/targets/shared.d.ts +81 -11
  437. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  438. package/lib/dist/installer/targets/shared.js +183 -129
  439. package/lib/dist/installer/targets/shared.js.map +1 -1
  440. package/lib/dist/installer/targets/toml.d.ts +82 -6
  441. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  442. package/lib/dist/installer/targets/toml.js +318 -112
  443. package/lib/dist/installer/targets/toml.js.map +1 -1
  444. package/lib/dist/installer/targets/types.d.ts +1 -1
  445. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  446. package/lib/dist/installer/targets/types.js +0 -13
  447. package/lib/dist/installer/targets/types.js.map +1 -1
  448. package/lib/dist/installer/targets/windsurf.d.ts +22 -0
  449. package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
  450. package/lib/dist/installer/targets/windsurf.js +90 -0
  451. package/lib/dist/installer/targets/windsurf.js.map +1 -0
  452. package/lib/dist/lazy-engine.d.ts +22 -0
  453. package/lib/dist/lazy-engine.d.ts.map +1 -0
  454. package/lib/dist/lazy-engine.js +16 -0
  455. package/lib/dist/lazy-engine.js.map +1 -0
  456. package/lib/dist/mcp/answer-freshness.js +0 -6
  457. package/lib/dist/mcp/answer-freshness.js.map +1 -1
  458. package/lib/dist/mcp/daemon-manager.js +2 -23
  459. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  460. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  461. package/lib/dist/mcp/daemon-paths.js +2 -85
  462. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  463. package/lib/dist/mcp/daemon-registry.d.ts +40 -0
  464. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  465. package/lib/dist/mcp/daemon-registry.js +174 -137
  466. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  467. package/lib/dist/mcp/daemon.d.ts +23 -0
  468. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  469. package/lib/dist/mcp/daemon.js +89 -373
  470. package/lib/dist/mcp/daemon.js.map +1 -1
  471. package/lib/dist/mcp/dynamic-boundaries.js +4 -78
  472. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  473. package/lib/dist/mcp/early-ppid.js +0 -24
  474. package/lib/dist/mcp/early-ppid.js.map +1 -1
  475. package/lib/dist/mcp/engine.d.ts +8 -0
  476. package/lib/dist/mcp/engine.d.ts.map +1 -1
  477. package/lib/dist/mcp/engine.js +33 -152
  478. package/lib/dist/mcp/engine.js.map +1 -1
  479. package/lib/dist/mcp/explore-dedup.js +0 -108
  480. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  481. package/lib/dist/mcp/explore-diagnostics.js +0 -116
  482. package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
  483. package/lib/dist/mcp/explore-session-state.js +0 -129
  484. package/lib/dist/mcp/explore-session-state.js.map +1 -1
  485. package/lib/dist/mcp/index-freshness-worker.js +1 -6
  486. package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
  487. package/lib/dist/mcp/index-freshness.js +0 -15
  488. package/lib/dist/mcp/index-freshness.js.map +1 -1
  489. package/lib/dist/mcp/index-version-warning.d.ts +21 -0
  490. package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
  491. package/lib/dist/mcp/index-version-warning.js +38 -0
  492. package/lib/dist/mcp/index-version-warning.js.map +1 -0
  493. package/lib/dist/mcp/index.d.ts +19 -1
  494. package/lib/dist/mcp/index.d.ts.map +1 -1
  495. package/lib/dist/mcp/index.js +118 -293
  496. package/lib/dist/mcp/index.js.map +1 -1
  497. package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
  498. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  499. package/lib/dist/mcp/liveness-watchdog.js +106 -121
  500. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  501. package/lib/dist/mcp/ppid-watchdog.js +0 -24
  502. package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
  503. package/lib/dist/mcp/process-identity.d.ts +42 -0
  504. package/lib/dist/mcp/process-identity.d.ts.map +1 -0
  505. package/lib/dist/mcp/process-identity.js +130 -0
  506. package/lib/dist/mcp/process-identity.js.map +1 -0
  507. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
  508. package/lib/dist/mcp/project-lifecycle.js +50 -17
  509. package/lib/dist/mcp/project-lifecycle.js.map +1 -1
  510. package/lib/dist/mcp/proxy.d.ts +17 -6
  511. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  512. package/lib/dist/mcp/proxy.js +74 -248
  513. package/lib/dist/mcp/proxy.js.map +1 -1
  514. package/lib/dist/mcp/query-pool.d.ts +43 -3
  515. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  516. package/lib/dist/mcp/query-pool.js +109 -123
  517. package/lib/dist/mcp/query-pool.js.map +1 -1
  518. package/lib/dist/mcp/query-worker.js +24 -36
  519. package/lib/dist/mcp/query-worker.js.map +1 -1
  520. package/lib/dist/mcp/server-instructions.js +0 -31
  521. package/lib/dist/mcp/server-instructions.js.map +1 -1
  522. package/lib/dist/mcp/session.d.ts +27 -0
  523. package/lib/dist/mcp/session.d.ts.map +1 -1
  524. package/lib/dist/mcp/session.js +29 -130
  525. package/lib/dist/mcp/session.js.map +1 -1
  526. package/lib/dist/mcp/startup-handshake.js +1 -48
  527. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  528. package/lib/dist/mcp/stdin-teardown.js +0 -28
  529. package/lib/dist/mcp/stdin-teardown.js.map +1 -1
  530. package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
  531. package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
  532. package/lib/dist/mcp/stdout-teardown.js +20 -0
  533. package/lib/dist/mcp/stdout-teardown.js.map +1 -0
  534. package/lib/dist/mcp/tools.d.ts +127 -18
  535. package/lib/dist/mcp/tools.d.ts.map +1 -1
  536. package/lib/dist/mcp/tools.js +661 -3590
  537. package/lib/dist/mcp/tools.js.map +1 -1
  538. package/lib/dist/mcp/transport.d.ts.map +1 -1
  539. package/lib/dist/mcp/transport.js +4 -96
  540. package/lib/dist/mcp/transport.js.map +1 -1
  541. package/lib/dist/mcp/version.d.ts +13 -1
  542. package/lib/dist/mcp/version.d.ts.map +1 -1
  543. package/lib/dist/mcp/version.js +19 -21
  544. package/lib/dist/mcp/version.js.map +1 -1
  545. package/lib/dist/mcp/writer-lock.d.ts +11 -0
  546. package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
  547. package/lib/dist/mcp/writer-lock.js +49 -46
  548. package/lib/dist/mcp/writer-lock.js.map +1 -1
  549. package/lib/dist/project-config.js +1 -138
  550. package/lib/dist/project-config.js.map +1 -1
  551. package/lib/dist/resolution/alias-binding.d.ts +7 -0
  552. package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
  553. package/lib/dist/resolution/alias-binding.js +7 -56
  554. package/lib/dist/resolution/alias-binding.js.map +1 -1
  555. package/lib/dist/resolution/ambient-modules.d.ts +185 -0
  556. package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
  557. package/lib/dist/resolution/ambient-modules.js +732 -0
  558. package/lib/dist/resolution/ambient-modules.js.map +1 -0
  559. package/lib/dist/resolution/angular-template-synthesizer.d.ts +48 -1
  560. package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
  561. package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
  562. package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
  563. package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
  564. package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
  565. package/lib/dist/resolution/c-feature-variants.js +249 -0
  566. package/lib/dist/resolution/c-feature-variants.js.map +1 -0
  567. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  568. package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
  569. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  570. package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
  571. package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
  572. package/lib/dist/resolution/c-macro-renames.js +95 -0
  573. package/lib/dist/resolution/c-macro-renames.js.map +1 -0
  574. package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
  575. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  576. package/lib/dist/resolution/callback-synthesizer.js +1355 -1270
  577. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  578. package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
  579. package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
  580. package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
  581. package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
  582. package/lib/dist/resolution/cooperative-yield.js +0 -27
  583. package/lib/dist/resolution/cooperative-yield.js.map +1 -1
  584. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
  585. package/lib/dist/resolution/cpp-constructor.js +15 -17
  586. package/lib/dist/resolution/cpp-constructor.js.map +1 -1
  587. package/lib/dist/resolution/cpp-includers.d.ts +46 -0
  588. package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
  589. package/lib/dist/resolution/cpp-includers.js +153 -0
  590. package/lib/dist/resolution/cpp-includers.js.map +1 -0
  591. package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
  592. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
  593. package/lib/dist/resolution/cpp-macro-visibility.js +17 -68
  594. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
  595. package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
  596. package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
  597. package/lib/dist/resolution/cpp-namespaces.js +151 -0
  598. package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
  599. package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
  600. package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
  601. package/lib/dist/resolution/cpp-raw-strings.js +167 -0
  602. package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
  603. package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
  604. package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
  605. package/lib/dist/resolution/cpp-supertypes.js +322 -0
  606. package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
  607. package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
  608. package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
  609. package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
  610. package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
  611. package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
  612. package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
  613. package/lib/dist/resolution/cpp-type-aliases.js +648 -0
  614. package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
  615. package/lib/dist/resolution/dart-libraries.d.ts +75 -0
  616. package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
  617. package/lib/dist/resolution/dart-libraries.js +721 -0
  618. package/lib/dist/resolution/dart-libraries.js.map +1 -0
  619. package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
  620. package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
  621. package/lib/dist/resolution/dart-local-scope.js +565 -0
  622. package/lib/dist/resolution/dart-local-scope.js.map +1 -0
  623. package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
  624. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
  625. package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -1
  626. package/lib/dist/resolution/frameworks/angular-router.js +41 -208
  627. package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
  628. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
  629. package/lib/dist/resolution/frameworks/astro.js +4 -60
  630. package/lib/dist/resolution/frameworks/astro.js.map +1 -1
  631. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
  632. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
  633. package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
  634. package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
  635. package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
  636. package/lib/dist/resolution/frameworks/cics.js +7 -33
  637. package/lib/dist/resolution/frameworks/cics.js.map +1 -1
  638. package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
  639. package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
  640. package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
  641. package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
  642. package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
  643. package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
  644. package/lib/dist/resolution/frameworks/component-folder.js +11 -0
  645. package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
  646. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  647. package/lib/dist/resolution/frameworks/csharp.js +5 -68
  648. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  649. package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
  650. package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
  651. package/lib/dist/resolution/frameworks/drupal.js +377 -142
  652. package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
  653. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
  654. package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
  655. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
  656. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
  657. package/lib/dist/resolution/frameworks/expo-router.js +9 -190
  658. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
  659. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  660. package/lib/dist/resolution/frameworks/express.js +182 -199
  661. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  662. package/lib/dist/resolution/frameworks/fabric.js +1 -104
  663. package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
  664. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  665. package/lib/dist/resolution/frameworks/go.js +14 -43
  666. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  667. package/lib/dist/resolution/frameworks/goframe.js +1 -55
  668. package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
  669. package/lib/dist/resolution/frameworks/index.d.ts +13 -0
  670. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  671. package/lib/dist/resolution/frameworks/index.js +12 -50
  672. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  673. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  674. package/lib/dist/resolution/frameworks/java.js +203 -129
  675. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  676. package/lib/dist/resolution/frameworks/laravel.js +2 -125
  677. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  678. package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
  679. package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
  680. package/lib/dist/resolution/frameworks/nestjs.js +2 -199
  681. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  682. package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
  683. package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
  684. package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
  685. package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
  686. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
  687. package/lib/dist/resolution/frameworks/nextjs.js +10 -66
  688. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
  689. package/lib/dist/resolution/frameworks/object-literal.js +0 -21
  690. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
  691. package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
  692. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
  693. package/lib/dist/resolution/frameworks/package-deps.js +35 -26
  694. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
  695. package/lib/dist/resolution/frameworks/page-component.js +0 -14
  696. package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
  697. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
  698. package/lib/dist/resolution/frameworks/play.js +26 -34
  699. package/lib/dist/resolution/frameworks/play.js.map +1 -1
  700. package/lib/dist/resolution/frameworks/python.js +5 -102
  701. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  702. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  703. package/lib/dist/resolution/frameworks/react-native.js +1 -166
  704. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  705. package/lib/dist/resolution/frameworks/react-router.d.ts +13 -4
  706. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
  707. package/lib/dist/resolution/frameworks/react-router.js +10 -82
  708. package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
  709. package/lib/dist/resolution/frameworks/react.d.ts +57 -0
  710. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  711. package/lib/dist/resolution/frameworks/react.js +1449 -191
  712. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  713. package/lib/dist/resolution/frameworks/ruby.js +1 -61
  714. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  715. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  716. package/lib/dist/resolution/frameworks/rust.js +35 -56
  717. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  718. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  719. package/lib/dist/resolution/frameworks/svelte.js +7 -75
  720. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  721. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
  722. package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
  723. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
  724. package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
  725. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
  726. package/lib/dist/resolution/frameworks/swift.js +0 -97
  727. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  728. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
  729. package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
  730. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
  731. package/lib/dist/resolution/frameworks/terraform.js +1 -85
  732. package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
  733. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
  734. package/lib/dist/resolution/frameworks/vue-router.js +11 -134
  735. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
  736. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
  737. package/lib/dist/resolution/frameworks/vue.js +42 -114
  738. package/lib/dist/resolution/frameworks/vue.js.map +1 -1
  739. package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
  740. package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
  741. package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
  742. package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
  743. package/lib/dist/resolution/go-module.d.ts +23 -7
  744. package/lib/dist/resolution/go-module.d.ts.map +1 -1
  745. package/lib/dist/resolution/go-module.js +21 -24
  746. package/lib/dist/resolution/go-module.js.map +1 -1
  747. package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
  748. package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
  749. package/lib/dist/resolution/go-stdlib-methods.js +224 -0
  750. package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
  751. package/lib/dist/resolution/goframe-synthesizer.js +2 -53
  752. package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
  753. package/lib/dist/resolution/import-resolver.d.ts +276 -29
  754. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  755. package/lib/dist/resolution/import-resolver.js +1670 -1380
  756. package/lib/dist/resolution/import-resolver.js.map +1 -1
  757. package/lib/dist/resolution/index.d.ts +415 -6
  758. package/lib/dist/resolution/index.d.ts.map +1 -1
  759. package/lib/dist/resolution/index.js +1323 -1037
  760. package/lib/dist/resolution/index.js.map +1 -1
  761. package/lib/dist/resolution/js-builtins.d.ts +14 -0
  762. package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
  763. package/lib/dist/resolution/js-builtins.js +14 -14
  764. package/lib/dist/resolution/js-builtins.js.map +1 -1
  765. package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
  766. package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
  767. package/lib/dist/resolution/js-class-expressions.js +25 -0
  768. package/lib/dist/resolution/js-class-expressions.js.map +1 -0
  769. package/lib/dist/resolution/js-super-calls.d.ts +18 -0
  770. package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
  771. package/lib/dist/resolution/js-super-calls.js +94 -0
  772. package/lib/dist/resolution/js-super-calls.js.map +1 -0
  773. package/lib/dist/resolution/jsx-code.d.ts +28 -0
  774. package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
  775. package/lib/dist/resolution/jsx-code.js +459 -0
  776. package/lib/dist/resolution/jsx-code.js.map +1 -0
  777. package/lib/dist/resolution/lru-cache.d.ts +5 -13
  778. package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
  779. package/lib/dist/resolution/lru-cache.js +43 -32
  780. package/lib/dist/resolution/lru-cache.js.map +1 -1
  781. package/lib/dist/resolution/memory-budget.js +0 -52
  782. package/lib/dist/resolution/memory-budget.js.map +1 -1
  783. package/lib/dist/resolution/module-importers.d.ts +185 -0
  784. package/lib/dist/resolution/module-importers.d.ts.map +1 -0
  785. package/lib/dist/resolution/module-importers.js +588 -0
  786. package/lib/dist/resolution/module-importers.js.map +1 -0
  787. package/lib/dist/resolution/name-matcher.d.ts +858 -7
  788. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  789. package/lib/dist/resolution/name-matcher.js +21030 -5110
  790. package/lib/dist/resolution/name-matcher.js.map +1 -1
  791. package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
  792. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
  793. package/lib/dist/resolution/next-router-synthesizer.js +46 -28
  794. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
  795. package/lib/dist/resolution/override-parameters.d.ts +40 -0
  796. package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
  797. package/lib/dist/resolution/override-parameters.js +339 -0
  798. package/lib/dist/resolution/override-parameters.js.map +1 -0
  799. package/lib/dist/resolution/parameter-flow.d.ts +218 -0
  800. package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
  801. package/lib/dist/resolution/parameter-flow.js +474 -0
  802. package/lib/dist/resolution/parameter-flow.js.map +1 -0
  803. package/lib/dist/resolution/pascal-scope.d.ts +91 -0
  804. package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
  805. package/lib/dist/resolution/pascal-scope.js +961 -0
  806. package/lib/dist/resolution/pascal-scope.js.map +1 -0
  807. package/lib/dist/resolution/path-aliases.d.ts +32 -4
  808. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  809. package/lib/dist/resolution/path-aliases.js +43 -110
  810. package/lib/dist/resolution/path-aliases.js.map +1 -1
  811. package/lib/dist/resolution/project-scans.d.ts +38 -0
  812. package/lib/dist/resolution/project-scans.d.ts.map +1 -0
  813. package/lib/dist/resolution/project-scans.js +30 -0
  814. package/lib/dist/resolution/project-scans.js.map +1 -0
  815. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
  816. package/lib/dist/resolution/react-router-synthesizer.js +3 -55
  817. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
  818. package/lib/dist/resolution/resolver-pool.d.ts +23 -2
  819. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  820. package/lib/dist/resolution/resolver-pool.js +43 -111
  821. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  822. package/lib/dist/resolution/resolver-worker.d.ts +1 -1
  823. package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
  824. package/lib/dist/resolution/resolver-worker.js +8 -37
  825. package/lib/dist/resolution/resolver-worker.js.map +1 -1
  826. package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
  827. package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
  828. package/lib/dist/resolution/resurrect-ref.js +19 -0
  829. package/lib/dist/resolution/resurrect-ref.js.map +1 -0
  830. package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
  831. package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
  832. package/lib/dist/resolution/ruby-constant-paths.js +255 -0
  833. package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
  834. package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
  835. package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
  836. package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
  837. package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
  838. package/lib/dist/resolution/rust-scopes.d.ts +120 -0
  839. package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
  840. package/lib/dist/resolution/rust-scopes.js +730 -0
  841. package/lib/dist/resolution/rust-scopes.js.map +1 -0
  842. package/lib/dist/resolution/shopify-themes.d.ts +10 -0
  843. package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
  844. package/lib/dist/resolution/shopify-themes.js +19 -0
  845. package/lib/dist/resolution/shopify-themes.js.map +1 -0
  846. package/lib/dist/resolution/strip-comments.d.ts +20 -1
  847. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  848. package/lib/dist/resolution/strip-comments.js +164 -119
  849. package/lib/dist/resolution/strip-comments.js.map +1 -1
  850. package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
  851. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
  852. package/lib/dist/resolution/swift-objc-bridge.js +0 -160
  853. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
  854. package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
  855. package/lib/dist/resolution/swift-type-visibility.js +2 -101
  856. package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
  857. package/lib/dist/resolution/synth-utils.js +1 -22
  858. package/lib/dist/resolution/synth-utils.js.map +1 -1
  859. package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
  860. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
  861. package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
  862. package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
  863. package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
  864. package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
  865. package/lib/dist/resolution/tier-synthesizer.js +4 -170
  866. package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
  867. package/lib/dist/resolution/type-parameters.d.ts +23 -0
  868. package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
  869. package/lib/dist/resolution/type-parameters.js +52 -54
  870. package/lib/dist/resolution/type-parameters.js.map +1 -1
  871. package/lib/dist/resolution/types.d.ts +183 -11
  872. package/lib/dist/resolution/types.d.ts.map +1 -1
  873. package/lib/dist/resolution/types.js +0 -47
  874. package/lib/dist/resolution/types.js.map +1 -1
  875. package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
  876. package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
  877. package/lib/dist/resolution/vbnet-receivers.js +1482 -0
  878. package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
  879. package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
  880. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
  881. package/lib/dist/resolution/workspace-packages.d.ts +206 -15
  882. package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
  883. package/lib/dist/resolution/workspace-packages.js +570 -152
  884. package/lib/dist/resolution/workspace-packages.js.map +1 -1
  885. package/lib/dist/search/identifier-segments.js +2 -93
  886. package/lib/dist/search/identifier-segments.js.map +1 -1
  887. package/lib/dist/search/query-parser.js +0 -54
  888. package/lib/dist/search/query-parser.js.map +1 -1
  889. package/lib/dist/search/query-paths.js +0 -167
  890. package/lib/dist/search/query-paths.js.map +1 -1
  891. package/lib/dist/search/query-utils.d.ts +44 -0
  892. package/lib/dist/search/query-utils.d.ts.map +1 -1
  893. package/lib/dist/search/query-utils.js +120 -198
  894. package/lib/dist/search/query-utils.js.map +1 -1
  895. package/lib/dist/sync/git-hooks.d.ts +14 -5
  896. package/lib/dist/sync/git-hooks.d.ts.map +1 -1
  897. package/lib/dist/sync/git-hooks.js +118 -65
  898. package/lib/dist/sync/git-hooks.js.map +1 -1
  899. package/lib/dist/sync/index.js +0 -14
  900. package/lib/dist/sync/index.js.map +1 -1
  901. package/lib/dist/sync/watch-policy.js +0 -45
  902. package/lib/dist/sync/watch-policy.js.map +1 -1
  903. package/lib/dist/sync/watcher.d.ts +29 -11
  904. package/lib/dist/sync/watcher.d.ts.map +1 -1
  905. package/lib/dist/sync/watcher.js +83 -487
  906. package/lib/dist/sync/watcher.js.map +1 -1
  907. package/lib/dist/sync/worktree.d.ts +7 -2
  908. package/lib/dist/sync/worktree.d.ts.map +1 -1
  909. package/lib/dist/sync/worktree.js +24 -97
  910. package/lib/dist/sync/worktree.js.map +1 -1
  911. package/lib/dist/telemetry/index.d.ts.map +1 -1
  912. package/lib/dist/telemetry/index.js +15 -135
  913. package/lib/dist/telemetry/index.js.map +1 -1
  914. package/lib/dist/types.d.ts +46 -0
  915. package/lib/dist/types.d.ts.map +1 -1
  916. package/lib/dist/types.js +15 -44
  917. package/lib/dist/types.js.map +1 -1
  918. package/lib/dist/ui/color.js +0 -19
  919. package/lib/dist/ui/color.js.map +1 -1
  920. package/lib/dist/ui/glyphs.js +2 -45
  921. package/lib/dist/ui/glyphs.js.map +1 -1
  922. package/lib/dist/ui/shimmer-progress.js +0 -21
  923. package/lib/dist/ui/shimmer-progress.js.map +1 -1
  924. package/lib/dist/ui/shimmer-worker.js +0 -22
  925. package/lib/dist/ui/shimmer-worker.js.map +1 -1
  926. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
  927. package/lib/dist/ui-server/api/deadcode.js +2 -31
  928. package/lib/dist/ui-server/api/deadcode.js.map +1 -1
  929. package/lib/dist/ui-server/api/effects.js +0 -111
  930. package/lib/dist/ui-server/api/effects.js.map +1 -1
  931. package/lib/dist/ui-server/api/entrypoints.js +0 -142
  932. package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
  933. package/lib/dist/ui-server/api/events.js +0 -145
  934. package/lib/dist/ui-server/api/events.js.map +1 -1
  935. package/lib/dist/ui-server/api/file.js +0 -80
  936. package/lib/dist/ui-server/api/file.js.map +1 -1
  937. package/lib/dist/ui-server/api/filecode.js +0 -95
  938. package/lib/dist/ui-server/api/filecode.js.map +1 -1
  939. package/lib/dist/ui-server/api/flow.js +0 -149
  940. package/lib/dist/ui-server/api/flow.js.map +1 -1
  941. package/lib/dist/ui-server/api/hierarchy.js +0 -28
  942. package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
  943. package/lib/dist/ui-server/api/index.js +0 -88
  944. package/lib/dist/ui-server/api/index.js.map +1 -1
  945. package/lib/dist/ui-server/api/map.d.ts.map +1 -1
  946. package/lib/dist/ui-server/api/map.js +4 -317
  947. package/lib/dist/ui-server/api/map.js.map +1 -1
  948. package/lib/dist/ui-server/api/node.js +0 -111
  949. package/lib/dist/ui-server/api/node.js.map +1 -1
  950. package/lib/dist/ui-server/api/nodes.js +0 -16
  951. package/lib/dist/ui-server/api/nodes.js.map +1 -1
  952. package/lib/dist/ui-server/api/program.js +0 -90
  953. package/lib/dist/ui-server/api/program.js.map +1 -1
  954. package/lib/dist/ui-server/api/respond.js +0 -60
  955. package/lib/dist/ui-server/api/respond.js.map +1 -1
  956. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
  957. package/lib/dist/ui-server/api/route-roots.js +2 -44
  958. package/lib/dist/ui-server/api/route-roots.js.map +1 -1
  959. package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
  960. package/lib/dist/ui-server/api/routes.js +4 -60
  961. package/lib/dist/ui-server/api/routes.js.map +1 -1
  962. package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
  963. package/lib/dist/ui-server/api/screens.js +4 -174
  964. package/lib/dist/ui-server/api/screens.js.map +1 -1
  965. package/lib/dist/ui-server/api/search.js +0 -62
  966. package/lib/dist/ui-server/api/search.js.map +1 -1
  967. package/lib/dist/ui-server/api/session.js +0 -58
  968. package/lib/dist/ui-server/api/session.js.map +1 -1
  969. package/lib/dist/ui-server/api/source.d.ts.map +1 -1
  970. package/lib/dist/ui-server/api/source.js +0 -161
  971. package/lib/dist/ui-server/api/source.js.map +1 -1
  972. package/lib/dist/ui-server/api/stats.js +0 -58
  973. package/lib/dist/ui-server/api/stats.js.map +1 -1
  974. package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
  975. package/lib/dist/ui-server/api/steps.js +5 -381
  976. package/lib/dist/ui-server/api/steps.js.map +1 -1
  977. package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
  978. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
  979. package/lib/dist/ui-server/api/trail-store.js +24 -106
  980. package/lib/dist/ui-server/api/trail-store.js.map +1 -1
  981. package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
  982. package/lib/dist/ui-server/api/trails.js +19 -94
  983. package/lib/dist/ui-server/api/trails.js.map +1 -1
  984. package/lib/dist/ui-server/api/when.js +0 -36
  985. package/lib/dist/ui-server/api/when.js.map +1 -1
  986. package/lib/dist/ui-server/api/wire.js +0 -58
  987. package/lib/dist/ui-server/api/wire.js.map +1 -1
  988. package/lib/dist/ui-server/assets.js +0 -35
  989. package/lib/dist/ui-server/assets.js.map +1 -1
  990. package/lib/dist/ui-server/constants.js +0 -26
  991. package/lib/dist/ui-server/constants.js.map +1 -1
  992. package/lib/dist/ui-server/highlight/bounded-tokenize.js +0 -25
  993. package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
  994. package/lib/dist/ui-server/highlight/index.js +1 -132
  995. package/lib/dist/ui-server/highlight/index.js.map +1 -1
  996. package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
  997. package/lib/dist/ui-server/highlight/languages.js +0 -31
  998. package/lib/dist/ui-server/highlight/languages.js.map +1 -1
  999. package/lib/dist/ui-server/highlight/tokenize-worker.js +0 -5
  1000. package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
  1001. package/lib/dist/ui-server/index.d.ts +25 -0
  1002. package/lib/dist/ui-server/index.d.ts.map +1 -1
  1003. package/lib/dist/ui-server/index.js +35 -103
  1004. package/lib/dist/ui-server/index.js.map +1 -1
  1005. package/lib/dist/ui-server/open-browser.js +0 -34
  1006. package/lib/dist/ui-server/open-browser.js.map +1 -1
  1007. package/lib/dist/ui-server/security.d.ts +5 -0
  1008. package/lib/dist/ui-server/security.d.ts.map +1 -1
  1009. package/lib/dist/ui-server/security.js +11 -147
  1010. package/lib/dist/ui-server/security.js.map +1 -1
  1011. package/lib/dist/ui-server/static.js +0 -41
  1012. package/lib/dist/ui-server/static.js.map +1 -1
  1013. package/lib/dist/upgrade/index.d.ts +18 -5
  1014. package/lib/dist/upgrade/index.d.ts.map +1 -1
  1015. package/lib/dist/upgrade/index.js +73 -229
  1016. package/lib/dist/upgrade/index.js.map +1 -1
  1017. package/lib/dist/upgrade/remove-binary.js +2 -67
  1018. package/lib/dist/upgrade/remove-binary.js.map +1 -1
  1019. package/lib/dist/upgrade/update-check.js +1 -81
  1020. package/lib/dist/upgrade/update-check.js.map +1 -1
  1021. package/lib/dist/utils.d.ts +69 -1
  1022. package/lib/dist/utils.d.ts.map +1 -1
  1023. package/lib/dist/utils.js +224 -266
  1024. package/lib/dist/utils.js.map +1 -1
  1025. package/lib/dist/worker-teardown.js +0 -47
  1026. package/lib/dist/worker-teardown.js.map +1 -1
  1027. package/lib/kernel/codegraph-kernel.node +2 -2
  1028. package/lib/node_modules/.package-lock.json +4 -4
  1029. package/lib/node_modules/ignore/README.md +138 -8
  1030. package/lib/node_modules/ignore/index.d.ts +56 -20
  1031. package/lib/node_modules/ignore/index.js +1033 -221
  1032. package/lib/node_modules/ignore/legacy.js +871 -178
  1033. package/lib/node_modules/ignore/package.json +10 -4
  1034. package/lib/package.json +14 -8
  1035. package/node.exe +2 -2
  1036. package/package.json +1 -1
@@ -34,88 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.cFnPointerDispatchEdges = cFnPointerDispatchEdges;
37
- /**
38
- * C/C++ function-pointer dispatch synthesis (#932).
39
- *
40
- * C/C++ polymorphism is the function pointer: a struct carries a fn-pointer
41
- * field (`int (*fn)(int)`, or a fn-pointer-typedef field `hook_func func`),
42
- * concrete functions are *registered* into it through a table
43
- * (`static struct cmd cmds[] = {{"add", cmd_add}, …}`, a designated
44
- * `.fn = cmd_add`, or `x->fn = cmd_add`), and the dispatcher calls through it
45
- * indirectly (`p->fn(argv)`). Static extraction captures neither the
46
- * registration→field binding nor the indirect call, so the dispatcher→handler
47
- * edge is missing and `git`'s `run_builtin` looks like it calls nothing, the
48
- * hooks in `hook_demo.c` are unreachable, etc.
49
- *
50
- * This bridges it, keyed by **(struct type, fn-pointer field)**:
51
- * • registrations — a function bound to `S.field` via a positional
52
- * initializer (matched by field index), a designated `.field = fn`, or a
53
- * direct `x.field = fn` / `x->field = fn` assignment;
54
- * • dispatch — `recv->field(…)` / `recv.field(…)` where `recv` resolves to a
55
- * value of struct type `S` (from the enclosing function's params / locals,
56
- * or by walking a chained/array receiver `c->cmd->proc` across field types),
57
- * falling back to the field name when it is unique to one struct;
58
- * • field←field propagation — `a->f = b->g` merges `B.g`'s handlers into
59
- * `A.f`, so a generic single-slot hook that is reassigned from a registry
60
- * (the `hook_demo.c` shape: `h->func = found->fn`) still resolves.
61
- *
62
- * Also handles **macro-built tables** (#991) — the dominant real-world shape,
63
- * e.g. redis' command table, sqlite's builtin functions, and vim's `:ex` /
64
- * normal-mode commands. The fn-pointer arg lives inside a macro call
65
- * (`MAKE_CMD(…,proc,…)` / `FUNCTION(…,xFunc)` / `EXCMD(…,fn,…)`) in a generated
66
- * or `#include`-d file; the table's struct type may itself be an object-macro
67
- * alias; the field may use a function-TYPE typedef; the struct may be defined
68
- * INLINE with the array; and the whole thing may sit behind `#ifdef` switched on
69
- * by the includer. The registration pass reads each `#include`-d file as a unit
70
- * with the includer's effective macro env (own + headers) in scope, evaluates
71
- * its `#ifdef`s against the includer's defined set, expands object/function
72
- * macros, peels a brace-wrapped element, and parses an inline struct in place —
73
- * then reads the positional/designated bindings. Dispatch additionally resolves
74
- * an array subscript through a file-scope table (`(cmdnames[i].cmd_func)(…)`).
75
- *
76
- * Also bridges **bare arrays of function pointers** (no struct, no field) —
77
- * `opcode_t *opcodes[256] = {nop,…}` dispatched `opcodes[op](…)` (SameBoy's CPU),
78
- * `zend_rc_dtor_func_t t[] = {[IS_STRING]=(cast)fn,…}` dispatched `t[GC_TYPE(p)](…)`
79
- * (php's Zend) — keyed by the array VARIABLE name. The element type must be a
80
- * function typedef (the precision gate), entries are literal function names, and
81
- * the same-file table wins on a name collision (two file-local `opcodes[256]`).
82
- *
83
- * Whole-graph pass after base resolution; all edges are `provenance:'heuristic'`
84
- * (`synthesizedBy:'fn-pointer-dispatch'`). High precision via the (type, field)
85
- * key + a real-function gate; a project with no fn-pointer dispatch is a no-op.
86
- *
87
- * ## Fuse-then-link architecture (§7a.8, task #5 step 1)
88
- *
89
- * The pass used to sweep every file's text FOUR times (typedefs, registrations,
90
- * propagation, dispatch), and on the Linux kernel the all-or-nothing source
91
- * cache declines, so each sweep re-read + re-stripped the whole corpus — 4.4
92
- * strips/file, ~78s of the ~230s kernel-scale wall (§7a.8 calibration). It now
93
- * runs as ONE extraction sweep plus filtered linking stages:
94
- *
95
- * 1. **Extraction sweep** — reads + strips each file ONCE and collects, per
96
- * file: typedef names, each struct node's field declarations (parsed
97
- * structurally, fn-pointer classification deferred — the typedef sets
98
- * aren't complete mid-sweep), the resolved local includes, and cheap
99
- * SURVIVAL FILTERS for the later stages (distinct initializer type
100
- * tokens, array element types, inline-struct summaries, field-assignment
101
- * field pairs, dispatch field / array names — all interned, a few MB even
102
- * on the kernel).
103
- * 2. **Struct-layout linking** — classifies the deferred fields against the
104
- * now-complete typedef sets and registers layouts by replaying the struct
105
- * kind-scan, so registration order (which decides same-name layout
106
- * precedence) is byte-identical to the old dedicated pass.
107
- * 3. **Registration / propagation / dispatch** — the original pass bodies,
108
- * UNCHANGED, but each file is first checked against its survival filter
109
- * and only surviving files are re-stripped (LRU-served). The filters only
110
- * ever over-approximate: a filtered-out file is one where every match
111
- * would have failed the pass's own gates before any side effect, so
112
- * skipping it cannot change the edge set. On the kernel only ~16% of
113
- * files have any dispatch-shaped match at all, so the lazy re-strips are
114
- * a fraction of a sweep and total strip work drops ~4.4× → ~1.5×.
115
- *
116
- * The extraction sweep is also the step-2 boundary: a native per-file extractor
117
- * can replace the sweep's scans without touching the linking stages.
118
- */
119
37
  const path = __importStar(require("node:path"));
120
38
  const memory_budget_1 = require("./memory-budget");
121
39
  const lru_cache_1 = require("./lru-cache");
@@ -123,17 +41,12 @@ const strip_comments_1 = require("./strip-comments");
123
41
  const loader_1 = require("../extraction/kernel/loader");
124
42
  const C_CPP_EXT = /\.(c|h|cc|cpp|cxx|hpp|hh|hxx|cppm|ipp|inl|tcc)$/i;
125
43
  const FN_KINDS = new Set(['function', 'method']);
126
- const FANOUT_CAP = 300; // a real command table (git ~150) is legitimate fan-out; this only stops pathological cases.
127
- /** Slice a node's body from a pre-split line array — the per-file sweeps
128
- * call this once per NODE, and splitting the whole file per node was an
129
- * O(nodes × file-size) term (~1.6M full-file splits on the Linux tree,
130
- * §7a.3 cFnPtr round). Split once per file, slice many times. */
44
+ const FANOUT_CAP = 300;
131
45
  function sliceLinesPre(lines, startLine, endLine) {
132
46
  if (!startLine)
133
47
  return '';
134
48
  return lines.slice(startLine - 1, endLine ?? startLine).join('\n');
135
49
  }
136
- /** Index of the `}` matching the `{` at `open` (which must point at a `{`). -1 if unbalanced. */
137
50
  function matchBrace(src, open) {
138
51
  let depth = 0;
139
52
  for (let i = open; i < src.length; i++) {
@@ -148,7 +61,6 @@ function matchBrace(src, open) {
148
61
  }
149
62
  return -1;
150
63
  }
151
- /** Split `body` on `sep` at brace/paren/bracket depth 0 (commas inside `{…}` / `(…)` stay together). */
152
64
  function splitTopLevel(body, sep) {
153
65
  const out = [];
154
66
  let depth = 0;
@@ -167,7 +79,6 @@ function splitTopLevel(body, sep) {
167
79
  out.push(body.slice(start));
168
80
  return out;
169
81
  }
170
- /** Index of the `)` matching the `(` at `open` (which must point at a `(`). -1 if unbalanced. */
171
82
  function matchParen(src, open) {
172
83
  let depth = 0;
173
84
  for (let i = open; i < src.length; i++) {
@@ -182,12 +93,6 @@ function matchParen(src, open) {
182
93
  }
183
94
  return -1;
184
95
  }
185
- /**
186
- * Collect function-like macros from (comment-stripped) source, joining
187
- * `\`-continuations first. Only object/positional table macros matter here, so
188
- * variadic macros are skipped. Used to expand registration tables built through
189
- * a macro (redis' `MAKE_CMD(…)`) before reading the struct-field bindings.
190
- */
191
96
  function parseFunctionMacros(stripped) {
192
97
  const out = new Map();
193
98
  if (!stripped.includes('#define') && !stripped.includes('# define'))
@@ -198,16 +103,11 @@ function parseFunctionMacros(stripped) {
198
103
  while ((m = RE.exec(joined))) {
199
104
  const params = m[2].split(',').map((p) => p.trim()).filter(Boolean);
200
105
  if (params.some((p) => p === '...' || p.endsWith('...')))
201
- continue; // variadic — skip
106
+ continue;
202
107
  out.set(m[1], { params, expansion: m[3].trim() });
203
108
  }
204
109
  return out;
205
110
  }
206
- /**
207
- * Collect object-like macros `#define NAME value` (NAME not immediately followed
208
- * by `(`). redis aliases the table's struct type this way:
209
- * `#define COMMAND_STRUCT redisCommand`, used as `struct COMMAND_STRUCT table[]`.
210
- */
211
111
  function parseObjectMacros(stripped) {
212
112
  const out = new Map();
213
113
  if (!stripped.includes('#define') && !stripped.includes('# define'))
@@ -219,7 +119,6 @@ function parseObjectMacros(stripped) {
219
119
  out.set(m[1], m[2].trim());
220
120
  return out;
221
121
  }
222
- /** All macro names a file `#define`s (value-ful or not) — the "defined" set for #ifdef. */
223
122
  function parseDefinedNames(stripped) {
224
123
  const out = new Set();
225
124
  if (!stripped.includes('#define') && !stripped.includes('# define'))
@@ -230,19 +129,10 @@ function parseDefinedNames(stripped) {
230
129
  out.add(m[1]);
231
130
  return out;
232
131
  }
233
- /**
234
- * Drop the inactive arms of `#ifdef`/`#ifndef`/`#if defined(X)`/`#else`/`#elif`/
235
- * `#endif` given a set of defined macro names, keeping line offsets (inactive
236
- * lines are blanked, not removed). A conditional whose expression we can't
237
- * evaluate (`#if SOME_EXPR`) keeps its body — better to over-keep than to drop
238
- * live code. This is what makes a header included with a switch macro defined
239
- * (vim's `ex_cmds.h` under `DO_DECLARE_EXCMD`) expose only its active table.
240
- */
241
132
  function evalConditionals(text, defined) {
242
133
  if (!/#\s*if/.test(text))
243
134
  return text;
244
135
  const lines = text.split('\n');
245
- // stack frame: parentActive = enclosing kept?; active = this arm kept?; taken = any arm taken yet
246
136
  const stack = [];
247
137
  const activeNow = () => (stack.length === 0 ? true : stack[stack.length - 1].active);
248
138
  const condDefined = (expr) => {
@@ -252,7 +142,7 @@ function evalConditionals(text, defined) {
252
142
  mm = expr.match(/^!\s*defined\s*\(?\s*(\w+)\s*\)?$/);
253
143
  if (mm)
254
144
  return !defined.has(mm[1]);
255
- return null; // unevaluable
145
+ return null;
256
146
  };
257
147
  for (let i = 0; i < lines.length; i++) {
258
148
  const t = lines[i].trim();
@@ -274,7 +164,7 @@ function evalConditionals(text, defined) {
274
164
  if ((mm = t.match(/^#\s*if\s+(.+)$/))) {
275
165
  const pa = activeNow();
276
166
  const c = condDefined(mm[1].trim());
277
- const cond = c === null ? true : c; // unevaluable → keep
167
+ const cond = c === null ? true : c;
278
168
  stack.push({ parentActive: pa, active: pa && cond, taken: cond });
279
169
  lines[i] = '';
280
170
  continue;
@@ -303,11 +193,10 @@ function evalConditionals(text, defined) {
303
193
  continue;
304
194
  }
305
195
  if (!activeNow())
306
- lines[i] = ''; // blank an inactive line (keep the newline)
196
+ lines[i] = '';
307
197
  }
308
198
  return lines.join('\n');
309
199
  }
310
- /** Resolve a type token through object-like macro aliases (transitive, capped). */
311
200
  function resolveTypeName(name, objEnv) {
312
201
  let n = name;
313
202
  for (let i = 0; objEnv && i < 5; i++) {
@@ -319,18 +208,11 @@ function resolveTypeName(name, objEnv) {
319
208
  }
320
209
  return n;
321
210
  }
322
- /** Substitute call args for the macro's params (whole-token) in its expansion. */
323
211
  function substituteMacro(def, args) {
324
212
  const map = new Map();
325
213
  def.params.forEach((p, i) => map.set(p, args[i] ?? ''));
326
214
  return def.expansion.replace(/\b\w+\b/g, (tok) => (map.has(tok) ? map.get(tok) : tok));
327
215
  }
328
- /**
329
- * Expand known function-like macro calls in `text` to a fixpoint (depth-capped).
330
- * `MAKE_CMD("get",…,getCommand,…)` → the positional value list whose slots line
331
- * up with the struct's fields, so the existing positional registration can read
332
- * `getCommand` straight out of the `proc` slot.
333
- */
334
216
  function expandMacroCalls(text, env) {
335
217
  if (env.size === 0)
336
218
  return text;
@@ -343,79 +225,35 @@ function expandMacroCalls(text, env) {
343
225
  const def = env.get(m[1]);
344
226
  if (!def)
345
227
  continue;
346
- const open = m.index + m[0].length - 1; // index of the `(`
228
+ const open = m.index + m[0].length - 1;
347
229
  const close = matchParen(out, open);
348
230
  if (close < 0)
349
231
  continue;
350
232
  const args = splitTopLevel(out.slice(open + 1, close), ',').map((a) => a.trim());
351
233
  out = out.slice(0, m.index) + substituteMacro(def, args) + out.slice(close + 1);
352
234
  changed = true;
353
- break; // restart scan — offsets shifted
235
+ break;
354
236
  }
355
237
  if (!changed)
356
238
  break;
357
239
  }
358
240
  return out;
359
241
  }
360
- /** A fn-pointer field looks like `… (*name)(…)` — capture `name`. A
361
- * calling-convention / attribute macro may precede the `*`
362
- * (`(ZEND_FASTCALL *name)`), so allow leading word tokens. */
363
242
  const FNPTR_DECL_RE = /\(\s*(?:\w+\s+)*\*\s*(\w+)\s*\)\s*\(/;
364
- /** `typedef RET (*NAME)(…)` — a function-pointer typedef (CC/attr macro before
365
- * the `*` allowed, as in php's `typedef void (ZEND_FASTCALL *fn_t)(…)`). */
366
243
  const FNPTR_TYPEDEF_RE = /\btypedef\b[^;{}]*?\(\s*(?:\w+\s+)*\*\s*(\w+)\s*\)\s*\(/g;
367
- /** A whole brace-free `typedef … ;` statement — capture the guts to spot the
368
- * function-TYPE form `typedef RET NAME(params)` (no `(*name)` pointer form). */
369
244
  const FNTYPE_TYPEDEF_STMT_RE = /\btypedef\b([^;{}]*);/g;
370
- /** Return-type keywords that must never be mistaken for the typedef's name. */
371
245
  const C_TYPE_KEYWORDS = new Set([
372
246
  'void', 'int', 'char', 'short', 'long', 'unsigned', 'signed', 'float', 'double',
373
247
  'const', 'struct', 'union', 'enum', 'static', 'volatile', 'register', 'inline',
374
248
  ]);
375
- /** `#include "local/header"` — captured from RAW source (string contents survive). */
376
249
  const INCLUDE_RE = /#[ \t]*include[ \t]+"([^"\n]+)"/g;
377
- /** Included files worth scanning for registration tables (e.g. a generated `.def`). */
378
250
  const INCLUDABLE_EXT = /\.(def|inc|h|hh|hpp|hxx|c|cc|cpp|cxx|ipp|tcc|tbl)$/i;
379
- /** `#define NAME single_identifier` (possibly `struct`-prefixed) — an
380
- * object-macro that COULD alias a struct type name (`resolveTypeName`'s exact
381
- * value shape). The extraction sweep collects every such NAME into a global
382
- * set: an initializer type token that direct-misses the struct layouts still
383
- * survives the registration filter when it is alias-SHAPED anywhere, so the
384
- * per-file macro-env alias resolution (redis' `COMMAND_STRUCT`) keeps working
385
- * without retaining per-file object-macro tables (6.1M `#define`s on the
386
- * Linux tree — the amdgpu register headers — rule that out). Numeric values
387
- * are excluded: `resolveTypeName` would rewrite to a dead-end token that can
388
- * never name a struct, so skipping them is exact, and it drops the register
389
- * flood. */
390
251
  const OBJ_ALIAS_RE = /^[ \t]*#[ \t]*define[ \t]+(\w+)[ \t]+(?:(?:struct|union)[ \t]+)*[A-Za-z_]\w*[ \t\r]*$/gm;
391
- /** `(?:struct )?TYPE name[opt] = {` initializers, where TYPE is a struct that
392
- * has ≥1 fn-pointer field. Handles both single (`= {…}`) and array
393
- * (`[] = { {…}, {…} }`) forms. Macro calls inside an element are expanded first. */
394
252
  const INIT_RE = /(?:^|[;{}])\s*(?:(?:static|const|extern|register|volatile)\s+)*(?:(?:struct|union)\s+)?(\w+)\s+(\w+)\s*(\[[^\]]*\])?\s*=\s*\{/g;
395
- /** `struct TAG { … } var[opt] [= {…}]` — the struct is defined INLINE with the
396
- * table (vim's `cmdname`/`nv_cmd`); its layout never became a node, so parse it
397
- * here and register it before reading the entries. No leading anchor: a
398
- * `struct TAG {` with a brace body is always a definition (it may be preceded
399
- * by a `#define …` line ending in a digit, as in vim), and the trailing
400
- * `var … = {` check below is what distinguishes a TABLE from a plain type. */
401
253
  const INLINE_STRUCT_RE = /\b(?:struct|union)\s+(\w+)\s*\{/g;
402
- /** `(?:static …)* ELEMTYPE [*] name[…] = { … }` — a bare array of function
403
- * pointers (no struct wrapper). The optional `*` covers a function-TYPE
404
- * typedef element (`opcode_t *opcodes[]`); a function-pointer typedef element
405
- * (`zend_rc_dtor_func_t t[]`) needs none. The typedef-set membership gate
406
- * is what separates this from a plain data/struct array. */
407
254
  const ARRAY_TABLE_RE = /(?:^|[;{}])\s*(?:(?:static|const|extern|register|volatile)\s+)*(\w+)\s+(\*\s*)?(\w+)\s*\[[^\]]*\]\s*=\s*\{/g;
408
- /** Dispatch sites: `base->…->field(` or `base.…field(` where `field` is a known
409
- * fn-pointer field. The base may be a chain (`c->cmd->proc`) or carry array
410
- * subscripts (`cmdnames[i].cmd_func`). An optional `)` before the call covers
411
- * the parenthesized form `(cmdnames[i].cmd_func)(&ea)` vim uses. */
412
255
  const DISPATCH_RE = /((?:\w+(?:\s*\[[^\][]*\])?\s*(?:->|\.)\s*)+)(\w+)\s*\)?\s*\(/g;
413
- /** Bare-array dispatch: `tbl[i](…)` or the explicit-deref `(*tbl[i])(…)`. The
414
- * subscript may itself contain a call (`tbl[GC_TYPE(p)](…)`), so the index
415
- * class excludes only brackets. Precision comes from the `arrayReg` gate —
416
- * this fires only when `tbl` is a known fn-pointer array. */
417
256
  const ARRAY_DISPATCH_RE = /(?:\(\s*\*\s*)?\b(\w+)\s*\[[^\][]*\]\s*\)?\s*\(/g;
418
- /** Field←field propagation sites: `a->f = b->g`. */
419
257
  const FIELD_ASSIGN_RE = /(\w+)\s*(?:->|\.)\s*(\w+)\s*=\s*(\w+)\s*(?:->|\.)\s*(\w+)/g;
420
258
  const NO_INCLUDES = [];
421
259
  async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
@@ -423,19 +261,9 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
423
261
  const files = ctx.getAllFiles().filter((f) => C_CPP_EXT.test(f));
424
262
  if (files.length === 0)
425
263
  return [];
426
- // CODEGRAPH_SYNTH_TIMINGS sub-attribution: this pass is 86% of kernel-scale
427
- // synthesis (306s, §7a.2/§7a.3) — per-stage walls + read/strip accounting
428
- // name which stage and which cost class owns it. Post-refactor mapping:
429
- // A = extraction sweep, B = struct-layout linking, C = registration,
430
- // D = propagation, E = dispatch.
431
264
  const prof = process.env.CODEGRAPH_SYNTH_TIMINGS
432
265
  ? { A: 0, B: 0, C: 0, D: 0, E: 0, readMs: 0, readN: 0, stripMs: 0, stripN: 0, nodesMs: 0, nodesN: 0 }
433
266
  : null;
434
- // Within-pass progress: this is the pass that parks the "Linking dynamic
435
- // dispatch" bar on C-heavy repos, so it reports a real fraction of its
436
- // dominant work. `files` is swept once per stage loop below (extraction,
437
- // registration, propagation, dispatch), reported at the same per-16-files
438
- // cadence as the cooperative yield.
439
267
  const FILE_SWEEPS = 4;
440
268
  const tick = async () => {
441
269
  if ((++scannedFiles & 15) === 0) {
@@ -443,22 +271,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
443
271
  await onYield();
444
272
  }
445
273
  };
446
- // Cache raw + stripped source per file, LRU-BOUNDED. The old unbounded Maps
447
- // retained every C/C++ file's raw AND stripped text for the whole pass —
448
- // multiple GB on the Linux kernel, one of the two OOM culprits in #1212.
449
- // The extraction sweep reads sequentially; the linking stages re-request
450
- // only surviving files (plus include units), so access is near-sequential
451
- // and a small LRU hits; a miss just re-reads + re-strips.
452
- // Cache sizing is memory-budget-aware AND all-or-nothing (§7a.3 cFnPtr
453
- // round): a partial LRU is WORSE than useless for cyclic sweeps (a first
454
- // attempt sized ~61k against 63.8k files thrashed to a ~0% cross-sweep hit
455
- // rate). Hold every stripped file (~24KB each measured on the Linux tree)
456
- // only when 40% of the live memory budget covers it; otherwise keep the
457
- // within-stage-locality 128. When the big cache declines (the kernel), the
458
- // survival filters keep the linking stages' re-strips to a fraction of a
459
- // sweep. Slack over files.length: non-indexed includes (.def/.inc, generated
460
- // headers) join the working set mid-pass. Pass-scoped transient, freed on
461
- // return.
462
274
  const fullCacheCap = Math.ceil(files.length * 1.05) + 512;
463
275
  const cacheCap = (0, memory_budget_1.memoryBudgetBytes)() * 0.5 >= fullCacheCap * 24_576 ? fullCacheCap : 128;
464
276
  const rawCache = new lru_cache_1.LRUCache(Math.min(cacheCap, 4096));
@@ -476,9 +288,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
476
288
  };
477
289
  const srcCache = new lru_cache_1.LRUCache(cacheCap);
478
290
  const src = (file) => {
479
- // A cached '' (empty or unreadable file) returns '' where the miss path
480
- // returns null for unreadable — every caller falsy-checks, so the two are
481
- // interchangeable.
482
291
  const hit = srcCache.get(file);
483
292
  if (hit !== undefined)
484
293
  return hit;
@@ -492,9 +301,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
492
301
  srcCache.set(file, s);
493
302
  return r == null ? null : s;
494
303
  };
495
- // Resolve a quoted include relative to the includer's directory, then the
496
- // project root. Returns a project-root-relative path that exists on disk
497
- // (even if it was never indexed — e.g. redis' generated `commands.def`).
498
304
  const resolveInclude = (includer, inc) => {
499
305
  const dir = path.posix.dirname(includer.replace(/\\/g, '/'));
500
306
  const cand = path.posix.normalize(path.posix.join(dir, inc));
@@ -504,11 +310,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
504
310
  return inc;
505
311
  return null;
506
312
  };
507
- // Retained strings are interned through here. Regex captures off a big file
508
- // string are V8 sliced strings — retaining one pins the whole parent file
509
- // text, and the facts tables retain captures from EVERY file for the whole
510
- // pass. The Buffer round-trip forces a flat copy on first sight; repeats
511
- // (field names recur heavily) then share the one flat instance.
512
313
  const interned = new Map();
513
314
  const intern = (x) => {
514
315
  let f = interned.get(x);
@@ -518,25 +319,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
518
319
  }
519
320
  return f;
520
321
  };
521
- // ---- Global tables the extraction sweep fills ----
522
- // fn-pointer: typedef RET (*NAME)(…) → a field `NAME f` is a fn ptr
523
- // fn-type: typedef RET NAME(params) → a field `NAME *f` is a fn ptr
524
- // The fn-type form is redis' command idiom: `typedef void redisCommandProc(client*)`
525
- // declared as `redisCommandProc *proc;`. Without this, `proc` reads as data.
526
322
  const fnPtrTypedefs = new Set();
527
323
  const fnTypeTypedefs = new Set();
528
- /** Struct node id → its structurally-parsed fields (classified + registered
529
- * in the linking stage, in kind-scan order). */
530
324
  const rawFieldsByNode = new Map();
531
325
  const factsByFile = new Map();
532
- /** Every inline-struct candidate tag anywhere — an over-approximation of the
533
- * tags the registration stage can add to `structLayout` mid-stage, folded
534
- * into the registration filter's layout check. */
535
326
  const inlineTags = new Set();
536
- /** Object-macro names with an alias-shaped value anywhere (see OBJ_ALIAS_RE). */
537
327
  const aliasNames = new Set();
538
- // Parse a struct body (the text between its `{` and `}`) into ordered fields,
539
- // structure only — see RawFieldDecl for why classification is deferred.
540
328
  const parseStructFieldsRaw = (inner) => {
541
329
  const fields = [];
542
330
  let idx = 0;
@@ -544,9 +332,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
544
332
  const decl = rawDecl.trim();
545
333
  if (!decl)
546
334
  continue;
547
- // A field decl can declare several names sharing a leading type:
548
- // `struct redisCommand *cmd, *lastcmd;`. Each declarator is its own
549
- // positional slot and carries that type (so `client.cmd → redisCommand`).
550
335
  const parts = splitTopLevel(decl, ',');
551
336
  const firstTyped = parts[0].match(/(\w+)\s+\**\s*(\w+)\s*$/);
552
337
  const sharedType = firstTyped ? firstTyped[1] : '';
@@ -557,7 +342,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
557
342
  let ptr = false;
558
343
  const pm = p.match(FNPTR_DECL_RE);
559
344
  if (pm) {
560
- name = pm[1]; // `… (*name)(…)` — a function pointer
345
+ name = pm[1];
561
346
  ptr = true;
562
347
  }
563
348
  else if (pi === 0) {
@@ -567,23 +352,18 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
567
352
  }
568
353
  }
569
354
  else {
570
- // a subsequent declarator: `*name` / `**name` / `name`
571
355
  const dm = p.match(/^\**\s*(\w+)/);
572
356
  if (dm) {
573
357
  name = dm[1];
574
358
  type = sharedType;
575
359
  }
576
360
  }
577
- // Always advance the positional index. An unparsed field (anonymous
578
- // union, exotic declarator) still occupies one slot, and macro-expanded
579
- // positional tables (redis' MAKE_CMD) only align if every field counts.
580
361
  fields.push({ name, index: idx, ptr, type });
581
362
  idx++;
582
363
  }
583
364
  }
584
365
  return fields;
585
366
  };
586
- // Classify deferred fields against the (now-complete) typedef sets.
587
367
  const classifyFields = (rawFields) => rawFields.map((f) => ({
588
368
  name: f.name ?? '',
589
369
  index: f.index,
@@ -592,7 +372,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
592
372
  type: f.type,
593
373
  }));
594
374
  const parseStructFields = (inner) => classifyFields(parseStructFieldsRaw(inner));
595
- // Exact per-file include resolution (from RAW source — string contents survive).
596
375
  const scanIncludes = (file) => {
597
376
  const rawText = raw(file);
598
377
  if (!rawText || !rawText.includes('include'))
@@ -609,8 +388,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
609
388
  }
610
389
  return out.length ? out : NO_INCLUDES;
611
390
  };
612
- // Indexed files answer from their facts; non-indexed includes (reached by
613
- // buildEnv's depth-2 recursion) fall back to a bounded lazy scan.
614
391
  const includeCache = new lru_cache_1.LRUCache(1024);
615
392
  const localIncludesOf = (file) => {
616
393
  const f = factsByFile.get(file);
@@ -623,18 +400,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
623
400
  includeCache.set(file, out);
624
401
  return out;
625
402
  };
626
- // ---- Stage A: the extraction sweep — ONE read + strip per file ----
627
- //
628
- // Two implementations, record-identical by the differential suite:
629
- // • native (task #5 step 2): the kernel's `cfnptrScanFiles` strips and
630
- // scans a BATCH of files per NAPI call (codegraph-kernel/src/cfnptr.rs —
631
- // hand-rolled byte machines replicating the JS regex semantics), and the
632
- // TS side only reads files, ships batches, and interns the returned
633
- // facts. Include-path resolution stays here (it needs the filesystem).
634
- // • JS: the original sweep, kept verbatim — the fallback for platforms
635
- // without a kernel binary, older binaries (feature detection), the
636
- // CODEGRAPH_KERNEL=0 kill switch, and CODEGRAPH_KERNEL_CFNPTR=0 (this
637
- // scanner's own switch).
638
403
  const kernel = process.env.CODEGRAPH_KERNEL === '0' || process.env.CODEGRAPH_KERNEL_CFNPTR === '0'
639
404
  ? null
640
405
  : (0, loader_1.getKernel)();
@@ -646,7 +411,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
646
411
  fnTypeTypedefs.add(intern(t));
647
412
  for (const so of out.structs) {
648
413
  if (!so.parsed)
649
- continue; // body never parsed — the JS sweep records nothing either
414
+ continue;
650
415
  rawFieldsByNode.set(so.id, so.fields.map((f) => ({ name: f.name || null, index: f.index, ptr: f.ptr, type: f.type })));
651
416
  }
652
417
  for (const t of out.inlineTags)
@@ -677,8 +442,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
677
442
  };
678
443
  let tPass = Date.now();
679
444
  if (nativeSweep) {
680
- // Batch of 16 = the tick/onFraction cadence, so yielding and progress
681
- // reporting keep their shape while the boundary crossing amortizes.
682
445
  const BATCH = 16;
683
446
  let batch = [];
684
447
  const flush = () => {
@@ -693,7 +456,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
693
456
  await tick();
694
457
  const rawText = raw(file);
695
458
  if (!rawText)
696
- continue; // unreadable or empty — the JS sweep skips these too
459
+ continue;
697
460
  const tN = prof ? Date.now() : 0;
698
461
  const fileNodes = ctx.getNodesInFile(file);
699
462
  if (prof) {
@@ -704,9 +467,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
704
467
  for (const st of fileNodes) {
705
468
  if (st.kind !== 'struct' && st.kind !== 'union')
706
469
  continue;
707
- // sliceLinesPre semantics ride along: falsy startLine never parses,
708
- // and `endLine ?? startLine` is applied here so the kernel sees the
709
- // exact slice bounds the JS sweep would use.
710
470
  structs.push({ id: st.id, startLine: st.startLine ?? 0, endLine: st.endLine ?? st.startLine ?? 0 });
711
471
  }
712
472
  batch.push({ file, input: { text: rawText, structs } });
@@ -715,14 +475,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
715
475
  }
716
476
  flush();
717
477
  }
718
- // JS sweep (fallback path — see the stage comment above).
719
478
  if (!nativeSweep)
720
479
  for (const file of files) {
721
480
  await tick();
722
481
  const s = src(file);
723
482
  if (!s)
724
483
  continue;
725
- // Typedefs (cross-file).
726
484
  if (s.includes('typedef')) {
727
485
  FNPTR_TYPEDEF_RE.lastIndex = 0;
728
486
  let m;
@@ -732,13 +490,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
732
490
  while ((m = FNTYPE_TYPEDEF_STMT_RE.exec(s))) {
733
491
  const guts = m[1];
734
492
  if (guts.includes('(*') || guts.includes('( *'))
735
- continue; // pointer form — handled above
736
- const fm = guts.match(/\b(\w+)\s*\(/); // last identifier before the param list
493
+ continue;
494
+ const fm = guts.match(/\b(\w+)\s*\(/);
737
495
  if (fm && !C_TYPE_KEYWORDS.has(fm[1]))
738
496
  fnTypeTypedefs.add(intern(fm[1]));
739
497
  }
740
498
  }
741
- // Struct-node field declarations (registered later in kind-scan order).
742
499
  const tN = prof ? Date.now() : 0;
743
500
  const fileNodes = ctx.getNodesInFile(file);
744
501
  if (prof) {
@@ -757,10 +514,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
757
514
  continue;
758
515
  rawFieldsByNode.set(st.id, parseStructFieldsRaw(body.slice(open + 1, close)));
759
516
  }
760
- // Registration filters. These are full-file, NO-SKIP scans: the original
761
- // registration pass jumps its scan cursor past a processed initializer
762
- // body, so a no-skip scan finds a SUPERSET of its matches — exactly the
763
- // over-approximation the filter needs.
764
517
  const initTokens = new Set();
765
518
  const arrayElems = new Set();
766
519
  const inlineTypes = new Set();
@@ -773,7 +526,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
773
526
  const sClose = matchBrace(s, sOpen);
774
527
  if (sClose < 0)
775
528
  continue;
776
- // After `}`, expect `var [opt] [= {…}]` to be a table candidate.
777
529
  const vm = s.slice(sClose + 1).match(/^\s*(\w+)\s*(\[[^\]]*\])?\s*(=\s*\{)?/);
778
530
  if (!vm || !vm[1])
779
531
  continue;
@@ -797,7 +549,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
797
549
  arrayElems.add(intern((m[2] ? '*' : '') + m[1]));
798
550
  }
799
551
  }
800
- // Alias-shaped object macros (registration filter support).
801
552
  if (s.includes('#define') || s.includes('# define')) {
802
553
  const joined = s.replace(/\\\r?\n/g, ' ');
803
554
  OBJ_ALIAS_RE.lastIndex = 0;
@@ -805,8 +556,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
805
556
  while ((m = OBJ_ALIAS_RE.exec(joined)))
806
557
  aliasNames.add(intern(m[1]));
807
558
  }
808
- // Propagation + dispatch filters (full-file scans ⊇ the per-function-body
809
- // scans the pass bodies run — a body slice is a substring of the file).
810
559
  const dPairs = new Set();
811
560
  if (s.includes('=')) {
812
561
  FIELD_ASSIGN_RE.lastIndex = 0;
@@ -842,21 +591,9 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
842
591
  prof.A = Date.now() - tPass;
843
592
  tPass = Date.now();
844
593
  }
845
- // ---- Stage B: struct field layouts (linking — text-free) ----
846
- // structLayout: struct name → ordered fields, for structs with ≥1 fn-pointer
847
- // field (drives positional registration + dispatch).
848
- // allStructFields: EVERY struct name → ALL its field layouts (a name can be
849
- // reused across files — e.g. redis has two unrelated `client` structs), used
850
- // to walk a chained receiver's field types (`c->cmd->proc`: client.cmd →
851
- // redisCommand). The walk searches every same-named layout for the field.
852
- // fieldToStructs: fn-pointer field name → set of struct names that declare it.
853
- // Registration REPLAYS the struct kind-scan (rowid order, ≠ the extraction
854
- // sweep's path order): same-name layout precedence — `structLayout.set`
855
- // last-wins, `allStructFields` first-match in the chain walk — depends on it.
856
594
  const structLayout = new Map();
857
595
  const allStructFields = new Map();
858
596
  const fieldToStructs = new Map();
859
- // Register a parsed struct under `name` into the three indexes.
860
597
  const registerStructLayout = (name, fields) => {
861
598
  if (!allStructFields.has(name))
862
599
  allStructFields.set(name, []);
@@ -879,7 +616,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
879
616
  continue;
880
617
  const rawFields = rawFieldsByNode.get(st.id);
881
618
  if (!rawFields)
882
- continue; // file unreadable or body unparsable at sweep time — the old pass skipped it too
619
+ continue;
883
620
  registerStructLayout(st.name, classifyFields(rawFields));
884
621
  }
885
622
  }
@@ -888,17 +625,9 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
888
625
  prof.B = Date.now() - tPass;
889
626
  tPass = Date.now();
890
627
  }
891
- // NB: no early return on an empty structLayout here — an inline `struct TAG
892
- // { … } var[]` table whose struct never became a node (vim's `cmdname`, broken
893
- // up by `#ifdef`) is discovered later during the unit scan. The `reg.size === 0`
894
- // guard after registration still short-circuits when nothing bridges.
895
628
  const fnPtrFieldOf = (struct, field) => !!structLayout.get(struct)?.some((f) => f.name === field && f.isFnPtr);
896
- // C/C++ function + method nodes are STREAMED per stage (see D/E) —
897
- // the old materialized `cFns` array held every function node on the repo
898
- // (O(nodes) memory, part of the #1212 kernel OOM).
899
- // ---- function-name → node resolution (prefer a function in the same file) ----
900
629
  const resolveFn = (name, preferFile) => {
901
- const cands = ctx.getNodesByName(name).filter((n) => FN_KINDS.has(n.kind));
630
+ const cands = ctx.getNodesByName(name).filter((n) => FN_KINDS.has(n.kind) && C_CPP_EXT.test(n.filePath));
902
631
  if (cands.length === 0)
903
632
  return null;
904
633
  if (cands.length === 1)
@@ -910,9 +639,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
910
639
  }
911
640
  return cands[0];
912
641
  };
913
- // ---- Stage C: registrations — Map<"struct.field", Set<funcNodeId>> ----
914
- // Ids only — retaining the full Node per registration (the old `idToNode`)
915
- // was write-only dead weight at O(registrations) memory.
916
642
  const reg = new Map();
917
643
  const addReg = (struct, field, fn) => {
918
644
  const key = `${struct}.${field}`;
@@ -920,10 +646,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
920
646
  reg.set(key, new Set());
921
647
  reg.get(key).add(fn.id);
922
648
  };
923
- // Bare arrays-of-fn-pointers (no struct): array VARIABLE name → per-file sets
924
- // of registered function ids. Multi-entry because a file-scope `static` table
925
- // name can recur across files (SameBoy declares `static opcode_t *opcodes[256]`
926
- // in BOTH sm83_cpu.c and sm83_disassembler.c), so dispatch resolves same-file.
927
649
  const arrayReg = new Map();
928
650
  const addArrayReg = (name, file, fn) => {
929
651
  let entries = arrayReg.get(name);
@@ -938,17 +660,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
938
660
  }
939
661
  e.ids.add(fn.id);
940
662
  };
941
- // A struct value `{ … }` (one element) — register its function entries to the
942
- // struct's fields, by `.field = fn` designators or by positional slot.
943
663
  const registerStructValue = (struct, valueBody, file, env) => {
944
664
  const layout = structLayout.get(struct);
945
665
  if (!layout)
946
666
  return;
947
667
  if (env && env.size)
948
668
  valueBody = expandMacroCalls(valueBody, env);
949
- // A macro can expand to a whole brace-wrapped element (sqlite's
950
- // `FUNCTION(…)` → `{nArg, …, xFunc, …}`); peel one outer layer so the
951
- // positional slots are visible.
952
669
  valueBody = valueBody.trim();
953
670
  if (valueBody.startsWith('{')) {
954
671
  const e = matchBrace(valueBody, 0);
@@ -969,7 +686,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
969
686
  if (fn)
970
687
  addReg(struct, field, fn);
971
688
  }
972
- // a designated item does not advance positional counting
973
689
  continue;
974
690
  }
975
691
  const field = layout.find((f) => f.index === pos);
@@ -984,13 +700,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
984
700
  pos++;
985
701
  }
986
702
  };
987
- // Collect the literal function entries of an array-of-fn-pointers initializer
988
- // and register them under the array's variable name. Entries may be positional
989
- // (`fn`, `&fn`), designated by index (`[OP] = fn`), or cast-wrapped
990
- // (`(handler_t)fn`, as in php's Zend dtor table). Non-identifier entries
991
- // (`NULL`, `0`, a nested expression) are skipped — a miss, never a wrong edge.
992
- // No index tracking: a runtime subscript fans the dispatch out to the whole
993
- // set, exactly like a command table reaches every command.
994
703
  const registerArrayValue = (name, body, file, env) => {
995
704
  if (env && env.size)
996
705
  body = expandMacroCalls(body, env);
@@ -998,10 +707,10 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
998
707
  let item = rawItem.trim();
999
708
  if (!item)
1000
709
  continue;
1001
- const des = item.match(/^\[[^\]]*\]\s*=\s*([\s\S]*)$/); // `[IDX] = …` designator
710
+ const des = item.match(/^\[[^\]]*\]\s*=\s*([\s\S]*)$/);
1002
711
  if (des)
1003
712
  item = des[1].trim();
1004
- item = item.replace(/^\((?:[\w\s*]+)\)\s*/, '').replace(/^&\s*/, '').trim(); // (cast) / &
713
+ item = item.replace(/^\((?:[\w\s*]+)\)\s*/, '').replace(/^&\s*/, '').trim();
1005
714
  const id = item.match(/^(\w+)$/);
1006
715
  if (!id)
1007
716
  continue;
@@ -1010,12 +719,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1010
719
  addArrayReg(name, file, fn);
1011
720
  }
1012
721
  };
1013
- // Per-file macro + include parsing (any file, indexed or not), cached.
1014
- // Derived per-file caches, LRU-bounded like the content caches (#1212).
1015
- // These stay LAZY (recompute-on-miss through `src`): retaining every file's
1016
- // parsed tables is ruled out by the kernel's 6.1M `#define`s, and the
1017
- // registration stage below only builds an env for files that survive its
1018
- // filter or carry local includes, so most files never need one.
1019
722
  const fnMacroCache = new lru_cache_1.LRUCache(256);
1020
723
  const fileFnMacros = (file) => {
1021
724
  let m = fnMacroCache.get(file);
@@ -1043,11 +746,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1043
746
  }
1044
747
  return d;
1045
748
  };
1046
- // A file's effective macro environment = its own #defines PLUS those of the
1047
- // headers it #includes (redis' `MAKE_CMD` sits beside the table; sqlite's
1048
- // `FUNCTION` lives in `sqliteInt.h`, included by the file with the table).
1049
- // First writer wins, so the file's own defs override included ones; depth-2
1050
- // covers a macro defined in a header-of-a-header.
1051
749
  const buildEnv = (file, depth, seen, fn, obj, def) => {
1052
750
  if (depth < 0 || seen.has(file))
1053
751
  return;
@@ -1065,10 +763,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1065
763
  };
1066
764
  const indexedSet = new Set(files);
1067
765
  const seenInclude = new Set();
1068
- // Global variable → struct type, for resolving a dispatch through a file-scope
1069
- // table by subscript (`cmdnames[i].cmd_func(…)`).
1070
766
  const globalVarType = new Map();
1071
- // Process a `{ … }` initializer body (array of elements or a single struct).
1072
767
  const processInit = (struct, body, isArray, file, env) => {
1073
768
  if (isArray) {
1074
769
  for (const el of splitTopLevel(body, ',')) {
@@ -1079,7 +774,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1079
774
  registerStructValue(struct, t.slice(1, e), file, env);
1080
775
  }
1081
776
  else if (t) {
1082
- // an element built by a macro (`MAKE_CMD(…)`/`FUNCTION(…)`) or a bare value
1083
777
  registerStructValue(struct, t, file, env);
1084
778
  }
1085
779
  }
@@ -1088,9 +782,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1088
782
  registerStructValue(struct, body, file, env);
1089
783
  }
1090
784
  };
1091
- // Process ONE unit's text and discard it. The old shape built every unit up
1092
- // front (`const units: Unit[]`) — the full text of every C file plus its
1093
- // expanded includes held simultaneously, gigabytes on the kernel (#1212).
1094
785
  const processUnit = (unit) => {
1095
786
  const s = unit.text;
1096
787
  if (!s || !s.includes('{'))
@@ -1099,18 +790,17 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1099
790
  let im;
1100
791
  while ((im = INLINE_STRUCT_RE.exec(s))) {
1101
792
  const tag = im[1];
1102
- const sOpen = im.index + im[0].length - 1; // the struct body's `{`
793
+ const sOpen = im.index + im[0].length - 1;
1103
794
  const sClose = matchBrace(s, sOpen);
1104
795
  if (sClose < 0)
1105
796
  continue;
1106
- // After `}`, expect `var [opt] [= {…}]` to be a table; else it's a plain type.
1107
797
  const after = s.slice(sClose + 1);
1108
798
  const vm = after.match(/^\s*(\w+)\s*(\[[^\]]*\])?\s*(=\s*\{)?/);
1109
799
  if (!vm || !vm[1])
1110
800
  continue;
1111
801
  const fields = parseStructFields(s.slice(sOpen + 1, sClose));
1112
802
  if (!fields.some((f) => f.isFnPtr))
1113
- continue; // only tables of fn pointers matter
803
+ continue;
1114
804
  if (!structLayout.has(tag))
1115
805
  registerStructLayout(tag, fields);
1116
806
  globalVarType.set(vm[1], tag);
@@ -1134,7 +824,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1134
824
  if (!structLayout.has(struct))
1135
825
  continue;
1136
826
  const isArray = !!m[3];
1137
- const open = m.index + m[0].length - 1; // points at the `{`
827
+ const open = m.index + m[0].length - 1;
1138
828
  const close = matchBrace(s, open);
1139
829
  if (close < 0)
1140
830
  continue;
@@ -1142,10 +832,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1142
832
  processInit(struct, s.slice(open + 1, close), isArray, unit.file, unit.env);
1143
833
  INIT_RE.lastIndex = close;
1144
834
  }
1145
- // Bare arrays-of-function-pointers (no struct, no field). Gated on the
1146
- // element type being a function typedef — a fn-TYPE typedef needs the `*`
1147
- // (array of pointers to it), a fn-pointer typedef does not. A data or
1148
- // struct array's element type is never in these sets, so it never fires.
1149
835
  ARRAY_TABLE_RE.lastIndex = 0;
1150
836
  let am;
1151
837
  while ((am = ARRAY_TABLE_RE.exec(s))) {
@@ -1153,7 +839,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1153
839
  const hasStar = !!am[2];
1154
840
  if (!((fnTypeTypedefs.has(elemType) && hasStar) || fnPtrTypedefs.has(elemType)))
1155
841
  continue;
1156
- const open = am.index + am[0].length - 1; // the `{`
842
+ const open = am.index + am[0].length - 1;
1157
843
  const close = matchBrace(s, open);
1158
844
  if (close < 0)
1159
845
  continue;
@@ -1161,29 +847,16 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1161
847
  ARRAY_TABLE_RE.lastIndex = close;
1162
848
  }
1163
849
  };
1164
- // Can this file's OWN unit have any side effect? Every check mirrors a gate
1165
- // in processUnit, over-approximated to the filter's coarser knowledge:
1166
- // • inline structs — the fn-ptr-field gate, with per-candidate field types
1167
- // unioned per file;
1168
- // • initializers — `structLayout.has` against the layouts' SUPERSET
1169
- // (kind-scan layouts ∪ every inline tag — structLayout only grows during
1170
- // this stage), with alias-shaped tokens surviving in place of the
1171
- // per-file `resolveTypeName` walk;
1172
- // • bare arrays — the exact typedef-set gate.
1173
- // A filtered-out file is one where every match fails its gate before any
1174
- // side effect, so skipping the unit cannot change the outcome.
1175
850
  const typedefHit = (t) => fnPtrTypedefs.has(t) || fnTypeTypedefs.has(t);
1176
851
  const regSurvives = (f) => f.inlinePtr ||
1177
852
  (f.inlineTypes?.some(typedefHit) ?? false) ||
1178
853
  (f.initTokens?.some((t) => structLayout.has(t) || inlineTags.has(t) || aliasNames.has(t)) ?? false) ||
1179
- (f.arrayElems?.some((e) => e.charCodeAt(0) === 42 /* '*' */ ? typedefHit(e.slice(1)) : fnPtrTypedefs.has(e)) ?? false);
1180
- // ---- Stage C: registrations — stream each surviving file (and every file's
1181
- // qualifying local includes) through processUnit, one at a time.
854
+ (f.arrayElems?.some((e) => e.charCodeAt(0) === 42 ? typedefHit(e.slice(1)) : fnPtrTypedefs.has(e)) ?? false);
1182
855
  for (const file of files) {
1183
856
  await tick();
1184
857
  const facts = factsByFile.get(file);
1185
858
  if (!facts)
1186
- continue; // no facts ⇒ nothing matched at sweep time ⇒ the old pass would no-op here
859
+ continue;
1187
860
  const survives = regSurvives(facts);
1188
861
  if (!survives && facts.includes.length === 0)
1189
862
  continue;
@@ -1203,18 +876,12 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1203
876
  if (!incSrc)
1204
877
  continue;
1205
878
  if (indexedSet.has(target)) {
1206
- // Re-scan an indexed header only when this includer unlocks guarded code.
1207
879
  const ownDef = fileDefinedNames(target);
1208
880
  const adds = [...defined].some((n) => !ownDef.has(n));
1209
881
  if (!adds || !/#\s*if/.test(incSrc))
1210
882
  continue;
1211
883
  }
1212
884
  seenInclude.add(`${file}>${target}`);
1213
- // The include is pasted into the includer — evaluate its conditionals in
1214
- // the includer's defined set (a no-op when it has none). Re-parse the
1215
- // included file's OWN macros from that resolved text so a macro it defines
1216
- // conditionally (vim's `EXCMD`, whose plain last-wins parse picks the enum
1217
- // arm) overrides with the ARM THAT IS ACTUALLY ACTIVE here.
1218
885
  const text = evalConditionals(incSrc, defined);
1219
886
  const incEnv = new Map(env);
1220
887
  for (const [k, v] of parseFunctionMacros(text))
@@ -1229,9 +896,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1229
896
  prof.C = Date.now() - tPass;
1230
897
  tPass = Date.now();
1231
898
  }
1232
- // ---- receiver-type resolution within a function's source ----
1233
- // `(?:struct )?TYPE [*]recv` declared in the params or body → TYPE (if a known
1234
- // fn-pointer-bearing struct).
1235
899
  const recvReCache = new lru_cache_1.LRUCache(4096);
1236
900
  const recvTypeIn = (fnSrc, recv) => {
1237
901
  let re = recvReCache.get(recv);
@@ -1247,9 +911,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1247
911
  }
1248
912
  return null;
1249
913
  };
1250
- // Declared type of a local/param `v` — ANY type token, not just fn-pointer
1251
- // structs (the base of a chained receiver needn't carry a fn pointer itself).
1252
- // Falls back to a file-scope table variable (`cmdnames` in `cmdnames[i].fn()`).
1253
914
  const escapeRe = (x) => x.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
1254
915
  const varReCache = new lru_cache_1.LRUCache(4096);
1255
916
  const varTypeIn = (fnSrc, v) => {
@@ -1266,10 +927,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1266
927
  }
1267
928
  return globalVarType.get(v) ?? null;
1268
929
  };
1269
- // Resolve a member-access chain (`c->cmd`, or just `p`) to a struct type,
1270
- // walking each segment's declared field type. `c->cmd->proc` dispatch:
1271
- // base chain `c->cmd` → client.cmd's type `redisCommand`, the proc owner.
1272
- // Array subscripts (`cmdnames[i]`) are stripped — an index yields one element.
1273
930
  const resolveChainType = (fnSrc, chain) => {
1274
931
  const segs = chain.replace(/\s*\[[^\]]*\]/g, '').split(/\s*(?:->|\.)\s*/).filter(Boolean);
1275
932
  if (segs.length === 0)
@@ -1288,12 +945,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1288
945
  }
1289
946
  return t;
1290
947
  };
1291
- // ---- Stage D: field←field propagation (`a->f = b->g`) ----
1292
- // Collected as (targetStruct.field ← sourceStruct.field) pairs, then merged to
1293
- // a fixpoint so a hook slot inherits a registry field's handlers.
1294
- // Filter: a file matters only if SOME collected pair has BOTH fields known as
1295
- // fn-pointer fields — the loop body's own pre-gate. A skipped file's matches
1296
- // would all `continue` there, so skipping is side-effect-free.
1297
948
  const propagations = [];
1298
949
  for (const file of files) {
1299
950
  await tick();
@@ -1323,10 +974,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1323
974
  let m;
1324
975
  while ((m = FIELD_ASSIGN_RE.exec(body))) {
1325
976
  const [, lrecv, lfield, rrecv, rfield] = m;
1326
- // Pre-gate on field NAMES: `a->f = b->g` matches every struct-field
1327
- // assignment in the tree (millions on the kernel), but only fields
1328
- // that are fn-pointer fields of SOME struct can pass fnPtrFieldOf —
1329
- // skip the two regex type resolutions for the ~99% that can't.
1330
977
  if (!fieldToStructs.has(lfield) || !fieldToStructs.has(rfield))
1331
978
  continue;
1332
979
  const lt = recvTypeIn(body, lrecv);
@@ -1362,11 +1009,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1362
1009
  }
1363
1010
  if (reg.size === 0 && arrayReg.size === 0)
1364
1011
  return [];
1365
- // ---- Stage E: dispatch sites → edges ----
1366
- // Filter: a file matters only if some dispatch field is a known fn-pointer
1367
- // field, or some subscripted name is a registered fn-pointer array — the loop
1368
- // body's own first gates (`owners` / `entries`), which a skipped file's
1369
- // matches would all fail before touching `seen`/`added`/`edges`.
1370
1012
  const edges = [];
1371
1013
  const seen = new Set();
1372
1014
  for (const file of files) {
@@ -1395,9 +1037,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1395
1037
  DISPATCH_RE.lastIndex = 0;
1396
1038
  let m;
1397
1039
  let added = 0;
1398
- // Incremental line counting: matches arrive in ascending index order, so
1399
- // count newlines since the previous match instead of re-splitting the
1400
- // whole body prefix per match (O(body) each — real time on god-files).
1401
1040
  let lcIdx = 0;
1402
1041
  let lcLine = fn.startLine;
1403
1042
  const lineAt = (idx) => {
@@ -1408,14 +1047,11 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1408
1047
  return lcLine;
1409
1048
  };
1410
1049
  while ((m = DISPATCH_RE.exec(body)) && added < FANOUT_CAP) {
1411
- const baseChain = m[1].replace(/\s*(?:->|\.)\s*$/, '').trim(); // receiver, minus the trailing arrow
1050
+ const baseChain = m[1].replace(/\s*(?:->|\.)\s*$/, '').trim();
1412
1051
  const field = m[2];
1413
1052
  const owners = fieldToStructs.get(field);
1414
1053
  if (!owners || owners.size === 0)
1415
1054
  continue;
1416
- // 1) resolve the receiver chain's struct type precisely (handles c->cmd->proc);
1417
- // 2) else the last segment as a simple local/param of a fn-pointer-bearing struct;
1418
- // 3) else fall back to a field name that belongs to exactly one struct.
1419
1055
  let struct = resolveChainType(body, baseChain);
1420
1056
  if (!struct || !owners.has(struct)) {
1421
1057
  const lastSeg = baseChain.replace(/\s*\[[^\]]*\]/g, '').split(/\s*(?:->|\.)\s*/).pop();
@@ -1453,9 +1089,7 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1453
1089
  break;
1454
1090
  }
1455
1091
  }
1456
- // ---- bare array-of-fn-pointers dispatch (`tbl[i](…)`) ----
1457
1092
  if (arrayReg.size && added < FANOUT_CAP) {
1458
- // Fresh scan from the body's start — rewind the line-count cursor too.
1459
1093
  lcIdx = 0;
1460
1094
  lcLine = fn.startLine;
1461
1095
  ARRAY_DISPATCH_RE.lastIndex = 0;
@@ -1463,8 +1097,6 @@ async function cFnPointerDispatchEdges(_queries, ctx, onYield, onFraction) {
1463
1097
  const entries = arrayReg.get(m[1]);
1464
1098
  if (!entries)
1465
1099
  continue;
1466
- // Same-file table wins on a name collision (two file-local `opcodes`);
1467
- // a unique name resolves cross-file; otherwise ambiguous — bail.
1468
1100
  const ids = entries.length === 1
1469
1101
  ? entries[0].ids
1470
1102
  : (entries.find((e) => e.file === fn.filePath)?.ids ?? null);