codegraph-java 0.1.0

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 (866) hide show
  1. package/README.md +131 -0
  2. package/dist/base-graph/index.d.ts +57 -0
  3. package/dist/base-graph/index.d.ts.map +1 -0
  4. package/dist/base-graph/index.js +175 -0
  5. package/dist/base-graph/index.js.map +1 -0
  6. package/dist/bin/codegraph.d.ts +28 -0
  7. package/dist/bin/codegraph.d.ts.map +1 -0
  8. package/dist/bin/codegraph.js +2615 -0
  9. package/dist/bin/codegraph.js.map +1 -0
  10. package/dist/bin/command-supervision.d.ts +49 -0
  11. package/dist/bin/command-supervision.d.ts.map +1 -0
  12. package/dist/bin/command-supervision.js +95 -0
  13. package/dist/bin/command-supervision.js.map +1 -0
  14. package/dist/bin/fatal-handler.d.ts +20 -0
  15. package/dist/bin/fatal-handler.d.ts.map +1 -0
  16. package/dist/bin/fatal-handler.js +118 -0
  17. package/dist/bin/fatal-handler.js.map +1 -0
  18. package/dist/bin/node-version-check.d.ts +45 -0
  19. package/dist/bin/node-version-check.d.ts.map +1 -0
  20. package/dist/bin/node-version-check.js +98 -0
  21. package/dist/bin/node-version-check.js.map +1 -0
  22. package/dist/bin/uninstall.d.ts +14 -0
  23. package/dist/bin/uninstall.d.ts.map +1 -0
  24. package/dist/bin/uninstall.js +36 -0
  25. package/dist/bin/uninstall.js.map +1 -0
  26. package/dist/context/formatter.d.ts +36 -0
  27. package/dist/context/formatter.d.ts.map +1 -0
  28. package/dist/context/formatter.js +269 -0
  29. package/dist/context/formatter.js.map +1 -0
  30. package/dist/context/index.d.ts +131 -0
  31. package/dist/context/index.d.ts.map +1 -0
  32. package/dist/context/index.js +1378 -0
  33. package/dist/context/index.js.map +1 -0
  34. package/dist/context/markers.d.ts +19 -0
  35. package/dist/context/markers.d.ts.map +1 -0
  36. package/dist/context/markers.js +22 -0
  37. package/dist/context/markers.js.map +1 -0
  38. package/dist/db/index.d.ts +380 -0
  39. package/dist/db/index.d.ts.map +1 -0
  40. package/dist/db/index.js +854 -0
  41. package/dist/db/index.js.map +1 -0
  42. package/dist/db/migrations.d.ts +44 -0
  43. package/dist/db/migrations.d.ts.map +1 -0
  44. package/dist/db/migrations.js +255 -0
  45. package/dist/db/migrations.js.map +1 -0
  46. package/dist/db/queries.d.ts +1060 -0
  47. package/dist/db/queries.d.ts.map +1 -0
  48. package/dist/db/queries.js +3191 -0
  49. package/dist/db/queries.js.map +1 -0
  50. package/dist/db/schema.sql +209 -0
  51. package/dist/db/sqlite-adapter.d.ts +55 -0
  52. package/dist/db/sqlite-adapter.d.ts.map +1 -0
  53. package/dist/db/sqlite-adapter.js +135 -0
  54. package/dist/db/sqlite-adapter.js.map +1 -0
  55. package/dist/db/wal-valve.d.ts +119 -0
  56. package/dist/db/wal-valve.d.ts.map +1 -0
  57. package/dist/db/wal-valve.js +290 -0
  58. package/dist/db/wal-valve.js.map +1 -0
  59. package/dist/directory.d.ts +213 -0
  60. package/dist/directory.d.ts.map +1 -0
  61. package/dist/directory.js +781 -0
  62. package/dist/directory.js.map +1 -0
  63. package/dist/errors.d.ts +150 -0
  64. package/dist/errors.d.ts.map +1 -0
  65. package/dist/errors.js +234 -0
  66. package/dist/errors.js.map +1 -0
  67. package/dist/extraction/extraction-version.d.ts +25 -0
  68. package/dist/extraction/extraction-version.d.ts.map +1 -0
  69. package/dist/extraction/extraction-version.js +28 -0
  70. package/dist/extraction/extraction-version.js.map +1 -0
  71. package/dist/extraction/function-ref.d.ts +118 -0
  72. package/dist/extraction/function-ref.d.ts.map +1 -0
  73. package/dist/extraction/function-ref.js +746 -0
  74. package/dist/extraction/function-ref.js.map +1 -0
  75. package/dist/extraction/generated-detection.d.ts +66 -0
  76. package/dist/extraction/generated-detection.d.ts.map +1 -0
  77. package/dist/extraction/generated-detection.js +248 -0
  78. package/dist/extraction/generated-detection.js.map +1 -0
  79. package/dist/extraction/grammars.d.ts +148 -0
  80. package/dist/extraction/grammars.d.ts.map +1 -0
  81. package/dist/extraction/grammars.js +558 -0
  82. package/dist/extraction/grammars.js.map +1 -0
  83. package/dist/extraction/index.d.ts +367 -0
  84. package/dist/extraction/index.d.ts.map +1 -0
  85. package/dist/extraction/index.js +2833 -0
  86. package/dist/extraction/index.js.map +1 -0
  87. package/dist/extraction/kernel/decode.d.ts +9 -0
  88. package/dist/extraction/kernel/decode.d.ts.map +1 -0
  89. package/dist/extraction/kernel/decode.js +162 -0
  90. package/dist/extraction/kernel/decode.js.map +1 -0
  91. package/dist/extraction/kernel/index.d.ts +64 -0
  92. package/dist/extraction/kernel/index.d.ts.map +1 -0
  93. package/dist/extraction/kernel/index.js +204 -0
  94. package/dist/extraction/kernel/index.js.map +1 -0
  95. package/dist/extraction/kernel/layout.d.ts +101 -0
  96. package/dist/extraction/kernel/layout.d.ts.map +1 -0
  97. package/dist/extraction/kernel/layout.js +104 -0
  98. package/dist/extraction/kernel/layout.js.map +1 -0
  99. package/dist/extraction/kernel/loader.d.ts +103 -0
  100. package/dist/extraction/kernel/loader.d.ts.map +1 -0
  101. package/dist/extraction/kernel/loader.js +146 -0
  102. package/dist/extraction/kernel/loader.js.map +1 -0
  103. package/dist/extraction/languages/c-cpp.d.ts +124 -0
  104. package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
  105. package/dist/extraction/languages/c-cpp.js +1689 -0
  106. package/dist/extraction/languages/c-cpp.js.map +1 -0
  107. package/dist/extraction/languages/index.d.ts +11 -0
  108. package/dist/extraction/languages/index.d.ts.map +1 -0
  109. package/dist/extraction/languages/index.js +15 -0
  110. package/dist/extraction/languages/index.js.map +1 -0
  111. package/dist/extraction/languages/java.d.ts +3 -0
  112. package/dist/extraction/languages/java.d.ts.map +1 -0
  113. package/dist/extraction/languages/java.js +315 -0
  114. package/dist/extraction/languages/java.js.map +1 -0
  115. package/dist/extraction/languages/rust.d.ts +23 -0
  116. package/dist/extraction/languages/rust.d.ts.map +1 -0
  117. package/dist/extraction/languages/rust.js +169 -0
  118. package/dist/extraction/languages/rust.js.map +1 -0
  119. package/dist/extraction/parse-pool.d.ts +167 -0
  120. package/dist/extraction/parse-pool.d.ts.map +1 -0
  121. package/dist/extraction/parse-pool.js +421 -0
  122. package/dist/extraction/parse-pool.js.map +1 -0
  123. package/dist/extraction/parse-worker.d.ts +8 -0
  124. package/dist/extraction/parse-worker.d.ts.map +1 -0
  125. package/dist/extraction/parse-worker.js +138 -0
  126. package/dist/extraction/parse-worker.js.map +1 -0
  127. package/dist/extraction/store-worker.d.ts +24 -0
  128. package/dist/extraction/store-worker.d.ts.map +1 -0
  129. package/dist/extraction/store-worker.js +139 -0
  130. package/dist/extraction/store-worker.js.map +1 -0
  131. package/dist/extraction/store-writer.d.ts +63 -0
  132. package/dist/extraction/store-writer.d.ts.map +1 -0
  133. package/dist/extraction/store-writer.js +174 -0
  134. package/dist/extraction/store-writer.js.map +1 -0
  135. package/dist/extraction/syntax-tokens.d.ts +103 -0
  136. package/dist/extraction/syntax-tokens.d.ts.map +1 -0
  137. package/dist/extraction/syntax-tokens.js +381 -0
  138. package/dist/extraction/syntax-tokens.js.map +1 -0
  139. package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
  140. package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
  141. package/dist/extraction/tree-sitter-helpers.js +153 -0
  142. package/dist/extraction/tree-sitter-helpers.js.map +1 -0
  143. package/dist/extraction/tree-sitter-types.d.ts +260 -0
  144. package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
  145. package/dist/extraction/tree-sitter-types.js +10 -0
  146. package/dist/extraction/tree-sitter-types.js.map +1 -0
  147. package/dist/extraction/tree-sitter.d.ts +745 -0
  148. package/dist/extraction/tree-sitter.d.ts.map +1 -0
  149. package/dist/extraction/tree-sitter.js +6725 -0
  150. package/dist/extraction/tree-sitter.js.map +1 -0
  151. package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  152. package/dist/extraction/wasm-runtime-flags.d.ts +53 -0
  153. package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
  154. package/dist/extraction/wasm-runtime-flags.js +130 -0
  155. package/dist/extraction/wasm-runtime-flags.js.map +1 -0
  156. package/dist/graph/branch-guards.d.ts +248 -0
  157. package/dist/graph/branch-guards.d.ts.map +1 -0
  158. package/dist/graph/branch-guards.js +2231 -0
  159. package/dist/graph/branch-guards.js.map +1 -0
  160. package/dist/graph/dead-code.d.ts +251 -0
  161. package/dist/graph/dead-code.d.ts.map +1 -0
  162. package/dist/graph/dead-code.js +756 -0
  163. package/dist/graph/dead-code.js.map +1 -0
  164. package/dist/graph/dynamic-boundary-report.d.ts +121 -0
  165. package/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  166. package/dist/graph/dynamic-boundary-report.js +283 -0
  167. package/dist/graph/dynamic-boundary-report.js.map +1 -0
  168. package/dist/graph/index.d.ts +12 -0
  169. package/dist/graph/index.d.ts.map +1 -0
  170. package/dist/graph/index.js +28 -0
  171. package/dist/graph/index.js.map +1 -0
  172. package/dist/graph/named-symbol-flow.d.ts +153 -0
  173. package/dist/graph/named-symbol-flow.d.ts.map +1 -0
  174. package/dist/graph/named-symbol-flow.js +609 -0
  175. package/dist/graph/named-symbol-flow.js.map +1 -0
  176. package/dist/graph/queries.d.ts +106 -0
  177. package/dist/graph/queries.d.ts.map +1 -0
  178. package/dist/graph/queries.js +341 -0
  179. package/dist/graph/queries.js.map +1 -0
  180. package/dist/graph/traversal.d.ts +127 -0
  181. package/dist/graph/traversal.d.ts.map +1 -0
  182. package/dist/graph/traversal.js +599 -0
  183. package/dist/graph/traversal.js.map +1 -0
  184. package/dist/graph/type-hierarchy.d.ts +155 -0
  185. package/dist/graph/type-hierarchy.d.ts.map +1 -0
  186. package/dist/graph/type-hierarchy.js +382 -0
  187. package/dist/graph/type-hierarchy.js.map +1 -0
  188. package/dist/index.d.ts +886 -0
  189. package/dist/index.d.ts.map +1 -0
  190. package/dist/index.js +2019 -0
  191. package/dist/index.js.map +1 -0
  192. package/dist/installer/beta-signup.d.ts +54 -0
  193. package/dist/installer/beta-signup.d.ts.map +1 -0
  194. package/dist/installer/beta-signup.js +178 -0
  195. package/dist/installer/beta-signup.js.map +1 -0
  196. package/dist/installer/config-writer.d.ts +28 -0
  197. package/dist/installer/config-writer.d.ts.map +1 -0
  198. package/dist/installer/config-writer.js +91 -0
  199. package/dist/installer/config-writer.js.map +1 -0
  200. package/dist/installer/index.d.ts +143 -0
  201. package/dist/installer/index.d.ts.map +1 -0
  202. package/dist/installer/index.js +632 -0
  203. package/dist/installer/index.js.map +1 -0
  204. package/dist/installer/instructions-template.d.ts +41 -0
  205. package/dist/installer/instructions-template.d.ts.map +1 -0
  206. package/dist/installer/instructions-template.js +53 -0
  207. package/dist/installer/instructions-template.js.map +1 -0
  208. package/dist/installer/targets/antigravity.d.ts +57 -0
  209. package/dist/installer/targets/antigravity.d.ts.map +1 -0
  210. package/dist/installer/targets/antigravity.js +308 -0
  211. package/dist/installer/targets/antigravity.js.map +1 -0
  212. package/dist/installer/targets/claude.d.ts +62 -0
  213. package/dist/installer/targets/claude.d.ts.map +1 -0
  214. package/dist/installer/targets/claude.js +486 -0
  215. package/dist/installer/targets/claude.js.map +1 -0
  216. package/dist/installer/targets/codex.d.ts +32 -0
  217. package/dist/installer/targets/codex.d.ts.map +1 -0
  218. package/dist/installer/targets/codex.js +202 -0
  219. package/dist/installer/targets/codex.js.map +1 -0
  220. package/dist/installer/targets/copilot-cli.d.ts +32 -0
  221. package/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  222. package/dist/installer/targets/copilot-cli.js +209 -0
  223. package/dist/installer/targets/copilot-cli.js.map +1 -0
  224. package/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  225. package/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  226. package/dist/installer/targets/copilot-jetbrains.js +238 -0
  227. package/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  228. package/dist/installer/targets/copilot-vscode.d.ts +47 -0
  229. package/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  230. package/dist/installer/targets/copilot-vscode.js +219 -0
  231. package/dist/installer/targets/copilot-vscode.js.map +1 -0
  232. package/dist/installer/targets/cursor.d.ts +35 -0
  233. package/dist/installer/targets/cursor.d.ts.map +1 -0
  234. package/dist/installer/targets/cursor.js +254 -0
  235. package/dist/installer/targets/cursor.js.map +1 -0
  236. package/dist/installer/targets/gemini.d.ts +26 -0
  237. package/dist/installer/targets/gemini.d.ts.map +1 -0
  238. package/dist/installer/targets/gemini.js +165 -0
  239. package/dist/installer/targets/gemini.js.map +1 -0
  240. package/dist/installer/targets/hermes.d.ts +18 -0
  241. package/dist/installer/targets/hermes.d.ts.map +1 -0
  242. package/dist/installer/targets/hermes.js +359 -0
  243. package/dist/installer/targets/hermes.js.map +1 -0
  244. package/dist/installer/targets/kiro.d.ts +27 -0
  245. package/dist/installer/targets/kiro.d.ts.map +1 -0
  246. package/dist/installer/targets/kiro.js +178 -0
  247. package/dist/installer/targets/kiro.js.map +1 -0
  248. package/dist/installer/targets/opencode.d.ts +38 -0
  249. package/dist/installer/targets/opencode.d.ts.map +1 -0
  250. package/dist/installer/targets/opencode.js +288 -0
  251. package/dist/installer/targets/opencode.js.map +1 -0
  252. package/dist/installer/targets/registry.d.ts +35 -0
  253. package/dist/installer/targets/registry.d.ts.map +1 -0
  254. package/dist/installer/targets/registry.js +101 -0
  255. package/dist/installer/targets/registry.js.map +1 -0
  256. package/dist/installer/targets/shared.d.ts +101 -0
  257. package/dist/installer/targets/shared.d.ts.map +1 -0
  258. package/dist/installer/targets/shared.js +264 -0
  259. package/dist/installer/targets/shared.js.map +1 -0
  260. package/dist/installer/targets/toml.d.ts +53 -0
  261. package/dist/installer/targets/toml.d.ts.map +1 -0
  262. package/dist/installer/targets/toml.js +226 -0
  263. package/dist/installer/targets/toml.js.map +1 -0
  264. package/dist/installer/targets/trae.d.ts +30 -0
  265. package/dist/installer/targets/trae.d.ts.map +1 -0
  266. package/dist/installer/targets/trae.js +164 -0
  267. package/dist/installer/targets/trae.js.map +1 -0
  268. package/dist/installer/targets/types.d.ts +108 -0
  269. package/dist/installer/targets/types.d.ts.map +1 -0
  270. package/dist/installer/targets/types.js +16 -0
  271. package/dist/installer/targets/types.js.map +1 -0
  272. package/dist/installer/targets/workbuddy.d.ts +29 -0
  273. package/dist/installer/targets/workbuddy.d.ts.map +1 -0
  274. package/dist/installer/targets/workbuddy.js +163 -0
  275. package/dist/installer/targets/workbuddy.js.map +1 -0
  276. package/dist/mcp/daemon-manager.d.ts +42 -0
  277. package/dist/mcp/daemon-manager.d.ts.map +1 -0
  278. package/dist/mcp/daemon-manager.js +129 -0
  279. package/dist/mcp/daemon-manager.js.map +1 -0
  280. package/dist/mcp/daemon-paths.d.ts +79 -0
  281. package/dist/mcp/daemon-paths.d.ts.map +1 -0
  282. package/dist/mcp/daemon-paths.js +219 -0
  283. package/dist/mcp/daemon-paths.js.map +1 -0
  284. package/dist/mcp/daemon-registry.d.ts +57 -0
  285. package/dist/mcp/daemon-registry.d.ts.map +1 -0
  286. package/dist/mcp/daemon-registry.js +281 -0
  287. package/dist/mcp/daemon-registry.js.map +1 -0
  288. package/dist/mcp/daemon.d.ts +293 -0
  289. package/dist/mcp/daemon.d.ts.map +1 -0
  290. package/dist/mcp/daemon.js +864 -0
  291. package/dist/mcp/daemon.js.map +1 -0
  292. package/dist/mcp/dynamic-boundaries.d.ts +41 -0
  293. package/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
  294. package/dist/mcp/dynamic-boundaries.js +360 -0
  295. package/dist/mcp/dynamic-boundaries.js.map +1 -0
  296. package/dist/mcp/early-ppid.d.ts +26 -0
  297. package/dist/mcp/early-ppid.d.ts.map +1 -0
  298. package/dist/mcp/early-ppid.js +29 -0
  299. package/dist/mcp/early-ppid.js.map +1 -0
  300. package/dist/mcp/engine.d.ts +125 -0
  301. package/dist/mcp/engine.d.ts.map +1 -0
  302. package/dist/mcp/engine.js +392 -0
  303. package/dist/mcp/engine.js.map +1 -0
  304. package/dist/mcp/explore-dedup.d.ts +137 -0
  305. package/dist/mcp/explore-dedup.d.ts.map +1 -0
  306. package/dist/mcp/explore-dedup.js +236 -0
  307. package/dist/mcp/explore-dedup.js.map +1 -0
  308. package/dist/mcp/explore-diagnostics.d.ts +289 -0
  309. package/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  310. package/dist/mcp/explore-diagnostics.js +558 -0
  311. package/dist/mcp/explore-diagnostics.js.map +1 -0
  312. package/dist/mcp/explore-session-state.d.ts +217 -0
  313. package/dist/mcp/explore-session-state.d.ts.map +1 -0
  314. package/dist/mcp/explore-session-state.js +322 -0
  315. package/dist/mcp/explore-session-state.js.map +1 -0
  316. package/dist/mcp/index.d.ts +137 -0
  317. package/dist/mcp/index.d.ts.map +1 -0
  318. package/dist/mcp/index.js +567 -0
  319. package/dist/mcp/index.js.map +1 -0
  320. package/dist/mcp/liveness-watchdog.d.ts +35 -0
  321. package/dist/mcp/liveness-watchdog.d.ts.map +1 -0
  322. package/dist/mcp/liveness-watchdog.js +269 -0
  323. package/dist/mcp/liveness-watchdog.js.map +1 -0
  324. package/dist/mcp/ppid-watchdog.d.ts +62 -0
  325. package/dist/mcp/ppid-watchdog.d.ts.map +1 -0
  326. package/dist/mcp/ppid-watchdog.js +64 -0
  327. package/dist/mcp/ppid-watchdog.js.map +1 -0
  328. package/dist/mcp/proxy.d.ts +87 -0
  329. package/dist/mcp/proxy.d.ts.map +1 -0
  330. package/dist/mcp/proxy.js +672 -0
  331. package/dist/mcp/proxy.js.map +1 -0
  332. package/dist/mcp/query-pool.d.ts +108 -0
  333. package/dist/mcp/query-pool.d.ts.map +1 -0
  334. package/dist/mcp/query-pool.js +315 -0
  335. package/dist/mcp/query-pool.js.map +1 -0
  336. package/dist/mcp/query-worker.d.ts +24 -0
  337. package/dist/mcp/query-worker.d.ts.map +1 -0
  338. package/dist/mcp/query-worker.js +87 -0
  339. package/dist/mcp/query-worker.js.map +1 -0
  340. package/dist/mcp/server-instructions.d.ts +34 -0
  341. package/dist/mcp/server-instructions.d.ts.map +1 -0
  342. package/dist/mcp/server-instructions.js +111 -0
  343. package/dist/mcp/server-instructions.js.map +1 -0
  344. package/dist/mcp/session.d.ts +109 -0
  345. package/dist/mcp/session.d.ts.map +1 -0
  346. package/dist/mcp/session.js +380 -0
  347. package/dist/mcp/session.js.map +1 -0
  348. package/dist/mcp/startup-handshake.d.ts +44 -0
  349. package/dist/mcp/startup-handshake.d.ts.map +1 -0
  350. package/dist/mcp/startup-handshake.js +73 -0
  351. package/dist/mcp/startup-handshake.js.map +1 -0
  352. package/dist/mcp/stdin-teardown.d.ts +27 -0
  353. package/dist/mcp/stdin-teardown.d.ts.map +1 -0
  354. package/dist/mcp/stdin-teardown.js +49 -0
  355. package/dist/mcp/stdin-teardown.js.map +1 -0
  356. package/dist/mcp/tools.d.ts +877 -0
  357. package/dist/mcp/tools.d.ts.map +1 -0
  358. package/dist/mcp/tools.js +6371 -0
  359. package/dist/mcp/tools.js.map +1 -0
  360. package/dist/mcp/transport.d.ts +188 -0
  361. package/dist/mcp/transport.d.ts.map +1 -0
  362. package/dist/mcp/transport.js +377 -0
  363. package/dist/mcp/transport.js.map +1 -0
  364. package/dist/mcp/version.d.ts +19 -0
  365. package/dist/mcp/version.d.ts.map +1 -0
  366. package/dist/mcp/version.js +71 -0
  367. package/dist/mcp/version.js.map +1 -0
  368. package/dist/project-config.d.ts +158 -0
  369. package/dist/project-config.d.ts.map +1 -0
  370. package/dist/project-config.js +489 -0
  371. package/dist/project-config.js.map +1 -0
  372. package/dist/resolution/c-fnptr-synthesizer.d.ts +6 -0
  373. package/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
  374. package/dist/resolution/c-fnptr-synthesizer.js +1506 -0
  375. package/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
  376. package/dist/resolution/callback-synthesizer.d.ts +59 -0
  377. package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
  378. package/dist/resolution/callback-synthesizer.js +4066 -0
  379. package/dist/resolution/callback-synthesizer.js.map +1 -0
  380. package/dist/resolution/cooperative-yield.d.ts +40 -0
  381. package/dist/resolution/cooperative-yield.d.ts.map +1 -0
  382. package/dist/resolution/cooperative-yield.js +44 -0
  383. package/dist/resolution/cooperative-yield.js.map +1 -0
  384. package/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  385. package/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  386. package/dist/resolution/expo-router-synthesizer.js +189 -0
  387. package/dist/resolution/expo-router-synthesizer.js.map +1 -0
  388. package/dist/resolution/frameworks/astro.d.ts +9 -0
  389. package/dist/resolution/frameworks/astro.d.ts.map +1 -0
  390. package/dist/resolution/frameworks/astro.js +169 -0
  391. package/dist/resolution/frameworks/astro.js.map +1 -0
  392. package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  393. package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  394. package/dist/resolution/frameworks/cargo-workspace.js +225 -0
  395. package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  396. package/dist/resolution/frameworks/cics.d.ts +20 -0
  397. package/dist/resolution/frameworks/cics.d.ts.map +1 -0
  398. package/dist/resolution/frameworks/cics.js +90 -0
  399. package/dist/resolution/frameworks/cics.js.map +1 -0
  400. package/dist/resolution/frameworks/csharp.d.ts +8 -0
  401. package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
  402. package/dist/resolution/frameworks/csharp.js +335 -0
  403. package/dist/resolution/frameworks/csharp.js.map +1 -0
  404. package/dist/resolution/frameworks/drupal.d.ts +51 -0
  405. package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
  406. package/dist/resolution/frameworks/drupal.js +367 -0
  407. package/dist/resolution/frameworks/drupal.js.map +1 -0
  408. package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  409. package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  410. package/dist/resolution/frameworks/expo-modules.js +148 -0
  411. package/dist/resolution/frameworks/expo-modules.js.map +1 -0
  412. package/dist/resolution/frameworks/expo-router.d.ts +189 -0
  413. package/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  414. package/dist/resolution/frameworks/expo-router.js +785 -0
  415. package/dist/resolution/frameworks/expo-router.js.map +1 -0
  416. package/dist/resolution/frameworks/express.d.ts +8 -0
  417. package/dist/resolution/frameworks/express.d.ts.map +1 -0
  418. package/dist/resolution/frameworks/express.js +540 -0
  419. package/dist/resolution/frameworks/express.js.map +1 -0
  420. package/dist/resolution/frameworks/fabric.d.ts +3 -0
  421. package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  422. package/dist/resolution/frameworks/fabric.js +354 -0
  423. package/dist/resolution/frameworks/fabric.js.map +1 -0
  424. package/dist/resolution/frameworks/go.d.ts +8 -0
  425. package/dist/resolution/frameworks/go.d.ts.map +1 -0
  426. package/dist/resolution/frameworks/go.js +184 -0
  427. package/dist/resolution/frameworks/go.js.map +1 -0
  428. package/dist/resolution/frameworks/goframe.d.ts +41 -0
  429. package/dist/resolution/frameworks/goframe.d.ts.map +1 -0
  430. package/dist/resolution/frameworks/goframe.js +112 -0
  431. package/dist/resolution/frameworks/goframe.js.map +1 -0
  432. package/dist/resolution/frameworks/index.d.ts +30 -0
  433. package/dist/resolution/frameworks/index.d.ts.map +1 -0
  434. package/dist/resolution/frameworks/index.js +72 -0
  435. package/dist/resolution/frameworks/index.js.map +1 -0
  436. package/dist/resolution/frameworks/java.d.ts +8 -0
  437. package/dist/resolution/frameworks/java.d.ts.map +1 -0
  438. package/dist/resolution/frameworks/java.js +517 -0
  439. package/dist/resolution/frameworks/java.js.map +1 -0
  440. package/dist/resolution/frameworks/laravel.d.ts +13 -0
  441. package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
  442. package/dist/resolution/frameworks/laravel.js +257 -0
  443. package/dist/resolution/frameworks/laravel.js.map +1 -0
  444. package/dist/resolution/frameworks/nestjs.d.ts +26 -0
  445. package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
  446. package/dist/resolution/frameworks/nestjs.js +690 -0
  447. package/dist/resolution/frameworks/nestjs.js.map +1 -0
  448. package/dist/resolution/frameworks/nextjs.d.ts +76 -0
  449. package/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  450. package/dist/resolution/frameworks/nextjs.js +328 -0
  451. package/dist/resolution/frameworks/nextjs.js.map +1 -0
  452. package/dist/resolution/frameworks/object-literal.d.ts +32 -0
  453. package/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  454. package/dist/resolution/frameworks/object-literal.js +139 -0
  455. package/dist/resolution/frameworks/object-literal.js.map +1 -0
  456. package/dist/resolution/frameworks/package-deps.d.ts +14 -0
  457. package/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  458. package/dist/resolution/frameworks/package-deps.js +78 -0
  459. package/dist/resolution/frameworks/package-deps.js.map +1 -0
  460. package/dist/resolution/frameworks/play.d.ts +19 -0
  461. package/dist/resolution/frameworks/play.d.ts.map +1 -0
  462. package/dist/resolution/frameworks/play.js +111 -0
  463. package/dist/resolution/frameworks/play.js.map +1 -0
  464. package/dist/resolution/frameworks/python.d.ts +10 -0
  465. package/dist/resolution/frameworks/python.d.ts.map +1 -0
  466. package/dist/resolution/frameworks/python.js +566 -0
  467. package/dist/resolution/frameworks/python.js.map +1 -0
  468. package/dist/resolution/frameworks/react-native.d.ts +29 -0
  469. package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  470. package/dist/resolution/frameworks/react-native.js +549 -0
  471. package/dist/resolution/frameworks/react-native.js.map +1 -0
  472. package/dist/resolution/frameworks/react-router.d.ts +46 -0
  473. package/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  474. package/dist/resolution/frameworks/react-router.js +187 -0
  475. package/dist/resolution/frameworks/react-router.js.map +1 -0
  476. package/dist/resolution/frameworks/react.d.ts +9 -0
  477. package/dist/resolution/frameworks/react.d.ts.map +1 -0
  478. package/dist/resolution/frameworks/react.js +257 -0
  479. package/dist/resolution/frameworks/react.js.map +1 -0
  480. package/dist/resolution/frameworks/ruby.d.ts +8 -0
  481. package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
  482. package/dist/resolution/frameworks/ruby.js +302 -0
  483. package/dist/resolution/frameworks/ruby.js.map +1 -0
  484. package/dist/resolution/frameworks/rust.d.ts +8 -0
  485. package/dist/resolution/frameworks/rust.d.ts.map +1 -0
  486. package/dist/resolution/frameworks/rust.js +304 -0
  487. package/dist/resolution/frameworks/rust.js.map +1 -0
  488. package/dist/resolution/frameworks/svelte.d.ts +9 -0
  489. package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
  490. package/dist/resolution/frameworks/svelte.js +258 -0
  491. package/dist/resolution/frameworks/svelte.js.map +1 -0
  492. package/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  493. package/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  494. package/dist/resolution/frameworks/sveltekit-router.js +156 -0
  495. package/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  496. package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  497. package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  498. package/dist/resolution/frameworks/swift-objc.js +252 -0
  499. package/dist/resolution/frameworks/swift-objc.js.map +1 -0
  500. package/dist/resolution/frameworks/swift.d.ts +10 -0
  501. package/dist/resolution/frameworks/swift.d.ts.map +1 -0
  502. package/dist/resolution/frameworks/swift.js +410 -0
  503. package/dist/resolution/frameworks/swift.js.map +1 -0
  504. package/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  505. package/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  506. package/dist/resolution/frameworks/tanstack-router.js +437 -0
  507. package/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  508. package/dist/resolution/frameworks/terraform.d.ts +38 -0
  509. package/dist/resolution/frameworks/terraform.d.ts.map +1 -0
  510. package/dist/resolution/frameworks/terraform.js +277 -0
  511. package/dist/resolution/frameworks/terraform.js.map +1 -0
  512. package/dist/resolution/frameworks/vue-router.d.ts +82 -0
  513. package/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  514. package/dist/resolution/frameworks/vue-router.js +377 -0
  515. package/dist/resolution/frameworks/vue-router.js.map +1 -0
  516. package/dist/resolution/frameworks/vue.d.ts +9 -0
  517. package/dist/resolution/frameworks/vue.d.ts.map +1 -0
  518. package/dist/resolution/frameworks/vue.js +303 -0
  519. package/dist/resolution/frameworks/vue.js.map +1 -0
  520. package/dist/resolution/go-module.d.ts +26 -0
  521. package/dist/resolution/go-module.d.ts.map +1 -0
  522. package/dist/resolution/go-module.js +78 -0
  523. package/dist/resolution/go-module.js.map +1 -0
  524. package/dist/resolution/goframe-synthesizer.d.ts +29 -0
  525. package/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
  526. package/dist/resolution/goframe-synthesizer.js +163 -0
  527. package/dist/resolution/goframe-synthesizer.js.map +1 -0
  528. package/dist/resolution/import-resolver.d.ts +84 -0
  529. package/dist/resolution/import-resolver.d.ts.map +1 -0
  530. package/dist/resolution/import-resolver.js +2240 -0
  531. package/dist/resolution/import-resolver.js.map +1 -0
  532. package/dist/resolution/index.d.ts +343 -0
  533. package/dist/resolution/index.d.ts.map +1 -0
  534. package/dist/resolution/index.js +2352 -0
  535. package/dist/resolution/index.js.map +1 -0
  536. package/dist/resolution/lru-cache.d.ts +24 -0
  537. package/dist/resolution/lru-cache.d.ts.map +1 -0
  538. package/dist/resolution/lru-cache.js +62 -0
  539. package/dist/resolution/lru-cache.js.map +1 -0
  540. package/dist/resolution/memory-budget.d.ts +48 -0
  541. package/dist/resolution/memory-budget.d.ts.map +1 -0
  542. package/dist/resolution/memory-budget.js +162 -0
  543. package/dist/resolution/memory-budget.js.map +1 -0
  544. package/dist/resolution/name-matcher.d.ts +153 -0
  545. package/dist/resolution/name-matcher.d.ts.map +1 -0
  546. package/dist/resolution/name-matcher.js +2412 -0
  547. package/dist/resolution/name-matcher.js.map +1 -0
  548. package/dist/resolution/next-router-synthesizer.d.ts +27 -0
  549. package/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  550. package/dist/resolution/next-router-synthesizer.js +113 -0
  551. package/dist/resolution/next-router-synthesizer.js.map +1 -0
  552. package/dist/resolution/path-aliases.d.ts +70 -0
  553. package/dist/resolution/path-aliases.d.ts.map +1 -0
  554. package/dist/resolution/path-aliases.js +346 -0
  555. package/dist/resolution/path-aliases.js.map +1 -0
  556. package/dist/resolution/react-router-synthesizer.d.ts +33 -0
  557. package/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  558. package/dist/resolution/react-router-synthesizer.js +126 -0
  559. package/dist/resolution/react-router-synthesizer.js.map +1 -0
  560. package/dist/resolution/resolver-pool.d.ts +106 -0
  561. package/dist/resolution/resolver-pool.d.ts.map +1 -0
  562. package/dist/resolution/resolver-pool.js +344 -0
  563. package/dist/resolution/resolver-pool.js.map +1 -0
  564. package/dist/resolution/resolver-worker.d.ts +17 -0
  565. package/dist/resolution/resolver-worker.d.ts.map +1 -0
  566. package/dist/resolution/resolver-worker.js +141 -0
  567. package/dist/resolution/resolver-worker.js.map +1 -0
  568. package/dist/resolution/strip-comments.d.ts +27 -0
  569. package/dist/resolution/strip-comments.d.ts.map +1 -0
  570. package/dist/resolution/strip-comments.js +492 -0
  571. package/dist/resolution/strip-comments.js.map +1 -0
  572. package/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  573. package/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  574. package/dist/resolution/sveltekit-synthesizer.js +173 -0
  575. package/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  576. package/dist/resolution/swift-objc-bridge.d.ts +134 -0
  577. package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  578. package/dist/resolution/swift-objc-bridge.js +256 -0
  579. package/dist/resolution/swift-objc-bridge.js.map +1 -0
  580. package/dist/resolution/synth-utils.d.ts +26 -0
  581. package/dist/resolution/synth-utils.d.ts.map +1 -0
  582. package/dist/resolution/synth-utils.js +75 -0
  583. package/dist/resolution/synth-utils.js.map +1 -0
  584. package/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  585. package/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  586. package/dist/resolution/tanstack-router-synthesizer.js +114 -0
  587. package/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  588. package/dist/resolution/tier-synthesizer.d.ts +48 -0
  589. package/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  590. package/dist/resolution/tier-synthesizer.js +907 -0
  591. package/dist/resolution/tier-synthesizer.js.map +1 -0
  592. package/dist/resolution/types.d.ts +290 -0
  593. package/dist/resolution/types.d.ts.map +1 -0
  594. package/dist/resolution/types.js +8 -0
  595. package/dist/resolution/types.js.map +1 -0
  596. package/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  597. package/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  598. package/dist/resolution/vue-router-synthesizer.js +115 -0
  599. package/dist/resolution/vue-router-synthesizer.js.map +1 -0
  600. package/dist/resolution/workspace-packages.d.ts +58 -0
  601. package/dist/resolution/workspace-packages.d.ts.map +1 -0
  602. package/dist/resolution/workspace-packages.js +346 -0
  603. package/dist/resolution/workspace-packages.js.map +1 -0
  604. package/dist/search/identifier-segments.d.ts +70 -0
  605. package/dist/search/identifier-segments.d.ts.map +1 -0
  606. package/dist/search/identifier-segments.js +205 -0
  607. package/dist/search/identifier-segments.js.map +1 -0
  608. package/dist/search/query-parser.d.ts +57 -0
  609. package/dist/search/query-parser.d.ts.map +1 -0
  610. package/dist/search/query-parser.js +177 -0
  611. package/dist/search/query-parser.js.map +1 -0
  612. package/dist/search/query-paths.d.ts +57 -0
  613. package/dist/search/query-paths.d.ts.map +1 -0
  614. package/dist/search/query-paths.js +298 -0
  615. package/dist/search/query-paths.js.map +1 -0
  616. package/dist/search/query-utils.d.ts +102 -0
  617. package/dist/search/query-utils.d.ts.map +1 -0
  618. package/dist/search/query-utils.js +487 -0
  619. package/dist/search/query-utils.js.map +1 -0
  620. package/dist/sync/git-hooks.d.ts +45 -0
  621. package/dist/sync/git-hooks.d.ts.map +1 -0
  622. package/dist/sync/git-hooks.js +227 -0
  623. package/dist/sync/git-hooks.js.map +1 -0
  624. package/dist/sync/index.d.ts +19 -0
  625. package/dist/sync/index.d.ts.map +1 -0
  626. package/dist/sync/index.js +35 -0
  627. package/dist/sync/index.js.map +1 -0
  628. package/dist/sync/watch-policy.d.ts +48 -0
  629. package/dist/sync/watch-policy.d.ts.map +1 -0
  630. package/dist/sync/watch-policy.js +124 -0
  631. package/dist/sync/watch-policy.js.map +1 -0
  632. package/dist/sync/watcher.d.ts +401 -0
  633. package/dist/sync/watcher.d.ts.map +1 -0
  634. package/dist/sync/watcher.js +967 -0
  635. package/dist/sync/watcher.js.map +1 -0
  636. package/dist/sync/worktree.d.ts +63 -0
  637. package/dist/sync/worktree.d.ts.map +1 -0
  638. package/dist/sync/worktree.js +182 -0
  639. package/dist/sync/worktree.js.map +1 -0
  640. package/dist/telemetry/index.d.ts +143 -0
  641. package/dist/telemetry/index.d.ts.map +1 -0
  642. package/dist/telemetry/index.js +541 -0
  643. package/dist/telemetry/index.js.map +1 -0
  644. package/dist/types.d.ts +486 -0
  645. package/dist/types.d.ts.map +1 -0
  646. package/dist/types.js +118 -0
  647. package/dist/types.js.map +1 -0
  648. package/dist/ui/color.d.ts +21 -0
  649. package/dist/ui/color.d.ts.map +1 -0
  650. package/dist/ui/color.js +42 -0
  651. package/dist/ui/color.js.map +1 -0
  652. package/dist/ui/glyphs.d.ts +67 -0
  653. package/dist/ui/glyphs.d.ts.map +1 -0
  654. package/dist/ui/glyphs.js +125 -0
  655. package/dist/ui/glyphs.js.map +1 -0
  656. package/dist/ui/shimmer-progress.d.ts +11 -0
  657. package/dist/ui/shimmer-progress.d.ts.map +1 -0
  658. package/dist/ui/shimmer-progress.js +164 -0
  659. package/dist/ui/shimmer-progress.js.map +1 -0
  660. package/dist/ui/shimmer-worker.d.ts +2 -0
  661. package/dist/ui/shimmer-worker.d.ts.map +1 -0
  662. package/dist/ui/shimmer-worker.js +126 -0
  663. package/dist/ui/shimmer-worker.js.map +1 -0
  664. package/dist/ui/types.d.ts +15 -0
  665. package/dist/ui/types.d.ts.map +1 -0
  666. package/dist/ui/types.js +3 -0
  667. package/dist/ui/types.js.map +1 -0
  668. package/dist/ui-server/api/deadcode.d.ts +84 -0
  669. package/dist/ui-server/api/deadcode.d.ts.map +1 -0
  670. package/dist/ui-server/api/deadcode.js +136 -0
  671. package/dist/ui-server/api/deadcode.js.map +1 -0
  672. package/dist/ui-server/api/effects.d.ts +87 -0
  673. package/dist/ui-server/api/effects.d.ts.map +1 -0
  674. package/dist/ui-server/api/effects.js +499 -0
  675. package/dist/ui-server/api/effects.js.map +1 -0
  676. package/dist/ui-server/api/entrypoints.d.ts +86 -0
  677. package/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  678. package/dist/ui-server/api/entrypoints.js +279 -0
  679. package/dist/ui-server/api/entrypoints.js.map +1 -0
  680. package/dist/ui-server/api/events.d.ts +183 -0
  681. package/dist/ui-server/api/events.d.ts.map +1 -0
  682. package/dist/ui-server/api/events.js +430 -0
  683. package/dist/ui-server/api/events.js.map +1 -0
  684. package/dist/ui-server/api/file.d.ts +66 -0
  685. package/dist/ui-server/api/file.d.ts.map +1 -0
  686. package/dist/ui-server/api/file.js +222 -0
  687. package/dist/ui-server/api/file.js.map +1 -0
  688. package/dist/ui-server/api/filecode.d.ts +126 -0
  689. package/dist/ui-server/api/filecode.d.ts.map +1 -0
  690. package/dist/ui-server/api/filecode.js +205 -0
  691. package/dist/ui-server/api/filecode.js.map +1 -0
  692. package/dist/ui-server/api/flow.d.ts +226 -0
  693. package/dist/ui-server/api/flow.d.ts.map +1 -0
  694. package/dist/ui-server/api/flow.js +611 -0
  695. package/dist/ui-server/api/flow.js.map +1 -0
  696. package/dist/ui-server/api/hierarchy.d.ts +81 -0
  697. package/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  698. package/dist/ui-server/api/hierarchy.js +92 -0
  699. package/dist/ui-server/api/hierarchy.js.map +1 -0
  700. package/dist/ui-server/api/index.d.ts +90 -0
  701. package/dist/ui-server/api/index.d.ts.map +1 -0
  702. package/dist/ui-server/api/index.js +332 -0
  703. package/dist/ui-server/api/index.js.map +1 -0
  704. package/dist/ui-server/api/map.d.ts +187 -0
  705. package/dist/ui-server/api/map.d.ts.map +1 -0
  706. package/dist/ui-server/api/map.js +498 -0
  707. package/dist/ui-server/api/map.js.map +1 -0
  708. package/dist/ui-server/api/node.d.ts +81 -0
  709. package/dist/ui-server/api/node.d.ts.map +1 -0
  710. package/dist/ui-server/api/node.js +388 -0
  711. package/dist/ui-server/api/node.js.map +1 -0
  712. package/dist/ui-server/api/nodes.d.ts +25 -0
  713. package/dist/ui-server/api/nodes.d.ts.map +1 -0
  714. package/dist/ui-server/api/nodes.js +45 -0
  715. package/dist/ui-server/api/nodes.js.map +1 -0
  716. package/dist/ui-server/api/program.d.ts +139 -0
  717. package/dist/ui-server/api/program.d.ts.map +1 -0
  718. package/dist/ui-server/api/program.js +315 -0
  719. package/dist/ui-server/api/program.js.map +1 -0
  720. package/dist/ui-server/api/respond.d.ts +76 -0
  721. package/dist/ui-server/api/respond.d.ts.map +1 -0
  722. package/dist/ui-server/api/respond.js +186 -0
  723. package/dist/ui-server/api/respond.js.map +1 -0
  724. package/dist/ui-server/api/route-roots.d.ts +39 -0
  725. package/dist/ui-server/api/route-roots.d.ts.map +1 -0
  726. package/dist/ui-server/api/route-roots.js +96 -0
  727. package/dist/ui-server/api/route-roots.js.map +1 -0
  728. package/dist/ui-server/api/routes.d.ts +59 -0
  729. package/dist/ui-server/api/routes.d.ts.map +1 -0
  730. package/dist/ui-server/api/routes.js +112 -0
  731. package/dist/ui-server/api/routes.js.map +1 -0
  732. package/dist/ui-server/api/screens.d.ts +117 -0
  733. package/dist/ui-server/api/screens.d.ts.map +1 -0
  734. package/dist/ui-server/api/screens.js +611 -0
  735. package/dist/ui-server/api/screens.js.map +1 -0
  736. package/dist/ui-server/api/search.d.ts +29 -0
  737. package/dist/ui-server/api/search.d.ts.map +1 -0
  738. package/dist/ui-server/api/search.js +232 -0
  739. package/dist/ui-server/api/search.js.map +1 -0
  740. package/dist/ui-server/api/session.d.ts +52 -0
  741. package/dist/ui-server/api/session.d.ts.map +1 -0
  742. package/dist/ui-server/api/session.js +196 -0
  743. package/dist/ui-server/api/session.js.map +1 -0
  744. package/dist/ui-server/api/source.d.ts +200 -0
  745. package/dist/ui-server/api/source.d.ts.map +1 -0
  746. package/dist/ui-server/api/source.js +419 -0
  747. package/dist/ui-server/api/source.js.map +1 -0
  748. package/dist/ui-server/api/stats.d.ts +27 -0
  749. package/dist/ui-server/api/stats.d.ts.map +1 -0
  750. package/dist/ui-server/api/stats.js +164 -0
  751. package/dist/ui-server/api/stats.js.map +1 -0
  752. package/dist/ui-server/api/steps.d.ts +274 -0
  753. package/dist/ui-server/api/steps.d.ts.map +1 -0
  754. package/dist/ui-server/api/steps.js +1446 -0
  755. package/dist/ui-server/api/steps.js.map +1 -0
  756. package/dist/ui-server/api/trail-store.d.ts +142 -0
  757. package/dist/ui-server/api/trail-store.d.ts.map +1 -0
  758. package/dist/ui-server/api/trail-store.js +323 -0
  759. package/dist/ui-server/api/trail-store.js.map +1 -0
  760. package/dist/ui-server/api/trails.d.ts +163 -0
  761. package/dist/ui-server/api/trails.d.ts.map +1 -0
  762. package/dist/ui-server/api/trails.js +369 -0
  763. package/dist/ui-server/api/trails.js.map +1 -0
  764. package/dist/ui-server/api/when.d.ts +125 -0
  765. package/dist/ui-server/api/when.d.ts.map +1 -0
  766. package/dist/ui-server/api/when.js +251 -0
  767. package/dist/ui-server/api/when.js.map +1 -0
  768. package/dist/ui-server/api/wire.d.ts +179 -0
  769. package/dist/ui-server/api/wire.d.ts.map +1 -0
  770. package/dist/ui-server/api/wire.js +231 -0
  771. package/dist/ui-server/api/wire.js.map +1 -0
  772. package/dist/ui-server/assets.d.ts +40 -0
  773. package/dist/ui-server/assets.d.ts.map +1 -0
  774. package/dist/ui-server/assets.js +110 -0
  775. package/dist/ui-server/assets.js.map +1 -0
  776. package/dist/ui-server/constants.d.ts +32 -0
  777. package/dist/ui-server/constants.d.ts.map +1 -0
  778. package/dist/ui-server/constants.js +35 -0
  779. package/dist/ui-server/constants.js.map +1 -0
  780. package/dist/ui-server/highlight/index.d.ts +113 -0
  781. package/dist/ui-server/highlight/index.d.ts.map +1 -0
  782. package/dist/ui-server/highlight/index.js +307 -0
  783. package/dist/ui-server/highlight/index.js.map +1 -0
  784. package/dist/ui-server/highlight/languages.d.ts +36 -0
  785. package/dist/ui-server/highlight/languages.d.ts.map +1 -0
  786. package/dist/ui-server/highlight/languages.js +50 -0
  787. package/dist/ui-server/highlight/languages.js.map +1 -0
  788. package/dist/ui-server/index.d.ts +92 -0
  789. package/dist/ui-server/index.d.ts.map +1 -0
  790. package/dist/ui-server/index.js +399 -0
  791. package/dist/ui-server/index.js.map +1 -0
  792. package/dist/ui-server/open-browser.d.ts +31 -0
  793. package/dist/ui-server/open-browser.d.ts.map +1 -0
  794. package/dist/ui-server/open-browser.js +79 -0
  795. package/dist/ui-server/open-browser.js.map +1 -0
  796. package/dist/ui-server/security.d.ts +127 -0
  797. package/dist/ui-server/security.d.ts.map +1 -0
  798. package/dist/ui-server/security.js +332 -0
  799. package/dist/ui-server/security.js.map +1 -0
  800. package/dist/ui-server/static.d.ts +45 -0
  801. package/dist/ui-server/static.d.ts.map +1 -0
  802. package/dist/ui-server/static.js +165 -0
  803. package/dist/ui-server/static.js.map +1 -0
  804. package/dist/upgrade/index.d.ts +177 -0
  805. package/dist/upgrade/index.d.ts.map +1 -0
  806. package/dist/upgrade/index.js +665 -0
  807. package/dist/upgrade/index.js.map +1 -0
  808. package/dist/upgrade/remove-binary.d.ts +87 -0
  809. package/dist/upgrade/remove-binary.d.ts.map +1 -0
  810. package/dist/upgrade/remove-binary.js +289 -0
  811. package/dist/upgrade/remove-binary.js.map +1 -0
  812. package/dist/upgrade/update-check.d.ts +92 -0
  813. package/dist/upgrade/update-check.d.ts.map +1 -0
  814. package/dist/upgrade/update-check.js +258 -0
  815. package/dist/upgrade/update-check.js.map +1 -0
  816. package/dist/utils.d.ts +224 -0
  817. package/dist/utils.d.ts.map +1 -0
  818. package/dist/utils.js +583 -0
  819. package/dist/utils.js.map +1 -0
  820. package/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  821. package/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  822. package/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  823. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  824. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  825. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  826. package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  827. package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  828. package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  829. package/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  830. package/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  831. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  832. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  833. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  834. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  835. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  836. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  837. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  838. package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  839. package/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  840. package/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  841. package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  842. package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  843. package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  844. package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  845. package/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  846. package/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  847. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  848. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  849. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  850. package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  851. package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  852. package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  853. package/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  854. package/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  855. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  856. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  857. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  858. package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  859. package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  860. package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  861. package/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  862. package/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  863. package/dist/viewer/assets/index-2IPslW5t.js +13 -0
  864. package/dist/viewer/assets/index-DSwi2Seu.css +1 -0
  865. package/dist/viewer/index.html +16 -0
  866. package/package.json +67 -0
