@colbymchenry/codegraph-win32-arm64 1.6.0 → 1.6.2

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 (761) hide show
  1. package/bin/codegraph +5 -0
  2. package/lib/dist/.test-build-engine.json +1 -0
  3. package/lib/dist/.test-build-viewer.json +1 -0
  4. package/lib/dist/bin/codegraph.d.ts +1 -0
  5. package/lib/dist/bin/codegraph.d.ts.map +1 -1
  6. package/lib/dist/bin/codegraph.js +605 -291
  7. package/lib/dist/bin/codegraph.js.map +1 -1
  8. package/lib/dist/bin/command-supervision.d.ts +7 -0
  9. package/lib/dist/bin/command-supervision.d.ts.map +1 -1
  10. package/lib/dist/bin/command-supervision.js +39 -27
  11. package/lib/dist/bin/command-supervision.js.map +1 -1
  12. package/lib/dist/bin/viewer-gate.d.ts +17 -0
  13. package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
  14. package/lib/dist/bin/viewer-gate.js +31 -0
  15. package/lib/dist/bin/viewer-gate.js.map +1 -0
  16. package/lib/dist/context/index.d.ts.map +1 -1
  17. package/lib/dist/context/index.js +43 -2
  18. package/lib/dist/context/index.js.map +1 -1
  19. package/lib/dist/db/index.d.ts +21 -2
  20. package/lib/dist/db/index.d.ts.map +1 -1
  21. package/lib/dist/db/index.js +86 -31
  22. package/lib/dist/db/index.js.map +1 -1
  23. package/lib/dist/db/migrations.d.ts +1 -1
  24. package/lib/dist/db/migrations.d.ts.map +1 -1
  25. package/lib/dist/db/migrations.js +40 -1
  26. package/lib/dist/db/migrations.js.map +1 -1
  27. package/lib/dist/db/queries.d.ts +454 -10
  28. package/lib/dist/db/queries.d.ts.map +1 -1
  29. package/lib/dist/db/queries.js +1080 -41
  30. package/lib/dist/db/queries.js.map +1 -1
  31. package/lib/dist/db/schema.sql +11 -1
  32. package/lib/dist/db/sqlite-adapter.d.ts +2 -0
  33. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  34. package/lib/dist/db/sqlite-adapter.js +56 -7
  35. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  36. package/lib/dist/db/synthesis-stage.d.ts +12 -0
  37. package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
  38. package/lib/dist/db/synthesis-stage.js +89 -0
  39. package/lib/dist/db/synthesis-stage.js.map +1 -0
  40. package/lib/dist/db/wal-valve.d.ts +32 -12
  41. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  42. package/lib/dist/db/wal-valve.js +65 -22
  43. package/lib/dist/db/wal-valve.js.map +1 -1
  44. package/lib/dist/db/wsl-shared-index.d.ts +53 -0
  45. package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
  46. package/lib/dist/db/wsl-shared-index.js +121 -0
  47. package/lib/dist/db/wsl-shared-index.js.map +1 -0
  48. package/lib/dist/directory.d.ts +131 -2
  49. package/lib/dist/directory.d.ts.map +1 -1
  50. package/lib/dist/directory.js +299 -23
  51. package/lib/dist/directory.js.map +1 -1
  52. package/lib/dist/errors.d.ts +14 -0
  53. package/lib/dist/errors.d.ts.map +1 -1
  54. package/lib/dist/errors.js +16 -1
  55. package/lib/dist/errors.js.map +1 -1
  56. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
  57. package/lib/dist/extraction/astro-extractor.js +7 -35
  58. package/lib/dist/extraction/astro-extractor.js.map +1 -1
  59. package/lib/dist/extraction/cfml-extractor.d.ts +77 -10
  60. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  61. package/lib/dist/extraction/cfml-extractor.js +302 -71
  62. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  63. package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
  64. package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
  65. package/lib/dist/extraction/commonjs-requires.js +68 -0
  66. package/lib/dist/extraction/commonjs-requires.js.map +1 -0
  67. package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
  68. package/lib/dist/extraction/dfm-extractor.js +14 -10
  69. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  70. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  71. package/lib/dist/extraction/extraction-version.js +1 -1
  72. package/lib/dist/extraction/function-ref.d.ts +6 -4
  73. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  74. package/lib/dist/extraction/function-ref.js +35 -14
  75. package/lib/dist/extraction/function-ref.js.map +1 -1
  76. package/lib/dist/extraction/generated-detection.d.ts +9 -0
  77. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  78. package/lib/dist/extraction/generated-detection.js +42 -2
  79. package/lib/dist/extraction/generated-detection.js.map +1 -1
  80. package/lib/dist/extraction/grammars.d.ts +40 -0
  81. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  82. package/lib/dist/extraction/grammars.js +171 -1
  83. package/lib/dist/extraction/grammars.js.map +1 -1
  84. package/lib/dist/extraction/index.d.ts +132 -19
  85. package/lib/dist/extraction/index.d.ts.map +1 -1
  86. package/lib/dist/extraction/index.js +825 -195
  87. package/lib/dist/extraction/index.js.map +1 -1
  88. package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
  89. package/lib/dist/extraction/kernel/index.js +6 -0
  90. package/lib/dist/extraction/kernel/index.js.map +1 -1
  91. package/lib/dist/extraction/languages/c-cpp.d.ts +73 -0
  92. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  93. package/lib/dist/extraction/languages/c-cpp.js +412 -16
  94. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  95. package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
  96. package/lib/dist/extraction/languages/csharp.js +14 -5
  97. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  98. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  99. package/lib/dist/extraction/languages/dart.js +16 -3
  100. package/lib/dist/extraction/languages/dart.js.map +1 -1
  101. package/lib/dist/extraction/languages/javascript.js +1 -1
  102. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  103. package/lib/dist/extraction/languages/kotlin.d.ts +4 -0
  104. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  105. package/lib/dist/extraction/languages/kotlin.js +237 -36
  106. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  107. package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
  108. package/lib/dist/extraction/languages/lua.js +4 -1
  109. package/lib/dist/extraction/languages/lua.js.map +1 -1
  110. package/lib/dist/extraction/languages/python.d.ts.map +1 -1
  111. package/lib/dist/extraction/languages/python.js +71 -0
  112. package/lib/dist/extraction/languages/python.js.map +1 -1
  113. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  114. package/lib/dist/extraction/languages/rust.js +3 -0
  115. package/lib/dist/extraction/languages/rust.js.map +1 -1
  116. package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
  117. package/lib/dist/extraction/languages/scala.js +18 -3
  118. package/lib/dist/extraction/languages/scala.js.map +1 -1
  119. package/lib/dist/extraction/languages/swift.d.ts +15 -0
  120. package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
  121. package/lib/dist/extraction/languages/swift.js +50 -0
  122. package/lib/dist/extraction/languages/swift.js.map +1 -1
  123. package/lib/dist/extraction/languages/typescript.d.ts +7 -0
  124. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  125. package/lib/dist/extraction/languages/typescript.js +30 -2
  126. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  127. package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
  128. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  129. package/lib/dist/extraction/liquid-extractor.js +98 -22
  130. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  131. package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
  132. package/lib/dist/extraction/mybatis-extractor.js +6 -4
  133. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  134. package/lib/dist/extraction/parse-budget.d.ts +16 -0
  135. package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
  136. package/lib/dist/extraction/parse-budget.js +24 -0
  137. package/lib/dist/extraction/parse-budget.js.map +1 -0
  138. package/lib/dist/extraction/parse-pool.d.ts +12 -0
  139. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  140. package/lib/dist/extraction/parse-pool.js +51 -3
  141. package/lib/dist/extraction/parse-pool.js.map +1 -1
  142. package/lib/dist/extraction/parse-worker.js +3 -1
  143. package/lib/dist/extraction/parse-worker.js.map +1 -1
  144. package/lib/dist/extraction/sfc-script.d.ts +43 -0
  145. package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
  146. package/lib/dist/extraction/sfc-script.js +135 -0
  147. package/lib/dist/extraction/sfc-script.js.map +1 -0
  148. package/lib/dist/extraction/store-worker.js +5 -0
  149. package/lib/dist/extraction/store-worker.js.map +1 -1
  150. package/lib/dist/extraction/store-writer.d.ts +10 -2
  151. package/lib/dist/extraction/store-writer.d.ts.map +1 -1
  152. package/lib/dist/extraction/store-writer.js +12 -4
  153. package/lib/dist/extraction/store-writer.js.map +1 -1
  154. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
  155. package/lib/dist/extraction/svelte-extractor.js +7 -37
  156. package/lib/dist/extraction/svelte-extractor.js.map +1 -1
  157. package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
  158. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
  159. package/lib/dist/extraction/syntax-tokens.js +382 -0
  160. package/lib/dist/extraction/syntax-tokens.js.map +1 -0
  161. package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
  162. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  163. package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
  164. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  165. package/lib/dist/extraction/tree-sitter-types.d.ts +29 -3
  166. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  167. package/lib/dist/extraction/tree-sitter.d.ts +104 -17
  168. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  169. package/lib/dist/extraction/tree-sitter.js +943 -88
  170. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  171. package/lib/dist/extraction/vue-extractor.d.ts +7 -0
  172. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
  173. package/lib/dist/extraction/vue-extractor.js +73 -35
  174. package/lib/dist/extraction/vue-extractor.js.map +1 -1
  175. package/lib/dist/extraction/vue-options-api.d.ts +28 -0
  176. package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
  177. package/lib/dist/extraction/vue-options-api.js +196 -0
  178. package/lib/dist/extraction/vue-options-api.js.map +1 -0
  179. package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  180. package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  181. package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  182. package/lib/dist/file-limits.d.ts +40 -0
  183. package/lib/dist/file-limits.d.ts.map +1 -0
  184. package/lib/dist/file-limits.js +147 -0
  185. package/lib/dist/file-limits.js.map +1 -0
  186. package/lib/dist/graph/branch-guards.d.ts +265 -0
  187. package/lib/dist/graph/branch-guards.d.ts.map +1 -0
  188. package/lib/dist/graph/branch-guards.js +2326 -0
  189. package/lib/dist/graph/branch-guards.js.map +1 -0
  190. package/lib/dist/graph/dead-code.d.ts +251 -0
  191. package/lib/dist/graph/dead-code.d.ts.map +1 -0
  192. package/lib/dist/graph/dead-code.js +776 -0
  193. package/lib/dist/graph/dead-code.js.map +1 -0
  194. package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
  195. package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
  196. package/lib/dist/graph/dynamic-boundary-report.js +283 -0
  197. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
  198. package/lib/dist/graph/index.d.ts +4 -0
  199. package/lib/dist/graph/index.d.ts.map +1 -1
  200. package/lib/dist/graph/index.js +16 -1
  201. package/lib/dist/graph/index.js.map +1 -1
  202. package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
  203. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
  204. package/lib/dist/graph/named-symbol-flow.js +559 -0
  205. package/lib/dist/graph/named-symbol-flow.js.map +1 -0
  206. package/lib/dist/graph/symbol-lookup.d.ts +83 -0
  207. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
  208. package/lib/dist/graph/symbol-lookup.js +181 -0
  209. package/lib/dist/graph/symbol-lookup.js.map +1 -0
  210. package/lib/dist/graph/traversal.d.ts +9 -0
  211. package/lib/dist/graph/traversal.d.ts.map +1 -1
  212. package/lib/dist/graph/traversal.js +61 -35
  213. package/lib/dist/graph/traversal.js.map +1 -1
  214. package/lib/dist/graph/type-hierarchy.d.ts +155 -0
  215. package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
  216. package/lib/dist/graph/type-hierarchy.js +382 -0
  217. package/lib/dist/graph/type-hierarchy.js.map +1 -0
  218. package/lib/dist/index.d.ts +256 -11
  219. package/lib/dist/index.d.ts.map +1 -1
  220. package/lib/dist/index.js +402 -34
  221. package/lib/dist/index.js.map +1 -1
  222. package/lib/dist/installer/index.d.ts.map +1 -1
  223. package/lib/dist/installer/index.js +3 -2
  224. package/lib/dist/installer/index.js.map +1 -1
  225. package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
  226. package/lib/dist/installer/targets/antigravity.js +14 -2
  227. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  228. package/lib/dist/installer/targets/claude.d.ts +3 -0
  229. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  230. package/lib/dist/installer/targets/claude.js +35 -7
  231. package/lib/dist/installer/targets/claude.js.map +1 -1
  232. package/lib/dist/installer/targets/codex.d.ts +2 -1
  233. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  234. package/lib/dist/installer/targets/codex.js +14 -4
  235. package/lib/dist/installer/targets/codex.js.map +1 -1
  236. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  237. package/lib/dist/installer/targets/copilot-cli.js +7 -1
  238. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  239. package/lib/dist/installer/targets/opencode.d.ts +16 -5
  240. package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
  241. package/lib/dist/installer/targets/opencode.js +73 -22
  242. package/lib/dist/installer/targets/opencode.js.map +1 -1
  243. package/lib/dist/installer/targets/shared.d.ts +14 -3
  244. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  245. package/lib/dist/installer/targets/shared.js +39 -11
  246. package/lib/dist/installer/targets/shared.js.map +1 -1
  247. package/lib/dist/installer/targets/types.d.ts +7 -0
  248. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  249. package/lib/dist/mcp/answer-freshness.d.ts +10 -0
  250. package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
  251. package/lib/dist/mcp/answer-freshness.js +68 -0
  252. package/lib/dist/mcp/answer-freshness.js.map +1 -0
  253. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  254. package/lib/dist/mcp/daemon-manager.js +16 -0
  255. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  256. package/lib/dist/mcp/daemon-paths.d.ts +2 -0
  257. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  258. package/lib/dist/mcp/daemon-paths.js +20 -5
  259. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  260. package/lib/dist/mcp/daemon-registry.d.ts +11 -4
  261. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  262. package/lib/dist/mcp/daemon-registry.js +132 -36
  263. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  264. package/lib/dist/mcp/daemon.d.ts +17 -7
  265. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  266. package/lib/dist/mcp/daemon.js +116 -24
  267. package/lib/dist/mcp/daemon.js.map +1 -1
  268. package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
  269. package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
  270. package/lib/dist/mcp/dynamic-boundaries.js +46 -42
  271. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  272. package/lib/dist/mcp/engine.d.ts +30 -9
  273. package/lib/dist/mcp/engine.d.ts.map +1 -1
  274. package/lib/dist/mcp/engine.js +158 -66
  275. package/lib/dist/mcp/engine.js.map +1 -1
  276. package/lib/dist/mcp/explore-dedup.d.ts +5 -2
  277. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -1
  278. package/lib/dist/mcp/explore-dedup.js +8 -5
  279. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  280. package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
  281. package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
  282. package/lib/dist/mcp/index-freshness-worker.js +36 -0
  283. package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
  284. package/lib/dist/mcp/index-freshness.d.ts +13 -0
  285. package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
  286. package/lib/dist/mcp/index-freshness.js +117 -0
  287. package/lib/dist/mcp/index-freshness.js.map +1 -0
  288. package/lib/dist/mcp/index.d.ts +3 -1
  289. package/lib/dist/mcp/index.d.ts.map +1 -1
  290. package/lib/dist/mcp/index.js +95 -11
  291. package/lib/dist/mcp/index.js.map +1 -1
  292. package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
  293. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  294. package/lib/dist/mcp/liveness-watchdog.js +11 -2
  295. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  296. package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
  297. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
  298. package/lib/dist/mcp/project-lifecycle.js +182 -0
  299. package/lib/dist/mcp/project-lifecycle.js.map +1 -0
  300. package/lib/dist/mcp/proxy.d.ts +9 -2
  301. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  302. package/lib/dist/mcp/proxy.js +201 -32
  303. package/lib/dist/mcp/proxy.js.map +1 -1
  304. package/lib/dist/mcp/query-pool.d.ts +18 -3
  305. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  306. package/lib/dist/mcp/query-pool.js +67 -11
  307. package/lib/dist/mcp/query-pool.js.map +1 -1
  308. package/lib/dist/mcp/query-worker.js +2 -2
  309. package/lib/dist/mcp/query-worker.js.map +1 -1
  310. package/lib/dist/mcp/server-instructions.d.ts +1 -1
  311. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  312. package/lib/dist/mcp/server-instructions.js +6 -3
  313. package/lib/dist/mcp/server-instructions.js.map +1 -1
  314. package/lib/dist/mcp/startup-handshake.d.ts +3 -1
  315. package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
  316. package/lib/dist/mcp/startup-handshake.js +10 -2
  317. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  318. package/lib/dist/mcp/tools.d.ts +306 -36
  319. package/lib/dist/mcp/tools.d.ts.map +1 -1
  320. package/lib/dist/mcp/tools.js +2395 -966
  321. package/lib/dist/mcp/tools.js.map +1 -1
  322. package/lib/dist/mcp/writer-lock.d.ts +61 -0
  323. package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
  324. package/lib/dist/mcp/writer-lock.js +260 -0
  325. package/lib/dist/mcp/writer-lock.js.map +1 -0
  326. package/lib/dist/resolution/alias-binding.d.ts +56 -0
  327. package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
  328. package/lib/dist/resolution/alias-binding.js +143 -0
  329. package/lib/dist/resolution/alias-binding.js.map +1 -0
  330. package/lib/dist/resolution/angular-template-synthesizer.d.ts +49 -0
  331. package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
  332. package/lib/dist/resolution/angular-template-synthesizer.js +359 -0
  333. package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
  334. package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
  335. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  336. package/lib/dist/resolution/callback-synthesizer.js +460 -144
  337. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  338. package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
  339. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
  340. package/lib/dist/resolution/cpp-constructor.js +123 -0
  341. package/lib/dist/resolution/cpp-constructor.js.map +1 -0
  342. package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
  343. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
  344. package/lib/dist/resolution/cpp-macro-visibility.js +392 -0
  345. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
  346. package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
  347. package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
  348. package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
  349. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
  350. package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
  351. package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
  352. package/lib/dist/resolution/frameworks/angular-router.js +1126 -0
  353. package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
  354. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
  355. package/lib/dist/resolution/frameworks/astro.js +32 -6
  356. package/lib/dist/resolution/frameworks/astro.js.map +1 -1
  357. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  358. package/lib/dist/resolution/frameworks/csharp.js +186 -24
  359. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  360. package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
  361. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
  362. package/lib/dist/resolution/frameworks/expo-modules.js +95 -1
  363. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
  364. package/lib/dist/resolution/frameworks/expo-router.d.ts +195 -0
  365. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
  366. package/lib/dist/resolution/frameworks/expo-router.js +847 -0
  367. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
  368. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  369. package/lib/dist/resolution/frameworks/express.js +339 -45
  370. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  371. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
  372. package/lib/dist/resolution/frameworks/fabric.js +13 -11
  373. package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
  374. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  375. package/lib/dist/resolution/frameworks/go.js +11 -28
  376. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  377. package/lib/dist/resolution/frameworks/index.d.ts +8 -2
  378. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  379. package/lib/dist/resolution/frameworks/index.js +39 -1
  380. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  381. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  382. package/lib/dist/resolution/frameworks/java.js +88 -68
  383. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  384. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
  385. package/lib/dist/resolution/frameworks/laravel.js +369 -26
  386. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  387. package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
  388. package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
  389. package/lib/dist/resolution/frameworks/name-heuristic.js +45 -0
  390. package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
  391. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  392. package/lib/dist/resolution/frameworks/nestjs.js +288 -55
  393. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  394. package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
  395. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
  396. package/lib/dist/resolution/frameworks/nextjs.js +329 -0
  397. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
  398. package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
  399. package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
  400. package/lib/dist/resolution/frameworks/object-literal.js +139 -0
  401. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
  402. package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
  403. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
  404. package/lib/dist/resolution/frameworks/package-deps.js +78 -0
  405. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
  406. package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
  407. package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
  408. package/lib/dist/resolution/frameworks/page-component.js +45 -0
  409. package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
  410. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
  411. package/lib/dist/resolution/frameworks/play.js +3 -1
  412. package/lib/dist/resolution/frameworks/play.js.map +1 -1
  413. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  414. package/lib/dist/resolution/frameworks/python.js +279 -26
  415. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  416. package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
  417. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  418. package/lib/dist/resolution/frameworks/react-native.js +153 -14
  419. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  420. package/lib/dist/resolution/frameworks/react-router.d.ts +47 -0
  421. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
  422. package/lib/dist/resolution/frameworks/react-router.js +201 -0
  423. package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
  424. package/lib/dist/resolution/frameworks/react.d.ts +13 -2
  425. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  426. package/lib/dist/resolution/frameworks/react.js +542 -144
  427. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  428. package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
  429. package/lib/dist/resolution/frameworks/ruby.js +177 -17
  430. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  431. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  432. package/lib/dist/resolution/frameworks/rust.js +24 -22
  433. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  434. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  435. package/lib/dist/resolution/frameworks/svelte.js +14 -6
  436. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  437. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
  438. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
  439. package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
  440. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
  441. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  442. package/lib/dist/resolution/frameworks/swift.js +253 -124
  443. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  444. package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
  445. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
  446. package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
  447. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
  448. package/lib/dist/resolution/frameworks/vue-router.d.ts +98 -0
  449. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
  450. package/lib/dist/resolution/frameworks/vue-router.js +500 -0
  451. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
  452. package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
  453. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
  454. package/lib/dist/resolution/frameworks/vue.js +45 -11
  455. package/lib/dist/resolution/frameworks/vue.js.map +1 -1
  456. package/lib/dist/resolution/import-resolver.d.ts +66 -0
  457. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  458. package/lib/dist/resolution/import-resolver.js +643 -61
  459. package/lib/dist/resolution/import-resolver.js.map +1 -1
  460. package/lib/dist/resolution/index.d.ts +124 -25
  461. package/lib/dist/resolution/index.d.ts.map +1 -1
  462. package/lib/dist/resolution/index.js +769 -152
  463. package/lib/dist/resolution/index.js.map +1 -1
  464. package/lib/dist/resolution/js-builtins.d.ts +13 -0
  465. package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
  466. package/lib/dist/resolution/js-builtins.js +48 -0
  467. package/lib/dist/resolution/js-builtins.js.map +1 -0
  468. package/lib/dist/resolution/name-matcher.d.ts +101 -22
  469. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  470. package/lib/dist/resolution/name-matcher.js +8267 -287
  471. package/lib/dist/resolution/name-matcher.js.map +1 -1
  472. package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
  473. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
  474. package/lib/dist/resolution/next-router-synthesizer.js +113 -0
  475. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
  476. package/lib/dist/resolution/react-router-synthesizer.d.ts +35 -0
  477. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
  478. package/lib/dist/resolution/react-router-synthesizer.js +197 -0
  479. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
  480. package/lib/dist/resolution/resolver-pool.d.ts +22 -1
  481. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  482. package/lib/dist/resolution/resolver-pool.js +35 -5
  483. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  484. package/lib/dist/resolution/resolver-worker.js +3 -0
  485. package/lib/dist/resolution/resolver-worker.js.map +1 -1
  486. package/lib/dist/resolution/strip-comments.d.ts +6 -0
  487. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  488. package/lib/dist/resolution/strip-comments.js +58 -0
  489. package/lib/dist/resolution/strip-comments.js.map +1 -1
  490. package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
  491. package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
  492. package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
  493. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
  494. package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
  495. package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
  496. package/lib/dist/resolution/swift-type-visibility.js +454 -0
  497. package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
  498. package/lib/dist/resolution/synth-utils.d.ts +26 -0
  499. package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
  500. package/lib/dist/resolution/synth-utils.js +75 -0
  501. package/lib/dist/resolution/synth-utils.js.map +1 -0
  502. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
  503. package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
  504. package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
  505. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
  506. package/lib/dist/resolution/tier-synthesizer.d.ts +54 -0
  507. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
  508. package/lib/dist/resolution/tier-synthesizer.js +1294 -0
  509. package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
  510. package/lib/dist/resolution/type-parameters.d.ts +11 -0
  511. package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
  512. package/lib/dist/resolution/type-parameters.js +287 -0
  513. package/lib/dist/resolution/type-parameters.js.map +1 -0
  514. package/lib/dist/resolution/types.d.ts +105 -2
  515. package/lib/dist/resolution/types.d.ts.map +1 -1
  516. package/lib/dist/resolution/types.js +64 -0
  517. package/lib/dist/resolution/types.js.map +1 -1
  518. package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
  519. package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
  520. package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
  521. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
  522. package/lib/dist/search/query-paths.d.ts +50 -1
  523. package/lib/dist/search/query-paths.d.ts.map +1 -1
  524. package/lib/dist/search/query-paths.js +227 -12
  525. package/lib/dist/search/query-paths.js.map +1 -1
  526. package/lib/dist/search/query-utils.d.ts +15 -0
  527. package/lib/dist/search/query-utils.d.ts.map +1 -1
  528. package/lib/dist/search/query-utils.js +35 -7
  529. package/lib/dist/search/query-utils.js.map +1 -1
  530. package/lib/dist/sync/watch-policy.d.ts +14 -0
  531. package/lib/dist/sync/watch-policy.d.ts.map +1 -1
  532. package/lib/dist/sync/watch-policy.js +19 -0
  533. package/lib/dist/sync/watch-policy.js.map +1 -1
  534. package/lib/dist/sync/watcher.d.ts +52 -35
  535. package/lib/dist/sync/watcher.d.ts.map +1 -1
  536. package/lib/dist/sync/watcher.js +236 -100
  537. package/lib/dist/sync/watcher.js.map +1 -1
  538. package/lib/dist/sync/worktree.d.ts +22 -0
  539. package/lib/dist/sync/worktree.d.ts.map +1 -1
  540. package/lib/dist/sync/worktree.js +54 -0
  541. package/lib/dist/sync/worktree.js.map +1 -1
  542. package/lib/dist/telemetry/index.d.ts +4 -2
  543. package/lib/dist/telemetry/index.d.ts.map +1 -1
  544. package/lib/dist/telemetry/index.js +159 -66
  545. package/lib/dist/telemetry/index.js.map +1 -1
  546. package/lib/dist/types.d.ts +1 -1
  547. package/lib/dist/types.d.ts.map +1 -1
  548. package/lib/dist/types.js +1 -0
  549. package/lib/dist/types.js.map +1 -1
  550. package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
  551. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
  552. package/lib/dist/ui-server/api/deadcode.js +136 -0
  553. package/lib/dist/ui-server/api/deadcode.js.map +1 -0
  554. package/lib/dist/ui-server/api/effects.d.ts +94 -0
  555. package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
  556. package/lib/dist/ui-server/api/effects.js +527 -0
  557. package/lib/dist/ui-server/api/effects.js.map +1 -0
  558. package/lib/dist/ui-server/api/entrypoints.d.ts +92 -0
  559. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
  560. package/lib/dist/ui-server/api/entrypoints.js +364 -0
  561. package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
  562. package/lib/dist/ui-server/api/events.d.ts +183 -0
  563. package/lib/dist/ui-server/api/events.d.ts.map +1 -0
  564. package/lib/dist/ui-server/api/events.js +430 -0
  565. package/lib/dist/ui-server/api/events.js.map +1 -0
  566. package/lib/dist/ui-server/api/file.d.ts +66 -0
  567. package/lib/dist/ui-server/api/file.d.ts.map +1 -0
  568. package/lib/dist/ui-server/api/file.js +235 -0
  569. package/lib/dist/ui-server/api/file.js.map +1 -0
  570. package/lib/dist/ui-server/api/filecode.d.ts +126 -0
  571. package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
  572. package/lib/dist/ui-server/api/filecode.js +205 -0
  573. package/lib/dist/ui-server/api/filecode.js.map +1 -0
  574. package/lib/dist/ui-server/api/flow.d.ts +226 -0
  575. package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
  576. package/lib/dist/ui-server/api/flow.js +612 -0
  577. package/lib/dist/ui-server/api/flow.js.map +1 -0
  578. package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
  579. package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
  580. package/lib/dist/ui-server/api/hierarchy.js +92 -0
  581. package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
  582. package/lib/dist/ui-server/api/index.d.ts +90 -0
  583. package/lib/dist/ui-server/api/index.d.ts.map +1 -0
  584. package/lib/dist/ui-server/api/index.js +332 -0
  585. package/lib/dist/ui-server/api/index.js.map +1 -0
  586. package/lib/dist/ui-server/api/map.d.ts +273 -0
  587. package/lib/dist/ui-server/api/map.d.ts.map +1 -0
  588. package/lib/dist/ui-server/api/map.js +781 -0
  589. package/lib/dist/ui-server/api/map.js.map +1 -0
  590. package/lib/dist/ui-server/api/node.d.ts +81 -0
  591. package/lib/dist/ui-server/api/node.d.ts.map +1 -0
  592. package/lib/dist/ui-server/api/node.js +394 -0
  593. package/lib/dist/ui-server/api/node.js.map +1 -0
  594. package/lib/dist/ui-server/api/nodes.d.ts +25 -0
  595. package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
  596. package/lib/dist/ui-server/api/nodes.js +45 -0
  597. package/lib/dist/ui-server/api/nodes.js.map +1 -0
  598. package/lib/dist/ui-server/api/program.d.ts +139 -0
  599. package/lib/dist/ui-server/api/program.d.ts.map +1 -0
  600. package/lib/dist/ui-server/api/program.js +315 -0
  601. package/lib/dist/ui-server/api/program.js.map +1 -0
  602. package/lib/dist/ui-server/api/respond.d.ts +76 -0
  603. package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
  604. package/lib/dist/ui-server/api/respond.js +186 -0
  605. package/lib/dist/ui-server/api/respond.js.map +1 -0
  606. package/lib/dist/ui-server/api/route-roots.d.ts +45 -0
  607. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
  608. package/lib/dist/ui-server/api/route-roots.js +117 -0
  609. package/lib/dist/ui-server/api/route-roots.js.map +1 -0
  610. package/lib/dist/ui-server/api/routes.d.ts +61 -0
  611. package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
  612. package/lib/dist/ui-server/api/routes.js +164 -0
  613. package/lib/dist/ui-server/api/routes.js.map +1 -0
  614. package/lib/dist/ui-server/api/screens.d.ts +117 -0
  615. package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
  616. package/lib/dist/ui-server/api/screens.js +626 -0
  617. package/lib/dist/ui-server/api/screens.js.map +1 -0
  618. package/lib/dist/ui-server/api/search.d.ts +29 -0
  619. package/lib/dist/ui-server/api/search.d.ts.map +1 -0
  620. package/lib/dist/ui-server/api/search.js +232 -0
  621. package/lib/dist/ui-server/api/search.js.map +1 -0
  622. package/lib/dist/ui-server/api/session.d.ts +52 -0
  623. package/lib/dist/ui-server/api/session.d.ts.map +1 -0
  624. package/lib/dist/ui-server/api/session.js +196 -0
  625. package/lib/dist/ui-server/api/session.js.map +1 -0
  626. package/lib/dist/ui-server/api/source.d.ts +200 -0
  627. package/lib/dist/ui-server/api/source.d.ts.map +1 -0
  628. package/lib/dist/ui-server/api/source.js +422 -0
  629. package/lib/dist/ui-server/api/source.js.map +1 -0
  630. package/lib/dist/ui-server/api/stats.d.ts +27 -0
  631. package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
  632. package/lib/dist/ui-server/api/stats.js +164 -0
  633. package/lib/dist/ui-server/api/stats.js.map +1 -0
  634. package/lib/dist/ui-server/api/steps.d.ts +274 -0
  635. package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
  636. package/lib/dist/ui-server/api/steps.js +1554 -0
  637. package/lib/dist/ui-server/api/steps.js.map +1 -0
  638. package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
  639. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
  640. package/lib/dist/ui-server/api/trail-store.js +323 -0
  641. package/lib/dist/ui-server/api/trail-store.js.map +1 -0
  642. package/lib/dist/ui-server/api/trails.d.ts +163 -0
  643. package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
  644. package/lib/dist/ui-server/api/trails.js +370 -0
  645. package/lib/dist/ui-server/api/trails.js.map +1 -0
  646. package/lib/dist/ui-server/api/when.d.ts +133 -0
  647. package/lib/dist/ui-server/api/when.d.ts.map +1 -0
  648. package/lib/dist/ui-server/api/when.js +275 -0
  649. package/lib/dist/ui-server/api/when.js.map +1 -0
  650. package/lib/dist/ui-server/api/wire.d.ts +179 -0
  651. package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
  652. package/lib/dist/ui-server/api/wire.js +231 -0
  653. package/lib/dist/ui-server/api/wire.js.map +1 -0
  654. package/lib/dist/ui-server/assets.d.ts +40 -0
  655. package/lib/dist/ui-server/assets.d.ts.map +1 -0
  656. package/lib/dist/ui-server/assets.js +110 -0
  657. package/lib/dist/ui-server/assets.js.map +1 -0
  658. package/lib/dist/ui-server/constants.d.ts +32 -0
  659. package/lib/dist/ui-server/constants.d.ts.map +1 -0
  660. package/lib/dist/ui-server/constants.js +35 -0
  661. package/lib/dist/ui-server/constants.js.map +1 -0
  662. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
  663. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
  664. package/lib/dist/ui-server/highlight/bounded-tokenize.js +139 -0
  665. package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
  666. package/lib/dist/ui-server/highlight/index.d.ts +113 -0
  667. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
  668. package/lib/dist/ui-server/highlight/index.js +312 -0
  669. package/lib/dist/ui-server/highlight/index.js.map +1 -0
  670. package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
  671. package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
  672. package/lib/dist/ui-server/highlight/languages.js +50 -0
  673. package/lib/dist/ui-server/highlight/languages.js.map +1 -0
  674. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
  675. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
  676. package/lib/dist/ui-server/highlight/tokenize-worker.js +20 -0
  677. package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
  678. package/lib/dist/ui-server/index.d.ts +92 -0
  679. package/lib/dist/ui-server/index.d.ts.map +1 -0
  680. package/lib/dist/ui-server/index.js +399 -0
  681. package/lib/dist/ui-server/index.js.map +1 -0
  682. package/lib/dist/ui-server/open-browser.d.ts +31 -0
  683. package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
  684. package/lib/dist/ui-server/open-browser.js +79 -0
  685. package/lib/dist/ui-server/open-browser.js.map +1 -0
  686. package/lib/dist/ui-server/security.d.ts +127 -0
  687. package/lib/dist/ui-server/security.d.ts.map +1 -0
  688. package/lib/dist/ui-server/security.js +332 -0
  689. package/lib/dist/ui-server/security.js.map +1 -0
  690. package/lib/dist/ui-server/static.d.ts +45 -0
  691. package/lib/dist/ui-server/static.d.ts.map +1 -0
  692. package/lib/dist/ui-server/static.js +165 -0
  693. package/lib/dist/ui-server/static.js.map +1 -0
  694. package/lib/dist/upgrade/index.d.ts +43 -5
  695. package/lib/dist/upgrade/index.d.ts.map +1 -1
  696. package/lib/dist/upgrade/index.js +157 -35
  697. package/lib/dist/upgrade/index.js.map +1 -1
  698. package/lib/dist/utils.d.ts +14 -2
  699. package/lib/dist/utils.d.ts.map +1 -1
  700. package/lib/dist/utils.js +25 -10
  701. package/lib/dist/utils.js.map +1 -1
  702. package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
  703. package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
  704. package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
  705. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  706. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  707. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  708. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  709. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  710. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  711. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
  712. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
  713. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  714. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  715. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  716. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  717. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  718. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  719. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
  720. package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
  721. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  722. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  723. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  724. package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  725. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  726. package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  727. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
  728. package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
  729. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  730. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  731. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  732. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  733. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  734. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  735. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
  736. package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
  737. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  738. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  739. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  740. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  741. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  742. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  743. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
  744. package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
  745. package/lib/dist/viewer/assets/index-BSGpxBr9.js +99 -0
  746. package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
  747. package/lib/dist/viewer/index.html +16 -0
  748. package/lib/dist/worker-teardown.d.ts +48 -0
  749. package/lib/dist/worker-teardown.d.ts.map +1 -0
  750. package/lib/dist/worker-teardown.js +100 -0
  751. package/lib/dist/worker-teardown.js.map +1 -0
  752. package/lib/kernel/codegraph-kernel.node +2 -2
  753. package/lib/node_modules/.package-lock.json +4 -4
  754. package/lib/node_modules/picomatch/README.md +56 -51
  755. package/lib/node_modules/picomatch/lib/constants.js +4 -0
  756. package/lib/node_modules/picomatch/lib/parse.js +341 -1
  757. package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
  758. package/lib/node_modules/picomatch/lib/scan.js +30 -18
  759. package/lib/node_modules/picomatch/package.json +4 -4
  760. package/lib/package.json +9 -2
  761. package/package.json +1 -1
