@vizalice/codegraph 1.5.0

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 (821) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +872 -0
  3. package/dist/bin/codegraph.d.ts +26 -0
  4. package/dist/bin/codegraph.d.ts.map +1 -0
  5. package/dist/bin/codegraph.js +2324 -0
  6. package/dist/bin/codegraph.js.map +1 -0
  7. package/dist/bin/command-supervision.d.ts +49 -0
  8. package/dist/bin/command-supervision.d.ts.map +1 -0
  9. package/dist/bin/command-supervision.js +95 -0
  10. package/dist/bin/command-supervision.js.map +1 -0
  11. package/dist/bin/fatal-handler.d.ts +20 -0
  12. package/dist/bin/fatal-handler.d.ts.map +1 -0
  13. package/dist/bin/fatal-handler.js +118 -0
  14. package/dist/bin/fatal-handler.js.map +1 -0
  15. package/dist/bin/node-version-check.d.ts +37 -0
  16. package/dist/bin/node-version-check.d.ts.map +1 -0
  17. package/dist/bin/node-version-check.js +79 -0
  18. package/dist/bin/node-version-check.js.map +1 -0
  19. package/dist/bin/uninstall.d.ts +14 -0
  20. package/dist/bin/uninstall.d.ts.map +1 -0
  21. package/dist/bin/uninstall.js +36 -0
  22. package/dist/bin/uninstall.js.map +1 -0
  23. package/dist/context/formatter.d.ts +36 -0
  24. package/dist/context/formatter.d.ts.map +1 -0
  25. package/dist/context/formatter.js +269 -0
  26. package/dist/context/formatter.js.map +1 -0
  27. package/dist/context/index.d.ts +119 -0
  28. package/dist/context/index.d.ts.map +1 -0
  29. package/dist/context/index.js +1333 -0
  30. package/dist/context/index.js.map +1 -0
  31. package/dist/context/markers.d.ts +19 -0
  32. package/dist/context/markers.d.ts.map +1 -0
  33. package/dist/context/markers.js +22 -0
  34. package/dist/context/markers.js.map +1 -0
  35. package/dist/db/index.d.ts +378 -0
  36. package/dist/db/index.d.ts.map +1 -0
  37. package/dist/db/index.js +831 -0
  38. package/dist/db/index.js.map +1 -0
  39. package/dist/db/migrations.d.ts +44 -0
  40. package/dist/db/migrations.d.ts.map +1 -0
  41. package/dist/db/migrations.js +236 -0
  42. package/dist/db/migrations.js.map +1 -0
  43. package/dist/db/queries.d.ts +705 -0
  44. package/dist/db/queries.d.ts.map +1 -0
  45. package/dist/db/queries.js +2435 -0
  46. package/dist/db/queries.js.map +1 -0
  47. package/dist/db/schema.sql +207 -0
  48. package/dist/db/sqlite-adapter.d.ts +55 -0
  49. package/dist/db/sqlite-adapter.d.ts.map +1 -0
  50. package/dist/db/sqlite-adapter.js +135 -0
  51. package/dist/db/sqlite-adapter.js.map +1 -0
  52. package/dist/db/wal-valve.d.ts +119 -0
  53. package/dist/db/wal-valve.d.ts.map +1 -0
  54. package/dist/db/wal-valve.js +290 -0
  55. package/dist/db/wal-valve.js.map +1 -0
  56. package/dist/directory.d.ts +183 -0
  57. package/dist/directory.d.ts.map +1 -0
  58. package/dist/directory.js +797 -0
  59. package/dist/directory.js.map +1 -0
  60. package/dist/errors.d.ts +136 -0
  61. package/dist/errors.d.ts.map +1 -0
  62. package/dist/errors.js +219 -0
  63. package/dist/errors.js.map +1 -0
  64. package/dist/extraction/astro-extractor.d.ts +79 -0
  65. package/dist/extraction/astro-extractor.d.ts.map +1 -0
  66. package/dist/extraction/astro-extractor.js +320 -0
  67. package/dist/extraction/astro-extractor.js.map +1 -0
  68. package/dist/extraction/cfml-extractor.d.ts +107 -0
  69. package/dist/extraction/cfml-extractor.d.ts.map +1 -0
  70. package/dist/extraction/cfml-extractor.js +494 -0
  71. package/dist/extraction/cfml-extractor.js.map +1 -0
  72. package/dist/extraction/dfm-extractor.d.ts +31 -0
  73. package/dist/extraction/dfm-extractor.d.ts.map +1 -0
  74. package/dist/extraction/dfm-extractor.js +151 -0
  75. package/dist/extraction/dfm-extractor.js.map +1 -0
  76. package/dist/extraction/extraction-version.d.ts +25 -0
  77. package/dist/extraction/extraction-version.d.ts.map +1 -0
  78. package/dist/extraction/extraction-version.js +28 -0
  79. package/dist/extraction/extraction-version.js.map +1 -0
  80. package/dist/extraction/function-ref.d.ts +118 -0
  81. package/dist/extraction/function-ref.d.ts.map +1 -0
  82. package/dist/extraction/function-ref.js +733 -0
  83. package/dist/extraction/function-ref.js.map +1 -0
  84. package/dist/extraction/generated-detection.d.ts +66 -0
  85. package/dist/extraction/generated-detection.d.ts.map +1 -0
  86. package/dist/extraction/generated-detection.js +248 -0
  87. package/dist/extraction/generated-detection.js.map +1 -0
  88. package/dist/extraction/grammars.d.ts +138 -0
  89. package/dist/extraction/grammars.d.ts.map +1 -0
  90. package/dist/extraction/grammars.js +694 -0
  91. package/dist/extraction/grammars.js.map +1 -0
  92. package/dist/extraction/index.d.ts +308 -0
  93. package/dist/extraction/index.d.ts.map +1 -0
  94. package/dist/extraction/index.js +2711 -0
  95. package/dist/extraction/index.js.map +1 -0
  96. package/dist/extraction/kernel/decode.d.ts +9 -0
  97. package/dist/extraction/kernel/decode.d.ts.map +1 -0
  98. package/dist/extraction/kernel/decode.js +162 -0
  99. package/dist/extraction/kernel/decode.js.map +1 -0
  100. package/dist/extraction/kernel/index.d.ts +64 -0
  101. package/dist/extraction/kernel/index.d.ts.map +1 -0
  102. package/dist/extraction/kernel/index.js +279 -0
  103. package/dist/extraction/kernel/index.js.map +1 -0
  104. package/dist/extraction/kernel/layout.d.ts +101 -0
  105. package/dist/extraction/kernel/layout.d.ts.map +1 -0
  106. package/dist/extraction/kernel/layout.js +104 -0
  107. package/dist/extraction/kernel/layout.js.map +1 -0
  108. package/dist/extraction/kernel/loader.d.ts +103 -0
  109. package/dist/extraction/kernel/loader.d.ts.map +1 -0
  110. package/dist/extraction/kernel/loader.js +146 -0
  111. package/dist/extraction/kernel/loader.js.map +1 -0
  112. package/dist/extraction/languages/arkts.d.ts +3 -0
  113. package/dist/extraction/languages/arkts.d.ts.map +1 -0
  114. package/dist/extraction/languages/arkts.js +127 -0
  115. package/dist/extraction/languages/arkts.js.map +1 -0
  116. package/dist/extraction/languages/c-cpp.d.ts +124 -0
  117. package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
  118. package/dist/extraction/languages/c-cpp.js +1689 -0
  119. package/dist/extraction/languages/c-cpp.js.map +1 -0
  120. package/dist/extraction/languages/cfquery.d.ts +12 -0
  121. package/dist/extraction/languages/cfquery.d.ts.map +1 -0
  122. package/dist/extraction/languages/cfquery.js +28 -0
  123. package/dist/extraction/languages/cfquery.js.map +1 -0
  124. package/dist/extraction/languages/cfscript.d.ts +3 -0
  125. package/dist/extraction/languages/cfscript.d.ts.map +1 -0
  126. package/dist/extraction/languages/cfscript.js +73 -0
  127. package/dist/extraction/languages/cfscript.js.map +1 -0
  128. package/dist/extraction/languages/cobol.d.ts +33 -0
  129. package/dist/extraction/languages/cobol.d.ts.map +1 -0
  130. package/dist/extraction/languages/cobol.js +499 -0
  131. package/dist/extraction/languages/cobol.js.map +1 -0
  132. package/dist/extraction/languages/csharp.d.ts +25 -0
  133. package/dist/extraction/languages/csharp.d.ts.map +1 -0
  134. package/dist/extraction/languages/csharp.js +175 -0
  135. package/dist/extraction/languages/csharp.js.map +1 -0
  136. package/dist/extraction/languages/dart.d.ts +3 -0
  137. package/dist/extraction/languages/dart.d.ts.map +1 -0
  138. package/dist/extraction/languages/dart.js +374 -0
  139. package/dist/extraction/languages/dart.js.map +1 -0
  140. package/dist/extraction/languages/erlang.d.ts +3 -0
  141. package/dist/extraction/languages/erlang.d.ts.map +1 -0
  142. package/dist/extraction/languages/erlang.js +350 -0
  143. package/dist/extraction/languages/erlang.js.map +1 -0
  144. package/dist/extraction/languages/go.d.ts +3 -0
  145. package/dist/extraction/languages/go.d.ts.map +1 -0
  146. package/dist/extraction/languages/go.js +111 -0
  147. package/dist/extraction/languages/go.js.map +1 -0
  148. package/dist/extraction/languages/index.d.ts +10 -0
  149. package/dist/extraction/languages/index.d.ts.map +1 -0
  150. package/dist/extraction/languages/index.js +71 -0
  151. package/dist/extraction/languages/index.js.map +1 -0
  152. package/dist/extraction/languages/java.d.ts +3 -0
  153. package/dist/extraction/languages/java.d.ts.map +1 -0
  154. package/dist/extraction/languages/java.js +315 -0
  155. package/dist/extraction/languages/java.js.map +1 -0
  156. package/dist/extraction/languages/javascript.d.ts +3 -0
  157. package/dist/extraction/languages/javascript.d.ts.map +1 -0
  158. package/dist/extraction/languages/javascript.js +106 -0
  159. package/dist/extraction/languages/javascript.js.map +1 -0
  160. package/dist/extraction/languages/kotlin.d.ts +3 -0
  161. package/dist/extraction/languages/kotlin.d.ts.map +1 -0
  162. package/dist/extraction/languages/kotlin.js +379 -0
  163. package/dist/extraction/languages/kotlin.js.map +1 -0
  164. package/dist/extraction/languages/lua.d.ts +3 -0
  165. package/dist/extraction/languages/lua.d.ts.map +1 -0
  166. package/dist/extraction/languages/lua.js +150 -0
  167. package/dist/extraction/languages/lua.js.map +1 -0
  168. package/dist/extraction/languages/luau.d.ts +3 -0
  169. package/dist/extraction/languages/luau.d.ts.map +1 -0
  170. package/dist/extraction/languages/luau.js +37 -0
  171. package/dist/extraction/languages/luau.js.map +1 -0
  172. package/dist/extraction/languages/nix.d.ts +3 -0
  173. package/dist/extraction/languages/nix.d.ts.map +1 -0
  174. package/dist/extraction/languages/nix.js +294 -0
  175. package/dist/extraction/languages/nix.js.map +1 -0
  176. package/dist/extraction/languages/objc.d.ts +3 -0
  177. package/dist/extraction/languages/objc.d.ts.map +1 -0
  178. package/dist/extraction/languages/objc.js +179 -0
  179. package/dist/extraction/languages/objc.js.map +1 -0
  180. package/dist/extraction/languages/pascal.d.ts +3 -0
  181. package/dist/extraction/languages/pascal.d.ts.map +1 -0
  182. package/dist/extraction/languages/pascal.js +77 -0
  183. package/dist/extraction/languages/pascal.js.map +1 -0
  184. package/dist/extraction/languages/php.d.ts +3 -0
  185. package/dist/extraction/languages/php.d.ts.map +1 -0
  186. package/dist/extraction/languages/php.js +196 -0
  187. package/dist/extraction/languages/php.js.map +1 -0
  188. package/dist/extraction/languages/python.d.ts +3 -0
  189. package/dist/extraction/languages/python.d.ts.map +1 -0
  190. package/dist/extraction/languages/python.js +56 -0
  191. package/dist/extraction/languages/python.js.map +1 -0
  192. package/dist/extraction/languages/r.d.ts +3 -0
  193. package/dist/extraction/languages/r.d.ts.map +1 -0
  194. package/dist/extraction/languages/r.js +314 -0
  195. package/dist/extraction/languages/r.js.map +1 -0
  196. package/dist/extraction/languages/ruby.d.ts +3 -0
  197. package/dist/extraction/languages/ruby.d.ts.map +1 -0
  198. package/dist/extraction/languages/ruby.js +149 -0
  199. package/dist/extraction/languages/ruby.js.map +1 -0
  200. package/dist/extraction/languages/rust.d.ts +3 -0
  201. package/dist/extraction/languages/rust.d.ts.map +1 -0
  202. package/dist/extraction/languages/rust.js +145 -0
  203. package/dist/extraction/languages/rust.js.map +1 -0
  204. package/dist/extraction/languages/scala.d.ts +3 -0
  205. package/dist/extraction/languages/scala.d.ts.map +1 -0
  206. package/dist/extraction/languages/scala.js +209 -0
  207. package/dist/extraction/languages/scala.js.map +1 -0
  208. package/dist/extraction/languages/solidity.d.ts +3 -0
  209. package/dist/extraction/languages/solidity.d.ts.map +1 -0
  210. package/dist/extraction/languages/solidity.js +293 -0
  211. package/dist/extraction/languages/solidity.js.map +1 -0
  212. package/dist/extraction/languages/swift.d.ts +3 -0
  213. package/dist/extraction/languages/swift.d.ts.map +1 -0
  214. package/dist/extraction/languages/swift.js +152 -0
  215. package/dist/extraction/languages/swift.js.map +1 -0
  216. package/dist/extraction/languages/terraform.d.ts +3 -0
  217. package/dist/extraction/languages/terraform.d.ts.map +1 -0
  218. package/dist/extraction/languages/terraform.js +641 -0
  219. package/dist/extraction/languages/terraform.js.map +1 -0
  220. package/dist/extraction/languages/typescript.d.ts +16 -0
  221. package/dist/extraction/languages/typescript.d.ts.map +1 -0
  222. package/dist/extraction/languages/typescript.js +167 -0
  223. package/dist/extraction/languages/typescript.js.map +1 -0
  224. package/dist/extraction/languages/vbnet.d.ts +11 -0
  225. package/dist/extraction/languages/vbnet.d.ts.map +1 -0
  226. package/dist/extraction/languages/vbnet.js +141 -0
  227. package/dist/extraction/languages/vbnet.js.map +1 -0
  228. package/dist/extraction/liquid-extractor.d.ts +59 -0
  229. package/dist/extraction/liquid-extractor.d.ts.map +1 -0
  230. package/dist/extraction/liquid-extractor.js +357 -0
  231. package/dist/extraction/liquid-extractor.js.map +1 -0
  232. package/dist/extraction/mybatis-extractor.d.ts +68 -0
  233. package/dist/extraction/mybatis-extractor.d.ts.map +1 -0
  234. package/dist/extraction/mybatis-extractor.js +300 -0
  235. package/dist/extraction/mybatis-extractor.js.map +1 -0
  236. package/dist/extraction/parse-pool.d.ts +160 -0
  237. package/dist/extraction/parse-pool.d.ts.map +1 -0
  238. package/dist/extraction/parse-pool.js +402 -0
  239. package/dist/extraction/parse-pool.js.map +1 -0
  240. package/dist/extraction/parse-worker.d.ts +8 -0
  241. package/dist/extraction/parse-worker.d.ts.map +1 -0
  242. package/dist/extraction/parse-worker.js +138 -0
  243. package/dist/extraction/parse-worker.js.map +1 -0
  244. package/dist/extraction/razor-extractor.d.ts +42 -0
  245. package/dist/extraction/razor-extractor.d.ts.map +1 -0
  246. package/dist/extraction/razor-extractor.js +285 -0
  247. package/dist/extraction/razor-extractor.js.map +1 -0
  248. package/dist/extraction/store-worker.d.ts +24 -0
  249. package/dist/extraction/store-worker.d.ts.map +1 -0
  250. package/dist/extraction/store-worker.js +139 -0
  251. package/dist/extraction/store-worker.js.map +1 -0
  252. package/dist/extraction/store-writer.d.ts +63 -0
  253. package/dist/extraction/store-writer.d.ts.map +1 -0
  254. package/dist/extraction/store-writer.js +174 -0
  255. package/dist/extraction/store-writer.js.map +1 -0
  256. package/dist/extraction/svelte-extractor.d.ts +56 -0
  257. package/dist/extraction/svelte-extractor.d.ts.map +1 -0
  258. package/dist/extraction/svelte-extractor.js +275 -0
  259. package/dist/extraction/svelte-extractor.js.map +1 -0
  260. package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
  261. package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
  262. package/dist/extraction/tree-sitter-helpers.js +153 -0
  263. package/dist/extraction/tree-sitter-helpers.js.map +1 -0
  264. package/dist/extraction/tree-sitter-types.d.ts +260 -0
  265. package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
  266. package/dist/extraction/tree-sitter-types.js +10 -0
  267. package/dist/extraction/tree-sitter-types.js.map +1 -0
  268. package/dist/extraction/tree-sitter.d.ts +728 -0
  269. package/dist/extraction/tree-sitter.d.ts.map +1 -0
  270. package/dist/extraction/tree-sitter.js +6676 -0
  271. package/dist/extraction/tree-sitter.js.map +1 -0
  272. package/dist/extraction/vue-extractor.d.ts +51 -0
  273. package/dist/extraction/vue-extractor.d.ts.map +1 -0
  274. package/dist/extraction/vue-extractor.js +254 -0
  275. package/dist/extraction/vue-extractor.js.map +1 -0
  276. package/dist/extraction/wasm/tree-sitter-arkts.wasm +0 -0
  277. package/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
  278. package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  279. package/dist/extraction/wasm/tree-sitter-cfml.wasm +0 -0
  280. package/dist/extraction/wasm/tree-sitter-cfquery.wasm +0 -0
  281. package/dist/extraction/wasm/tree-sitter-cfscript.wasm +0 -0
  282. package/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
  283. package/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
  284. package/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  285. package/dist/extraction/wasm/tree-sitter-erlang.wasm +0 -0
  286. package/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  287. package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  288. package/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  289. package/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  290. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  291. package/dist/extraction/wasm/tree-sitter-luau.wasm +0 -0
  292. package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
  293. package/dist/extraction/wasm/tree-sitter-pascal.wasm +0 -0
  294. package/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
  295. package/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  296. package/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
  297. package/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
  298. package/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
  299. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  300. package/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  301. package/dist/extraction/wasm/tree-sitter-terraform.wasm +0 -0
  302. package/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  303. package/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  304. package/dist/extraction/wasm/tree-sitter-vbnet.wasm +0 -0
  305. package/dist/extraction/wasm-runtime-flags.d.ts +53 -0
  306. package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
  307. package/dist/extraction/wasm-runtime-flags.js +130 -0
  308. package/dist/extraction/wasm-runtime-flags.js.map +1 -0
  309. package/dist/graph/index.d.ts +8 -0
  310. package/dist/graph/index.d.ts.map +1 -0
  311. package/dist/graph/index.js +13 -0
  312. package/dist/graph/index.js.map +1 -0
  313. package/dist/graph/queries.d.ts +106 -0
  314. package/dist/graph/queries.d.ts.map +1 -0
  315. package/dist/graph/queries.js +341 -0
  316. package/dist/graph/queries.js.map +1 -0
  317. package/dist/graph/traversal.d.ts +127 -0
  318. package/dist/graph/traversal.d.ts.map +1 -0
  319. package/dist/graph/traversal.js +599 -0
  320. package/dist/graph/traversal.js.map +1 -0
  321. package/dist/index.d.ts +677 -0
  322. package/dist/index.d.ts.map +1 -0
  323. package/dist/index.js +1718 -0
  324. package/dist/index.js.map +1 -0
  325. package/dist/installer/beta-signup.d.ts +54 -0
  326. package/dist/installer/beta-signup.d.ts.map +1 -0
  327. package/dist/installer/beta-signup.js +178 -0
  328. package/dist/installer/beta-signup.js.map +1 -0
  329. package/dist/installer/config-writer.d.ts +28 -0
  330. package/dist/installer/config-writer.d.ts.map +1 -0
  331. package/dist/installer/config-writer.js +91 -0
  332. package/dist/installer/config-writer.js.map +1 -0
  333. package/dist/installer/index.d.ts +144 -0
  334. package/dist/installer/index.d.ts.map +1 -0
  335. package/dist/installer/index.js +634 -0
  336. package/dist/installer/index.js.map +1 -0
  337. package/dist/installer/instructions-template.d.ts +41 -0
  338. package/dist/installer/instructions-template.d.ts.map +1 -0
  339. package/dist/installer/instructions-template.js +53 -0
  340. package/dist/installer/instructions-template.js.map +1 -0
  341. package/dist/installer/targets/antigravity.d.ts +57 -0
  342. package/dist/installer/targets/antigravity.d.ts.map +1 -0
  343. package/dist/installer/targets/antigravity.js +308 -0
  344. package/dist/installer/targets/antigravity.js.map +1 -0
  345. package/dist/installer/targets/claude.d.ts +62 -0
  346. package/dist/installer/targets/claude.d.ts.map +1 -0
  347. package/dist/installer/targets/claude.js +486 -0
  348. package/dist/installer/targets/claude.js.map +1 -0
  349. package/dist/installer/targets/codex.d.ts +18 -0
  350. package/dist/installer/targets/codex.d.ts.map +1 -0
  351. package/dist/installer/targets/codex.js +185 -0
  352. package/dist/installer/targets/codex.js.map +1 -0
  353. package/dist/installer/targets/copilot-cli.d.ts +32 -0
  354. package/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  355. package/dist/installer/targets/copilot-cli.js +209 -0
  356. package/dist/installer/targets/copilot-cli.js.map +1 -0
  357. package/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  358. package/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  359. package/dist/installer/targets/copilot-jetbrains.js +238 -0
  360. package/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  361. package/dist/installer/targets/copilot-vscode.d.ts +47 -0
  362. package/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  363. package/dist/installer/targets/copilot-vscode.js +219 -0
  364. package/dist/installer/targets/copilot-vscode.js.map +1 -0
  365. package/dist/installer/targets/cursor.d.ts +35 -0
  366. package/dist/installer/targets/cursor.d.ts.map +1 -0
  367. package/dist/installer/targets/cursor.js +254 -0
  368. package/dist/installer/targets/cursor.js.map +1 -0
  369. package/dist/installer/targets/dsh.d.ts +97 -0
  370. package/dist/installer/targets/dsh.d.ts.map +1 -0
  371. package/dist/installer/targets/dsh.js +358 -0
  372. package/dist/installer/targets/dsh.js.map +1 -0
  373. package/dist/installer/targets/gemini.d.ts +26 -0
  374. package/dist/installer/targets/gemini.d.ts.map +1 -0
  375. package/dist/installer/targets/gemini.js +165 -0
  376. package/dist/installer/targets/gemini.js.map +1 -0
  377. package/dist/installer/targets/hermes.d.ts +18 -0
  378. package/dist/installer/targets/hermes.d.ts.map +1 -0
  379. package/dist/installer/targets/hermes.js +359 -0
  380. package/dist/installer/targets/hermes.js.map +1 -0
  381. package/dist/installer/targets/kiro.d.ts +27 -0
  382. package/dist/installer/targets/kiro.d.ts.map +1 -0
  383. package/dist/installer/targets/kiro.js +178 -0
  384. package/dist/installer/targets/kiro.js.map +1 -0
  385. package/dist/installer/targets/opencode.d.ts +38 -0
  386. package/dist/installer/targets/opencode.d.ts.map +1 -0
  387. package/dist/installer/targets/opencode.js +288 -0
  388. package/dist/installer/targets/opencode.js.map +1 -0
  389. package/dist/installer/targets/registry.d.ts +35 -0
  390. package/dist/installer/targets/registry.d.ts.map +1 -0
  391. package/dist/installer/targets/registry.js +101 -0
  392. package/dist/installer/targets/registry.js.map +1 -0
  393. package/dist/installer/targets/shared.d.ts +132 -0
  394. package/dist/installer/targets/shared.d.ts.map +1 -0
  395. package/dist/installer/targets/shared.js +314 -0
  396. package/dist/installer/targets/shared.js.map +1 -0
  397. package/dist/installer/targets/toml.d.ts +53 -0
  398. package/dist/installer/targets/toml.d.ts.map +1 -0
  399. package/dist/installer/targets/toml.js +226 -0
  400. package/dist/installer/targets/toml.js.map +1 -0
  401. package/dist/installer/targets/types.d.ts +109 -0
  402. package/dist/installer/targets/types.d.ts.map +1 -0
  403. package/dist/installer/targets/types.js +16 -0
  404. package/dist/installer/targets/types.js.map +1 -0
  405. package/dist/installer/targets/zcode.d.ts +106 -0
  406. package/dist/installer/targets/zcode.d.ts.map +1 -0
  407. package/dist/installer/targets/zcode.js +451 -0
  408. package/dist/installer/targets/zcode.js.map +1 -0
  409. package/dist/mcp/daemon-manager.d.ts +42 -0
  410. package/dist/mcp/daemon-manager.d.ts.map +1 -0
  411. package/dist/mcp/daemon-manager.js +129 -0
  412. package/dist/mcp/daemon-manager.js.map +1 -0
  413. package/dist/mcp/daemon-paths.d.ts +73 -0
  414. package/dist/mcp/daemon-paths.d.ts.map +1 -0
  415. package/dist/mcp/daemon-paths.js +165 -0
  416. package/dist/mcp/daemon-paths.js.map +1 -0
  417. package/dist/mcp/daemon-registry.d.ts +47 -0
  418. package/dist/mcp/daemon-registry.d.ts.map +1 -0
  419. package/dist/mcp/daemon-registry.js +233 -0
  420. package/dist/mcp/daemon-registry.js.map +1 -0
  421. package/dist/mcp/daemon.d.ts +290 -0
  422. package/dist/mcp/daemon.d.ts.map +1 -0
  423. package/dist/mcp/daemon.js +862 -0
  424. package/dist/mcp/daemon.js.map +1 -0
  425. package/dist/mcp/dynamic-boundaries.d.ts +41 -0
  426. package/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
  427. package/dist/mcp/dynamic-boundaries.js +360 -0
  428. package/dist/mcp/dynamic-boundaries.js.map +1 -0
  429. package/dist/mcp/early-ppid.d.ts +26 -0
  430. package/dist/mcp/early-ppid.d.ts.map +1 -0
  431. package/dist/mcp/early-ppid.js +29 -0
  432. package/dist/mcp/early-ppid.js.map +1 -0
  433. package/dist/mcp/engine.d.ts +122 -0
  434. package/dist/mcp/engine.d.ts.map +1 -0
  435. package/dist/mcp/engine.js +350 -0
  436. package/dist/mcp/engine.js.map +1 -0
  437. package/dist/mcp/explore-dedup.d.ts +137 -0
  438. package/dist/mcp/explore-dedup.d.ts.map +1 -0
  439. package/dist/mcp/explore-dedup.js +236 -0
  440. package/dist/mcp/explore-dedup.js.map +1 -0
  441. package/dist/mcp/explore-diagnostics.d.ts +287 -0
  442. package/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  443. package/dist/mcp/explore-diagnostics.js +555 -0
  444. package/dist/mcp/explore-diagnostics.js.map +1 -0
  445. package/dist/mcp/explore-session-state.d.ts +217 -0
  446. package/dist/mcp/explore-session-state.d.ts.map +1 -0
  447. package/dist/mcp/explore-session-state.js +322 -0
  448. package/dist/mcp/explore-session-state.js.map +1 -0
  449. package/dist/mcp/index.d.ts +137 -0
  450. package/dist/mcp/index.d.ts.map +1 -0
  451. package/dist/mcp/index.js +554 -0
  452. package/dist/mcp/index.js.map +1 -0
  453. package/dist/mcp/liveness-watchdog.d.ts +35 -0
  454. package/dist/mcp/liveness-watchdog.d.ts.map +1 -0
  455. package/dist/mcp/liveness-watchdog.js +269 -0
  456. package/dist/mcp/liveness-watchdog.js.map +1 -0
  457. package/dist/mcp/ppid-watchdog.d.ts +62 -0
  458. package/dist/mcp/ppid-watchdog.d.ts.map +1 -0
  459. package/dist/mcp/ppid-watchdog.js +64 -0
  460. package/dist/mcp/ppid-watchdog.js.map +1 -0
  461. package/dist/mcp/proxy.d.ts +87 -0
  462. package/dist/mcp/proxy.d.ts.map +1 -0
  463. package/dist/mcp/proxy.js +672 -0
  464. package/dist/mcp/proxy.js.map +1 -0
  465. package/dist/mcp/query-pool.d.ts +108 -0
  466. package/dist/mcp/query-pool.d.ts.map +1 -0
  467. package/dist/mcp/query-pool.js +315 -0
  468. package/dist/mcp/query-pool.js.map +1 -0
  469. package/dist/mcp/query-worker.d.ts +24 -0
  470. package/dist/mcp/query-worker.d.ts.map +1 -0
  471. package/dist/mcp/query-worker.js +87 -0
  472. package/dist/mcp/query-worker.js.map +1 -0
  473. package/dist/mcp/server-instructions.d.ts +34 -0
  474. package/dist/mcp/server-instructions.d.ts.map +1 -0
  475. package/dist/mcp/server-instructions.js +111 -0
  476. package/dist/mcp/server-instructions.js.map +1 -0
  477. package/dist/mcp/session.d.ts +109 -0
  478. package/dist/mcp/session.d.ts.map +1 -0
  479. package/dist/mcp/session.js +375 -0
  480. package/dist/mcp/session.js.map +1 -0
  481. package/dist/mcp/startup-handshake.d.ts +44 -0
  482. package/dist/mcp/startup-handshake.d.ts.map +1 -0
  483. package/dist/mcp/startup-handshake.js +73 -0
  484. package/dist/mcp/startup-handshake.js.map +1 -0
  485. package/dist/mcp/stdin-teardown.d.ts +27 -0
  486. package/dist/mcp/stdin-teardown.d.ts.map +1 -0
  487. package/dist/mcp/stdin-teardown.js +49 -0
  488. package/dist/mcp/stdin-teardown.js.map +1 -0
  489. package/dist/mcp/tools.d.ts +862 -0
  490. package/dist/mcp/tools.d.ts.map +1 -0
  491. package/dist/mcp/tools.js +6526 -0
  492. package/dist/mcp/tools.js.map +1 -0
  493. package/dist/mcp/transport.d.ts +188 -0
  494. package/dist/mcp/transport.d.ts.map +1 -0
  495. package/dist/mcp/transport.js +377 -0
  496. package/dist/mcp/transport.js.map +1 -0
  497. package/dist/mcp/version.d.ts +19 -0
  498. package/dist/mcp/version.d.ts.map +1 -0
  499. package/dist/mcp/version.js +71 -0
  500. package/dist/mcp/version.js.map +1 -0
  501. package/dist/project-config.d.ts +94 -0
  502. package/dist/project-config.d.ts.map +1 -0
  503. package/dist/project-config.js +374 -0
  504. package/dist/project-config.js.map +1 -0
  505. package/dist/prompt-hook-output.d.ts +23 -0
  506. package/dist/prompt-hook-output.d.ts.map +1 -0
  507. package/dist/prompt-hook-output.js +35 -0
  508. package/dist/prompt-hook-output.js.map +1 -0
  509. package/dist/resolution/c-fnptr-synthesizer.d.ts +6 -0
  510. package/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
  511. package/dist/resolution/c-fnptr-synthesizer.js +1506 -0
  512. package/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
  513. package/dist/resolution/callback-synthesizer.d.ts +59 -0
  514. package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
  515. package/dist/resolution/callback-synthesizer.js +4030 -0
  516. package/dist/resolution/callback-synthesizer.js.map +1 -0
  517. package/dist/resolution/cooperative-yield.d.ts +40 -0
  518. package/dist/resolution/cooperative-yield.d.ts.map +1 -0
  519. package/dist/resolution/cooperative-yield.js +44 -0
  520. package/dist/resolution/cooperative-yield.js.map +1 -0
  521. package/dist/resolution/frameworks/astro.d.ts +9 -0
  522. package/dist/resolution/frameworks/astro.d.ts.map +1 -0
  523. package/dist/resolution/frameworks/astro.js +169 -0
  524. package/dist/resolution/frameworks/astro.js.map +1 -0
  525. package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
  526. package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
  527. package/dist/resolution/frameworks/cargo-workspace.js +225 -0
  528. package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
  529. package/dist/resolution/frameworks/cics.d.ts +20 -0
  530. package/dist/resolution/frameworks/cics.d.ts.map +1 -0
  531. package/dist/resolution/frameworks/cics.js +90 -0
  532. package/dist/resolution/frameworks/cics.js.map +1 -0
  533. package/dist/resolution/frameworks/csharp.d.ts +8 -0
  534. package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
  535. package/dist/resolution/frameworks/csharp.js +241 -0
  536. package/dist/resolution/frameworks/csharp.js.map +1 -0
  537. package/dist/resolution/frameworks/drupal.d.ts +51 -0
  538. package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
  539. package/dist/resolution/frameworks/drupal.js +367 -0
  540. package/dist/resolution/frameworks/drupal.js.map +1 -0
  541. package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
  542. package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
  543. package/dist/resolution/frameworks/expo-modules.js +148 -0
  544. package/dist/resolution/frameworks/expo-modules.js.map +1 -0
  545. package/dist/resolution/frameworks/express.d.ts +8 -0
  546. package/dist/resolution/frameworks/express.d.ts.map +1 -0
  547. package/dist/resolution/frameworks/express.js +308 -0
  548. package/dist/resolution/frameworks/express.js.map +1 -0
  549. package/dist/resolution/frameworks/fabric.d.ts +3 -0
  550. package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
  551. package/dist/resolution/frameworks/fabric.js +354 -0
  552. package/dist/resolution/frameworks/fabric.js.map +1 -0
  553. package/dist/resolution/frameworks/go.d.ts +8 -0
  554. package/dist/resolution/frameworks/go.d.ts.map +1 -0
  555. package/dist/resolution/frameworks/go.js +184 -0
  556. package/dist/resolution/frameworks/go.js.map +1 -0
  557. package/dist/resolution/frameworks/goframe.d.ts +41 -0
  558. package/dist/resolution/frameworks/goframe.d.ts.map +1 -0
  559. package/dist/resolution/frameworks/goframe.js +112 -0
  560. package/dist/resolution/frameworks/goframe.js.map +1 -0
  561. package/dist/resolution/frameworks/index.d.ts +50 -0
  562. package/dist/resolution/frameworks/index.d.ts.map +1 -0
  563. package/dist/resolution/frameworks/index.js +175 -0
  564. package/dist/resolution/frameworks/index.js.map +1 -0
  565. package/dist/resolution/frameworks/java.d.ts +8 -0
  566. package/dist/resolution/frameworks/java.d.ts.map +1 -0
  567. package/dist/resolution/frameworks/java.js +517 -0
  568. package/dist/resolution/frameworks/java.js.map +1 -0
  569. package/dist/resolution/frameworks/laravel.d.ts +13 -0
  570. package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
  571. package/dist/resolution/frameworks/laravel.js +257 -0
  572. package/dist/resolution/frameworks/laravel.js.map +1 -0
  573. package/dist/resolution/frameworks/nestjs.d.ts +26 -0
  574. package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
  575. package/dist/resolution/frameworks/nestjs.js +698 -0
  576. package/dist/resolution/frameworks/nestjs.js.map +1 -0
  577. package/dist/resolution/frameworks/play.d.ts +19 -0
  578. package/dist/resolution/frameworks/play.d.ts.map +1 -0
  579. package/dist/resolution/frameworks/play.js +111 -0
  580. package/dist/resolution/frameworks/play.js.map +1 -0
  581. package/dist/resolution/frameworks/python.d.ts +10 -0
  582. package/dist/resolution/frameworks/python.d.ts.map +1 -0
  583. package/dist/resolution/frameworks/python.js +400 -0
  584. package/dist/resolution/frameworks/python.js.map +1 -0
  585. package/dist/resolution/frameworks/react-native.d.ts +3 -0
  586. package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
  587. package/dist/resolution/frameworks/react-native.js +410 -0
  588. package/dist/resolution/frameworks/react-native.js.map +1 -0
  589. package/dist/resolution/frameworks/react.d.ts +8 -0
  590. package/dist/resolution/frameworks/react.d.ts.map +1 -0
  591. package/dist/resolution/frameworks/react.js +334 -0
  592. package/dist/resolution/frameworks/react.js.map +1 -0
  593. package/dist/resolution/frameworks/ruby.d.ts +8 -0
  594. package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
  595. package/dist/resolution/frameworks/ruby.js +302 -0
  596. package/dist/resolution/frameworks/ruby.js.map +1 -0
  597. package/dist/resolution/frameworks/rust.d.ts +8 -0
  598. package/dist/resolution/frameworks/rust.d.ts.map +1 -0
  599. package/dist/resolution/frameworks/rust.js +304 -0
  600. package/dist/resolution/frameworks/rust.js.map +1 -0
  601. package/dist/resolution/frameworks/svelte.d.ts +9 -0
  602. package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
  603. package/dist/resolution/frameworks/svelte.js +253 -0
  604. package/dist/resolution/frameworks/svelte.js.map +1 -0
  605. package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
  606. package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
  607. package/dist/resolution/frameworks/swift-objc.js +252 -0
  608. package/dist/resolution/frameworks/swift-objc.js.map +1 -0
  609. package/dist/resolution/frameworks/swift.d.ts +10 -0
  610. package/dist/resolution/frameworks/swift.d.ts.map +1 -0
  611. package/dist/resolution/frameworks/swift.js +400 -0
  612. package/dist/resolution/frameworks/swift.js.map +1 -0
  613. package/dist/resolution/frameworks/terraform.d.ts +38 -0
  614. package/dist/resolution/frameworks/terraform.d.ts.map +1 -0
  615. package/dist/resolution/frameworks/terraform.js +277 -0
  616. package/dist/resolution/frameworks/terraform.js.map +1 -0
  617. package/dist/resolution/frameworks/vue.d.ts +9 -0
  618. package/dist/resolution/frameworks/vue.d.ts.map +1 -0
  619. package/dist/resolution/frameworks/vue.js +303 -0
  620. package/dist/resolution/frameworks/vue.js.map +1 -0
  621. package/dist/resolution/go-module.d.ts +26 -0
  622. package/dist/resolution/go-module.d.ts.map +1 -0
  623. package/dist/resolution/go-module.js +78 -0
  624. package/dist/resolution/go-module.js.map +1 -0
  625. package/dist/resolution/goframe-synthesizer.d.ts +29 -0
  626. package/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
  627. package/dist/resolution/goframe-synthesizer.js +163 -0
  628. package/dist/resolution/goframe-synthesizer.js.map +1 -0
  629. package/dist/resolution/import-resolver.d.ts +84 -0
  630. package/dist/resolution/import-resolver.d.ts.map +1 -0
  631. package/dist/resolution/import-resolver.js +2134 -0
  632. package/dist/resolution/import-resolver.js.map +1 -0
  633. package/dist/resolution/index.d.ts +343 -0
  634. package/dist/resolution/index.d.ts.map +1 -0
  635. package/dist/resolution/index.js +2339 -0
  636. package/dist/resolution/index.js.map +1 -0
  637. package/dist/resolution/lru-cache.d.ts +24 -0
  638. package/dist/resolution/lru-cache.d.ts.map +1 -0
  639. package/dist/resolution/lru-cache.js +62 -0
  640. package/dist/resolution/lru-cache.js.map +1 -0
  641. package/dist/resolution/memory-budget.d.ts +48 -0
  642. package/dist/resolution/memory-budget.d.ts.map +1 -0
  643. package/dist/resolution/memory-budget.js +162 -0
  644. package/dist/resolution/memory-budget.js.map +1 -0
  645. package/dist/resolution/name-matcher.d.ts +123 -0
  646. package/dist/resolution/name-matcher.d.ts.map +1 -0
  647. package/dist/resolution/name-matcher.js +2134 -0
  648. package/dist/resolution/name-matcher.js.map +1 -0
  649. package/dist/resolution/path-aliases.d.ts +68 -0
  650. package/dist/resolution/path-aliases.d.ts.map +1 -0
  651. package/dist/resolution/path-aliases.js +238 -0
  652. package/dist/resolution/path-aliases.js.map +1 -0
  653. package/dist/resolution/resolver-pool.d.ts +106 -0
  654. package/dist/resolution/resolver-pool.d.ts.map +1 -0
  655. package/dist/resolution/resolver-pool.js +344 -0
  656. package/dist/resolution/resolver-pool.js.map +1 -0
  657. package/dist/resolution/resolver-worker.d.ts +17 -0
  658. package/dist/resolution/resolver-worker.d.ts.map +1 -0
  659. package/dist/resolution/resolver-worker.js +141 -0
  660. package/dist/resolution/resolver-worker.js.map +1 -0
  661. package/dist/resolution/strip-comments.d.ts +27 -0
  662. package/dist/resolution/strip-comments.d.ts.map +1 -0
  663. package/dist/resolution/strip-comments.js +492 -0
  664. package/dist/resolution/strip-comments.js.map +1 -0
  665. package/dist/resolution/swift-objc-bridge.d.ts +134 -0
  666. package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
  667. package/dist/resolution/swift-objc-bridge.js +256 -0
  668. package/dist/resolution/swift-objc-bridge.js.map +1 -0
  669. package/dist/resolution/types.d.ts +265 -0
  670. package/dist/resolution/types.d.ts.map +1 -0
  671. package/dist/resolution/types.js +8 -0
  672. package/dist/resolution/types.js.map +1 -0
  673. package/dist/resolution/workspace-packages.d.ts +58 -0
  674. package/dist/resolution/workspace-packages.d.ts.map +1 -0
  675. package/dist/resolution/workspace-packages.js +346 -0
  676. package/dist/resolution/workspace-packages.js.map +1 -0
  677. package/dist/search/identifier-segments.d.ts +60 -0
  678. package/dist/search/identifier-segments.d.ts.map +1 -0
  679. package/dist/search/identifier-segments.js +176 -0
  680. package/dist/search/identifier-segments.js.map +1 -0
  681. package/dist/search/query-parser.d.ts +57 -0
  682. package/dist/search/query-parser.d.ts.map +1 -0
  683. package/dist/search/query-parser.js +177 -0
  684. package/dist/search/query-parser.js.map +1 -0
  685. package/dist/search/query-utils.d.ts +87 -0
  686. package/dist/search/query-utils.d.ts.map +1 -0
  687. package/dist/search/query-utils.js +450 -0
  688. package/dist/search/query-utils.js.map +1 -0
  689. package/dist/sync/git-hooks.d.ts +45 -0
  690. package/dist/sync/git-hooks.d.ts.map +1 -0
  691. package/dist/sync/git-hooks.js +227 -0
  692. package/dist/sync/git-hooks.js.map +1 -0
  693. package/dist/sync/index.d.ts +19 -0
  694. package/dist/sync/index.d.ts.map +1 -0
  695. package/dist/sync/index.js +35 -0
  696. package/dist/sync/index.js.map +1 -0
  697. package/dist/sync/watch-policy.d.ts +48 -0
  698. package/dist/sync/watch-policy.d.ts.map +1 -0
  699. package/dist/sync/watch-policy.js +124 -0
  700. package/dist/sync/watch-policy.js.map +1 -0
  701. package/dist/sync/watcher.d.ts +379 -0
  702. package/dist/sync/watcher.d.ts.map +1 -0
  703. package/dist/sync/watcher.js +921 -0
  704. package/dist/sync/watcher.js.map +1 -0
  705. package/dist/sync/worktree.d.ts +63 -0
  706. package/dist/sync/worktree.d.ts.map +1 -0
  707. package/dist/sync/worktree.js +182 -0
  708. package/dist/sync/worktree.js.map +1 -0
  709. package/dist/telemetry/index.d.ts +143 -0
  710. package/dist/telemetry/index.d.ts.map +1 -0
  711. package/dist/telemetry/index.js +541 -0
  712. package/dist/telemetry/index.js.map +1 -0
  713. package/dist/types.d.ts +465 -0
  714. package/dist/types.d.ts.map +1 -0
  715. package/dist/types.js +117 -0
  716. package/dist/types.js.map +1 -0
  717. package/dist/ui/color.d.ts +21 -0
  718. package/dist/ui/color.d.ts.map +1 -0
  719. package/dist/ui/color.js +42 -0
  720. package/dist/ui/color.js.map +1 -0
  721. package/dist/ui/glyphs.d.ts +67 -0
  722. package/dist/ui/glyphs.d.ts.map +1 -0
  723. package/dist/ui/glyphs.js +125 -0
  724. package/dist/ui/glyphs.js.map +1 -0
  725. package/dist/ui/shimmer-progress.d.ts +11 -0
  726. package/dist/ui/shimmer-progress.d.ts.map +1 -0
  727. package/dist/ui/shimmer-progress.js +164 -0
  728. package/dist/ui/shimmer-progress.js.map +1 -0
  729. package/dist/ui/shimmer-worker.d.ts +2 -0
  730. package/dist/ui/shimmer-worker.d.ts.map +1 -0
  731. package/dist/ui/shimmer-worker.js +126 -0
  732. package/dist/ui/shimmer-worker.js.map +1 -0
  733. package/dist/ui/types.d.ts +15 -0
  734. package/dist/ui/types.d.ts.map +1 -0
  735. package/dist/ui/types.js +3 -0
  736. package/dist/ui/types.js.map +1 -0
  737. package/dist/upgrade/index.d.ts +171 -0
  738. package/dist/upgrade/index.d.ts.map +1 -0
  739. package/dist/upgrade/index.js +659 -0
  740. package/dist/upgrade/index.js.map +1 -0
  741. package/dist/upgrade/remove-binary.d.ts +87 -0
  742. package/dist/upgrade/remove-binary.d.ts.map +1 -0
  743. package/dist/upgrade/remove-binary.js +289 -0
  744. package/dist/upgrade/remove-binary.js.map +1 -0
  745. package/dist/upgrade/update-check.d.ts +92 -0
  746. package/dist/upgrade/update-check.d.ts.map +1 -0
  747. package/dist/upgrade/update-check.js +258 -0
  748. package/dist/upgrade/update-check.js.map +1 -0
  749. package/dist/utils.d.ts +224 -0
  750. package/dist/utils.d.ts.map +1 -0
  751. package/dist/utils.js +583 -0
  752. package/dist/utils.js.map +1 -0
  753. package/package.json +61 -0
  754. package/scripts/add-lang/bench.sh +60 -0
  755. package/scripts/add-lang/check-grammar.mjs +75 -0
  756. package/scripts/add-lang/dump-ast.mjs +103 -0
  757. package/scripts/add-lang/verify-extraction.mjs +70 -0
  758. package/scripts/agent-eval/ab-adoption.sh +91 -0
  759. package/scripts/agent-eval/ab-hook.sh +86 -0
  760. package/scripts/agent-eval/ab-impl.sh +78 -0
  761. package/scripts/agent-eval/ab-new-vs-baseline.sh +161 -0
  762. package/scripts/agent-eval/ab-sufficiency.sh +78 -0
  763. package/scripts/agent-eval/allocation-fixtures.json +344 -0
  764. package/scripts/agent-eval/arms-F.sh +21 -0
  765. package/scripts/agent-eval/arms-matrix.sh +37 -0
  766. package/scripts/agent-eval/audit.sh +68 -0
  767. package/scripts/agent-eval/bench-readme.sh +48 -0
  768. package/scripts/agent-eval/bench-why-repo.sh +22 -0
  769. package/scripts/agent-eval/block-read-hook.sh +19 -0
  770. package/scripts/agent-eval/compare-arms.mjs +209 -0
  771. package/scripts/agent-eval/diff-index-drift.mjs +102 -0
  772. package/scripts/agent-eval/hook-settings.json +15 -0
  773. package/scripts/agent-eval/itrun.sh +120 -0
  774. package/scripts/agent-eval/no-cli-shim.sh +96 -0
  775. package/scripts/agent-eval/offload-eval-3arm.sh +72 -0
  776. package/scripts/agent-eval/offload-eval-cost.mjs +133 -0
  777. package/scripts/agent-eval/offload-eval-effort.mjs +108 -0
  778. package/scripts/agent-eval/offload-eval-frontload-matrix.sh +25 -0
  779. package/scripts/agent-eval/offload-eval-frontload.sh +47 -0
  780. package/scripts/agent-eval/offload-eval-ground-truth.json +18 -0
  781. package/scripts/agent-eval/offload-eval-hook.mjs +84 -0
  782. package/scripts/agent-eval/offload-eval-judge.mjs +103 -0
  783. package/scripts/agent-eval/offload-eval-matrix.sh +20 -0
  784. package/scripts/agent-eval/offload-eval-metrics.mjs +94 -0
  785. package/scripts/agent-eval/offload-eval-refs1.sh +50 -0
  786. package/scripts/agent-eval/offload-eval-setup.sh +24 -0
  787. package/scripts/agent-eval/offload-eval-styles.sh +72 -0
  788. package/scripts/agent-eval/offload-eval-summarize.mjs +68 -0
  789. package/scripts/agent-eval/offload-eval.md +76 -0
  790. package/scripts/agent-eval/parse-arms.mjs +116 -0
  791. package/scripts/agent-eval/parse-bench-readme.mjs +238 -0
  792. package/scripts/agent-eval/parse-run.mjs +1401 -0
  793. package/scripts/agent-eval/parse-session.mjs +130 -0
  794. package/scripts/agent-eval/probe-allocation.mjs +335 -0
  795. package/scripts/agent-eval/probe-context.mjs +21 -0
  796. package/scripts/agent-eval/probe-decl-only.mjs +198 -0
  797. package/scripts/agent-eval/probe-explore.mjs +40 -0
  798. package/scripts/agent-eval/probe-factory-closure.mjs +147 -0
  799. package/scripts/agent-eval/probe-file-spend.mjs +195 -0
  800. package/scripts/agent-eval/probe-named-symbol.mjs +163 -0
  801. package/scripts/agent-eval/probe-node.mjs +20 -0
  802. package/scripts/agent-eval/probe-suite-envelope.mjs +124 -0
  803. package/scripts/agent-eval/probe-sweep.mjs +119 -0
  804. package/scripts/agent-eval/probe-trace.mjs +20 -0
  805. package/scripts/agent-eval/redirect-read-hook.sh +38 -0
  806. package/scripts/agent-eval/repro-concurrent-explore.mjs +119 -0
  807. package/scripts/agent-eval/repro-daemon-clients.mjs +125 -0
  808. package/scripts/agent-eval/run-agent.sh +34 -0
  809. package/scripts/agent-eval/run-all.sh +149 -0
  810. package/scripts/agent-eval/run-arms.sh +56 -0
  811. package/scripts/agent-eval/seq-matrix.mjs +137 -0
  812. package/scripts/build-bundle.sh +145 -0
  813. package/scripts/build-kernel.sh +87 -0
  814. package/scripts/dump-graph.mjs +57 -0
  815. package/scripts/extract-release-notes.mjs +130 -0
  816. package/scripts/kernel-parity.mjs +283 -0
  817. package/scripts/local-install.sh +41 -0
  818. package/scripts/npm-sdk.js +75 -0
  819. package/scripts/npm-shim.js +279 -0
  820. package/scripts/pack-npm.sh +123 -0
  821. package/scripts/prepare-release.mjs +270 -0
