agentic-qe 3.10.4 → 3.10.6

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 (469) hide show
  1. package/.claude/agents/v3/qe-accessibility-auditor.md +8 -0
  2. package/.claude/agents/v3/qe-bdd-generator.md +8 -0
  3. package/.claude/agents/v3/qe-chaos-engineer.md +8 -0
  4. package/.claude/agents/v3/qe-code-complexity.md +8 -0
  5. package/.claude/agents/v3/qe-code-intelligence.md +8 -0
  6. package/.claude/agents/v3/qe-contract-validator.md +8 -0
  7. package/.claude/agents/v3/qe-coverage-specialist.md +8 -0
  8. package/.claude/agents/v3/qe-defect-predictor.md +8 -0
  9. package/.claude/agents/v3/qe-dependency-mapper.md +8 -0
  10. package/.claude/agents/v3/qe-deployment-advisor.md +8 -0
  11. package/.claude/agents/v3/qe-devils-advocate.md +8 -0
  12. package/.claude/agents/v3/qe-flaky-hunter.md +8 -0
  13. package/.claude/agents/v3/qe-fleet-commander.md +8 -0
  14. package/.claude/agents/v3/qe-gap-detector.md +8 -0
  15. package/.claude/agents/v3/qe-graphql-tester.md +8 -0
  16. package/.claude/agents/v3/qe-impact-analyzer.md +8 -0
  17. package/.claude/agents/v3/qe-integration-tester.md +8 -0
  18. package/.claude/agents/v3/qe-kg-builder.md +8 -0
  19. package/.claude/agents/v3/qe-learning-coordinator.md +8 -0
  20. package/.claude/agents/v3/qe-load-tester.md +8 -0
  21. package/.claude/agents/v3/qe-message-broker-tester.md +8 -0
  22. package/.claude/agents/v3/qe-metrics-optimizer.md +8 -0
  23. package/.claude/agents/v3/qe-middleware-validator.md +8 -0
  24. package/.claude/agents/v3/qe-mutation-tester.md +8 -0
  25. package/.claude/agents/v3/qe-odata-contract-tester.md +8 -0
  26. package/.claude/agents/v3/qe-parallel-executor.md +8 -0
  27. package/.claude/agents/v3/qe-pattern-learner.md +8 -0
  28. package/.claude/agents/v3/qe-pentest-validator.md +8 -0
  29. package/.claude/agents/v3/qe-performance-tester.md +8 -0
  30. package/.claude/agents/v3/qe-product-factors-assessor.md +8 -0
  31. package/.claude/agents/v3/qe-property-tester.md +8 -0
  32. package/.claude/agents/v3/qe-quality-criteria-recommender.md +8 -0
  33. package/.claude/agents/v3/qe-quality-gate.md +8 -0
  34. package/.claude/agents/v3/qe-qx-partner.md +8 -0
  35. package/.claude/agents/v3/qe-regression-analyzer.md +8 -0
  36. package/.claude/agents/v3/qe-requirements-validator.md +8 -0
  37. package/.claude/agents/v3/qe-responsive-tester.md +8 -0
  38. package/.claude/agents/v3/qe-retry-handler.md +8 -0
  39. package/.claude/agents/v3/qe-risk-assessor.md +8 -0
  40. package/.claude/agents/v3/qe-root-cause-analyzer.md +8 -0
  41. package/.claude/agents/v3/qe-sap-idoc-tester.md +8 -0
  42. package/.claude/agents/v3/qe-sap-rfc-tester.md +8 -0
  43. package/.claude/agents/v3/qe-security-auditor.md +8 -0
  44. package/.claude/agents/v3/qe-security-scanner.md +8 -0
  45. package/.claude/agents/v3/qe-soap-tester.md +8 -0
  46. package/.claude/agents/v3/qe-sod-analyzer.md +8 -0
  47. package/.claude/agents/v3/qe-tdd-specialist.md +8 -0
  48. package/.claude/agents/v3/qe-test-architect.md +8 -0
  49. package/.claude/agents/v3/qe-test-idea-rewriter.md +8 -0
  50. package/.claude/agents/v3/qe-transfer-specialist.md +8 -0
  51. package/.claude/agents/v3/qe-visual-tester.md +8 -0
  52. package/.claude/skills/qcsd-development-swarm/SKILL.md +27 -6
  53. package/.claude/skills/skills-manifest.json +1 -1
  54. package/CHANGELOG.md +9012 -8863
  55. package/assets/agents/v3/qe-accessibility-auditor.md +8 -0
  56. package/assets/agents/v3/qe-bdd-generator.md +8 -0
  57. package/assets/agents/v3/qe-chaos-engineer.md +8 -0
  58. package/assets/agents/v3/qe-code-complexity.md +8 -0
  59. package/assets/agents/v3/qe-code-intelligence.md +8 -0
  60. package/assets/agents/v3/qe-contract-validator.md +8 -0
  61. package/assets/agents/v3/qe-coverage-specialist.md +8 -0
  62. package/assets/agents/v3/qe-defect-predictor.md +8 -0
  63. package/assets/agents/v3/qe-dependency-mapper.md +8 -0
  64. package/assets/agents/v3/qe-deployment-advisor.md +8 -0
  65. package/assets/agents/v3/qe-devils-advocate.md +8 -0
  66. package/assets/agents/v3/qe-flaky-hunter.md +8 -0
  67. package/assets/agents/v3/qe-fleet-commander.md +8 -0
  68. package/assets/agents/v3/qe-gap-detector.md +8 -0
  69. package/assets/agents/v3/qe-graphql-tester.md +8 -0
  70. package/assets/agents/v3/qe-impact-analyzer.md +8 -0
  71. package/assets/agents/v3/qe-integration-tester.md +8 -0
  72. package/assets/agents/v3/qe-kg-builder.md +8 -0
  73. package/assets/agents/v3/qe-learning-coordinator.md +8 -0
  74. package/assets/agents/v3/qe-load-tester.md +8 -0
  75. package/assets/agents/v3/qe-message-broker-tester.md +8 -0
  76. package/assets/agents/v3/qe-metrics-optimizer.md +8 -0
  77. package/assets/agents/v3/qe-middleware-validator.md +8 -0
  78. package/assets/agents/v3/qe-mutation-tester.md +8 -0
  79. package/assets/agents/v3/qe-odata-contract-tester.md +8 -0
  80. package/assets/agents/v3/qe-parallel-executor.md +8 -0
  81. package/assets/agents/v3/qe-pattern-learner.md +8 -0
  82. package/assets/agents/v3/qe-pentest-validator.md +8 -0
  83. package/assets/agents/v3/qe-performance-tester.md +8 -0
  84. package/assets/agents/v3/qe-product-factors-assessor.md +8 -0
  85. package/assets/agents/v3/qe-property-tester.md +8 -0
  86. package/assets/agents/v3/qe-quality-criteria-recommender.md +8 -0
  87. package/assets/agents/v3/qe-quality-gate.md +8 -0
  88. package/assets/agents/v3/qe-qx-partner.md +8 -0
  89. package/assets/agents/v3/qe-regression-analyzer.md +8 -0
  90. package/assets/agents/v3/qe-requirements-validator.md +8 -0
  91. package/assets/agents/v3/qe-responsive-tester.md +8 -0
  92. package/assets/agents/v3/qe-retry-handler.md +8 -0
  93. package/assets/agents/v3/qe-risk-assessor.md +8 -0
  94. package/assets/agents/v3/qe-root-cause-analyzer.md +8 -0
  95. package/assets/agents/v3/qe-sap-idoc-tester.md +8 -0
  96. package/assets/agents/v3/qe-sap-rfc-tester.md +8 -0
  97. package/assets/agents/v3/qe-security-auditor.md +8 -0
  98. package/assets/agents/v3/qe-security-scanner.md +8 -0
  99. package/assets/agents/v3/qe-soap-tester.md +8 -0
  100. package/assets/agents/v3/qe-sod-analyzer.md +8 -0
  101. package/assets/agents/v3/qe-tdd-specialist.md +8 -0
  102. package/assets/agents/v3/qe-test-architect.md +8 -0
  103. package/assets/agents/v3/qe-test-idea-rewriter.md +8 -0
  104. package/assets/agents/v3/qe-transfer-specialist.md +8 -0
  105. package/assets/agents/v3/qe-visual-tester.md +8 -0
  106. package/dist/arena/arena.d.ts +68 -0
  107. package/dist/arena/arena.js +169 -0
  108. package/dist/arena/mutator.d.ts +23 -0
  109. package/dist/arena/mutator.js +112 -0
  110. package/dist/arena/rng.d.ts +15 -0
  111. package/dist/arena/rng.js +34 -0
  112. package/dist/arena/runner.d.ts +44 -0
  113. package/dist/arena/runner.js +79 -0
  114. package/dist/cli/bundle.js +7 -7
  115. package/dist/cli/chunks/adapter-AMIHQ243.js +2 -0
  116. package/dist/cli/chunks/{agent-booster-wasm-EJPDSWON.js → agent-booster-wasm-J5CITTTV.js} +2 -2
  117. package/dist/cli/chunks/{agent-handler-2DZB7LGI.js → agent-handler-HMN4ZBZ6.js} +2 -2
  118. package/dist/cli/chunks/{agent-memory-branch-SSFYAVIK.js → agent-memory-branch-SCAKN4DU.js} +2 -2
  119. package/dist/cli/chunks/aqe-learning-engine-LRG2UG6P.js +2 -0
  120. package/dist/cli/chunks/arena-CJOLCHZW.js +18 -0
  121. package/dist/cli/chunks/arena-FVBTSGKS.js +4 -0
  122. package/dist/cli/chunks/audit-SOF6L5RY.js +3 -0
  123. package/dist/cli/chunks/base-WDL3FANJ.js +2 -0
  124. package/dist/cli/chunks/{hnswlib-node-3TZFES5I.js → better-sqlite3-5G7LRX7Q.js} +2 -2
  125. package/dist/cli/chunks/{brain-handler-LFHX2TYP.js → brain-handler-D2ZQQI2J.js} +3 -3
  126. package/dist/cli/chunks/{branch-enumerator-AX7DKGV7.js → branch-enumerator-QQXOCGOR.js} +2 -2
  127. package/dist/cli/chunks/{browser-4NYLZ7FA.js → browser-XASHKIEN.js} +2 -2
  128. package/dist/cli/chunks/browser-workflow-W7S4IKWD.js +2 -0
  129. package/dist/cli/chunks/{chunk-VJOPNK2L.js → chunk-2CZQA3NN.js} +2 -2
  130. package/dist/cli/chunks/{chunk-DPKECIKN.js → chunk-2I5RXDNO.js} +2 -2
  131. package/dist/cli/chunks/{chunk-M4ARHDY4.js → chunk-2IC2I525.js} +1 -1
  132. package/dist/cli/chunks/{chunk-M5DBKHM4.js → chunk-2RQSFRON.js} +2 -2
  133. package/dist/cli/chunks/{chunk-WYMQ6FZR.js → chunk-2UI5LQ7C.js} +3 -3
  134. package/dist/cli/chunks/{chunk-ISRTT4I7.js → chunk-3XUPDWMA.js} +8 -8
  135. package/dist/cli/chunks/chunk-434VUSZP.js +2 -0
  136. package/dist/cli/chunks/{chunk-SXMGNMFL.js → chunk-4B22URZJ.js} +3 -3
  137. package/dist/cli/chunks/{chunk-LHPR7ROV.js → chunk-4N4TU7ST.js} +1 -1
  138. package/dist/cli/chunks/{chunk-ND6YSW5N.js → chunk-4XEUJH2M.js} +1 -1
  139. package/dist/cli/chunks/{chunk-BEFRQOLH.js → chunk-5QTUGFFP.js} +2 -2
  140. package/dist/cli/chunks/{chunk-DAIM72HV.js → chunk-5V4IFRG5.js} +2 -2
  141. package/dist/cli/chunks/{chunk-F34OO2Q7.js → chunk-5VTRPOYL.js} +3 -3
  142. package/dist/cli/chunks/{chunk-GILL32E2.js → chunk-6DHJPKAH.js} +2 -2
  143. package/dist/cli/chunks/{chunk-YSLE6NNG.js → chunk-6RFPELCD.js} +2 -2
  144. package/dist/cli/chunks/{chunk-B6CT4ILU.js → chunk-6ZLVQTQ5.js} +4 -4
  145. package/dist/cli/chunks/{chunk-XJXCSCCP.js → chunk-7BPYFDWY.js} +1 -1
  146. package/dist/cli/chunks/{chunk-RJKYPWFD.js → chunk-7NXVVIJZ.js} +2 -2
  147. package/dist/cli/chunks/{chunk-USB7GCIC.js → chunk-7OK5H6ML.js} +1 -1
  148. package/dist/cli/chunks/{chunk-MDWJXSBA.js → chunk-7RTI5WT4.js} +2 -2
  149. package/dist/cli/chunks/{chunk-O3SG32PS.js → chunk-7SFCZ3AE.js} +1 -1
  150. package/dist/cli/chunks/{chunk-OV4BLIKJ.js → chunk-A2DCROAN.js} +2 -2
  151. package/dist/cli/chunks/{chunk-Y2EDDV5U.js → chunk-AJ2VDNPB.js} +3 -3
  152. package/dist/cli/chunks/chunk-AQPFTDGS.js +14 -0
  153. package/dist/cli/chunks/{chunk-MFWWPRBV.js → chunk-B3H2TTYT.js} +2 -2
  154. package/dist/cli/chunks/{chunk-PISW5HUX.js → chunk-BHD6THT5.js} +1 -1
  155. package/dist/cli/chunks/{chunk-5Q3L4QEE.js → chunk-BXOGLZGU.js} +2 -2
  156. package/dist/cli/chunks/{chunk-TWAWEP4X.js → chunk-C75ODWRP.js} +3 -3
  157. package/dist/cli/chunks/{chunk-AMW27FSS.js → chunk-CH7KUYGO.js} +3 -3
  158. package/dist/cli/chunks/{chunk-MHWYQHGN.js → chunk-CSM4LXTH.js} +1 -1
  159. package/dist/cli/chunks/{chunk-SC6UFGJ6.js → chunk-DAUQIXHW.js} +2 -2
  160. package/dist/cli/chunks/{chunk-NJYI7HX7.js → chunk-DF4Z7TKZ.js} +2 -2
  161. package/dist/cli/chunks/{chunk-IYFMDIYZ.js → chunk-DFBVWMX3.js} +2 -2
  162. package/dist/cli/chunks/{chunk-FQ7I4JBQ.js → chunk-EDPVATNH.js} +2 -2
  163. package/dist/cli/chunks/{chunk-STMMZXS6.js → chunk-EJWAKPZD.js} +1 -1
  164. package/dist/cli/chunks/{chunk-EGTOSQZK.js → chunk-ELC6JIXL.js} +2 -2
  165. package/dist/cli/chunks/{chunk-TBJ566KV.js → chunk-ELTN4F4R.js} +2 -2
  166. package/dist/cli/chunks/{chunk-UXJVR323.js → chunk-ESZDW6G7.js} +2 -2
  167. package/dist/cli/chunks/{chunk-XDZXLEJK.js → chunk-EYKID5HA.js} +2 -2
  168. package/dist/cli/chunks/{chunk-VRE2EBFI.js → chunk-F72A356B.js} +2 -2
  169. package/dist/cli/chunks/{chunk-AZJYDM2K.js → chunk-GWHDPEBT.js} +1 -1
  170. package/dist/cli/chunks/{chunk-L6VNEEN6.js → chunk-GXNNKM7F.js} +1 -1
  171. package/dist/cli/chunks/{chunk-NSRDP7RD.js → chunk-H4Q36ILL.js} +2 -2
  172. package/dist/cli/chunks/{chunk-2G2PVVQG.js → chunk-H6UPZFI6.js} +2 -2
  173. package/dist/cli/chunks/chunk-H73FLSBV.js +699 -0
  174. package/dist/cli/chunks/{chunk-Q53M4LI7.js → chunk-HDEFCRHI.js} +1 -1
  175. package/dist/cli/chunks/{chunk-G5FPWH5O.js → chunk-HFU3LTQX.js} +15 -15
  176. package/dist/cli/chunks/{chunk-C2446H7G.js → chunk-HMHQOEU7.js} +2 -2
  177. package/dist/cli/chunks/{chunk-IAK76TIZ.js → chunk-HWKFBRMX.js} +1 -1
  178. package/dist/cli/chunks/{chunk-7BQXEYRV.js → chunk-HZGOVRZ6.js} +2 -2
  179. package/dist/cli/chunks/{chunk-VJ2D6FST.js → chunk-I7ADT6AZ.js} +2 -2
  180. package/dist/cli/chunks/{chunk-3UGUX34A.js → chunk-IB3QQDC4.js} +1 -1
  181. package/dist/cli/chunks/{chunk-5T2HDET6.js → chunk-J2SMTP2L.js} +3 -3
  182. package/dist/cli/chunks/{chunk-4FTLYIMW.js → chunk-J3WUBGLQ.js} +2 -2
  183. package/dist/cli/chunks/{chunk-4BX72XG4.js → chunk-JADBRSQN.js} +2 -2
  184. package/dist/cli/chunks/{chunk-N4CXUGXE.js → chunk-JP2YXWJD.js} +2 -2
  185. package/dist/cli/chunks/chunk-JPL53G4V.js +20 -0
  186. package/dist/cli/chunks/{chunk-GLMDRGJD.js → chunk-JX7HZMW5.js} +1 -1
  187. package/dist/cli/chunks/{chunk-GDMH7NPV.js → chunk-JXCIRWLQ.js} +2 -2
  188. package/dist/cli/chunks/{chunk-UFKVKNAA.js → chunk-K32AUACO.js} +1 -1
  189. package/dist/cli/chunks/{chunk-XVA56PXZ.js → chunk-KQOJYO5Z.js} +4 -4
  190. package/dist/cli/chunks/{chunk-PLD4IGDL.js → chunk-KVMY2ABO.js} +2 -2
  191. package/dist/cli/chunks/{chunk-7VO5IEJ2.js → chunk-L2IMTNZF.js} +2 -2
  192. package/dist/cli/chunks/{chunk-KCXE2LZU.js → chunk-LAGNWKAD.js} +2 -2
  193. package/dist/cli/chunks/{chunk-OIFJH7TF.js → chunk-LEDF3LGZ.js} +1 -1
  194. package/dist/cli/chunks/{chunk-F6QPAVWS.js → chunk-LHA4OQ7G.js} +2 -2
  195. package/dist/cli/chunks/{chunk-EMZ3DXMG.js → chunk-LHZOIXJ6.js} +2 -2
  196. package/dist/cli/chunks/{chunk-MU4P4P4E.js → chunk-LOQMQEKN.js} +1 -1
  197. package/dist/cli/chunks/{chunk-F77X5DAF.js → chunk-LWUIK5DH.js} +2 -2
  198. package/dist/cli/chunks/{chunk-KWZEBHAP.js → chunk-M3APJ7VS.js} +2 -2
  199. package/dist/cli/chunks/{chunk-RUC3FCRK.js → chunk-M4OYZMXE.js} +2 -2
  200. package/dist/cli/chunks/{chunk-IPAQ4HVX.js → chunk-MCMVRPNG.js} +2 -2
  201. package/dist/cli/chunks/{chunk-PMWWWYUM.js → chunk-MJLDZSFB.js} +1 -1
  202. package/dist/cli/chunks/{chunk-M3MKP5VN.js → chunk-MQN3HYFX.js} +1 -1
  203. package/dist/cli/chunks/{chunk-6OLHPWSN.js → chunk-MSJGDIRP.js} +2 -2
  204. package/dist/cli/chunks/{chunk-UW3ZSFFB.js → chunk-NEIJP6TG.js} +2 -2
  205. package/dist/cli/chunks/{chunk-XBFEHVBO.js → chunk-NHC635LL.js} +2 -2
  206. package/dist/cli/chunks/{chunk-Z4BTPQLG.js → chunk-NKEGEQ3J.js} +2 -2
  207. package/dist/cli/chunks/{chunk-6SCIX2W2.js → chunk-NN35QH6X.js} +2 -2
  208. package/dist/cli/chunks/{chunk-ZM4QGYGK.js → chunk-NUCJS3Z7.js} +3 -3
  209. package/dist/cli/chunks/{chunk-WI5WXYIS.js → chunk-O2H5WYFK.js} +2 -2
  210. package/dist/cli/chunks/{chunk-2B6ETC7C.js → chunk-O4MNYX4X.js} +2 -2
  211. package/dist/cli/chunks/{chunk-JYR3X4OC.js → chunk-OBLAWVXM.js} +1 -1
  212. package/dist/cli/chunks/{chunk-K7CW2X6U.js → chunk-OU4HRUVV.js} +2 -2
  213. package/dist/cli/chunks/{chunk-E6CGBOZY.js → chunk-P7EOYGR2.js} +2 -2
  214. package/dist/cli/chunks/{chunk-KJ56OXH4.js → chunk-PFSBUTDA.js} +1 -1
  215. package/dist/cli/chunks/{chunk-PZCSJZVJ.js → chunk-PIIBVLFC.js} +2 -2
  216. package/dist/cli/chunks/{chunk-LYKSIOOT.js → chunk-PIJ5XOMM.js} +2 -2
  217. package/dist/cli/chunks/{chunk-D7IWGQTW.js → chunk-Q4LYWIEX.js} +2 -2
  218. package/dist/cli/chunks/{chunk-TCV5DASI.js → chunk-Q5432RIH.js} +2 -2
  219. package/dist/cli/chunks/{chunk-U27GVYXA.js → chunk-QJXZ4SU7.js} +2 -2
  220. package/dist/cli/chunks/{chunk-K7K4TFJM.js → chunk-QNIL3D6E.js} +1 -1
  221. package/dist/cli/chunks/{chunk-D7PI4CYZ.js → chunk-QUQA4NNZ.js} +2 -2
  222. package/dist/cli/chunks/{chunk-N244P4MM.js → chunk-QZSNYXYC.js} +2 -2
  223. package/dist/cli/chunks/{chunk-NZGLDOU4.js → chunk-RA7HEY5G.js} +17 -17
  224. package/dist/cli/chunks/{chunk-HTLAPMTK.js → chunk-RBZWUWUG.js} +1 -1
  225. package/dist/cli/chunks/{chunk-3ISX5B77.js → chunk-RH3I4Q23.js} +2 -2
  226. package/dist/cli/chunks/{chunk-M2PSXKTG.js → chunk-ROXH622K.js} +2 -2
  227. package/dist/cli/chunks/{chunk-6WF2MOQB.js → chunk-RTAGNKCV.js} +2 -2
  228. package/dist/cli/chunks/{chunk-2L5VFVCG.js → chunk-RTFFD263.js} +1 -1
  229. package/dist/cli/chunks/{chunk-PWJZZCHJ.js → chunk-S574AFAT.js} +1 -1
  230. package/dist/cli/chunks/{chunk-SZKFT6CD.js → chunk-SA5FTDRS.js} +2 -2
  231. package/dist/cli/chunks/{chunk-AIBE3J4A.js → chunk-SHVTMMJB.js} +1 -1
  232. package/dist/cli/chunks/{chunk-MQIAN57O.js → chunk-SUGQZCNI.js} +2 -2
  233. package/dist/cli/chunks/{chunk-LOFA3U4X.js → chunk-T6CUKJHS.js} +1 -1
  234. package/dist/cli/chunks/{chunk-UWAUYDW4.js → chunk-T6SCQVWH.js} +2 -2
  235. package/dist/cli/chunks/{chunk-KUFC4DBX.js → chunk-TFA5UETW.js} +1 -1
  236. package/dist/cli/chunks/{chunk-OO7KJ34Y.js → chunk-TFJDJVPC.js} +2 -2
  237. package/dist/cli/chunks/chunk-TNVOINYC.js +12 -0
  238. package/dist/cli/chunks/{chunk-N3MM4Z33.js → chunk-TUFU3BAK.js} +2 -2
  239. package/dist/cli/chunks/{chunk-SJC7OKF3.js → chunk-TWH3ZL6B.js} +2 -2
  240. package/dist/cli/chunks/{chunk-VDKMBOUK.js → chunk-ULEVKOWQ.js} +1 -1
  241. package/dist/cli/chunks/{chunk-EWI37TJA.js → chunk-ULV5K4V5.js} +1 -1
  242. package/dist/cli/chunks/{chunk-SVILIQQQ.js → chunk-UNDPB5SS.js} +1 -1
  243. package/dist/cli/chunks/{chunk-K72J52JO.js → chunk-UQYDFT6I.js} +2 -2
  244. package/dist/cli/chunks/{chunk-5T4J3IPG.js → chunk-USPBUR6P.js} +2 -2
  245. package/dist/cli/chunks/{chunk-LKK3NIHC.js → chunk-UVWOIF6P.js} +1 -1
  246. package/dist/cli/chunks/{chunk-MKZQBBCU.js → chunk-UWDC3TZP.js} +2 -2
  247. package/dist/cli/chunks/{chunk-KGPAWNNR.js → chunk-VFFIMJWT.js} +1 -1
  248. package/dist/cli/chunks/{chunk-MIQBRVK2.js → chunk-VQM2TC2V.js} +1 -1
  249. package/dist/cli/chunks/{chunk-WIYWDON4.js → chunk-WNAFMYND.js} +2 -2
  250. package/dist/cli/chunks/{chunk-FDFJJFQT.js → chunk-X3YWLJGT.js} +2 -2
  251. package/dist/cli/chunks/{chunk-GS33ZRJH.js → chunk-X5R6SUWM.js} +2 -2
  252. package/dist/cli/chunks/{chunk-V5G3SMAJ.js → chunk-XKRJQIGP.js} +2 -2
  253. package/dist/cli/chunks/{chunk-5FNNCVXR.js → chunk-XLFYVBOD.js} +1 -1
  254. package/dist/cli/chunks/chunk-XOGBTPJI.js +65 -0
  255. package/dist/cli/chunks/{chunk-ICF5RPQU.js → chunk-XOYTW6LI.js} +2 -2
  256. package/dist/cli/chunks/{chunk-MWV4KPOB.js → chunk-Z3RPA3RD.js} +2 -2
  257. package/dist/cli/chunks/{chunk-QPMAXDJ2.js → chunk-ZBSEXVEI.js} +2 -2
  258. package/dist/cli/chunks/{chunk-JRBGHWAM.js → chunk-ZMCMSDXR.js} +2 -2
  259. package/dist/cli/chunks/{chunk-MQ5WMWUK.js → chunk-ZY4G7O7Y.js} +2 -2
  260. package/dist/cli/chunks/{ci-2BLMQNX3.js → ci-COQUVZH6.js} +2 -2
  261. package/dist/cli/chunks/{ci-output-XK4PPSN7.js → ci-output-KVUHUEOT.js} +2 -2
  262. package/dist/cli/chunks/{circuit-breaker-W7X4NPFE.js → circuit-breaker-O4JNXAYH.js} +2 -2
  263. package/dist/cli/chunks/{claude-flow-setup-GLBLSYNJ.js → claude-flow-setup-J65U34NA.js} +2 -2
  264. package/dist/cli/chunks/client-VJNNIAMG.js +2 -0
  265. package/dist/cli/chunks/{cline-installer-7WX7DBGI.js → cline-installer-ZTG234Z2.js} +2 -2
  266. package/dist/cli/chunks/{code-SP3HAQWG.js → code-5GWPY4IX.js} +2 -2
  267. package/dist/cli/chunks/{code-index-extractor-44HH36UG.js → code-index-extractor-TWNKG4VS.js} +2 -2
  268. package/dist/cli/chunks/{codex-installer-LMXRWLPU.js → codex-installer-4TM4BLAE.js} +2 -2
  269. package/dist/cli/chunks/{completions-GL5FTZAN.js → completions-BBNHQXMV.js} +2 -2
  270. package/dist/cli/chunks/{complexity-analyzer-CQMYGETL.js → complexity-analyzer-2SCI2VGH.js} +2 -2
  271. package/dist/cli/chunks/{continuedev-installer-CYVYS5B7.js → continuedev-installer-CTIORASU.js} +2 -2
  272. package/dist/cli/chunks/{copilot-installer-M7XVII2A.js → copilot-installer-4R2V4IYB.js} +2 -2
  273. package/dist/cli/chunks/core-handlers-MV5CAR7O.js +2 -0
  274. package/dist/cli/chunks/{cost-tracker-S4ET4FH3.js → cost-tracker-KDBYQBKG.js} +2 -2
  275. package/dist/cli/chunks/{coverage-DFVSSQ4A.js → coverage-QQJQVDPZ.js} +3 -3
  276. package/dist/cli/chunks/cross-domain-router-ULY4NIML.js +2 -0
  277. package/dist/cli/chunks/{cursor-installer-KWDSQPQC.js → cursor-installer-5WEZCESZ.js} +2 -2
  278. package/dist/cli/chunks/{daemon-2HD54QVO.js → daemon-M4DKHEEA.js} +3 -3
  279. package/dist/cli/chunks/{daemon-CRX46BBO.js → daemon-Y7H3ZUXQ.js} +4 -4
  280. package/dist/cli/chunks/{dag-attention-scheduler-SCP6WPZB.js → dag-attention-scheduler-SD2UIADT.js} +2 -2
  281. package/dist/cli/chunks/{detect-XS2GDCEX.js → detect-WONWUXFH.js} +2 -2
  282. package/dist/cli/chunks/{dist-node-U43MVQ3F.js → dist-node-Q5GQN2R6.js} +2 -2
  283. package/dist/cli/chunks/{domain-handler-HITMDULH.js → domain-handler-EMXE2XQW.js} +2 -2
  284. package/dist/cli/chunks/{domain-transfer-TJF7DNI4.js → domain-transfer-QATUJJRP.js} +2 -2
  285. package/dist/cli/chunks/dream-PIGWXWE4.js +2 -0
  286. package/dist/cli/chunks/{embed-and-insert-pattern-JKG33YZK.js → embed-and-insert-pattern-AAFHLBEJ.js} +2 -2
  287. package/dist/cli/chunks/{eval-NF5Y4W37.js → eval-73BDNLSK.js} +5 -5
  288. package/dist/cli/chunks/{experience-capture-middleware-VMMFYJ4D.js → experience-capture-middleware-YPAPVSYY.js} +3 -3
  289. package/dist/cli/chunks/{fast-paths-W2Q53IR2.js → fast-paths-33ZKMNYY.js} +2 -2
  290. package/dist/cli/chunks/{feature-flags-B4PBMQJO.js → feature-flags-F3DVW4ST.js} +2 -2
  291. package/dist/cli/chunks/{feature-flags-PVI7A4RE.js → feature-flags-QKO5YYDU.js} +2 -2
  292. package/dist/cli/chunks/{file-discovery-E4L3I33I.js → file-discovery-YYVZLRYD.js} +2 -2
  293. package/dist/cli/chunks/{fleet-LE5SHVLK.js → fleet-EJX6BXLR.js} +3 -3
  294. package/dist/cli/chunks/{gnn-wrapper-MWWJBLOH.js → gnn-wrapper-TBNLYPTM.js} +2 -2
  295. package/dist/cli/chunks/{heartbeat-handler-XOUVNPQK.js → heartbeat-handler-HPRTS6SI.js} +4 -4
  296. package/dist/cli/chunks/heartbeat-scheduler-5BBLZP6R.js +2 -0
  297. package/dist/cli/chunks/hnsw-adapter-FMEBL5T4.js +2 -0
  298. package/dist/cli/chunks/hnsw-index-K2R24V4Z.js +2 -0
  299. package/dist/cli/chunks/{hnsw-legacy-bridge-W3T5ZDDP.js → hnsw-legacy-bridge-Z6V6TOF5.js} +2 -2
  300. package/dist/cli/chunks/{better-sqlite3-PX5JM3DG.js → hnswlib-node-LFVNGGCL.js} +2 -2
  301. package/dist/cli/chunks/hooks-GG2Z3BDB.js +285 -0
  302. package/dist/cli/chunks/hybrid-router-LVF6N345.js +2 -0
  303. package/dist/cli/chunks/{hypergraph-engine-VDFK3JYH.js → hypergraph-engine-X4Q2TTET.js} +2 -2
  304. package/dist/cli/chunks/{hypergraph-handler-EUDGEF25.js → hypergraph-handler-6BZWV5PL.js} +3 -3
  305. package/dist/cli/chunks/impact-analyzer-CCVVMGWE.js +2 -0
  306. package/dist/cli/chunks/{init-handler-MZEAJOZK.js → init-handler-EKUS7U6L.js} +6 -6
  307. package/dist/cli/chunks/init-wizard-KDPMO4G3.js +2 -0
  308. package/dist/cli/chunks/kernel-PBYNK5VA.js +2 -0
  309. package/dist/cli/chunks/{kilocode-installer-ECBYWT6M.js → kilocode-installer-BWAVVSQG.js} +2 -2
  310. package/dist/cli/chunks/{kiro-installer-KYFCSYTG.js → kiro-installer-UADO53E5.js} +2 -2
  311. package/dist/cli/chunks/knowledge-graph-C7LVHHLN.js +2 -0
  312. package/dist/cli/chunks/{learning-4RAFMDSB.js → learning-HMUTCYQM.js} +3 -3
  313. package/dist/cli/chunks/{llm-router-JHBNLYP3.js → llm-router-453TBDUY.js} +4 -4
  314. package/dist/cli/chunks/llm-router-service-LMTRJCPP.js +2 -0
  315. package/dist/cli/chunks/{load-4DVQML7P.js → load-DBBSNP6T.js} +2 -2
  316. package/dist/cli/chunks/load-test-FHMZXTXD.js +2 -0
  317. package/dist/cli/chunks/{mcp-LCWMU4GZ.js → mcp-PK3SAKRF.js} +2 -2
  318. package/dist/cli/chunks/{memory-3DTJAURT.js → memory-63NHVBXS.js} +5 -5
  319. package/dist/cli/chunks/memory-backend-UZHPCQTB.js +2 -0
  320. package/dist/cli/chunks/memory-handlers-YIKKORRY.js +2 -0
  321. package/dist/cli/chunks/{multi-model-executor-AVR5SZOO.js → multi-model-executor-HUGRXJ6D.js} +2 -2
  322. package/dist/cli/chunks/{opencode-installer-DW2426QM.js → opencode-installer-A6IXNF26.js} +2 -2
  323. package/dist/cli/chunks/{orchestrator-AHF4W5GS.js → orchestrator-KDFYDNE3.js} +10 -10
  324. package/dist/cli/chunks/pattern-null-store-5PS4JN6V.js +2 -0
  325. package/dist/cli/chunks/{pipeline-N6THEWYE.js → pipeline-HSPRKEYE.js} +2 -2
  326. package/dist/cli/chunks/{platform-MRCFQF7X.js → platform-X74IBN2H.js} +2 -2
  327. package/dist/cli/chunks/{plugin-6YKUN5QM.js → plugin-KDJZ7VFD.js} +2 -2
  328. package/dist/cli/chunks/{prime-radiant-advanced-wasm-2YPAHSVS.js → prime-radiant-advanced-wasm-2YZGKQE7.js} +2 -2
  329. package/dist/cli/chunks/protocol-executor-2GTGIOFD.js +2 -0
  330. package/dist/cli/chunks/{protocol-handler-Y2NMUKWQ.js → protocol-handler-I2SDHC7B.js} +2 -2
  331. package/dist/cli/chunks/{prove-DZUNWBFD.js → prove-JQJDNIZH.js} +2 -2
  332. package/dist/cli/chunks/provider-manager-VH6YTBB3.js +2 -0
  333. package/dist/cli/chunks/qe-reasoning-bank-47JSO76G.js +2 -0
  334. package/dist/cli/chunks/{quality-AIFQMGUV.js → quality-2P7KHVY3.js} +2 -2
  335. package/dist/cli/chunks/queen-coordinator-C7EDY7IS.js +2 -0
  336. package/dist/cli/chunks/{real-embeddings-5XL4LOG2.js → real-embeddings-L7NMMNDO.js} +2 -2
  337. package/dist/cli/chunks/{roocode-installer-LV3WONT5.js → roocode-installer-LA4QN5AG.js} +2 -2
  338. package/dist/cli/chunks/router-7DVH66WB.js +2 -0
  339. package/dist/cli/chunks/routing-feedback-4I2MF235.js +2 -0
  340. package/dist/cli/chunks/{routing-handler-WSMUILGD.js → routing-handler-B5CDEZF3.js} +2 -2
  341. package/dist/cli/chunks/{ruvector-commands-BCEIDTW3.js → ruvector-commands-SOVCRLJ6.js} +2 -2
  342. package/dist/cli/chunks/{rvf-dual-writer-LRSPC6H3.js → rvf-dual-writer-M6WI2KFB.js} +2 -2
  343. package/dist/cli/chunks/{rvf-migration-adapter-QHNX6353.js → rvf-migration-adapter-YDMZGPMA.js} +2 -2
  344. package/dist/cli/chunks/{rvf-migration-coordinator-SLNB3XPW.js → rvf-migration-coordinator-TFGQ5EO4.js} +2 -2
  345. package/dist/cli/chunks/rvf-native-adapter-UN3ESMMW.js +2 -0
  346. package/dist/cli/chunks/safe-db-Y2ZXKWBK.js +2 -0
  347. package/dist/cli/chunks/schedule-PG2NVRGA.js +2 -0
  348. package/dist/cli/chunks/scheduler-CNH6WWU2.js +2 -0
  349. package/dist/cli/chunks/{security-CYY6TECQ.js → security-R3IXQXDA.js} +3 -3
  350. package/dist/cli/chunks/{shared-rvf-adapter-U6JE4O6A.js → shared-rvf-adapter-GZX7LSQZ.js} +2 -2
  351. package/dist/cli/chunks/{shared-rvf-dual-writer-PJBSNBRV.js → shared-rvf-dual-writer-YT7SJX7K.js} +2 -2
  352. package/dist/cli/chunks/sqlite-persistence-WWT4DRRP.js +2 -0
  353. package/dist/cli/chunks/{status-handler-W723LXX5.js → status-handler-7PZSPBHJ.js} +2 -2
  354. package/dist/cli/chunks/{structural-health-WZUPZBB5.js → structural-health-UMJS6IVR.js} +2 -2
  355. package/dist/cli/chunks/sync-HA5SLSBA.js +2 -0
  356. package/dist/cli/chunks/{sync-UA22CKUS.js → sync-UIREA3UG.js} +2 -2
  357. package/dist/cli/chunks/{task-handler-SENTEEXZ.js → task-handler-NV4HGMEG.js} +2 -2
  358. package/dist/cli/chunks/{task-handlers-FGVUZOCC.js → task-handlers-RXYWWOSU.js} +3 -3
  359. package/dist/cli/chunks/{test-Q37C3WI2.js → test-2Y6OXGEU.js} +4 -4
  360. package/dist/cli/chunks/{test-scheduling-E6SPIBTH.js → test-scheduling-N55VFOYT.js} +3 -3
  361. package/dist/cli/chunks/token-bootstrap-FW3ZVMRP.js +2 -0
  362. package/dist/cli/chunks/{token-usage-JHNWTZ7L.js → token-usage-YXKOB3U6.js} +2 -2
  363. package/dist/cli/chunks/{transformers-TEXDUVNI.js → transformers-GBRSFAVA.js} +2 -2
  364. package/dist/cli/chunks/{tree-sitter-wasm-parser-MWSS52H6.js → tree-sitter-wasm-parser-FJHMEHJS.js} +2 -2
  365. package/dist/cli/chunks/{types-YQRKHYH3.js → types-NVMRVSBH.js} +2 -2
  366. package/dist/cli/chunks/unified-memory-PXEJKKMN.js +2 -0
  367. package/dist/cli/chunks/unified-memory-hnsw-M7OI5WUU.js +2 -0
  368. package/dist/cli/chunks/unified-persistence-WR4VDTAF.js +2 -0
  369. package/dist/cli/chunks/{upgrade-JKMEDURI.js → upgrade-L2OTYHD3.js} +2 -2
  370. package/dist/cli/chunks/{validate-URO7G6OE.js → validate-3NWRQYTP.js} +3 -3
  371. package/dist/cli/chunks/{validate-swarm-VZVJ56Z5.js → validate-swarm-MDURRWXK.js} +4 -4
  372. package/dist/cli/chunks/{vibium-G5WZILL6.js → vibium-SZX7RB4H.js} +2 -2
  373. package/dist/cli/chunks/visual-security-CKSZZHKG.js +2 -0
  374. package/dist/cli/chunks/{web-tree-sitter-LECH5T6H.js → web-tree-sitter-LGQT7JRD.js} +2 -2
  375. package/dist/cli/chunks/{windsurf-installer-2NPLC2YW.js → windsurf-installer-EYYGHPPX.js} +2 -2
  376. package/dist/cli/chunks/witness-chain-IOQX3XFG.js +2 -0
  377. package/dist/cli/chunks/{witness-chain-X347C36A.js → witness-chain-YYYA2CU3.js} +2 -2
  378. package/dist/cli/chunks/{workflow-V4ALYZ73.js → workflow-UD45FQAH.js} +4 -4
  379. package/dist/cli/chunks/workflow-orchestrator-Z2ZJRWIN.js +2 -0
  380. package/dist/cli/chunks/wrappers-JXD3KNSR.js +2 -0
  381. package/dist/cli/commands/arena.d.ts +10 -0
  382. package/dist/cli/commands/arena.js +129 -0
  383. package/dist/cli/commands/hooks-handlers/command-hooks.js +38 -2
  384. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.d.ts +4 -0
  385. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +66 -3
  386. package/dist/cli/commands/hooks-handlers/nesting-provenance.d.ts +27 -0
  387. package/dist/cli/commands/hooks-handlers/nesting-provenance.js +46 -0
  388. package/dist/cli/commands/hooks-handlers/task-hooks.js +22 -1
  389. package/dist/cli/commands/hooks-handlers/tool-loop-guardrail.d.ts +71 -0
  390. package/dist/cli/commands/hooks-handlers/tool-loop-guardrail.js +142 -0
  391. package/dist/cli/index.js +17 -0
  392. package/dist/contracts/verdicts.d.ts +297 -0
  393. package/dist/contracts/verdicts.js +178 -0
  394. package/dist/coordination/queen-types.d.ts +4 -0
  395. package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +15 -6
  396. package/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js +12 -0
  397. package/dist/kernel/unified-memory-schemas.d.ts +3 -2
  398. package/dist/kernel/unified-memory-schemas.js +3 -2
  399. package/dist/kernel/unified-memory.js +3 -1
  400. package/dist/learning/aqe-learning-engine.js +32 -0
  401. package/dist/learning/experience-capture.d.ts +8 -0
  402. package/dist/learning/experience-capture.js +30 -0
  403. package/dist/learning/pattern-null-store.d.ts +32 -0
  404. package/dist/learning/pattern-null-store.js +77 -0
  405. package/dist/learning/pattern-store.d.ts +10 -0
  406. package/dist/learning/pattern-store.js +23 -0
  407. package/dist/mcp/bundle.js +400 -370
  408. package/dist/mcp/handlers/core-handlers.d.ts +20 -0
  409. package/dist/mcp/handlers/core-handlers.js +28 -0
  410. package/dist/mcp/handlers/domain-handler-configs.d.ts +3 -0
  411. package/dist/mcp/handlers/domain-handler-configs.js +22 -10
  412. package/dist/mcp/handlers/validation-pipeline-handler.d.ts +19 -0
  413. package/dist/mcp/handlers/validation-pipeline-handler.js +10 -0
  414. package/dist/migrations/20260611_add_pattern_nulls_table.d.ts +26 -0
  415. package/dist/migrations/20260611_add_pattern_nulls_table.js +63 -0
  416. package/dist/shared/llm/cost-tracker.js +6 -2
  417. package/dist/shared/llm/interfaces.d.ts +4 -0
  418. package/dist/shared/llm/providers/claude.js +16 -2
  419. package/dist/shared/reasoning-scrub.d.ts +29 -0
  420. package/dist/shared/reasoning-scrub.js +75 -0
  421. package/dist/validation/pipeline.d.ts +25 -0
  422. package/dist/validation/pipeline.js +28 -5
  423. package/dist/validation/steps/requirements.js +5 -0
  424. package/package.json +2 -1
  425. package/dist/cli/chunks/adapter-A62ETL5C.js +0 -2
  426. package/dist/cli/chunks/aqe-learning-engine-MTCRAV6N.js +0 -2
  427. package/dist/cli/chunks/audit-42XG5JFB.js +0 -3
  428. package/dist/cli/chunks/base-KKEBUHZC.js +0 -2
  429. package/dist/cli/chunks/browser-workflow-XHYAJUB6.js +0 -2
  430. package/dist/cli/chunks/chunk-2TYO4VZH.js +0 -12
  431. package/dist/cli/chunks/chunk-HPYGMKZF.js +0 -2
  432. package/dist/cli/chunks/chunk-OKKTDHHF.js +0 -65
  433. package/dist/cli/chunks/chunk-PZ4PRZXN.js +0 -699
  434. package/dist/cli/chunks/client-C6CJOCRN.js +0 -2
  435. package/dist/cli/chunks/cross-domain-router-I3GEA5G6.js +0 -2
  436. package/dist/cli/chunks/dream-JCQMG2RL.js +0 -2
  437. package/dist/cli/chunks/heartbeat-scheduler-FBHE4ZWH.js +0 -2
  438. package/dist/cli/chunks/hnsw-adapter-EOOA4WXD.js +0 -2
  439. package/dist/cli/chunks/hnsw-index-TD3KRPND.js +0 -2
  440. package/dist/cli/chunks/hooks-RUPQVIUM.js +0 -250
  441. package/dist/cli/chunks/hybrid-router-64O6PXZ2.js +0 -2
  442. package/dist/cli/chunks/impact-analyzer-ITQHXGTM.js +0 -2
  443. package/dist/cli/chunks/init-wizard-DZ4IKGQI.js +0 -2
  444. package/dist/cli/chunks/kernel-HSVY4ZYK.js +0 -2
  445. package/dist/cli/chunks/knowledge-graph-H32TXXX4.js +0 -2
  446. package/dist/cli/chunks/llm-router-service-3FKESBUX.js +0 -2
  447. package/dist/cli/chunks/load-test-LKHURZGZ.js +0 -2
  448. package/dist/cli/chunks/memory-backend-XRJRZ6CK.js +0 -2
  449. package/dist/cli/chunks/memory-handlers-BL6E3XAK.js +0 -2
  450. package/dist/cli/chunks/protocol-executor-KABPB6PQ.js +0 -2
  451. package/dist/cli/chunks/provider-manager-U7EBM3FA.js +0 -2
  452. package/dist/cli/chunks/qe-reasoning-bank-64O2OQIW.js +0 -2
  453. package/dist/cli/chunks/queen-coordinator-SV3COGIL.js +0 -2
  454. package/dist/cli/chunks/router-QARRPMED.js +0 -2
  455. package/dist/cli/chunks/routing-feedback-KD2JFTPK.js +0 -2
  456. package/dist/cli/chunks/rvf-native-adapter-4LLGF5AY.js +0 -2
  457. package/dist/cli/chunks/safe-db-RAX3H2P7.js +0 -2
  458. package/dist/cli/chunks/schedule-RQZGLLUY.js +0 -2
  459. package/dist/cli/chunks/scheduler-ACWTN4LN.js +0 -2
  460. package/dist/cli/chunks/sqlite-persistence-SWNBO257.js +0 -2
  461. package/dist/cli/chunks/sync-ZLMF53TB.js +0 -2
  462. package/dist/cli/chunks/token-bootstrap-HQFFMZUF.js +0 -2
  463. package/dist/cli/chunks/unified-memory-QG3FDRKR.js +0 -2
  464. package/dist/cli/chunks/unified-memory-hnsw-KOR4EOIG.js +0 -2
  465. package/dist/cli/chunks/unified-persistence-J6NIRYKM.js +0 -2
  466. package/dist/cli/chunks/visual-security-RAWV6YLN.js +0 -2
  467. package/dist/cli/chunks/witness-chain-ZO7FIM35.js +0 -2
  468. package/dist/cli/chunks/workflow-orchestrator-7SKITNIJ.js +0 -2
  469. package/dist/cli/chunks/wrappers-QXOPRPR4.js +0 -2
