@colbymchenry/codegraph-win32-arm64 1.6.1 → 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 (1094) 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 +427 -684
  8. package/lib/dist/bin/codegraph.js.map +1 -1
  9. package/lib/dist/bin/command-supervision.d.ts +7 -0
  10. package/lib/dist/bin/command-supervision.d.ts.map +1 -1
  11. package/lib/dist/bin/command-supervision.js +30 -74
  12. package/lib/dist/bin/command-supervision.js.map +1 -1
  13. package/lib/dist/bin/fatal-handler.js +0 -46
  14. package/lib/dist/bin/fatal-handler.js.map +1 -1
  15. package/lib/dist/bin/node-version-check.js +0 -33
  16. package/lib/dist/bin/node-version-check.js.map +1 -1
  17. package/lib/dist/bin/uninstall.js +0 -19
  18. package/lib/dist/bin/uninstall.js.map +1 -1
  19. package/lib/dist/bin/viewer-gate.js +0 -14
  20. package/lib/dist/bin/viewer-gate.js.map +1 -1
  21. package/lib/dist/compile-cache.d.ts +2 -0
  22. package/lib/dist/compile-cache.d.ts.map +1 -0
  23. package/lib/dist/compile-cache.js +45 -0
  24. package/lib/dist/compile-cache.js.map +1 -0
  25. package/lib/dist/context/formatter.js +3 -66
  26. package/lib/dist/context/formatter.js.map +1 -1
  27. package/lib/dist/context/index.d.ts +44 -1
  28. package/lib/dist/context/index.d.ts.map +1 -1
  29. package/lib/dist/context/index.js +123 -430
  30. package/lib/dist/context/index.js.map +1 -1
  31. package/lib/dist/context/markers.js +0 -17
  32. package/lib/dist/context/markers.js.map +1 -1
  33. package/lib/dist/db/index.d.ts +44 -1
  34. package/lib/dist/db/index.d.ts.map +1 -1
  35. package/lib/dist/db/index.js +123 -395
  36. package/lib/dist/db/index.js.map +1 -1
  37. package/lib/dist/db/migrations.d.ts +11 -1
  38. package/lib/dist/db/migrations.d.ts.map +1 -1
  39. package/lib/dist/db/migrations.js +71 -79
  40. package/lib/dist/db/migrations.js.map +1 -1
  41. package/lib/dist/db/name-substring-index.d.ts +63 -0
  42. package/lib/dist/db/name-substring-index.d.ts.map +1 -0
  43. package/lib/dist/db/name-substring-index.js +151 -0
  44. package/lib/dist/db/name-substring-index.js.map +1 -0
  45. package/lib/dist/db/node-sqlite.d.ts +19 -0
  46. package/lib/dist/db/node-sqlite.d.ts.map +1 -0
  47. package/lib/dist/db/node-sqlite.js +23 -0
  48. package/lib/dist/db/node-sqlite.js.map +1 -0
  49. package/lib/dist/db/open-error.d.ts +36 -0
  50. package/lib/dist/db/open-error.d.ts.map +1 -0
  51. package/lib/dist/db/open-error.js +63 -0
  52. package/lib/dist/db/open-error.js.map +1 -0
  53. package/lib/dist/db/parameter-flow-queries.d.ts +120 -0
  54. package/lib/dist/db/parameter-flow-queries.d.ts.map +1 -0
  55. package/lib/dist/db/parameter-flow-queries.js +168 -0
  56. package/lib/dist/db/parameter-flow-queries.js.map +1 -0
  57. package/lib/dist/db/queries.d.ts +641 -40
  58. package/lib/dist/db/queries.d.ts.map +1 -1
  59. package/lib/dist/db/queries.js +1370 -1398
  60. package/lib/dist/db/queries.js.map +1 -1
  61. package/lib/dist/db/reference-tail.d.ts +83 -0
  62. package/lib/dist/db/reference-tail.d.ts.map +1 -0
  63. package/lib/dist/db/reference-tail.js +68 -0
  64. package/lib/dist/db/reference-tail.js.map +1 -0
  65. package/lib/dist/db/schema.sql +18 -2
  66. package/lib/dist/db/sqlite-adapter.d.ts +18 -1
  67. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  68. package/lib/dist/db/sqlite-adapter.js +12 -62
  69. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  70. package/lib/dist/db/synthesis-stage.d.ts.map +1 -1
  71. package/lib/dist/db/synthesis-stage.js +2 -6
  72. package/lib/dist/db/synthesis-stage.js.map +1 -1
  73. package/lib/dist/db/wal-valve.js +1 -153
  74. package/lib/dist/db/wal-valve.js.map +1 -1
  75. package/lib/dist/db/wsl-shared-index.js +0 -37
  76. package/lib/dist/db/wsl-shared-index.js.map +1 -1
  77. package/lib/dist/directory.d.ts +81 -0
  78. package/lib/dist/directory.d.ts.map +1 -1
  79. package/lib/dist/directory.js +91 -500
  80. package/lib/dist/directory.js.map +1 -1
  81. package/lib/dist/engine.d.ts +15 -0
  82. package/lib/dist/engine.d.ts.map +1 -0
  83. package/lib/dist/engine.js +34 -0
  84. package/lib/dist/engine.js.map +1 -0
  85. package/lib/dist/errors.d.ts +10 -0
  86. package/lib/dist/errors.d.ts.map +1 -1
  87. package/lib/dist/errors.js +8 -101
  88. package/lib/dist/errors.js.map +1 -1
  89. package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
  90. package/lib/dist/extraction/astro-extractor.js +15 -133
  91. package/lib/dist/extraction/astro-extractor.js.map +1 -1
  92. package/lib/dist/extraction/cfml-extractor.d.ts +102 -10
  93. package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
  94. package/lib/dist/extraction/cfml-extractor.js +260 -179
  95. package/lib/dist/extraction/cfml-extractor.js.map +1 -1
  96. package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
  97. package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
  98. package/lib/dist/extraction/commonjs-requires.js +37 -0
  99. package/lib/dist/extraction/commonjs-requires.js.map +1 -0
  100. package/lib/dist/extraction/dfm-extractor.js +0 -21
  101. package/lib/dist/extraction/dfm-extractor.js.map +1 -1
  102. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  103. package/lib/dist/extraction/extraction-version.js +1 -24
  104. package/lib/dist/extraction/extraction-version.js.map +1 -1
  105. package/lib/dist/extraction/function-ref.d.ts +40 -0
  106. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  107. package/lib/dist/extraction/function-ref.js +145 -206
  108. package/lib/dist/extraction/function-ref.js.map +1 -1
  109. package/lib/dist/extraction/generated-detection.d.ts +9 -0
  110. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  111. package/lib/dist/extraction/generated-detection.js +29 -154
  112. package/lib/dist/extraction/generated-detection.js.map +1 -1
  113. package/lib/dist/extraction/grammars.d.ts +47 -4
  114. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  115. package/lib/dist/extraction/grammars.js +91 -374
  116. package/lib/dist/extraction/grammars.js.map +1 -1
  117. package/lib/dist/extraction/index.d.ts +216 -11
  118. package/lib/dist/extraction/index.d.ts.map +1 -1
  119. package/lib/dist/extraction/index.js +703 -1368
  120. package/lib/dist/extraction/index.js.map +1 -1
  121. package/lib/dist/extraction/kernel/decode.js +0 -16
  122. package/lib/dist/extraction/kernel/decode.js.map +1 -1
  123. package/lib/dist/extraction/kernel/index.d.ts +3 -1
  124. package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
  125. package/lib/dist/extraction/kernel/index.js +29 -131
  126. package/lib/dist/extraction/kernel/index.js.map +1 -1
  127. package/lib/dist/extraction/kernel/layout.js +42 -76
  128. package/lib/dist/extraction/kernel/layout.js.map +1 -1
  129. package/lib/dist/extraction/kernel/loader.js +0 -37
  130. package/lib/dist/extraction/kernel/loader.js.map +1 -1
  131. package/lib/dist/extraction/languages/arkts.js +0 -59
  132. package/lib/dist/extraction/languages/arkts.js.map +1 -1
  133. package/lib/dist/extraction/languages/c-cpp.d.ts +140 -28
  134. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  135. package/lib/dist/extraction/languages/c-cpp.js +876 -823
  136. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  137. package/lib/dist/extraction/languages/cfquery.js +0 -9
  138. package/lib/dist/extraction/languages/cfquery.js.map +1 -1
  139. package/lib/dist/extraction/languages/cfscript.d.ts +20 -0
  140. package/lib/dist/extraction/languages/cfscript.d.ts.map +1 -1
  141. package/lib/dist/extraction/languages/cfscript.js +80 -9
  142. package/lib/dist/extraction/languages/cfscript.js.map +1 -1
  143. package/lib/dist/extraction/languages/cobol.js +0 -114
  144. package/lib/dist/extraction/languages/cobol.js.map +1 -1
  145. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts +66 -0
  146. package/lib/dist/extraction/languages/cpp-brace-scopes.d.ts.map +1 -0
  147. package/lib/dist/extraction/languages/cpp-brace-scopes.js +343 -0
  148. package/lib/dist/extraction/languages/cpp-brace-scopes.js.map +1 -0
  149. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts +41 -0
  150. package/lib/dist/extraction/languages/cpp-macro-methods.d.ts.map +1 -0
  151. package/lib/dist/extraction/languages/cpp-macro-methods.js +487 -0
  152. package/lib/dist/extraction/languages/cpp-macro-methods.js.map +1 -0
  153. package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
  154. package/lib/dist/extraction/languages/csharp.js +11 -54
  155. package/lib/dist/extraction/languages/csharp.js.map +1 -1
  156. package/lib/dist/extraction/languages/dart.d.ts +84 -0
  157. package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
  158. package/lib/dist/extraction/languages/dart.js +335 -159
  159. package/lib/dist/extraction/languages/dart.js.map +1 -1
  160. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  161. package/lib/dist/extraction/languages/erlang.js +15 -102
  162. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  163. package/lib/dist/extraction/languages/go.d.ts +48 -0
  164. package/lib/dist/extraction/languages/go.d.ts.map +1 -1
  165. package/lib/dist/extraction/languages/go.js +102 -31
  166. package/lib/dist/extraction/languages/go.js.map +1 -1
  167. package/lib/dist/extraction/languages/index.js +0 -6
  168. package/lib/dist/extraction/languages/index.js.map +1 -1
  169. package/lib/dist/extraction/languages/java.d.ts.map +1 -1
  170. package/lib/dist/extraction/languages/java.js +67 -78
  171. package/lib/dist/extraction/languages/java.js.map +1 -1
  172. package/lib/dist/extraction/languages/javascript.d.ts.map +1 -1
  173. package/lib/dist/extraction/languages/javascript.js +2 -12
  174. package/lib/dist/extraction/languages/javascript.js.map +1 -1
  175. package/lib/dist/extraction/languages/kotlin.d.ts +15 -0
  176. package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
  177. package/lib/dist/extraction/languages/kotlin.js +69 -150
  178. package/lib/dist/extraction/languages/kotlin.js.map +1 -1
  179. package/lib/dist/extraction/languages/lua.js +2 -39
  180. package/lib/dist/extraction/languages/lua.js.map +1 -1
  181. package/lib/dist/extraction/languages/luau.js +0 -14
  182. package/lib/dist/extraction/languages/luau.js.map +1 -1
  183. package/lib/dist/extraction/languages/nix.js +0 -16
  184. package/lib/dist/extraction/languages/nix.js.map +1 -1
  185. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  186. package/lib/dist/extraction/languages/objc.js +5 -16
  187. package/lib/dist/extraction/languages/objc.js.map +1 -1
  188. package/lib/dist/extraction/languages/pascal-preparse.d.ts +66 -0
  189. package/lib/dist/extraction/languages/pascal-preparse.d.ts.map +1 -0
  190. package/lib/dist/extraction/languages/pascal-preparse.js +958 -0
  191. package/lib/dist/extraction/languages/pascal-preparse.js.map +1 -0
  192. package/lib/dist/extraction/languages/pascal-system.d.ts +11 -0
  193. package/lib/dist/extraction/languages/pascal-system.d.ts.map +1 -0
  194. package/lib/dist/extraction/languages/pascal-system.js +23 -0
  195. package/lib/dist/extraction/languages/pascal-system.js.map +1 -0
  196. package/lib/dist/extraction/languages/pascal.d.ts.map +1 -1
  197. package/lib/dist/extraction/languages/pascal.js +3 -4
  198. package/lib/dist/extraction/languages/pascal.js.map +1 -1
  199. package/lib/dist/extraction/languages/php.js +5 -42
  200. package/lib/dist/extraction/languages/php.js.map +1 -1
  201. package/lib/dist/extraction/languages/python.js +2 -20
  202. package/lib/dist/extraction/languages/python.js.map +1 -1
  203. package/lib/dist/extraction/languages/r.js +8 -78
  204. package/lib/dist/extraction/languages/r.js.map +1 -1
  205. package/lib/dist/extraction/languages/ruby.d.ts.map +1 -1
  206. package/lib/dist/extraction/languages/ruby.js +17 -25
  207. package/lib/dist/extraction/languages/ruby.js.map +1 -1
  208. package/lib/dist/extraction/languages/rust.d.ts +10 -0
  209. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  210. package/lib/dist/extraction/languages/rust.js +15 -47
  211. package/lib/dist/extraction/languages/rust.js.map +1 -1
  212. package/lib/dist/extraction/languages/scala.js +5 -41
  213. package/lib/dist/extraction/languages/scala.js.map +1 -1
  214. package/lib/dist/extraction/languages/solidity.js +1 -82
  215. package/lib/dist/extraction/languages/solidity.js.map +1 -1
  216. package/lib/dist/extraction/languages/swift.d.ts +15 -0
  217. package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
  218. package/lib/dist/extraction/languages/swift.js +33 -27
  219. package/lib/dist/extraction/languages/swift.js.map +1 -1
  220. package/lib/dist/extraction/languages/terraform.js +6 -152
  221. package/lib/dist/extraction/languages/terraform.js.map +1 -1
  222. package/lib/dist/extraction/languages/typescript.d.ts +71 -0
  223. package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
  224. package/lib/dist/extraction/languages/typescript.js +86 -41
  225. package/lib/dist/extraction/languages/typescript.js.map +1 -1
  226. package/lib/dist/extraction/languages/vbnet.d.ts.map +1 -1
  227. package/lib/dist/extraction/languages/vbnet.js +9 -42
  228. package/lib/dist/extraction/languages/vbnet.js.map +1 -1
  229. package/lib/dist/extraction/lazy-frameworks.d.ts +15 -0
  230. package/lib/dist/extraction/lazy-frameworks.d.ts.map +1 -0
  231. package/lib/dist/extraction/lazy-frameworks.js +8 -0
  232. package/lib/dist/extraction/lazy-frameworks.js.map +1 -0
  233. package/lib/dist/extraction/liquid-extractor.d.ts +29 -3
  234. package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
  235. package/lib/dist/extraction/liquid-extractor.js +89 -148
  236. package/lib/dist/extraction/liquid-extractor.js.map +1 -1
  237. package/lib/dist/extraction/mybatis-extractor.js +0 -78
  238. package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
  239. package/lib/dist/extraction/parse-budget.d.ts +16 -0
  240. package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
  241. package/lib/dist/extraction/parse-budget.js +11 -0
  242. package/lib/dist/extraction/parse-budget.js.map +1 -0
  243. package/lib/dist/extraction/parse-pool.d.ts +41 -5
  244. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  245. package/lib/dist/extraction/parse-pool.js +74 -158
  246. package/lib/dist/extraction/parse-pool.js.map +1 -1
  247. package/lib/dist/extraction/parse-worker.d.ts +1 -1
  248. package/lib/dist/extraction/parse-worker.d.ts.map +1 -1
  249. package/lib/dist/extraction/parse-worker.js +7 -58
  250. package/lib/dist/extraction/parse-worker.js.map +1 -1
  251. package/lib/dist/extraction/razor-extractor.d.ts +9 -0
  252. package/lib/dist/extraction/razor-extractor.d.ts.map +1 -1
  253. package/lib/dist/extraction/razor-extractor.js +45 -69
  254. package/lib/dist/extraction/razor-extractor.js.map +1 -1
  255. package/lib/dist/extraction/razor-script.d.ts +23 -0
  256. package/lib/dist/extraction/razor-script.d.ts.map +1 -0
  257. package/lib/dist/extraction/razor-script.js +244 -0
  258. package/lib/dist/extraction/razor-script.js.map +1 -0
  259. package/lib/dist/extraction/sfc-script.d.ts +85 -0
  260. package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
  261. package/lib/dist/extraction/sfc-script.js +136 -0
  262. package/lib/dist/extraction/sfc-script.js.map +1 -0
  263. package/lib/dist/extraction/store-worker.d.ts +1 -1
  264. package/lib/dist/extraction/store-worker.d.ts.map +1 -1
  265. package/lib/dist/extraction/store-worker.js +5 -37
  266. package/lib/dist/extraction/store-worker.js.map +1 -1
  267. package/lib/dist/extraction/store-writer.d.ts +10 -2
  268. package/lib/dist/extraction/store-writer.d.ts.map +1 -1
  269. package/lib/dist/extraction/store-writer.js +8 -32
  270. package/lib/dist/extraction/store-writer.js.map +1 -1
  271. package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
  272. package/lib/dist/extraction/svelte-extractor.js +16 -122
  273. package/lib/dist/extraction/svelte-extractor.js.map +1 -1
  274. package/lib/dist/extraction/syntax-tokens.d.ts +6 -5
  275. package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
  276. package/lib/dist/extraction/syntax-tokens.js +6 -153
  277. package/lib/dist/extraction/syntax-tokens.js.map +1 -1
  278. package/lib/dist/extraction/tree-sitter-helpers.d.ts +37 -1
  279. package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
  280. package/lib/dist/extraction/tree-sitter-helpers.js +76 -68
  281. package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
  282. package/lib/dist/extraction/tree-sitter-types.d.ts +102 -22
  283. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  284. package/lib/dist/extraction/tree-sitter-types.js +0 -7
  285. package/lib/dist/extraction/tree-sitter-types.js.map +1 -1
  286. package/lib/dist/extraction/tree-sitter.d.ts +455 -9
  287. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  288. package/lib/dist/extraction/tree-sitter.js +1998 -2517
  289. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  290. package/lib/dist/extraction/vue-extractor.d.ts +20 -0
  291. package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
  292. package/lib/dist/extraction/vue-extractor.js +113 -115
  293. package/lib/dist/extraction/vue-extractor.js.map +1 -1
  294. package/lib/dist/extraction/vue-options-api.d.ts +28 -0
  295. package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
  296. package/lib/dist/extraction/vue-options-api.js +164 -0
  297. package/lib/dist/extraction/vue-options-api.js.map +1 -0
  298. package/lib/dist/extraction/vue-template-calls.d.ts +37 -0
  299. package/lib/dist/extraction/vue-template-calls.d.ts.map +1 -0
  300. package/lib/dist/extraction/vue-template-calls.js +497 -0
  301. package/lib/dist/extraction/vue-template-calls.js.map +1 -0
  302. package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  303. package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  304. package/lib/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  305. package/lib/dist/extraction/wasm-runtime-flags.d.ts +6 -0
  306. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  307. package/lib/dist/extraction/wasm-runtime-flags.js +1 -88
  308. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
  309. package/lib/dist/file-limits.d.ts +8 -0
  310. package/lib/dist/file-limits.d.ts.map +1 -1
  311. package/lib/dist/file-limits.js +13 -28
  312. package/lib/dist/file-limits.js.map +1 -1
  313. package/lib/dist/graph/branch-guards.d.ts +17 -0
  314. package/lib/dist/graph/branch-guards.d.ts.map +1 -1
  315. package/lib/dist/graph/branch-guards.js +98 -250
  316. package/lib/dist/graph/branch-guards.js.map +1 -1
  317. package/lib/dist/graph/call-sites.d.ts +12 -0
  318. package/lib/dist/graph/call-sites.d.ts.map +1 -0
  319. package/lib/dist/graph/call-sites.js +17 -0
  320. package/lib/dist/graph/call-sites.js.map +1 -0
  321. package/lib/dist/graph/cobol-copybooks.d.ts +75 -0
  322. package/lib/dist/graph/cobol-copybooks.d.ts.map +1 -0
  323. package/lib/dist/graph/cobol-copybooks.js +45 -0
  324. package/lib/dist/graph/cobol-copybooks.js.map +1 -0
  325. package/lib/dist/graph/dead-code.d.ts +26 -4
  326. package/lib/dist/graph/dead-code.d.ts.map +1 -1
  327. package/lib/dist/graph/dead-code.js +157 -311
  328. package/lib/dist/graph/dead-code.js.map +1 -1
  329. package/lib/dist/graph/dynamic-boundary-report.js +1 -88
  330. package/lib/dist/graph/dynamic-boundary-report.js.map +1 -1
  331. package/lib/dist/graph/file-cycles.d.ts +20 -0
  332. package/lib/dist/graph/file-cycles.d.ts.map +1 -0
  333. package/lib/dist/graph/file-cycles.js +79 -0
  334. package/lib/dist/graph/file-cycles.js.map +1 -0
  335. package/lib/dist/graph/go-package.d.ts +27 -0
  336. package/lib/dist/graph/go-package.d.ts.map +1 -0
  337. package/lib/dist/graph/go-package.js +49 -0
  338. package/lib/dist/graph/go-package.js.map +1 -0
  339. package/lib/dist/graph/index.d.ts +2 -0
  340. package/lib/dist/graph/index.d.ts.map +1 -1
  341. package/lib/dist/graph/index.js +4 -6
  342. package/lib/dist/graph/index.js.map +1 -1
  343. package/lib/dist/graph/named-symbol-flow.d.ts +5 -1
  344. package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
  345. package/lib/dist/graph/named-symbol-flow.js +85 -219
  346. package/lib/dist/graph/named-symbol-flow.js.map +1 -1
  347. package/lib/dist/graph/owning-package.d.ts +59 -0
  348. package/lib/dist/graph/owning-package.d.ts.map +1 -0
  349. package/lib/dist/graph/owning-package.js +120 -0
  350. package/lib/dist/graph/owning-package.js.map +1 -0
  351. package/lib/dist/graph/queries.d.ts +2 -2
  352. package/lib/dist/graph/queries.d.ts.map +1 -1
  353. package/lib/dist/graph/queries.js +2 -135
  354. package/lib/dist/graph/queries.js.map +1 -1
  355. package/lib/dist/graph/symbol-lookup.d.ts +15 -3
  356. package/lib/dist/graph/symbol-lookup.d.ts.map +1 -1
  357. package/lib/dist/graph/symbol-lookup.js +47 -89
  358. package/lib/dist/graph/symbol-lookup.js.map +1 -1
  359. package/lib/dist/graph/synthesized-hop.d.ts +37 -0
  360. package/lib/dist/graph/synthesized-hop.d.ts.map +1 -0
  361. package/lib/dist/graph/synthesized-hop.js +62 -0
  362. package/lib/dist/graph/synthesized-hop.js.map +1 -0
  363. package/lib/dist/graph/test-code.d.ts +21 -0
  364. package/lib/dist/graph/test-code.d.ts.map +1 -0
  365. package/lib/dist/graph/test-code.js +50 -0
  366. package/lib/dist/graph/test-code.js.map +1 -0
  367. package/lib/dist/graph/traversal.d.ts +31 -2
  368. package/lib/dist/graph/traversal.d.ts.map +1 -1
  369. package/lib/dist/graph/traversal.js +98 -226
  370. package/lib/dist/graph/traversal.js.map +1 -1
  371. package/lib/dist/graph/type-hierarchy.js +0 -138
  372. package/lib/dist/graph/type-hierarchy.js.map +1 -1
  373. package/lib/dist/index.d.ts +195 -25
  374. package/lib/dist/index.d.ts.map +1 -1
  375. package/lib/dist/index.js +697 -1105
  376. package/lib/dist/index.js.map +1 -1
  377. package/lib/dist/installer/beta-signup.js +0 -39
  378. package/lib/dist/installer/beta-signup.js.map +1 -1
  379. package/lib/dist/installer/config-writer.js +0 -24
  380. package/lib/dist/installer/config-writer.js.map +1 -1
  381. package/lib/dist/installer/index.d.ts +9 -5
  382. package/lib/dist/installer/index.d.ts.map +1 -1
  383. package/lib/dist/installer/index.js +25 -159
  384. package/lib/dist/installer/index.js.map +1 -1
  385. package/lib/dist/installer/instructions-template.d.ts +1 -1
  386. package/lib/dist/installer/instructions-template.js +0 -37
  387. package/lib/dist/installer/instructions-template.js.map +1 -1
  388. package/lib/dist/installer/targets/antigravity.js +0 -113
  389. package/lib/dist/installer/targets/antigravity.js.map +1 -1
  390. package/lib/dist/installer/targets/bob.d.ts +20 -0
  391. package/lib/dist/installer/targets/bob.d.ts.map +1 -0
  392. package/lib/dist/installer/targets/bob.js +83 -0
  393. package/lib/dist/installer/targets/bob.js.map +1 -0
  394. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  395. package/lib/dist/installer/targets/claude.js +1 -185
  396. package/lib/dist/installer/targets/claude.js.map +1 -1
  397. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  398. package/lib/dist/installer/targets/codex.js +17 -109
  399. package/lib/dist/installer/targets/codex.js.map +1 -1
  400. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -1
  401. package/lib/dist/installer/targets/copilot-cli.js +2 -54
  402. package/lib/dist/installer/targets/copilot-cli.js.map +1 -1
  403. package/lib/dist/installer/targets/copilot-jetbrains.js +0 -57
  404. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -1
  405. package/lib/dist/installer/targets/copilot-vscode.js +0 -58
  406. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -1
  407. package/lib/dist/installer/targets/cursor.js +7 -88
  408. package/lib/dist/installer/targets/cursor.js.map +1 -1
  409. package/lib/dist/installer/targets/droid.d.ts +18 -0
  410. package/lib/dist/installer/targets/droid.d.ts.map +1 -0
  411. package/lib/dist/installer/targets/droid.js +92 -0
  412. package/lib/dist/installer/targets/droid.js.map +1 -0
  413. package/lib/dist/installer/targets/dsh.d.ts +35 -0
  414. package/lib/dist/installer/targets/dsh.d.ts.map +1 -0
  415. package/lib/dist/installer/targets/dsh.js +267 -0
  416. package/lib/dist/installer/targets/dsh.js.map +1 -0
  417. package/lib/dist/installer/targets/gemini.js +0 -37
  418. package/lib/dist/installer/targets/gemini.js.map +1 -1
  419. package/lib/dist/installer/targets/grok.d.ts +25 -0
  420. package/lib/dist/installer/targets/grok.d.ts.map +1 -0
  421. package/lib/dist/installer/targets/grok.js +96 -0
  422. package/lib/dist/installer/targets/grok.js.map +1 -0
  423. package/lib/dist/installer/targets/hermes.d.ts +19 -7
  424. package/lib/dist/installer/targets/hermes.d.ts.map +1 -1
  425. package/lib/dist/installer/targets/hermes.js +218 -214
  426. package/lib/dist/installer/targets/hermes.js.map +1 -1
  427. package/lib/dist/installer/targets/json-config.d.ts +45 -0
  428. package/lib/dist/installer/targets/json-config.d.ts.map +1 -0
  429. package/lib/dist/installer/targets/json-config.js +128 -0
  430. package/lib/dist/installer/targets/json-config.js.map +1 -0
  431. package/lib/dist/installer/targets/kimi.d.ts +21 -0
  432. package/lib/dist/installer/targets/kimi.d.ts.map +1 -0
  433. package/lib/dist/installer/targets/kimi.js +97 -0
  434. package/lib/dist/installer/targets/kimi.js.map +1 -0
  435. package/lib/dist/installer/targets/kiro.js +1 -41
  436. package/lib/dist/installer/targets/kiro.js.map +1 -1
  437. package/lib/dist/installer/targets/opencode.js +0 -102
  438. package/lib/dist/installer/targets/opencode.js.map +1 -1
  439. package/lib/dist/installer/targets/pi.d.ts +24 -0
  440. package/lib/dist/installer/targets/pi.d.ts.map +1 -0
  441. package/lib/dist/installer/targets/pi.js +100 -0
  442. package/lib/dist/installer/targets/pi.js.map +1 -0
  443. package/lib/dist/installer/targets/qoder.d.ts +23 -0
  444. package/lib/dist/installer/targets/qoder.d.ts.map +1 -0
  445. package/lib/dist/installer/targets/qoder.js +83 -0
  446. package/lib/dist/installer/targets/qoder.js.map +1 -0
  447. package/lib/dist/installer/targets/qwen.d.ts +21 -0
  448. package/lib/dist/installer/targets/qwen.d.ts.map +1 -0
  449. package/lib/dist/installer/targets/qwen.js +115 -0
  450. package/lib/dist/installer/targets/qwen.js.map +1 -0
  451. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  452. package/lib/dist/installer/targets/registry.js +18 -25
  453. package/lib/dist/installer/targets/registry.js.map +1 -1
  454. package/lib/dist/installer/targets/shared.d.ts +81 -11
  455. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  456. package/lib/dist/installer/targets/shared.js +183 -129
  457. package/lib/dist/installer/targets/shared.js.map +1 -1
  458. package/lib/dist/installer/targets/toml.d.ts +82 -6
  459. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  460. package/lib/dist/installer/targets/toml.js +318 -112
  461. package/lib/dist/installer/targets/toml.js.map +1 -1
  462. package/lib/dist/installer/targets/types.d.ts +1 -1
  463. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  464. package/lib/dist/installer/targets/types.js +0 -13
  465. package/lib/dist/installer/targets/types.js.map +1 -1
  466. package/lib/dist/installer/targets/windsurf.d.ts +22 -0
  467. package/lib/dist/installer/targets/windsurf.d.ts.map +1 -0
  468. package/lib/dist/installer/targets/windsurf.js +90 -0
  469. package/lib/dist/installer/targets/windsurf.js.map +1 -0
  470. package/lib/dist/lazy-engine.d.ts +22 -0
  471. package/lib/dist/lazy-engine.d.ts.map +1 -0
  472. package/lib/dist/lazy-engine.js +16 -0
  473. package/lib/dist/lazy-engine.js.map +1 -0
  474. package/lib/dist/mcp/answer-freshness.js +0 -6
  475. package/lib/dist/mcp/answer-freshness.js.map +1 -1
  476. package/lib/dist/mcp/daemon-manager.js +2 -23
  477. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  478. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  479. package/lib/dist/mcp/daemon-paths.js +2 -79
  480. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  481. package/lib/dist/mcp/daemon-registry.d.ts +44 -0
  482. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  483. package/lib/dist/mcp/daemon-registry.js +189 -118
  484. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  485. package/lib/dist/mcp/daemon.d.ts +23 -0
  486. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  487. package/lib/dist/mcp/daemon.js +89 -373
  488. package/lib/dist/mcp/daemon.js.map +1 -1
  489. package/lib/dist/mcp/dynamic-boundaries.js +4 -78
  490. package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
  491. package/lib/dist/mcp/early-ppid.js +0 -24
  492. package/lib/dist/mcp/early-ppid.js.map +1 -1
  493. package/lib/dist/mcp/engine.d.ts +10 -0
  494. package/lib/dist/mcp/engine.d.ts.map +1 -1
  495. package/lib/dist/mcp/engine.js +41 -152
  496. package/lib/dist/mcp/engine.js.map +1 -1
  497. package/lib/dist/mcp/explore-dedup.js +0 -108
  498. package/lib/dist/mcp/explore-dedup.js.map +1 -1
  499. package/lib/dist/mcp/explore-diagnostics.js +0 -116
  500. package/lib/dist/mcp/explore-diagnostics.js.map +1 -1
  501. package/lib/dist/mcp/explore-session-state.js +0 -129
  502. package/lib/dist/mcp/explore-session-state.js.map +1 -1
  503. package/lib/dist/mcp/index-freshness-worker.js +5 -4
  504. package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
  505. package/lib/dist/mcp/index-freshness.d.ts +7 -1
  506. package/lib/dist/mcp/index-freshness.d.ts.map +1 -1
  507. package/lib/dist/mcp/index-freshness.js +20 -12
  508. package/lib/dist/mcp/index-freshness.js.map +1 -1
  509. package/lib/dist/mcp/index-version-warning.d.ts +21 -0
  510. package/lib/dist/mcp/index-version-warning.d.ts.map +1 -0
  511. package/lib/dist/mcp/index-version-warning.js +38 -0
  512. package/lib/dist/mcp/index-version-warning.js.map +1 -0
  513. package/lib/dist/mcp/index.d.ts +19 -1
  514. package/lib/dist/mcp/index.d.ts.map +1 -1
  515. package/lib/dist/mcp/index.js +118 -293
  516. package/lib/dist/mcp/index.js.map +1 -1
  517. package/lib/dist/mcp/liveness-watchdog.d.ts +13 -3
  518. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  519. package/lib/dist/mcp/liveness-watchdog.js +106 -121
  520. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  521. package/lib/dist/mcp/ppid-watchdog.js +0 -24
  522. package/lib/dist/mcp/ppid-watchdog.js.map +1 -1
  523. package/lib/dist/mcp/process-identity.d.ts +42 -0
  524. package/lib/dist/mcp/process-identity.d.ts.map +1 -0
  525. package/lib/dist/mcp/process-identity.js +130 -0
  526. package/lib/dist/mcp/process-identity.js.map +1 -0
  527. package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
  528. package/lib/dist/mcp/project-lifecycle.js +55 -21
  529. package/lib/dist/mcp/project-lifecycle.js.map +1 -1
  530. package/lib/dist/mcp/proxy.d.ts +26 -8
  531. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  532. package/lib/dist/mcp/proxy.js +209 -223
  533. package/lib/dist/mcp/proxy.js.map +1 -1
  534. package/lib/dist/mcp/query-pool.d.ts +58 -3
  535. package/lib/dist/mcp/query-pool.d.ts.map +1 -1
  536. package/lib/dist/mcp/query-pool.js +140 -100
  537. package/lib/dist/mcp/query-pool.js.map +1 -1
  538. package/lib/dist/mcp/query-worker.js +24 -36
  539. package/lib/dist/mcp/query-worker.js.map +1 -1
  540. package/lib/dist/mcp/server-instructions.js +0 -31
  541. package/lib/dist/mcp/server-instructions.js.map +1 -1
  542. package/lib/dist/mcp/session.d.ts +27 -0
  543. package/lib/dist/mcp/session.d.ts.map +1 -1
  544. package/lib/dist/mcp/session.js +29 -130
  545. package/lib/dist/mcp/session.js.map +1 -1
  546. package/lib/dist/mcp/startup-handshake.js +1 -48
  547. package/lib/dist/mcp/startup-handshake.js.map +1 -1
  548. package/lib/dist/mcp/stdin-teardown.js +0 -28
  549. package/lib/dist/mcp/stdin-teardown.js.map +1 -1
  550. package/lib/dist/mcp/stdout-teardown.d.ts +26 -0
  551. package/lib/dist/mcp/stdout-teardown.d.ts.map +1 -0
  552. package/lib/dist/mcp/stdout-teardown.js +20 -0
  553. package/lib/dist/mcp/stdout-teardown.js.map +1 -0
  554. package/lib/dist/mcp/tools.d.ts +159 -20
  555. package/lib/dist/mcp/tools.d.ts.map +1 -1
  556. package/lib/dist/mcp/tools.js +730 -3545
  557. package/lib/dist/mcp/tools.js.map +1 -1
  558. package/lib/dist/mcp/transport.d.ts.map +1 -1
  559. package/lib/dist/mcp/transport.js +4 -96
  560. package/lib/dist/mcp/transport.js.map +1 -1
  561. package/lib/dist/mcp/version.d.ts +13 -1
  562. package/lib/dist/mcp/version.d.ts.map +1 -1
  563. package/lib/dist/mcp/version.js +19 -21
  564. package/lib/dist/mcp/version.js.map +1 -1
  565. package/lib/dist/mcp/writer-lock.d.ts +11 -0
  566. package/lib/dist/mcp/writer-lock.d.ts.map +1 -1
  567. package/lib/dist/mcp/writer-lock.js +49 -46
  568. package/lib/dist/mcp/writer-lock.js.map +1 -1
  569. package/lib/dist/project-config.js +1 -138
  570. package/lib/dist/project-config.js.map +1 -1
  571. package/lib/dist/resolution/alias-binding.d.ts +7 -0
  572. package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
  573. package/lib/dist/resolution/alias-binding.js +19 -52
  574. package/lib/dist/resolution/alias-binding.js.map +1 -1
  575. package/lib/dist/resolution/ambient-modules.d.ts +185 -0
  576. package/lib/dist/resolution/ambient-modules.d.ts.map +1 -0
  577. package/lib/dist/resolution/ambient-modules.js +732 -0
  578. package/lib/dist/resolution/ambient-modules.js.map +1 -0
  579. package/lib/dist/resolution/angular-template-synthesizer.d.ts +96 -0
  580. package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
  581. package/lib/dist/resolution/angular-template-synthesizer.js +695 -0
  582. package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
  583. package/lib/dist/resolution/c-feature-variants.d.ts +40 -0
  584. package/lib/dist/resolution/c-feature-variants.d.ts.map +1 -0
  585. package/lib/dist/resolution/c-feature-variants.js +249 -0
  586. package/lib/dist/resolution/c-feature-variants.js.map +1 -0
  587. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  588. package/lib/dist/resolution/c-fnptr-synthesizer.js +23 -391
  589. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  590. package/lib/dist/resolution/c-macro-renames.d.ts +25 -0
  591. package/lib/dist/resolution/c-macro-renames.d.ts.map +1 -0
  592. package/lib/dist/resolution/c-macro-renames.js +95 -0
  593. package/lib/dist/resolution/c-macro-renames.js.map +1 -0
  594. package/lib/dist/resolution/callback-synthesizer.d.ts +15 -1
  595. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  596. package/lib/dist/resolution/callback-synthesizer.js +1487 -1234
  597. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  598. package/lib/dist/resolution/const-alias-synthesizer.d.ts +48 -0
  599. package/lib/dist/resolution/const-alias-synthesizer.d.ts.map +1 -0
  600. package/lib/dist/resolution/const-alias-synthesizer.js +234 -0
  601. package/lib/dist/resolution/const-alias-synthesizer.js.map +1 -0
  602. package/lib/dist/resolution/cooperative-yield.js +0 -27
  603. package/lib/dist/resolution/cooperative-yield.js.map +1 -1
  604. package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -1
  605. package/lib/dist/resolution/cpp-constructor.js +15 -17
  606. package/lib/dist/resolution/cpp-constructor.js.map +1 -1
  607. package/lib/dist/resolution/cpp-includers.d.ts +46 -0
  608. package/lib/dist/resolution/cpp-includers.d.ts.map +1 -0
  609. package/lib/dist/resolution/cpp-includers.js +153 -0
  610. package/lib/dist/resolution/cpp-includers.js.map +1 -0
  611. package/lib/dist/resolution/cpp-macro-visibility.d.ts +16 -0
  612. package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
  613. package/lib/dist/resolution/cpp-macro-visibility.js +60 -61
  614. package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
  615. package/lib/dist/resolution/cpp-namespaces.d.ts +54 -0
  616. package/lib/dist/resolution/cpp-namespaces.d.ts.map +1 -0
  617. package/lib/dist/resolution/cpp-namespaces.js +151 -0
  618. package/lib/dist/resolution/cpp-namespaces.js.map +1 -0
  619. package/lib/dist/resolution/cpp-raw-strings.d.ts +33 -0
  620. package/lib/dist/resolution/cpp-raw-strings.d.ts.map +1 -0
  621. package/lib/dist/resolution/cpp-raw-strings.js +167 -0
  622. package/lib/dist/resolution/cpp-raw-strings.js.map +1 -0
  623. package/lib/dist/resolution/cpp-supertypes.d.ts +118 -0
  624. package/lib/dist/resolution/cpp-supertypes.d.ts.map +1 -0
  625. package/lib/dist/resolution/cpp-supertypes.js +322 -0
  626. package/lib/dist/resolution/cpp-supertypes.js.map +1 -0
  627. package/lib/dist/resolution/cpp-template-instantiations.d.ts +83 -0
  628. package/lib/dist/resolution/cpp-template-instantiations.d.ts.map +1 -0
  629. package/lib/dist/resolution/cpp-template-instantiations.js +983 -0
  630. package/lib/dist/resolution/cpp-template-instantiations.js.map +1 -0
  631. package/lib/dist/resolution/cpp-type-aliases.d.ts +194 -0
  632. package/lib/dist/resolution/cpp-type-aliases.d.ts.map +1 -0
  633. package/lib/dist/resolution/cpp-type-aliases.js +648 -0
  634. package/lib/dist/resolution/cpp-type-aliases.js.map +1 -0
  635. package/lib/dist/resolution/dart-libraries.d.ts +75 -0
  636. package/lib/dist/resolution/dart-libraries.d.ts.map +1 -0
  637. package/lib/dist/resolution/dart-libraries.js +721 -0
  638. package/lib/dist/resolution/dart-libraries.js.map +1 -0
  639. package/lib/dist/resolution/dart-local-scope.d.ts +41 -0
  640. package/lib/dist/resolution/dart-local-scope.d.ts.map +1 -0
  641. package/lib/dist/resolution/dart-local-scope.js +565 -0
  642. package/lib/dist/resolution/dart-local-scope.js.map +1 -0
  643. package/lib/dist/resolution/expo-router-synthesizer.js +0 -52
  644. package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -1
  645. package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
  646. package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
  647. package/lib/dist/resolution/frameworks/angular-router.js +959 -0
  648. package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
  649. package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
  650. package/lib/dist/resolution/frameworks/astro.js +30 -60
  651. package/lib/dist/resolution/frameworks/astro.js.map +1 -1
  652. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts +18 -1
  653. package/lib/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -1
  654. package/lib/dist/resolution/frameworks/cargo-workspace.js +65 -15
  655. package/lib/dist/resolution/frameworks/cargo-workspace.js.map +1 -1
  656. package/lib/dist/resolution/frameworks/cics.d.ts.map +1 -1
  657. package/lib/dist/resolution/frameworks/cics.js +7 -33
  658. package/lib/dist/resolution/frameworks/cics.js.map +1 -1
  659. package/lib/dist/resolution/frameworks/codeigniter.d.ts +23 -0
  660. package/lib/dist/resolution/frameworks/codeigniter.d.ts.map +1 -0
  661. package/lib/dist/resolution/frameworks/codeigniter.js +271 -0
  662. package/lib/dist/resolution/frameworks/codeigniter.js.map +1 -0
  663. package/lib/dist/resolution/frameworks/component-folder.d.ts +17 -0
  664. package/lib/dist/resolution/frameworks/component-folder.d.ts.map +1 -0
  665. package/lib/dist/resolution/frameworks/component-folder.js +11 -0
  666. package/lib/dist/resolution/frameworks/component-folder.js.map +1 -0
  667. package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
  668. package/lib/dist/resolution/frameworks/csharp.js +106 -101
  669. package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
  670. package/lib/dist/resolution/frameworks/drupal.d.ts +17 -8
  671. package/lib/dist/resolution/frameworks/drupal.d.ts.map +1 -1
  672. package/lib/dist/resolution/frameworks/drupal.js +377 -142
  673. package/lib/dist/resolution/frameworks/drupal.js.map +1 -1
  674. package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
  675. package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
  676. package/lib/dist/resolution/frameworks/expo-modules.js +79 -65
  677. package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
  678. package/lib/dist/resolution/frameworks/expo-router.d.ts +6 -0
  679. package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
  680. package/lib/dist/resolution/frameworks/expo-router.js +64 -183
  681. package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
  682. package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
  683. package/lib/dist/resolution/frameworks/express.js +215 -173
  684. package/lib/dist/resolution/frameworks/express.js.map +1 -1
  685. package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
  686. package/lib/dist/resolution/frameworks/fabric.js +11 -112
  687. package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
  688. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  689. package/lib/dist/resolution/frameworks/go.js +15 -61
  690. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  691. package/lib/dist/resolution/frameworks/goframe.js +1 -55
  692. package/lib/dist/resolution/frameworks/goframe.js.map +1 -1
  693. package/lib/dist/resolution/frameworks/index.d.ts +16 -2
  694. package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
  695. package/lib/dist/resolution/frameworks/index.js +20 -48
  696. package/lib/dist/resolution/frameworks/index.js.map +1 -1
  697. package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
  698. package/lib/dist/resolution/frameworks/java.js +209 -147
  699. package/lib/dist/resolution/frameworks/java.js.map +1 -1
  700. package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
  701. package/lib/dist/resolution/frameworks/laravel.js +291 -71
  702. package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
  703. package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
  704. package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
  705. package/lib/dist/resolution/frameworks/name-heuristic.js +33 -0
  706. package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
  707. package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
  708. package/lib/dist/resolution/frameworks/nestjs.js +236 -192
  709. package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
  710. package/lib/dist/resolution/frameworks/next-proxy.d.ts +67 -0
  711. package/lib/dist/resolution/frameworks/next-proxy.d.ts.map +1 -0
  712. package/lib/dist/resolution/frameworks/next-proxy.js +239 -0
  713. package/lib/dist/resolution/frameworks/next-proxy.js.map +1 -0
  714. package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
  715. package/lib/dist/resolution/frameworks/nextjs.js +11 -66
  716. package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
  717. package/lib/dist/resolution/frameworks/object-literal.js +0 -21
  718. package/lib/dist/resolution/frameworks/object-literal.js.map +1 -1
  719. package/lib/dist/resolution/frameworks/package-deps.d.ts +11 -7
  720. package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -1
  721. package/lib/dist/resolution/frameworks/package-deps.js +35 -26
  722. package/lib/dist/resolution/frameworks/package-deps.js.map +1 -1
  723. package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
  724. package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
  725. package/lib/dist/resolution/frameworks/page-component.js +31 -0
  726. package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
  727. package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
  728. package/lib/dist/resolution/frameworks/play.js +27 -33
  729. package/lib/dist/resolution/frameworks/play.js.map +1 -1
  730. package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
  731. package/lib/dist/resolution/frameworks/python.js +106 -116
  732. package/lib/dist/resolution/frameworks/python.js.map +1 -1
  733. package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
  734. package/lib/dist/resolution/frameworks/react-native.js +1 -166
  735. package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
  736. package/lib/dist/resolution/frameworks/react-router.d.ts +17 -7
  737. package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
  738. package/lib/dist/resolution/frameworks/react-router.js +21 -79
  739. package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
  740. package/lib/dist/resolution/frameworks/react.d.ts +68 -1
  741. package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
  742. package/lib/dist/resolution/frameworks/react.js +1721 -114
  743. package/lib/dist/resolution/frameworks/react.js.map +1 -1
  744. package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
  745. package/lib/dist/resolution/frameworks/ruby.js +152 -52
  746. package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
  747. package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
  748. package/lib/dist/resolution/frameworks/rust.js +51 -70
  749. package/lib/dist/resolution/frameworks/rust.js.map +1 -1
  750. package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
  751. package/lib/dist/resolution/frameworks/svelte.js +9 -74
  752. package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
  753. package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -1
  754. package/lib/dist/resolution/frameworks/sveltekit-router.js +8 -46
  755. package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -1
  756. package/lib/dist/resolution/frameworks/swift-objc.js +0 -97
  757. package/lib/dist/resolution/frameworks/swift-objc.js.map +1 -1
  758. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  759. package/lib/dist/resolution/frameworks/swift.js +199 -167
  760. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  761. package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -1
  762. package/lib/dist/resolution/frameworks/tanstack-router.js +9 -130
  763. package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -1
  764. package/lib/dist/resolution/frameworks/terraform.js +1 -85
  765. package/lib/dist/resolution/frameworks/terraform.js.map +1 -1
  766. package/lib/dist/resolution/frameworks/vue-router.d.ts +26 -10
  767. package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
  768. package/lib/dist/resolution/frameworks/vue-router.js +147 -147
  769. package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
  770. package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
  771. package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
  772. package/lib/dist/resolution/frameworks/vue.js +69 -107
  773. package/lib/dist/resolution/frameworks/vue.js.map +1 -1
  774. package/lib/dist/resolution/go-func-field-synthesizer.d.ts +58 -0
  775. package/lib/dist/resolution/go-func-field-synthesizer.d.ts.map +1 -0
  776. package/lib/dist/resolution/go-func-field-synthesizer.js +696 -0
  777. package/lib/dist/resolution/go-func-field-synthesizer.js.map +1 -0
  778. package/lib/dist/resolution/go-module.d.ts +23 -7
  779. package/lib/dist/resolution/go-module.d.ts.map +1 -1
  780. package/lib/dist/resolution/go-module.js +21 -24
  781. package/lib/dist/resolution/go-module.js.map +1 -1
  782. package/lib/dist/resolution/go-stdlib-methods.d.ts +9 -0
  783. package/lib/dist/resolution/go-stdlib-methods.d.ts.map +1 -0
  784. package/lib/dist/resolution/go-stdlib-methods.js +224 -0
  785. package/lib/dist/resolution/go-stdlib-methods.js.map +1 -0
  786. package/lib/dist/resolution/goframe-synthesizer.js +2 -53
  787. package/lib/dist/resolution/goframe-synthesizer.js.map +1 -1
  788. package/lib/dist/resolution/import-resolver.d.ts +298 -23
  789. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  790. package/lib/dist/resolution/import-resolver.js +1802 -1280
  791. package/lib/dist/resolution/import-resolver.js.map +1 -1
  792. package/lib/dist/resolution/index.d.ts +449 -5
  793. package/lib/dist/resolution/index.d.ts.map +1 -1
  794. package/lib/dist/resolution/index.js +1477 -981
  795. package/lib/dist/resolution/index.js.map +1 -1
  796. package/lib/dist/resolution/js-builtins.d.ts +14 -0
  797. package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
  798. package/lib/dist/resolution/js-builtins.js +15 -13
  799. package/lib/dist/resolution/js-builtins.js.map +1 -1
  800. package/lib/dist/resolution/js-class-expressions.d.ts +48 -0
  801. package/lib/dist/resolution/js-class-expressions.d.ts.map +1 -0
  802. package/lib/dist/resolution/js-class-expressions.js +25 -0
  803. package/lib/dist/resolution/js-class-expressions.js.map +1 -0
  804. package/lib/dist/resolution/js-super-calls.d.ts +18 -0
  805. package/lib/dist/resolution/js-super-calls.d.ts.map +1 -0
  806. package/lib/dist/resolution/js-super-calls.js +94 -0
  807. package/lib/dist/resolution/js-super-calls.js.map +1 -0
  808. package/lib/dist/resolution/jsx-code.d.ts +28 -0
  809. package/lib/dist/resolution/jsx-code.d.ts.map +1 -0
  810. package/lib/dist/resolution/jsx-code.js +459 -0
  811. package/lib/dist/resolution/jsx-code.js.map +1 -0
  812. package/lib/dist/resolution/lru-cache.d.ts +5 -13
  813. package/lib/dist/resolution/lru-cache.d.ts.map +1 -1
  814. package/lib/dist/resolution/lru-cache.js +43 -32
  815. package/lib/dist/resolution/lru-cache.js.map +1 -1
  816. package/lib/dist/resolution/memory-budget.js +0 -52
  817. package/lib/dist/resolution/memory-budget.js.map +1 -1
  818. package/lib/dist/resolution/module-importers.d.ts +185 -0
  819. package/lib/dist/resolution/module-importers.d.ts.map +1 -0
  820. package/lib/dist/resolution/module-importers.js +588 -0
  821. package/lib/dist/resolution/module-importers.js.map +1 -0
  822. package/lib/dist/resolution/name-matcher.d.ts +891 -8
  823. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  824. package/lib/dist/resolution/name-matcher.js +25013 -2928
  825. package/lib/dist/resolution/name-matcher.js.map +1 -1
  826. package/lib/dist/resolution/next-router-synthesizer.d.ts +19 -0
  827. package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -1
  828. package/lib/dist/resolution/next-router-synthesizer.js +46 -28
  829. package/lib/dist/resolution/next-router-synthesizer.js.map +1 -1
  830. package/lib/dist/resolution/override-parameters.d.ts +40 -0
  831. package/lib/dist/resolution/override-parameters.d.ts.map +1 -0
  832. package/lib/dist/resolution/override-parameters.js +339 -0
  833. package/lib/dist/resolution/override-parameters.js.map +1 -0
  834. package/lib/dist/resolution/parameter-flow.d.ts +218 -0
  835. package/lib/dist/resolution/parameter-flow.d.ts.map +1 -0
  836. package/lib/dist/resolution/parameter-flow.js +474 -0
  837. package/lib/dist/resolution/parameter-flow.js.map +1 -0
  838. package/lib/dist/resolution/pascal-scope.d.ts +91 -0
  839. package/lib/dist/resolution/pascal-scope.d.ts.map +1 -0
  840. package/lib/dist/resolution/pascal-scope.js +961 -0
  841. package/lib/dist/resolution/pascal-scope.js.map +1 -0
  842. package/lib/dist/resolution/path-aliases.d.ts +32 -4
  843. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  844. package/lib/dist/resolution/path-aliases.js +43 -110
  845. package/lib/dist/resolution/path-aliases.js.map +1 -1
  846. package/lib/dist/resolution/project-scans.d.ts +38 -0
  847. package/lib/dist/resolution/project-scans.d.ts.map +1 -0
  848. package/lib/dist/resolution/project-scans.js +30 -0
  849. package/lib/dist/resolution/project-scans.js.map +1 -0
  850. package/lib/dist/resolution/react-router-synthesizer.d.ts +2 -0
  851. package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
  852. package/lib/dist/resolution/react-router-synthesizer.js +67 -48
  853. package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
  854. package/lib/dist/resolution/resolver-pool.d.ts +43 -3
  855. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
  856. package/lib/dist/resolution/resolver-pool.js +55 -97
  857. package/lib/dist/resolution/resolver-pool.js.map +1 -1
  858. package/lib/dist/resolution/resolver-worker.d.ts +1 -1
  859. package/lib/dist/resolution/resolver-worker.d.ts.map +1 -1
  860. package/lib/dist/resolution/resolver-worker.js +10 -36
  861. package/lib/dist/resolution/resolver-worker.js.map +1 -1
  862. package/lib/dist/resolution/resurrect-ref.d.ts +25 -0
  863. package/lib/dist/resolution/resurrect-ref.d.ts.map +1 -0
  864. package/lib/dist/resolution/resurrect-ref.js +19 -0
  865. package/lib/dist/resolution/resurrect-ref.js.map +1 -0
  866. package/lib/dist/resolution/ruby-constant-paths.d.ts +56 -0
  867. package/lib/dist/resolution/ruby-constant-paths.d.ts.map +1 -0
  868. package/lib/dist/resolution/ruby-constant-paths.js +255 -0
  869. package/lib/dist/resolution/ruby-constant-paths.js.map +1 -0
  870. package/lib/dist/resolution/ruby-parameter-flow.d.ts +10 -0
  871. package/lib/dist/resolution/ruby-parameter-flow.d.ts.map +1 -0
  872. package/lib/dist/resolution/ruby-parameter-flow.js +801 -0
  873. package/lib/dist/resolution/ruby-parameter-flow.js.map +1 -0
  874. package/lib/dist/resolution/rust-scopes.d.ts +120 -0
  875. package/lib/dist/resolution/rust-scopes.d.ts.map +1 -0
  876. package/lib/dist/resolution/rust-scopes.js +730 -0
  877. package/lib/dist/resolution/rust-scopes.js.map +1 -0
  878. package/lib/dist/resolution/shopify-themes.d.ts +10 -0
  879. package/lib/dist/resolution/shopify-themes.d.ts.map +1 -0
  880. package/lib/dist/resolution/shopify-themes.js +19 -0
  881. package/lib/dist/resolution/shopify-themes.js.map +1 -0
  882. package/lib/dist/resolution/strip-comments.d.ts +20 -1
  883. package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
  884. package/lib/dist/resolution/strip-comments.js +164 -119
  885. package/lib/dist/resolution/strip-comments.js.map +1 -1
  886. package/lib/dist/resolution/sveltekit-synthesizer.js +0 -64
  887. package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -1
  888. package/lib/dist/resolution/swift-objc-bridge.js +0 -160
  889. package/lib/dist/resolution/swift-objc-bridge.js.map +1 -1
  890. package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
  891. package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
  892. package/lib/dist/resolution/swift-type-visibility.js +355 -0
  893. package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
  894. package/lib/dist/resolution/synth-utils.js +1 -22
  895. package/lib/dist/resolution/synth-utils.js.map +1 -1
  896. package/lib/dist/resolution/tanstack-router-synthesizer.js +0 -32
  897. package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -1
  898. package/lib/dist/resolution/tauri-synthesizer.d.ts +37 -0
  899. package/lib/dist/resolution/tauri-synthesizer.d.ts.map +1 -0
  900. package/lib/dist/resolution/tauri-synthesizer.js +1038 -0
  901. package/lib/dist/resolution/tauri-synthesizer.js.map +1 -0
  902. package/lib/dist/resolution/tier-synthesizer.d.ts +7 -2
  903. package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
  904. package/lib/dist/resolution/tier-synthesizer.js +318 -121
  905. package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
  906. package/lib/dist/resolution/type-parameters.d.ts +34 -0
  907. package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
  908. package/lib/dist/resolution/type-parameters.js +285 -0
  909. package/lib/dist/resolution/type-parameters.js.map +1 -0
  910. package/lib/dist/resolution/types.d.ts +209 -10
  911. package/lib/dist/resolution/types.d.ts.map +1 -1
  912. package/lib/dist/resolution/types.js +0 -47
  913. package/lib/dist/resolution/types.js.map +1 -1
  914. package/lib/dist/resolution/vbnet-receivers.d.ts +92 -0
  915. package/lib/dist/resolution/vbnet-receivers.d.ts.map +1 -0
  916. package/lib/dist/resolution/vbnet-receivers.js +1482 -0
  917. package/lib/dist/resolution/vbnet-receivers.js.map +1 -0
  918. package/lib/dist/resolution/vue-router-synthesizer.js +0 -31
  919. package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -1
  920. package/lib/dist/resolution/workspace-packages.d.ts +206 -15
  921. package/lib/dist/resolution/workspace-packages.d.ts.map +1 -1
  922. package/lib/dist/resolution/workspace-packages.js +570 -152
  923. package/lib/dist/resolution/workspace-packages.js.map +1 -1
  924. package/lib/dist/search/identifier-segments.js +2 -93
  925. package/lib/dist/search/identifier-segments.js.map +1 -1
  926. package/lib/dist/search/query-parser.js +0 -54
  927. package/lib/dist/search/query-parser.js.map +1 -1
  928. package/lib/dist/search/query-paths.js +0 -167
  929. package/lib/dist/search/query-paths.js.map +1 -1
  930. package/lib/dist/search/query-utils.d.ts +44 -0
  931. package/lib/dist/search/query-utils.d.ts.map +1 -1
  932. package/lib/dist/search/query-utils.js +120 -198
  933. package/lib/dist/search/query-utils.js.map +1 -1
  934. package/lib/dist/sync/git-hooks.d.ts +14 -5
  935. package/lib/dist/sync/git-hooks.d.ts.map +1 -1
  936. package/lib/dist/sync/git-hooks.js +118 -65
  937. package/lib/dist/sync/git-hooks.js.map +1 -1
  938. package/lib/dist/sync/index.js +0 -14
  939. package/lib/dist/sync/index.js.map +1 -1
  940. package/lib/dist/sync/watch-policy.js +0 -45
  941. package/lib/dist/sync/watch-policy.js.map +1 -1
  942. package/lib/dist/sync/watcher.d.ts +29 -11
  943. package/lib/dist/sync/watcher.d.ts.map +1 -1
  944. package/lib/dist/sync/watcher.js +83 -487
  945. package/lib/dist/sync/watcher.js.map +1 -1
  946. package/lib/dist/sync/worktree.d.ts +29 -2
  947. package/lib/dist/sync/worktree.d.ts.map +1 -1
  948. package/lib/dist/sync/worktree.js +59 -78
  949. package/lib/dist/sync/worktree.js.map +1 -1
  950. package/lib/dist/telemetry/index.d.ts.map +1 -1
  951. package/lib/dist/telemetry/index.js +68 -146
  952. package/lib/dist/telemetry/index.js.map +1 -1
  953. package/lib/dist/types.d.ts +46 -0
  954. package/lib/dist/types.d.ts.map +1 -1
  955. package/lib/dist/types.js +15 -44
  956. package/lib/dist/types.js.map +1 -1
  957. package/lib/dist/ui/color.js +0 -19
  958. package/lib/dist/ui/color.js.map +1 -1
  959. package/lib/dist/ui/glyphs.js +2 -45
  960. package/lib/dist/ui/glyphs.js.map +1 -1
  961. package/lib/dist/ui/shimmer-progress.js +0 -21
  962. package/lib/dist/ui/shimmer-progress.js.map +1 -1
  963. package/lib/dist/ui/shimmer-worker.js +0 -22
  964. package/lib/dist/ui/shimmer-worker.js.map +1 -1
  965. package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -1
  966. package/lib/dist/ui-server/api/deadcode.js +2 -31
  967. package/lib/dist/ui-server/api/deadcode.js.map +1 -1
  968. package/lib/dist/ui-server/api/effects.d.ts +7 -0
  969. package/lib/dist/ui-server/api/effects.d.ts.map +1 -1
  970. package/lib/dist/ui-server/api/effects.js +20 -103
  971. package/lib/dist/ui-server/api/effects.js.map +1 -1
  972. package/lib/dist/ui-server/api/entrypoints.d.ts +6 -0
  973. package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -1
  974. package/lib/dist/ui-server/api/entrypoints.js +73 -130
  975. package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
  976. package/lib/dist/ui-server/api/events.js +0 -145
  977. package/lib/dist/ui-server/api/events.js.map +1 -1
  978. package/lib/dist/ui-server/api/file.js +0 -80
  979. package/lib/dist/ui-server/api/file.js.map +1 -1
  980. package/lib/dist/ui-server/api/filecode.js +0 -95
  981. package/lib/dist/ui-server/api/filecode.js.map +1 -1
  982. package/lib/dist/ui-server/api/flow.js +0 -149
  983. package/lib/dist/ui-server/api/flow.js.map +1 -1
  984. package/lib/dist/ui-server/api/hierarchy.js +0 -28
  985. package/lib/dist/ui-server/api/hierarchy.js.map +1 -1
  986. package/lib/dist/ui-server/api/index.js +0 -88
  987. package/lib/dist/ui-server/api/index.js.map +1 -1
  988. package/lib/dist/ui-server/api/map.d.ts +41 -6
  989. package/lib/dist/ui-server/api/map.d.ts.map +1 -1
  990. package/lib/dist/ui-server/api/map.js +95 -308
  991. package/lib/dist/ui-server/api/map.js.map +1 -1
  992. package/lib/dist/ui-server/api/node.d.ts.map +1 -1
  993. package/lib/dist/ui-server/api/node.js +4 -109
  994. package/lib/dist/ui-server/api/node.js.map +1 -1
  995. package/lib/dist/ui-server/api/nodes.js +0 -16
  996. package/lib/dist/ui-server/api/nodes.js.map +1 -1
  997. package/lib/dist/ui-server/api/program.js +0 -90
  998. package/lib/dist/ui-server/api/program.js.map +1 -1
  999. package/lib/dist/ui-server/api/respond.js +0 -60
  1000. package/lib/dist/ui-server/api/respond.js.map +1 -1
  1001. package/lib/dist/ui-server/api/route-roots.d.ts +6 -0
  1002. package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
  1003. package/lib/dist/ui-server/api/route-roots.js +18 -39
  1004. package/lib/dist/ui-server/api/route-roots.js.map +1 -1
  1005. package/lib/dist/ui-server/api/routes.d.ts +2 -0
  1006. package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
  1007. package/lib/dist/ui-server/api/routes.js +47 -47
  1008. package/lib/dist/ui-server/api/routes.js.map +1 -1
  1009. package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
  1010. package/lib/dist/ui-server/api/screens.js +16 -171
  1011. package/lib/dist/ui-server/api/screens.js.map +1 -1
  1012. package/lib/dist/ui-server/api/search.js +0 -62
  1013. package/lib/dist/ui-server/api/search.js.map +1 -1
  1014. package/lib/dist/ui-server/api/session.js +0 -58
  1015. package/lib/dist/ui-server/api/session.js.map +1 -1
  1016. package/lib/dist/ui-server/api/source.d.ts.map +1 -1
  1017. package/lib/dist/ui-server/api/source.js +0 -161
  1018. package/lib/dist/ui-server/api/source.js.map +1 -1
  1019. package/lib/dist/ui-server/api/stats.js +0 -58
  1020. package/lib/dist/ui-server/api/stats.js.map +1 -1
  1021. package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
  1022. package/lib/dist/ui-server/api/steps.js +105 -373
  1023. package/lib/dist/ui-server/api/steps.js.map +1 -1
  1024. package/lib/dist/ui-server/api/trail-store.d.ts +3 -3
  1025. package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -1
  1026. package/lib/dist/ui-server/api/trail-store.js +24 -106
  1027. package/lib/dist/ui-server/api/trail-store.js.map +1 -1
  1028. package/lib/dist/ui-server/api/trails.d.ts.map +1 -1
  1029. package/lib/dist/ui-server/api/trails.js +20 -94
  1030. package/lib/dist/ui-server/api/trails.js.map +1 -1
  1031. package/lib/dist/ui-server/api/when.d.ts +10 -2
  1032. package/lib/dist/ui-server/api/when.d.ts.map +1 -1
  1033. package/lib/dist/ui-server/api/when.js +32 -44
  1034. package/lib/dist/ui-server/api/when.js.map +1 -1
  1035. package/lib/dist/ui-server/api/wire.js +0 -58
  1036. package/lib/dist/ui-server/api/wire.js.map +1 -1
  1037. package/lib/dist/ui-server/assets.js +0 -35
  1038. package/lib/dist/ui-server/assets.js.map +1 -1
  1039. package/lib/dist/ui-server/constants.js +0 -26
  1040. package/lib/dist/ui-server/constants.js.map +1 -1
  1041. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
  1042. package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
  1043. package/lib/dist/ui-server/highlight/bounded-tokenize.js +114 -0
  1044. package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
  1045. package/lib/dist/ui-server/highlight/index.d.ts.map +1 -1
  1046. package/lib/dist/ui-server/highlight/index.js +7 -133
  1047. package/lib/dist/ui-server/highlight/index.js.map +1 -1
  1048. package/lib/dist/ui-server/highlight/languages.d.ts +3 -3
  1049. package/lib/dist/ui-server/highlight/languages.js +0 -31
  1050. package/lib/dist/ui-server/highlight/languages.js.map +1 -1
  1051. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
  1052. package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
  1053. package/lib/dist/ui-server/highlight/tokenize-worker.js +15 -0
  1054. package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
  1055. package/lib/dist/ui-server/index.d.ts +25 -0
  1056. package/lib/dist/ui-server/index.d.ts.map +1 -1
  1057. package/lib/dist/ui-server/index.js +35 -103
  1058. package/lib/dist/ui-server/index.js.map +1 -1
  1059. package/lib/dist/ui-server/open-browser.js +0 -34
  1060. package/lib/dist/ui-server/open-browser.js.map +1 -1
  1061. package/lib/dist/ui-server/security.d.ts +5 -0
  1062. package/lib/dist/ui-server/security.d.ts.map +1 -1
  1063. package/lib/dist/ui-server/security.js +11 -147
  1064. package/lib/dist/ui-server/security.js.map +1 -1
  1065. package/lib/dist/ui-server/static.js +0 -41
  1066. package/lib/dist/ui-server/static.js.map +1 -1
  1067. package/lib/dist/upgrade/index.d.ts +61 -10
  1068. package/lib/dist/upgrade/index.d.ts.map +1 -1
  1069. package/lib/dist/upgrade/index.js +191 -225
  1070. package/lib/dist/upgrade/index.js.map +1 -1
  1071. package/lib/dist/upgrade/remove-binary.js +2 -67
  1072. package/lib/dist/upgrade/remove-binary.js.map +1 -1
  1073. package/lib/dist/upgrade/update-check.js +1 -81
  1074. package/lib/dist/upgrade/update-check.js.map +1 -1
  1075. package/lib/dist/utils.d.ts +69 -1
  1076. package/lib/dist/utils.d.ts.map +1 -1
  1077. package/lib/dist/utils.js +224 -266
  1078. package/lib/dist/utils.js.map +1 -1
  1079. package/lib/dist/viewer/assets/{index-D4S7YUPf.js → index-BSGpxBr9.js} +60 -58
  1080. package/lib/dist/viewer/index.html +1 -1
  1081. package/lib/dist/worker-teardown.d.ts +48 -0
  1082. package/lib/dist/worker-teardown.d.ts.map +1 -0
  1083. package/lib/dist/worker-teardown.js +53 -0
  1084. package/lib/dist/worker-teardown.js.map +1 -0
  1085. package/lib/kernel/codegraph-kernel.node +2 -2
  1086. package/lib/node_modules/.package-lock.json +4 -4
  1087. package/lib/node_modules/ignore/README.md +138 -8
  1088. package/lib/node_modules/ignore/index.d.ts +56 -20
  1089. package/lib/node_modules/ignore/index.js +1033 -221
  1090. package/lib/node_modules/ignore/legacy.js +871 -178
  1091. package/lib/node_modules/ignore/package.json +10 -4
  1092. package/lib/package.json +14 -8
  1093. package/node.exe +2 -2
  1094. package/package.json +1 -1
