kirograph 0.17.0 → 0.20.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 (815) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +105 -1822
  3. package/dist/architecture/layers/dart.d.ts +10 -0
  4. package/dist/architecture/layers/dart.d.ts.map +1 -0
  5. package/dist/architecture/layers/dart.js +112 -0
  6. package/dist/architecture/layers/dart.js.map +7 -0
  7. package/dist/architecture/layers/elixir.d.ts +6 -0
  8. package/dist/architecture/layers/elixir.d.ts.map +1 -0
  9. package/dist/architecture/layers/index.d.ts.map +1 -1
  10. package/dist/architecture/layers/index.js +3 -1
  11. package/dist/architecture/layers/index.js.map +2 -2
  12. package/dist/architecture/layers/ocaml.d.ts +6 -0
  13. package/dist/architecture/layers/ocaml.d.ts.map +1 -0
  14. package/dist/architecture/layers/scala.d.ts +6 -0
  15. package/dist/architecture/layers/scala.d.ts.map +1 -0
  16. package/dist/architecture/layers/solidity.d.ts +6 -0
  17. package/dist/architecture/layers/solidity.d.ts.map +1 -0
  18. package/dist/architecture/layers/vue.d.ts +6 -0
  19. package/dist/architecture/layers/vue.d.ts.map +1 -0
  20. package/dist/architecture/manifest/elm.d.ts +3 -0
  21. package/dist/architecture/manifest/elm.d.ts.map +1 -0
  22. package/dist/architecture/manifest/index.d.ts.map +1 -1
  23. package/dist/architecture/manifest/ocaml.d.ts +3 -0
  24. package/dist/architecture/manifest/ocaml.d.ts.map +1 -0
  25. package/dist/architecture/manifest/scala.d.ts +3 -0
  26. package/dist/architecture/manifest/scala.d.ts.map +1 -0
  27. package/dist/bin/banner.d.ts.map +1 -1
  28. package/dist/bin/banner.js +74 -6
  29. package/dist/bin/banner.js.map +2 -2
  30. package/dist/bin/commands/affected.d.ts.map +1 -1
  31. package/dist/bin/commands/attack-surface.d.ts +3 -0
  32. package/dist/bin/commands/attack-surface.d.ts.map +1 -0
  33. package/dist/bin/commands/attack-surface.js +164 -0
  34. package/dist/bin/commands/attack-surface.js.map +7 -0
  35. package/dist/bin/commands/benchmark.d.ts +9 -0
  36. package/dist/bin/commands/benchmark.d.ts.map +1 -0
  37. package/dist/bin/commands/benchmark.js +206 -0
  38. package/dist/bin/commands/benchmark.js.map +7 -0
  39. package/dist/bin/commands/budget.d.ts +6 -0
  40. package/dist/bin/commands/budget.d.ts.map +1 -0
  41. package/dist/bin/commands/budget.js +70 -0
  42. package/dist/bin/commands/budget.js.map +7 -0
  43. package/dist/bin/commands/caveman.d.ts +7 -0
  44. package/dist/bin/commands/caveman.d.ts.map +1 -0
  45. package/dist/bin/commands/communities.d.ts +3 -0
  46. package/dist/bin/commands/communities.d.ts.map +1 -0
  47. package/dist/bin/commands/communities.js +77 -0
  48. package/dist/bin/commands/communities.js.map +7 -0
  49. package/dist/bin/commands/compression.d.ts +7 -0
  50. package/dist/bin/commands/compression.d.ts.map +1 -0
  51. package/dist/bin/commands/context.d.ts.map +1 -1
  52. package/dist/bin/commands/data.d.ts +3 -0
  53. package/dist/bin/commands/data.d.ts.map +1 -0
  54. package/dist/bin/commands/dead-code.d.ts +3 -0
  55. package/dist/bin/commands/dead-code.d.ts.map +1 -0
  56. package/dist/bin/commands/dep-confusion.d.ts +3 -0
  57. package/dist/bin/commands/dep-confusion.d.ts.map +1 -0
  58. package/dist/bin/commands/dep-confusion.js +119 -0
  59. package/dist/bin/commands/dep-confusion.js.map +7 -0
  60. package/dist/bin/commands/docs.d.ts +3 -0
  61. package/dist/bin/commands/docs.d.ts.map +1 -0
  62. package/dist/bin/commands/exec.d.ts +11 -0
  63. package/dist/bin/commands/exec.d.ts.map +1 -0
  64. package/dist/bin/commands/export.d.ts +3 -0
  65. package/dist/bin/commands/export.d.ts.map +1 -0
  66. package/dist/bin/commands/export.js +304 -10
  67. package/dist/bin/commands/export.js.map +2 -2
  68. package/dist/bin/commands/flows.d.ts +3 -0
  69. package/dist/bin/commands/flows.d.ts.map +1 -0
  70. package/dist/bin/commands/flows.js +97 -0
  71. package/dist/bin/commands/flows.js.map +7 -0
  72. package/dist/bin/commands/gain.d.ts +6 -0
  73. package/dist/bin/commands/gain.d.ts.map +1 -0
  74. package/dist/bin/commands/help.d.ts +7 -0
  75. package/dist/bin/commands/help.d.ts.map +1 -1
  76. package/dist/bin/commands/help.js +399 -101
  77. package/dist/bin/commands/help.js.map +2 -2
  78. package/dist/bin/commands/hotspots.d.ts +3 -0
  79. package/dist/bin/commands/hotspots.d.ts.map +1 -0
  80. package/dist/bin/commands/hotspots.js +94 -1
  81. package/dist/bin/commands/hotspots.js.map +3 -3
  82. package/dist/bin/commands/install.d.ts.map +1 -1
  83. package/dist/bin/commands/install.js +90 -8
  84. package/dist/bin/commands/install.js.map +2 -2
  85. package/dist/bin/commands/licenses.d.ts +3 -0
  86. package/dist/bin/commands/licenses.d.ts.map +1 -0
  87. package/dist/bin/commands/licenses.js +201 -0
  88. package/dist/bin/commands/licenses.js.map +7 -0
  89. package/dist/bin/commands/memory.d.ts +16 -0
  90. package/dist/bin/commands/memory.d.ts.map +1 -0
  91. package/dist/bin/commands/memory.js +151 -4
  92. package/dist/bin/commands/memory.js.map +2 -2
  93. package/dist/bin/commands/path.d.ts +3 -0
  94. package/dist/bin/commands/path.d.ts.map +1 -0
  95. package/dist/bin/commands/pattern.d.ts +3 -0
  96. package/dist/bin/commands/pattern.d.ts.map +1 -0
  97. package/dist/bin/commands/pattern.js +592 -0
  98. package/dist/bin/commands/pattern.js.map +7 -0
  99. package/dist/bin/commands/query.d.ts.map +1 -1
  100. package/dist/bin/commands/reachability.d.ts +3 -0
  101. package/dist/bin/commands/reachability.d.ts.map +1 -0
  102. package/dist/bin/commands/reachability.js +160 -0
  103. package/dist/bin/commands/reachability.js.map +7 -0
  104. package/dist/bin/commands/read.d.ts +6 -0
  105. package/dist/bin/commands/read.d.ts.map +1 -0
  106. package/dist/bin/commands/read.js +100 -0
  107. package/dist/bin/commands/read.js.map +7 -0
  108. package/dist/bin/commands/refactor.d.ts +3 -0
  109. package/dist/bin/commands/refactor.d.ts.map +1 -0
  110. package/dist/bin/commands/refactor.js +116 -0
  111. package/dist/bin/commands/refactor.js.map +7 -0
  112. package/dist/bin/commands/remediation.d.ts +3 -0
  113. package/dist/bin/commands/remediation.d.ts.map +1 -0
  114. package/dist/bin/commands/remediation.js +133 -0
  115. package/dist/bin/commands/remediation.js.map +7 -0
  116. package/dist/bin/commands/sbom.d.ts +3 -0
  117. package/dist/bin/commands/sbom.d.ts.map +1 -0
  118. package/dist/bin/commands/sbom.js +76 -0
  119. package/dist/bin/commands/sbom.js.map +7 -0
  120. package/dist/bin/commands/security-ci-report.d.ts +9 -0
  121. package/dist/bin/commands/security-ci-report.d.ts.map +1 -0
  122. package/dist/bin/commands/security-ci-report.js +267 -0
  123. package/dist/bin/commands/security-ci-report.js.map +7 -0
  124. package/dist/bin/commands/security-export.d.ts +2 -0
  125. package/dist/bin/commands/security-export.d.ts.map +1 -0
  126. package/dist/bin/commands/security-export.js +1349 -0
  127. package/dist/bin/commands/security-export.js.map +7 -0
  128. package/dist/bin/commands/security-flows.d.ts +3 -0
  129. package/dist/bin/commands/security-flows.d.ts.map +1 -0
  130. package/dist/bin/commands/security-flows.js +126 -0
  131. package/dist/bin/commands/security-flows.js.map +7 -0
  132. package/dist/bin/commands/security-secrets.d.ts +3 -0
  133. package/dist/bin/commands/security-secrets.d.ts.map +1 -0
  134. package/dist/bin/commands/security-secrets.js +170 -0
  135. package/dist/bin/commands/security-secrets.js.map +7 -0
  136. package/dist/bin/commands/security.d.ts +3 -0
  137. package/dist/bin/commands/security.d.ts.map +1 -0
  138. package/dist/bin/commands/security.js +208 -0
  139. package/dist/bin/commands/security.js.map +7 -0
  140. package/dist/bin/commands/snapshot.d.ts +3 -0
  141. package/dist/bin/commands/snapshot.d.ts.map +1 -0
  142. package/dist/bin/commands/staleness.d.ts +3 -0
  143. package/dist/bin/commands/staleness.d.ts.map +1 -0
  144. package/dist/bin/commands/staleness.js +144 -0
  145. package/dist/bin/commands/staleness.js.map +7 -0
  146. package/dist/bin/commands/status.d.ts.map +1 -1
  147. package/dist/bin/commands/status.js +129 -2
  148. package/dist/bin/commands/status.js.map +2 -2
  149. package/dist/bin/commands/supply-chain.d.ts +3 -0
  150. package/dist/bin/commands/supply-chain.d.ts.map +1 -0
  151. package/dist/bin/commands/supply-chain.js +138 -0
  152. package/dist/bin/commands/supply-chain.js.map +7 -0
  153. package/dist/bin/commands/surprising.d.ts +3 -0
  154. package/dist/bin/commands/surprising.d.ts.map +1 -0
  155. package/dist/bin/commands/sync.d.ts.map +1 -1
  156. package/dist/bin/commands/uninit.d.ts.map +1 -1
  157. package/dist/bin/commands/uninit.js +109 -60
  158. package/dist/bin/commands/uninit.js.map +2 -2
  159. package/dist/bin/commands/utils.d.ts +5 -0
  160. package/dist/bin/commands/utils.d.ts.map +1 -1
  161. package/dist/bin/commands/vex.d.ts +3 -0
  162. package/dist/bin/commands/vex.d.ts.map +1 -0
  163. package/dist/bin/commands/vex.js +76 -0
  164. package/dist/bin/commands/vex.js.map +7 -0
  165. package/dist/bin/commands/vuln-suppress.d.ts +3 -0
  166. package/dist/bin/commands/vuln-suppress.d.ts.map +1 -0
  167. package/dist/bin/commands/vuln-suppress.js +95 -0
  168. package/dist/bin/commands/vuln-suppress.js.map +7 -0
  169. package/dist/bin/commands/vulns.d.ts +3 -0
  170. package/dist/bin/commands/vulns.d.ts.map +1 -0
  171. package/dist/bin/commands/vulns.js +382 -0
  172. package/dist/bin/commands/vulns.js.map +7 -0
  173. package/dist/bin/installer/archive.d.ts +47 -0
  174. package/dist/bin/installer/archive.d.ts.map +1 -0
  175. package/dist/bin/installer/auto-detect.d.ts +16 -0
  176. package/dist/bin/installer/auto-detect.d.ts.map +1 -0
  177. package/dist/bin/installer/auto-detect.js +125 -0
  178. package/dist/bin/installer/auto-detect.js.map +7 -0
  179. package/dist/bin/installer/caveman.d.ts +12 -0
  180. package/dist/bin/installer/caveman.d.ts.map +1 -0
  181. package/dist/bin/installer/cli-agent.d.ts +7 -2
  182. package/dist/bin/installer/cli-agent.d.ts.map +1 -1
  183. package/dist/bin/installer/cli-agent.js +32 -5
  184. package/dist/bin/installer/cli-agent.js.map +2 -2
  185. package/dist/bin/installer/common.d.ts +36 -0
  186. package/dist/bin/installer/common.d.ts.map +1 -0
  187. package/dist/bin/installer/common.js +48 -0
  188. package/dist/bin/installer/common.js.map +2 -2
  189. package/dist/bin/installer/config-prompt.d.ts +1 -1
  190. package/dist/bin/installer/config-prompt.d.ts.map +1 -1
  191. package/dist/bin/installer/config-prompt.js +85 -2
  192. package/dist/bin/installer/config-prompt.js.map +2 -2
  193. package/dist/bin/installer/dashboard.d.ts.map +1 -1
  194. package/dist/bin/installer/detect.d.ts +30 -0
  195. package/dist/bin/installer/detect.d.ts.map +1 -0
  196. package/dist/bin/installer/detect.js +309 -0
  197. package/dist/bin/installer/detect.js.map +7 -0
  198. package/dist/bin/installer/hooks.d.ts +4 -1
  199. package/dist/bin/installer/hooks.d.ts.map +1 -1
  200. package/dist/bin/installer/hooks.js +34 -0
  201. package/dist/bin/installer/hooks.js.map +2 -2
  202. package/dist/bin/installer/index.d.ts +5 -4
  203. package/dist/bin/installer/index.d.ts.map +1 -1
  204. package/dist/bin/installer/index.js +46 -8
  205. package/dist/bin/installer/index.js.map +2 -2
  206. package/dist/bin/installer/instructions.d.ts +14 -0
  207. package/dist/bin/installer/instructions.d.ts.map +1 -0
  208. package/dist/bin/installer/instructions.js +209 -3
  209. package/dist/bin/installer/instructions.js.map +2 -2
  210. package/dist/bin/installer/mcp.d.ts.map +1 -1
  211. package/dist/bin/installer/prompts.d.ts +17 -0
  212. package/dist/bin/installer/prompts.d.ts.map +1 -1
  213. package/dist/bin/installer/qdrant-dashboard.d.ts.map +1 -1
  214. package/dist/bin/installer/steering.d.ts +14 -2
  215. package/dist/bin/installer/steering.d.ts.map +1 -1
  216. package/dist/bin/installer/steering.js +488 -0
  217. package/dist/bin/installer/steering.js.map +2 -2
  218. package/dist/bin/installer/targets/aider.d.ts +6 -0
  219. package/dist/bin/installer/targets/aider.d.ts.map +1 -0
  220. package/dist/bin/installer/targets/aider.js +3 -3
  221. package/dist/bin/installer/targets/aider.js.map +2 -2
  222. package/dist/bin/installer/targets/amp.d.ts +6 -0
  223. package/dist/bin/installer/targets/amp.d.ts.map +1 -0
  224. package/dist/bin/installer/targets/amp.js +3 -3
  225. package/dist/bin/installer/targets/amp.js.map +2 -2
  226. package/dist/bin/installer/targets/antigravity.d.ts +13 -0
  227. package/dist/bin/installer/targets/antigravity.d.ts.map +1 -0
  228. package/dist/bin/installer/targets/antigravity.js +35 -6
  229. package/dist/bin/installer/targets/antigravity.js.map +2 -2
  230. package/dist/bin/installer/targets/augment.d.ts +6 -0
  231. package/dist/bin/installer/targets/augment.d.ts.map +1 -0
  232. package/dist/bin/installer/targets/augment.js +3 -3
  233. package/dist/bin/installer/targets/augment.js.map +2 -2
  234. package/dist/bin/installer/targets/claude.d.ts +6 -0
  235. package/dist/bin/installer/targets/claude.d.ts.map +1 -0
  236. package/dist/bin/installer/targets/claude.js +49 -5
  237. package/dist/bin/installer/targets/claude.js.map +2 -2
  238. package/dist/bin/installer/targets/cline.d.ts +13 -0
  239. package/dist/bin/installer/targets/cline.d.ts.map +1 -0
  240. package/dist/bin/installer/targets/cline.js +32 -6
  241. package/dist/bin/installer/targets/cline.js.map +2 -2
  242. package/dist/bin/installer/targets/codex.d.ts +6 -0
  243. package/dist/bin/installer/targets/codex.d.ts.map +1 -0
  244. package/dist/bin/installer/targets/codex.js +64 -12
  245. package/dist/bin/installer/targets/codex.js.map +2 -2
  246. package/dist/bin/installer/targets/continue.d.ts +12 -0
  247. package/dist/bin/installer/targets/continue.d.ts.map +1 -0
  248. package/dist/bin/installer/targets/continue.js +2 -2
  249. package/dist/bin/installer/targets/continue.js.map +2 -2
  250. package/dist/bin/installer/targets/copilot-cli.d.ts +12 -0
  251. package/dist/bin/installer/targets/copilot-cli.d.ts.map +1 -0
  252. package/dist/bin/installer/targets/copilot-cli.js +101 -0
  253. package/dist/bin/installer/targets/copilot-cli.js.map +7 -0
  254. package/dist/bin/installer/targets/copilot.d.ts +6 -0
  255. package/dist/bin/installer/targets/copilot.d.ts.map +1 -0
  256. package/dist/bin/installer/targets/copilot.js +31 -5
  257. package/dist/bin/installer/targets/copilot.js.map +2 -2
  258. package/dist/bin/installer/targets/cursor.d.ts +6 -0
  259. package/dist/bin/installer/targets/cursor.d.ts.map +1 -0
  260. package/dist/bin/installer/targets/cursor.js +4 -4
  261. package/dist/bin/installer/targets/cursor.js.map +2 -2
  262. package/dist/bin/installer/targets/devin.d.ts +13 -0
  263. package/dist/bin/installer/targets/devin.d.ts.map +1 -0
  264. package/dist/bin/installer/targets/devin.js +2 -2
  265. package/dist/bin/installer/targets/devin.js.map +2 -2
  266. package/dist/bin/installer/targets/gemini-cli.d.ts +16 -0
  267. package/dist/bin/installer/targets/gemini-cli.d.ts.map +1 -0
  268. package/dist/bin/installer/targets/gemini-cli.js +2 -2
  269. package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
  270. package/dist/bin/installer/targets/generic.d.ts +59 -0
  271. package/dist/bin/installer/targets/generic.d.ts.map +1 -0
  272. package/dist/bin/installer/targets/generic.js +2 -14
  273. package/dist/bin/installer/targets/generic.js.map +2 -2
  274. package/dist/bin/installer/targets/goose.d.ts +6 -0
  275. package/dist/bin/installer/targets/goose.d.ts.map +1 -0
  276. package/dist/bin/installer/targets/goose.js +3 -3
  277. package/dist/bin/installer/targets/goose.js.map +2 -2
  278. package/dist/bin/installer/targets/index.d.ts +11 -0
  279. package/dist/bin/installer/targets/index.d.ts.map +1 -0
  280. package/dist/bin/installer/targets/index.js +250 -0
  281. package/dist/bin/installer/targets/index.js.map +2 -2
  282. package/dist/bin/installer/targets/junie.d.ts +13 -0
  283. package/dist/bin/installer/targets/junie.d.ts.map +1 -0
  284. package/dist/bin/installer/targets/junie.js +2 -2
  285. package/dist/bin/installer/targets/junie.js.map +2 -2
  286. package/dist/bin/installer/targets/kilo.d.ts +12 -0
  287. package/dist/bin/installer/targets/kilo.d.ts.map +1 -0
  288. package/dist/bin/installer/targets/kilo.js +2 -2
  289. package/dist/bin/installer/targets/kilo.js.map +2 -2
  290. package/dist/bin/installer/targets/kiro.d.ts +5 -0
  291. package/dist/bin/installer/targets/kiro.d.ts.map +1 -0
  292. package/dist/bin/installer/targets/kiro.js +4 -4
  293. package/dist/bin/installer/targets/kiro.js.map +2 -2
  294. package/dist/bin/installer/targets/opencode.d.ts +13 -0
  295. package/dist/bin/installer/targets/opencode.d.ts.map +1 -0
  296. package/dist/bin/installer/targets/opencode.js +2 -2
  297. package/dist/bin/installer/targets/opencode.js.map +2 -2
  298. package/dist/bin/installer/targets/openhands.d.ts +6 -0
  299. package/dist/bin/installer/targets/openhands.d.ts.map +1 -0
  300. package/dist/bin/installer/targets/openhands.js +3 -3
  301. package/dist/bin/installer/targets/openhands.js.map +2 -2
  302. package/dist/bin/installer/targets/qoder.d.ts +12 -0
  303. package/dist/bin/installer/targets/qoder.d.ts.map +1 -0
  304. package/dist/bin/installer/targets/qoder.js +91 -0
  305. package/dist/bin/installer/targets/qoder.js.map +7 -0
  306. package/dist/bin/installer/targets/qwen.d.ts +12 -0
  307. package/dist/bin/installer/targets/qwen.d.ts.map +1 -0
  308. package/dist/bin/installer/targets/qwen.js +96 -0
  309. package/dist/bin/installer/targets/qwen.js.map +7 -0
  310. package/dist/bin/installer/targets/replit.d.ts +6 -0
  311. package/dist/bin/installer/targets/replit.d.ts.map +1 -0
  312. package/dist/bin/installer/targets/replit.js +3 -3
  313. package/dist/bin/installer/targets/replit.js.map +2 -2
  314. package/dist/bin/installer/targets/roo.d.ts +13 -0
  315. package/dist/bin/installer/targets/roo.d.ts.map +1 -0
  316. package/dist/bin/installer/targets/roo.js +2 -2
  317. package/dist/bin/installer/targets/roo.js.map +2 -2
  318. package/dist/bin/installer/targets/tabnine.d.ts +6 -0
  319. package/dist/bin/installer/targets/tabnine.d.ts.map +1 -0
  320. package/dist/bin/installer/targets/tabnine.js +3 -3
  321. package/dist/bin/installer/targets/tabnine.js.map +2 -2
  322. package/dist/bin/installer/targets/trae.d.ts +6 -0
  323. package/dist/bin/installer/targets/trae.d.ts.map +1 -0
  324. package/dist/bin/installer/targets/trae.js +5 -5
  325. package/dist/bin/installer/targets/trae.js.map +2 -2
  326. package/dist/bin/installer/targets/warp.d.ts +12 -0
  327. package/dist/bin/installer/targets/warp.d.ts.map +1 -0
  328. package/dist/bin/installer/targets/warp.js +2 -2
  329. package/dist/bin/installer/targets/warp.js.map +2 -2
  330. package/dist/bin/installer/targets/windsurf.d.ts +13 -0
  331. package/dist/bin/installer/targets/windsurf.d.ts.map +1 -0
  332. package/dist/bin/installer/targets/windsurf.js +35 -6
  333. package/dist/bin/installer/targets/windsurf.js.map +2 -2
  334. package/dist/bin/kirograph.js +74 -6
  335. package/dist/bin/kirograph.js.map +3 -3
  336. package/dist/bin/progress.d.ts +16 -1
  337. package/dist/bin/progress.d.ts.map +1 -1
  338. package/dist/compression/filters/aws.d.ts +9 -0
  339. package/dist/compression/filters/aws.d.ts.map +1 -0
  340. package/dist/compression/filters/docker.d.ts +6 -0
  341. package/dist/compression/filters/docker.d.ts.map +1 -0
  342. package/dist/compression/filters/files.d.ts +6 -0
  343. package/dist/compression/filters/files.d.ts.map +1 -0
  344. package/dist/compression/filters/generic.d.ts +7 -0
  345. package/dist/compression/filters/generic.d.ts.map +1 -0
  346. package/dist/compression/filters/git.d.ts +6 -0
  347. package/dist/compression/filters/git.d.ts.map +1 -0
  348. package/dist/compression/filters/github.d.ts +6 -0
  349. package/dist/compression/filters/github.d.ts.map +1 -0
  350. package/dist/compression/filters/lint.d.ts +6 -0
  351. package/dist/compression/filters/lint.d.ts.map +1 -0
  352. package/dist/compression/filters/misc.d.ts +6 -0
  353. package/dist/compression/filters/misc.d.ts.map +1 -0
  354. package/dist/compression/filters/package.d.ts +6 -0
  355. package/dist/compression/filters/package.d.ts.map +1 -0
  356. package/dist/compression/filters/test.d.ts +6 -0
  357. package/dist/compression/filters/test.d.ts.map +1 -0
  358. package/dist/compression/index.d.ts +29 -0
  359. package/dist/compression/index.d.ts.map +1 -0
  360. package/dist/compression/naive-cost.d.ts +26 -0
  361. package/dist/compression/naive-cost.d.ts.map +1 -0
  362. package/dist/compression/tracker.d.ts +155 -0
  363. package/dist/compression/tracker.d.ts.map +1 -0
  364. package/dist/compression/tracker.js +80 -0
  365. package/dist/compression/tracker.js.map +2 -2
  366. package/dist/compression/types.d.ts +49 -0
  367. package/dist/compression/types.d.ts.map +1 -0
  368. package/dist/config.d.ts +90 -0
  369. package/dist/config.d.ts.map +1 -1
  370. package/dist/config.js +144 -3
  371. package/dist/config.js.map +2 -2
  372. package/dist/core/lock-manager.d.ts +2 -0
  373. package/dist/core/lock-manager.d.ts.map +1 -1
  374. package/dist/core/pipeline.d.ts +4 -1
  375. package/dist/core/pipeline.d.ts.map +1 -1
  376. package/dist/core/pipeline.js +78 -2
  377. package/dist/core/pipeline.js.map +2 -2
  378. package/dist/core/snapshot.d.ts +58 -0
  379. package/dist/core/snapshot.d.ts.map +1 -0
  380. package/dist/data/filters.d.ts +23 -0
  381. package/dist/data/filters.d.ts.map +1 -0
  382. package/dist/data/indexer.d.ts +25 -0
  383. package/dist/data/indexer.d.ts.map +1 -0
  384. package/dist/data/linker.d.ts +37 -0
  385. package/dist/data/linker.d.ts.map +1 -0
  386. package/dist/data/lint.d.ts +27 -0
  387. package/dist/data/lint.d.ts.map +1 -0
  388. package/dist/data/parsers/csv.d.ts +11 -0
  389. package/dist/data/parsers/csv.d.ts.map +1 -0
  390. package/dist/data/parsers/excel.d.ts +10 -0
  391. package/dist/data/parsers/excel.d.ts.map +1 -0
  392. package/dist/data/parsers/index.d.ts +28 -0
  393. package/dist/data/parsers/index.d.ts.map +1 -0
  394. package/dist/data/parsers/json-array.d.ts +9 -0
  395. package/dist/data/parsers/json-array.d.ts.map +1 -0
  396. package/dist/data/parsers/jsonl.d.ts +9 -0
  397. package/dist/data/parsers/jsonl.d.ts.map +1 -0
  398. package/dist/data/parsers/parquet.d.ts +10 -0
  399. package/dist/data/parsers/parquet.d.ts.map +1 -0
  400. package/dist/data/profiler.d.ts +29 -0
  401. package/dist/data/profiler.d.ts.map +1 -0
  402. package/dist/data/queries.d.ts +95 -0
  403. package/dist/data/queries.d.ts.map +1 -0
  404. package/dist/data/types.d.ts +103 -0
  405. package/dist/data/types.d.ts.map +1 -0
  406. package/dist/db/database.d.ts +57 -0
  407. package/dist/db/database.d.ts.map +1 -1
  408. package/dist/db/database.js +75 -5
  409. package/dist/db/database.js.map +2 -2
  410. package/dist/db/memory-schema.sql +5 -1
  411. package/dist/db/patterns-schema.sql +23 -0
  412. package/dist/db/schema.sql +3 -1
  413. package/dist/db/security-schema.sql +72 -0
  414. package/dist/docs/formats/asciidoc.d.ts +9 -0
  415. package/dist/docs/formats/asciidoc.d.ts.map +1 -0
  416. package/dist/docs/formats/html.d.ts +10 -0
  417. package/dist/docs/formats/html.d.ts.map +1 -0
  418. package/dist/docs/formats/index.d.ts +31 -0
  419. package/dist/docs/formats/index.d.ts.map +1 -0
  420. package/dist/docs/formats/markdown.d.ts +11 -0
  421. package/dist/docs/formats/markdown.d.ts.map +1 -0
  422. package/dist/docs/formats/openapi.d.ts +17 -0
  423. package/dist/docs/formats/openapi.d.ts.map +1 -0
  424. package/dist/docs/formats/org.d.ts +9 -0
  425. package/dist/docs/formats/org.d.ts.map +1 -0
  426. package/dist/docs/formats/plaintext.d.ts +11 -0
  427. package/dist/docs/formats/plaintext.d.ts.map +1 -0
  428. package/dist/docs/formats/rdoc.d.ts +10 -0
  429. package/dist/docs/formats/rdoc.d.ts.map +1 -0
  430. package/dist/docs/formats/rst.d.ts +11 -0
  431. package/dist/docs/formats/rst.d.ts.map +1 -0
  432. package/dist/docs/indexer.d.ts +49 -0
  433. package/dist/docs/indexer.d.ts.map +1 -0
  434. package/dist/docs/linker.d.ts +30 -0
  435. package/dist/docs/linker.d.ts.map +1 -0
  436. package/dist/docs/lint.d.ts +27 -0
  437. package/dist/docs/lint.d.ts.map +1 -0
  438. package/dist/docs/queries.d.ts +78 -0
  439. package/dist/docs/queries.d.ts.map +1 -0
  440. package/dist/docs/section-id.d.ts +48 -0
  441. package/dist/docs/section-id.d.ts.map +1 -0
  442. package/dist/docs/summarizer.d.ts +13 -0
  443. package/dist/docs/summarizer.d.ts.map +1 -0
  444. package/dist/docs/types.d.ts +71 -0
  445. package/dist/docs/types.d.ts.map +1 -0
  446. package/dist/docs/vectors.d.ts +54 -0
  447. package/dist/docs/vectors.d.ts.map +1 -0
  448. package/dist/extraction/extractor.d.ts +1 -1
  449. package/dist/extraction/extractor.d.ts.map +1 -1
  450. package/dist/extraction/extractor.js +81 -0
  451. package/dist/extraction/extractor.js.map +2 -2
  452. package/dist/extraction/grammars.d.ts +6 -0
  453. package/dist/extraction/grammars.d.ts.map +1 -1
  454. package/dist/extraction/grammars.js +32 -8
  455. package/dist/extraction/grammars.js.map +2 -2
  456. package/dist/extraction/languages.d.ts.map +1 -1
  457. package/dist/extraction/languages.js +43 -1
  458. package/dist/extraction/languages.js.map +2 -2
  459. package/dist/extraction/notebook.d.ts +14 -0
  460. package/dist/extraction/notebook.d.ts.map +1 -0
  461. package/dist/extraction/notebook.js +300 -0
  462. package/dist/extraction/notebook.js.map +7 -0
  463. package/dist/extraction/wasm/tree-sitter-astro.wasm +0 -0
  464. package/dist/extraction/wasm/tree-sitter-gdscript.wasm +0 -0
  465. package/dist/extraction/wasm/tree-sitter-julia.wasm +0 -0
  466. package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
  467. package/dist/extraction/wasm/tree-sitter-perl.wasm +0 -0
  468. package/dist/extraction/wasm/tree-sitter-powershell.wasm +0 -0
  469. package/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
  470. package/dist/extraction/wasm/tree-sitter-sql.wasm +0 -0
  471. package/dist/extraction/wasm/tree-sitter-verilog.wasm +0 -0
  472. package/dist/frameworks/amplify.d.ts +9 -0
  473. package/dist/frameworks/amplify.d.ts.map +1 -0
  474. package/dist/frameworks/angular.d.ts +9 -0
  475. package/dist/frameworks/angular.d.ts.map +1 -0
  476. package/dist/frameworks/ansible.d.ts +8 -0
  477. package/dist/frameworks/ansible.d.ts.map +1 -0
  478. package/dist/frameworks/cloudformation.d.ts +9 -0
  479. package/dist/frameworks/cloudformation.d.ts.map +1 -0
  480. package/dist/frameworks/docker.d.ts +9 -0
  481. package/dist/frameworks/docker.d.ts.map +1 -0
  482. package/dist/frameworks/elixir.d.ts +6 -0
  483. package/dist/frameworks/elixir.d.ts.map +1 -0
  484. package/dist/frameworks/flutter.d.ts +12 -0
  485. package/dist/frameworks/flutter.d.ts.map +1 -0
  486. package/dist/frameworks/flutter.js +130 -0
  487. package/dist/frameworks/flutter.js.map +7 -0
  488. package/dist/frameworks/iac.d.ts +10 -0
  489. package/dist/frameworks/iac.d.ts.map +1 -0
  490. package/dist/frameworks/index.d.ts +14 -0
  491. package/dist/frameworks/index.d.ts.map +1 -1
  492. package/dist/frameworks/index.js +7 -1
  493. package/dist/frameworks/index.js.map +3 -3
  494. package/dist/frameworks/kubernetes.d.ts +9 -0
  495. package/dist/frameworks/kubernetes.d.ts.map +1 -0
  496. package/dist/frameworks/pulumi.d.ts +9 -0
  497. package/dist/frameworks/pulumi.d.ts.map +1 -0
  498. package/dist/frameworks/scala.d.ts +6 -0
  499. package/dist/frameworks/scala.d.ts.map +1 -0
  500. package/dist/frameworks/solidity.d.ts +6 -0
  501. package/dist/frameworks/solidity.d.ts.map +1 -0
  502. package/dist/frameworks/terraform.d.ts +14 -0
  503. package/dist/frameworks/terraform.d.ts.map +1 -0
  504. package/dist/frameworks/vue.d.ts +7 -0
  505. package/dist/frameworks/vue.d.ts.map +1 -0
  506. package/dist/graph/communities.d.ts +43 -0
  507. package/dist/graph/communities.d.ts.map +1 -0
  508. package/dist/graph/communities.js +317 -0
  509. package/dist/graph/communities.js.map +7 -0
  510. package/dist/graph/flows.d.ts +55 -0
  511. package/dist/graph/flows.d.ts.map +1 -0
  512. package/dist/graph/flows.js +138 -0
  513. package/dist/graph/flows.js.map +7 -0
  514. package/dist/graph/refactor.d.ts +43 -0
  515. package/dist/graph/refactor.d.ts.map +1 -0
  516. package/dist/graph/refactor.js +155 -0
  517. package/dist/graph/refactor.js.map +7 -0
  518. package/dist/index.d.ts +36 -4
  519. package/dist/index.d.ts.map +1 -1
  520. package/dist/index.js +1 -1
  521. package/dist/index.js.map +2 -2
  522. package/dist/mcp/cache.d.ts +69 -0
  523. package/dist/mcp/cache.d.ts.map +1 -0
  524. package/dist/mcp/cache.js +172 -0
  525. package/dist/mcp/cache.js.map +7 -0
  526. package/dist/mcp/read-modes.d.ts +31 -0
  527. package/dist/mcp/read-modes.d.ts.map +1 -0
  528. package/dist/mcp/read-modes.js +295 -0
  529. package/dist/mcp/read-modes.js.map +7 -0
  530. package/dist/mcp/server.d.ts +1 -0
  531. package/dist/mcp/server.d.ts.map +1 -1
  532. package/dist/mcp/server.js +17 -3
  533. package/dist/mcp/server.js.map +2 -2
  534. package/dist/mcp/tool-names.d.ts +2 -0
  535. package/dist/mcp/tool-names.d.ts.map +1 -0
  536. package/dist/mcp/tool-names.js +24 -1
  537. package/dist/mcp/tool-names.js.map +2 -2
  538. package/dist/mcp/tools.d.ts +12 -0
  539. package/dist/mcp/tools.d.ts.map +1 -1
  540. package/dist/mcp/tools.js +1560 -4
  541. package/dist/mcp/tools.js.map +3 -3
  542. package/dist/memory/compress.d.ts +19 -0
  543. package/dist/memory/compress.d.ts.map +1 -0
  544. package/dist/memory/database.d.ts +92 -0
  545. package/dist/memory/database.d.ts.map +1 -0
  546. package/dist/memory/database.js +70 -2
  547. package/dist/memory/database.js.map +2 -2
  548. package/dist/memory/index.d.ts +71 -0
  549. package/dist/memory/index.d.ts.map +1 -0
  550. package/dist/memory/index.js +12 -2
  551. package/dist/memory/index.js.map +2 -2
  552. package/dist/memory/symbols.d.ts +21 -0
  553. package/dist/memory/symbols.d.ts.map +1 -0
  554. package/dist/memory/types.d.ts +78 -0
  555. package/dist/memory/types.d.ts.map +1 -0
  556. package/dist/memory/types.js.map +1 -1
  557. package/dist/memory/vectors.d.ts +43 -0
  558. package/dist/memory/vectors.d.ts.map +1 -0
  559. package/dist/patterns/graph.d.ts +16 -0
  560. package/dist/patterns/graph.d.ts.map +1 -0
  561. package/dist/patterns/graph.js +45 -0
  562. package/dist/patterns/graph.js.map +7 -0
  563. package/dist/patterns/index.d.ts +4 -0
  564. package/dist/patterns/index.d.ts.map +1 -0
  565. package/dist/patterns/index.js +39 -0
  566. package/dist/patterns/index.js.map +7 -0
  567. package/dist/patterns/indexer.d.ts +15 -0
  568. package/dist/patterns/indexer.d.ts.map +1 -0
  569. package/dist/patterns/indexer.js +97 -0
  570. package/dist/patterns/indexer.js.map +7 -0
  571. package/dist/patterns/library/command-injection-go.yaml +11 -0
  572. package/dist/patterns/library/dangerous-eval-js.yaml +14 -0
  573. package/dist/patterns/library/dangerous-exec-py.yaml +13 -0
  574. package/dist/patterns/library/dangerous-reflection-java.yaml +8 -0
  575. package/dist/patterns/library/path-traversal-go.yaml +11 -0
  576. package/dist/patterns/library/path-traversal-py.yaml +12 -0
  577. package/dist/patterns/library/path-traversal-readfile-js.yaml +14 -0
  578. package/dist/patterns/library/prototype-pollution-js.yaml +12 -0
  579. package/dist/patterns/library/sql-injection-concat-js.yaml +12 -0
  580. package/dist/patterns/library/sql-injection-java.yaml +13 -0
  581. package/dist/patterns/library/sql-injection-py.yaml +12 -0
  582. package/dist/patterns/library/sql-injection-template-js.yaml +13 -0
  583. package/dist/patterns/library/weak-crypto-md5-js.yaml +13 -0
  584. package/dist/patterns/library/weak-crypto-py.yaml +13 -0
  585. package/dist/patterns/loader.d.ts +18 -0
  586. package/dist/patterns/loader.d.ts.map +1 -0
  587. package/dist/patterns/loader.js +277 -0
  588. package/dist/patterns/loader.js.map +7 -0
  589. package/dist/patterns/runner.d.ts +42 -0
  590. package/dist/patterns/runner.d.ts.map +1 -0
  591. package/dist/patterns/runner.js +277 -0
  592. package/dist/patterns/runner.js.map +7 -0
  593. package/dist/patterns/types.d.ts +27 -0
  594. package/dist/patterns/types.d.ts.map +1 -0
  595. package/dist/patterns/types.js +34 -0
  596. package/dist/patterns/types.js.map +7 -0
  597. package/dist/resolution/bridges/android-rn.d.ts +13 -0
  598. package/dist/resolution/bridges/android-rn.d.ts.map +1 -0
  599. package/dist/resolution/bridges/android-rn.js +298 -0
  600. package/dist/resolution/bridges/android-rn.js.map +7 -0
  601. package/dist/resolution/bridges/expo-modules.d.ts +10 -0
  602. package/dist/resolution/bridges/expo-modules.d.ts.map +1 -0
  603. package/dist/resolution/bridges/expo-modules.js +155 -0
  604. package/dist/resolution/bridges/expo-modules.js.map +7 -0
  605. package/dist/resolution/bridges/flutter-channel.d.ts +14 -0
  606. package/dist/resolution/bridges/flutter-channel.d.ts.map +1 -0
  607. package/dist/resolution/bridges/flutter-channel.js +385 -0
  608. package/dist/resolution/bridges/flutter-channel.js.map +7 -0
  609. package/dist/resolution/bridges/index.d.ts +40 -0
  610. package/dist/resolution/bridges/index.d.ts.map +1 -0
  611. package/dist/resolution/bridges/index.js +80 -0
  612. package/dist/resolution/bridges/index.js.map +7 -0
  613. package/dist/resolution/bridges/native-events.d.ts +10 -0
  614. package/dist/resolution/bridges/native-events.d.ts.map +1 -0
  615. package/dist/resolution/bridges/native-events.js +188 -0
  616. package/dist/resolution/bridges/native-events.js.map +7 -0
  617. package/dist/resolution/bridges/native-views.d.ts +13 -0
  618. package/dist/resolution/bridges/native-views.d.ts.map +1 -0
  619. package/dist/resolution/bridges/native-views.js +244 -0
  620. package/dist/resolution/bridges/native-views.js.map +7 -0
  621. package/dist/resolution/bridges/react-native.d.ts +9 -0
  622. package/dist/resolution/bridges/react-native.d.ts.map +1 -0
  623. package/dist/resolution/bridges/react-native.js +161 -0
  624. package/dist/resolution/bridges/react-native.js.map +7 -0
  625. package/dist/resolution/bridges/swift-objc.d.ts +14 -0
  626. package/dist/resolution/bridges/swift-objc.d.ts.map +1 -0
  627. package/dist/resolution/bridges/swift-objc.js +227 -0
  628. package/dist/resolution/bridges/swift-objc.js.map +7 -0
  629. package/dist/resolution/bridges/turbomodules.d.ts +10 -0
  630. package/dist/resolution/bridges/turbomodules.d.ts.map +1 -0
  631. package/dist/resolution/bridges/turbomodules.js +216 -0
  632. package/dist/resolution/bridges/turbomodules.js.map +7 -0
  633. package/dist/resolution/index.d.ts +28 -3
  634. package/dist/resolution/index.d.ts.map +1 -1
  635. package/dist/resolution/index.js +61 -2
  636. package/dist/resolution/index.js.map +2 -2
  637. package/dist/security/attack-surface.d.ts +46 -0
  638. package/dist/security/attack-surface.d.ts.map +1 -0
  639. package/dist/security/attack-surface.js +206 -0
  640. package/dist/security/attack-surface.js.map +7 -0
  641. package/dist/security/context-warnings.d.ts +40 -0
  642. package/dist/security/context-warnings.d.ts.map +1 -0
  643. package/dist/security/context-warnings.js +123 -0
  644. package/dist/security/context-warnings.js.map +7 -0
  645. package/dist/security/data-flows.d.ts +33 -0
  646. package/dist/security/data-flows.d.ts.map +1 -0
  647. package/dist/security/data-flows.js +286 -0
  648. package/dist/security/data-flows.js.map +7 -0
  649. package/dist/security/dep-confusion.d.ts +23 -0
  650. package/dist/security/dep-confusion.d.ts.map +1 -0
  651. package/dist/security/dep-confusion.js +255 -0
  652. package/dist/security/dep-confusion.js.map +7 -0
  653. package/dist/security/errors.d.ts +16 -0
  654. package/dist/security/errors.d.ts.map +1 -0
  655. package/dist/security/errors.js +51 -0
  656. package/dist/security/errors.js.map +7 -0
  657. package/dist/security/export/fix-suggestions.d.ts +21 -0
  658. package/dist/security/export/fix-suggestions.d.ts.map +1 -0
  659. package/dist/security/export/fix-suggestions.js +58 -0
  660. package/dist/security/export/fix-suggestions.js.map +7 -0
  661. package/dist/security/export/sbom.d.ts +33 -0
  662. package/dist/security/export/sbom.d.ts.map +1 -0
  663. package/dist/security/export/sbom.js +230 -0
  664. package/dist/security/export/sbom.js.map +7 -0
  665. package/dist/security/export/serialization.d.ts +62 -0
  666. package/dist/security/export/serialization.d.ts.map +1 -0
  667. package/dist/security/export/serialization.js +142 -0
  668. package/dist/security/export/serialization.js.map +7 -0
  669. package/dist/security/export/vex.d.ts +58 -0
  670. package/dist/security/export/vex.d.ts.map +1 -0
  671. package/dist/security/export/vex.js +220 -0
  672. package/dist/security/export/vex.js.map +7 -0
  673. package/dist/security/index.d.ts +21 -0
  674. package/dist/security/index.d.ts.map +1 -0
  675. package/dist/security/index.js +67 -0
  676. package/dist/security/index.js.map +7 -0
  677. package/dist/security/integrator.d.ts +63 -0
  678. package/dist/security/integrator.d.ts.map +1 -0
  679. package/dist/security/integrator.js +491 -0
  680. package/dist/security/integrator.js.map +7 -0
  681. package/dist/security/license.d.ts +33 -0
  682. package/dist/security/license.d.ts.map +1 -0
  683. package/dist/security/license.js +70 -0
  684. package/dist/security/license.js.map +7 -0
  685. package/dist/security/manifest/adapter.d.ts +92 -0
  686. package/dist/security/manifest/adapter.d.ts.map +1 -0
  687. package/dist/security/manifest/adapter.js +243 -0
  688. package/dist/security/manifest/adapter.js.map +7 -0
  689. package/dist/security/manifest/parser.d.ts +73 -0
  690. package/dist/security/manifest/parser.d.ts.map +1 -0
  691. package/dist/security/manifest/parser.js +376 -0
  692. package/dist/security/manifest/parser.js.map +7 -0
  693. package/dist/security/manifest/plugins/cargo.d.ts +11 -0
  694. package/dist/security/manifest/plugins/cargo.d.ts.map +1 -0
  695. package/dist/security/manifest/plugins/cargo.js +233 -0
  696. package/dist/security/manifest/plugins/cargo.js.map +7 -0
  697. package/dist/security/manifest/plugins/composer.d.ts +11 -0
  698. package/dist/security/manifest/plugins/composer.d.ts.map +1 -0
  699. package/dist/security/manifest/plugins/composer.js +152 -0
  700. package/dist/security/manifest/plugins/composer.js.map +7 -0
  701. package/dist/security/manifest/plugins/go.d.ts +12 -0
  702. package/dist/security/manifest/plugins/go.d.ts.map +1 -0
  703. package/dist/security/manifest/plugins/go.js +146 -0
  704. package/dist/security/manifest/plugins/go.js.map +7 -0
  705. package/dist/security/manifest/plugins/gradle.d.ts +12 -0
  706. package/dist/security/manifest/plugins/gradle.d.ts.map +1 -0
  707. package/dist/security/manifest/plugins/gradle.js +159 -0
  708. package/dist/security/manifest/plugins/gradle.js.map +7 -0
  709. package/dist/security/manifest/plugins/hex.d.ts +11 -0
  710. package/dist/security/manifest/plugins/hex.d.ts.map +1 -0
  711. package/dist/security/manifest/plugins/hex.js +159 -0
  712. package/dist/security/manifest/plugins/hex.js.map +7 -0
  713. package/dist/security/manifest/plugins/maven.d.ts +11 -0
  714. package/dist/security/manifest/plugins/maven.d.ts.map +1 -0
  715. package/dist/security/manifest/plugins/maven.js +128 -0
  716. package/dist/security/manifest/plugins/maven.js.map +7 -0
  717. package/dist/security/manifest/plugins/npm.d.ts +11 -0
  718. package/dist/security/manifest/plugins/npm.d.ts.map +1 -0
  719. package/dist/security/manifest/plugins/npm.js +284 -0
  720. package/dist/security/manifest/plugins/npm.js.map +7 -0
  721. package/dist/security/manifest/plugins/nuget.d.ts +12 -0
  722. package/dist/security/manifest/plugins/nuget.d.ts.map +1 -0
  723. package/dist/security/manifest/plugins/nuget.js +186 -0
  724. package/dist/security/manifest/plugins/nuget.js.map +7 -0
  725. package/dist/security/manifest/plugins/pip.d.ts +11 -0
  726. package/dist/security/manifest/plugins/pip.d.ts.map +1 -0
  727. package/dist/security/manifest/plugins/pip.js +123 -0
  728. package/dist/security/manifest/plugins/pip.js.map +7 -0
  729. package/dist/security/manifest/plugins/pubspec.d.ts +11 -0
  730. package/dist/security/manifest/plugins/pubspec.d.ts.map +1 -0
  731. package/dist/security/manifest/plugins/pubspec.js +212 -0
  732. package/dist/security/manifest/plugins/pubspec.js.map +7 -0
  733. package/dist/security/manifest/plugins/pyproject.d.ts +3 -0
  734. package/dist/security/manifest/plugins/pyproject.d.ts.map +1 -0
  735. package/dist/security/manifest/plugins/pyproject.js +261 -0
  736. package/dist/security/manifest/plugins/pyproject.js.map +7 -0
  737. package/dist/security/manifest/plugins/rubygems.d.ts +11 -0
  738. package/dist/security/manifest/plugins/rubygems.d.ts.map +1 -0
  739. package/dist/security/manifest/plugins/rubygems.js +185 -0
  740. package/dist/security/manifest/plugins/rubygems.js.map +7 -0
  741. package/dist/security/manifest/plugins/swift.d.ts +11 -0
  742. package/dist/security/manifest/plugins/swift.d.ts.map +1 -0
  743. package/dist/security/manifest/plugins/swift.js +200 -0
  744. package/dist/security/manifest/plugins/swift.js.map +7 -0
  745. package/dist/security/owasp.d.ts +16 -0
  746. package/dist/security/owasp.d.ts.map +1 -0
  747. package/dist/security/owasp.js +104 -0
  748. package/dist/security/owasp.js.map +7 -0
  749. package/dist/security/pipeline.d.ts +37 -0
  750. package/dist/security/pipeline.d.ts.map +1 -0
  751. package/dist/security/pipeline.js +125 -0
  752. package/dist/security/pipeline.js.map +7 -0
  753. package/dist/security/reachability.d.ts +67 -0
  754. package/dist/security/reachability.d.ts.map +1 -0
  755. package/dist/security/reachability.js +276 -0
  756. package/dist/security/reachability.js.map +7 -0
  757. package/dist/security/remediation.d.ts +51 -0
  758. package/dist/security/remediation.d.ts.map +1 -0
  759. package/dist/security/remediation.js +126 -0
  760. package/dist/security/remediation.js.map +7 -0
  761. package/dist/security/secrets.d.ts +38 -0
  762. package/dist/security/secrets.d.ts.map +1 -0
  763. package/dist/security/secrets.js +176 -0
  764. package/dist/security/secrets.js.map +7 -0
  765. package/dist/security/staleness.d.ts +43 -0
  766. package/dist/security/staleness.d.ts.map +1 -0
  767. package/dist/security/staleness.js +231 -0
  768. package/dist/security/staleness.js.map +7 -0
  769. package/dist/security/supply-chain.d.ts +34 -0
  770. package/dist/security/supply-chain.d.ts.map +1 -0
  771. package/dist/security/supply-chain.js +301 -0
  772. package/dist/security/supply-chain.js.map +7 -0
  773. package/dist/security/suppressions.d.ts +18 -0
  774. package/dist/security/suppressions.d.ts.map +1 -0
  775. package/dist/security/suppressions.js +106 -0
  776. package/dist/security/suppressions.js.map +7 -0
  777. package/dist/security/types.d.ts +144 -0
  778. package/dist/security/types.d.ts.map +1 -0
  779. package/dist/security/types.js +17 -0
  780. package/dist/security/types.js.map +7 -0
  781. package/dist/security/vuln/client.d.ts +90 -0
  782. package/dist/security/vuln/client.d.ts.map +1 -0
  783. package/dist/security/vuln/client.js +355 -0
  784. package/dist/security/vuln/client.js.map +7 -0
  785. package/dist/security/vuln/epss-client.d.ts +26 -0
  786. package/dist/security/vuln/epss-client.d.ts.map +1 -0
  787. package/dist/security/vuln/epss-client.js +95 -0
  788. package/dist/security/vuln/epss-client.js.map +7 -0
  789. package/dist/security/vuln/index.d.ts +6 -0
  790. package/dist/security/vuln/index.d.ts.map +1 -0
  791. package/dist/security/vuln/index.js +29 -0
  792. package/dist/security/vuln/index.js.map +7 -0
  793. package/dist/security/vuln/osv-adapter.d.ts +58 -0
  794. package/dist/security/vuln/osv-adapter.d.ts.map +1 -0
  795. package/dist/security/vuln/osv-adapter.js +321 -0
  796. package/dist/security/vuln/osv-adapter.js.map +7 -0
  797. package/dist/security/vuln/types.d.ts +29 -0
  798. package/dist/security/vuln/types.d.ts.map +1 -0
  799. package/dist/security/vuln/types.js +17 -0
  800. package/dist/security/vuln/types.js.map +7 -0
  801. package/dist/sync/index.d.ts +4 -2
  802. package/dist/sync/index.d.ts.map +1 -1
  803. package/dist/types.d.ts +10 -4
  804. package/dist/types.d.ts.map +1 -1
  805. package/dist/types.js.map +2 -2
  806. package/dist/vectors/index.d.ts +11 -3
  807. package/dist/vectors/index.d.ts.map +1 -1
  808. package/dist/vectors/qdrant-index.d.ts +10 -3
  809. package/dist/vectors/qdrant-index.d.ts.map +1 -1
  810. package/dist/vectors/typesense-index.d.ts.map +1 -1
  811. package/dist/watchmen/index.js +83 -0
  812. package/dist/watchmen/index.js.map +7 -0
  813. package/dist/watchmen/synthesize.js +475 -0
  814. package/dist/watchmen/synthesize.js.map +7 -0
  815. package/package.json +6 -2