@@ -0,0 +1,217 @@
1
+ /**
2
+ * Session-scoped `codegraph_explore` call state (CG-17).
3
+ *
4
+ * What it holds: for ONE MCP session, per project it queried, what explore has
5
+ * already returned — the files, the line ranges of source inside them, the bytes
6
+ * they cost, and where in the session each call fell. Nothing else in the server
7
+ * knows this today: every explore call is answered as if it were the first one,
8
+ * which is why a 4th call happily re-serves the same spine it already sent
9
+ * (#1500) and why the tier's call budget can only be *asked* for rather than
10
+ * enforced. This module is the record those two behaviours are built on
11
+ * (CG-18 cross-call dedup, CG-19 budget decay). It changes no response itself.
12
+ *
13
+ * Four constraints shape the design, all of them from how the daemon actually
14
+ * runs:
15
+ *
16
+ * 1. **Per session, never persisted.** One instance is owned by an
17
+ * {@link ../mcp/session.MCPSession} and dies with the socket. A new agent
18
+ * session starts clean — dedup across sessions would suppress source the
19
+ * new agent has never seen.
20
+ * 2. **Per project inside the session.** A session can query several projects
21
+ * by `projectPath`, so state is keyed by the RESOLVED project root
22
+ * (`cg.getProjectRoot()`), not by whatever path the agent typed.
23
+ * 3. **Bounded.** A long-lived session must not grow without limit, so
24
+ * everything is capped — see {@link EXPLORE_SESSION_LIMITS}. Eviction drops
25
+ * DETAIL only: `callCount` and `responseBytes` keep counting past it, since
26
+ * decay (CG-19) reads the count and must not be reset by its own bound.
27
+ * 4. **Daemon-safe.** The daemon shares ONE {@link ../mcp/tools.ToolHandler}
28
+ * (and a pool of worker threads) across every connected session, so this
29
+ * state can live neither on the handler nor in a worker. It lives on the
30
+ * session; the handler is handed it per call, and the record of what a call
31
+ * emitted travels back on the {@link ToolResult} so it can be recorded on
32
+ * the main thread whether dispatch ran in-process or on a worker.
33
+ *
34
+ * Over- vs under-reporting: where a bound forces a choice, this module keeps
35
+ * FEWER ranges than were emitted, never more. A consumer that under-knows
36
+ * re-serves something the agent already has (wasteful); one that over-knows
37
+ * withholds source the agent never saw (a Read — the failure this whole area
38
+ * exists to prevent).
39
+ */
40
+ /**
41
+ * Property on a {@link ../mcp/tools.ToolResult} carrying what an explore call
42
+ * emitted. INTERNAL: `ToolHandler.execute` records it and deletes it before the
43
+ * result reaches the wire, so the agent-facing response is unchanged. It is a
44
+ * plain-object property (not a Symbol) on purpose — it has to survive the
45
+ * structured clone back from a query-pool worker.
46
+ */
47
+ export declare const EXPLORE_EMISSION_KEY = "_cgExploreEmission";
48
+ /**
49
+ * Argument key carrying this session's prior-call view INTO a tool call. Same
50
+ * reasoning as {@link EXPLORE_EMISSION_KEY}: it crosses the worker boundary, so
51
+ * it must be a serializable property on the args object.
52
+ */
53
+ export declare const EXPLORE_SESSION_VIEW_ARG = "_cgExploreSession";
54
+ /** An inclusive 1-based line span of a file that was emitted. */
55
+ export interface ExploreLineRange {
56
+ start: number;
57
+ end: number;
58
+ }
59
+ /** What one call emitted for one file. */
60
+ export interface ExploreFileEmission {
61
+ /** Project-relative path, exactly as the response's file header spells it. */
62
+ path: string;
63
+ /** Coalesced line spans whose source was in the response. */
64
+ ranges: ExploreLineRange[];
65
+ /** Source chars emitted for this file (excludes headers / fences). */
66
+ bytes: number;
67
+ /**
68
+ * Identity of the bytes those ranges were sliced from (CG-18). Cross-call
69
+ * dedup withholds a span only when the file still hashes to this, so an edit
70
+ * between two calls re-serves instead of pointing at source the agent holds a
71
+ * now-wrong copy of. Absent = unprovable, which dedup treats as "re-serve".
72
+ */
73
+ fingerprint?: string;
74
+ /** Set when ranges were dropped to stay under the per-file bound. */
75
+ rangesTruncated?: boolean;
76
+ }
77
+ /** What one explore call emitted, as reported by the handler. */
78
+ export interface ExploreEmission {
79
+ /** Resolved project root — the key state is filed under. */
80
+ projectRoot: string;
81
+ /** Normalized query text (post `normalizeQuerySpelling`). */
82
+ query: string;
83
+ files: ExploreFileEmission[];
84
+ /** Source chars across all files. */
85
+ sourceBytes: number;
86
+ /** Total chars of the response the agent received. */
87
+ responseBytes: number;
88
+ }
89
+ /** A recorded call: an emission plus where it fell in the session. */
90
+ export interface ExploreCallRecord extends ExploreEmission {
91
+ /** 1-based call index within this session FOR THIS PROJECT. Survives eviction. */
92
+ index: number;
93
+ }
94
+ /** Everything the session knows about one project. */
95
+ export interface ExploreProjectState {
96
+ projectRoot: string;
97
+ /** Explore calls made this session against this project, including evicted ones. */
98
+ callCount: number;
99
+ /** Response chars across every call, including evicted ones. */
100
+ responseBytes: number;
101
+ /** Retained call records, oldest first. Bounded — may omit early calls. */
102
+ calls: ExploreCallRecord[];
103
+ }
104
+ /**
105
+ * The bounded, serializable read-view handed to a tool call. Deliberately
106
+ * smaller than the full state: only the most recent calls carry their ranges,
107
+ * because that is what a dedup/decay decision reads and the whole thing is
108
+ * structured-cloned to a worker on every call.
109
+ */
110
+ export interface ExploreSessionView {
111
+ projects: ExploreProjectState[];
112
+ }
113
+ /**
114
+ * Memory bounds. Every one of them caps DETAIL; none caps the counters that
115
+ * CG-19's decay reads.
116
+ *
117
+ * Sized against how sessions actually behave: an agent explores one project
118
+ * (occasionally a second in a monorepo) and the tier call budget is 1–5, so the
119
+ * retained window covers a whole realistic session and the caps only bite on
120
+ * pathological ones.
121
+ */
122
+ export declare const EXPLORE_SESSION_LIMITS: {
123
+ /** Distinct projects kept per session; least-recently-used evicted first. */
124
+ readonly MAX_PROJECTS: 4;
125
+ /** Call records kept per project (oldest dropped; `callCount` keeps counting). */
126
+ readonly MAX_CALLS_RETAINED: 8;
127
+ /** Files kept per call — the ones that got the most source. */
128
+ readonly MAX_FILES_PER_CALL: 24;
129
+ /** Line ranges kept per file after coalescing — the largest spans. */
130
+ readonly MAX_RANGES_PER_FILE: 24;
131
+ /** Most-recent calls per project included in {@link ExploreSessionView}. */
132
+ readonly MAX_VIEW_CALLS: 4;
133
+ };
134
+ /**
135
+ * Key a project root is filed under. Resolved so `/repo` and `/repo/` agree;
136
+ * case-folded on the two platforms whose filesystems are case-insensitive, so a
137
+ * drive-letter or capitalization difference doesn't split one project in two.
138
+ */
139
+ export declare function exploreProjectKey(projectRoot: string): string;
140
+ /**
141
+ * Merge overlapping / adjacent spans into the smallest equivalent set, then cap
142
+ * it. Adjacency (`next.start <= cur.end + 1`) counts as overlap: two ranges that
143
+ * touch describe one contiguous block of emitted source.
144
+ *
145
+ * When the cap bites, the LARGEST spans are kept and the result is re-sorted by
146
+ * line so the set still reads top-to-bottom — dropping small fragments loses the
147
+ * least information, and under-reporting is the safe direction (see the module
148
+ * header).
149
+ */
150
+ export declare function coalesceRanges(ranges: ReadonlyArray<ExploreLineRange>, max?: number): {
151
+ ranges: ExploreLineRange[];
152
+ truncated: boolean;
153
+ };
154
+ /** Whether a line falls inside any of the (sorted, coalesced) ranges. */
155
+ export declare function rangesCover(ranges: ReadonlyArray<ExploreLineRange>, line: number): boolean;
156
+ /**
157
+ * One MCP session's explore history. Created per session, thrown away with it.
158
+ *
159
+ * Not thread-shared and not a singleton: two sessions on the same daemon own two
160
+ * instances and can never observe each other's calls. Every method is total —
161
+ * malformed input is normalized away rather than thrown, because this sits on
162
+ * the tool-call path and a bookkeeping bug must never fail an explore.
163
+ */
164
+ export declare class ExploreSessionState {
165
+ /** Insertion-ordered; a touched project is re-inserted, so the head is the LRU. */
166
+ private readonly projects;
167
+ /**
168
+ * File an emission. Returns the record as stored (with its session call
169
+ * index), or `null` if the emission was unusable.
170
+ */
171
+ record(emission: ExploreEmission): ExploreCallRecord | null;
172
+ /** Full state for one project, or `null` if it was never queried this session. */
173
+ forProject(projectRoot: string): ExploreProjectState | null;
174
+ /** Explore calls made this session against a project (including evicted ones). */
175
+ callCount(projectRoot: string): number;
176
+ /** Every project this session has queried, least-recently-used first. */
177
+ snapshot(): ExploreProjectState[];
178
+ /**
179
+ * The bounded view passed INTO a tool call. Trimmed to the most recent
180
+ * {@link EXPLORE_SESSION_LIMITS.MAX_VIEW_CALLS} calls per project: it crosses a
181
+ * worker boundary on every explore, so it carries what a dedup/decay decision
182
+ * needs and not the whole history.
183
+ */
184
+ view(): ExploreSessionView;
185
+ /** Drop everything. Used by tests; a real session just goes away instead. */
186
+ clear(): void;
187
+ /**
188
+ * Fetch a project's state, creating it if new, and mark it most-recently-used.
189
+ * Evicts the LRU project past the bound — dropping a project entirely (rather
190
+ * than its detail) is right here: a session that has moved on to four other
191
+ * repos is not about to re-ask the first one.
192
+ */
193
+ private touch;
194
+ /**
195
+ * Normalize + bound one call's files: coalesce each file's ranges, then keep
196
+ * the files that got the most source. A call that renders more files than the
197
+ * bound has already spread its envelope thin, so the tail files carry the
198
+ * least — and losing them costs the least.
199
+ */
200
+ private boundFiles;
201
+ }
202
+ /**
203
+ * Read the session view a caller injected into tool args, if any. Defensive:
204
+ * the key is internal, but the args object comes off the wire, so a client that
205
+ * spells it itself gets ignored rather than trusted into a crash.
206
+ */
207
+ export declare function readExploreSessionView(args: Record<string, unknown>): ExploreSessionView | null;
208
+ /**
209
+ * This session's prior state for one project, from an injected view.
210
+ *
211
+ * `null` means NOBODY IS TRACKING (no view was injected — the CLI, a bare
212
+ * handler). A view that simply hasn't seen this project yet returns an EMPTY
213
+ * state, not null: the distinction matters to consumers, since "first call of a
214
+ * tracked session" and "untracked" are different situations.
215
+ */
216
+ export declare function viewForProject(view: ExploreSessionView | null, projectRoot: string): ExploreProjectState | null;
217
+ //# sourceMappingURL=explore-session-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explore-session-state.d.ts","sourceRoot":"","sources":["../../src/mcp/explore-session-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,uBAAuB,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAE5D,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,0CAA0C;AAC1C,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qEAAqE;IACrE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,sEAAsE;AACtE,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,aAAa,EAAE,MAAM,CAAC;IACtB,2EAA2E;IAC3E,KA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gB,sBAAsB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,kBAAkB,GAAG,IAAI,CAM/F;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,kBAAkB,GAAG,IAAI,EAC/B,WAAW,EAAE,MAAM,GAClB,mBAAmB,GAAG,IAAI,CAK5B"}
@@ -0,0 +1,322 @@
1
+ "use strict";
2
+ /**
3
+ * Session-scoped `codegraph_explore` call state (CG-17).
4
+ *
5
+ * What it holds: for ONE MCP session, per project it queried, what explore has
6
+ * already returned — the files, the line ranges of source inside them, the bytes
7
+ * they cost, and where in the session each call fell. Nothing else in the server
8
+ * knows this today: every explore call is answered as if it were the first one,
9
+ * which is why a 4th call happily re-serves the same spine it already sent
10
+ * (#1500) and why the tier's call budget can only be *asked* for rather than
11
+ * enforced. This module is the record those two behaviours are built on
12
+ * (CG-18 cross-call dedup, CG-19 budget decay). It changes no response itself.
13
+ *
14
+ * Four constraints shape the design, all of them from how the daemon actually
15
+ * runs:
16
+ *
17
+ * 1. **Per session, never persisted.** One instance is owned by an
18
+ * {@link ../mcp/session.MCPSession} and dies with the socket. A new agent
19
+ * session starts clean — dedup across sessions would suppress source the
20
+ * new agent has never seen.
21
+ * 2. **Per project inside the session.** A session can query several projects
22
+ * by `projectPath`, so state is keyed by the RESOLVED project root
23
+ * (`cg.getProjectRoot()`), not by whatever path the agent typed.
24
+ * 3. **Bounded.** A long-lived session must not grow without limit, so
25
+ * everything is capped — see {@link EXPLORE_SESSION_LIMITS}. Eviction drops
26
+ * DETAIL only: `callCount` and `responseBytes` keep counting past it, since
27
+ * decay (CG-19) reads the count and must not be reset by its own bound.
28
+ * 4. **Daemon-safe.** The daemon shares ONE {@link ../mcp/tools.ToolHandler}
29
+ * (and a pool of worker threads) across every connected session, so this
30
+ * state can live neither on the handler nor in a worker. It lives on the
31
+ * session; the handler is handed it per call, and the record of what a call
32
+ * emitted travels back on the {@link ToolResult} so it can be recorded on
33
+ * the main thread whether dispatch ran in-process or on a worker.
34
+ *
35
+ * Over- vs under-reporting: where a bound forces a choice, this module keeps
36
+ * FEWER ranges than were emitted, never more. A consumer that under-knows
37
+ * re-serves something the agent already has (wasteful); one that over-knows
38
+ * withholds source the agent never saw (a Read — the failure this whole area
39
+ * exists to prevent).
40
+ */
41
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
42
+ if (k2 === undefined) k2 = k;
43
+ var desc = Object.getOwnPropertyDescriptor(m, k);
44
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
45
+ desc = { enumerable: true, get: function() { return m[k]; } };
46
+ }
47
+ Object.defineProperty(o, k2, desc);
48
+ }) : (function(o, m, k, k2) {
49
+ if (k2 === undefined) k2 = k;
50
+ o[k2] = m[k];
51
+ }));
52
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
53
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
54
+ }) : function(o, v) {
55
+ o["default"] = v;
56
+ });
57
+ var __importStar = (this && this.__importStar) || (function () {
58
+ var ownKeys = function(o) {
59
+ ownKeys = Object.getOwnPropertyNames || function (o) {
60
+ var ar = [];
61
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
62
+ return ar;
63
+ };
64
+ return ownKeys(o);
65
+ };
66
+ return function (mod) {
67
+ if (mod && mod.__esModule) return mod;
68
+ var result = {};
69
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
70
+ __setModuleDefault(result, mod);
71
+ return result;
72
+ };
73
+ })();
74
+ Object.defineProperty(exports, "__esModule", { value: true });
75
+ exports.ExploreSessionState = exports.EXPLORE_SESSION_LIMITS = exports.EXPLORE_SESSION_VIEW_ARG = exports.EXPLORE_EMISSION_KEY = void 0;
76
+ exports.exploreProjectKey = exploreProjectKey;
77
+ exports.coalesceRanges = coalesceRanges;
78
+ exports.rangesCover = rangesCover;
79
+ exports.readExploreSessionView = readExploreSessionView;
80
+ exports.viewForProject = viewForProject;
81
+ const path = __importStar(require("path"));
82
+ /**
83
+ * Property on a {@link ../mcp/tools.ToolResult} carrying what an explore call
84
+ * emitted. INTERNAL: `ToolHandler.execute` records it and deletes it before the
85
+ * result reaches the wire, so the agent-facing response is unchanged. It is a
86
+ * plain-object property (not a Symbol) on purpose — it has to survive the
87
+ * structured clone back from a query-pool worker.
88
+ */
89
+ exports.EXPLORE_EMISSION_KEY = '_cgExploreEmission';
90
+ /**
91
+ * Argument key carrying this session's prior-call view INTO a tool call. Same
92
+ * reasoning as {@link EXPLORE_EMISSION_KEY}: it crosses the worker boundary, so
93
+ * it must be a serializable property on the args object.
94
+ */
95
+ exports.EXPLORE_SESSION_VIEW_ARG = '_cgExploreSession';
96
+ /**
97
+ * Memory bounds. Every one of them caps DETAIL; none caps the counters that
98
+ * CG-19's decay reads.
99
+ *
100
+ * Sized against how sessions actually behave: an agent explores one project
101
+ * (occasionally a second in a monorepo) and the tier call budget is 1–5, so the
102
+ * retained window covers a whole realistic session and the caps only bite on
103
+ * pathological ones.
104
+ */
105
+ exports.EXPLORE_SESSION_LIMITS = {
106
+ /** Distinct projects kept per session; least-recently-used evicted first. */
107
+ MAX_PROJECTS: 4,
108
+ /** Call records kept per project (oldest dropped; `callCount` keeps counting). */
109
+ MAX_CALLS_RETAINED: 8,
110
+ /** Files kept per call — the ones that got the most source. */
111
+ MAX_FILES_PER_CALL: 24,
112
+ /** Line ranges kept per file after coalescing — the largest spans. */
113
+ MAX_RANGES_PER_FILE: 24,
114
+ /** Most-recent calls per project included in {@link ExploreSessionView}. */
115
+ MAX_VIEW_CALLS: 4,
116
+ };
117
+ /**
118
+ * Key a project root is filed under. Resolved so `/repo` and `/repo/` agree;
119
+ * case-folded on the two platforms whose filesystems are case-insensitive, so a
120
+ * drive-letter or capitalization difference doesn't split one project in two.
121
+ */
122
+ function exploreProjectKey(projectRoot) {
123
+ const resolved = path.resolve(projectRoot);
124
+ return process.platform === 'win32' || process.platform === 'darwin'
125
+ ? resolved.toLowerCase()
126
+ : resolved;
127
+ }
128
+ /**
129
+ * Merge overlapping / adjacent spans into the smallest equivalent set, then cap
130
+ * it. Adjacency (`next.start <= cur.end + 1`) counts as overlap: two ranges that
131
+ * touch describe one contiguous block of emitted source.
132
+ *
133
+ * When the cap bites, the LARGEST spans are kept and the result is re-sorted by
134
+ * line so the set still reads top-to-bottom — dropping small fragments loses the
135
+ * least information, and under-reporting is the safe direction (see the module
136
+ * header).
137
+ */
138
+ function coalesceRanges(ranges, max = exports.EXPLORE_SESSION_LIMITS.MAX_RANGES_PER_FILE) {
139
+ const valid = ranges
140
+ .filter((r) => Number.isFinite(r.start) && Number.isFinite(r.end) && r.end >= r.start && r.start >= 1)
141
+ .map((r) => ({ start: Math.floor(r.start), end: Math.floor(r.end) }))
142
+ .sort((a, b) => a.start - b.start || a.end - b.end);
143
+ const merged = [];
144
+ for (const r of valid) {
145
+ const last = merged[merged.length - 1];
146
+ if (last && r.start <= last.end + 1)
147
+ last.end = Math.max(last.end, r.end);
148
+ else
149
+ merged.push({ ...r });
150
+ }
151
+ if (merged.length <= max)
152
+ return { ranges: merged, truncated: false };
153
+ const kept = [...merged]
154
+ .sort((a, b) => (b.end - b.start) - (a.end - a.start) || a.start - b.start)
155
+ .slice(0, max)
156
+ .sort((a, b) => a.start - b.start);
157
+ return { ranges: kept, truncated: true };
158
+ }
159
+ /** Whether a line falls inside any of the (sorted, coalesced) ranges. */
160
+ function rangesCover(ranges, line) {
161
+ return ranges.some((r) => line >= r.start && line <= r.end);
162
+ }
163
+ /**
164
+ * One MCP session's explore history. Created per session, thrown away with it.
165
+ *
166
+ * Not thread-shared and not a singleton: two sessions on the same daemon own two
167
+ * instances and can never observe each other's calls. Every method is total —
168
+ * malformed input is normalized away rather than thrown, because this sits on
169
+ * the tool-call path and a bookkeeping bug must never fail an explore.
170
+ */
171
+ class ExploreSessionState {
172
+ /** Insertion-ordered; a touched project is re-inserted, so the head is the LRU. */
173
+ projects = new Map();
174
+ /**
175
+ * File an emission. Returns the record as stored (with its session call
176
+ * index), or `null` if the emission was unusable.
177
+ */
178
+ record(emission) {
179
+ if (!emission || typeof emission.projectRoot !== 'string' || !emission.projectRoot)
180
+ return null;
181
+ const key = exploreProjectKey(emission.projectRoot);
182
+ const state = this.touch(key, emission.projectRoot);
183
+ state.callCount += 1;
184
+ state.responseBytes += Math.max(0, emission.responseBytes || 0);
185
+ const record = {
186
+ index: state.callCount,
187
+ projectRoot: emission.projectRoot,
188
+ query: typeof emission.query === 'string' ? emission.query : '',
189
+ files: this.boundFiles(emission.files),
190
+ sourceBytes: Math.max(0, emission.sourceBytes || 0),
191
+ responseBytes: Math.max(0, emission.responseBytes || 0),
192
+ };
193
+ state.calls.push(record);
194
+ if (state.calls.length > exports.EXPLORE_SESSION_LIMITS.MAX_CALLS_RETAINED) {
195
+ state.calls.splice(0, state.calls.length - exports.EXPLORE_SESSION_LIMITS.MAX_CALLS_RETAINED);
196
+ }
197
+ return record;
198
+ }
199
+ /** Full state for one project, or `null` if it was never queried this session. */
200
+ forProject(projectRoot) {
201
+ const state = this.projects.get(exploreProjectKey(projectRoot));
202
+ return state ? cloneProject(state) : null;
203
+ }
204
+ /** Explore calls made this session against a project (including evicted ones). */
205
+ callCount(projectRoot) {
206
+ return this.projects.get(exploreProjectKey(projectRoot))?.callCount ?? 0;
207
+ }
208
+ /** Every project this session has queried, least-recently-used first. */
209
+ snapshot() {
210
+ return [...this.projects.values()].map(cloneProject);
211
+ }
212
+ /**
213
+ * The bounded view passed INTO a tool call. Trimmed to the most recent
214
+ * {@link EXPLORE_SESSION_LIMITS.MAX_VIEW_CALLS} calls per project: it crosses a
215
+ * worker boundary on every explore, so it carries what a dedup/decay decision
216
+ * needs and not the whole history.
217
+ */
218
+ view() {
219
+ return {
220
+ projects: [...this.projects.values()].map((state) => ({
221
+ projectRoot: state.projectRoot,
222
+ callCount: state.callCount,
223
+ responseBytes: state.responseBytes,
224
+ calls: state.calls
225
+ .slice(-exports.EXPLORE_SESSION_LIMITS.MAX_VIEW_CALLS)
226
+ .map((c) => ({ ...c, files: c.files.map((f) => ({ ...f, ranges: [...f.ranges] })) })),
227
+ })),
228
+ };
229
+ }
230
+ /** Drop everything. Used by tests; a real session just goes away instead. */
231
+ clear() {
232
+ this.projects.clear();
233
+ }
234
+ /**
235
+ * Fetch a project's state, creating it if new, and mark it most-recently-used.
236
+ * Evicts the LRU project past the bound — dropping a project entirely (rather
237
+ * than its detail) is right here: a session that has moved on to four other
238
+ * repos is not about to re-ask the first one.
239
+ */
240
+ touch(key, projectRoot) {
241
+ const existing = this.projects.get(key);
242
+ if (existing) {
243
+ this.projects.delete(key);
244
+ this.projects.set(key, existing);
245
+ return existing;
246
+ }
247
+ const created = { projectRoot, callCount: 0, responseBytes: 0, calls: [] };
248
+ this.projects.set(key, created);
249
+ while (this.projects.size > exports.EXPLORE_SESSION_LIMITS.MAX_PROJECTS) {
250
+ const lru = this.projects.keys().next().value;
251
+ if (lru === undefined)
252
+ break;
253
+ this.projects.delete(lru);
254
+ }
255
+ return created;
256
+ }
257
+ /**
258
+ * Normalize + bound one call's files: coalesce each file's ranges, then keep
259
+ * the files that got the most source. A call that renders more files than the
260
+ * bound has already spread its envelope thin, so the tail files carry the
261
+ * least — and losing them costs the least.
262
+ */
263
+ boundFiles(files) {
264
+ if (!Array.isArray(files) || files.length === 0)
265
+ return [];
266
+ const normalized = files
267
+ .filter((f) => f && typeof f.path === 'string' && f.path.length > 0)
268
+ .map((f) => {
269
+ const { ranges, truncated } = coalesceRanges(f.ranges ?? []);
270
+ const out = { path: f.path, ranges, bytes: Math.max(0, f.bytes || 0) };
271
+ if (typeof f.fingerprint === 'string' && f.fingerprint)
272
+ out.fingerprint = f.fingerprint;
273
+ if (truncated)
274
+ out.rangesTruncated = true;
275
+ return out;
276
+ });
277
+ if (normalized.length <= exports.EXPLORE_SESSION_LIMITS.MAX_FILES_PER_CALL)
278
+ return normalized;
279
+ return [...normalized]
280
+ .sort((a, b) => b.bytes - a.bytes)
281
+ .slice(0, exports.EXPLORE_SESSION_LIMITS.MAX_FILES_PER_CALL);
282
+ }
283
+ }
284
+ exports.ExploreSessionState = ExploreSessionState;
285
+ function cloneProject(state) {
286
+ return {
287
+ projectRoot: state.projectRoot,
288
+ callCount: state.callCount,
289
+ responseBytes: state.responseBytes,
290
+ calls: state.calls.map((c) => ({ ...c, files: c.files.map((f) => ({ ...f, ranges: [...f.ranges] })) })),
291
+ };
292
+ }
293
+ /**
294
+ * Read the session view a caller injected into tool args, if any. Defensive:
295
+ * the key is internal, but the args object comes off the wire, so a client that
296
+ * spells it itself gets ignored rather than trusted into a crash.
297
+ */
298
+ function readExploreSessionView(args) {
299
+ const raw = args?.[exports.EXPLORE_SESSION_VIEW_ARG];
300
+ if (!raw || typeof raw !== 'object')
301
+ return null;
302
+ const projects = raw.projects;
303
+ if (!Array.isArray(projects))
304
+ return null;
305
+ return { projects: projects.filter((p) => p && typeof p.projectRoot === 'string') };
306
+ }
307
+ /**
308
+ * This session's prior state for one project, from an injected view.
309
+ *
310
+ * `null` means NOBODY IS TRACKING (no view was injected — the CLI, a bare
311
+ * handler). A view that simply hasn't seen this project yet returns an EMPTY
312
+ * state, not null: the distinction matters to consumers, since "first call of a
313
+ * tracked session" and "untracked" are different situations.
314
+ */
315
+ function viewForProject(view, projectRoot) {
316
+ if (!view)
317
+ return null;
318
+ const key = exploreProjectKey(projectRoot);
319
+ return view.projects.find((p) => exploreProjectKey(p.projectRoot) === key)
320
+ ?? { projectRoot, callCount: 0, responseBytes: 0, calls: [] };
321
+ }
322
+ //# sourceMappingURL=explore-session-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"explore-session-state.js","sourceRoot":"","sources":["../../src/mcp/explore-session-state.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;;;;;;;;;;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