@@ -3,6 +3,14 @@
3
3
  *
4
4
  * Manages the .codegraph/ directory structure for CodeGraph data.
5
5
  */
6
+ /** The default per-project data directory name. */
7
+ export declare const DEFAULT_CODEGRAPH_DIR = ".codegraph";
8
+ /**
9
+ * The data directory name WSL gives a fresh project on a Windows drive, so it
10
+ * never shares one index with CodeGraph on Windows (issue #995). Indexing and
11
+ * watching skip every `.codegraph-*` sibling on both sides (#636).
12
+ */
13
+ export declare const WSL_CODEGRAPH_DIR = ".codegraph-wsl";
6
14
  /**
7
15
  * Resolve the per-project data directory name, honoring the `CODEGRAPH_DIR`
8
16
  * environment override (default `.codegraph`). The override is a single path
@@ -39,15 +47,59 @@ export declare const CODEGRAPH_DIR: string;
39
47
  * neither indexes or watches the other's index directory.
40
48
  */
41
49
  export declare function isCodeGraphDataDir(name: string): boolean;
50
+ /**
51
+ * The data directory name for one project: {@link codeGraphDirName}, except
52
+ * for a project on a Windows drive under WSL (`/mnt/c/...`) with no
53
+ * `CODEGRAPH_DIR` set. Windows-native CodeGraph opens `.codegraph` in that
54
+ * same tree, and SQLite's locking doesn't hold across the 9p/DrvFs bridge, so
55
+ * the two sharing one index fails with "disk I/O error" (issue #995). There:
56
+ *
57
+ * 1. `.codegraph-wsl/` exists → it. Once WSL has its own index it keeps it,
58
+ * even after Windows builds a `.codegraph` beside it.
59
+ * 2. `.codegraph/codegraph.db` exists → `.codegraph`. An index built before
60
+ * this default is kept rather than silently rebuilt somewhere else.
61
+ * 3. neither → `.codegraph-wsl`, so a fresh WSL index never shares.
62
+ *
63
+ * Every other host keeps the plain name without a stat: the WSL check is
64
+ * cached per process.
65
+ */
66
+ export declare function codeGraphDirNameFor(projectRoot: string): string;
42
67
  /**
43
68
  * Get the .codegraph directory path for a project
44
69
  */