@@ -0,0 +1,309 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var detect_exports = {};
30
+ __export(detect_exports, {
31
+ detectPlatforms: () => detectPlatforms,
32
+ detectTargets: () => detectTargets
33
+ });
34
+ module.exports = __toCommonJS(detect_exports);
35
+ var fs = __toESM(require("fs"));
36
+ var path = __toESM(require("path"));
37
+ var import_child_process = require("child_process");
38
+ function whichExists(binary) {
39
+ try {
40
+ (0, import_child_process.execSync)(`which ${binary}`, { stdio: "ignore" });
41
+ return true;
42
+ } catch {
43
+ return false;
44
+ }
45
+ }
46
+ function dirExists(p) {
47
+ return fs.existsSync(p) && fs.statSync(p).isDirectory();
48
+ }
49
+ function fileExists(p) {
50
+ return fs.existsSync(p) && fs.statSync(p).isFile();
51
+ }
52
+ const home = process.env.HOME || process.env.USERPROFILE || "";
53
+ const DETECTORS = [
54
+ {
55
+ target: "kiro",
56
+ label: "Kiro",
57
+ reason: "",
58
+ detect: (root) => {
59
+ if (dirExists(path.join(root, ".kiro"))) return { target: "kiro", label: "Kiro", reason: ".kiro/ found in project" };
60
+ if (dirExists(path.join(home, ".kiro"))) return { target: "kiro", label: "Kiro", reason: "~/.kiro/ found" };
61
+ return false;
62
+ }
63
+ },
64
+ {
65
+ target: "claude",
66
+ label: "Claude Code",
67
+ reason: "",
68
+ detect: (root) => {
69
+ if (fileExists(path.join(root, ".mcp.json"))) return { target: "claude", label: "Claude Code", reason: ".mcp.json found in project" };
70
+ if (whichExists("claude")) return { target: "claude", label: "Claude Code", reason: "claude binary on PATH" };
71
+ return false;
72
+ }
73
+ },
74
+ {
75
+ target: "cursor",
76
+ label: "Cursor",
77
+ reason: "",
78
+ detect: (root) => {
79
+ if (dirExists(path.join(root, ".cursor"))) return { target: "cursor", label: "Cursor", reason: ".cursor/ found in project" };
80
+ if (dirExists(path.join(home, ".cursor"))) return { target: "cursor", label: "Cursor", reason: "~/.cursor/ found" };
81
+ return false;
82
+ }
83
+ },
84
+ {
85
+ target: "windsurf",
86
+ label: "Windsurf",
87
+ reason: "",
88
+ detect: () => {
89
+ if (dirExists(path.join(home, ".codeium", "windsurf"))) return { target: "windsurf", label: "Windsurf", reason: "~/.codeium/windsurf/ found" };
90
+ return false;
91
+ }
92
+ },
93
+ {
94
+ target: "codex",
95
+ label: "Codex",
96
+ reason: "",
97
+ detect: (root) => {
98
+ if (dirExists(path.join(root, ".codex"))) return { target: "codex", label: "Codex", reason: ".codex/ found in project" };
99
+ if (dirExists(path.join(home, ".codex"))) return { target: "codex", label: "Codex", reason: "~/.codex/ found" };
100
+ if (whichExists("codex")) return { target: "codex", label: "Codex", reason: "codex binary on PATH" };
101
+ return false;
102
+ }
103
+ },
104
+ {
105
+ target: "copilot",
106
+ label: "GitHub Copilot",
107
+ reason: "",
108
+ detect: (root) => {
109
+ if (dirExists(path.join(root, ".vscode"))) return { target: "copilot", label: "GitHub Copilot", reason: ".vscode/ found in project" };
110
+ if (dirExists(path.join(home, ".vscode"))) return { target: "copilot", label: "GitHub Copilot", reason: "~/.vscode/ found" };
111
+ return false;
112
+ }
113
+ },
114
+ {
115
+ target: "gemini-cli",
116
+ label: "Gemini CLI",
117
+ reason: "",
118
+ detect: (root) => {
119
+ if (dirExists(path.join(root, ".gemini"))) return { target: "gemini-cli", label: "Gemini CLI", reason: ".gemini/ found in project" };
120
+ if (whichExists("gemini")) return { target: "gemini-cli", label: "Gemini CLI", reason: "gemini binary on PATH" };
121
+ if (dirExists(path.join(home, ".gemini"))) return { target: "gemini-cli", label: "Gemini CLI", reason: "~/.gemini/ found" };
122
+ return false;
123
+ }
124
+ },
125
+ {
126
+ target: "cline",
127
+ label: "Cline",
128
+ reason: "",
129
+ detect: (root) => {
130
+ if (dirExists(path.join(root, ".cline"))) return { target: "cline", label: "Cline", reason: ".cline/ found in project" };
131
+ if (dirExists(path.join(root, ".clinerules"))) return { target: "cline", label: "Cline", reason: ".clinerules/ found in project" };
132
+ return false;
133
+ }
134
+ },
135
+ {
136
+ target: "roo",
137
+ label: "Roo Code",
138
+ reason: "",
139
+ detect: (root) => {
140
+ if (dirExists(path.join(root, ".roo"))) return { target: "roo", label: "Roo Code", reason: ".roo/ found in project" };
141
+ return false;
142
+ }
143
+ },
144
+ {
145
+ target: "warp",
146
+ label: "Warp",
147
+ reason: "",
148
+ detect: (root) => {
149
+ if (dirExists(path.join(root, ".warp"))) return { target: "warp", label: "Warp", reason: ".warp/ found in project" };
150
+ if (whichExists("warp")) return { target: "warp", label: "Warp", reason: "warp binary on PATH" };
151
+ return false;
152
+ }
153
+ },
154
+ {
155
+ target: "continue",
156
+ label: "Continue",
157
+ reason: "",
158
+ detect: (root) => {
159
+ if (dirExists(path.join(root, ".continue"))) return { target: "continue", label: "Continue", reason: ".continue/ found in project" };
160
+ if (dirExists(path.join(home, ".continue"))) return { target: "continue", label: "Continue", reason: "~/.continue/ found" };
161
+ return false;
162
+ }
163
+ },
164
+ {
165
+ target: "opencode",
166
+ label: "OpenCode",
167
+ reason: "",
168
+ detect: (root) => {
169
+ if (fileExists(path.join(root, ".opencode.json"))) return { target: "opencode", label: "OpenCode", reason: ".opencode.json found in project" };
170
+ return false;
171
+ }
172
+ },
173
+ {
174
+ target: "antigravity",
175
+ label: "Antigravity",
176
+ reason: "",
177
+ detect: () => {
178
+ if (dirExists(path.join(home, ".gemini", "antigravity"))) return { target: "antigravity", label: "Antigravity", reason: "~/.gemini/antigravity/ found" };
179
+ return false;
180
+ }
181
+ },
182
+ {
183
+ target: "trae",
184
+ label: "Trae",
185
+ reason: "",
186
+ detect: (root) => {
187
+ if (dirExists(path.join(root, ".trae"))) return { target: "trae", label: "Trae", reason: ".trae/ found in project" };
188
+ return false;
189
+ }
190
+ },
191
+ {
192
+ target: "amp",
193
+ label: "Sourcegraph Amp",
194
+ reason: "",
195
+ detect: (root) => {
196
+ if (dirExists(path.join(root, ".amp"))) return { target: "amp", label: "Sourcegraph Amp", reason: ".amp/ found in project" };
197
+ return false;
198
+ }
199
+ },
200
+ {
201
+ target: "aider",
202
+ label: "Aider",
203
+ reason: "",
204
+ detect: () => {
205
+ if (whichExists("aider")) return { target: "aider", label: "Aider", reason: "aider binary on PATH" };
206
+ return false;
207
+ }
208
+ },
209
+ {
210
+ target: "goose",
211
+ label: "Block Goose",
212
+ reason: "",
213
+ detect: () => {
214
+ if (whichExists("goose")) return { target: "goose", label: "Block Goose", reason: "goose binary on PATH" };
215
+ return false;
216
+ }
217
+ },
218
+ {
219
+ target: "junie",
220
+ label: "JetBrains Junie",
221
+ reason: "",
222
+ detect: (root) => {
223
+ if (dirExists(path.join(root, ".junie"))) return { target: "junie", label: "JetBrains Junie", reason: ".junie/ found in project" };
224
+ return false;
225
+ }
226
+ },
227
+ {
228
+ target: "augment",
229
+ label: "Augment Code",
230
+ reason: "",
231
+ detect: (root) => {
232
+ if (dirExists(path.join(root, ".augment"))) return { target: "augment", label: "Augment Code", reason: ".augment/ found in project" };
233
+ return false;
234
+ }
235
+ },
236
+ {
237
+ target: "kilo",
238
+ label: "Kilo Code",
239
+ reason: "",
240
+ detect: (root) => {
241
+ if (fileExists(path.join(root, "kilo.json"))) return { target: "kilo", label: "Kilo Code", reason: "kilo.json found in project" };
242
+ return false;
243
+ }
244
+ },
245
+ {
246
+ target: "devin",
247
+ label: "Devin",
248
+ reason: "",
249
+ detect: (root) => {
250
+ if (dirExists(path.join(root, ".devin"))) return { target: "devin", label: "Devin", reason: ".devin/ found in project" };
251
+ return false;
252
+ }
253
+ },
254
+ {
255
+ target: "openhands",
256
+ label: "OpenHands",
257
+ reason: "",
258
+ detect: (root) => {
259
+ if (dirExists(path.join(root, ".openhands"))) return { target: "openhands", label: "OpenHands", reason: ".openhands/ found in project" };
260
+ return false;
261
+ }
262
+ },
263
+ {
264
+ target: "tabnine",
265
+ label: "Tabnine",
266
+ reason: "",
267
+ detect: (root) => {
268
+ if (dirExists(path.join(root, ".tabnine"))) return { target: "tabnine", label: "Tabnine", reason: ".tabnine/ found in project" };
269
+ return false;
270
+ }
271
+ },
272
+ {
273
+ target: "replit",
274
+ label: "Replit Agent",
275
+ reason: "",
276
+ detect: (root) => {
277
+ if (fileExists(path.join(root, ".replit"))) return { target: "replit", label: "Replit Agent", reason: ".replit found in project" };
278
+ return false;
279
+ }
280
+ },
281
+ {
282
+ target: "qoder",
283
+ label: "Qoder",
284
+ reason: "",
285
+ detect: (root) => {
286
+ if (dirExists(path.join(root, ".qoder"))) return { target: "qoder", label: "Qoder", reason: ".qoder/ found in project" };
287
+ return false;
288
+ }
289
+ }
290
+ ];
291
+ function detectPlatforms(projectRoot) {
292
+ const results = [];
293
+ for (const detector of DETECTORS) {
294
+ const result = detector.detect(projectRoot);
295
+ if (result) {
296
+ results.push(result);
297
+ }
298
+ }
299
+ return results;
300
+ }
301
+ function detectTargets(projectRoot) {
302
+ return detectPlatforms(projectRoot).map((r) => r.target);
303
+ }
304
+ // Annotate the CommonJS export names for ESM import in node:
305
+ 0 && (module.exports = {
306
+ detectPlatforms,
307
+ detectTargets
308
+ });
309
+ //# sourceMappingURL=detect.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 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,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,KAAK,MAAM,OAAO,CAAC,EAAG,QAAO,EAAE,QAAQ,QAAQ,OAAO,QAAQ,QAAQ,0BAA0B;AACnH,UAAI,UAAU,KAAK,KAAK,MAAM,OAAO,CAAC,EAAG,QAAO,EAAE,QAAQ,QAAQ,OAAO,QAAQ,QAAQ,iBAAiB;AAC1G,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ,CA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K,MAAM,SAAS,CAAC,EAAG,QAAO,EAAE,QAAQ,UAAU,OAAO,gBAAgB,QAAQ,2BAA2B;AACjI,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ,CAAC,SAAS;AAChB,UAAI,UAAU,KAAK,KAAK,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,QAAQ,SAAS,OAAO,SAAS,QAAQ,2BAA2B;AACvH,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAMO,SAAS,gBAAgB,aAAwC;AACtE,QAAM,UAA6B,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;",
6
+ "names": []
7
+ }
@@ -1,5 +1,8 @@
1
1
  /**
2
2
  * KiroGraph Installer — Kiro hook file management
3
3
  */
