@colbymchenry/codegraph-win32-arm64 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (622) hide show
  1. package/bin/codegraph +5 -0
  2. package/lib/dist/.test-build-engine.json +1 -0
  3. package/lib/dist/.test-build-viewer.json +1 -0
  4. package/lib/dist/bin/codegraph.d.ts +1 -0
  5. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  6. package/lib/dist/bin/codegraph.js +599 -291
  7. package/lib/dist/bin/codegraph.js.map +1 -1
  8. package/lib/dist/bin/viewer-gate.d.ts +17 -0
  9. package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
  10. package/lib/dist/bin/viewer-gate.js +31 -0
  11. package/lib/dist/bin/viewer-gate.js.map +1 -0
  12. package/lib/dist/context/index.d.ts.map +1 -1
  13. package/lib/dist/context/index.js +43 -2
  14. package/lib/dist/context/index.js.map +1 -1
  15. package/lib/dist/db/index.d.ts +21 -2
  16. package/lib/dist/db/index.d.ts.map +1 -1
  17. package/lib/dist/db/index.js +86 -31
  18. package/lib/dist/db/index.js.map +1 -1
  19. package/lib/dist/db/migrations.d.ts +1 -1
  20. package/lib/dist/db/migrations.d.ts.map +1 -1
  21. package/lib/dist/db/migrations.js +40 -1
  22. package/lib/dist/db/migrations.js.map +1 -1
  23. package/lib/dist/db/queries.d.ts +423 -3
  24. package/lib/dist/db/queries.d.ts.map +1 -1
  25. package/lib/dist/db/queries.js +1026 -33
  26. package/lib/dist/db/queries.js.map +1 -1
  27. package/lib/dist/db/schema.sql +11 -1
  28. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  29. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  30. package/lib/dist/db/sqlite-adapter.js +56 -7
  31. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  32. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  33. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  34. package/lib/dist/db/synthesis-stage.js +89 -0
  35. package/lib/dist/db/synthesis-stage.js.map +1 -0
  36. package/lib/dist/db/wal-valve.d.ts +32 -12
  37. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  38. package/lib/dist/db/wal-valve.js +65 -22
  39. package/lib/dist/db/wal-valve.js.map +1 -1
  40. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  41. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  42. package/lib/dist/db/wsl-shared-index.js +121 -0
  43. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  44. package/lib/dist/directory.d.ts +101 -2
  45. package/lib/dist/directory.d.ts.map +1 -1
  46. package/lib/dist/directory.js +254 -23
  47. package/lib/dist/directory.js.map +1 -1
  48. package/lib/dist/errors.d.ts +14 -0
  49. package/lib/dist/errors.d.ts.map +1 -1
  50. package/lib/dist/errors.js +16 -1
  51. package/lib/dist/errors.js.map +1 -1
  52. package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
  53. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  54. package/lib/dist/extraction/cfml-extractor.js +15 -3
  55. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  56. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  57. package/lib/dist/extraction/dfm-extractor.js +14 -10
  58. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  59. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  60. package/lib/dist/extraction/extraction-version.js +1 -1
  61. package/lib/dist/extraction/function-ref.d.ts +6 -4
  62. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  63. package/lib/dist/extraction/function-ref.js +35 -14
  64. package/lib/dist/extraction/function-ref.js.map +1 -1
  65. package/lib/dist/extraction/grammars.d.ts +38 -0
  66. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  67. package/lib/dist/extraction/grammars.js +77 -1
  68. package/lib/dist/extraction/grammars.js.map +1 -1
  69. package/lib/dist/extraction/index.d.ts +113 -15
  70. package/lib/dist/extraction/index.d.ts.map +1 -1
  71. package/lib/dist/extraction/index.js +599 -132
  72. package/lib/dist/extraction/index.js.map +1 -1
  73. package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
  74. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  75. package/lib/dist/extraction/languages/c-cpp.js +291 -15
  76. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  77. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  78. package/lib/dist/extraction/languages/dart.js +8 -3
  79. package/lib/dist/extraction/languages/dart.js.map +1 -1
  80. package/lib/dist/extraction/languages/javascript.js +1 -1
  81. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  82. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  83. package/lib/dist/extraction/languages/kotlin.js +169 -36
  84. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  85. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  86. package/lib/dist/extraction/languages/lua.js +4 -1
  87. package/lib/dist/extraction/languages/lua.js.map +1 -1
  88. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  89. package/lib/dist/extraction/languages/python.js +71 -0
  90. package/lib/dist/extraction/languages/python.js.map +1 -1
  91. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  92. package/lib/dist/extraction/languages/rust.js +3 -0
  93. package/lib/dist/extraction/languages/rust.js.map +1 -1
  94. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  95. package/lib/dist/extraction/languages/scala.js +18 -3
  96. package/lib/dist/extraction/languages/scala.js.map +1 -1
  97. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  98. package/lib/dist/extraction/languages/typescript.js +9 -2
  99. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  100. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  101. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  102. package/lib/dist/extraction/liquid-extractor.js +98 -22
  103. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  104. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  105. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  106. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  107. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  108. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  109. package/lib/dist/extraction/syntax-tokens.js +381 -0
  110. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  111. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  112. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  113. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  114. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  115. package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
  116. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  117. package/lib/dist/extraction/tree-sitter.d.ts +96 -17
  118. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  119. package/lib/dist/extraction/tree-sitter.js +820 -82
  120. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  121. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  122. package/lib/dist/file-limits.d.ts +40 -0
  123. package/lib/dist/file-limits.d.ts.map +1 -0
  124. package/lib/dist/file-limits.js +147 -0
  125. package/lib/dist/file-limits.js.map +1 -0
  126. package/lib/dist/graph/branch-guards.d.ts +248 -0
  127. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  128. package/lib/dist/graph/branch-guards.js +2231 -0
  129. package/lib/dist/graph/branch-guards.js.map +1 -0
  130. package/lib/dist/graph/dead-code.d.ts +251 -0
  131. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  132. package/lib/dist/graph/dead-code.js +776 -0
  133. package/lib/dist/graph/dead-code.js.map +1 -0
  134. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  135. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  136. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  137. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  138. package/lib/dist/graph/index.d.ts +4 -0
  139. package/lib/dist/graph/index.d.ts.map +1 -1
  140. package/lib/dist/graph/index.js +16 -1
  141. package/lib/dist/graph/index.js.map +1 -1
  142. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  143. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  144. package/lib/dist/graph/named-symbol-flow.js +552 -0
  145. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  146. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  147. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  148. package/lib/dist/graph/symbol-lookup.js +181 -0
  149. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  150. package/lib/dist/graph/traversal.d.ts +9 -0
  151. package/lib/dist/graph/traversal.d.ts.map +1 -1
  152. package/lib/dist/graph/traversal.js +61 -35
  153. package/lib/dist/graph/traversal.js.map +1 -1
  154. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  155. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  156. package/lib/dist/graph/type-hierarchy.js +382 -0
  157. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  158. package/lib/dist/index.d.ts +251 -11
  159. package/lib/dist/index.d.ts.map +1 -1
  160. package/lib/dist/index.js +395 -34
  161. package/lib/dist/index.js.map +1 -1
  162. package/lib/dist/installer/index.d.ts.map +1 -1
  163. package/lib/dist/installer/index.js +3 -2
  164. package/lib/dist/installer/index.js.map +1 -1
  165. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  166. package/lib/dist/installer/targets/antigravity.js +14 -2
  167. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  168. package/lib/dist/installer/targets/claude.d.ts +3 -0
  169. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  170. package/lib/dist/installer/targets/claude.js +35 -7
  171. package/lib/dist/installer/targets/claude.js.map +1 -1
  172. package/lib/dist/installer/targets/codex.d.ts +2 -1
  173. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  174. package/lib/dist/installer/targets/codex.js +14 -4
  175. package/lib/dist/installer/targets/codex.js.map +1 -1
  176. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  177. package/lib/dist/installer/targets/copilot-cli.js +7 -1
  178. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  179. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  180. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  181. package/lib/dist/installer/targets/opencode.js +73 -22
  182. package/lib/dist/installer/targets/opencode.js.map +1 -1
  183. package/lib/dist/installer/targets/shared.d.ts +14 -3
  184. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  185. package/lib/dist/installer/targets/shared.js +39 -11
  186. package/lib/dist/installer/targets/shared.js.map +1 -1
  187. package/lib/dist/installer/targets/types.d.ts +7 -0
  188. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  189. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  190. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  191. package/lib/dist/mcp/answer-freshness.js +68 -0
  192. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  193. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  194. package/lib/dist/mcp/daemon-manager.js +16 -0
  195. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  196. package/lib/dist/mcp/daemon-paths.d.ts +2 -0
  197. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  198. package/lib/dist/mcp/daemon-paths.js +12 -3
  199. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  200. package/lib/dist/mcp/daemon-registry.d.ts +7 -4
  201. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  202. package/lib/dist/mcp/daemon-registry.js +91 -29
  203. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  204. package/lib/dist/mcp/daemon.d.ts +17 -7
  205. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  206. package/lib/dist/mcp/daemon.js +116 -24
  207. package/lib/dist/mcp/daemon.js.map +1 -1
  208. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  209. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  210. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  211. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  212. package/lib/dist/mcp/engine.d.ts +28 -9
  213. package/lib/dist/mcp/engine.d.ts.map +1 -1
  214. package/lib/dist/mcp/engine.js +146 -62
  215. package/lib/dist/mcp/engine.js.map +1 -1
  216. package/lib/dist/mcp/explore-dedup.d.ts +5 -2
  217. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
  218. package/lib/dist/mcp/explore-dedup.js +8 -5
  219. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  220. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  221. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  222. package/lib/dist/mcp/index-freshness-worker.js +30 -0
  223. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  224. package/lib/dist/mcp/index-freshness.d.ts +7 -0
  225. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  226. package/lib/dist/mcp/index-freshness.js +94 -0
  227. package/lib/dist/mcp/index-freshness.js.map +1 -0
  228. package/lib/dist/mcp/index.d.ts +3 -1
  229. package/lib/dist/mcp/index.d.ts.map +1 -1
  230. package/lib/dist/mcp/index.js +95 -11
  231. package/lib/dist/mcp/index.js.map +1 -1
  232. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  233. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  234. package/lib/dist/mcp/liveness-watchdog.js +11 -2
  235. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  236. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  237. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  238. package/lib/dist/mcp/project-lifecycle.js +181 -0
  239. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  240. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  241. package/lib/dist/mcp/proxy.js +9 -0
  242. package/lib/dist/mcp/proxy.js.map +1 -1
  243. package/lib/dist/mcp/query-pool.d.ts +2 -2
  244. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  245. package/lib/dist/mcp/query-pool.js +9 -7
  246. package/lib/dist/mcp/query-pool.js.map +1 -1
  247. package/lib/dist/mcp/query-worker.js +2 -2
  248. package/lib/dist/mcp/query-worker.js.map +1 -1
  249. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  250. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  251. package/lib/dist/mcp/server-instructions.js +6 -3
  252. package/lib/dist/mcp/server-instructions.js.map +1 -1
  253. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  254. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  255. package/lib/dist/mcp/startup-handshake.js +10 -2
  256. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  257. package/lib/dist/mcp/tools.d.ts +276 -36
  258. package/lib/dist/mcp/tools.d.ts.map +1 -1
  259. package/lib/dist/mcp/tools.js +2295 -980
  260. package/lib/dist/mcp/tools.js.map +1 -1
  261. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  262. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  263. package/lib/dist/mcp/writer-lock.js +260 -0
  264. package/lib/dist/mcp/writer-lock.js.map +1 -0
  265. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  266. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  267. package/lib/dist/resolution/alias-binding.js +127 -0
  268. package/lib/dist/resolution/alias-binding.js.map +1 -0
  269. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  270. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  271. package/lib/dist/resolution/callback-synthesizer.js +291 -143
  272. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  273. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  274. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  275. package/lib/dist/resolution/cpp-constructor.js +123 -0
  276. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  277. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  278. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  279. package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
  280. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  281. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  282. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  283. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  284. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  285. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  286. package/lib/dist/resolution/frameworks/csharp.js +96 -2
  287. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  288. package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
  289. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  290. package/lib/dist/resolution/frameworks/expo-router.js +785 -0
  291. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  292. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  293. package/lib/dist/resolution/frameworks/express.js +251 -16
  294. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  295. package/lib/dist/resolution/frameworks/index.d.ts +5 -0
  296. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  297. package/lib/dist/resolution/frameworks/index.js +29 -1
  298. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  299. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  300. package/lib/dist/resolution/frameworks/java.js +79 -47
  301. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  302. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  303. package/lib/dist/resolution/frameworks/nestjs.js +6 -14
  304. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  305. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  306. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  307. package/lib/dist/resolution/frameworks/nextjs.js +328 -0
  308. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  309. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  310. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  311. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  312. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  313. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  314. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  315. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  316. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  317. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  318. package/lib/dist/resolution/frameworks/python.js +166 -0
  319. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  320. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  321. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  322. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  323. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  324. package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
  325. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  326. package/lib/dist/resolution/frameworks/react-router.js +187 -0
  327. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  328. package/lib/dist/resolution/frameworks/react.d.ts +2 -1
  329. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  330. package/lib/dist/resolution/frameworks/react.js +188 -139
  331. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  332. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  333. package/lib/dist/resolution/frameworks/svelte.js +6 -1
  334. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  335. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  336. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  337. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  338. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  339. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  340. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  341. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  342. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  343. package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
  344. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  345. package/lib/dist/resolution/frameworks/vue-router.js +377 -0
  346. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  347. package/lib/dist/resolution/import-resolver.d.ts +38 -0
  348. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  349. package/lib/dist/resolution/import-resolver.js +376 -26
  350. package/lib/dist/resolution/import-resolver.js.map +1 -1
  351. package/lib/dist/resolution/index.d.ts +89 -25
  352. package/lib/dist/resolution/index.d.ts.map +1 -1
  353. package/lib/dist/resolution/index.js +552 -145
  354. package/lib/dist/resolution/index.js.map +1 -1
  355. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  356. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  357. package/lib/dist/resolution/js-builtins.js +46 -0
  358. package/lib/dist/resolution/js-builtins.js.map +1 -0
  359. package/lib/dist/resolution/name-matcher.d.ts +69 -22
  360. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  361. package/lib/dist/resolution/name-matcher.js +1902 -87
  362. package/lib/dist/resolution/name-matcher.js.map +1 -1
  363. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  364. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  365. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  366. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  367. package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
  368. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  369. package/lib/dist/resolution/react-router-synthesizer.js +126 -0
  370. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  371. package/lib/dist/resolution/resolver-pool.d.ts +2 -0
  372. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  373. package/lib/dist/resolution/resolver-pool.js +4 -0
  374. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  375. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  376. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  377. package/lib/dist/resolution/strip-comments.js +58 -0
  378. package/lib/dist/resolution/strip-comments.js.map +1 -1
  379. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  380. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  381. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  382. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  383. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  384. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  385. package/lib/dist/resolution/synth-utils.js +75 -0
  386. package/lib/dist/resolution/synth-utils.js.map +1 -0
  387. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  388. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  389. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  390. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  391. package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
  392. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  393. package/lib/dist/resolution/tier-synthesizer.js +931 -0
  394. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  395. package/lib/dist/resolution/types.d.ts +78 -2
  396. package/lib/dist/resolution/types.d.ts.map +1 -1
  397. package/lib/dist/resolution/types.js +64 -0
  398. package/lib/dist/resolution/types.js.map +1 -1
  399. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  400. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  401. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  402. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  403. package/lib/dist/search/query-paths.d.ts +50 -1
  404. package/lib/dist/search/query-paths.d.ts.map +1 -1
  405. package/lib/dist/search/query-paths.js +227 -12
  406. package/lib/dist/search/query-paths.js.map +1 -1
  407. package/lib/dist/search/query-utils.d.ts +15 -0
  408. package/lib/dist/search/query-utils.d.ts.map +1 -1
  409. package/lib/dist/search/query-utils.js +35 -7
  410. package/lib/dist/search/query-utils.js.map +1 -1
  411. package/lib/dist/sync/watch-policy.d.ts +14 -0
  412. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  413. package/lib/dist/sync/watch-policy.js +19 -0
  414. package/lib/dist/sync/watch-policy.js.map +1 -1
  415. package/lib/dist/sync/watcher.d.ts +52 -35
  416. package/lib/dist/sync/watcher.d.ts.map +1 -1
  417. package/lib/dist/sync/watcher.js +236 -100
  418. package/lib/dist/sync/watcher.js.map +1 -1
  419. package/lib/dist/telemetry/index.d.ts +4 -2
  420. package/lib/dist/telemetry/index.d.ts.map +1 -1
  421. package/lib/dist/telemetry/index.js +92 -41
  422. package/lib/dist/telemetry/index.js.map +1 -1
  423. package/lib/dist/types.d.ts +1 -1
  424. package/lib/dist/types.d.ts.map +1 -1
  425. package/lib/dist/types.js +1 -0
  426. package/lib/dist/types.js.map +1 -1
  427. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  428. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  429. package/lib/dist/ui-server/api/deadcode.js +136 -0
  430. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  431. package/lib/dist/ui-server/api/effects.d.ts +87 -0
  432. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  433. package/lib/dist/ui-server/api/effects.js +499 -0
  434. package/lib/dist/ui-server/api/effects.js.map +1 -0
  435. package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
  436. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  437. package/lib/dist/ui-server/api/entrypoints.js +279 -0
  438. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  439. package/lib/dist/ui-server/api/events.d.ts +183 -0
  440. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  441. package/lib/dist/ui-server/api/events.js +430 -0
  442. package/lib/dist/ui-server/api/events.js.map +1 -0
  443. package/lib/dist/ui-server/api/file.d.ts +66 -0
  444. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  445. package/lib/dist/ui-server/api/file.js +235 -0
  446. package/lib/dist/ui-server/api/file.js.map +1 -0
  447. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  448. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  449. package/lib/dist/ui-server/api/filecode.js +205 -0
  450. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  451. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  452. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  453. package/lib/dist/ui-server/api/flow.js +612 -0
  454. package/lib/dist/ui-server/api/flow.js.map +1 -0
  455. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  456. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  457. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  458. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  459. package/lib/dist/ui-server/api/index.d.ts +90 -0
  460. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  461. package/lib/dist/ui-server/api/index.js +332 -0
  462. package/lib/dist/ui-server/api/index.js.map +1 -0
  463. package/lib/dist/ui-server/api/map.d.ts +238 -0
  464. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  465. package/lib/dist/ui-server/api/map.js +681 -0
  466. package/lib/dist/ui-server/api/map.js.map +1 -0
  467. package/lib/dist/ui-server/api/node.d.ts +81 -0
  468. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  469. package/lib/dist/ui-server/api/node.js +388 -0
  470. package/lib/dist/ui-server/api/node.js.map +1 -0
  471. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  472. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  473. package/lib/dist/ui-server/api/nodes.js +45 -0
  474. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  475. package/lib/dist/ui-server/api/program.d.ts +139 -0
  476. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  477. package/lib/dist/ui-server/api/program.js +315 -0
  478. package/lib/dist/ui-server/api/program.js.map +1 -0
  479. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  480. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  481. package/lib/dist/ui-server/api/respond.js +186 -0
  482. package/lib/dist/ui-server/api/respond.js.map +1 -0
  483. package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
  484. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  485. package/lib/dist/ui-server/api/route-roots.js +96 -0
  486. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  487. package/lib/dist/ui-server/api/routes.d.ts +59 -0
  488. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  489. package/lib/dist/ui-server/api/routes.js +108 -0
  490. package/lib/dist/ui-server/api/routes.js.map +1 -0
  491. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  492. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  493. package/lib/dist/ui-server/api/screens.js +611 -0
  494. package/lib/dist/ui-server/api/screens.js.map +1 -0
  495. package/lib/dist/ui-server/api/search.d.ts +29 -0
  496. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  497. package/lib/dist/ui-server/api/search.js +232 -0
  498. package/lib/dist/ui-server/api/search.js.map +1 -0
  499. package/lib/dist/ui-server/api/session.d.ts +52 -0
  500. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  501. package/lib/dist/ui-server/api/session.js +196 -0
  502. package/lib/dist/ui-server/api/session.js.map +1 -0
  503. package/lib/dist/ui-server/api/source.d.ts +200 -0
  504. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  505. package/lib/dist/ui-server/api/source.js +422 -0
  506. package/lib/dist/ui-server/api/source.js.map +1 -0
  507. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  508. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  509. package/lib/dist/ui-server/api/stats.js +164 -0
  510. package/lib/dist/ui-server/api/stats.js.map +1 -0
  511. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  512. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  513. package/lib/dist/ui-server/api/steps.js +1446 -0
  514. package/lib/dist/ui-server/api/steps.js.map +1 -0
  515. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  516. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  517. package/lib/dist/ui-server/api/trail-store.js +323 -0
  518. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  519. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  520. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  521. package/lib/dist/ui-server/api/trails.js +369 -0
  522. package/lib/dist/ui-server/api/trails.js.map +1 -0
  523. package/lib/dist/ui-server/api/when.d.ts +125 -0
  524. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  525. package/lib/dist/ui-server/api/when.js +251 -0
  526. package/lib/dist/ui-server/api/when.js.map +1 -0
  527. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  528. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  529. package/lib/dist/ui-server/api/wire.js +231 -0
  530. package/lib/dist/ui-server/api/wire.js.map +1 -0
  531. package/lib/dist/ui-server/assets.d.ts +40 -0
  532. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  533. package/lib/dist/ui-server/assets.js +110 -0
  534. package/lib/dist/ui-server/assets.js.map +1 -0
  535. package/lib/dist/ui-server/constants.d.ts +32 -0
  536. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  537. package/lib/dist/ui-server/constants.js +35 -0
  538. package/lib/dist/ui-server/constants.js.map +1 -0
  539. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  540. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  541. package/lib/dist/ui-server/highlight/index.js +307 -0
  542. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  543. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  544. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  545. package/lib/dist/ui-server/highlight/languages.js +50 -0
  546. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  547. package/lib/dist/ui-server/index.d.ts +92 -0
  548. package/lib/dist/ui-server/index.d.ts.map +1 -0
  549. package/lib/dist/ui-server/index.js +399 -0
  550. package/lib/dist/ui-server/index.js.map +1 -0
  551. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  552. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  553. package/lib/dist/ui-server/open-browser.js +79 -0
  554. package/lib/dist/ui-server/open-browser.js.map +1 -0
  555. package/lib/dist/ui-server/security.d.ts +127 -0
  556. package/lib/dist/ui-server/security.d.ts.map +1 -0
  557. package/lib/dist/ui-server/security.js +332 -0
  558. package/lib/dist/ui-server/security.js.map +1 -0
  559. package/lib/dist/ui-server/static.d.ts +45 -0
  560. package/lib/dist/ui-server/static.d.ts.map +1 -0
  561. package/lib/dist/ui-server/static.js +165 -0
  562. package/lib/dist/ui-server/static.js.map +1 -0
  563. package/lib/dist/utils.d.ts +14 -2
  564. package/lib/dist/utils.d.ts.map +1 -1
  565. package/lib/dist/utils.js +25 -10
  566. package/lib/dist/utils.js.map +1 -1
  567. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  568. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  569. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  570. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  571. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  572. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  573. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  574. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  575. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  576. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  577. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  578. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  579. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  580. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  581. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  582. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  583. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  584. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  585. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  586. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  587. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  588. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  589. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  590. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  591. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  592. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  593. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  594. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  595. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  596. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  597. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  598. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  599. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  600. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  601. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  602. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  603. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  604. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  605. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  606. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  607. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  608. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  609. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  610. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  611. package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
  612. package/lib/dist/viewer/index.html +16 -0
  613. package/lib/kernel/codegraph-kernel.node +2 -2
  614. package/lib/node_modules/.package-lock.json +4 -4
  615. package/lib/node_modules/picomatch/README.md +56 -51
  616. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  617. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  618. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  619. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  620. package/lib/node_modules/picomatch/package.json +4 -4
  621. package/lib/package.json +9 -2
  622. package/package.json +1 -1