@@ -0,0 +1,1060 @@
1
+ /**
2
+ * Database Queries
3
+ *
4
+ * Prepared statements for CRUD operations on the knowledge graph.
5
+ */
6
+ import { SqliteDatabase } from './sqlite-adapter';
7
+ import { Node, Edge, FileRecord, UnresolvedReference, NodeKind, EdgeKind, Language, GraphStats, SearchOptions, SearchResult } from '../types';
8
+ /**
9
+ * How much of the exact-name bonus a `deprioritize`d path keeps (#982). Damped
10
+ * rather than zeroed: a query that genuinely targets that tree must still rank
11
+ * it, the same "discount, don't erase" rule the path penalty follows.
12
+ *
13
+ * Derived rather than picked. `nameMatchBonus`'s prefix arm tops out below
14
+ * `10 + 30 = 40`, and a de-prioritized node also takes the -15 path penalty, so
15
+ * `80 * SCALE - 15 > 40` is what stops a damped WHOLE-QUERY exact match from
16
+ * losing to a mere prefix match. 0.75 clears it (45). Measured on a 62k-node
17
+ * django index: at 0.25 that invariant breaks in practice — `child`, `parent`
18
+ * and `method` lose rank 1 to `children`, `all_parents` and `method_decorator`
19
+ * — while crowd-out removal is almost flat between 0.75 and 0.5 (39 vs 40 of 88
20
+ * peripheral top-10 slots cleared), so a deeper discount buys little and costs
21
+ * the invariant. Pinned by a test.
22
+ */
23
+ export declare const DEPRIORITIZED_NAME_BONUS_SCALE = 0.75;
24
+ /**
25
+ * Query builder for the knowledge graph database
26
+ */
27
+ export declare class QueryBuilder {
28
+ private db;
29
+ private projectNameTokens;
30
+ private isDeprioritizedPath;
31
+ private nodeCache;
32
+ private readonly maxCacheSize;
33
+ private stmts;
34
+ private segmentedNames;
35
+ private static readonly MAX_SEGMENTED_NAMES;
36
+ private batchStmts;
37
+ private static readonly BATCH_SIZES;
38
+ /**
39
+ * Run `rows` through a multi-row `INSERT` built as `head + (tuple,)*n`,
40
+ * decomposed greedily into the cached batch sizes. Preserves row order.
41
+ */
42
+ private runBatched;
43
+ constructor(db: SqliteDatabase);
44
+ /**
45
+ * Swap the underlying connection in place. Used by pool workers'
46
+ * connection recycling (plan §7a.6, writes-under-readers): a long-lived
47
+ * read connection pins WAL checkpoint progress, and the deep WAL that
48
+ * accumulates behind it taxes every main-thread B-tree page operation
49
+ * (deletes measured 42.6s → 118.8s from 0 to 4 attached readers on
50
+ * identical hardware). Workers therefore close and reopen their read-only
51
+ * connection at the pool-idle boundary; everything above the connection —
52
+ * this QueryBuilder, the resolver and its warm caches — survives, and only
53
+ * connection-derived state (prepared statements) resets, re-preparing
54
+ * lazily on next use.
55
+ */
56
+ rebind(db: SqliteDatabase): void;
57
+ /** Set the normalized project-name tokens used to down-weight non-discriminative
58
+ * query words in path scoring (#720). Called once when the project opens. */
59
+ setProjectNameTokens(tokens: Set<string>): void;
60
+ /** The normalized project-name tokens (#720); empty if none were derived. */
61
+ getProjectNameTokens(): Set<string>;
62
+ /**
63
+ * Set the predicate that marks a path as de-prioritized by the project's
64
+ * `codegraph.json` `deprioritize` patterns (#982). Ranking-only: those paths
65
+ * stay indexed and findable, they just stop outranking first-party code.
66
+ * Called once when the project opens; undefined disables the lever.
67
+ */
68
+ setDeprioritizedPathMatcher(matcher: ((filePath: string) => boolean) | undefined): void;
69
+ /** The `deprioritize` predicate (#982), so other rankers apply the same lever. */
70
+ getDeprioritizedPathMatcher(): ((filePath: string) => boolean) | undefined;
71
+ /**
72
+ * Insert a new node
73
+ */
74
+ insertNode(node: Node): void;
75
+ /** Which node kinds contribute their name to the segment vocabulary — the
76
+ * single gate shared by insertNode, updateNode, and the rebuild page query
77
+ * (getDistinctNodeNames), so the write paths can't drift apart. */
78
+ private isSegmentableKind;
79
+ /** Write `name`'s segments into name_segment_vocab (idempotent). */
80
+ private insertNameSegments;
81
+ /**
82
+ * Insert multiple nodes in a transaction
83
+ */
84
+ insertNodes(nodes: Node[]): void;
85
+ /**
86
+ * Store one file's whole extraction bundle — nodes, edges, unresolved refs,
87
+ * and the file record — in a SINGLE transaction. The bulk-index path calls
88
+ * this once per file instead of opening one transaction per table (#1015
89
+ * file-order commit discipline is unchanged: callers still invoke it in file
90
+ * order, and row order within is input order).
91
+ *
92
+ * Edges MUST already be endpoint-filtered by the caller (the store path
93
+ * filters to the file's own inserted node ids), so the per-file existence
94
+ * SELECT that insertEdges() pays is skipped here.
95
+ */
96
+ storeFileBundle(bundle: {
97
+ nodes: Node[];
98
+ edges: Edge[];
99
+ refs: UnresolvedReference[];
100
+ file: FileRecord;
101
+ }): void;
102
+ /**
103
+ * Collect (segment, name) rows for a name, honouring the same session-dedupe
104
+ * semantics as insertNameSegments(). Shared by the bulk write paths.
105
+ */
106
+ private collectNameSegmentRows;
107
+ /**
108
+ * Update an existing node
109
+ */
110
+ updateNode(node: Node): void;
111
+ /**
112
+ * Delete a node by ID
113
+ */
114
+ deleteNode(id: string): void;
115
+ /**
116
+ * Delete all nodes for a file
117
+ */
118
+ deleteNodesByFile(filePath: string): void;
119
+ /** Wipe the segment vocabulary. A full index calls this at its start; the
120
+ * node write path repopulates it as files (re-)index, so the end state is
121
+ * exactly the current names with no orphan rows. */
122
+ clearNameSegmentVocab(): void;
123
+ /** True when the vocab has no rows — an index built before the table existed.
124
+ * `sync` uses this to heal such databases (see rebuildNameSegmentVocabFrom). */
125
+ isNameSegmentVocabEmpty(): boolean;
126
+ /** One page of distinct segmentable node names, for batched vocab rebuilds
127
+ * (file basenames and import specifiers are excluded from the vocab — see
128
+ * insertNode). */
129
+ getDistinctNodeNames(limit: number, offset: number): string[];
130
+ /** Insert segments for a batch of names in one transaction (vocab heal path). */
131
+ insertNameSegmentsBatch(names: string[]): void;
132
+ /**
133
+ * Names whose segments cover at least `minWords` distinct PROMPT WORDS —
134
+ * the co-occurrence probe behind the prompt hook's medium tier: the words
135
+ * "state" and "machine" both being segments of `OrderStateMachine` is strong
136
+ * evidence the prompt names that symbol in prose. Ordered by coverage.
137
+ *
138
+ * Takes (segment variant → original word) pairs and folds variants back to
139
+ * their word INSIDE the SQL: a name matching both `service` and `services`
140
+ * counts ONE word, not two. Counting raw variants let plural-variant pairs
141
+ * of a single word tie with genuine two-word matches and — because ORDER
142
+ * BY/LIMIT run here, before any JS-side re-check — crowd a real match past
143
+ * the LIMIT on vocab-heavy repos (#1146).
144
+ */
145
+ getSegmentCoOccurrence(variants: Array<{
146
+ segment: string;
147
+ word: string;
148
+ }>, minWords: number, limit: number): Array<{
149
+ name: string;
150
+ matches: number;
151
+ }>;
152
+ /** How many distinct names each segment appears in — the rarity signal that
153
+ * separates a discriminative word ("checkout") from a ubiquitous one ("state"). */
154
+ getSegmentNameCounts(segments: string[]): Map<string, number>;
155
+ /** Names containing the given segment (rare-single-word tier). */
156
+ getNamesForSegment(segment: string, limit: number): string[];
157
+ /**
158
+ * Get a node by ID
159
+ */
160
+ getNodeById(id: string): Node | null;
161
+ /**
162
+ * Batch lookup: fetch many nodes by ID in a single SQL round-trip.
163
+ *
164
+ * Replaces the N+1 pattern in graph traversal where every edge would
165
+ * trigger its own `getNodeById` call. For a function with 50 callers
166
+ * this collapses 50 point reads into one IN-list query (~10-50x
167
+ * faster end-to-end).
168
+ *
169
+ * Returns a Map keyed by id so callers can preserve their own ordering
170
+ * (typically the order edges were returned from the graph). Missing IDs
171
+ * are simply absent from the map.
172
+ *
173
+ * Cache-aware: ids already in the LRU cache are served from memory and
174
+ * the SQL query only touches the misses.
175
+ */
176
+ getNodesByIds(ids: readonly string[]): Map<string, Node>;
177
+ private getExistingNodeIds;
178
+ /**
179
+ * Add a node to the cache, evicting oldest if needed
180
+ */
181
+ private cacheNode;
182
+ /**
183
+ * Clear the node cache
184
+ */
185
+ clearCache(): void;
186
+ /**
187
+ * Get all nodes in a file
188
+ */
189
+ getNodesByFile(filePath: string): Node[];
190
+ /**
191
+ * Find the file that holds the densest concentration of the project's
192
+ * internal call graph — the "core" file. Used by context-builder to
193
+ * boost ranking of symbols in that file's directory (so e.g. sinatra
194
+ * queries surface `lib/sinatra/base.rb`'s `route!` instead of
195
+ * `sinatra-contrib/lib/sinatra/multi_route.rb`'s `route` extension).
196
+ *
197
+ * Returns null if no file has a meaningful concentration (e.g. spread
198
+ * evenly across many files, or empty index).
199
+ *
200
+ * "Internal" = source and target are in the same file. Cross-file
201
+ * edges aren't useful here — they don't tell us which file is the
202
+ * functional center.
203
+ *
204
+ * Excludes test/spec files from candidacy via path-pattern. The agent's
205
+ * typical question is "how does X work", not "how is X tested", so
206
+ * boosting a test file's directory would be a misfire.
207
+ */
208
+ getDominantFile(): {
209
+ filePath: string;
210
+ edgeCount: number;
211
+ nextEdgeCount: number;
212
+ } | null;
213
+ /**
214
+ * Find the file that holds the densest concentration of the project's
215
+ * `route` nodes (framework-emitted: Express/Gin/Flask/Rails/Drupal/etc.).
216
+ * Used by handleContext on small repos to inline the project's routing
217
+ * config when the agent's query is about request flow — eliminating the
218
+ * "Glob + Read routes.rb" pattern that beats codegraph on tiny realworld
219
+ * template repos.
220
+ *
221
+ * Excludes test/generated files from candidacy. Returns null if there
222
+ * are fewer than 3 non-test routes total, or if no file holds at least
223
+ * 30% of them (diffuse routing → no single answer file).
224
+ */
225
+ getTopRouteFile(): {
226
+ filePath: string;
227
+ routeCount: number;
228
+ totalRoutes: number;
229
+ } | null;
230
+ /**
231
+ * Build a URL → handler manifest from the index. Each route node's
232
+ * `references` edge points at the function/method that handles the
233
+ * request. We join them in one pass; the agent gets the canonical
234
+ * routing answer ("POST /users/login → AuthController#login") without
235
+ * having to parse the framework's route DSL itself.
236
+ *
237
+ * Also returns the file with the most handler endpoints — used as the
238
+ * "top handler file" to inline source for, so the agent has both the
239
+ * mapping AND the handler implementations.
240
+ */
241
+ getRoutingManifest(limit?: number): {
242
+ entries: Array<{
243
+ url: string;
244
+ handler: string;
245
+ handlerFile: string;
246
+ handlerLine: number;
247
+ handlerKind: string;
248
+ /** The route node itself: where the URL is REGISTERED, not where it is served. */
249
+ routeId: string;
250
+ routeFile: string;
251
+ routeLine: number;
252
+ }>;
253
+ topHandlerFile: string | null;
254
+ topHandlerFileCount: number;
255
+ totalRoutes: number;
256
+ } | null;
257
+ /**
258
+ * Get all nodes of a specific kind
259
+ */
260
+ getNodesByKind(kind: NodeKind): Node[];
261
+ /**
262
+ * Stream every node of a kind one at a time (lazy) instead of materializing
263
+ * them all like {@link getNodesByKind}. For unbounded kinds (`function`,
264
+ * `method`) on a symbol-dense project the full array is gigabytes; the
265
+ * dynamic-edge synthesizers only scan-and-filter, so they iterate to keep
266
+ * memory O(1) in the node count rather than O(nodes) (#610).
267
+ */
268
+ iterateNodesByKind(kind: NodeKind): IterableIterator<Node>;
269
+ /**
270
+ * Get all nodes in the database
271
+ */
272
+ getAllNodes(): Node[];
273
+ /**
274
+ * Stream nodes of one language whose `decorators` JSON array contains
275
+ * `decorator`. The LIKE on the JSON text is a cheap index-free pre-filter
276
+ * (a decorator name can appear as a substring of another), so callers must
277
+ * still exact-check `node.decorators.includes(decorator)`. Exists so the
278
+ * kotlin expect/actual synthesizer never materializes the whole node table
279
+ * the way `getAllNodes().filter(...)` did — that array alone OOM'd Node's
280
+ * default heap on a 2M-node graph (#1212).
281
+ */
282
+ iterateNodesByLanguageWithDecorator(language: Language, decorator: string): IterableIterator<Node>;
283
+ /**
284
+ * Distinct languages present in the files table. One indexed aggregate —
285
+ * lets the dynamic-edge synthesizers skip passes for languages the project
286
+ * doesn't contain at all (a Kotlin pass has no work on a pure-C repo), so
287
+ * their cost is zero rather than a full-graph scan that finds nothing (#1212).
288
+ */
289
+ getDistinctFileLanguages(): Set<string>;
290
+ /**
291
+ * Get nodes by exact name match (uses idx_nodes_name index).
292
+ *
293
+ * This is resolution's candidate list, and the ORDER BY is load-bearing for
294
+ * index correctness, not cosmetic (CG-33). When a reference names a symbol
295
+ * that several files define and nothing disambiguates them, resolution binds
296
+ * to the first candidate — so without an ORDER BY the winner was decided by
297
+ * rowid, i.e. by the order files happened to be WRITTEN. A full index writes
298
+ * them in scan order; an incremental sync appends each file as it changes, so
299
+ * the same tree resolved to different edges depending on how the index was
300
+ * built, and a long-lived synced index drifted away from a rebuild of itself
301
+ * (measured at 4.3% of distinct edges, mostly `calls`).
302
+ *
303
+ * `(file_path, start_line)` is a property of the CODE, so both paths now pick
304
+ * the same candidate. The sort is paid once per distinct name per resolution
305
+ * run — ReferenceResolver memoizes this in its nameCache — and the population
306
+ * is capped by AMBIGUOUS_NAME_CEILING (#999).
307
+ */
308
+ getNodesByName(name: string): Node[];
309
+ /**
310
+ * Nodes whose name starts with `prefix`, by index range scan (a LIKE would
311
+ * skip idx_nodes_name under SQLite's default case-insensitive LIKE).
312
+ */
313
+ getNodesByNamePrefix(prefix: string, limit?: number): Node[];
314
+ /**
315
+ * Get nodes by exact qualified name match (uses idx_nodes_qualified_name index)
316
+ */
317
+ getNodesByQualifiedNameExact(qualifiedName: string): Node[];
318
+ /**
319
+ * Get nodes by name, case-insensitively (seeks the idx_nodes_lower_name
320
+ * expression index).
321
+ *
322
+ * The parameter is lowered in SQL rather than trusted to arrive lowered, so
323
+ * the lookup means the same thing whatever casing a caller hands it. Written
324
+ * as a bare `lower(name) = ?` it silently returned nothing for any input
325
+ * carrying an uppercase letter, and — because SQLite's `lower()` folds ASCII
326
+ * only while JavaScript's `.toLowerCase()` folds Unicode — a caller that
327
+ * pre-lowered in JavaScript could not match a non-ASCII name at all.
328
+ *
329
+ * Note this hardens the query, not its one caller: `matchFuzzy` still lowers
330
+ * in JavaScript before calling, so the non-ASCII gap remains open there.
331
+ */
332
+ getNodesByLowerName(name: string): Node[];
333
+ /**
334
+ * Search nodes by name using FTS with fallback to LIKE for better matching
335
+ *
336
+ * Search strategy:
337
+ * 1. Try FTS5 prefix match (query*) for word-start matching
338
+ * 2. If no results, try LIKE for substring matching (e.g., "signIn" finds "signInWithGoogle")
339
+ * 3. Score results based on match quality
340
+ */
341
+ searchNodes(query: string, options?: SearchOptions): SearchResult[];
342
+ /**
343
+ * Match-everything path used when the user supplied only field
344
+ * filters (`kind:function lang:typescript`) with no text. Returns
345
+ * candidates ordered by name; the caller's filter pass narrows to
346
+ * what was asked for.
347
+ */
348
+ private searchAllByFilters;
349
+ /**
350
+ * Fuzzy fallback: when zero FTS/LIKE hits, try an edit-distance
351
+ * sweep over the distinct symbol-name set. Caps `maxDist` at 2 so
352
+ * `getUssr` finds `getUser` but `process` doesn't match `prosody`.
353
+ * Bounded edit distance keeps each comparison cheap; the per-query
354
+ * scan is O(distinct-name-count) which is far smaller than total
355
+ * node count on any real codebase.
356
+ */
357
+ private searchNodesFuzzy;
358
+ /**
359
+ * FTS5 search with prefix matching
360
+ */
361
+ private searchNodesFTS;
362
+ /**
363
+ * LIKE-based substring search for cases where FTS doesn't match
364
+ * Useful for camelCase matching (e.g., "signIn" finds "signInWithGoogle")
365
+ */
366
+ private searchNodesLike;
367
+ /**
368
+ * Find nodes by exact name match
369
+ *
370
+ * Used for hybrid search - looks up symbols by exact name or case-insensitive match.
371
+ * Returns high-confidence matches for known symbol names extracted from query.
372
+ *
373
+ * @param names - Array of symbol names to look up
374
+ * @param options - Search options (kinds, languages, limit)
375
+ * @returns SearchResult array with exact matches scored at 1.0
376
+ */
377
+ findNodesByExactName(names: string[], options?: SearchOptions): SearchResult[];
378
+ /**
379
+ * Find nodes whose name contains a substring (LIKE-based).
380
+ * Useful for CamelCase-part matching where FTS fails because
381
+ * e.g. "TransportSearchAction" is one FTS token, not matchable by "Search"*.
382
+ *
383
+ * Results are ordered by name length (shorter = more likely to be the core type).
384
+ */
385
+ findNodesByNameSubstring(substring: string, options?: SearchOptions & {
386
+ excludePrefix?: boolean;
387
+ }): SearchResult[];
388
+ /**
389
+ * Insert a new edge
390
+ */
391
+ insertEdge(edge: Edge): void;
392
+ /**
393
+ * Insert multiple edges in a transaction
394
+ */
395
+ insertEdges(edges: Edge[]): void;
396
+ /**
397
+ * Delete all edges from a source node
398
+ */
399
+ deleteEdgesBySource(sourceId: string): void;
400
+ /**
401
+ * Get outgoing edges from a node
402
+ */
403
+ getOutgoingEdges(sourceId: string, kinds?: EdgeKind[], provenance?: string): Edge[];
404
+ /**
405
+ * Get incoming edges to a node
406
+ */
407
+ getIncomingEdges(targetId: string, kinds?: EdgeKind[]): Edge[];
408
+ /**
409
+ * Outgoing edges for MANY source nodes in one query.
410
+ *
411
+ * The batch form of {@link getOutgoingEdges}. Building a nested outline needs
412
+ * the `contains` edges of every container in a file at once; doing that one
413
+ * source at a time is a query per symbol on files that have hundreds.
414
+ */
415
+ getOutgoingEdgesFrom(sourceIds: readonly string[], kinds?: EdgeKind[]): Edge[];
416
+ /**
417
+ * Fan-in (total incoming edge count) for MANY nodes in one query.
418
+ *
419
+ * The per-node alternative — `getIncomingEdges(id).length` — is an indexed
420
+ * lookup each, but a symbol screen rendering a couple of hundred callees
421
+ * would issue a couple of hundred of them. Ids with no incoming edges are
422
+ * absent from the map rather than present as 0, so callers can tell "no
423
+ * edges" from "not asked about".
424
+ */
425
+ countIncomingEdges(ids: readonly string[]): Map<string, number>;
426
+ /**
427
+ * Incoming edges for MANY target nodes in one query — the mirror of
428
+ * {@link getOutgoingEdgesFrom}. Needed wherever a whole file's inbound edges
429
+ * are wanted at once ("which files import anything in this one?").
430
+ */
431
+ getIncomingEdgesTo(targetIds: readonly string[], kinds?: EdgeKind[]): Edge[];
432
+ /**
433
+ * Fan-out (total outgoing edge count) for MANY nodes in one query — the
434
+ * mirror of {@link countIncomingEdges}. Ids with no outgoing edges are absent
435
+ * from the map rather than present as 0.
436
+ */
437
+ countOutgoingEdges(ids: readonly string[]): Map<string, number>;
438
+ /**
439
+ * Symbols nothing in the index points at — the candidate set behind the dead
440
+ * code list (`src/graph/dead-code.ts`).
441
+ *
442
+ * "Points at" is every edge kind EXCEPT `contains`: a class containing a
443
+ * method is structure, not use, and counting it would make every member look
444
+ * reached by its own container. A self-edge is excluded for the same reason
445
+ * a recursive function is not its own caller.
446
+ *
447
+ * One scan, one index probe per candidate. `NOT EXISTS` over
448
+ * `idx_edges_target_kind` is what keeps it that way — the alternative
449
+ * (`LEFT JOIN edges … GROUP BY`) builds a row per edge for the whole table
450
+ * before discarding all but the empty groups. Ordered by position so the
451
+ * answer is stable across runs and groups by file without a second sort.
452
+ *
453
+ * The result is deliberately NOT called dead code: an unreferenced symbol is
454
+ * a symbol with no STATIC reference, and the caller applies the exclusions
455
+ * (tests, generated files, overrides, unresolved names) that turn the
456
+ * candidate set into a claim worth making.
457
+ */
458
+ getUnreferencedNodes(kinds: readonly string[], limit: number): Array<{
459
+ node: Node;
460
+ generated: boolean;
461
+ }>;
462
+ /**
463
+ * Which of `names` the index holds an UNRESOLVED reference to.
464
+ *
465
+ * The point is honesty about our own blind spots. A `failed` row in
466
+ * `unresolved_refs` records that some file referenced a name and the resolver
467
+ * could not decide what it meant — so a symbol with that name cannot be
468
+ * called unreferenced, whatever the edge table says. It is deliberately
469
+ * matched loosely, on the reference name AND on its tail (`util.greet` →
470
+ * `greet`), because the question being asked is "could this name be the one
471
+ * we failed to follow", and a maybe has to count as a yes.
472
+ *
473
+ * Bounded-lookup like {@link getGeneratedPathsAmong}: the caller holds a
474
+ * candidate list, so this is a chunked probe over `idx_unresolved_name`, not
475
+ * a scan of the table.
476
+ */
477
+ getUnresolvedNamesAmong(names: Iterable<string>): Set<string>;
478
+ /**
479
+ * Which of `names` are carried by MORE THAN ONE symbol, at least one of which
480
+ * something points at.
481
+ *
482
+ * The false positive this exists to kill: `CodeGraph.getTopRouteFile` calls
483
+ * `this.queries.getTopRouteFile()`, and the resolver — which prefers a
484
+ * same-name definition in the call site's own file — attaches that edge to
485
+ * the *calling* method. One of the two ends up with a self-edge and the other
486
+ * with nothing at all, and neither is unreferenced. From the edge table the
487
+ * mis-resolution and a genuinely unused twin are the same picture, so the
488
+ * claim is not made about either.
489
+ *
490
+ * Both halves of the condition are load-bearing. **More than one symbol**:
491
+ * a uniquely-named function that only calls itself is genuinely dead, and
492
+ * excluding every recursive function would gut the list. **Self-edges
493
+ * counted**: the self-edge IS the fingerprint of the mis-resolution above, so
494
+ * it has to count as evidence that this name resolves somewhere.
495
+ *
496
+ * Chunked probe over `idx_nodes_name`, bounded by the caller's candidate list.
497
+ */
498
+ getAmbiguousReferencedNames(names: Iterable<string>): Set<string>;
499
+ /**
500
+ * Which of the given languages the index records an EXPORT marker for.
501
+ *
502
+ * A self-measurement, and the honest basis for a whole class of exclusion.
503
+ * The dead code report's strongest filter is "exported symbols may be reached
504
+ * from outside this repository" — and that filter silently does nothing for a
505
+ * language whose exports are not recorded, either because the extractor does
506
+ * not record them (Rust `pub`) or because the language has no such concept at
507
+ * all (Python, C, Ruby: the header or the module IS the surface). Rather than
508
+ * carry a table of which is which, ask the index: if nothing in this language
509
+ * is marked exported, the filter did not run, and no claim about outside
510
+ * reachability can be made for it.
511
+ *
512
+ * `idx_nodes_language` covers the grouping; the caller passes the handful of
513
+ * languages its candidates are actually in.
514
+ */
515
+ getLanguagesWithExports(languages: Iterable<string>): Set<string>;
516
+ /**
517
+ * The nodes with the most DISTINCT dependents, most first.
518
+ *
519
+ * "Distinct" is the difference that matters: a helper called forty times from
520
+ * one function has a fan-in of 40 but exactly one dependent. This counts the
521
+ * second thing — the number a reader means by "N callers" — so the top of
522
+ * this list is the set of symbols a change actually radiates furthest from.
523
+ *
524
+ * `contains` is excluded because it is structure, not dependency: counting it
525
+ * would rank every file and class above the code they hold.
526
+ */
527
+ getTopDependedOn(limit: number): Array<{
528
+ nodeId: string;
529
+ dependents: number;
530
+ }>;
531
+ /**
532
+ * The graph's executable roots — files that RUN something at module level,
533
+ * ranked by how much of the project they set in motion.
534
+ *
535
+ * The engine records a statement at the top level of a file as an edge from
536
+ * the *file* node, so `src/bin/codegraph.ts` calling `program.parse()` at
537
+ * module scope is a `calls` edge out of a `file`. That set is what makes the
538
+ * roots of a dependency graph visible: a library module holds definitions and
539
+ * runs nothing until someone imports it, while a CLI, a worker entry or a
540
+ * build script does its work on the way down the file. `instantiates` counts
541
+ * the same way — `new Server(...)` at module scope is the same act.
542
+ *
543
+ * Ranking multiplies the two things an entry point does: it runs (calls), and
544
+ * it wires the project together (distinct other files its symbols reach). One
545
+ * alone is misleading — a registration table makes hundreds of module-level
546
+ * calls into itself, and a barrel file imports everything and runs nothing.
547
+ * The product puts the file that does both at the top.
548
+ */
549
+ getTopCallingFiles(limit: number): Array<{
550
+ nodeId: string;
551
+ filePath: string;
552
+ calls: number;
553
+ reaches: number;
554
+ score: number;
555
+ }>;
556
+ /**
557
+ * How many OTHER files depend on each of the given files.
558
+ *
559
+ * Counted through the symbols, not the file nodes: an `imports` edge points
560
+ * at the imported symbol, so a file node almost never receives one and
561
+ * counting edges into it would report every file as depended on by nobody.
562
+ * Same-file edges are excluded, which is what makes zero mean "nothing else
563
+ * in the index reaches into this file" — the honest reading of a root.
564
+ */
565
+ getFileDependentCounts(filePaths: string[]): Array<{
566
+ filePath: string;
567
+ dependents: number;
568
+ }>;
569
+ /**
570
+ * How far each of the given files reaches OUT: distinct other files its
571
+ * symbols touch, and how many references that is.
572
+ *
573
+ * The mirror of {@link getFileDependentCounts}, and the same reasoning about
574
+ * `contains` and same-file edges applies. It is driven from `nodes` rather
575
+ * than from `edges` so the work is proportional to the files asked about —
576
+ * the entry-points endpoint asks it about every test file in the index, and
577
+ * an edge-first plan would scan the whole table to answer a question about a
578
+ * tenth of it.
579
+ */
580
+ getFileReachCounts(filePaths: string[]): Array<{
581
+ filePath: string;
582
+ reaches: number;
583
+ refs: number;
584
+ }>;
585
+ /**
586
+ * The `file` nodes for the given paths, in one query.
587
+ *
588
+ * A file's own node is what makes a file row navigable, and looking it up
589
+ * with {@link getNodesInFile} means materialising every symbol in the file to
590
+ * throw all but one away.
591
+ */
592
+ getFileNodes(filePaths: string[]): Node[];
593
+ /**
594
+ * Roll the whole edge table up to module granularity in one pass.
595
+ *
596
+ * The caller decides what a module IS — it hands in a file → module
597
+ * assignment and gets back the cross-module traffic. That split is
598
+ * deliberate: naming modules is a *policy* (top-level directories, a façade
599
+ * file kept separate, a monorepo root) that belongs where the reader lives,
600
+ * while grouping a million edges by it is *mechanics* that must happen in
601
+ * SQLite. Doing the fold in JavaScript instead means materialising every
602
+ * cross-file edge in memory; doing the naming in SQL means a tower of
603
+ * `instr`/`substr` no one can read.
604
+ *
605
+ * The assignment lands in a TEMP table with a primary key, so the join is
606
+ * indexed and the result set is bounded by modules², not by edges. Temp
607
+ * tables live in SQLite's own temp database, so this stays valid against a
608
+ * read-only main.
609
+ *
610
+ * Two result sets, because they need two different groupings over the same
611
+ * join: `links` counts edges per (module, module, kind), and `pairs` names
612
+ * the busiest symbol pairs behind each link (the map's tooltip). `pairs` is
613
+ * ranked and cut inside SQLite — the un-cut grouping is the one thing here
614
+ * that scales with distinct symbol names rather than with modules. Pairs are
615
+ * ranked by `declared` before raw count, so a link's tooltip names the
616
+ * symbols the source actually points at rather than whichever `has`/`get`
617
+ * happened to name-match most often.
618
+ *
619
+ * `declared` is the subset of a link's edges that came from something the
620
+ * source *writes down*: an import, a qualified name, an inheritance clause,
621
+ * or a call through a typed receiver. It exists because bare name matching
622
+ * (`resolvedBy: 'exact-match'`) is what invents cross-module links out of
623
+ * common method names — `run`, `push`, `finish` — and a map that lets those
624
+ * decide the layering puts the storage layer above the CLI.
625
+ */
626
+ aggregateModuleGraph(assignments: ReadonlyArray<{
627
+ filePath: string;
628
+ module: string;
629
+ }>, options: {
630
+ kinds: readonly EdgeKind[];
631
+ minConfidence: number;
632
+ topPairsPerLink: number;
633
+ pairKinds: readonly EdgeKind[];
634
+ }): {
635
+ links: Array<{
636
+ source: string;
637
+ target: string;
638
+ kind: EdgeKind;
639
+ count: number;
640
+ declared: number;
641
+ uncertain: number;
642
+ }>;
643
+ pairs: Array<{
644
+ source: string;
645
+ target: string;
646
+ from: string;
647
+ to: string;
648
+ count: number;
649
+ declared: number;
650
+ }>;
651
+ };
652
+ /**
653
+ * Every ordered pair of files where one reaches into the other, once each.
654
+ *
655
+ * The input a cycle finder wants: file-level circular dependencies are the
656
+ * strongly connected components of this graph. One query instead of the
657
+ * dependency lookup per file that {@link GraphQueryManager.findCircularDependencies}
658
+ * does — which matters because a cycle report is only interesting on a large
659
+ * repo, and that is exactly where a query per file stops being affordable.
660
+ *
661
+ * `contains` is excluded (a file "contains" its own symbols, which is not a
662
+ * dependency), and so are same-file edges and low-confidence name matches:
663
+ * a cycle conjured by a common method name is a false alarm a reader cannot
664
+ * check.
665
+ */
666
+ getCrossFileDependencyPairs(minConfidence: number): Array<{
667
+ source: string;
668
+ target: string;
669
+ }>;
670
+ /**
671
+ * Every unresolved reference recorded in one FILE, ordered by line.
672
+ *
673
+ * The per-symbol form above answers "what does this body reach that the
674
+ * index does not hold". A whole-file reader asks the same question of every
675
+ * line at once, and asking it one symbol at a time is a query per symbol —
676
+ * 153 of them on this repo's largest file. `unresolved_refs.file_path` is
677
+ * indexed, so this is one lookup whatever the file holds.
678
+ *
679
+ * `limit` bounds the answer rather than the work: the caller draws a marker
680
+ * per row, and a generated file with fifty thousand of them would ship
681
+ * megabytes to say something a count already says. Rows come back in line
682
+ * order, so a cap trims the END of the file, which is at least legible.
683
+ */
684
+ getUnresolvedReferencesInFile(filePath: string, limit?: number): UnresolvedReference[];
685
+ /**
686
+ * References recorded against a symbol that never resolved to a node — the
687
+ * calls and type mentions that leave the index (a third-party package, a
688
+ * runtime builtin, a language construct extraction doesn't model).
689
+ *
690
+ * Read-only. It exists so a reader can say "N calls into symbols outside the
691
+ * index" instead of silently showing a callee list shorter than the body's
692
+ * call sites, which reads as "nothing else happens here".
693
+ */
694
+ getUnresolvedReferencesFrom(fromNodeId: string): UnresolvedReference[];
695
+ /**
696
+ * Find all edges where both source and target are in the given node set.
697
+ * Useful for recovering inter-node connectivity after BFS.
698
+ */
699
+ findEdgesBetweenNodes(nodeIds: string[], kinds?: EdgeKind[]): Edge[];
700
+ /**
701
+ * Distinct file paths that DEPEND ON `filePath`: every file containing a
702
+ * symbol with a cross-file edge (any kind except `contains`) into a symbol
703
+ * of this file. This is the file-level projection of the symbol dependency
704
+ * graph and the basis for blast-radius / `affected` test selection.
705
+ *
706
+ * It deliberately does NOT restrict to `imports` edges. In this graph an
707
+ * `imports` edge connects a file to its own local import declarations
708
+ * (it is always same-file), so an imports-only lookup returns zero
709
+ * cross-file dependents for every file. The real cross-file dependency
710
+ * signal is the resolved call/reference graph — calls, references,
711
+ * instantiates, extends, implements, overrides, type_of, returns,
712
+ * decorates — exactly what {@link GraphTraverser.getImpactRadius} traverses.
713
+ * `contains` is excluded: a parent containing a symbol does not *depend* on
714
+ * it. One indexed query (idx_nodes_file_path + idx_edges_target_kind).
715
+ */
716
+ getDependentFilePaths(filePath: string): string[];
717
+ /**
718
+ * Distinct file paths that `filePath` DEPENDS ON — the inverse of
719
+ * {@link getDependentFilePaths}: every file containing a symbol that a
720
+ * symbol of this file has a cross-file edge into. Same edge-kind rules
721
+ * (all kinds except `contains`); same reason imports-only is insufficient.
722
+ */
723
+ getDependencyFilePaths(filePath: string): string[];
724
+ /**
725
+ * Cross-file edges whose TARGET is a node in `filePath` and whose SOURCE is a
726
+ * node in a *different* file, paired with the target node's (name, kind) so a
727
+ * caller can re-resolve the edge to the re-indexed target's new ID (node IDs
728
+ * are `sha256(filePath:kind:name:line)`, so any line shift in the callee file
729
+ * changes target IDs and a naive re-insert by old ID silently drops them).
730
+ * Used by `storeExtractionResult` to preserve incoming edges across a file
731
+ * re-index (issue #899). Same edge-kind rules as
732
+ * {@link getDependentFilePaths}: all kinds except `contains`.
733
+ */
734
+ getCrossFileIncomingEdgesWithTarget(filePath: string): Array<Edge & {
735
+ targetName: string;
736
+ targetKind: NodeKind;
737
+ sourceFilePath: string;
738
+ sourceLanguage: Language;
739
+ }>;
740
+ /**
741
+ * Insert or update a file record
742
+ */
743
+ upsertFile(file: FileRecord): void;
744
+ /**
745
+ * Which of `filePaths` the index flagged as tool-generated (schema v9+).
746
+ *
747
+ * Bounded-lookup by design: every consumer already holds a short candidate
748
+ * list (a ranked file group, an FTS result page, a LIMIT-20 aggregate), so
749
+ * this stays a partial-index probe over a handful of paths — no whole-repo
750
+ * set to materialize, and no cache to invalidate, which means a ranking call
751
+ * can never serve a verdict the last sync already replaced.
752
+ *
753
+ * Returns ONLY the content/index signal; callers union it with
754
+ * {@link isGeneratedFile} so pre-v9 databases (column present, all zeros
755
+ * until a re-index) keep the path-only behavior rather than regressing.
756
+ */
757
+ getGeneratedPathsAmong(filePaths: Iterable<string>): Set<string>;
758
+ /**
759
+ * A reusable `(path) => boolean` over a bounded candidate list, unioning the
760
+ * indexed flag with the path convention. This is the shape every ranking
761
+ * comparator wants: one query up front, then O(1) per comparison.
762
+ */
763
+ generatedPredicateFor(filePaths: Iterable<string>): (filePath: string) => boolean;
764
+ /**
765
+ * Which of `filePaths` are AMBIENT DECLARATION files — they declare nothing
766
+ * but types, and nothing in the index depends on them (CG-28). A hand-written
767
+ * ambient `.d.ts` of global shims, a vendored typings file, module
768
+ * augmentation: reachable only by name, structurally attached to nothing.
769
+ *
770
+ * Structural, not extension-based, so a hand-written `types.ts` and a `.d.ts`
771
+ * are judged by the same rule and a `.d.ts` that does declare a class or a
772
+ * const is (correctly) not caught. Four conditions, all required:
773
+ *
774
+ * 1. it declares at least one symbol — an empty or unparsed file is not a
775
+ * declaration file, it is a file we know nothing about;
776
+ * 2. EVERY declared symbol is a type-level kind (interface / type alias /
777
+ * enum / namespace). The narrowness is deliberate and measured: a rule
778
+ * of "no callables" alone flags 1–18% of a repo, including Kotlin sealed
779
+ * classes, Rust `mod.rs` re-exports and django's locale constant tables —
780
+ * real source that must not be demoted. This rule flags 0–4%;
781
+ * 3. no symbol in it originates a `calls`/`instantiates` edge — the direct
782
+ * evidence that nothing here has a body;
783
+ * 4. NOTHING ELSE IN THE INDEX points at it. This is the condition that
784
+ * separates an ambient shim from a working type module, and it is why
785
+ * the flag is narrow enough to be safe: `displacement-ts`'s pipeline
786
+ * `types.ts` passes 1–3 identically but carries 13 inbound imports and
787
+ * 21 references, so the files that answer a query about the pipeline are
788
+ * typed BY it — it is part of that answer's structure. An ambient
789
+ * `declare global` shim has zero. Deliberately index-wide rather than
790
+ * restricted to the candidate list: the file that imports it is usually
791
+ * not itself a candidate.
792
+ *
793
+ * Bounded-lookup like {@link getGeneratedPathsAmong}: callers hold a ranked
794
+ * candidate list, so this is a partial-index probe over a handful of paths.
795
+ */
796
+ getAmbientDeclarationPathsAmong(filePaths: Iterable<string>): Set<string>;
797
+ /**
798
+ * A reusable `(path) => boolean` ambient-declaration test over a bounded
799
+ * candidate list — the shape a ranking comparator wants: one query up front,
800
+ * O(1) per comparison.
801
+ */
802
+ ambientDeclarationPredicateFor(filePaths: Iterable<string>): (filePath: string) => boolean;
803
+ /** How many indexed files carry the generated flag. Surfaced by `status`. */
804
+ countGeneratedFiles(): number;
805
+ /**
806
+ * Delete a file record and its nodes
807
+ */
808
+ deleteFile(filePath: string): void;
809
+ /**
810
+ * Get a file record by path
811
+ */
812
+ getFileByPath(filePath: string): FileRecord | null;
813
+ /**
814
+ * Get all tracked files
815
+ */
816
+ getAllFiles(): FileRecord[];
817
+ /**
818
+ * Most recent index timestamp (ms since epoch) across all tracked files, or
819
+ * null when nothing is indexed yet. One indexed aggregate, no per-row scan. (#329)
820
+ */
821
+ getLastIndexedAt(): number | null;
822
+ /**
823
+ * The index's revision marker: how far the last sync got, and how many files
824
+ * it left behind — one query, both numbers.
825
+ *
826
+ * This is the cheapest honest answer to "has the index moved since I last
827
+ * looked". `MAX(indexed_at)` alone is not enough: a sync that only DELETES
828
+ * files (a branch checkout that removed a directory) advances nothing, and
829
+ * the graph the viewer is showing has still changed underneath it. The row
830
+ * count catches exactly that case.
831
+ */
832
+ getIndexRevision(): {
833
+ lastIndexedAt: number | null;
834
+ fileCount: number;
835
+ };
836
+ /**
837
+ * Files re-indexed strictly after `since` (ms since epoch), newest first.
838
+ *
839
+ * `total` is the real count; `paths` is capped at `limit`. Used by the
840
+ * viewer's live channel to name what a sync just picked up. A file the same
841
+ * sync DELETED cannot appear here — it has no row left — which is why the
842
+ * caller compares {@link getIndexRevision} as well rather than treating an
843
+ * empty list as "nothing happened".
844
+ */
845
+ getFilesIndexedSince(since: number, limit: number): {
846
+ paths: string[];
847
+ total: number;
848
+ };
849
+ /**
850
+ * Get files that need re-indexing (hash changed)
851
+ */
852
+ getStaleFiles(currentHashes: Map<string, string>): FileRecord[];
853
+ /**
854
+ * Insert an unresolved reference
855
+ */
856
+ insertUnresolvedRef(ref: UnresolvedReference): void;
857
+ /**
858
+ * Insert multiple unresolved references in a transaction
859
+ */
860
+ insertUnresolvedRefsBatch(refs: UnresolvedReference[]): void;
861
+ /**
862
+ * Delete unresolved references from a node
863
+ */
864
+ deleteUnresolvedByNode(nodeId: string): void;
865
+ /**
866
+ * Get unresolved references by name (for resolution)
867
+ */
868
+ getUnresolvedByName(name: string): UnresolvedReference[];
869
+ /**
870
+ * Get all unresolved references
871
+ */
872
+ getUnresolvedReferences(): UnresolvedReference[];
873
+ /**
874
+ * Get the count of PENDING (never-attempted) references without loading
875
+ * them into memory. Rows marked status='failed' — attempted by a completed
876
+ * pass, no match — are excluded: they are not outstanding work, only retry
877
+ * candidates for the #1240 sweep, so they must not trip the #1187 orphan
878
+ * sweep or the `status` pending-refs warning.
879
+ */
880
+ getUnresolvedReferencesCount(): number;
881
+ /**
882
+ * Get a batch of PENDING unresolved references using LIMIT/OFFSET
883
+ * pagination. Used to process references in bounded memory chunks; failed
884
+ * rows are excluded so the batched drain loop terminates once every row
885
+ * has been attempted.
886
+ */
887
+ getUnresolvedReferencesBatch(offset: number, limit: number): UnresolvedReference[];
888
+ /**
889
+ * Keyset variant of {@link getUnresolvedReferencesBatch} for the batched
890
+ * resolution loop: seek past the last-seen row id instead of OFFSET-walking.
891
+ * OFFSET reads re-scan the accumulated failed-row prefix on every batch —
892
+ * O(failed rows) per read, measured at 54.6s of the kernel-scale batch loop
893
+ * (§7a.2) — while the seek is O(batch) forever. `id` is the rowid alias, so
894
+ * the enumeration order is identical to the OFFSET reader's.
895
+ */
896
+ getUnresolvedReferencesBatchAfter(afterRowId: number, limit: number): UnresolvedReference[];
897
+ /**
898
+ * Get all tracked file paths (lightweight — no full FileRecord objects)
899
+ */
900
+ getAllFilePaths(): string[];
901
+ /**
902
+ * Get all distinct node names (lightweight — just name strings for pre-filtering)
903
+ */
904
+ getAllNodeNames(): string[];
905
+ /**
906
+ * Stream the distinct node names one row at a time — the incremental
907
+ * counterpart to {@link getAllNodeNames} for callers that need to yield
908
+ * to the event loop mid-scan (resolver cache warm-up on multi-million-node
909
+ * indexes). Fresh statement per call: the iterator holds an open cursor.
910
+ */
911
+ iterateNodeNames(): IterableIterator<string>;
912
+ /**
913
+ * Get unresolved references scoped to specific file paths.
914
+ * Uses the idx_unresolved_file_path index for efficient lookup.
915
+ */
916
+ getUnresolvedReferencesByFiles(filePaths: string[]): UnresolvedReference[];
917
+ /**
918
+ * Delete all unresolved references (after resolution)
919
+ */
920
+ clearUnresolvedReferences(): void;
921
+ /**
922
+ * Delete resolved references by their IDs
923
+ */
924
+ deleteResolvedReferences(fromNodeIds: string[]): void;
925
+ /**
926
+ * Delete specific resolved references by (fromNodeId, referenceName, referenceKind) tuples.
927
+ * More precise than deleteResolvedReferences — only removes refs that were actually resolved.
928
+ */
929
+ deleteSpecificResolvedReferences(refs: Array<{
930
+ fromNodeId: string;
931
+ referenceName: string;
932
+ referenceKind: string;
933
+ }>): number;
934
+ /**
935
+ * Delete unresolved-ref rows by row id — the precise cleanup for refs a
936
+ * resolution pass actually processed. The key-tuple variant above also
937
+ * deletes SIBLING rows (same caller calling the same callee at other lines)
938
+ * that a later batch hasn't attempted yet, so when a batch boundary split a
939
+ * caller's same-named call sites, the later sites' edges were silently never
940
+ * created (#1269).
941
+ */
942
+ deleteReferencesByRowIds(rowIds: number[]): number;
943
+ /**
944
+ * Mark refs a completed resolution pass could not resolve as status='failed'
945
+ * instead of deleting them (#1240). Failed rows are invisible to the pending
946
+ * count/batch readers (so drain loops and the #1187 orphan sweep still
947
+ * terminate) but stay queryable by name_tail so a later sync can retry them
948
+ * when a changed file introduces a symbol that could satisfy them. name_tail
949
+ * is (re)written here so rows inserted before the v8 migration get their
950
+ * tail the first time they're attempted.
951
+ */
952
+ markReferencesFailed(refs: Array<{
953
+ fromNodeId: string;
954
+ referenceName: string;
955
+ referenceKind: string;
956
+ }>): number;
957
+ /**
958
+ * Park refs as status='failed' by row id — the precise counterpart of
959
+ * markReferencesFailed, for the same reason as deleteReferencesByRowIds:
960
+ * the key-tuple variant also flips same-key sibling rows in later batches
961
+ * to 'failed' before they were ever attempted (#1269). Resolution outcome
962
+ * can differ per call site (receiver-type inference reads the ref's line),
963
+ * so a sibling must not inherit this row's failure.
964
+ */
965
+ markReferencesFailedByRowIds(refs: Array<{
966
+ rowId: number;
967
+ referenceName: string;
968
+ }>): number;
969
+ /**
970
+ * Failed refs whose name tail matches one of the given symbol names — the
971
+ * candidates a sync should retry after files carrying those names changed
972
+ * (#1240). Names matching more than `perNameCeiling` failed refs are
973
+ * skipped entirely: at that population a name is external/builtin noise
974
+ * (`get`, `map`, …) that one new definition won't resolve — the same
975
+ * rationale as resolution's AMBIGUOUS_NAME_CEILING (#999) — and retrying an
976
+ * arbitrary subset would be both wasted work and incoherent coverage.
977
+ */
978
+ getRetryableFailedReferences(names: string[], perNameCeiling?: number): UnresolvedReference[];
979
+ /**
980
+ * Resolution edges whose TARGET symbol is named one of `names` — the edges a
981
+ * sync must re-resolve after `names` gained or lost a definition (CG-33).
982
+ *
983
+ * Resolution binds a reference to a node whose name matches the reference's
984
+ * tail, and it picks among ALL same-named definitions project-wide. So adding
985
+ * or removing one definition of `pct` changes the answer for every `pct(...)`
986
+ * reference in the repo — including references in files this sync never
987
+ * touches, whose edges nothing else revisits. Those edges' current target is,
988
+ * by that same rule, a node named `pct`, which is why the target's name is a
989
+ * sufficient (and index-backed, via idx_nodes_name) way to find them without
990
+ * a schema change or a scan of edge metadata.
991
+ *
992
+ * Returns the source file/language alongside each edge so the caller can
993
+ * resurrect it as its original reference. Excludes `provenance='heuristic'`
994
+ * (synthesized dispatch edges are not resolution output and carry no refName
995
+ * stamp to resurrect from — deleting one would be a permanent loss).
996
+ *
997
+ * Names matching more than `perNameCeiling` edges are skipped entirely, same
998
+ * rationale and same default as {@link getRetryableFailedReferences}: at that
999
+ * population the name is generic (`get`, `clear`, …), one definition changing
1000
+ * won't flip most of them, and rebinding an arbitrary subset is both wasted
1001
+ * work and incoherent coverage.
1002
+ */
1003
+ getResolutionEdgesByTargetName(names: string[], perNameCeiling?: number): Array<Edge & {
1004
+ edgeId: number;
1005
+ sourceFilePath: string;
1006
+ sourceLanguage: Language;
1007
+ }>;
1008
+ /** Delete edges by primary key — the rebind pass's half of a re-resolution. */
1009
+ deleteEdgesByIds(edgeIds: number[]): number;
1010
+ /**
1011
+ * Distinct node names present in the given files — the symbol names a sync
1012
+ * pass uses to look up retryable failed refs after those files changed.
1013
+ */
1014
+ getNodeNamesByFiles(filePaths: string[]): string[];
1015
+ /**
1016
+ * Distinct `file\0name` pairs defined by the given files — the shape sync's
1017
+ * definition delta needs (CG-33).
1018
+ *
1019
+ * Deliberately NOT `getNodeNamesByFiles`: a bare name set is taken over the
1020
+ * WHOLE changed batch, so a name that moves between two files in one commit
1021
+ * (or exists in one changed file and is newly added to another) appears on
1022
+ * both sides and cancels out of the symmetric difference — even though a
1023
+ * definition genuinely appeared or vanished and every reference to that name
1024
+ * repo-wide may now bind elsewhere. Keying by file makes each definition its
1025
+ * own fact, so the move is seen as one removal plus one addition.
1026
+ */
1027
+ getNodeNamePairsByFiles(filePaths: string[]): Set<string>;
1028
+ /**
1029
+ * Lightweight (nodes, edges) count snapshot. Used around an index/sync
1030
+ * run to compute true additions across extraction + resolution +
1031
+ * synthesis — the per-phase counter in the orchestrator only sees
1032
+ * extraction's contribution, which is why the CLI summary under-reported
1033
+ * the edge count (resolution + synthesizer edges were invisible).
1034
+ */
1035
+ getNodeAndEdgeCount(): {
1036
+ nodes: number;
1037
+ edges: number;
1038
+ };
1039
+ /**
1040
+ * Get graph statistics
1041
+ */
1042
+ getStats(): GraphStats;
1043
+ /**
1044
+ * Get a metadata value by key
1045
+ */
1046
+ getMetadata(key: string): string | null;
1047
+ /**
1048
+ * Set a metadata key-value pair (upsert)
1049
+ */
1050
+ setMetadata(key: string, value: string): void;
1051
+ /**
1052
+ * Get all metadata as a key-value record
1053
+ */
1054
+ getAllMetadata(): Record<string, string>;
1055
+ /**
1056
+ * Clear all data from the database
1057
+ */
1058
+ clear(): void;
1059
+ }
1060
+ //# sourceMappingURL=queries.d.ts.map