agentic-qe 3.9.12 → 3.9.14

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 (400) hide show
  1. package/.claude/agents/v3/qe-coverage-specialist.md +1 -1
  2. package/.claude/agents/v3/qe-fleet-commander.md +1 -1
  3. package/.claude/agents/v3/qe-pentest-validator.md +4 -2
  4. package/.claude/agents/v3/qe-queen-coordinator.md +1 -1
  5. package/.claude/agents/v3/qe-risk-assessor.md +1 -1
  6. package/.claude/agents/v3/qe-root-cause-analyzer.md +1 -1
  7. package/.claude/agents/v3/qe-security-auditor.md +4 -2
  8. package/.claude/agents/v3/qe-security-scanner.md +3 -1
  9. package/.claude/agents/v3/qe-test-architect.md +1 -1
  10. package/.claude/commands/aqe-costs.md +6 -6
  11. package/.claude/skills/.validation/schemas/skill-eval.schema.json +3 -0
  12. package/.claude/skills/.validation/test-data/sample-output.json +1 -1
  13. package/.claude/skills/a11y-ally/SKILL.md +1 -1
  14. package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +1 -1
  15. package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +2 -2
  16. package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +1 -1
  17. package/.claude/skills/contract-testing/evals/contract-testing.yaml +2 -2
  18. package/.claude/skills/database-testing/evals/database-testing.yaml +2 -2
  19. package/.claude/skills/localization-testing/evals/localization-testing.yaml +1 -1
  20. package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +1 -1
  21. package/.claude/skills/performance-testing/evals/performance-testing.yaml +1 -1
  22. package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +1 -1
  23. package/.claude/skills/skills-manifest.json +1 -1
  24. package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +2 -2
  25. package/CHANGELOG.md +45 -0
  26. package/assets/agents/v3/qe-coverage-specialist.md +1 -1
  27. package/assets/agents/v3/qe-fleet-commander.md +1 -1
  28. package/assets/agents/v3/qe-pentest-validator.md +4 -2
  29. package/assets/agents/v3/qe-queen-coordinator.md +1 -1
  30. package/assets/agents/v3/qe-risk-assessor.md +1 -1
  31. package/assets/agents/v3/qe-root-cause-analyzer.md +1 -1
  32. package/assets/agents/v3/qe-security-auditor.md +4 -2
  33. package/assets/agents/v3/qe-security-scanner.md +3 -1
  34. package/assets/agents/v3/qe-test-architect.md +1 -1
  35. package/assets/skills/.validation/schemas/skill-eval.schema.json +3 -0
  36. package/assets/skills/.validation/test-data/sample-output.json +1 -1
  37. package/assets/skills/a11y-ally/SKILL.md +1 -1
  38. package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +1 -1
  39. package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +2 -2
  40. package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +1 -1
  41. package/assets/skills/contract-testing/evals/contract-testing.yaml +2 -2
  42. package/assets/skills/database-testing/evals/database-testing.yaml +2 -2
  43. package/assets/skills/localization-testing/evals/localization-testing.yaml +1 -1
  44. package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +1 -1
  45. package/assets/skills/performance-testing/evals/performance-testing.yaml +1 -1
  46. package/assets/skills/quality-metrics/evals/quality-metrics.yaml +1 -1
  47. package/assets/skills/skills-manifest.json +1 -1
  48. package/assets/skills/testability-scoring/evals/testability-scoring.yaml +2 -2
  49. package/dist/cli/bundle.js +5 -5
  50. package/dist/cli/chunks/adapter-W2EM7ZQ7.js +2 -0
  51. package/dist/cli/chunks/{agent-booster-wasm-LB7XIYUI.js → agent-booster-wasm-O6EXMPMF.js} +2 -2
  52. package/dist/cli/chunks/{agent-handler-VVLNITPB.js → agent-handler-4LPJVTJU.js} +2 -2
  53. package/dist/cli/chunks/{agent-memory-branch-QAJOHQYI.js → agent-memory-branch-PRR323JZ.js} +2 -2
  54. package/dist/cli/chunks/aqe-learning-engine-JQMPNHQU.js +2 -0
  55. package/dist/cli/chunks/{audit-BJIGY6LA.js → audit-YCKXQOXD.js} +2 -2
  56. package/dist/cli/chunks/base-EOPYE6JR.js +2 -0
  57. package/dist/cli/chunks/{better-sqlite3-X6P6KJS6.js → better-sqlite3-44RIH62G.js} +2 -2
  58. package/dist/cli/chunks/{brain-handler-7FGHAVL5.js → brain-handler-IAYJBAFL.js} +3 -3
  59. package/dist/cli/chunks/{branch-enumerator-YXYZMQ4P.js → branch-enumerator-RVVS2UYR.js} +2 -2
  60. package/dist/cli/chunks/{browser-WC2JTT32.js → browser-L6IKC4PR.js} +2 -2
  61. package/dist/cli/chunks/browser-workflow-CSARLAJD.js +2 -0
  62. package/dist/cli/chunks/chunk-2L3BCZ2F.js +2 -0
  63. package/dist/cli/chunks/{chunk-RLVQDFZ2.js → chunk-36YZ2UF7.js} +2 -2
  64. package/dist/cli/chunks/{chunk-B5OL6C4A.js → chunk-3GIZRGX6.js} +2 -2
  65. package/dist/cli/chunks/{chunk-SVEC7C63.js → chunk-3NUMJB3U.js} +10 -10
  66. package/dist/cli/chunks/{chunk-6ZTKAP4X.js → chunk-3PZ2QLLR.js} +4 -4
  67. package/dist/cli/chunks/{chunk-W26THOMZ.js → chunk-3ZKTPPIC.js} +1 -1
  68. package/dist/cli/chunks/{chunk-XQHTGKXD.js → chunk-4EQWK6P6.js} +2 -2
  69. package/dist/cli/chunks/{chunk-WNM64IA6.js → chunk-4JYLXYAH.js} +1 -1
  70. package/dist/cli/chunks/{chunk-Q2JAC625.js → chunk-4RDTR2OF.js} +2 -2
  71. package/dist/cli/chunks/chunk-53KLVMAT.js +18 -0
  72. package/dist/cli/chunks/{chunk-I6J7AYIL.js → chunk-5DWTU2PN.js} +1 -1
  73. package/dist/cli/chunks/{chunk-LNHOWUSG.js → chunk-5HUAD4UU.js} +2 -2
  74. package/dist/cli/chunks/{chunk-SILMLIWR.js → chunk-5MWNXDQW.js} +2 -2
  75. package/dist/cli/chunks/{chunk-FHNDCWXZ.js → chunk-5U6M4XCP.js} +3 -3
  76. package/dist/cli/chunks/{chunk-FYVNVHMI.js → chunk-6BK2S2WE.js} +2 -2
  77. package/dist/cli/chunks/chunk-6EZY2QVM.js +3021 -0
  78. package/dist/cli/chunks/{chunk-YNHB6NGD.js → chunk-6GKXC6DE.js} +2 -2
  79. package/dist/cli/chunks/{chunk-CBD772DQ.js → chunk-6J6GXRHX.js} +5 -5
  80. package/dist/cli/chunks/chunk-7732TLNA.js +5 -0
  81. package/dist/cli/chunks/{chunk-AZCTNUUN.js → chunk-7IJBZGZY.js} +1 -1
  82. package/dist/cli/chunks/{chunk-52GDG6LU.js → chunk-A2TK52B2.js} +2 -2
  83. package/dist/cli/chunks/chunk-AEQMQVDJ.js +2 -0
  84. package/dist/cli/chunks/chunk-AHVUILGE.js +2 -0
  85. package/dist/cli/chunks/{chunk-PBZLLYB3.js → chunk-AOYN6XYJ.js} +1 -1
  86. package/dist/cli/chunks/{chunk-MJY6FD6N.js → chunk-BFCMOMOF.js} +1 -1
  87. package/dist/cli/chunks/{chunk-WJGATF2P.js → chunk-BNPJMPM3.js} +2 -2
  88. package/dist/cli/chunks/{chunk-4LEYR7AH.js → chunk-BOMJHE4I.js} +2 -2
  89. package/dist/cli/chunks/{chunk-WZYG4SKQ.js → chunk-CGC63MGF.js} +5 -5
  90. package/dist/cli/chunks/{chunk-ZZ2E6WS6.js → chunk-D6APBW66.js} +1 -1
  91. package/dist/cli/chunks/chunk-DD4T7ZUM.js +3 -0
  92. package/dist/cli/chunks/{chunk-FT3BXL44.js → chunk-DGUAAG3T.js} +1 -1
  93. package/dist/cli/chunks/{chunk-AXJTWYCF.js → chunk-DJLRRCR6.js} +2 -2
  94. package/dist/cli/chunks/{chunk-WEMOVPQS.js → chunk-DMZ2XOEW.js} +2 -2
  95. package/dist/cli/chunks/{chunk-IQAEANMY.js → chunk-DNFDSDKE.js} +2 -2
  96. package/dist/cli/chunks/{chunk-PMRJHQIW.js → chunk-ERMIIRYN.js} +1 -1
  97. package/dist/cli/chunks/{chunk-K2UQR3NX.js → chunk-FFACJODG.js} +2 -2
  98. package/dist/cli/chunks/{chunk-OSGQFRT2.js → chunk-FNKKENLS.js} +2 -2
  99. package/dist/cli/chunks/{chunk-ESYALM4A.js → chunk-FWI7PK4X.js} +1 -1
  100. package/dist/cli/chunks/{chunk-QANDN6CW.js → chunk-FYBTGEOV.js} +1 -1
  101. package/dist/cli/chunks/{chunk-WMVMFBMH.js → chunk-G2KQUEGY.js} +2 -2
  102. package/dist/cli/chunks/{chunk-CX5TTKTB.js → chunk-G7L5Y47C.js} +1 -1
  103. package/dist/cli/chunks/{chunk-VC4X36JJ.js → chunk-GALNZTYE.js} +2 -2
  104. package/dist/cli/chunks/chunk-GIUAY4KY.js +12 -0
  105. package/dist/cli/chunks/chunk-GM5LIYLQ.js +2 -0
  106. package/dist/cli/chunks/{chunk-JTE3QBBI.js → chunk-GOTVYSX5.js} +3 -3
  107. package/dist/cli/chunks/{chunk-XTGVTVLN.js → chunk-GUEK5DOK.js} +2 -2
  108. package/dist/cli/chunks/{chunk-ZLDOPUZY.js → chunk-HEQ23HBE.js} +2 -2
  109. package/dist/cli/chunks/{chunk-E7WWAJK5.js → chunk-HJJTLOWZ.js} +2 -2
  110. package/dist/cli/chunks/{chunk-QRP7WPSO.js → chunk-I3P5RZX7.js} +4 -4
  111. package/dist/cli/chunks/{chunk-FE2R7DOJ.js → chunk-I5U64MHU.js} +2 -2
  112. package/dist/cli/chunks/chunk-IH4OOAEP.js +2 -0
  113. package/dist/cli/chunks/{chunk-BC6LRNKU.js → chunk-IL3ESNHA.js} +2 -2
  114. package/dist/cli/chunks/{chunk-PVYTP7CC.js → chunk-IOHDE27P.js} +2 -2
  115. package/dist/cli/chunks/{chunk-T5WF5HBA.js → chunk-J3XLOHWB.js} +2 -2
  116. package/dist/cli/chunks/{chunk-MT4ZZUPF.js → chunk-J5YOXLBD.js} +1 -1
  117. package/dist/cli/chunks/{chunk-Q3BVPPHB.js → chunk-JLBUS4PR.js} +2 -2
  118. package/dist/cli/chunks/{chunk-PGKGFKSS.js → chunk-JN7MSUGK.js} +2 -2
  119. package/dist/cli/chunks/{chunk-R7RGOZ3H.js → chunk-JNLKLC7G.js} +2 -2
  120. package/dist/cli/chunks/chunk-JOGKQTCU.js +24 -0
  121. package/dist/cli/chunks/{chunk-LURKOKOG.js → chunk-JWR3NNFA.js} +1 -1
  122. package/dist/cli/chunks/chunk-KFAN5FZM.js +2 -0
  123. package/dist/cli/chunks/{chunk-PJENW5A2.js → chunk-KHUFPJE4.js} +3 -3
  124. package/dist/cli/chunks/{chunk-UOD76Y2C.js → chunk-KJB6JJXT.js} +1 -1
  125. package/dist/cli/chunks/{chunk-TKV2X6EP.js → chunk-KVN4FTPT.js} +2 -2
  126. package/dist/cli/chunks/{chunk-6DDT5OHC.js → chunk-L4IWZXSC.js} +1 -1
  127. package/dist/cli/chunks/chunk-LJ3WQIBN.js +2 -0
  128. package/dist/cli/chunks/{chunk-OAWDBVKN.js → chunk-LKGLKX2A.js} +2 -2
  129. package/dist/cli/chunks/{chunk-V7LIKEGA.js → chunk-LWHM5BWD.js} +2 -2
  130. package/dist/cli/chunks/{chunk-4HTPZ67G.js → chunk-M2RO34V7.js} +4 -4
  131. package/dist/cli/chunks/{chunk-2BDTKGEH.js → chunk-ME4LVBTT.js} +2 -2
  132. package/dist/cli/chunks/chunk-MFGYMNNY.js +2 -0
  133. package/dist/cli/chunks/{chunk-OOV2W3PM.js → chunk-MXIFVOYA.js} +2 -2
  134. package/dist/cli/chunks/{chunk-CGXLVTVK.js → chunk-NWGIQCCO.js} +1 -1
  135. package/dist/cli/chunks/chunk-NWZYULZE.js +65 -0
  136. package/dist/cli/chunks/{chunk-XZYW2RNI.js → chunk-OGLS6HB4.js} +1 -1
  137. package/dist/cli/chunks/{chunk-FCUJTBDG.js → chunk-ORHCO2I7.js} +2 -2
  138. package/dist/cli/chunks/{chunk-GK4QGLN6.js → chunk-OZBTC26R.js} +2 -2
  139. package/dist/cli/chunks/chunk-P5YSBYZV.js +2 -0
  140. package/dist/cli/chunks/{chunk-ONF657XE.js → chunk-PFSSI3YR.js} +2 -2
  141. package/dist/cli/chunks/{chunk-M7QYRRRS.js → chunk-PZF5ISGS.js} +1 -1
  142. package/dist/cli/chunks/{chunk-MBISKOYR.js → chunk-Q4DAYLH4.js} +2 -2
  143. package/dist/cli/chunks/{chunk-E6MBYXCI.js → chunk-QLWP7ZIT.js} +2 -2
  144. package/dist/cli/chunks/{chunk-H6T57HMP.js → chunk-QUK34CSU.js} +2 -2
  145. package/dist/cli/chunks/chunk-RQFC7Q33.js +2 -0
  146. package/dist/cli/chunks/{chunk-DQ3ZEAMM.js → chunk-S2KGZJHS.js} +1 -1
  147. package/dist/cli/chunks/{chunk-JAVMUPY3.js → chunk-S6SM7LJK.js} +2 -2
  148. package/dist/cli/chunks/chunk-STYNOKOM.js +2 -0
  149. package/dist/cli/chunks/{chunk-NXZDG2ED.js → chunk-SUXUCW5I.js} +2 -2
  150. package/dist/cli/chunks/chunk-SY74WSBN.js +2 -0
  151. package/dist/cli/chunks/{chunk-OZNBJZTT.js → chunk-TJOZPPZR.js} +2 -2
  152. package/dist/cli/chunks/chunk-TOSFK4VG.js +2 -0
  153. package/dist/cli/chunks/{chunk-FGE33JCO.js → chunk-UAAJ3BSW.js} +2 -2
  154. package/dist/cli/chunks/{chunk-XD7W2BE6.js → chunk-UG2J5MTY.js} +1 -1
  155. package/dist/cli/chunks/{chunk-LJTRN6ZE.js → chunk-UIYK4Y7K.js} +2 -2
  156. package/dist/cli/chunks/{chunk-NWL7UQPY.js → chunk-UUVTLYUK.js} +2 -2
  157. package/dist/cli/chunks/{chunk-R2E73QTH.js → chunk-VDGWDDBC.js} +2 -2
  158. package/dist/cli/chunks/{chunk-4UIACR5V.js → chunk-VEAVDXXT.js} +2 -2
  159. package/dist/cli/chunks/{chunk-ZYAIIW3U.js → chunk-VQB5SLXZ.js} +2 -2
  160. package/dist/cli/chunks/{chunk-ZXLAY3BL.js → chunk-VU4QET3C.js} +2 -2
  161. package/dist/cli/chunks/{chunk-JDUJCNS5.js → chunk-VUS4VRPQ.js} +2 -2
  162. package/dist/cli/chunks/{chunk-STRHCEUL.js → chunk-VVKENR4I.js} +1 -1
  163. package/dist/cli/chunks/{chunk-GB4LEEYS.js → chunk-WE7KIXR6.js} +2 -2
  164. package/dist/cli/chunks/{chunk-C2ICHYJH.js → chunk-WELNFHDN.js} +1 -1
  165. package/dist/cli/chunks/{chunk-45SNY726.js → chunk-WSZVSDD5.js} +2 -2
  166. package/dist/cli/chunks/{chunk-DDNFBXJJ.js → chunk-WUYJYRBY.js} +1 -1
  167. package/dist/cli/chunks/{chunk-KYO7ME7T.js → chunk-WVN4YJSF.js} +2 -2
  168. package/dist/cli/chunks/{chunk-FZY2AFLS.js → chunk-XH774Q6Z.js} +1 -1
  169. package/dist/cli/chunks/{chunk-WKORFEXG.js → chunk-XNXOW7BQ.js} +2 -2
  170. package/dist/cli/chunks/{chunk-AUWWCPVO.js → chunk-Y3X5OS5F.js} +2 -2
  171. package/dist/cli/chunks/chunk-YPMBD44A.js +2 -0
  172. package/dist/cli/chunks/{chunk-RUD4F7IT.js → chunk-YZBY4ZRF.js} +2 -2
  173. package/dist/cli/chunks/{chunk-ALW3NHF2.js → chunk-Z3PSKGBO.js} +2 -2
  174. package/dist/cli/chunks/{chunk-FYJSJLTP.js → chunk-ZCRLZINE.js} +2 -2
  175. package/dist/cli/chunks/{chunk-I4JO4LD3.js → chunk-ZFZX2NA3.js} +2 -2
  176. package/dist/cli/chunks/{chunk-7WP5HEJQ.js → chunk-ZU5VHW6P.js} +2 -2
  177. package/dist/cli/chunks/{ci-44MZEXKJ.js → ci-QQ4F5TYO.js} +2 -2
  178. package/dist/cli/chunks/{ci-output-GZOZ3VUQ.js → ci-output-QC4WRENA.js} +2 -2
  179. package/dist/cli/chunks/{circuit-breaker-5BOXU65J.js → circuit-breaker-HFQUNYTK.js} +2 -2
  180. package/dist/cli/chunks/{claude-flow-setup-T5R4BHVO.js → claude-flow-setup-XNSCWIUN.js} +2 -2
  181. package/dist/cli/chunks/client-3GECKJWB.js +2 -0
  182. package/dist/cli/chunks/{cline-installer-LLROFJKC.js → cline-installer-S3CECBYL.js} +2 -2
  183. package/dist/cli/chunks/{code-ATTTFE44.js → code-QHUELDUH.js} +2 -2
  184. package/dist/cli/chunks/{code-index-extractor-S4DRQYVK.js → code-index-extractor-QLA5EQTE.js} +2 -2
  185. package/dist/cli/chunks/{codex-installer-WRPU4ITG.js → codex-installer-CQ7JNNOA.js} +2 -2
  186. package/dist/cli/chunks/{completions-EVEFMAIP.js → completions-S33U3KIT.js} +2 -2
  187. package/dist/cli/chunks/{complexity-analyzer-3RXGDVMX.js → complexity-analyzer-J7IEW3EM.js} +2 -2
  188. package/dist/cli/chunks/{continuedev-installer-TLMVH7VM.js → continuedev-installer-DVU24D37.js} +2 -2
  189. package/dist/cli/chunks/{copilot-installer-JOYO6JND.js → copilot-installer-DYISOPBC.js} +2 -2
  190. package/dist/cli/chunks/{cost-tracker-FJJO7V73.js → cost-tracker-URJADKKS.js} +2 -2
  191. package/dist/cli/chunks/{coverage-MBFLUTS3.js → coverage-NGMKJNW6.js} +3 -3
  192. package/dist/cli/chunks/cross-domain-router-UYONX76U.js +2 -0
  193. package/dist/cli/chunks/{cursor-installer-RUUOVPGH.js → cursor-installer-DFBJRDSY.js} +2 -2
  194. package/dist/cli/chunks/daemon-JSKKVVCV.js +19 -0
  195. package/dist/cli/chunks/{dag-attention-scheduler-AFCFHXDN.js → dag-attention-scheduler-YITFS6MR.js} +2 -2
  196. package/dist/cli/chunks/{detect-CUWUBG5C.js → detect-5APZP2D3.js} +2 -2
  197. package/dist/cli/chunks/{domain-handler-WHXJUWWW.js → domain-handler-WHH6XPSZ.js} +2 -2
  198. package/dist/cli/chunks/{domain-transfer-K6EVN3AJ.js → domain-transfer-SERX53SS.js} +2 -2
  199. package/dist/cli/chunks/dream-Z5QDQJSM.js +2 -0
  200. package/dist/cli/chunks/esm-node-FOI5Y3O2.js +2 -0
  201. package/dist/cli/chunks/{eval-YZDW7GLA.js → eval-FM3BLVFO.js} +2 -2
  202. package/dist/cli/chunks/{fast-paths-M4MXWH5P.js → fast-paths-4MSOOJVK.js} +2 -2
  203. package/dist/cli/chunks/{feature-flags-5CRUDVES.js → feature-flags-564YFR65.js} +2 -2
  204. package/dist/cli/chunks/{feature-flags-3YMEIR7B.js → feature-flags-WJT57IEJ.js} +2 -2
  205. package/dist/cli/chunks/{file-discovery-YBAUSWQ6.js → file-discovery-5QVG65WF.js} +2 -2
  206. package/dist/cli/chunks/{fleet-KZ7U5HH5.js → fleet-CF5JRK5B.js} +3 -3
  207. package/dist/cli/chunks/{gnn-wrapper-YPOKBUR3.js → gnn-wrapper-NYQ77563.js} +2 -2
  208. package/dist/cli/chunks/{heartbeat-handler-47WVNCNY.js → heartbeat-handler-42QJPKHE.js} +4 -4
  209. package/dist/cli/chunks/heartbeat-scheduler-7XEAV74Y.js +2 -0
  210. package/dist/cli/chunks/hnsw-adapter-NOAQ76QF.js +2 -0
  211. package/dist/cli/chunks/hnsw-index-KDIZQRSB.js +2 -0
  212. package/dist/cli/chunks/{hnsw-legacy-bridge-SZ6SXZ7G.js → hnsw-legacy-bridge-ZRR6PGWN.js} +2 -2
  213. package/dist/cli/chunks/{hnswlib-node-XVNGLWIG.js → hnswlib-node-DY7NOW76.js} +2 -2
  214. package/dist/cli/chunks/{hooks-WVVVJ2CC.js → hooks-IRRHEJLR.js} +6 -6
  215. package/dist/cli/chunks/hybrid-router-S4JXJLUY.js +2 -0
  216. package/dist/cli/chunks/{hypergraph-engine-EYTJMSNY.js → hypergraph-engine-WFHZJMP2.js} +2 -2
  217. package/dist/cli/chunks/{hypergraph-handler-JUCJMSBU.js → hypergraph-handler-LHUKR7PT.js} +3 -3
  218. package/dist/cli/chunks/impact-analyzer-VDXJBWFG.js +2 -0
  219. package/dist/cli/chunks/{init-handler-5COQTBSZ.js → init-handler-ZBIW7PSB.js} +6 -6
  220. package/dist/cli/chunks/init-wizard-Q6DEACKX.js +2 -0
  221. package/dist/cli/chunks/kernel-YNQOGTM5.js +2 -0
  222. package/dist/cli/chunks/{kilocode-installer-G54YKSIL.js → kilocode-installer-JYHA4NW7.js} +2 -2
  223. package/dist/cli/chunks/{kiro-installer-ZEKZVKTM.js → kiro-installer-OBXTRK77.js} +4 -4
  224. package/dist/cli/chunks/knowledge-graph-GOZG3YOM.js +2 -0
  225. package/dist/cli/chunks/learning-OAEJHEJD.js +107 -0
  226. package/dist/cli/chunks/{llm-router-RCOTEVVC.js → llm-router-NNEOZAVB.js} +5 -5
  227. package/dist/cli/chunks/{load-3Y35Y6FL.js → load-WIKLBESW.js} +2 -2
  228. package/dist/cli/chunks/load-test-UJLTMPXW.js +2 -0
  229. package/dist/cli/chunks/{mcp-NOHRCC4E.js → mcp-KR43GFGP.js} +2 -2
  230. package/dist/cli/chunks/{memory-GC5OPOO6.js → memory-KQIYKAYU.js} +5 -5
  231. package/dist/cli/chunks/memory-backend-WJH6XER3.js +2 -0
  232. package/dist/cli/chunks/{memory-handlers-MLQAERRE.js → memory-handlers-LAI4AO4O.js} +2 -2
  233. package/dist/cli/chunks/multi-model-executor-NPS3VOAR.js +14 -0
  234. package/dist/cli/chunks/{opencode-installer-POKAOPXI.js → opencode-installer-FE475WME.js} +2 -2
  235. package/dist/cli/chunks/{orchestrator-N2T3CYEB.js → orchestrator-MW4MZ3RW.js} +6 -6
  236. package/dist/cli/chunks/{pipeline-KAVKGC5V.js → pipeline-R2TGZSUA.js} +2 -2
  237. package/dist/cli/chunks/{platform-DJPEA24D.js → platform-N2GZBCBP.js} +2 -2
  238. package/dist/cli/chunks/{plugin-RHZZP3OH.js → plugin-V2AQF23V.js} +2 -2
  239. package/dist/cli/chunks/{prime-radiant-advanced-wasm-6A57VDNI.js → prime-radiant-advanced-wasm-ZQSYRLRS.js} +2 -2
  240. package/dist/cli/chunks/protocol-executor-LYYYHXAX.js +2 -0
  241. package/dist/cli/chunks/{protocol-handler-FBR254XL.js → protocol-handler-V3U724F2.js} +2 -2
  242. package/dist/cli/chunks/{prove-YZXY34P6.js → prove-NCH56HZB.js} +2 -2
  243. package/dist/cli/chunks/provider-manager-7NUHS3T5.js +24 -0
  244. package/dist/cli/chunks/qe-reasoning-bank-JK4UKLYY.js +2 -0
  245. package/dist/cli/chunks/{quality-MICFT3VU.js → quality-J3IVPPPW.js} +2 -2
  246. package/dist/cli/chunks/queen-coordinator-6OKLSCHV.js +2 -0
  247. package/dist/cli/chunks/{real-embeddings-HJCRBDOM.js → real-embeddings-VURZXAEY.js} +2 -2
  248. package/dist/cli/chunks/{roocode-installer-K5LIUYDR.js → roocode-installer-STWFJGMR.js} +2 -2
  249. package/dist/cli/chunks/router-DDZHCGUD.js +2 -0
  250. package/dist/cli/chunks/routing-feedback-BA66F37P.js +2 -0
  251. package/dist/cli/chunks/{routing-handler-2KIQHWUQ.js → routing-handler-6GZT7EXM.js} +2 -2
  252. package/dist/cli/chunks/{ruvector-commands-DYGX7PI6.js → ruvector-commands-LCPAH6WH.js} +2 -2
  253. package/dist/cli/chunks/{rvf-dual-writer-UTKSIJBG.js → rvf-dual-writer-76LWFT5X.js} +2 -2
  254. package/dist/cli/chunks/{rvf-migration-adapter-KVJLHJO7.js → rvf-migration-adapter-G7KFWJKY.js} +2 -2
  255. package/dist/cli/chunks/{rvf-migration-coordinator-CRIV4YVR.js → rvf-migration-coordinator-3DXOUPWF.js} +2 -2
  256. package/dist/cli/chunks/rvf-native-adapter-TXTRJNPW.js +2 -0
  257. package/dist/cli/chunks/safe-db-IFBVWIGF.js +2 -0
  258. package/dist/cli/chunks/schedule-WMZLOPCW.js +2 -0
  259. package/dist/cli/chunks/scheduler-WBORWJD5.js +2 -0
  260. package/dist/cli/chunks/{security-KSEP56UL.js → security-XDBPYA5T.js} +3 -3
  261. package/dist/cli/chunks/shared-rvf-adapter-SQQ27EEI.js +2 -0
  262. package/dist/cli/chunks/{shared-rvf-dual-writer-HD5QOOJD.js → shared-rvf-dual-writer-UGXTS2XI.js} +2 -2
  263. package/dist/cli/chunks/sqlite-persistence-XH47B3BG.js +2 -0
  264. package/dist/cli/chunks/{status-handler-AMKMMUNW.js → status-handler-ZLXES3QL.js} +2 -2
  265. package/dist/cli/chunks/{structural-health-GUTWSPBY.js → structural-health-4PFCOQ7T.js} +2 -2
  266. package/dist/cli/chunks/{sync-OSJF3J4K.js → sync-3DROIEZN.js} +2 -2
  267. package/dist/cli/chunks/{task-handler-4V4WMTJE.js → task-handler-4UGZ5VIE.js} +2 -2
  268. package/dist/cli/chunks/{task-handlers-EAORRI7E.js → task-handlers-I5VVBTWI.js} +2 -2
  269. package/dist/cli/chunks/{test-EGW6L6ZI.js → test-Z2MM7O5A.js} +4 -4
  270. package/dist/cli/chunks/{test-scheduling-UK2GVD67.js → test-scheduling-AP76GKN5.js} +4 -4
  271. package/dist/cli/chunks/{token-bootstrap-DT2FQWIK.js → token-bootstrap-P54N6PZV.js} +2 -2
  272. package/dist/cli/chunks/{token-usage-HQVOD3I3.js → token-usage-AXAZTPA6.js} +2 -2
  273. package/dist/cli/chunks/{transformers-TDZOMLEQ.js → transformers-VOZ2Z7FS.js} +2 -2
  274. package/dist/cli/chunks/{tree-sitter-wasm-parser-XT3A32J7.js → tree-sitter-wasm-parser-IYKLBTXB.js} +2 -2
  275. package/dist/cli/chunks/{types-QOT5P6RH.js → types-TKDH5EBW.js} +2 -2
  276. package/dist/cli/chunks/unified-memory-NHJHPLIC.js +2 -0
  277. package/dist/cli/chunks/unified-memory-hnsw-IMMCI2XK.js +2 -0
  278. package/dist/cli/chunks/unified-persistence-JS6CEV35.js +2 -0
  279. package/dist/cli/chunks/{validate-SXCT3APL.js → validate-ZGF5FVZE.js} +2 -2
  280. package/dist/cli/chunks/{validate-swarm-WGJUWWJ6.js → validate-swarm-OPWWUWYA.js} +2 -2
  281. package/dist/cli/chunks/{vibium-ONK73HYI.js → vibium-HEQUGRKJ.js} +2 -2
  282. package/dist/cli/chunks/visual-security-XLO5JBVP.js +2 -0
  283. package/dist/cli/chunks/{web-tree-sitter-Q5TXI2BE.js → web-tree-sitter-JZ7JCJJR.js} +2 -2
  284. package/dist/cli/chunks/{windsurf-installer-HTJT3VIM.js → windsurf-installer-2SGRCS6C.js} +2 -2
  285. package/dist/cli/chunks/{witness-chain-7TPWQZ2P.js → witness-chain-LJUYOCB5.js} +2 -2
  286. package/dist/cli/chunks/witness-chain-PPWPHYTY.js +2 -0
  287. package/dist/cli/chunks/{workflow-LTC4J62A.js → workflow-QORI3KO7.js} +4 -4
  288. package/dist/cli/chunks/workflow-orchestrator-H4DKRHVP.js +2 -0
  289. package/dist/cli/chunks/{wrappers-TWCCXU2M.js → wrappers-3NR7LNB5.js} +2 -2
  290. package/dist/cli/commands/learning.js +28 -8
  291. package/dist/cli/commands/llm-router.js +3 -3
  292. package/dist/coordination/consensus/providers/claude-provider.d.ts +3 -3
  293. package/dist/coordination/consensus/providers/claude-provider.js +6 -3
  294. package/dist/coordination/task-executor.js +5 -5
  295. package/dist/domains/chaos-resilience/services/chaos-engineer.js +4 -4
  296. package/dist/domains/code-intelligence/services/knowledge-graph.js +5 -5
  297. package/dist/domains/constants.d.ts +4 -4
  298. package/dist/domains/constants.js +4 -4
  299. package/dist/domains/contract-testing/services/contract-validator.js +4 -4
  300. package/dist/domains/coverage-analysis/services/coverage-analyzer.js +5 -5
  301. package/dist/domains/coverage-analysis/services/gap-detector.js +5 -5
  302. package/dist/domains/defect-intelligence/services/defect-predictor.js +5 -5
  303. package/dist/domains/defect-intelligence/services/root-cause-analyzer.js +5 -5
  304. package/dist/domains/learning-optimization/services/learning-coordinator.js +4 -4
  305. package/dist/domains/quality-assessment/services/deployment-advisor.js +5 -5
  306. package/dist/domains/quality-assessment/services/quality-analyzer.js +5 -5
  307. package/dist/domains/requirements-validation/services/requirements-validator.js +5 -5
  308. package/dist/domains/security-compliance/services/scanners/sast-scanner.js +5 -5
  309. package/dist/domains/test-execution/services/test-executor.js +4 -4
  310. package/dist/domains/test-generation/services/test-data-generator.d.ts +1 -0
  311. package/dist/domains/test-generation/services/test-data-generator.js +17 -3
  312. package/dist/domains/test-generation/services/test-generator.js +5 -5
  313. package/dist/domains/visual-accessibility/services/visual-tester.js +4 -4
  314. package/dist/init/init-wizard-steps.js +1 -1
  315. package/dist/init/kiro-installer.js +8 -8
  316. package/dist/init/phases/12-verification.js +1 -1
  317. package/dist/integrations/agentic-flow/model-router/types.js +8 -8
  318. package/dist/mcp/bundle.js +1782 -1790
  319. package/dist/mcp/protocol-server.js +20 -10
  320. package/dist/mcp/security/sampling-server.js +1 -1
  321. package/dist/routing/advisor/multi-model-executor.d.ts +6 -2
  322. package/dist/routing/advisor/multi-model-executor.js +19 -3
  323. package/dist/routing/security/cyber-pin.d.ts +58 -0
  324. package/dist/routing/security/cyber-pin.js +75 -0
  325. package/dist/shared/llm/cost-tracker.js +5 -0
  326. package/dist/shared/llm/effort-resolver.d.ts +79 -0
  327. package/dist/shared/llm/effort-resolver.js +128 -0
  328. package/dist/shared/llm/interfaces.d.ts +11 -1
  329. package/dist/shared/llm/metrics/cost-metrics.js +1 -1
  330. package/dist/shared/llm/model-mapping.js +31 -0
  331. package/dist/shared/llm/model-registry.d.ts +40 -0
  332. package/dist/shared/llm/model-registry.js +126 -2
  333. package/dist/shared/llm/provider-manager.js +1 -1
  334. package/dist/shared/llm/providers/bedrock.js +9 -7
  335. package/dist/shared/llm/providers/claude.js +31 -4
  336. package/dist/shared/llm/router/agent-router-config.js +16 -16
  337. package/dist/shared/llm/router/hybrid-router.js +18 -1
  338. package/dist/shared/llm/router/routing-rules.js +9 -9
  339. package/dist/shared/llm/router/types.js +29 -29
  340. package/dist/shared/llm/translation/message-formatter.js +3 -3
  341. package/package.json +7 -5
  342. package/dist/cli/chunks/adapter-EOD4AG2T.js +0 -2
  343. package/dist/cli/chunks/aqe-learning-engine-6REY3BZB.js +0 -2
  344. package/dist/cli/chunks/base-HFVYEJKR.js +0 -2
  345. package/dist/cli/chunks/browser-workflow-GPR3IS36.js +0 -2
  346. package/dist/cli/chunks/chunk-2FW56URL.js +0 -65
  347. package/dist/cli/chunks/chunk-4GGDA6PF.js +0 -2
  348. package/dist/cli/chunks/chunk-5F2CEYZG.js +0 -3029
  349. package/dist/cli/chunks/chunk-6Q7F4HBV.js +0 -12
  350. package/dist/cli/chunks/chunk-7IJIOZHW.js +0 -5
  351. package/dist/cli/chunks/chunk-A3YIGC75.js +0 -18
  352. package/dist/cli/chunks/chunk-AAHBVTUJ.js +0 -2
  353. package/dist/cli/chunks/chunk-E6HTC3I2.js +0 -2
  354. package/dist/cli/chunks/chunk-FJZQH4JB.js +0 -2
  355. package/dist/cli/chunks/chunk-GIWDEW4K.js +0 -2
  356. package/dist/cli/chunks/chunk-HBQRFR7Q.js +0 -2
  357. package/dist/cli/chunks/chunk-HJL4CRV6.js +0 -3
  358. package/dist/cli/chunks/chunk-K5TK4HNR.js +0 -2
  359. package/dist/cli/chunks/chunk-LVCBXFHT.js +0 -2
  360. package/dist/cli/chunks/chunk-NVMJS347.js +0 -2
  361. package/dist/cli/chunks/chunk-UGCPQGQV.js +0 -2
  362. package/dist/cli/chunks/chunk-UZX62Z2K.js +0 -2
  363. package/dist/cli/chunks/chunk-X7IRGKAM.js +0 -2
  364. package/dist/cli/chunks/chunk-XEHMWICD.js +0 -24
  365. package/dist/cli/chunks/chunk-Z7E27V5F.js +0 -2
  366. package/dist/cli/chunks/client-NGAZ5BMU.js +0 -2
  367. package/dist/cli/chunks/cross-domain-router-ORAWSROD.js +0 -2
  368. package/dist/cli/chunks/daemon-LGFCMQVV.js +0 -19
  369. package/dist/cli/chunks/dream-N72NDTWM.js +0 -2
  370. package/dist/cli/chunks/esm-node-OUE76NVS.js +0 -2
  371. package/dist/cli/chunks/heartbeat-scheduler-4CKQSIHQ.js +0 -2
  372. package/dist/cli/chunks/hnsw-adapter-DO7CQXCP.js +0 -2
  373. package/dist/cli/chunks/hnsw-index-B6FEXSZX.js +0 -2
  374. package/dist/cli/chunks/hybrid-router-236O2EMV.js +0 -2
  375. package/dist/cli/chunks/impact-analyzer-E2DVJTE7.js +0 -2
  376. package/dist/cli/chunks/init-wizard-KQCWXEDA.js +0 -2
  377. package/dist/cli/chunks/kernel-KBING4CP.js +0 -2
  378. package/dist/cli/chunks/knowledge-graph-AF6OAAJ5.js +0 -2
  379. package/dist/cli/chunks/learning-JE7PDBQV.js +0 -107
  380. package/dist/cli/chunks/load-test-LKIZ376E.js +0 -2
  381. package/dist/cli/chunks/memory-backend-HHGGHQYM.js +0 -2
  382. package/dist/cli/chunks/multi-model-executor-YE4JOCN5.js +0 -14
  383. package/dist/cli/chunks/protocol-executor-RNXGXAZC.js +0 -2
  384. package/dist/cli/chunks/provider-manager-H7QVBYXM.js +0 -24
  385. package/dist/cli/chunks/qe-reasoning-bank-ZMDU5MUW.js +0 -2
  386. package/dist/cli/chunks/queen-coordinator-4XWCCVIY.js +0 -2
  387. package/dist/cli/chunks/router-JYGSCGGM.js +0 -2
  388. package/dist/cli/chunks/routing-feedback-DO5FLA62.js +0 -2
  389. package/dist/cli/chunks/rvf-native-adapter-SS6KKXJM.js +0 -2
  390. package/dist/cli/chunks/safe-db-A66XXHI7.js +0 -2
  391. package/dist/cli/chunks/schedule-DQRJD5H5.js +0 -2
  392. package/dist/cli/chunks/scheduler-PLSXEVV7.js +0 -2
  393. package/dist/cli/chunks/shared-rvf-adapter-DE2OVTUI.js +0 -2
  394. package/dist/cli/chunks/sqlite-persistence-R4IDAV5X.js +0 -2
  395. package/dist/cli/chunks/unified-memory-3MDWRNDW.js +0 -2
  396. package/dist/cli/chunks/unified-memory-hnsw-TEJXRLAS.js +0 -2
  397. package/dist/cli/chunks/unified-persistence-ALHQN2LG.js +0 -2
  398. package/dist/cli/chunks/visual-security-WFWC5N2E.js +0 -2
  399. package/dist/cli/chunks/witness-chain-T34QYEFI.js +0 -2
  400. package/dist/cli/chunks/workflow-orchestrator-UIVPDA7M.js +0 -2
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.12");process.exit(0)}
2
- import{a as be}from"./chunk-PVYTP7CC.js";import{c as _e}from"./chunk-ALW3NHF2.js";import{a as ne,b as de,c as ke,d as we,e as Ce,f as Ie,g as Pe,h as Se,i as Re,j as Ae,k as xe}from"./chunk-ZLDOPUZY.js";import"./chunk-MJY6FD6N.js";import{a as Ee}from"./chunk-FZY2AFLS.js";import"./chunk-6DDT5OHC.js";import"./chunk-ZYAIIW3U.js";import"./chunk-I4JO4LD3.js";import"./chunk-NWL7UQPY.js";import"./chunk-Z7E27V5F.js";import"./chunk-XTGVTVLN.js";import{b as x,d as te}from"./chunk-WEMOVPQS.js";import{a as S,b as ve,c as ee}from"./chunk-LJTRN6ZE.js";import"./chunk-52GDG6LU.js";import{a as _,b as ce}from"./chunk-V7LIKEGA.js";import"./chunk-T5WF5HBA.js";import"./chunk-PGKGFKSS.js";import"./chunk-R7RGOZ3H.js";import"./chunk-GB4LEEYS.js";import"./chunk-WKORFEXG.js";import"./chunk-Q3BVPPHB.js";import"./chunk-AXJTWYCF.js";import"./chunk-LNHOWUSG.js";import{a as le}from"./chunk-FT3BXL44.js";ee();ee();var y=class{requiresPhases;requiresEnhancements;async shouldRun(e){return!0}async execute(e){let t=Date.now();try{return{success:!0,data:await this.run(e),durationMs:Date.now()-t,message:`${this.description} completed`}}catch(s){return{success:!1,error:ve(s),durationMs:Date.now()-t,message:`${this.description} failed: ${S(s)}`}}}checkDependencies(e){if(!this.requiresPhases?.length)return!0;for(let t of this.requiresPhases)if(!e.results.get(t)?.success)return e.services.warn(`Phase ${this.name} requires ${t} which has not completed`),!1;return!0}checkEnhancements(e){if(!this.requiresEnhancements?.length)return!0;for(let t of this.requiresEnhancements)if(!(t==="claudeFlow"?e.enhancements.claudeFlow:t==="ruvector"?e.enhancements.ruvector:!1))return e.services.warn(`Phase ${this.name} requires ${t} which is not available`),!1;return!0}};te();ce();import{existsSync as q}from"fs";import{join as T}from"path";var N=class extends y{name="detection";description="Detect existing installations";order=10;critical=!0;async run(e){let{projectRoot:t}=e,s=await this.detectV2Installation(t),n=q(T(t,".agentic-qe","config.yaml")),o=s.version?.startsWith("3."),r=s.detected,i=n||o||!1,l=!r&&!i;return e.v2Detection=s,{v2Detected:r,v3Detected:i,freshInstall:l,v2Detection:s}}async detectV2Installation(e){let t=T(e,".agentic-qe","memory.db"),s=T(e,".agentic-qe","config"),n=T(e,".claude","agents"),o=T(e,".agentic-qe","config","learning.json"),r=q(t),i=q(s),l=q(n),d=q(o),u=q(T(e,".agentic-qe","config.yaml")),g,p=!1;return r&&(g=this.readVersionFromDb(t),g?p=g.startsWith("3."):g="2.x.x"),{detected:!p&&r&&(!g?.startsWith("3.")||d&&!u),memoryDbPath:r?t:void 0,configPath:i?s:void 0,agentsPath:l?n:void 0,hasMemoryDb:r,hasConfig:i,hasAgents:l,version:g}}readVersionFromDb(e){try{let t=_(e,{readonly:!0,fileMustExist:!0});try{if(!t.prepare(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import{a as be}from"./chunk-IOHDE27P.js";import{c as _e}from"./chunk-Z3PSKGBO.js";import{a as ne,b as de,c as ke,d as we,e as Ce,f as Ie,g as Pe,h as Se,i as Re,j as Ae,k as xe}from"./chunk-HEQ23HBE.js";import"./chunk-BFCMOMOF.js";import{a as Ee}from"./chunk-XH774Q6Z.js";import"./chunk-L4IWZXSC.js";import"./chunk-VQB5SLXZ.js";import"./chunk-ZFZX2NA3.js";import"./chunk-UUVTLYUK.js";import"./chunk-STYNOKOM.js";import"./chunk-GUEK5DOK.js";import{b as x,d as te}from"./chunk-DMZ2XOEW.js";import{a as S,b as ve,c as ee}from"./chunk-UIYK4Y7K.js";import"./chunk-A2TK52B2.js";import{a as _,b as ce}from"./chunk-LWHM5BWD.js";import"./chunk-J3XLOHWB.js";import"./chunk-JN7MSUGK.js";import"./chunk-JNLKLC7G.js";import"./chunk-WE7KIXR6.js";import"./chunk-XNXOW7BQ.js";import"./chunk-JLBUS4PR.js";import"./chunk-DJLRRCR6.js";import"./chunk-5HUAD4UU.js";import{a as le}from"./chunk-DGUAAG3T.js";ee();ee();var y=class{requiresPhases;requiresEnhancements;async shouldRun(e){return!0}async execute(e){let t=Date.now();try{return{success:!0,data:await this.run(e),durationMs:Date.now()-t,message:`${this.description} completed`}}catch(s){return{success:!1,error:ve(s),durationMs:Date.now()-t,message:`${this.description} failed: ${S(s)}`}}}checkDependencies(e){if(!this.requiresPhases?.length)return!0;for(let t of this.requiresPhases)if(!e.results.get(t)?.success)return e.services.warn(`Phase ${this.name} requires ${t} which has not completed`),!1;return!0}checkEnhancements(e){if(!this.requiresEnhancements?.length)return!0;for(let t of this.requiresEnhancements)if(!(t==="claudeFlow"?e.enhancements.claudeFlow:t==="ruvector"?e.enhancements.ruvector:!1))return e.services.warn(`Phase ${this.name} requires ${t} which is not available`),!1;return!0}};te();ce();import{existsSync as q}from"fs";import{join as T}from"path";var N=class extends y{name="detection";description="Detect existing installations";order=10;critical=!0;async run(e){let{projectRoot:t}=e,s=await this.detectV2Installation(t),n=q(T(t,".agentic-qe","config.yaml")),o=s.version?.startsWith("3."),r=s.detected,i=n||o||!1,l=!r&&!i;return e.v2Detection=s,{v2Detected:r,v3Detected:i,freshInstall:l,v2Detection:s}}async detectV2Installation(e){let t=T(e,".agentic-qe","memory.db"),s=T(e,".agentic-qe","config"),n=T(e,".claude","agents"),o=T(e,".agentic-qe","config","learning.json"),r=q(t),i=q(s),l=q(n),d=q(o),u=q(T(e,".agentic-qe","config.yaml")),g,p=!1;return r&&(g=this.readVersionFromDb(t),g?p=g.startsWith("3."):g="2.x.x"),{detected:!p&&r&&(!g?.startsWith("3.")||d&&!u),memoryDbPath:r?t:void 0,configPath:i?s:void 0,agentsPath:l?n:void 0,hasMemoryDb:r,hasConfig:i,hasAgents:l,version:g}}readVersionFromDb(e){try{let t=_(e,{readonly:!0,fileMustExist:!0});try{if(!t.prepare(`
3
3
  SELECT name FROM sqlite_master
4
4
  WHERE type='table' AND name='kv_store'
5
5
  `).get()){t.close();return}let n=t.prepare(`
@@ -8,7 +8,7 @@ import{a as be}from"./chunk-PVYTP7CC.js";import{c as _e}from"./chunk-ALW3NHF2.js
8
8
  `).get();return t.close(),n?x(n.value):void 0}catch{t.close();return}}catch{return}}};var Q=class extends y{name="analysis";description="Analyze project structure";order=20;critical=!0;requiresPhases=["detection"];async run(e){let s=await ke(e.projectRoot).analyze();return e.analysis=s,e.services.log(` Project: ${s.projectName}`),e.services.log(` Languages: ${s.languages.map(n=>n.name).join(", ")}`),e.services.log(` Frameworks: ${s.frameworks.map(n=>n.name).join(", ")}`),s}};var L=class extends y{name="configuration";description="Generate configuration";order=30;critical=!0;requiresPhases=["analysis"];async run(e){if(!e.analysis)throw new Error("Analysis phase must complete before configuration");let s=we({minimal:e.options.minimal}).recommend(e.analysis);return s=this.applyOptions(s,e),e.config=s,e.services.log(` Version: ${s.version}`),e.services.log(` Learning: ${s.learning.enabled?"enabled":"disabled"}`),e.services.log(` Workers: ${s.workers.enabled.length}`),s}applyOptions(e,t){let{options:s}=t;return s.minimal&&(e.skills.install=!1,e.learning.pretrainedPatterns=!1,e.workers.enabled=[],e.workers.daemonAutoStart=!1),s.skipPatterns&&(e.learning.pretrainedPatterns=!1),s.wizardAnswers&&(e=this.applyWizardAnswers(e,s.wizardAnswers)),e}applyWizardAnswers(e,t){switch(t["project-type"]&&t["project-type"]!=="auto"&&(e.project.type=t["project-type"]),t["learning-mode"]){case"full":e.learning.enabled=!0,e.learning.embeddingModel="transformer";break;case"basic":e.learning.enabled=!0,e.learning.embeddingModel="hash";break;case"disabled":e.learning.enabled=!1;break}return t["load-patterns"]===!1&&(e.learning.pretrainedPatterns=!1),t.hooks===!1&&(e.hooks.claudeCode=!1),t.workers===!1&&(e.workers.daemonAutoStart=!1),t.skills===!1&&(e.skills.install=!1),e}};import{existsSync as V,mkdirSync as ue}from"fs";import{join as B}from"path";var W=class extends y{name="database";description="Initialize persistence database";order=40;critical=!0;requiresPhases=["configuration"];async run(e){let{projectRoot:t}=e,s=B(t,"vectors.db");V(s)&&e.services.log(` \u26A0 Stale vectors.db detected at ${s}
9
9
  This file is left over from @ruvector/router (pre-v3.9.6).
10
10
  It is no longer read or written by AQE. Safe to delete:
11
- rm "${s}"`);let n=B(t,".agentic-qe");V(n)||ue(n,{recursive:!0});let o=B(n,"workers");V(o)||ue(o,{recursive:!0});let r=B(n,"data");V(r)||ue(r,{recursive:!0});let i=B(n,"memory.db"),l=!V(i);try{let{initializeUnifiedMemory:d,resetUnifiedMemory:u}=await import("./unified-memory-3MDWRNDW.js"),g=await d({dbPath:i,walMode:!0,busyTimeout:5e3}),h=g.getStats().tables.map(A=>A.name);await g.kvSet("_init_marker",{initialized:new Date().toISOString(),projectRoot:t,version:ne()},"_system");let w=g.getDatabase().prepare("SELECT version FROM schema_version WHERE id = 1").get()?.version??0;return u(),e.services.log(` Database: ${i}`),e.services.log(` Schema version: v${w}`),e.services.log(` Tables: ${h.length} (v3 full schema)`),{dbPath:i,created:l,tablesCreated:h,schemaVersion:w}}catch(d){throw new Error(`SQLite persistence initialization FAILED: ${d}
11
+ rm "${s}"`);let n=B(t,".agentic-qe");V(n)||ue(n,{recursive:!0});let o=B(n,"workers");V(o)||ue(o,{recursive:!0});let r=B(n,"data");V(r)||ue(r,{recursive:!0});let i=B(n,"memory.db"),l=!V(i);try{let{initializeUnifiedMemory:d,resetUnifiedMemory:u}=await import("./unified-memory-NHJHPLIC.js"),g=await d({dbPath:i,walMode:!0,busyTimeout:5e3}),h=g.getStats().tables.map(A=>A.name);await g.kvSet("_init_marker",{initialized:new Date().toISOString(),projectRoot:t,version:ne()},"_system");let w=g.getDatabase().prepare("SELECT version FROM schema_version WHERE id = 1").get()?.version??0;return u(),e.services.log(` Database: ${i}`),e.services.log(` Schema version: v${w}`),e.services.log(` Tables: ${h.length} (v3 full schema)`),{dbPath:i,created:l,tablesCreated:h,schemaVersion:w}}catch(d){throw new Error(`SQLite persistence initialization FAILED: ${d}
12
12
  Database path: ${i}
13
13
  Ensure the directory is writable and has sufficient disk space.`)}}};import{existsSync as se,mkdirSync as pe,writeFileSync as $e}from"fs";import{join as $}from"path";var H=class extends y{name="learning";description="Initialize learning system";order=50;critical=!1;requiresPhases=["database","configuration"];async shouldRun(e){return e.config?.learning?.enabled??!0}async run(e){let t=e.config,{projectRoot:s,options:n}=e;if(!t.learning.enabled)return{enabled:!1,dataDir:"",hnswDir:"",patternsLoaded:0};let o=$(s,".agentic-qe","data");se(o)||pe(o,{recursive:!0});let r=$(o,"hnsw");se(r)||pe(r,{recursive:!0});let i=$(o,"learning-config.json"),l={embeddingModel:t.learning.embeddingModel,hnswConfig:t.learning.hnswConfig,qualityThreshold:t.learning.qualityThreshold,promotionThreshold:t.learning.promotionThreshold,databasePath:$(o,"memory.db"),hnswIndexPath:$(r,"index.bin"),initialized:new Date().toISOString()};$e(i,JSON.stringify(l,null,2),"utf-8");let d=0;return t.learning.pretrainedPatterns&&!n.skipPatterns&&(d=await this.loadPretrainedPatterns(o,e)),e.services.log(` Data dir: ${o}`),e.services.log(` HNSW dir: ${r}`),e.services.log(` Patterns loaded: ${d}`),{enabled:!0,dataDir:o,hnswDir:r,patternsLoaded:d}}async loadPretrainedPatterns(e,t){try{let s=$(e,"patterns");se(s)||pe(s,{recursive:!0});let n=$(s,"index.json");return se(n)||$e(n,JSON.stringify({version:ne(),domains:[],loadedAt:new Date().toISOString()},null,2),"utf-8"),0}catch(s){return t.services.warn(`Could not load pre-trained patterns: ${s}`),0}}};te();ce();import{existsSync as Ge,statSync as Ue}from"fs";import{join as re}from"path";var De=3e4,je=18e4,qe=["**/node_modules/**","**/dist/**","**/build/**","**/out/**","**/coverage/**","**/.agentic-qe/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/__pycache__/**","**/.pytest_cache/**","**/target/**","**/vendor/**","**/.venv/**","**/venv/**","**/.tox/**","**/*.min.js","**/*.min.css","**/*.bundle.js","**/*.map","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/Pipfile.lock","**/poetry.lock","**/.env","**/.env.*"],G=class extends y{name="code-intelligence";description="Code intelligence pre-scan";order=60;critical=!1;requiresPhases=["database"];async shouldRun(e){let t=process.env.AQE_SKIP_CODE_INDEX;return t==="1"||t==="true"?(e.services.log(" Code intelligence skipped (AQE_SKIP_CODE_INDEX=1)"),e.services.log(" Run `aqe code index` later to build the KG on demand."),!1):e.options.skipCodeIndex?(e.services.log(" Code intelligence skipped (--skip-code-index)"),e.services.log(" Run `aqe code index` later to build the KG on demand."),!1):!0}async run(e){let{projectRoot:t}=e,s=re(t,".agentic-qe","memory.db");if(!Ge(s))return e.services.log(" Building knowledge graph..."),await this.runCodeIntelligenceScan(t,e,!1);let n=_(s);try{if(!this.checkCodeIntelligenceIndex(n))return n.close(),e.services.log(" Building knowledge graph..."),await this.runCodeIntelligenceScan(t,e,!1);let r=this.getLastIndexedAt(n);if(!r){let d=this.getKGEntryCount(n);return n.close(),e.services.log(` Using existing index (${d} entries)`),{status:"existing",entries:d}}let i=this.getKGEntryCount(n);n.close();let l=await this.findChangedFiles(t,r);return l.length===0?(e.services.log(` Index up to date (${i} entries)`),{status:"existing",entries:i}):(e.services.log(` Delta scan: ${l.length} files changed since last index...`),await this.runCodeIntelligenceScan(t,e,!0,l))}catch(o){try{n.close()}catch{}throw o}}checkCodeIntelligenceIndex(e){try{return e.prepare(`
14
14
  SELECT COUNT(*) as count FROM kv_store
@@ -16,7 +16,7 @@ Ensure the directory is writable and has sufficient disk space.`)}}};import{exis
16
16
  `).get().count>0}catch{return!1}}getKGEntryCount(e){try{return e.prepare(`
17
17
  SELECT COUNT(*) as count FROM kv_store
18
18
  WHERE namespace LIKE 'code-intelligence:kg%'
19
- `).get().count}catch{return 0}}async runCodeIntelligenceScan(e,t,s,n){let{KnowledgeGraphService:o}=await import("./knowledge-graph-AF6OAAJ5.js"),r=re(e,".agentic-qe","memory.db"),i={type:"sqlite",sqlite:{path:r,walMode:!0}},{backend:l}=await be(i,!0),d=new o(l,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0});try{let u;n?u=n:u=(await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:qe})).map(f=>re(e,f)),t.services.log(` Scanning ${u.length} source files...`);let g=await this.runBoundedScan(d,u,s,t);if(g.status==="timeout")return t.services.warn(` \u26A0 Code intelligence pre-scan exceeded ${je/1e3}s phase cap. Indexed ${g.entries} entries before timeout. Last file: ${g.timeoutFile??"(unknown)"}. Init is continuing \u2014 re-run 'aqe code index' later, or report this file to https://github.com/proffesor-for-testing/agentic-qe/issues.`),g;if(g.status==="indexed"){let p=s?"Delta indexed":"Indexed";t.services.log(` ${p} ${g.entries} entries to ${r}`),await this.buildHypergraph(r,u,t)}return g}finally{try{d.destroy()}catch{}try{await l.dispose()}catch{}}}async runBoundedScan(e,t,s,n){let o=0,r=0,i=0,l="",d=Date.now(),u=!1;s||await e.clear();let g=n.projectRoot,p=f=>f.startsWith(g)?f.slice(g.length+1):f;for(let f of t){if(Date.now()-d>je){u=!0;break}l=f,n.services.log(` [${i+1}/${t.length}] ${p(f)}`);try{let v=await this.withTimeout(e.index({paths:[f],incremental:!0,includeTests:!0}),De,f);v.success&&(o+=v.value.nodesCreated,r+=v.value.edgesCreated)}catch(v){let w=v instanceof Error?v.message:String(v);w.startsWith("AQE_PER_FILE_TIMEOUT")?n.services.warn(` \u26A0 Skipped ${p(f)} \u2014 indexing exceeded ${De/1e3}s`):n.services.warn(` \u26A0 Failed to index ${p(f)}: ${w}`)}i++}let h=o+r;return u?{status:"timeout",entries:h,timeoutFile:l}:{status:"indexed",entries:h}}withTimeout(e,t,s){return new Promise((n,o)=>{let r=setTimeout(()=>{o(new Error(`AQE_PER_FILE_TIMEOUT: ${s}`))},t);typeof r.unref=="function"&&r.unref(),e.then(i=>{clearTimeout(r),n(i)},i=>{clearTimeout(r),o(i)})})}async buildHypergraph(e,t,s){try{let{extractCodeIndex:n}=await import("./code-index-extractor-S4DRQYVK.js"),{createHypergraphEngine:o}=await import("./hypergraph-engine-EYTJMSNY.js"),r=_(e),i=await o({db:r,maxTraversalDepth:10,maxQueryResults:1e3,enableVectorSearch:!1}),l=await n(t),d=await i.buildFromIndexResult(l);r.close(),d.nodesCreated+d.edgesCreated>0&&s.services.log(` Hypergraph: ${d.nodesCreated} nodes, ${d.edgesCreated} edges`)}catch(n){s.services.warn?.(` Hypergraph build skipped: ${n}`)}}getLastIndexedAt(e){try{let t=e.prepare(`
19
+ `).get().count}catch{return 0}}async runCodeIntelligenceScan(e,t,s,n){let{KnowledgeGraphService:o}=await import("./knowledge-graph-GOZG3YOM.js"),r=re(e,".agentic-qe","memory.db"),i={type:"sqlite",sqlite:{path:r,walMode:!0}},{backend:l}=await be(i,!0),d=new o(l,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0});try{let u;n?u=n:u=(await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:qe})).map(f=>re(e,f)),t.services.log(` Scanning ${u.length} source files...`);let g=await this.runBoundedScan(d,u,s,t);if(g.status==="timeout")return t.services.warn(` \u26A0 Code intelligence pre-scan exceeded ${je/1e3}s phase cap. Indexed ${g.entries} entries before timeout. Last file: ${g.timeoutFile??"(unknown)"}. Init is continuing \u2014 re-run 'aqe code index' later, or report this file to https://github.com/proffesor-for-testing/agentic-qe/issues.`),g;if(g.status==="indexed"){let p=s?"Delta indexed":"Indexed";t.services.log(` ${p} ${g.entries} entries to ${r}`),await this.buildHypergraph(r,u,t)}return g}finally{try{d.destroy()}catch{}try{await l.dispose()}catch{}}}async runBoundedScan(e,t,s,n){let o=0,r=0,i=0,l="",d=Date.now(),u=!1;s||await e.clear();let g=n.projectRoot,p=f=>f.startsWith(g)?f.slice(g.length+1):f;for(let f of t){if(Date.now()-d>je){u=!0;break}l=f,n.services.log(` [${i+1}/${t.length}] ${p(f)}`);try{let v=await this.withTimeout(e.index({paths:[f],incremental:!0,includeTests:!0}),De,f);v.success&&(o+=v.value.nodesCreated,r+=v.value.edgesCreated)}catch(v){let w=v instanceof Error?v.message:String(v);w.startsWith("AQE_PER_FILE_TIMEOUT")?n.services.warn(` \u26A0 Skipped ${p(f)} \u2014 indexing exceeded ${De/1e3}s`):n.services.warn(` \u26A0 Failed to index ${p(f)}: ${w}`)}i++}let h=o+r;return u?{status:"timeout",entries:h,timeoutFile:l}:{status:"indexed",entries:h}}withTimeout(e,t,s){return new Promise((n,o)=>{let r=setTimeout(()=>{o(new Error(`AQE_PER_FILE_TIMEOUT: ${s}`))},t);typeof r.unref=="function"&&r.unref(),e.then(i=>{clearTimeout(r),n(i)},i=>{clearTimeout(r),o(i)})})}async buildHypergraph(e,t,s){try{let{extractCodeIndex:n}=await import("./code-index-extractor-QLA5EQTE.js"),{createHypergraphEngine:o}=await import("./hypergraph-engine-WFHZJMP2.js"),r=_(e),i=await o({db:r,maxTraversalDepth:10,maxQueryResults:1e3,enableVectorSearch:!1}),l=await n(t),d=await i.buildFromIndexResult(l);r.close(),d.nodesCreated+d.edgesCreated>0&&s.services.log(` Hypergraph: ${d.nodesCreated} nodes, ${d.edgesCreated} edges`)}catch(n){s.services.warn?.(` Hypergraph build skipped: ${n}`)}}getLastIndexedAt(e){try{let t=e.prepare(`
20
20
  SELECT value FROM kv_store
21
21
  WHERE namespace = 'code-intelligence:kg'
22
22
  AND key = 'metadata:index'
@@ -110,7 +110,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
110
110
  `}generateHooksConfig(e,t){return{PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks post-command --command "$TOOL_INPUT_command" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'npx agentic-qe hooks post-task --task-id "$TOOL_RESULT_agent_id" --success --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'npx agentic-qe hooks route --task "$PROMPT" --json',timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'npx agentic-qe hooks session-start --session-id "$SESSION_ID" --json',timeout:1e4,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" verify --json'`,timeout:5e3,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:"npx agentic-qe hooks session-end --save-state --json",timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" export --json'`,timeout:6e4,continueOnError:!0}]}]}}};te();import{existsSync as ze,readFileSync as Ke,writeFileSync as Ye}from"fs";import{join as Je}from"path";var z=class extends y{name="mcp";description="Configure MCP server";order=80;critical=!1;requiresPhases=["configuration","database"];async run(e){let{projectRoot:t}=e;if(e.options.noMcp)return e.services.log(" MCP: skipped (--no-mcp)"),e.services.log(" CLI commands available: aqe memory, aqe test, aqe coverage, etc."),{configured:!1,mcpPath:"",serverName:""};let s={command:"aqe-mcp",args:[],env:{AQE_LEARNING_ENABLED:"true",AQE_WORKERS_ENABLED:"true",NODE_ENV:"production"}},n=Je(t,".mcp.json"),o={};if(ze(n))try{let i=Ke(n,"utf-8");o=x(i)}catch{o={}}o.mcpServers||(o.mcpServers={});let r=o.mcpServers;return r["agentic-qe"]=s,Ye(n,JSON.stringify(o,null,2),"utf-8"),e.services.log(` MCP config: ${n}`),e.services.log(" Server: agentic-qe"),e.services.log(" Learning: enabled"),e.services.log(" Workers: enabled"),{configured:!0,mcpPath:n,serverName:"agentic-qe"}}};import{existsSync as E,readFileSync as Ze,readdirSync as et}from"fs";import{join as R}from"path";ee();import{spawnSync as Xe}from"node:child_process";function ge(c,e,t,s){return c(e,t,{encoding:"utf8",timeout:s,maxBuffer:8*1024*1024})}var Oe=(c,e,t)=>Xe(c,e,t);function Me(c=Oe,e=5e3){let t=ge(c,"vibium",["--version"],e);if(t.status!==0)return null;let s=(t.stdout||"").trim(),n=(t.stderr||"").trim(),o=s||n;if(!o)return"unknown";let r=o.match(/v?(\d+\.\d+\.\d+(?:[-+][\w.]+)?)/);return r?r[1]:o.split(/\s+/)[0]||"unknown"}function me(c={}){let e=c.packageSpec||"vibium";if(c.skip)return{status:"skipped",packageSpec:e,message:"install skipped by options"};let t=c.spawner||Oe,s=Me(t);if(s)return{status:"already-installed",version:s,packageSpec:e};let n=c.npmBin||"npm",o=ge(t,n,["--version"],5e3);if(o.error||o.status!==0)return{status:"npm-unavailable",packageSpec:e,message:"npm is not available on PATH. Install Node.js + npm, then run `npm install -g vibium`."};let r=c.timeoutMs||18e4,i=ge(t,n,["install","-g",e],r);return i.status!==0?{status:"install-failed",packageSpec:e,message:i.stderr?.trim()||i.stdout?.trim()||S(i.error)||"unknown npm install failure"}:{status:"installed",version:Me(t)||"unknown",packageSpec:e}}var K=class extends y{name="assets";description="Install skills and agents";order=90;critical=!1;requiresPhases=["configuration"];async run(e){let t=e.config,{projectRoot:s,options:n}=e,o=this.detectVersionUpgrade(e),r=n.upgrade||t.skills.overwrite||n.autoMode&&o,i=0,l=0,d=0,u=0,g=0,p=0,h=0,f=0,v=0;if(n.upgrade?e.services.log(" Upgrade mode: overwriting existing files"):n.autoMode&&o&&e.services.log(" Version upgrade detected: updating skills and agents"),t.skills.install){let k=await Re({projectRoot:s,installV2Skills:t.skills.installV2,installV3Skills:t.skills.installV3,overwrite:r}).install();i=k.installed.length,k.errors.length>0&&e.services.warn(`Skills warnings: ${k.errors.join(", ")}`)}try{let k=await Ae({projectRoot:s,installQEAgents:!0,installSubagents:!0,overwrite:r}).install();l=k.installed.length,k.errors.length>0&&e.services.warn(`Agents warnings: ${k.errors.join(", ")}`)}catch(m){e.services.warn(`Agents install error: ${m instanceof Error?m.message:m}`)}_e(s);let w;if(n.minimal)w={status:"skipped",packageSpec:"vibium",message:"minimal mode"};else try{let m=me({skip:!1,timeoutMs:5e3});if(m.status==="already-installed")w=m,e.services.log(` Browser engine: vibium ${w.version} (already installed)`);else switch(e.services.log(" Browser engine: installing vibium via npm (this can take 1\u20133 minutes on first run; downloads Chrome for Testing lazily)\u2026"),w=me({skip:!1}),w.status){case"installed":e.services.log(` Browser engine: vibium ${w.version} installed`);break;case"skipped":e.services.log(" Browser engine: skipped");break;case"install-failed":e.services.warn(`Browser engine install failed (qe-browser skill will be unavailable until you run \`npm install -g vibium\`): ${w.message||"unknown"}`);break;case"npm-unavailable":e.services.warn("Browser engine: npm not on PATH \u2014 install Node.js + npm, then `npm install -g vibium` to enable qe-browser");break}}catch(m){let k=m instanceof Error?m.message:String(m);e.services.warn(`Browser engine install error: ${k}
111
111
  qe-browser fleet skill will be unavailable until you run:
112
112
  npm install -g vibium
113
- Then re-run \`aqe init\` to verify. The rest of the AQE install will continue.`)}if(n.withN8n){let k=await xe({projectRoot:s,installAgents:!0,installSkills:!0,overwrite:r,n8nApiConfig:n.n8nApiConfig}).install();d=k.agentsInstalled.length,u=k.skillsInstalled.length,k.errors.length>0&&e.services.warn(`N8n warnings: ${k.errors.join(", ")}`)}let A=n.autoMode&&E(R(s,"opencode.json"));if(n.withOpenCode||A){let{createOpenCodeInstaller:m}=await import("./opencode-installer-POKAOPXI.js"),a=await m({projectRoot:s,installAgents:!0,installSkills:!0,installTools:!0,overwrite:r}).install();g=a.agentsInstalled.length,p=a.skillsInstalled.length,a.errors.length>0&&e.services.warn(`OpenCode warnings: ${a.errors.join(", ")}`)}e.services.log(` Skills: ${i}`),e.services.log(` Agents: ${l}`),n.withN8n&&(e.services.log(` N8n agents: ${d}`),e.services.log(` N8n skills: ${u}`)),(n.withOpenCode||A)&&(e.services.log(` OpenCode agents: ${g}`),e.services.log(` OpenCode skills: ${p}`));let ae=n.autoMode&&E(R(s,".kiro"));if(n.withKiro||ae){let{createKiroInstaller:m}=await import("./kiro-installer-ZEKZVKTM.js"),a=await m({projectRoot:s,installAgents:!0,installSkills:!0,installHooks:!0,installSteering:!0,overwrite:r}).install();h=a.agentsInstalled.length,f=a.skillsInstalled.length,v=a.hooksInstalled.length,a.errors.length>0&&e.services.warn(`Kiro warnings: ${a.errors.join(", ")}`),e.services.log(` Kiro agents: ${h}`),e.services.log(` Kiro skills: ${f}`),e.services.log(` Kiro hooks: ${v}`),e.services.log(` Kiro steering: ${a.steeringInstalled.length}`),a.mcpConfigured&&e.services.log(" Kiro MCP: .kiro/settings/mcp.json")}let I=[];if(n.withCopilot||n.autoMode&&E(R(s,".vscode"))){let{createCopilotInstaller:m}=await import("./copilot-installer-JOYO6JND.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("copilot"),a.errors.length>0&&e.services.warn(`Copilot warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Copilot MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Copilot rules: ${a.rulesPath}`)}if(n.withCursor||n.autoMode&&E(R(s,".cursor"))){let{createCursorInstaller:m}=await import("./cursor-installer-RUUOVPGH.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("cursor"),a.errors.length>0&&e.services.warn(`Cursor warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cursor MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Cursor rules: ${a.rulesPath}`)}if(n.withCline){let{createClineInstaller:m}=await import("./cline-installer-LLROFJKC.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("cline"),a.errors.length>0&&e.services.warn(`Cline warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cline MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Cline mode: ${a.modePath}`)}if(n.withKiloCode||n.autoMode&&E(R(s,".kilocode"))){let{createKiloCodeInstaller:m}=await import("./kilocode-installer-G54YKSIL.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("kilocode"),a.errors.length>0&&e.services.warn(`Kilo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Kilo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Kilo Code mode: ${a.modePath}`)}if(n.withRooCode||n.autoMode&&E(R(s,".roo"))){let{createRooCodeInstaller:m}=await import("./roocode-installer-K5LIUYDR.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("roocode"),a.errors.length>0&&e.services.warn(`Roo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Roo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Roo Code mode: ${a.modePath}`)}if(n.withCodex||n.autoMode&&E(R(s,".codex"))){let{createCodexInstaller:m}=await import("./codex-installer-WRPU4ITG.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("codex"),a.errors.length>0&&e.services.warn(`Codex warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Codex MCP: ${a.configPath}`),a.agentsMdInstalled&&e.services.log(` Codex AGENTS.md: ${a.agentsMdPath}`)}if(n.withWindsurf||n.autoMode&&E(R(s,".windsurf"))){let{createWindsurfInstaller:m}=await import("./windsurf-installer-HTJT3VIM.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("windsurf"),a.errors.length>0&&e.services.warn(`Windsurf warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Windsurf MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Windsurf rules: ${a.rulesPath}`)}if(n.withContinueDev||n.autoMode&&E(R(s,".continue"))){let{createContinueDevInstaller:m}=await import("./continuedev-installer-TLMVH7VM.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("continuedev"),a.errors.length>0&&e.services.warn(`Continue.dev warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Continue.dev MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Continue.dev rules: ${a.rulesPath}`)}return I.length>0&&e.services.log(` Platforms configured: ${I.join(", ")}`),{skillsInstalled:i,agentsInstalled:l,n8nAgents:d,n8nSkills:u,openCodeAgents:g,openCodeSkills:p,kiroAgents:h,kiroSkills:f,kiroHooks:v,platformsConfigured:I,browserEngine:w}}detectVersionUpgrade(e){let t=e.config.version,s=R(e.projectRoot,".agentic-qe","config.yaml");if(E(s))try{let i=Ze(s,"utf-8").match(/version:\s*"?([^"\n]+)"?/)?.[1];if(i===t)return!1;if(i!==void 0)return!0}catch{}let n=R(e.projectRoot,".claude","agents","v3");try{return E(n)&&et(n).some(o=>o.endsWith(".md")&&o.startsWith("qe-"))}catch{return!1}}};import{existsSync as tt,mkdirSync as nt,writeFileSync as ie}from"fs";import{join as O}from"path";var Y=class extends y{name="workers";description="Configure background workers";order=100;critical=!1;requiresPhases=["configuration"];async shouldRun(e){let t=e.config;return t?.workers?.daemonAutoStart&&(t?.workers?.enabled?.length??0)>0}async run(e){let t=e.config,{projectRoot:s}=e;if(!t.workers.daemonAutoStart||t.workers.enabled.length===0)return{workersDir:"",workersConfigured:0,registryPath:"",daemonStarted:!1,daemonPid:null};let n=O(s,".agentic-qe","workers");tt(n)||nt(n,{recursive:!0});let o={"learning-consolidation":18e5,"pattern-consolidator":18e5,"test-health":3e5,"coverage-tracker":6e5,"coverage-gap-scanner":6e5,"flaky-detector":9e5,"flaky-test-detector":9e5,"security-scan":18e5,"quality-gate":3e5,"compliance-checker":18e5,"defect-predictor":9e5,"regression-monitor":6e5,"routing-accuracy-monitor":9e5,"performance-baseline":36e5,"cloud-sync":3e5},r={};for(let h of t.workers.enabled)r[h]={name:h,enabled:!0,interval:t.workers.intervals[h]||o[h]||6e4,lastRun:null,status:"pending"};let i=O(n,"registry.json"),l={version:t.version,maxConcurrent:t.workers.maxConcurrent,workers:r,createdAt:new Date().toISOString(),daemonPid:null};ie(i,JSON.stringify(l,null,2),"utf-8");for(let h of t.workers.enabled){let f=O(n,`${h}.json`),v={name:h,enabled:!0,interval:t.workers.intervals[h]||o[h]||6e4,projectRoot:s,dataDir:O(s,".agentic-qe","data"),createdAt:new Date().toISOString()};ie(f,JSON.stringify(v,null,2),"utf-8")}let d=O(n,"start-daemon.cjs");ie(d,`#!/usr/bin/env node
113
+ Then re-run \`aqe init\` to verify. The rest of the AQE install will continue.`)}if(n.withN8n){let k=await xe({projectRoot:s,installAgents:!0,installSkills:!0,overwrite:r,n8nApiConfig:n.n8nApiConfig}).install();d=k.agentsInstalled.length,u=k.skillsInstalled.length,k.errors.length>0&&e.services.warn(`N8n warnings: ${k.errors.join(", ")}`)}let A=n.autoMode&&E(R(s,"opencode.json"));if(n.withOpenCode||A){let{createOpenCodeInstaller:m}=await import("./opencode-installer-FE475WME.js"),a=await m({projectRoot:s,installAgents:!0,installSkills:!0,installTools:!0,overwrite:r}).install();g=a.agentsInstalled.length,p=a.skillsInstalled.length,a.errors.length>0&&e.services.warn(`OpenCode warnings: ${a.errors.join(", ")}`)}e.services.log(` Skills: ${i}`),e.services.log(` Agents: ${l}`),n.withN8n&&(e.services.log(` N8n agents: ${d}`),e.services.log(` N8n skills: ${u}`)),(n.withOpenCode||A)&&(e.services.log(` OpenCode agents: ${g}`),e.services.log(` OpenCode skills: ${p}`));let ae=n.autoMode&&E(R(s,".kiro"));if(n.withKiro||ae){let{createKiroInstaller:m}=await import("./kiro-installer-OBXTRK77.js"),a=await m({projectRoot:s,installAgents:!0,installSkills:!0,installHooks:!0,installSteering:!0,overwrite:r}).install();h=a.agentsInstalled.length,f=a.skillsInstalled.length,v=a.hooksInstalled.length,a.errors.length>0&&e.services.warn(`Kiro warnings: ${a.errors.join(", ")}`),e.services.log(` Kiro agents: ${h}`),e.services.log(` Kiro skills: ${f}`),e.services.log(` Kiro hooks: ${v}`),e.services.log(` Kiro steering: ${a.steeringInstalled.length}`),a.mcpConfigured&&e.services.log(" Kiro MCP: .kiro/settings/mcp.json")}let I=[];if(n.withCopilot||n.autoMode&&E(R(s,".vscode"))){let{createCopilotInstaller:m}=await import("./copilot-installer-DYISOPBC.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("copilot"),a.errors.length>0&&e.services.warn(`Copilot warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Copilot MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Copilot rules: ${a.rulesPath}`)}if(n.withCursor||n.autoMode&&E(R(s,".cursor"))){let{createCursorInstaller:m}=await import("./cursor-installer-DFBJRDSY.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("cursor"),a.errors.length>0&&e.services.warn(`Cursor warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cursor MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Cursor rules: ${a.rulesPath}`)}if(n.withCline){let{createClineInstaller:m}=await import("./cline-installer-S3CECBYL.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("cline"),a.errors.length>0&&e.services.warn(`Cline warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cline MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Cline mode: ${a.modePath}`)}if(n.withKiloCode||n.autoMode&&E(R(s,".kilocode"))){let{createKiloCodeInstaller:m}=await import("./kilocode-installer-JYHA4NW7.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("kilocode"),a.errors.length>0&&e.services.warn(`Kilo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Kilo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Kilo Code mode: ${a.modePath}`)}if(n.withRooCode||n.autoMode&&E(R(s,".roo"))){let{createRooCodeInstaller:m}=await import("./roocode-installer-STWFJGMR.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("roocode"),a.errors.length>0&&e.services.warn(`Roo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Roo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Roo Code mode: ${a.modePath}`)}if(n.withCodex||n.autoMode&&E(R(s,".codex"))){let{createCodexInstaller:m}=await import("./codex-installer-CQ7JNNOA.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("codex"),a.errors.length>0&&e.services.warn(`Codex warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Codex MCP: ${a.configPath}`),a.agentsMdInstalled&&e.services.log(` Codex AGENTS.md: ${a.agentsMdPath}`)}if(n.withWindsurf||n.autoMode&&E(R(s,".windsurf"))){let{createWindsurfInstaller:m}=await import("./windsurf-installer-2SGRCS6C.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("windsurf"),a.errors.length>0&&e.services.warn(`Windsurf warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Windsurf MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Windsurf rules: ${a.rulesPath}`)}if(n.withContinueDev||n.autoMode&&E(R(s,".continue"))){let{createContinueDevInstaller:m}=await import("./continuedev-installer-DVU24D37.js"),a=await m({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&I.push("continuedev"),a.errors.length>0&&e.services.warn(`Continue.dev warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Continue.dev MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Continue.dev rules: ${a.rulesPath}`)}return I.length>0&&e.services.log(` Platforms configured: ${I.join(", ")}`),{skillsInstalled:i,agentsInstalled:l,n8nAgents:d,n8nSkills:u,openCodeAgents:g,openCodeSkills:p,kiroAgents:h,kiroSkills:f,kiroHooks:v,platformsConfigured:I,browserEngine:w}}detectVersionUpgrade(e){let t=e.config.version,s=R(e.projectRoot,".agentic-qe","config.yaml");if(E(s))try{let i=Ze(s,"utf-8").match(/version:\s*"?([^"\n]+)"?/)?.[1];if(i===t)return!1;if(i!==void 0)return!0}catch{}let n=R(e.projectRoot,".claude","agents","v3");try{return E(n)&&et(n).some(o=>o.endsWith(".md")&&o.startsWith("qe-"))}catch{return!1}}};import{existsSync as tt,mkdirSync as nt,writeFileSync as ie}from"fs";import{join as O}from"path";var Y=class extends y{name="workers";description="Configure background workers";order=100;critical=!1;requiresPhases=["configuration"];async shouldRun(e){let t=e.config;return t?.workers?.daemonAutoStart&&(t?.workers?.enabled?.length??0)>0}async run(e){let t=e.config,{projectRoot:s}=e;if(!t.workers.daemonAutoStart||t.workers.enabled.length===0)return{workersDir:"",workersConfigured:0,registryPath:"",daemonStarted:!1,daemonPid:null};let n=O(s,".agentic-qe","workers");tt(n)||nt(n,{recursive:!0});let o={"learning-consolidation":18e5,"pattern-consolidator":18e5,"test-health":3e5,"coverage-tracker":6e5,"coverage-gap-scanner":6e5,"flaky-detector":9e5,"flaky-test-detector":9e5,"security-scan":18e5,"quality-gate":3e5,"compliance-checker":18e5,"defect-predictor":9e5,"regression-monitor":6e5,"routing-accuracy-monitor":9e5,"performance-baseline":36e5,"cloud-sync":3e5},r={};for(let h of t.workers.enabled)r[h]={name:h,enabled:!0,interval:t.workers.intervals[h]||o[h]||6e4,lastRun:null,status:"pending"};let i=O(n,"registry.json"),l={version:t.version,maxConcurrent:t.workers.maxConcurrent,workers:r,createdAt:new Date().toISOString(),daemonPid:null};ie(i,JSON.stringify(l,null,2),"utf-8");for(let h of t.workers.enabled){let f=O(n,`${h}.json`),v={name:h,enabled:!0,interval:t.workers.intervals[h]||o[h]||6e4,projectRoot:s,dataDir:O(s,".agentic-qe","data"),createdAt:new Date().toISOString()};ie(f,JSON.stringify(v,null,2),"utf-8")}let d=O(n,"start-daemon.cjs");ie(d,`#!/usr/bin/env node
114
114
  // AQE v3 Worker Daemon Startup Script (cross-platform)
115
115
  // Generated by aqe init
116
116
  // Starts the MCP server with background workers enabled
@@ -369,7 +369,7 @@ Task({ prompt: "Security audit", subagent_type: "qe-security-scanner", run_in_ba
369
369
  INSERT OR REPLACE INTO kv_store (key, namespace, value, created_at)
370
370
  VALUES (?, '_system', ?, ?)
371
371
  `).run("init_timestamp",JSON.stringify(new Date().toISOString()),r),o.close(),!0}catch{return o.close(),!1}}catch{return!1}}async saveConfig(e,t){let s=F(t,".agentic-qe");D(s)||Ne(s,{recursive:!0});let n=F(s,"config.yaml");if(D(n)){let r=this.loadExistingConfig(n);r&&(e=this.mergeConfigs(e,r))}let o=this.configToYAML(e);at(n,o,"utf-8")}loadExistingConfig(e){try{let t=ot(e,"utf-8");return this.parseYAML(t)}catch{return null}}parseYAML(e){try{let t={},s=e.split(`
372
- `),n="",o="";for(let i of s){if(i.trim().startsWith("#")||i.trim()==="")continue;let l=i.match(/^(\w+):\s*(.*)$/);if(l){n=l[1],o="";let p=l[2].trim();p&&!p.startsWith('"')?t[n]=this.parseValue(p):p?t[n]=this.parseValue(p):t[n]={};continue}let d=i.match(/^ (\w+):\s*(.*)$/);if(d&&n){o=d[1];let p=d[2].trim();t[n]||(t[n]={}),p?t[n][o]=this.parseValue(p):t[n][o]={};continue}let u=i.match(/^ ([\w-]+):\s*(.*)$/);if(u&&n&&o){let p=u[1],h=u[2].trim(),f=t[n];f[o]||(f[o]={}),typeof f[o]=="object"&&!Array.isArray(f[o])&&(f[o][p]=this.parseValue(h));continue}let g=i.match(/^ - "?([^"]*)"?$/);if(g&&n&&o){let p=t[n];Array.isArray(p[o])||(p[o]=[]),p[o].push(g[1])}}let r=[["domains","enabled"],["domains","disabled"],["workers","enabled"]];for(let[i,l]of r){let d=t[i];d&&l in d&&!Array.isArray(d[l])&&(d[l]=[])}return t}catch{return null}}parseValue(e){return e==="true"?!0:e==="false"?!1:/^\d+$/.test(e)?parseInt(e,10):/^\d+\.\d+$/.test(e)?parseFloat(e):e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}mergeConfigs(e,t){if(t.domains?.enabled&&Array.isArray(t.domains.enabled)){let s=new Set(t.domains.enabled),n=new Set(e.domains.enabled);for(let r of n)s.add(r);let o=new Set(Array.isArray(t.domains?.disabled)?t.domains.disabled:[]);e.domains.enabled=Array.from(s).filter(r=>!o.has(r))}return t.domains?.disabled&&Array.isArray(t.domains.disabled)&&(e.domains.disabled=t.domains.disabled),t.learning?.enabled!==void 0&&(e.learning.enabled=t.learning.enabled),t.hooks?.claudeCode!==void 0&&(e.hooks.claudeCode=t.hooks.claudeCode),t.hooks?.preCommit!==void 0&&(e.hooks.preCommit=t.hooks.preCommit),t.hooks?.ciIntegration!==void 0&&(e.hooks.ciIntegration=t.hooks.ciIntegration),t.workers?.enabled&&Array.isArray(t.workers.enabled)&&(e.workers.enabled=t.workers.enabled),t.workers?.daemonAutoStart!==void 0&&(e.workers.daemonAutoStart=t.workers.daemonAutoStart),t.agents?.maxConcurrent!==void 0&&(e.agents.maxConcurrent=t.agents.maxConcurrent),t.agents?.defaultTimeout!==void 0&&(e.agents.defaultTimeout=t.agents.defaultTimeout),e}configToYAML(e){return["# Agentic QE v3 Configuration","# Generated by aqe init",`# ${new Date().toISOString()}`,"#",'# NOTE: Your customizations are PRESERVED when you run "aqe init" again.','# You do NOT need to re-run "aqe init" after editing this file - changes',"# take effect immediately. The following settings are merged on reinstall:","# - domains.enabled (custom domains like visual-accessibility)","# - domains.disabled","# - learning.enabled","# - hooks.* preferences","# - workers.enabled","# - agents.maxConcurrent and defaultTimeout","",`version: "${e.version}"`,"","project:",` name: "${e.project.name}"`,` root: "${e.project.root}"`,` type: "${e.project.type}"`,"","learning:",` enabled: ${e.learning.enabled}`,` embeddingModel: "${e.learning.embeddingModel}"`," hnswConfig:",` M: ${e.learning.hnswConfig.M}`,` efConstruction: ${e.learning.hnswConfig.efConstruction}`,` efSearch: ${e.learning.hnswConfig.efSearch}`,` qualityThreshold: ${e.learning.qualityThreshold}`,` promotionThreshold: ${e.learning.promotionThreshold}`,` pretrainedPatterns: ${e.learning.pretrainedPatterns}`,"","routing:",` mode: "${e.routing.mode}"`,` confidenceThreshold: ${e.routing.confidenceThreshold}`,` feedbackEnabled: ${e.routing.feedbackEnabled}`,"","# ADR-092: Advisor Strategy \u2014 agents consult a stronger model for strategic guidance","# Set provider/model to override auto-detection from environment API keys","advisor:",' # provider: "openrouter" # openrouter | claude | ollama (auto-detected if not set)',' # model: "anthropic/claude-opus-4" # provider-specific model ID',' # maxUses: "3" # per-task advisor call cap',' redact: "strict" # strict | balanced | off',"","workers:"," enabled:",...e.workers.enabled.map(s=>` - "${s}"`)," intervals:",...Object.entries(e.workers.intervals).map(([s,n])=>` ${s}: ${n}`),` maxConcurrent: ${e.workers.maxConcurrent}`,` daemonAutoStart: ${e.workers.daemonAutoStart}`,"","hooks:",` claudeCode: ${e.hooks.claudeCode}`,` preCommit: ${e.hooks.preCommit}`,` ciIntegration: ${e.hooks.ciIntegration}`,"","skills:",` install: ${e.skills.install}`,` installV2: ${e.skills.installV2}`,` installV3: ${e.skills.installV3}`,` overwrite: ${e.skills.overwrite}`,"","domains:"," enabled:",...e.domains.enabled.map(s=>` - "${s}"`)," disabled:",...e.domains.disabled.map(s=>` - "${s}"`),"","agents:",` maxConcurrent: ${e.agents.maxConcurrent}`,` defaultTimeout: ${e.agents.defaultTimeout}`,""].join(`
372
+ `),n="",o="";for(let i of s){if(i.trim().startsWith("#")||i.trim()==="")continue;let l=i.match(/^(\w+):\s*(.*)$/);if(l){n=l[1],o="";let p=l[2].trim();p&&!p.startsWith('"')?t[n]=this.parseValue(p):p?t[n]=this.parseValue(p):t[n]={};continue}let d=i.match(/^ (\w+):\s*(.*)$/);if(d&&n){o=d[1];let p=d[2].trim();t[n]||(t[n]={}),p?t[n][o]=this.parseValue(p):t[n][o]={};continue}let u=i.match(/^ ([\w-]+):\s*(.*)$/);if(u&&n&&o){let p=u[1],h=u[2].trim(),f=t[n];f[o]||(f[o]={}),typeof f[o]=="object"&&!Array.isArray(f[o])&&(f[o][p]=this.parseValue(h));continue}let g=i.match(/^ - "?([^"]*)"?$/);if(g&&n&&o){let p=t[n];Array.isArray(p[o])||(p[o]=[]),p[o].push(g[1])}}let r=[["domains","enabled"],["domains","disabled"],["workers","enabled"]];for(let[i,l]of r){let d=t[i];d&&l in d&&!Array.isArray(d[l])&&(d[l]=[])}return t}catch{return null}}parseValue(e){return e==="true"?!0:e==="false"?!1:/^\d+$/.test(e)?parseInt(e,10):/^\d+\.\d+$/.test(e)?parseFloat(e):e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}mergeConfigs(e,t){if(t.domains?.enabled&&Array.isArray(t.domains.enabled)){let s=new Set(t.domains.enabled),n=new Set(e.domains.enabled);for(let r of n)s.add(r);let o=new Set(Array.isArray(t.domains?.disabled)?t.domains.disabled:[]);e.domains.enabled=Array.from(s).filter(r=>!o.has(r))}return t.domains?.disabled&&Array.isArray(t.domains.disabled)&&(e.domains.disabled=t.domains.disabled),t.learning?.enabled!==void 0&&(e.learning.enabled=t.learning.enabled),t.hooks?.claudeCode!==void 0&&(e.hooks.claudeCode=t.hooks.claudeCode),t.hooks?.preCommit!==void 0&&(e.hooks.preCommit=t.hooks.preCommit),t.hooks?.ciIntegration!==void 0&&(e.hooks.ciIntegration=t.hooks.ciIntegration),t.workers?.enabled&&Array.isArray(t.workers.enabled)&&(e.workers.enabled=t.workers.enabled),t.workers?.daemonAutoStart!==void 0&&(e.workers.daemonAutoStart=t.workers.daemonAutoStart),t.agents?.maxConcurrent!==void 0&&(e.agents.maxConcurrent=t.agents.maxConcurrent),t.agents?.defaultTimeout!==void 0&&(e.agents.defaultTimeout=t.agents.defaultTimeout),e}configToYAML(e){return["# Agentic QE v3 Configuration","# Generated by aqe init",`# ${new Date().toISOString()}`,"#",'# NOTE: Your customizations are PRESERVED when you run "aqe init" again.','# You do NOT need to re-run "aqe init" after editing this file - changes',"# take effect immediately. The following settings are merged on reinstall:","# - domains.enabled (custom domains like visual-accessibility)","# - domains.disabled","# - learning.enabled","# - hooks.* preferences","# - workers.enabled","# - agents.maxConcurrent and defaultTimeout","",`version: "${e.version}"`,"","project:",` name: "${e.project.name}"`,` root: "${e.project.root}"`,` type: "${e.project.type}"`,"","learning:",` enabled: ${e.learning.enabled}`,` embeddingModel: "${e.learning.embeddingModel}"`," hnswConfig:",` M: ${e.learning.hnswConfig.M}`,` efConstruction: ${e.learning.hnswConfig.efConstruction}`,` efSearch: ${e.learning.hnswConfig.efSearch}`,` qualityThreshold: ${e.learning.qualityThreshold}`,` promotionThreshold: ${e.learning.promotionThreshold}`,` pretrainedPatterns: ${e.learning.pretrainedPatterns}`,"","routing:",` mode: "${e.routing.mode}"`,` confidenceThreshold: ${e.routing.confidenceThreshold}`,` feedbackEnabled: ${e.routing.feedbackEnabled}`,"","# ADR-092: Advisor Strategy \u2014 agents consult a stronger model for strategic guidance","# Set provider/model to override auto-detection from environment API keys","advisor:",' # provider: "openrouter" # openrouter | claude | ollama (auto-detected if not set)',' # model: "anthropic/claude-opus-4.7" # provider-specific model ID',' # maxUses: "3" # per-task advisor call cap',' redact: "strict" # strict | balanced | off',"","workers:"," enabled:",...e.workers.enabled.map(s=>` - "${s}"`)," intervals:",...Object.entries(e.workers.intervals).map(([s,n])=>` ${s}: ${n}`),` maxConcurrent: ${e.workers.maxConcurrent}`,` daemonAutoStart: ${e.workers.daemonAutoStart}`,"","hooks:",` claudeCode: ${e.hooks.claudeCode}`,` preCommit: ${e.hooks.preCommit}`,` ciIntegration: ${e.hooks.ciIntegration}`,"","skills:",` install: ${e.skills.install}`,` installV2: ${e.skills.installV2}`,` installV3: ${e.skills.installV3}`,` overwrite: ${e.skills.overwrite}`,"","domains:"," enabled:",...e.domains.enabled.map(s=>` - "${s}"`)," disabled:",...e.domains.disabled.map(s=>` - "${s}"`),"","agents:",` maxConcurrent: ${e.agents.maxConcurrent}`,` defaultTimeout: ${e.agents.defaultTimeout}`,""].join(`
373
373
  `)}};ee();import{existsSync as j,mkdirSync as Qe,readdirSync as Le,copyFileSync as Ve}from"fs";import{join as C,dirname as lt}from"path";import{fileURLToPath as ct}from"url";var dt=ct(import.meta.url),Be=lt(dt);function ut(){let c=[C(Be,"../../assets/governance"),C(Be,"../assets/governance")],e=Ee(import.meta.url);e&&(c.push(C(e,"assets/governance")),c.push(C(e,"dist/assets/governance"))),c.push(C(process.cwd(),"node_modules/agentic-qe/assets/governance")),c.push(C(process.cwd(),"assets/governance"));for(let t of c)if(j(t))return t;throw new Error(`Governance assets not found. Package may be corrupted. Searched: ${c.join(", ")}`)}var he=class{projectRoot;overwrite;skipShards;assetsPath;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.skipShards=e.skipShards??!1,this.assetsPath=ut()}async install(){let e=[],t=[],s=[],n=C(this.projectRoot,".claude","guidance"),o=C(n,"shards");try{Qe(n,{recursive:!0}),this.skipShards||Qe(o,{recursive:!0})}catch(u){return s.push(`Failed to create governance directory: ${S(u)}`),{installed:e,skipped:t,errors:s,governanceDir:n,constitutionInstalled:!1,shardsInstalled:0}}let r=!1,i=C(this.assetsPath,"constitution.md"),l=C(n,"constitution.md");if(j(i))try{!j(l)||this.overwrite?(Ve(i,l),e.push("constitution.md"),r=!0):t.push("constitution.md")}catch(u){s.push(`Failed to install constitution.md: ${S(u)}`)}else s.push("constitution.md not found in assets");let d=0;if(!this.skipShards){let u=C(this.assetsPath,"shards");if(j(u))try{let g=Le(u).filter(p=>p.endsWith(".shard.md"));for(let p of g){let h=C(u,p),f=C(o,p);try{!j(f)||this.overwrite?(Ve(h,f),e.push(`shards/${p}`),d++):t.push(`shards/${p}`)}catch(v){s.push(`Failed to install ${p}: ${S(v)}`)}}}catch(g){s.push(`Failed to read shards directory: ${S(g)}`)}else s.push("Shards directory not found in assets")}return{installed:e,skipped:t,errors:s,governanceDir:n,constitutionInstalled:r,shardsInstalled:d}}isInstalled(){let e=C(this.projectRoot,".claude","guidance","constitution.md");return j(e)}getInstalledShards(){let e=C(this.projectRoot,".claude","guidance","shards");if(!j(e))return[];try{return Le(e).filter(t=>t.endsWith(".shard.md"))}catch{return[]}}};function We(c){return new he(c)}var Z=class extends y{name="governance";description="Install governance configuration";order=95;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.options.noGovernance?(e.services.log(" Governance skipped (--no-governance flag)"),!1):e.options.minimal?(e.services.log(" Governance skipped (minimal mode)"),!1):!0}async run(e){let{projectRoot:t,options:s}=e,n=s.upgrade,o=We({projectRoot:t,overwrite:n});if(o.isInstalled()&&!n){let i=o.getInstalledShards();return e.services.log(` Governance already installed (${i.length} shards)`),e.services.log(" Use --upgrade to overwrite existing files"),{filesInstalled:0,filesSkipped:1+i.length,constitutionInstalled:!1,shardsInstalled:0,governanceDir:`${t}/.claude/guidance`,skippedByFlag:!1}}let r=await o.install();if(r.errors.length>0)for(let i of r.errors)e.services.warn(` ${i}`);return e.services.log(` Constitution: ${r.constitutionInstalled?"installed":"skipped"}`),e.services.log(` Shards: ${r.shardsInstalled} installed, ${r.skipped.filter(i=>i.startsWith("shards/")).length} skipped`),r.installed.length>0&&(e.services.log(" Governance enabled (non-strict mode by default)"),e.services.log(" Set GOVERNANCE_STRICT_MODE=true for strict enforcement")),{filesInstalled:r.installed.length,filesSkipped:r.skipped.length,constitutionInstalled:r.constitutionInstalled,shardsInstalled:r.shardsInstalled,governanceDir:r.governanceDir,skippedByFlag:!1}}};var pt=new N,gt=new Q,mt=new L,ft=new W,ht=new H,yt=new G,vt=new U,kt=new z,wt=new K,bt=new Y,Ct=new J,It=new X,Pt=new Z;function He(){return[pt,gt,mt,ft,ht,yt,vt,kt,wt,Pt,bt,Ct,It]}var ye=class{phases;context;constructor(e){this.context=this.createContext(e),this.phases=e.customPhases??He()}createContext(e){let t=e.withAllPlatforms;return{projectRoot:e.projectRoot,options:{autoMode:e.autoMode,upgrade:e.upgrade,skipPatterns:e.skipPatterns,skipCodeIndex:e.skipCodeIndex,minimal:e.minimal,withN8n:e.withN8n,withOpenCode:e.withOpenCode,withKiro:e.withKiro,withCopilot:e.withCopilot||t,withCursor:e.withCursor||t,withCline:e.withCline||t,withKiloCode:e.withKiloCode||t,withRooCode:e.withRooCode||t,withCodex:e.withCodex||t,withWindsurf:e.withWindsurf||t,withContinueDev:e.withContinueDev||t,withAllPlatforms:e.withAllPlatforms,n8nApiConfig:e.n8nApiConfig,wizardAnswers:e.wizardAnswers,noGovernance:e.noGovernance,noMcp:e.noMcp},config:{},enhancements:{claudeFlow:!1,ruvector:!1},results:new Map,services:{log:s=>console.log(s),warn:s=>console.warn(s),error:s=>console.error(s)}}}async initialize(){let e=Date.now(),t=[];try{let s=[...this.phases].sort((n,o)=>n.order-o.order);for(let n of s){if(!await n.shouldRun(this.context))continue;console.log(`
374
374
  \u{1F4CB} ${n.description}...`);let r=await n.execute(this.context);if(this.context.results.set(n.name,r),t.push({step:n.description,status:r.success?"success":"error",message:r.message||"",durationMs:r.durationMs}),!r.success&&n.critical){if(console.error(`
375
375
  \u274C Critical phase failed: ${n.name}`),n.rollback)try{await n.rollback(this.context)}catch(i){console.error(`Rollback failed: ${i}`)}return this.createFailureResult(t,e)}if(r.skipRemaining)break}return this.createSuccessResult(t,e)}catch(s){return t.push({step:"Initialization Failed",status:"error",message:S(s),durationMs:0}),this.createFailureResult(t,e)}}createSuccessResult(e,t){let s=this.context.config,n=this.context.results.get("learning"),o=this.context.results.get("code-intelligence"),r=this.context.results.get("assets"),i=this.context.results.get("hooks"),l=this.context.results.get("mcp"),d=this.context.results.get("claude-md"),u=this.context.results.get("workers");return{success:!0,config:s||de("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:this.context.results.has("analysis"),configGenerated:this.context.results.has("configuration"),codeIntelligenceIndexed:o?.data?.entries??0,patternsLoaded:n?.data?.patternsLoaded??0,skillsInstalled:r?.data?.skillsInstalled??0,agentsInstalled:r?.data?.agentsInstalled??0,hooksConfigured:i?.data?.configured??!1,mcpConfigured:l?.data?.configured??!1,claudeMdGenerated:d?.data?.generated??!1,workersStarted:u?.data?.workersConfigured??0},totalDurationMs:Date.now()-t,timestamp:new Date}}createFailureResult(e,t){return{success:!1,config:de("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:!1,configGenerated:!1,codeIntelligenceIndexed:0,patternsLoaded:0,skillsInstalled:0,agentsInstalled:0,hooksConfigured:!1,mcpConfigured:!1,claudeMdGenerated:!1,workersStarted:0},totalDurationMs:Date.now()-t,timestamp:new Date}}getPhase(e){return this.phases.find(t=>t.name===e)}getPhases(){return[...this.phases]}getContext(){return this.context}};function St(c){return new ye(c)}async function $s(c){return await St({projectRoot:c,autoMode:!0}).initialize()}function Ds(c){let e=[];e.push(""),e.push("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),e.push("\u2502 AQE v3 Initialization \u2502"),e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let s of c.steps){let n=s.status==="success"?"\u2713":s.status==="error"?"\u2717":"\u25CB",o=s.step.substring(0,48).padEnd(48);e.push(`\u2502 ${n} ${o} ${String(s.durationMs).padStart(4)}ms \u2502`)}e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),e.push(`\u2502 Project: ${c.config.project.name.substring(0,45).padEnd(45)} \u2502`),e.push(`\u2502 Type: ${c.config.project.type.padEnd(48)} \u2502`),e.push(`\u2502 Code Intel: ${String(c.summary.codeIntelligenceIndexed).padEnd(43)} \u2502`),e.push(`\u2502 Patterns: ${String(c.summary.patternsLoaded).padEnd(45)} \u2502`),e.push(`\u2502 Skills: ${String(c.summary.skillsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Agents: ${String(c.summary.agentsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Workers: ${String(c.summary.workersStarted).padEnd(46)} \u2502`),e.push(`\u2502 Hooks: ${c.summary.hooksConfigured?"Yes":"No".padEnd(48)} \u2502`),e.push(`\u2502 MCP: ${c.summary.mcpConfigured?"Yes":"No".padEnd(50)} \u2502`),e.push(`\u2502 CLAUDE.md: ${c.summary.claudeMdGenerated?"Yes":"No".padEnd(44)} \u2502`),e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let t=c.success?"\u2713 AQE v3 initialized successfully":"\u2717 Initialization failed";return e.push(`\u2502 ${t.padEnd(57)} \u2502`),e.push("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),e.push(""),e.join(`
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.12");process.exit(0)}
2
- import{a as y,b as w,c as u}from"./chunk-M7QYRRRS.js";import"./chunk-FT3BXL44.js";import{Command as O}from"commander";import{resolve as A}from"path";import s from"chalk";import*as M from"node:fs/promises";import{parse as W}from"yaml";var E=["eq","neq","gt","gte","lt","lte","contains","exists"],D=["sequential","parallel"],N=/\$\{([^}]+)\}/g,k=class{parse(r,t){try{let n=this.interpolateVariables(r,t??{}),a=W(n);return this.validateAndConvert(a)}catch(n){return u(n instanceof Error?new Error(`YAML parse error: ${n.message}`):new Error(`YAML parse error: ${String(n)}`))}}async loadFromFile(r,t){try{let n=await M.readFile(r,"utf-8");return this.parse(n,t)}catch(n){return u(n instanceof Error?new Error(`Failed to read pipeline file '${r}': ${n.message}`):new Error(`Failed to read pipeline file '${r}': ${String(n)}`))}}interpolateVariables(r,t){return r.replace(N,(n,a)=>{let o=this.resolveVarPath(t,a);return o===void 0?n:String(o)})}validateSchema(r){return this.validateAndConvert(r)}validateAndConvert(r){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error("YAML must parse to an object"));let t=r;if(!t.id||typeof t.id!="string")return u(new Error("Missing or invalid required field 'id' (string)"));if(!t.name||typeof t.name!="string")return u(new Error("Missing or invalid required field 'name' (string)"));if(!t.steps||!Array.isArray(t.steps)||t.steps.length===0)return u(new Error("'steps' must be a non-empty array"));let n=typeof t.description=="string"?t.description:"",a=typeof t.version=="string"?t.version:"1.0.0",o;if(t.defaultMode!==void 0){if(!D.includes(t.defaultMode))return u(new Error(`Invalid defaultMode '${String(t.defaultMode)}'. Must be one of: ${D.join(", ")}`));o=t.defaultMode}let e;if(t.timeout!==void 0){if(typeof t.timeout!="number"||t.timeout<=0)return u(new Error("'timeout' must be a positive number"));e=t.timeout}let i=Array.isArray(t.tags)?t.tags.filter(g=>typeof g=="string"):void 0,l=this.validateSteps(t.steps);if(!l.success)return l;let d;if(t.triggers!==void 0){if(!Array.isArray(t.triggers))return u(new Error("'triggers' must be an array"));let g=this.validateTriggers(t.triggers);if(!g.success)return g;d=g.value}let p=this.detectCircularDependencies(l.value);if(p)return u(new Error(`Circular dependency detected: ${p}`));let c={id:t.id,name:t.name,description:n,version:a,steps:l.value,...o!==void 0&&{defaultMode:o},...e!==void 0&&{timeout:e},...i!==void 0&&{tags:i},...d!==void 0&&{triggers:d}};return w(c)}validateSteps(r){let t=[],n=new Set;for(let a=0;a<r.length;a++){let o=r[a];if(!o||typeof o!="object"||Array.isArray(o))return u(new Error(`Step at index ${a} must be an object`));let e=o;if(!e.id||typeof e.id!="string")return u(new Error(`Step at index ${a}: missing or invalid 'id' (string)`));if(n.has(e.id))return u(new Error(`Duplicate step ID: ${e.id}`));if(n.add(e.id),!e.name||typeof e.name!="string")return u(new Error(`Step '${e.id}': missing or invalid 'name' (string)`));if(!e.domain||typeof e.domain!="string")return u(new Error(`Step '${e.id}': missing or invalid 'domain' (string)`));if(!y.includes(e.domain))return u(new Error(`Step '${e.id}': invalid domain '${e.domain}'. Must be one of: ${y.join(", ")}`));if(!e.action||typeof e.action!="string")return u(new Error(`Step '${e.id}': missing or invalid 'action' (string)`));let i=this.validateStringRecord(e.inputMapping,`Step '${e.id}'.inputMapping`);if(i!==void 0&&i instanceof Error)return u(i);let l=this.validateStringRecord(e.outputMapping,`Step '${e.id}'.outputMapping`);if(l!==void 0&&l instanceof Error)return u(l);let d;if(e.dependsOn!==void 0){if(!Array.isArray(e.dependsOn)||!e.dependsOn.every(f=>typeof f=="string"))return u(new Error(`Step '${e.id}': 'dependsOn' must be an array of strings`));for(let f of e.dependsOn)if(!r.some(j=>j.id===f))return u(new Error(`Step '${e.id}' depends on unknown step: ${f}`));d=e.dependsOn}let p;if(e.condition!==void 0){let f=this.validateCondition(e.condition,`Step '${e.id}'.condition`);if(!f.success)return f;p=f.value}let c;if(e.skipCondition!==void 0){let f=this.validateCondition(e.skipCondition,`Step '${e.id}'.skipCondition`);if(!f.success)return f;c=f.value}let g;if(e.timeout!==void 0){if(typeof e.timeout!="number"||e.timeout<=0)return u(new Error(`Step '${e.id}': 'timeout' must be a positive number`));g=e.timeout}let $;if(e.retry!==void 0){let f=this.validateRetry(e.retry,e.id);if(!f.success)return f;$=f.value}let b;if(e.rollback!==void 0){let f=this.validateRollback(e.rollback,e.id);if(!f.success)return f;b=f.value}let R=typeof e.continueOnFailure=="boolean"?e.continueOnFailure:void 0,S;if(e.approval!==void 0){let f=this.validateApproval(e.approval,e.id);if(!f.success)return f;S=f.value}let C={id:e.id,name:e.name,domain:e.domain,action:e.action,...i!==void 0&&{inputMapping:i},...l!==void 0&&{outputMapping:l},...d!==void 0&&{dependsOn:d},...p!==void 0&&{condition:p},...c!==void 0&&{skipCondition:c},...g!==void 0&&{timeout:g},...$!==void 0&&{retry:$},...b!==void 0&&{rollback:b},...R!==void 0&&{continueOnFailure:R},...S!==void 0&&{approval:S}};t.push(C)}return w(t)}validateCondition(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`${t}: must be an object with path, operator, value`));let n=r;return!n.path||typeof n.path!="string"?u(new Error(`${t}: missing or invalid 'path' (string)`)):!n.operator||typeof n.operator!="string"?u(new Error(`${t}: missing or invalid 'operator' (string)`)):E.includes(n.operator)?n.value===void 0?u(new Error(`${t}: missing 'value'`)):w({path:n.path,operator:n.operator,value:n.value}):u(new Error(`${t}: invalid operator '${n.operator}'. Must be one of: ${E.join(", ")}`))}validateTriggers(r){let t=[];for(let n=0;n<r.length;n++){let a=r[n];if(!a||typeof a!="object"||Array.isArray(a))return u(new Error(`Trigger at index ${n} must be an object`));let o=a;if(!o.eventType||typeof o.eventType!="string")return u(new Error(`Trigger at index ${n}: missing or invalid 'eventType' (string)`));let e;if(o.sourceDomain!==void 0){if(typeof o.sourceDomain!="string"||!y.includes(o.sourceDomain))return u(new Error(`Trigger at index ${n}: invalid 'sourceDomain' '${String(o.sourceDomain)}'`));e=o.sourceDomain}let i;if(o.condition!==void 0){let d=this.validateCondition(o.condition,`Trigger at index ${n}.condition`);if(!d.success)return d;i=d.value}let l=this.validateStringRecord(o.inputMapping,`Trigger at index ${n}.inputMapping`);if(l!==void 0&&l instanceof Error)return u(l);t.push({eventType:o.eventType,...e!==void 0&&{sourceDomain:e},...i!==void 0&&{condition:i},...l!==void 0&&{inputMapping:l}})}return w(t)}validateRetry(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'retry' must be an object`));let n=r;return typeof n.maxAttempts!="number"||n.maxAttempts<1?u(new Error(`Step '${t}': retry.maxAttempts must be a positive integer`)):typeof n.backoffMs!="number"||n.backoffMs<0?u(new Error(`Step '${t}': retry.backoffMs must be a non-negative number`)):w({maxAttempts:n.maxAttempts,backoffMs:n.backoffMs,...typeof n.backoffMultiplier=="number"&&{backoffMultiplier:n.backoffMultiplier}})}validateRollback(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'rollback' must be an object`));let n=r;return!n.domain||typeof n.domain!="string"||!y.includes(n.domain)?u(new Error(`Step '${t}': rollback.domain is invalid or missing`)):!n.action||typeof n.action!="string"?u(new Error(`Step '${t}': rollback.action is required (string)`)):w({domain:n.domain,action:n.action,...n.input!==void 0&&typeof n.input=="object"&&{input:n.input}})}validateApproval(r,t){if(typeof r=="boolean")return w(r);if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'approval' must be a boolean or object`));let n=r,a={};if(n.autoApproveAfter!==void 0){if(typeof n.autoApproveAfter!="number"||n.autoApproveAfter<0)return u(new Error(`Step '${t}': approval.autoApproveAfter must be a non-negative number`));a.autoApproveAfter=n.autoApproveAfter}if(n.message!==void 0){if(typeof n.message!="string")return u(new Error(`Step '${t}': approval.message must be a string`));a.message=n.message}return w(a)}validateStringRecord(r,t){if(r==null)return;if(typeof r!="object"||Array.isArray(r))return new Error(`${t}: must be an object with string values`);let n=r;for(let[a,o]of Object.entries(n))if(typeof o!="string")return new Error(`${t}: value for key '${a}' must be a string, got ${typeof o}`);return n}resolveVarPath(r,t){if(t in r)return r[t];let n=t.split("."),a=r;for(let o of n){if(a==null||typeof a!="object")return;a=a[o]}return a}detectCircularDependencies(r){let t=new Set,n=new Set,a=(o,e)=>{if(n.has(o))return[...e,o].join(" -> ");if(t.has(o))return null;t.add(o),n.add(o);let i=r.find(l=>l.id===o);if(i?.dependsOn)for(let l of i.dependsOn){let d=a(l,[...e,o]);if(d)return d}return n.delete(o),null};for(let o of r){let e=a(o.id,[]);if(e)return e}return null}};function h(m){let r={};for(let t of m){let n=t.indexOf("=");if(n===-1)r[t]=!0;else{let a=t.slice(0,n),o=t.slice(n+1);o==="true"?r[a]=!0:o==="false"?r[a]=!1:!isNaN(Number(o))&&o!==""?r[a]=Number(o):r[a]=o}}return r}function T(m){return h(m)}function v(m){return m.workflowOrchestrator}function X(m,r,t){let n=new k,a=new O("pipeline").description("Manage YAML deterministic pipelines (Imp-9)");return a.command("load <file>").description("Load and register a pipeline from a YAML file").option("--vars <entries...>","Variable substitutions (key=value)").action(async(o,e)=>{if(!await t())return;let i=v(m);if(!i){console.error(s.red(' Workflow orchestrator not available. Run "aqe fleet init" first.')),await r(1);return}let l=A(o),d=e.vars?h(e.vars):void 0;console.log(s.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import{a as y,b as w,c as u}from"./chunk-PZF5ISGS.js";import"./chunk-DGUAAG3T.js";import{Command as O}from"commander";import{resolve as A}from"path";import s from"chalk";import*as M from"node:fs/promises";import{parse as W}from"yaml";var E=["eq","neq","gt","gte","lt","lte","contains","exists"],D=["sequential","parallel"],N=/\$\{([^}]+)\}/g,k=class{parse(r,t){try{let n=this.interpolateVariables(r,t??{}),a=W(n);return this.validateAndConvert(a)}catch(n){return u(n instanceof Error?new Error(`YAML parse error: ${n.message}`):new Error(`YAML parse error: ${String(n)}`))}}async loadFromFile(r,t){try{let n=await M.readFile(r,"utf-8");return this.parse(n,t)}catch(n){return u(n instanceof Error?new Error(`Failed to read pipeline file '${r}': ${n.message}`):new Error(`Failed to read pipeline file '${r}': ${String(n)}`))}}interpolateVariables(r,t){return r.replace(N,(n,a)=>{let o=this.resolveVarPath(t,a);return o===void 0?n:String(o)})}validateSchema(r){return this.validateAndConvert(r)}validateAndConvert(r){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error("YAML must parse to an object"));let t=r;if(!t.id||typeof t.id!="string")return u(new Error("Missing or invalid required field 'id' (string)"));if(!t.name||typeof t.name!="string")return u(new Error("Missing or invalid required field 'name' (string)"));if(!t.steps||!Array.isArray(t.steps)||t.steps.length===0)return u(new Error("'steps' must be a non-empty array"));let n=typeof t.description=="string"?t.description:"",a=typeof t.version=="string"?t.version:"1.0.0",o;if(t.defaultMode!==void 0){if(!D.includes(t.defaultMode))return u(new Error(`Invalid defaultMode '${String(t.defaultMode)}'. Must be one of: ${D.join(", ")}`));o=t.defaultMode}let e;if(t.timeout!==void 0){if(typeof t.timeout!="number"||t.timeout<=0)return u(new Error("'timeout' must be a positive number"));e=t.timeout}let i=Array.isArray(t.tags)?t.tags.filter(g=>typeof g=="string"):void 0,l=this.validateSteps(t.steps);if(!l.success)return l;let d;if(t.triggers!==void 0){if(!Array.isArray(t.triggers))return u(new Error("'triggers' must be an array"));let g=this.validateTriggers(t.triggers);if(!g.success)return g;d=g.value}let p=this.detectCircularDependencies(l.value);if(p)return u(new Error(`Circular dependency detected: ${p}`));let c={id:t.id,name:t.name,description:n,version:a,steps:l.value,...o!==void 0&&{defaultMode:o},...e!==void 0&&{timeout:e},...i!==void 0&&{tags:i},...d!==void 0&&{triggers:d}};return w(c)}validateSteps(r){let t=[],n=new Set;for(let a=0;a<r.length;a++){let o=r[a];if(!o||typeof o!="object"||Array.isArray(o))return u(new Error(`Step at index ${a} must be an object`));let e=o;if(!e.id||typeof e.id!="string")return u(new Error(`Step at index ${a}: missing or invalid 'id' (string)`));if(n.has(e.id))return u(new Error(`Duplicate step ID: ${e.id}`));if(n.add(e.id),!e.name||typeof e.name!="string")return u(new Error(`Step '${e.id}': missing or invalid 'name' (string)`));if(!e.domain||typeof e.domain!="string")return u(new Error(`Step '${e.id}': missing or invalid 'domain' (string)`));if(!y.includes(e.domain))return u(new Error(`Step '${e.id}': invalid domain '${e.domain}'. Must be one of: ${y.join(", ")}`));if(!e.action||typeof e.action!="string")return u(new Error(`Step '${e.id}': missing or invalid 'action' (string)`));let i=this.validateStringRecord(e.inputMapping,`Step '${e.id}'.inputMapping`);if(i!==void 0&&i instanceof Error)return u(i);let l=this.validateStringRecord(e.outputMapping,`Step '${e.id}'.outputMapping`);if(l!==void 0&&l instanceof Error)return u(l);let d;if(e.dependsOn!==void 0){if(!Array.isArray(e.dependsOn)||!e.dependsOn.every(f=>typeof f=="string"))return u(new Error(`Step '${e.id}': 'dependsOn' must be an array of strings`));for(let f of e.dependsOn)if(!r.some(j=>j.id===f))return u(new Error(`Step '${e.id}' depends on unknown step: ${f}`));d=e.dependsOn}let p;if(e.condition!==void 0){let f=this.validateCondition(e.condition,`Step '${e.id}'.condition`);if(!f.success)return f;p=f.value}let c;if(e.skipCondition!==void 0){let f=this.validateCondition(e.skipCondition,`Step '${e.id}'.skipCondition`);if(!f.success)return f;c=f.value}let g;if(e.timeout!==void 0){if(typeof e.timeout!="number"||e.timeout<=0)return u(new Error(`Step '${e.id}': 'timeout' must be a positive number`));g=e.timeout}let $;if(e.retry!==void 0){let f=this.validateRetry(e.retry,e.id);if(!f.success)return f;$=f.value}let b;if(e.rollback!==void 0){let f=this.validateRollback(e.rollback,e.id);if(!f.success)return f;b=f.value}let R=typeof e.continueOnFailure=="boolean"?e.continueOnFailure:void 0,S;if(e.approval!==void 0){let f=this.validateApproval(e.approval,e.id);if(!f.success)return f;S=f.value}let C={id:e.id,name:e.name,domain:e.domain,action:e.action,...i!==void 0&&{inputMapping:i},...l!==void 0&&{outputMapping:l},...d!==void 0&&{dependsOn:d},...p!==void 0&&{condition:p},...c!==void 0&&{skipCondition:c},...g!==void 0&&{timeout:g},...$!==void 0&&{retry:$},...b!==void 0&&{rollback:b},...R!==void 0&&{continueOnFailure:R},...S!==void 0&&{approval:S}};t.push(C)}return w(t)}validateCondition(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`${t}: must be an object with path, operator, value`));let n=r;return!n.path||typeof n.path!="string"?u(new Error(`${t}: missing or invalid 'path' (string)`)):!n.operator||typeof n.operator!="string"?u(new Error(`${t}: missing or invalid 'operator' (string)`)):E.includes(n.operator)?n.value===void 0?u(new Error(`${t}: missing 'value'`)):w({path:n.path,operator:n.operator,value:n.value}):u(new Error(`${t}: invalid operator '${n.operator}'. Must be one of: ${E.join(", ")}`))}validateTriggers(r){let t=[];for(let n=0;n<r.length;n++){let a=r[n];if(!a||typeof a!="object"||Array.isArray(a))return u(new Error(`Trigger at index ${n} must be an object`));let o=a;if(!o.eventType||typeof o.eventType!="string")return u(new Error(`Trigger at index ${n}: missing or invalid 'eventType' (string)`));let e;if(o.sourceDomain!==void 0){if(typeof o.sourceDomain!="string"||!y.includes(o.sourceDomain))return u(new Error(`Trigger at index ${n}: invalid 'sourceDomain' '${String(o.sourceDomain)}'`));e=o.sourceDomain}let i;if(o.condition!==void 0){let d=this.validateCondition(o.condition,`Trigger at index ${n}.condition`);if(!d.success)return d;i=d.value}let l=this.validateStringRecord(o.inputMapping,`Trigger at index ${n}.inputMapping`);if(l!==void 0&&l instanceof Error)return u(l);t.push({eventType:o.eventType,...e!==void 0&&{sourceDomain:e},...i!==void 0&&{condition:i},...l!==void 0&&{inputMapping:l}})}return w(t)}validateRetry(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'retry' must be an object`));let n=r;return typeof n.maxAttempts!="number"||n.maxAttempts<1?u(new Error(`Step '${t}': retry.maxAttempts must be a positive integer`)):typeof n.backoffMs!="number"||n.backoffMs<0?u(new Error(`Step '${t}': retry.backoffMs must be a non-negative number`)):w({maxAttempts:n.maxAttempts,backoffMs:n.backoffMs,...typeof n.backoffMultiplier=="number"&&{backoffMultiplier:n.backoffMultiplier}})}validateRollback(r,t){if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'rollback' must be an object`));let n=r;return!n.domain||typeof n.domain!="string"||!y.includes(n.domain)?u(new Error(`Step '${t}': rollback.domain is invalid or missing`)):!n.action||typeof n.action!="string"?u(new Error(`Step '${t}': rollback.action is required (string)`)):w({domain:n.domain,action:n.action,...n.input!==void 0&&typeof n.input=="object"&&{input:n.input}})}validateApproval(r,t){if(typeof r=="boolean")return w(r);if(!r||typeof r!="object"||Array.isArray(r))return u(new Error(`Step '${t}': 'approval' must be a boolean or object`));let n=r,a={};if(n.autoApproveAfter!==void 0){if(typeof n.autoApproveAfter!="number"||n.autoApproveAfter<0)return u(new Error(`Step '${t}': approval.autoApproveAfter must be a non-negative number`));a.autoApproveAfter=n.autoApproveAfter}if(n.message!==void 0){if(typeof n.message!="string")return u(new Error(`Step '${t}': approval.message must be a string`));a.message=n.message}return w(a)}validateStringRecord(r,t){if(r==null)return;if(typeof r!="object"||Array.isArray(r))return new Error(`${t}: must be an object with string values`);let n=r;for(let[a,o]of Object.entries(n))if(typeof o!="string")return new Error(`${t}: value for key '${a}' must be a string, got ${typeof o}`);return n}resolveVarPath(r,t){if(t in r)return r[t];let n=t.split("."),a=r;for(let o of n){if(a==null||typeof a!="object")return;a=a[o]}return a}detectCircularDependencies(r){let t=new Set,n=new Set,a=(o,e)=>{if(n.has(o))return[...e,o].join(" -> ");if(t.has(o))return null;t.add(o),n.add(o);let i=r.find(l=>l.id===o);if(i?.dependsOn)for(let l of i.dependsOn){let d=a(l,[...e,o]);if(d)return d}return n.delete(o),null};for(let o of r){let e=a(o.id,[]);if(e)return e}return null}};function h(m){let r={};for(let t of m){let n=t.indexOf("=");if(n===-1)r[t]=!0;else{let a=t.slice(0,n),o=t.slice(n+1);o==="true"?r[a]=!0:o==="false"?r[a]=!1:!isNaN(Number(o))&&o!==""?r[a]=Number(o):r[a]=o}}return r}function T(m){return h(m)}function v(m){return m.workflowOrchestrator}function X(m,r,t){let n=new k,a=new O("pipeline").description("Manage YAML deterministic pipelines (Imp-9)");return a.command("load <file>").description("Load and register a pipeline from a YAML file").option("--vars <entries...>","Variable substitutions (key=value)").action(async(o,e)=>{if(!await t())return;let i=v(m);if(!i){console.error(s.red(' Workflow orchestrator not available. Run "aqe fleet init" first.')),await r(1);return}let l=A(o),d=e.vars?h(e.vars):void 0;console.log(s.blue(`
3
3
  Loading pipeline from: ${o}
4
4
  `));let p=await n.loadFromFile(l,d);if(!p.success){console.error(s.red(` Parse error: ${p.error.message}`)),await r(1);return}let c=p.value,g=i.registerWorkflow(c);if(!g.success){console.error(s.red(` Registration error: ${g.error.message}`)),await r(1);return}console.log(s.green(" Pipeline loaded successfully.")),console.log(` ID: ${s.cyan(c.id)}`),console.log(` Name: ${s.cyan(c.name)}`),console.log(` Steps: ${s.cyan(c.steps.length)}`),console.log(` Version: ${s.cyan(c.version)}`),c.tags?.length&&console.log(` Tags: ${s.cyan(c.tags.join(", "))}`),console.log(""),await r(0)}),a.command("validate <file>").description("Validate a YAML pipeline without registering it").option("--vars <entries...>","Variable substitutions (key=value)").action(async(o,e)=>{let i=A(o),l=e.vars?h(e.vars):void 0;console.log(s.blue(`
5
5
  Validating pipeline: ${o}
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.12");process.exit(0)}
2
- import{a as u}from"./chunk-PBZLLYB3.js";import{a as y,c as w}from"./chunk-LJTRN6ZE.js";import{b as $}from"./chunk-FT3BXL44.js";import{Command as v}from"commander";import o from"chalk";import{existsSync as d,readFileSync as P}from"node:fs";import m from"node:path";w();var C=$({});var p=Object.keys(u);function h(s){return p.includes(s)}function x(s,e){let t=m.join(s,e.configPath),n=m.join(s,e.rulesPath);return{configExists:d(t),rulesExists:d(n)}}function E(s,e){try{let t=P(s,"utf-8");return e==="json"?{valid:!0,data:JSON.parse(t)}:e==="toml"?t.trim().length===0?{valid:!1,error:"File is empty"}:{valid:!0}:e==="yaml"?t.trim().length===0?{valid:!1,error:"File is empty"}:{valid:!0}:{valid:!0}}catch(t){return{valid:!1,error:y(t)}}}function I(s,e){try{return P(s,"utf-8").includes("agentic-qe")}catch{return!1}}function j(){let s=new v("platform").description("Manage coding agent platform configurations");return s.command("list").description("List all supported platforms and their configuration status").action(async()=>{let e=process.cwd();console.log(""),console.log(o.bold.blue(" Supported Platforms")),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");let t=18,n=36,r=14;console.log(o.gray(` ${"Platform".padEnd(t)}${"Config Path".padEnd(n)}${"Status".padEnd(r)}`)),console.log(o.gray(` ${"\u2500".repeat(t+n+r)}`));for(let l of p){let f=u[l],{configExists:c,rulesExists:a}=x(e,f),i=c&&a?o.green("configured"):c||a?o.yellow("partial"):o.gray("not configured");console.log(` ${o.white(f.name.padEnd(t))}${o.gray(f.configPath.padEnd(n))}${i}`)}console.log(""),console.log(o.gray(' Use "aqe platform setup <name>" to configure a platform')),console.log(o.gray(' Use "aqe init --with-all-platforms" to configure all at once')),console.log("")}),s.command("setup <name>").description("Set up a specific platform configuration").option("--overwrite","Overwrite existing configuration files").action(async(e,t)=>{let n=process.cwd();h(e)||(console.log(""),console.log(o.red(` Unknown platform: ${e}`)),console.log(o.gray(` Valid platforms: ${p.join(", ")}`)),console.log(""),process.exit(1));let r=u[e];console.log(""),console.log(o.bold.blue(` Setting up ${r.name}`)),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");try{let l=await C(`../../init/${e}-installer.js`),c=[`create${e.charAt(0).toUpperCase()}${e.slice(1).replace(/([a-z])([A-Z])/g,"$1$2")}Installer`,`create${R(e)}Installer`],a;for(let i of c)if(typeof l[i]=="function"){a=l[i];break}if(!a){for(let i of Object.keys(l))if(i.startsWith("create")&&i.endsWith("Installer")&&typeof l[i]=="function"){a=l[i];break}}a||(console.log(o.red(` Could not find installer factory for ${e}`)),process.exit(1));let g=await a({projectRoot:n,overwrite:t.overwrite}).install();if(g.success)console.log(o.green(` ${r.name} configured successfully`)),g.mcpConfigured&&console.log(o.gray(` MCP config: ${r.configPath}`)),g.rulesInstalled&&console.log(o.gray(` Rules: ${r.rulesPath}`));else if(console.log(o.red(` ${r.name} setup failed`)),g.errors)for(let i of g.errors)console.log(o.red(` ${i}`))}catch(l){console.log(o.red(` Failed to set up ${r.name}: ${y(l)}`))}console.log("")}),s.command("verify <name>").description("Verify a platform configuration is correct").action(async e=>{let t=process.cwd();h(e)||(console.log(""),console.log(o.red(` Unknown platform: ${e}`)),console.log(o.gray(` Valid platforms: ${p.join(", ")}`)),console.log(""),process.exit(1));let n=u[e];console.log(""),console.log(o.bold.blue(` Verifying ${n.name}`)),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");let r=!0,l=m.join(t,n.configPath);if(d(l)?console.log(o.green(` [pass] Config file exists: ${n.configPath}`)):(console.log(o.red(` [fail] Config file missing: ${n.configPath}`)),r=!1),d(l)){let c=E(l,n.configFormat);c.valid?console.log(o.green(` [pass] Config file is valid ${n.configFormat.toUpperCase()}`)):(console.log(o.red(` [fail] Config file is invalid: ${c.error}`)),r=!1),I(l,n)?console.log(o.green(" [pass] Config contains agentic-qe entry")):(console.log(o.red(" [fail] Config does not contain agentic-qe entry")),r=!1)}let f=m.join(t,n.rulesPath);d(f)?console.log(o.green(` [pass] Rules file exists: ${n.rulesPath}`)):(console.log(o.red(` [fail] Rules file missing: ${n.rulesPath}`)),r=!1),console.log(""),r?console.log(o.green(` ${n.name} configuration is valid`)):(console.log(o.yellow(` ${n.name} configuration has issues`)),console.log(o.gray(` Run "aqe platform setup ${e}" to fix`))),console.log("")}),s}function R(s){return s.charAt(0).toUpperCase()+s.slice(1)}var V=j;export{j as createPlatformCommand,V as default};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import{a as u}from"./chunk-AOYN6XYJ.js";import{a as y,c as w}from"./chunk-UIYK4Y7K.js";import{b as $}from"./chunk-DGUAAG3T.js";import{Command as v}from"commander";import o from"chalk";import{existsSync as d,readFileSync as P}from"node:fs";import m from"node:path";w();var C=$({});var p=Object.keys(u);function h(s){return p.includes(s)}function x(s,e){let t=m.join(s,e.configPath),n=m.join(s,e.rulesPath);return{configExists:d(t),rulesExists:d(n)}}function E(s,e){try{let t=P(s,"utf-8");return e==="json"?{valid:!0,data:JSON.parse(t)}:e==="toml"?t.trim().length===0?{valid:!1,error:"File is empty"}:{valid:!0}:e==="yaml"?t.trim().length===0?{valid:!1,error:"File is empty"}:{valid:!0}:{valid:!0}}catch(t){return{valid:!1,error:y(t)}}}function I(s,e){try{return P(s,"utf-8").includes("agentic-qe")}catch{return!1}}function j(){let s=new v("platform").description("Manage coding agent platform configurations");return s.command("list").description("List all supported platforms and their configuration status").action(async()=>{let e=process.cwd();console.log(""),console.log(o.bold.blue(" Supported Platforms")),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");let t=18,n=36,r=14;console.log(o.gray(` ${"Platform".padEnd(t)}${"Config Path".padEnd(n)}${"Status".padEnd(r)}`)),console.log(o.gray(` ${"\u2500".repeat(t+n+r)}`));for(let l of p){let f=u[l],{configExists:c,rulesExists:a}=x(e,f),i=c&&a?o.green("configured"):c||a?o.yellow("partial"):o.gray("not configured");console.log(` ${o.white(f.name.padEnd(t))}${o.gray(f.configPath.padEnd(n))}${i}`)}console.log(""),console.log(o.gray(' Use "aqe platform setup <name>" to configure a platform')),console.log(o.gray(' Use "aqe init --with-all-platforms" to configure all at once')),console.log("")}),s.command("setup <name>").description("Set up a specific platform configuration").option("--overwrite","Overwrite existing configuration files").action(async(e,t)=>{let n=process.cwd();h(e)||(console.log(""),console.log(o.red(` Unknown platform: ${e}`)),console.log(o.gray(` Valid platforms: ${p.join(", ")}`)),console.log(""),process.exit(1));let r=u[e];console.log(""),console.log(o.bold.blue(` Setting up ${r.name}`)),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");try{let l=await C(`../../init/${e}-installer.js`),c=[`create${e.charAt(0).toUpperCase()}${e.slice(1).replace(/([a-z])([A-Z])/g,"$1$2")}Installer`,`create${R(e)}Installer`],a;for(let i of c)if(typeof l[i]=="function"){a=l[i];break}if(!a){for(let i of Object.keys(l))if(i.startsWith("create")&&i.endsWith("Installer")&&typeof l[i]=="function"){a=l[i];break}}a||(console.log(o.red(` Could not find installer factory for ${e}`)),process.exit(1));let g=await a({projectRoot:n,overwrite:t.overwrite}).install();if(g.success)console.log(o.green(` ${r.name} configured successfully`)),g.mcpConfigured&&console.log(o.gray(` MCP config: ${r.configPath}`)),g.rulesInstalled&&console.log(o.gray(` Rules: ${r.rulesPath}`));else if(console.log(o.red(` ${r.name} setup failed`)),g.errors)for(let i of g.errors)console.log(o.red(` ${i}`))}catch(l){console.log(o.red(` Failed to set up ${r.name}: ${y(l)}`))}console.log("")}),s.command("verify <name>").description("Verify a platform configuration is correct").action(async e=>{let t=process.cwd();h(e)||(console.log(""),console.log(o.red(` Unknown platform: ${e}`)),console.log(o.gray(` Valid platforms: ${p.join(", ")}`)),console.log(""),process.exit(1));let n=u[e];console.log(""),console.log(o.bold.blue(` Verifying ${n.name}`)),console.log(o.gray(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500")),console.log("");let r=!0,l=m.join(t,n.configPath);if(d(l)?console.log(o.green(` [pass] Config file exists: ${n.configPath}`)):(console.log(o.red(` [fail] Config file missing: ${n.configPath}`)),r=!1),d(l)){let c=E(l,n.configFormat);c.valid?console.log(o.green(` [pass] Config file is valid ${n.configFormat.toUpperCase()}`)):(console.log(o.red(` [fail] Config file is invalid: ${c.error}`)),r=!1),I(l,n)?console.log(o.green(" [pass] Config contains agentic-qe entry")):(console.log(o.red(" [fail] Config does not contain agentic-qe entry")),r=!1)}let f=m.join(t,n.rulesPath);d(f)?console.log(o.green(` [pass] Rules file exists: ${n.rulesPath}`)):(console.log(o.red(` [fail] Rules file missing: ${n.rulesPath}`)),r=!1),console.log(""),r?console.log(o.green(` ${n.name} configuration is valid`)):(console.log(o.yellow(` ${n.name} configuration has issues`)),console.log(o.gray(` Run "aqe platform setup ${e}" to fix`))),console.log("")}),s}function R(s){return s.charAt(0).toUpperCase()+s.slice(1)}var V=j;export{j as createPlatformCommand,V as default};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.12");process.exit(0)}
2
- import{a as p,b as d,c as h}from"./chunk-LURKOKOG.js";import"./chunk-FT3BXL44.js";import{Command as _}from"commander";import*as g from"path";import{execFileSync as v}from"child_process";var $=/^[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$/,w=/^[a-zA-Z0-9._\-/]+$/;function E(i,n){if(!$.test(i))throw new Error(`Invalid GitHub repo "${i}": must be owner/repo with alphanumeric, dots, hyphens, underscores only`);if(n&&!w.test(n))throw new Error(`Invalid tag "${n}": must be alphanumeric with dots, hyphens, underscores, slashes only`)}var u=class{type="github";cacheDir;constructor(n){this.cacheDir=n??g.join(process.cwd(),".agentic-qe","plugins-cache")}async resolve(n){let e=await this.getPluginPath(n),t=g.join(e,"qe-plugin.json"),o=await import("fs");if(!o.existsSync(t))throw new Error(`No qe-plugin.json found in ${n}`);let r=o.readFileSync(t,"utf-8");return p(r)}async getPluginPath(n){let{repo:e,tag:t}=this.parseLocation(n);E(e,t);let o=g.join(this.cacheDir,e.replace("/","__"),t||"latest"),r=await import("fs");if(r.existsSync(o))return o;r.mkdirSync(o,{recursive:!0});try{let a=`https://github.com/${e}.git`,c=["clone","--depth","1"];t&&c.push("--branch",t),c.push(a,o),v("git",c,{stdio:"pipe",timeout:6e4})}catch(a){throw r.rmSync(o,{recursive:!0,force:!0}),new Error(`Failed to clone ${e}: ${a instanceof Error?a.message:String(a)}`)}return o}parseLocation(n){let[e,t]=n.split("@");if(!e||!e.includes("/"))throw new Error(`Invalid GitHub location "${n}". Expected "owner/repo" or "owner/repo@tag"`);return{repo:e,tag:t}}};import*as l from"path";import*as s from"fs";import{execFileSync as y}from"child_process";var P=/^(@[a-zA-Z0-9._-]+\/)?[a-zA-Z0-9._-]+$/,S=/^[a-zA-Z0-9._\-+]+$/;function x(i,n){if(!P.test(i))throw new Error(`Invalid npm package name "${i}": contains unsafe characters`);if(n&&!S.test(n))throw new Error(`Invalid version "${n}": contains unsafe characters`)}var m=class{type="npm";cacheDir;constructor(n){this.cacheDir=n??l.join(process.cwd(),".agentic-qe","plugins-cache","npm")}async resolve(n){let e=await this.getPluginPath(n),t=l.join(e,"qe-plugin.json");if(!s.existsSync(t))throw new Error(`No qe-plugin.json found in npm package ${n}`);let o=s.readFileSync(t,"utf-8");return p(o)}async getPluginPath(n){let{name:e,version:t}=this.parseLocation(n);x(e,t);let o=e.replace(/\//g,"__"),r=l.join(this.cacheDir,`${o}@${t||"latest"}`);if(s.existsSync(r)&&s.readdirSync(r).length>0)return r;s.mkdirSync(r,{recursive:!0});try{let a=t?`${e}@${t}`:e,c=y("npm",["pack",a,"--pack-destination",r],{stdio:"pipe",timeout:6e4}).toString().trim(),f=l.join(r,c);y("tar",["-xzf",f,"-C",r,"--strip-components=1"],{stdio:"pipe"}),s.existsSync(f)&&s.unlinkSync(f)}catch(a){throw s.rmSync(r,{recursive:!0,force:!0}),new Error(`Failed to fetch npm package ${n}: ${a instanceof Error?a.message:String(a)}`)}return r}parseLocation(n){let e=n.lastIndexOf("@");return e>0?{name:n.slice(0,e),version:n.slice(e+1)||void 0}:{name:n}}};function N(){let i=I(),n=new _("plugin").description("Manage external QE domain plugins").addHelpText("after",`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import{a as p,b as d,c as h}from"./chunk-JWR3NNFA.js";import"./chunk-DGUAAG3T.js";import{Command as _}from"commander";import*as g from"path";import{execFileSync as v}from"child_process";var $=/^[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$/,w=/^[a-zA-Z0-9._\-/]+$/;function E(i,n){if(!$.test(i))throw new Error(`Invalid GitHub repo "${i}": must be owner/repo with alphanumeric, dots, hyphens, underscores only`);if(n&&!w.test(n))throw new Error(`Invalid tag "${n}": must be alphanumeric with dots, hyphens, underscores, slashes only`)}var u=class{type="github";cacheDir;constructor(n){this.cacheDir=n??g.join(process.cwd(),".agentic-qe","plugins-cache")}async resolve(n){let e=await this.getPluginPath(n),t=g.join(e,"qe-plugin.json"),o=await import("fs");if(!o.existsSync(t))throw new Error(`No qe-plugin.json found in ${n}`);let r=o.readFileSync(t,"utf-8");return p(r)}async getPluginPath(n){let{repo:e,tag:t}=this.parseLocation(n);E(e,t);let o=g.join(this.cacheDir,e.replace("/","__"),t||"latest"),r=await import("fs");if(r.existsSync(o))return o;r.mkdirSync(o,{recursive:!0});try{let a=`https://github.com/${e}.git`,c=["clone","--depth","1"];t&&c.push("--branch",t),c.push(a,o),v("git",c,{stdio:"pipe",timeout:6e4})}catch(a){throw r.rmSync(o,{recursive:!0,force:!0}),new Error(`Failed to clone ${e}: ${a instanceof Error?a.message:String(a)}`)}return o}parseLocation(n){let[e,t]=n.split("@");if(!e||!e.includes("/"))throw new Error(`Invalid GitHub location "${n}". Expected "owner/repo" or "owner/repo@tag"`);return{repo:e,tag:t}}};import*as l from"path";import*as s from"fs";import{execFileSync as y}from"child_process";var P=/^(@[a-zA-Z0-9._-]+\/)?[a-zA-Z0-9._-]+$/,S=/^[a-zA-Z0-9._\-+]+$/;function x(i,n){if(!P.test(i))throw new Error(`Invalid npm package name "${i}": contains unsafe characters`);if(n&&!S.test(n))throw new Error(`Invalid version "${n}": contains unsafe characters`)}var m=class{type="npm";cacheDir;constructor(n){this.cacheDir=n??l.join(process.cwd(),".agentic-qe","plugins-cache","npm")}async resolve(n){let e=await this.getPluginPath(n),t=l.join(e,"qe-plugin.json");if(!s.existsSync(t))throw new Error(`No qe-plugin.json found in npm package ${n}`);let o=s.readFileSync(t,"utf-8");return p(o)}async getPluginPath(n){let{name:e,version:t}=this.parseLocation(n);x(e,t);let o=e.replace(/\//g,"__"),r=l.join(this.cacheDir,`${o}@${t||"latest"}`);if(s.existsSync(r)&&s.readdirSync(r).length>0)return r;s.mkdirSync(r,{recursive:!0});try{let a=t?`${e}@${t}`:e,c=y("npm",["pack",a,"--pack-destination",r],{stdio:"pipe",timeout:6e4}).toString().trim(),f=l.join(r,c);y("tar",["-xzf",f,"-C",r,"--strip-components=1"],{stdio:"pipe"}),s.existsSync(f)&&s.unlinkSync(f)}catch(a){throw s.rmSync(r,{recursive:!0,force:!0}),new Error(`Failed to fetch npm package ${n}: ${a instanceof Error?a.message:String(a)}`)}return r}parseLocation(n){let e=n.lastIndexOf("@");return e>0?{name:n.slice(0,e),version:n.slice(e+1)||void 0}:{name:n}}};function N(){let i=I(),n=new _("plugin").description("Manage external QE domain plugins").addHelpText("after",`
3
3
  Examples:
4
4
  aqe plugin install ./my-plugin Install from local directory
5
5
  aqe plugin install owner/repo --source github Install from GitHub
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.12");process.exit(0)}
2
- import"./chunk-FT3BXL44.js";import{createRequire as t}from"module";var n=t(import.meta.url),e=n("prime-radiant-advanced-wasm"),r=e,{RuvectorLayer:i,TensorCompress:a,differentiableSearch:c,hierarchicalForward:p,getCompressionLevel:s,init:d,FlashAttention:l,DotProductAttention:m,MultiHeadAttention:u,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:v}=e||{};export{m as DotProductAttention,l as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,u as MultiHeadAttention,i as RuvectorLayer,_ as SonaEngine,a as TensorCompress,r as default,c as differentiableSearch,s as getCompressionLevel,p as hierarchicalForward,d as init,v as pipeline};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import"./chunk-DGUAAG3T.js";import{createRequire as t}from"module";var n=t(import.meta.url),e=n("prime-radiant-advanced-wasm"),r=e,{RuvectorLayer:i,TensorCompress:a,differentiableSearch:c,hierarchicalForward:p,getCompressionLevel:s,init:d,FlashAttention:l,DotProductAttention:m,MultiHeadAttention:u,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:v}=e||{};export{m as DotProductAttention,l as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,u as MultiHeadAttention,i as RuvectorLayer,_ as SonaEngine,a as TensorCompress,r as default,c as differentiableSearch,s as getCompressionLevel,p as hierarchicalForward,d as init,v as pipeline};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import{a,b}from"./chunk-YPMBD44A.js";import"./chunk-5DWTU2PN.js";import"./chunk-36YZ2UF7.js";import"./chunk-PZF5ISGS.js";import"./chunk-UIYK4Y7K.js";import"./chunk-G7L5Y47C.js";import"./chunk-DGUAAG3T.js";export{a as DefaultProtocolExecutor,b as createProtocolExecutor};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.12");process.exit(0)}
2
- import"./chunk-FE2R7DOJ.js";import{c as i}from"./chunk-WEMOVPQS.js";import"./chunk-FT3BXL44.js";import n from"chalk";var a=class{name="protocol";description="Execute coordination protocols";cleanupAndExit;ensureInitialized;constructor(o,e){this.cleanupAndExit=o,this.ensureInitialized=e}register(o,e){o.command("protocol").description(this.description).command("run <protocolId>").description("Execute a protocol").option("--params <json>","Protocol parameters as JSON","{}").action(async(r,t)=>{await this.executeRun(r,t,e)})}async executeRun(o,e,c){if(await this.ensureInitialized())try{let r=i(e.params,"params");console.log(n.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import"./chunk-I5U64MHU.js";import{c as i}from"./chunk-DMZ2XOEW.js";import"./chunk-DGUAAG3T.js";import n from"chalk";var a=class{name="protocol";description="Execute coordination protocols";cleanupAndExit;ensureInitialized;constructor(o,e){this.cleanupAndExit=o,this.ensureInitialized=e}register(o,e){o.command("protocol").description(this.description).command("run <protocolId>").description("Execute a protocol").option("--params <json>","Protocol parameters as JSON","{}").action(async(r,t)=>{await this.executeRun(r,t,e)})}async executeRun(o,e,c){if(await this.ensureInitialized())try{let r=i(e.params,"params");console.log(n.blue(`
3
3
  Executing protocol: ${o}
4
4
  `));let t=await c.queen.executeProtocol(o,r);t.success?(console.log(n.green(" Protocol execution started")),console.log(n.cyan(` Execution ID: ${t.value}`))):console.log(n.red(` Failed to execute protocol: ${t.error.message}`)),console.log("")}catch(r){console.error(n.red(`
5
5
  Failed to execute protocol:`),r),await this.cleanupAndExit(1)}}getHelp(){return`
@@ -1,3 +1,3 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.12");process.exit(0)}
2
- import"./chunk-FT3BXL44.js";import{Command as l}from"commander";import*as c from"crypto";import*as n from"fs";import*as r from"path";function m(t){let e=JSON.stringify(t,null,0);return c.createHash("sha256").update(e).digest("hex")}async function d(t){let e={testCount:0,passRate:0,coveragePercent:0,vulnerabilities:0,qualityScore:0,patternsUsed:0};try{let a=r.join(t,"junit.xml");if(n.existsSync(a)){let o=n.readFileSync(a,"utf-8"),s=o.match(/tests="(\d+)"/),i=o.match(/failures="(\d+)"/);if(s){e.testCount=parseInt(s[1],10);let u=i?parseInt(i[1],10):0;e.passRate=e.testCount>0?(e.testCount-u)/e.testCount*100:0}}}catch{}try{let a=r.join(t,"coverage","coverage-summary.json");if(n.existsSync(a)){let o=JSON.parse(n.readFileSync(a,"utf-8"));e.coveragePercent=o?.total?.lines?.pct??0}}catch{}try{let a=r.join(t,".agentic-qe","memory.db");n.existsSync(a)&&(e.patternsUsed=1)}catch{}return e.qualityScore=Math.round(e.passRate*.4+e.coveragePercent*.3+(e.vulnerabilities===0?100:Math.max(0,100-e.vulnerabilities*10))*.3),e}function y(t,e){let a={version:"1.0.0",timestamp:new Date().toISOString(),projectRoot:t,attestation:{testsExecuted:e.testCount>0,coverageChecked:e.coveragePercent>0,securityScanned:e.vulnerabilities===0,qualityGatePassed:e.qualityScore>=70},metrics:e,generatedBy:"agentic-qe prove"},o=m(a);return{...a,hash:o}}function f(t){return["# Proof of Quality","",`**Generated:** ${t.timestamp}`,`**Project:** ${t.projectRoot}`,`**Hash:** \`${t.hash}\``,"","## Attestation","","| Check | Status |","|-------|--------|",`| Tests Executed | ${t.attestation.testsExecuted?"PASS":"FAIL"} |`,`| Coverage Checked | ${t.attestation.coverageChecked?"PASS":"FAIL"} |`,`| Security Scanned | ${t.attestation.securityScanned?"PASS":"FAIL"} |`,`| Quality Gate | ${t.attestation.qualityGatePassed?"PASSED":"FAILED"} |`,"","## Metrics","","| Metric | Value |","|--------|-------|",`| Tests | ${t.metrics.testCount} |`,`| Pass Rate | ${t.metrics.passRate.toFixed(1)}% |`,`| Coverage | ${t.metrics.coveragePercent.toFixed(1)}% |`,`| Vulnerabilities | ${t.metrics.vulnerabilities} |`,`| Quality Score | ${t.metrics.qualityScore}/100 |`,"","---",`*${t.generatedBy}*`].join(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.14");process.exit(0)}
2
+ import"./chunk-DGUAAG3T.js";import{Command as l}from"commander";import*as c from"crypto";import*as n from"fs";import*as r from"path";function m(t){let e=JSON.stringify(t,null,0);return c.createHash("sha256").update(e).digest("hex")}async function d(t){let e={testCount:0,passRate:0,coveragePercent:0,vulnerabilities:0,qualityScore:0,patternsUsed:0};try{let a=r.join(t,"junit.xml");if(n.existsSync(a)){let o=n.readFileSync(a,"utf-8"),s=o.match(/tests="(\d+)"/),i=o.match(/failures="(\d+)"/);if(s){e.testCount=parseInt(s[1],10);let u=i?parseInt(i[1],10):0;e.passRate=e.testCount>0?(e.testCount-u)/e.testCount*100:0}}}catch{}try{let a=r.join(t,"coverage","coverage-summary.json");if(n.existsSync(a)){let o=JSON.parse(n.readFileSync(a,"utf-8"));e.coveragePercent=o?.total?.lines?.pct??0}}catch{}try{let a=r.join(t,".agentic-qe","memory.db");n.existsSync(a)&&(e.patternsUsed=1)}catch{}return e.qualityScore=Math.round(e.passRate*.4+e.coveragePercent*.3+(e.vulnerabilities===0?100:Math.max(0,100-e.vulnerabilities*10))*.3),e}function y(t,e){let a={version:"1.0.0",timestamp:new Date().toISOString(),projectRoot:t,attestation:{testsExecuted:e.testCount>0,coverageChecked:e.coveragePercent>0,securityScanned:e.vulnerabilities===0,qualityGatePassed:e.qualityScore>=70},metrics:e,generatedBy:"agentic-qe prove"},o=m(a);return{...a,hash:o}}function f(t){return["# Proof of Quality","",`**Generated:** ${t.timestamp}`,`**Project:** ${t.projectRoot}`,`**Hash:** \`${t.hash}\``,"","## Attestation","","| Check | Status |","|-------|--------|",`| Tests Executed | ${t.attestation.testsExecuted?"PASS":"FAIL"} |`,`| Coverage Checked | ${t.attestation.coverageChecked?"PASS":"FAIL"} |`,`| Security Scanned | ${t.attestation.securityScanned?"PASS":"FAIL"} |`,`| Quality Gate | ${t.attestation.qualityGatePassed?"PASSED":"FAILED"} |`,"","## Metrics","","| Metric | Value |","|--------|-------|",`| Tests | ${t.metrics.testCount} |`,`| Pass Rate | ${t.metrics.passRate.toFixed(1)}% |`,`| Coverage | ${t.metrics.coveragePercent.toFixed(1)}% |`,`| Vulnerabilities | ${t.metrics.vulnerabilities} |`,`| Quality Score | ${t.metrics.qualityScore}/100 |`,"","---",`*${t.generatedBy}*`].join(`
3
3
  `)}async function p(t){let e=t.projectRoot??process.cwd(),a=await d(e),o=y(e,a),s=t.format==="markdown"?f(o):JSON.stringify(o,null,2);return t.output?(n.writeFileSync(t.output,s),console.log(`Quality attestation written to ${t.output}`)):console.log(s),o}function g(t,e,a){return new l("prove").description("Generate a verifiable Proof-of-Quality attestation").option("-F, --format <format>","Output format (json|markdown)","json").option("-o, --output <path>","Write attestation to file").action(async o=>{try{await p({format:o.format,output:o.output}),await e(0)}catch(s){console.error("Failed to generate proof-of-quality:",s),await e(1)}})}export{y as buildAttestation,d as collectMetrics,g as createProveCommand,f as formatMarkdown,p as handleProve,m as hashAttestation};