kirograph 0.28.0 → 1.0.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 (753) hide show
  1. package/dist/architecture/index.js +4 -1
  2. package/dist/architecture/index.js.map +2 -2
  3. package/dist/architecture/manifest/index.js +13 -2
  4. package/dist/architecture/manifest/index.js.map +2 -2
  5. package/dist/bin/commands/install.js +2 -1
  6. package/dist/bin/commands/install.js.map +2 -2
  7. package/dist/bin/commands/status.js +2 -1
  8. package/dist/bin/commands/status.js.map +2 -2
  9. package/dist/bin/commands/uninit.js +2 -1
  10. package/dist/bin/commands/uninit.js.map +2 -2
  11. package/dist/bin/commands/vulns.js +10 -5
  12. package/dist/bin/commands/vulns.js.map +2 -2
  13. package/dist/bin/installer/common.js +7 -1
  14. package/dist/bin/installer/common.js.map +2 -2
  15. package/dist/bin/installer/config-prompt.js +117 -100
  16. package/dist/bin/installer/config-prompt.js.map +3 -3
  17. package/dist/bin/installer/detect.js +10 -0
  18. package/dist/bin/installer/detect.js.map +2 -2
  19. package/dist/bin/installer/hooks.js +13 -8
  20. package/dist/bin/installer/hooks.js.map +2 -2
  21. package/dist/bin/installer/targets/antigravity.js +1 -1
  22. package/dist/bin/installer/targets/antigravity.js.map +2 -2
  23. package/dist/bin/installer/targets/claude.js +1 -1
  24. package/dist/bin/installer/targets/claude.js.map +2 -2
  25. package/dist/bin/installer/targets/codex.js +1 -1
  26. package/dist/bin/installer/targets/codex.js.map +2 -2
  27. package/dist/bin/installer/targets/commandcode.js +84 -0
  28. package/dist/bin/installer/targets/commandcode.js.map +7 -0
  29. package/dist/bin/installer/targets/copilot.js +1 -1
  30. package/dist/bin/installer/targets/copilot.js.map +2 -2
  31. package/dist/bin/installer/targets/cursor.js +2 -2
  32. package/dist/bin/installer/targets/cursor.js.map +2 -2
  33. package/dist/bin/installer/targets/devin.js +1 -1
  34. package/dist/bin/installer/targets/devin.js.map +2 -2
  35. package/dist/bin/installer/targets/gemini-cli.js +1 -1
  36. package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
  37. package/dist/bin/installer/targets/index.js +10 -0
  38. package/dist/bin/installer/targets/index.js.map +2 -2
  39. package/dist/bin/installer/targets/opencode.js +1 -1
  40. package/dist/bin/installer/targets/opencode.js.map +2 -2
  41. package/dist/bin/installer/targets/windsurf.js +1 -1
  42. package/dist/bin/installer/targets/windsurf.js.map +2 -2
  43. package/dist/bin/kirograph.js +1 -1
  44. package/dist/bin/kirograph.js.map +1 -1
  45. package/dist/config.js +21 -1
  46. package/dist/config.js.map +2 -2
  47. package/dist/core/pipeline.js +18 -6
  48. package/dist/core/pipeline.js.map +2 -2
  49. package/dist/extraction/extractor.js +58 -1
  50. package/dist/extraction/extractor.js.map +2 -2
  51. package/dist/extraction/grammars.js +38 -3
  52. package/dist/extraction/grammars.js.map +2 -2
  53. package/dist/extraction/wasm/tree-sitter-bash.wasm +0 -0
  54. package/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
  55. package/dist/extraction/wasm/tree-sitter-c_sharp.wasm +0 -0
  56. package/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
  57. package/dist/extraction/wasm/tree-sitter-csharp.wasm +0 -0
  58. package/dist/extraction/wasm/tree-sitter-css.wasm +0 -0
  59. package/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  60. package/dist/extraction/wasm/tree-sitter-elisp.wasm +0 -0
  61. package/dist/extraction/wasm/tree-sitter-elixir.wasm +0 -0
  62. package/dist/extraction/wasm/tree-sitter-elm.wasm +0 -0
  63. package/dist/extraction/wasm/tree-sitter-embedded_template.wasm +0 -0
  64. package/dist/extraction/wasm/tree-sitter-embeddedtemplate.wasm +0 -0
  65. package/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  66. package/dist/extraction/wasm/tree-sitter-html.wasm +0 -0
  67. package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  68. package/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  69. package/dist/extraction/wasm/tree-sitter-json.wasm +0 -0
  70. package/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  71. package/dist/extraction/wasm/tree-sitter-lua.wasm +0 -0
  72. package/dist/extraction/wasm/tree-sitter-objc.wasm +0 -0
  73. package/dist/extraction/wasm/tree-sitter-ocaml.wasm +0 -0
  74. package/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
  75. package/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  76. package/dist/extraction/wasm/tree-sitter-ql.wasm +0 -0
  77. package/dist/extraction/wasm/tree-sitter-rescript.wasm +0 -0
  78. package/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
  79. package/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
  80. package/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
  81. package/dist/extraction/wasm/tree-sitter-solidity.wasm +0 -0
  82. package/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  83. package/dist/extraction/wasm/tree-sitter-systemrdl.wasm +0 -0
  84. package/dist/extraction/wasm/tree-sitter-tlaplus.wasm +0 -0
  85. package/dist/extraction/wasm/tree-sitter-toml.wasm +0 -0
  86. package/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  87. package/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  88. package/dist/extraction/wasm/tree-sitter-vue.wasm +0 -0
  89. package/dist/extraction/wasm/tree-sitter-yaml.wasm +0 -0
  90. package/dist/extraction/wasm/tree-sitter-zig.wasm +0 -0
  91. package/dist/frameworks/index.js +68 -7
  92. package/dist/frameworks/index.js.map +2 -2
  93. package/dist/security/manifest/adapter.js +17 -2
  94. package/dist/security/manifest/adapter.js.map +2 -2
  95. package/dist/security/manifest/parser.js +2 -2
  96. package/dist/security/manifest/parser.js.map +2 -2
  97. package/dist/security/pipeline.js +4 -1
  98. package/dist/security/pipeline.js.map +2 -2
  99. package/dist/security/reachability.js +61 -45
  100. package/dist/security/reachability.js.map +3 -3
  101. package/dist/security/types.js.map +1 -1
  102. package/dist/security/vuln/epss-client.js +1 -1
  103. package/dist/security/vuln/epss-client.js.map +1 -1
  104. package/dist/security/vuln/osv-adapter.js +99 -31
  105. package/dist/security/vuln/osv-adapter.js.map +2 -2
  106. package/dist/sync/index.js +9 -2
  107. package/dist/sync/index.js.map +2 -2
  108. package/dist/vectors/libsql-index.js +287 -0
  109. package/dist/vectors/libsql-index.js.map +7 -0
  110. package/dist/vectors/turso-index.js +307 -0
  111. package/dist/vectors/turso-index.js.map +7 -0
  112. package/package.json +3 -2
  113. package/dist/architecture/index.d.ts +0 -11
  114. package/dist/architecture/index.d.ts.map +0 -1
  115. package/dist/architecture/layers/csharp.d.ts +0 -6
  116. package/dist/architecture/layers/csharp.d.ts.map +0 -1
  117. package/dist/architecture/layers/dart.d.ts +0 -10
  118. package/dist/architecture/layers/dart.d.ts.map +0 -1
  119. package/dist/architecture/layers/elixir.d.ts +0 -6
  120. package/dist/architecture/layers/elixir.d.ts.map +0 -1
  121. package/dist/architecture/layers/go.d.ts +0 -7
  122. package/dist/architecture/layers/go.d.ts.map +0 -1
  123. package/dist/architecture/layers/index.d.ts +0 -30
  124. package/dist/architecture/layers/index.d.ts.map +0 -1
  125. package/dist/architecture/layers/java.d.ts +0 -7
  126. package/dist/architecture/layers/java.d.ts.map +0 -1
  127. package/dist/architecture/layers/ocaml.d.ts +0 -6
  128. package/dist/architecture/layers/ocaml.d.ts.map +0 -1
  129. package/dist/architecture/layers/python.d.ts +0 -7
  130. package/dist/architecture/layers/python.d.ts.map +0 -1
  131. package/dist/architecture/layers/ruby.d.ts +0 -6
  132. package/dist/architecture/layers/ruby.d.ts.map +0 -1
  133. package/dist/architecture/layers/rust.d.ts +0 -6
  134. package/dist/architecture/layers/rust.d.ts.map +0 -1
  135. package/dist/architecture/layers/scala.d.ts +0 -6
  136. package/dist/architecture/layers/scala.d.ts.map +0 -1
  137. package/dist/architecture/layers/solidity.d.ts +0 -6
  138. package/dist/architecture/layers/solidity.d.ts.map +0 -1
  139. package/dist/architecture/layers/types.d.ts +0 -2
  140. package/dist/architecture/layers/types.d.ts.map +0 -1
  141. package/dist/architecture/layers/typescript.d.ts +0 -9
  142. package/dist/architecture/layers/typescript.d.ts.map +0 -1
  143. package/dist/architecture/layers/vue.d.ts +0 -6
  144. package/dist/architecture/layers/vue.d.ts.map +0 -1
  145. package/dist/architecture/manifest/cargo.d.ts +0 -3
  146. package/dist/architecture/manifest/cargo.d.ts.map +0 -1
  147. package/dist/architecture/manifest/csproj.d.ts +0 -3
  148. package/dist/architecture/manifest/csproj.d.ts.map +0 -1
  149. package/dist/architecture/manifest/elm.d.ts +0 -3
  150. package/dist/architecture/manifest/elm.d.ts.map +0 -1
  151. package/dist/architecture/manifest/go.d.ts +0 -3
  152. package/dist/architecture/manifest/go.d.ts.map +0 -1
  153. package/dist/architecture/manifest/gradle.d.ts +0 -3
  154. package/dist/architecture/manifest/gradle.d.ts.map +0 -1
  155. package/dist/architecture/manifest/index.d.ts +0 -12
  156. package/dist/architecture/manifest/index.d.ts.map +0 -1
  157. package/dist/architecture/manifest/maven.d.ts +0 -3
  158. package/dist/architecture/manifest/maven.d.ts.map +0 -1
  159. package/dist/architecture/manifest/npm.d.ts +0 -3
  160. package/dist/architecture/manifest/npm.d.ts.map +0 -1
  161. package/dist/architecture/manifest/ocaml.d.ts +0 -3
  162. package/dist/architecture/manifest/ocaml.d.ts.map +0 -1
  163. package/dist/architecture/manifest/python.d.ts +0 -3
  164. package/dist/architecture/manifest/python.d.ts.map +0 -1
  165. package/dist/architecture/manifest/scala.d.ts +0 -3
  166. package/dist/architecture/manifest/scala.d.ts.map +0 -1
  167. package/dist/architecture/manifest/types.d.ts +0 -2
  168. package/dist/architecture/manifest/types.d.ts.map +0 -1
  169. package/dist/architecture/types.d.ts +0 -91
  170. package/dist/architecture/types.d.ts.map +0 -1
  171. package/dist/banner.d.ts +0 -6
  172. package/dist/banner.d.ts.map +0 -1
  173. package/dist/banner.js +0 -67
  174. package/dist/banner.js.map +0 -1
  175. package/dist/bin/banner.d.ts +0 -6
  176. package/dist/bin/banner.d.ts.map +0 -1
  177. package/dist/bin/commands/affected.d.ts +0 -3
  178. package/dist/bin/commands/affected.d.ts.map +0 -1
  179. package/dist/bin/commands/architecture.d.ts +0 -3
  180. package/dist/bin/commands/architecture.d.ts.map +0 -1
  181. package/dist/bin/commands/attack-surface.d.ts +0 -3
  182. package/dist/bin/commands/attack-surface.d.ts.map +0 -1
  183. package/dist/bin/commands/benchmark.d.ts +0 -9
  184. package/dist/bin/commands/benchmark.d.ts.map +0 -1
  185. package/dist/bin/commands/budget.d.ts +0 -6
  186. package/dist/bin/commands/budget.d.ts.map +0 -1
  187. package/dist/bin/commands/caveman.d.ts +0 -7
  188. package/dist/bin/commands/caveman.d.ts.map +0 -1
  189. package/dist/bin/commands/communities.d.ts +0 -3
  190. package/dist/bin/commands/communities.d.ts.map +0 -1
  191. package/dist/bin/commands/compression.d.ts +0 -7
  192. package/dist/bin/commands/compression.d.ts.map +0 -1
  193. package/dist/bin/commands/configure-mcp.js +0 -104
  194. package/dist/bin/commands/configure-mcp.js.map +0 -7
  195. package/dist/bin/commands/context.d.ts +0 -3
  196. package/dist/bin/commands/context.d.ts.map +0 -1
  197. package/dist/bin/commands/coupling.d.ts +0 -3
  198. package/dist/bin/commands/coupling.d.ts.map +0 -1
  199. package/dist/bin/commands/dashboard.d.ts +0 -3
  200. package/dist/bin/commands/dashboard.d.ts.map +0 -1
  201. package/dist/bin/commands/data.d.ts +0 -3
  202. package/dist/bin/commands/data.d.ts.map +0 -1
  203. package/dist/bin/commands/dead-code.d.ts +0 -3
  204. package/dist/bin/commands/dead-code.d.ts.map +0 -1
  205. package/dist/bin/commands/dep-confusion.d.ts +0 -3
  206. package/dist/bin/commands/dep-confusion.d.ts.map +0 -1
  207. package/dist/bin/commands/docs.d.ts +0 -3
  208. package/dist/bin/commands/docs.d.ts.map +0 -1
  209. package/dist/bin/commands/exec.d.ts +0 -11
  210. package/dist/bin/commands/exec.d.ts.map +0 -1
  211. package/dist/bin/commands/export.d.ts +0 -3
  212. package/dist/bin/commands/export.d.ts.map +0 -1
  213. package/dist/bin/commands/files.d.ts +0 -3
  214. package/dist/bin/commands/files.d.ts.map +0 -1
  215. package/dist/bin/commands/flows.d.ts +0 -3
  216. package/dist/bin/commands/flows.d.ts.map +0 -1
  217. package/dist/bin/commands/gain.d.ts +0 -6
  218. package/dist/bin/commands/gain.d.ts.map +0 -1
  219. package/dist/bin/commands/help.d.ts +0 -11
  220. package/dist/bin/commands/help.d.ts.map +0 -1
  221. package/dist/bin/commands/hotspots.d.ts +0 -3
  222. package/dist/bin/commands/hotspots.d.ts.map +0 -1
  223. package/dist/bin/commands/index.d.ts +0 -3
  224. package/dist/bin/commands/index.d.ts.map +0 -1
  225. package/dist/bin/commands/init.d.ts +0 -3
  226. package/dist/bin/commands/init.d.ts.map +0 -1
  227. package/dist/bin/commands/install.d.ts +0 -3
  228. package/dist/bin/commands/install.d.ts.map +0 -1
  229. package/dist/bin/commands/licenses.d.ts +0 -3
  230. package/dist/bin/commands/licenses.d.ts.map +0 -1
  231. package/dist/bin/commands/mark-dirty.d.ts +0 -3
  232. package/dist/bin/commands/mark-dirty.d.ts.map +0 -1
  233. package/dist/bin/commands/memory.d.ts +0 -16
  234. package/dist/bin/commands/memory.d.ts.map +0 -1
  235. package/dist/bin/commands/package.d.ts +0 -3
  236. package/dist/bin/commands/package.d.ts.map +0 -1
  237. package/dist/bin/commands/path.d.ts +0 -3
  238. package/dist/bin/commands/path.d.ts.map +0 -1
  239. package/dist/bin/commands/pattern.d.ts +0 -3
  240. package/dist/bin/commands/pattern.d.ts.map +0 -1
  241. package/dist/bin/commands/qdrant.d.ts +0 -3
  242. package/dist/bin/commands/qdrant.d.ts.map +0 -1
  243. package/dist/bin/commands/qdrant.js +0 -159
  244. package/dist/bin/commands/qdrant.js.map +0 -1
  245. package/dist/bin/commands/query.d.ts +0 -3
  246. package/dist/bin/commands/query.d.ts.map +0 -1
  247. package/dist/bin/commands/reachability.d.ts +0 -3
  248. package/dist/bin/commands/reachability.d.ts.map +0 -1
  249. package/dist/bin/commands/read.d.ts +0 -6
  250. package/dist/bin/commands/read.d.ts.map +0 -1
  251. package/dist/bin/commands/refactor.d.ts +0 -3
  252. package/dist/bin/commands/refactor.d.ts.map +0 -1
  253. package/dist/bin/commands/remediation.d.ts +0 -3
  254. package/dist/bin/commands/remediation.d.ts.map +0 -1
  255. package/dist/bin/commands/sbom.d.ts +0 -3
  256. package/dist/bin/commands/sbom.d.ts.map +0 -1
  257. package/dist/bin/commands/security-ci-report.d.ts +0 -9
  258. package/dist/bin/commands/security-ci-report.d.ts.map +0 -1
  259. package/dist/bin/commands/security-export.d.ts +0 -2
  260. package/dist/bin/commands/security-export.d.ts.map +0 -1
  261. package/dist/bin/commands/security-flows.d.ts +0 -3
  262. package/dist/bin/commands/security-flows.d.ts.map +0 -1
  263. package/dist/bin/commands/security-secrets.d.ts +0 -3
  264. package/dist/bin/commands/security-secrets.d.ts.map +0 -1
  265. package/dist/bin/commands/security.d.ts +0 -3
  266. package/dist/bin/commands/security.d.ts.map +0 -1
  267. package/dist/bin/commands/serve.d.ts +0 -3
  268. package/dist/bin/commands/serve.d.ts.map +0 -1
  269. package/dist/bin/commands/snapshot.d.ts +0 -3
  270. package/dist/bin/commands/snapshot.d.ts.map +0 -1
  271. package/dist/bin/commands/staleness.d.ts +0 -3
  272. package/dist/bin/commands/staleness.d.ts.map +0 -1
  273. package/dist/bin/commands/status.d.ts +0 -3
  274. package/dist/bin/commands/status.d.ts.map +0 -1
  275. package/dist/bin/commands/stop.d.ts +0 -3
  276. package/dist/bin/commands/stop.d.ts.map +0 -1
  277. package/dist/bin/commands/stop.js +0 -81
  278. package/dist/bin/commands/stop.js.map +0 -1
  279. package/dist/bin/commands/supply-chain.d.ts +0 -3
  280. package/dist/bin/commands/supply-chain.d.ts.map +0 -1
  281. package/dist/bin/commands/surprising.d.ts +0 -3
  282. package/dist/bin/commands/surprising.d.ts.map +0 -1
  283. package/dist/bin/commands/sync-if-dirty.d.ts +0 -3
  284. package/dist/bin/commands/sync-if-dirty.d.ts.map +0 -1
  285. package/dist/bin/commands/sync.d.ts +0 -3
  286. package/dist/bin/commands/sync.d.ts.map +0 -1
  287. package/dist/bin/commands/typesense.d.ts +0 -3
  288. package/dist/bin/commands/typesense.d.ts.map +0 -1
  289. package/dist/bin/commands/typesense.js +0 -126
  290. package/dist/bin/commands/typesense.js.map +0 -1
  291. package/dist/bin/commands/uninit.d.ts +0 -4
  292. package/dist/bin/commands/uninit.d.ts.map +0 -1
  293. package/dist/bin/commands/unlock.d.ts +0 -3
  294. package/dist/bin/commands/unlock.d.ts.map +0 -1
  295. package/dist/bin/commands/utils.d.ts +0 -17
  296. package/dist/bin/commands/utils.d.ts.map +0 -1
  297. package/dist/bin/commands/vex.d.ts +0 -3
  298. package/dist/bin/commands/vex.d.ts.map +0 -1
  299. package/dist/bin/commands/vuln-suppress.d.ts +0 -3
  300. package/dist/bin/commands/vuln-suppress.d.ts.map +0 -1
  301. package/dist/bin/commands/vulns.d.ts +0 -3
  302. package/dist/bin/commands/vulns.d.ts.map +0 -1
  303. package/dist/bin/installer/archive.d.ts +0 -47
  304. package/dist/bin/installer/archive.d.ts.map +0 -1
  305. package/dist/bin/installer/auto-detect.d.ts +0 -16
  306. package/dist/bin/installer/auto-detect.d.ts.map +0 -1
  307. package/dist/bin/installer/caveman.d.ts +0 -12
  308. package/dist/bin/installer/caveman.d.ts.map +0 -1
  309. package/dist/bin/installer/cli-agent.d.ts +0 -20
  310. package/dist/bin/installer/cli-agent.d.ts.map +0 -1
  311. package/dist/bin/installer/common.d.ts +0 -36
  312. package/dist/bin/installer/common.d.ts.map +0 -1
  313. package/dist/bin/installer/config-prompt.d.ts +0 -13
  314. package/dist/bin/installer/config-prompt.d.ts.map +0 -1
  315. package/dist/bin/installer/dashboard.d.ts +0 -3
  316. package/dist/bin/installer/dashboard.d.ts.map +0 -1
  317. package/dist/bin/installer/detect.d.ts +0 -30
  318. package/dist/bin/installer/detect.d.ts.map +0 -1
  319. package/dist/bin/installer/hooks.d.ts +0 -8
  320. package/dist/bin/installer/hooks.d.ts.map +0 -1
  321. package/dist/bin/installer/index.d.ts +0 -12
  322. package/dist/bin/installer/index.d.ts.map +0 -1
  323. package/dist/bin/installer/instructions.d.ts +0 -14
  324. package/dist/bin/installer/instructions.d.ts.map +0 -1
  325. package/dist/bin/installer/mcp.d.ts +0 -5
  326. package/dist/bin/installer/mcp.d.ts.map +0 -1
  327. package/dist/bin/installer/prompts.d.ts +0 -45
  328. package/dist/bin/installer/prompts.d.ts.map +0 -1
  329. package/dist/bin/installer/qdrant-dashboard.d.ts +0 -4
  330. package/dist/bin/installer/qdrant-dashboard.d.ts.map +0 -1
  331. package/dist/bin/installer/steering.d.ts +0 -17
  332. package/dist/bin/installer/steering.d.ts.map +0 -1
  333. package/dist/bin/installer/targets/aider.d.ts +0 -6
  334. package/dist/bin/installer/targets/aider.d.ts.map +0 -1
  335. package/dist/bin/installer/targets/amp.d.ts +0 -6
  336. package/dist/bin/installer/targets/amp.d.ts.map +0 -1
  337. package/dist/bin/installer/targets/antigravity.d.ts +0 -13
  338. package/dist/bin/installer/targets/antigravity.d.ts.map +0 -1
  339. package/dist/bin/installer/targets/augment.d.ts +0 -6
  340. package/dist/bin/installer/targets/augment.d.ts.map +0 -1
  341. package/dist/bin/installer/targets/claude.d.ts +0 -6
  342. package/dist/bin/installer/targets/claude.d.ts.map +0 -1
  343. package/dist/bin/installer/targets/cline.d.ts +0 -13
  344. package/dist/bin/installer/targets/cline.d.ts.map +0 -1
  345. package/dist/bin/installer/targets/codex.d.ts +0 -6
  346. package/dist/bin/installer/targets/codex.d.ts.map +0 -1
  347. package/dist/bin/installer/targets/continue.d.ts +0 -12
  348. package/dist/bin/installer/targets/continue.d.ts.map +0 -1
  349. package/dist/bin/installer/targets/copilot-cli.d.ts +0 -12
  350. package/dist/bin/installer/targets/copilot-cli.d.ts.map +0 -1
  351. package/dist/bin/installer/targets/copilot.d.ts +0 -6
  352. package/dist/bin/installer/targets/copilot.d.ts.map +0 -1
  353. package/dist/bin/installer/targets/cursor.d.ts +0 -6
  354. package/dist/bin/installer/targets/cursor.d.ts.map +0 -1
  355. package/dist/bin/installer/targets/devin.d.ts +0 -13
  356. package/dist/bin/installer/targets/devin.d.ts.map +0 -1
  357. package/dist/bin/installer/targets/gemini-cli.d.ts +0 -16
  358. package/dist/bin/installer/targets/gemini-cli.d.ts.map +0 -1
  359. package/dist/bin/installer/targets/generic.d.ts +0 -59
  360. package/dist/bin/installer/targets/generic.d.ts.map +0 -1
  361. package/dist/bin/installer/targets/goose.d.ts +0 -6
  362. package/dist/bin/installer/targets/goose.d.ts.map +0 -1
  363. package/dist/bin/installer/targets/index.d.ts +0 -11
  364. package/dist/bin/installer/targets/index.d.ts.map +0 -1
  365. package/dist/bin/installer/targets/junie.d.ts +0 -13
  366. package/dist/bin/installer/targets/junie.d.ts.map +0 -1
  367. package/dist/bin/installer/targets/kilo.d.ts +0 -12
  368. package/dist/bin/installer/targets/kilo.d.ts.map +0 -1
  369. package/dist/bin/installer/targets/kiro.d.ts +0 -5
  370. package/dist/bin/installer/targets/kiro.d.ts.map +0 -1
  371. package/dist/bin/installer/targets/opencode.d.ts +0 -13
  372. package/dist/bin/installer/targets/opencode.d.ts.map +0 -1
  373. package/dist/bin/installer/targets/openhands.d.ts +0 -6
  374. package/dist/bin/installer/targets/openhands.d.ts.map +0 -1
  375. package/dist/bin/installer/targets/qoder.d.ts +0 -12
  376. package/dist/bin/installer/targets/qoder.d.ts.map +0 -1
  377. package/dist/bin/installer/targets/qwen.d.ts +0 -12
  378. package/dist/bin/installer/targets/qwen.d.ts.map +0 -1
  379. package/dist/bin/installer/targets/replit.d.ts +0 -6
  380. package/dist/bin/installer/targets/replit.d.ts.map +0 -1
  381. package/dist/bin/installer/targets/roo.d.ts +0 -13
  382. package/dist/bin/installer/targets/roo.d.ts.map +0 -1
  383. package/dist/bin/installer/targets/tabnine.d.ts +0 -6
  384. package/dist/bin/installer/targets/tabnine.d.ts.map +0 -1
  385. package/dist/bin/installer/targets/trae.d.ts +0 -6
  386. package/dist/bin/installer/targets/trae.d.ts.map +0 -1
  387. package/dist/bin/installer/targets/warp.d.ts +0 -12
  388. package/dist/bin/installer/targets/warp.d.ts.map +0 -1
  389. package/dist/bin/installer/targets/windsurf.d.ts +0 -13
  390. package/dist/bin/installer/targets/windsurf.d.ts.map +0 -1
  391. package/dist/bin/kirograph.d.ts +0 -6
  392. package/dist/bin/kirograph.d.ts.map +0 -1
  393. package/dist/bin/progress.d.ts +0 -29
  394. package/dist/bin/progress.d.ts.map +0 -1
  395. package/dist/bin/ui.d.ts +0 -11
  396. package/dist/bin/ui.d.ts.map +0 -1
  397. package/dist/compression/filters/aws.d.ts +0 -9
  398. package/dist/compression/filters/aws.d.ts.map +0 -1
  399. package/dist/compression/filters/docker.d.ts +0 -6
  400. package/dist/compression/filters/docker.d.ts.map +0 -1
  401. package/dist/compression/filters/files.d.ts +0 -6
  402. package/dist/compression/filters/files.d.ts.map +0 -1
  403. package/dist/compression/filters/generic.d.ts +0 -7
  404. package/dist/compression/filters/generic.d.ts.map +0 -1
  405. package/dist/compression/filters/git.d.ts +0 -6
  406. package/dist/compression/filters/git.d.ts.map +0 -1
  407. package/dist/compression/filters/github.d.ts +0 -6
  408. package/dist/compression/filters/github.d.ts.map +0 -1
  409. package/dist/compression/filters/lint.d.ts +0 -6
  410. package/dist/compression/filters/lint.d.ts.map +0 -1
  411. package/dist/compression/filters/misc.d.ts +0 -6
  412. package/dist/compression/filters/misc.d.ts.map +0 -1
  413. package/dist/compression/filters/package.d.ts +0 -6
  414. package/dist/compression/filters/package.d.ts.map +0 -1
  415. package/dist/compression/filters/test.d.ts +0 -6
  416. package/dist/compression/filters/test.d.ts.map +0 -1
  417. package/dist/compression/index.d.ts +0 -29
  418. package/dist/compression/index.d.ts.map +0 -1
  419. package/dist/compression/naive-cost.d.ts +0 -26
  420. package/dist/compression/naive-cost.d.ts.map +0 -1
  421. package/dist/compression/tracker.d.ts +0 -155
  422. package/dist/compression/tracker.d.ts.map +0 -1
  423. package/dist/compression/types.d.ts +0 -49
  424. package/dist/compression/types.d.ts.map +0 -1
  425. package/dist/config.d.ts +0 -138
  426. package/dist/config.d.ts.map +0 -1
  427. package/dist/context/index.d.ts +0 -61
  428. package/dist/context/index.d.ts.map +0 -1
  429. package/dist/core/file-tree.d.ts +0 -15
  430. package/dist/core/file-tree.d.ts.map +0 -1
  431. package/dist/core/lock-manager.d.ts +0 -22
  432. package/dist/core/lock-manager.d.ts.map +0 -1
  433. package/dist/core/pipeline.d.ts +0 -40
  434. package/dist/core/pipeline.d.ts.map +0 -1
  435. package/dist/core/snapshot.d.ts +0 -58
  436. package/dist/core/snapshot.d.ts.map +0 -1
  437. package/dist/data/filters.d.ts +0 -23
  438. package/dist/data/filters.d.ts.map +0 -1
  439. package/dist/data/indexer.d.ts +0 -25
  440. package/dist/data/indexer.d.ts.map +0 -1
  441. package/dist/data/linker.d.ts +0 -37
  442. package/dist/data/linker.d.ts.map +0 -1
  443. package/dist/data/linker.test.js +0 -60
  444. package/dist/data/linker.test.js.map +0 -7
  445. package/dist/data/lint.d.ts +0 -27
  446. package/dist/data/lint.d.ts.map +0 -1
  447. package/dist/data/parsers/__fixtures__/pdf-inspector-stub.js +0 -41
  448. package/dist/data/parsers/__fixtures__/pdf-inspector-stub.js.map +0 -7
  449. package/dist/data/parsers/csv.d.ts +0 -11
  450. package/dist/data/parsers/csv.d.ts.map +0 -1
  451. package/dist/data/parsers/excel.d.ts +0 -10
  452. package/dist/data/parsers/excel.d.ts.map +0 -1
  453. package/dist/data/parsers/index.d.ts +0 -28
  454. package/dist/data/parsers/index.d.ts.map +0 -1
  455. package/dist/data/parsers/json-array.d.ts +0 -9
  456. package/dist/data/parsers/json-array.d.ts.map +0 -1
  457. package/dist/data/parsers/jsonl.d.ts +0 -9
  458. package/dist/data/parsers/jsonl.d.ts.map +0 -1
  459. package/dist/data/parsers/parquet.d.ts +0 -10
  460. package/dist/data/parsers/parquet.d.ts.map +0 -1
  461. package/dist/data/parsers/pdf.test.js +0 -125
  462. package/dist/data/parsers/pdf.test.js.map +0 -7
  463. package/dist/data/pixelrag-bridge.js +0 -93
  464. package/dist/data/pixelrag-bridge.js.map +0 -7
  465. package/dist/data/pixelrag-manager.js +0 -416
  466. package/dist/data/pixelrag-manager.js.map +0 -7
  467. package/dist/data/profiler.d.ts +0 -29
  468. package/dist/data/profiler.d.ts.map +0 -1
  469. package/dist/data/queries.d.ts +0 -95
  470. package/dist/data/queries.d.ts.map +0 -1
  471. package/dist/data/types.d.ts +0 -103
  472. package/dist/data/types.d.ts.map +0 -1
  473. package/dist/db/database.d.ts +0 -190
  474. package/dist/db/database.d.ts.map +0 -1
  475. package/dist/docs/formats/asciidoc.d.ts +0 -9
  476. package/dist/docs/formats/asciidoc.d.ts.map +0 -1
  477. package/dist/docs/formats/html.d.ts +0 -10
  478. package/dist/docs/formats/html.d.ts.map +0 -1
  479. package/dist/docs/formats/index.d.ts +0 -31
  480. package/dist/docs/formats/index.d.ts.map +0 -1
  481. package/dist/docs/formats/markdown.d.ts +0 -11
  482. package/dist/docs/formats/markdown.d.ts.map +0 -1
  483. package/dist/docs/formats/openapi.d.ts +0 -17
  484. package/dist/docs/formats/openapi.d.ts.map +0 -1
  485. package/dist/docs/formats/org.d.ts +0 -9
  486. package/dist/docs/formats/org.d.ts.map +0 -1
  487. package/dist/docs/formats/plaintext.d.ts +0 -11
  488. package/dist/docs/formats/plaintext.d.ts.map +0 -1
  489. package/dist/docs/formats/rdoc.d.ts +0 -10
  490. package/dist/docs/formats/rdoc.d.ts.map +0 -1
  491. package/dist/docs/formats/rst.d.ts +0 -11
  492. package/dist/docs/formats/rst.d.ts.map +0 -1
  493. package/dist/docs/indexer.d.ts +0 -49
  494. package/dist/docs/indexer.d.ts.map +0 -1
  495. package/dist/docs/linker.d.ts +0 -30
  496. package/dist/docs/linker.d.ts.map +0 -1
  497. package/dist/docs/lint.d.ts +0 -27
  498. package/dist/docs/lint.d.ts.map +0 -1
  499. package/dist/docs/queries.d.ts +0 -78
  500. package/dist/docs/queries.d.ts.map +0 -1
  501. package/dist/docs/section-id.d.ts +0 -48
  502. package/dist/docs/section-id.d.ts.map +0 -1
  503. package/dist/docs/summarizer.d.ts +0 -13
  504. package/dist/docs/summarizer.d.ts.map +0 -1
  505. package/dist/docs/types.d.ts +0 -71
  506. package/dist/docs/types.d.ts.map +0 -1
  507. package/dist/docs/vectors.d.ts +0 -54
  508. package/dist/docs/vectors.d.ts.map +0 -1
  509. package/dist/errors.d.ts +0 -49
  510. package/dist/errors.d.ts.map +0 -1
  511. package/dist/extraction/extractor.d.ts +0 -29
  512. package/dist/extraction/extractor.d.ts.map +0 -1
  513. package/dist/extraction/grammars.d.ts +0 -54
  514. package/dist/extraction/grammars.d.ts.map +0 -1
  515. package/dist/extraction/languages.d.ts +0 -9
  516. package/dist/extraction/languages.d.ts.map +0 -1
  517. package/dist/extraction/notebook.d.ts +0 -14
  518. package/dist/extraction/notebook.d.ts.map +0 -1
  519. package/dist/frameworks/amplify.d.ts +0 -9
  520. package/dist/frameworks/amplify.d.ts.map +0 -1
  521. package/dist/frameworks/angular.d.ts +0 -9
  522. package/dist/frameworks/angular.d.ts.map +0 -1
  523. package/dist/frameworks/ansible.d.ts +0 -8
  524. package/dist/frameworks/ansible.d.ts.map +0 -1
  525. package/dist/frameworks/cloudformation.d.ts +0 -9
  526. package/dist/frameworks/cloudformation.d.ts.map +0 -1
  527. package/dist/frameworks/csharp.d.ts +0 -8
  528. package/dist/frameworks/csharp.d.ts.map +0 -1
  529. package/dist/frameworks/docker.d.ts +0 -9
  530. package/dist/frameworks/docker.d.ts.map +0 -1
  531. package/dist/frameworks/elixir.d.ts +0 -6
  532. package/dist/frameworks/elixir.d.ts.map +0 -1
  533. package/dist/frameworks/express.d.ts +0 -8
  534. package/dist/frameworks/express.d.ts.map +0 -1
  535. package/dist/frameworks/flutter.d.ts +0 -12
  536. package/dist/frameworks/flutter.d.ts.map +0 -1
  537. package/dist/frameworks/go.d.ts +0 -8
  538. package/dist/frameworks/go.d.ts.map +0 -1
  539. package/dist/frameworks/iac.d.ts +0 -10
  540. package/dist/frameworks/iac.d.ts.map +0 -1
  541. package/dist/frameworks/index.d.ts +0 -44
  542. package/dist/frameworks/index.d.ts.map +0 -1
  543. package/dist/frameworks/java.d.ts +0 -8
  544. package/dist/frameworks/java.d.ts.map +0 -1
  545. package/dist/frameworks/kubernetes.d.ts +0 -9
  546. package/dist/frameworks/kubernetes.d.ts.map +0 -1
  547. package/dist/frameworks/laravel.d.ts +0 -9
  548. package/dist/frameworks/laravel.d.ts.map +0 -1
  549. package/dist/frameworks/pulumi.d.ts +0 -9
  550. package/dist/frameworks/pulumi.d.ts.map +0 -1
  551. package/dist/frameworks/python.d.ts +0 -10
  552. package/dist/frameworks/python.d.ts.map +0 -1
  553. package/dist/frameworks/react.d.ts +0 -9
  554. package/dist/frameworks/react.d.ts.map +0 -1
  555. package/dist/frameworks/ruby.d.ts +0 -8
  556. package/dist/frameworks/ruby.d.ts.map +0 -1
  557. package/dist/frameworks/rust.d.ts +0 -8
  558. package/dist/frameworks/rust.d.ts.map +0 -1
  559. package/dist/frameworks/scala.d.ts +0 -6
  560. package/dist/frameworks/scala.d.ts.map +0 -1
  561. package/dist/frameworks/solidity.d.ts +0 -6
  562. package/dist/frameworks/solidity.d.ts.map +0 -1
  563. package/dist/frameworks/svelte.d.ts +0 -8
  564. package/dist/frameworks/svelte.d.ts.map +0 -1
  565. package/dist/frameworks/swift.d.ts +0 -10
  566. package/dist/frameworks/swift.d.ts.map +0 -1
  567. package/dist/frameworks/terraform.d.ts +0 -14
  568. package/dist/frameworks/terraform.d.ts.map +0 -1
  569. package/dist/frameworks/types.d.ts +0 -37
  570. package/dist/frameworks/types.d.ts.map +0 -1
  571. package/dist/frameworks/vue.d.ts +0 -7
  572. package/dist/frameworks/vue.d.ts.map +0 -1
  573. package/dist/graph/communities.d.ts +0 -43
  574. package/dist/graph/communities.d.ts.map +0 -1
  575. package/dist/graph/flows.d.ts +0 -55
  576. package/dist/graph/flows.d.ts.map +0 -1
  577. package/dist/graph/queries.d.ts +0 -53
  578. package/dist/graph/queries.d.ts.map +0 -1
  579. package/dist/graph/refactor.d.ts +0 -43
  580. package/dist/graph/refactor.d.ts.map +0 -1
  581. package/dist/graph/traversal.d.ts +0 -35
  582. package/dist/graph/traversal.d.ts.map +0 -1
  583. package/dist/index.d.ts +0 -134
  584. package/dist/index.d.ts.map +0 -1
  585. package/dist/installer/index.d.ts +0 -10
  586. package/dist/installer/index.d.ts.map +0 -1
  587. package/dist/installer/index.js +0 -526
  588. package/dist/installer/index.js.map +0 -1
  589. package/dist/mcp/cache.d.ts +0 -69
  590. package/dist/mcp/cache.d.ts.map +0 -1
  591. package/dist/mcp/read-modes.d.ts +0 -31
  592. package/dist/mcp/read-modes.d.ts.map +0 -1
  593. package/dist/mcp/server.d.ts +0 -17
  594. package/dist/mcp/server.d.ts.map +0 -1
  595. package/dist/mcp/tool-names.d.ts +0 -2
  596. package/dist/mcp/tool-names.d.ts.map +0 -1
  597. package/dist/mcp/tools.d.ts +0 -49
  598. package/dist/mcp/tools.d.ts.map +0 -1
  599. package/dist/mcp/transport.d.ts +0 -29
  600. package/dist/mcp/transport.d.ts.map +0 -1
  601. package/dist/memory/compress.d.ts +0 -19
  602. package/dist/memory/compress.d.ts.map +0 -1
  603. package/dist/memory/database.d.ts +0 -92
  604. package/dist/memory/database.d.ts.map +0 -1
  605. package/dist/memory/index.d.ts +0 -71
  606. package/dist/memory/index.d.ts.map +0 -1
  607. package/dist/memory/symbols.d.ts +0 -21
  608. package/dist/memory/symbols.d.ts.map +0 -1
  609. package/dist/memory/types.d.ts +0 -78
  610. package/dist/memory/types.d.ts.map +0 -1
  611. package/dist/memory/vectors.d.ts +0 -43
  612. package/dist/memory/vectors.d.ts.map +0 -1
  613. package/dist/patterns/graph.d.ts +0 -16
  614. package/dist/patterns/graph.d.ts.map +0 -1
  615. package/dist/patterns/index.d.ts +0 -4
  616. package/dist/patterns/index.d.ts.map +0 -1
  617. package/dist/patterns/indexer.d.ts +0 -15
  618. package/dist/patterns/indexer.d.ts.map +0 -1
  619. package/dist/patterns/loader.d.ts +0 -18
  620. package/dist/patterns/loader.d.ts.map +0 -1
  621. package/dist/patterns/runner.d.ts +0 -42
  622. package/dist/patterns/runner.d.ts.map +0 -1
  623. package/dist/patterns/types.d.ts +0 -27
  624. package/dist/patterns/types.d.ts.map +0 -1
  625. package/dist/resolution/bridges/android-rn.d.ts +0 -13
  626. package/dist/resolution/bridges/android-rn.d.ts.map +0 -1
  627. package/dist/resolution/bridges/expo-modules.d.ts +0 -10
  628. package/dist/resolution/bridges/expo-modules.d.ts.map +0 -1
  629. package/dist/resolution/bridges/flutter-channel.d.ts +0 -14
  630. package/dist/resolution/bridges/flutter-channel.d.ts.map +0 -1
  631. package/dist/resolution/bridges/index.d.ts +0 -40
  632. package/dist/resolution/bridges/index.d.ts.map +0 -1
  633. package/dist/resolution/bridges/native-events.d.ts +0 -10
  634. package/dist/resolution/bridges/native-events.d.ts.map +0 -1
  635. package/dist/resolution/bridges/native-views.d.ts +0 -13
  636. package/dist/resolution/bridges/native-views.d.ts.map +0 -1
  637. package/dist/resolution/bridges/react-native.d.ts +0 -9
  638. package/dist/resolution/bridges/react-native.d.ts.map +0 -1
  639. package/dist/resolution/bridges/swift-objc.d.ts +0 -14
  640. package/dist/resolution/bridges/swift-objc.d.ts.map +0 -1
  641. package/dist/resolution/bridges/turbomodules.d.ts +0 -10
  642. package/dist/resolution/bridges/turbomodules.d.ts.map +0 -1
  643. package/dist/resolution/index.d.ts +0 -81
  644. package/dist/resolution/index.d.ts.map +0 -1
  645. package/dist/resolution/name-matcher.d.ts +0 -25
  646. package/dist/resolution/name-matcher.d.ts.map +0 -1
  647. package/dist/scripts/postinstall.js +0 -64
  648. package/dist/search/query-utils.d.ts +0 -21
  649. package/dist/search/query-utils.d.ts.map +0 -1
  650. package/dist/search/searcher.d.ts +0 -15
  651. package/dist/search/searcher.d.ts.map +0 -1
  652. package/dist/security/attack-surface.d.ts +0 -46
  653. package/dist/security/attack-surface.d.ts.map +0 -1
  654. package/dist/security/context-warnings.d.ts +0 -40
  655. package/dist/security/context-warnings.d.ts.map +0 -1
  656. package/dist/security/data-flows.d.ts +0 -33
  657. package/dist/security/data-flows.d.ts.map +0 -1
  658. package/dist/security/dep-confusion.d.ts +0 -23
  659. package/dist/security/dep-confusion.d.ts.map +0 -1
  660. package/dist/security/errors.d.ts +0 -16
  661. package/dist/security/errors.d.ts.map +0 -1
  662. package/dist/security/export/fix-suggestions.d.ts +0 -21
  663. package/dist/security/export/fix-suggestions.d.ts.map +0 -1
  664. package/dist/security/export/sbom.d.ts +0 -33
  665. package/dist/security/export/sbom.d.ts.map +0 -1
  666. package/dist/security/export/serialization.d.ts +0 -62
  667. package/dist/security/export/serialization.d.ts.map +0 -1
  668. package/dist/security/export/vex.d.ts +0 -58
  669. package/dist/security/export/vex.d.ts.map +0 -1
  670. package/dist/security/index.d.ts +0 -21
  671. package/dist/security/index.d.ts.map +0 -1
  672. package/dist/security/integrator.d.ts +0 -63
  673. package/dist/security/integrator.d.ts.map +0 -1
  674. package/dist/security/license.d.ts +0 -33
  675. package/dist/security/license.d.ts.map +0 -1
  676. package/dist/security/manifest/adapter.d.ts +0 -92
  677. package/dist/security/manifest/adapter.d.ts.map +0 -1
  678. package/dist/security/manifest/parser.d.ts +0 -73
  679. package/dist/security/manifest/parser.d.ts.map +0 -1
  680. package/dist/security/manifest/plugins/cargo.d.ts +0 -11
  681. package/dist/security/manifest/plugins/cargo.d.ts.map +0 -1
  682. package/dist/security/manifest/plugins/composer.d.ts +0 -11
  683. package/dist/security/manifest/plugins/composer.d.ts.map +0 -1
  684. package/dist/security/manifest/plugins/go.d.ts +0 -12
  685. package/dist/security/manifest/plugins/go.d.ts.map +0 -1
  686. package/dist/security/manifest/plugins/gradle.d.ts +0 -12
  687. package/dist/security/manifest/plugins/gradle.d.ts.map +0 -1
  688. package/dist/security/manifest/plugins/hex.d.ts +0 -11
  689. package/dist/security/manifest/plugins/hex.d.ts.map +0 -1
  690. package/dist/security/manifest/plugins/maven.d.ts +0 -11
  691. package/dist/security/manifest/plugins/maven.d.ts.map +0 -1
  692. package/dist/security/manifest/plugins/npm.d.ts +0 -11
  693. package/dist/security/manifest/plugins/npm.d.ts.map +0 -1
  694. package/dist/security/manifest/plugins/nuget.d.ts +0 -12
  695. package/dist/security/manifest/plugins/nuget.d.ts.map +0 -1
  696. package/dist/security/manifest/plugins/pip.d.ts +0 -11
  697. package/dist/security/manifest/plugins/pip.d.ts.map +0 -1
  698. package/dist/security/manifest/plugins/pubspec.d.ts +0 -11
  699. package/dist/security/manifest/plugins/pubspec.d.ts.map +0 -1
  700. package/dist/security/manifest/plugins/pyproject.d.ts +0 -3
  701. package/dist/security/manifest/plugins/pyproject.d.ts.map +0 -1
  702. package/dist/security/manifest/plugins/rubygems.d.ts +0 -11
  703. package/dist/security/manifest/plugins/rubygems.d.ts.map +0 -1
  704. package/dist/security/manifest/plugins/swift.d.ts +0 -11
  705. package/dist/security/manifest/plugins/swift.d.ts.map +0 -1
  706. package/dist/security/owasp.d.ts +0 -16
  707. package/dist/security/owasp.d.ts.map +0 -1
  708. package/dist/security/pipeline.d.ts +0 -37
  709. package/dist/security/pipeline.d.ts.map +0 -1
  710. package/dist/security/reachability.d.ts +0 -67
  711. package/dist/security/reachability.d.ts.map +0 -1
  712. package/dist/security/remediation.d.ts +0 -51
  713. package/dist/security/remediation.d.ts.map +0 -1
  714. package/dist/security/secrets.d.ts +0 -38
  715. package/dist/security/secrets.d.ts.map +0 -1
  716. package/dist/security/staleness.d.ts +0 -43
  717. package/dist/security/staleness.d.ts.map +0 -1
  718. package/dist/security/supply-chain.d.ts +0 -34
  719. package/dist/security/supply-chain.d.ts.map +0 -1
  720. package/dist/security/suppressions.d.ts +0 -18
  721. package/dist/security/suppressions.d.ts.map +0 -1
  722. package/dist/security/types.d.ts +0 -144
  723. package/dist/security/types.d.ts.map +0 -1
  724. package/dist/security/vuln/client.d.ts +0 -90
  725. package/dist/security/vuln/client.d.ts.map +0 -1
  726. package/dist/security/vuln/epss-client.d.ts +0 -26
  727. package/dist/security/vuln/epss-client.d.ts.map +0 -1
  728. package/dist/security/vuln/index.d.ts +0 -6
  729. package/dist/security/vuln/index.d.ts.map +0 -1
  730. package/dist/security/vuln/osv-adapter.d.ts +0 -58
  731. package/dist/security/vuln/osv-adapter.d.ts.map +0 -1
  732. package/dist/security/vuln/types.d.ts +0 -29
  733. package/dist/security/vuln/types.d.ts.map +0 -1
  734. package/dist/sync/index.d.ts +0 -35
  735. package/dist/sync/index.d.ts.map +0 -1
  736. package/dist/types.d.ts +0 -137
  737. package/dist/types.d.ts.map +0 -1
  738. package/dist/utils.d.ts +0 -52
  739. package/dist/utils.d.ts.map +0 -1
  740. package/dist/vectors/index.d.ts +0 -79
  741. package/dist/vectors/index.d.ts.map +0 -1
  742. package/dist/vectors/lancedb-index.d.ts +0 -50
  743. package/dist/vectors/lancedb-index.d.ts.map +0 -1
  744. package/dist/vectors/orama-index.d.ts +0 -54
  745. package/dist/vectors/orama-index.d.ts.map +0 -1
  746. package/dist/vectors/pglite-index.d.ts +0 -53
  747. package/dist/vectors/pglite-index.d.ts.map +0 -1
  748. package/dist/vectors/qdrant-index.d.ts +0 -77
  749. package/dist/vectors/qdrant-index.d.ts.map +0 -1
  750. package/dist/vectors/typesense-index.d.ts +0 -75
  751. package/dist/vectors/typesense-index.d.ts.map +0 -1
  752. package/dist/vectors/vec-index.d.ts +0 -52
  753. package/dist/vectors/vec-index.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/bin/installer/config-prompt.ts"],
