@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,68 @@
1
+ #!/usr/bin/env bash
2
+ # One-shot CodeGraph quality audit:
3
+ # set version -> ensure corpus repo -> wipe+reindex with that version ->
4
+ # run with/without A/B -> restore the local dev link.
5
+ #
6
+ # Usage: audit.sh <version> <repo-name> <repo-url> "<question>" [headless|all]
7
+ # <version> "local" (build + npm link this repo) | "latest" | a version (e.g. 0.7.10)
8
+ # <repo-name> dir name under the corpus dir
9
+ # <repo-url> git URL (cloned --depth 1 when the repo dir is missing)
10
+ # [mode] headless (default) | all (also the interactive tmux arms)
11
+ # Env: CORPUS corpus dir (default: /tmp/codegraph-corpus)
12
+ set -uo pipefail
13
+
14
+ VERSION="${1:?usage: audit.sh <version> <repo-name> <repo-url> \"<question>\" [mode]}"
15
+ NAME="${2:?repo-name required}"
16
+ URL="${3:?repo-url required}"
17
+ Q="${4:?question required}"
18
+ MODE="${5:-headless}"
19
+
20
+ HARNESS="$(cd "$(dirname "$0")" && pwd)"
21
+ REPO_ROOT="$(cd "$HARNESS/../.." && pwd)" # codegraph repo root
22
+ CORPUS="${CORPUS:-/tmp/codegraph-corpus}"
23
+ REPO="$CORPUS/$NAME"
24
+ PKG="@colbymchenry/codegraph"
25
+
26
+ echo "==================== CodeGraph audit ===================="
27
+ echo "version=$VERSION repo=$NAME mode=$MODE corpus=$CORPUS"
28
+ echo
29
+
30
+ # 1. Set the codegraph version under test (mutates the global install).
31
+ if [ "$VERSION" = local ]; then
32
+ echo "→ [1/4] building + linking local dev build (local-install.sh)"
33
+ ( cd "$REPO_ROOT" && ./scripts/local-install.sh ) || { echo "local-install.sh failed"; exit 1; }
34
+ else
35
+ echo "→ [1/4] installing $PKG@$VERSION globally"
36
+ npm install -g "$PKG@$VERSION" || { echo "npm install -g $PKG@$VERSION failed"; exit 1; }
37
+ fi
38
+ ACTUAL="$(codegraph --version 2>/dev/null || echo '?')"
39
+ echo " codegraph on PATH: $(command -v codegraph) -> $ACTUAL"
40
+
41
+ # 2. Ensure the corpus repo exists (clone shallow if missing, reuse if present).
42
+ mkdir -p "$CORPUS"
43
+ if [ -d "$REPO/.git" ]; then
44
+ echo "→ [2/4] reusing existing checkout: $REPO"
45
+ else
46
+ echo "→ [2/4] cloning $URL"
47
+ git clone --depth 1 "$URL" "$REPO" || { echo "git clone failed"; exit 1; }
48
+ fi
49
+
50
+ # 3. Wipe + re-index with THIS version (the index must be built by the same
51
+ # binary that serves it — different versions extract differently).
52
+ echo "→ [3/4] wiping .codegraph and re-indexing with $ACTUAL"
53
+ rm -rf "$REPO/.codegraph"
54
+ ( cd "$REPO" && codegraph init -i ) || { echo "indexing failed"; exit 1; }
55
+
56
+ # 4. Run the with/without A/B.
57
+ echo "→ [4/4] running A/B harness (mode=$MODE)"
58
+ bash "$HARNESS/run-all.sh" "$REPO" "$Q" "$MODE"
59
+
60
+ # Restore the dev link (the normal working state in this repo).
61
+ echo
62
+ echo "→ restoring local dev link (local-install.sh)"
63
+ if ( cd "$REPO_ROOT" && ./scripts/local-install.sh >/dev/null 2>&1 ); then
64
+ echo " global codegraph restored to dev build"
65
+ else
66
+ echo " WARN: restore failed — run ./scripts/local-install.sh manually"
67
+ fi
68
+ echo "==================== audit complete ===================="
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env bash
2
+ # Re-run the README "Benchmark Results" A/B (with vs without codegraph) on the
3
+ # current build: the 7 README repos, same queries, RUNS per arm (default 4).
4
+ # Output → /tmp/ab-readme/<repo>/run<n>/run-headless-{with,without}[.tN].jsonl
5
+ # Aggregate with parse-bench-readme.mjs. Repos must be cloned + indexed under
6
+ # $CORPUS (default /tmp/codegraph-corpus) by the build under test.
7
+ #
8
+ # Each row is a THREE-TURN session: the README question, then two follow-ups
9
+ # that stay inside the same flow. Turns 2-3 are where residual context occupancy
10
+ # is actually charged — the first answer's tool output is still in the window,
11
+ # so the arms diverge on how much headroom each left behind. CG_TURNS=1 runs the
12
+ # README question alone (the original single-question A/B).
13
+ set -uo pipefail
14
+ H="$(cd "$(dirname "$0")" && pwd)"
15
+ C="${CORPUS:-/tmp/codegraph-corpus}"
16
+ RUNS="${RUNS:-4}"
17
+ RUN_FROM="${RUN_FROM:-1}" # extend an existing pass: RUN_FROM=3 RUNS=3 adds run3 only
18
+ TURNS="${CG_TURNS:-3}"
19
+ ROWS=(
20
+ "vscode|How does the extension host communicate with the main process?|Where in that path would a message be dropped if the extension host crashes?|What would I need to change to add a new message type to that protocol?"
21
+ "excalidraw|How does Excalidraw render and update canvas elements?|Which part of that path decides whether a full re-render happens or an incremental one?|If I added a new element type, what in that render path would need to change?"
22
+ "django|How does Django's ORM build and execute a query from a QuerySet?|Where in that path is the SQL actually compiled into a string?|What would I change to add a new lookup type to that pipeline?"
23
+ "tokio|How does tokio schedule and run async tasks on its runtime?|Where does a task move between the local and the global queue in that path?|What in that path would I touch to add a per-task instrumentation hook?"
24
+ "okhttp|How does OkHttp process a request through its interceptor chain?|Where in that chain is the connection actually acquired?|What would I change to add a new interceptor stage before the cache?"
25
+ "gin|How does gin route requests through its middleware chain?|Where is the 404 / no-route case handled in that same chain?|What would I change to add a per-route middleware that runs before the global ones?"
26
+ "alamofire|How does Alamofire build, send, and validate a request?|Where does retry / interceptor logic hook into that path?|What would I change to add a new validation step to it?"
27
+ )
28
+ echo "### README A/B START $(date) RUNS=$RUN_FROM..$RUNS TURNS=$TURNS"
29
+ for row in "${ROWS[@]}"; do
30
+ repo="${row%%|*}"; rest="${row#*|}"
31
+ # Take the first $TURNS questions and join them with "||" for run-all.sh.
32
+ q=""; n=0
33
+ while [ "$n" -lt "$TURNS" ] && [ -n "$rest" ]; do
34
+ part="${rest%%|*}"
35
+ if [ "$rest" = "$part" ]; then rest=""; else rest="${rest#*|}"; fi
36
+ [ -n "$q" ] && q="$q||"
37
+ q="$q$part"; n=$((n + 1))
38
+ done
39
+ echo "===== $repo ($n turns) ====="
40
+ for run in $(seq "$RUN_FROM" "$RUNS"); do
41
+ out="/tmp/ab-readme/$repo/run$run"
42
+ mkdir -p "$out"
43
+ AGENT_EVAL_OUT="$out" bash "$H/run-all.sh" "$C/$repo" "$q" headless > "$out/console.log" 2>&1
44
+ grep -E "^exit [0-9]" "$out/console.log" | sed 's/^/ /' || echo " run$run: (no exit line)"
45
+ grep -E "codegraph +[0-9,]+ tok|→ file-access" "$out/console.log" | sed 's/^/ /' || true
46
+ done
47
+ done
48
+ echo "### README A/B DONE $(date)"
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env bash
2
+ # One README repo, WITH-codegraph only, N runs. Each run appends a why-Read
3
+ # diagnostic so the agent explains any Read/Grep. (The WITHOUT baseline is
4
+ # codegraph-independent and already in the README — no point re-running it.)
5
+ # Output -> /tmp/ab-why/<repo>/with<n>.jsonl
6
+ # Usage: bench-why-repo.sh <repo-path> "<query>" [N]
7
+ set -uo pipefail
8
+ REPO="$1"; Q="$2"; N="${3:-4}"
9
+ NAME="$(basename "$REPO")"
10
+ CG="/Users/colby/Development/Personal/codegraph/dist/bin/codegraph.js"
11
+ OUT="/tmp/ab-why/$NAME"; mkdir -p "$OUT"
12
+ WHY=$'\n\nIMPORTANT — diagnostic: if you use the Read or Grep tool at ANY point, for EACH such call explain why codegraph_explore / codegraph_node did not already give you what you needed. End your entire answer with a section titled exactly "## Why I read" listing every Read and Grep you made and the precise reason codegraph fell short for it. If you used neither, write "## Why I read" then "none — codegraph was sufficient."'
13
+ printf '{"mcpServers":{"codegraph":{"command":"%s","args":["serve","--mcp","--path","%s"]}}}' "$CG" "$REPO" > "$OUT/cg.json"
14
+
15
+ for i in $(seq 1 "$N"); do
16
+ pkill -f "serve --mcp" 2>/dev/null; sleep 1; rm -f "$REPO/.codegraph/daemon.sock"
17
+ ( cd "$REPO" && claude -p "$Q$WHY" --output-format stream-json --verbose \
18
+ --permission-mode bypassPermissions --model "${MODEL:-sonnet}" --effort "${EFFORT:-high}" --max-budget-usd 4 \
19
+ --strict-mcp-config --mcp-config "$OUT/cg.json" > "$OUT/with$i.jsonl" 2>"$OUT/with$i.err" )
20
+ echo "WITH run $i: exit $? ($(wc -l < "$OUT/with$i.jsonl" | tr -d ' ') lines)"
21
+ done
22
+ echo "DONE $NAME"
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+ # PreToolUse hook (experiment): deny Read of codegraph-indexed source files and
3
+ # steer the agent to codegraph_explore/codegraph_node instead. Tests whether
4
+ # codegraph can FULLY replace Read for code-understanding once the escape hatch
5
+ # is removed. Non-source reads (config, .env, markdown, new files) pass through.
6
+ #
7
+ # Wire via: claude ... --settings scripts/agent-eval/hook-settings.json
8
+ set -uo pipefail
9
+ input="$(cat)"
10
+ fp="$(printf '%s' "$input" | jq -r '.tool_input.file_path // empty' 2>/dev/null)"
11
+
12
+ case "$fp" in
13
+ *.ts|*.tsx|*.js|*.jsx|*.mjs|*.cjs|*.py|*.go|*.rs|*.java|*.rb|*.php|*.swift|*.kt|*.kts|*.c|*.cc|*.cpp|*.h|*.hpp|*.cs|*.lua|*.vue|*.svelte)
14
+ msg="Read is disabled for source files in this session — codegraph already has this file indexed (with line numbers, kept in sync on every change). Use codegraph_explore (several related symbols at once) or codegraph_node (one symbol's full source). If a symbol you need wasn't in a prior explore, run ANOTHER codegraph_explore with its exact name instead of reading the file."
15
+ jq -n --arg m "$msg" '{reason:$m, hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:$m}}'
16
+ exit 0
17
+ ;;
18
+ esac
19
+ exit 0
@@ -0,0 +1,209 @@
1
+ #!/usr/bin/env node
2
+ // One side-by-side table for the three feedback metrics, across the arms of a
3
+ // single A/B output directory. This is the "did it move?" view — the per-run
4
+ // blocks parse-run.mjs prints are the "why did it move?" view, and both are
5
+ // printed by the harnesses (ab-new-vs-baseline.sh, run-all.sh).
6
+ //
7
+ // residual context occupancy how much window the arm's retrieval still holds
8
+ // explore sufficiency whether a response was ENOUGH (agent's next act)
9
+ // allocation efficiency what share of returned bytes the answer used
10
+ //
11
+ // Usage: compare-arms.mjs <out-dir> <label> [<label> ...]
12
+ // e.g. compare-arms.mjs /tmp/ab-new-vs-baseline new baseline
13
+ // compare-arms.mjs /tmp/agent-eval headless-with headless-without
14
+ //
15
+ // Run discovery handles both shapes the harnesses write, per label:
16
+ // run-<label>-<i>.jsonl N independent runs (ab-new-vs-baseline, RUNS=N)
17
+ // run-<label>.jsonl + .tN ONE session, N turns (run-all.sh multi-turn)
18
+ // A `.tN` file is always a resumed SEGMENT of the run it hangs off, never a run
19
+ // of its own — mixing those up would report a three-turn session as three runs
20
+ // and average away the residual the later turns exist to charge.
21
+ import { existsSync, readdirSync } from 'fs';
22
+ import { join } from 'path';
23
+ import { pathToFileURL } from 'url';
24
+ import { parseSession, SUFFICIENCY } from './parse-run.mjs';
25
+
26
+ /** Segment files of one run, in turn order: run-X.jsonl, run-X.t2.jsonl, … */
27
+ function segmentsOf(dir, stem) {
28
+ const first = join(dir, `${stem}.jsonl`);
29
+ if (!existsSync(first)) return null;
30
+ const rest = readdirSync(dir)
31
+ .map((f) => [f, new RegExp(`^${stem.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\.t(\\d+)\\.jsonl$`).exec(f)])
32
+ .filter(([, m]) => m)
33
+ .sort((a, b) => Number(a[1][1]) - Number(b[1][1]))
34
+ .map(([f]) => join(dir, f));
35
+ return [first, ...rest];
36
+ }
37
+
38
+ /** Every run of one arm, newest-numbering-first-run order. */
39
+ export function discoverRuns(dir, label) {
40
+ const session = segmentsOf(dir, `run-${label}`);
41
+ if (session) return [{ name: label, files: session }];
42
+ const indexed = readdirSync(dir)
43
+ .map((f) => new RegExp(`^run-${label.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}-(\\d+)\\.jsonl$`).exec(f))
44
+ .filter(Boolean)
45
+ .map((m) => Number(m[1]))
46
+ .sort((a, b) => a - b);
47
+ return indexed.map((i) => ({ name: `${label}-${i}`, files: segmentsOf(dir, `run-${label}-${i}`) }));
48
+ }
49
+
50
+ const median = (xs) => {
51
+ if (!xs.length) return null;
52
+ const a = [...xs].sort((x, y) => x - y);
53
+ const m = a.length >> 1;
54
+ return a.length % 2 ? a[m] : (a[m - 1] + a[m]) / 2;
55
+ };
56
+
57
+ /** The numbers one arm's runs contribute to the table. */
58
+ function measure(run) {
59
+ const s = parseSession(run.files);
60
+ const o = s.occupancy;
61
+ const a = s.allocation;
62
+ return {
63
+ name: run.name,
64
+ ok: s.ok,
65
+ raced: s.raced,
66
+ turns: s.turns,
67
+ dur: s.dur,
68
+ tools: s.tools,
69
+ reads: s.reads,
70
+ grep: s.grep,
71
+ bash: s.counts.Bash || 0,
72
+ cg: s.cg,
73
+ cliCalls: s.cliCalls,
74
+ cliContaminated: s.cliContaminated,
75
+ ctx: o.ctxFinal,
76
+ occCg: o.residual.codegraph,
77
+ occFile: o.residualFileAccess,
78
+ // The arm's OWN retrieval residual: codegraph in a with-arm, Read/Grep/Bash
79
+ // in a without-arm. Comparing these two is the apples-to-apples pair.
80
+ occSelf: o.residual.codegraph + o.residualFileAccess,
81
+ occShare: o.ctxFinal > 0 ? ((o.residual.codegraph + o.residualFileAccess) / o.ctxFinal) * 100 : 0,
82
+ suffAnswered: s.sufficiency.answered,
83
+ suffCounts: s.sufficiency.counts,
84
+ suffErrors: s.sufficiency.errors,
85
+ // Allocation is byte-weighted, so a run with no explore contributes nothing
86
+ // rather than a zero — a zero would drag the pooled number toward "wasteful"
87
+ // for a run that never spent a byte.
88
+ allocUsed: a.envelope ? a.used : null,
89
+ allocEnvelope: a.envelope || null,
90
+ allocCalls: a.calls.length,
91
+ };
92
+ }
93
+
94
+ /** median [min–max] over runs; the range is the point — never quote one run. */
95
+ function span(runs, pick, fmt = (x) => String(Math.round(x))) {
96
+ const xs = runs.map(pick).filter((x) => x !== null && x !== undefined && Number.isFinite(x));
97
+ if (!xs.length) return '—';
98
+ const m = fmt(median(xs));
99
+ if (xs.length === 1) return m;
100
+ const lo = fmt(Math.min(...xs)); const hi = fmt(Math.max(...xs));
101
+ return lo === hi ? m : `${m} [${lo}–${hi}]`;
102
+ }
103
+
104
+ const int = (x) => Math.round(x).toLocaleString('en-US');
105
+ const pct1 = (x) => `${x.toFixed(1)}%`;
106
+
107
+ export function formatComparison(arms) {
108
+ const W = 36; const C = 24;
109
+ const out = [];
110
+ // The leading space is a separator, not padding: a `median [min–max]` cell can
111
+ // fill its column, and two of those with only padStart between them run
112
+ // together into one unreadable number.
113
+ const row = (label, cells) => out.push(' ' + label.padEnd(W) + cells.map((c) => ' ' + String(c).padStart(C - 1)).join(''));
114
+ const rule = (title) => out.push(` ${title}`);
115
+
116
+ row('', arms.map((a) => a.label));
117
+ row('runs', arms.map((a) => a.runs.length));
118
+ const anyFailed = arms.some((a) => a.runs.some((r) => !r.ok));
119
+ if (anyFailed) row(' of which non-success', arms.map((a) => a.runs.filter((r) => !r.ok).length));
120
+ if (arms.some((a) => a.runs.some((r) => r.raced))) {
121
+ row(' MCP cold-start race', arms.map((a) => a.runs.filter((r) => r.raced).length));
122
+ }
123
+ out.push('');
124
+
125
+ rule('behavior');
126
+ row(' duration (s)', arms.map((a) => span(a.runs, (r) => r.dur)));
127
+ row(' tool calls', arms.map((a) => span(a.runs, (r) => r.tools)));
128
+ row(' Read', arms.map((a) => span(a.runs, (r) => r.reads)));
129
+ row(' Grep/Glob', arms.map((a) => span(a.runs, (r) => r.grep)));
130
+ row(' Bash', arms.map((a) => span(a.runs, (r) => r.bash)));
131
+ row(' codegraph calls', arms.map((a) => span(a.runs, (r) => r.cg)));
132
+ out.push('');
133
+
134
+ rule('residual context occupancy (CG-7) — tokens still resident at end of run');
135
+ row(' final context (tok)', arms.map((a) => span(a.runs, (r) => r.ctx, int)));
136
+ row(' codegraph residual (tok)', arms.map((a) => span(a.runs, (r) => r.occCg, int)));
137
+ row(' file-access residual (tok)', arms.map((a) => span(a.runs, (r) => r.occFile, int)));
138
+ row(' → retrieval residual (tok)', arms.map((a) => span(a.runs, (r) => r.occSelf, int)));
139
+ row(' → share of final context', arms.map((a) => span(a.runs, (r) => r.occShare, pct1)));
140
+ out.push('');
141
+
142
+ rule('explore sufficiency (CG-8) — pooled over every answered explore call');
143
+ row(' answered explore calls', arms.map((a) => a.runs.reduce((s, r) => s + r.suffAnswered, 0)));
144
+ for (const [key, label] of SUFFICIENCY) {
145
+ row(` ${label}`, arms.map((a) => {
146
+ const n = a.runs.reduce((s, r) => s + r.suffCounts[key], 0);
147
+ const tot = a.runs.reduce((s, r) => s + r.suffAnswered, 0);
148
+ return tot ? `${n} ${((n / tot) * 100).toFixed(0)}%` : '—';
149
+ }));
150
+ }
151
+ if (arms.some((a) => a.runs.some((r) => r.suffErrors))) {
152
+ row(' errored/unanswered (not bucketed)', arms.map((a) => a.runs.reduce((s, r) => s + r.suffErrors, 0)));
153
+ }
154
+ out.push('');
155
+
156
+ rule('explore allocation efficiency (CG-9) — share of returned bytes the answer cited');
157
+ row(' explore calls with source', arms.map((a) => a.runs.reduce((s, r) => s + r.allocCalls, 0)));
158
+ row(' pooled efficiency', arms.map((a) => {
159
+ const env = a.runs.reduce((s, r) => s + (r.allocEnvelope || 0), 0);
160
+ const used = a.runs.reduce((s, r) => s + (r.allocUsed || 0), 0);
161
+ return env ? pct1((used / env) * 100) : '—';
162
+ }));
163
+ row(' per-run efficiency', arms.map((a) =>
164
+ span(a.runs, (r) => (r.allocEnvelope ? (r.allocUsed / r.allocEnvelope) * 100 : null), pct1)));
165
+ row(' envelope (chars)', arms.map((a) => int(a.runs.reduce((s, r) => s + (r.allocEnvelope || 0), 0))));
166
+ out.push('');
167
+
168
+ rule('contamination — the CLI must never be how codegraph is reached');
169
+ row(' CLI calls that RETURNED output', arms.map((a) => a.runs.reduce((s, r) => s + r.cliContaminated, 0)));
170
+ row(' CLI attempts blocked', arms.map((a) => a.runs.reduce((s, r) => s + r.cliCalls, 0)));
171
+ const contaminated = arms.filter((a) => a.runs.some((r) => r.cliContaminated));
172
+ if (contaminated.length) {
173
+ out.push(` !! ${contaminated.map((a) => a.label).join(', ')} reached codegraph through Bash — those runs are CONTAMINATED`);
174
+ out.push(' (a without-arm was not without codegraph; a with-arm has bytes attributed to Bash, not codegraph)');
175
+ }
176
+ out.push('');
177
+
178
+ out.push(' how to read this');
179
+ out.push(' occupancy compare each arm\'s RETRIEVAL residual (codegraph in a with-arm,');
180
+ out.push(' file-access in a without-arm). Shares are Claude Code on a 200k');
181
+ out.push(' window and do NOT transfer to another host; the ratio does.');
182
+ out.push(' sufficiency pooled across runs because it is per-CALL. "explore again" is');
183
+ out.push(' ambiguous by construction; "Read a file we returned" is an');
184
+ out.push(' allocation miss, the two recall rows are recall misses.');
185
+ out.push(' allocation RELATIVE, not absolute — attribution is by citation, and an agent');
186
+ out.push(' can use a file without naming it. Compare builds on the SAME');
187
+ out.push(' question; never quote it as "codegraph wastes N% of what it returns."');
188
+ out.push(' all three small-n. Runs make 1–5 explore calls, so read the range, not the');
189
+ out.push(' median of one run. RUNS>=2, and the 7-repo campaign for a verdict.');
190
+ return out.join('\n');
191
+ }
192
+
193
+ const isMain = process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href;
194
+ if (isMain) {
195
+ const [dir, ...labels] = process.argv.slice(2);
196
+ if (!dir || !labels.length) {
197
+ console.error('usage: compare-arms.mjs <out-dir> <label> [<label> ...]');
198
+ process.exit(1);
199
+ }
200
+ const arms = labels.map((label) => ({ label, runs: discoverRuns(dir, label).map(measure) }));
201
+ const empty = arms.filter((a) => !a.runs.length);
202
+ if (empty.length === arms.length) {
203
+ console.error(`no run logs for ${labels.join('/')} in ${dir}`);
204
+ process.exit(1);
205
+ }
206
+ for (const a of empty) console.error(` WARN: no run logs for arm '${a.label}' in ${dir}`);
207
+ console.log(`\n====== ARM COMPARISON — ${dir} ======`);
208
+ console.log(formatComparison(arms.filter((a) => a.runs.length)));
209
+ }
@@ -0,0 +1,102 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Diff two CodeGraph indexes of the SAME tree — typically a live,
4
+ * incrementally-synced `.codegraph/codegraph.db` against a clean full rebuild
5
+ * of the identical working tree (CG-33).
6
+ *
7
+ * Non-destructive: it only reads. Rebuilding is the caller's job, so the live
8
+ * index is never clobbered by the tool measuring it — the mistake that cost the
9
+ * original CG-33 artifact.
10
+ *
11
+ * # snapshot the live index BEFORE touching it
12
+ * cp .codegraph/codegraph.db /tmp/live.db
13
+ * node dist/bin/codegraph.js index .
14
+ * node scripts/agent-eval/diff-index-drift.mjs /tmp/live.db .codegraph/codegraph.db
15
+ *
16
+ * Edges are compared as distinct `(source, target, kind)` triples. Raw row
17
+ * counts are NOT a drift signal: a bidirectional divergence nets out. On the
18
+ * codegraph repo the raw counts differed by +0.7% while 4.3% of distinct edges
19
+ * were actually wrong.
20
+ */
21
+ import { DatabaseSync } from 'node:sqlite';
22
+ import { existsSync } from 'node:fs';
23
+
24
+ const [livePath, rebuiltPath] = process.argv.slice(2);
25
+ if (!livePath || !rebuiltPath) {
26
+ console.error('usage: diff-index-drift.mjs <live.db> <rebuilt.db>');
27
+ process.exit(2);
28
+ }
29
+ for (const p of [livePath, rebuiltPath]) {
30
+ if (!existsSync(p)) {
31
+ // node:sqlite CREATES a missing file rather than failing, which silently
32
+ // yields an empty schema and a confident, wrong conclusion. Refuse first.
33
+ console.error(`not found: ${p}`);
34
+ process.exit(2);
35
+ }
36
+ }
37
+
38
+ const open = (p) => new DatabaseSync(p, { readOnly: true });
39
+ const live = open(livePath);
40
+ const rebuilt = open(rebuiltPath);
41
+
42
+ const scalar = (db, q) => db.prepare(q).get().n;
43
+ const edgeKey = (r) => `${r.source}\u0000${r.target}\u0000${r.kind}`;
44
+
45
+ const liveEdges = live.prepare('select source, target, kind from edges').all();
46
+ const rebuiltEdges = rebuilt.prepare('select source, target, kind from edges').all();
47
+ const liveSet = new Set(liveEdges.map(edgeKey));
48
+ const rebuiltSet = new Set(rebuiltEdges.map(edgeKey));
49
+
50
+ const missing = rebuiltEdges.filter((r) => !liveSet.has(edgeKey(r))); // should exist, doesn't
51
+ const stale = liveEdges.filter((r) => !rebuiltSet.has(edgeKey(r))); // exists, shouldn't
52
+ const divergent = missing.length + stale.length;
53
+
54
+ const byKind = (rows) => {
55
+ const m = new Map();
56
+ for (const r of rows) m.set(r.kind, (m.get(r.kind) ?? 0) + 1);
57
+ return [...m].sort((a, b) => b[1] - a[1]).map(([k, v]) => `${k}=${v}`).join(', ') || '(none)';
58
+ };
59
+
60
+ const pct = (n, d) => (d ? ((n / d) * 100).toFixed(1) : '0.0');
61
+
62
+ console.log(`live ${livePath}`);
63
+ console.log(`rebuilt ${rebuiltPath}`);
64
+ console.log('');
65
+ console.log('counts live rebuilt');
66
+ for (const [label, q] of [
67
+ ['files', 'select count(*) n from files'],
68
+ ['nodes', 'select count(*) n from nodes'],
69
+ ['edges (rows)', 'select count(*) n from edges'],
70
+ // Grouped rather than `count(distinct a || b || c)`: bare concatenation has no
71
+ // separator, so `(ab, c)` and `(a, bc)` would collapse into one.
72
+ ['edges (distinct)', 'select count(*) n from (select distinct source, target, kind from edges)'],
73
+ ['heuristic edges', "select count(*) n from edges where provenance='heuristic'"],
74
+ ]) {
75
+ console.log(` ${label.padEnd(20)} ${String(scalar(live, q)).padEnd(9)} ${scalar(rebuilt, q)}`);
76
+ }
77
+
78
+ console.log('');
79
+ console.log('edge divergence (distinct triples)');
80
+ console.log(` missing from live: ${missing.length} — ${byKind(missing)}`);
81
+ console.log(` stale in live: ${stale.length} — ${byKind(stale)}`);
82
+ console.log(` TOTAL divergent: ${divergent} (${pct(divergent, rebuiltSet.size)}% of ${rebuiltSet.size})`);
83
+
84
+ // Integrity checks — these separate "resolution went stale" (edges wrong, nodes
85
+ // identical) from "residue accumulated" (duplicate/orphan rows). CG-33 is the
86
+ // former: on the codegraph repo every check below was 0 on BOTH indexes.
87
+ console.log('');
88
+ console.log('integrity live rebuilt');
89
+ for (const [label, q] of [
90
+ ['duplicate nodes', 'select count(*) n from (select file_path,name,kind,start_line from nodes group by 1,2,3,4 having count(*)>1)'],
91
+ ['orphan edges', 'select count(*) n from edges e where not exists(select 1 from nodes where id=e.source) or not exists(select 1 from nodes where id=e.target)'],
92
+ ['nodes w/ missing file row', 'select count(*) n from nodes nd where not exists(select 1 from files f where f.path=nd.file_path)'],
93
+ ]) {
94
+ console.log(` ${label.padEnd(30)} ${String(scalar(live, q)).padEnd(6)} ${scalar(rebuilt, q)}`);
95
+ }
96
+
97
+ console.log('');
98
+ console.log(divergent === 0
99
+ ? 'CONVERGED — the synced index matches a full rebuild.'
100
+ : `DRIFTED — ${divergent} edges differ. Rebuild-vs-rebuild is 0 (the indexer is deterministic), so this is sync divergence, not noise.`);
101
+
102
+ process.exitCode = divergent === 0 ? 0 : 1;
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "PreToolUse": [
4
+ {
5
+ "matcher": "Read",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "bash /Users/colby/Development/Personal/codegraph/scripts/agent-eval/block-read-hook.sh"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,120 @@
1
+ #!/usr/bin/env bash
2
+ # Drive an INTERACTIVE Claude Code session in tmux, send a prompt, wait for the
3
+ # agent to finish, then print the tool-call breakdown from the session logs.
4
+ #
5
+ # Why interactive (not `claude -p`): headless print-mode picks the
6
+ # general-purpose subagent, while real interactive sessions delegate to the
7
+ # Explore subagent (or drive codegraph from the main thread). Only the
8
+ # interactive TUI reproduces the behavior users actually see. (Idle-detection
9
+ # technique borrowed from devpit's WaitForIdle.)
10
+ #
11
+ # Usage: itrun.sh <repo-path> <label> "<prompt>"
12
+ # Output dir: $AGENT_EVAL_OUT (default /tmp/agent-eval)
13
+ # Requires: tmux 3.0+, a logged-in `claude` CLI, codegraph MCP configured.
14
+ set -uo pipefail
15
+ REPO="$1"; LABEL="$2"; PROMPT="$3"
16
+ SESSION="cgt_${LABEL}"
17
+ OUT_DIR="${AGENT_EVAL_OUT:-/tmp/agent-eval}"; mkdir -p "$OUT_DIR"
18
+ OUT="$OUT_DIR/itrun-${LABEL}.txt"
19
+ HERE="$(cd "$(dirname "$0")" && pwd)"
20
+
21
+ cap() { tmux capture-pane -p -t "$SESSION" -S -40; }
22
+
23
+ tmux kill-session -t "$SESSION" 2>/dev/null
24
+
25
+ # Wide pane so the TUI doesn't hard-wrap tool lines.
26
+ tmux new-session -d -s "$SESSION" -x 230 -y 60
27
+ tmux send-keys -t "$SESSION" "cd $REPO && claude --dangerously-skip-permissions ${CLAUDE_EXTRA_ARGS:-}" Enter
28
+
29
+ # Wait for the ❯ prompt (claude drew its UI), up to 60s. NOTE: ❯ appears on the
30
+ # welcome screen seconds before the input actually accepts keystrokes, so this is
31
+ # necessary but NOT sufficient — the type-and-verify loop below is what proves
32
+ # the input is live.
33
+ ready=0
34
+ for _ in $(seq 1 120); do
35
+ cap | grep -q "❯" && { ready=1; break; }
36
+ sleep 0.5
37
+ done
38
+ [ "$ready" = 1 ] || { echo "claude never drew its UI"; cap; tmux kill-session -t "$SESSION" 2>/dev/null; exit 1; }
39
+
40
+ # Accept the per-folder "Is this a project you trust?" dialog if it shows (first
41
+ # time claude opens a given repo). Option 1 ("Yes, I trust this folder") is
42
+ # pre-selected, so Enter accepts. This dialog also contains ❯, so it must be
43
+ # cleared before the type-and-verify loop or keystrokes land on the menu.
44
+ for _ in $(seq 1 20); do
45
+ cap | grep -q "trust this folder" || break
46
+ tmux send-keys -t "$SESSION" Enter
47
+ sleep 1
48
+ done
49
+
50
+ # Type-and-verify: send the prompt, confirm a distinctive chunk of it actually
51
+ # landed in the input box, retry if it didn't (handles the early-❯ race where
52
+ # the welcome screen shows the prompt glyph but MCP init is still eating keys).
53
+ needle="${PROMPT:0:24}"
54
+ typed=0
55
+ for _ in $(seq 1 30); do
56
+ tmux send-keys -l -t "$SESSION" "$PROMPT"
57
+ sleep 1
58
+ if cap | grep -Fq "$needle"; then typed=1; break; fi
59
+ # Clear whatever partial text may have landed, then retry.
60
+ tmux send-keys -t "$SESSION" C-u
61
+ sleep 1
62
+ done
63
+ [ "$typed" = 1 ] || { echo "prompt never landed in the input box"; cap; tmux kill-session -t "$SESSION" 2>/dev/null; exit 1; }
64
+ sleep 0.5
65
+ tmux send-keys -t "$SESSION" Enter
66
+
67
+ # Busy signals. The robust one is the spinner's elapsed-time-in-parens, which
68
+ # EVERY working state shows — both the pre-stream thinking phase
69
+ # "(8s · thinking with max effort)" and the streaming phase
70
+ # "(24s · ↑ 2.5k tokens · …)", and it survives the 32s→"1m 3s" rollover. We OR
71
+ # in the token arrows, "esc to interrupt", and "Initializing" as belt-and-braces
72
+ # (some TUI versions/states show one but not the others).
73
+ BUSY_RE='esc to interrupt|↓ [0-9]|↑ [0-9]|Initializing|\(([0-9]+m )?[0-9]+s ·'
74
+
75
+ # Wait for work to START (busy indicator appears), up to 60s. If it never starts,
76
+ # fail loudly rather than silently reporting an empty run.
77
+ started=0
78
+ for _ in $(seq 1 120); do
79
+ cap | grep -qE "$BUSY_RE" && { started=1; break; }
80
+ sleep 0.5
81
+ done
82
+ [ "$started" = 1 ] || { echo "agent never started working"; cap; tmux kill-session -t "$SESSION" 2>/dev/null; exit 1; }
83
+
84
+ # Poll for idle. CRITICAL: Opus 4.8 (extended thinking) renders NO spinner /
85
+ # "esc to interrupt" / timer while it STREAMS its final answer — those appear
86
+ # only during the thinking + tool-use phases ("✻ Marinating… (32s · ↓ 1.3k
87
+ # tokens · thinking with max effort)"). So BUSY_RE reads "not busy" for the whole
88
+ # 10-30s answer stream, and any short not-busy threshold kills the run mid-answer
89
+ # (the truncation bug). We therefore detect "done" by CONTENT STABILITY, not by a
90
+ # spinner string: while the agent streams, the captured pane changes every poll,
91
+ # so stability never accrues; it accrues only once the agent has finished and the
92
+ # static "✻ Brewed for 1m 9s" summary is all that is left. BUSY_RE still hard-
93
+ # resets stability (covers thinking/tool-use/live-timer, where text can briefly
94
+ # sit still). Need STABLE_NEEDED polls (~8s) of zero pane change + ❯ present.
95
+ # Content-stability is model-agnostic — it survives future spinner re-wordings.
96
+ STABLE_NEEDED=16
97
+ prev=""; stable=0
98
+ for _ in $(seq 1 2400); do # up to ~20 min
99
+ pane="$(cap)"
100
+ sig="$(printf '%s' "$pane" | tr -s '[:space:]' ' ')"
101
+ if printf '%s' "$pane" | grep -qE "$BUSY_RE"; then
102
+ stable=0 # thinking / tool use / live timer → busy
103
+ elif [ -n "$sig" ] && [ "$sig" = "$prev" ] && printf '%s' "$pane" | grep -q "❯"; then
104
+ stable=$((stable+1)); [ "$stable" -ge "$STABLE_NEEDED" ] && break
105
+ else
106
+ stable=0 # answer still streaming → pane changing
107
+ fi
108
+ prev="$sig"
109
+ sleep 0.5
110
+ done
111
+ sleep 1
112
+
113
+ tmux capture-pane -p -t "$SESSION" -S - > "$OUT"
114
+ echo "captured $(wc -l < "$OUT") lines -> $OUT"
115
+ grep -oE "Done \([^)]*\)|[A-Z][a-z]+ for ([0-9]+m )?[0-9]+s" "$OUT" | tail -1
116
+ grep -oE "[0-9.]+k?/[0-9.]+M" "$OUT" | tail -1 | sed 's/^/Context /'
117
+ tmux kill-session -t "$SESSION" 2>/dev/null
118
+
119
+ # Clean tool breakdown from the session logs (main + subagents).
120
+ node "$HERE/parse-session.mjs" "$REPO" 2>/dev/null || true