@@ -1,9 +1,4 @@
1
1
  "use strict";
2
- /**
3
- * Directory Management
4
- *
5
- * Manages the .codegraph/ directory structure for CodeGraph data.
6
- */
7
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
8
3
  if (k2 === undefined) k2 = k;
9
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -48,6 +43,7 @@ exports.hasSchemalessDb = hasSchemalessDb;
48
43
  exports.hasForeignDbFile = hasForeignDbFile;
49
44
  exports.unsafeIndexRootReason = unsafeIndexRootReason;
50
45
  exports.statInode = statInode;
46
+ exports.canonicalProjectRoot = canonicalProjectRoot;
51
47
  exports.isSameIndexRoot = isSameIndexRoot;
52
48
  exports.findNearestCodeGraphRoot = findNearestCodeGraphRoot;
53
49
  exports.findIndexedSubprojectRoots = findIndexedSubprojectRoots;
@@ -57,6 +53,7 @@ exports.extractCodeTokens = extractCodeTokens;
57
53
  exports.isStructuralPrompt = isStructuralPrompt;
58
54
  exports.capPromptHookInjection = capPromptHookInjection;
59
55
  exports.planFrontload = planFrontload;
56
+ exports.makeGitignoreLocalOnly = makeGitignoreLocalOnly;
60
57
  exports.createDirectory = createDirectory;