4
- "sourcesContent": ["/**\n * KiroGraph Installer \u2014 configuration prompting\n */\n\nimport * as readline from 'readline';\nimport { KiroGraphConfig } from '../../config';\ntype CavemanMode = 'lite' | 'full' | 'ultra';\nimport { ask, askToggle, arrowSelect, printSection, printSeparator, dim, reset, violet } from './prompts';\nimport { promptImportGlobalHookSelection } from '../../hooks/import-prompt';\n\nexport interface PromptConfigOptions {\n projectRoot?: string;\n offerHookImport?: boolean;\n}\nexport type ConfigPatch = Pick<KiroGraphConfig,\n 'enableEmbeddings' | 'useVecIndex' | 'semanticEngine' |\n 'turboquantMemDocs' | 'turboquantBits' | 'turbovecMemDocs' | 'turbovecBits' |\n 'typesenseDashboard' | 'qdrantDashboard' |\n 'extractDocstrings' | 'trackCallSites' | 'enableArchitecture' |\n 'cavemanMode' | 'shellCompressionLevel' |\n 'enableMemory' | 'enableWatchmen' | 'watchmenThreshold' | 'watchmenSynthesisMode' | 'watchmenLocalModel' |\n 'enableDocs' | 'docsContextLimit' |\n 'enableData' | 'dataContextLimit' |\n 'enableSecurity' | 'enablePatterns' |\n 'enableWiki' | 'wikiSynthesisMode' | 'wikiLocalModel' |\n 'enableCodeHealth' | 'enableNavigation' | 'enableComplexity' |\n 'enableGitContext' | 'enableEditPrimitives' | 'enableBranch' |\n 'enableAgentUtils' | 'enableGeneralCompression'\n> & { embeddingModel?: string; embeddingDim?: number };\nexport type SemanticEngine = KiroGraphConfig['semanticEngine'];\n\ntype InstallMode = 'core' | 'full' | 'custom' | 'profiles';\n\nconst PROFILES: Record<string, { label: string; description: string; patch: Partial<ConfigPatch> }> = {\n developer: {\n label: 'Developer',\n description: 'Code health, navigation, complexity, call-site tracking',\n patch: { enableCodeHealth: true, enableNavigation: true, enableComplexity: true, trackCallSites: true },\n },\n team: {\n label: 'Team',\n description: 'Developer + architecture, git context, wiki',\n patch: { enableCodeHealth: true, enableNavigation: true, enableComplexity: true, trackCallSites: true, enableArchitecture: true, enableGitContext: true, enableWiki: true, wikiSynthesisMode: 'agent' },\n },\n security: {\n label: 'Security',\n description: 'Security analysis, patterns, architecture, code health',\n patch: { enableSecurity: true, enableArchitecture: true, enablePatterns: true, enableCodeHealth: true },\n },\n data: {\n label: 'Data & Docs',\n description: 'Tabular data indexing and documentation navigation',\n patch: { enableData: true, enableDocs: true },\n },\n ai: {\n label: 'AI / LLM Agent',\n description: 'Memory, watchmen, agent utils, wiki, general compression',\n patch: { enableMemory: true, enableWatchmen: true, enableAgentUtils: true, enableWiki: true, wikiSynthesisMode: 'agent', enableGeneralCompression: true },\n },\n};\n\nexport const DEFAULT_EMBEDDING_MODEL = 'nomic-ai/nomic-embed-text-v1.5';\n\n/** Well-known embedding models with their output dimensions. */\nconst PRESET_MODELS = [\n {\n value: 'nomic-ai/nomic-embed-text-v1.5',\n label: 'nomic-embed-text-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~130MB \u00B7 Best quality for code search (recommended)',\n },\n {\n value: 'onnx-community/embeddinggemma-300m-ONNX',\n label: 'embeddinggemma-300m',\n dim: 768,\n description: '768-dim \u00B7 ~300MB \u00B7 Google Gemma-based, multilingual, 2048-token context',\n },\n {\n value: 'Xenova/all-MiniLM-L6-v2',\n label: 'all-MiniLM-L6-v2',\n dim: 384,\n description: '384-dim \u00B7 ~23MB \u00B7 Fast and lightweight, lower accuracy',\n },\n {\n value: 'BAAI/bge-base-en-v1.5',\n label: 'bge-base-en-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~110MB \u00B7 Strong general-purpose alternative to nomic',\n },\n {\n value: '__other__',\n label: 'Other',\n dim: 768,\n description: 'Enter a custom HuggingFace model ID and embedding dimension',\n },\n] as const;\n\nexport async function promptConfigOptions(\n rl: readline.Interface,\n opts: PromptConfigOptions = {},\n): Promise<{ patch: ConfigPatch; hooksToImport: string[] | null }> {\n // \u2500\u2500 Install mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const installMode = await arrowSelect<InstallMode>(rl, 'Installation mode:', [\n { value: 'core', label: 'Core only', description: '3 always-on tools (search, context, node) \u2014 ~170 tok. Zero config.' },\n { value: 'full', label: 'Full', description: 'Enable every feature with sensible defaults. Best for a fresh project.' },\n { value: 'profiles', label: 'Profiles', description: 'Choose a preset bundle (Developer, Team, Security, Data & Docs, AI/LLM).' },\n { value: 'custom', label: 'Custom', description: 'Answer each question individually. Maximum control.' },\n ]);\n\n const basePatch: ConfigPatch = {\n enableEmbeddings: false, useVecIndex: false, semanticEngine: 'cosine',\n turboquantMemDocs: false, turboquantBits: 3, turbovecMemDocs: false, turbovecBits: 4,\n typesenseDashboard: false, qdrantDashboard: false,\n extractDocstrings: false, trackCallSites: false,\n enableArchitecture: false, cavemanMode: 'off', shellCompressionLevel: 'off',\n enableMemory: false, enableWatchmen: false, watchmenThreshold: 5,\n watchmenSynthesisMode: 'local', watchmenLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX',\n enableDocs: false, docsContextLimit: 0,\n enableData: false, dataContextLimit: 0,\n enableSecurity: false, enablePatterns: false,\n enableWiki: false, wikiSynthesisMode: 'agent', wikiLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX',\n enableCodeHealth: false, enableNavigation: false, enableComplexity: false,\n enableGitContext: false, enableEditPrimitives: false, enableBranch: false,\n enableAgentUtils: false, enableGeneralCompression: false,\n };\n\n if (installMode === 'core') {\n return { patch: basePatch, hooksToImport: null };\n }\n\n if (installMode === 'full') {\n const fullPatch: ConfigPatch = {\n ...basePatch,\n enableEmbeddings: true, embeddingModel: DEFAULT_EMBEDDING_MODEL, embeddingDim: 768,\n extractDocstrings: true, trackCallSites: true,\n enableArchitecture: true, shellCompressionLevel: 'normal',\n enableCodeHealth: true, enableNavigation: true, enableComplexity: true,\n enableGitContext: true, enableEditPrimitives: true, enableBranch: true,\n enableAgentUtils: true, enableGeneralCompression: true,\n enableSecurity: true, enablePatterns: true,\n enableDocs: true, enableData: true,\n enableMemory: true, enableWatchmen: true,\n enableWiki: true, wikiSynthesisMode: 'agent',\n };\n return { patch: fullPatch, hooksToImport: null };\n }\n\n if (installMode === 'profiles') {\n const profileKey = await arrowSelect<string>(rl, 'Select a profile:', Object.entries(PROFILES).map(([key, p]) => ({\n value: key,\n label: p.label,\n description: p.description,\n })));\n const profile = PROFILES[profileKey];\n const patch: ConfigPatch = { ...basePatch, ...profile.patch };\n return { patch, hooksToImport: null };\n }\n\n // \u2500\u2500 Custom: ask all questions individually \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n // \u2500\u2500 Semantic Search \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD0D', 'Semantic Search');\n\n const enableEmbeddings = await askToggle(\n rl,\n 'Semantic embeddings (similarity search):',\n 'Enables natural-language code search via vector embeddings. A local model (~130MB) is downloaded on first use.',\n );\n\n const patch: ConfigPatch = { ...basePatch, enableEmbeddings };\n\n if (enableEmbeddings) {\n // \u2500\u2500 Model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const modelChoice = await arrowSelect<string>(\n rl,\n 'Embedding model:',\n PRESET_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })),\n );\n\n let embeddingModel: string;\n let embeddingDim: number;\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID in the format org/model-name.${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { embeddingModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name (e.g. nomic-ai/nomic-embed-text-v1.5).`);\n }\n console.log(`\\n ${dim}Enter the embedding output dimension for this model (check the model card on HuggingFace).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Embedding dimension (e.g. 768, 384):${reset} `)).trim();\n const n = parseInt(raw, 10);\n if (!isNaN(n) && n > 0) { embeddingDim = n; break; }\n console.log(` Expected a positive integer (e.g. 768, 384, 1536).`);\n }\n } else {\n const preset = PRESET_MODELS.find(m => m.value === modelChoice)!;\n embeddingModel = preset.value;\n embeddingDim = preset.dim;\n }\n\n patch.embeddingModel = embeddingModel;\n patch.embeddingDim = embeddingDim;\n\n // \u2500\u2500 Engine selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const semanticEngine = await arrowSelect<SemanticEngine>(rl, 'Vector search engine:', [\n { value: 'cosine', label: 'cosine', description: 'In-process cosine similarity. No extra deps. Best for small/medium projects.' },\n { value: 'turboquant', label: 'turboquant', description: 'ANN index, zero native deps. Compresses embeddings 20\u201330\u00D7 (Google TurboQuant). ANN without native binaries \u2014 ideal for CI, ARM, restricted envs. Optional: npm install turboquant-js.' },\n { value: 'turbovec', label: 'turbovec', description: 'ANN search via Rust/SIMD (napi-rs). Same TurboQuant algorithm but NEON on ARM and AVX-512BW on x86 \u2014 faster than turboquant-js at the cost of a one-time Rust build. Requires Rust toolchain. Build: cd native/turbovec-node && npm install && npm run build.' },\n { value: 'sqlite-vec', label: 'sqlite-vec', description: 'ANN index. Sub-linear search. Best for large codebases. Needs: better-sqlite3, sqlite-vec (native).' },\n { value: 'orama', label: 'orama', description: 'Hybrid search (full-text + vector). Pure JS. Needs: @orama/orama, @orama/plugin-data-persistence.' },\n { value: 'pglite', label: 'pglite', description: 'Hybrid search via PostgreSQL + pgvector. Exact results. Pure WASM. Needs: @electric-sql/pglite.' },\n { value: 'lancedb', label: 'lancedb', description: 'ANN search via LanceDB (Apache Lance columnar format). Pure JS. Needs: @lancedb/lancedb.' },\n { value: 'qdrant', label: 'qdrant', description: 'ANN search via Qdrant embedded binary (HNSW index, Cosine). Needs: qdrant-local.' },\n { value: 'typesense', label: 'typesense', description: 'ANN search via Typesense (auto-downloaded binary, HNSW, Cosine). Needs: typesense.' },\n ]);\n patch.semanticEngine = semanticEngine;\n patch.useVecIndex = semanticEngine === 'sqlite-vec';\n\n // TurboQuant for memory & docs: offer only when turboquant is the code-node engine\n if (semanticEngine === 'turboquant') {\n patch.turboquantMemDocs = await askToggle(rl,\n 'TurboQuant for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with a compressed ANN index \u2014 no native deps required. Most useful when you accumulate many observations or large doc sets (1 000+ entries).',\n false,\n );\n }\n\n // TurboVec bit width\n if (semanticEngine === 'turbovec') {\n patch.turbovecBits = await arrowSelect<number>(rl, 'TurboVec bits per coordinate:', [\n { value: 4, label: '4 bits (recommended)', description: 'Best quality, ~19\u00D7 compression vs raw Float32. Default.' },\n { value: 3, label: '3 bits', description: 'Balanced \u2014 ~25\u00D7 compression, slight quality drop.' },\n { value: 2, label: '2 bits', description: 'Highest compression (~38\u00D7), lowest accuracy.' },\n ]);\n patch.turbovecMemDocs = await askToggle(rl,\n 'TurboVec for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with the TurboVec ANN index. Requires the addon to be built.',\n false,\n );\n }\n\n if (semanticEngine === 'typesense') {\n patch.typesenseDashboard = await askToggle(rl,\n 'Typesense dashboard:',\n 'Serves the Typesense Dashboard locally and opens it in your browser after indexing completes.',\n false,\n );\n }\n\n if (semanticEngine === 'qdrant') {\n patch.qdrantDashboard = await askToggle(rl,\n 'Qdrant dashboard:',\n 'Downloads the Qdrant Web UI (first time only) and opens it in your browser after indexing completes.',\n false,\n );\n }\n }\n\n // \u2500\u2500 Graph Features \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Features');\n\n patch.extractDocstrings = await askToggle(rl,\n 'Docstring extraction:',\n 'Enriches symbol metadata and improves context quality. Slightly increases indexing time.',\n false,\n );\n\n patch.trackCallSites = await askToggle(rl,\n 'Call site tracking (caller/callee graph):',\n 'Enables kirograph_callers and kirograph_callees MCP tools. Increases index size.',\n false,\n );\n\n patch.enableArchitecture = await askToggle(rl,\n 'Architecture analysis (packages + layers):',\n 'Detects packages from manifests and architectural layers. Enables kirograph_architecture, kirograph_coupling, kirograph_package.',\n false,\n );\n\n // \u2500\u2500 Graph Tools \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Tools');\n\n patch.enableNavigation = await askToggle(rl,\n 'Navigation tools (status, files, impact):',\n 'Enables kirograph_status, kirograph_files, kirograph_impact.',\n false,\n );\n\n patch.enableCodeHealth = await askToggle(rl,\n 'Code health tools (hotspots, dead code, path analysis, type hierarchy):',\n 'Enables kirograph_hotspots, kirograph_surprising, kirograph_diff, kirograph_dead_code, kirograph_circular_deps, kirograph_path, kirograph_affected, kirograph_type_hierarchy.',\n false,\n );\n\n patch.enableComplexity = await askToggle(rl,\n 'Complexity metrics tools:',\n 'Enables complexity analysis, simplify scan, health score, DSM, test risk.',\n false,\n );\n\n patch.enableGitContext = await askToggle(rl,\n 'Git context tools (diff context, commit context, flows):',\n 'Enables kirograph_flows, kirograph_diff_context, kirograph_commit_context, kirograph_pr_context, kirograph_changelog, kirograph_test_map, kirograph_test_coverage.',\n false,\n );\n\n patch.enableEditPrimitives = await askToggle(rl,\n 'Edit primitive tools (str_replace, insert_at, refactor):',\n 'Enables kirograph_refactor, kirograph_str_replace, kirograph_multi_str_replace, kirograph_insert_at, kirograph_ast_grep_rewrite.',\n false,\n );\n\n patch.enableAgentUtils = await askToggle(rl,\n 'Agent utilities (file caching, budget tracking):',\n 'Enables kirograph_read, kirograph_gain, kirograph_budget.',\n false,\n );\n\n // \u2500\u2500 Security \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD12', 'Security');\n\n patch.enableSecurity = await askToggle(rl,\n 'Security analysis (vulnerability scanning + reachability):',\n 'Scans dependency manifests for known vulnerabilities and performs reachability analysis. Requires Architecture analysis (will be auto-enabled). Enables kirograph_security, kirograph_vulns, kirograph_sbom, kirograph_vex, kirograph_reachability MCP tools.',\n false,\n );\n\n if (patch.enableSecurity && !patch.enableArchitecture) {\n patch.enableArchitecture = true;\n console.log(' \u2139 Architecture analysis auto-enabled (required by Security module)');\n }\n\n // \u2500\u2500 Pattern Matching \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD0D', 'Pattern Matching');\n\n patch.enablePatterns = await askToggle(rl,\n 'Precise SAST with ast-grep?',\n 'Runs AST structural pattern matching during indexing using @ast-grep/napi (~15MB native binding). Unlike heuristic symbol-name analysis, matches real code structure \u2014 precise SQL injection, path traversal, eval detection. Requires @ast-grep/napi (will be installed automatically if you answer yes).',\n false,\n );\n\n // \u2500\u2500 Documentation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Documentation');\n\n (patch as any).enableDocs = await askToggle(rl,\n 'Documentation indexing (section-level retrieval):',\n 'Indexes docs by heading structure. Enables kirograph_docs_toc, kirograph_docs_search, kirograph_docs_section, kirograph_docs_outline, kirograph_docs_refs.',\n false,\n );\n\n if ((patch as any).enableDocs) {\n const contextChoice = await arrowSelect<number>(rl, 'Include doc sections in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Docs stay separate \u2014 use kirograph_docs_* tools explicitly (recommended)' },\n { value: 3, label: '3 sections', description: 'Include up to 3 relevant doc sections in context results' },\n { value: 5, label: '5 sections', description: 'Include up to 5 relevant doc sections in context results' },\n { value: 10, label: '10 sections', description: 'Include up to 10 relevant doc sections in context results' },\n ]);\n (patch as any).docsContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Data \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Data');\n\n (patch as any).enableData = await askToggle(rl,\n 'Tabular data indexing (CSV/TSV/JSONL/JSON/Excel/Parquet):',\n 'Indexes data files for structured querying. Enables kirograph_data_list, kirograph_data_describe, kirograph_data_query, kirograph_data_aggregate, kirograph_data_search.',\n false,\n );\n\n if ((patch as any).enableData) {\n (patch as any).dataInstallExcel = await askToggle(rl,\n 'Install Excel support (xlsx package)?',\n 'Required for .xlsx/.xls files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallParquet = await askToggle(rl,\n 'Install Parquet support (parquetjs-lite package)?',\n 'Required for .parquet files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallPdf = await askToggle(rl,\n 'Install PDF support (@firecrawl/pdf-inspector package)?',\n 'Required for .pdf files. Rust/NAPI binary \u2014 prebuilts for linux-x64 and macOS ARM64.',\n false,\n );\n\n const contextChoice = await arrowSelect<number>(rl, 'Include dataset schemas in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Data stays separate \u2014 use kirograph_data_* tools explicitly (recommended)' },\n { value: 2, label: '2 datasets', description: 'Include up to 2 relevant dataset schemas in context results' },\n { value: 5, label: '5 datasets', description: 'Include up to 5 relevant dataset schemas in context results' },\n ]);\n (patch as any).dataContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Agent Behavior \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDD16', 'Agent Behavior');\n\n const cavemanChoice = await arrowSelect(rl, 'Communication style (caveman mode):', [\n { value: 'off', label: 'off', description: 'Normal responses \u2014 no compression' },\n { value: 'lite', label: 'lite', description: 'Compact, no filler, full sentences' },\n { value: 'full', label: 'full', description: 'Fragments, no articles, short synonyms' },\n { value: 'ultra', label: 'ultra', description: 'Max compression, abbreviations, \u2192 for causality' },\n ]);\n patch.cavemanMode = cavemanChoice as CavemanMode | 'off';\n\n const compressionChoice = await arrowSelect(rl, 'Shell compression (kirograph_exec):', [\n { value: 'off', label: 'off', description: 'Disables kirograph_exec entirely' },\n { value: 'normal', label: 'normal', description: 'Balanced: removes noise, keeps structure (recommended)' },\n { value: 'aggressive', label: 'aggressive', description: 'More compact: groups by category, limits output' },\n { value: 'ultra', label: 'ultra', description: 'Maximum compression: counts and summaries only' },\n ]);\n patch.shellCompressionLevel = compressionChoice as KiroGraphConfig['shellCompressionLevel'];\n if (compressionChoice === 'off') {\n console.log(' \u2139 kirograph_exec disabled (shell compression is off)');\n }\n\n patch.enableGeneralCompression = await askToggle(rl,\n 'General-purpose compression tool (kirograph_compress):',\n 'Enables kirograph_compress \u2014 an on-demand MCP tool that compresses arbitrary text before it reaches the model. ' +\n 'Two engines: rtk-style structural filters for shell output (git, npm, test logs) when a command hint is provided, ' +\n 'or caveman grammar rules for prose and observations otherwise. ' +\n 'Useful when the agent pastes large content, receives a fat RAG chunk, or wants to explicitly compress before storing. ' +\n 'Independent from automatic shell compression (kirograph_exec) and caveman mode \u2014 those apply in the background; ' +\n 'this gives the model an explicit, on-demand compression action.',\n false,\n );\n\n let hooksToImport: string[] | null = null;\n if (opts.offerHookImport && opts.projectRoot) {\n printSection('\uD83E\uDE9D', 'Hooks');\n hooksToImport = await promptImportGlobalHookSelection();\n }\n\n // \u2500\u2500 Memory \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDDE0', 'Memory');\n\n patch.enableMemory = await askToggle(rl,\n 'Persistent memory (cross-session observations):',\n 'Stores decisions, errors, and patterns across sessions. Compressed (if caveman is on), linked to code symbols, searchable via kirograph_mem_* tools. Zero LLM tokens on write.',\n false,\n );\n\n if (patch.enableMemory) {\n patch.enableWatchmen = await askToggle(rl,\n 'Watchmen (auto-synthesize workspace briefs from memory):',\n 'When enough observations accumulate (default: 5), synthesizes them into .kiro/steering/kirograph-watchmen.md, CLAUDE.md, AGENTS.md, or the equivalent for your tool.',\n false,\n );\n\n if (patch.enableWatchmen) {\n // \u2500\u2500 Synthesis mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const synthesisMode = await arrowSelect<KiroGraphConfig['watchmenSynthesisMode']>(\n rl,\n 'Watchmen synthesis mode:',\n [\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model via @huggingface/transformers. Zero API cost, no data leaves your machine. Model downloaded once to ~/.kirograph/models/. Works for all tools via runCommand hook.',\n },\n {\n value: 'agent',\n label: 'Active agent',\n description: '\u26A0 Kiro only. Uses the active Kiro agent to synthesize. Consumes API tokens/credits on every synthesis. Not supported for other tools.',\n },\n ],\n );\n patch.watchmenSynthesisMode = synthesisMode;\n\n if (synthesisMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const modelChoice = await arrowSelect<string>(rl, 'Local synthesis model:', LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.watchmenLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.watchmenLocalModel = modelChoice;\n }\n }\n }\n }\n\n // \u2500\u2500 Wiki \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Wiki');\n\n patch.enableWiki = await askToggle(rl,\n 'LLM Wiki (Karpathy-style structured knowledge base):',\n 'Maintains a set of markdown pages that compound knowledge across sessions. Supports search, ingest (two-tool flow), conflict resolution, and health checks via kirograph_wiki_* tools.',\n false,\n );\n\n if (patch.enableWiki) {\n const wikiMode = await arrowSelect<KiroGraphConfig['wikiSynthesisMode']>(\n rl,\n 'Wiki synthesis mode:',\n [\n {\n value: 'agent',\n label: 'Active agent (recommended)',\n description: 'Uses the active LLM agent to generate WIKI_DIFF blocks. Works with any AI tool. Consumes API tokens on ingest.',\n },\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model to generate diffs. Zero API cost, no data leaves your machine. Same infra as Watchmen.',\n },\n ],\n );\n patch.wikiSynthesisMode = wikiMode;\n\n if (wikiMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const WIKI_LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const wikiModelChoice = await arrowSelect<string>(rl, 'Local wiki synthesis model:', WIKI_LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (wikiModelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.wikiLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.wikiLocalModel = wikiModelChoice;\n }\n }\n }\n\n return { patch, hooksToImport };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA8F;AAC9F,2BAAgD;AAyBhD,MAAM,WAAgG;AAAA,EACpG,WAAW;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,kBAAkB,MAAM,kBAAkB,MAAM,kBAAkB,MAAM,gBAAgB,KAAK;AAAA,EACxG;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,kBAAkB,MAAM,kBAAkB,MAAM,kBAAkB,MAAM,gBAAgB,MAAM,oBAAoB,MAAM,kBAAkB,MAAM,YAAY,MAAM,mBAAmB,QAAQ;AAAA,EACxM;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,gBAAgB,MAAM,oBAAoB,MAAM,gBAAgB,MAAM,kBAAkB,KAAK;AAAA,EACxG;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,YAAY,MAAM,YAAY,KAAK;AAAA,EAC9C;AAAA,EACA,IAAI;AAAA,IACF,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,cAAc,MAAM,gBAAgB,MAAM,kBAAkB,MAAM,YAAY,MAAM,mBAAmB,SAAS,0BAA0B,KAAK;AAAA,EAC1J;AACF;AAEO,MAAM,0BAA0B;AAGvC,MAAM,gBAAgB;AAAA,EACpB;AAAA,IACE,OAAO;AAA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,QACE;AAAA,UACE,OAAO;AAAA,UACP,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF;AACA,UAAM,oBAAoB;AAE1B,QAAI,aAAa,SAAS;AAExB,YAAM,oBAAoB;AAAA,QACxB;AAAA,UACE,OAAO;AAAA,UACP,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,OAAO;AAAA,UACP,aAAa;AAAA,QACf;AAAA,MACF;AAEA,YAAM,kBAAkB,UAAM,4BAAoB,IAAI,+BAA+B,kBAAkB,IAAI,QAAM,EAAE,OAAO,EAAE,OAAO,OAAO,EAAE,OAAO,aAAa,EAAE,YAAY,EAAE,CAAC;AAEjL,UAAI,oBAAoB,aAAa;AACnC,gBAAQ,IAAI;AAAA,IAAO,kBAAG,0EAA0E,oBAAK,EAAE;AACvG,eAAO,MAAM;AACX,gBAAM,OAAO,UAAM,oBAAI,IAAI,KAAK,qBAAM,oBAAoB,oBAAK,GAAG,GAAG,KAAK;AAC1E,cAAI,IAAI,SAAS,GAAG,GAAG;AAAE,kBAAM,iBAAiB;AAAK;AAAA,UAAO;AAC5D,kBAAQ,IAAI,iEAAiE;AAAA,QAC/E;AAAA,MACF,OAAO;AACL,cAAM,iBAAiB;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,OAAO,cAAc;AAChC;",
6
- "names": ["patch"]
4
+ "sourcesContent": ["/**\n * KiroGraph Installer \u2014 configuration prompting\n */\n\nimport * as readline from 'readline';\nimport { KiroGraphConfig } from '../../config';\ntype CavemanMode = 'lite' | 'full' | 'ultra';\nimport { ask, askToggle, arrowSelect, printSection, printSeparator, dim, reset, violet } from './prompts';\nimport { promptImportGlobalHookSelection } from '../../hooks/import-prompt';\n\nexport interface PromptConfigOptions {\n projectRoot?: string;\n offerHookImport?: boolean;\n}\nexport type ConfigPatch = Pick<KiroGraphConfig,\n 'enableEmbeddings' | 'useVecIndex' | 'semanticEngine' |\n 'turboquantMemDocs' | 'turboquantBits' | 'turbovecMemDocs' | 'turbovecBits' |\n 'typesenseDashboard' | 'qdrantDashboard' |\n 'extractDocstrings' | 'trackCallSites' | 'enableArchitecture' |\n 'cavemanMode' | 'shellCompressionLevel' |\n 'enableMemory' | 'enableWatchmen' | 'watchmenThreshold' | 'watchmenSynthesisMode' | 'watchmenLocalModel' |\n 'enableDocs' | 'docsContextLimit' |\n 'enableData' | 'dataContextLimit' |\n 'enableSecurity' | 'enablePatterns' |\n 'enableWiki' | 'wikiSynthesisMode' | 'wikiLocalModel' |\n 'enableCodeHealth' | 'enableNavigation' | 'enableComplexity' |\n 'enableGitContext' | 'enableEditPrimitives' | 'enableBranch' |\n 'enableAgentUtils' | 'enableGeneralCompression'\n> & { embeddingModel?: string; embeddingDim?: number };\nexport type SemanticEngine = KiroGraphConfig['semanticEngine'];\n\ntype InstallMode = 'core' | 'full' | 'custom' | 'profiles';\n\nconst PROFILES: Record<string, { label: string; description: string; patch: Partial<ConfigPatch> }> = {\n developer: {\n label: 'Developer',\n description: 'Code health, navigation, complexity, call-site tracking',\n patch: { enableCodeHealth: true, enableNavigation: true, enableComplexity: true, trackCallSites: true },\n },\n team: {\n label: 'Team',\n description: 'Developer + architecture, git context, wiki',\n patch: { enableCodeHealth: true, enableNavigation: true, enableComplexity: true, trackCallSites: true, enableArchitecture: true, enableGitContext: true, enableWiki: true, wikiSynthesisMode: 'agent' },\n },\n security: {\n label: 'Security',\n description: 'Security analysis, patterns, architecture, code health',\n patch: { enableSecurity: true, enableArchitecture: true, enablePatterns: true, enableCodeHealth: true },\n },\n data: {\n label: 'Data & Docs',\n description: 'Tabular data indexing and documentation navigation',\n patch: { enableData: true, enableDocs: true },\n },\n ai: {\n label: 'AI / LLM Agent',\n description: 'Memory, watchmen, agent utils, wiki, general compression',\n patch: { enableMemory: true, enableWatchmen: true, enableAgentUtils: true, enableWiki: true, wikiSynthesisMode: 'agent', enableGeneralCompression: true },\n },\n};\n\nexport const DEFAULT_EMBEDDING_MODEL = 'nomic-ai/nomic-embed-text-v1.5';\n\n/** Well-known embedding models with their output dimensions. */\nconst PRESET_MODELS = [\n {\n value: 'nomic-ai/nomic-embed-text-v1.5',\n label: 'nomic-embed-text-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~130MB \u00B7 Best quality for code search (recommended)',\n },\n {\n value: 'onnx-community/embeddinggemma-300m-ONNX',\n label: 'embeddinggemma-300m',\n dim: 768,\n description: '768-dim \u00B7 ~300MB \u00B7 Google Gemma-based, multilingual, 2048-token context',\n },\n {\n value: 'Xenova/all-MiniLM-L6-v2',\n label: 'all-MiniLM-L6-v2',\n dim: 384,\n description: '384-dim \u00B7 ~23MB \u00B7 Fast and lightweight, lower accuracy',\n },\n {\n value: 'BAAI/bge-base-en-v1.5',\n label: 'bge-base-en-v1.5',\n dim: 768,\n description: '768-dim \u00B7 ~110MB \u00B7 Strong general-purpose alternative to nomic',\n },\n {\n value: '__other__',\n label: 'Other',\n dim: 768,\n description: 'Enter a custom HuggingFace model ID and embedding dimension',\n },\n] as const;\n\ntype EmbeddingPatch = Pick<ConfigPatch,\n 'enableEmbeddings' | 'embeddingModel' | 'embeddingDim' | 'semanticEngine' | 'useVecIndex' |\n 'turboquantMemDocs' | 'turboquantBits' | 'turbovecMemDocs' | 'turbovecBits' |\n 'typesenseDashboard' | 'qdrantDashboard'\n>;\n\n/**\n * Semantic embeddings are a core feature, not a \"custom\"-only extra \u2014 asked\n * for every install mode (core, full, profiles, custom) so users always get\n * to pick whether embeddings run and, if so, which model/engine.\n */\nasync function promptEmbeddings(rl: readline.Interface): Promise<EmbeddingPatch> {\n printSection('\uD83D\uDD0D', 'Semantic Search');\n\n const enableEmbeddings = await askToggle(\n rl,\n 'Semantic embeddings (similarity search):',\n 'Enables natural-language code search via vector embeddings. A local model (~130MB) is downloaded on first use.',\n );\n\n const patch: EmbeddingPatch = {\n enableEmbeddings,\n semanticEngine: 'cosine',\n useVecIndex: false,\n turboquantMemDocs: false, turboquantBits: 3,\n turbovecMemDocs: false, turbovecBits: 4,\n typesenseDashboard: false, qdrantDashboard: false,\n };\n\n if (!enableEmbeddings) {\n return patch;\n }\n\n // \u2500\u2500 Model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const modelChoice = await arrowSelect<string>(\n rl,\n 'Embedding model:',\n PRESET_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })),\n );\n\n let embeddingModel: string;\n let embeddingDim: number;\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID in the format org/model-name.${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { embeddingModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name (e.g. nomic-ai/nomic-embed-text-v1.5).`);\n }\n console.log(`\\n ${dim}Enter the embedding output dimension for this model (check the model card on HuggingFace).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Embedding dimension (e.g. 768, 384):${reset} `)).trim();\n const n = parseInt(raw, 10);\n if (!isNaN(n) && n > 0) { embeddingDim = n; break; }\n console.log(` Expected a positive integer (e.g. 768, 384, 1536).`);\n }\n } else {\n const preset = PRESET_MODELS.find(m => m.value === modelChoice)!;\n embeddingModel = preset.value;\n embeddingDim = preset.dim;\n }\n\n patch.embeddingModel = embeddingModel;\n patch.embeddingDim = embeddingDim;\n\n // \u2500\u2500 Engine selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const semanticEngine = await arrowSelect<SemanticEngine>(rl, 'Vector search engine:', [\n { value: 'cosine', label: 'cosine', description: 'In-process cosine similarity. No extra deps. Best for small/medium projects.' },\n { value: 'turboquant', label: 'turboquant', description: 'ANN index, zero native deps. Compresses embeddings 20\u201330\u00D7 (Google TurboQuant). ANN without native binaries \u2014 ideal for CI, ARM, restricted envs. Optional: npm install turboquant-js.' },\n { value: 'turbovec', label: 'turbovec', description: 'ANN search via Rust/SIMD (napi-rs). Same TurboQuant algorithm but NEON on ARM and AVX-512BW on x86 \u2014 faster than turboquant-js at the cost of a one-time Rust build. Requires Rust toolchain. Build: cd native/turbovec-node && npm install && npm run build.' },\n { value: 'sqlite-vec', label: 'sqlite-vec', description: 'ANN index. Sub-linear search. Best for large codebases. Needs: better-sqlite3, sqlite-vec (native).' },\n { value: 'orama', label: 'orama', description: 'Hybrid search (full-text + vector). Pure JS. Needs: @orama/orama, @orama/plugin-data-persistence.' },\n { value: 'pglite', label: 'pglite', description: 'Hybrid search via PostgreSQL + pgvector. Exact results. Pure WASM. Needs: @electric-sql/pglite.' },\n { value: 'lancedb', label: 'lancedb', description: 'ANN search via LanceDB (Apache Lance columnar format). Pure JS. Needs: @lancedb/lancedb.' },\n { value: 'qdrant', label: 'qdrant', description: 'ANN search via Qdrant embedded binary (HNSW index, Cosine). Needs: qdrant-local.' },\n { value: 'typesense', label: 'typesense', description: 'ANN search via Typesense (auto-downloaded binary, HNSW, Cosine). Needs: typesense.' },\n ]);\n patch.semanticEngine = semanticEngine;\n patch.useVecIndex = semanticEngine === 'sqlite-vec';\n\n // TurboQuant for memory & docs: offer only when turboquant is the code-node engine\n if (semanticEngine === 'turboquant') {\n patch.turboquantMemDocs = await askToggle(rl,\n 'TurboQuant for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with a compressed ANN index \u2014 no native deps required. Most useful when you accumulate many observations or large doc sets (1 000+ entries).',\n false,\n );\n }\n\n // TurboVec bit width\n if (semanticEngine === 'turbovec') {\n patch.turbovecBits = await arrowSelect<number>(rl, 'TurboVec bits per coordinate:', [\n { value: 4, label: '4 bits (recommended)', description: 'Best quality, ~19\u00D7 compression vs raw Float32. Default.' },\n { value: 3, label: '3 bits', description: 'Balanced \u2014 ~25\u00D7 compression, slight quality drop.' },\n { value: 2, label: '2 bits', description: 'Highest compression (~38\u00D7), lowest accuracy.' },\n ]);\n patch.turbovecMemDocs = await askToggle(rl,\n 'TurboVec for memory & docs search (optional):',\n 'Replaces the default linear cosine scan in memory observations and doc sections with the TurboVec ANN index. Requires the addon to be built.',\n false,\n );\n }\n\n if (semanticEngine === 'typesense') {\n patch.typesenseDashboard = await askToggle(rl,\n 'Typesense dashboard:',\n 'Serves the Typesense Dashboard locally and opens it in your browser after indexing completes.',\n false,\n );\n }\n\n if (semanticEngine === 'qdrant') {\n patch.qdrantDashboard = await askToggle(rl,\n 'Qdrant dashboard:',\n 'Downloads the Qdrant Web UI (first time only) and opens it in your browser after indexing completes.',\n false,\n );\n }\n\n return patch;\n}\n\nexport async function promptConfigOptions(\n rl: readline.Interface,\n opts: PromptConfigOptions = {},\n): Promise<{ patch: ConfigPatch; hooksToImport: string[] | null }> {\n // \u2500\u2500 Install mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const installMode = await arrowSelect<InstallMode>(rl, 'Installation mode:', [\n { value: 'core', label: 'Core only', description: '3 always-on tools (search, context, node) \u2014 ~170 tok. Zero config.' },\n { value: 'full', label: 'Full', description: 'Enable every feature with sensible defaults. Best for a fresh project.' },\n { value: 'profiles', label: 'Profiles', description: 'Choose a preset bundle (Developer, Team, Security, Data & Docs, AI/LLM).' },\n { value: 'custom', label: 'Custom', description: 'Answer each question individually. Maximum control.' },\n ]);\n\n const basePatch: ConfigPatch = {\n enableEmbeddings: false, useVecIndex: false, semanticEngine: 'cosine',\n turboquantMemDocs: false, turboquantBits: 3, turbovecMemDocs: false, turbovecBits: 4,\n typesenseDashboard: false, qdrantDashboard: false,\n extractDocstrings: false, trackCallSites: false,\n enableArchitecture: false, cavemanMode: 'off', shellCompressionLevel: 'off',\n enableMemory: false, enableWatchmen: false, watchmenThreshold: 5,\n watchmenSynthesisMode: 'local', watchmenLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX',\n enableDocs: false, docsContextLimit: 0,\n enableData: false, dataContextLimit: 0,\n enableSecurity: false, enablePatterns: false,\n enableWiki: false, wikiSynthesisMode: 'agent', wikiLocalModel: 'onnx-community/gemma-4-E4B-it-ONNX',\n enableCodeHealth: false, enableNavigation: false, enableComplexity: false,\n enableGitContext: false, enableEditPrimitives: false, enableBranch: false,\n enableAgentUtils: false, enableGeneralCompression: false,\n };\n\n if (installMode === 'core') {\n const embeddingPatch = await promptEmbeddings(rl);\n return { patch: { ...basePatch, ...embeddingPatch }, hooksToImport: null };\n }\n\n if (installMode === 'full') {\n const embeddingPatch = await promptEmbeddings(rl);\n const fullPatch: ConfigPatch = {\n ...basePatch,\n ...embeddingPatch,\n extractDocstrings: true, trackCallSites: true,\n enableArchitecture: true, shellCompressionLevel: 'normal',\n enableCodeHealth: true, enableNavigation: true, enableComplexity: true,\n enableGitContext: true, enableEditPrimitives: true, enableBranch: true,\n enableAgentUtils: true, enableGeneralCompression: true,\n enableSecurity: true, enablePatterns: true,\n enableDocs: true, enableData: true,\n enableMemory: true, enableWatchmen: true,\n enableWiki: true, wikiSynthesisMode: 'agent',\n };\n return { patch: fullPatch, hooksToImport: null };\n }\n\n if (installMode === 'profiles') {\n const profileKey = await arrowSelect<string>(rl, 'Select a profile:', Object.entries(PROFILES).map(([key, p]) => ({\n value: key,\n label: p.label,\n description: p.description,\n })));\n const profile = PROFILES[profileKey];\n const embeddingPatch = await promptEmbeddings(rl);\n const patch: ConfigPatch = { ...basePatch, ...profile.patch, ...embeddingPatch };\n return { patch, hooksToImport: null };\n }\n\n // \u2500\u2500 Custom: ask all questions individually \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const embeddingPatch = await promptEmbeddings(rl);\n const patch: ConfigPatch = { ...basePatch, ...embeddingPatch };\n\n // \u2500\u2500 Graph Features \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Features');\n\n patch.extractDocstrings = await askToggle(rl,\n 'Docstring extraction:',\n 'Enriches symbol metadata and improves context quality. Slightly increases indexing time.',\n false,\n );\n\n patch.trackCallSites = await askToggle(rl,\n 'Call site tracking (caller/callee graph):',\n 'Enables kirograph_callers and kirograph_callees MCP tools. Increases index size.',\n false,\n );\n\n patch.enableArchitecture = await askToggle(rl,\n 'Architecture analysis (packages + layers):',\n 'Detects packages from manifests and architectural layers. Enables kirograph_architecture, kirograph_coupling, kirograph_package.',\n false,\n );\n\n // \u2500\u2500 Graph Tools \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Graph Tools');\n\n patch.enableNavigation = await askToggle(rl,\n 'Navigation tools (status, files, impact):',\n 'Enables kirograph_status, kirograph_files, kirograph_impact.',\n false,\n );\n\n patch.enableCodeHealth = await askToggle(rl,\n 'Code health tools (hotspots, dead code, path analysis, type hierarchy):',\n 'Enables kirograph_hotspots, kirograph_surprising, kirograph_diff, kirograph_dead_code, kirograph_circular_deps, kirograph_path, kirograph_affected, kirograph_type_hierarchy.',\n false,\n );\n\n patch.enableComplexity = await askToggle(rl,\n 'Complexity metrics tools:',\n 'Enables complexity analysis, simplify scan, health score, DSM, test risk.',\n false,\n );\n\n patch.enableGitContext = await askToggle(rl,\n 'Git context tools (diff context, commit context, flows):',\n 'Enables kirograph_flows, kirograph_diff_context, kirograph_commit_context, kirograph_pr_context, kirograph_changelog, kirograph_test_map, kirograph_test_coverage.',\n false,\n );\n\n patch.enableEditPrimitives = await askToggle(rl,\n 'Edit primitive tools (str_replace, insert_at, refactor):',\n 'Enables kirograph_refactor, kirograph_str_replace, kirograph_multi_str_replace, kirograph_insert_at, kirograph_ast_grep_rewrite.',\n false,\n );\n\n patch.enableAgentUtils = await askToggle(rl,\n 'Agent utilities (file caching, budget tracking):',\n 'Enables kirograph_read, kirograph_gain, kirograph_budget.',\n false,\n );\n\n // \u2500\u2500 Security \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD12', 'Security');\n\n patch.enableSecurity = await askToggle(rl,\n 'Security analysis (vulnerability scanning + reachability):',\n 'Scans dependency manifests for known vulnerabilities and performs reachability analysis. Requires Architecture analysis (will be auto-enabled). Enables kirograph_security, kirograph_vulns, kirograph_sbom, kirograph_vex, kirograph_reachability MCP tools.',\n false,\n );\n\n if (patch.enableSecurity && !patch.enableArchitecture) {\n patch.enableArchitecture = true;\n console.log(' \u2139 Architecture analysis auto-enabled (required by Security module)');\n }\n\n // \u2500\u2500 Pattern Matching \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDD0D', 'Pattern Matching');\n\n patch.enablePatterns = await askToggle(rl,\n 'Precise SAST with ast-grep?',\n 'Runs AST structural pattern matching during indexing using @ast-grep/napi (~15MB native binding). Unlike heuristic symbol-name analysis, matches real code structure \u2014 precise SQL injection, path traversal, eval detection. Requires @ast-grep/napi (will be installed automatically if you answer yes).',\n false,\n );\n\n // \u2500\u2500 Documentation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Documentation');\n\n (patch as any).enableDocs = await askToggle(rl,\n 'Documentation indexing (section-level retrieval):',\n 'Indexes docs by heading structure. Enables kirograph_docs_toc, kirograph_docs_search, kirograph_docs_section, kirograph_docs_outline, kirograph_docs_refs.',\n false,\n );\n\n if ((patch as any).enableDocs) {\n const contextChoice = await arrowSelect<number>(rl, 'Include doc sections in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Docs stay separate \u2014 use kirograph_docs_* tools explicitly (recommended)' },\n { value: 3, label: '3 sections', description: 'Include up to 3 relevant doc sections in context results' },\n { value: 5, label: '5 sections', description: 'Include up to 5 relevant doc sections in context results' },\n { value: 10, label: '10 sections', description: 'Include up to 10 relevant doc sections in context results' },\n ]);\n (patch as any).docsContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Data \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCCA', 'Data');\n\n (patch as any).enableData = await askToggle(rl,\n 'Tabular data indexing (CSV/TSV/JSONL/JSON/Excel/Parquet):',\n 'Indexes data files for structured querying. Enables kirograph_data_list, kirograph_data_describe, kirograph_data_query, kirograph_data_aggregate, kirograph_data_search.',\n false,\n );\n\n if ((patch as any).enableData) {\n (patch as any).dataInstallExcel = await askToggle(rl,\n 'Install Excel support (xlsx package)?',\n 'Required for .xlsx/.xls files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallParquet = await askToggle(rl,\n 'Install Parquet support (parquetjs-lite package)?',\n 'Required for .parquet files. CSV/TSV/JSONL/JSON are always supported without extra deps.',\n false,\n );\n\n (patch as any).dataInstallPdf = await askToggle(rl,\n 'Install PDF support (@firecrawl/pdf-inspector package)?',\n 'Required for .pdf files. Rust/NAPI binary \u2014 prebuilts for linux-x64 and macOS ARM64.',\n false,\n );\n\n const contextChoice = await arrowSelect<number>(rl, 'Include dataset schemas in kirograph_context results?', [\n { value: 0, label: '0 (disabled)', description: 'Data stays separate \u2014 use kirograph_data_* tools explicitly (recommended)' },\n { value: 2, label: '2 datasets', description: 'Include up to 2 relevant dataset schemas in context results' },\n { value: 5, label: '5 datasets', description: 'Include up to 5 relevant dataset schemas in context results' },\n ]);\n (patch as any).dataContextLimit = contextChoice;\n }\n\n // \u2500\u2500 Agent Behavior \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDD16', 'Agent Behavior');\n\n const cavemanChoice = await arrowSelect(rl, 'Communication style (caveman mode):', [\n { value: 'off', label: 'off', description: 'Normal responses \u2014 no compression' },\n { value: 'lite', label: 'lite', description: 'Compact, no filler, full sentences' },\n { value: 'full', label: 'full', description: 'Fragments, no articles, short synonyms' },\n { value: 'ultra', label: 'ultra', description: 'Max compression, abbreviations, \u2192 for causality' },\n ]);\n patch.cavemanMode = cavemanChoice as CavemanMode | 'off';\n\n const compressionChoice = await arrowSelect(rl, 'Shell compression (kirograph_exec):', [\n { value: 'off', label: 'off', description: 'Disables kirograph_exec entirely' },\n { value: 'normal', label: 'normal', description: 'Balanced: removes noise, keeps structure (recommended)' },\n { value: 'aggressive', label: 'aggressive', description: 'More compact: groups by category, limits output' },\n { value: 'ultra', label: 'ultra', description: 'Maximum compression: counts and summaries only' },\n ]);\n patch.shellCompressionLevel = compressionChoice as KiroGraphConfig['shellCompressionLevel'];\n if (compressionChoice === 'off') {\n console.log(' \u2139 kirograph_exec disabled (shell compression is off)');\n }\n\n patch.enableGeneralCompression = await askToggle(rl,\n 'General-purpose compression tool (kirograph_compress):',\n 'Enables kirograph_compress \u2014 an on-demand MCP tool that compresses arbitrary text before it reaches the model. ' +\n 'Two engines: rtk-style structural filters for shell output (git, npm, test logs) when a command hint is provided, ' +\n 'or caveman grammar rules for prose and observations otherwise. ' +\n 'Useful when the agent pastes large content, receives a fat RAG chunk, or wants to explicitly compress before storing. ' +\n 'Independent from automatic shell compression (kirograph_exec) and caveman mode \u2014 those apply in the background; ' +\n 'this gives the model an explicit, on-demand compression action.',\n false,\n );\n\n let hooksToImport: string[] | null = null;\n if (opts.offerHookImport && opts.projectRoot) {\n printSection('\uD83E\uDE9D', 'Hooks');\n hooksToImport = await promptImportGlobalHookSelection();\n }\n\n // \u2500\u2500 Memory \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83E\uDDE0', 'Memory');\n\n patch.enableMemory = await askToggle(rl,\n 'Persistent memory (cross-session observations):',\n 'Stores decisions, errors, and patterns across sessions. Compressed (if caveman is on), linked to code symbols, searchable via kirograph_mem_* tools. Zero LLM tokens on write.',\n false,\n );\n\n if (patch.enableMemory) {\n patch.enableWatchmen = await askToggle(rl,\n 'Watchmen (auto-synthesize workspace briefs from memory):',\n 'When enough observations accumulate (default: 5), synthesizes them into .kiro/steering/kirograph-watchmen.md, CLAUDE.md, AGENTS.md, or the equivalent for your tool.',\n false,\n );\n\n if (patch.enableWatchmen) {\n // \u2500\u2500 Synthesis mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const synthesisMode = await arrowSelect<KiroGraphConfig['watchmenSynthesisMode']>(\n rl,\n 'Watchmen synthesis mode:',\n [\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model via @huggingface/transformers. Zero API cost, no data leaves your machine. Model downloaded once to ~/.kirograph/models/. Works for all tools via runCommand hook.',\n },\n {\n value: 'agent',\n label: 'Active agent',\n description: '\u26A0 Kiro only. Uses the active Kiro agent to synthesize. Consumes API tokens/credits on every synthesis. Not supported for other tools.',\n },\n ],\n );\n patch.watchmenSynthesisMode = synthesisMode;\n\n if (synthesisMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const modelChoice = await arrowSelect<string>(rl, 'Local synthesis model:', LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (modelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.watchmenLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.watchmenLocalModel = modelChoice;\n }\n }\n }\n }\n\n // \u2500\u2500 Wiki \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n printSection('\uD83D\uDCD6', 'Wiki');\n\n patch.enableWiki = await askToggle(rl,\n 'LLM Wiki (Karpathy-style structured knowledge base):',\n 'Maintains a set of markdown pages that compound knowledge across sessions. Supports search, ingest (two-tool flow), conflict resolution, and health checks via kirograph_wiki_* tools.',\n false,\n );\n\n if (patch.enableWiki) {\n const wikiMode = await arrowSelect<KiroGraphConfig['wikiSynthesisMode']>(\n rl,\n 'Wiki synthesis mode:',\n [\n {\n value: 'agent',\n label: 'Active agent (recommended)',\n description: 'Uses the active LLM agent to generate WIKI_DIFF blocks. Works with any AI tool. Consumes API tokens on ingest.',\n },\n {\n value: 'local',\n label: 'Local model',\n description: 'Runs a local HuggingFace model to generate diffs. Zero API cost, no data leaves your machine. Same infra as Watchmen.',\n },\n ],\n );\n patch.wikiSynthesisMode = wikiMode;\n\n if (wikiMode === 'local') {\n // \u2500\u2500 Local model selection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const WIKI_LOCAL_MODELS = [\n {\n value: 'onnx-community/gemma-4-E4B-it-ONNX',\n label: 'Gemma 4 E4B (recommended)',\n description: '~3\u20134 GB \u00B7 Google DeepMind Gemma 4 \u00B7 4.5B params \u00B7 128K context \u00B7 Best quality \u00B7 Apache 2.0',\n },\n {\n value: 'onnx-community/Qwen2.5-1.5B-Instruct',\n label: 'Qwen2.5-1.5B',\n description: '~1.5 GB \u00B7 Lighter option if RAM is limited \u00B7 Acceptable quality',\n },\n {\n value: 'HuggingFaceTB/SmolLM2-1.7B-Instruct',\n label: 'SmolLM2-1.7B',\n description: '~1.7 GB \u00B7 HuggingFace compact model \u00B7 Good at following structured formats',\n },\n {\n value: '__other__',\n label: 'Other',\n description: 'Enter a custom HuggingFace model ID (must have ONNX weights on onnx-community)',\n },\n ] as const;\n\n const wikiModelChoice = await arrowSelect<string>(rl, 'Local wiki synthesis model:', WIKI_LOCAL_MODELS.map(m => ({ value: m.value, label: m.label, description: m.description })));\n\n if (wikiModelChoice === '__other__') {\n console.log(`\\n ${dim}Enter a HuggingFace model ID (e.g. onnx-community/gemma-4-E4B-it-ONNX).${reset}`);\n while (true) {\n const raw = (await ask(rl, ` ${violet}Model identifier:${reset} `)).trim();\n if (raw.includes('/')) { patch.wikiLocalModel = raw; break; }\n console.log(` Expected a HuggingFace model ID in the format org/model-name.`);\n }\n } else {\n patch.wikiLocalModel = wikiModelChoice;\n }\n }\n }\n\n return { patch, hooksToImport };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA8F;AAC9F,2BAAgD;AAyBhD,MAAM,WAAgG;AAAA,EACpG,WAAW;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,kBAAkB,MAAM,kBAAkB,MAAM,kBAAkB,MAAM,gBAAgB,KAAK;AAAA,EACxG;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,kBAAkB,MAAM,kBAAkB,MAAM,kBAAkB,MAAM,gBAAgB,MAAM,oBAAoB,MAAM,kBAAkB,MAAM,YAAY,MAAM,mBAAmB,QAAQ;AAAA,EACxM;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,gBAAgB,MAAM,oBAAoB,MAAM,gBAAgB,MAAM,kBAAkB,KAAK;AAAA,EACxG;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO,EAAE,YAAY,MAAM,Y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,MACF;AAEA,YAAM,kBAAkB,UAAM,4BAAoB,IAAI,+BAA+B,kBAAkB,IAAI,QAAM,EAAE,OAAO,EAAE,OAAO,OAAO,EAAE,OAAO,aAAa,EAAE,YAAY,EAAE,CAAC;AAEjL,UAAI,oBAAoB,aAAa;AACnC,gBAAQ,IAAI;AAAA,IAAO,kBAAG,0EAA0E,oBAAK,EAAE;AACvG,eAAO,MAAM;AACX,gBAAM,OAAO,UAAM,oBAAI,IAAI,KAAK,qBAAM,oBAAoB,oBAAK,GAAG,GAAG,KAAK;AAC1E,cAAI,IAAI,SAAS,GAAG,GAAG;AAAE,kBAAM,iBAAiB;AAAK;AAAA,UAAO;AAC5D,kBAAQ,IAAI,iEAAiE;AAAA,QAC/E;AAAA,MACF,OAAO;AACL,cAAM,iBAAiB;AAAA,MACzB;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,OAAO,cAAc;AAChC;",
6
+ "names": ["embeddingPatch", "patch"]
7
7
  }
@@ -286,6 +286,16 @@ const DETECTORS = [
286
286
  if (dirExists(path.join(root, ".qoder"))) return { target: "qoder", label: "Qoder", reason: ".qoder/ found in project" };
287
287
  return false;
288
288
  }
289
+ },
290
+ {
291
+ target: "commandcode",
292
+ label: "Command Code",
293
+ reason: "",
294
+ detect: () => {
295
+ if (dirExists(path.join(home, ".commandcode"))) return { target: "commandcode", label: "Command Code", reason: "~/.commandcode/ found" };
296
+ if (whichExists("command-code")) return { target: "commandcode", label: "Command Code", reason: "command-code binary found in PATH" };
297
+ return false;
298
+ }
289
299
  }
