@colbymchenry/codegraph-win32-arm64 1.6.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1036) hide show
  1. package/bin/codegraph +1 -1
  2. package/bin/codegraph.cmd +1 -1
  3. package/lib/dist/.test-build-engine.json +1 -1
  4. package/lib/dist/.test-build-viewer.json +1 -1
  5. package/lib/dist/bin/codegraph.d.ts +3 -0
  6. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  7. package/lib/dist/bin/codegraph.js +425 -688
  8. package/lib/dist/bin/codegraph.js.map +1 -1
  9. package/lib/dist/bin/command-supervision.js +1 -57
  10. package/lib/dist/bin/command-supervision.js.map +1 -1
  11. package/lib/dist/bin/fatal-handler.js +0 -46
  12. package/lib/dist/bin/fatal-handler.js.map +1 -1
  13. package/lib/dist/bin/node-version-check.js +0 -33
  14. package/lib/dist/bin/node-version-check.js.map +1 -1
  15. package/lib/dist/bin/uninstall.js +0 -19
  16. package/lib/dist/bin/uninstall.js.map +1 -1
  17. package/lib/dist/bin/viewer-gate.js +0 -14
  18. package/lib/dist/bin/viewer-gate.js.map +1 -1
  19. package/lib/dist/compile-cache.d.ts +2 -0
  20. package/lib/dist/compile-cache.d.ts.map +1 -0
  21. package/lib/dist/compile-cache.js +45 -0
  22. package/lib/dist/compile-cache.js.map +1 -0
  23. package/lib/dist/context/formatter.js +3 -66
  24. package/lib/dist/context/formatter.js.map +1 -1
  25. package/lib/dist/context/index.d.ts +44 -1
  26. package/lib/dist/context/index.d.ts.map +1 -1
  27. package/lib/dist/context/index.js +123 -430
  28. package/lib/dist/context/index.js.map +1 -1
  29. package/lib/dist/context/markers.js +0 -17
  30. package/lib/dist/context/markers.js.map +1 -1
  31. package/lib/dist/db/index.d.ts +44 -1
  32. package/lib/dist/db/index.d.ts.map +1 -1
  33. package/lib/dist/db/index.js +123 -395
  34. package/lib/dist/db/index.js.map +1 -1
  35. package/lib/dist/db/migrations.d.ts +11 -1
  36. package/lib/dist/db/migrations.d.ts.map +1 -1
  37. package/lib/dist/db/migrations.js +71 -79
  38. package/lib/dist/db/migrations.js.map +1 -1
  39. package/lib/dist/db/name-substring-index.d.ts +63 -0
  40. package/lib/dist/db/name-substring-index.d.ts.map +1 -0
  41. package/lib/dist/db/name-substring-index.js +151 -0
  42. package/lib/dist/db/name-substring-index.js.map +1 -0
  43. package/lib/dist/db/node-sqlite.d.ts +19 -0
  44. package/lib/dist/db/node-sqlite.d.ts.map +1 -0
  45. package/lib/dist/db/node-sqlite.js +23 -0
  46. package/lib/dist/db/node-sqlite.js.map +1 -0
  47. package/lib/dist/db/open-error.d.ts +36 -0
  48. package/lib/dist/db/open-error.d.ts.map +1 -0
  49. package/lib/dist/db/open-error.js +63 -0
  50. package/lib/dist/db/open-error.js.map +1 -0
  51. package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
  52. package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
  53. package/lib/dist/db/parameter-flow-queries.js +168 -0
  54. package/lib/dist/db/parameter-flow-queries.js.map +1 -0
  55. package/lib/dist/db/queries.d.ts +610 -33
  56. package/lib/dist/db/queries.d.ts.map +1 -1
  57. package/lib/dist/db/queries.js +1345 -1419
  58. package/lib/dist/db/queries.js.map +1 -1
  59. package/lib/dist/db/reference-tail.d.ts +83 -0
  60. package/lib/dist/db/reference-tail.d.ts.map +1 -0
  61. package/lib/dist/db/reference-tail.js +68 -0
  62. package/lib/dist/db/reference-tail.js.map +1 -0
  63. package/lib/dist/db/schema.sql +18 -2
  64. package/lib/dist/db/sqlite-adapter.d.ts +18 -1
  65. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  66. package/lib/dist/db/sqlite-adapter.js +12 -62
  67. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  68. package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
  69. package/lib/dist/db/synthesis-stage.js +2 -6
  70. package/lib/dist/db/synthesis-stage.js.map +1 -1
  71. package/lib/dist/db/wal-valve.js +1 -153
  72. package/lib/dist/db/wal-valve.js.map +1 -1
  73. package/lib/dist/db/wsl-shared-index.js +0 -37
  74. package/lib/dist/db/wsl-shared-index.js.map +1 -1
  75. package/lib/dist/directory.d.ts +51 -0
  76. package/lib/dist/directory.d.ts.map +1 -1
  77. package/lib/dist/directory.js +76 -530
  78. package/lib/dist/directory.js.map +1 -1
  79. package/lib/dist/engine.d.ts +15 -0
  80. package/lib/dist/engine.d.ts.map +1 -0
  81. package/lib/dist/engine.js +34 -0
  82. package/lib/dist/engine.js.map +1 -0
  83. package/lib/dist/errors.d.ts +10 -0
  84. package/lib/dist/errors.d.ts.map +1 -1
  85. package/lib/dist/errors.js +8 -101
  86. package/lib/dist/errors.js.map +1 -1
  87. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
  88. package/lib/dist/extraction/astro-extractor.js +11 -101
  89. package/lib/dist/extraction/astro-extractor.js.map +1 -1
  90. package/lib/dist/extraction/cfml-extractor.d.ts +27 -1
  91. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  92. package/lib/dist/extraction/cfml-extractor.js +66 -204
  93. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  94. package/lib/dist/extraction/commonjs-requires.js +0 -31
  95. package/lib/dist/extraction/commonjs-requires.js.map +1 -1
  96. package/lib/dist/extraction/dfm-extractor.js +0 -21
  97. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  98. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  99. package/lib/dist/extraction/extraction-version.js +1 -24
  100. package/lib/dist/extraction/extraction-version.js.map +1 -1
  101. package/lib/dist/extraction/function-ref.d.ts +40 -0
  102. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  103. package/lib/dist/extraction/function-ref.js +145 -206
  104. package/lib/dist/extraction/function-ref.js.map +1 -1
  105. package/lib/dist/extraction/generated-detection.js +0 -165
  106. package/lib/dist/extraction/generated-detection.js.map +1 -1
  107. package/lib/dist/extraction/grammars.d.ts +45 -4
  108. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  109. package/lib/dist/extraction/grammars.js +53 -430
  110. package/lib/dist/extraction/grammars.js.map +1 -1
  111. package/lib/dist/extraction/index.d.ts +197 -7
  112. package/lib/dist/extraction/index.d.ts.map +1 -1
  113. package/lib/dist/extraction/index.js +554 -1382
  114. package/lib/dist/extraction/index.js.map +1 -1
  115. package/lib/dist/extraction/kernel/decode.js +0 -16
  116. package/lib/dist/extraction/kernel/decode.js.map +1 -1
  117. package/lib/dist/extraction/kernel/index.d.ts +3 -1
  118. package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
  119. package/lib/dist/extraction/kernel/index.js +25 -133
  120. package/lib/dist/extraction/kernel/index.js.map +1 -1
  121. package/lib/dist/extraction/kernel/layout.js +42 -76
  122. package/lib/dist/extraction/kernel/layout.js.map +1 -1
  123. package/lib/dist/extraction/kernel/loader.js +0 -37
  124. package/lib/dist/extraction/kernel/loader.js.map +1 -1
  125. package/lib/dist/extraction/languages/arkts.js +0 -59
  126. package/lib/dist/extraction/languages/arkts.js.map +1 -1
  127. package/lib/dist/extraction/languages/c-cpp.d.ts +125 -28
  128. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  129. package/lib/dist/extraction/languages/c-cpp.js +789 -856
  130. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  131. package/lib/dist/extraction/languages/cfquery.js +0 -9
  132. package/lib/dist/extraction/languages/cfquery.js.map +1 -1
  133. package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
  134. package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
  135. package/lib/dist/extraction/languages/cfscript.js +80 -9
  136. package/lib/dist/extraction/languages/cfscript.js.map +1 -1
  137. package/lib/dist/extraction/languages/cobol.js +0 -114
  138. package/lib/dist/extraction/languages/cobol.js.map +1 -1
  139. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
  140. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
  141. package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
  142. package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
  143. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
  144. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
  145. package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
  146. package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
  147. package/lib/dist/extraction/languages/csharp.js +3 -55
  148. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  149. package/lib/dist/extraction/languages/dart.d.ts +84 -0
  150. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  151. package/lib/dist/extraction/languages/dart.js +329 -161
  152. package/lib/dist/extraction/languages/dart.js.map +1 -1
  153. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  154. package/lib/dist/extraction/languages/erlang.js +15 -102
  155. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  156. package/lib/dist/extraction/languages/go.d.ts +48 -0
  157. package/lib/dist/extraction/languages/go.d.ts.map +1 -1
  158. package/lib/dist/extraction/languages/go.js +102 -31
  159. package/lib/dist/extraction/languages/go.js.map +1 -1
  160. package/lib/dist/extraction/languages/index.js +0 -6
  161. package/lib/dist/extraction/languages/index.js.map +1 -1
  162. package/lib/dist/extraction/languages/java.d.ts.map +1 -1
  163. package/lib/dist/extraction/languages/java.js +67 -78
  164. package/lib/dist/extraction/languages/java.js.map +1 -1
  165. package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
  166. package/lib/dist/extraction/languages/javascript.js +2 -12
  167. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  168. package/lib/dist/extraction/languages/kotlin.d.ts +11 -0
  169. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  170. package/lib/dist/extraction/languages/kotlin.js +35 -184
  171. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  172. package/lib/dist/extraction/languages/lua.js +2 -39
  173. package/lib/dist/extraction/languages/lua.js.map +1 -1
  174. package/lib/dist/extraction/languages/luau.js +0 -14
  175. package/lib/dist/extraction/languages/luau.js.map +1 -1
  176. package/lib/dist/extraction/languages/nix.js +0 -16
  177. package/lib/dist/extraction/languages/nix.js.map +1 -1
  178. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  179. package/lib/dist/extraction/languages/objc.js +5 -16
  180. package/lib/dist/extraction/languages/objc.js.map +1 -1
  181. package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
  182. package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
  183. package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
  184. package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
  185. package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
  186. package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
  187. package/lib/dist/extraction/languages/pascal-system.js +23 -0
  188. package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
  189. package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
  190. package/lib/dist/extraction/languages/pascal.js +3 -4
  191. package/lib/dist/extraction/languages/pascal.js.map +1 -1
  192. package/lib/dist/extraction/languages/php.js +5 -42
  193. package/lib/dist/extraction/languages/php.js.map +1 -1
  194. package/lib/dist/extraction/languages/python.js +2 -20
  195. package/lib/dist/extraction/languages/python.js.map +1 -1
  196. package/lib/dist/extraction/languages/r.js +8 -78
  197. package/lib/dist/extraction/languages/r.js.map +1 -1
  198. package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
  199. package/lib/dist/extraction/languages/ruby.js +17 -25
  200. package/lib/dist/extraction/languages/ruby.js.map +1 -1
  201. package/lib/dist/extraction/languages/rust.d.ts +10 -0
  202. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  203. package/lib/dist/extraction/languages/rust.js +15 -47
  204. package/lib/dist/extraction/languages/rust.js.map +1 -1
  205. package/lib/dist/extraction/languages/scala.js +5 -41
  206. package/lib/dist/extraction/languages/scala.js.map +1 -1
  207. package/lib/dist/extraction/languages/solidity.js +1 -82
  208. package/lib/dist/extraction/languages/solidity.js.map +1 -1
  209. package/lib/dist/extraction/languages/swift.js +3 -47
  210. package/lib/dist/extraction/languages/swift.js.map +1 -1
  211. package/lib/dist/extraction/languages/terraform.js +6 -152
  212. package/lib/dist/extraction/languages/terraform.js.map +1 -1
  213. package/lib/dist/extraction/languages/typescript.d.ts +64 -0
  214. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  215. package/lib/dist/extraction/languages/typescript.js +73 -49
  216. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  217. package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
  218. package/lib/dist/extraction/languages/vbnet.js +9 -42
  219. package/lib/dist/extraction/languages/vbnet.js.map +1 -1
  220. package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
  221. package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
  222. package/lib/dist/extraction/lazy-frameworks.js +8 -0
  223. package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
  224. package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
  225. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  226. package/lib/dist/extraction/liquid-extractor.js +89 -148
  227. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  228. package/lib/dist/extraction/mybatis-extractor.js +0 -78
  229. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  230. package/lib/dist/extraction/parse-budget.js +0 -13
  231. package/lib/dist/extraction/parse-budget.js.map +1 -1
  232. package/lib/dist/extraction/parse-pool.d.ts +29 -5
  233. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  234. package/lib/dist/extraction/parse-pool.js +42 -174
  235. package/lib/dist/extraction/parse-pool.js.map +1 -1
  236. package/lib/dist/extraction/parse-worker.d.ts +1 -1
  237. package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
  238. package/lib/dist/extraction/parse-worker.js +5 -58
  239. package/lib/dist/extraction/parse-worker.js.map +1 -1
  240. package/lib/dist/extraction/razor-extractor.d.ts +9 -0
  241. package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
  242. package/lib/dist/extraction/razor-extractor.js +45 -69
  243. package/lib/dist/extraction/razor-extractor.js.map +1 -1
  244. package/lib/dist/extraction/razor-script.d.ts +23 -0
  245. package/lib/dist/extraction/razor-script.d.ts.map +1 -0
  246. package/lib/dist/extraction/razor-script.js +244 -0
  247. package/lib/dist/extraction/razor-script.js.map +1 -0
  248. package/lib/dist/extraction/sfc-script.d.ts +42 -0
  249. package/lib/dist/extraction/sfc-script.d.ts.map +1 -1
  250. package/lib/dist/extraction/sfc-script.js +32 -31
  251. package/lib/dist/extraction/sfc-script.js.map +1 -1
  252. package/lib/dist/extraction/store-worker.d.ts +1 -1
  253. package/lib/dist/extraction/store-worker.d.ts.map +1 -1
  254. package/lib/dist/extraction/store-worker.js +1 -38
  255. package/lib/dist/extraction/store-worker.js.map +1 -1
  256. package/lib/dist/extraction/store-writer.js +2 -34
  257. package/lib/dist/extraction/store-writer.js.map +1 -1
  258. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
  259. package/lib/dist/extraction/svelte-extractor.js +11 -87
  260. package/lib/dist/extraction/svelte-extractor.js.map +1 -1
  261. package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
  262. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
  263. package/lib/dist/extraction/syntax-tokens.js +4 -152
  264. package/lib/dist/extraction/syntax-tokens.js.map +1 -1
  265. package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
  266. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  267. package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
  268. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  269. package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
  270. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  271. package/lib/dist/extraction/tree-sitter-types.js +0 -7
  272. package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
  273. package/lib/dist/extraction/tree-sitter.d.ts +447 -9
  274. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  275. package/lib/dist/extraction/tree-sitter.js +1908 -2544
  276. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  277. package/lib/dist/extraction/vue-extractor.d.ts +13 -0
  278. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
  279. package/lib/dist/extraction/vue-extractor.js +52 -92
  280. package/lib/dist/extraction/vue-extractor.js.map +1 -1
  281. package/lib/dist/extraction/vue-options-api.js +0 -32
  282. package/lib/dist/extraction/vue-options-api.js.map +1 -1
  283. package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
  284. package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
  285. package/lib/dist/extraction/vue-template-calls.js +497 -0
  286. package/lib/dist/extraction/vue-template-calls.js.map +1 -0
  287. package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  288. package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
  289. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  290. package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
  291. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
  292. package/lib/dist/file-limits.d.ts +8 -0
  293. package/lib/dist/file-limits.d.ts.map +1 -1
  294. package/lib/dist/file-limits.js +13 -28
  295. package/lib/dist/file-limits.js.map +1 -1
  296. package/lib/dist/graph/branch-guards.d.ts.map +1 -1
  297. package/lib/dist/graph/branch-guards.js +4 -251
  298. package/lib/dist/graph/branch-guards.js.map +1 -1
  299. package/lib/dist/graph/call-sites.d.ts +12 -0
  300. package/lib/dist/graph/call-sites.d.ts.map +1 -0
  301. package/lib/dist/graph/call-sites.js +17 -0
  302. package/lib/dist/graph/call-sites.js.map +1 -0
  303. package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
  304. package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
  305. package/lib/dist/graph/cobol-copybooks.js +45 -0
  306. package/lib/dist/graph/cobol-copybooks.js.map +1 -0
  307. package/lib/dist/graph/dead-code.d.ts +26 -4
  308. package/lib/dist/graph/dead-code.d.ts.map +1 -1
  309. package/lib/dist/graph/dead-code.js +157 -311
  310. package/lib/dist/graph/dead-code.js.map +1 -1
  311. package/lib/dist/graph/dynamic-boundary-report.js +1 -88
  312. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
  313. package/lib/dist/graph/file-cycles.d.ts +20 -0
  314. package/lib/dist/graph/file-cycles.d.ts.map +1 -0
  315. package/lib/dist/graph/file-cycles.js +79 -0
  316. package/lib/dist/graph/file-cycles.js.map +1 -0
  317. package/lib/dist/graph/go-package.d.ts +27 -0
  318. package/lib/dist/graph/go-package.d.ts.map +1 -0
  319. package/lib/dist/graph/go-package.js +49 -0
  320. package/lib/dist/graph/go-package.js.map +1 -0
  321. package/lib/dist/graph/index.d.ts +2 -0
  322. package/lib/dist/graph/index.d.ts.map +1 -1
  323. package/lib/dist/graph/index.js +4 -6
  324. package/lib/dist/graph/index.js.map +1 -1
  325. package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
  326. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
  327. package/lib/dist/graph/named-symbol-flow.js +82 -223
  328. package/lib/dist/graph/named-symbol-flow.js.map +1 -1
  329. package/lib/dist/graph/owning-package.d.ts +59 -0
  330. package/lib/dist/graph/owning-package.d.ts.map +1 -0
  331. package/lib/dist/graph/owning-package.js +120 -0
  332. package/lib/dist/graph/owning-package.js.map +1 -0
  333. package/lib/dist/graph/queries.d.ts +2 -2
  334. package/lib/dist/graph/queries.d.ts.map +1 -1
  335. package/lib/dist/graph/queries.js +2 -135
  336. package/lib/dist/graph/queries.js.map +1 -1
  337. package/lib/dist/graph/symbol-lookup.d.ts +15 -3
  338. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
  339. package/lib/dist/graph/symbol-lookup.js +47 -89
  340. package/lib/dist/graph/symbol-lookup.js.map +1 -1
  341. package/lib/dist/graph/synthesized-hop.d.ts +37 -0
  342. package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
  343. package/lib/dist/graph/synthesized-hop.js +62 -0
  344. package/lib/dist/graph/synthesized-hop.js.map +1 -0
  345. package/lib/dist/graph/test-code.d.ts +21 -0
  346. package/lib/dist/graph/test-code.d.ts.map +1 -0
  347. package/lib/dist/graph/test-code.js +50 -0
  348. package/lib/dist/graph/test-code.js.map +1 -0
  349. package/lib/dist/graph/traversal.d.ts +31 -2
  350. package/lib/dist/graph/traversal.d.ts.map +1 -1
  351. package/lib/dist/graph/traversal.js +98 -226
  352. package/lib/dist/graph/traversal.js.map +1 -1
  353. package/lib/dist/graph/type-hierarchy.js +0 -138
  354. package/lib/dist/graph/type-hierarchy.js.map +1 -1
  355. package/lib/dist/index.d.ts +190 -25
  356. package/lib/dist/index.d.ts.map +1 -1
  357. package/lib/dist/index.js +694 -1109
  358. package/lib/dist/index.js.map +1 -1
  359. package/lib/dist/installer/beta-signup.js +0 -39
  360. package/lib/dist/installer/beta-signup.js.map +1 -1
  361. package/lib/dist/installer/config-writer.js +0 -24
  362. package/lib/dist/installer/config-writer.js.map +1 -1
  363. package/lib/dist/installer/index.d.ts +9 -5
  364. package/lib/dist/installer/index.d.ts.map +1 -1
  365. package/lib/dist/installer/index.js +25 -159
  366. package/lib/dist/installer/index.js.map +1 -1
  367. package/lib/dist/installer/instructions-template.d.ts +1 -1
  368. package/lib/dist/installer/instructions-template.js +0 -37
  369. package/lib/dist/installer/instructions-template.js.map +1 -1
  370. package/lib/dist/installer/targets/antigravity.js +0 -113
  371. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  372. package/lib/dist/installer/targets/bob.d.ts +20 -0
  373. package/lib/dist/installer/targets/bob.d.ts.map +1 -0
  374. package/lib/dist/installer/targets/bob.js +83 -0
  375. package/lib/dist/installer/targets/bob.js.map +1 -0
  376. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  377. package/lib/dist/installer/targets/claude.js +1 -185
  378. package/lib/dist/installer/targets/claude.js.map +1 -1
  379. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  380. package/lib/dist/installer/targets/codex.js +17 -109
  381. package/lib/dist/installer/targets/codex.js.map +1 -1
  382. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  383. package/lib/dist/installer/targets/copilot-cli.js +2 -54
  384. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  385. package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
  386. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
  387. package/lib/dist/installer/targets/copilot-vscode.js +0 -58
  388. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
  389. package/lib/dist/installer/targets/cursor.js +7 -88
  390. package/lib/dist/installer/targets/cursor.js.map +1 -1
  391. package/lib/dist/installer/targets/droid.d.ts +18 -0
  392. package/lib/dist/installer/targets/droid.d.ts.map +1 -0
  393. package/lib/dist/installer/targets/droid.js +92 -0
  394. package/lib/dist/installer/targets/droid.js.map +1 -0
  395. package/lib/dist/installer/targets/dsh.d.ts +35 -0
  396. package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
  397. package/lib/dist/installer/targets/dsh.js +267 -0
  398. package/lib/dist/installer/targets/dsh.js.map +1 -0
  399. package/lib/dist/installer/targets/gemini.js +0 -37
  400. package/lib/dist/installer/targets/gemini.js.map +1 -1
  401. package/lib/dist/installer/targets/grok.d.ts +25 -0
  402. package/lib/dist/installer/targets/grok.d.ts.map +1 -0
  403. package/lib/dist/installer/targets/grok.js +96 -0
  404. package/lib/dist/installer/targets/grok.js.map +1 -0
  405. package/lib/dist/installer/targets/hermes.d.ts +19 -7
  406. package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
  407. package/lib/dist/installer/targets/hermes.js +218 -214
  408. package/lib/dist/installer/targets/hermes.js.map +1 -1
  409. package/lib/dist/installer/targets/json-config.d.ts +45 -0
  410. package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
  411. package/lib/dist/installer/targets/json-config.js +128 -0
  412. package/lib/dist/installer/targets/json-config.js.map +1 -0
  413. package/lib/dist/installer/targets/kimi.d.ts +21 -0
  414. package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
  415. package/lib/dist/installer/targets/kimi.js +97 -0
  416. package/lib/dist/installer/targets/kimi.js.map +1 -0
  417. package/lib/dist/installer/targets/kiro.js +1 -41
  418. package/lib/dist/installer/targets/kiro.js.map +1 -1
  419. package/lib/dist/installer/targets/opencode.js +0 -102
  420. package/lib/dist/installer/targets/opencode.js.map +1 -1
  421. package/lib/dist/installer/targets/pi.d.ts +24 -0
  422. package/lib/dist/installer/targets/pi.d.ts.map +1 -0
  423. package/lib/dist/installer/targets/pi.js +100 -0
  424. package/lib/dist/installer/targets/pi.js.map +1 -0
  425. package/lib/dist/installer/targets/qoder.d.ts +23 -0
  426. package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
  427. package/lib/dist/installer/targets/qoder.js +83 -0
  428. package/lib/dist/installer/targets/qoder.js.map +1 -0
  429. package/lib/dist/installer/targets/qwen.d.ts +21 -0
  430. package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
  431. package/lib/dist/installer/targets/qwen.js +115 -0
  432. package/lib/dist/installer/targets/qwen.js.map +1 -0
  433. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  434. package/lib/dist/installer/targets/registry.js +18 -25
  435. package/lib/dist/installer/targets/registry.js.map +1 -1
  436. package/lib/dist/installer/targets/shared.d.ts +81 -11
  437. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  438. package/lib/dist/installer/targets/shared.js +183 -129
  439. package/lib/dist/installer/targets/shared.js.map +1 -1
  440. package/lib/dist/installer/targets/toml.d.ts +82 -6
  441. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  442. package/lib/dist/installer/targets/toml.js +318 -112
  443. package/lib/dist/installer/targets/toml.js.map +1 -1
  444. package/lib/dist/installer/targets/types.d.ts +1 -1
  445. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  446. package/lib/dist/installer/targets/types.js +0 -13
  447. package/lib/dist/installer/targets/types.js.map +1 -1
  448. package/lib/dist/installer/targets/windsurf.d.ts +22 -0
  449. package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
  450. package/lib/dist/installer/targets/windsurf.js +90 -0
  451. package/lib/dist/installer/targets/windsurf.js.map +1 -0
  452. package/lib/dist/lazy-engine.d.ts +22 -0
  453. package/lib/dist/lazy-engine.d.ts.map +1 -0
  454. package/lib/dist/lazy-engine.js +16 -0
  455. package/lib/dist/lazy-engine.js.map +1 -0
  456. package/lib/dist/mcp/answer-freshness.js +0 -6
  457. package/lib/dist/mcp/answer-freshness.js.map +1 -1
  458. package/lib/dist/mcp/daemon-manager.js +2 -23
  459. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  460. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  461. package/lib/dist/mcp/daemon-paths.js +2 -85
  462. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  463. package/lib/dist/mcp/daemon-registry.d.ts +40 -0
  464. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  465. package/lib/dist/mcp/daemon-registry.js +174 -137
  466. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  467. package/lib/dist/mcp/daemon.d.ts +23 -0
  468. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  469. package/lib/dist/mcp/daemon.js +89 -373
  470. package/lib/dist/mcp/daemon.js.map +1 -1
  471. package/lib/dist/mcp/dynamic-boundaries.js +4 -78
  472. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  473. package/lib/dist/mcp/early-ppid.js +0 -24
  474. package/lib/dist/mcp/early-ppid.js.map +1 -1
  475. package/lib/dist/mcp/engine.d.ts +8 -0
  476. package/lib/dist/mcp/engine.d.ts.map +1 -1
  477. package/lib/dist/mcp/engine.js +33 -152
  478. package/lib/dist/mcp/engine.js.map +1 -1
  479. package/lib/dist/mcp/explore-dedup.js +0 -108
  480. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  481. package/lib/dist/mcp/explore-diagnostics.js +0 -116
  482. package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
  483. package/lib/dist/mcp/explore-session-state.js +0 -129
  484. package/lib/dist/mcp/explore-session-state.js.map +1 -1
  485. package/lib/dist/mcp/index-freshness-worker.js +1 -6
  486. package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
  487. package/lib/dist/mcp/index-freshness.js +0 -15
  488. package/lib/dist/mcp/index-freshness.js.map +1 -1
  489. package/lib/dist/mcp/index-version-warning.d.ts +21 -0
  490. package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
  491. package/lib/dist/mcp/index-version-warning.js +38 -0
  492. package/lib/dist/mcp/index-version-warning.js.map +1 -0
  493. package/lib/dist/mcp/index.d.ts +19 -1
  494. package/lib/dist/mcp/index.d.ts.map +1 -1
  495. package/lib/dist/mcp/index.js +118 -293
  496. package/lib/dist/mcp/index.js.map +1 -1
  497. package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
  498. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  499. package/lib/dist/mcp/liveness-watchdog.js +106 -121
  500. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  501. package/lib/dist/mcp/ppid-watchdog.js +0 -24
  502. package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
  503. package/lib/dist/mcp/process-identity.d.ts +42 -0
  504. package/lib/dist/mcp/process-identity.d.ts.map +1 -0
  505. package/lib/dist/mcp/process-identity.js +130 -0
  506. package/lib/dist/mcp/process-identity.js.map +1 -0
  507. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
  508. package/lib/dist/mcp/project-lifecycle.js +50 -17
  509. package/lib/dist/mcp/project-lifecycle.js.map +1 -1
  510. package/lib/dist/mcp/proxy.d.ts +17 -6
  511. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  512. package/lib/dist/mcp/proxy.js +74 -248
  513. package/lib/dist/mcp/proxy.js.map +1 -1
  514. package/lib/dist/mcp/query-pool.d.ts +43 -3
  515. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  516. package/lib/dist/mcp/query-pool.js +109 -123
  517. package/lib/dist/mcp/query-pool.js.map +1 -1
  518. package/lib/dist/mcp/query-worker.js +24 -36
  519. package/lib/dist/mcp/query-worker.js.map +1 -1
  520. package/lib/dist/mcp/server-instructions.js +0 -31
  521. package/lib/dist/mcp/server-instructions.js.map +1 -1
  522. package/lib/dist/mcp/session.d.ts +27 -0
  523. package/lib/dist/mcp/session.d.ts.map +1 -1
  524. package/lib/dist/mcp/session.js +29 -130
  525. package/lib/dist/mcp/session.js.map +1 -1
  526. package/lib/dist/mcp/startup-handshake.js +1 -48
  527. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  528. package/lib/dist/mcp/stdin-teardown.js +0 -28
  529. package/lib/dist/mcp/stdin-teardown.js.map +1 -1
  530. package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
  531. package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
  532. package/lib/dist/mcp/stdout-teardown.js +20 -0
  533. package/lib/dist/mcp/stdout-teardown.js.map +1 -0
  534. package/lib/dist/mcp/tools.d.ts +127 -18
  535. package/lib/dist/mcp/tools.d.ts.map +1 -1
  536. package/lib/dist/mcp/tools.js +661 -3590
  537. package/lib/dist/mcp/tools.js.map +1 -1
  538. package/lib/dist/mcp/transport.d.ts.map +1 -1
  539. package/lib/dist/mcp/transport.js +4 -96
  540. package/lib/dist/mcp/transport.js.map +1 -1
  541. package/lib/dist/mcp/version.d.ts +13 -1
  542. package/lib/dist/mcp/version.d.ts.map +1 -1
  543. package/lib/dist/mcp/version.js +19 -21
  544. package/lib/dist/mcp/version.js.map +1 -1
  545. package/lib/dist/mcp/writer-lock.d.ts +11 -0
  546. package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
  547. package/lib/dist/mcp/writer-lock.js +49 -46
  548. package/lib/dist/mcp/writer-lock.js.map +1 -1
  549. package/lib/dist/project-config.js +1 -138
  550. package/lib/dist/project-config.js.map +1 -1
  551. package/lib/dist/resolution/alias-binding.d.ts +7 -0
  552. package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
  553. package/lib/dist/resolution/alias-binding.js +7 -56
  554. package/lib/dist/resolution/alias-binding.js.map +1 -1
  555. package/lib/dist/resolution/ambient-modules.d.ts +185 -0
  556. package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
  557. package/lib/dist/resolution/ambient-modules.js +732 -0
  558. package/lib/dist/resolution/ambient-modules.js.map +1 -0
  559. package/lib/dist/resolution/angular-template-synthesizer.d.ts +48 -1
  560. package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -1
  561. package/lib/dist/resolution/angular-template-synthesizer.js +401 -65
  562. package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -1
  563. package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
  564. package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
  565. package/lib/dist/resolution/c-feature-variants.js +249 -0
  566. package/lib/dist/resolution/c-feature-variants.js.map +1 -0
  567. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  568. package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
  569. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  570. package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
  571. package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
  572. package/lib/dist/resolution/c-macro-renames.js +95 -0
  573. package/lib/dist/resolution/c-macro-renames.js.map +1 -0
  574. package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
  575. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  576. package/lib/dist/resolution/callback-synthesizer.js +1355 -1270
  577. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  578. package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
  579. package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
  580. package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
  581. package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
  582. package/lib/dist/resolution/cooperative-yield.js +0 -27
  583. package/lib/dist/resolution/cooperative-yield.js.map +1 -1
  584. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
  585. package/lib/dist/resolution/cpp-constructor.js +15 -17
  586. package/lib/dist/resolution/cpp-constructor.js.map +1 -1
  587. package/lib/dist/resolution/cpp-includers.d.ts +46 -0
  588. package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
  589. package/lib/dist/resolution/cpp-includers.js +153 -0
  590. package/lib/dist/resolution/cpp-includers.js.map +1 -0
  591. package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
  592. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
  593. package/lib/dist/resolution/cpp-macro-visibility.js +17 -68
  594. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
  595. package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
  596. package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
  597. package/lib/dist/resolution/cpp-namespaces.js +151 -0
  598. package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
  599. package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
  600. package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
  601. package/lib/dist/resolution/cpp-raw-strings.js +167 -0
  602. package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
  603. package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
  604. package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
  605. package/lib/dist/resolution/cpp-supertypes.js +322 -0
  606. package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
  607. package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
  608. package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
  609. package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
  610. package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
  611. package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
  612. package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
  613. package/lib/dist/resolution/cpp-type-aliases.js +648 -0
  614. package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
  615. package/lib/dist/resolution/dart-libraries.d.ts +75 -0
  616. package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
  617. package/lib/dist/resolution/dart-libraries.js +721 -0
  618. package/lib/dist/resolution/dart-libraries.js.map +1 -0
  619. package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
  620. package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
  621. package/lib/dist/resolution/dart-local-scope.js +565 -0
  622. package/lib/dist/resolution/dart-local-scope.js.map +1 -0
  623. package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
  624. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
  625. package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -1
  626. package/lib/dist/resolution/frameworks/angular-router.js +41 -208
  627. package/lib/dist/resolution/frameworks/angular-router.js.map +1 -1
  628. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
  629. package/lib/dist/resolution/frameworks/astro.js +4 -60
  630. package/lib/dist/resolution/frameworks/astro.js.map +1 -1
  631. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
  632. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
  633. package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
  634. package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
  635. package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
  636. package/lib/dist/resolution/frameworks/cics.js +7 -33
  637. package/lib/dist/resolution/frameworks/cics.js.map +1 -1
  638. package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
  639. package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
  640. package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
  641. package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
  642. package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
  643. package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
  644. package/lib/dist/resolution/frameworks/component-folder.js +11 -0
  645. package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
  646. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  647. package/lib/dist/resolution/frameworks/csharp.js +5 -68
  648. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  649. package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
  650. package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
  651. package/lib/dist/resolution/frameworks/drupal.js +377 -142
  652. package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
  653. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
  654. package/lib/dist/resolution/frameworks/expo-modules.js +8 -88
  655. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
  656. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
  657. package/lib/dist/resolution/frameworks/expo-router.js +9 -190
  658. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
  659. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  660. package/lib/dist/resolution/frameworks/express.js +182 -199
  661. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  662. package/lib/dist/resolution/frameworks/fabric.js +1 -104
  663. package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
  664. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  665. package/lib/dist/resolution/frameworks/go.js +14 -43
  666. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  667. package/lib/dist/resolution/frameworks/goframe.js +1 -55
  668. package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
  669. package/lib/dist/resolution/frameworks/index.d.ts +13 -0
  670. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  671. package/lib/dist/resolution/frameworks/index.js +12 -50
  672. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  673. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  674. package/lib/dist/resolution/frameworks/java.js +203 -129
  675. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  676. package/lib/dist/resolution/frameworks/laravel.js +2 -125
  677. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  678. package/lib/dist/resolution/frameworks/name-heuristic.js +0 -12
  679. package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -1
  680. package/lib/dist/resolution/frameworks/nestjs.js +2 -199
  681. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  682. package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
  683. package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
  684. package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
  685. package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
  686. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
  687. package/lib/dist/resolution/frameworks/nextjs.js +10 -66
  688. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
  689. package/lib/dist/resolution/frameworks/object-literal.js +0 -21
  690. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
  691. package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
  692. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
  693. package/lib/dist/resolution/frameworks/package-deps.js +35 -26
  694. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
  695. package/lib/dist/resolution/frameworks/page-component.js +0 -14
  696. package/lib/dist/resolution/frameworks/page-component.js.map +1 -1
  697. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
  698. package/lib/dist/resolution/frameworks/play.js +26 -34
  699. package/lib/dist/resolution/frameworks/play.js.map +1 -1
  700. package/lib/dist/resolution/frameworks/python.js +5 -102
  701. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  702. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  703. package/lib/dist/resolution/frameworks/react-native.js +1 -166
  704. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  705. package/lib/dist/resolution/frameworks/react-router.d.ts +13 -4
  706. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
  707. package/lib/dist/resolution/frameworks/react-router.js +10 -82
  708. package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
  709. package/lib/dist/resolution/frameworks/react.d.ts +57 -0
  710. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  711. package/lib/dist/resolution/frameworks/react.js +1449 -191
  712. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  713. package/lib/dist/resolution/frameworks/ruby.js +1 -61
  714. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  715. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  716. package/lib/dist/resolution/frameworks/rust.js +35 -56
  717. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  718. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  719. package/lib/dist/resolution/frameworks/svelte.js +7 -75
  720. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  721. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
  722. package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
  723. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
  724. package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
  725. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
  726. package/lib/dist/resolution/frameworks/swift.js +0 -97
  727. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  728. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
  729. package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
  730. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
  731. package/lib/dist/resolution/frameworks/terraform.js +1 -85
  732. package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
  733. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
  734. package/lib/dist/resolution/frameworks/vue-router.js +11 -134
  735. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
  736. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
  737. package/lib/dist/resolution/frameworks/vue.js +42 -114
  738. package/lib/dist/resolution/frameworks/vue.js.map +1 -1
  739. package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
  740. package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
  741. package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
  742. package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
  743. package/lib/dist/resolution/go-module.d.ts +23 -7
  744. package/lib/dist/resolution/go-module.d.ts.map +1 -1
  745. package/lib/dist/resolution/go-module.js +21 -24
  746. package/lib/dist/resolution/go-module.js.map +1 -1
  747. package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
  748. package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
  749. package/lib/dist/resolution/go-stdlib-methods.js +224 -0
  750. package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
  751. package/lib/dist/resolution/goframe-synthesizer.js +2 -53
  752. package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
  753. package/lib/dist/resolution/import-resolver.d.ts +276 -29
  754. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  755. package/lib/dist/resolution/import-resolver.js +1670 -1380
  756. package/lib/dist/resolution/import-resolver.js.map +1 -1
  757. package/lib/dist/resolution/index.d.ts +415 -6
  758. package/lib/dist/resolution/index.d.ts.map +1 -1
  759. package/lib/dist/resolution/index.js +1323 -1037
  760. package/lib/dist/resolution/index.js.map +1 -1
  761. package/lib/dist/resolution/js-builtins.d.ts +14 -0
  762. package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
  763. package/lib/dist/resolution/js-builtins.js +14 -14
  764. package/lib/dist/resolution/js-builtins.js.map +1 -1
  765. package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
  766. package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
  767. package/lib/dist/resolution/js-class-expressions.js +25 -0
  768. package/lib/dist/resolution/js-class-expressions.js.map +1 -0
  769. package/lib/dist/resolution/js-super-calls.d.ts +18 -0
  770. package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
  771. package/lib/dist/resolution/js-super-calls.js +94 -0
  772. package/lib/dist/resolution/js-super-calls.js.map +1 -0
  773. package/lib/dist/resolution/jsx-code.d.ts +28 -0
  774. package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
  775. package/lib/dist/resolution/jsx-code.js +459 -0
  776. package/lib/dist/resolution/jsx-code.js.map +1 -0
  777. package/lib/dist/resolution/lru-cache.d.ts +5 -13
  778. package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
  779. package/lib/dist/resolution/lru-cache.js +43 -32
  780. package/lib/dist/resolution/lru-cache.js.map +1 -1
  781. package/lib/dist/resolution/memory-budget.js +0 -52
  782. package/lib/dist/resolution/memory-budget.js.map +1 -1
  783. package/lib/dist/resolution/module-importers.d.ts +185 -0
  784. package/lib/dist/resolution/module-importers.d.ts.map +1 -0
  785. package/lib/dist/resolution/module-importers.js +588 -0
  786. package/lib/dist/resolution/module-importers.js.map +1 -0
  787. package/lib/dist/resolution/name-matcher.d.ts +858 -7
  788. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  789. package/lib/dist/resolution/name-matcher.js +21030 -5110
  790. package/lib/dist/resolution/name-matcher.js.map +1 -1
  791. package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
  792. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
  793. package/lib/dist/resolution/next-router-synthesizer.js +46 -28
  794. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
  795. package/lib/dist/resolution/override-parameters.d.ts +40 -0
  796. package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
  797. package/lib/dist/resolution/override-parameters.js +339 -0
  798. package/lib/dist/resolution/override-parameters.js.map +1 -0
  799. package/lib/dist/resolution/parameter-flow.d.ts +218 -0
  800. package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
  801. package/lib/dist/resolution/parameter-flow.js +474 -0
  802. package/lib/dist/resolution/parameter-flow.js.map +1 -0
  803. package/lib/dist/resolution/pascal-scope.d.ts +91 -0
  804. package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
  805. package/lib/dist/resolution/pascal-scope.js +961 -0
  806. package/lib/dist/resolution/pascal-scope.js.map +1 -0
  807. package/lib/dist/resolution/path-aliases.d.ts +32 -4
  808. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  809. package/lib/dist/resolution/path-aliases.js +43 -110
  810. package/lib/dist/resolution/path-aliases.js.map +1 -1
  811. package/lib/dist/resolution/project-scans.d.ts +38 -0
  812. package/lib/dist/resolution/project-scans.d.ts.map +1 -0
  813. package/lib/dist/resolution/project-scans.js +30 -0
  814. package/lib/dist/resolution/project-scans.js.map +1 -0
  815. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
  816. package/lib/dist/resolution/react-router-synthesizer.js +3 -55
  817. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
  818. package/lib/dist/resolution/resolver-pool.d.ts +23 -2
  819. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  820. package/lib/dist/resolution/resolver-pool.js +43 -111
  821. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  822. package/lib/dist/resolution/resolver-worker.d.ts +1 -1
  823. package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
  824. package/lib/dist/resolution/resolver-worker.js +8 -37
  825. package/lib/dist/resolution/resolver-worker.js.map +1 -1
  826. package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
  827. package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
  828. package/lib/dist/resolution/resurrect-ref.js +19 -0
  829. package/lib/dist/resolution/resurrect-ref.js.map +1 -0
  830. package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
  831. package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
  832. package/lib/dist/resolution/ruby-constant-paths.js +255 -0
  833. package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
  834. package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
  835. package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
  836. package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
  837. package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
  838. package/lib/dist/resolution/rust-scopes.d.ts +120 -0
  839. package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
  840. package/lib/dist/resolution/rust-scopes.js +730 -0
  841. package/lib/dist/resolution/rust-scopes.js.map +1 -0
  842. package/lib/dist/resolution/shopify-themes.d.ts +10 -0
  843. package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
  844. package/lib/dist/resolution/shopify-themes.js +19 -0
  845. package/lib/dist/resolution/shopify-themes.js.map +1 -0
  846. package/lib/dist/resolution/strip-comments.d.ts +20 -1
  847. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  848. package/lib/dist/resolution/strip-comments.js +164 -119
  849. package/lib/dist/resolution/strip-comments.js.map +1 -1
  850. package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
  851. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
  852. package/lib/dist/resolution/swift-objc-bridge.js +0 -160
  853. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
  854. package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -1
  855. package/lib/dist/resolution/swift-type-visibility.js +2 -101
  856. package/lib/dist/resolution/swift-type-visibility.js.map +1 -1
  857. package/lib/dist/resolution/synth-utils.js +1 -22
  858. package/lib/dist/resolution/synth-utils.js.map +1 -1
  859. package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
  860. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
  861. package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
  862. package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
  863. package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
  864. package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
  865. package/lib/dist/resolution/tier-synthesizer.js +4 -170
  866. package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
  867. package/lib/dist/resolution/type-parameters.d.ts +23 -0
  868. package/lib/dist/resolution/type-parameters.d.ts.map +1 -1
  869. package/lib/dist/resolution/type-parameters.js +52 -54
  870. package/lib/dist/resolution/type-parameters.js.map +1 -1
  871. package/lib/dist/resolution/types.d.ts +183 -11
  872. package/lib/dist/resolution/types.d.ts.map +1 -1
  873. package/lib/dist/resolution/types.js +0 -47
  874. package/lib/dist/resolution/types.js.map +1 -1
  875. package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
  876. package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
  877. package/lib/dist/resolution/vbnet-receivers.js +1482 -0
  878. package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
  879. package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
  880. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
  881. package/lib/dist/resolution/workspace-packages.d.ts +206 -15
  882. package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
  883. package/lib/dist/resolution/workspace-packages.js +570 -152
  884. package/lib/dist/resolution/workspace-packages.js.map +1 -1
  885. package/lib/dist/search/identifier-segments.js +2 -93
  886. package/lib/dist/search/identifier-segments.js.map +1 -1
  887. package/lib/dist/search/query-parser.js +0 -54
  888. package/lib/dist/search/query-parser.js.map +1 -1
  889. package/lib/dist/search/query-paths.js +0 -167
  890. package/lib/dist/search/query-paths.js.map +1 -1
  891. package/lib/dist/search/query-utils.d.ts +44 -0
  892. package/lib/dist/search/query-utils.d.ts.map +1 -1
  893. package/lib/dist/search/query-utils.js +120 -198
  894. package/lib/dist/search/query-utils.js.map +1 -1
  895. package/lib/dist/sync/git-hooks.d.ts +14 -5
  896. package/lib/dist/sync/git-hooks.d.ts.map +1 -1
  897. package/lib/dist/sync/git-hooks.js +118 -65
  898. package/lib/dist/sync/git-hooks.js.map +1 -1
  899. package/lib/dist/sync/index.js +0 -14
  900. package/lib/dist/sync/index.js.map +1 -1
  901. package/lib/dist/sync/watch-policy.js +0 -45
  902. package/lib/dist/sync/watch-policy.js.map +1 -1
  903. package/lib/dist/sync/watcher.d.ts +29 -11
  904. package/lib/dist/sync/watcher.d.ts.map +1 -1
  905. package/lib/dist/sync/watcher.js +83 -487
  906. package/lib/dist/sync/watcher.js.map +1 -1
  907. package/lib/dist/sync/worktree.d.ts +7 -2
  908. package/lib/dist/sync/worktree.d.ts.map +1 -1
  909. package/lib/dist/sync/worktree.js +24 -97
  910. package/lib/dist/sync/worktree.js.map +1 -1
  911. package/lib/dist/telemetry/index.d.ts.map +1 -1
  912. package/lib/dist/telemetry/index.js +15 -135
  913. package/lib/dist/telemetry/index.js.map +1 -1
  914. package/lib/dist/types.d.ts +46 -0
  915. package/lib/dist/types.d.ts.map +1 -1
  916. package/lib/dist/types.js +15 -44
  917. package/lib/dist/types.js.map +1 -1
  918. package/lib/dist/ui/color.js +0 -19
  919. package/lib/dist/ui/color.js.map +1 -1
  920. package/lib/dist/ui/glyphs.js +2 -45
  921. package/lib/dist/ui/glyphs.js.map +1 -1
  922. package/lib/dist/ui/shimmer-progress.js +0 -21
  923. package/lib/dist/ui/shimmer-progress.js.map +1 -1
  924. package/lib/dist/ui/shimmer-worker.js +0 -22
  925. package/lib/dist/ui/shimmer-worker.js.map +1 -1
  926. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
  927. package/lib/dist/ui-server/api/deadcode.js +2 -31
  928. package/lib/dist/ui-server/api/deadcode.js.map +1 -1
  929. package/lib/dist/ui-server/api/effects.js +0 -111
  930. package/lib/dist/ui-server/api/effects.js.map +1 -1
  931. package/lib/dist/ui-server/api/entrypoints.js +0 -142
  932. package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
  933. package/lib/dist/ui-server/api/events.js +0 -145
  934. package/lib/dist/ui-server/api/events.js.map +1 -1
  935. package/lib/dist/ui-server/api/file.js +0 -80
  936. package/lib/dist/ui-server/api/file.js.map +1 -1
  937. package/lib/dist/ui-server/api/filecode.js +0 -95
  938. package/lib/dist/ui-server/api/filecode.js.map +1 -1
  939. package/lib/dist/ui-server/api/flow.js +0 -149
  940. package/lib/dist/ui-server/api/flow.js.map +1 -1
  941. package/lib/dist/ui-server/api/hierarchy.js +0 -28
  942. package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
  943. package/lib/dist/ui-server/api/index.js +0 -88
  944. package/lib/dist/ui-server/api/index.js.map +1 -1
  945. package/lib/dist/ui-server/api/map.d.ts.map +1 -1
  946. package/lib/dist/ui-server/api/map.js +4 -317
  947. package/lib/dist/ui-server/api/map.js.map +1 -1
  948. package/lib/dist/ui-server/api/node.js +0 -111
  949. package/lib/dist/ui-server/api/node.js.map +1 -1
  950. package/lib/dist/ui-server/api/nodes.js +0 -16
  951. package/lib/dist/ui-server/api/nodes.js.map +1 -1
  952. package/lib/dist/ui-server/api/program.js +0 -90
  953. package/lib/dist/ui-server/api/program.js.map +1 -1
  954. package/lib/dist/ui-server/api/respond.js +0 -60
  955. package/lib/dist/ui-server/api/respond.js.map +1 -1
  956. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
  957. package/lib/dist/ui-server/api/route-roots.js +2 -44
  958. package/lib/dist/ui-server/api/route-roots.js.map +1 -1
  959. package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
  960. package/lib/dist/ui-server/api/routes.js +4 -60
  961. package/lib/dist/ui-server/api/routes.js.map +1 -1
  962. package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
  963. package/lib/dist/ui-server/api/screens.js +4 -174
  964. package/lib/dist/ui-server/api/screens.js.map +1 -1
  965. package/lib/dist/ui-server/api/search.js +0 -62
  966. package/lib/dist/ui-server/api/search.js.map +1 -1
  967. package/lib/dist/ui-server/api/session.js +0 -58
  968. package/lib/dist/ui-server/api/session.js.map +1 -1
  969. package/lib/dist/ui-server/api/source.d.ts.map +1 -1
  970. package/lib/dist/ui-server/api/source.js +0 -161
  971. package/lib/dist/ui-server/api/source.js.map +1 -1
  972. package/lib/dist/ui-server/api/stats.js +0 -58
  973. package/lib/dist/ui-server/api/stats.js.map +1 -1
  974. package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
  975. package/lib/dist/ui-server/api/steps.js +5 -381
  976. package/lib/dist/ui-server/api/steps.js.map +1 -1
  977. package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
  978. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
  979. package/lib/dist/ui-server/api/trail-store.js +24 -106
  980. package/lib/dist/ui-server/api/trail-store.js.map +1 -1
  981. package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
  982. package/lib/dist/ui-server/api/trails.js +19 -94
  983. package/lib/dist/ui-server/api/trails.js.map +1 -1
  984. package/lib/dist/ui-server/api/when.js +0 -36
  985. package/lib/dist/ui-server/api/when.js.map +1 -1
  986. package/lib/dist/ui-server/api/wire.js +0 -58
  987. package/lib/dist/ui-server/api/wire.js.map +1 -1
  988. package/lib/dist/ui-server/assets.js +0 -35
  989. package/lib/dist/ui-server/assets.js.map +1 -1
  990. package/lib/dist/ui-server/constants.js +0 -26
  991. package/lib/dist/ui-server/constants.js.map +1 -1
  992. package/lib/dist/ui-server/highlight/bounded-tokenize.js +0 -25
  993. package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -1
  994. package/lib/dist/ui-server/highlight/index.js +1 -132
  995. package/lib/dist/ui-server/highlight/index.js.map +1 -1
  996. package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
  997. package/lib/dist/ui-server/highlight/languages.js +0 -31
  998. package/lib/dist/ui-server/highlight/languages.js.map +1 -1
  999. package/lib/dist/ui-server/highlight/tokenize-worker.js +0 -5
  1000. package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -1
  1001. package/lib/dist/ui-server/index.d.ts +25 -0
  1002. package/lib/dist/ui-server/index.d.ts.map +1 -1
  1003. package/lib/dist/ui-server/index.js +35 -103
  1004. package/lib/dist/ui-server/index.js.map +1 -1
  1005. package/lib/dist/ui-server/open-browser.js +0 -34
  1006. package/lib/dist/ui-server/open-browser.js.map +1 -1
  1007. package/lib/dist/ui-server/security.d.ts +5 -0
  1008. package/lib/dist/ui-server/security.d.ts.map +1 -1
  1009. package/lib/dist/ui-server/security.js +11 -147
  1010. package/lib/dist/ui-server/security.js.map +1 -1
  1011. package/lib/dist/ui-server/static.js +0 -41
  1012. package/lib/dist/ui-server/static.js.map +1 -1
  1013. package/lib/dist/upgrade/index.d.ts +18 -5
  1014. package/lib/dist/upgrade/index.d.ts.map +1 -1
  1015. package/lib/dist/upgrade/index.js +73 -229
  1016. package/lib/dist/upgrade/index.js.map +1 -1
  1017. package/lib/dist/upgrade/remove-binary.js +2 -67
  1018. package/lib/dist/upgrade/remove-binary.js.map +1 -1
  1019. package/lib/dist/upgrade/update-check.js +1 -81
  1020. package/lib/dist/upgrade/update-check.js.map +1 -1
  1021. package/lib/dist/utils.d.ts +69 -1
  1022. package/lib/dist/utils.d.ts.map +1 -1
  1023. package/lib/dist/utils.js +224 -266
  1024. package/lib/dist/utils.js.map +1 -1
  1025. package/lib/dist/worker-teardown.js +0 -47
  1026. package/lib/dist/worker-teardown.js.map +1 -1
  1027. package/lib/kernel/codegraph-kernel.node +2 -2
  1028. package/lib/node_modules/.package-lock.json +4 -4
  1029. package/lib/node_modules/ignore/README.md +138 -8
  1030. package/lib/node_modules/ignore/index.d.ts +56 -20
  1031. package/lib/node_modules/ignore/index.js +1033 -221
  1032. package/lib/node_modules/ignore/legacy.js +871 -178
  1033. package/lib/node_modules/ignore/package.json +10 -4
  1034. package/lib/package.json +14 -8
  1035. package/node.exe +2 -2
  1036. package/package.json +1 -1
