kirograph 0.19.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 (658) hide show
  1. package/README.md +10 -8
  2. package/dist/architecture/layers/dart.d.ts +10 -0
  3. package/dist/architecture/layers/dart.d.ts.map +1 -0
  4. package/dist/architecture/layers/elixir.d.ts +6 -0
  5. package/dist/architecture/layers/elixir.d.ts.map +1 -0
  6. package/dist/architecture/layers/index.d.ts.map +1 -1
  7. package/dist/architecture/layers/ocaml.d.ts +6 -0
  8. package/dist/architecture/layers/ocaml.d.ts.map +1 -0
  9. package/dist/architecture/layers/scala.d.ts +6 -0
  10. package/dist/architecture/layers/scala.d.ts.map +1 -0
  11. package/dist/architecture/layers/solidity.d.ts +6 -0
  12. package/dist/architecture/layers/solidity.d.ts.map +1 -0
  13. package/dist/architecture/layers/vue.d.ts +6 -0
  14. package/dist/architecture/layers/vue.d.ts.map +1 -0
  15. package/dist/architecture/manifest/elm.d.ts +3 -0
  16. package/dist/architecture/manifest/elm.d.ts.map +1 -0
  17. package/dist/architecture/manifest/index.d.ts.map +1 -1
  18. package/dist/architecture/manifest/ocaml.d.ts +3 -0
  19. package/dist/architecture/manifest/ocaml.d.ts.map +1 -0
  20. package/dist/architecture/manifest/scala.d.ts +3 -0
  21. package/dist/architecture/manifest/scala.d.ts.map +1 -0
  22. package/dist/bin/banner.d.ts.map +1 -1
  23. package/dist/bin/commands/affected.d.ts.map +1 -1
  24. package/dist/bin/commands/attack-surface.d.ts +3 -0
  25. package/dist/bin/commands/attack-surface.d.ts.map +1 -0
  26. package/dist/bin/commands/attack-surface.js +7 -0
  27. package/dist/bin/commands/attack-surface.js.map +2 -2
  28. package/dist/bin/commands/benchmark.d.ts +9 -0
  29. package/dist/bin/commands/benchmark.d.ts.map +1 -0
  30. package/dist/bin/commands/budget.d.ts +6 -0
  31. package/dist/bin/commands/budget.d.ts.map +1 -0
  32. package/dist/bin/commands/caveman.d.ts +7 -0
  33. package/dist/bin/commands/caveman.d.ts.map +1 -0
  34. package/dist/bin/commands/communities.d.ts +3 -0
  35. package/dist/bin/commands/communities.d.ts.map +1 -0
  36. package/dist/bin/commands/compression.d.ts +7 -0
  37. package/dist/bin/commands/compression.d.ts.map +1 -0
  38. package/dist/bin/commands/context.d.ts.map +1 -1
  39. package/dist/bin/commands/data.d.ts +3 -0
  40. package/dist/bin/commands/data.d.ts.map +1 -0
  41. package/dist/bin/commands/dead-code.d.ts +3 -0
  42. package/dist/bin/commands/dead-code.d.ts.map +1 -0
  43. package/dist/bin/commands/dep-confusion.d.ts +3 -0
  44. package/dist/bin/commands/dep-confusion.d.ts.map +1 -0
  45. package/dist/bin/commands/docs.d.ts +3 -0
  46. package/dist/bin/commands/docs.d.ts.map +1 -0
  47. package/dist/bin/commands/exec.d.ts +11 -0
  48. package/dist/bin/commands/exec.d.ts.map +1 -0
  49. package/dist/bin/commands/export.d.ts +3 -0
  50. package/dist/bin/commands/export.d.ts.map +1 -0
  51. package/dist/bin/commands/flows.d.ts +3 -0
  52. package/dist/bin/commands/flows.d.ts.map +1 -0
  53. package/dist/bin/commands/gain.d.ts +6 -0
  54. package/dist/bin/commands/gain.d.ts.map +1 -0
  55. package/dist/bin/commands/help.d.ts +7 -0
  56. package/dist/bin/commands/help.d.ts.map +1 -1
  57. package/dist/bin/commands/help.js +20 -3
  58. package/dist/bin/commands/help.js.map +2 -2
  59. package/dist/bin/commands/hotspots.d.ts +3 -0
  60. package/dist/bin/commands/hotspots.d.ts.map +1 -0
  61. package/dist/bin/commands/hotspots.js +94 -1
  62. package/dist/bin/commands/hotspots.js.map +3 -3
  63. package/dist/bin/commands/install.d.ts.map +1 -1
  64. package/dist/bin/commands/install.js +3 -3
  65. package/dist/bin/commands/install.js.map +2 -2
  66. package/dist/bin/commands/licenses.d.ts +3 -0
  67. package/dist/bin/commands/licenses.d.ts.map +1 -0
  68. package/dist/bin/commands/memory.d.ts +16 -0
  69. package/dist/bin/commands/memory.d.ts.map +1 -0
  70. package/dist/bin/commands/memory.js +151 -4
  71. package/dist/bin/commands/memory.js.map +2 -2
  72. package/dist/bin/commands/path.d.ts +3 -0
  73. package/dist/bin/commands/path.d.ts.map +1 -0
  74. package/dist/bin/commands/pattern.d.ts +3 -0
  75. package/dist/bin/commands/pattern.d.ts.map +1 -0
  76. package/dist/bin/commands/pattern.js +592 -0
  77. package/dist/bin/commands/pattern.js.map +7 -0
  78. package/dist/bin/commands/query.d.ts.map +1 -1
  79. package/dist/bin/commands/reachability.d.ts +3 -0
  80. package/dist/bin/commands/reachability.d.ts.map +1 -0
  81. package/dist/bin/commands/read.d.ts +6 -0
  82. package/dist/bin/commands/read.d.ts.map +1 -0
  83. package/dist/bin/commands/refactor.d.ts +3 -0
  84. package/dist/bin/commands/refactor.d.ts.map +1 -0
  85. package/dist/bin/commands/remediation.d.ts +3 -0
  86. package/dist/bin/commands/remediation.d.ts.map +1 -0
  87. package/dist/bin/commands/sbom.d.ts +3 -0
  88. package/dist/bin/commands/sbom.d.ts.map +1 -0
  89. package/dist/bin/commands/security-ci-report.d.ts +9 -0
  90. package/dist/bin/commands/security-ci-report.d.ts.map +1 -0
  91. package/dist/bin/commands/security-export.d.ts +2 -0
  92. package/dist/bin/commands/security-export.d.ts.map +1 -0
  93. package/dist/bin/commands/security-flows.d.ts +3 -0
  94. package/dist/bin/commands/security-flows.d.ts.map +1 -0
  95. package/dist/bin/commands/security-secrets.d.ts +3 -0
  96. package/dist/bin/commands/security-secrets.d.ts.map +1 -0
  97. package/dist/bin/commands/security.d.ts +3 -0
  98. package/dist/bin/commands/security.d.ts.map +1 -0
  99. package/dist/bin/commands/security.js +15 -0
  100. package/dist/bin/commands/security.js.map +2 -2
  101. package/dist/bin/commands/snapshot.d.ts +3 -0
  102. package/dist/bin/commands/snapshot.d.ts.map +1 -0
  103. package/dist/bin/commands/staleness.d.ts +3 -0
  104. package/dist/bin/commands/staleness.d.ts.map +1 -0
  105. package/dist/bin/commands/status.d.ts.map +1 -1
  106. package/dist/bin/commands/status.js +27 -0
  107. package/dist/bin/commands/status.js.map +2 -2
  108. package/dist/bin/commands/supply-chain.d.ts +3 -0
  109. package/dist/bin/commands/supply-chain.d.ts.map +1 -0
  110. package/dist/bin/commands/surprising.d.ts +3 -0
  111. package/dist/bin/commands/surprising.d.ts.map +1 -0
  112. package/dist/bin/commands/sync.d.ts.map +1 -1
  113. package/dist/bin/commands/uninit.d.ts.map +1 -1
  114. package/dist/bin/commands/utils.d.ts +5 -0
  115. package/dist/bin/commands/utils.d.ts.map +1 -1
  116. package/dist/bin/commands/vex.d.ts +3 -0
  117. package/dist/bin/commands/vex.d.ts.map +1 -0
  118. package/dist/bin/commands/vuln-suppress.d.ts +3 -0
  119. package/dist/bin/commands/vuln-suppress.d.ts.map +1 -0
  120. package/dist/bin/commands/vulns.d.ts +3 -0
  121. package/dist/bin/commands/vulns.d.ts.map +1 -0
  122. package/dist/bin/installer/archive.d.ts +47 -0
  123. package/dist/bin/installer/archive.d.ts.map +1 -0
  124. package/dist/bin/installer/auto-detect.d.ts +16 -0
  125. package/dist/bin/installer/auto-detect.d.ts.map +1 -0
  126. package/dist/bin/installer/caveman.d.ts +12 -0
  127. package/dist/bin/installer/caveman.d.ts.map +1 -0
  128. package/dist/bin/installer/cli-agent.d.ts +7 -2
  129. package/dist/bin/installer/cli-agent.d.ts.map +1 -1
  130. package/dist/bin/installer/cli-agent.js +6 -2
  131. package/dist/bin/installer/cli-agent.js.map +2 -2
  132. package/dist/bin/installer/common.d.ts +36 -0
  133. package/dist/bin/installer/common.d.ts.map +1 -0
  134. package/dist/bin/installer/common.js +2 -1
  135. package/dist/bin/installer/common.js.map +2 -2
  136. package/dist/bin/installer/config-prompt.d.ts +1 -1
  137. package/dist/bin/installer/config-prompt.d.ts.map +1 -1
  138. package/dist/bin/installer/config-prompt.js +74 -2
  139. package/dist/bin/installer/config-prompt.js.map +2 -2
  140. package/dist/bin/installer/dashboard.d.ts.map +1 -1
  141. package/dist/bin/installer/detect.d.ts +30 -0
  142. package/dist/bin/installer/detect.d.ts.map +1 -0
  143. package/dist/bin/installer/hooks.d.ts +4 -1
  144. package/dist/bin/installer/hooks.d.ts.map +1 -1
  145. package/dist/bin/installer/hooks.js +34 -0
  146. package/dist/bin/installer/hooks.js.map +2 -2
  147. package/dist/bin/installer/index.d.ts +5 -4
  148. package/dist/bin/installer/index.d.ts.map +1 -1
  149. package/dist/bin/installer/index.js +38 -8
  150. package/dist/bin/installer/index.js.map +2 -2
  151. package/dist/bin/installer/instructions.d.ts +14 -0
  152. package/dist/bin/installer/instructions.d.ts.map +1 -0
  153. package/dist/bin/installer/instructions.js +15 -1
  154. package/dist/bin/installer/instructions.js.map +2 -2
  155. package/dist/bin/installer/mcp.d.ts.map +1 -1
  156. package/dist/bin/installer/prompts.d.ts +17 -0
  157. package/dist/bin/installer/prompts.d.ts.map +1 -1
  158. package/dist/bin/installer/qdrant-dashboard.d.ts.map +1 -1
  159. package/dist/bin/installer/steering.d.ts +14 -2
  160. package/dist/bin/installer/steering.d.ts.map +1 -1
  161. package/dist/bin/installer/steering.js +81 -0
  162. package/dist/bin/installer/steering.js.map +2 -2
  163. package/dist/bin/installer/targets/aider.d.ts +6 -0
  164. package/dist/bin/installer/targets/aider.d.ts.map +1 -0
  165. package/dist/bin/installer/targets/aider.js +3 -3
  166. package/dist/bin/installer/targets/aider.js.map +2 -2
  167. package/dist/bin/installer/targets/amp.d.ts +6 -0
  168. package/dist/bin/installer/targets/amp.d.ts.map +1 -0
  169. package/dist/bin/installer/targets/amp.js +3 -3
  170. package/dist/bin/installer/targets/amp.js.map +2 -2
  171. package/dist/bin/installer/targets/antigravity.d.ts +13 -0
  172. package/dist/bin/installer/targets/antigravity.d.ts.map +1 -0
  173. package/dist/bin/installer/targets/antigravity.js +2 -2
  174. package/dist/bin/installer/targets/antigravity.js.map +2 -2
  175. package/dist/bin/installer/targets/augment.d.ts +6 -0
  176. package/dist/bin/installer/targets/augment.d.ts.map +1 -0
  177. package/dist/bin/installer/targets/augment.js +3 -3
  178. package/dist/bin/installer/targets/augment.js.map +2 -2
  179. package/dist/bin/installer/targets/claude.d.ts +6 -0
  180. package/dist/bin/installer/targets/claude.d.ts.map +1 -0
  181. package/dist/bin/installer/targets/claude.js +2 -2
  182. package/dist/bin/installer/targets/claude.js.map +2 -2
  183. package/dist/bin/installer/targets/cline.d.ts +13 -0
  184. package/dist/bin/installer/targets/cline.d.ts.map +1 -0
  185. package/dist/bin/installer/targets/cline.js +2 -2
  186. package/dist/bin/installer/targets/cline.js.map +2 -2
  187. package/dist/bin/installer/targets/codex.d.ts +6 -0
  188. package/dist/bin/installer/targets/codex.d.ts.map +1 -0
  189. package/dist/bin/installer/targets/codex.js +2 -2
  190. package/dist/bin/installer/targets/codex.js.map +2 -2
  191. package/dist/bin/installer/targets/continue.d.ts +12 -0
  192. package/dist/bin/installer/targets/continue.d.ts.map +1 -0
  193. package/dist/bin/installer/targets/continue.js +2 -2
  194. package/dist/bin/installer/targets/continue.js.map +2 -2
  195. package/dist/bin/installer/targets/copilot-cli.d.ts +12 -0
  196. package/dist/bin/installer/targets/copilot-cli.d.ts.map +1 -0
  197. package/dist/bin/installer/targets/copilot-cli.js +2 -2
  198. package/dist/bin/installer/targets/copilot-cli.js.map +2 -2
  199. package/dist/bin/installer/targets/copilot.d.ts +6 -0
  200. package/dist/bin/installer/targets/copilot.d.ts.map +1 -0
  201. package/dist/bin/installer/targets/copilot.js +2 -2
  202. package/dist/bin/installer/targets/copilot.js.map +2 -2
  203. package/dist/bin/installer/targets/cursor.d.ts +6 -0
  204. package/dist/bin/installer/targets/cursor.d.ts.map +1 -0
  205. package/dist/bin/installer/targets/cursor.js +2 -2
  206. package/dist/bin/installer/targets/cursor.js.map +2 -2
  207. package/dist/bin/installer/targets/devin.d.ts +13 -0
  208. package/dist/bin/installer/targets/devin.d.ts.map +1 -0
  209. package/dist/bin/installer/targets/devin.js +2 -2
  210. package/dist/bin/installer/targets/devin.js.map +2 -2
  211. package/dist/bin/installer/targets/gemini-cli.d.ts +16 -0
  212. package/dist/bin/installer/targets/gemini-cli.d.ts.map +1 -0
  213. package/dist/bin/installer/targets/gemini-cli.js +2 -2
  214. package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
  215. package/dist/bin/installer/targets/generic.d.ts +59 -0
  216. package/dist/bin/installer/targets/generic.d.ts.map +1 -0
  217. package/dist/bin/installer/targets/generic.js +2 -2
  218. package/dist/bin/installer/targets/generic.js.map +2 -2
  219. package/dist/bin/installer/targets/goose.d.ts +6 -0
  220. package/dist/bin/installer/targets/goose.d.ts.map +1 -0
  221. package/dist/bin/installer/targets/goose.js +3 -3
  222. package/dist/bin/installer/targets/goose.js.map +2 -2
  223. package/dist/bin/installer/targets/index.d.ts +11 -0
  224. package/dist/bin/installer/targets/index.d.ts.map +1 -0
  225. package/dist/bin/installer/targets/index.js.map +1 -1
  226. package/dist/bin/installer/targets/junie.d.ts +13 -0
  227. package/dist/bin/installer/targets/junie.d.ts.map +1 -0
  228. package/dist/bin/installer/targets/junie.js +2 -2
  229. package/dist/bin/installer/targets/junie.js.map +2 -2
  230. package/dist/bin/installer/targets/kilo.d.ts +12 -0
  231. package/dist/bin/installer/targets/kilo.d.ts.map +1 -0
  232. package/dist/bin/installer/targets/kilo.js +2 -2
  233. package/dist/bin/installer/targets/kilo.js.map +2 -2
  234. package/dist/bin/installer/targets/kiro.d.ts +5 -0
  235. package/dist/bin/installer/targets/kiro.d.ts.map +1 -0
  236. package/dist/bin/installer/targets/kiro.js +4 -4
  237. package/dist/bin/installer/targets/kiro.js.map +2 -2
  238. package/dist/bin/installer/targets/opencode.d.ts +13 -0
  239. package/dist/bin/installer/targets/opencode.d.ts.map +1 -0
  240. package/dist/bin/installer/targets/opencode.js +2 -2
  241. package/dist/bin/installer/targets/opencode.js.map +2 -2
  242. package/dist/bin/installer/targets/openhands.d.ts +6 -0
  243. package/dist/bin/installer/targets/openhands.d.ts.map +1 -0
  244. package/dist/bin/installer/targets/openhands.js +3 -3
  245. package/dist/bin/installer/targets/openhands.js.map +2 -2
  246. package/dist/bin/installer/targets/qoder.d.ts +12 -0
  247. package/dist/bin/installer/targets/qoder.d.ts.map +1 -0
  248. package/dist/bin/installer/targets/qoder.js +2 -2
  249. package/dist/bin/installer/targets/qoder.js.map +2 -2
  250. package/dist/bin/installer/targets/qwen.d.ts +12 -0
  251. package/dist/bin/installer/targets/qwen.d.ts.map +1 -0
  252. package/dist/bin/installer/targets/qwen.js +2 -2
  253. package/dist/bin/installer/targets/qwen.js.map +2 -2
  254. package/dist/bin/installer/targets/replit.d.ts +6 -0
  255. package/dist/bin/installer/targets/replit.d.ts.map +1 -0
  256. package/dist/bin/installer/targets/replit.js +3 -3
  257. package/dist/bin/installer/targets/replit.js.map +2 -2
  258. package/dist/bin/installer/targets/roo.d.ts +13 -0
  259. package/dist/bin/installer/targets/roo.d.ts.map +1 -0
  260. package/dist/bin/installer/targets/roo.js +2 -2
  261. package/dist/bin/installer/targets/roo.js.map +2 -2
  262. package/dist/bin/installer/targets/tabnine.d.ts +6 -0
  263. package/dist/bin/installer/targets/tabnine.d.ts.map +1 -0
  264. package/dist/bin/installer/targets/tabnine.js +3 -3
  265. package/dist/bin/installer/targets/tabnine.js.map +2 -2
  266. package/dist/bin/installer/targets/trae.d.ts +6 -0
  267. package/dist/bin/installer/targets/trae.d.ts.map +1 -0
  268. package/dist/bin/installer/targets/trae.js +3 -3
  269. package/dist/bin/installer/targets/trae.js.map +2 -2
  270. package/dist/bin/installer/targets/warp.d.ts +12 -0
  271. package/dist/bin/installer/targets/warp.d.ts.map +1 -0
  272. package/dist/bin/installer/targets/warp.js +2 -2
  273. package/dist/bin/installer/targets/warp.js.map +2 -2
  274. package/dist/bin/installer/targets/windsurf.d.ts +13 -0
  275. package/dist/bin/installer/targets/windsurf.d.ts.map +1 -0
  276. package/dist/bin/installer/targets/windsurf.js +2 -2
  277. package/dist/bin/installer/targets/windsurf.js.map +2 -2
  278. package/dist/bin/kirograph.js +3 -1
  279. package/dist/bin/kirograph.js.map +3 -3
  280. package/dist/bin/progress.d.ts +16 -1
  281. package/dist/bin/progress.d.ts.map +1 -1
  282. package/dist/compression/filters/aws.d.ts +9 -0
  283. package/dist/compression/filters/aws.d.ts.map +1 -0
  284. package/dist/compression/filters/docker.d.ts +6 -0
  285. package/dist/compression/filters/docker.d.ts.map +1 -0
  286. package/dist/compression/filters/files.d.ts +6 -0
  287. package/dist/compression/filters/files.d.ts.map +1 -0
  288. package/dist/compression/filters/generic.d.ts +7 -0
  289. package/dist/compression/filters/generic.d.ts.map +1 -0
  290. package/dist/compression/filters/git.d.ts +6 -0
  291. package/dist/compression/filters/git.d.ts.map +1 -0
  292. package/dist/compression/filters/github.d.ts +6 -0
  293. package/dist/compression/filters/github.d.ts.map +1 -0
  294. package/dist/compression/filters/lint.d.ts +6 -0
  295. package/dist/compression/filters/lint.d.ts.map +1 -0
  296. package/dist/compression/filters/misc.d.ts +6 -0
  297. package/dist/compression/filters/misc.d.ts.map +1 -0
  298. package/dist/compression/filters/package.d.ts +6 -0
  299. package/dist/compression/filters/package.d.ts.map +1 -0
  300. package/dist/compression/filters/test.d.ts +6 -0
  301. package/dist/compression/filters/test.d.ts.map +1 -0
  302. package/dist/compression/index.d.ts +29 -0
  303. package/dist/compression/index.d.ts.map +1 -0
  304. package/dist/compression/naive-cost.d.ts +26 -0
  305. package/dist/compression/naive-cost.d.ts.map +1 -0
  306. package/dist/compression/tracker.d.ts +155 -0
  307. package/dist/compression/tracker.d.ts.map +1 -0
  308. package/dist/compression/types.d.ts +49 -0
  309. package/dist/compression/types.d.ts.map +1 -0
  310. package/dist/config.d.ts +90 -0
  311. package/dist/config.d.ts.map +1 -1
  312. package/dist/config.js +55 -1
  313. package/dist/config.js.map +2 -2
  314. package/dist/core/lock-manager.d.ts +2 -0
  315. package/dist/core/lock-manager.d.ts.map +1 -1
  316. package/dist/core/pipeline.d.ts +4 -1
  317. package/dist/core/pipeline.d.ts.map +1 -1
  318. package/dist/core/pipeline.js +42 -0
  319. package/dist/core/pipeline.js.map +2 -2
  320. package/dist/core/snapshot.d.ts +58 -0
  321. package/dist/core/snapshot.d.ts.map +1 -0
  322. package/dist/data/filters.d.ts +23 -0
  323. package/dist/data/filters.d.ts.map +1 -0
  324. package/dist/data/indexer.d.ts +25 -0
  325. package/dist/data/indexer.d.ts.map +1 -0
  326. package/dist/data/linker.d.ts +37 -0
  327. package/dist/data/linker.d.ts.map +1 -0
  328. package/dist/data/lint.d.ts +27 -0
  329. package/dist/data/lint.d.ts.map +1 -0
  330. package/dist/data/parsers/csv.d.ts +11 -0
  331. package/dist/data/parsers/csv.d.ts.map +1 -0
  332. package/dist/data/parsers/excel.d.ts +10 -0
  333. package/dist/data/parsers/excel.d.ts.map +1 -0
  334. package/dist/data/parsers/index.d.ts +28 -0
  335. package/dist/data/parsers/index.d.ts.map +1 -0
  336. package/dist/data/parsers/json-array.d.ts +9 -0
  337. package/dist/data/parsers/json-array.d.ts.map +1 -0
  338. package/dist/data/parsers/jsonl.d.ts +9 -0
  339. package/dist/data/parsers/jsonl.d.ts.map +1 -0
  340. package/dist/data/parsers/parquet.d.ts +10 -0
  341. package/dist/data/parsers/parquet.d.ts.map +1 -0
  342. package/dist/data/profiler.d.ts +29 -0
  343. package/dist/data/profiler.d.ts.map +1 -0
  344. package/dist/data/queries.d.ts +95 -0
  345. package/dist/data/queries.d.ts.map +1 -0
  346. package/dist/data/types.d.ts +103 -0
  347. package/dist/data/types.d.ts.map +1 -0
  348. package/dist/db/database.d.ts +57 -0
  349. package/dist/db/database.d.ts.map +1 -1
  350. package/dist/db/database.js +19 -0
  351. package/dist/db/database.js.map +2 -2
  352. package/dist/db/patterns-schema.sql +23 -0
  353. package/dist/docs/formats/asciidoc.d.ts +9 -0
  354. package/dist/docs/formats/asciidoc.d.ts.map +1 -0
  355. package/dist/docs/formats/html.d.ts +10 -0
  356. package/dist/docs/formats/html.d.ts.map +1 -0
  357. package/dist/docs/formats/index.d.ts +31 -0
  358. package/dist/docs/formats/index.d.ts.map +1 -0
  359. package/dist/docs/formats/markdown.d.ts +11 -0
  360. package/dist/docs/formats/markdown.d.ts.map +1 -0
  361. package/dist/docs/formats/openapi.d.ts +17 -0
  362. package/dist/docs/formats/openapi.d.ts.map +1 -0
  363. package/dist/docs/formats/org.d.ts +9 -0
  364. package/dist/docs/formats/org.d.ts.map +1 -0
  365. package/dist/docs/formats/plaintext.d.ts +11 -0
  366. package/dist/docs/formats/plaintext.d.ts.map +1 -0
  367. package/dist/docs/formats/rdoc.d.ts +10 -0
  368. package/dist/docs/formats/rdoc.d.ts.map +1 -0
  369. package/dist/docs/formats/rst.d.ts +11 -0
  370. package/dist/docs/formats/rst.d.ts.map +1 -0
  371. package/dist/docs/indexer.d.ts +49 -0
  372. package/dist/docs/indexer.d.ts.map +1 -0
  373. package/dist/docs/linker.d.ts +30 -0
  374. package/dist/docs/linker.d.ts.map +1 -0
  375. package/dist/docs/lint.d.ts +27 -0
  376. package/dist/docs/lint.d.ts.map +1 -0
  377. package/dist/docs/queries.d.ts +78 -0
  378. package/dist/docs/queries.d.ts.map +1 -0
  379. package/dist/docs/section-id.d.ts +48 -0
  380. package/dist/docs/section-id.d.ts.map +1 -0
  381. package/dist/docs/summarizer.d.ts +13 -0
  382. package/dist/docs/summarizer.d.ts.map +1 -0
  383. package/dist/docs/types.d.ts +71 -0
  384. package/dist/docs/types.d.ts.map +1 -0
  385. package/dist/docs/vectors.d.ts +54 -0
  386. package/dist/docs/vectors.d.ts.map +1 -0
  387. package/dist/extraction/extractor.d.ts +1 -1
  388. package/dist/extraction/extractor.d.ts.map +1 -1
  389. package/dist/extraction/grammars.d.ts +6 -0
  390. package/dist/extraction/grammars.d.ts.map +1 -1
  391. package/dist/extraction/languages.d.ts.map +1 -1
  392. package/dist/extraction/notebook.d.ts +14 -0
  393. package/dist/extraction/notebook.d.ts.map +1 -0
  394. package/dist/frameworks/amplify.d.ts +9 -0
  395. package/dist/frameworks/amplify.d.ts.map +1 -0
  396. package/dist/frameworks/angular.d.ts +9 -0
  397. package/dist/frameworks/angular.d.ts.map +1 -0
  398. package/dist/frameworks/ansible.d.ts +8 -0
  399. package/dist/frameworks/ansible.d.ts.map +1 -0
  400. package/dist/frameworks/cloudformation.d.ts +9 -0
  401. package/dist/frameworks/cloudformation.d.ts.map +1 -0
  402. package/dist/frameworks/docker.d.ts +9 -0
  403. package/dist/frameworks/docker.d.ts.map +1 -0
  404. package/dist/frameworks/elixir.d.ts +6 -0
  405. package/dist/frameworks/elixir.d.ts.map +1 -0
  406. package/dist/frameworks/flutter.d.ts +12 -0
  407. package/dist/frameworks/flutter.d.ts.map +1 -0
  408. package/dist/frameworks/iac.d.ts +10 -0
  409. package/dist/frameworks/iac.d.ts.map +1 -0
  410. package/dist/frameworks/index.d.ts +14 -0
  411. package/dist/frameworks/index.d.ts.map +1 -1
  412. package/dist/frameworks/kubernetes.d.ts +9 -0
  413. package/dist/frameworks/kubernetes.d.ts.map +1 -0
  414. package/dist/frameworks/pulumi.d.ts +9 -0
  415. package/dist/frameworks/pulumi.d.ts.map +1 -0
  416. package/dist/frameworks/scala.d.ts +6 -0
  417. package/dist/frameworks/scala.d.ts.map +1 -0
  418. package/dist/frameworks/solidity.d.ts +6 -0
  419. package/dist/frameworks/solidity.d.ts.map +1 -0
  420. package/dist/frameworks/terraform.d.ts +14 -0
  421. package/dist/frameworks/terraform.d.ts.map +1 -0
  422. package/dist/frameworks/vue.d.ts +7 -0
  423. package/dist/frameworks/vue.d.ts.map +1 -0
  424. package/dist/graph/communities.d.ts +43 -0
  425. package/dist/graph/communities.d.ts.map +1 -0
  426. package/dist/graph/flows.d.ts +55 -0
  427. package/dist/graph/flows.d.ts.map +1 -0
  428. package/dist/graph/refactor.d.ts +43 -0
  429. package/dist/graph/refactor.d.ts.map +1 -0
  430. package/dist/index.d.ts +36 -4
  431. package/dist/index.d.ts.map +1 -1
  432. package/dist/mcp/cache.d.ts +69 -0
  433. package/dist/mcp/cache.d.ts.map +1 -0
  434. package/dist/mcp/read-modes.d.ts +31 -0
  435. package/dist/mcp/read-modes.d.ts.map +1 -0
  436. package/dist/mcp/server.d.ts +1 -0
  437. package/dist/mcp/server.d.ts.map +1 -1
  438. package/dist/mcp/server.js +15 -2
  439. package/dist/mcp/server.js.map +2 -2
  440. package/dist/mcp/tool-names.d.ts +2 -0
  441. package/dist/mcp/tool-names.d.ts.map +1 -0
  442. package/dist/mcp/tool-names.js +4 -1
  443. package/dist/mcp/tool-names.js.map +2 -2
  444. package/dist/mcp/tools.d.ts +12 -0
  445. package/dist/mcp/tools.d.ts.map +1 -1
  446. package/dist/mcp/tools.js +397 -0
  447. package/dist/mcp/tools.js.map +2 -2
  448. package/dist/memory/compress.d.ts +19 -0
  449. package/dist/memory/compress.d.ts.map +1 -0
  450. package/dist/memory/database.d.ts +92 -0
  451. package/dist/memory/database.d.ts.map +1 -0
  452. package/dist/memory/database.js +38 -0
  453. package/dist/memory/database.js.map +2 -2
  454. package/dist/memory/index.d.ts +71 -0
  455. package/dist/memory/index.d.ts.map +1 -0
  456. package/dist/memory/index.js +12 -2
  457. package/dist/memory/index.js.map +2 -2
  458. package/dist/memory/symbols.d.ts +21 -0
  459. package/dist/memory/symbols.d.ts.map +1 -0
  460. package/dist/memory/types.d.ts +78 -0
  461. package/dist/memory/types.d.ts.map +1 -0
  462. package/dist/memory/types.js.map +1 -1
  463. package/dist/memory/vectors.d.ts +43 -0
  464. package/dist/memory/vectors.d.ts.map +1 -0
  465. package/dist/patterns/graph.d.ts +16 -0
  466. package/dist/patterns/graph.d.ts.map +1 -0
  467. package/dist/patterns/graph.js +45 -0
  468. package/dist/patterns/graph.js.map +7 -0
  469. package/dist/patterns/index.d.ts +4 -0
  470. package/dist/patterns/index.d.ts.map +1 -0
  471. package/dist/patterns/index.js +39 -0
  472. package/dist/patterns/index.js.map +7 -0
  473. package/dist/patterns/indexer.d.ts +15 -0
  474. package/dist/patterns/indexer.d.ts.map +1 -0
  475. package/dist/patterns/indexer.js +97 -0
  476. package/dist/patterns/indexer.js.map +7 -0
  477. package/dist/patterns/library/command-injection-go.yaml +11 -0
  478. package/dist/patterns/library/dangerous-eval-js.yaml +14 -0
  479. package/dist/patterns/library/dangerous-exec-py.yaml +13 -0
  480. package/dist/patterns/library/dangerous-reflection-java.yaml +8 -0
  481. package/dist/patterns/library/path-traversal-go.yaml +11 -0
  482. package/dist/patterns/library/path-traversal-py.yaml +12 -0
  483. package/dist/patterns/library/path-traversal-readfile-js.yaml +14 -0
  484. package/dist/patterns/library/prototype-pollution-js.yaml +12 -0
  485. package/dist/patterns/library/sql-injection-concat-js.yaml +12 -0
  486. package/dist/patterns/library/sql-injection-java.yaml +13 -0
  487. package/dist/patterns/library/sql-injection-py.yaml +12 -0
  488. package/dist/patterns/library/sql-injection-template-js.yaml +13 -0
  489. package/dist/patterns/library/weak-crypto-md5-js.yaml +13 -0
  490. package/dist/patterns/library/weak-crypto-py.yaml +13 -0
  491. package/dist/patterns/loader.d.ts +18 -0
  492. package/dist/patterns/loader.d.ts.map +1 -0
  493. package/dist/patterns/loader.js +277 -0
  494. package/dist/patterns/loader.js.map +7 -0
  495. package/dist/patterns/runner.d.ts +42 -0
  496. package/dist/patterns/runner.d.ts.map +1 -0
  497. package/dist/patterns/runner.js +277 -0
  498. package/dist/patterns/runner.js.map +7 -0
  499. package/dist/patterns/types.d.ts +27 -0
  500. package/dist/patterns/types.d.ts.map +1 -0
  501. package/dist/patterns/types.js +34 -0
  502. package/dist/patterns/types.js.map +7 -0
  503. package/dist/resolution/bridges/android-rn.d.ts +13 -0
  504. package/dist/resolution/bridges/android-rn.d.ts.map +1 -0
  505. package/dist/resolution/bridges/expo-modules.d.ts +10 -0
  506. package/dist/resolution/bridges/expo-modules.d.ts.map +1 -0
  507. package/dist/resolution/bridges/flutter-channel.d.ts +14 -0
  508. package/dist/resolution/bridges/flutter-channel.d.ts.map +1 -0
  509. package/dist/resolution/bridges/index.d.ts +40 -0
  510. package/dist/resolution/bridges/index.d.ts.map +1 -0
  511. package/dist/resolution/bridges/native-events.d.ts +10 -0
  512. package/dist/resolution/bridges/native-events.d.ts.map +1 -0
  513. package/dist/resolution/bridges/native-views.d.ts +13 -0
  514. package/dist/resolution/bridges/native-views.d.ts.map +1 -0
  515. package/dist/resolution/bridges/react-native.d.ts +9 -0
  516. package/dist/resolution/bridges/react-native.d.ts.map +1 -0
  517. package/dist/resolution/bridges/swift-objc.d.ts +14 -0
  518. package/dist/resolution/bridges/swift-objc.d.ts.map +1 -0
  519. package/dist/resolution/bridges/turbomodules.d.ts +10 -0
  520. package/dist/resolution/bridges/turbomodules.d.ts.map +1 -0
  521. package/dist/resolution/index.d.ts +28 -3
  522. package/dist/resolution/index.d.ts.map +1 -1
  523. package/dist/security/attack-surface.d.ts +46 -0
  524. package/dist/security/attack-surface.d.ts.map +1 -0
  525. package/dist/security/attack-surface.js +43 -1
  526. package/dist/security/attack-surface.js.map +2 -2
  527. package/dist/security/context-warnings.d.ts +40 -0
  528. package/dist/security/context-warnings.d.ts.map +1 -0
  529. package/dist/security/data-flows.d.ts +33 -0
  530. package/dist/security/data-flows.d.ts.map +1 -0
  531. package/dist/security/data-flows.js +65 -7
  532. package/dist/security/data-flows.js.map +2 -2
  533. package/dist/security/dep-confusion.d.ts +23 -0
  534. package/dist/security/dep-confusion.d.ts.map +1 -0
  535. package/dist/security/errors.d.ts +16 -0
  536. package/dist/security/errors.d.ts.map +1 -0
  537. package/dist/security/export/fix-suggestions.d.ts +21 -0
  538. package/dist/security/export/fix-suggestions.d.ts.map +1 -0
  539. package/dist/security/export/sbom.d.ts +33 -0
  540. package/dist/security/export/sbom.d.ts.map +1 -0
  541. package/dist/security/export/serialization.d.ts +62 -0
  542. package/dist/security/export/serialization.d.ts.map +1 -0
  543. package/dist/security/export/vex.d.ts +58 -0
  544. package/dist/security/export/vex.d.ts.map +1 -0
  545. package/dist/security/index.d.ts +21 -0
  546. package/dist/security/index.d.ts.map +1 -0
  547. package/dist/security/integrator.d.ts +63 -0
  548. package/dist/security/integrator.d.ts.map +1 -0
  549. package/dist/security/license.d.ts +33 -0
  550. package/dist/security/license.d.ts.map +1 -0
  551. package/dist/security/manifest/adapter.d.ts +92 -0
  552. package/dist/security/manifest/adapter.d.ts.map +1 -0
  553. package/dist/security/manifest/parser.d.ts +73 -0
  554. package/dist/security/manifest/parser.d.ts.map +1 -0
  555. package/dist/security/manifest/plugins/cargo.d.ts +11 -0
  556. package/dist/security/manifest/plugins/cargo.d.ts.map +1 -0
  557. package/dist/security/manifest/plugins/composer.d.ts +11 -0
  558. package/dist/security/manifest/plugins/composer.d.ts.map +1 -0
  559. package/dist/security/manifest/plugins/go.d.ts +12 -0
  560. package/dist/security/manifest/plugins/go.d.ts.map +1 -0
  561. package/dist/security/manifest/plugins/gradle.d.ts +12 -0
  562. package/dist/security/manifest/plugins/gradle.d.ts.map +1 -0
  563. package/dist/security/manifest/plugins/hex.d.ts +11 -0
  564. package/dist/security/manifest/plugins/hex.d.ts.map +1 -0
  565. package/dist/security/manifest/plugins/maven.d.ts +11 -0
  566. package/dist/security/manifest/plugins/maven.d.ts.map +1 -0
  567. package/dist/security/manifest/plugins/npm.d.ts +11 -0
  568. package/dist/security/manifest/plugins/npm.d.ts.map +1 -0
  569. package/dist/security/manifest/plugins/nuget.d.ts +12 -0
  570. package/dist/security/manifest/plugins/nuget.d.ts.map +1 -0
  571. package/dist/security/manifest/plugins/pip.d.ts +11 -0
  572. package/dist/security/manifest/plugins/pip.d.ts.map +1 -0
  573. package/dist/security/manifest/plugins/pubspec.d.ts +11 -0
  574. package/dist/security/manifest/plugins/pubspec.d.ts.map +1 -0
  575. package/dist/security/manifest/plugins/pyproject.d.ts +3 -0
  576. package/dist/security/manifest/plugins/pyproject.d.ts.map +1 -0
  577. package/dist/security/manifest/plugins/rubygems.d.ts +11 -0
  578. package/dist/security/manifest/plugins/rubygems.d.ts.map +1 -0
  579. package/dist/security/manifest/plugins/swift.d.ts +11 -0
  580. package/dist/security/manifest/plugins/swift.d.ts.map +1 -0
  581. package/dist/security/owasp.d.ts +16 -0
  582. package/dist/security/owasp.d.ts.map +1 -0
  583. package/dist/security/pipeline.d.ts +37 -0
  584. package/dist/security/pipeline.d.ts.map +1 -0
  585. package/dist/security/reachability.d.ts +67 -0
  586. package/dist/security/reachability.d.ts.map +1 -0
  587. package/dist/security/remediation.d.ts +51 -0
  588. package/dist/security/remediation.d.ts.map +1 -0
  589. package/dist/security/secrets.d.ts +38 -0
  590. package/dist/security/secrets.d.ts.map +1 -0
  591. package/dist/security/staleness.d.ts +43 -0
  592. package/dist/security/staleness.d.ts.map +1 -0
  593. package/dist/security/supply-chain.d.ts +34 -0
  594. package/dist/security/supply-chain.d.ts.map +1 -0
  595. package/dist/security/suppressions.d.ts +18 -0
  596. package/dist/security/suppressions.d.ts.map +1 -0
  597. package/dist/security/types.d.ts +144 -0
  598. package/dist/security/types.d.ts.map +1 -0
  599. package/dist/security/vuln/client.d.ts +90 -0
  600. package/dist/security/vuln/client.d.ts.map +1 -0
  601. package/dist/security/vuln/client.js.map +2 -2
  602. package/dist/security/vuln/epss-client.d.ts +26 -0
  603. package/dist/security/vuln/epss-client.d.ts.map +1 -0
  604. package/dist/security/vuln/index.d.ts +6 -0
  605. package/dist/security/vuln/index.d.ts.map +1 -0
  606. package/dist/security/vuln/osv-adapter.d.ts +58 -0
  607. package/dist/security/vuln/osv-adapter.d.ts.map +1 -0
  608. package/dist/security/vuln/types.d.ts +29 -0
  609. package/dist/security/vuln/types.d.ts.map +1 -0
  610. package/dist/sync/index.d.ts +4 -2
  611. package/dist/sync/index.d.ts.map +1 -1
  612. package/dist/types.d.ts +10 -4
  613. package/dist/types.d.ts.map +1 -1
  614. package/dist/types.js.map +1 -1
  615. package/dist/vectors/index.d.ts +11 -3
  616. package/dist/vectors/index.d.ts.map +1 -1
  617. package/dist/vectors/qdrant-index.d.ts +10 -3
  618. package/dist/vectors/qdrant-index.d.ts.map +1 -1
  619. package/dist/vectors/typesense-index.d.ts.map +1 -1
  620. package/dist/watchmen/index.js +83 -0
  621. package/dist/watchmen/index.js.map +7 -0
  622. package/dist/watchmen/synthesize.js +475 -0
  623. package/dist/watchmen/synthesize.js.map +7 -0
  624. package/package.json +5 -2
  625. package/dist/security/context-warnings.test.js +0 -300
  626. package/dist/security/context-warnings.test.js.map +0 -7
  627. package/dist/security/export/fix-suggestions.test.js +0 -74
  628. package/dist/security/export/fix-suggestions.test.js.map +0 -7
  629. package/dist/security/export/sbom.test.js +0 -288
  630. package/dist/security/export/sbom.test.js.map +0 -7
  631. package/dist/security/export/serialization.test.js +0 -310
  632. package/dist/security/export/serialization.test.js.map +0 -7
  633. package/dist/security/export/vex.test.js +0 -278
  634. package/dist/security/export/vex.test.js.map +0 -7
  635. package/dist/security/integrator-transitives.test.js +0 -359
  636. package/dist/security/integrator-transitives.test.js.map +0 -7
  637. package/dist/security/integrator.test.js +0 -237
  638. package/dist/security/integrator.test.js.map +0 -7
  639. package/dist/security/manifest/adapter.test.js +0 -272
  640. package/dist/security/manifest/adapter.test.js.map +0 -7
  641. package/dist/security/manifest/parser.test.js +0 -110
  642. package/dist/security/manifest/parser.test.js.map +0 -7
  643. package/dist/security/manifest/plugins/cargo.test.js +0 -304
  644. package/dist/security/manifest/plugins/cargo.test.js.map +0 -7
  645. package/dist/security/manifest/plugins/go.test.js +0 -341
  646. package/dist/security/manifest/plugins/go.test.js.map +0 -7
  647. package/dist/security/manifest/plugins/maven.test.js +0 -389
  648. package/dist/security/manifest/plugins/maven.test.js.map +0 -7
  649. package/dist/security/manifest/plugins/npm.test.js +0 -298
  650. package/dist/security/manifest/plugins/npm.test.js.map +0 -7
  651. package/dist/security/manifest/plugins/pip.test.js +0 -208
  652. package/dist/security/manifest/plugins/pip.test.js.map +0 -7
  653. package/dist/security/reachability.test.js +0 -394
  654. package/dist/security/reachability.test.js.map +0 -7
  655. package/dist/security/vuln/client.test.js +0 -288
  656. package/dist/security/vuln/client.test.js.map +0 -7
  657. package/dist/security/vuln/osv-adapter.test.js +0 -391
  658. package/dist/security/vuln/osv-adapter.test.js.map +0 -7