290
300
  ];
291
301
  function detectPlatforms(projectRoot) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/bin/installer/detect.ts"],
4
- "sourcesContent": ["/**\n * Platform auto-detection for KiroGraph installer.\n *\n * Detects which AI coding tools are installed on the system by checking\n * for known config directories and CLI binaries. Used by `kirograph install`\n * (with no --target flag) to auto-configure all detected platforms.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { execSync } from 'child_process';\nimport type { InstallTarget } from './common';\n\nexport interface PlatformDetector {\n target: InstallTarget;\n label: string;\n /** How the platform was detected (shown to user) */\n reason: string;\n detect: (projectRoot: string) => DetectionResult | false;\n}\n\nexport interface DetectionResult {\n target: InstallTarget;\n label: string;\n reason: string;\n}\n\nfunction whichExists(binary: string): boolean {\n try {\n execSync(`which ${binary}`, { stdio: 'ignore' });\n return true;\n } catch {\n return false;\n }\n}\n\nfunction dirExists(p: string): boolean {\n return fs.existsSync(p) && fs.statSync(p).isDirectory();\n}\n\nfunction fileExists(p: string): boolean {\n return fs.existsSync(p) && fs.statSync(p).isFile();\n}\n\nconst home = process.env.HOME || process.env.USERPROFILE || '';\n\nconst DETECTORS: PlatformDetector[] = [\n {\n target: 'kiro',\n label: 'Kiro',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.kiro'))) return { target: 'kiro', label: 'Kiro', reason: '.kiro/ found in project' };\n if (dirExists(path.join(home, '.kiro'))) return { target: 'kiro', label: 'Kiro', reason: '~/.kiro/ found' };\n return false;\n },\n },\n {\n target: 'claude',\n label: 'Claude Code',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, '.mcp.json'))) return { target: 'claude', label: 'Claude Code', reason: '.mcp.json found in project' };\n if (whichExists('claude')) return { target: 'claude', label: 'Claude Code', reason: 'claude binary on PATH' };\n return false;\n },\n },\n {\n target: 'cursor',\n label: 'Cursor',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.cursor'))) return { target: 'cursor', label: 'Cursor', reason: '.cursor/ found in project' };\n if (dirExists(path.join(home, '.cursor'))) return { target: 'cursor', label: 'Cursor', reason: '~/.cursor/ found' };\n return false;\n },\n },\n {\n target: 'windsurf',\n label: 'Windsurf',\n reason: '',\n detect: () => {\n if (dirExists(path.join(home, '.codeium', 'windsurf'))) return { target: 'windsurf', label: 'Windsurf', reason: '~/.codeium/windsurf/ found' };\n return false;\n },\n },\n {\n target: 'codex',\n label: 'Codex',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.codex'))) return { target: 'codex', label: 'Codex', reason: '.codex/ found in project' };\n if (dirExists(path.join(home, '.codex'))) return { target: 'codex', label: 'Codex', reason: '~/.codex/ found' };\n if (whichExists('codex')) return { target: 'codex', label: 'Codex', reason: 'codex binary on PATH' };\n return false;\n },\n },\n {\n target: 'copilot',\n label: 'GitHub Copilot',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.vscode'))) return { target: 'copilot', label: 'GitHub Copilot', reason: '.vscode/ found in project' };\n if (dirExists(path.join(home, '.vscode'))) return { target: 'copilot', label: 'GitHub Copilot', reason: '~/.vscode/ found' };\n return false;\n },\n },\n {\n target: 'gemini-cli',\n label: 'Gemini CLI',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.gemini'))) return { target: 'gemini-cli', label: 'Gemini CLI', reason: '.gemini/ found in project' };\n if (whichExists('gemini')) return { target: 'gemini-cli', label: 'Gemini CLI', reason: 'gemini binary on PATH' };\n if (dirExists(path.join(home, '.gemini'))) return { target: 'gemini-cli', label: 'Gemini CLI', reason: '~/.gemini/ found' };\n return false;\n },\n },\n {\n target: 'cline',\n label: 'Cline',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.cline'))) return { target: 'cline', label: 'Cline', reason: '.cline/ found in project' };\n if (dirExists(path.join(root, '.clinerules'))) return { target: 'cline', label: 'Cline', reason: '.clinerules/ found in project' };\n return false;\n },\n },\n {\n target: 'roo',\n label: 'Roo Code',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.roo'))) return { target: 'roo', label: 'Roo Code', reason: '.roo/ found in project' };\n return false;\n },\n },\n {\n target: 'warp',\n label: 'Warp',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.warp'))) return { target: 'warp', label: 'Warp', reason: '.warp/ found in project' };\n if (whichExists('warp')) return { target: 'warp', label: 'Warp', reason: 'warp binary on PATH' };\n return false;\n },\n },\n {\n target: 'continue',\n label: 'Continue',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.continue'))) return { target: 'continue', label: 'Continue', reason: '.continue/ found in project' };\n if (dirExists(path.join(home, '.continue'))) return { target: 'continue', label: 'Continue', reason: '~/.continue/ found' };\n return false;\n },\n },\n {\n target: 'opencode',\n label: 'OpenCode',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, '.opencode.json'))) return { target: 'opencode', label: 'OpenCode', reason: '.opencode.json found in project' };\n return false;\n },\n },\n {\n target: 'antigravity',\n label: 'Antigravity',\n reason: '',\n detect: () => {\n if (dirExists(path.join(home, '.gemini', 'antigravity'))) return { target: 'antigravity', label: 'Antigravity', reason: '~/.gemini/antigravity/ found' };\n return false;\n },\n },\n {\n target: 'trae',\n label: 'Trae',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.trae'))) return { target: 'trae', label: 'Trae', reason: '.trae/ found in project' };\n return false;\n },\n },\n {\n target: 'amp',\n label: 'Sourcegraph Amp',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.amp'))) return { target: 'amp', label: 'Sourcegraph Amp', reason: '.amp/ found in project' };\n return false;\n },\n },\n {\n target: 'aider',\n label: 'Aider',\n reason: '',\n detect: () => {\n if (whichExists('aider')) return { target: 'aider', label: 'Aider', reason: 'aider binary on PATH' };\n return false;\n },\n },\n {\n target: 'goose',\n label: 'Block Goose',\n reason: '',\n detect: () => {\n if (whichExists('goose')) return { target: 'goose', label: 'Block Goose', reason: 'goose binary on PATH' };\n return false;\n },\n },\n {\n target: 'junie',\n label: 'JetBrains Junie',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.junie'))) return { target: 'junie', label: 'JetBrains Junie', reason: '.junie/ found in project' };\n return false;\n },\n },\n {\n target: 'augment',\n label: 'Augment Code',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.augment'))) return { target: 'augment', label: 'Augment Code', reason: '.augment/ found in project' };\n return false;\n },\n },\n {\n target: 'kilo',\n label: 'Kilo Code',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, 'kilo.json'))) return { target: 'kilo', label: 'Kilo Code', reason: 'kilo.json found in project' };\n return false;\n },\n },\n {\n target: 'devin',\n label: 'Devin',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.devin'))) return { target: 'devin', label: 'Devin', reason: '.devin/ found in project' };\n return false;\n },\n },\n {\n target: 'openhands',\n label: 'OpenHands',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.openhands'))) return { target: 'openhands', label: 'OpenHands', reason: '.openhands/ found in project' };\n return false;\n },\n },\n {\n target: 'tabnine',\n label: 'Tabnine',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.tabnine'))) return { target: 'tabnine', label: 'Tabnine', reason: '.tabnine/ found in project' };\n return false;\n },\n },\n {\n target: 'replit',\n label: 'Replit Agent',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, '.replit'))) return { target: 'replit', label: 'Replit Agent', reason: '.replit found in project' };\n return false;\n },\n },\n {\n target: 'qoder',\n label: 'Qoder',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.qoder'))) return { target: 'qoder', label: 'Qoder', reason: '.qoder/ found in project' };\n return false;\n },\n },\n];\n\n/**\n * Detect all AI coding platforms installed on this system / in this project.\n * Returns detection results for all platforms that were found.\n */\nexport function detectPlatforms(projectRoot: string): DetectionResult[] {\n const results: DetectionResult[] = [];\n for (const detector of DETECTORS) {\n const result = detector.detect(projectRoot);\n if (result) {\n results.push(result);\n }\n }\n return results;\n}\n\n/**\n * Get just the target names of detected platforms.\n */\nexport function detectTargets(projectRoot: string): InstallTarget[] {\n return detectPlatforms(projectRoot).map(r => r.target);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AACtB,2BAAyB;AAiBzB,SAAS,YAAY,QAAy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A6B,CAAC;AACpC,aAAW,YAAY,WAAW;AAChC,UAAM,SAAS,SAAS,OAAO,WAAW;AAC1C,QAAI,QAAQ;AACV,cAAQ,KAAK,MAAM;AAAA,IACrB;AAAA,EACF;AACA,SAAO;AACT;AAKO,SAAS,cAAc,aAAsC;AAClE,SAAO,gBAAgB,WAAW,EAAE,IAAI,OAAK,EAAE,MAAM;AACvD;",
4
+ "sourcesContent": ["/**\n * Platform auto-detection for KiroGraph installer.\n *\n * Detects which AI coding tools are installed on the system by checking\n * for known config directories and CLI binaries. Used by `kirograph install`\n * (with no --target flag) to auto-configure all detected platforms.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { execSync } from 'child_process';\nimport type { InstallTarget } from './common';\n\nexport interface PlatformDetector {\n target: InstallTarget;\n label: string;\n /** How the platform was detected (shown to user) */\n reason: string;\n detect: (projectRoot: string) => DetectionResult | false;\n}\n\nexport interface DetectionResult {\n target: InstallTarget;\n label: string;\n reason: string;\n}\n\nfunction whichExists(binary: string): boolean {\n try {\n execSync(`which ${binary}`, { stdio: 'ignore' });\n return true;\n } catch {\n return false;\n }\n}\n\nfunction dirExists(p: string): boolean {\n return fs.existsSync(p) && fs.statSync(p).isDirectory();\n}\n\nfunction fileExists(p: string): boolean {\n return fs.existsSync(p) && fs.statSync(p).isFile();\n}\n\nconst home = process.env.HOME || process.env.USERPROFILE || '';\n\nconst DETECTORS: PlatformDetector[] = [\n {\n target: 'kiro',\n label: 'Kiro',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.kiro'))) return { target: 'kiro', label: 'Kiro', reason: '.kiro/ found in project' };\n if (dirExists(path.join(home, '.kiro'))) return { target: 'kiro', label: 'Kiro', reason: '~/.kiro/ found' };\n return false;\n },\n },\n {\n target: 'claude',\n label: 'Claude Code',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, '.mcp.json'))) return { target: 'claude', label: 'Claude Code', reason: '.mcp.json found in project' };\n if (whichExists('claude')) return { target: 'claude', label: 'Claude Code', reason: 'claude binary on PATH' };\n return false;\n },\n },\n {\n target: 'cursor',\n label: 'Cursor',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.cursor'))) return { target: 'cursor', label: 'Cursor', reason: '.cursor/ found in project' };\n if (dirExists(path.join(home, '.cursor'))) return { target: 'cursor', label: 'Cursor', reason: '~/.cursor/ found' };\n return false;\n },\n },\n {\n target: 'windsurf',\n label: 'Windsurf',\n reason: '',\n detect: () => {\n if (dirExists(path.join(home, '.codeium', 'windsurf'))) return { target: 'windsurf', label: 'Windsurf', reason: '~/.codeium/windsurf/ found' };\n return false;\n },\n },\n {\n target: 'codex',\n label: 'Codex',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.codex'))) return { target: 'codex', label: 'Codex', reason: '.codex/ found in project' };\n if (dirExists(path.join(home, '.codex'))) return { target: 'codex', label: 'Codex', reason: '~/.codex/ found' };\n if (whichExists('codex')) return { target: 'codex', label: 'Codex', reason: 'codex binary on PATH' };\n return false;\n },\n },\n {\n target: 'copilot',\n label: 'GitHub Copilot',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.vscode'))) return { target: 'copilot', label: 'GitHub Copilot', reason: '.vscode/ found in project' };\n if (dirExists(path.join(home, '.vscode'))) return { target: 'copilot', label: 'GitHub Copilot', reason: '~/.vscode/ found' };\n return false;\n },\n },\n {\n target: 'gemini-cli',\n label: 'Gemini CLI',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.gemini'))) return { target: 'gemini-cli', label: 'Gemini CLI', reason: '.gemini/ found in project' };\n if (whichExists('gemini')) return { target: 'gemini-cli', label: 'Gemini CLI', reason: 'gemini binary on PATH' };\n if (dirExists(path.join(home, '.gemini'))) return { target: 'gemini-cli', label: 'Gemini CLI', reason: '~/.gemini/ found' };\n return false;\n },\n },\n {\n target: 'cline',\n label: 'Cline',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.cline'))) return { target: 'cline', label: 'Cline', reason: '.cline/ found in project' };\n if (dirExists(path.join(root, '.clinerules'))) return { target: 'cline', label: 'Cline', reason: '.clinerules/ found in project' };\n return false;\n },\n },\n {\n target: 'roo',\n label: 'Roo Code',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.roo'))) return { target: 'roo', label: 'Roo Code', reason: '.roo/ found in project' };\n return false;\n },\n },\n {\n target: 'warp',\n label: 'Warp',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.warp'))) return { target: 'warp', label: 'Warp', reason: '.warp/ found in project' };\n if (whichExists('warp')) return { target: 'warp', label: 'Warp', reason: 'warp binary on PATH' };\n return false;\n },\n },\n {\n target: 'continue',\n label: 'Continue',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.continue'))) return { target: 'continue', label: 'Continue', reason: '.continue/ found in project' };\n if (dirExists(path.join(home, '.continue'))) return { target: 'continue', label: 'Continue', reason: '~/.continue/ found' };\n return false;\n },\n },\n {\n target: 'opencode',\n label: 'OpenCode',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, '.opencode.json'))) return { target: 'opencode', label: 'OpenCode', reason: '.opencode.json found in project' };\n return false;\n },\n },\n {\n target: 'antigravity',\n label: 'Antigravity',\n reason: '',\n detect: () => {\n if (dirExists(path.join(home, '.gemini', 'antigravity'))) return { target: 'antigravity', label: 'Antigravity', reason: '~/.gemini/antigravity/ found' };\n return false;\n },\n },\n {\n target: 'trae',\n label: 'Trae',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.trae'))) return { target: 'trae', label: 'Trae', reason: '.trae/ found in project' };\n return false;\n },\n },\n {\n target: 'amp',\n label: 'Sourcegraph Amp',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.amp'))) return { target: 'amp', label: 'Sourcegraph Amp', reason: '.amp/ found in project' };\n return false;\n },\n },\n {\n target: 'aider',\n label: 'Aider',\n reason: '',\n detect: () => {\n if (whichExists('aider')) return { target: 'aider', label: 'Aider', reason: 'aider binary on PATH' };\n return false;\n },\n },\n {\n target: 'goose',\n label: 'Block Goose',\n reason: '',\n detect: () => {\n if (whichExists('goose')) return { target: 'goose', label: 'Block Goose', reason: 'goose binary on PATH' };\n return false;\n },\n },\n {\n target: 'junie',\n label: 'JetBrains Junie',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.junie'))) return { target: 'junie', label: 'JetBrains Junie', reason: '.junie/ found in project' };\n return false;\n },\n },\n {\n target: 'augment',\n label: 'Augment Code',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.augment'))) return { target: 'augment', label: 'Augment Code', reason: '.augment/ found in project' };\n return false;\n },\n },\n {\n target: 'kilo',\n label: 'Kilo Code',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, 'kilo.json'))) return { target: 'kilo', label: 'Kilo Code', reason: 'kilo.json found in project' };\n return false;\n },\n },\n {\n target: 'devin',\n label: 'Devin',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.devin'))) return { target: 'devin', label: 'Devin', reason: '.devin/ found in project' };\n return false;\n },\n },\n {\n target: 'openhands',\n label: 'OpenHands',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.openhands'))) return { target: 'openhands', label: 'OpenHands', reason: '.openhands/ found in project' };\n return false;\n },\n },\n {\n target: 'tabnine',\n label: 'Tabnine',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.tabnine'))) return { target: 'tabnine', label: 'Tabnine', reason: '.tabnine/ found in project' };\n return false;\n },\n },\n {\n target: 'replit',\n label: 'Replit Agent',\n reason: '',\n detect: (root) => {\n if (fileExists(path.join(root, '.replit'))) return { target: 'replit', label: 'Replit Agent', reason: '.replit found in project' };\n return false;\n },\n },\n {\n target: 'qoder',\n label: 'Qoder',\n reason: '',\n detect: (root) => {\n if (dirExists(path.join(root, '.qoder'))) return { target: 'qoder', label: 'Qoder', reason: '.qoder/ found in project' };\n return false;\n },\n },\n {\n target: 'commandcode',\n label: 'Command Code',\n reason: '',\n detect: () => {\n // Command Code stores user/global state in ~/.commandcode/ and ships the\n // `command-code` binary (run as `cmd`). Avoid keying off .mcp.json \u2014 it's\n // shared with other agents (e.g. Claude) and would misfire.\n if (dirExists(path.join(home, '.commandcode'))) return { target: 'commandcode', label: 'Command Code', reason: '~/.commandcode/ found' };\n if (whichExists('command-code')) return { target: 'commandcode', label: 'Command Code', reason: 'command-code binary found in PATH' };\n return false;\n },\n },\n];\n\n/**\n * Detect all AI coding platforms installed on this system / in this project.\n * Returns detection results for all platforms that were found.\n */\nexport function detectPlatforms(projectRoot: string): DetectionResult[] {\n const results: DetectionResult[] = [];\n for (const detector of DETECTORS) {\n const result = detector.detect(projectRoot);\n if (result) {\n results.push(result);\n }\n }\n return results;\n}\n\n/**\n * Get just the target names of detected platforms.\n */\nexport function detectTargets(projectRoot: string): InstallTarget[] {\n return detectPlatforms(projectRoot).map(r => r.target);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AACtB,2BAAyB;AAiBzB,SAAS,YAAY,QAAyB;AAC5C,MAAI;AACF,uCAAS,SAAS,MAAM,IAAI,EAAE,OAAO,SAAS,CAAC;AAC/C,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,UAAU,GAAoB;AACrC,SAAO,GAAG,WAAW,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,YAAY;AACxD;AAEA,SAAS,WAAW,GAAoB;AACtC,SAAO,GAAG,WAAW,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,OAAO;AACnD;AAEA,MAAM,OAAO,QAAQ,IAAI,QAAQ,QAAQ,IAAI,eAAe;AAE5D,MAAM,YAAgC;AAAA,EACpC;AAAA,IACE,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ,CAAC,SAAS;AAChB,UAAI,UAAU,KAAK,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AW,EAAE,IAAI,OAAK,EAAE,MAAM;AACvD;",
6
6
  "names": []
7
7
  }
@@ -33,8 +33,13 @@ __export(hooks_exports, {
33
33
  module.exports = __toCommonJS(hooks_exports);
34
34
  var fs = __toESM(require("fs"));
35
35
  var path = __toESM(require("path"));
36
+ var import_common = require("./common");
36
37
  const V2_EXT = ".json";
37
38
  const V1_EXT = ".kiro.hook";
39
+ const SYNC_CMD = (0, import_common.silentCommand)("kirograph sync --quiet");
40
+ const WATCHMEN_SYNTH_CMD = (0, import_common.silentCommand)("kirograph mem watchmen synthesize --quiet");
41
+ const WIKI_SYNTH_CMD = (0, import_common.silentCommand)("kirograph wiki synthesize --quiet");
42
+ const WIKI_LINT_CMD = (0, import_common.silentCommand)("kirograph wiki lint");
38
43
  function buildWatchmenHook(synthesisMode) {
39
44
  if (synthesisMode === "local") {
40
45
  return {
@@ -45,7 +50,7 @@ function buildWatchmenHook(synthesisMode) {
45
50
  hooks: [{
46
51
  name: "KiroGraph Watchmen",
47
52
  trigger: "Stop",
48
- action: { type: "command", command: "kirograph mem watchmen synthesize --quiet 2>&1 || true" }
53
+ action: { type: "command", command: WATCHMEN_SYNTH_CMD }
49
54
  }]
50
55
  },
51
56
  v1: {
@@ -53,7 +58,7 @@ function buildWatchmenHook(synthesisMode) {
53
58
  version: "1.0.0",
54
59
  description: "After memory capture, run local model synthesis if enough observations have accumulated.",
55
60
  when: { type: "agentStop" },
56
- then: { type: "runCommand", command: "kirograph mem watchmen synthesize --quiet 2>&1 || true" }
61
+ then: { type: "runCommand", command: WATCHMEN_SYNTH_CMD }
57
62
  }
58
63
  };
59
64
  }
@@ -93,7 +98,7 @@ const HOOKS = [
93
98
  hooks: [{
94
99
  name: "KiroGraph Sync on Agent Stop",
95
100
  trigger: "Stop",
96
- action: { type: "command", command: "kirograph sync --quiet 2>&1 > /dev/null" }
101
+ action: { type: "command", command: SYNC_CMD }
97
102
  }]
98
103
  },
99
104
  v1: {
@@ -101,7 +106,7 @@ const HOOKS = [
101
106
  version: "1.0.0",
102
107
  description: "Sync the KiroGraph index when the agent stops, picking up any file edits, creates, or deletes from the session.",
103
108
  when: { type: "agentStop" },
104
- then: { type: "runCommand", command: "kirograph sync --quiet 2>&1 > /dev/null" }
109
+ then: { type: "runCommand", command: SYNC_CMD }
105
110
  }
106
111
  },
107
112
  {
@@ -235,7 +240,7 @@ Skip if the session was trivial (simple bug fix, no new knowledge).`;
235
240
  hooks: [{
236
241
  name: "KiroGraph Wiki Synthesize",
237
242
  trigger: "Stop",
238
- action: { type: "command", command: "kirograph wiki synthesize --quiet 2>&1 || true" }
243
+ action: { type: "command", command: WIKI_SYNTH_CMD }
239
244
  }]
240
245
  },
241
246
  v1: {
@@ -243,7 +248,7 @@ Skip if the session was trivial (simple bug fix, no new knowledge).`;
243
248
  version: "1.0.0",
244
249
  description: "After each session, run local-model wiki synthesis over queued sources.",
245
250
  when: { type: "agentStop" },
246
- then: { type: "runCommand", command: "kirograph wiki synthesize --quiet 2>&1 || true" }
251
+ then: { type: "runCommand", command: WIKI_SYNTH_CMD }
247
252
  }
248
253
  }, format);
249
254
  } else {
@@ -275,7 +280,7 @@ Skip if the session was trivial (simple bug fix, no new knowledge).`;
275
280
  hooks: [{
276
281
  name: "KiroGraph Wiki Lint",
277
282
  trigger: "Stop",
278
- action: { type: "command", command: "kirograph wiki lint 2>&1 || true" }
283
+ action: { type: "command", command: WIKI_LINT_CMD }
279
284
  }]
280
285
  },
281
286
  v1: {
@@ -283,7 +288,7 @@ Skip if the session was trivial (simple bug fix, no new knowledge).`;
283
288
  version: "1.0.0",
284
289
  description: `Run wiki health check every ${lintFreq} sessions to catch broken links, orphan pages, and contradictions.`,
285
290
  when: { type: "agentStop" },
286
- then: { type: "runCommand", command: "kirograph wiki lint 2>&1 || true" }
291
+ then: { type: "runCommand", command: WIKI_LINT_CMD }
287
292
  }
288
293
  }, format);
