@colbymchenry/codegraph-win32-arm64 1.5.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (693) hide show
  1. package/bin/codegraph +5 -0
  2. package/lib/dist/.test-build-engine.json +1 -0
  3. package/lib/dist/.test-build-viewer.json +1 -0
  4. package/lib/dist/bin/codegraph.d.ts +1 -0
  5. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  6. package/lib/dist/bin/codegraph.js +744 -320
  7. package/lib/dist/bin/codegraph.js.map +1 -1
  8. package/lib/dist/bin/viewer-gate.d.ts +17 -0
  9. package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
  10. package/lib/dist/bin/viewer-gate.js +31 -0
  11. package/lib/dist/bin/viewer-gate.js.map +1 -0
  12. package/lib/dist/context/formatter.d.ts +7 -1
  13. package/lib/dist/context/formatter.d.ts.map +1 -1
  14. package/lib/dist/context/formatter.js +12 -6
  15. package/lib/dist/context/formatter.js.map +1 -1
  16. package/lib/dist/context/index.d.ts +12 -0
  17. package/lib/dist/context/index.d.ts.map +1 -1
  18. package/lib/dist/context/index.js +103 -16
  19. package/lib/dist/context/index.js.map +1 -1
  20. package/lib/dist/db/index.d.ts +58 -2
  21. package/lib/dist/db/index.d.ts.map +1 -1
  22. package/lib/dist/db/index.js +187 -32
  23. package/lib/dist/db/index.js.map +1 -1
  24. package/lib/dist/db/migrations.d.ts +1 -1
  25. package/lib/dist/db/migrations.d.ts.map +1 -1
  26. package/lib/dist/db/migrations.js +64 -1
  27. package/lib/dist/db/migrations.js.map +1 -1
  28. package/lib/dist/db/queries.d.ts +583 -6
  29. package/lib/dist/db/queries.d.ts.map +1 -1
  30. package/lib/dist/db/queries.js +1417 -57
  31. package/lib/dist/db/queries.js.map +1 -1
  32. package/lib/dist/db/schema.sql +27 -4
  33. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  34. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  35. package/lib/dist/db/sqlite-adapter.js +56 -7
  36. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  37. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  38. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  39. package/lib/dist/db/synthesis-stage.js +89 -0
  40. package/lib/dist/db/synthesis-stage.js.map +1 -0
  41. package/lib/dist/db/wal-valve.d.ts +32 -12
  42. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  43. package/lib/dist/db/wal-valve.js +65 -22
  44. package/lib/dist/db/wal-valve.js.map +1 -1
  45. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  46. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  47. package/lib/dist/db/wsl-shared-index.js +121 -0
  48. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  49. package/lib/dist/directory.d.ts +130 -2
  50. package/lib/dist/directory.d.ts.map +1 -1
  51. package/lib/dist/directory.js +306 -23
  52. package/lib/dist/directory.js.map +1 -1
  53. package/lib/dist/errors.d.ts +14 -0
  54. package/lib/dist/errors.d.ts.map +1 -1
  55. package/lib/dist/errors.js +16 -1
  56. package/lib/dist/errors.js.map +1 -1
  57. package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
  58. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  59. package/lib/dist/extraction/cfml-extractor.js +15 -3
  60. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  61. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  62. package/lib/dist/extraction/dfm-extractor.js +14 -10
  63. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  64. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  65. package/lib/dist/extraction/extraction-version.js +1 -1
  66. package/lib/dist/extraction/function-ref.d.ts +6 -4
  67. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  68. package/lib/dist/extraction/function-ref.js +41 -14
  69. package/lib/dist/extraction/function-ref.js.map +1 -1
  70. package/lib/dist/extraction/generated-detection.d.ts +48 -12
  71. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  72. package/lib/dist/extraction/generated-detection.js +176 -11
  73. package/lib/dist/extraction/generated-detection.js.map +1 -1
  74. package/lib/dist/extraction/grammars.d.ts +38 -0
  75. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  76. package/lib/dist/extraction/grammars.js +115 -3
  77. package/lib/dist/extraction/grammars.js.map +1 -1
  78. package/lib/dist/extraction/index.d.ts +218 -14
  79. package/lib/dist/extraction/index.d.ts.map +1 -1
  80. package/lib/dist/extraction/index.js +874 -176
  81. package/lib/dist/extraction/index.js.map +1 -1
  82. package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
  83. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  84. package/lib/dist/extraction/languages/c-cpp.js +310 -19
  85. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  86. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  87. package/lib/dist/extraction/languages/dart.js +8 -3
  88. package/lib/dist/extraction/languages/dart.js.map +1 -1
  89. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  90. package/lib/dist/extraction/languages/erlang.js +58 -22
  91. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  92. package/lib/dist/extraction/languages/javascript.js +1 -1
  93. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  94. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  95. package/lib/dist/extraction/languages/kotlin.js +169 -36
  96. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  97. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  98. package/lib/dist/extraction/languages/lua.js +4 -1
  99. package/lib/dist/extraction/languages/lua.js.map +1 -1
  100. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  101. package/lib/dist/extraction/languages/objc.js +4 -0
  102. package/lib/dist/extraction/languages/objc.js.map +1 -1
  103. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  104. package/lib/dist/extraction/languages/python.js +71 -0
  105. package/lib/dist/extraction/languages/python.js.map +1 -1
  106. package/lib/dist/extraction/languages/rust.d.ts +20 -0
  107. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  108. package/lib/dist/extraction/languages/rust.js +50 -20
  109. package/lib/dist/extraction/languages/rust.js.map +1 -1
  110. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  111. package/lib/dist/extraction/languages/scala.js +18 -3
  112. package/lib/dist/extraction/languages/scala.js.map +1 -1
  113. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  114. package/lib/dist/extraction/languages/typescript.js +9 -2
  115. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  116. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  117. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  118. package/lib/dist/extraction/liquid-extractor.js +98 -22
  119. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  120. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  121. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  122. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  123. package/lib/dist/extraction/parse-pool.d.ts +7 -0
  124. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  125. package/lib/dist/extraction/parse-pool.js +20 -1
  126. package/lib/dist/extraction/parse-pool.js.map +1 -1
  127. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  128. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  129. package/lib/dist/extraction/syntax-tokens.js +381 -0
  130. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  131. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  132. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  133. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  134. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  135. package/lib/dist/extraction/tree-sitter-types.d.ts +31 -3
  136. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  137. package/lib/dist/extraction/tree-sitter.d.ts +101 -18
  138. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  139. package/lib/dist/extraction/tree-sitter.js +926 -132
  140. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  141. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  142. package/lib/dist/file-limits.d.ts +40 -0
  143. package/lib/dist/file-limits.d.ts.map +1 -0
  144. package/lib/dist/file-limits.js +147 -0
  145. package/lib/dist/file-limits.js.map +1 -0
  146. package/lib/dist/graph/branch-guards.d.ts +248 -0
  147. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  148. package/lib/dist/graph/branch-guards.js +2231 -0
  149. package/lib/dist/graph/branch-guards.js.map +1 -0
  150. package/lib/dist/graph/dead-code.d.ts +251 -0
  151. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  152. package/lib/dist/graph/dead-code.js +776 -0
  153. package/lib/dist/graph/dead-code.js.map +1 -0
  154. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  155. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  156. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  157. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  158. package/lib/dist/graph/index.d.ts +4 -0
  159. package/lib/dist/graph/index.d.ts.map +1 -1
  160. package/lib/dist/graph/index.js +16 -1
  161. package/lib/dist/graph/index.js.map +1 -1
  162. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  163. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  164. package/lib/dist/graph/named-symbol-flow.js +552 -0
  165. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  166. package/lib/dist/graph/queries.d.ts.map +1 -1
  167. package/lib/dist/graph/queries.js +2 -0
  168. package/lib/dist/graph/queries.js.map +1 -1
  169. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  170. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  171. package/lib/dist/graph/symbol-lookup.js +181 -0
  172. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  173. package/lib/dist/graph/traversal.d.ts +9 -0
  174. package/lib/dist/graph/traversal.d.ts.map +1 -1
  175. package/lib/dist/graph/traversal.js +62 -36
  176. package/lib/dist/graph/traversal.js.map +1 -1
  177. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  178. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  179. package/lib/dist/graph/type-hierarchy.js +382 -0
  180. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  181. package/lib/dist/index.d.ts +273 -11
  182. package/lib/dist/index.d.ts.map +1 -1
  183. package/lib/dist/index.js +511 -34
  184. package/lib/dist/index.js.map +1 -1
  185. package/lib/dist/installer/index.d.ts +4 -3
  186. package/lib/dist/installer/index.d.ts.map +1 -1
  187. package/lib/dist/installer/index.js +11 -8
  188. package/lib/dist/installer/index.js.map +1 -1
  189. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  190. package/lib/dist/installer/targets/antigravity.js +14 -2
  191. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  192. package/lib/dist/installer/targets/claude.d.ts +3 -0
  193. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  194. package/lib/dist/installer/targets/claude.js +72 -12
  195. package/lib/dist/installer/targets/claude.js.map +1 -1
  196. package/lib/dist/installer/targets/codex.d.ts +23 -8
  197. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  198. package/lib/dist/installer/targets/codex.js +74 -47
  199. package/lib/dist/installer/targets/codex.js.map +1 -1
  200. package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
  201. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  202. package/lib/dist/installer/targets/copilot-cli.js +215 -0
  203. package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
  204. package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  205. package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  206. package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
  207. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  208. package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
  209. package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  210. package/lib/dist/installer/targets/copilot-vscode.js +219 -0
  211. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
  212. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  213. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  214. package/lib/dist/installer/targets/opencode.js +73 -22
  215. package/lib/dist/installer/targets/opencode.js.map +1 -1
  216. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  217. package/lib/dist/installer/targets/registry.js +6 -0
  218. package/lib/dist/installer/targets/registry.js.map +1 -1
  219. package/lib/dist/installer/targets/shared.d.ts +14 -3
  220. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  221. package/lib/dist/installer/targets/shared.js +39 -11
  222. package/lib/dist/installer/targets/shared.js.map +1 -1
  223. package/lib/dist/installer/targets/toml.d.ts +6 -5
  224. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  225. package/lib/dist/installer/targets/toml.js +99 -20
  226. package/lib/dist/installer/targets/toml.js.map +1 -1
  227. package/lib/dist/installer/targets/types.d.ts +12 -5
  228. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  229. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  230. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  231. package/lib/dist/mcp/answer-freshness.js +68 -0
  232. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  233. package/lib/dist/mcp/daemon-manager.d.ts +1 -1
  234. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  235. package/lib/dist/mcp/daemon-manager.js +17 -1
  236. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  237. package/lib/dist/mcp/daemon-paths.d.ts +8 -0
  238. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  239. package/lib/dist/mcp/daemon-paths.js +65 -2
  240. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  241. package/lib/dist/mcp/daemon-registry.d.ts +17 -4
  242. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  243. package/lib/dist/mcp/daemon-registry.js +133 -23
  244. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  245. package/lib/dist/mcp/daemon.d.ts +26 -13
  246. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  247. package/lib/dist/mcp/daemon.js +126 -32
  248. package/lib/dist/mcp/daemon.js.map +1 -1
  249. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  250. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  251. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  252. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  253. package/lib/dist/mcp/engine.d.ts +31 -9
  254. package/lib/dist/mcp/engine.d.ts.map +1 -1
  255. package/lib/dist/mcp/engine.js +190 -64
  256. package/lib/dist/mcp/engine.js.map +1 -1
  257. package/lib/dist/mcp/explore-dedup.d.ts +140 -0
  258. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
  259. package/lib/dist/mcp/explore-dedup.js +239 -0
  260. package/lib/dist/mcp/explore-dedup.js.map +1 -0
  261. package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
  262. package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  263. package/lib/dist/mcp/explore-diagnostics.js +558 -0
  264. package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
  265. package/lib/dist/mcp/explore-session-state.d.ts +217 -0
  266. package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
  267. package/lib/dist/mcp/explore-session-state.js +322 -0
  268. package/lib/dist/mcp/explore-session-state.js.map +1 -0
  269. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  270. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  271. package/lib/dist/mcp/index-freshness-worker.js +30 -0
  272. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  273. package/lib/dist/mcp/index-freshness.d.ts +7 -0
  274. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  275. package/lib/dist/mcp/index-freshness.js +94 -0
  276. package/lib/dist/mcp/index-freshness.js.map +1 -0
  277. package/lib/dist/mcp/index.d.ts +27 -1
  278. package/lib/dist/mcp/index.d.ts.map +1 -1
  279. package/lib/dist/mcp/index.js +159 -14
  280. package/lib/dist/mcp/index.js.map +1 -1
  281. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  282. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  283. package/lib/dist/mcp/liveness-watchdog.js +14 -3
  284. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  285. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  286. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  287. package/lib/dist/mcp/project-lifecycle.js +181 -0
  288. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  289. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  290. package/lib/dist/mcp/proxy.js +15 -1
  291. package/lib/dist/mcp/proxy.js.map +1 -1
  292. package/lib/dist/mcp/query-pool.d.ts +2 -2
  293. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  294. package/lib/dist/mcp/query-pool.js +9 -7
  295. package/lib/dist/mcp/query-pool.js.map +1 -1
  296. package/lib/dist/mcp/query-worker.js +2 -2
  297. package/lib/dist/mcp/query-worker.js.map +1 -1
  298. package/lib/dist/mcp/server-instructions.d.ts +2 -2
  299. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  300. package/lib/dist/mcp/server-instructions.js +13 -5
  301. package/lib/dist/mcp/server-instructions.js.map +1 -1
  302. package/lib/dist/mcp/session.d.ts +16 -0
  303. package/lib/dist/mcp/session.d.ts.map +1 -1
  304. package/lib/dist/mcp/session.js +36 -13
  305. package/lib/dist/mcp/session.js.map +1 -1
  306. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  307. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  308. package/lib/dist/mcp/startup-handshake.js +10 -2
  309. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  310. package/lib/dist/mcp/tools.d.ts +544 -38
  311. package/lib/dist/mcp/tools.d.ts.map +1 -1
  312. package/lib/dist/mcp/tools.js +4246 -770
  313. package/lib/dist/mcp/tools.js.map +1 -1
  314. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  315. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  316. package/lib/dist/mcp/writer-lock.js +260 -0
  317. package/lib/dist/mcp/writer-lock.js.map +1 -0
  318. package/lib/dist/project-config.d.ts +23 -0
  319. package/lib/dist/project-config.d.ts.map +1 -1
  320. package/lib/dist/project-config.js +39 -2
  321. package/lib/dist/project-config.js.map +1 -1
  322. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  323. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  324. package/lib/dist/resolution/alias-binding.js +127 -0
  325. package/lib/dist/resolution/alias-binding.js.map +1 -0
  326. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  327. package/lib/dist/resolution/c-fnptr-synthesizer.js +21 -19
  328. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  329. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  330. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  331. package/lib/dist/resolution/callback-synthesizer.js +330 -154
  332. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  333. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  334. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  335. package/lib/dist/resolution/cpp-constructor.js +123 -0
  336. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  337. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  338. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  339. package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
  340. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  341. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  342. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  343. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  344. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  345. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  346. package/lib/dist/resolution/frameworks/csharp.js +96 -2
  347. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  348. package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
  349. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  350. package/lib/dist/resolution/frameworks/expo-router.js +785 -0
  351. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  352. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  353. package/lib/dist/resolution/frameworks/express.js +251 -16
  354. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  355. package/lib/dist/resolution/frameworks/index.d.ts +5 -0
  356. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  357. package/lib/dist/resolution/frameworks/index.js +29 -1
  358. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  359. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  360. package/lib/dist/resolution/frameworks/java.js +79 -47
  361. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  362. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  363. package/lib/dist/resolution/frameworks/nestjs.js +6 -14
  364. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  365. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  366. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  367. package/lib/dist/resolution/frameworks/nextjs.js +328 -0
  368. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  369. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  370. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  371. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  372. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  373. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  374. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  375. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  376. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  377. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  378. package/lib/dist/resolution/frameworks/python.js +166 -0
  379. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  380. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  381. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  382. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  383. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  384. package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
  385. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  386. package/lib/dist/resolution/frameworks/react-router.js +187 -0
  387. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  388. package/lib/dist/resolution/frameworks/react.d.ts +2 -1
  389. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  390. package/lib/dist/resolution/frameworks/react.js +188 -139
  391. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  392. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  393. package/lib/dist/resolution/frameworks/svelte.js +6 -1
  394. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  395. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  396. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  397. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  398. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  399. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  400. package/lib/dist/resolution/frameworks/swift.js +11 -1
  401. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  402. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  403. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  404. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  405. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  406. package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
  407. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  408. package/lib/dist/resolution/frameworks/vue-router.js +377 -0
  409. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  410. package/lib/dist/resolution/import-resolver.d.ts +38 -0
  411. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  412. package/lib/dist/resolution/import-resolver.js +394 -28
  413. package/lib/dist/resolution/import-resolver.js.map +1 -1
  414. package/lib/dist/resolution/index.d.ts +89 -25
  415. package/lib/dist/resolution/index.d.ts.map +1 -1
  416. package/lib/dist/resolution/index.js +567 -149
  417. package/lib/dist/resolution/index.js.map +1 -1
  418. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  419. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  420. package/lib/dist/resolution/js-builtins.js +46 -0
  421. package/lib/dist/resolution/js-builtins.js.map +1 -0
  422. package/lib/dist/resolution/name-matcher.d.ts +99 -22
  423. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  424. package/lib/dist/resolution/name-matcher.js +2192 -87
  425. package/lib/dist/resolution/name-matcher.js.map +1 -1
  426. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  427. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  428. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  429. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  430. package/lib/dist/resolution/path-aliases.d.ts +6 -4
  431. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  432. package/lib/dist/resolution/path-aliases.js +125 -17
  433. package/lib/dist/resolution/path-aliases.js.map +1 -1
  434. package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
  435. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  436. package/lib/dist/resolution/react-router-synthesizer.js +126 -0
  437. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  438. package/lib/dist/resolution/resolver-pool.d.ts +2 -0
  439. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  440. package/lib/dist/resolution/resolver-pool.js +4 -0
  441. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  442. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  443. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  444. package/lib/dist/resolution/strip-comments.js +58 -0
  445. package/lib/dist/resolution/strip-comments.js.map +1 -1
  446. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  447. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  448. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  449. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  450. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  451. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  452. package/lib/dist/resolution/synth-utils.js +75 -0
  453. package/lib/dist/resolution/synth-utils.js.map +1 -0
  454. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  455. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  456. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  457. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  458. package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
  459. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  460. package/lib/dist/resolution/tier-synthesizer.js +931 -0
  461. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  462. package/lib/dist/resolution/types.d.ts +78 -2
  463. package/lib/dist/resolution/types.d.ts.map +1 -1
  464. package/lib/dist/resolution/types.js +64 -0
  465. package/lib/dist/resolution/types.js.map +1 -1
  466. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  467. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  468. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  469. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  470. package/lib/dist/search/identifier-segments.d.ts +10 -0
  471. package/lib/dist/search/identifier-segments.d.ts.map +1 -1
  472. package/lib/dist/search/identifier-segments.js +29 -0
  473. package/lib/dist/search/identifier-segments.js.map +1 -1
  474. package/lib/dist/search/query-paths.d.ts +106 -0
  475. package/lib/dist/search/query-paths.d.ts.map +1 -0
  476. package/lib/dist/search/query-paths.js +513 -0
  477. package/lib/dist/search/query-paths.js.map +1 -0
  478. package/lib/dist/search/query-utils.d.ts +16 -1
  479. package/lib/dist/search/query-utils.d.ts.map +1 -1
  480. package/lib/dist/search/query-utils.js +48 -10
  481. package/lib/dist/search/query-utils.js.map +1 -1
  482. package/lib/dist/sync/watch-policy.d.ts +14 -0
  483. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  484. package/lib/dist/sync/watch-policy.js +19 -0
  485. package/lib/dist/sync/watch-policy.js.map +1 -1
  486. package/lib/dist/sync/watcher.d.ts +74 -35
  487. package/lib/dist/sync/watcher.d.ts.map +1 -1
  488. package/lib/dist/sync/watcher.js +281 -99
  489. package/lib/dist/sync/watcher.js.map +1 -1
  490. package/lib/dist/telemetry/index.d.ts +4 -2
  491. package/lib/dist/telemetry/index.d.ts.map +1 -1
  492. package/lib/dist/telemetry/index.js +92 -41
  493. package/lib/dist/telemetry/index.js.map +1 -1
  494. package/lib/dist/types.d.ts +21 -2
  495. package/lib/dist/types.d.ts.map +1 -1
  496. package/lib/dist/types.js +2 -0
  497. package/lib/dist/types.js.map +1 -1
  498. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  499. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  500. package/lib/dist/ui-server/api/deadcode.js +136 -0
  501. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  502. package/lib/dist/ui-server/api/effects.d.ts +87 -0
  503. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  504. package/lib/dist/ui-server/api/effects.js +499 -0
  505. package/lib/dist/ui-server/api/effects.js.map +1 -0
  506. package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
  507. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  508. package/lib/dist/ui-server/api/entrypoints.js +279 -0
  509. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  510. package/lib/dist/ui-server/api/events.d.ts +183 -0
  511. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  512. package/lib/dist/ui-server/api/events.js +430 -0
  513. package/lib/dist/ui-server/api/events.js.map +1 -0
  514. package/lib/dist/ui-server/api/file.d.ts +66 -0
  515. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  516. package/lib/dist/ui-server/api/file.js +235 -0
  517. package/lib/dist/ui-server/api/file.js.map +1 -0
  518. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  519. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  520. package/lib/dist/ui-server/api/filecode.js +205 -0
  521. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  522. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  523. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  524. package/lib/dist/ui-server/api/flow.js +612 -0
  525. package/lib/dist/ui-server/api/flow.js.map +1 -0
  526. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  527. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  528. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  529. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  530. package/lib/dist/ui-server/api/index.d.ts +90 -0
  531. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  532. package/lib/dist/ui-server/api/index.js +332 -0
  533. package/lib/dist/ui-server/api/index.js.map +1 -0
  534. package/lib/dist/ui-server/api/map.d.ts +238 -0
  535. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  536. package/lib/dist/ui-server/api/map.js +681 -0
  537. package/lib/dist/ui-server/api/map.js.map +1 -0
  538. package/lib/dist/ui-server/api/node.d.ts +81 -0
  539. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  540. package/lib/dist/ui-server/api/node.js +388 -0
  541. package/lib/dist/ui-server/api/node.js.map +1 -0
  542. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  543. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  544. package/lib/dist/ui-server/api/nodes.js +45 -0
  545. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  546. package/lib/dist/ui-server/api/program.d.ts +139 -0
  547. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  548. package/lib/dist/ui-server/api/program.js +315 -0
  549. package/lib/dist/ui-server/api/program.js.map +1 -0
  550. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  551. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  552. package/lib/dist/ui-server/api/respond.js +186 -0
  553. package/lib/dist/ui-server/api/respond.js.map +1 -0
  554. package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
  555. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  556. package/lib/dist/ui-server/api/route-roots.js +96 -0
  557. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  558. package/lib/dist/ui-server/api/routes.d.ts +59 -0
  559. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  560. package/lib/dist/ui-server/api/routes.js +108 -0
  561. package/lib/dist/ui-server/api/routes.js.map +1 -0
  562. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  563. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  564. package/lib/dist/ui-server/api/screens.js +611 -0
  565. package/lib/dist/ui-server/api/screens.js.map +1 -0
  566. package/lib/dist/ui-server/api/search.d.ts +29 -0
  567. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  568. package/lib/dist/ui-server/api/search.js +232 -0
  569. package/lib/dist/ui-server/api/search.js.map +1 -0
  570. package/lib/dist/ui-server/api/session.d.ts +52 -0
  571. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  572. package/lib/dist/ui-server/api/session.js +196 -0
  573. package/lib/dist/ui-server/api/session.js.map +1 -0
  574. package/lib/dist/ui-server/api/source.d.ts +200 -0
  575. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  576. package/lib/dist/ui-server/api/source.js +422 -0
  577. package/lib/dist/ui-server/api/source.js.map +1 -0
  578. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  579. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  580. package/lib/dist/ui-server/api/stats.js +164 -0
  581. package/lib/dist/ui-server/api/stats.js.map +1 -0
  582. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  583. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  584. package/lib/dist/ui-server/api/steps.js +1446 -0
  585. package/lib/dist/ui-server/api/steps.js.map +1 -0
  586. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  587. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  588. package/lib/dist/ui-server/api/trail-store.js +323 -0
  589. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  590. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  591. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  592. package/lib/dist/ui-server/api/trails.js +369 -0
  593. package/lib/dist/ui-server/api/trails.js.map +1 -0
  594. package/lib/dist/ui-server/api/when.d.ts +125 -0
  595. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  596. package/lib/dist/ui-server/api/when.js +251 -0
  597. package/lib/dist/ui-server/api/when.js.map +1 -0
  598. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  599. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  600. package/lib/dist/ui-server/api/wire.js +231 -0
  601. package/lib/dist/ui-server/api/wire.js.map +1 -0
  602. package/lib/dist/ui-server/assets.d.ts +40 -0
  603. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  604. package/lib/dist/ui-server/assets.js +110 -0
  605. package/lib/dist/ui-server/assets.js.map +1 -0
  606. package/lib/dist/ui-server/constants.d.ts +32 -0
  607. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  608. package/lib/dist/ui-server/constants.js +35 -0
  609. package/lib/dist/ui-server/constants.js.map +1 -0
  610. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  611. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  612. package/lib/dist/ui-server/highlight/index.js +307 -0
  613. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  614. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  615. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  616. package/lib/dist/ui-server/highlight/languages.js +50 -0
  617. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  618. package/lib/dist/ui-server/index.d.ts +92 -0
  619. package/lib/dist/ui-server/index.d.ts.map +1 -0
  620. package/lib/dist/ui-server/index.js +399 -0
  621. package/lib/dist/ui-server/index.js.map +1 -0
  622. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  623. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  624. package/lib/dist/ui-server/open-browser.js +79 -0
  625. package/lib/dist/ui-server/open-browser.js.map +1 -0
  626. package/lib/dist/ui-server/security.d.ts +127 -0
  627. package/lib/dist/ui-server/security.d.ts.map +1 -0
  628. package/lib/dist/ui-server/security.js +332 -0
  629. package/lib/dist/ui-server/security.js.map +1 -0
  630. package/lib/dist/ui-server/static.d.ts +45 -0
  631. package/lib/dist/ui-server/static.d.ts.map +1 -0
  632. package/lib/dist/ui-server/static.js +165 -0
  633. package/lib/dist/ui-server/static.js.map +1 -0
  634. package/lib/dist/utils.d.ts +14 -2
  635. package/lib/dist/utils.d.ts.map +1 -1
  636. package/lib/dist/utils.js +25 -10
  637. package/lib/dist/utils.js.map +1 -1
  638. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  639. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  640. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  641. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  642. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  643. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  644. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  645. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  646. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  647. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  648. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  649. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  650. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  651. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  652. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  653. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  654. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  655. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  656. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  657. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  658. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  659. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  660. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  661. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  662. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  663. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  664. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  665. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  666. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  667. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  668. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  669. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  670. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  671. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  672. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  673. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  674. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  675. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  676. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  677. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  678. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  679. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  680. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  681. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  682. package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
  683. package/lib/dist/viewer/index.html +16 -0
  684. package/lib/kernel/codegraph-kernel.node +2 -2
  685. package/lib/node_modules/.package-lock.json +4 -4
  686. package/lib/node_modules/picomatch/README.md +56 -51
  687. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  688. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  689. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  690. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  691. package/lib/node_modules/picomatch/package.json +4 -4
  692. package/lib/package.json +9 -2
  693. package/package.json +1 -1