45
70
  export declare function getCodeGraphDir(projectRoot: string): string;
46
71
  /**
47
- * Check if a project has been initialized with CodeGraph
48
- * Requires both .codegraph/ directory AND codegraph.db to exist
72
+ * Check if a project has been initialized with CodeGraph.
73
+ *
74
+ * Requires `.codegraph/codegraph.db` to exist AND to carry the codegraph
75
+ * schema. A file that merely exists — empty, or a SQLite database with no
76
+ * tables, as an interrupted `init` or a stray `touch` leaves behind — used to
77
+ * count as initialized, so one such file in an ANCESTOR directory (worst
78
+ * case: `$HOME`) captured the upward resolution of every project beneath it
79
+ * and made their real indexes unreachable (#1895).
80
+ *
81
+ * The probe is cheap and gated so hot callers (the prompt hook, MCP root
82
+ * resolution on every call) pay one `stat`: file size, then a read-only
83
+ * SQLite open with a single `sqlite_master` lookup — memoized per path +
84
+ * mtime + size so an unchanged db is never reopened. A database that cannot
85
+ * be inspected counts as initialized (see probeSchema) — only a proven-absent
86
+ * schema, or a file SQLite refuses as not a database, says no.
49
87
  */
50
88
  export declare function isInitialized(projectRoot: string): boolean;