package/lib/dist/index.js CHANGED
@@ -46,6 +46,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
46
46
  };
47
47
  Object.defineProperty(exports, "__esModule", { value: true });
48
48
  exports.CodeGraph = exports.MCPServer = exports.LockUnavailableError = exports.FileWatcher = exports.MemoryMonitor = exports.throttle = exports.debounce = exports.processInBatches = exports.FileLock = exports.Mutex = exports.defaultLogger = exports.silentLogger = exports.getLogger = exports.setLogger = exports.ConfigError = exports.VectorError = exports.SearchError = exports.DatabaseError = exports.ParseError = exports.FileError = exports.CodeGraphError = exports.loadAllGrammars = exports.loadGrammarsForLanguages = exports.initGrammars = exports.getSupportedLanguages = exports.isGrammarLoaded = exports.isLanguageSupported = exports.detectLanguage = exports.CODEGRAPH_DIR = exports.findNearestCodeGraphRoot = exports.isInitialized = exports.getCodeGraphDir = exports.QueryBuilder = exports.DatabaseConnection = exports.getDatabasePath = void 0;
49
+ const fs = __importStar(require("fs"));
49
50
  const path = __importStar(require("path"));
50
51
  const db_1 = require("./db");
51
52
  const wal_valve_1 = require("./db/wal-valve");