package/lib/dist/index.js CHANGED
@@ -41,8 +41,12 @@ var __importStar = (this && this.__importStar) || (function () {
41
41
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
42
42
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
43
43
  };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
44
47
  Object.defineProperty(exports, "__esModule", { value: true });
45
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"));
46
50
  const path = __importStar(require("path"));
47
51
  const db_1 = require("./db");
48
52
  const wal_valve_1 = require("./db/wal-valve");
@@ -50,6 +54,7 @@ const queries_1 = require("./db/queries");
50
54
  const directory_1 = require("./directory");
51
55
  const extraction_1 = require("./extraction");
52
56
  const resolution_1 = require("./resolution");
57
+ const callback_synthesizer_1 = require("./resolution/callback-synthesizer");
53
58
  const graph_1 = require("./graph");
54
59
  const context_1 = require("./context");
55
60
  const utils_1 = require("./utils");
@@ -57,6 +62,8 @@ const sync_1 = require("./sync");
57
62
  const extraction_version_1 = require("./extraction/extraction-version");
58
63
  const directory_2 = require("./directory");
59
64
  const query_utils_1 = require("./search/query-utils");
65
+ const ignore_1 = __importDefault(require("ignore"));
66
+ const project_config_1 = require("./project-config");
60
67
  const version_1 = require("./mcp/version");
61
68
  const identifier_segments_1 = require("./search/identifier-segments");
62
69
  const cooperative_yield_1 = require("./resolution/cooperative-yield");
@@ -154,12 +161,64 @@ class CodeGraph {
154
161
  catch {
155
162
  // Best-effort: ranking still works without it.
156
163
  }
164
+ // Down-weight the peripheral trees the project named in `codegraph.json`
165
+ // `deprioritize` — indexed and findable, but never outranking real code
166
+ // (#982). Ranking-only, so a bad pattern costs relevance, never recall.
167
+ //
168
+ // Read LAZILY, not once here: `wireLayers` runs from the constructor and
169
+ // from `reopenIfReplaced`, so a matcher built here would freeze at whatever
170
+ // the config said when the project opened. The MCP server caches one
171
+ // CodeGraph per root for its whole lifetime, so editing `codegraph.json`
172
+ // would appear to do nothing until the process restarted — `exclude` and
173
+ // `include` do not behave that way. `loadDeprioritizePatterns` is
174
+ // mtime-cached, so this costs one `stat`; the compiled matcher is memoized
175
+ // on the pattern array's identity, which the cache keeps stable.
176
+ let cachedPatterns;
177
+ let cachedMatcher;
178
+ this.queries.setDeprioritizedPathMatcher((filePath) => {
179
+ try {
180
+ const patterns = (0, project_config_1.loadDeprioritizePatterns)(this.projectRoot);
181
+ if (patterns.length === 0)
182
+ return false;
183
+ if (patterns !== cachedPatterns) {
184
+ cachedPatterns = patterns;
185
+ cachedMatcher = (0, ignore_1.default)().add(patterns);
186
+ }
187
+ const rel = path.isAbsolute(filePath)
188
+ ? path.relative(this.projectRoot, filePath)
189
+ : filePath;
190
+ if (!rel || rel.startsWith('..'))
191
+ return false;
192
+ return cachedMatcher.ignores(rel.split(path.sep).join('/'));
193
+ }
194
+ catch {
195
+ // Ranking must never take the search down with it.
196
+ return false;
197
+ }
198
+ });
157
199
  this.orchestrator = new extraction_1.ExtractionOrchestrator(this.projectRoot, this.queries);
158
200
  this.resolver = (0, resolution_1.createResolver)(this.projectRoot, this.queries);
159
201
  this.graphManager = new graph_1.GraphQueryManager(this.queries);
160
202
  this.traverser = new graph_1.GraphTraverser(this.queries);
161
203
  this.contextBuilder = (0, context_1.createContextBuilder)(this.projectRoot, this.queries, this.traverser);
162
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
+ }
163
222
  /**
164
223
  * Heal a stale database handle in place. If `.codegraph/` was removed and
165
224
  * recreated at the SAME path while this instance held the DB open — a git
@@ -173,19 +232,33 @@ class CodeGraph {
173
232
  *
174
233
  * POSIX-only in practice: `isReplacedOnDisk` never fires on Windows (an open
175
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.
176
240
  */
177
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() {
178
248
  if (!this.db.isReplacedOnDisk())
179
249
  return false;
180
250
  const dbPath = this.db.getPath();
181
251
  // Open the live file FIRST — if that throws (e.g. mid-recreate), the old
182
252
  // handle stays in place and the caller retries on the next query, rather
183
253
  // than leaving this instance with no connection at all.
184
- const fresh = db_1.DatabaseConnection.open(dbPath);
254
+ const fresh = db_1.DatabaseConnection.open(dbPath, { readOnly: this.db.readOnly });
185
255
  const stale = this.db;
186
256
  this.db = fresh;
187
257
  this.queries = new queries_1.QueryBuilder(fresh.getDb());
188
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;
189
262
  // Releasing the dead handle also frees the leaked db/-wal/-shm fds that were
190
263
  // pinning the unlinked inode (#925).
191
264
  try {
@@ -264,12 +337,18 @@ class CodeGraph {
264
337
  }
265
338
  // Open database
266
339
  const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
267
- const db = db_1.DatabaseConnection.open(dbPath);
340
+ const db = db_1.DatabaseConnection.open(dbPath, { readOnly: options.readOnly });
268
341
  const queries = new queries_1.QueryBuilder(db.getDb());
269
342
  const instance = new CodeGraph(db, queries, resolvedRoot);
270
343
  // Sync if requested
271
- if (options.sync) {
272
- 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
+ }
273
352
  }
274
353
  return instance;
275
354
  }
@@ -318,7 +397,7 @@ class CodeGraph {
318
397
  /**
319
398
  * Open synchronously (without sync)
320
399
  */
321
- static openSync(projectRoot) {
400
+ static openSync(projectRoot, options = {}) {
322
401
  const resolvedRoot = path.resolve(projectRoot);
323
402
  // Check if initialized
324
403
  if (!(0, directory_1.isInitialized)(resolvedRoot)) {
@@ -331,7 +410,7 @@ class CodeGraph {
331
410
  }
332
411
  // Open database
333
412
  const dbPath = (0, db_1.getDatabasePath)(resolvedRoot);
334
- const db = db_1.DatabaseConnection.open(dbPath);
413
+ const db = db_1.DatabaseConnection.open(dbPath, { readOnly: options.readOnly });
335
414
  const queries = new queries_1.QueryBuilder(db.getDb());
336
415
  return new CodeGraph(db, queries, resolvedRoot);
337
416
  }
@@ -409,6 +488,7 @@ class CodeGraph {
409
488
  walValve.start();
410
489
  }
411
490
  try {
491
+ const gitState = this.orchestrator.beginGitIndexState(true);
412
492
  const before = this.queries.getNodeAndEdgeCount();
413
493
  // Mark the index as in-flight BEFORE any writes: a run killed
414
494
  // mid-index (OOM, SIGKILL, the #850 liveness watchdog) leaves this
@@ -584,6 +664,10 @@ class CodeGraph {
584
664
  }
585
665
  catch { /* metadata is advisory — never fail an index over it */ }
586
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
+ }
587
671
  // Reconcile the scan's ground truth against what the pipeline
588
672
  // accounted for. A shortfall means files were silently dropped
589
673
  // (observed in the wild: a run under heavy load came up 37 files
@@ -670,7 +754,8 @@ class CodeGraph {
670
754
  });
671
755
  }
672
756
  /**
673
- * 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.
674
759
  *
675
760
  * Uses a mutex to prevent concurrent indexing operations.
676
761
  */
@@ -679,8 +764,40 @@ class CodeGraph {
679
764
  try {
680
765
  this.fileLock.acquire();
681
766
  }
682
- catch {
683
- 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 };
684
801
  }
685
802
  // Defer WAL auto-checkpointing for the whole incremental run, exactly
686
803
  // as indexAll does for the bulk path (#1231): sync's store loop and its
@@ -715,7 +832,28 @@ class CodeGraph {
715
832
  return false;
716
833
  }
717
834
  })();