89
+ /**
90
+ * `codegraph.db` exists at `projectRoot` but does not carry the schema, and
91
+ * `init` can add it in place: an empty file, or a SQLite database without the
92
+ * codegraph tables (#1895). A file that is not SQLite at all is NOT this case —
93
+ * see {@link hasForeignDbFile}.
94
+ */
95
+ export declare function hasSchemalessDb(projectRoot: string): boolean;
96
+ /**
97
+ * `codegraph.db` exists at `projectRoot` and is not a SQLite database (no
98
+ * header magic): SQLite refuses to open it, so `init` cannot rebuild it in
99
+ * place. The caller must say so rather than promise a repair; nothing here
100
+ * deletes the file.
101
+ */
102
+ export declare function hasForeignDbFile(projectRoot: string): boolean;
51
103
  /**
52
104
  * Find the nearest parent directory containing .codegraph/
53
105
  *
@@ -72,6 +124,48 @@ export declare function isInitialized(projectRoot: string): boolean;
72
124
  * The returned string is a human phrase that slots into "… looks like {reason}".
73
125
  */
74
126
  export declare function unsafeIndexRootReason(projectRoot: string): string | null;
127
+ /**
128
+ * `dev:ino` for a path, or null if it can't be stat'd or the platform doesn't
129
+ * report a usable inode. Read as bigints: WSL DrvFs (`/mnt/c`) reports inodes
130
+ * above 2^53, where a plain number rounds nearby inodes onto one value. Windows
131
+ * st_ino is unreliable across handle reopens, so we deliberately return null
132
+ * there — the deleted-but-open-inode hazard this guards (#925) is a POSIX
133
+ * file-semantics issue that doesn't arise on Windows (an open file can't be
134
+ * unlinked).
135
+ */
136
+ export declare function statInode(p: string): string | null;
137
+ /**
138
+ * Canonicalize a project root for IDENTITY: hashing it into a rendezvous key
139
+ * (the daemon's named pipe / tmpdir socket, a registry record). Not for display
140
+ * — the caller-visible root keeps its own spelling.
141
+ *
142
+ * The contract is that two spellings of ONE directory yield ONE string, because
143
+ * a client that derives a different key silently fails to meet the daemon that
144
+ * is already running: it probes a socket nobody bound, spawns a redundant
145
+ * daemon, and that daemon dies on the lock the first one holds, so the session
146
+ * degrades to a single-process engine. `path.resolve` alone does NOT satisfy
147
+ * that contract — NTFS is case-insensitive, so `d:\work\codegraph` and
148
+ * `D:\work\codegraph` name one directory but two strings, and non-native
149
+ * `fs.realpathSync` keeps whichever casing the caller passed (only `.native`
150
+ * asks the filesystem for the on-disk name — the same reason
151
+ * {@link isSameIndexRoot} uses it). Both spellings really do occur: a
152
+ * cwd-derived root is the on-disk case, while a client-supplied
153
+ * `rootUri`/`workspaceFolders` path arrives as `file:///d%3A/…`.
154
+ *
155
+ * The Windows lowercase is belt-and-braces on top of the native realpath — NTFS
156
+ * can't hold two directories differing only by case, and it also absorbs a
157
+ * `\\?\`-prefixed native result diverging from a plain one.
158
+ */
159
+ export declare function canonicalProjectRoot(projectRoot: string): string;
160
+ /**
161
+ * Whether two resolved index roots are one index spelled two ways — a symlinked
162
+ * checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
163
+ * DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
164
+ * Compares the identity of both data directories as they are NOW, so an inode
165
+ * reused after a delete can't match: the deleted root no longer stats. Windows
166
+ * has no usable inode, so it compares the on-disk-cased native realpaths.
167
+ */
168
+ export declare function isSameIndexRoot(a: string, b: string): boolean;
75
169
  export declare function findNearestCodeGraphRoot(startPath: string): string | null;