@@ -1,38 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * File Watcher
4
- *
5
- * Watches the project directory for file changes and triggers debounced sync
6
- * operations to keep the code graph up-to-date.
7
- *
8
- * Uses Node's built-in `fs.watch` directly (no third-party watcher, no native
9
- * addon) with a per-platform strategy chosen to keep the open-descriptor /
10
- * kernel-watch cost BOUNDED rather than growing with the number of files:
11
- *
12
- * - macOS / Windows: a recursive `fs.watch(root, {recursive:true})`, plus
13
- * bounded supplemental streams for directory symlinks (#770).
14
- * libuv maps this to one FSEvents stream (macOS) / one
15
- * ReadDirectoryChangesW handle (Windows), so it costs O(1) descriptors no
16
- * matter how large the tree. This is the fix for the macOS file-table
17
- * exhaustion (#644 / #496 / #555 / #628): the previous watcher held one
18
- * open fd PER WATCHED FILE on macOS (tens of thousands of REG fds), which
19
- * exhausted `kern.maxfiles` and crashed unrelated processes system-wide.
20
- *
21
- * - Linux: recursive `fs.watch` is unsupported, so we watch each (non-ignored)
22
- * DIRECTORY with one inotify watch — O(directories), NOT O(files). New
23
- * directories are picked up dynamically and an overall watch cap bounds
24
- * inotify usage on pathological monorepos (#579). A single inotify watch on
25
- * a directory already reports create/modify/delete for its children, so
26
- * per-file watches are never needed.
27
- *
28
- * Excluded trees (node_modules/, dist/, .git/, …) are filtered via the
29
- * indexer's `buildScopeIgnore` (built-in defaults + root `.gitignore` +
30
- * `.git/info/exclude` + `core.excludesFile` + git ignored-untracked dirs) —
31
- * on Linux they're never descended into (so they cost no watch), and on
32
- * macOS/Windows the single recursive stream still covers them but their
33
- * events are dropped before any sync is scheduled. Either way the watcher's
34
- * scope matches `git ls-files --exclude-standard` (#276 / #407 / #1728).
35
- */
36
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
37
3
  if (k2 === undefined) k2 = k;
38
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -75,62 +41,27 @@ const path = __importStar(require("path"));
75
41
  const extraction_1 = require("../extraction");
76
42
  const project_config_1 = require("../project-config");
77
43
  const errors_1 = require("../errors");
44
+ Object.defineProperty(exports, "LockUnavailableError", { enumerable: true, get: function () { return errors_1.LockUnavailableError; } });
78
45
  const utils_1 = require("../utils");
79
46
  const directory_1 = require("../directory");
80
47
  const watch_policy_1 = require("./watch-policy");
81
- /**
82
- * Number of consecutive lock-contention retries the watcher tolerates before
83
- * it gives up and degrades auto-sync. Brief contention (another writer for a
84
- * few cycles) stays under this; a long-lived external writer crosses it.
85
- */
86
48
  const MAX_LOCK_RETRIES = 5;
87
- /** A failed re-arm must not turn frequent MCP calls into a lock-polling loop. */
88
49
  const LOCK_REARM_COOLDOWN_MS = 30_000;
89
- /**
90
- * Number of consecutive GENERIC (non-lock) sync failures the watcher tolerates
91
- * before it degrades auto-sync. A deterministic failure — a tree-sitter
92
- * extractor that crashes on one file, DB corruption, `SQLITE_FULL`, an OOM in
93
- * batched resolution — recurs every debounce cycle, so left unbounded it would
94
- * retry forever (log + work spam) while the auto-update guarantee is silently
95
- * dead (#1127). A single clean sync resets the streak, so a transient hiccup
96
- * that recovers within the budget never degrades.
97
- */
98
50
  const MAX_SYNC_FAILURE_RETRIES = 5;
99
- /** Cap on the exponential retry backoff (either mode) so it never sleeps absurdly long. */
100
51
  const MAX_RETRY_BACKOFF_MS = 30_000;
101
- /**
102
- * Adaptive debounce: a pending set this small fires after the quick quiet
103
- * window instead of the full debounce — a lone save (or editor + test file
104
- * pair) syncs near-instantly, while larger bursts keep the full window and
105
- * coalesce exactly as before.
106
- */
107
52
  const QUICK_SYNC_MAX_PENDING = 2;
108
53
  const QUICK_SYNC_QUIET_MS = 300;
109
- /**
110
- * Scoped-sync ceiling: above this many pending files a full scan-diff is
111
- * simpler and comparably fast (a branch checkout emits thousands of events),
112
- * and it self-heals anything event coalescing dropped along the way.
113
- */
114
54
  const SCOPED_SYNC_MAX_PENDING = 500;
115
- /** Actionable degrade message; both exhaustion paths share it verbatim. */
116
55
  const EXHAUSTION_REASON = 'OS watch/file limit exhausted; auto-sync disabled. Run `codegraph sync` ' +
117
56
  '(or install git sync hooks) to refresh the graph after changes.';
118
- /**
119
- * Actionable, NON-fatal warning for Linux inotify watch-count exhaustion.
120
- * Unlike {@link EXHAUSTION_REASON} this does not disable the watcher — the
121
- * watches already installed keep working — so it names the exact kernel knob to
122
- * raise instead.
123
- */
57
+ const ROOT_GONE_REASON = 'The project folder was deleted or moved away while watched; auto-sync disabled. ' +
58
+ 'Run `codegraph sync` once it is back to refresh the graph.';
59
+ const GONE_CHECK_DELAY_MS = 200;
124
60
  const INOTIFY_LIMIT_REASON = 'Linux inotify watch limit reached (fs.inotify.max_user_watches); live ' +
125
61
  'watching now covers only part of the project, so edits in unwatched ' +
126
62
  'directories will not auto-sync. Raise the limit (e.g. `sudo sysctl ' +
127
63
  'fs.inotify.max_user_watches=1048576`, persisted in /etc/sysctl.d) and ' +
128
64
  'restart, or run `codegraph sync` (or install git sync hooks) to refresh.';
129
- /**
130
- * True when an error is OS watch/file-descriptor exhaustion (EMFILE/ENFILE).
131
- * Prefers the structured `err.code`; falls back to message matching ONLY when
132
- * no code is present (some platforms surface a bare Error from `fs.watch`).
133
- */
134
65
  function isWatchResourceExhaustion(err) {
135
66
  const e = err;
136
67
  if (e?.code === 'EMFILE' || e?.code === 'ENFILE')
@@ -140,37 +71,32 @@ function isWatchResourceExhaustion(err) {
140
71
  }
141
72
  return false;
142
73
  }
143
- /**
144
- * True when an error is Linux inotify *watch-count* exhaustion. `fs.watch`
145
- * surfaces a hit `fs.inotify.max_user_watches` as ENOSPC ("no space" = no watch
146
- * descriptors left, NOT disk space). This only arises on the Linux
147
- * per-directory path; it is non-fatal (raise the limit and partial watching
148
- * keeps working), so it warns rather than degrading.
149
- */
150
74
  function isInotifyWatchExhaustion(err) {
151
75
  return err?.code === 'ENOSPC';
152
76
  }
153
- /**
154
- * Native recursive `fs.watch` is only reliable on macOS and Windows; on Linux
155
- * (and AIX) it throws `ERR_FEATURE_UNAVAILABLE_ON_PLATFORM`. We branch on this
156
- * to pick the recursive vs per-directory strategy.
157
- */
158
77
  function supportsRecursiveWatch() {
159
78
  return process.platform === 'darwin' || process.platform === 'win32';
160
79
  }
80
+ function isDirectory(p) {
81
+ try {
82
+ return fs.statSync(p).isDirectory();
83
+ }
84
+ catch {
85
+ return false;
86
+ }
87
+ }
88
+ function realpathOrNull(p) {
89
+ try {
90
+ return fs.realpathSync(p);
91
+ }
92
+ catch {
93
+ return null;
94
+ }
95
+ }
161
96
  let watchImpl = fs.watch;
162
- /** @internal Test-only seam to inject a fake fs.watch implementation. */
163
97
  function __setFsWatchForTests(fn) {
164
98
  watchImpl = fn ?? fs.watch;
165
99
  }
166
- /**
167
- * Upper bound on simultaneously-watched directories on the Linux per-directory
168
- * path. Each is one inotify watch; the kernel's `fs.inotify.max_user_watches`
169
- * is the hard limit (commonly 8k–128k). We stop adding watches past this and
170
- * log once — partial live-watch (with `codegraph sync` as the backstop) is far
171
- * better than exhausting the user's inotify budget and breaking watching
172
- * system-wide (#579). Tunable via CODEGRAPH_MAX_DIR_WATCHES.
173
- */
174
100
  const DEFAULT_MAX_DIR_WATCHES = 50_000;
175
101
  function maxDirWatches() {
176
102
  const raw = process.env.CODEGRAPH_MAX_DIR_WATCHES;
@@ -181,133 +107,33 @@ function maxDirWatches() {
181
107
  }
182
108
  return DEFAULT_MAX_DIR_WATCHES;
183
109
  }
184
- /**
185
- * Test seam (see {@link __emitWatchEventForTests}). Maps a watcher's project
186
- * root to its live instance so tests can synthesize a change event
187
- * deterministically — real fs.watch delivery latency races under parallel
188
- * vitest (the reason the previous chokidar mock existed). Only populated under
189
- * a test runner, so production carries no bookkeeping or retained references.
190
- */
191
110
  const liveWatchersForTests = new Map();
192
111
  const IS_TEST_RUNTIME = !!(process.env.VITEST || process.env.NODE_ENV === 'test');
193
- /**
194
- * Thrown by a `syncFn` to signal that the underlying sync couldn't acquire
195
- * the cross-process write lock (#449). The watcher treats this as "no
196
- * progress" — preserves `pendingFiles`, skips `onSyncComplete`, and the
197
- * `finally` block reschedules. Quiet (debug-only) because a long-running
198
- * external indexer can hit this every debounce cycle.
199
- */
200
- class LockUnavailableError extends Error {
201
- constructor(message = 'CodeGraph file lock unavailable; another process is writing') {
202
- super(message);
203
- this.name = 'LockUnavailableError';
204
- }
205
- }
206
- exports.LockUnavailableError = LockUnavailableError;
207
- /**
208
- * FileWatcher monitors a project directory for changes and triggers
209
- * debounced sync operations via a provided callback.
210
- *
211
- * Design goals:
212
- * - Bounded resource usage: one recursive stream plus capped symlink streams
213
- * on macOS/Windows, O(directories) inotify watches on Linux — never O(files), which
214
- * was the system-crashing fd leak on macOS (#644/#496/#555/#628).
215
- * - Debounced to avoid thrashing on rapid saves
216
- * - Filters to supported source files by extension
217
- * - Ignores .codegraph/ and .git/ regardless of .gitignore
218
- * - Tracks per-file pending state so MCP tools can flag stale results
219
- * without blocking on a sync (issue #403)
220
- */
221
112
  class FileWatcher {
222
- /** macOS/Windows: the single recursive watcher. Null on Linux. */
223
113
  recursiveWatcher = null;
224
- /** Linux directory watches / macOS and Windows supplemental symlink streams. */
225
114
  dirWatchers = new Map();
226
- /** Set once the per-directory watch cap is hit, so we log only once. */
227
115
  dirCapWarned = false;
228
- /**
229
- * Set once the Linux inotify watch limit (ENOSPC) is hit. Double duty: we
230
- * warn only once, AND we stop attempting new directory watches for the rest
231
- * of the session — once the kernel budget is exhausted every further
232
- * `inotify_add_watch` fails too, so trying the rest of the tree is pure
233
- * waste. NON-fatal (does not degrade): installed watches keep working.
234
- */
235
116
  inotifyLimitWarned = false;
236
- /**
237
- * The reason live watching was disabled at runtime
238
- * (watch-resource exhaustion, lock contention past the retry budget, or a
239
- * persistent generic sync failure past the retry budget), or null while
240
- * healthy. Set by {@link degrade}; a lock-contention recovery keeps it until
241
- * a full reconciliation succeeds.
242
- */
243
117
  degradedReason = null;
244
118
  degradedByLock = false;
245
119
  recoveringFromLock = false;
246
120
  lastLockRearmMs = 0;
247
- /** Consecutive lock-contention retries for watcher-triggered syncs. */
248
121
  lockRetryCount = 0;
249
- /** Consecutive generic (non-lock) sync failures; reset only by a clean sync. */
250
122
  syncFailureRetryCount = 0;
251
- /** Test-only inert mode: started, but with no OS watcher installed. */
252
123
  inert = false;
253
- /**
254
- * Resolved realpath of directories already watched (or skipped). Prevents
255
- * infinite recursion via symlink cycles — mirrors the same guard used in
256
- * the indexer's `walk()` (extraction/index.ts).
257
- */
258
124
  visitedRealDirs = new Set();
259
125
  knownDirs = new Map();
260
126
  watchedRealDirs = new Map();
261
127
  treeRefreshTimer = null;
262
128
  debounceTimer = null;
263
- /**
264
- * True when the pending set does NOT exactly describe the change (a
265
- * directory removal's children are unknown from the event, #1285) — the
266
- * next sync must be a full scan-diff. Cleared only after a successful FULL
267
- * sync reconciles the tree.
268
- */
129
+ goneChecks = new Map();
269
130
  needsFullScan = false;
270
- /**
271
- * Files seen by the watcher since the last successful sync — populated on
272
- * every change event, cleared at the start of a sync, and re-populated by
273
- * events that arrive mid-sync (or restored on sync failure). Keyed by the
274
- * same project-relative POSIX path the rest of the codebase uses, so a
275
- * caller can intersect tool-response file paths against this map cheaply.
276
- */
277
131
  pendingFiles = new Map();
278
- /**
279
- * Wall-clock ms at which the in-flight sync began. Combined with
280
- * {@link pendingFiles}'s `lastSeenMs`, this distinguishes "still in the
281
- * debounce window" (lastSeen > syncStarted, sync hasn't started yet for
282
- * this edit) from "currently being indexed" (lastSeen <= syncStarted).
283
- */
284
132
  syncStartedMs = 0;
285
133
  syncing = false;
286
134
  stopped = false;
287
- /**
288
- * True once the initial watch set is established. Unlike the previous
289
- * chokidar implementation there is no asynchronous initial "crawl" emitting
290
- * an `add` per existing file — `fs.watch` only reports changes from the
291
- * moment it's installed — so this flips to true synchronously at the end of
292
- * `start()`. The startup reconcile against on-disk state is handled
293
- * separately by the engine's catch-up sync, not by the watcher.
294
- */
295
135
  ready = false;
296
- /**
297
- * Callbacks that resolve when the watch set is established. Used by tests
298
- * (and any production caller that cares about a clean baseline) to
299
- * deterministically gate on watcher readiness.
300
- */
301
136
  readyWaiters = [];
302
- // The shared scope matcher from `buildScopeIgnore` (built-in defaults +
303
- // root `.gitignore` + `.git/info/exclude` + `core.excludesFile` + dirs
304
- // `git ls-files --exclude-standard` reports ignored + `codegraph.json`
305
- // exclude/include, with embedded child repos matched by their OWN rules —
306
- // #514), built at start() and REBUILT whenever one of the files it is
307
- // derived from changes (see `refreshScope`, #1590). Same construction the
308
- // indexer uses for scoped sync, so watcher scope cannot diverge from index
309
- // scope (#1728). An embedded repo created after start() joins the scope on
310
- // the next scope refresh / watcher restart / re-index.
311
137
  ignoreMatcher = null;
312
138
  projectRoot;
313
139
  debounceMs;
@@ -316,12 +142,6 @@ class FileWatcher {
316
142
  onSyncError;
317
143
  onDegraded;
318
144
  inertForTests;
319
- /**
320
- * Optional metadata guard supplied by the CodeGraph facade. Windows'
321
- * ReadDirectoryChangesW stream includes last-access updates, so a read can
322
- * otherwise look exactly like an edit. Returning true means the file's
323
- * current size/mtime still match the indexed record and the event is noise.
324
- */
325
145
  isFileStateCurrent;
326
146
  constructor(projectRoot, syncFn, options = {}, isFileStateCurrent) {
327
147
  this.projectRoot = projectRoot;
@@ -333,13 +153,9 @@ class FileWatcher {
333
153
  this.inertForTests = options.inertForTests ?? false;
334
154
  this.isFileStateCurrent = isFileStateCurrent;
335
155
  }
336
- /**
337
- * Start watching for file changes.
338
- * Returns true if watching started successfully, false otherwise.
339
- */
340
156
  start() {
341
157
  if (this.recursiveWatcher || this.dirWatchers.size > 0 || this.inert)
342
- return true; // Already watching
158
+ return true;
343
159
  this.stopped = false;
344
160
  this.degradedReason = null;
345
161
  this.degradedByLock = false;
@@ -347,20 +163,14 @@ class FileWatcher {
347
163
  this.lockRetryCount = 0;
348
164
  this.syncFailureRetryCount = 0;
349
165
  this.needsFullScan = false;
350
- // Some environments make filesystem watching unusable — most notably
351
- // WSL2 /mnt/ drives, where the underlying fs.watch calls block long
352
- // enough to break MCP startup handshakes (issue #199). Skip watching
353
- // there; callers fall back to manual `codegraph sync` or git sync hooks.
354
166
  const disabledReason = (0, watch_policy_1.watchDisabledReason)(this.projectRoot);
355
167
  if (disabledReason) {
356
168
  (0, errors_1.logDebug)('File watcher disabled', { reason: disabledReason, projectRoot: this.projectRoot });
357
169
  return false;
358
170
  }
359
- // Reuse the indexer's ignore set so the watcher and indexer agree on scope.
360
171
  this.ignoreMatcher = (0, extraction_1.buildScopeIgnore)(this.projectRoot);
361
172
  try {
362
173
  if (this.inertForTests) {
363
- // Test-only: install no OS watcher; the seam drives events instead.
364
174
  this.inert = true;
365
175
  }
366
176
  else if (supportsRecursiveWatch()) {
@@ -369,15 +179,8 @@ class FileWatcher {
369
179
  else {
370
180
  this.refreshWatchTree();
371
181
  }
372
- // The per-directory (Linux) path catches watch-resource exhaustion inside
373
- // watchDirectory and degrades synchronously rather than throwing, so it never
374
- // reaches the catch below. Surface that as a failed start here so both
375
- // strategies report exhaustion identically (start() === false).
376
182
  if (this.degradedReason)
377
183
  return false;
378
- // No async crawl to wait on: as soon as the watch set is installed we
379
- // have a clean baseline (pendingFiles is only populated by post-start
380
- // events). Clear defensively and flip ready.
381
184
  this.pendingFiles.clear();
382
185
  this.ready = true;
383
186
  for (const cb of this.readyWaiters)
@@ -394,10 +197,6 @@ class FileWatcher {
394
197
  return true;
395
198
  }
396
199
  catch (err) {
397
- // Watcher setup failed. Watch-resource exhaustion (EMFILE/ENFILE on the
398
- // recursive path) is terminal — degrade cleanly with one actionable
399
- // warning instead of leaving a half-broken watcher. Everything else
400
- // (permission denied, missing directory) keeps the prior quiet-stop.
401
200
  if (isWatchResourceExhaustion(err)) {
402
201
  this.degrade(EXHAUSTION_REASON, { error: String(err) });
403
202
  }
@@ -408,11 +207,6 @@ class FileWatcher {
408
207
  return false;
409
208
  }
410
209
  }
411
- /**
412
- * macOS/Windows: one root stream, supplemented for directory symlinks.
413
- * `filename` arrives relative to the project root (with subdirectories), so
414
- * it maps straight to a project-relative path.
415
- */
416
210
  startRecursive() {
417
211
  this.recursiveWatcher = watchImpl(this.projectRoot, { recursive: true, persistent: true }, (_event, filename) => this.handleDirEvent(this.projectRoot, filename));
418
212
  this.recursiveWatcher.on('error', (err) => {
@@ -424,7 +218,6 @@ class FileWatcher {
424
218
  });
425
219
  this.refreshWatchTree();
426
220
  }
427
- /** Reconcile logical directory paths with real targets, including retargeted links. */
428
221
  refreshWatchTree() {
429
222
  if (this.stopped || this.inert)
430
223
  return;
@@ -450,17 +243,15 @@ class FileWatcher {
450
243
  walk(child, false);
451
244
  }
452
245
  else if (entry.isSymbolicLink()) {
453
- // Follow directory symlinks just like the indexer's walk. Realpath
454
- // deduplication includes ordinary directories and the root itself.
455
246
  try {
456
247
  if (fs.statSync(child).isDirectory())
457
248
  walk(child, true);
458
249
  }
459
- catch { /* broken link */ }
250
+ catch { }
460
251
  }
461
252
  }
462
253
  }
463
- catch { /* removed or unreadable directory */ }
254
+ catch { }
464
255
  };
465
256
  walk(this.projectRoot, false);
466
257
  this.knownDirs = directories;
@@ -471,7 +262,6 @@ class FileWatcher {
471
262
  for (const [dir, real] of desired)
472
263
  this.watchDirectory(dir, real, recursive);
473
264
  }
474
- /** Coalesce directory topology events before walking; file edits never walk the tree. */
475
265
  scheduleTreeRefresh() {
476
266
  if (this.treeRefreshTimer || this.inert || this.stopped)
477
267
  return;
@@ -480,8 +270,6 @@ class FileWatcher {
480
270
  this.refreshWatchTree();
481
271
  if (this.stopped)
482
272
  return;
483
- // A new/retargeted directory can already contain files before its watch
484
- // is installed; a full reconcile closes that race and removes old paths.
485
273
  this.needsFullScan = true;
486
274
  this.scheduleSync();
487
275
  }, 50);
@@ -491,8 +279,6 @@ class FileWatcher {
491
279
  return;
492
280
  if (this.dirWatchers.has(dir))
493
281
  return;
494
- // Recursive streams cost more than inotify entries. Keep a separate hard
495
- // ceiling while honouring a lower user-configured directory watch budget.
496
282
  const cap = recursive ? Math.min(256, maxDirWatches()) : maxDirWatches();
497
283
  if (this.dirWatchers.size >= cap) {
498
284
  if (!this.dirCapWarned) {
@@ -506,18 +292,12 @@ class FileWatcher {
506
292
  w = watchImpl(dir, { persistent: true, recursive }, (_event, filename) => this.handleDirEvent(dir, filename));
507
293
  }
508
294
  catch (err) {
509
- // EMFILE/ENFILE means the PROCESS is out of descriptors — every further
510
- // directory would fail too, so degrade the whole watcher rather than
511
- // limping along with a partial watch set.
512
295
  if (isWatchResourceExhaustion(err)) {
513
296
  this.degrade(EXHAUSTION_REASON, { error: String(err), dir });
514
297
  }
515
298
  else if (isInotifyWatchExhaustion(err)) {
516
- // ENOSPC = inotify watch budget exhausted. NON-fatal: keep the watches
517
- // we have and tell the user the knob to raise (warn once).
518
299
  this.warnInotifyLimit({ error: String(err), dir });
519
300
  }
520
- // ENOENT / EACCES on a single directory stays non-fatal: skip it quietly.
521
301
  return;
522
302
  }
523
303
  w.on('error', (err) => {
@@ -533,7 +313,6 @@ class FileWatcher {
533
313
  this.dirWatchers.set(dir, w);
534
314
  this.watchedRealDirs.set(dir, real);
535
315
  }
536
- /** Events are relative to a watch's logical path, even for an external target. */
537
316
  handleDirEvent(dir, filename) {
538
317
  if (this.stopped)
539
318
  return;
@@ -541,75 +320,53 @@ class FileWatcher {
541
320
  this.scheduleTreeRefresh();
542
321
  return;
543
322
  }
544
- const full = path.join(dir, String(filename));
323
+ const name = String(filename);
324
+ if (path.isAbsolute(name)) {
325
+ this.armGoneCheck(dir);
326
+ return;
327
+ }
328
+ const full = path.join(dir, name);
545
329
  const rel = (0, utils_1.normalizePath)(path.relative(this.projectRoot, full));
546
330
  if (!rel || rel === '.') {
547
331
  this.scheduleTreeRefresh();
548
332
  return;
549
333
  }
550
- // Churn under an ignored directory (node_modules, dist, .git) is dropped
551
- // before any per-event fs call; `.git/info/exclude` still reaches the scope
552
- // refresh in handleChange (#1728).
553
334
  if (rel !== '.git/info/exclude' && this.shouldIgnoreDir(path.dirname(full)))
554
335
  return;
555
336
  try {
556
337
  if (fs.statSync(full).isDirectory()) {
557
338
  if (this.shouldIgnoreDir(full))
558
339
  return;
559
- // Existing directory notifications can represent a retargeted link.
560
340
  if (this.knownDirs.get(full) !== fs.realpathSync(full))
561
341
  this.scheduleTreeRefresh();
562
342
  return;
563
343
  }
564
344
  }
565
- catch { /* deleted/inaccessible */ }
345
+ catch { }
566
346
  if (this.knownDirs.has(full) && !this.shouldIgnoreDir(full))
567
347
  this.scheduleTreeRefresh();
568
348
  this.handleChange(rel);
569
349
  }
570
- /**
571
- * Shared change handler for both watch strategies. `rel` is a
572
- * project-relative POSIX path. Applies the ignore + source-file filters and,
573
- * for a real source change, records it as pending (#403) and schedules a
574
- * debounced sync.
575
- *
576
- * The recursive (macOS/Windows) watcher reports events for ignored trees too
577
- * (one stream covers the whole repo), so the ignore check here is load-bearing
578
- * — it drops node_modules/dist/.git churn before any sync is scheduled.
579
- */
580
350
  handleChange(rel) {
581
- if (!rel || rel === '.' || rel.startsWith('..'))
351
+ if (!rel || rel === '.' || (0, utils_1.escapesRoot)(rel))
582
352
  return;
583
- // `.git/info/exclude` is otherwise always-ignored with the rest of `.git/`,
584
- // but it feeds `buildScopeIgnore` — allow it through as a scope refresh
585
- // when the platform delivers the event (recursive watchers may; Linux
586
- // per-directory watching does not descend into `.git/`) (#1728).
587
353
  if (rel === '.git/info/exclude') {
588
354
  this.refreshScope(rel);
589
355
  return;
590
356
  }
591
357
  if (this.isAlwaysIgnored(rel))
592
358
  return;
593
- // The two root files the scope matcher is derived from are handled BEFORE
594
- // the matcher is consulted: a user `exclude` pattern that happens to cover
595
- // them (`*.json`, `.*`) must not be able to hide their own edits (#1590).
596
359
  if (rel === project_config_1.PROJECT_CONFIG_FILENAME || rel === '.gitignore') {
597
360
  this.refreshScope(rel);
598
361
  return;
599
362
  }
600
363
  if (this.ignoreMatcher && this.ignoreMatcher.ignores(rel))
601
364
  return;
602
- // A nested `.gitignore` (an embedded child repo's own rules, #514, or a
603
- // subdirectory rule the git-backed full scan honors) is only a scope
604
- // change when it sits INSIDE the current scope — checked after the matcher
605
- // on purpose, so the thousands of package-local `.gitignore`s an
606
- // `npm install` writes under an ignored `node_modules/` never trigger a
607
- // rebuild storm.
608
365
  if (rel.endsWith('/.gitignore')) {
609
366
  this.refreshScope(rel);
610
367
  return;
611
368
  }
612
- if (!(0, extraction_1.isSourceFile)(rel, (0, project_config_1.loadExtensionOverrides)(this.projectRoot))) {
369
+ if (!(0, extraction_1.isSourceFile)(rel, (0, project_config_1.loadExtensionOverrides)(this.projectRoot), this.projectRoot)) {
613
370
  this.maybeScheduleForRemovedDir(rel);
614
371
  return;
615
372
  }
@@ -620,8 +377,6 @@ class FileWatcher {
620
377
  }
621
378
  }
622
379
  catch (error) {
623
- // The guard is an optimization, never a correctness boundary. If the
624
- // stat/DB lookup fails, keep the event so a sync can reconcile it.
625
380
  (0, errors_1.logDebug)('Could not verify file event metadata; treating it as a change', {
626
381
  file: rel,
627
382
  error: String(error),
@@ -638,27 +393,6 @@ class FileWatcher {
638
393
  }
639
394
  this.scheduleSync();
640
395
  }
641
- /**
642
- * A scope-defining file changed (`codegraph.json`, a `.gitignore`): rebuild
643
- * the ignore matcher and make the next sync a FULL reconcile (#1590).
644
- *
645
- * The matcher used to be built once in `start()` and kept for the watcher's
646
- * lifetime — in a long-lived MCP daemon that meant a `codegraph.json`
647
- * created or edited after startup was invisible to the live watcher, while
648
- * `codegraph sync` (a fresh process) honoured it immediately: the CLI
649
- * removed a newly excluded file and the watcher re-added it seconds later.
650
- * `loadExtensionOverrides()` on the same filter line was already read live
651
- * (mtime-cached), so two fields of the same config file disagreed.
652
- *
653
- * Rebuilding costs one `git ls-files` pass (embedded-repo discovery), which
654
- * is fine per config edit — never per event. Replacing the field is enough
655
- * for both strategies: the recursive handler and the per-directory
656
- * `shouldIgnoreDir` walk read `this.ignoreMatcher` on every call. The full
657
- * scan is required because a scope change has no per-file events: newly
658
- * excluded files must be REMOVED from the index and newly included ones
659
- * added, and only the scan-diff (which builds its own fresh matcher) knows
660
- * which those are.
661
- */
662
396
  refreshScope(rel) {
663
397
  (0, errors_1.logDebug)('Scope config changed; rebuilding watcher scope', { file: rel });
664
398
  this.ignoreMatcher = (0, extraction_1.buildScopeIgnore)(this.projectRoot);
@@ -666,29 +400,12 @@ class FileWatcher {
666
400
  this.needsFullScan = true;
667
401
  this.scheduleSync();
668
402
  }
669
- /**
670
- * A deleted DIRECTORY arrives as one event on the directory's own path —
671
- * no source extension, so the source-file filter drops it, and the files
672
- * underneath may never get events of their own (Windows's recursive
673
- * watcher reports only the top-most removed entry; macOS FSEvents can
674
- * coalesce a tree deletion the same way). The index then kept every child
675
- * record until some unrelated edit happened to trigger a sync (#1285).
676
- *
677
- * If a non-source path no longer exists on disk, treat it as a potential
678
- * subtree removal and schedule the debounced sync — its scan-diff removes
679
- * whatever is gone, which is the ground truth for what was underneath.
680
- * pendingFiles is left alone (we can't know the children from the event).
681
- * An event for an EXISTING non-source file stays fully ignored, so build
682
- * churn on live files never schedules work; a deleted non-source file
683
- * costs at most one no-op scan-diff, absorbed by the debounce.
684
- */
685
403
  maybeScheduleForRemovedDir(rel) {
686
404
  try {
687
405
  fs.statSync(path.join(this.projectRoot, rel));
688
- return; // still on disk — an ordinary non-source change, ignore
406
+ return;
689
407
  }
690
408
  catch {
691
- /* gone — fall through */
692
409
  }
693
410
  (0, errors_1.logDebug)('Non-source path removed; scheduling sync for possible directory removal', {
694
411
  path: rel,
@@ -696,49 +413,68 @@ class FileWatcher {
696
413
  this.needsFullScan = true;
697
414
  this.scheduleSync();
698
415
  }
699
- /** Close and forget the watch for a directory that errored/was removed. */
416
+ armGoneCheck(dir) {
417
+ if (this.stopped || this.goneChecks.has(dir))
418
+ return;
419
+ const isRoot = dir === this.projectRoot;
420
+ if (!isRoot && !this.dirWatchers.has(dir))
421
+ return;
422
+ const timer = setTimeout(() => {
423
+ this.goneChecks.delete(dir);
424
+ if (this.stopped)
425
+ return;
426
+ if (isRoot) {
427
+ if (!isDirectory(this.projectRoot))
428
+ this.degrade(ROOT_GONE_REASON, { projectRoot: this.projectRoot });
429
+ return;
430
+ }
431
+ if (realpathOrNull(dir) === this.watchedRealDirs.get(dir))
432
+ return;
433
+ (0, errors_1.logDebug)('Watched link no longer leads to its folder; closing its stream', { dir });
434
+ this.unwatchDir(dir);
435
+ this.scheduleTreeRefresh();
436
+ }, GONE_CHECK_DELAY_MS);
437
+ timer.unref?.();
438
+ this.goneChecks.set(dir, timer);
439
+ }
700
440
  unwatchDir(dir) {
441
+ const check = this.goneChecks.get(dir);
442
+ if (check) {
443
+ clearTimeout(check);
444
+ this.goneChecks.delete(dir);
445
+ }
701
446
  const w = this.dirWatchers.get(dir);
702
447
  if (w) {
703
448
  try {
704
449
  w.close();
705
450
  }
706
451
  catch {
707
- /* already closed */
708
452
  }
709
453
  this.dirWatchers.delete(dir);
710
454
  this.watchedRealDirs.delete(dir);
711
455
  }
712
456
  }
713
- /** Our own dirs are always ignored, regardless of .gitignore. */
714
457
  isAlwaysIgnored(rel) {
715
- // Ignore any CodeGraph data dir — the active one AND a
716
- // sibling like `.codegraph-win` a second environment (Windows/WSL) created
717
- // in the same tree, so neither side watches the other's index (#636).
718
458
  return rel.split('/').some(part => (0, directory_1.isCodeGraphDataDir)(part) || part === '.git');
719
459
  }
720
- /**
721
- * True for any directory that should NOT be watched (used while building the
722
- * Linux per-directory watch tree). Tests the directory form of the path so a
723
- * dir-only ignore rule like `build/` matches.
724
- */
725
460
  shouldIgnoreDir(dirPath) {
726
461
  const rel = (0, utils_1.normalizePath)(path.relative(this.projectRoot, dirPath));
727
- if (!rel || rel === '.' || rel.startsWith('..'))
728
- return false; // root / outside
462
+ if (!rel || rel === '.' || (0, utils_1.escapesRoot)(rel))
463
+ return false;
729
464
  if (this.isAlwaysIgnored(rel))
730
465
  return true;
731
466
  if (!this.ignoreMatcher)
732
467
  return false;
733
468
  return this.ignoreMatcher.ignores(rel + '/');
734
469
  }
735
- /**
736
- * Disable live watching after a terminal runtime failure
737
- * (watch-resource exhaustion, lock contention past the retry budget, or a
738
- * persistent generic sync failure past the retry budget).
739
- * Idempotent: logs one actionable warning, fires {@link WatchOptions.onDegraded}
740
- * once, and stops the watcher. A subsequent start() clears the latch.
741
- */
470
+ callHost(name, call) {
471
+ try {
472
+ call();
473
+ }
474
+ catch (err) {
475
+ (0, errors_1.logWarn)(`File watcher ${name} callback threw`, { error: err instanceof Error ? err.message : String(err) });
476
+ }
477
+ }
742
478
  degrade(reason, context = {}, byLock = false) {
743
479
  if (this.degradedReason && !this.recoveringFromLock)
744
480
  return;
@@ -746,47 +482,24 @@ class FileWatcher {
746
482
  this.degradedByLock = byLock;
747
483
  this.recoveringFromLock = false;
748
484
  (0, errors_1.logWarn)('File watcher disabled', { projectRoot: this.projectRoot, reason, ...context });
749
- this.onDegraded?.(reason);
485
+ this.callHost('onDegraded', () => this.onDegraded?.(reason));
750
486
  this.stop();
751
487
  }
752
- /**
753
- * Warn ONCE that the Linux inotify watch budget is exhausted (ENOSPC), and
754
- * stop adding new watches for the rest of this session — every further
755
- * `inotify_add_watch` would fail too, so walking the rest of the tree is
756
- * waste. Unlike {@link degrade} this is NON-fatal: the watches already
757
- * installed keep firing, and `codegraph sync` covers the unwatched remainder.
758
- * The message names the kernel knob to raise (`fs.inotify.max_user_watches`).
759
- */
760
488
  warnInotifyLimit(context = {}) {
761
489
  if (this.inotifyLimitWarned)
762
490
  return;
763
491
  this.inotifyLimitWarned = true;
764
492
  (0, errors_1.logWarn)(INOTIFY_LIMIT_REASON, { watchedDirs: this.dirWatchers.size, ...context });
765
493
  }
766
- /**
767
- * Whether live watching has degraded or is still catching up after re-arm.
768
- * Distinct from {@link isActive}: a degraded watcher is inactive, but an
769
- * inactive watcher is not necessarily degraded (it may simply be stopped or
770
- * never started). Hosts use this to tell the user auto-sync is off.
771
- */
772
494
  isDegraded() {
773
495
  return this.degradedReason !== null;
774
496
  }
775
- /** The reason live watching degraded, or null if it is healthy. */
776
497
  getDegradedReason() {
777
498
  return this.degradedReason;
778
499
  }
779
- /** Watches are live again, but the full catch-up has not committed yet. */
780
500
  isRecoveringFromLock() {
781
501
  return this.recoveringFromLock;
782
502
  }
783
- /**
784
- * Re-arm a watcher disabled by lock contention when a caller next uses the
785
- * graph. Keep the whole-index stale banner until a FULL scan reconciles edits
786
- * missed while watches were off. Resource exhaustion and deterministic sync
787
- * failures are not automatically retried. Repeated unsuccessful re-arms are
788
- * throttled so many MCP sessions cannot hammer a long-lived writer.
789
- */
790
503
  rearmAfterLockContention() {
791
504
  if (!this.degradedByLock || this.isActive())
792
505
  return false;
@@ -796,9 +509,6 @@ class FileWatcher {
796
509
  const reason = this.degradedReason;
797
510
  this.lastLockRearmMs = now;
798
511
  if (!this.start()) {
799
- // A disabled platform can reject start() without calling degrade().
800
- // Preserve the old stale-index signal in that case; a new resource
801
- // failure has its own more precise degraded reason.
802
512
  if (!this.degradedReason) {
803
513
  this.degradedReason = reason;
804
514
  this.degradedByLock = true;
@@ -811,14 +521,14 @@ class FileWatcher {
811
521
  this.scheduleSync();
812
522
  return true;
813
523
  }
814
- /**
815
- * Stop watching for file changes.
816
- */
817
524
  stop() {
818
525
  this.stopped = true;
819
526
  if (this.treeRefreshTimer)
820
527
  clearTimeout(this.treeRefreshTimer);
821
528
  this.treeRefreshTimer = null;
529
+ for (const check of this.goneChecks.values())
530
+ clearTimeout(check);
531
+ this.goneChecks.clear();
822
532
  this.knownDirs.clear();
823
533
  this.watchedRealDirs.clear();
824
534
  this.recoveringFromLock = false;
@@ -831,7 +541,6 @@ class FileWatcher {
831
541
  this.recursiveWatcher.close();
832
542
  }
833
543
  catch {
834
- /* already closed */
835
544
  }
836
545
  this.recursiveWatcher = null;
837
546
  }
@@ -840,7 +549,6 @@ class FileWatcher {
840
549
  w.close();
841
550
  }
842
551
  catch {
843
- /* already closed */
844
552
  }
845
553
  }
846
554
  this.dirWatchers.clear();
@@ -848,8 +556,6 @@ class FileWatcher {
848
556
  this.inotifyLimitWarned = false;
849
557
  this.lockRetryCount = 0;
850
558
  this.syncFailureRetryCount = 0;
851
- // NB: degradedReason is intentionally NOT reset here — it must survive the
852
- // stop() that degrade() triggers so isDegraded() stays true. start() clears it.
853
559
  this.visitedRealDirs.clear();
854
560
  this.inert = false;
855
561
  this.pendingFiles.clear();
@@ -859,31 +565,12 @@ class FileWatcher {
859
565
  liveWatchersForTests.delete(this.projectRoot);
860
566
  (0, errors_1.logDebug)('File watcher stopped');
861
567
  }
862
- /**
863
- * @internal Test-only: feed a synthetic project-relative change through the
864
- * same filter → pendingFiles → debounced-sync path a real fs.watch event
865
- * takes. Lets the watcher / staleness-banner suites stay deterministic
866
- * instead of racing on OS watch-delivery latency. See
867
- * {@link __emitWatchEventForTests}.
868
- */
869
568
  ingestEventForTests(relPath) {
870
569
  this.handleChange((0, utils_1.normalizePath)(relPath));
871
570
  }
872
- /**
873
- * Whether the watcher is currently active.
874
- */
875
571
  isActive() {
876
572
  return (this.recursiveWatcher !== null || this.dirWatchers.size > 0 || this.inert) && !this.stopped;
877
573
  }
878
- /**
879
- * Resolves once the watch set has been installed (or immediately if it
880
- * already has). Useful for tests that need a deterministic boundary before
881
- * asserting on `pendingFiles`.
882
- *
883
- * Production callers don't need this: `pendingFiles` is read continuously,
884
- * the staleness banner is always correct (empty or populated), and there is
885
- * no asynchronous initial-scan window with `fs.watch`.
886
- */
887
574
  waitUntilReady(timeoutMs = 10000) {
888
575
  if (this.ready)
889
576
  return Promise.resolve();
@@ -898,21 +585,10 @@ class FileWatcher {
898
585
  this.readyWaiters.push(handler);
899
586
  });
900
587
  }
901
- /**
902
- * Schedule a normal debounced sync after a source edit.
903
- */
904
588
  scheduleSync() {
905
589
  if (this.debounceTimer) {
906
590
  clearTimeout(this.debounceTimer);
907
591
  }
908
- // Adaptive quiet window: a lone save (or a pair — editor + its test file)
909
- // fires fast so the graph feels instant; anything bigger keeps the full
910
- // configured window so an agent's multi-file burst still coalesces into
911
- // one sync exactly as before. Re-arming on each event preserves the
912
- // trailing-edge semantics either way: if more events arrive inside the
913
- // quick window, the reschedule sees the larger pending set and extends to
914
- // the full window. Never exceeds the configured debounce (a user-lowered
915
- // CODEGRAPH_WATCH_DEBOUNCE_MS stays authoritative), floor 100ms.
916
592
  const quickMs = Math.max(100, Math.min(QUICK_SYNC_QUIET_MS, this.debounceMs));
917
593
  const delay = this.pendingFiles.size <= QUICK_SYNC_MAX_PENDING ? quickMs : this.debounceMs;
918
594
  this.debounceTimer = setTimeout(() => {
@@ -920,11 +596,6 @@ class FileWatcher {
920
596
  this.flush();
921
597
  }, delay);
922
598
  }
923
- /**
924
- * Schedule a retry after a recoverable sync failure (lock contention). Kept
925
- * separate from {@link scheduleSync} so prolonged contention backs off
926
- * exponentially instead of hammering the lock every debounce cycle.
927
- */
928
599
  scheduleRetrySync(delayMs) {
929
600
  if (this.debounceTimer) {
930
601
  clearTimeout(this.debounceTimer);
@@ -934,34 +605,14 @@ class FileWatcher {
934
605
  this.flush();
935
606
  }, delayMs);
936
607
  }
937
- /**
938
- * Flush pending changes by running sync.
939
- *
940
- * pendingFiles is NOT cleared at the start of sync — entries are removed
941
- * only after sync commits successfully, and only for entries whose
942
- * lastSeenMs <= syncStartedMs. That way, a query that arrives mid-sync
943
- * still sees the affected files marked stale (the DB hasn't been updated
944
- * yet), and an event that lands mid-sync persists into the follow-up.
945
- *
946
- * On sync failure pendingFiles is left untouched — every edit is still
947
- * unindexed, and the rescheduled sync will absorb the same set next time.
948
- */
949
608
  async flush() {
950
- // If already syncing, the post-sync check will re-trigger
951
609
  if (this.syncing || this.stopped)
952
610
  return;
953
611
  this.syncStartedMs = Date.now();
954
612
  this.syncing = true;
955
- // Scoped fast path: when every pending change is a known file event, hand
956
- // the exact paths to sync and skip its O(repo) scan-diff. Anything the
957
- // events can't fully describe — a directory removal, an empty pending set
958
- // (retry paths), or an event storm past the ceiling — runs the full
959
- // scan-diff, which remains the ground truth.
960
613
  const scoped = !this.needsFullScan && this.pendingFiles.size > 0 && this.pendingFiles.size <= SCOPED_SYNC_MAX_PENDING
961
614
  ? [...this.pendingFiles.keys()]
962
615
  : undefined;
963
- // Consume this request before yielding so a topology/scope change during
964
- // the full sync remains pending for the next reconcile.
965
616
  if (!scoped)
966
617
  this.needsFullScan = false;
967
618
  try {
@@ -970,32 +621,20 @@ class FileWatcher {
970
621
  this.degradedReason = null;
971
622
  this.recoveringFromLock = false;
972
623
  }
973
- this.lockRetryCount = 0; // a clean sync clears any contention backoff
974
- this.syncFailureRetryCount = 0; // ...and any generic-failure backoff
975
- // Remove entries whose most recent event predates this sync — those
976
- // edits are now in the DB. Entries with lastSeenMs > syncStartedMs
977
- // arrived mid-sync; whether the in-flight sync captured them depends
978
- // on when sync read that file, so we keep them as pending and let
979
- // the follow-up sync handle them. We prefer false positives ("shown
980
- // stale, actually fresh" → at worst one extra Read) over false
981
- // negatives ("shown fresh, actually stale" → misleads the agent).
624
+ this.lockRetryCount = 0;
625
+ this.syncFailureRetryCount = 0;
982
626
  for (const [filePath, info] of this.pendingFiles) {
983
627
  if (info.lastSeenMs <= this.syncStartedMs) {
984
628
  this.pendingFiles.delete(filePath);
985
629
  }
986
630
  }
987
- this.onSyncComplete?.(result);
631
+ this.callHost('onSyncComplete', () => this.onSyncComplete?.(result));
988
632
  }
989
633
  catch (err) {
990
634
  if (!scoped)
991
635
  this.needsFullScan = true;
992
- if (err instanceof LockUnavailableError) {
636
+ if (err instanceof errors_1.LockUnavailableError) {
993
637
  this.lockRetryCount += 1;
994
- // Lock-failure no-op (another writer holds the lock). pendingFiles
995
- // stays intact and the `finally` block reschedules with backoff. Keep
996
- // brief contention quiet (debug-only — a long external index would
997
- // otherwise spam stderr every cycle), but stop retrying forever: once a
998
- // writer holds the lock past the budget, degrade auto-sync explicitly.
999
638
  (0, errors_1.logDebug)('Watch sync skipped: file lock unavailable', {
1000
639
  pendingFiles: this.pendingFiles.size,
1001
640
  retryCount: this.lockRetryCount,
@@ -1007,43 +646,23 @@ class FileWatcher {
1007
646
  }
1008
647
  }
1009
648
  else {
1010
- this.lockRetryCount = 0; // a non-lock failure isn't contention; reset that streak
649
+ this.lockRetryCount = 0;
1011
650
  this.syncFailureRetryCount += 1;
1012
651
  const error = err instanceof Error ? err : new Error(String(err));
1013
652
  (0, errors_1.logWarn)('Watch sync failed', {
1014
653
  error: error.message,
1015
654
  retryCount: this.syncFailureRetryCount,
1016
655
  });
1017
- this.onSyncError?.(error);
1018
- // A persistent (deterministic) sync failure — a broken extractor on a
1019
- // specific file, DB corruption, SQLITE_FULL, an OOM in resolution —
1020
- // would otherwise retry forever at the debounce cadence, spamming logs
1021
- // and work while the auto-update guarantee is silently dead (#1127).
1022
- // Bound it exactly like lock contention: the `finally` block backs off
1023
- // exponentially, and past the budget we degrade so the dead guarantee
1024
- // is surfaced (onDegraded / isDegraded) instead of hidden. A single
1025
- // clean sync resets the streak, so a transient hiccup never degrades.
656
+ this.callHost('onSyncError', () => this.onSyncError?.(error));
1026
657
  if (this.syncFailureRetryCount > MAX_SYNC_FAILURE_RETRIES) {
1027
658
  this.degrade(`CodeGraph auto-sync failed ${this.syncFailureRetryCount} times in a row; ` +
1028
659
  'auto-sync disabled. Run `codegraph sync` (or install git sync hooks) to ' +
1029
660
  `refresh the graph after changes. Last error: ${error.message}`, { error: error.message, retryCount: this.syncFailureRetryCount });
1030
661
  }
1031
662
  }
1032
- // Failure: leave pendingFiles untouched. Every edit it tracks is
1033
- // still unindexed; the rescheduled sync sees the same set.
1034
663
  }
1035
664
  finally {
1036
665
  this.syncing = false;
1037
- // If pending files remain (mid-sync events, or this sync failed),
1038
- // schedule another pass. After EITHER failure mode — lock contention or a
1039
- // generic sync failure — back off exponentially (debounceMs · 2^(n-1),
1040
- // capped) instead of retrying at the normal debounce cadence; a clean
1041
- // sync resets both counters so normal edits keep the fast debounce. Use
1042
- // the larger streak so interleaved failures still back off. A degrade()
1043
- // above already set `stopped`, so this won't reschedule a watcher that
1044
- // has given up. A directory removal whose full sync failed adds no
1045
- // pending file, only `needsFullScan` — it still owes the full reconcile
1046
- // it asked for (#1964).
1047
666
  if ((this.pendingFiles.size > 0 || this.needsFullScan) && !this.stopped) {
1048
667
  const retryCount = Math.max(this.lockRetryCount, this.syncFailureRetryCount);
1049
668
  if (retryCount > 0) {
@@ -1056,21 +675,6 @@ class FileWatcher {
1056
675
  }
1057
676
  }
1058
677
  }
1059
- /**
1060
- * Snapshot of files seen by the watcher since the last successful sync.
1061
- *
1062
- * Used by MCP tool responses to mark stale results without blocking on a
1063
- * sync: a tool that returns a hit in `src/foo.ts` while `src/foo.ts` is in
1064
- * this list tells the agent "Read this file directly, the index lags."
1065
- *
1066
- * `indexing` is true when a sync is currently in flight whose start time is
1067
- * AFTER this file's most recent event — i.e. that sync will absorb the
1068
- * edit. False means the file is still inside the debounce window and no
1069
- * sync has started yet (a follow-up call a few hundred ms later may show
1070
- * `indexing: true` or the file may have left the list entirely).
1071
- *
1072
- * Cheap: O(pendingFiles.size), no I/O, no locks.
1073
- */
1074
678
  getPendingFiles() {
1075
679
  const result = [];
1076
680
  for (const [filePath, info] of this.pendingFiles) {
@@ -1085,14 +689,6 @@ class FileWatcher {
1085
689
  }
1086
690
  }
1087
691
  exports.FileWatcher = FileWatcher;
1088
- /**
1089
- * Test-only: synthesize a source-file change for the live watcher running at
1090
- * `projectRoot`, exercising the real filter → pendingFiles → debounced-sync
1091
- * logic without depending on fs.watch delivery timing (which races under
1092
- * parallel vitest). `relPath` is project-relative POSIX (e.g. "src/foo.ts").
1093
- * Returns false if no live watcher is registered for that root (e.g. outside a
1094
- * test runtime, where the registry is intentionally not populated).
1095
- */
1096
692
  function __emitWatchEventForTests(projectRoot, relPath) {
1097
693
  const w = liveWatchersForTests.get(projectRoot);
1098
694
  if (!w)