718
- 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
+ });
719
857
  // Fold the store phase's WAL BEFORE the post-store reads below
720
858
  // (resolution reads on the main thread) — same rationale as
721
859
  // indexAll's fold between store and resolution.
@@ -806,7 +944,27 @@ class CodeGraph {
806
944
  current: done,
807
945
  total: totalPasses,
808
946
  });
809
- });
947
+ }, backpressure, false);
948
+ }
949
+ }
950
+ // Re-open resolution edges this sync may have invalidated ELSEWHERE in
951
+ // the repo (CG-33). Everything above re-resolves references in the
952
+ // changed files; this covers the opposite direction — references in
953
+ // files the sync never touched whose answer depended on a definition
954
+ // that just appeared or disappeared. Without it a synced index never
955
+ // converges to a full rebuild: measured at 4.3% of distinct edges wrong
956
+ // on codegraph's own index, in both directions, mostly `calls`. The
957
+ // resurrected refs are pending rows, so the orphan sweep immediately
958
+ // below is what resolves them — batched, yielding, multi-pass, exactly
959
+ // as a full index resolves.
960
+ //
961
+ // `definitionDelta` is empty for a body-only edit, so the overwhelmingly
962
+ // common sync pays one branch. CODEGRAPH_NO_REBIND=1 disables it.
963
+ if (result.definitionDelta && process.env.CODEGRAPH_NO_REBIND !== '1') {
964
+ const tRebind = Date.now();
965
+ const rebound = this.orchestrator.resurrectStaleResolutionEdges(result.definitionDelta, result.changedFilePaths ?? []);
966
+ if (process.env.CODEGRAPH_SYNTH_TIMINGS) {
967
+ console.error(`[phase-timing] sync-rebind: ${Date.now() - tRebind}ms (${result.definitionDelta.length} changed names, ${rebound} edges re-opened)`);
810
968
  }
811
969
  }