76
170
  /**
77
171
  * Indexed sub-project roots beneath `root` (bounded breadth-first scan). For
@@ -150,6 +244,26 @@ export declare function extractCodeTokens(prompt: string): string[];
150
244
  * non-candidate prompt ("fix this typo", in any language) stays a zero-cost no-op.
151
245
  */
152
246
  export declare function isStructuralPrompt(prompt: string): boolean;
247
+ /**
248
+ * Claude Code persists `UserPromptSubmit` hook stdout above this many
249
+ * characters to a file and shows the model a ~2 KB preview instead (#1694).
250
+ * Measured on Claude Code 2.1.261; documented in the hooks reference as a
251
+ * 10,000-character cap on hook output strings.
252
+ */
253
+ export declare const CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10000;
254
+ /**
255
+ * Max characters of explore text injected by `codegraph prompt-hook` before
256
+ * truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
257
+ * the host delivers the payload inline. 9,000 leaves ~1k for the
258
+ * `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
259
+ * after the cap is applied.
260
+ */
261
+ export declare const PROMPT_HOOK_INJECTION_MAX = 9000;
262
+ /**
263
+ * Cap explore text for the prompt-hook injection, preserving the existing
264
+ * "call codegraph_explore for the rest" notice when truncated.
265
+ */
266
+ export declare function capPromptHookInjection(text: string, max?: number): string;
153
267
  /**
154
268
  * What the front-load hook should do for a prompt issued from a directory.
155
269
  */