61
58
  exports.removeDirectory = removeDirectory;
62
59
  exports.listDirectoryContents = listDirectoryContents;
@@ -64,38 +61,19 @@ exports.getDirectorySize = getDirectorySize;
64
61
  exports.ensureSubdirectory = ensureSubdirectory;
65
62
  exports.validateDirectory = validateDirectory;
66
63
  exports.isTaskNotification = isTaskNotification;
64
+ exports.isAgentMessage = isAgentMessage;
65
+ exports.isCrossSessionMessage = isCrossSessionMessage;
66
+ exports.stripSystemReminders = stripSystemReminders;
67
+ const child_process_1 = require("child_process");
67
68
  const fs = __importStar(require("fs"));
68
69
  const os = __importStar(require("os"));
69
70
  const path = __importStar(require("path"));
70
71
  const watch_policy_1 = require("./sync/watch-policy");
71
- /** The default per-project data directory name. */
72
+ const node_sqlite_1 = require("./db/node-sqlite");
73
+ const utils_1 = require("./utils");
72
74
  exports.DEFAULT_CODEGRAPH_DIR = '.codegraph';
73
- /**
74
- * The data directory name WSL gives a fresh project on a Windows drive, so it
75
- * never shares one index with CodeGraph on Windows (issue #995). Indexing and
76
- * watching skip every `.codegraph-*` sibling on both sides (#636).
77
- */
78
75
  exports.WSL_CODEGRAPH_DIR = '.codegraph-wsl';