@@ -0,0 +1,475 @@
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 synthesize_exports = {};
30
+ __export(synthesize_exports, {
31
+ buildBriefPrompt: () => buildBriefPrompt,
32
+ buildSkillPrompt: () => buildSkillPrompt,
33
+ detectRecurringProcedures: () => detectRecurringProcedures,
34
+ extractGeneratedText: () => extractGeneratedText,
35
+ extractKirographTools: () => extractKirographTools,
36
+ fixKirographToolNames: () => fixKirographToolNames,
37
+ parseOutput: () => parseOutput,
38
+ pruneStaleSkills: () => pruneStaleSkills,
39
+ removeHallucinatedContent: () => removeHallucinatedContent,
40
+ runLocalSynthesis: () => runLocalSynthesis,
41
+ stripCodeFences: () => stripCodeFences,
42
+ truncateAtRepetitionLoop: () => truncateAtRepetitionLoop,
43
+ upsertBriefBlock: () => upsertBriefBlock,
44
+ writeKiroBrief: () => writeKiroBrief,
45
+ writeKiroSkill: () => writeKiroSkill
46
+ });
47
+ module.exports = __toCommonJS(synthesize_exports);
48
+ var fs = __toESM(require("fs"));
49
+ var path = __toESM(require("path"));
50
+ var os = __toESM(require("os"));
51
+ function isGemma4(modelName) {
52
+ return /gemma-?4/i.test(modelName);
53
+ }
54
+ let genPipeline = null;
55
+ let genPipelineModel = null;
56
+ let genProcessor = null;
57
+ async function getGenPipeline(modelName, quiet = false) {
58
+ if (genPipeline && genPipelineModel === modelName) return genPipeline;
59
+ const cacheDir = path.join(os.homedir(), ".kirograph", "models");
60
+ const { pipeline, env } = await import("@huggingface/transformers");
61
+ env.cacheDir = cacheDir;
62
+ const cached = require("fs").existsSync(path.join(cacheDir, modelName));
63
+ if (cached) env.allowRemoteModels = false;
64
+ const fileBytes = /* @__PURE__ */ new Map();
65
+ let lastFile = "";
66
+ function renderProgress(file, loaded, total, done) {
67
+ const entry = fileBytes.get(file) ?? { loaded: 0, total: 0 };
68
+ if (total > 0) entry.total = total;
69
+ entry.loaded = done ? entry.total : loaded;
70
+ fileBytes.set(file, entry);
71
+ const knownFiles = Array.from(fileBytes.values()).filter((f) => f.total > 0);
72
+ const totalLoaded = knownFiles.reduce((s, f) => s + f.loaded, 0);
73
+ const totalBytes = knownFiles.reduce((s, f) => s + f.total, 0);
74
+ const pct = totalBytes > 0 ? Math.min(totalLoaded / totalBytes * 100, 100) : 0;
75
+ const filled = Math.round(pct / 5);
76
+ const bar = "\u2588".repeat(filled) + "\u2591".repeat(20 - filled);
77
+ const mb = (totalLoaded / 1024 / 1024).toFixed(1);
78
+ const totalMb = (totalBytes / 1024 / 1024).toFixed(1);
79
+ process.stdout.write(`\r [${bar}] ${pct.toFixed(0).padStart(3)}% ${mb} / ${totalMb} MB `);
80
+ }
81
+ const dtype = isGemma4(modelName) ? "q4f16" : "q4";
82
+ genPipeline = await pipeline("text-generation", modelName, {
83
+ cache_dir: cacheDir,
84
+ dtype,
85
+ ...!cached && !quiet ? {
86
+ progress_callback: (p) => {
87
+ if (p.status === "progress" && p.file) {
88
+ lastFile = p.file;
89
+ renderProgress(p.file, p.loaded ?? 0, p.total ?? 0, false);
90
+ } else if (p.status === "done" && lastFile) {
91
+ renderProgress(lastFile, 1, 1, true);
92
+ lastFile = "";
93
+ }
94
+ }
95
+ } : {}
96
+ });
97
+ if (!cached && !quiet && fileBytes.size > 0) {
98
+ process.stdout.write("\n");
99
+ }
100
+ genProcessor = null;
101
+ genPipelineModel = modelName;
102
+ return genPipeline;
103
+ }
104
+ const SYSTEM_PROMPT = `You are a software project assistant. You receive coding session observations and produce structured workspace documentation.
105
+
106
+ Rules:
107
+ - Output ONLY raw markdown. Do NOT wrap in code fences (\`\`\`markdown or \`\`\`).
108
+ - Do NOT add preamble, explanation, or commentary outside the markdown sections.
109
+ - Use exactly the section headings requested. Do not invent new heading names.
110
+ - CRITICAL: copy tool names, function names, CLI commands, and symbol names EXACTLY as they appear in the observations. Do not paraphrase, rename, or abbreviate them. For example: if an observation says "kirograph_impact", write "kirograph_impact" \u2014 never "kilo-graph", "kirograph impact", "kiloGraph", or any other variation.`;
111
+ function extractKirographTools(observations) {
112
+ const tools = /* @__PURE__ */ new Set();
113
+ for (const obs of observations) {
114
+ for (const m of obs.content.matchAll(/\bkirograph_\w+/g)) tools.add(m[0]);
115
+ }
116
+ return [...tools];
117
+ }
118
+ function fixKirographToolNames(text, knownTools) {
119
+ if (knownTools.length === 0) return text;
120
+ const toolMap = /* @__PURE__ */ new Map();
121
+ for (const tool of knownTools) {
122
+ const parts = tool.split("_");
123
+ if (parts.length >= 2) toolMap.set(parts.slice(1).join("_"), tool);
124
+ }
125
+ return text.replace(
126
+ /\b(?:kilo|kiro|kyro|kero)[a-z]*[_\- ]?graph[a-z_\- ]*\b/gi,
127
+ (match) => {
128
+ const lower = match.toLowerCase().replace(/[^a-z]/g, "");
129
+ for (const [suffix, tool] of toolMap) {
130
+ if (lower.includes(suffix.replace(/_/g, ""))) return tool;
131
+ }
132
+ return knownTools[0];
133
+ }
134
+ );
135
+ }
136
+ function buildBriefPrompt(observations) {
137
+ const byKind = {};
138
+ for (const obs of observations) {
139
+ (byKind[obs.kind] ??= []).push(obs.content);
140
+ }
141
+ const lines = ["Observations from recent coding sessions:\n"];
142
+ for (const [kind, contents] of Object.entries(byKind)) {
143
+ lines.push(`[${kind}]`);
144
+ for (const c of contents) lines.push(`- ${c}`);
145
+ lines.push("");
146
+ }
147
+ lines.push(
148
+ "Write a workspace brief using ONLY these sections (skip any with no content):\n",
149
+ "## Decisions",
150
+ "(one bullet per architectural or implementation decision)\n",
151
+ "## Known Errors & Fixes",
152
+ "(one bullet per error \u2014 what broke and the fix)\n",
153
+ "## Recurring Patterns",
154
+ "(one bullet per recurring pattern)\n",
155
+ "## Architecture Notes",
156
+ "(one bullet per architectural constraint)\n",
157
+ "Be concise. One fact per bullet. Do not repeat observations verbatim. Do NOT use code fences."
158
+ );
159
+ return lines.join("\n");
160
+ }
161
+ function buildSkillPrompt(procedureObservations) {
162
+ const lines = [
163
+ "The following observations all describe the same recurring development procedure:\n",
164
+ ...procedureObservations.map((o) => `- ${o}`),
165
+ "",
166
+ "Write a skill file in EXACTLY this format (fill in the placeholders, keep the structure):\n",
167
+ "---",
168
+ "name: <short-kebab-case-slug>",
169
+ "description: <one sentence describing the procedure>",
170
+ "trigger_phrases:",
171
+ ' - <phrase that means "I should use this skill">',
172
+ " - <another trigger phrase>",
173
+ "---",
174
+ "",
175
+ "## When to use",
176
+ "<One sentence: when should a developer run this procedure?>",
177
+ "",
178
+ "## Steps",
179
+ "1. <First step \u2014 include the exact command/tool if relevant>",
180
+ "2. <Second step>",
181
+ "3. <Third step>",
182
+ "",
183
+ 'Use the EXACT tool names from the observations (e.g. kirograph_impact, not "kirograph impact").',
184
+ "Write ONLY the skill file content. No explanation, no preamble, no code fences."
185
+ ];
186
+ return lines.join("\n");
187
+ }
188
+ function detectRecurringProcedures(observations) {
189
+ const patterns = observations.filter((o) => o.kind === "pattern" || o.kind === "decision").map((o) => o.content);
190
+ if (patterns.length < 3) return [];
191
+ return [patterns];
192
+ }
193
+ function extractGeneratedText(output) {
194
+ const generated = output?.[0]?.generated_text;
195
+ let text;
196
+ if (Array.isArray(generated)) {
197
+ text = generated.at(-1)?.content ?? "";
198
+ } else {
199
+ text = typeof generated === "string" ? generated : "";
200
+ }
201
+ return stripCodeFences(text);
202
+ }
203
+ function stripCodeFences(text) {
204
+ return text.replace(/^```(?:markdown|md)?\n?/m, "").replace(/\n?```\s*$/m, "").trim();
205
+ }
206
+ function truncateAtRepetitionLoop(text) {
207
+ const sentences = text.split(/(?<=[.!?])\s+/);
208
+ const seen = [];
209
+ const result = [];
210
+ for (const sentence of sentences) {
211
+ const normalized = sentence.toLowerCase().replace(/[^a-z0-9]/g, "").slice(0, 60);
212
+ if (normalized.length < 10) {
213
+ result.push(sentence);
214
+ continue;
215
+ }
216
+ const isDuplicate = seen.slice(-5).some((s) => {
217
+ const overlap = [...normalized].filter((c, i) => s[i] === c).length;
218
+ return overlap / normalized.length > 0.8;
219
+ });
220
+ if (isDuplicate) break;
221
+ seen.push(normalized);
222
+ result.push(sentence);
223
+ }
224
+ return result.join(" ").trim();
225
+ }
226
+ function removeHallucinatedContent(text) {
227
+ return text.replace(/!\[.*?\]\(.*?\)/g, "").replace(/\*?\*?\[\d{9,}\]\*?\*?\s*/g, "").replace(/\n{3,}/g, "\n\n").trim();
228
+ }
229
+ function parseOutput(text) {
230
+ const skillRegex = /^(?:#{1,3}\s+)?Skills?:\s*(.*)$/gim;
231
+ const skillMatches = [];
232
+ let match;
233
+ while ((match = skillRegex.exec(text)) !== null) {
234
+ let title = match[1].trim();
235
+ if (!title) {
236
+ const rest = text.slice(match.index + match[0].length);
237
+ const nextLine = rest.split("\n").find((l) => l.trim());
238
+ title = nextLine?.trim() ?? "";
239
+ }
240
+ if (!title) continue;
241
+ const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
242
+ skillMatches.push({ index: match.index, slug });
243
+ }
244
+ if (skillMatches.length > 0) {
245
+ const briefEnd = skillMatches[0].index;
246
+ const skills = skillMatches.map((m, i) => {
247
+ const start = m.index;
248
+ const end = i + 1 < skillMatches.length ? skillMatches[i + 1].index : text.length;
249
+ const body = text.slice(start, end).replace(/^#{1,3} Skills?: .+$/im, "").trim();
250
+ return { slug: m.slug, content: `## Skill: ${m.slug}
251
+
252
+ ${body}` };
253
+ });
254
+ return { brief: text.slice(0, briefEnd).trim(), skills };
255
+ }
256
+ const recurringMatch = /^## Recurring Procedures\b.*$/m.exec(text);
257
+ if (recurringMatch) {
258
+ const sectionStart = recurringMatch.index;
259
+ const nextH2 = /^## /m.exec(text.slice(sectionStart + recurringMatch[0].length));
260
+ const sectionEnd = nextH2 ? sectionStart + recurringMatch[0].length + nextH2.index : text.length;
261
+ const sectionBody = text.slice(sectionStart, sectionEnd);
262
+ const subRegex = /^### (.+)$/gm;
263
+ const subMatches = [];
264
+ let sub;
265
+ while ((sub = subRegex.exec(sectionBody)) !== null) {
266
+ subMatches.push({ index: sectionStart + sub.index, title: sub[1].trim() });
267
+ }
268
+ if (subMatches.length > 0) {
269
+ const brief = (text.slice(0, sectionStart) + text.slice(sectionEnd)).trim();
270
+ const skills = subMatches.map((m, i) => {
271
+ const start = m.index;
272
+ const end = i + 1 < subMatches.length ? subMatches[i + 1].index : sectionEnd;
273
+ const slug = m.title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
274
+ const content = `## Skill: ${slug}
275
+
276
+ ` + text.slice(start + m.title.length + 4, end).trim();
277
+ return { slug, content };
278
+ });
279
+ return { brief, skills };
280
+ }
281
+ }
282
+ return { brief: text.trim(), skills: [] };
283
+ }
284
+ const WATCHMEN_BLOCK_START = "<!-- kirograph-watchmen:start -->";
285
+ const WATCHMEN_BLOCK_END = "<!-- kirograph-watchmen:end -->";
286
+ function upsertBriefBlock(filePath, brief) {
287
+ const header = `## KiroGraph Watchmen
288
+
289
+ _Auto-generated by KiroGraph Watchmen. Last updated: ${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}._
290
+
291
+ `;
292
+ const block = `${WATCHMEN_BLOCK_START}
293
+ ${header}${brief}
294
+ ${WATCHMEN_BLOCK_END}`;
295
+ let existing = "";
296
+ try {
297
+ existing = fs.readFileSync(filePath, "utf8");
298
+ } catch {
299
+ }
300
+ const startIdx = existing.indexOf(WATCHMEN_BLOCK_START);
301
+ const endIdx = existing.indexOf(WATCHMEN_BLOCK_END);
302
+ let updated;
303
+ if (startIdx !== -1 && endIdx !== -1) {
304
+ updated = existing.slice(0, startIdx) + block + existing.slice(endIdx + WATCHMEN_BLOCK_END.length);
305
+ } else {
306
+ updated = existing ? `${existing}
307
+
308
+ ${block}
309
+ ` : `${block}
310
+ `;
311
+ }
312
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
313
+ fs.writeFileSync(filePath, updated, "utf8");
314
+ }
315
+ function writeKiroBrief(steeringDir, brief) {
316
+ const content = `---
317
+ inclusion: always
318
+ ---
319
+
320
+ # Workspace Knowledge (KiroGraph Watchmen)
321
+
322
+ _Auto-generated. Last updated: ${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}._
323
+
324
+ ${brief}
325
+ `;
326
+ const filePath = path.join(steeringDir, "kirograph-watchmen.md");
327
+ fs.mkdirSync(steeringDir, { recursive: true });
328
+ fs.writeFileSync(filePath, content, "utf8");
329
+ }
330
+ function writeKiroSkill(steeringDir, slug, content) {
331
+ const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
332
+ let modelFrontmatter = "";
333
+ let body = content;
334
+ if (frontmatterMatch) {
335
+ modelFrontmatter = frontmatterMatch[1].trim();
336
+ body = frontmatterMatch[2].trim();
337
+ }
338
+ const frontmatter = ["---", "inclusion: manual"];
339
+ if (modelFrontmatter) {
340
+ for (const line of modelFrontmatter.split("\n")) {
341
+ if (!line.startsWith("inclusion:")) frontmatter.push(line);
342
+ }
343
+ }
344
+ frontmatter.push("---");
345
+ const filePath = path.join(steeringDir, `watchmen-${slug}.md`);
346
+ fs.mkdirSync(steeringDir, { recursive: true });
347
+ fs.writeFileSync(filePath, frontmatter.join("\n") + "\n\n" + body + "\n", "utf8");
348
+ }
349
+ function pruneStaleSkills(steeringDir, currentSlugs) {
350
+ const pruned = [];
351
+ if (!fs.existsSync(steeringDir)) return pruned;
352
+ for (const file of fs.readdirSync(steeringDir)) {
353
+ if (!file.startsWith("watchmen-") || !file.endsWith(".md")) continue;
354
+ const slug = file.slice("watchmen-".length, -".md".length);
355
+ if (!currentSlugs.has(slug)) {
356
+ fs.unlinkSync(path.join(steeringDir, file));
357
+ pruned.push(file);
358
+ }
359
+ }
360
+ return pruned;
361
+ }
362
+ async function generate(pipe, systemPrompt, userPrompt, modelName, label, quiet, maxNewTokens = 500) {
363
+ const knownTools = [];
364
+ let tokenCount = 0;
365
+ let streamer = void 0;
366
+ if (!quiet && pipe.tokenizer) {
367
+ const { TextStreamer } = await import("@huggingface/transformers");
368
+ streamer = new TextStreamer(pipe.tokenizer, {
369
+ skip_prompt: true,
370
+ skip_special_tokens: true,
371
+ callback_function: () => {
372
+ tokenCount++;
373
+ const pct = Math.min(Math.round(tokenCount / maxNewTokens * 100), 99);
374
+ const filled = Math.round(pct / 5);
375
+ const bar = "\u2588".repeat(filled) + "\u2591".repeat(20 - filled);
376
+ process.stdout.write(`\r ${label.padEnd(14)} [${bar}] ${String(tokenCount).padStart(3)} tokens`);
377
+ }
378
+ });
379
+ }
380
+ const genOpts = {
381
+ ...isGemma4(modelName) ? { temperature: 1, top_p: 0.95, top_k: 64, do_sample: true } : { do_sample: false, repetition_penalty: 1.3 },
382
+ max_new_tokens: maxNewTokens,
383
+ ...streamer ? { streamer } : {}
384
+ };
385
+ const messages = [
386
+ { role: "system", content: systemPrompt },
387
+ { role: "user", content: userPrompt }
388
+ ];
389
+ const output = await pipe(messages, genOpts);
390
+ if (!quiet && tokenCount > 0) {
391
+ process.stdout.write(`\r ${" ".repeat(64)}\r`);
392
+ }
393
+ return truncateAtRepetitionLoop(
394
+ removeHallucinatedContent(stripCodeFences(extractGeneratedText(output)))
395
+ );
396
+ }
397
+ async function runLocalSynthesis(observations, readyResult, modelName, projectRoot, quiet = false) {
398
+ const pipe = await getGenPipeline(modelName, quiet);
399
+ const knownTools = extractKirographTools(observations);
400
+ const filesWritten = [];
401
+ const skillsWritten = [];
402
+ let skillsPruned = [];
403
+ if (!quiet) process.stdout.write(" Generating brief...\n");
404
+ const briefRaw = await generate(pipe, SYSTEM_PROMPT, buildBriefPrompt(observations), modelName, "Brief", quiet);
405
+ const brief = fixKirographToolNames(briefRaw, knownTools);
406
+ for (const target of readyResult.targetFiles) {
407
+ const absPath = path.isAbsolute(target) ? target : path.join(projectRoot, target);
408
+ if (target === ".kiro/steering/kirograph-watchmen.md") {
409
+ const steeringDir = path.join(projectRoot, readyResult.skillTargetDir ?? ".kiro/steering");
410
+ writeKiroBrief(steeringDir, brief);
411
+ } else {
412
+ upsertBriefBlock(absPath, brief);
413
+ }
414
+ filesWritten.push(target);
415
+ }
416
+ if (readyResult.skillTargetDir) {
417
+ const steeringDir = path.join(projectRoot, readyResult.skillTargetDir);
418
+ const currentSlugs = /* @__PURE__ */ new Set();
419
+ const procedureGroups = detectRecurringProcedures(observations);
420
+ for (let i = 0; i < procedureGroups.length; i++) {
421
+ const group = procedureGroups[i];
422
+ const label = `Skill ${i + 1}/${procedureGroups.length}`;
423
+ if (!quiet) process.stdout.write(` Generating ${label}...
424
+ `);
425
+ const skillRaw = await generate(
426
+ pipe,
427
+ SYSTEM_PROMPT,
428
+ buildSkillPrompt(group),
429
+ modelName,
430
+ label,
431
+ quiet,
432
+ 350
433
+ );
434
+ const skillText = fixKirographToolNames(skillRaw, knownTools);
435
+ const nameMatch = skillText.match(/^name:\s*(.+)$/m);
436
+ const slug = nameMatch ? nameMatch[1].trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") : `procedure-${i + 1}`;
437
+ if (!currentSlugs.has(slug)) {
438
+ writeKiroSkill(steeringDir, slug, skillText);
439
+ skillsWritten.push(`watchmen-${slug}.md`);
440
+ currentSlugs.add(slug);
441
+ }
442
+ }
443
+ skillsPruned = pruneStaleSkills(steeringDir, currentSlugs);
444
+ }
445
+ const summaryParts = [`Synthesized ${observations.length} observations`];
446
+ if (filesWritten.length) summaryParts.push(`into ${filesWritten.join(", ")}`);
447
+ if (skillsWritten.length) summaryParts.push(`wrote skills: ${skillsWritten.join(", ")}`);
448
+ if (skillsPruned.length) summaryParts.push(`pruned: ${skillsPruned.join(", ")}`);
449
+ return {
450
+ skipped: false,
451
+ filesWritten,
452
+ skillsWritten,
453
+ skillsPruned,
454
+ summaryObservation: summaryParts.join("; ") + "."
455
+ };
456
+ }
457
+ // Annotate the CommonJS export names for ESM import in node:
458
+ 0 && (module.exports = {
459
+ buildBriefPrompt,
460
+ buildSkillPrompt,
461
+ detectRecurringProcedures,
462
+ extractGeneratedText,
463
+ extractKirographTools,
464
+ fixKirographToolNames,
465
+ parseOutput,
466
+ pruneStaleSkills,
467
+ removeHallucinatedContent,
468
+ runLocalSynthesis,
469
+ stripCodeFences,
470
+ truncateAtRepetitionLoop,
471
+ upsertBriefBlock,
472
+ writeKiroBrief,
473
+ writeKiroSkill
474
+ });
475
+ //# sourceMappingURL=synthesize.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/watchmen/synthesize.ts"],
4
+ "sourcesContent": ["/**\n * KiroGraph Watchmen \u2014 local model synthesis\n *\n * Runs a local HuggingFace text-generation model (via @huggingface/transformers)\n * to synthesize memory observations into a workspace brief + skill files.\n * Same lazy-singleton pattern as src/memory/vectors.ts.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport * as os from 'os';\nimport type { MemObservation } from '../memory/types';\nimport type { WatchmenReadyResult } from '../memory/types';\n\n// \u2500\u2500 Model detection \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 isGemma4(modelName: string): boolean {\n return /gemma-?4/i.test(modelName);\n}\n\n// \u2500\u2500 Model singleton (same pattern as vectors.ts) \u2500\u2500\u2500\u2500\u2500\u2500\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\nlet genPipeline: any = null;\nlet genPipelineModel: string | null = null;\nlet genProcessor: any = null;\n\nasync function getGenPipeline(modelName: string, quiet = false) {\n if (genPipeline && genPipelineModel === modelName) return genPipeline;\n const cacheDir = path.join(os.homedir(), '.kirograph', 'models');\n\n const { pipeline, env } = await import('@huggingface/transformers') as any;\n env.cacheDir = cacheDir;\n\n // Same pattern as vectors/index.ts: if model is cached, disable remote access entirely\n // so transformers.js never makes a network request on subsequent runs.\n const cached = require('fs').existsSync(path.join(cacheDir, modelName));\n if (cached) env.allowRemoteModels = false;\n\n // Download progress bar \u2014 same pattern as src/vectors/index.ts\n const fileBytes = new Map<string, { loaded: number; total: number }>();\n let lastFile = '';\n\n function renderProgress(file: string, loaded: number, total: number, done: boolean) {\n const entry = fileBytes.get(file) ?? { loaded: 0, total: 0 };\n if (total > 0) entry.total = total;\n entry.loaded = done ? entry.total : loaded;\n fileBytes.set(file, entry);\n\n const knownFiles = Array.from(fileBytes.values()).filter(f => f.total > 0);\n const totalLoaded = knownFiles.reduce((s, f) => s + f.loaded, 0);\n const totalBytes = knownFiles.reduce((s, f) => s + f.total, 0);\n const pct = totalBytes > 0 ? Math.min((totalLoaded / totalBytes) * 100, 100) : 0;\n const filled = Math.round(pct / 5);\n const bar = '\u2588'.repeat(filled) + '\u2591'.repeat(20 - filled);\n const mb = (totalLoaded / 1024 / 1024).toFixed(1);\n const totalMb = (totalBytes / 1024 / 1024).toFixed(1);\n process.stdout.write(`\\r [${bar}] ${pct.toFixed(0).padStart(3)}% ${mb} / ${totalMb} MB `);\n }\n\n const dtype = isGemma4(modelName) ? 'q4f16' : 'q4';\n genPipeline = await pipeline('text-generation', modelName, {\n cache_dir: cacheDir,\n dtype,\n ...(!cached && !quiet ? {\n progress_callback: (p: { status: string; file?: string; loaded?: number; total?: number }) => {\n if (p.status === 'progress' && p.file) {\n lastFile = p.file;\n renderProgress(p.file, p.loaded ?? 0, p.total ?? 0, false);\n } else if (p.status === 'done' && lastFile) {\n renderProgress(lastFile, 1, 1, true);\n lastFile = '';\n }\n },\n } : {}),\n } as any);\n\n if (!cached && !quiet && fileBytes.size > 0) {\n process.stdout.write('\\n'); // newline after progress bar\n }\n\n genProcessor = null;\n genPipelineModel = modelName;\n return genPipeline;\n}\n\n// \u2500\u2500 Prompt building \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 SYSTEM_PROMPT = `You are a software project assistant. You receive coding session observations and produce structured workspace documentation.\n\nRules:\n- Output ONLY raw markdown. Do NOT wrap in code fences (\\`\\`\\`markdown or \\`\\`\\`).\n- Do NOT add preamble, explanation, or commentary outside the markdown sections.\n- Use exactly the section headings requested. Do not invent new heading names.\n- CRITICAL: copy tool names, function names, CLI commands, and symbol names EXACTLY as they appear in the observations. Do not paraphrase, rename, or abbreviate them. For example: if an observation says \"kirograph_impact\", write \"kirograph_impact\" \u2014 never \"kilo-graph\", \"kirograph impact\", \"kiloGraph\", or any other variation.`;\n\n/** Extract kirograph_* tool names from observations for post-processing correction. */\nexport function extractKirographTools(observations: MemObservation[]): string[] {\n const tools = new Set<string>();\n for (const obs of observations) {\n for (const m of obs.content.matchAll(/\\bkirograph_\\w+/g)) tools.add(m[0]);\n }\n return [...tools];\n}\n\n/**\n * Replace common model hallucinations of kirograph tool names with the correct form.\n * The model often splits \"kirograph_impact\" into \"kilo-graph\", \"kyrograph_\", etc.\n */\n/**\n * Replace model hallucinations of kirograph tool names with the correct form.\n * Matches broad variants: kilo-graph, kyrograph, kirographtest, kirograph_X, etc.\n * Uses the known tool list from observations to pick the right replacement.\n */\nexport function fixKirographToolNames(text: string, knownTools: string[]): string {\n if (knownTools.length === 0) return text;\n\n // Map tool suffix \u2192 correct full name (e.g. 'impact' \u2192 'kirograph_impact')\n const toolMap = new Map<string, string>();\n for (const tool of knownTools) {\n const parts = tool.split('_');\n if (parts.length >= 2) toolMap.set(parts.slice(1).join('_'), tool);\n }\n\n return text.replace(\n /\\b(?:kilo|kiro|kyro|kero)[a-z]*[_\\- ]?graph[a-z_\\- ]*\\b/gi,\n (match) => {\n const lower = match.toLowerCase().replace(/[^a-z]/g, '');\n // Find the known tool whose suffix appears in the match\n for (const [suffix, tool] of toolMap) {\n if (lower.includes(suffix.replace(/_/g, ''))) return tool;\n }\n // Fallback: return the first known tool (likely the only one)\n return knownTools[0];\n }\n );\n}\n\n/** Prompt for the workspace brief only \u2014 no skills. */\nexport function buildBriefPrompt(observations: MemObservation[]): string {\n const byKind: Record<string, string[]> = {};\n for (const obs of observations) {\n (byKind[obs.kind] ??= []).push(obs.content);\n }\n\n const lines: string[] = ['Observations from recent coding sessions:\\n'];\n for (const [kind, contents] of Object.entries(byKind)) {\n lines.push(`[${kind}]`);\n for (const c of contents) lines.push(`- ${c}`);\n lines.push('');\n }\n\n lines.push(\n 'Write a workspace brief using ONLY these sections (skip any with no content):\\n',\n '## Decisions',\n '(one bullet per architectural or implementation decision)\\n',\n '## Known Errors & Fixes',\n '(one bullet per error \u2014 what broke and the fix)\\n',\n '## Recurring Patterns',\n '(one bullet per recurring pattern)\\n',\n '## Architecture Notes',\n '(one bullet per architectural constraint)\\n',\n 'Be concise. One fact per bullet. Do not repeat observations verbatim. Do NOT use code fences.',\n );\n\n return lines.join('\\n');\n}\n\n/** Prompt for a single skill file given a group of related observations. */\nexport function buildSkillPrompt(procedureObservations: string[]): string {\n const lines = [\n 'The following observations all describe the same recurring development procedure:\\n',\n ...procedureObservations.map(o => `- ${o}`),\n '',\n 'Write a skill file in EXACTLY this format (fill in the placeholders, keep the structure):\\n',\n '---',\n 'name: <short-kebab-case-slug>',\n 'description: <one sentence describing the procedure>',\n 'trigger_phrases:',\n ' - <phrase that means \"I should use this skill\">',\n ' - <another trigger phrase>',\n '---',\n '',\n '## When to use',\n '<One sentence: when should a developer run this procedure?>',\n '',\n '## Steps',\n '1. <First step \u2014 include the exact command/tool if relevant>',\n '2. <Second step>',\n '3. <Third step>',\n '',\n 'Use the EXACT tool names from the observations (e.g. kirograph_impact, not \"kirograph impact\").',\n 'Write ONLY the skill file content. No explanation, no preamble, no code fences.',\n ];\n return lines.join('\\n');\n}\n\n/** Group pattern/decision observations that share a common procedure theme. */\nexport function detectRecurringProcedures(observations: MemObservation[]): string[][] {\n // Only look at pattern observations \u2014 they most likely describe recurring steps\n const patterns = observations\n .filter(o => o.kind === 'pattern' || o.kind === 'decision')\n .map(o => o.content);\n\n if (patterns.length < 3) return [];\n\n // Simple heuristic: if 3+ pattern observations exist, treat them as one procedure group.\n // A more sophisticated implementation could cluster by keyword overlap.\n return [patterns];\n}\n\n// \u2500\u2500 Output parsing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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\n/** Extract the assistant reply from a transformers.js text-generation output. */\nexport function extractGeneratedText(output: any): string {\n const generated = output?.[0]?.generated_text;\n let text: string;\n if (Array.isArray(generated)) {\n // Chat model: returns array of messages \u2014 last one is assistant\n text = generated.at(-1)?.content ?? '';\n } else {\n // Plain text model\n text = typeof generated === 'string' ? generated : '';\n }\n return stripCodeFences(text);\n}\n\n/** Strip outer markdown code fences that small models tend to add. */\nexport function stripCodeFences(text: string): string {\n return text\n .replace(/^```(?:markdown|md)?\\n?/m, '')\n .replace(/\\n?```\\s*$/m, '')\n .trim();\n}\n\n/**\n * Detect and truncate repetition loops that small models fall into.\n * Splits into sentences and cuts at the first one that closely repeats a prior sentence.\n */\nexport function truncateAtRepetitionLoop(text: string): string {\n const sentences = text.split(/(?<=[.!?])\\s+/);\n const seen: string[] = [];\n const result: string[] = [];\n\n for (const sentence of sentences) {\n const normalized = sentence.toLowerCase().replace(/[^a-z0-9]/g, '').slice(0, 60);\n if (normalized.length < 10) { result.push(sentence); continue; }\n // If this sentence is very similar to a recent one, stop\n const isDuplicate = seen.slice(-5).some(s => {\n const overlap = [...normalized].filter((c, i) => s[i] === c).length;\n return overlap / normalized.length > 0.8;\n });\n if (isDuplicate) break;\n seen.push(normalized);\n result.push(sentence);\n }\n\n return result.join(' ').trim();\n}\n\n/** Remove hallucinated image markdown and leaked run-IDs from model output. */\nexport function removeHallucinatedContent(text: string): string {\n return text\n // Remove image markdown: ![alt](url) \u2014 models hallucinate URLs\n .replace(/!\\[.*?\\]\\(.*?\\)/g, '')\n // Remove run-id timestamps [1780913041] wherever they appear (inline or line-start)\n .replace(/\\*?\\*?\\[\\d{9,}\\]\\*?\\*?\\s*/g, '')\n // Collapse 3+ consecutive blank lines into 2\n .replace(/\\n{3,}/g, '\\n\\n')\n .trim();\n}\n\n/**\n * Split generated text into brief body and skill sections.\n *\n * Primary: looks for `## Skill: <slug>` (explicit format requested in prompt).\n * Fallback: looks for `### <Title>` subsections inside a `## Recurring Procedures`\n * block \u2014 small models often use this structure instead.\n */\nexport function parseOutput(text: string): { brief: string; skills: Array<{ slug: string; content: string }> } {\n // \u2500\u2500 Primary: flexible skill heading detection \u2500\u2500\u2500\u2500\u2500\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 // Small models use many variations:\n // ## Skill: slug (ideal)\n // # Skills: Title (common)\n // Skill: Title (no heading marker)\n // Skill:\\nTitle (name on next line)\n const skillRegex = /^(?:#{1,3}\\s+)?Skills?:\\s*(.*)$/gim;\n const skillMatches: Array<{ index: number; slug: string }> = [];\n let match: RegExpExecArray | null;\n while ((match = skillRegex.exec(text)) !== null) {\n let title = match[1].trim();\n // If no title on same line, grab the next non-empty line as the title\n if (!title) {\n const rest = text.slice(match.index + match[0].length);\n const nextLine = rest.split('\\n').find(l => l.trim());\n title = nextLine?.trim() ?? '';\n }\n if (!title) continue;\n const slug = title.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');\n skillMatches.push({ index: match.index, slug });\n }\n\n if (skillMatches.length > 0) {\n const briefEnd = skillMatches[0].index;\n const skills = skillMatches.map((m, i) => {\n const start = m.index;\n const end = i + 1 < skillMatches.length ? skillMatches[i + 1].index : text.length;\n // Normalise heading to ## Skill: <slug> for the file writer\n const body = text.slice(start, end).replace(/^#{1,3} Skills?: .+$/im, '').trim();\n return { slug: m.slug, content: `## Skill: ${m.slug}\\n\\n${body}` };\n });\n return { brief: text.slice(0, briefEnd).trim(), skills };\n }\n\n // \u2500\u2500 Fallback: ### subsections inside ## Recurring Procedures \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n const recurringMatch = /^## Recurring Procedures\\b.*$/m.exec(text);\n if (recurringMatch) {\n const sectionStart = recurringMatch.index;\n // Find the end of this section (next ## heading or end of text)\n const nextH2 = /^## /m.exec(text.slice(sectionStart + recurringMatch[0].length));\n const sectionEnd = nextH2\n ? sectionStart + recurringMatch[0].length + nextH2.index\n : text.length;\n\n const sectionBody = text.slice(sectionStart, sectionEnd);\n const subRegex = /^### (.+)$/gm;\n const subMatches: Array<{ index: number; title: string }> = [];\n let sub: RegExpExecArray | null;\n while ((sub = subRegex.exec(sectionBody)) !== null) {\n subMatches.push({ index: sectionStart + sub.index, title: sub[1].trim() });\n }\n\n if (subMatches.length > 0) {\n const brief = (text.slice(0, sectionStart) + text.slice(sectionEnd)).trim();\n const skills = subMatches.map((m, i) => {\n const start = m.index;\n const end = i + 1 < subMatches.length ? subMatches[i + 1].index : sectionEnd;\n const slug = m.title.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');\n // Reformat as ## Skill: heading for the file writer\n const content = `## Skill: ${slug}\\n\\n` + text.slice(start + m.title.length + 4, end).trim();\n return { slug, content };\n });\n return { brief, skills };\n }\n }\n\n return { brief: text.trim(), skills: [] };\n}\n\n// \u2500\u2500 File writing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 WATCHMEN_BLOCK_START = '<!-- kirograph-watchmen:start -->';\nconst WATCHMEN_BLOCK_END = '<!-- kirograph-watchmen:end -->';\n\n/** Upsert the KiroGraph Watchmen block in a plain text/markdown file. */\nexport function upsertBriefBlock(filePath: string, brief: string): void {\n const header = `## KiroGraph Watchmen\\n\\n_Auto-generated by KiroGraph Watchmen. Last updated: ${new Date().toISOString().slice(0, 10)}._\\n\\n`;\n const block = `${WATCHMEN_BLOCK_START}\\n${header}${brief}\\n${WATCHMEN_BLOCK_END}`;\n\n let existing = '';\n try { existing = fs.readFileSync(filePath, 'utf8'); } catch { /* new file */ }\n\n const startIdx = existing.indexOf(WATCHMEN_BLOCK_START);\n const endIdx = existing.indexOf(WATCHMEN_BLOCK_END);\n\n let updated: string;\n if (startIdx !== -1 && endIdx !== -1) {\n updated = existing.slice(0, startIdx) + block + existing.slice(endIdx + WATCHMEN_BLOCK_END.length);\n } else {\n updated = existing ? `${existing}\\n\\n${block}\\n` : `${block}\\n`;\n }\n\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, updated, 'utf8');\n}\n\n/** Write the Kiro steering workspace brief (inclusion: always). */\nexport function writeKiroBrief(steeringDir: string, brief: string): void {\n const content =\n `---\\ninclusion: always\\n---\\n\\n` +\n `# Workspace Knowledge (KiroGraph Watchmen)\\n\\n` +\n `_Auto-generated. Last updated: ${new Date().toISOString().slice(0, 10)}._\\n\\n` +\n `${brief}\\n`;\n const filePath = path.join(steeringDir, 'kirograph-watchmen.md');\n fs.mkdirSync(steeringDir, { recursive: true });\n fs.writeFileSync(filePath, content, 'utf8');\n}\n\n/**\n * Write a Kiro skill file (inclusion: manual) with SKILL.md format.\n * Merges the `inclusion: manual` Kiro frontmatter with whatever name/description/\n * trigger_phrases frontmatter the model generated inside the content.\n */\nexport function writeKiroSkill(steeringDir: string, slug: string, content: string): void {\n // The model may have produced its own frontmatter block \u2014 extract it\n const frontmatterMatch = content.match(/^---\\n([\\s\\S]*?)\\n---\\n?([\\s\\S]*)$/);\n let modelFrontmatter = '';\n let body = content;\n\n if (frontmatterMatch) {\n modelFrontmatter = frontmatterMatch[1].trim();\n body = frontmatterMatch[2].trim();\n }\n\n // Build the final frontmatter: Kiro inclusion first, then model metadata\n const frontmatter = ['---', 'inclusion: manual'];\n if (modelFrontmatter) {\n for (const line of modelFrontmatter.split('\\n')) {\n // Skip if it would duplicate inclusion\n if (!line.startsWith('inclusion:')) frontmatter.push(line);\n }\n }\n frontmatter.push('---');\n\n const filePath = path.join(steeringDir, `watchmen-${slug}.md`);\n fs.mkdirSync(steeringDir, { recursive: true });\n fs.writeFileSync(filePath, frontmatter.join('\\n') + '\\n\\n' + body + '\\n', 'utf8');\n}\n\n/** Remove stale watchmen-*.md skill files that are not in the current slug set. */\nexport function pruneStaleSkills(steeringDir: string, currentSlugs: Set<string>): string[] {\n const pruned: string[] = [];\n if (!fs.existsSync(steeringDir)) return pruned;\n for (const file of fs.readdirSync(steeringDir)) {\n if (!file.startsWith('watchmen-') || !file.endsWith('.md')) continue;\n const slug = file.slice('watchmen-'.length, -'.md'.length);\n if (!currentSlugs.has(slug)) {\n fs.unlinkSync(path.join(steeringDir, file));\n pruned.push(file);\n }\n }\n return pruned;\n}\n\n// \u2500\u2500 Main synthesis entry point \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 interface SynthesisResult {\n skipped: boolean;\n reason?: string;\n filesWritten: string[];\n skillsWritten: string[];\n skillsPruned: string[];\n summaryObservation: string;\n}\n\n/** Run one model call with a token progress bar. Returns cleaned text. */\nasync function generate(\n pipe: any,\n systemPrompt: string,\n userPrompt: string,\n modelName: string,\n label: string,\n quiet: boolean,\n maxNewTokens = 500,\n): Promise<string> {\n const knownTools: string[] = []; // filled per-call by caller if needed\n let tokenCount = 0;\n\n let streamer: any = undefined;\n if (!quiet && pipe.tokenizer) {\n const { TextStreamer } = await import('@huggingface/transformers') as any;\n streamer = new TextStreamer(pipe.tokenizer, {\n skip_prompt: true,\n skip_special_tokens: true,\n callback_function: () => {\n tokenCount++;\n const pct = Math.min(Math.round((tokenCount / maxNewTokens) * 100), 99);\n const filled = Math.round(pct / 5);\n const bar = '\u2588'.repeat(filled) + '\u2591'.repeat(20 - filled);\n process.stdout.write(`\\r ${label.padEnd(14)} [${bar}] ${String(tokenCount).padStart(3)} tokens`);\n },\n });\n }\n\n const genOpts: any = {\n ...(isGemma4(modelName)\n ? { temperature: 1.0, top_p: 0.95, top_k: 64, do_sample: true }\n : { do_sample: false, repetition_penalty: 1.3 }),\n max_new_tokens: maxNewTokens,\n ...(streamer ? { streamer } : {}),\n };\n\n const messages = [\n { role: 'system' as const, content: systemPrompt },\n { role: 'user' as const, content: userPrompt },\n ];\n\n const output = await pipe(messages, genOpts);\n\n if (!quiet && tokenCount > 0) {\n process.stdout.write(`\\r ${' '.repeat(64)}\\r`);\n }\n\n return truncateAtRepetitionLoop(\n removeHallucinatedContent(stripCodeFences(extractGeneratedText(output)))\n );\n}\n\nexport async function runLocalSynthesis(\n observations: MemObservation[],\n readyResult: WatchmenReadyResult,\n modelName: string,\n projectRoot: string,\n quiet = false,\n): Promise<SynthesisResult> {\n const pipe = await getGenPipeline(modelName, quiet);\n const knownTools = extractKirographTools(observations);\n\n const filesWritten: string[] = [];\n const skillsWritten: string[] = [];\n let skillsPruned: string[] = [];\n\n // \u2500\u2500 Pass 1: workspace brief \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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 if (!quiet) process.stdout.write(' Generating brief...\\n');\n const briefRaw = await generate(pipe, SYSTEM_PROMPT, buildBriefPrompt(observations), modelName, 'Brief', quiet);\n const brief = fixKirographToolNames(briefRaw, knownTools);\n\n for (const target of readyResult.targetFiles) {\n const absPath = path.isAbsolute(target) ? target : path.join(projectRoot, target);\n if (target === '.kiro/steering/kirograph-watchmen.md') {\n const steeringDir = path.join(projectRoot, readyResult.skillTargetDir ?? '.kiro/steering');\n writeKiroBrief(steeringDir, brief);\n } else {\n upsertBriefBlock(absPath, brief);\n }\n filesWritten.push(target);\n }\n\n // \u2500\u2500 Pass 2: skill files (Kiro only, one call per procedure group) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n if (readyResult.skillTargetDir) {\n const steeringDir = path.join(projectRoot, readyResult.skillTargetDir);\n const currentSlugs = new Set<string>();\n const procedureGroups = detectRecurringProcedures(observations);\n\n for (let i = 0; i < procedureGroups.length; i++) {\n const group = procedureGroups[i];\n const label = `Skill ${i + 1}/${procedureGroups.length}`;\n if (!quiet) process.stdout.write(` Generating ${label}...\\n`);\n\n const skillRaw = await generate(\n pipe, SYSTEM_PROMPT, buildSkillPrompt(group), modelName, label, quiet, 350,\n );\n const skillText = fixKirographToolNames(skillRaw, knownTools);\n\n // Extract slug from name: field in model frontmatter, or derive from content\n const nameMatch = skillText.match(/^name:\\s*(.+)$/m);\n const slug = nameMatch\n ? nameMatch[1].trim().toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '')\n : `procedure-${i + 1}`;\n\n if (!currentSlugs.has(slug)) {\n writeKiroSkill(steeringDir, slug, skillText);\n skillsWritten.push(`watchmen-${slug}.md`);\n currentSlugs.add(slug);\n }\n }\n\n skillsPruned = pruneStaleSkills(steeringDir, currentSlugs);\n }\n\n const summaryParts = [`Synthesized ${observations.length} observations`];\n if (filesWritten.length) summaryParts.push(`into ${filesWritten.join(', ')}`);\n if (skillsWritten.length) summaryParts.push(`wrote skills: ${skillsWritten.join(', ')}`);\n if (skillsPruned.length) summaryParts.push(`pruned: ${skillsPruned.join(', ')}`);\n\n return {\n skipped: false,\n filesWritten,\n skillsWritten,\n skillsPruned,\n summaryObservation: summaryParts.join('; ') + '.',\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,SAAoB;AACpB,WAAsB;AACtB,SAAoB;AAMpB,SAAS,SAAS,WAA4B;AAC5C,SAAO,YAAY,KAAK,SAAS;AACnC;AAIA,IAAI,cAAmB;AACvB,IAAI,mBAAkC;AACtC,IAAI,eAAoB;AAExB,eAAe,eAAe,WAAmB,QAAQ,OAAO;AAC9D,MAAI,eAAe,qBAAqB,UAAW,QAAO;AAC1D,QAAM,WAAW,KAAK,KAAK,GAAG,QAAQ,GAAG,cAAc,QAAQ;AAE/D,QAAM,EAAE,UAAU,IAAI,IAAI,MAAM,OAAO,2BAA2B;AAClE,MAAI,WAAW;AAIf,QAAM,SAAS,QAAQ,IAAI,EAAE,WAAW,KAAK,KAAK,UAAU,SAAS,CAAC;AACtE,MAAI,OAAQ,KAAI,oBAAoB;AAGpC,QAAM,YAAY,oBAAI,IAA+C;AACrE,MAAI,WAAW;AAEf,WAAS,eAAe,MAAc,QAAgB,OAAe,MAAe;AAClF,UAAM,QAAQ,UAAU,IAAI,IAAI,KAAK,EAAE,QAAQ,GAAG,OAAO,EAAE;AAC3D,QAAI,QAAQ,EAAG,OAAM,QAAQ;AAC7B,UAAM,SAAS,OAAO,MAAM,QAAQ;AACpC,cAAU,IAAI,MAAM,KAAK;AAEzB,UAAM,aAAa,MAAM,KAAK,UAAU,OAAO,CAAC,EAAE,OAAO,OAAK,EAAE,QAAQ,CAAC;AACzE,UAAM,cAAc,WAAW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AAY,UAAU,MAAM,iBAAiB;AACnD,YAAM,OAAO,YACT,UAAU,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,eAAe,GAAG,EAAE,QAAQ,UAAU,EAAE,IAClF,aAAa,IAAI,CAAC;AAEtB,UAAI,CAAC,aAAa,IAAI,IAAI,GAAG;AAC3B,uBAAe,aAAa,MAAM,SAAS;AAC3C,sBAAc,KAAK,YAAY,IAAI,KAAK;AACxC,qBAAa,IAAI,IAAI;AAAA,MACvB;AAAA,IACF;AAEA,mBAAe,iBAAiB,aAAa,YAAY;AAAA,EAC3D;AAEA,QAAM,eAAe,CAAC,eAAe,aAAa,MAAM,eAAe;AACvE,MAAI,aAAa,OAAQ,cAAa,KAAK,QAAQ,aAAa,KAAK,IAAI,CAAC,EAAE;AAC5E,MAAI,cAAc,OAAQ,cAAa,KAAK,iBAAiB,cAAc,KAAK,IAAI,CAAC,EAAE;AACvF,MAAI,aAAa,OAAQ,cAAa,KAAK,WAAW,aAAa,KAAK,IAAI,CAAC,EAAE;AAE/E,SAAO;AAAA,IACL,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB,aAAa,KAAK,IAAI,IAAI;AAAA,EAChD;AACF;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kirograph",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "Semantic code knowledge graph for Kiro: fewer tool calls, instant symbol lookups, 100% local.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,6 +17,8 @@
17
17
  "dev": "tsx scripts/build.ts --watch",
18
18
  "typecheck": "tsc --noEmit",
19
19
  "test": "vitest --run",
20
+ "test:watchmen": "bash scripts/watchmen/test.sh",
21
+ "test:watchmen:skip-llm": "bash scripts/watchmen/test.sh --skip-llm",
20
22
  "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
21
23
  "release": "./scripts/release.sh",
22
24
  "docs": "npx serve docs"
@@ -30,7 +32,7 @@
30
32
  ],
31
33
  "license": "MIT",
32
34
  "dependencies": {
33
- "@huggingface/transformers": "^3.0.0",
35
+ "@huggingface/transformers": "^4.2.0",
34
36
  "commander": "^14.0.2",
35
37
  "figlet": "^1.11.0",
36
38
  "node-sqlite3-wasm": "^0.8.30",
@@ -41,6 +43,7 @@
41
43
  "xlsx": "^0.18.5"
42
44
  },
43
45
  "optionalDependencies": {
46
+ "@ast-grep/napi": "^0.43.0",
44
47
  "@electric-sql/pglite": "^0.2.17",
45
48
  "@lancedb/lancedb": "^0.27.2",
46
49
  "@orama/orama": "^3.1.18",