@@ -209,4 +323,19 @@ export declare function validateDirectory(projectRoot: string): {
209
323
  valid: boolean;
210
324
  errors: string[];
211
325
  };
326
+ /**
327
+ * Claude Code injects `<task-notification>…</task-notification>` blocks as
328
+ * `user` messages when a background agent finishes, and UserPromptSubmit
329
+ * hooks receive them exactly like typed prompts (#1832). The whole prompt
330
+ * must be that single envelope; a user question that merely mentions the
331
+ * marker is still a prompt.
332
+ */
333
+ export declare function isTaskNotification(prompt: string): boolean;
334
+ /**
335
+ * Claude Code hands a subagent's report back to the parent session as a
336
+ * `<agent-message from="…">…</agent-message>` prompt, which UserPromptSubmit
337
+ * hooks also receive (#2184). Same rule as {@link isTaskNotification}: only a
338
+ * prompt that is entirely that envelope is skipped.
339
+ */
340
+ export declare function isAgentMessage(prompt: string): boolean;
212
341
  //# sourceMappingURL=directory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAqBzC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,QAAqB,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMxD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAQ1D;AAED;;;;;;;;GAQG;AACH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA8BxE;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBzE;AA2BD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7C,MAAM,EAAE,CAmBV;AAED,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,+EAA+E;IAC/E,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAoBD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GACtC,oBAAoB,CAStB;AAsND;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAK5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAkB1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;yEAEqE;IACrE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;6EAEyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;+DAE2D;IAC3D,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAwCxE;AAyDD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAgBzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAuBzD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CA8BnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA+B5D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAYlF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG;IACtD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CA6BA"}
1
+ {"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../src/directory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,mDAAmD;AACnD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAIlD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAqBzC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,QAAqB,CAAC;AAEhD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMxD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAc1D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAM5D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAK7D;AAkDD;;;;;;;;GAQG;AACH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA8BxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQlD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAUhE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAW7D;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBzE;AA2BD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7C,MAAM,EAAE,CAqBV;AAED,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,+EAA+E;IAC/E,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAoBD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GACtC,oBAAoB,CAStB;AAsND;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAK5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAkB1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,eAAO,MAAM,oCAAoC,QAAS,CAAC;AAE3D;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,OAAQ,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAA4B,GAAG,MAAM,CAI5F;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;yEAEqE;IACrE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;6EAEyE;IACzE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB;;+DAE2D;IAC3D,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAwCxE;AAyDD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAgBzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAuBzD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CA8BnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA+B5D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAYlF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG;IACtD,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CA6BA;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEtD"}
@@ -38,18 +38,25 @@ var __importStar = (this && this.__importStar) || (function () {
38
38
  };
39
39
  })();
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.CODEGRAPH_DIR = void 0;
41
+ exports.PROMPT_HOOK_INJECTION_MAX = exports.CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = exports.CODEGRAPH_DIR = exports.WSL_CODEGRAPH_DIR = exports.DEFAULT_CODEGRAPH_DIR = void 0;
42
42
  exports.codeGraphDirName = codeGraphDirName;
43
43
  exports.isCodeGraphDataDir = isCodeGraphDataDir;
44
+ exports.codeGraphDirNameFor = codeGraphDirNameFor;
44
45
  exports.getCodeGraphDir = getCodeGraphDir;
45
46
  exports.isInitialized = isInitialized;
47
+ exports.hasSchemalessDb = hasSchemalessDb;
48
+ exports.hasForeignDbFile = hasForeignDbFile;
46
49
  exports.unsafeIndexRootReason = unsafeIndexRootReason;
50
+ exports.statInode = statInode;
51
+ exports.canonicalProjectRoot = canonicalProjectRoot;
52
+ exports.isSameIndexRoot = isSameIndexRoot;
47
53
  exports.findNearestCodeGraphRoot = findNearestCodeGraphRoot;
48
54
  exports.findIndexedSubprojectRoots = findIndexedSubprojectRoots;
49
55
  exports.resolveServerRoot = resolveServerRoot;
50
56
  exports.hasStructuralKeyword = hasStructuralKeyword;
51
57
  exports.extractCodeTokens = extractCodeTokens;
52
58
  exports.isStructuralPrompt = isStructuralPrompt;
59
+ exports.capPromptHookInjection = capPromptHookInjection;
53
60
  exports.planFrontload = planFrontload;
54
61
  exports.createDirectory = createDirectory;
55
62
  exports.removeDirectory = removeDirectory;
@@ -57,11 +64,20 @@ exports.listDirectoryContents = listDirectoryContents;
57
64
  exports.getDirectorySize = getDirectorySize;
58
65
  exports.ensureSubdirectory = ensureSubdirectory;
59
66
  exports.validateDirectory = validateDirectory;
67
+ exports.isTaskNotification = isTaskNotification;
68
+ exports.isAgentMessage = isAgentMessage;
60
69
  const fs = __importStar(require("fs"));
61
70
  const os = __importStar(require("os"));
62
71
  const path = __importStar(require("path"));
72
+ const watch_policy_1 = require("./sync/watch-policy");
63
73
  /** The default per-project data directory name. */
64
- const DEFAULT_CODEGRAPH_DIR = '.codegraph';
74
+ exports.DEFAULT_CODEGRAPH_DIR = '.codegraph';
75
+ /**
76
+ * The data directory name WSL gives a fresh project on a Windows drive, so it
77
+ * never shares one index with CodeGraph on Windows (issue #995). Indexing and
78
+ * watching skip every `.codegraph-*` sibling on both sides (#636).
79
+ */
80
+ exports.WSL_CODEGRAPH_DIR = '.codegraph-wsl';
65
81
  let warnedBadDirName = false;
66
82
  /**
67
83
  * Resolve the per-project data directory name, honoring the `CODEGRAPH_DIR`
@@ -85,7 +101,7 @@ let warnedBadDirName = false;
85
101
  function codeGraphDirName() {
86
102
  const raw = process.env.CODEGRAPH_DIR?.trim();
87
103
  if (!raw)
88
- return DEFAULT_CODEGRAPH_DIR;
104
+ return exports.DEFAULT_CODEGRAPH_DIR;
89
105
  const invalid = raw === '.' ||
90
106
  raw.includes('..') ||
91
107
  raw.includes('/') ||
@@ -96,9 +112,9 @@ function codeGraphDirName() {
96
112
  warnedBadDirName = true;
97
113
  // stderr only — stdout is the MCP protocol channel.
98
114
  console.warn(`[codegraph] Ignoring invalid CODEGRAPH_DIR="${raw}" — it must be a plain ` +
99
- `directory name (no path separators, no "..", not absolute). Using "${DEFAULT_CODEGRAPH_DIR}".`);
115
+ `directory name (no path separators, no "..", not absolute). Using "${exports.DEFAULT_CODEGRAPH_DIR}".`);
100
116
  }
101
- return DEFAULT_CODEGRAPH_DIR;
117
+ return exports.DEFAULT_CODEGRAPH_DIR;
102
118
  }
103
119
  return raw;
104
120
  }
@@ -118,19 +134,62 @@ exports.CODEGRAPH_DIR = codeGraphDirName();
118
134
  * neither indexes or watches the other's index directory.
119
135
  */
120
136
  function isCodeGraphDataDir(name) {
121
- return (name === DEFAULT_CODEGRAPH_DIR ||
137
+ return (name === exports.DEFAULT_CODEGRAPH_DIR ||
122
138
  name === codeGraphDirName() ||
123
- name.startsWith(DEFAULT_CODEGRAPH_DIR + '-'));
139
+ name.startsWith(exports.DEFAULT_CODEGRAPH_DIR + '-'));
140
+ }
141
+ /**
142
+ * The data directory name for one project: {@link codeGraphDirName}, except
143
+ * for a project on a Windows drive under WSL (`/mnt/c/...`) with no
144
+ * `CODEGRAPH_DIR` set. Windows-native CodeGraph opens `.codegraph` in that
145
+ * same tree, and SQLite's locking doesn't hold across the 9p/DrvFs bridge, so
146
+ * the two sharing one index fails with "disk I/O error" (issue #995). There:
147
+ *
148
+ * 1. `.codegraph-wsl/` exists → it. Once WSL has its own index it keeps it,
149
+ * even after Windows builds a `.codegraph` beside it.
150
+ * 2. `.codegraph/codegraph.db` exists → `.codegraph`. An index built before
151
+ * this default is kept rather than silently rebuilt somewhere else.
152
+ * 3. neither → `.codegraph-wsl`, so a fresh WSL index never shares.
153
+ *
154
+ * Every other host keeps the plain name without a stat: the WSL check is
155
+ * cached per process.
156
+ */
157
+ function codeGraphDirNameFor(projectRoot) {
158
+ if (process.env.CODEGRAPH_DIR?.trim() || !(0, watch_policy_1.isWslWindowsDrive)(projectRoot))
159
+ return codeGraphDirName();
160
+ try {
161
+ if (fs.statSync(path.join(projectRoot, exports.WSL_CODEGRAPH_DIR)).isDirectory())
162
+ return exports.WSL_CODEGRAPH_DIR;
163
+ }
164
+ catch {
165
+ // absent — fall through
166
+ }
167
+ if (fs.existsSync(path.join(projectRoot, exports.DEFAULT_CODEGRAPH_DIR, 'codegraph.db')))
168
+ return exports.DEFAULT_CODEGRAPH_DIR;
169
+ return exports.WSL_CODEGRAPH_DIR;
124
170
  }