79
76
  let warnedBadDirName = false;
80
- /**
81
- * Resolve the per-project data directory name, honoring the `CODEGRAPH_DIR`
82
- * environment override (default `.codegraph`). The override is a single path
83
- * segment that lives in the project root.
84
- *
85
- * Why this exists: two environments that share one working tree must NOT share
86
- * one `.codegraph/` — most concretely Windows-native and WSL (issue #636). The
87
- * daemon lockfile (`.codegraph/daemon.pid`) records a platform-specific pid and
88
- * socket path (a Windows named pipe vs a WSL Unix socket), and SQLite file
89
- * locking across the WSL2 ↔ Windows filesystem boundary is unreliable, so two
90
- * daemons sharing one index risks corruption. Setting `CODEGRAPH_DIR=.codegraph-win`
91
- * on one side gives each environment its own index in the same tree.
92
- *
93
- * Read live (not captured at load) so it is both process-accurate and testable.
94
- * An override that isn't a plain directory name — empty, containing a path
95
- * separator, `.`, `..`/traversal, or absolute — is ignored (we keep the
96
- * default) rather than risk writing the index outside the project or into the
97
- * project root itself; we warn once to stderr so the misconfiguration is seen.
98
- */
99
77
  function codeGraphDirName() {
100
78
  const raw = process.env.CODEGRAPH_DIR?.trim();
101
79
  if (!raw)
@@ -108,7 +86,6 @@ function codeGraphDirName() {
108
86
  if (invalid) {
109
87
  if (!warnedBadDirName) {
110
88
  warnedBadDirName = true;
111
- // stderr only — stdout is the MCP protocol channel.
112
89
  console.warn(`[codegraph] Ignoring invalid CODEGRAPH_DIR="${raw}" — it must be a plain ` +
113
90
  `directory name (no path separators, no "..", not absolute). Using "${exports.DEFAULT_CODEGRAPH_DIR}".`);
114
91
  }
@@ -116,42 +93,12 @@ function codeGraphDirName() {
116
93
  }
117
94
  return raw;
118
95
  }
119
- /**
120
- * CodeGraph directory name — a load-time snapshot of {@link codeGraphDirName}.
121
- * A running process's environment is fixed, so this equals the live value;
122
- * it's kept as a stable string export for backward compatibility. Internal code
123
- * resolves the name through {@link codeGraphDirName} / {@link getCodeGraphDir}
124
- * so the `CODEGRAPH_DIR` override always applies.
125
- */
126
96
  exports.CODEGRAPH_DIR = codeGraphDirName();
127
- /**
128
- * Is `name` (a single path segment) a CodeGraph data directory? Matches the
129
- * default `.codegraph`, the active `CODEGRAPH_DIR` override, and any
130
- * `.codegraph-*` sibling. File-watching and the indexer skip ALL of these, so
131
- * when two environments share one working tree (Windows + WSL, issue #636)
132
- * neither indexes or watches the other's index directory.
133
- */
134
97
  function isCodeGraphDataDir(name) {
135
98
  return (name === exports.DEFAULT_CODEGRAPH_DIR ||
136
99
  name === codeGraphDirName() ||
137
100
  name.startsWith(exports.DEFAULT_CODEGRAPH_DIR + '-'));
138
101
  }
139
- /**
140
- * The data directory name for one project: {@link codeGraphDirName}, except
141
- * for a project on a Windows drive under WSL (`/mnt/c/...`) with no
142
- * `CODEGRAPH_DIR` set. Windows-native CodeGraph opens `.codegraph` in that
143
- * same tree, and SQLite's locking doesn't hold across the 9p/DrvFs bridge, so
144
- * the two sharing one index fails with "disk I/O error" (issue #995). There:
145
- *
146
- * 1. `.codegraph-wsl/` exists → it. Once WSL has its own index it keeps it,
147
- * even after Windows builds a `.codegraph` beside it.
148
- * 2. `.codegraph/codegraph.db` exists → `.codegraph`. An index built before
149
- * this default is kept rather than silently rebuilt somewhere else.
150
- * 3. neither → `.codegraph-wsl`, so a fresh WSL index never shares.
151
- *
152
- * Every other host keeps the plain name without a stat: the WSL check is
153
- * cached per process.
154
- */
155
102
  function codeGraphDirNameFor(projectRoot) {
156
103
  if (process.env.CODEGRAPH_DIR?.trim() || !(0, watch_policy_1.isWslWindowsDrive)(projectRoot))
157
104
  return codeGraphDirName();
@@ -160,41 +107,19 @@ function codeGraphDirNameFor(projectRoot) {
160
107
  return exports.WSL_CODEGRAPH_DIR;
161
108
  }
162
109
  catch {
163
- // absent — fall through
164
110
  }
165
111
  if (fs.existsSync(path.join(projectRoot, exports.DEFAULT_CODEGRAPH_DIR, 'codegraph.db')))
166
112
  return exports.DEFAULT_CODEGRAPH_DIR;
167
113
  return exports.WSL_CODEGRAPH_DIR;
168
114
  }
169
- /**
170
- * Get the .codegraph directory path for a project
171
- */
172
115
  function getCodeGraphDir(projectRoot) {
173
116
  return path.join(projectRoot, codeGraphDirNameFor(projectRoot));
174
117
  }
175
- /**
176
- * Check if a project has been initialized with CodeGraph.
177
- *
178
- * Requires `.codegraph/codegraph.db` to exist AND to carry the codegraph
179
- * schema. A file that merely exists — empty, or a SQLite database with no
180
- * tables, as an interrupted `init` or a stray `touch` leaves behind — used to
181
- * count as initialized, so one such file in an ANCESTOR directory (worst
182
- * case: `$HOME`) captured the upward resolution of every project beneath it
183
- * and made their real indexes unreachable (#1895).
184
- *
185
- * The probe is cheap and gated so hot callers (the prompt hook, MCP root
186
- * resolution on every call) pay one `stat`: file size, then a read-only
187
- * SQLite open with a single `sqlite_master` lookup — memoized per path +
188
- * mtime + size so an unchanged db is never reopened. A database that cannot
189
- * be inspected counts as initialized (see probeSchema) — only a proven-absent
190
- * schema, or a file SQLite refuses as not a database, says no.
191
- */
192
118
  function isInitialized(projectRoot) {
193
119
  const codegraphDir = getCodeGraphDir(projectRoot);
194
120
  if (!fs.existsSync(codegraphDir) || !fs.statSync(codegraphDir).isDirectory()) {
195
121
  return false;
196
122
  }
197
- // Must have codegraph.db, not just .codegraph folder
198
123
  const dbPath = path.join(codegraphDir, 'codegraph.db');
199
124
  let st;
200
125
  try {
@@ -205,12 +130,6 @@ function isInitialized(projectRoot) {
205
130
  }
206
131
  return hasCodeGraphSchema(dbPath, st);
207
132
  }
208
- /**
209
- * `codegraph.db` exists at `projectRoot` but does not carry the schema, and
210
- * `init` can add it in place: an empty file, or a SQLite database without the
211
- * codegraph tables (#1895). A file that is not SQLite at all is NOT this case —
212
- * see {@link hasForeignDbFile}.
213
- */
214
133
  function hasSchemalessDb(projectRoot) {
215
134
  const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
216
135
  let st;
@@ -224,12 +143,6 @@ function hasSchemalessDb(projectRoot) {
224
143
  return false;
225
144
  return st.size === 0 || probeSchema(dbPath) === 'no-schema';
226
145
  }
227
- /**
228
- * `codegraph.db` exists at `projectRoot` and is not a SQLite database (no
229
- * header magic): SQLite refuses to open it, so `init` cannot rebuild it in
230
- * place. The caller must say so rather than promise a repair; nothing here
231
- * deletes the file.
232
- */
233
146
  function hasForeignDbFile(projectRoot) {
234
147
  const dbPath = path.join(getCodeGraphDir(projectRoot), 'codegraph.db');
235
148
  let st;
@@ -241,9 +154,7 @@ function hasForeignDbFile(projectRoot) {
241
154
  }
242
155
  return st.isFile() && st.size > 0 && probeSchema(dbPath) === 'not-sqlite';
243
156
  }
244
- /** A SQLite file header is 100 bytes; anything shorter cannot hold a schema. */
245
157
  const SQLITE_HEADER_SIZE = 100;
246
- /** SQLITE_NOTADB: SQLite read the file and it is not a database. */
247
158
  const SQLITE_NOTADB = 26;
248
159
  const schemaProbeCache = new Map();
249
160
  function hasCodeGraphSchema(dbPath, st) {
@@ -257,27 +168,10 @@ function hasCodeGraphSchema(dbPath, st) {
257
168
  schemaProbeCache.set(dbPath, { mtimeMs: st.mtimeMs, size: st.size, ok });
258
169
  return ok;
259
170
  }
260
- /**
261
- * What `codegraph.db` holds, asked of SQLite itself through a read-only
262
- * connection: the codegraph schema, a database without it, not a database at
263
- * all (SQLITE_NOTADB), or `unknown` — locked, busy, a WAL db in a directory we
264
- * cannot create `-shm` in (read-only checkout, mount, another user's tree),
265
- * disk I/O. Callers treat `unknown` as initialized: the pre-existing behaviour
266
- * for a database we cannot inspect.
267
- *
268
- * The file is never read through a descriptor of our own, not even for its
269
- * 16-byte header. Closing ANY descriptor on a database file drops every POSIX
270
- * lock this process holds on it, including those of a connection it already
271
- * has open (sqlite.org/howtocorrupt.html §2.2.1) — and the MCP server resolves
272
- * projects through isInitialized on every call while it holds the index as
273
- * its writer. SQLite's own connections share one lock table per file, so a
274
- * second connection opened and closed here leaves the first one's locks alone.
275
- */
276
171
  function probeSchema(dbPath) {
277
- // eslint-disable-next-line @typescript-eslint/no-require-imports
278
- const { DatabaseSync } = require('node:sqlite');
279
172
  let db = null;
280
173
  try {
174
+ const { DatabaseSync } = (0, node_sqlite_1.loadNodeSqlite)();
281
175
  db = new DatabaseSync(dbPath, { readOnly: true });
282
176
  const row = db.prepare("SELECT 1 AS ok FROM sqlite_master WHERE type = 'table' AND name = 'nodes'").get();
283
177
  return row !== undefined ? 'schema' : 'no-schema';
@@ -286,36 +180,12 @@ function probeSchema(dbPath) {
286
180
  return error?.errcode === SQLITE_NOTADB ? 'not-sqlite' : 'unknown';
287
181
  }
288
182
  finally {
289
- // Never hold the handle: Windows file locking would block the owner.
290
183
  try {
291
184
  db?.close();
292
185
  }
293
- catch { /* already closed */ }
186
+ catch { }
294
187
  }
295
188
  }
296
- /**
297
- * Find the nearest parent directory containing .codegraph/
298
- *
299
- * Walks up from the given path to find a CodeGraph-initialized project,
300
- * similar to how git finds .git/ directories.
301
- *
302
- * @param startPath - Directory to start searching from
303
- * @returns The project root containing .codegraph/, or null if not found
304
- */
305
- /**
306
- * Reason a directory is unsafe to use as an index ROOT, or null when it's fine.
307
- *
308
- * Indexing your home directory or a filesystem root drags in caches, `Library`,
309
- * every other project, etc. — a multi-GB index, constant file-watcher churn, and
310
- * (pre-1.0 on macOS) a file-descriptor blowup that exhausted `kern.maxfiles` and
311
- * took unrelated apps / the whole machine down (#845). The classic trigger:
312
- * running the installer or `codegraph init` from `$HOME`, which auto-indexes the
313
- * current directory. These are never intended project roots, so the installer
314
- * and `init`/`index` refuse them (overridable with `--force`).
315
- *
316
- * Pure-ish (reads only `os.homedir()` + realpath) so it's easy to unit-test.
317
- * The returned string is a human phrase that slots into "… looks like {reason}".
318
- */
319
189
  function unsafeIndexRootReason(projectRoot) {
320
190
  const resolve = (p) => {
321
191
  try {
@@ -326,33 +196,21 @@ function unsafeIndexRootReason(projectRoot) {
326
196
  }
327
197
  };
328
198
  const resolved = resolve(projectRoot);
329
- // Filesystem root: `/` on POSIX, a drive root like `C:\` on Windows.
330
199
  if (path.parse(resolved).root === resolved) {
331
200
  return 'the filesystem root';
332
201
  }
333
202
  const home = resolve(os.homedir());
334
- // Case-insensitive on macOS/Windows (case-preserving but case-insensitive FS).
335
203
  const norm = (p) => process.platform === 'darwin' || process.platform === 'win32' ? p.toLowerCase() : p;
336
204
  const r = norm(resolved);
337
205
  const h = norm(home);
338
206
  if (r === h) {
339
207
  return 'your home directory';
340
208
  }
341
- // An ancestor of home (e.g. `/Users`, `/home`) — even broader than home.
342
209
  if (h.startsWith(r + path.sep)) {
343
210
  return 'a parent of your home directory';
344
211
  }
345
212
  return null;
346
213
  }
347
- /**
348
- * `dev:ino` for a path, or null if it can't be stat'd or the platform doesn't
349
- * report a usable inode. Read as bigints: WSL DrvFs (`/mnt/c`) reports inodes
350
- * above 2^53, where a plain number rounds nearby inodes onto one value. Windows
351
- * st_ino is unreliable across handle reopens, so we deliberately return null
352
- * there — the deleted-but-open-inode hazard this guards (#925) is a POSIX
353
- * file-semantics issue that doesn't arise on Windows (an open file can't be
354
- * unlinked).
355
- */
356
214
  function statInode(p) {
357
215
  if (process.platform === 'win32')
358
216
  return null;
@@ -364,14 +222,16 @@ function statInode(p) {
364
222
  return null;
365
223
  }
366
224
  }
367
- /**
368
- * Whether two resolved index roots are one index spelled two ways — a symlinked
369
- * checkout, or a case-variant on a case-insensitive mount (macOS, NTFS, WSL
370
- * DrvFs `/mnt/c`), where `realpathSync` keeps the caller's casing (#1057).
371
- * Compares the identity of both data directories as they are NOW, so an inode
372
- * reused after a delete can't match: the deleted root no longer stats. Windows
373
- * has no usable inode, so it compares the on-disk-cased native realpaths.
374
- */
225
+ function canonicalProjectRoot(projectRoot) {
226
+ const resolved = path.resolve(projectRoot);
227
+ let canonical = resolved;
228
+ try {
229
+ canonical = fs.realpathSync.native(resolved);
230
+ }
231
+ catch {
232
+ }
233
+ return process.platform === 'win32' ? canonical.toLowerCase() : canonical;
234
+ }
375
235
  function isSameIndexRoot(a, b) {
376
236
  if (a === b)
377
237
  return true;
@@ -395,24 +255,19 @@ function findNearestCodeGraphRoot(startPath) {
395
255
  }
396
256
  const parent = path.dirname(current);
397
257
  if (parent === current)
398
- break; // Reached filesystem root
258
+ break;
399
259
  current = parent;
400
260
  }
401
- // Check root as well
402
261
  if (isInitialized(current)) {
403
262
  return current;
404
263
  }
405
264
  return null;
406
265
  }
407
- /** Heavy/irrelevant directory names the sub-project scan never descends into. */
408
266
  const SUBPROJECT_SCAN_SKIP = new Set([
409
267
  'node_modules', '.git', '.svn', '.hg', 'dist', 'build', 'out', 'target',
410
268
  'vendor', 'bin', 'obj', '.next', '.nuxt', '.svelte-kit', '.cache', 'coverage',
411
269
  '.venv', 'venv', '__pycache__', '.turbo', '.idea', '.vscode', 'tmp', 'temp',
412
270
  ]);
413
- /** Manifests that mark a directory as a project/workspace root. The down-scan
414
- * is gated on one of these so a non-project cwd (e.g. `$HOME`) is a cheap
415
- * no-op instead of a deep filesystem crawl. */
416
271
  const WORKSPACE_ROOT_MANIFESTS = [
417
272
  'package.json', 'pnpm-workspace.yaml', 'lerna.json', 'nx.json', 'turbo.json',
418
273
  'go.work', 'go.mod', 'Cargo.toml', 'pom.xml', 'build.gradle', 'build.gradle.kts',
@@ -425,16 +280,7 @@ function looksLikeProjectRoot(dir) {
425
280
  function escapeRegExp(s) {
426
281
  return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
427
282
  }
428
- /**
429
- * Indexed sub-project roots beneath `root` (bounded breadth-first scan). For
430
- * the monorepo case behind #964: the index lives in a CHILD
431
- * (`packages/x/.codegraph/`), not at the workspace root the agent's cwd points
432
- * at. Descent stops at the first indexed directory on a branch (a project's
433
- * own sub-dirs aren't separate projects) and is bounded by depth + count so it
434
- * never turns into a full-tree crawl on a large repo.
435
- */
436
283
  function findIndexedSubprojectRoots(root, opts = {}) {
437
- // A stray workspace manifest must not enable scanning home or broader roots (#1454).
438
284
  if (unsafeIndexRootReason(root) !== null)
439
285
  return [];
440
286
  const maxDepth = opts.maxDepth ?? 4;
@@ -461,22 +307,13 @@ function findIndexedSubprojectRoots(root, opts = {}) {
461
307
  if (isInitialized(child)) {
462
308
  out.push(child);
463
309
  continue;
464
- } // don't descend into an indexed project
310
+ }
465
311
  walk(child, depth + 1);
466
312
  }
467
313
  };
468
314
  walk(root, 1);
469
315
  return out;
470
316
  }
471
- /**
472
- * Whether `base` is a plausible workspace root for the sub-project down-scan.
473
- * Mirrors `planFrontload`'s manifest gate, widened to accept a bare `.git`
474
- * entry — the #1606 shape is a workspace container holding only agent config
475
- * and a `.git`, with every build manifest living in the indexed children. The
476
- * user's home directory and the filesystem root are never eligible: a stray
477
- * manifest there must not turn server startup into a scan that could adopt an
478
- * unrelated project (#1454 documents that failure mode for the prompt-hook).
479
- */
480
317
  function eligibleForSubprojectScan(base) {
481
318
  if (base === path.parse(base).root)
482
319
  return false;
@@ -493,283 +330,100 @@ function eligibleForSubprojectScan(base) {
493
330
  return true;
494
331
  return fs.existsSync(path.join(base, '.git'));
495
332
  }
496
- /**
497
- * Resolve the project root an MCP server should serve as its DEFAULT project
498
- * (#1606). Up-walk first (`findNearestCodeGraphRoot` — the common case, and
499
- * cheap). When nothing is indexed at or above `searchFrom`, run the bounded
500
- * sub-project down-scan `planFrontload` already uses, behind the workspace
501
- * gate above: EXACTLY ONE indexed sub-project is unambiguous and is adopted
502
- * as the root; zero or several yield no root, with the candidates carried so
503
- * the caller can name them instead of failing silently (#1607).
504
- *
505
- * `opts.subprojectScan: false` skips the down-scan entirely (the per-tool-call
506
- * retry path throttles it; the up-walk always runs).
507
- */
508
333
  function resolveServerRoot(searchFrom, opts = {}) {
334
+ const found = findServerRoot(searchFrom, opts);
335
+ if (!found.root && found.candidates.length === 0)
336
+ return found;
337
+ const startRefusal = fs.existsSync(searchFrom) ? (0, utils_1.sensitiveDirectoryRefusal)(searchFrom) : null;
338
+ if (!found.root)
339
+ return startRefusal ? { ...found, candidates: [] } : found;
340
+ const refusal = startRefusal ?? (0, utils_1.sensitiveDirectoryRefusal)(found.root);
341
+ return refusal ? { root: null, viaSubScan: false, candidates: [], refusal } : found;
342
+ }
343
+ function findServerRoot(searchFrom, opts) {
344
+ const none = { root: null, viaSubScan: false, candidates: [], refusal: null };
509
345
  const up = findNearestCodeGraphRoot(searchFrom);
510
346
  if (up)
511
- return { root: up, viaSubScan: false, candidates: [] };
347
+ return { root: up, viaSubScan: false, candidates: [], refusal: null };
512
348
  if (opts.subprojectScan === false)
513
- return { root: null, viaSubScan: false, candidates: [] };
349
+ return none;
514
350
  const base = path.resolve(searchFrom);
515
351
  if (!eligibleForSubprojectScan(base))
516
- return { root: null, viaSubScan: false, candidates: [] };
352
+ return none;
517
353
  const subs = findIndexedSubprojectRoots(base);
518
354
  if (subs.length === 1)
519
- return { root: subs[0], viaSubScan: true, candidates: subs };
520
- return { root: null, viaSubScan: false, candidates: subs };
355
+ return { root: subs[0], viaSubScan: true, candidates: subs, refusal: null };
356
+ return { ...none, candidates: subs };
521
357
  }
522
- /**
523
- * Unicode-aware word-boundary emulation for the keyword lists below. JS's `\b`
524
- * is ASCII-only — it fires only at `[A-Za-z0-9_]` edges — so it can never bound
525
- * a keyword whose first or last character is accented or non-Latin: `/\boù\b/`
526
- * NEVER matches "où est …" (ù isn't an ASCII word char, so no boundary exists
527
- * next to it). That is the #994 CJK mechanism resurfaced for Latin scripts and
528
- * Cyrillic (#1126). A lookaround — "not flanked by a letter, digit, or
529
- * underscore" — is the script-independent equivalent.
530
- */
531
358
  const NOT_WORD_BEFORE = /(?<![\p{L}\p{N}_])/u.source;
532
359
  const NOT_WORD_AFTER = /(?![\p{L}\p{N}_])/u.source;
533
- /**
534
- * Structural keywords matched as EXACT words (boundary on both sides): short
535
- * or ambiguous tokens where prefix matching would false-positive ("flow" in
536
- * "flower", "path" in "pathological"). Grouped by language; a term appears once
537
- * even when several languages share it. Ambiguous everyday words like PT/ES
538
- * "como" and DE "wie" are excluded: the hook instead requires another strong
539
- * keyword, a verified code token, or indexed prose segments (#1654).
540
- */
541
360
  const STRUCTURAL_WORDS = [
542
- // English — the pre-#1126 list minus what moved to STRUCTURAL_STEMS: the
543
- // bare-stem entries never matched their own derived forms (`\barchitect\b`
544
- // can't match "architecture"), and "what calls" is subsumed by the "call" stem.
545
361
  'how', 'where', 'tracing', 'flows?', 'paths?', 'reach(?:es|ed)?', 'wired?', 'breaks?', 'why does',
546
- // French (où=where, flux=flow, chemin=path, casse=breaks)
547
362
  'comment', 'où', 'flux', 'chemins?', 'casse',
548
- // Spanish (cómo=how, dónde/donde=where, flujo=flow, ruta/camino=path,
549
- // rompe=breaks, llaman / quién llama = call(s) — bare "llama" is excluded:
550
- // it's also the animal/model name in English prompts)
551
363
  'cómo', 'dónde', 'donde', 'flujos?', 'rutas?', 'caminos?', 'rompe', 'llaman', 'quién llama', 'quien llama',
552
- // Portuguese (onde=where, fluxo=flow, caminho=path)
553
364
  'onde', 'fluxos?', 'caminhos?',
554
- // German (wo/woher/wohin=where, Pfad=path, Fluss/Ablauf=flow,
555
- // bricht/kaputt=breaks, ruft=calls, hängt=depends — "hängt … von X ab"
556
- // splits the separable verb "abhängen", so the "abhäng" stem can't catch it)
557
365
  'wo', 'woher', 'wohin', 'pfade?', 'fluss', 'ablauf', 'bricht', 'kaputt', 'ruft', 'hängt',
558
- // Italian (dove=where, flusso=flow, percorso/i=path)
559
366
  'dove', 'flusso', 'percors[oi]',
560
- // Russian (как=how, где=where, путь/пути=path, работает=works)
561
367
  'как', 'где', 'путь', 'пути', 'работает',
562
- // Ukrainian (як=how, де=where, потік=flow — обліque cases reuse the RU
563
- // "поток" stem; працює=works)
564
368
  'як', 'де', 'потік', 'працює',
565
- // Dutch (hoe=how, waar=where, roept=calls, werkt=works, aangeroepen=called —
566
- // the ge- participle escapes the "aanroep" stem)
567
369
  'hoe', 'waar', 'roept', 'werkt', 'aangeroepen',
568
- // Polish + Czech (jak=how — shared; gdzie/kde=where, cesta=path)
569
370
  'jak', 'gdzie', 'kde', 'cesta',
570
- // Romanian (cum=how, unde=where; flux is shared with French)
571
371
  'cum', 'unde',
572
- // Hungarian (hogyan=how, hol=where)
573
372
  'hogyan', 'hol',
574
- // Turkish (nasıl=how, mimari=architecture, takip=trace/follow)
575
373
  'nasıl', 'mimari', 'takip',
576
- // Indonesian/Malay (bagaimana=how, di mana/dimana=where, alur=flow, jalur=path)
577
374
  'bagaimana', 'di mana', 'dimana', 'alur', 'jalur',
578
- // Vietnamese — spaced Latin with heavy diacritics, the exact class ASCII `\b`
579
- // breaks (làm sao/thế nào=how, ở đâu=where, gọi=call, phụ thuộc=depend,
580
- // ảnh hưởng=affect, kiến trúc=architecture, cấu trúc=structure, luồng=flow,
581
- // đường dẫn=path, hoạt động=works, giải thích=explain, theo dõi=trace)
582
375
  'làm sao', 'thế nào', 'ở đâu', 'gọi', 'phụ thuộc', 'ảnh hưởng', 'kiến trúc',
583
376
  'cấu trúc', 'luồng', 'đường dẫn', 'hoạt động', 'giải thích', 'theo dõi',
584
- // Swedish / Danish / Norwegian (hur/hvordan=how, hvor=where, beror=depends,
585
- // flöde=flow)
586
377
  'hur', 'hvordan', 'hvor', 'beror', 'flöde',
587
- // Finnish (miten=how, missä=where, toimii=works)
588
378
  'miten', 'missä', 'toimii',
589
- // Greek (πώς=how, πού=where — accented forms only: unaccented πως/που are
590
- // ubiquitous conjunctions; καλεί=calls, δομή=structure, ροή=flow)
591
379
  'πώς', 'πού', 'καλεί', 'δομή', 'ροή',
592
- // Hindi (कैसे=how, कहाँ/कहां=where, कॉल=call, निर्भर=depends,
593
- // संरचना=structure, प्रवाह=flow)
594
380
  'कैसे', 'कहाँ', 'कहां', 'कॉल', 'निर्भर', 'संरचना', 'प्रवाह',
595
381
  ];
596
- /**
597
- * Structural keyword STEMS matched as word PREFIXES (boundary on the left
598
- * only), so derived forms match without enumerating each: "architect" fires on
599
- * architecture/architectural, "depend" on depends/dependency/dependencies,
600
- * "вызыва" on вызывает/вызывается. Mid-word occurrences stay excluded —
601
- * "restructure"/"independent" don't fire — so precision stays close to the
602
- * exact-word class. Add a stem only when every plausible completion is still a
603
- * structural word; a stem with ordinary-English completions must instead
604
- * enumerate its structural suffixes and re-assert the right boundary (see the
605
- * four bounded English entries below, #1138).
606
- */
607
382
  const STRUCTURAL_STEMS = [
608
- // English + the Latin-script languages that share the spelling (French
609
- // architecture/structure/trace/impact, Spanish depende/implementa/impacto, …).
610
- // call/trace/affect/connect are NOT safe as open prefixes — callus,
611
- // calligraphy, Connecticut, connective, affectionate, Tracey are ordinary
612
- // words that would false-fire the full-explore tier (#1138) — so they carry
613
- // an enumerated suffix set + right boundary. "tracing" lives in
614
- // STRUCTURAL_WORDS (the e is dropped, so no trace-prefix form matches it).
615
383
  'architect', 'structur', 'depend', 'implement', 'impact', 'explain',
616
384
  `call(?:s|ing|ed|ers?|backs?|able|sites?)?${NOT_WORD_AFTER}`,
617
385
  `trace(?:s|d|rs?)?${NOT_WORD_AFTER}`,
618
386
  `affect(?:s|ed|ing)?${NOT_WORD_AFTER}`,
619
387
  `connect(?:s|ed|ing|ions?|ors?|ivity)?${NOT_WORD_AFTER}`,
620
- // French (appel(le)=call, dépend=depends, implément(e)=implement,
621
- // connex(ion)=connection, expliqu(e)=explain, fonctionn(e/ement)=works)
622
388
  'appel', 'dépend', 'implément', 'connex', 'expliqu', 'fonctionn',
623
- // Spanish (llamad(a)=call, afect(a)=affect, conect(a)/conexi(ón)=connect,
624
- // arquitec(tura)=architecture, estructur(a)=structure, funcion(a)=works,
625
- // traza(r)=trace, explica=explain)
626
389
  'llamad', 'afect', 'conect', 'conexi', 'arquitec', 'estructur', 'funcion', 'traza', 'explica',
627
- // Portuguese (chama(da)=call, afeta=affect, arquitet(ura)=architecture,
628
- // estrutur(a)=structure, quebra(do)=breaks)
629
390
  'chama', 'afeta', 'arquitet', 'estrutur', 'quebra',
630
- // German (abhäng(t)=depend, Auswirkung=impact, beeinfluss(t)=affect,
631
- // verbind(et)=connect, Architektur, Struktur, funktionier(t)=works,
632
- // Aufruf/aufgerufen=call, erklär(t)=explain, verfolg(en)=trace)
633
391
  'abhäng', 'auswirkung', 'beeinfluss', 'verbind', 'architekt', 'struktur', 'funktionier', 'aufruf', 'aufgerufen', 'erklär', 'verfolg',
634
- // Italian (chiam(a/ata)=call, dipend(e/enza)=depend, impatt(o)=impact,
635
- // connett(e)/conness(ione)=connect, architett(ura), struttur(a),
636
- // funzion(a/amento)=works, tracci(a)=trace, spiega(mi)=explain)
637
392
  'chiam', 'dipend', 'impatt', 'connett', 'conness', 'architett', 'struttur', 'funzion', 'tracci', 'spiega',
638
- // Russian (вызыва(ет)=calls, завис(ит)=depends, влия(ет)=affects,
639
- // реализ(ация)=implementation, структур(а), архитектур(а),
640
- // трассир(овка)=trace, лома(ет)=breaks, объясн(и)=explain, поток=flow)
641
393
  'вызыва', 'завис', 'влия', 'реализ', 'структур', 'архитектур', 'трассир', 'лома', 'объясн', 'поток',
642
- // Ukrainian — і/и spellings diverge from Russian (виклика(є)=calls,
643
- // залеж(ить)=depends, вплива(є)=affects, архітектур(а), реаліз(ація),
644
- // поясн(и)=explain, шлях(у)=path; структур(а) is shared with Russian)
645
394
  'виклика', 'залеж', 'вплива', 'архітектур', 'реаліз', 'поясн', 'шлях',
646
- // Dutch (aanroep(en)=call, afhankelijk(heid)=depends, beïnvloed(t)=affects,
647
- // structuur — "structur" can't reach the uu; uitleg(gen)=explain)
648
395
  'aanroep', 'afhankelijk', 'beïnvloed', 'structuur', 'uitleg',
649
- // Polish (wywoł(uje)=calls, zależ(y)=depends, wpływ(a)=affects/impact,
650
- // przepływ=flow, ścieżk(a)=path, działa(nie)=works, wyjaśni(j)=explain,
651
- // śledz(enie)=trace; architektura/struktura fire via the German stems)
652
396
  'wywoł', 'zależ', 'wpływ', 'przepływ', 'ścieżk', 'działa', 'wyjaśni', 'śledz',
653
- // Czech (volá(ní)=calls, závis(í)=depends, ovlivň(uje)=affects,
654
- // funguj(e)=works, vysvětl(i)=explain)
655
397
  'volá', 'závis', 'ovlivň', 'funguj', 'vysvětl',
656
- // Romanian (apel(ează)=calls, depind(e)=depends — i not e, so "depend" misses
657
- // it; arhitectur(a) — no c; funcțion(ează)=works, explică=explain)
658
398
  'apel', 'depind', 'arhitectur', 'funcțion', 'explică',
659
- // Hungarian (hív(ja)=calls, függ(őség)=depends, működ(ik)=works,
660
- // struktúr(a) — ú escapes "struktur"; magyaráz(d)=explain;
661
- // architektúra fires via the German stem)
662
399
  'hív', 'függ', 'működ', 'struktúr', 'magyaráz',
663
- // Turkish — agglutinative, so stems beat exact words (nere(de/ye/den)=where,
664
- // çağır/çağrı=call, bağıml(ı)=depends, bağlant(ı)=connection, akış(ı)=flow,
665
- // etkile(r)/etkisi=affects/impact)
666
400
  'nere', 'çağır', 'çağrı', 'bağıml', 'bağlant', 'akış', 'etkile', 'etkisi',
667
- // Indonesian/Malay — me-/di-/ber- prefixes block a bare stem, so affixed
668
- // forms are listed too (panggil(an)/memanggil/dipanggil=call,
669
- // bergantung/tergantung=depends, pengaruh/mempengaruhi/memengaruhi=affect,
670
- // arsitektur=architecture, fungsi/berfungsi=works,
671
- // jelaskan/menjelaskan=explain)
672
401
  'panggil', 'memanggil', 'dipanggil', 'bergantung', 'tergantung', 'pengaruh',
673
402
  'mempengaruhi', 'memengaruhi', 'arsitektur', 'fungsi', 'berfungsi', 'jelaskan', 'menjelaskan',
674
- // Swedish / Danish / Norwegian (anrop(ar)=calls, påverk(ar)/påvirk(er)=affects,
675
- // afhæng(er)/avheng(er)=depends, förklar(a)/forklar=explain,
676
- // arkitektur — k not ch; funger(ar/er)=works)
677
403
  'anrop', 'påverk', 'påvirk', 'afhæng', 'avheng', 'förklar', 'forklar', 'arkitektur', 'funger',
678
- // Finnish (kutsu(u)=calls, riippu(u)=depends, arkkitehtuur(i),
679
- // rakente(en)=structure, selit(ä)=explain)
680
404
  'kutsu', 'riippu', 'arkkitehtuur', 'rakente', 'selit',
681
- // Greek — accented and unaccented stem spellings both occur
682
- // (εξαρτ(άται)=depends, επηρε(άζει)=affects, αρχιτεκτονικ(ή),
683
- // διαδρομ(ή)=path, εξηγ/εξήγ(ησε)=explain)
684
405
  'εξαρτ', 'επηρε', 'αρχιτεκτονικ', 'διαδρομ', 'εξηγ', 'εξήγ',
685
- // Hindi (समझा(ओ/इए)=explain, आर्किटेक्चर=architecture)
686
406
  'समझा', 'आर्किटेक्चर',
687
407
  ];
688
408
  const STRUCTURAL_WORDS_RE = new RegExp(`${NOT_WORD_BEFORE}(?:${STRUCTURAL_WORDS.join('|')})${NOT_WORD_AFTER}`, 'iu');
689
409
  const STRUCTURAL_STEMS_RE = new RegExp(`${NOT_WORD_BEFORE}(?:${STRUCTURAL_STEMS.join('|')})`, 'iu');
690
- /**
691
- * Structural keywords matched as bare SUBSTRINGS, for languages where a
692
- * boundary can't be relied on: scripts with no word separators (Chinese —
693
- * simplified AND traditional; the original #994 set was simplified-only —
694
- * Japanese, Thai), Korean (spaced, but particles attach directly to the noun:
695
- * 구조가/구조를), and Arabic / Farsi / Hebrew (spaced, but proclitics attach to
696
- * the word: وكيف "and-how", והמבנה "and-the-structure"). JS's `\b` can never
697
- * fire between Han characters, which was issue #994: the English-only gate
698
- * silently no-op'd every Chinese prompt, so non-English users got no front-load
699
- * nudge and no error to explain why. The sets mirror the English intent
700
- * (如何/怎么/怎麼/どうやって/どのように/어떻게/كيف/چگونه/چطور/איך/อย่างไร/ยังไง=how,
701
- * 在哪/哪里/哪裡/어디/أين/كجا/איפה/ที่ไหน=where, 流程/流向/流れ/흐름/تدفق/זרימה=flow,
702
- * 路径/路徑/経路/경로/مسار/مسیر/נתיב/เส้นทาง=path,
703
- * 调用/調用/呼び出/호출/يستدعي/استدعاء/فراخوان/קורא/เรียกใช้=call,
704
- * 依赖/依賴/依存/의존/يعتمد/تعتمد/وابسته/תלוי/ขึ้นอยู่กับ=depend,
705
- * 影响/影響/영향/يؤثر/تأثير/تأثیر/משפיע/ผลกระทบ=impact/affect,
706
- * 实现/實現/実装/구현=implement,
707
- * 架构/架構/アーキテクチャ/아키텍처/معماري/معماری/ארכיטקטור/สถาปัตยกรรม=architecture,
708
- * 结构/結構/構造/구조/بنية/هيكل/ساختار/מבנה/โครงสร้าง=structure,
709
- * 追踪/跟踪/追蹤/追跡/トレース/추적/تتبع/ติดตาม=trace,
710
- * يعمل/تعمل/ทำงาน=works) plus structural-overview words with no single clean
711
- * English equivalent (介绍/介紹/解析/分析/原理/机制/機制/仕組み/説明/설명/動作/동작/작동/
712
- * اشرح/شرح/توضیح/הסבר/อธิบาย=explain).
713
- *
714
- * KNOWN, ACCEPTED false-positive class (#1140): substring matching cannot see
715
- * homograph compounds — Korean 구조 (structure) also fires inside 구조대
716
- * (rescue squad). Verified unfixable at this layer: ICU word segmentation
717
- * (Intl.Segmenter) returns 구조대 and the particle form 구조가 (which the gate
718
- * MUST keep matching) as equally opaque single segments, and a 구조대 denylist
719
- * would break 구조대로 ("according to the structure" — 구조 + the 대로
720
- * particle), a legitimate structural prompt. The miss rate this design avoids
721
- * (silently no-op'ing every prompt in these languages, #994) outweighs the
722
- * occasional off-domain fire.
723
- */
724
410
  const STRUCTURAL_UNSEGMENTED = /如何|怎么|怎麼|在哪|哪里|哪裡|追踪|跟踪|追蹤|追跡|トレース|流程|流向|流れ|路径|路徑|経路|调用|調用|呼び出|依赖|依賴|依存|影响|影響|实现|實現|実装|架构|架構|アーキテクチャ|结构|結構|構造|介绍|介紹|解析|分析|原理|机制|機制|仕組み|説明|動作|どうやって|どのように|어떻게|어디|호출|흐름|경로|의존|영향|구현|구조|아키텍처|추적|동작|작동|설명|كيف|أين|اين|يستدعي|استدعاء|يعتمد|تعتمد|يؤثر|تأثير|معماري|بنية|هيكل|تدفق|مسار|تتبع|يعمل|تعمل|اشرح|شرح|چگونه|چطور|کجا|فراخوان|وابسته|تأثیر|معماری|ساختار|مسیر|توضیح|איך|איפה|קורא|תלוי|משפיע|ארכיטקטור|מבנה|זרימה|נתיב|הסבר|อย่างไร|ยังไง|ที่ไหน|เรียกใช้|ขึ้นอยู่กับ|ผลกระทบ|สถาปัตยกรรม|โครงสร้าง|เส้นทาง|ติดตาม|ทำงาน|อธิบาย/;
725
- /** Doc/data/asset file extensions — a `name.ext` of this kind is a file
726
- * reference, not a code symbol, so it must not trip the member-access signal. */
727
411
  const DOC_DATA_EXT = /\.(md|markdown|txt|rst|json|ya?ml|toml|lock|csv|tsv|log|ini|cfg|conf|env|xml|html?|png|jpe?g|gif|svg|pdf)$/i;
728
- /**
729
- * Does `prompt` contain an explicit structural keyword? A keyword is a strong,
730
- * self-contained signal, so the front-load hook fires on it directly — no graph
731
- * check needed. (A *code-token* match, by contrast, is only a candidate the
732
- * hook verifies against the graph first; see {@link extractCodeTokens}.)
733
- * Coverage is multilingual (#994, #1126): the ~29 languages with the largest
734
- * developer populations, across Latin, Cyrillic, Greek, CJK, Hangul, Arabic,
735
- * Hebrew, Thai, and Devanagari scripts. Languages beyond the keyword table
736
- * still fire through the language-agnostic code-token path.
737
- */
738
412
  function hasStructuralKeyword(prompt) {
739
413
  return (!!prompt &&
740
414
  (STRUCTURAL_WORDS_RE.test(prompt) || STRUCTURAL_STEMS_RE.test(prompt) || STRUCTURAL_UNSEGMENTED.test(prompt)));
741
415
  }
742
- /**
743
- * Identifier-shaped tokens in `prompt` — camelCase / PascalCase-with-inner-cap,
744
- * snake_case, a `name(` call, or the two sides of an `a.b` member access. Naming
745
- * a symbol is a code question whatever the surrounding human language, and these
746
- * shapes almost never occur in ordinary prose, so they catch the common
747
- * "<symbol> 的调用链?" / "where is <symbol> 定義" prompts no keyword list would.
748
- *
749
- * These are *candidates*, not a verdict: a tech brand like `JavaScript` or
750
- * `GitHub` is identifier-shaped too, so the front-load hook checks each token
751
- * against the actual index ({@link getNodesByName}) and only fires when one is a
752
- * real symbol here — otherwise a brand-name prompt would inject ~16KB of
753
- * low-relevance context (issue #994 follow-up). A doc/data filename ("README.md")
754
- * is excluded from the member-access form since it's a file reference, not a symbol.
755
- */
756
416
  function extractCodeTokens(prompt) {
757
417
  if (!prompt)
758
418
  return [];
759
419
  const out = new Set();
760
- // camelCase / PascalCase-with-inner-cap (getUserId, parseToken, UserService) or
761
- // snake_case (article_publish, get_user) — a whole identifier run that has an
762
- // inner lower→upper transition or an underscore flanked by alphanumerics.
763
420
  for (const m of prompt.matchAll(/[A-Za-z_$][\w$]*/g)) {
764
421
  const w = m[0];
765
422
  if (/[a-z][A-Z]/.test(w) || /[A-Za-z0-9]_[A-Za-z0-9]/.test(w))
766
423
  out.add(w);
767
424
  }
768
- // call form: an identifier directly before '(' — parseToken(, render(). No
769
- // whitespace before '(' so prose like "the function (entry point)" doesn't trip it.
770
425
  for (const m of prompt.matchAll(/([A-Za-z_$][\w$]*)\(/g))
771
426
  out.add(m[1]);
772
- // member access on identifiers (user.login) — but not a doc/data filename.
773
427
  for (const m of prompt.matchAll(/([A-Za-z_$][\w$]*)\.([A-Za-z_$][\w$]*)/g)) {
774
428
  if (!DOC_DATA_EXT.test(m[0])) {
775
429
  out.add(m[1]);
@@ -778,59 +432,18 @@ function extractCodeTokens(prompt) {
778
432
  }
779
433
  return [...out];
780
434
  }
781
- /**
782
- * Cheap, graph-free candidate gate for the front-load hook: could `prompt` be a
783
- * structural / flow / impact / "where-how" question worth front-loading context
784
- * for? True on an explicit keyword in any covered language (#994, #1126) OR an
785
- * identifier-shaped token. A keyword is sufficient to fire on its own; a
786
- * token-only match is only a candidate the hook then verifies against the graph
787
- * (a brand name like `JavaScript` is token-shaped but isn't a symbol). Every
788
- * non-candidate prompt ("fix this typo", in any language) stays a zero-cost no-op.
789
- */
790
435
  function isStructuralPrompt(prompt) {
791
436
  return hasStructuralKeyword(prompt) || extractCodeTokens(prompt).length > 0;
792
437
  }
793
- /**
794
- * Claude Code persists `UserPromptSubmit` hook stdout above this many
795
- * characters to a file and shows the model a ~2 KB preview instead (#1694).
796
- * Measured on Claude Code 2.1.261; documented in the hooks reference as a
797
- * 10,000-character cap on hook output strings.
798
- */
799
438
  exports.CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT = 10_000;
800
- /**
801
- * Max characters of explore text injected by `codegraph prompt-hook` before
802
- * truncation. Must stay under {@link CLAUDE_CODE_INLINE_HOOK_OUTPUT_LIMIT} so
803
- * the host delivers the payload inline. 9,000 leaves ~1k for the
804
- * `<codegraph_context>` wrapper and the `projectPath` nudge lines appended
805
- * after the cap is applied.
806
- */
807
439
  exports.PROMPT_HOOK_INJECTION_MAX = 9_000;
808
- /**
809
- * Cap explore text for the prompt-hook injection, preserving the existing
810
- * "call codegraph_explore for the rest" notice when truncated.
811
- */
812
440
  function capPromptHookInjection(text, max = exports.PROMPT_HOOK_INJECTION_MAX) {
813
441
  return text.length > max
814
442
  ? `${text.slice(0, max)}\n…(truncated; call codegraph_explore for the rest)`
815
443
  : text;
816
444
  }
817
- /**
818
- * Decide what the front-load hook injects for a `prompt` issued from `cwd`,
819
- * shaped by where the `.codegraph/` index(es) actually are:
820
- * 1. **cwd (or an ancestor) is indexed** → front-load that project. The
821
- * normal single-project / nested-file case.
822
- * 2. **cwd isn't indexed but looks like a workspace root** → the indexes live
823
- * in sub-projects (the monorepo case behind #964). One indexed
824
- * sub-project → front-load it; several → front-load the one the prompt
825
- * names (by relative path like `packages/api`, or package directory name)
826
- * and nudge about the rest; several with no match → nudge the full list so
827
- * the agent passes `projectPath`, rather than guessing wrong.
828
- * 3. **nothing indexed reachable** → do nothing (the agent's own tools apply).
829
- */
830
445
  function planFrontload(cwd, prompt) {
831
446
  const none = { exploreRoot: null, nudgeProjects: [], viaSubScan: false };
832
- // 1. up-walk — nearest indexed ancestor (incl. cwd). Cheap; covers the common
833
- // single-project case without a down-scan.
834
447
  let dir = path.resolve(cwd);
835
448
  for (let i = 0; i < 6; i++) {
836
449
  if (isInitialized(dir))
@@ -840,8 +453,6 @@ function planFrontload(cwd, prompt) {
840
453
  break;
841
454
  dir = parent;
842
455
  }
843
- // 2. down-scan — only from something that looks like a workspace root, so a
844
- // non-project cwd (e.g. $HOME) is a cheap no-op, not a deep crawl.
845
456
  const base = path.resolve(cwd);
846
457
  if (!looksLikeProjectRoot(base))
847
458
  return none;
@@ -850,7 +461,6 @@ function planFrontload(cwd, prompt) {
850
461
  return none;
851
462
  if (subs.length === 1)
852
463
  return { exploreRoot: subs[0], nudgeProjects: [], viaSubScan: true };
853
- // Several indexed sub-projects — pick the one the prompt points at, if any.
854
464
  const p = prompt.toLowerCase();
855
465
  let best = null;
856
466
  for (const s of subs) {
@@ -859,9 +469,9 @@ function planFrontload(cwd, prompt) {
859
469
  const name = path.basename(s).toLowerCase();
860
470
  let score = 0;
861
471
  if (relLc && p.includes(relLc))
862
- score = 10; // "packages/api"
472
+ score = 10;
863
473
  else if (name.length >= 3 && new RegExp(`\\b${escapeRegExp(name)}\\b`).test(p))
864
- score = 5; // "api"
474
+ score = 5;
865
475
  if (score > 0 && (!best || score > best.score || (score === best.score && rel.length < best.relLen))) {
866
476
  best = { root: s, score, relLen: rel.length };
867
477
  }
@@ -869,54 +479,28 @@ function planFrontload(cwd, prompt) {
869
479
  if (best) {
870
480
  return { exploreRoot: best.root, nudgeProjects: subs.filter((s) => s !== best.root), viaSubScan: true };
871
481
  }
872
- // No clear match — nudge the full list rather than front-load a guess.
873
482
  return { exploreRoot: null, nudgeProjects: subs, viaSubScan: true };
874
483
  }
875
- /**
876
- * Contents of `.codegraph/.gitignore`. A single wildcard ignore keeps every
877
- * transient file in the index dir — the database, `daemon.pid`, the socket,
878
- * logs, cache, and anything future versions add — out of git, without having
879
- * to enumerate each name (issues #788, #492, #484). Older versions wrote an
880
- * explicit allowlist that never listed `daemon.pid` or the socket, so those
881
- * runtime files were silently committed.
882
- */
883
484
  const GITIGNORE_CONTENT = `# CodeGraph data files — local to each machine, not for committing.
884
485
  # Ignore everything in .codegraph/ except this file itself, so transient
885
486
  # files (the database, daemon.pid, sockets, logs) never show up in git.
886
487
  *
887
488
  !.gitignore
888
489
  `;
889
- /** Header line that prefixes every .gitignore CodeGraph has auto-generated. */
890
490
  const GITIGNORE_MARKER = '# CodeGraph data files';
891
- /**
892
- * Is `content` a stale CodeGraph-generated `.gitignore` that should be
893
- * regenerated in place? True when it carries our header but predates the
894
- * wildcard ignore (it has no bare `*` line) — i.e. one of the old explicit
895
- * allowlists (`*.db`, `cache/`, `.dirty`, …) that never ignored `daemon.pid`
896
- * or the socket (issue #788). A file WITHOUT our header is user-authored and
897
- * is left untouched; one that already has the wildcard is current. Matching
898
- * on the header (not a byte-exact list of past defaults) heals every old
899
- * variant — v0.7.x through 0.9.9 — and is idempotent once upgraded.
900
- */
901
491
  function isStaleDefaultGitignore(content) {
902
492
  if (!content.trimStart().startsWith(GITIGNORE_MARKER))
903
493
  return false;
904
494
  return !content.split('\n').some((line) => line.trim() === '*');
905
495
  }
906
- /**
907
- * Write `.codegraph/.gitignore` if it's absent, or upgrade a stale
908
- * CodeGraph-generated default in place; a user-customized file is left alone.
909
- * Best-effort — returns `false` only if a needed write failed.
910
- */
911
496
  function ensureGitignore(gitignorePath) {
912
497
  let existing;
913
498
  try {
914
499
  existing = fs.readFileSync(gitignorePath, 'utf-8');
915
500
  }
916
501
  catch {
917
- existing = null; // absent (ENOENT) or unreadable — (re)create below
502
+ existing = null;
918
503
  }
919
- // Current default or a user-authored file: nothing to do.
920
504
  if (existing !== null && !isStaleDefaultGitignore(existing))
921
505
  return true;
922
506
  try {
@@ -927,50 +511,65 @@ function ensureGitignore(gitignorePath) {
927
511
  return false;
928
512
  }
929
513
  }
930
- /**
931
- * Create the .codegraph directory structure
932
- * Note: Only throws if codegraph.db already exists, not just if .codegraph/ exists.
933
- */
514
+ const LOCAL_ONLY_GITIGNORE_CONTENT = '*\n';
515
+ function isTrackedByGit(file) {
516
+ try {
517
+ (0, child_process_1.execFileSync)('git', ['ls-files', '--error-unmatch', '--', path.basename(file)], {
518
+ cwd: path.dirname(file),
519
+ stdio: 'ignore',
520
+ windowsHide: true,
521
+ timeout: 10_000,
522
+ });
523
+ return true;
524
+ }
525
+ catch {
526
+ return false;
527
+ }
528
+ }
529
+ function makeGitignoreLocalOnly(projectRoot) {
530
+ const gitignorePath = path.join(getCodeGraphDir(projectRoot), '.gitignore');
531
+ let existing;
532
+ try {
533
+ existing = fs.readFileSync(gitignorePath, 'utf-8').replace(/\r\n/g, '\n');
534
+ }
535
+ catch {
536
+ existing = null;
537
+ }
538
+ if (existing === LOCAL_ONLY_GITIGNORE_CONTENT)
539
+ return 'unchanged';
540
+ if (existing !== null) {
541
+ if (existing !== GITIGNORE_CONTENT && !isStaleDefaultGitignore(existing))
542
+ return 'customized';
543
+ if (isTrackedByGit(gitignorePath))
544
+ return 'tracked';
545
+ }
546
+ fs.writeFileSync(gitignorePath, LOCAL_ONLY_GITIGNORE_CONTENT, 'utf-8');
547
+ return 'written';
548
+ }
934
549
  function createDirectory(projectRoot) {
935
550
  const codegraphDir = getCodeGraphDir(projectRoot);
936
- // Only throw if CodeGraph is actually initialized (db with a schema).
937
- // .codegraph/ folder alone — or a schema-less codegraph.db left by an
938
- // interrupted init (#1895) — is fine: initialize() adds the schema to it.
939
551
  if (isInitialized(projectRoot)) {
940
552
  throw new Error(`CodeGraph already initialized in ${projectRoot}`);
941
553
  }
942
- // Create main directory (if it doesn't exist)
943
554
  fs.mkdirSync(codegraphDir, { recursive: true });
944
- // Write .gitignore inside .codegraph (create if absent, upgrade a stale
945
- // pre-wildcard default left by an older version — issue #788).
946
555
  ensureGitignore(path.join(codegraphDir, '.gitignore'));
947
556
  }
948
- /**
949
- * Remove the .codegraph directory
950
- */
951
557
  function removeDirectory(projectRoot) {
952
558
  const codegraphDir = getCodeGraphDir(projectRoot);
953
559
  if (!fs.existsSync(codegraphDir)) {
954
560
  return;
955
561
  }
956
- // Verify .codegraph is a real directory, not a symlink pointing elsewhere
957
562
  const lstat = fs.lstatSync(codegraphDir);
958
563
  if (lstat.isSymbolicLink()) {
959
- // Only remove the symlink itself, never follow it for recursive delete
960
564
  fs.unlinkSync(codegraphDir);
961
565
  return;
962
566
  }
963
567
  if (!lstat.isDirectory()) {
964
- // Not a directory - remove the single file
965
568
  fs.unlinkSync(codegraphDir);
966
569
  return;
967
570
  }
968
- // Recursively remove directory
969
571
  fs.rmSync(codegraphDir, { recursive: true, force: true });
970
572
  }
971
- /**
972
- * Get all files in the .codegraph directory
973
- */
974
573
  function listDirectoryContents(projectRoot) {
975
574
  const codegraphDir = getCodeGraphDir(projectRoot);
976
575
  if (!fs.existsSync(codegraphDir)) {
@@ -981,7 +580,6 @@ function listDirectoryContents(projectRoot) {
981
580
  const entries = fs.readdirSync(dir, { withFileTypes: true });
982
581
  for (const entry of entries) {
983
582
  const relativePath = prefix ? `${prefix}/${entry.name}` : entry.name;
984
- // Skip symlinks to prevent following links outside .codegraph
985
583
  if (entry.isSymbolicLink()) {
986
584
  continue;
987
585
  }
@@ -996,9 +594,6 @@ function listDirectoryContents(projectRoot) {
996
594
  walkDir(codegraphDir);
997
595
  return files;
998
596
  }
999
- /**
1000
- * Get the total size of the .codegraph directory in bytes
1001
- */
1002
597
  function getDirectorySize(projectRoot) {
1003
598
  const codegraphDir = getCodeGraphDir(projectRoot);
1004
599
  if (!fs.existsSync(codegraphDir)) {
@@ -1008,7 +603,6 @@ function getDirectorySize(projectRoot) {
1008
603
  function walkDir(dir) {
1009
604
  const entries = fs.readdirSync(dir, { withFileTypes: true });
1010
605
  for (const entry of entries) {
1011
- // Skip symlinks to prevent following links outside .codegraph
1012
606
  if (entry.isSymbolicLink()) {
1013
607
  continue;
1014
608
  }
@@ -1025,9 +619,6 @@ function getDirectorySize(projectRoot) {
1025
619
  walkDir(codegraphDir);
1026
620
  return totalSize;
1027
621
  }
1028
- /**
1029
- * Ensure a subdirectory exists within .codegraph
1030
- */
1031
622
  function ensureSubdirectory(projectRoot, subdirName) {
1032
623
  if (subdirName.includes('..') || subdirName.includes(path.sep) || subdirName.includes('/')) {
1033
624
  throw new Error(`Invalid subdirectory name: ${subdirName}`);
@@ -1038,9 +629,6 @@ function ensureSubdirectory(projectRoot, subdirName) {
1038
629
  }
1039
630
  return subdirPath;
1040
631
  }
1041
- /**
1042
- * Check if the .codegraph directory has valid structure
1043
- */
1044
632
  function validateDirectory(projectRoot) {
1045
633
  const errors = [];
1046
634
  const codegraphDir = getCodeGraphDir(projectRoot);
@@ -1052,14 +640,9 @@ function validateDirectory(projectRoot) {
1052
640
  errors.push('.codegraph exists but is not a directory');
1053
641
  return { valid: false, errors };
1054
642
  }
1055
- // Auto-repair / upgrade .gitignore (non-critical file). A missing one is
1056
- // recreated; a stale pre-wildcard default that never ignored daemon.pid is
1057
- // regenerated in place (issue #788); a user-authored file is left alone.
1058
643
  const gitignorePath = path.join(codegraphDir, '.gitignore');
1059
644
  const existedBefore = fs.existsSync(gitignorePath);
1060
645
  if (!ensureGitignore(gitignorePath) && !existedBefore) {
1061
- // Only a missing-and-uncreatable file is surfaced; a failed in-place
1062
- // upgrade of an existing file is non-fatal — the index still works.
1063
646
  errors.push('.gitignore missing in .codegraph directory and could not be created');
1064
647
  }
1065
648
  return {
@@ -1067,14 +650,22 @@ function validateDirectory(projectRoot) {
1067
650
  errors,
1068
651
  };
1069
652
  }
1070
- /**
1071
- * Claude Code injects `<task-notification>…</task-notification>` blocks as
1072
- * `user` messages when a background agent finishes, and UserPromptSubmit
1073
- * hooks receive them exactly like typed prompts (#1832). The whole prompt
1074
- * must be that single envelope; a user question that merely mentions the
1075
- * marker is still a prompt.
1076
- */
1077
653
  function isTaskNotification(prompt) {
1078
654
  return /^\s*<task-notification>[\s\S]*<\/task-notification>\s*$/.test(prompt);
1079
655
  }
656
+ function isAgentMessage(prompt) {
657
+ return /^\s*<agent-message(?:\s[^>]*)?>[\s\S]*<\/agent-message>\s*$/.test(prompt);
658
+ }
659
+ function isCrossSessionMessage(prompt) {
660
+ return /^\s*<cross-session-message(?:\s[^>]*)?>[\s\S]*<\/cross-session-message>\s*$/.test(prompt);
661
+ }
662
+ const SYSTEM_REMINDER_CLOSE = '</system-reminder>';
663
+ const SYSTEM_REMINDER_BLOCK = /<system-reminder(?:\s[^<>]*)?>[\s\S]*?<\/system-reminder>/g;
664
+ function stripSystemReminders(prompt) {
665
+ const end = prompt.lastIndexOf(SYSTEM_REMINDER_CLOSE);
666
+ if (end < 0)
667
+ return prompt.trim();
668
+ const head = prompt.slice(0, end + SYSTEM_REMINDER_CLOSE.length);
669
+ return (head.replace(SYSTEM_REMINDER_BLOCK, '\n') + prompt.slice(head.length)).trim();
670
+ }
1080
671
  //# sourceMappingURL=directory.js.map