812
970
  // Orphan sweep (#1187). A resolution pass that dies mid-run — the #850
@@ -822,6 +980,9 @@ class CodeGraph {
822
980
  // Grind them down with the batched resolver; this also makes a bare
823
981
  // `codegraph sync` the recovery command for a wedged index. On a
824
982
  // healthy index this is one COUNT query.
983
+ result.pendingRefsProcessed = 0;
984
+ result.pendingRefsResolved = 0;
985
+ result.pendingRefsUnresolved = 0;
825
986
  const orphanCount = this.queries.getUnresolvedReferencesCount();
826
987
  if (orphanCount > 0) {
827
988
  options.onProgress?.({
@@ -829,7 +990,7 @@ class CodeGraph {
829
990
  current: 0,
830
991
  total: orphanCount,
831
992
  });
832
- await this.resolveReferencesBatched((current, total) => {
993
+ const recovery = await this.resolveReferencesBatched((current, total) => {
833
994
  options.onProgress?.({
834
995
  phase: 'resolving',
835
996
  current,
@@ -841,7 +1002,10 @@ class CodeGraph {
841
1002
  current: done,
842
1003
  total: totalPasses,
843
1004
  });
844
- });
1005
+ }, backpressure, false);
1006
+ result.pendingRefsProcessed = recovery.stats.total;
1007
+ result.pendingRefsResolved = recovery.stats.resolved;
1008
+ result.pendingRefsUnresolved = recovery.stats.unresolved;
845
1009
  }
846
1010
  if (filesChanged || orphanCount > 0) {
847
1011
  // Second pass: chained calls whose method lives on a supertype the
@@ -852,9 +1016,15 @@ class CodeGraph {
852
1016
  // member is inherited from a supertype (#808).
853
1017
  await this.resolver.resolveDeferredThisMemberRefs();
854
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
+ }
855
1025
  // Refresh planner stats + checkpoint the WAL after bulk writes.
856
1026
  // Off-thread — see indexAll's call site.
857
- if (filesChanged || result.filesRemoved > 0 || orphanCount > 0) {
1027
+ if (filesChanged || result.filesRemoved > 0 || orphanCount > 0 || refreshSynthesis) {
858
1028
  await this.db.runMaintenance();
859
1029
  }
860
1030
  // Heal the segment vocabulary on indexes built before the table
@@ -869,6 +1039,18 @@ class CodeGraph {
869
1039
  }
870
1040
  }
871
1041
  catch { /* vocab is advisory — never fail a sync over it */ }
1042
+ // A killed full index leaves this marker at `indexing`. Sync repairs
1043
+ // missing files, pending refs, and (on open) dropped indexes, so a
1044
+ // successful recovery must also close the metadata state (#1556).
1045
+ if (fullReconcile && this.getIndexState() === 'indexing') {
1046
+ try {
1047
+ this.queries.setMetadata('index_state', 'complete');
1048
+ }
1049
+ catch { /* advisory */ }
1050
+ }
1051
+ this.orchestrator.finishGitIndexState(gitState, fullReconcile, result.failedFilePaths);
1052
+ if (fullReconcile && result.filesChecked > 0)
1053
+ this.pendingFullReconcile = false;
872
1054
  return result;
873
1055
  }
874
1056
  finally {
@@ -899,6 +1081,29 @@ class CodeGraph {
899
1081
  // ===========================================================================
900
1082
  // File Watching
901
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
+ }
902
1107
  /**
903
1108
  * Start watching for file changes and auto-syncing.
904
1109
  *
@@ -913,17 +1118,11 @@ class CodeGraph {
913
1118
  return true;
914
1119
  this.watcher = new sync_1.FileWatcher(this.projectRoot, async (paths) => {
915
1120
  const result = await this.sync({ paths });
916
- // sync() returns this exact zero-shape iff it failed to acquire the
917
- // file lock (a real empty sync always has filesChecked > 0 because
918
- // scanDirectory ran). Surface that to the watcher as a typed error
919
- // so it keeps pendingFiles + reschedules instead of clearing them
920
- // (#449).
921
- if (result.filesChecked === 0 && result.durationMs === 0) {
922
- throw new sync_1.LockUnavailableError();
923
- }
924
1121
  const filesChanged = result.filesAdded + result.filesModified + result.filesRemoved;
925
1122
  return { filesChanged, durationMs: result.durationMs };
926
- }, options);
1123
+ }, options, process.platform === 'win32'
1124
+ ? (filePath) => this.isIndexedFileStateCurrent(filePath)
1125
+ : undefined);
927
1126
  return this.watcher.start();
928
1127
  }
929
1128
  /**
@@ -942,12 +1141,11 @@ class CodeGraph {
942
1141
  return this.watcher?.isActive() ?? false;
943
1142
  }
944
1143
  /**
945
- * True once live watching has permanently degraded (OS watch-resource
946
- * exhaustion, or a write lock held past the retry budget) and auto-sync is
947
- * disabled until the next {@link watch} call. Distinct from `!isWatching()`:
948
- * a stopped/never-started watcher is inactive but NOT degraded. MCP tools use
949
- * this to surface a whole-index "results may be stale" notice, since
950
- * `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).
951
1149
  */
952
1150
  isWatcherDegraded() {
953
1151
  return this.watcher?.isDegraded() ?? false;
@@ -956,6 +1154,14 @@ class CodeGraph {
956
1154
  getWatcherDegradedReason() {
957
1155
  return this.watcher?.getDegradedReason() ?? null;
958
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
+ }
959
1165
  /**
960
1166
  * Files seen by the file watcher since the last successful sync —
961
1167
  * the per-file "stale" signal MCP tools attach to responses so an agent
@@ -993,6 +1199,40 @@ class CodeGraph {
993
1199
  getLastIndexedAt() {
994
1200
  return this.queries.getLastIndexedAt();
995
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
+ }
996
1236
  /**
997
1237
  * Completeness of the last full index run. `'complete'` is the only good
998
1238
  * state. `'indexing'` after the fact means a run was killed mid-index (OOM,
@@ -1066,7 +1306,7 @@ class CodeGraph {
1066
1306
  // resolution is timer-driven passive checkpoints, which the pool's
1067
1307
  // continuous reads keep perpetually partial — the WAL then accretes the
1068
1308
  // whole phase's write volume (22GB on a 4.6GB DB at kernel scale).
1069
- backpressure) {
1309
+ backpressure, synthesize = true) {
1070
1310
  return this.resolver.resolveAndPersistBatched(onProgress, undefined, onSynthesisProgress, {
1071
1311
  dbPath: this.db.getPath(),
1072
1312
  // Bulk-edge-load hooks: on big runs the resolver drops the non-unique
@@ -1076,14 +1316,15 @@ class CodeGraph {
1076
1316
  // just degrade to scans until the recreate.
1077
1317
  bulkEdgeLoad: {
1078
1318
  begin: () => this.db.beginBulkEdgeLoad(),
1079
- end: () => this.db.endBulkEdgeLoad(),
1319
+ end: () => this.db.endBulkEdgeLoad({ deferSynthesisSite: true }),
1320
+ deferred: () => this.db.createSynthesisSiteIndex(),
1080
1321
  },
1081
1322
  refIndexLoad: {
1082
1323
  begin: () => this.db.beginBulkRefLoad(),
1083
1324
  end: () => this.db.endBulkRefLoad(),
1084
1325
  },
1085
1326
  backpressure,
1086
- });
1327
+ }, synthesize);
1087
1328
  }
1088
1329
  /**
1089
1330
  * References extracted but never attempted by a resolution pass. Zero on a
@@ -1116,6 +1357,7 @@ class CodeGraph {
1116
1357
  getStats() {
1117
1358
  const stats = this.queries.getStats();
1118
1359
  stats.dbSizeBytes = this.db.getSize();
1360
+ stats.walSizeBytes = this.db.getWalSizeBytes();
1119
1361
  return stats;
1120
1362
  }
1121
1363
  /**
@@ -1144,12 +1386,188 @@ class CodeGraph {
1144
1386
  getNode(id) {
1145
1387
  return this.queries.getNodeById(id);
1146
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
+ }
1147
1559
  /**
1148
1560
  * Get all nodes in a file
1149
1561
  */
1150
1562
  getNodesInFile(filePath) {
1151
1563
  return this.queries.getNodesByFile(filePath);
1152
1564
  }
1565
+ /**
1566
+ * Get all nodes in several files, in one batched query.
1567
+ */
1568
+ getNodesInFiles(filePaths) {
1569
+ return this.queries.getNodesByFiles(filePaths);
1570
+ }
1153
1571
  /**
1154
1572
  * Get all nodes of a specific kind
1155
1573
  */
@@ -1184,6 +1602,10 @@ class CodeGraph {
1184
1602
  searchNodes(query, options) {
1185
1603
  return this.queries.searchNodes(query, options);
1186
1604
  }
1605
+ /** Lexical evidence for an empty explore result; does not alter retrieval. */
1606
+ getExploreMissDiagnostics(query) {
1607
+ return this.queries.getExploreMissDiagnostics(query);
1608
+ }
1187
1609
  /**
1188
1610
  * Graph-derived prompt matching for the front-load hook's MEDIUM tier:
1189
1611
  * which indexed symbols do these prose words name? "state machine des
@@ -1416,6 +1838,34 @@ class CodeGraph {
1416
1838
  getFiles() {
1417
1839
  return this.queries.getAllFiles();
1418
1840
  }
1841
+ /**
1842
+ * A `(path) => boolean` generated-file test over a BOUNDED candidate list,
1843
+ * unioning the index-time content-banner flag with the filename convention
1844
+ * (#1500). One query up front, O(1) per call after — built for use inside a
1845
+ * ranking comparator, where re-querying per comparison would be quadratic.
1846
+ *
1847
+ * Pass every path you might ask about; a path outside the list falls back to
1848
+ * the filename check alone.
1849
+ */
1850
+ generatedFilePredicate(filePaths) {
1851
+ return this.queries.generatedPredicateFor(filePaths);
1852
+ }
1853
+ /**
1854
+ * A `(path) => boolean` ambient-declaration test over a BOUNDED candidate
1855
+ * list: true for a file that declares nothing but types, originates no call
1856
+ * edge, and that nothing in the index depends on — an ambient `.d.ts` of
1857
+ * global shims, vendored typings, module augmentation (CG-28). Structural
1858
+ * rather than extension-based, and deliberately narrow: see
1859
+ * `QueryBuilder.getAmbientDeclarationPathsAmong` for why each condition is
1860
+ * there, in particular why a `types.ts` the codebase imports is NOT flagged.
1861
+ */
1862
+ ambientDeclarationFilePredicate(filePaths) {
1863
+ return this.queries.ambientDeclarationPredicateFor(filePaths);
1864
+ }
1865
+ /** How many indexed files are flagged tool-generated. Reported by `status`. */
1866
+ getGeneratedFileCount() {
1867
+ return this.queries.countGeneratedFiles();
1868
+ }
1419
1869
  // ===========================================================================
1420
1870
  // Graph Query Methods
1421
1871
  // ===========================================================================
@@ -1570,7 +2020,17 @@ class CodeGraph {
1570
2020
  return this.graphManager.findCircularDependencies();
1571
2021
  }
1572
2022
  /**
1573
- * 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.
1574
2034
  *
1575
2035
  * @param kinds - Node kinds to check (default: functions, methods, classes)
1576
2036
  * @returns Array of unreferenced nodes
@@ -1612,7 +2072,24 @@ class CodeGraph {
1612
2072
  * @returns Subgraph of relevant nodes and edges
1613
2073
  */
1614
2074
  async findRelevantContext(query, options) {
1615
- return this.contextBuilder.findRelevantContext(query, options);
2075
+ // Segment-vocab supplement: FTS keeps camelCase names as single tokens,
2076
+ // so a word-level query ("auto-scroll to bottom") can never reach
2077
+ // `pinFeedIfNearBottom` through search alone. Resolve the query's words
2078
+ // against name_segment_vocab (same precision rules as the prompt hook:
2079
+ // co-occurrence, else rare singles, verified against live nodes) and hand
2080
+ // the names down as dampened exact-name seeds. Callers that pass their
2081
+ // own seedNames keep them; failures degrade to no supplement.
2082
+ let seedNames = options?.seedNames;
2083
+ if (seedNames === undefined) {
2084
+ try {
2085
+ seedNames = this.getSegmentMatches((0, identifier_segments_1.extractSegmentSearchWords)(query), 8)
2086
+ .map((m) => m.name);
2087
+ }
2088
+ catch {
2089
+ seedNames = [];
2090
+ }
2091
+ }
2092
+ return this.contextBuilder.findRelevantContext(query, { ...options, seedNames });
1616
2093
  }
1617
2094
  /**
1618
2095
  * Build context for a task