@@ -53,6 +54,7 @@ const queries_1 = require("./db/queries");
53
54
  const directory_1 = require("./directory");
54
55
  const extraction_1 = require("./extraction");
55
56
  const resolution_1 = require("./resolution");
57
+ const callback_synthesizer_1 = require("./resolution/callback-synthesizer");
56
58
  const graph_1 = require("./graph");
57
59
  const context_1 = require("./context");
58
60
  const utils_1 = require("./utils");
@@ -200,6 +202,23 @@ class CodeGraph {
200
202
  this.traverser = new graph_1.GraphTraverser(this.queries);
201
203
  this.contextBuilder = (0, context_1.createContextBuilder)(this.projectRoot, this.queries, this.traverser);
202
204
  }
205
+ /**
206
+ * Set when this instance followed a database replaced on disk (#1902): the
207
+ * next sync that can run reconciles the whole tree, because whatever the old
208
+ * handle absorbed since the rebuild never reached the new file.
209
+ */
210
+ pendingFullReconcile = false;
211
+ /** How long a recreated, not-yet-indexed database is treated as a rebuild in progress. */
212
+ static RECREATE_GRACE_MS = 120_000;
213
+ /** The database file at the path was written within the recreate grace window. */
214
+ isFreshlyRecreated() {
215
+ try {
216
+ return Date.now() - fs.statSync((0, db_1.getDatabasePath)(this.projectRoot)).mtimeMs < CodeGraph.RECREATE_GRACE_MS;
217
+ }
218
+ catch {
219
+ return false;
220
+ }
221
+ }
203
222
  /**
204
223
  * Heal a stale database handle in place. If `.codegraph/` was removed and
205
224
  * recreated at the SAME path while this instance held the DB open — a git
@@ -213,19 +232,33 @@ class CodeGraph {
213
232
  *
214
233
  * POSIX-only in practice: `isReplacedOnDisk` never fires on Windows (an open
215
234
  * file can't be unlinked there, and st_ino is unreliable).
235
+ *
236
+ * Refuses (returns false) while an index/sync holds the index mutex: closing
237
+ * the handle that run is writing through would break it mid-flight. `sync()`
238
+ * performs the same check itself once it holds the mutex (#1902), so the
239
+ * replaced file is still picked up — by that sync, or by the caller's retry.
216
240
  */