4
- export declare function writeHooks(kiroDir: string): void;
4
+ export declare function writeHooks(kiroDir: string, opts?: {
5
+ enableCompression?: boolean;
6
+ enableMemory?: boolean;
7
+ }): void;
5
8
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/bin/installer/hooks.ts"],"names":[],"mappings":"AAAA;;GAEG;AAyGH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAgBhD"}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/bin/installer/hooks.ts"],"names":[],"mappings":"AAAA;;GAEG;AA8GH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAuChH"}
@@ -35,6 +35,33 @@ var fs = __toESM(require("fs"));
35
35
  var path = __toESM(require("path"));
36
36
  var import_errors = require("../../errors");
37
37
  const HOOK_EXT = ".kiro.hook";
38
+ function buildWatchmenHook(synthesisMode) {
39
+ if (synthesisMode === "local") {
40
+ return {
41
+ name: "KiroGraph Watchmen",
42
+ version: "1.0.0",
43
+ description: "After memory capture, run local model synthesis if enough observations have accumulated.",
44
+ when: { type: "agentStop" },
45
+ then: { type: "runCommand", command: "kirograph mem watchmen synthesize --quiet 2>&1 || true" }
46
+ };
47
+ }
48
+ return {
49
+ name: "KiroGraph Watchmen",
50
+ version: "1.0.0",
51
+ description: "After memory capture, check if enough observations have accumulated. If so, synthesize them into workspace brief files.",
52
+ when: { type: "agentStop" },
53
+ then: {
54
+ type: "askAgent",
55
+ prompt: `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.
56
+
57
+ If watchmenReady: true:
58
+ 1. Call kirograph_mem_search for each kind (decision, error, pattern, architecture, note) with limit 20.
59
+ 2. 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.
60
+ 3. 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.
61
+ 4. 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").`
62
+ }
63
+ };
64
+ }
38
65
  const HOOKS = [
39
66
  {
40
67
  filename: `kirograph-sync-if-dirty${HOOK_EXT}`,
@@ -162,6 +189,13 @@ function writeHooks(kiroDir, opts) {
162
189
  }
163
190
  writeJson(path.join(hooksDir, filename), hook);
164
191
  }
192
+ const watchmenHookPath = path.join(hooksDir, `kirograph-watchmen${HOOK_EXT}`);
193
+ if (opts?.enableWatchmen) {
194
+ const mode = opts.watchmenSynthesisMode ?? "local";
195
+ writeJson(watchmenHookPath, buildWatchmenHook(mode));
196
+ } else {
197
+ if (fs.existsSync(watchmenHookPath)) fs.unlinkSync(watchmenHookPath);
198
+ }
165
199
  console.log(` \u2713 Auto-sync hooks written to ${hooksDir}`);
166
200
  }