125
171
  /**
126
172
  * Get the .codegraph directory path for a project
127
173
  */
128
174
  function getCodeGraphDir(projectRoot) {
129
- return path.join(projectRoot, codeGraphDirName());
175
+ return path.join(projectRoot, codeGraphDirNameFor(projectRoot));
130
176
  }
131
177
  /**
132
- * Check if a project has been initialized with CodeGraph
133
- * Requires both .codegraph/ directory AND codegraph.db to exist
178
+ * Check if a project has been initialized with CodeGraph.
179
+ *
180
+ * Requires `.codegraph/codegraph.db` to exist AND to carry the codegraph
181
+ * schema. A file that merely exists — empty, or a SQLite database with no
182
+ * tables, as an interrupted `init` or a stray `touch` leaves behind — used to
183
+ * count as initialized, so one such file in an ANCESTOR directory (worst
184
+ * case: `$HOME`) captured the upward resolution of every project beneath it
185
+ * and made their real indexes unreachable (#1895).
186
+ *
187
+ * The probe is cheap and gated so hot callers (the prompt hook, MCP root
188
+ * resolution on every call) pay one `stat`: file size, then a read-only
189
+ * SQLite open with a single `sqlite_master` lookup — memoized per path +
190
+ * mtime + size so an unchanged db is never reopened. A database that cannot
191
+ * be inspected counts as initialized (see probeSchema) — only a proven-absent
192
+ * schema, or a file SQLite refuses as not a database, says no.
134
193
  */
135
194
  function isInitialized(projectRoot) {
136
195
  const codegraphDir = getCodeGraphDir(projectRoot);
@@ -139,7 +198,102 @@ function isInitialized(projectRoot) {
139
198
  }
140
199
  // Must have codegraph.db, not just .codegraph folder
141
200
  const dbPath = path.join(codegraphDir, 'codegraph.db');
142
- return fs.existsSync(dbPath);
201
+ let st;
202
+ try {
203
+ st = fs.statSync(dbPath);
204
+ }
205
+ catch {
206
+ return false;
207
+ }
208
+ return hasCodeGraphSchema(dbPath, st);
209
+ }
210
+ /**
211
+ * `codegraph.db` exists at `projectRoot` but does not carry the schema, and
212
+ * `init` can add it in place: an empty file, or a SQLite database without the
213
+ * codegraph tables (#1895). A file that is not SQLite at all is NOT this case —
214
+ * see {@link hasForeignDbFile}.
215
+ */
216
+ function hasSchemalessDb(projectRoot) {
217
+ const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
218
+ let st;
219
+ try {
220
+ st = fs.statSync(dbPath);
221
+ }
222
+ catch {
223
+ return false;
224
+ }
225
+ if (!st.isFile() || isInitialized(projectRoot))
226
+ return false;
227
+ return st.size === 0 || probeSchema(dbPath) === 'no-schema';
228
+ }
229
+ /**
230
+ * `codegraph.db` exists at `projectRoot` and is not a SQLite database (no
231
+ * header magic): SQLite refuses to open it, so `init` cannot rebuild it in
232
+ * place. The caller must say so rather than promise a repair; nothing here
233
+ * deletes the file.
234
+ */
235
+ function hasForeignDbFile(projectRoot) {
236
+ const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
237
+ let st;
238
+ try {
239
+ st = fs.statSync(dbPath);
240
+ }
241
+ catch {
242
+ return false;
243
+ }
244
+ return st.isFile() && st.size > 0 && probeSchema(dbPath) === 'not-sqlite';
245
+ }
246
+ /** A SQLite file header is 100 bytes; anything shorter cannot hold a schema. */
247
+ const SQLITE_HEADER_SIZE = 100;
248
+ /** SQLITE_NOTADB: SQLite read the file and it is not a database. */
249
+ const SQLITE_NOTADB = 26;
250
+ const schemaProbeCache = new Map();
251
+ function hasCodeGraphSchema(dbPath, st) {
252
+ if (!st.isFile() || st.size < SQLITE_HEADER_SIZE)
253
+ return false;
254
+ const cached = schemaProbeCache.get(dbPath);
255
+ if (cached && cached.mtimeMs === st.mtimeMs && cached.size === st.size)
256
+ return cached.ok;
257
+ const probe = probeSchema(dbPath);
258
+ const ok = probe === 'schema' || probe === 'unknown';
259
+ schemaProbeCache.set(dbPath, { mtimeMs: st.mtimeMs, size: st.size, ok });
260
+ return ok;
261
+ }
262
+ /**
263
+ * What `codegraph.db` holds, asked of SQLite itself through a read-only
264
+ * connection: the codegraph schema, a database without it, not a database at
265
+ * all (SQLITE_NOTADB), or `unknown` — locked, busy, a WAL db in a directory we
266
+ * cannot create `-shm` in (read-only checkout, mount, another user's tree),
267
+ * disk I/O. Callers treat `unknown` as initialized: the pre-existing behaviour
268
+ * for a database we cannot inspect.
269
+ *
270
+ * The file is never read through a descriptor of our own, not even for its
271
+ * 16-byte header. Closing ANY descriptor on a database file drops every POSIX
272
+ * lock this process holds on it, including those of a connection it already
273
+ * has open (sqlite.org/howtocorrupt.html §2.2.1) — and the MCP server resolves
274
+ * projects through isInitialized on every call while it holds the index as
275
+ * its writer. SQLite's own connections share one lock table per file, so a
276
+ * second connection opened and closed here leaves the first one's locks alone.
277
+ */
278
+ function probeSchema(dbPath) {
279
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
280
+ const { DatabaseSync } = require('node:sqlite');
281
+ let db = null;
282
+ try {
283
+ db = new DatabaseSync(dbPath, { readOnly: true });
284
+ const row = db.prepare("SELECT 1 AS ok FROM sqlite_master WHERE type = 'table' AND name = 'nodes'").get();
285
+ return row !== undefined ? 'schema' : 'no-schema';
286
+ }
287
+ catch (error) {
288
+ return error?.errcode === SQLITE_NOTADB ? 'not-sqlite' : 'unknown';
289
+ }
290
+ finally {
291
+ // Never hold the handle: Windows file locking would block the owner.
292
+ try {
293
+ db?.close();
294
+ }
295
+ catch { /* already closed */ }
296
+ }
143
297
  }