217
241
  reopenIfReplaced() {
242
+ if (this.indexMutex.isLocked())
243
+ return false;
244
+ return this.reopenReplacedDatabase();
245
+ }
246
+ /** The body of {@link reopenIfReplaced}, without the in-flight-sync guard. */
247
+ reopenReplacedDatabase() {
218
248
  if (!this.db.isReplacedOnDisk())
219
249
  return false;
220
250
  const dbPath = this.db.getPath();
221
251
  // Open the live file FIRST — if that throws (e.g. mid-recreate), the old
222
252
  // handle stays in place and the caller retries on the next query, rather
223
253
  // than leaving this instance with no connection at all.
224
- const fresh = db_1.DatabaseConnection.open(dbPath);
254
+ const fresh = db_1.DatabaseConnection.open(dbPath, { readOnly: this.db.readOnly });
225
255
  const stale = this.db;
226
256
  this.db = fresh;
227
257
  this.queries = new queries_1.QueryBuilder(fresh.getDb());
228
258
  this.wireLayers();
259
+ // Whoever reopened — a sync, or a tool call's self-heal — the next sync
260
+ // must reconcile the whole tree (#1902).
261
+ this.pendingFullReconcile = true;
229
262
  // Releasing the dead handle also frees the leaked db/-wal/-shm fds that were
230
263
  // pinning the unlinked inode (#925).
231
264
  try {
@@ -304,12 +337,18 @@ class CodeGraph {
304
337
  }
305
338
  // Open database
306
339
  const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
307
- const db = db_1.DatabaseConnection.open(dbPath);
340
+ const db = db_1.DatabaseConnection.open(dbPath, { readOnly: options.readOnly });
308
341
  const queries = new queries_1.QueryBuilder(db.getDb());
309
342
  const instance = new CodeGraph(db, queries, resolvedRoot);
310
343
  // Sync if requested
311
- if (options.sync) {
312
- await instance.sync();
344
+ if (options.sync && !options.readOnly) {
345
+ try {
346
+ await instance.sync();
347
+ }
348
+ catch (err) {
349
+ instance.destroy();
350
+ throw err;
351
+ }
313
352
  }
314
353
  return instance;
315
354
  }
@@ -358,7 +397,7 @@ class CodeGraph {
358
397
  /**
359
398
  * Open synchronously (without sync)
360
399
  */
361
- static openSync(projectRoot) {
400
+ static openSync(projectRoot, options = {}) {
362
401
  const resolvedRoot = path.resolve(projectRoot);
363
402
  // Check if initialized
364
403
  if (!(0, directory_1.isInitialized)(resolvedRoot)) {
@@ -371,7 +410,7 @@ class CodeGraph {
371
410
  }
372
411
  // Open database
373
412
  const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
374
- const db = db_1.DatabaseConnection.open(dbPath);
413
+ const db = db_1.DatabaseConnection.open(dbPath, { readOnly: options.readOnly });
375
414
  const queries = new queries_1.QueryBuilder(db.getDb());
376
415
  return new CodeGraph(db, queries, resolvedRoot);
377
416
  }
@@ -449,6 +488,7 @@ class CodeGraph {
449
488
  walValve.start();
450
489
  }
451
490
  try {
491
+ const gitState = this.orchestrator.beginGitIndexState(true);
452
492
  const before = this.queries.getNodeAndEdgeCount();
453
493
  // Mark the index as in-flight BEFORE any writes: a run killed
454
494
  // mid-index (OOM, SIGKILL, the #850 liveness watchdog) leaves this
@@ -624,6 +664,10 @@ class CodeGraph {
624
664
  }
625
665
  catch { /* metadata is advisory — never fail an index over it */ }
626
666
  }
667
+ if (result.success && result.filesErrored === 0 &&
668
+ (result.filesDiscovered === undefined || result.filesIndexed + result.filesSkipped >= result.filesDiscovered)) {
669
+ this.orchestrator.finishGitIndexState(gitState, true);
670
+ }
627
671
  // Reconcile the scan's ground truth against what the pipeline
628
672
  // accounted for. A shortfall means files were silently dropped
629
673
  // (observed in the wild: a run under heavy load came up 37 files
@@ -710,7 +754,8 @@ class CodeGraph {
710
754
  });
711
755
  }
712
756
  /**
713
- * Sync with current file state (incremental update)
757
+ * Sync with current file state (incremental update).
758
+ * Throws LockUnavailableError if the cross-process write lock is unavailable.
714
759
  *
715
760
  * Uses a mutex to prevent concurrent indexing operations.
716
761
  */
@@ -719,8 +764,40 @@ class CodeGraph {
719
764
  try {
720
765
  this.fileLock.acquire();
721
766
  }
722
- catch {
723
- return { filesChecked: 0, filesAdded: 0, filesModified: 0, filesRemoved: 0, nodesUpdated: 0, durationMs: 0 };
767
+ catch (err) {
768
+ throw new sync_1.LockUnavailableError(`Sync could not acquire the file lock; retry when the index is available. ${err instanceof Error ? err.message : String(err)}`);
769
+ }
770
+ // A full rebuild in another process (`codegraph index` → recreate)
771
+ // unlinks the database and creates a new file at the same path. A
772
+ // long-lived instance — the MCP daemon's watcher — would otherwise keep
773
+ // "syncing" into the dead inode, and nothing it wrote there is visible
774
+ // to anyone (#1902). Follow the path before writing (one stat), and
775
+ // widen a scoped sync to a full one: whatever the old handle absorbed
776
+ // since the rebuild is gone, so the new file has to be reconciled whole.
777
+ // If the reopen fails (the rebuild is mid-way), report lock contention
778
+ // so the watcher keeps its pending files and retries.
779
+ try {
780
+ this.reopenReplacedDatabase();
781
+ }
782
+ catch (err) {
783
+ this.fileLock.release();
784
+ throw new sync_1.LockUnavailableError(`Sync could not open the rebuilt index yet; retry when the rebuild finishes. ${err instanceof Error ? err.message : String(err)}`);
785
+ }
786
+ if (this.pendingFullReconcile) {
787
+ // `codegraph index` recreates the file, THEN takes the write lock in
788
+ // indexAll. A sync landing in that gap would otherwise run a full
789
+ // reconcile of the empty file and hold the lock the rebuild is about
790
+ // to ask for. A fresh file with no index_state yet is that rebuild:
791
+ // step aside (lock contention, the watcher retries) and reconcile in
792
+ // full once it is done. Bounded, so a rebuild that died before
793
+ // indexing does not park the watcher forever.
794
+ if (this.getIndexState() === null && this.isFreshlyRecreated()) {
795
+ this.fileLock.release();
796
+ throw new sync_1.LockUnavailableError('A rebuild of this index is in progress; retry when it finishes.');
797
+ }
798
+ // Cleared only once this run completes (below): a sync that throws
799
+ // must leave the full catch-up for the next one.
800
+ options = { ...options, paths: undefined };
724
801
  }
725
802
  // Defer WAL auto-checkpointing for the whole incremental run, exactly
726
803
  // as indexAll does for the bulk path (#1231): sync's store loop and its
@@ -755,7 +832,28 @@ class CodeGraph {
755
832
  return false;
756
833
  }
757
834
  })();
758
- const result = await this.orchestrator.sync(options.onProgress, options.paths);
835
+ // Writer-side backstop for deferred WAL checkpointing (#1539): sync
836
+ // previously armed the valve but never called backpressure(), so the
837
+ // hard/file caps were never enforced during daemon catch-up — only
838
+ // timer-driven PASSIVE checkpoints ran, and a query-pool reader could
839
+ // pin frames while the WAL grew without a bound.
840
+ const backpressure = walValve ? () => walValve.backpressure() : undefined;
841
+ const fullReconcile = !options.paths || options.paths.length === 0;
842
+ const gitState = this.orchestrator.beginGitIndexState(fullReconcile);
843
+ // An interrupted index may have absorbed its changed files before
844
+ // resolution/synthesis. Detect those orphans BEFORE this sync adds refs.
845
+ let refreshSynthesis = this.queries.getMetadata('synthesis_pending') === '1' ||
846
+ this.queries.getUnresolvedReferencesCount() > 0;
847
+ if (refreshSynthesis)
848
+ this.queries.setMetadata('synthesis_pending', '1');
849
+ const result = await this.orchestrator.sync(options.onProgress, options.paths, backpressure, (filePath, content) => {
850
+ if (!refreshSynthesis && (this.queries.hasSynthesizedEdgesTouchingFile(filePath) ||
851
+ this.queries.wasSynthesisInput(filePath) ||
852
+ (content !== undefined && (0, callback_synthesizer_1.hasSynthesisPattern)(filePath, content)))) {
853
+ refreshSynthesis = true;
854
+ this.queries.setMetadata('synthesis_pending', '1');
855
+ }
856
+ });
759
857
  // Fold the store phase's WAL BEFORE the post-store reads below
760
858
  // (resolution reads on the main thread) — same rationale as
761
859
  // indexAll's fold between store and resolution.
@@ -846,7 +944,7 @@ class CodeGraph {
846
944
  current: done,
847
945
  total: totalPasses,
848
946
  });
849
- });
947
+ }, backpressure, false);
850
948
  }