289
294
  } else {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/bin/installer/hooks.ts"],
4
- "sourcesContent": ["/**\n * KiroGraph Installer \u2014 Kiro hook file management\n *\n * Generates hooks in BOTH formats for compatibility:\n *\n * v2 (new Kiro IDE): `.kiro/hooks/<id>.json`\n * { \"version\": \"v1\", \"hooks\": [{ \"name\", \"trigger\", \"matcher?\", \"action\": { type, command|prompt } }] }\n *\n * v1 (legacy Kiro IDE): `.kiro/hooks/<id>.kiro.hook`\n * { \"name\", \"version\", \"description\", \"when\": { type, toolTypes? }, \"then\": { type, command|prompt } }\n *\n * Old Kiro ignores .json files; new Kiro ignores .kiro.hook files.\n * Writing both ensures KiroGraph works regardless of which IDE version the user runs.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\n\n// \u2500\u2500 Constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst V2_EXT = '.json';\nconst V1_EXT = '.kiro.hook';\n\n// \u2500\u2500 Hook builders \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface HookDef {\n id: string;\n description: string;\n v2: object; // new Kiro IDE format\n v1: object; // legacy Kiro IDE format\n}\n\nfunction buildWatchmenHook(synthesisMode: 'local' | 'agent'): HookDef {\n if (synthesisMode === 'local') {\n return {\n id: 'kirograph-watchmen',\n description: 'After memory capture, run local model synthesis if enough observations have accumulated.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Watchmen',\n trigger: 'Stop',\n action: { type: 'command', command: 'kirograph mem watchmen synthesize --quiet 2>&1 || true' },\n }],\n },\n v1: {\n name: 'KiroGraph Watchmen',\n version: '1.0.0',\n description: 'After memory capture, run local model synthesis if enough observations have accumulated.',\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: 'kirograph mem watchmen synthesize --quiet 2>&1 || true' },\n },\n };\n }\n\n const watchmenPrompt = `Check if KiroGraph Watchmen synthesis should run: call kirograph_mem_store with kind='note' and content='watchmen check'. If the response does not include watchmenReady: true, do nothing and stop.\n\nIf watchmenReady: true:\n1. Call kirograph_mem_search for each kind (decision, error, pattern, architecture, note) with limit 20.\n2. Write or update the workspace brief: upsert the ## KiroGraph Watchmen section in each file listed in targetFiles. For .kiro/steering/kirograph-watchmen.md use inclusion: always frontmatter with sections for Decisions, Known Errors & Fixes, Recurring Patterns, and Architecture Notes. For all other files write a compact ## KiroGraph Watchmen block.\n3. Generate skill files: if skillTargetDir is present in the response, identify recurring procedures (any procedure appearing in 3+ observations). For each, write a .kiro/steering/watchmen-<slug>.md file with inclusion: manual frontmatter, a short title, a \"When to use\" line with trigger phrases, and numbered steps. Prefix all generated files with watchmen- so they are distinguishable from hand-written steering files. Remove any .kiro/steering/watchmen-*.md files from previous runs that no longer match current patterns. If skillTargetDir is absent, embed a ## Recurring Procedures section in each targetFile instead, listing each procedure with trigger context and steps.\n4. Store a kind='summary' observation briefly describing what was synthesized (e.g. \"Synthesized 8 observations: updated kirograph-watchmen.md, wrote watchmen-auth-flow.md and watchmen-test-pattern.md\").`;\n\n return {\n id: 'kirograph-watchmen',\n description: 'After memory capture, check if enough observations have accumulated. If so, synthesize them into workspace brief files.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Watchmen',\n trigger: 'Stop',\n action: { type: 'agent', prompt: watchmenPrompt },\n }],\n },\n v1: {\n name: 'KiroGraph Watchmen',\n version: '1.0.0',\n description: 'After memory capture, check if enough observations have accumulated. If so, synthesize them into workspace brief files.',\n when: { type: 'agentStop' },\n then: { type: 'askAgent', prompt: watchmenPrompt },\n },\n };\n}\n\nconst HOOKS: HookDef[] = [\n {\n id: 'kirograph-sync-if-dirty',\n description: 'Sync the KiroGraph index when the agent stops, picking up any file edits, creates, or deletes from the session.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Sync on Agent Stop',\n trigger: 'Stop',\n action: { type: 'command', command: 'kirograph sync --quiet 2>&1 > /dev/null' },\n }],\n },\n v1: {\n name: 'KiroGraph Sync on Agent Stop',\n version: '1.0.0',\n description: 'Sync the KiroGraph index when the agent stops, picking up any file edits, creates, or deletes from the session.',\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: 'kirograph sync --quiet 2>&1 > /dev/null' },\n },\n },\n {\n id: 'kirograph-compress-hint',\n description: 'Remind the agent to use kirograph_exec for shell commands that benefit from token compression.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Compression Hint',\n trigger: 'PreToolUse',\n matcher: 'execute_bash',\n action: {\n type: 'agent',\n prompt: 'If this shell command is a git operation, GitHub CLI, test runner, linter, build tool, file listing, grep/rg, docker/kubectl, AWS CLI, or package manager command, consider using the kirograph_exec MCP tool instead for 60-90% token savings. The tool compresses output automatically while preserving error details.',\n },\n }],\n },\n v1: {\n name: 'KiroGraph Compression Hint',\n version: '1.0.0',\n description: 'Remind the agent to use kirograph_exec for shell commands that benefit from token compression.',\n when: { type: 'preToolUse', toolTypes: ['shell'] },\n then: {\n type: 'askAgent',\n prompt: 'If this shell command is a git operation, GitHub CLI, test runner, linter, build tool, file listing, grep/rg, docker/kubectl, AWS CLI, or package manager command, consider using the kirograph_exec MCP tool instead for 60-90% token savings. The tool compresses output automatically while preserving error details.',\n },\n },\n },\n {\n id: 'kirograph-mem-capture',\n description: 'Prompt the agent to store important observations in memory at the end of each session.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Memory Capture',\n trigger: 'Stop',\n action: {\n type: 'agent',\n prompt: 'Before ending, review what happened in this session. If there were any important decisions, bug root causes, architecture insights, error patterns, or lessons learned, store them using kirograph_mem_store with the appropriate kind (decision, error, pattern, architecture, note). Keep observations concise \u2014 one fact per observation. Skip if nothing noteworthy happened.',\n },\n }],\n },\n v1: {\n name: 'KiroGraph Memory Capture',\n version: '1.0.0',\n description: 'Prompt the agent to store important observations in memory at the end of each session.',\n when: { type: 'agentStop' },\n then: {\n type: 'askAgent',\n prompt: 'Before ending, review what happened in this session. If there were any important decisions, bug root causes, architecture insights, error patterns, or lessons learned, store them using kirograph_mem_store with the appropriate kind (decision, error, pattern, architecture, note). Keep observations concise \u2014 one fact per observation. Skip if nothing noteworthy happened.',\n },\n },\n },\n];\n\n// \u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction ensureDir(p: string): void {\n fs.mkdirSync(p, { recursive: true });\n}\n\nfunction writeJson(p: string, data: unknown): void {\n fs.writeFileSync(p, JSON.stringify(data, null, 2) + '\\n');\n}\n\n/** Write a hook in both v2 (.json) and v1 (.kiro.hook) formats */\nfunction writeHookDual(hooksDir: string, def: HookDef): void {\n writeJson(path.join(hooksDir, `${def.id}${V2_EXT}`), def.v2);\n writeJson(path.join(hooksDir, `${def.id}${V1_EXT}`), def.v1);\n}\n\n/** Write a hook in the specified format only, removing the other */\nfunction writeHookForFormat(hooksDir: string, def: HookDef, format: KiroHookFormat): void {\n if (format === 'v2') {\n writeJson(path.join(hooksDir, `${def.id}${V2_EXT}`), def.v2);\n // Remove legacy file if it exists\n const legacyPath = path.join(hooksDir, `${def.id}${V1_EXT}`);\n if (fs.existsSync(legacyPath)) fs.unlinkSync(legacyPath);\n } else {\n writeJson(path.join(hooksDir, `${def.id}${V1_EXT}`), def.v1);\n // Remove v2 file if it exists\n const v2Path = path.join(hooksDir, `${def.id}${V2_EXT}`);\n if (fs.existsSync(v2Path)) fs.unlinkSync(v2Path);\n }\n}\n\n/** Remove both format files for a given hook id */\nfunction removeHookDual(hooksDir: string, id: string): void {\n for (const ext of [V2_EXT, V1_EXT]) {\n const p = path.join(hooksDir, `${id}${ext}`);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n }\n}\n\n// \u2500\u2500 Public \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type KiroHookFormat = 'v1-legacy' | 'v2';\n\nexport function writeHooks(kiroDir: string, opts?: { enableCompression?: boolean; enableMemory?: boolean; enableWatchmen?: boolean; watchmenSynthesisMode?: 'local' | 'agent'; enableWiki?: boolean; wikiSynthesisMode?: 'local' | 'agent'; wikiLintFrequency?: number; kiroHookFormat?: KiroHookFormat }): void {\n const hooksDir = path.join(kiroDir, 'hooks');\n ensureDir(hooksDir);\n\n const format = opts?.kiroHookFormat ?? 'v2';\n\n // Remove obsolete hook files from earlier versions\n const obsoleteFiles = [\n 'kirograph-sync-on-save.json', 'kirograph-sync-on-create.json',\n 'kirograph-mark-dirty-on-save.json', 'kirograph-mark-dirty-on-create.json',\n 'kirograph-sync-on-delete.json',\n 'kirograph-mark-dirty-on-save.kiro.hook',\n 'kirograph-mark-dirty-on-create.kiro.hook',\n 'kirograph-sync-on-delete.kiro.hook',\n ];\n for (const old of obsoleteFiles) {\n const p = path.join(hooksDir, old);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n }\n\n for (const def of HOOKS) {\n // Skip compression hook if compression is disabled\n if (def.id === 'kirograph-compress-hint' && opts?.enableCompression === false) {\n removeHookDual(hooksDir, def.id);\n continue;\n }\n // Skip memory hook if memory is disabled\n if (def.id === 'kirograph-mem-capture' && !opts?.enableMemory) {\n removeHookDual(hooksDir, def.id);\n continue;\n }\n writeHookForFormat(hooksDir, def, format);\n }\n\n // Watchmen hook \u2014 built dynamically based on synthesis mode\n if (opts?.enableWatchmen) {\n const mode = opts.watchmenSynthesisMode ?? 'local';\n writeHookForFormat(hooksDir, buildWatchmenHook(mode), format);\n } else {\n removeHookDual(hooksDir, 'kirograph-watchmen');\n }\n\n // Wiki hooks \u2014 ingest trigger + periodic lint\n if (opts?.enableWiki) {\n const lintFreq = opts.wikiLintFrequency ?? 10;\n const wikiMode = opts.wikiSynthesisMode ?? 'agent';\n\n const wikiIngestPrompt = `If this session produced durable knowledge (design decisions, architecture insights, API contracts, process steps, domain facts), consider updating the wiki:\n1. Call kirograph_wiki_ingest with the key findings as source text.\n2. The tool returns a structured prompt. Pass it to yourself to generate a WIKI_DIFF.\n3. Call kirograph_wiki_apply_diff with your generated diff.\nSkip if the session was trivial (simple bug fix, no new knowledge).`;\n\n if (wikiMode === 'local') {\n writeHookForFormat(hooksDir, {\n id: 'kirograph-wiki-ingest',\n description: 'After each session, run local-model wiki synthesis over queued sources.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Wiki Synthesize',\n trigger: 'Stop',\n action: { type: 'command', command: 'kirograph wiki synthesize --quiet 2>&1 || true' },\n }],\n },\n v1: {\n name: 'KiroGraph Wiki Synthesize',\n version: '1.0.0',\n description: 'After each session, run local-model wiki synthesis over queued sources.',\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: 'kirograph wiki synthesize --quiet 2>&1 || true' },\n },\n }, format);\n } else {\n writeHookForFormat(hooksDir, {\n id: 'kirograph-wiki-ingest',\n description: 'At the end of each session, prompt the agent to ingest any relevant knowledge into the wiki.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Wiki Ingest',\n trigger: 'Stop',\n action: { type: 'agent', prompt: wikiIngestPrompt },\n }],\n },\n v1: {\n name: 'KiroGraph Wiki Ingest',\n version: '1.0.0',\n description: 'At the end of each session, prompt the agent to ingest any relevant knowledge into the wiki.',\n when: { type: 'agentStop' },\n then: { type: 'askAgent', prompt: wikiIngestPrompt },\n },\n }, format);\n }\n\n writeHookForFormat(hooksDir, {\n id: 'kirograph-wiki-lint',\n description: `Run wiki health check every ${lintFreq} sessions to catch broken links, orphan pages, and contradictions.`,\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Wiki Lint',\n trigger: 'Stop',\n action: { type: 'command', command: 'kirograph wiki lint 2>&1 || true' },\n }],\n },\n v1: {\n name: 'KiroGraph Wiki Lint',\n version: '1.0.0',\n description: `Run wiki health check every ${lintFreq} sessions to catch broken links, orphan pages, and contradictions.`,\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: 'kirograph wiki lint 2>&1 || true' },\n },\n }, format);\n } else {\n removeHookDual(hooksDir, 'kirograph-wiki-ingest');\n removeHookDual(hooksDir, 'kirograph-wiki-lint');\n }\n\n console.log(` \u2713 Auto-sync hooks written to ${hooksDir}`);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,SAAoB;AACpB,WAAsB;AAItB,MAAM,SAAS;AACf,MAAM,SAAS;AAWf,SAAS,k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,SAAS,QAAQ,iBAAiB;AAAA,UACpD,CAAC;AAAA,QACH;AAAA,QACA,IAAI;AAAA,UACF,MAAM;AAAA,UACN,SAAS;AAAA,UACT,aAAa;AAAA,UACb,MAAM,EAAE,MAAM,YAAY;AAAA,UAC1B,MAAM,EAAE,MAAM,YAAY,QAAQ,iBAAiB;AAAA,QACrD;AAAA,MACF,GAAG,MAAM;AAAA,IACX;AAEA,uBAAmB,UAAU;AAAA,MAC3B,IAAI;AAAA,MACJ,aAAa,+BAA+B,QAAQ;AAAA,MACpD,IAAI;AAAA,QACF,SAAS;AAAA,QACT,OAAO,CAAC;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,QAAQ,EAAE,MAAM,WAAW,SAAS,mCAAmC;AAAA,QACzE,CAAC;AAAA,MACH;AAAA,MACA,IAAI;AAAA,QACF,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa,+BAA+B,QAAQ;AAAA,QACpD,MAAM,EAAE,MAAM,YAAY;AAAA,QAC1B,MAAM,EAAE,MAAM,cAAc,SAAS,mCAAmC;AAAA,MAC1E;AAAA,IACF,GAAG,MAAM;AAAA,EACX,OAAO;AACL,mBAAe,UAAU,uBAAuB;AAChD,mBAAe,UAAU,qBAAqB;AAAA,EAChD;AAEA,UAAQ,IAAI,uCAAkC,QAAQ,EAAE;AAC1D;",
4
+ "sourcesContent": ["/**\n * KiroGraph Installer \u2014 Kiro hook file management\n *\n * Generates hooks in BOTH formats for compatibility:\n *\n * v2 (new Kiro IDE): `.kiro/hooks/<id>.json`\n * { \"version\": \"v1\", \"hooks\": [{ \"name\", \"trigger\", \"matcher?\", \"action\": { type, command|prompt } }] }\n *\n * v1 (legacy Kiro IDE): `.kiro/hooks/<id>.kiro.hook`\n * { \"name\", \"version\", \"description\", \"when\": { type, toolTypes? }, \"then\": { type, command|prompt } }\n *\n * Old Kiro ignores .json files; new Kiro ignores .kiro.hook files.\n * Writing both ensures KiroGraph works regardless of which IDE version the user runs.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { silentCommand } from './common';\n\n// \u2500\u2500 Constants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst V2_EXT = '.json';\nconst V1_EXT = '.kiro.hook';\n\n// Cross-platform hook commands (see issue #40 \u2014 bash syntax breaks on Windows cmd.exe).\nconst SYNC_CMD = silentCommand('kirograph sync --quiet');\nconst WATCHMEN_SYNTH_CMD = silentCommand('kirograph mem watchmen synthesize --quiet');\nconst WIKI_SYNTH_CMD = silentCommand('kirograph wiki synthesize --quiet');\nconst WIKI_LINT_CMD = silentCommand('kirograph wiki lint');\n\n// \u2500\u2500 Hook builders \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\ninterface HookDef {\n id: string;\n description: string;\n v2: object; // new Kiro IDE format\n v1: object; // legacy Kiro IDE format\n}\n\nfunction buildWatchmenHook(synthesisMode: 'local' | 'agent'): HookDef {\n if (synthesisMode === 'local') {\n return {\n id: 'kirograph-watchmen',\n description: 'After memory capture, run local model synthesis if enough observations have accumulated.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Watchmen',\n trigger: 'Stop',\n action: { type: 'command', command: WATCHMEN_SYNTH_CMD },\n }],\n },\n v1: {\n name: 'KiroGraph Watchmen',\n version: '1.0.0',\n description: 'After memory capture, run local model synthesis if enough observations have accumulated.',\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: WATCHMEN_SYNTH_CMD },\n },\n };\n }\n\n const watchmenPrompt = `Check if KiroGraph Watchmen synthesis should run: call kirograph_mem_store with kind='note' and content='watchmen check'. If the response does not include watchmenReady: true, do nothing and stop.\n\nIf watchmenReady: true:\n1. Call kirograph_mem_search for each kind (decision, error, pattern, architecture, note) with limit 20.\n2. Write or update the workspace brief: upsert the ## KiroGraph Watchmen section in each file listed in targetFiles. For .kiro/steering/kirograph-watchmen.md use inclusion: always frontmatter with sections for Decisions, Known Errors & Fixes, Recurring Patterns, and Architecture Notes. For all other files write a compact ## KiroGraph Watchmen block.\n3. Generate skill files: if skillTargetDir is present in the response, identify recurring procedures (any procedure appearing in 3+ observations). For each, write a .kiro/steering/watchmen-<slug>.md file with inclusion: manual frontmatter, a short title, a \"When to use\" line with trigger phrases, and numbered steps. Prefix all generated files with watchmen- so they are distinguishable from hand-written steering files. Remove any .kiro/steering/watchmen-*.md files from previous runs that no longer match current patterns. If skillTargetDir is absent, embed a ## Recurring Procedures section in each targetFile instead, listing each procedure with trigger context and steps.\n4. Store a kind='summary' observation briefly describing what was synthesized (e.g. \"Synthesized 8 observations: updated kirograph-watchmen.md, wrote watchmen-auth-flow.md and watchmen-test-pattern.md\").`;\n\n return {\n id: 'kirograph-watchmen',\n description: 'After memory capture, check if enough observations have accumulated. If so, synthesize them into workspace brief files.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Watchmen',\n trigger: 'Stop',\n action: { type: 'agent', prompt: watchmenPrompt },\n }],\n },\n v1: {\n name: 'KiroGraph Watchmen',\n version: '1.0.0',\n description: 'After memory capture, check if enough observations have accumulated. If so, synthesize them into workspace brief files.',\n when: { type: 'agentStop' },\n then: { type: 'askAgent', prompt: watchmenPrompt },\n },\n };\n}\n\nconst HOOKS: HookDef[] = [\n {\n id: 'kirograph-sync-if-dirty',\n description: 'Sync the KiroGraph index when the agent stops, picking up any file edits, creates, or deletes from the session.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Sync on Agent Stop',\n trigger: 'Stop',\n action: { type: 'command', command: SYNC_CMD },\n }],\n },\n v1: {\n name: 'KiroGraph Sync on Agent Stop',\n version: '1.0.0',\n description: 'Sync the KiroGraph index when the agent stops, picking up any file edits, creates, or deletes from the session.',\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: SYNC_CMD },\n },\n },\n {\n id: 'kirograph-compress-hint',\n description: 'Remind the agent to use kirograph_exec for shell commands that benefit from token compression.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Compression Hint',\n trigger: 'PreToolUse',\n matcher: 'execute_bash',\n action: {\n type: 'agent',\n prompt: 'If this shell command is a git operation, GitHub CLI, test runner, linter, build tool, file listing, grep/rg, docker/kubectl, AWS CLI, or package manager command, consider using the kirograph_exec MCP tool instead for 60-90% token savings. The tool compresses output automatically while preserving error details.',\n },\n }],\n },\n v1: {\n name: 'KiroGraph Compression Hint',\n version: '1.0.0',\n description: 'Remind the agent to use kirograph_exec for shell commands that benefit from token compression.',\n when: { type: 'preToolUse', toolTypes: ['shell'] },\n then: {\n type: 'askAgent',\n prompt: 'If this shell command is a git operation, GitHub CLI, test runner, linter, build tool, file listing, grep/rg, docker/kubectl, AWS CLI, or package manager command, consider using the kirograph_exec MCP tool instead for 60-90% token savings. The tool compresses output automatically while preserving error details.',\n },\n },\n },\n {\n id: 'kirograph-mem-capture',\n description: 'Prompt the agent to store important observations in memory at the end of each session.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Memory Capture',\n trigger: 'Stop',\n action: {\n type: 'agent',\n prompt: 'Before ending, review what happened in this session. If there were any important decisions, bug root causes, architecture insights, error patterns, or lessons learned, store them using kirograph_mem_store with the appropriate kind (decision, error, pattern, architecture, note). Keep observations concise \u2014 one fact per observation. Skip if nothing noteworthy happened.',\n },\n }],\n },\n v1: {\n name: 'KiroGraph Memory Capture',\n version: '1.0.0',\n description: 'Prompt the agent to store important observations in memory at the end of each session.',\n when: { type: 'agentStop' },\n then: {\n type: 'askAgent',\n prompt: 'Before ending, review what happened in this session. If there were any important decisions, bug root causes, architecture insights, error patterns, or lessons learned, store them using kirograph_mem_store with the appropriate kind (decision, error, pattern, architecture, note). Keep observations concise \u2014 one fact per observation. Skip if nothing noteworthy happened.',\n },\n },\n },\n];\n\n// \u2500\u2500 Helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nfunction ensureDir(p: string): void {\n fs.mkdirSync(p, { recursive: true });\n}\n\nfunction writeJson(p: string, data: unknown): void {\n fs.writeFileSync(p, JSON.stringify(data, null, 2) + '\\n');\n}\n\n/** Write a hook in both v2 (.json) and v1 (.kiro.hook) formats */\nfunction writeHookDual(hooksDir: string, def: HookDef): void {\n writeJson(path.join(hooksDir, `${def.id}${V2_EXT}`), def.v2);\n writeJson(path.join(hooksDir, `${def.id}${V1_EXT}`), def.v1);\n}\n\n/** Write a hook in the specified format only, removing the other */\nfunction writeHookForFormat(hooksDir: string, def: HookDef, format: KiroHookFormat): void {\n if (format === 'v2') {\n writeJson(path.join(hooksDir, `${def.id}${V2_EXT}`), def.v2);\n // Remove legacy file if it exists\n const legacyPath = path.join(hooksDir, `${def.id}${V1_EXT}`);\n if (fs.existsSync(legacyPath)) fs.unlinkSync(legacyPath);\n } else {\n writeJson(path.join(hooksDir, `${def.id}${V1_EXT}`), def.v1);\n // Remove v2 file if it exists\n const v2Path = path.join(hooksDir, `${def.id}${V2_EXT}`);\n if (fs.existsSync(v2Path)) fs.unlinkSync(v2Path);\n }\n}\n\n/** Remove both format files for a given hook id */\nfunction removeHookDual(hooksDir: string, id: string): void {\n for (const ext of [V2_EXT, V1_EXT]) {\n const p = path.join(hooksDir, `${id}${ext}`);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n }\n}\n\n// \u2500\u2500 Public \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type KiroHookFormat = 'v1-legacy' | 'v2';\n\nexport function writeHooks(kiroDir: string, opts?: { enableCompression?: boolean; enableMemory?: boolean; enableWatchmen?: boolean; watchmenSynthesisMode?: 'local' | 'agent'; enableWiki?: boolean; wikiSynthesisMode?: 'local' | 'agent'; wikiLintFrequency?: number; kiroHookFormat?: KiroHookFormat }): void {\n const hooksDir = path.join(kiroDir, 'hooks');\n ensureDir(hooksDir);\n\n const format = opts?.kiroHookFormat ?? 'v2';\n\n // Remove obsolete hook files from earlier versions\n const obsoleteFiles = [\n 'kirograph-sync-on-save.json', 'kirograph-sync-on-create.json',\n 'kirograph-mark-dirty-on-save.json', 'kirograph-mark-dirty-on-create.json',\n 'kirograph-sync-on-delete.json',\n 'kirograph-mark-dirty-on-save.kiro.hook',\n 'kirograph-mark-dirty-on-create.kiro.hook',\n 'kirograph-sync-on-delete.kiro.hook',\n ];\n for (const old of obsoleteFiles) {\n const p = path.join(hooksDir, old);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n }\n\n for (const def of HOOKS) {\n // Skip compression hook if compression is disabled\n if (def.id === 'kirograph-compress-hint' && opts?.enableCompression === false) {\n removeHookDual(hooksDir, def.id);\n continue;\n }\n // Skip memory hook if memory is disabled\n if (def.id === 'kirograph-mem-capture' && !opts?.enableMemory) {\n removeHookDual(hooksDir, def.id);\n continue;\n }\n writeHookForFormat(hooksDir, def, format);\n }\n\n // Watchmen hook \u2014 built dynamically based on synthesis mode\n if (opts?.enableWatchmen) {\n const mode = opts.watchmenSynthesisMode ?? 'local';\n writeHookForFormat(hooksDir, buildWatchmenHook(mode), format);\n } else {\n removeHookDual(hooksDir, 'kirograph-watchmen');\n }\n\n // Wiki hooks \u2014 ingest trigger + periodic lint\n if (opts?.enableWiki) {\n const lintFreq = opts.wikiLintFrequency ?? 10;\n const wikiMode = opts.wikiSynthesisMode ?? 'agent';\n\n const wikiIngestPrompt = `If this session produced durable knowledge (design decisions, architecture insights, API contracts, process steps, domain facts), consider updating the wiki:\n1. Call kirograph_wiki_ingest with the key findings as source text.\n2. The tool returns a structured prompt. Pass it to yourself to generate a WIKI_DIFF.\n3. Call kirograph_wiki_apply_diff with your generated diff.\nSkip if the session was trivial (simple bug fix, no new knowledge).`;\n\n if (wikiMode === 'local') {\n writeHookForFormat(hooksDir, {\n id: 'kirograph-wiki-ingest',\n description: 'After each session, run local-model wiki synthesis over queued sources.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Wiki Synthesize',\n trigger: 'Stop',\n action: { type: 'command', command: WIKI_SYNTH_CMD },\n }],\n },\n v1: {\n name: 'KiroGraph Wiki Synthesize',\n version: '1.0.0',\n description: 'After each session, run local-model wiki synthesis over queued sources.',\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: WIKI_SYNTH_CMD },\n },\n }, format);\n } else {\n writeHookForFormat(hooksDir, {\n id: 'kirograph-wiki-ingest',\n description: 'At the end of each session, prompt the agent to ingest any relevant knowledge into the wiki.',\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Wiki Ingest',\n trigger: 'Stop',\n action: { type: 'agent', prompt: wikiIngestPrompt },\n }],\n },\n v1: {\n name: 'KiroGraph Wiki Ingest',\n version: '1.0.0',\n description: 'At the end of each session, prompt the agent to ingest any relevant knowledge into the wiki.',\n when: { type: 'agentStop' },\n then: { type: 'askAgent', prompt: wikiIngestPrompt },\n },\n }, format);\n }\n\n writeHookForFormat(hooksDir, {\n id: 'kirograph-wiki-lint',\n description: `Run wiki health check every ${lintFreq} sessions to catch broken links, orphan pages, and contradictions.`,\n v2: {\n version: 'v1',\n hooks: [{\n name: 'KiroGraph Wiki Lint',\n trigger: 'Stop',\n action: { type: 'command', command: WIKI_LINT_CMD },\n }],\n },\n v1: {\n name: 'KiroGraph Wiki Lint',\n version: '1.0.0',\n description: `Run wiki health check every ${lintFreq} sessions to catch broken links, orphan pages, and contradictions.`,\n when: { type: 'agentStop' },\n then: { type: 'runCommand', command: WIKI_LINT_CMD },\n },\n }, format);\n } else {\n removeHookDual(hooksDir, 'kirograph-wiki-ingest');\n removeHookDual(hooksDir, 'kirograph-wiki-lint');\n }\n\n console.log(` \u2713 Auto-sync hooks written to ${hooksDir}`);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA,SAAoB;AACpB,WAAsB;AACtB,oBAA8B;AAI9B,MAAM,SAAS;AACf,MAAM,SAAS;AAGf,MAAM,eAAW,6BAAc,wBAAwB;AACvD,MAAM,yBAAqB,6BAAc,2CAA2C;AACpF,MAAM,qBAAiB,6BAAc,mCAAmC;AACxE,MAAM,oBAAgB,6BAAc,qBAAqB;AAWzD,SAAS,kBAAkB,eAA2C;AACpE,MAAI,kBAAkB,SAAS;AAC7B,WAAO;AAAA,MACL,IAAI;AAAA,MACJ,aAAa;AAAA,MACb,IAAI;AAAA,QACF,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UACb,MAAM,EAAE,MAAM,YAAY;AAAA,UAC1B,MAAM,EAAE,MAAM,YAAY,QAAQ,iBAAiB;AAAA,QACrD;AAAA,MACF,GAAG,MAAM;AAAA,IACX;AAEA,uBAAmB,UAAU;AAAA,MAC3B,IAAI;AAAA,MACJ,aAAa,+BAA+B,QAAQ;AAAA,MACpD,IAAI;AAAA,QACF,SAAS;AAAA,QACT,OAAO,CAAC;AAAA,UACN,MAAM;AAAA,UACN,SAAS;AAAA,UACT,QAAQ,EAAE,MAAM,WAAW,SAAS,cAAc;AAAA,QACpD,CAAC;AAAA,MACH;AAAA,MACA,IAAI;AAAA,QACF,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa,+BAA+B,QAAQ;AAAA,QACpD,MAAM,EAAE,MAAM,YAAY;AAAA,QAC1B,MAAM,EAAE,MAAM,cAAc,SAAS,cAAc;AAAA,MACrD;AAAA,IACF,GAAG,MAAM;AAAA,EACX,OAAO;AACL,mBAAe,UAAU,uBAAuB;AAChD,mBAAe,UAAU,qBAAqB;AAAA,EAChD;AAEA,UAAQ,IAAI,uCAAkC,QAAQ,EAAE;AAC1D;",
6
6
  "names": []
7
7
  }
@@ -47,7 +47,7 @@ function buildAntigravityHooks() {
47
47
  hooks: [
48
48
  {
49
49
  type: "command",
50
- command: "kirograph sync --quiet 2>/dev/null || true",
50
+ command: (0, import_common.silentCommand)("kirograph sync --quiet"),
51
51
  timeout: 30
52
52
  }
53
53
  ]
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/bin/installer/targets/antigravity.ts"],
4
- "sourcesContent": ["/**\n * Antigravity IDE target.\n *\n * MCP: user-scoped at ~/.gemini/antigravity/mcp_config.json (print instructions)\n * Hooks: .agents/hooks.json (workspace-level)\n * Instructions: GEMINI.md (upsert block)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst ANTIGRAVITY_BLOCK_ID = 'antigravity';\n\nfunction buildAntigravityHooks(): object {\n return {\n 'kirograph-sync': {\n Stop: [\n {\n hooks: [\n {\n type: 'command',\n command: 'kirograph sync --quiet 2>/dev/null || true',\n timeout: 30,\n },\n ],\n },\n ],\n },\n };\n}\n\nexport function installAntigravityEarly(_projectRoot: string): void {\n // Write MCP config to user-scoped ~/.gemini/antigravity/mcp_config.json\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n ensureDir(path.dirname(mcpPath));\n const existing = readJson(mcpPath);\n existing.mcpServers = existing.mcpServers ?? {};\n if (existing.mcpServers[KIROGRAPH_SERVER_NAME]) {\n console.log(` \u2713 Antigravity MCP already configured in ${mcpPath}`);\n return;\n }\n existing.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(mcpPath, existing);\n console.log(` \u2713 Antigravity MCP server registered in ${mcpPath}`);\n}\n\nexport function installAntigravityLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionOpts = buildInstructionOpts(opts, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'antigravity.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 Antigravity instructions written to ${instructionsPath}`);\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n const changed = upsertGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID, '## KiroGraph', buildAgentInstructions(instructionOpts));\n console.log(changed\n ? ` \u2713 GEMINI.md updated with KiroGraph instructions`\n : ` \u2713 GEMINI.md already up to date`);\n\n // Write hooks to .agents/hooks.json\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n ensureDir(path.dirname(hooksPath));\n const existing = readJson(hooksPath);\n const kgHooks = buildAntigravityHooks() as any;\n // Merge without overwriting existing hooks\n for (const [name, config] of Object.entries(kgHooks)) {\n if (!existing[name]) {\n existing[name] = config;\n }\n }\n writeJson(hooksPath, existing);\n console.log(` \u2713 Antigravity hooks written to ${hooksPath}`);\n}\n\nexport function uninitAntigravity(projectRoot: string): void {\n // Remove user-scoped MCP config\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n if (fs.existsSync(mcpPath)) {\n const config = readJson(mcpPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;\n writeJson(mcpPath, config);\n console.log(` \u2713 Removed kirograph from ${mcpPath}`);\n }\n }\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n if (removeGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from GEMINI.md`);\n }\n\n // Remove hooks\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n if (fs.existsSync(hooksPath)) {\n const config = readJson(hooksPath);\n if (config['kirograph-sync']) {\n delete config['kirograph-sync'];\n writeJson(hooksPath, config);\n console.log(` \u2713 Removed kirograph-sync from .agents/hooks.json`);\n }\n }\n}\n\nexport function printAntigravityNextSteps(_projectRoot: string): void {\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n console.log('\\n Done! Restart Antigravity for the MCP server to load.');\n console.log(` MCP registered in ${mcpPath}`);\n console.log(' KiroGraph instructions are in GEMINI.md');\n console.log(' Auto-sync hook installed in .agents/hooks.json\\n');\n}\n"],
5
- "mappings": ";;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oD;AAAA,IAClE;AAAA,EACF;AACF;AAEO,SAAS,0BAA0B,cAA4B;AACpE,QAAM,OAAO,QAAQ,IAAI,QAAQ,QAAQ,IAAI,eAAe;AAC5D,QAAM,UAAU,KAAK,KAAK,MAAM,WAAW,eAAe,iBAAiB;AAC3E,UAAQ,IAAI,2DAA2D;AACvE,UAAQ,IAAI,uBAAuB,OAAO,EAAE;AAC5C,UAAQ,IAAI,2CAA2C;AACvD,UAAQ,IAAI,oDAAoD;AAClE;",
4
+ "sourcesContent": ["/**\n * Antigravity IDE target.\n *\n * MCP: user-scoped at ~/.gemini/antigravity/mcp_config.json (print instructions)\n * Hooks: .agents/hooks.json (workspace-level)\n * Instructions: GEMINI.md (upsert block)\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { CavemanMode } from '../caveman';\nimport {\n ensureDir,\n buildInstructionOpts,\n readJson,\n writeJson,\n upsertGeneratedBlock,\n removeGeneratedBlock,\n KIROGRAPH_COMMAND,\n KIROGRAPH_MCP_ARGS,\n KIROGRAPH_SERVER_NAME,\n silentCommand,\n LateInstallOptions,\n} from '../common';\nimport { buildAgentInstructions } from '../instructions';\n\nconst ANTIGRAVITY_BLOCK_ID = 'antigravity';\n\nfunction buildAntigravityHooks(): object {\n return {\n 'kirograph-sync': {\n Stop: [\n {\n hooks: [\n {\n type: 'command',\n command: silentCommand('kirograph sync --quiet'),\n timeout: 30,\n },\n ],\n },\n ],\n },\n };\n}\n\nexport function installAntigravityEarly(_projectRoot: string): void {\n // Write MCP config to user-scoped ~/.gemini/antigravity/mcp_config.json\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n ensureDir(path.dirname(mcpPath));\n const existing = readJson(mcpPath);\n existing.mcpServers = existing.mcpServers ?? {};\n if (existing.mcpServers[KIROGRAPH_SERVER_NAME]) {\n console.log(` \u2713 Antigravity MCP already configured in ${mcpPath}`);\n return;\n }\n existing.mcpServers[KIROGRAPH_SERVER_NAME] = {\n command: KIROGRAPH_COMMAND,\n args: KIROGRAPH_MCP_ARGS,\n };\n writeJson(mcpPath, existing);\n console.log(` \u2713 Antigravity MCP server registered in ${mcpPath}`);\n}\n\nexport function installAntigravityLate(projectRoot: string, opts: LateInstallOptions): void {\n const instructionOpts = buildInstructionOpts(opts, true);\n\n const instructionsPath = path.join(projectRoot, '.kirograph', 'antigravity.md');\n ensureDir(path.dirname(instructionsPath));\n fs.writeFileSync(instructionsPath, buildAgentInstructions(instructionOpts));\n console.log(` \u2713 Antigravity instructions written to ${instructionsPath}`);\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n const changed = upsertGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID, '## KiroGraph', buildAgentInstructions(instructionOpts));\n console.log(changed\n ? ` \u2713 GEMINI.md updated with KiroGraph instructions`\n : ` \u2713 GEMINI.md already up to date`);\n\n // Write hooks to .agents/hooks.json\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n ensureDir(path.dirname(hooksPath));\n const existing = readJson(hooksPath);\n const kgHooks = buildAntigravityHooks() as any;\n // Merge without overwriting existing hooks\n for (const [name, config] of Object.entries(kgHooks)) {\n if (!existing[name]) {\n existing[name] = config;\n }\n }\n writeJson(hooksPath, existing);\n console.log(` \u2713 Antigravity hooks written to ${hooksPath}`);\n}\n\nexport function uninitAntigravity(projectRoot: string): void {\n // Remove user-scoped MCP config\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n if (fs.existsSync(mcpPath)) {\n const config = readJson(mcpPath);\n if (config.mcpServers?.[KIROGRAPH_SERVER_NAME]) {\n delete config.mcpServers[KIROGRAPH_SERVER_NAME];\n if (Object.keys(config.mcpServers).length === 0) delete config.mcpServers;\n writeJson(mcpPath, config);\n console.log(` \u2713 Removed kirograph from ${mcpPath}`);\n }\n }\n\n const geminiPath = path.join(projectRoot, 'GEMINI.md');\n if (removeGeneratedBlock(geminiPath, ANTIGRAVITY_BLOCK_ID)) {\n console.log(` \u2713 Removed KiroGraph block from GEMINI.md`);\n }\n\n // Remove hooks\n const hooksPath = path.join(projectRoot, '.agents', 'hooks.json');\n if (fs.existsSync(hooksPath)) {\n const config = readJson(hooksPath);\n if (config['kirograph-sync']) {\n delete config['kirograph-sync'];\n writeJson(hooksPath, config);\n console.log(` \u2713 Removed kirograph-sync from .agents/hooks.json`);\n }\n }\n}\n\nexport function printAntigravityNextSteps(_projectRoot: string): void {\n const home = process.env.HOME || process.env.USERPROFILE || '';\n const mcpPath = path.join(home, '.gemini', 'antigravity', 'mcp_config.json');\n console.log('\\n Done! Restart Antigravity for the MCP server to load.');\n console.log(` MCP registered in ${mcpPath}`);\n console.log(' KiroGraph instructions are in GEMINI.md');\n console.log(' Auto-sync hook installed in .agents/hooks.json\\n');\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AAEtB,oBAYO;AACP,0BAAuC;AAEvC,MAAM,uBAAuB;AAE7B,SAAS,wBAAgC;AACvC,SAAO;AAAA,IACL,kBAAkB;AAAA,MAChB,MAAM;AAAA,QACJ;AAAA,UACE,OAAO;AAAA,YACL;AAAA,cACE,MAAM;AAAA,cACN,aAAS,6BAAc,wBAAwB;AAAA,cAC/C,SAAS;AAAA,YACX;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,wBAAwB,cAA4B;AAElE,QAAM,OAAO,QAAQ,IAAI,QAAQ,QAAQ,IAAI,eAAe;AAC5D,QAAM,UAAU,KAAK,KAAK,MAAM,WAAW,eAAe,iBAAiB;AAC3E,+BAAU,KAAK,QAAQ,OAAO,CAAC;AAC/B,QAAM,eAAW,wBAAS,OAAO;AACjC,WAAS,aAAa,SAAS,cAAc,CAAC;AAC9C,MAAI,SAAS,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