167
201
  // Annotate the CommonJS export names for ESM import in node:
@@ -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\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { logWarn } from '../../errors';\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 HOOK_EXT = '.kiro.hook';\n\nconst HOOKS: Array<{ filename: string; hook: object }> = [\n {\n filename: `kirograph-sync-if-dirty${HOOK_EXT}`,\n hook: {\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 filename: `kirograph-compress-hint${HOOK_EXT}`,\n hook: {\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 (git, gh, test, lint, build, docker, aws, grep).',\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 filename: `kirograph-mem-capture${HOOK_EXT}`,\n hook: {\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\nfunction migrateOnIdleHooks(hooksDir: string): void {\n if (!fs.existsSync(hooksDir)) return;\n let files: string[];\n try {\n files = fs.readdirSync(hooksDir).filter(f => f.endsWith('.json') || f.endsWith(HOOK_EXT));\n } catch {\n return;\n }\n for (const file of files) {\n const filePath = path.join(hooksDir, file);\n let raw: string;\n try {\n raw = fs.readFileSync(filePath, 'utf8');\n } catch {\n logWarn(`KiroGraph installer: could not read hook file ${filePath}`);\n continue;\n }\n let obj: any;\n try {\n obj = JSON.parse(raw);\n } catch {\n logWarn(`KiroGraph installer: could not parse hook file ${filePath}`);\n continue;\n }\n let changed = false;\n if (obj?.when?.type === 'onIdle') {\n obj.when.type = 'agentStop';\n changed = true;\n }\n // Migrate .json \u2192 .kiro.hook extension\n if (file.endsWith('.json') && file.startsWith('kirograph-')) {\n const newName = file.replace(/\\.json$/, HOOK_EXT);\n const newPath = path.join(hooksDir, newName);\n try {\n fs.writeFileSync(newPath, JSON.stringify(obj, null, 2) + '\\n');\n fs.unlinkSync(filePath);\n } catch {\n logWarn(`KiroGraph installer: could not migrate hook file ${filePath} \u2192 ${newName}`);\n }\n } else if (changed) {\n try {\n fs.writeFileSync(filePath, JSON.stringify(obj, null, 2) + '\\n');\n } catch {\n logWarn(`KiroGraph installer: could not write migrated hook file ${filePath}`);\n }\n }\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 function writeHooks(kiroDir: string, opts?: { enableCompression?: boolean; enableMemory?: boolean }): void {\n const hooksDir = path.join(kiroDir, 'hooks');\n ensureDir(hooksDir);\n\n migrateOnIdleHooks(hooksDir);\n\n const oldHooks = [\n 'kirograph-sync-on-save.json', 'kirograph-sync-on-create.json',\n // Legacy .json versions (migrated to .kiro.hook)\n 'kirograph-mark-dirty-on-save.json', 'kirograph-mark-dirty-on-create.json',\n 'kirograph-sync-on-delete.json', 'kirograph-sync-if-dirty.json',\n 'kirograph-compress-hint.json', 'kirograph-mem-capture.json',\n // Removed per-file hooks (consolidated into agentStop sync)\n `kirograph-mark-dirty-on-save${HOOK_EXT}`,\n `kirograph-mark-dirty-on-create${HOOK_EXT}`,\n `kirograph-sync-on-delete${HOOK_EXT}`,\n ];\n for (const old of oldHooks) {\n const p = path.join(hooksDir, old);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n }\n\n for (const { filename, hook } of HOOKS) {\n // Skip compression hook if compression is disabled\n if (filename === `kirograph-compress-hint${HOOK_EXT}` && opts?.enableCompression === false) {\n const p = path.join(hooksDir, filename);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n continue;\n }\n // Skip memory hook if memory is disabled\n if (filename === `kirograph-mem-capture${HOOK_EXT}` && !opts?.enableMemory) {\n const p = path.join(hooksDir, filename);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n continue;\n }\n writeJson(path.join(hooksDir, filename), hook);\n }\n\n console.log(` \u2713 Auto-sync hooks written to ${hooksDir}`);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,SAAoB;AACpB,WAAsB;AACtB,oBAAwB;AAIxB,MAAM,WAAW;AAEjB,MAAM,QAAmD;AAAA,EACvD;AAAA,IACE,UAAU,0BAA0B,QAAQ;AAAA,IAC5C,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,MACb,MAAM,EAAE,MAAM,YAAY;AAAA,M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Aa,0BAA0B,QAAQ,MAAM,MAAM,sBAAsB,OAAO;AAC1F,YAAM,IAAI,KAAK,KAAK,UAAU,QAAQ;AACtC,UAAI,GAAG,WAAW,CAAC,EAAG,IAAG,WAAW,CAAC;AACrC;AAAA,IACF;AAEA,QAAI,aAAa,wBAAwB,QAAQ,MAAM,CAAC,MAAM,cAAc;AAC1E,YAAM,IAAI,KAAK,KAAK,UAAU,QAAQ;AACtC,UAAI,GAAG,WAAW,CAAC,EAAG,IAAG,WAAW,CAAC;AACrC;AAAA,IACF;AACA,cAAU,KAAK,KAAK,UAAU,QAAQ,GAAG,IAAI;AAAA,EAC/C;AAEA,UAAQ,IAAI,uCAAkC,QAAQ,EAAE;AAC1D;",
4
+ "sourcesContent": ["/**\n * KiroGraph Installer \u2014 Kiro hook file management\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport { logWarn } from '../../errors';\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 HOOK_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\nfunction buildWatchmenHook(synthesisMode: 'local' | 'agent'): object {\n if (synthesisMode === 'local') {\n return {\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 return {\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: {\n type: 'askAgent',\n prompt: `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 };\n}\n\nconst HOOKS: Array<{ filename: string; hook: object }> = [\n {\n filename: `kirograph-sync-if-dirty${HOOK_EXT}`,\n hook: {\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 filename: `kirograph-compress-hint${HOOK_EXT}`,\n hook: {\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 (git, gh, test, lint, build, docker, aws, grep).',\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 filename: `kirograph-mem-capture${HOOK_EXT}`,\n hook: {\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\nfunction migrateOnIdleHooks(hooksDir: string): void {\n if (!fs.existsSync(hooksDir)) return;\n let files: string[];\n try {\n files = fs.readdirSync(hooksDir).filter(f => f.endsWith('.json') || f.endsWith(HOOK_EXT));\n } catch {\n return;\n }\n for (const file of files) {\n const filePath = path.join(hooksDir, file);\n let raw: string;\n try {\n raw = fs.readFileSync(filePath, 'utf8');\n } catch {\n logWarn(`KiroGraph installer: could not read hook file ${filePath}`);\n continue;\n }\n let obj: any;\n try {\n obj = JSON.parse(raw);\n } catch {\n logWarn(`KiroGraph installer: could not parse hook file ${filePath}`);\n continue;\n }\n let changed = false;\n if (obj?.when?.type === 'onIdle') {\n obj.when.type = 'agentStop';\n changed = true;\n }\n // Migrate .json \u2192 .kiro.hook extension\n if (file.endsWith('.json') && file.startsWith('kirograph-')) {\n const newName = file.replace(/\\.json$/, HOOK_EXT);\n const newPath = path.join(hooksDir, newName);\n try {\n fs.writeFileSync(newPath, JSON.stringify(obj, null, 2) + '\\n');\n fs.unlinkSync(filePath);\n } catch {\n logWarn(`KiroGraph installer: could not migrate hook file ${filePath} \u2192 ${newName}`);\n }\n } else if (changed) {\n try {\n fs.writeFileSync(filePath, JSON.stringify(obj, null, 2) + '\\n');\n } catch {\n logWarn(`KiroGraph installer: could not write migrated hook file ${filePath}`);\n }\n }\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 function writeHooks(kiroDir: string, opts?: { enableCompression?: boolean; enableMemory?: boolean; enableWatchmen?: boolean; watchmenSynthesisMode?: 'local' | 'agent' }): void {\n const hooksDir = path.join(kiroDir, 'hooks');\n ensureDir(hooksDir);\n\n migrateOnIdleHooks(hooksDir);\n\n const oldHooks = [\n 'kirograph-sync-on-save.json', 'kirograph-sync-on-create.json',\n // Legacy .json versions (migrated to .kiro.hook)\n 'kirograph-mark-dirty-on-save.json', 'kirograph-mark-dirty-on-create.json',\n 'kirograph-sync-on-delete.json', 'kirograph-sync-if-dirty.json',\n 'kirograph-compress-hint.json', 'kirograph-mem-capture.json',\n // Removed per-file hooks (consolidated into agentStop sync)\n `kirograph-mark-dirty-on-save${HOOK_EXT}`,\n `kirograph-mark-dirty-on-create${HOOK_EXT}`,\n `kirograph-sync-on-delete${HOOK_EXT}`,\n ];\n for (const old of oldHooks) {\n const p = path.join(hooksDir, old);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n }\n\n for (const { filename, hook } of HOOKS) {\n // Skip compression hook if compression is disabled\n if (filename === `kirograph-compress-hint${HOOK_EXT}` && opts?.enableCompression === false) {\n const p = path.join(hooksDir, filename);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n continue;\n }\n // Skip memory hook if memory is disabled\n if (filename === `kirograph-mem-capture${HOOK_EXT}` && !opts?.enableMemory) {\n const p = path.join(hooksDir, filename);\n if (fs.existsSync(p)) fs.unlinkSync(p);\n continue;\n }\n writeJson(path.join(hooksDir, filename), hook);\n }\n\n // Watchmen hook \u2014 built dynamically based on synthesis mode\n const watchmenHookPath = path.join(hooksDir, `kirograph-watchmen${HOOK_EXT}`);\n if (opts?.enableWatchmen) {\n const mode = opts.watchmenSynthesisMode ?? 'local';\n writeJson(watchmenHookPath, buildWatchmenHook(mode));\n } else {\n if (fs.existsSync(watchmenHookPath)) fs.unlinkSync(watchmenHookPath);\n }\n\n console.log(` \u2713 Auto-sync hooks written to ${hooksDir}`);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;A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IAAI,CAAC;AAAA,EACrD,OAAO;AACL,QAAI,GAAG,WAAW,gBAAgB,EAAG,IAAG,WAAW,gBAAgB;AAAA,EACrE;AAEA,UAAQ,IAAI,uCAAkC,QAAQ,EAAE;AAC1D;",
6
6
  "names": []
7
7
  }
@@ -1,11 +1,12 @@
1
1
  /**
2
- * KiroGraph Installer for Kiro
2
+ * KiroGraph Installer
3
3
  *
4
- * Wires up:
4
+ * The default target wires up Kiro:
5
5
  * 1. .kiro/settings/mcp.json — registers the MCP server (IDE + CLI)
6
- * 2. .kiro/hooks/*.json — auto-sync hooks for Kiro IDE
6
+ * 2. .kiro/hooks/*.kiro.hook — auto-sync hooks for Kiro IDE
7
7
  * 3. .kiro/steering/kirograph.md — teaches Kiro to use the graph tools (IDE + CLI)
8
8
  * 4. .kiro/agents/kirograph.json — custom agent config for Kiro CLI
9
9
  */
10
- export declare function runInstaller(): Promise<void>;
10
+ import type { InstallTarget } from './common';
11
+ export declare function runInstaller(target?: InstallTarget): Promise<void>;
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bin/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkBH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAqJlD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bin/installer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAcH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,wBAAsB,YAAY,CAAC,MAAM,GAAE,aAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CA4QhF"}
@@ -44,7 +44,7 @@ var import_config_prompt = require("./config-prompt");
44
44
  var import_dashboard = require("./dashboard");
45
45
  var import_qdrant_dashboard = require("./qdrant-dashboard");
46
46
  var import_targets = require("./targets");
47
- async function runInstaller(target = "kiro") {
47
+ async function runInstaller(target = "kiro", opts = {}) {
48
48
  (0, import_banner.printBanner)();
49
49
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
50
50
  try {
@@ -52,11 +52,15 @@ async function runInstaller(target = "kiro") {
52
52
  const installer = (0, import_targets.getTargetInstaller)(target);
53
53
  console.log(` Workspace: ${cwd}
54
54
  `);
55
- const proceed = await (0, import_prompts.askToggle)(rl, `Install KiroGraph for ${installer.label}?`, "Registers the MCP server and writes integration files for this workspace.");
56
- if (!proceed) {
57
- console.log(" Cancelled.");
58
- rl.close();
59
- return;
55
+ if (!opts.yes) {
56
+ const proceed = await (0, import_prompts.askToggle)(rl, `Install KiroGraph for ${installer.label}?`, "Registers the MCP server and writes integration files for this workspace.");
57
+ if (!proceed) {
58
+ console.log(" Cancelled.");
59
+ rl.close();
60
+ return;
61
+ }
62
+ } else {
63
+ console.log(` Installing KiroGraph for ${installer.label} (--yes)`);
60
64
  }
61
65
  console.log();
62
66
  installer.installEarly(cwd);
@@ -66,6 +70,11 @@ async function runInstaller(target = "kiro") {
66
70
  let enableMemory = false;
67
71
  let enableDocs = false;
68
72
  let enableData = false;
73
+ let enableSecurity = false;
74
+ let enablePatterns = false;
75
+ let enableArchitecture = false;
76
+ let enableWatchmen = false;
77
+ let watchmenSynthesisMode = "local";
69
78
  let shouldOfferIndex = false;
70
79
  let typesenseDashboard = false;
71
80
  let qdrantDashboard = false;
@@ -77,6 +86,11 @@ async function runInstaller(target = "kiro") {
77
86
  enableMemory = config.enableMemory ?? false;
78
87
  enableDocs = config.enableDocs ?? false;
79
88
  enableData = config.enableData ?? false;
89
+ enableSecurity = config.enableSecurity ?? false;
90
+ enableWatchmen = config.enableWatchmen ?? false;
91
+ watchmenSynthesisMode = config.watchmenSynthesisMode ?? "local";
92
+ enablePatterns = config.enablePatterns ?? false;
93
+ enableArchitecture = config.enableArchitecture ?? false;
80
94
  console.log(` \u2713 Reusing existing KiroGraph data in ${cwd}/.kirograph/`);
81
95
  console.log(` \u2022 semanticEngine: ${config.semanticEngine}`);
82
96
  console.log(` \u2022 enableEmbeddings: ${config.enableEmbeddings}`);
@@ -86,6 +100,8 @@ async function runInstaller(target = "kiro") {
86
100
  console.log(` \u2022 enableMemory: ${enableMemory}`);
87
101
  console.log(` \u2022 enableDocs: ${enableDocs}`);
88
102
  console.log(` \u2022 enableData: ${enableData}`);
103
+ console.log(` \u2022 enableSecurity: ${enableSecurity}`);
104
+ console.log(` \u2022 enablePatterns: ${enablePatterns}`);
89
105
  } else {
90
106
  shouldOfferIndex = true;
91
107
  const patch = await (0, import_config_prompt.promptConfigOptions)(rl);
@@ -95,6 +111,11 @@ async function runInstaller(target = "kiro") {
95
111
  enableMemory = patch.enableMemory ?? false;
96
112
  enableDocs = patch.enableDocs ?? false;
97
113
  enableData = patch.enableData ?? false;
114
+ enableSecurity = patch.enableSecurity ?? false;
115
+ enablePatterns = patch.enablePatterns ?? false;
116
+ enableArchitecture = patch.enableArchitecture ?? false;
117
+ enableWatchmen = patch.enableWatchmen ?? false;
118
+ watchmenSynthesisMode = patch.watchmenSynthesisMode ?? "local";
98
119
  typesenseDashboard = patch.typesenseDashboard;
99
120
  qdrantDashboard = patch.qdrantDashboard;
100
121
  console.log(`
@@ -176,6 +197,8 @@ async function runInstaller(target = "kiro") {
176
197
  console.log(` \u2022 enableMemory: ${enableMemory}`);
177
198
  console.log(` \u2022 enableDocs: ${enableDocs}`);
178
199
  console.log(` \u2022 enableData: ${enableData}`);
200
+ console.log(` \u2022 enableSecurity: ${enableSecurity}`);
201
+ console.log(` \u2022 enablePatterns: ${enablePatterns}`);
179
202
  if (enableData) {
180
203
  if (patch.dataInstallExcel) {
181
204
  console.log(`
@@ -198,8 +221,22 @@ async function runInstaller(target = "kiro") {
198
221
  }
199
222
  }
200
223
  }
224
+ if (enablePatterns) {
225
+ console.log(`
226
+ Installing @ast-grep/napi...`);
227
+ const astGrepResult = (0, import_child_process.spawnSync)("npm", ["install", "@ast-grep/napi", "--save-optional"], {
228
+ stdio: "inherit",
229
+ shell: true
230
+ });
231
+ if (astGrepResult.status === 0) {
232
+ console.log(` \u2713 @ast-grep/napi installed`);
233
+ } else {
234
+ console.warn(` \u2717 @ast-grep/napi install failed. Run manually: npm install @ast-grep/napi`);
235
+ console.warn(` KiroGraph will continue but kirograph pattern and kirograph_live_search will be unavailable.`);
236
+ }
237
+ }
201
238
  }
202
- installer.installLate(cwd, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData);
239
+ installer.installLate(cwd, cavemanMode, shellCompressionLevel, enableMemory, enableDocs, enableData, enableSecurity, enableArchitecture, enablePatterns, enableWatchmen, watchmenSynthesisMode);
203
240
  } catch (err) {
204
241
  const reason = err instanceof Error ? err.message : String(err);
205
242
  console.error(`
@@ -209,7 +246,8 @@ async function runInstaller(target = "kiro") {
209
246
  if (qdrantDashboard) {
210
247
  await (0, import_qdrant_dashboard.ensureQdrantUI)(cwd);
211
248
  }
212
- if (shouldOfferIndex && await (0, import_prompts.askToggle)(rl, "Initialize and index this project now?", "Creates .kirograph/ and indexes all source files. Takes a few seconds for small projects, longer for large ones.")) {
249
+ const doIndex = shouldOfferIndex && (opts.yes || await (0, import_prompts.askToggle)(rl, "Initialize and index this project now?", "Creates .kirograph/ and indexes all source files. Takes a few seconds for small projects, longer for large ones."));
250
+ if (doIndex) {
213
251
  const KiroGraph = (await Promise.resolve().then(() => require("../../index.js"))).default;
214
252
  const fileBytes = /* @__PURE__ */ new Map();
215
253
  const modelProgress = (file, loaded, total, done) => {