@@ -1,14 +1,14 @@
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.10.4");process.exit(0)}
2
- import{a as Ie}from"./chunk-3ISX5B77.js";import{c as $e}from"./chunk-5T4J3IPG.js";import{a as re,b as ue,c as we,d as Ce,e as Pe,f as Se,g as Ee,h as Re,i as _e,j as xe,k as De}from"./chunk-VJ2D6FST.js";import"./chunk-JYR3X4OC.js";import"./chunk-2L5VFVCG.js";import{a as Ae}from"./chunk-PWJZZCHJ.js";import"./chunk-TBJ566KV.js";import"./chunk-NZGLDOU4.js";import"./chunk-K72J52JO.js";import"./chunk-U27GVYXA.js";import{b as _,d as se}from"./chunk-IYFMDIYZ.js";import"./chunk-HPYGMKZF.js";import"./chunk-VRE2EBFI.js";import{a as S,b as be,c as ne}from"./chunk-2B6ETC7C.js";import"./chunk-KCXE2LZU.js";import{a as x,b as de}from"./chunk-RJKYPWFD.js";import"./chunk-2G2PVVQG.js";import"./chunk-UWAUYDW4.js";import"./chunk-N3MM4Z33.js";import"./chunk-6OLHPWSN.js";import"./chunk-WI5WXYIS.js";import"./chunk-EMZ3DXMG.js";import"./chunk-MFWWPRBV.js";import"./chunk-D7IWGQTW.js";import{a as te}from"./chunk-SVILIQQQ.js";ne();ne();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:be(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}};se();de();import{existsSync as T}from"fs";import{join as q}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=T(q(t,".agentic-qe","config.yaml")),o=s.version?.startsWith("3."),r=s.detected,i=n||o||!1,c=!r&&!i;return e.v2Detection=s,{v2Detected:r,v3Detected:i,freshInstall:c,v2Detection:s}}async detectV2Installation(e){let t=q(e,".agentic-qe","memory.db"),s=q(e,".agentic-qe","config"),n=q(e,".claude","agents"),o=q(e,".agentic-qe","config","learning.json"),r=T(t),i=T(s),c=T(n),d=T(o),u=T(q(e,".agentic-qe","config.yaml")),m,p=!1;return r&&(m=this.readVersionFromDb(t),m?p=m.startsWith("3."):m="2.x.x"),{detected:!p&&r&&(!m?.startsWith("3.")||d&&!u),memoryDbPath:r?t:void 0,configPath:i?s:void 0,agentsPath:c?n:void 0,hasMemoryDb:r,hasConfig:i,hasAgents:c,version:m}}readVersionFromDb(e){try{let t=x(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.10.6");process.exit(0)}
2
+ import{a as Pe}from"./chunk-RH3I4Q23.js";import{a as re,b as ue,c as Ce,d as Ie,e as Se,f as Ee,g as Re,h as Ae,i as xe,j as De,k as $e}from"./chunk-I7ADT6AZ.js";import{a as _e}from"./chunk-S574AFAT.js";import{c as we}from"./chunk-USPBUR6P.js";import"./chunk-OBLAWVXM.js";import"./chunk-RTFFD263.js";import"./chunk-ELTN4F4R.js";import"./chunk-RA7HEY5G.js";import"./chunk-UQYDFT6I.js";import"./chunk-434VUSZP.js";import"./chunk-F72A356B.js";import"./chunk-QJXZ4SU7.js";import{b as _,d as se}from"./chunk-DFBVWMX3.js";import"./chunk-JPL53G4V.js";import{a as S,b as be,c as ne}from"./chunk-O4MNYX4X.js";import"./chunk-LAGNWKAD.js";import{a as x,b as de}from"./chunk-7NXVVIJZ.js";import"./chunk-H6UPZFI6.js";import"./chunk-T6SCQVWH.js";import"./chunk-TUFU3BAK.js";import"./chunk-MSJGDIRP.js";import"./chunk-O2H5WYFK.js";import"./chunk-LHZOIXJ6.js";import"./chunk-B3H2TTYT.js";import"./chunk-Q4LYWIEX.js";import{a as te}from"./chunk-UNDPB5SS.js";ne();ne();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:be(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}};se();de();import{existsSync as T}from"fs";import{join as q}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=T(q(t,".agentic-qe","config.yaml")),o=s.version?.startsWith("3."),r=s.detected,i=n||o||!1,c=!r&&!i;return e.v2Detection=s,{v2Detected:r,v3Detected:i,freshInstall:c,v2Detection:s}}async detectV2Installation(e){let t=q(e,".agentic-qe","memory.db"),s=q(e,".agentic-qe","config"),n=q(e,".claude","agents"),o=q(e,".agentic-qe","config","learning.json"),r=T(t),i=T(s),c=T(n),d=T(o),u=T(q(e,".agentic-qe","config.yaml")),m,p=!1;return r&&(m=this.readVersionFromDb(t),m?p=m.startsWith("3."):m="2.x.x"),{detected:!p&&r&&(!m?.startsWith("3.")||d&&!u),memoryDbPath:r?t:void 0,configPath:i?s:void 0,agentsPath:c?n:void 0,hasMemoryDb:r,hasConfig:i,hasAgents:c,version:m}}readVersionFromDb(e){try{let t=x(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(`
6
6
  SELECT value FROM kv_store
7
7
  WHERE key = 'aqe_version' AND namespace = '_system'
8
- `).get();return t.close(),n?_(n.value):void 0}catch{t.close();return}}catch{return}}};var L=class extends y{name="analysis";description="Analyze project structure";order=20;critical=!0;requiresPhases=["detection"];async run(e){let s=await we(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 Q=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=Ce({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 B,mkdirSync as pe}from"fs";import{join as V}from"path";var H=class extends y{name="database";description="Initialize persistence database";order=40;critical=!0;requiresPhases=["configuration"];async run(e){let{projectRoot:t}=e,s=V(t,"vectors.db");B(s)&&e.services.log(` \u26A0 Stale vectors.db detected at ${s}
8
+ `).get();return t.close(),n?_(n.value):void 0}catch{t.close();return}}catch{return}}};var L=class extends y{name="analysis";description="Analyze project structure";order=20;critical=!0;requiresPhases=["detection"];async run(e){let s=await Ce(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 Q=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=Ie({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 B,mkdirSync as pe}from"fs";import{join as V}from"path";var H=class extends y{name="database";description="Initialize persistence database";order=40;critical=!0;requiresPhases=["configuration"];async run(e){let{projectRoot:t}=e,s=V(t,"vectors.db");B(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=V(t,".agentic-qe");B(n)||pe(n,{recursive:!0});let o=V(n,"workers");B(o)||pe(o,{recursive:!0});let r=V(n,"data");B(r)||pe(r,{recursive:!0});let i=V(n,"memory.db"),c=!B(i);try{let{initializeUnifiedMemory:d,resetUnifiedMemory:u}=await import("./unified-memory-QG3FDRKR.js"),m=await d({dbPath:i,walMode:!0,busyTimeout:5e3}),h=m.getStats().tables.map(A=>A.name);await m.kvSet("_init_marker",{initialized:new Date().toISOString(),projectRoot:t,version:re()},"_system");let w=m.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:c,tablesCreated:h,schemaVersion:w}}catch(d){throw new Error(`SQLite persistence initialization FAILED: ${d}
11
+ rm "${s}"`);let n=V(t,".agentic-qe");B(n)||pe(n,{recursive:!0});let o=V(n,"workers");B(o)||pe(o,{recursive:!0});let r=V(n,"data");B(r)||pe(r,{recursive:!0});let i=V(n,"memory.db"),c=!B(i);try{let{initializeUnifiedMemory:d,resetUnifiedMemory:u}=await import("./unified-memory-PXEJKKMN.js"),m=await d({dbPath:i,walMode:!0,busyTimeout:5e3}),h=m.getStats().tables.map(A=>A.name);await m.kvSet("_init_marker",{initialized:new Date().toISOString(),projectRoot:t,version:re()},"_system");let w=m.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:c,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 oe,mkdirSync as me,writeFileSync as je}from"fs";import{join as D}from"path";var U=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=D(s,".agentic-qe","data");oe(o)||me(o,{recursive:!0});let r=D(o,"hnsw");oe(r)||me(r,{recursive:!0});let i=D(o,"learning-config.json"),c={embeddingModel:t.learning.embeddingModel,hnswConfig:t.learning.hnswConfig,qualityThreshold:t.learning.qualityThreshold,promotionThreshold:t.learning.promotionThreshold,databasePath:D(o,"memory.db"),hnswIndexPath:D(r,"index.bin"),initialized:new Date().toISOString()};je(i,JSON.stringify(c,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=D(e,"patterns");oe(s)||me(s,{recursive:!0});let n=D(s,"index.json");return oe(n)||je(n,JSON.stringify({version:re(),domains:[],loadedAt:new Date().toISOString()},null,2),"utf-8"),0}catch(s){return t.services.warn(`Could not load pre-trained patterns: ${s}`),0}}};se();de();import{existsSync as Ye,statSync as Xe}from"fs";import{join as ie}from"path";var Te=3e4,qe=18e4,Me=["**/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.*"],W=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=ie(t,".agentic-qe","memory.db");if(!Ye(s))return e.services.log(" Building knowledge graph..."),await this.runCodeIntelligenceScan(t,e,!1);let n=x(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 c=await this.findChangedFiles(t,r);return c.length===0?(e.services.log(` Index up to date (${i} entries)`),{status:"existing",entries:i}):(e.services.log(` Delta scan: ${c.length} files changed since last index...`),await this.runCodeIntelligenceScan(t,e,!0,c))}catch(o){try{n.close()}catch{}throw o}}checkCodeIntelligenceIndex(e){try{return e.prepare(`
14
14
  SELECT COUNT(*) as count FROM kv_store
@@ -16,13 +16,13 @@ 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-H32TXXX4.js"),r=ie(e,".agentic-qe","memory.db"),i={type:"sqlite",sqlite:{path:r,walMode:!0}},{backend:c}=await Ie(i,!0),d=new o(c,{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:Me})).map(f=>ie(e,f)),t.services.log(` Scanning ${u.length} source files...`);let m=await this.runBoundedScan(d,u,s,t);if(m.status==="timeout")return t.services.warn(` \u26A0 Code intelligence pre-scan exceeded ${qe/1e3}s phase cap. Indexed ${m.entries} entries before timeout. Last file: ${m.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.`),m;if(m.status==="indexed"){let p=s?"Delta indexed":"Indexed";t.services.log(` ${p} ${m.entries} entries to ${r}`),await this.buildHypergraph(r,u,t)}return m}finally{try{d.destroy()}catch{}try{await c.dispose()}catch{}}}async runBoundedScan(e,t,s,n){let o=0,r=0,i=0,c="",d=Date.now(),u=!1;s||await e.clear();let m=n.projectRoot,p=f=>f.startsWith(m)?f.slice(m.length+1):f;for(let f of t){if(Date.now()-d>qe){u=!0;break}c=f,n.services.log(` [${i+1}/${t.length}] ${p(f)}`);try{let v=await this.withTimeout(e.index({paths:[f],incremental:!0,includeTests:!0}),Te,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 ${Te/1e3}s`):n.services.warn(` \u26A0 Failed to index ${p(f)}: ${w}`)}i++}let h=o+r;return u?{status:"timeout",entries:h,timeoutFile:c}:{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-44HH36UG.js"),{createHypergraphEngine:o}=await import("./hypergraph-engine-VDFK3JYH.js"),r=x(e),i=await o({db:r,maxTraversalDepth:10,maxQueryResults:1e3,enableVectorSearch:!1}),c=await n(t),d=await i.buildFromIndexResult(c);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-C7LVHHLN.js"),r=ie(e,".agentic-qe","memory.db"),i={type:"sqlite",sqlite:{path:r,walMode:!0}},{backend:c}=await Pe(i,!0),d=new o(c,{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:Me})).map(f=>ie(e,f)),t.services.log(` Scanning ${u.length} source files...`);let m=await this.runBoundedScan(d,u,s,t);if(m.status==="timeout")return t.services.warn(` \u26A0 Code intelligence pre-scan exceeded ${qe/1e3}s phase cap. Indexed ${m.entries} entries before timeout. Last file: ${m.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.`),m;if(m.status==="indexed"){let p=s?"Delta indexed":"Indexed";t.services.log(` ${p} ${m.entries} entries to ${r}`),await this.buildHypergraph(r,u,t)}return m}finally{try{d.destroy()}catch{}try{await c.dispose()}catch{}}}async runBoundedScan(e,t,s,n){let o=0,r=0,i=0,c="",d=Date.now(),u=!1;s||await e.clear();let m=n.projectRoot,p=f=>f.startsWith(m)?f.slice(m.length+1):f;for(let f of t){if(Date.now()-d>qe){u=!0;break}c=f,n.services.log(` [${i+1}/${t.length}] ${p(f)}`);try{let v=await this.withTimeout(e.index({paths:[f],incremental:!0,includeTests:!0}),Te,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 ${Te/1e3}s`):n.services.warn(` \u26A0 Failed to index ${p(f)}: ${w}`)}i++}let h=o+r;return u?{status:"timeout",entries:h,timeoutFile:c}:{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-TWNKG4VS.js"),{createHypergraphEngine:o}=await import("./hypergraph-engine-X4Q2TTET.js"),r=x(e),i=await o({db:r,maxTraversalDepth:10,maxQueryResults:1e3,enableVectorSearch:!1}),c=await n(t),d=await i.buildFromIndexResult(c);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'
23
- `).get();if(!t)return null;let s=_(t.value);if(!s.indexedAt)return null;let n=new Date(s.indexedAt);return isNaN(n.getTime())?null:n}catch{return null}}async findChangedFiles(e,t){let n=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:Me}),o=t.getTime(),r=[];for(let i of n){let c=ie(e,i);try{Xe(c).mtimeMs>o&&r.push(c)}catch{}}return r}};se();import{existsSync as C,mkdirSync as G,readFileSync as Oe,writeFileSync as M}from"fs";import{join as b,dirname as Ze}from"path";import{fileURLToPath as et}from"url";var tt=et(import.meta.url),nt=Ze(tt),z=class extends y{name="hooks";description="Configure Claude Code hooks";order=70;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.config?.hooks?.claudeCode??!0}async run(e){let t=e.config,{projectRoot:s}=e;if(!t.hooks.claudeCode)return{configured:!1,settingsPath:"",hookTypes:[],existingAqeDetected:!1};let n=b(s,".claude");C(n)||G(n,{recursive:!0});let o=b(n,"hooks");C(o)||G(o,{recursive:!0});let r=b(n,"settings.json"),i={};if(C(r))try{let v=Oe(r,"utf-8");i=_(v)}catch{i={}}let c=this.generateHooksConfig(t,s),d=Object.keys(c),u=i.hooks||{},m=this.hasExistingAqeHooks(u);m&&e.services.log(" Detected existing AQE hooks \u2014 replacing with updated config"),i.hooks=Se(u,c);let p=i.env||{};i.env={...p,...Ee(t)};let h=Re(t,s);for(let[v,w]of Object.entries(h))if(v==="_aqePermissions"){let A=i.permissions||{},ce=A.allow||[],P=w,g=[...new Set([...ce,...P])];i.permissions={...A,allow:g}}else i[v]=w;let f=i.enabledMcpjsonServers||[];f=f.filter(v=>v!=="aqe"),f.includes("agentic-qe")||f.push("agentic-qe"),i.enabledMcpjsonServers=f,M(r,JSON.stringify(i,null,2),"utf-8"),this.writeHooksReadme(o,d),this.installHookAssets(o,e);try{let v=Oe(r,"utf-8"),A=_(v).hooks;(!A||!this.hasExistingAqeHooks(A))&&e.services.log(" WARNING: settings.json written but AQE hooks not detected \u2014 check settings-merge logic")}catch{e.services.log(" WARNING: Could not verify settings.json after write")}return e.services.log(` Settings: ${r}`),e.services.log(` Hooks dir: ${o}`),e.services.log(` Hook types: ${d.join(", ")}`),{configured:!0,settingsPath:r,hookTypes:d,existingAqeDetected:m}}writeHooksReadme(e,t){let s=b(e,"README.txt");if(C(s))return;let n=["AQE Hooks Directory","====================","","Claude Code hooks are configured in .claude/settings.json (not as files here).","This directory contains supporting infrastructure for the learning system.","","Configured hook types: "+t.join(", "),"","Files:"," settings.json \u2014 Hook definitions (in parent .claude/ directory)"," helpers/brain-checkpoint.cjs \u2014 Auto-exports brain to aqe.rvf on session end"," cross-phase-memory.yaml \u2014 QCSD feedback loop configuration","","Manual testing:"," npx agentic-qe hooks session-start --session-id test --json",' npx agentic-qe hooks route --task "generate tests" --json'," npx agentic-qe hooks post-edit --file src/example.ts --success --json",""].join(`
23
+ `).get();if(!t)return null;let s=_(t.value);if(!s.indexedAt)return null;let n=new Date(s.indexedAt);return isNaN(n.getTime())?null:n}catch{return null}}async findChangedFiles(e,t){let n=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:Me}),o=t.getTime(),r=[];for(let i of n){let c=ie(e,i);try{Xe(c).mtimeMs>o&&r.push(c)}catch{}}return r}};se();import{existsSync as C,mkdirSync as G,readFileSync as Oe,writeFileSync as M}from"fs";import{join as b,dirname as Ze}from"path";import{fileURLToPath as et}from"url";var tt=et(import.meta.url),nt=Ze(tt),z=class extends y{name="hooks";description="Configure Claude Code hooks";order=70;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.config?.hooks?.claudeCode??!0}async run(e){let t=e.config,{projectRoot:s}=e;if(!t.hooks.claudeCode)return{configured:!1,settingsPath:"",hookTypes:[],existingAqeDetected:!1};let n=b(s,".claude");C(n)||G(n,{recursive:!0});let o=b(n,"hooks");C(o)||G(o,{recursive:!0});let r=b(n,"settings.json"),i={};if(C(r))try{let v=Oe(r,"utf-8");i=_(v)}catch{i={}}let c=this.generateHooksConfig(t,s),d=Object.keys(c),u=i.hooks||{},m=this.hasExistingAqeHooks(u);m&&e.services.log(" Detected existing AQE hooks \u2014 replacing with updated config"),i.hooks=Ee(u,c);let p=i.env||{};i.env={...p,...Re(t)};let h=Ae(t,s);for(let[v,w]of Object.entries(h))if(v==="_aqePermissions"){let A=i.permissions||{},ce=A.allow||[],P=w,g=[...new Set([...ce,...P])];i.permissions={...A,allow:g}}else i[v]=w;let f=i.enabledMcpjsonServers||[];f=f.filter(v=>v!=="aqe"),f.includes("agentic-qe")||f.push("agentic-qe"),i.enabledMcpjsonServers=f,M(r,JSON.stringify(i,null,2),"utf-8"),this.writeHooksReadme(o,d),this.installHookAssets(o,e);try{let v=Oe(r,"utf-8"),A=_(v).hooks;(!A||!this.hasExistingAqeHooks(A))&&e.services.log(" WARNING: settings.json written but AQE hooks not detected \u2014 check settings-merge logic")}catch{e.services.log(" WARNING: Could not verify settings.json after write")}return e.services.log(` Settings: ${r}`),e.services.log(` Hooks dir: ${o}`),e.services.log(` Hook types: ${d.join(", ")}`),{configured:!0,settingsPath:r,hookTypes:d,existingAqeDetected:m}}writeHooksReadme(e,t){let s=b(e,"README.txt");if(C(s))return;let n=["AQE Hooks Directory","====================","","Claude Code hooks are configured in .claude/settings.json (not as files here).","This directory contains supporting infrastructure for the learning system.","","Configured hook types: "+t.join(", "),"","Files:"," settings.json \u2014 Hook definitions (in parent .claude/ directory)"," helpers/brain-checkpoint.cjs \u2014 Auto-exports brain to aqe.rvf on session end"," cross-phase-memory.yaml \u2014 QCSD feedback loop configuration","","Manual testing:"," npx agentic-qe hooks session-start --session-id test --json",' npx agentic-qe hooks route --task "generate tests" --json'," npx agentic-qe hooks post-edit --file src/example.ts --success --json",""].join(`
24
24
  `);M(s,n,"utf-8")}installHookAssets(e,t){let{projectRoot:s}=t;this.installBrainCheckpoint(s,t),this.installStatusline(s,t),this.installHookShim(s,t);let n=b(e,"cross-phase-memory.yaml");if(!C(n)){let r=[b(s,"v3","assets","hooks","cross-phase-memory.yaml"),b(s,"assets","hooks","cross-phase-memory.yaml"),b(s,"node_modules","agentic-qe","v3","assets","hooks","cross-phase-memory.yaml")],i=!1;for(let c of r)if(C(c)){let{copyFileSync:d}=te("fs");d(c,n),t.services.log(" Installed cross-phase memory config"),i=!0;break}i||M(n,["# Cross-Phase Memory Hooks Configuration","# Generated by aqe init",'version: "1.0"',"enabled: true",""].join(`
25
- `),"utf-8")}let o=b(e,"v3-domain-workers.json");C(o)||M(o,JSON.stringify({version:"3.0",workers:[{name:"pattern-consolidator",interval:"5m",enabled:!0},{name:"routing-accuracy-monitor",interval:"10m",enabled:!0},{name:"coverage-gap-scanner",interval:"15m",enabled:!0},{name:"flaky-test-detector",interval:"30m",enabled:!0}]},null,2),"utf-8")}hasExistingAqeHooks(e){for(let t of Object.values(e))if(Array.isArray(t)){for(let s of t)if(Pe(s))return!0}return!1}installBrainCheckpoint(e,t){let s=b(e,".claude","helpers");C(s)||G(s,{recursive:!0});let n=b(s,"brain-checkpoint.cjs"),o=[b(e,".claude","helpers","brain-checkpoint.cjs"),b(e,"node_modules","agentic-qe",".claude","helpers","brain-checkpoint.cjs")];for(let r of o)if(C(r)&&r!==n){let{copyFileSync:i}=te("fs");i(r,n),t.services.log(" Installed brain-checkpoint.cjs (copied)");return}C(n)||(M(n,this.generateBrainCheckpointScript(),"utf-8"),t.services.log(" Installed brain-checkpoint.cjs (generated)"))}installStatusline(e,t){let s=b(e,".claude","helpers");C(s)||G(s,{recursive:!0});let n=b(s,"statusline-v3.cjs"),o=[b(e,"node_modules","agentic-qe","assets","helpers","statusline-v3.cjs"),b(e,"assets","helpers","statusline-v3.cjs")];for(let r of o)if(C(r)&&r!==n){let{copyFileSync:i}=te("fs");i(r,n),t.services.log(" Installed statusline-v3.cjs (copied)");return}C(n)||(M(n,this.generateMinimalStatuslineScript(),"utf-8"),t.services.log(" Installed statusline-v3.cjs (generated)"))}installHookShim(e,t){let s=b(e,".claude","hooks");C(s)||G(s,{recursive:!0});let n=b(s,"aqe-hook.cjs"),o=[b(e,"node_modules","agentic-qe",".claude","hooks","aqe-hook.cjs"),b(nt,"..","..","..",".claude","hooks","aqe-hook.cjs")];for(let r of o)if(C(r)&&r!==n){let{copyFileSync:i}=te("fs");i(r,n),t.services.log(" Installed aqe-hook.cjs (copied)");return}C(n)||t.services.log(" \u26A0 aqe-hook.cjs source not found \u2014 hooks will fall back to `npx agentic-qe`")}generateMinimalStatuslineScript(){return`#!/usr/bin/env node
25
+ `),"utf-8")}let o=b(e,"v3-domain-workers.json");C(o)||M(o,JSON.stringify({version:"3.0",workers:[{name:"pattern-consolidator",interval:"5m",enabled:!0},{name:"routing-accuracy-monitor",interval:"10m",enabled:!0},{name:"coverage-gap-scanner",interval:"15m",enabled:!0},{name:"flaky-test-detector",interval:"30m",enabled:!0}]},null,2),"utf-8")}hasExistingAqeHooks(e){for(let t of Object.values(e))if(Array.isArray(t)){for(let s of t)if(Se(s))return!0}return!1}installBrainCheckpoint(e,t){let s=b(e,".claude","helpers");C(s)||G(s,{recursive:!0});let n=b(s,"brain-checkpoint.cjs"),o=[b(e,".claude","helpers","brain-checkpoint.cjs"),b(e,"node_modules","agentic-qe",".claude","helpers","brain-checkpoint.cjs")];for(let r of o)if(C(r)&&r!==n){let{copyFileSync:i}=te("fs");i(r,n),t.services.log(" Installed brain-checkpoint.cjs (copied)");return}C(n)||(M(n,this.generateBrainCheckpointScript(),"utf-8"),t.services.log(" Installed brain-checkpoint.cjs (generated)"))}installStatusline(e,t){let s=b(e,".claude","helpers");C(s)||G(s,{recursive:!0});let n=b(s,"statusline-v3.cjs"),o=[b(e,"node_modules","agentic-qe","assets","helpers","statusline-v3.cjs"),b(e,"assets","helpers","statusline-v3.cjs")];for(let r of o)if(C(r)&&r!==n){let{copyFileSync:i}=te("fs");i(r,n),t.services.log(" Installed statusline-v3.cjs (copied)");return}C(n)||(M(n,this.generateMinimalStatuslineScript(),"utf-8"),t.services.log(" Installed statusline-v3.cjs (generated)"))}installHookShim(e,t){let s=b(e,".claude","hooks");C(s)||G(s,{recursive:!0});let n=b(s,"aqe-hook.cjs"),o=[b(e,"node_modules","agentic-qe",".claude","hooks","aqe-hook.cjs"),b(nt,"..","..","..",".claude","hooks","aqe-hook.cjs")];for(let r of o)if(C(r)&&r!==n){let{copyFileSync:i}=te("fs");i(r,n),t.services.log(" Installed aqe-hook.cjs (copied)");return}C(n)||t.services.log(" \u26A0 aqe-hook.cjs source not found \u2014 hooks will fall back to `npx agentic-qe`")}generateMinimalStatuslineScript(){return`#!/usr/bin/env node
26
26
  /**
27
27
  * Agentic QE v3 Statusline (minimal fallback, generated by aqe init)
28
28
  * For the full statusline, reinstall: npx agentic-qe init --auto
@@ -107,10 +107,10 @@ function verifyBrain() {
107
107
  const cmd = process.argv[2] || 'verify';
108
108
  const result = cmd === 'export' ? exportBrain() : verifyBrain();
109
109
  if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result));
110
- `}generateHooksConfig(e,t){return{PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" 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:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --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}]}]}}};se();import{existsSync as st,readFileSync as rt,writeFileSync as ot}from"fs";import{join as it}from"path";var K=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=it(t,".mcp.json"),o={};if(st(n))try{let i=rt(n,"utf-8");o=_(i)}catch{o={}}o.mcpServers||(o.mcpServers={});let r=o.mcpServers;return r["agentic-qe"]=s,ot(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 ct,readdirSync as dt}from"fs";import{join as R}from"path";ne();import{spawnSync as at}from"node:child_process";import*as ae from"node:os";import*as Le from"node:fs";var fe="vibium@^26.3.18",Qe={platform:()=>ae.platform(),arch:()=>ae.arch(),existsSync:l=>Le.existsSync(l)},Fe=["/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/snap/bin/chromium"];function lt(l=Qe){if(l.platform()!=="linux"||l.arch()!=="arm64")return;let e=Fe.find(t=>l.existsSync(t));return e?{code:"linux-arm64-system-chromium-found",browserPath:e,message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64. Found system browser at ${e}. Export VIBIUM_BROWSER_PATH=${e} before running vibium.`}:{code:"linux-arm64-no-system-chromium",message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64, and no system chromium was found on PATH (checked: ${Fe.join(", ")}). Install via \`apt-get install chromium\` (or your distro's equivalent), then export VIBIUM_BROWSER_PATH=/usr/bin/chromium before running vibium.`}}function ge(l,e,t,s){return l(e,t,{encoding:"utf8",timeout:s,maxBuffer:8*1024*1024})}var Be=(l,e,t)=>at(l,e,t);function Ne(l=Be,e=5e3){let t=ge(l,"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 he(l={}){let e=l.packageSpec||fe;if(l.skip)return{status:"skipped",packageSpec:e,message:"install skipped by options"};let t=l.spawner||Be,s=l.platformProbe||Qe,n=lt(s),o=Ne(t);if(o)return{status:"already-installed",version:o,packageSpec:e,platformHint:n};let r=l.npmBin||"npm",i=ge(t,r,["--version"],5e3);if(i.error||i.status!==0)return{status:"npm-unavailable",packageSpec:e,message:`npm is not available on PATH. Install Node.js + npm, then run \`npm install -g ${e}\`.`};let c=l.timeoutMs||18e4,d=ge(t,r,["install","-g",e],c);return d.status!==0?{status:"install-failed",packageSpec:e,message:d.stderr?.trim()||d.stdout?.trim()||S(d.error)||"unknown npm install failure"}:{status:"installed",version:Ne(t)||"unknown",packageSpec:e,platformHint:n}}var J=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,c=0,d=0,u=0,m=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 _e({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 xe({projectRoot:s,installQEAgents:!0,installSubagents:!0,overwrite:r}).install();c=k.installed.length,k.errors.length>0&&e.services.warn(`Agents warnings: ${k.errors.join(", ")}`)}catch(g){e.services.warn(`Agents install error: ${g instanceof Error?g.message:g}`)}$e(s);let w;if(n.minimal)w={status:"skipped",packageSpec:fe,message:"minimal mode"};else try{let g=he({skip:!1,timeoutMs:5e3});if(g.status==="already-installed")w=g,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=he({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}w?.platformHint&&e.services.warn(` Browser engine platform hint: ${w.platformHint.message}`)}catch(g){let k=g instanceof Error?g.message:String(g);e.services.warn(`Browser engine install error: ${k}
110
+ `}generateHooksConfig(e,t){return{PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5e3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" 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:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --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}]}]}}};se();import{existsSync as st,readFileSync as rt,writeFileSync as ot}from"fs";import{join as it}from"path";var K=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=it(t,".mcp.json"),o={};if(st(n))try{let i=rt(n,"utf-8");o=_(i)}catch{o={}}o.mcpServers||(o.mcpServers={});let r=o.mcpServers;return r["agentic-qe"]=s,ot(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 ct,readdirSync as dt}from"fs";import{join as R}from"path";ne();import{spawnSync as at}from"node:child_process";import*as ae from"node:os";import*as Le from"node:fs";var fe="vibium@^26.3.18",Qe={platform:()=>ae.platform(),arch:()=>ae.arch(),existsSync:l=>Le.existsSync(l)},Fe=["/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/snap/bin/chromium"];function lt(l=Qe){if(l.platform()!=="linux"||l.arch()!=="arm64")return;let e=Fe.find(t=>l.existsSync(t));return e?{code:"linux-arm64-system-chromium-found",browserPath:e,message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64. Found system browser at ${e}. Export VIBIUM_BROWSER_PATH=${e} before running vibium.`}:{code:"linux-arm64-no-system-chromium",message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64, and no system chromium was found on PATH (checked: ${Fe.join(", ")}). Install via \`apt-get install chromium\` (or your distro's equivalent), then export VIBIUM_BROWSER_PATH=/usr/bin/chromium before running vibium.`}}function ge(l,e,t,s){return l(e,t,{encoding:"utf8",timeout:s,maxBuffer:8*1024*1024})}var Be=(l,e,t)=>at(l,e,t);function Ne(l=Be,e=5e3){let t=ge(l,"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 he(l={}){let e=l.packageSpec||fe;if(l.skip)return{status:"skipped",packageSpec:e,message:"install skipped by options"};let t=l.spawner||Be,s=l.platformProbe||Qe,n=lt(s),o=Ne(t);if(o)return{status:"already-installed",version:o,packageSpec:e,platformHint:n};let r=l.npmBin||"npm",i=ge(t,r,["--version"],5e3);if(i.error||i.status!==0)return{status:"npm-unavailable",packageSpec:e,message:`npm is not available on PATH. Install Node.js + npm, then run \`npm install -g ${e}\`.`};let c=l.timeoutMs||18e4,d=ge(t,r,["install","-g",e],c);return d.status!==0?{status:"install-failed",packageSpec:e,message:d.stderr?.trim()||d.stdout?.trim()||S(d.error)||"unknown npm install failure"}:{status:"installed",version:Ne(t)||"unknown",packageSpec:e,platformHint:n}}var J=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,c=0,d=0,u=0,m=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 xe({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 De({projectRoot:s,installQEAgents:!0,installSubagents:!0,overwrite:r}).install();c=k.installed.length,k.errors.length>0&&e.services.warn(`Agents warnings: ${k.errors.join(", ")}`)}catch(g){e.services.warn(`Agents install error: ${g instanceof Error?g.message:g}`)}we(s);let w;if(n.minimal)w={status:"skipped",packageSpec:fe,message:"minimal mode"};else try{let g=he({skip:!1,timeoutMs:5e3});if(g.status==="already-installed")w=g,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=he({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}w?.platformHint&&e.services.warn(` Browser engine platform hint: ${w.platformHint.message}`)}catch(g){let k=g instanceof Error?g.message:String(g);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 De({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:g}=await import("./opencode-installer-DW2426QM.js"),a=await g({projectRoot:s,installAgents:!0,installSkills:!0,installTools:!0,overwrite:r}).install();m=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: ${c}`),n.withN8n&&(e.services.log(` N8n agents: ${d}`),e.services.log(` N8n skills: ${u}`)),(n.withOpenCode||A)&&(e.services.log(` OpenCode agents: ${m}`),e.services.log(` OpenCode skills: ${p}`));let ce=n.autoMode&&E(R(s,".kiro"));if(n.withKiro||ce){let{createKiroInstaller:g}=await import("./kiro-installer-KYFCSYTG.js"),a=await g({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 P=[];if(n.withCopilot||n.autoMode&&E(R(s,".vscode"))){let{createCopilotInstaller:g}=await import("./copilot-installer-M7XVII2A.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./cursor-installer-KWDSQPQC.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./cline-installer-7WX7DBGI.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./kilocode-installer-ECBYWT6M.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./roocode-installer-LV3WONT5.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./codex-installer-LMXRWLPU.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./windsurf-installer-2NPLC2YW.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./continuedev-installer-CYVYS5B7.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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 P.length>0&&e.services.log(` Platforms configured: ${P.join(", ")}`),{skillsInstalled:i,agentsInstalled:c,n8nAgents:d,n8nSkills:u,openCodeAgents:m,openCodeSkills:p,kiroAgents:h,kiroSkills:f,kiroHooks:v,platformsConfigured:P,browserEngine:w}}detectVersionUpgrade(e){let t=e.config.version,s=R(e.projectRoot,".agentic-qe","config.yaml");if(E(s))try{let i=ct(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)&&dt(n).some(o=>o.endsWith(".md")&&o.startsWith("qe-"))}catch{return!1}}};import{existsSync as ut,mkdirSync as pt,writeFileSync as le}from"fs";import{join as O,dirname as mt}from"path";import{fileURLToPath as gt}from"url";var ft=gt(import.meta.url),Un=mt(ft),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");ut(n)||pt(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"),c={version:t.version,maxConcurrent:t.workers.maxConcurrent,workers:r,createdAt:new Date().toISOString(),daemonPid:null};le(i,JSON.stringify(c,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()};le(f,JSON.stringify(v,null,2),"utf-8")}let d=O(n,"start-daemon.cjs");le(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 $e({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:g}=await import("./opencode-installer-A6IXNF26.js"),a=await g({projectRoot:s,installAgents:!0,installSkills:!0,installTools:!0,overwrite:r}).install();m=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: ${c}`),n.withN8n&&(e.services.log(` N8n agents: ${d}`),e.services.log(` N8n skills: ${u}`)),(n.withOpenCode||A)&&(e.services.log(` OpenCode agents: ${m}`),e.services.log(` OpenCode skills: ${p}`));let ce=n.autoMode&&E(R(s,".kiro"));if(n.withKiro||ce){let{createKiroInstaller:g}=await import("./kiro-installer-UADO53E5.js"),a=await g({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 P=[];if(n.withCopilot||n.autoMode&&E(R(s,".vscode"))){let{createCopilotInstaller:g}=await import("./copilot-installer-4R2V4IYB.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./cursor-installer-5WEZCESZ.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./cline-installer-ZTG234Z2.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./kilocode-installer-BWAVVSQG.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./roocode-installer-LA4QN5AG.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./codex-installer-4TM4BLAE.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./windsurf-installer-EYYGHPPX.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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:g}=await import("./continuedev-installer-CTIORASU.js"),a=await g({projectRoot:s,overwrite:r}).install();a.mcpConfigured&&P.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 P.length>0&&e.services.log(` Platforms configured: ${P.join(", ")}`),{skillsInstalled:i,agentsInstalled:c,n8nAgents:d,n8nSkills:u,openCodeAgents:m,openCodeSkills:p,kiroAgents:h,kiroSkills:f,kiroHooks:v,platformsConfigured:P,browserEngine:w}}detectVersionUpgrade(e){let t=e.config.version,s=R(e.projectRoot,".agentic-qe","config.yaml");if(E(s))try{let i=ct(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)&&dt(n).some(o=>o.endsWith(".md")&&o.startsWith("qe-"))}catch{return!1}}};import{existsSync as ut,mkdirSync as pt,writeFileSync as le}from"fs";import{join as O,dirname as mt}from"path";import{fileURLToPath as gt}from"url";var ft=gt(import.meta.url),Un=mt(ft),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");ut(n)||pt(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"),c={version:t.version,maxConcurrent:t.workers.maxConcurrent,workers:r,createdAt:new Date().toISOString(),daemonPid:null};le(i,JSON.stringify(c,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()};le(f,JSON.stringify(v,null,2),"utf-8")}let d=O(n,"start-daemon.cjs");le(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
@@ -389,7 +389,7 @@ Task({ prompt: "Security audit", subagent_type: "qe-security-scanner", run_in_ba
389
389
  VALUES (?, '_system', ?, ?)
390
390
  `).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");$(s)||He(s,{recursive:!0});let n=F(s,"config.yaml");if($(n)){let r=this.loadExistingConfig(n);r&&(e=this.mergeConfigs(e,r))}let o=this.configToYAML(e);bt(n,o,"utf-8")}loadExistingConfig(e){try{let t=vt(e,"utf-8");return this.parseYAML(t)}catch{return null}}parseYAML(e){try{let t={},s=e.split(`
391
391
  `),n="",o="";for(let i of s){if(i.trim().startsWith("#")||i.trim()==="")continue;let c=i.match(/^(\w+):\s*(.*)$/);if(c){n=c[1],o="";let p=c[2].trim();p&&!p.startsWith('"')?t[n]=this.parseValue(p):p?t[n]=this.parseValue(p):t[n]={};continue}let d=i.match(/^ {2}(\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(/^ {4}([\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 m=i.match(/^ {4}- "?([^"]*)"?$/);if(m&&n&&o){let p=t[n];Array.isArray(p[o])||(p[o]=[]),p[o].push(m[1])}}let r=[["domains","enabled"],["domains","disabled"],["workers","enabled"]];for(let[i,c]of r){let d=t[i];d&&c in d&&!Array.isArray(d[c])&&(d[c]=[])}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(`
392
- `)}};ne();import{existsSync as j,mkdirSync as Ue,readdirSync as We,copyFileSync as Ge}from"fs";import{join as I,dirname as wt}from"path";import{fileURLToPath as Ct}from"url";var It=Ct(import.meta.url),ze=wt(It);function Pt(){let l=[I(ze,"../../assets/governance"),I(ze,"../assets/governance")],e=Ae(import.meta.url);e&&(l.push(I(e,"assets/governance")),l.push(I(e,"dist/assets/governance"))),l.push(I(process.cwd(),"node_modules/agentic-qe/assets/governance")),l.push(I(process.cwd(),"assets/governance"));for(let t of l)if(j(t))return t;throw new Error(`Governance assets not found. Package may be corrupted. Searched: ${l.join(", ")}`)}var ve=class{projectRoot;overwrite;skipShards;assetsPath;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.skipShards=e.skipShards??!1,this.assetsPath=Pt()}async install(){let e=[],t=[],s=[],n=I(this.projectRoot,".claude","guidance"),o=I(n,"shards");try{Ue(n,{recursive:!0}),this.skipShards||Ue(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=I(this.assetsPath,"constitution.md"),c=I(n,"constitution.md");if(j(i))try{!j(c)||this.overwrite?(Ge(i,c),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=I(this.assetsPath,"shards");if(j(u))try{let m=We(u).filter(p=>p.endsWith(".shard.md"));for(let p of m){let h=I(u,p),f=I(o,p);try{!j(f)||this.overwrite?(Ge(h,f),e.push(`shards/${p}`),d++):t.push(`shards/${p}`)}catch(v){s.push(`Failed to install ${p}: ${S(v)}`)}}}catch(m){s.push(`Failed to read shards directory: ${S(m)}`)}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=I(this.projectRoot,".claude","guidance","constitution.md");return j(e)}getInstalledShards(){let e=I(this.projectRoot,".claude","guidance","shards");if(!j(e))return[];try{return We(e).filter(t=>t.endsWith(".shard.md"))}catch{return[]}}};function Ke(l){return new ve(l)}var ee=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=Ke({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 St=new N,Et=new L,Rt=new Q,At=new H,_t=new U,xt=new W,Dt=new z,$t=new K,jt=new J,Tt=new Y,qt=new X,Mt=new Z,Ot=new ee;function Je(){return[St,Et,Rt,At,_t,xt,Dt,$t,jt,Ot,Tt,qt,Mt]}var ke=class{phases;context;constructor(e){this.context=this.createContext(e),this.phases=e.customPhases??Je()}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(`
392
+ `)}};ne();import{existsSync as j,mkdirSync as Ue,readdirSync as We,copyFileSync as Ge}from"fs";import{join as I,dirname as wt}from"path";import{fileURLToPath as Ct}from"url";var It=Ct(import.meta.url),ze=wt(It);function Pt(){let l=[I(ze,"../../assets/governance"),I(ze,"../assets/governance")],e=_e(import.meta.url);e&&(l.push(I(e,"assets/governance")),l.push(I(e,"dist/assets/governance"))),l.push(I(process.cwd(),"node_modules/agentic-qe/assets/governance")),l.push(I(process.cwd(),"assets/governance"));for(let t of l)if(j(t))return t;throw new Error(`Governance assets not found. Package may be corrupted. Searched: ${l.join(", ")}`)}var ve=class{projectRoot;overwrite;skipShards;assetsPath;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.skipShards=e.skipShards??!1,this.assetsPath=Pt()}async install(){let e=[],t=[],s=[],n=I(this.projectRoot,".claude","guidance"),o=I(n,"shards");try{Ue(n,{recursive:!0}),this.skipShards||Ue(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=I(this.assetsPath,"constitution.md"),c=I(n,"constitution.md");if(j(i))try{!j(c)||this.overwrite?(Ge(i,c),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=I(this.assetsPath,"shards");if(j(u))try{let m=We(u).filter(p=>p.endsWith(".shard.md"));for(let p of m){let h=I(u,p),f=I(o,p);try{!j(f)||this.overwrite?(Ge(h,f),e.push(`shards/${p}`),d++):t.push(`shards/${p}`)}catch(v){s.push(`Failed to install ${p}: ${S(v)}`)}}}catch(m){s.push(`Failed to read shards directory: ${S(m)}`)}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=I(this.projectRoot,".claude","guidance","constitution.md");return j(e)}getInstalledShards(){let e=I(this.projectRoot,".claude","guidance","shards");if(!j(e))return[];try{return We(e).filter(t=>t.endsWith(".shard.md"))}catch{return[]}}};function Ke(l){return new ve(l)}var ee=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=Ke({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 St=new N,Et=new L,Rt=new Q,At=new H,_t=new U,xt=new W,Dt=new z,$t=new K,jt=new J,Tt=new Y,qt=new X,Mt=new Z,Ot=new ee;function Je(){return[St,Et,Rt,At,_t,xt,Dt,$t,jt,Ot,Tt,qt,Mt]}var ke=class{phases;context;constructor(e){this.context=this.createContext(e),this.phases=e.customPhases??Je()}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(`
393
393
  \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(`
394
394
  \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"),c=this.context.results.get("mcp"),d=this.context.results.get("claude-md"),u=this.context.results.get("workers");return{success:!0,config:s||ue("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:c?.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:ue("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 Ft(l){return new ke(l)}async function Us(l){return await Ft({projectRoot:l,autoMode:!0}).initialize()}function Ws(l){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 l.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: ${l.config.project.name.substring(0,45).padEnd(45)} \u2502`),e.push(`\u2502 Type: ${l.config.project.type.padEnd(48)} \u2502`),e.push(`\u2502 Code Intel: ${String(l.summary.codeIntelligenceIndexed).padEnd(43)} \u2502`),e.push(`\u2502 Patterns: ${String(l.summary.patternsLoaded).padEnd(45)} \u2502`),e.push(`\u2502 Skills: ${String(l.summary.skillsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Agents: ${String(l.summary.agentsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Workers: ${String(l.summary.workersStarted).padEnd(46)} \u2502`),e.push(`\u2502 Hooks: ${l.summary.hooksConfigured?"Yes":"No".padEnd(48)} \u2502`),e.push(`\u2502 MCP: ${l.summary.mcpConfigured?"Yes":"No".padEnd(50)} \u2502`),e.push(`\u2502 CLAUDE.md: ${l.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=l.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(`
395
395
  `)}export{ke as ModularInitOrchestrator,Ft as createModularInitOrchestrator,Ws as formatInitResultModular,Us as quickInitModular};
@@ -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.10.6");process.exit(0)}
2
+ import{a}from"./chunk-AQPFTDGS.js";import"./chunk-JPL53G4V.js";import"./chunk-BHD6THT5.js";import"./chunk-UNDPB5SS.js";export{a as PatternNullStore};
@@ -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.10.4");process.exit(0)}
2
- import{a as y,b as w,c as u}from"./chunk-UFKVKNAA.js";import"./chunk-SVILIQQQ.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.10.6");process.exit(0)}
2
+ import{a as y,b as w,c as u}from"./chunk-K32AUACO.js";import"./chunk-UNDPB5SS.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.10.4");process.exit(0)}
2
- import{a as u}from"./chunk-LOFA3U4X.js";import{a as y,c as w}from"./chunk-2B6ETC7C.js";import{b as $}from"./chunk-SVILIQQQ.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.10.6");process.exit(0)}
2
+ import{a as u}from"./chunk-T6CUKJHS.js";import{a as y,c as w}from"./chunk-O4MNYX4X.js";import{b as $}from"./chunk-UNDPB5SS.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.10.4");process.exit(0)}
2
- import{a as p,b as d,c as h}from"./chunk-3UGUX34A.js";import"./chunk-SVILIQQQ.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.10.6");process.exit(0)}
2
+ import{a as p,b as d,c as h}from"./chunk-IB3QQDC4.js";import"./chunk-UNDPB5SS.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.10.4");process.exit(0)}
2
- import"./chunk-SVILIQQQ.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.10.6");process.exit(0)}
2
+ import"./chunk-UNDPB5SS.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.10.6");process.exit(0)}
2
+ import{a,b}from"./chunk-SA5FTDRS.js";import"./chunk-EJWAKPZD.js";import"./chunk-JXCIRWLQ.js";import"./chunk-K32AUACO.js";import"./chunk-O4MNYX4X.js";import"./chunk-BHD6THT5.js";import"./chunk-UNDPB5SS.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.10.4");process.exit(0)}
2
- import"./chunk-WIYWDON4.js";import{c as i}from"./chunk-IYFMDIYZ.js";import"./chunk-SVILIQQQ.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.10.6");process.exit(0)}
2
+ import"./chunk-WNAFMYND.js";import{c as i}from"./chunk-DFBVWMX3.js";import"./chunk-UNDPB5SS.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.10.4");process.exit(0)}
2
- import"./chunk-SVILIQQQ.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.10.6");process.exit(0)}
2
+ import"./chunk-UNDPB5SS.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};
@@ -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.10.6");process.exit(0)}
2
+ import{a,b,c,d}from"./chunk-HFU3LTQX.js";import"./chunk-5QTUGFFP.js";import"./chunk-HWKFBRMX.js";import"./chunk-EYKID5HA.js";import"./chunk-RA7HEY5G.js";import"./chunk-UQYDFT6I.js";import"./chunk-434VUSZP.js";import"./chunk-F72A356B.js";import"./chunk-QJXZ4SU7.js";import"./chunk-DFBVWMX3.js";import"./chunk-JPL53G4V.js";import"./chunk-O4MNYX4X.js";import"./chunk-7NXVVIJZ.js";import"./chunk-H6UPZFI6.js";import"./chunk-T6SCQVWH.js";import"./chunk-TUFU3BAK.js";import"./chunk-MSJGDIRP.js";import"./chunk-O2H5WYFK.js";import"./chunk-LHZOIXJ6.js";import"./chunk-B3H2TTYT.js";import"./chunk-Q4LYWIEX.js";import"./chunk-UNDPB5SS.js";export{a as DEFAULT_PROVIDER_MANAGER_CONFIG,b as ProviderManager,c as createProviderManager,d as createQEProviderManager};
@@ -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.10.6");process.exit(0)}
2
+ import{a as h,b as i,c as j,e as k,f as l,g as m,h as n}from"./chunk-CH7KUYGO.js";import{a as e,b as f,d as g}from"./chunk-JX7HZMW5.js";import"./chunk-XOGBTPJI.js";import"./chunk-DAUQIXHW.js";import"./chunk-ULEVKOWQ.js";import{a,b,c,h as d}from"./chunk-LEDF3LGZ.js";import"./chunk-VFFIMJWT.js";import"./chunk-SUGQZCNI.js";import"./chunk-6RFPELCD.js";import"./chunk-Q5432RIH.js";import"./chunk-J2SMTP2L.js";import"./chunk-RA7HEY5G.js";import"./chunk-UQYDFT6I.js";import"./chunk-434VUSZP.js";import"./chunk-F72A356B.js";import"./chunk-QJXZ4SU7.js";import"./chunk-DFBVWMX3.js";import"./chunk-M3APJ7VS.js";import"./chunk-AQPFTDGS.js";import"./chunk-JPL53G4V.js";import"./chunk-K32AUACO.js";import"./chunk-O4MNYX4X.js";import"./chunk-BHD6THT5.js";import"./chunk-7NXVVIJZ.js";import"./chunk-H6UPZFI6.js";import"./chunk-T6SCQVWH.js";import"./chunk-TUFU3BAK.js";import"./chunk-MSJGDIRP.js";import"./chunk-O2H5WYFK.js";import"./chunk-LHZOIXJ6.js";import"./chunk-B3H2TTYT.js";import"./chunk-Q4LYWIEX.js";import"./chunk-UNDPB5SS.js";export{j as AGENT_CAPABILITIES,h as DEFAULT_QE_REASONING_BANK_CONFIG,i as PRETRAINED_PATTERNS,m as QEReasoningBank,l as RELATED_DOMAINS,d as applyPatternTemplate,k as calculateAgentScores,n as createQEReasoningBank,a as detectQEDomain,b as detectQEDomains,g as generateGuidanceContext,f as getCombinedGuidance,e as getGuidance,c as mapQEDomainToAQE};
@@ -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.10.4");process.exit(0)}
2
- import{c as l,d as u,h as d}from"./chunk-KUFC4DBX.js";import"./chunk-SVILIQQQ.js";import{Command as w}from"commander";import e from"chalk";function P(g,o,h){return new w("quality").description("Quality assessment shortcut").option("--gate","Run quality gate evaluation").option("-F, --format <format>","Output format (text|json|markdown)","text").option("-o, --output <path>","Write output to file").action(async i=>{if(await h())try{let r=i.format;{r==="text"&&console.log(e.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.10.6");process.exit(0)}
2
+ import{c as l,d as u,h as d}from"./chunk-TFA5UETW.js";import"./chunk-UNDPB5SS.js";import{Command as w}from"commander";import e from"chalk";function P(g,o,h){return new w("quality").description("Quality assessment shortcut").option("--gate","Run quality gate evaluation").option("-F, --format <format>","Output format (text|json|markdown)","text").option("-o, --output <path>","Write output to file").action(async i=>{if(await h())try{let r=i.format;{r==="text"&&console.log(e.blue(`
3
3
  Running quality gate evaluation...
4
4
  `));let m=await g.kernel.getDomainAPIAsync("quality-assessment");m||(console.log(e.red("Quality assessment domain not available")),await o(1));let f={coverage:0,testsPassing:0,criticalBugs:0,codeSmells:0,securityVulnerabilities:0,technicalDebt:0,duplications:0},y={coverage:{min:80},testsPassing:{min:95},criticalBugs:{max:0},codeSmells:{max:20},securityVulnerabilities:{max:0},technicalDebt:{max:5},duplications:{max:5}},n=await m.evaluateGate({gateName:"standard",metrics:f,thresholds:y});if(n.success&&n.value){let s=n.value,t={passed:s.passed??s.meetsThreshold??!0,score:s.score??s.grade??"N/A",checks:s.checks||[],recommendations:s.recommendations||[]};if(r==="json")l(u(t),i.output);else if(r==="markdown")l(d(t),i.output);else{let p=t.passed?e.green("\u2713 PASSED"):e.red("\u2717 FAILED");if(console.log(` Quality Gate: ${p}`),console.log(` Score: ${e.cyan(t.score)}
5
5
  `),t.checks.length>0){console.log(e.cyan(" Checks:"));for(let a of t.checks){let b=a.passed?e.green("\u2713"):e.red("\u2717");console.log(` ${b} ${a.name}: ${a.value} (threshold: ${a.threshold})`)}}if(t.recommendations&&t.recommendations.length>0){console.log(e.cyan(`
@@ -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.10.6");process.exit(0)}
2
+ import{a,b,c,d}from"./chunk-2UI5LQ7C.js";import"./chunk-GXNNKM7F.js";import"./chunk-RTFFD263.js";import"./chunk-M4OYZMXE.js";import"./chunk-Z3RPA3RD.js";import"./chunk-NKEGEQ3J.js";import"./chunk-MJLDZSFB.js";import"./chunk-VQM2TC2V.js";import"./chunk-NEIJP6TG.js";import"./chunk-DAUQIXHW.js";import"./chunk-ULEVKOWQ.js";import"./chunk-LEDF3LGZ.js";import"./chunk-VFFIMJWT.js";import"./chunk-RA7HEY5G.js";import"./chunk-UQYDFT6I.js";import"./chunk-434VUSZP.js";import"./chunk-F72A356B.js";import"./chunk-QJXZ4SU7.js";import"./chunk-DFBVWMX3.js";import"./chunk-JPL53G4V.js";import"./chunk-K32AUACO.js";import"./chunk-O4MNYX4X.js";import"./chunk-BHD6THT5.js";import"./chunk-7NXVVIJZ.js";import"./chunk-H6UPZFI6.js";import"./chunk-T6SCQVWH.js";import"./chunk-TUFU3BAK.js";import"./chunk-MSJGDIRP.js";import"./chunk-O2H5WYFK.js";import"./chunk-LHZOIXJ6.js";import"./chunk-B3H2TTYT.js";import"./chunk-Q4LYWIEX.js";import"./chunk-UNDPB5SS.js";export{a as DOMAIN_GROUPS,c as QueenCoordinator,b as TASK_DOMAIN_MAP,d as createQueenCoordinator};
@@ -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.10.4");process.exit(0)}
2
- import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k}from"./chunk-5T2HDET6.js";import"./chunk-2B6ETC7C.js";import{a}from"./chunk-WI5WXYIS.js";import"./chunk-SVILIQQQ.js";export{b as DEFAULT_EMBEDDING_CONFIG,e as clearEmbeddingCache,d as computeBatchEmbeddings,c as computeRealEmbedding,a as cosineSimilarity,f as getCacheStats,h as getEmbeddingDimension,k as getEndpointIdentity,g as isTransformerAvailable,j as isUsingEndpoint,i as resetInitialization};
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.10.6");process.exit(0)}
2
+ import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k}from"./chunk-J2SMTP2L.js";import"./chunk-O4MNYX4X.js";import{a}from"./chunk-O2H5WYFK.js";import"./chunk-UNDPB5SS.js";export{b as DEFAULT_EMBEDDING_CONFIG,e as clearEmbeddingCache,d as computeBatchEmbeddings,c as computeRealEmbedding,a as cosineSimilarity,f as getCacheStats,h as getEmbeddingDimension,k as getEndpointIdentity,g as isTransformerAvailable,j as isUsingEndpoint,i as resetInitialization};
@@ -1,4 +1,4 @@
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.10.4");process.exit(0)}
2
- import{b as p}from"./chunk-LOFA3U4X.js";import{a as f,c as v}from"./chunk-2B6ETC7C.js";import"./chunk-SVILIQQQ.js";v();import{existsSync as n,mkdirSync as m,readFileSync as u,writeFileSync as a}from"fs";import{join as d,dirname as h}from"path";var l=class{projectRoot;overwrite;generator;constructor(r){this.projectRoot=r.projectRoot,this.overwrite=r.overwrite??!1,this.generator=p()}async install(){let r={success:!0,mcpConfigured:!1,modeInstalled:!1,errors:[],configPath:"",modePath:""};try{let t=this.generator.generateMcpConfig("roocode"),e=d(this.projectRoot,t.path);if(r.configPath=e,!n(e)||this.overwrite){let i=h(e);if(n(i)||m(i,{recursive:!0}),n(e)&&this.overwrite){let c=this.mergeExistingConfig(e,t.content);a(e,c)}else a(e,t.content);r.mcpConfigured=!0}let s=this.generator.generateBehavioralRules("roocode"),o=d(this.projectRoot,s.path);if(r.modePath=o,!n(o)||this.overwrite){let i=h(o);if(n(i)||m(i,{recursive:!0}),n(o)&&this.overwrite){let c=this.mergeExistingModes(o,s.content);a(o,c)}else a(o,s.content);r.modeInstalled=!0}}catch(t){r.success=!1,r.errors.push(`Roo Code installation failed: ${f(t)}`)}return r}mergeExistingConfig(r,t){try{let e=JSON.parse(u(r,"utf-8")),s=JSON.parse(t);return e.mcpServers||(e.mcpServers={}),Object.assign(e.mcpServers,s.mcpServers),JSON.stringify(e,null,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.10.6");process.exit(0)}
2
+ import{b as p}from"./chunk-T6CUKJHS.js";import{a as f,c as v}from"./chunk-O4MNYX4X.js";import"./chunk-UNDPB5SS.js";v();import{existsSync as n,mkdirSync as m,readFileSync as u,writeFileSync as a}from"fs";import{join as d,dirname as h}from"path";var l=class{projectRoot;overwrite;generator;constructor(r){this.projectRoot=r.projectRoot,this.overwrite=r.overwrite??!1,this.generator=p()}async install(){let r={success:!0,mcpConfigured:!1,modeInstalled:!1,errors:[],configPath:"",modePath:""};try{let t=this.generator.generateMcpConfig("roocode"),e=d(this.projectRoot,t.path);if(r.configPath=e,!n(e)||this.overwrite){let i=h(e);if(n(i)||m(i,{recursive:!0}),n(e)&&this.overwrite){let c=this.mergeExistingConfig(e,t.content);a(e,c)}else a(e,t.content);r.mcpConfigured=!0}let s=this.generator.generateBehavioralRules("roocode"),o=d(this.projectRoot,s.path);if(r.modePath=o,!n(o)||this.overwrite){let i=h(o);if(n(i)||m(i,{recursive:!0}),n(o)&&this.overwrite){let c=this.mergeExistingModes(o,s.content);a(o,c)}else a(o,s.content);r.modeInstalled=!0}}catch(t){r.success=!1,r.errors.push(`Roo Code installation failed: ${f(t)}`)}return r}mergeExistingConfig(r,t){try{let e=JSON.parse(u(r,"utf-8")),s=JSON.parse(t);return e.mcpServers||(e.mcpServers={}),Object.assign(e.mcpServers,s.mcpServers),JSON.stringify(e,null,2)+`
3
3
  `}catch{return t}}mergeExistingModes(r,t){try{let e=JSON.parse(u(r,"utf-8")),s=JSON.parse(t);if(!Array.isArray(e))return t;let o=e.filter(i=>i.slug!=="qe-engineer");return o.push(...s),JSON.stringify(o,null,2)+`
4
4
  `}catch{return t}}};function P(g){return new l(g)}export{l as RooCodeInstaller,P as createRooCodeInstaller};
@@ -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.10.6");process.exit(0)}
2
+ import{a,b,c}from"./chunk-A2DCROAN.js";import"./chunk-QZSNYXYC.js";import"./chunk-SHVTMMJB.js";import"./chunk-PIJ5XOMM.js";import"./chunk-7OK5H6ML.js";import"./chunk-DFBVWMX3.js";import"./chunk-O4MNYX4X.js";import"./chunk-UNDPB5SS.js";export{a as ModelRouter,b as createModelRouter,c as createModelRouterWithAgentBooster};
@@ -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.10.6");process.exit(0)}
2
+ import{a,b}from"./chunk-DF4Z7TKZ.js";import"./chunk-2IC2I525.js";import"./chunk-USPBUR6P.js";import"./chunk-OBLAWVXM.js";import"./chunk-EYKID5HA.js";import"./chunk-RA7HEY5G.js";import"./chunk-UQYDFT6I.js";import"./chunk-434VUSZP.js";import"./chunk-F72A356B.js";import"./chunk-QJXZ4SU7.js";import"./chunk-DFBVWMX3.js";import"./chunk-JPL53G4V.js";import"./chunk-O4MNYX4X.js";import"./chunk-7NXVVIJZ.js";import"./chunk-H6UPZFI6.js";import"./chunk-T6SCQVWH.js";import"./chunk-TUFU3BAK.js";import"./chunk-MSJGDIRP.js";import"./chunk-O2H5WYFK.js";import"./chunk-LHZOIXJ6.js";import"./chunk-B3H2TTYT.js";import"./chunk-Q4LYWIEX.js";import"./chunk-UNDPB5SS.js";export{a as RoutingFeedbackCollector,b as createRoutingFeedbackCollector};
@@ -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.10.4");process.exit(0)}
2
- import{b as u}from"./chunk-NJYI7HX7.js";import"./chunk-M4ARHDY4.js";import"./chunk-5T4J3IPG.js";import"./chunk-JYR3X4OC.js";import{c as m}from"./chunk-XDZXLEJK.js";import"./chunk-NZGLDOU4.js";import"./chunk-K72J52JO.js";import"./chunk-U27GVYXA.js";import"./chunk-IYFMDIYZ.js";import"./chunk-HPYGMKZF.js";import"./chunk-VRE2EBFI.js";import{a as l,c as f}from"./chunk-2B6ETC7C.js";import"./chunk-RJKYPWFD.js";import"./chunk-2G2PVVQG.js";import"./chunk-UWAUYDW4.js";import"./chunk-N3MM4Z33.js";import"./chunk-6OLHPWSN.js";import"./chunk-WI5WXYIS.js";import"./chunk-EMZ3DXMG.js";import"./chunk-MFWWPRBV.js";import"./chunk-D7IWGQTW.js";import"./chunk-SVILIQQQ.js";f();import o from"chalk";var d=class{name="routing";description="View routing performance, economics, and accuracy";cleanupAndExit;constructor(n){this.cleanupAndExit=n}getHelp(){return["aqe routing economics [--complexity <0-1>] [--json] Show tier efficiency & budget","aqe routing accuracy [--json] Show routing accuracy analysis","aqe routing metrics [--json] Show per-agent performance"].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.10.6");process.exit(0)}
2
+ import{b as u}from"./chunk-DF4Z7TKZ.js";import"./chunk-2IC2I525.js";import"./chunk-USPBUR6P.js";import"./chunk-OBLAWVXM.js";import{c as m}from"./chunk-EYKID5HA.js";import"./chunk-RA7HEY5G.js";import"./chunk-UQYDFT6I.js";import"./chunk-434VUSZP.js";import"./chunk-F72A356B.js";import"./chunk-QJXZ4SU7.js";import"./chunk-DFBVWMX3.js";import"./chunk-JPL53G4V.js";import{a as l,c as f}from"./chunk-O4MNYX4X.js";import"./chunk-7NXVVIJZ.js";import"./chunk-H6UPZFI6.js";import"./chunk-T6SCQVWH.js";import"./chunk-TUFU3BAK.js";import"./chunk-MSJGDIRP.js";import"./chunk-O2H5WYFK.js";import"./chunk-LHZOIXJ6.js";import"./chunk-B3H2TTYT.js";import"./chunk-Q4LYWIEX.js";import"./chunk-UNDPB5SS.js";f();import o from"chalk";var d=class{name="routing";description="View routing performance, economics, and accuracy";cleanupAndExit;constructor(n){this.cleanupAndExit=n}getHelp(){return["aqe routing economics [--complexity <0-1>] [--json] Show tier efficiency & budget","aqe routing accuracy [--json] Show routing accuracy analysis","aqe routing metrics [--json] Show per-agent performance"].join(`
3
3
  `)}register(n,r){let t=n.command("routing").description(this.description);t.command("economics").description("Show economic routing report: tier efficiency, budget, savings").option("-c, --complexity <value>","Task complexity for scoring (0-1)","0.5").option("--json","Output as JSON").action(async e=>{await this.executeEconomics(parseFloat(e.complexity)||.5,!!e.json)}),t.command("accuracy").description("Show routing accuracy analysis").option("--json","Output as JSON").action(async e=>{await this.executeAccuracy(!!e.json)}),t.command("metrics").description("Show per-agent performance metrics").option("--json","Output as JSON").action(async e=>{await this.executeMetrics(!!e.json)})}async executeEconomics(n,r){try{let t=u(100);await t.initialize(),t.enableEconomicRouting({},m());let e=t.getEconomicReport();if(!e){console.error(o.red(`
4
4
  Economic routing is not available.
5
5
  `)),await this.cleanupAndExit(1);return}if(r){console.log(JSON.stringify(e,(a,s)=>s===1/0?"Infinity":s,2)),await this.cleanupAndExit(0);return}console.log(o.blue(`