144
298
  /**
145
299
  * Find the nearest parent directory containing .codegraph/
@@ -192,6 +346,82 @@ function unsafeIndexRootReason(projectRoot) {
192
346
  }
193
347
  return null;
194
348
  }
349
+ /**
350
+ * `dev:ino` for a path, or null if it can't be stat'd or the platform doesn't
351
+ * report a usable inode. Read as bigints: WSL DrvFs (`/mnt/c`) reports inodes
352
+ * above 2^53, where a plain number rounds nearby inodes onto one value. Windows
353
+ * st_ino is unreliable across handle reopens, so we deliberately return null
354
+ * there — the deleted-but-open-inode hazard this guards (#925) is a POSIX
355
+ * file-semantics issue that doesn't arise on Windows (an open file can't be
356
+ * unlinked).
357
+ */
358
+ function statInode(p) {
359
+ if (process.platform === 'win32')
360
+ return null;
361
+ try {
362
+ const s = fs.statSync(p, { bigint: true });
363
+ return `${s.dev}:${s.ino}`;
364
+ }
365
+ catch {
366
+ return null;
367
+ }
368
+ }
369
+ /**
370
+ * Canonicalize a project root for IDENTITY: hashing it into a rendezvous key
371
+ * (the daemon's named pipe / tmpdir socket, a registry record). Not for display
372
+ * — the caller-visible root keeps its own spelling.
373
+ *
374
+ * The contract is that two spellings of ONE directory yield ONE string, because
375
+ * a client that derives a different key silently fails to meet the daemon that
376
+ * is already running: it probes a socket nobody bound, spawns a redundant
377
+ * daemon, and that daemon dies on the lock the first one holds, so the session
378
+ * degrades to a single-process engine. `path.resolve` alone does NOT satisfy
379
+ * that contract — NTFS is case-insensitive, so `d:\work\codegraph` and
380
+ * `D:\work\codegraph` name one directory but two strings, and non-native
381
+ * `fs.realpathSync` keeps whichever casing the caller passed (only `.native`
382
+ * asks the filesystem for the on-disk name — the same reason
383
+ * {@link isSameIndexRoot} uses it). Both spellings really do occur: a
384
+ * cwd-derived root is the on-disk case, while a client-supplied
385
+ * `rootUri`/`workspaceFolders` path arrives as `file:///d%3A/…`.
386
+ *
387
+ * The Windows lowercase is belt-and-braces on top of the native realpath — NTFS
388
+ * can't hold two directories differing only by case, and it also absorbs a
389
+ * `\\?\`-prefixed native result diverging from a plain one.
390
+ */
391
+ function canonicalProjectRoot(projectRoot) {
392
+ const resolved = path.resolve(projectRoot);
393
+ let canonical = resolved;
394
+ try {
395
+ canonical = fs.realpathSync.native(resolved);
396
+ }
397
+ catch {
398
+ // ENOENT/EACCES/ELOOP — the root is normally there (`.codegraph/` lives in
399
+ // it), so this is a fallback rather than a path we expect to take.
400
+ }
401
+ return process.platform === 'win32' ? canonical.toLowerCase() : canonical;
402
+ }
403
+ /**
404
+ * Whether two resolved index roots are one index spelled two ways — a symlinked
405
+ * checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
406
+ * DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
407
+ * Compares the identity of both data directories as they are NOW, so an inode
408
+ * reused after a delete can't match: the deleted root no longer stats. Windows
409
+ * has no usable inode, so it compares the on-disk-cased native realpaths.
410
+ */
411
+ function isSameIndexRoot(a, b) {
412
+ if (a === b)
413
+ return true;
414
+ if (process.platform === 'win32') {
415
+ try {
416
+ return fs.realpathSync.native(getCodeGraphDir(a)) === fs.realpathSync.native(getCodeGraphDir(b));
417
+ }
418
+ catch {
419
+ return false;
420
+ }
421
+ }
422
+ const id = statInode(getCodeGraphDir(a));
423
+ return id !== null && id === statInode(getCodeGraphDir(b));
424
+ }
195
425
  function findNearestCodeGraphRoot(startPath) {
196
426
  let current = path.resolve(startPath);
197
427
  const root = path.parse(current).root;
@@ -240,6 +470,9 @@ function escapeRegExp(s) {
240
470
  * never turns into a full-tree crawl on a large repo.
241
471
  */
242
472
  function findIndexedSubprojectRoots(root, opts = {}) {
473
+ // A stray workspace manifest must not enable scanning home or broader roots (#1454).
474
+ if (unsafeIndexRootReason(root) !== null)
475
+ return [];
243
476
  const maxDepth = opts.maxDepth ?? 4;
244
477
  const max = opts.max ?? 64;
245
478
  const out = [];
@@ -337,8 +570,9 @@ const NOT_WORD_AFTER = /(?![\p{L}\p{N}_])/u.source;
337
570
  * Structural keywords matched as EXACT words (boundary on both sides): short
338
571
  * or ambiguous tokens where prefix matching would false-positive ("flow" in
339
572
  * "flower", "path" in "pathological"). Grouped by language; a term appears once
340
- * even when several languages share it ("como" is Portuguese for how AND
341
- * unaccented-typed Spanish "cómo").
573
+ * even when several languages share it. Ambiguous everyday words like PT/ES
574
+ * "como" and DE "wie" are excluded: the hook instead requires another strong
575
+ * keyword, a verified code token, or indexed prose segments (#1654).
342
576
  */
343
577
  const STRUCTURAL_WORDS = [
344
578
  // English — the pre-#1126 list minus what moved to STRUCTURAL_STEMS: the
@@ -347,17 +581,16 @@ const STRUCTURAL_WORDS = [
347
581
  'how', 'where', 'tracing', 'flows?', 'paths?', 'reach(?:es|ed)?', 'wired?', 'breaks?', 'why does',
348
582
  // French (où=where, flux=flow, chemin=path, casse=breaks)
349
583
  'comment', 'où', 'flux', 'chemins?', 'casse',
350
- // Spanish (cómo/como=how, dónde/donde=where, flujo=flow, ruta/camino=path,
584
+ // Spanish (cómo=how, dónde/donde=where, flujo=flow, ruta/camino=path,
351
585
  // rompe=breaks, llaman / quién llama = call(s) — bare "llama" is excluded:
352
586
  // it's also the animal/model name in English prompts)
353
587
  'cómo', 'dónde', 'donde', 'flujos?', 'rutas?', 'caminos?', 'rompe', 'llaman', 'quién llama', 'quien llama',
354
- // Portuguese (como=how — also covers unaccented Spanish; onde=where,
355
- // fluxo=flow, caminho=path)
356
- 'como', 'onde', 'fluxos?', 'caminhos?',
357
- // German (wie=how, wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
588
+ // Portuguese (onde=where, fluxo=flow, caminho=path)
589
+ 'onde', 'fluxos?', 'caminhos?',
590
+ // German (wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
358
591
  // bricht/kaputt=breaks, ruft=calls, hängt=depends — "hängt … von X ab"
359
592
  // splits the separable verb "abhängen", so the "abhäng" stem can't catch it)
360
- 'wie', 'wo', 'woher', 'wohin', 'pfade?', 'fluss', 'ablauf', 'bricht', 'kaputt', 'ruft', 'hängt',
593
+ 'wo', 'woher', 'wohin', 'pfade?', 'fluss', 'ablauf', 'bricht', 'kaputt', 'ruft', 'hängt',
361
594
  // Italian (dove=where, flusso=flow, percorso/i=path)
362
595
  'dove', 'flusso', 'percors[oi]',
363
596
  // Russian (как=how, где=where, путь/пути=path, работает=works)
@@ -593,6 +826,30 @@ function extractCodeTokens(prompt) {
593
826
  function isStructuralPrompt(prompt) {
594
827
  return hasStructuralKeyword(prompt) || extractCodeTokens(prompt).length > 0;
595
828
  }
829
+ /**
830
+ * Claude Code persists `UserPromptSubmit` hook stdout above this many
831
+ * characters to a file and shows the model a ~2 KB preview instead (#1694).
832
+ * Measured on Claude Code 2.1.261; documented in the hooks reference as a
833
+ * 10,000-character cap on hook output strings.
834
+ */
835
+ exports.CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10_000;
836
+ /**
837
+ * Max characters of explore text injected by `codegraph prompt-hook` before
838
+ * truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
839
+ * the host delivers the payload inline. 9,000 leaves ~1k for the
840
+ * `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
841
+ * after the cap is applied.
842
+ */
843
+ exports.PROMPT_HOOK_INJECTION_MAX = 9_000;
844
+ /**
845
+ * Cap explore text for the prompt-hook injection, preserving the existing
846
+ * "call codegraph_explore for the rest" notice when truncated.
847
+ */
848
+ function capPromptHookInjection(text, max = exports.PROMPT_HOOK_INJECTION_MAX) {
849
+ return text.length > max
850
+ ? `${text.slice(0, max)}\n…(truncated; call codegraph_explore for the rest)`
851
+ : text;
852
+ }
596
853
  /**
597
854
  * Decide what the front-load hook injects for a `prompt` issued from `cwd`,
598
855
  * shaped by where the `.codegraph/` index(es) actually are:
@@ -712,10 +969,10 @@ function ensureGitignore(gitignorePath) {
712
969
  */
713
970
  function createDirectory(projectRoot) {
714
971
  const codegraphDir = getCodeGraphDir(projectRoot);
715
- const dbPath = path.join(codegraphDir, 'codegraph.db');
716
- // Only throw if CodeGraph is actually initialized (db exists)
717
- // .codegraph/ folder alone is fine
718
- if (fs.existsSync(dbPath)) {
972
+ // Only throw if CodeGraph is actually initialized (db with a schema).
973
+ // .codegraph/ folder alone — or a schema-less codegraph.db left by an
974
+ // interrupted init (#1895) — is fine: initialize() adds the schema to it.
975
+ if (isInitialized(projectRoot)) {
719
976
  throw new Error(`CodeGraph already initialized in ${projectRoot}`);
720
977
  }
721
978
  // Create main directory (if it doesn't exist)
@@ -846,4 +1103,23 @@ function validateDirectory(projectRoot) {
846
1103
  errors,
847
1104
  };
848
1105
  }
1106
+ /**
1107
+ * Claude Code injects `<task-notification>…</task-notification>` blocks as
1108
+ * `user` messages when a background agent finishes, and UserPromptSubmit
1109
+ * hooks receive them exactly like typed prompts (#1832). The whole prompt
1110
+ * must be that single envelope; a user question that merely mentions the
1111
+ * marker is still a prompt.
1112
+ */
1113
+ function isTaskNotification(prompt) {
1114
+ return /^\s*<task-notification>[\s\S]*<\/task-notification>\s*$/.test(prompt);
1115
+ }
1116
+ /**
1117
+ * Claude Code hands a subagent's report back to the parent session as a
1118
+ * `<agent-message from="…">…</agent-message>` prompt, which UserPromptSubmit
1119
+ * hooks also receive (#2184). Same rule as {@link isTaskNotification}: only a
1120
+ * prompt that is entirely that envelope is skipped.
1121
+ */
1122
+ function isAgentMessage(prompt) {
1123
+ return /^\s*<agent-message(?:\s[^>]*)?>[\s\S]*<\/agent-message>\s*$/.test(prompt);
1124
+ }
849
1125
  //# sourceMappingURL=directory.js.map