851
949
  }
852
950
  // Re-open resolution edges this sync may have invalidated ELSEWHERE in
@@ -882,6 +980,9 @@ class CodeGraph {
882
980
  // Grind them down with the batched resolver; this also makes a bare
883
981
  // `codegraph sync` the recovery command for a wedged index. On a
884
982
  // healthy index this is one COUNT query.
983
+ result.pendingRefsProcessed = 0;
984
+ result.pendingRefsResolved = 0;
985
+ result.pendingRefsUnresolved = 0;
885
986
  const orphanCount = this.queries.getUnresolvedReferencesCount();
886
987
  if (orphanCount > 0) {
887
988
  options.onProgress?.({
@@ -889,7 +990,7 @@ class CodeGraph {
889
990
  current: 0,
890
991
  total: orphanCount,
891
992
  });
892
- await this.resolveReferencesBatched((current, total) => {
993
+ const recovery = await this.resolveReferencesBatched((current, total) => {
893
994
  options.onProgress?.({
894
995
  phase: 'resolving',
895
996
  current,
@@ -901,7 +1002,10 @@ class CodeGraph {
901
1002
  current: done,
902
1003
  total: totalPasses,
903
1004
  });
904
- });
1005
+ }, backpressure, false);
1006
+ result.pendingRefsProcessed = recovery.stats.total;
1007
+ result.pendingRefsResolved = recovery.stats.resolved;
1008
+ result.pendingRefsUnresolved = recovery.stats.unresolved;
905
1009
  }
906
1010
  if (filesChanged || orphanCount > 0) {
907
1011
  // Second pass: chained calls whose method lives on a supertype the
@@ -912,9 +1016,15 @@ class CodeGraph {
912
1016
  // member is inherited from a supertype (#808).
913
1017
  await this.resolver.resolveDeferredThisMemberRefs();
914
1018
  }
1019
+ if (refreshSynthesis) {
1020
+ await this.resolver.refreshSynthesis(this.db.getPath(), (done, total) => {
1021
+ options.onProgress?.({ phase: 'linking', current: done, total });
1022
+ }, backpressure);
1023
+ this.queries.setMetadata('synthesis_pending', '0');
1024
+ }
915
1025
  // Refresh planner stats + checkpoint the WAL after bulk writes.
916
1026
  // Off-thread — see indexAll's call site.
917
- if (filesChanged || result.filesRemoved > 0 || orphanCount > 0) {
1027
+ if (filesChanged || result.filesRemoved > 0 || orphanCount > 0 || refreshSynthesis) {
918
1028
  await this.db.runMaintenance();
919
1029
  }
920
1030
  // Heal the segment vocabulary on indexes built before the table
@@ -932,13 +1042,15 @@ class CodeGraph {
932
1042
  // A killed full index leaves this marker at `indexing`. Sync repairs
933
1043
  // missing files, pending refs, and (on open) dropped indexes, so a
934
1044
  // successful recovery must also close the metadata state (#1556).
935
- const fullReconcile = !options.paths || options.paths.length === 0;
936
1045
  if (fullReconcile && this.getIndexState() === 'indexing') {
937
1046
  try {
938
1047
  this.queries.setMetadata('index_state', 'complete');
939
1048
  }
940
1049
  catch { /* advisory */ }
941
1050
  }
1051
+ this.orchestrator.finishGitIndexState(gitState, fullReconcile, result.failedFilePaths);
1052
+ if (fullReconcile && result.filesChecked > 0)
1053
+ this.pendingFullReconcile = false;
942
1054
  return result;
943
1055
  }
944
1056
  finally {
@@ -969,6 +1081,29 @@ class CodeGraph {
969
1081
  // ===========================================================================
970
1082
  // File Watching
971
1083
  // ===========================================================================
1084
+ /**
1085
+ * Whether an OS watcher event points at a file whose index metadata is still
1086
+ * current. Used on Windows to discard NTFS last-access notifications, which
1087
+ * libuv reports through fs.watch as ordinary change events (#1451).
1088
+ */
1089
+ isIndexedFileStateCurrent(filePath) {
1090
+ const tracked = this.queries.getFileByPath(filePath);
1091
+ if (!tracked)
1092
+ return false;
1093
+ try {
1094
+ const stat = fs.statSync(path.join(this.projectRoot, filePath));
1095
+ return (stat.isFile() &&
1096
+ Number.isFinite(stat.mtimeMs) &&
1097
+ Number.isFinite(tracked.modifiedAt) &&
1098
+ stat.size === tracked.size &&
1099
+ Math.floor(stat.mtimeMs) === Math.floor(tracked.modifiedAt));
1100
+ }
1101
+ catch {
1102
+ // Missing/inaccessible files must still reach sync so removals and
1103
+ // transient filesystem failures are reconciled rather than hidden.
1104
+ return false;
1105
+ }
1106
+ }
972
1107
  /**
973
1108
  * Start watching for file changes and auto-syncing.
974
1109
  *
@@ -983,17 +1118,11 @@ class CodeGraph {
983
1118
  return true;
984
1119
  this.watcher = new sync_1.FileWatcher(this.projectRoot, async (paths) => {
985
1120
  const result = await this.sync({ paths });
986
- // sync() returns this exact zero-shape iff it failed to acquire the
987
- // file lock (a real empty sync always has filesChecked > 0 because
988
- // scanDirectory ran). Surface that to the watcher as a typed error
989
- // so it keeps pendingFiles + reschedules instead of clearing them
990
- // (#449).
991
- if (result.filesChecked === 0 && result.durationMs === 0) {
992
- throw new sync_1.LockUnavailableError();
993
- }
994
1121
  const filesChanged = result.filesAdded + result.filesModified + result.filesRemoved;
995
1122
  return { filesChanged, durationMs: result.durationMs };
996
- }, options);
1123
+ }, options, process.platform === 'win32'
1124
+ ? (filePath) => this.isIndexedFileStateCurrent(filePath)
1125
+ : undefined);
997
1126
  return this.watcher.start();
998
1127
  }
999
1128
  /**
@@ -1012,12 +1141,11 @@ class CodeGraph {
1012
1141
  return this.watcher?.isActive() ?? false;
1013
1142
  }
1014
1143
  /**
1015
- * True once live watching has permanently degraded (OS watch-resource
1016
- * exhaustion, or a write lock held past the retry budget) and auto-sync is
1017
- * disabled until the next {@link watch} call. Distinct from `!isWatching()`:
1018
- * a stopped/never-started watcher is inactive but NOT degraded. MCP tools use
1019
- * this to surface a whole-index "results may be stale" notice, since
1020
- * `getPendingFiles()` goes empty once watching stops (#876).
1144
+ * True once live watching has degraded, or while a re-armed watcher has not
1145
+ * completed its full catch-up. Distinct from `!isWatching()`: a stopped or
1146
+ * never-started watcher is inactive but NOT degraded. MCP tools use this for
1147
+ * a whole-index stale notice, since pending files are lost when watching
1148
+ * stops (#876, #1959).
1021
1149
  */
1022
1150
  isWatcherDegraded() {
1023
1151
  return this.watcher?.isDegraded() ?? false;
@@ -1026,6 +1154,14 @@ class CodeGraph {
1026
1154
  getWatcherDegradedReason() {
1027
1155
  return this.watcher?.getDegradedReason() ?? null;
1028
1156
  }
1157
+ /** Re-arm a lock-degraded watcher; its stale state persists until a full sync. */
1158
+ rearmWatcherAfterLockContention() {
1159
+ return this.watcher?.rearmAfterLockContention() ?? false;
1160
+ }
1161
+ /** True while a re-armed watcher owes a full reconcile of missed changes. */
1162
+ isWatcherRecovering() {
1163
+ return this.watcher?.isRecoveringFromLock() ?? false;
1164
+ }
1029
1165
  /**
1030
1166
  * Files seen by the file watcher since the last successful sync —
1031
1167
  * the per-file "stale" signal MCP tools attach to responses so an agent
@@ -1063,6 +1199,40 @@ class CodeGraph {
1063
1199
  getLastIndexedAt() {
1064
1200
  return this.queries.getLastIndexedAt();
1065
1201
  }
1202
+ /**
1203
+ * How far the last sync got and how many files it left behind — the cheapest
1204
+ * marker of "has this index moved". One query; safe to call on every
1205
+ * filesystem event a live viewer sees.
1206
+ */
1207
+ getIndexRevision() {
1208
+ return this.queries.getIndexRevision();
1209
+ }
1210
+ /**
1211
+ * Files re-indexed strictly after `since`, newest first — what a sync just
1212
+ * picked up. `total` is the real count, `paths` is capped at `limit`.
1213
+ */
1214
+ getFilesIndexedSince(since, limit) {
1215
+ return this.queries.getFilesIndexedSince(since, limit);
1216
+ }
1217
+ /**
1218
+ * Forget everything held in memory about rows another process may have
1219
+ * changed.
1220
+ *
1221
+ * The query layer keeps an LRU of nodes by id, invalidated by writes made
1222
+ * through THIS instance — which is exactly right for a process that owns the
1223
+ * index, and wrong for one that is only reading a database somebody else is
1224
+ * writing. A long-lived reader (the `codegraph ui` server, a daemon holding a
1225
+ * graph open across an agent's edits) will otherwise answer `getNode(id)`
1226
+ * with a row a sync deleted minutes ago, while every SQL-backed query beside
1227
+ * it reports the truth — a disagreement that reads as a bug in whichever
1228
+ * screen shows both.
1229
+ *
1230
+ * Cheap (clearing a bounded Map) and safe to call whenever the database file
1231
+ * looks like it moved.
1232
+ */
1233
+ dropReadCaches() {
1234
+ this.queries.clearCache();
1235
+ }
1066
1236
  /**
1067
1237
  * Completeness of the last full index run. `'complete'` is the only good
1068
1238
  * state. `'indexing'` after the fact means a run was killed mid-index (OOM,
@@ -1136,7 +1306,7 @@ class CodeGraph {
1136
1306
  // resolution is timer-driven passive checkpoints, which the pool's
1137
1307
  // continuous reads keep perpetually partial — the WAL then accretes the
1138
1308
  // whole phase's write volume (22GB on a 4.6GB DB at kernel scale).
1139
- backpressure) {
1309
+ backpressure, synthesize = true) {
1140
1310
  return this.resolver.resolveAndPersistBatched(onProgress, undefined, onSynthesisProgress, {
1141
1311
  dbPath: this.db.getPath(),
1142
1312
  // Bulk-edge-load hooks: on big runs the resolver drops the non-unique
@@ -1146,14 +1316,15 @@ class CodeGraph {
1146
1316
  // just degrade to scans until the recreate.
1147
1317
  bulkEdgeLoad: {
1148
1318
  begin: () => this.db.beginBulkEdgeLoad(),
1149
- end: () => this.db.endBulkEdgeLoad(),
1319
+ end: () => this.db.endBulkEdgeLoad({ deferSynthesisSite: true }),
1320
+ deferred: () => this.db.createSynthesisSiteIndex(),
1150
1321
  },
1151
1322
  refIndexLoad: {
1152
1323
  begin: () => this.db.beginBulkRefLoad(),
1153
1324
  end: () => this.db.endBulkRefLoad(),
1154
1325
  },
1155
1326
  backpressure,
1156
- });
1327
+ }, synthesize);
1157
1328
  }
1158
1329
  /**
1159
1330
  * References extracted but never attempted by a resolution pass. Zero on a
@@ -1215,12 +1386,188 @@ class CodeGraph {
1215
1386
  getNode(id) {
1216
1387
  return this.queries.getNodeById(id);
1217
1388
  }
1389
+ /**
1390
+ * Get many nodes by id in ONE round-trip (LRU-cache aware).
1391
+ *
1392
+ * The batch form of {@link getNode}. Anything resolving a list of edges to
1393
+ * their endpoints — a caller list, a callee rail, an impact set — must use
1394
+ * this rather than a `getNode` per edge: a symbol with 500 callers is 500
1395
+ * queries otherwise. Ids that name nothing are simply absent from the map.
1396
+ */
1397
+ getNodesByIds(ids) {
1398
+ return this.queries.getNodesByIds(ids);
1399
+ }
1400
+ /**
1401
+ * Every symbol carrying an exact qualified name.
1402
+ *
1403
+ * The identity that survives a re-index. A node's id contains its start line,
1404
+ * so any edit ABOVE a symbol gives it a different id — anything that has to
1405
+ * name the same symbol across two indexes (a saved trail, a bookmark, a
1406
+ * review comment) has to key on this instead, and then disambiguate the
1407
+ * result by kind and file. Index-backed; unlike
1408
+ * {@link GraphQueryManager.findByQualifiedName} it takes no pattern and scans
1409
+ * nothing.
1410
+ */
1411
+ getNodesByQualifiedName(qualifiedName) {
1412
+ return this.queries.getNodesByQualifiedNameExact(qualifiedName);
1413
+ }
1414
+ /**
1415
+ * Outgoing edges for many source nodes at once — the batch form of
1416
+ * {@link getOutgoingEdges}. See {@link QueryBuilder.getOutgoingEdgesFrom}.
1417
+ */
1418
+ getOutgoingEdgesFrom(nodeIds, kinds) {
1419
+ return this.queries.getOutgoingEdgesFrom(nodeIds, kinds);
1420
+ }
1421
+ /**
1422
+ * Fan-in (incoming edge count) for many nodes at once — the "hub" signal,
1423
+ * without a query per node. See {@link QueryBuilder.countIncomingEdges}.
1424
+ */
1425
+ getFanIn(ids) {
1426
+ return this.queries.countIncomingEdges(ids);
1427
+ }
1428
+ /**
1429
+ * Incoming edges for many target nodes at once — the mirror of
1430
+ * {@link getOutgoingEdgesFrom}. See {@link QueryBuilder.getIncomingEdgesTo}.
1431
+ */
1432
+ getIncomingEdgesTo(nodeIds, kinds) {
1433
+ return this.queries.getIncomingEdgesTo(nodeIds, kinds);
1434
+ }
1435
+ /**
1436
+ * Fan-out (outgoing edge count) for many nodes at once — the mirror of
1437
+ * {@link getFanIn}. See {@link QueryBuilder.countOutgoingEdges}.
1438
+ */
1439
+ getFanOut(ids) {
1440
+ return this.queries.countOutgoingEdges(ids);
1441
+ }
1442
+ /**
1443
+ * Symbols nothing in the index points at, by kind — the candidate set the
1444
+ * dead code report (`src/graph/dead-code.ts`) applies its exclusions to.
1445
+ *
1446
+ * Every edge kind except `contains` counts as a reference, so a method is
1447
+ * not "reached" by the class that holds it. An unreferenced symbol is not
1448
+ * yet a dead one: see {@link buildDeadCodeReport}.
1449
+ */
1450
+ getUnreferencedNodes(kinds, limit) {
1451
+ return this.queries.getUnreferencedNodes(kinds, limit);
1452
+ }
1453
+ /**
1454
+ * Which of the given names are carried by more than one symbol, at least one
1455
+ * of which something references — the names a "nothing reaches this" claim
1456
+ * must not be made about, because the resolver may have picked the twin.
1457
+ */
1458
+ getAmbiguousReferencedNames(names) {
1459
+ return this.queries.getAmbiguousReferencedNames(names);
1460
+ }
1461
+ /**
1462
+ * Which of the given languages this index records an export marker for. A
1463
+ * language with none has no "reachable from outside" signal at all.
1464
+ */
1465
+ getLanguagesWithExports(languages) {
1466
+ return this.queries.getLanguagesWithExports(languages);
1467
+ }
1468
+ /**
1469
+ * Which of the given names the index holds an unresolved reference to — the
1470
+ * resolver saw the name and could not decide what it meant. A symbol with
1471
+ * such a name can never be called unreferenced.
1472
+ */
1473
+ getUnresolvedNamesAmong(names) {
1474
+ return this.queries.getUnresolvedNamesAmong(names);
1475
+ }
1476
+ /**
1477
+ * Which of the given symbols extend or implement a type outside the index —
1478
+ * an ancestor the resolver could not follow, so it has no edge (#1973).
1479
+ */
1480
+ getUnresolvedSupertypeSourcesAmong(nodeIds) {
1481
+ return this.queries.getUnresolvedSupertypeSourcesAmong(nodeIds);
1482
+ }
1483
+ /**
1484
+ * The symbols with the most distinct dependents, most first — the index's
1485
+ * hubs. Distinct dependents, not edges: a helper called forty times from one
1486
+ * function has one dependent, and it is dependents a blast radius grows from.
1487
+ */
1488
+ getTopDependedOn(limit) {
1489
+ return this.queries.getTopDependedOn(limit);
1490
+ }
1491
+ /**
1492
+ * The graph's executable roots — files that run something at module level (a
1493
+ * CLI, a worker entry, a script), ranked by calls x the number of other files
1494
+ * they reach. A statement at the top level of a file is recorded as an edge
1495
+ * out of the *file* node, which is what makes these visible at all.
1496
+ */
1497
+ getTopCallingFiles(limit) {
1498
+ return this.queries.getTopCallingFiles(limit);
1499
+ }
1500
+ /**
1501
+ * How many other files depend on each of the given files, counted through
1502
+ * their symbols (an `imports` edge points at the symbol, not the file).
1503
+ * A zero means nothing else in the index reaches into that file.
1504
+ */
1505
+ getFileDependentCounts(filePaths) {
1506
+ return new Map(this.queries.getFileDependentCounts(filePaths).map((row) => [row.filePath, row.dependents]));
1507
+ }
1508
+ /**
1509
+ * How far each of the given files reaches out: distinct other files their
1510
+ * symbols touch, and how many references that is. The mirror of
1511
+ * {@link getFileDependentCounts}; a test file's reach is what it exercises.
1512
+ */
1513
+ getFileReachCounts(filePaths) {
1514
+ return new Map(this.queries
1515
+ .getFileReachCounts(filePaths)
1516
+ .map((row) => [row.filePath, { reaches: row.reaches, refs: row.refs }]));
1517
+ }
1518
+ /** The `file` nodes for the given paths, in one query. */
1519
+ getFileNodes(filePaths) {
1520
+ return this.queries.getFileNodes(filePaths);
1521
+ }
1522
+ /**
1523
+ * Roll the edge table up to module granularity, for a file → module
1524
+ * assignment the caller decides.
1525
+ *
1526
+ * The architecture map's single query: cross-module edge counts by kind,
1527
+ * the `declared` subset of each (see {@link QueryBuilder.aggregateModuleGraph}),
1528
+ * and the busiest symbol pairs behind each link. Read-only, and bounded by
1529
+ * the number of modules rather than the number of edges.
1530
+ */
1531
+ getModuleAggregation(assignments, options) {
1532
+ return this.queries.aggregateModuleGraph(assignments, options);
1533
+ }
1534
+ /**
1535
+ * Every ordered pair of files where one reaches into the other — the edge
1536
+ * list a cycle finder runs on. See {@link QueryBuilder.getCrossFileDependencyPairs}.
1537
+ */
1538
+ getFileDependencyPairs(minConfidence = 0) {
1539
+ return this.queries.getCrossFileDependencyPairs(minConfidence);
1540
+ }
1541
+ /**
1542
+ * References from a symbol that never resolved to an indexed node — the
1543
+ * calls and type mentions that leave the index. Lets a reader account for
1544
+ * the call sites that have no callee row instead of implying there are none.
1545
+ */
1546
+ getUnresolvedReferencesFrom(nodeId) {
1547
+ return this.queries.getUnresolvedReferencesFrom(nodeId);
1548
+ }
1549
+ /**
1550
+ * The same, for every symbol in a FILE at once, in line order.
1551
+ *
1552
+ * One indexed lookup instead of one per symbol — the whole-file reader needs
1553
+ * it for every line it draws. See
1554
+ * {@link QueryBuilder.getUnresolvedReferencesInFile}.
1555
+ */
1556
+ getUnresolvedReferencesInFile(filePath, limit) {
1557
+ return this.queries.getUnresolvedReferencesInFile(filePath, limit);
1558
+ }
1218
1559
  /**
1219
1560
  * Get all nodes in a file
1220
1561
  */
1221
1562
  getNodesInFile(filePath) {
1222
1563
  return this.queries.getNodesByFile(filePath);
1223
1564
  }
1565
+ /**
1566
+ * Get all nodes in several files, in one batched query.
1567
+ */
1568
+ getNodesInFiles(filePaths) {
1569
+ return this.queries.getNodesByFiles(filePaths);
1570
+ }
1224
1571
  /**
1225
1572
  * Get all nodes of a specific kind
1226
1573
  */
@@ -1255,6 +1602,10 @@ class CodeGraph {
1255
1602
  searchNodes(query, options) {
1256
1603
  return this.queries.searchNodes(query, options);
1257
1604
  }
1605
+ /** Lexical evidence for an empty explore result; does not alter retrieval. */
1606
+ getExploreMissDiagnostics(query) {
1607
+ return this.queries.getExploreMissDiagnostics(query);
1608
+ }
1258
1609
  /**
1259
1610
  * Graph-derived prompt matching for the front-load hook's MEDIUM tier:
1260
1611
  * which indexed symbols do these prose words name? "state machine des
@@ -1669,7 +2020,17 @@ class CodeGraph {
1669
2020
  return this.graphManager.findCircularDependencies();
1670
2021
  }
1671
2022
  /**
1672
- * Find dead code (unreferenced symbols)
2023
+ * Find unreferenced symbols — the RAW candidate set.
2024
+ *
2025
+ * Non-exported symbols of the given kinds with no incoming edge but
2026
+ * `contains`. That is a fact, not a claim: on this engine's own index it
2027
+ * returns ~2 500 symbols, of which about 20 are actually unreachable. The
2028
+ * rest are overrides, framework registrations, mis-resolved twins and
2029
+ * references the extractor never recorded.
2030
+ *
2031
+ * For a list anybody should act on, use `buildDeadCodeReport` from
2032
+ * `src/graph/dead-code.ts`, which applies the exclusions and counts every one
2033
+ * of them. This method is kept as-is because it is a published API.
1673
2034
  *
1674
2035
  * @param kinds - Node kinds to check (default: functions, methods, classes)
1675
2036
  * @returns Array of unreferenced nodes