agentic-qe 3.15.2 → 3.15.3

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 (428) hide show
  1. package/.claude/helpers/brain-checkpoint.cjs +46 -6
  2. package/.claude/hooks/aqe-hook.cjs +280 -51
  3. package/.claude/skills/skills-manifest.json +1 -1
  4. package/CHANGELOG.md +86 -0
  5. package/assets/skills/skills-manifest.json +1 -1
  6. package/dist/adapters/ag-ui/state-delta-cache.js +14 -5
  7. package/dist/adapters/trajectory-adapter.js +3 -1
  8. package/dist/cli/bundle.js +5 -5
  9. package/dist/cli/chunks/adapter-WQSFQES5.js +2 -0
  10. package/dist/cli/chunks/{agent-booster-wasm-664M7426.js → agent-booster-wasm-CYG3PKHH.js} +2 -2
  11. package/dist/cli/chunks/{agent-handler-E47ITH45.js → agent-handler-WTFYFZKL.js} +2 -2
  12. package/dist/cli/chunks/{agent-memory-branch-CFWVOJX3.js → agent-memory-branch-G6WE3ZXU.js} +2 -2
  13. package/dist/cli/chunks/aqe-learning-engine-TDHBBADE.js +2 -0
  14. package/dist/cli/chunks/{arena-JM3OY263.js → arena-S72QW44C.js} +4 -4
  15. package/dist/cli/chunks/{arena-ZU5CGBGH.js → arena-ZFXQEVUQ.js} +2 -2
  16. package/dist/cli/chunks/{audit-HVBRC5AS.js → audit-KPYIEQJ3.js} +3 -3
  17. package/dist/cli/chunks/base-CZSB27VO.js +2 -0
  18. package/dist/cli/chunks/{better-sqlite3-45JLBQX3.js → better-sqlite3-L2M3TI5D.js} +2 -2
  19. package/dist/cli/chunks/{brain-handler-FKDONZYA.js → brain-handler-FHKLQTB4.js} +3 -3
  20. package/dist/cli/chunks/{branch-enumerator-M3DPS3D5.js → branch-enumerator-3BSHOPOK.js} +2 -2
  21. package/dist/cli/chunks/{browser-TG2TV6NR.js → browser-JUIJPL6Y.js} +2 -2
  22. package/dist/cli/chunks/browser-workflow-AEMIS6PA.js +2 -0
  23. package/dist/cli/chunks/{chunk-3KTAMNKI.js → chunk-2GJJGO5D.js} +2 -2
  24. package/dist/cli/chunks/{chunk-HSXLHNSS.js → chunk-2M75CW5Q.js} +2 -2
  25. package/dist/cli/chunks/{chunk-MEUJWTOX.js → chunk-2MEWIXW4.js} +2 -2
  26. package/dist/cli/chunks/{chunk-SKQTRYE7.js → chunk-2TBHPYOU.js} +2 -2
  27. package/dist/cli/chunks/{chunk-PZK7O445.js → chunk-34Y4CIHD.js} +2 -2
  28. package/dist/cli/chunks/{chunk-RO6HAZLV.js → chunk-35VDOH4Y.js} +1 -1
  29. package/dist/cli/chunks/{chunk-KQMCCHPO.js → chunk-366IBPZB.js} +2 -2
  30. package/dist/cli/chunks/{chunk-GJTH6VBH.js → chunk-3MNKYCLH.js} +1 -1
  31. package/dist/cli/chunks/{chunk-6KEYA4EH.js → chunk-3UUMGWHW.js} +4 -4
  32. package/dist/cli/chunks/{chunk-EQG3JYSV.js → chunk-3Y4GX5FL.js} +2 -2
  33. package/dist/cli/chunks/{chunk-BKZSTZDB.js → chunk-3ZTBV6M3.js} +1 -1
  34. package/dist/cli/chunks/{chunk-UZL4JYVW.js → chunk-4IYHYHTG.js} +2 -2
  35. package/dist/cli/chunks/{chunk-56CE7UO4.js → chunk-4JVVVKAX.js} +6 -6
  36. package/dist/cli/chunks/chunk-4N7YXTV3.js +4 -0
  37. package/dist/cli/chunks/{chunk-N653RGT3.js → chunk-4TM5K6EZ.js} +2 -2
  38. package/dist/cli/chunks/{chunk-IAOB2G3X.js → chunk-5LEUEWJY.js} +2 -2
  39. package/dist/cli/chunks/{chunk-LRVR56PD.js → chunk-5QUOM357.js} +1 -1
  40. package/dist/cli/chunks/{chunk-NBV37CEK.js → chunk-5WOBFN2T.js} +2 -2
  41. package/dist/cli/chunks/{chunk-I7J2ESGR.js → chunk-6AKJ73X3.js} +2 -2
  42. package/dist/cli/chunks/{chunk-L77Z3Q6L.js → chunk-6EQDA4EC.js} +2 -2
  43. package/dist/cli/chunks/{chunk-3DCRAW43.js → chunk-6TYTBQPV.js} +2 -2
  44. package/dist/cli/chunks/{chunk-IQB5ZBYO.js → chunk-6V6XVGCL.js} +3 -3
  45. package/dist/cli/chunks/{chunk-DHSGCI6H.js → chunk-6W6GZHQA.js} +6 -6
  46. package/dist/cli/chunks/{chunk-MY2XZHW3.js → chunk-7IJVCDDC.js} +1 -1
  47. package/dist/cli/chunks/{chunk-AS27JP67.js → chunk-7PDC4SKR.js} +1 -1
  48. package/dist/cli/chunks/{chunk-3KXKJSKS.js → chunk-7SWHW5AC.js} +20 -20
  49. package/dist/cli/chunks/{chunk-FH6N2LKG.js → chunk-7TW5UGDP.js} +2 -2
  50. package/dist/cli/chunks/{chunk-SZYK5JL7.js → chunk-7UUSV2SK.js} +1 -1
  51. package/dist/cli/chunks/{chunk-HFF5ERIE.js → chunk-A3IQU2ND.js} +2 -2
  52. package/dist/cli/chunks/{chunk-RIAKRZCZ.js → chunk-A5H7TF7C.js} +2 -2
  53. package/dist/cli/chunks/{chunk-ATGIGJSL.js → chunk-A6PII4R4.js} +1 -1
  54. package/dist/cli/chunks/{chunk-X4CADOSD.js → chunk-AEL4XJGJ.js} +2 -2
  55. package/dist/cli/chunks/{chunk-JCB6K24D.js → chunk-AOZJ6UUZ.js} +2 -2
  56. package/dist/cli/chunks/chunk-APV5UWTU.js +15 -0
  57. package/dist/cli/chunks/{chunk-QJN5RW2U.js → chunk-AQTQ24SK.js} +3 -3
  58. package/dist/cli/chunks/{chunk-GDSLQTJC.js → chunk-AS54N3H7.js} +2 -2
  59. package/dist/cli/chunks/chunk-ASUXS4N4.js +2 -0
  60. package/dist/cli/chunks/{chunk-HS3O763N.js → chunk-B23ROYST.js} +3 -3
  61. package/dist/cli/chunks/{chunk-IHKRKRAV.js → chunk-BDKQSEEY.js} +1 -1
  62. package/dist/cli/chunks/{chunk-2B2MGJ2W.js → chunk-BO43BGHX.js} +2 -2
  63. package/dist/cli/chunks/{chunk-MDDECCAC.js → chunk-CF3BPD2R.js} +161 -159
  64. package/dist/cli/chunks/{chunk-ANI3KPB7.js → chunk-CFXROOIU.js} +2 -2
  65. package/dist/cli/chunks/{chunk-3RC5UMRJ.js → chunk-CNQUU6CF.js} +2 -2
  66. package/dist/cli/chunks/{chunk-NKWMTXBL.js → chunk-D5V6C3XG.js} +3 -3
  67. package/dist/cli/chunks/{chunk-ZIKH7U5A.js → chunk-D6PUDLJ4.js} +2 -2
  68. package/dist/cli/chunks/{chunk-FNPZINHV.js → chunk-DE3QNPTG.js} +1 -1
  69. package/dist/cli/chunks/{chunk-VTGAPHJE.js → chunk-DH5NWHH2.js} +2 -2
  70. package/dist/cli/chunks/{chunk-OWZ3F7DJ.js → chunk-DLA3EHKJ.js} +1 -1
  71. package/dist/cli/chunks/{chunk-7UA7SMM4.js → chunk-DWG4TN6A.js} +1 -1
  72. package/dist/cli/chunks/{chunk-4MCO43NX.js → chunk-EBIMVSPH.js} +4 -4
  73. package/dist/cli/chunks/{chunk-WMNVFCKY.js → chunk-ED5HUPUR.js} +2 -2
  74. package/dist/cli/chunks/{chunk-Y5VPLOA7.js → chunk-EQGT4VLC.js} +1 -1
  75. package/dist/cli/chunks/{chunk-ZVQSIH7Y.js → chunk-F5BREV2Q.js} +8 -8
  76. package/dist/cli/chunks/{chunk-CV7E627D.js → chunk-FPFGN2Z5.js} +2 -2
  77. package/dist/cli/chunks/{chunk-GJ7DON5S.js → chunk-FTUNC4EI.js} +3 -3
  78. package/dist/cli/chunks/chunk-FXTZXZCU.js +54 -0
  79. package/dist/cli/chunks/{chunk-6UO5YSNN.js → chunk-GJB3LPCS.js} +2 -2
  80. package/dist/cli/chunks/{chunk-6WVEICL2.js → chunk-GPZH6OPP.js} +4 -4
  81. package/dist/cli/chunks/{chunk-T5N2PIPS.js → chunk-HR7RL4PB.js} +2 -2
  82. package/dist/cli/chunks/{chunk-IT753IPZ.js → chunk-HSR53REE.js} +2 -2
  83. package/dist/cli/chunks/{chunk-DNS37AHW.js → chunk-HU474NXP.js} +1 -1
  84. package/dist/cli/chunks/{chunk-NP2WWIZ3.js → chunk-HV3ZVUHO.js} +1 -1
  85. package/dist/cli/chunks/{chunk-ITM26I6O.js → chunk-HVIFA73X.js} +2 -2
  86. package/dist/cli/chunks/{chunk-Q32UGPWK.js → chunk-HW4V7BVV.js} +2 -2
  87. package/dist/cli/chunks/{chunk-5DFPAJ5O.js → chunk-I5VJ3FBC.js} +2 -2
  88. package/dist/cli/chunks/{chunk-AR5V7VNC.js → chunk-IARE5VGI.js} +1 -1
  89. package/dist/cli/chunks/chunk-INVDDFJC.js +2 -0
  90. package/dist/cli/chunks/{chunk-M36DAETL.js → chunk-JJBTM4JO.js} +2 -2
  91. package/dist/cli/chunks/chunk-JVQK6NGI.js +14 -0
  92. package/dist/cli/chunks/{chunk-TMYGGYRY.js → chunk-K65X6CQA.js} +1 -1
  93. package/dist/cli/chunks/{chunk-HBMBO4FD.js → chunk-KCBCYF7M.js} +2 -2
  94. package/dist/cli/chunks/{chunk-V67UQRQN.js → chunk-KGS6H2HB.js} +2 -2
  95. package/dist/cli/chunks/{chunk-JSTKSPYT.js → chunk-L6OSEWOS.js} +1 -1
  96. package/dist/cli/chunks/{chunk-LH3H4V7C.js → chunk-LEB6O2IN.js} +2 -2
  97. package/dist/cli/chunks/{chunk-JIRX6KUR.js → chunk-LPZAB3N2.js} +3 -3
  98. package/dist/cli/chunks/{chunk-A6L2OCMO.js → chunk-M3ACHBC7.js} +2 -2
  99. package/dist/cli/chunks/{chunk-WBZIOTY6.js → chunk-M3ONCPSU.js} +2 -2
  100. package/dist/cli/chunks/{chunk-EATZW5T2.js → chunk-MUSYQF53.js} +2 -2
  101. package/dist/cli/chunks/{chunk-GSC6JXDE.js → chunk-MZDUBFLP.js} +1 -1
  102. package/dist/cli/chunks/{chunk-2Q4Y3VQ6.js → chunk-NT6FYFJA.js} +2 -2
  103. package/dist/cli/chunks/{chunk-HADOG2PT.js → chunk-O66D4NEJ.js} +2 -2
  104. package/dist/cli/chunks/{chunk-QZNFZ5IQ.js → chunk-OGARNKLS.js} +2 -2
  105. package/dist/cli/chunks/{chunk-QGCFMACF.js → chunk-OKNMZLGB.js} +2 -2
  106. package/dist/cli/chunks/{chunk-TC4B5D4Z.js → chunk-OMHISPPF.js} +1 -1
  107. package/dist/cli/chunks/{chunk-DGKPGRBT.js → chunk-OT6SOPAL.js} +2 -2
  108. package/dist/cli/chunks/{chunk-W6PLBRRS.js → chunk-OTTTHNIT.js} +1 -1
  109. package/dist/cli/chunks/{chunk-JFFVYCTV.js → chunk-P36IODAM.js} +2 -2
  110. package/dist/cli/chunks/{chunk-EDRIROCG.js → chunk-P6EGRAQG.js} +2 -2
  111. package/dist/cli/chunks/{chunk-HOBBYORR.js → chunk-PBUWNMZ2.js} +1 -1
  112. package/dist/cli/chunks/{chunk-Z3PANQUT.js → chunk-POTVF6BY.js} +1 -1
  113. package/dist/cli/chunks/{chunk-SVHFSOGT.js → chunk-POVP6O6K.js} +1 -1
  114. package/dist/cli/chunks/{chunk-LVDZ25VX.js → chunk-PPA53NJB.js} +2 -2
  115. package/dist/cli/chunks/{chunk-GHXNRF63.js → chunk-PUPEKA2J.js} +2 -2
  116. package/dist/cli/chunks/{chunk-RLQ4MYB6.js → chunk-QDQLL2QB.js} +2 -2
  117. package/dist/cli/chunks/{chunk-O6QTCUSL.js → chunk-QSVNVDA5.js} +1 -1
  118. package/dist/cli/chunks/{chunk-UKRK3IE3.js → chunk-QUXX2DP7.js} +2 -2
  119. package/dist/cli/chunks/{chunk-T75PWWK4.js → chunk-QVNMTMDJ.js} +2 -2
  120. package/dist/cli/chunks/{chunk-3XF7YTQC.js → chunk-QZBFMXO5.js} +52 -52
  121. package/dist/cli/chunks/{chunk-BT6TZTCL.js → chunk-RDTR43YN.js} +2 -2
  122. package/dist/cli/chunks/{chunk-55T7PDYP.js → chunk-RGD2CG23.js} +2 -2
  123. package/dist/cli/chunks/{chunk-NWYAV2UG.js → chunk-RQUSJEON.js} +2 -2
  124. package/dist/cli/chunks/{chunk-2AOAEMJG.js → chunk-RRSZ27A7.js} +2 -2
  125. package/dist/cli/chunks/{chunk-6XLCFDIB.js → chunk-RWLOERKK.js} +2 -2
  126. package/dist/cli/chunks/{chunk-5YS2DF5G.js → chunk-RWQDRPN5.js} +2 -2
  127. package/dist/cli/chunks/{chunk-CFDIYZGA.js → chunk-S7D4GD7H.js} +2 -2
  128. package/dist/cli/chunks/{chunk-NLY5NUHZ.js → chunk-SKHP5WUP.js} +2 -2
  129. package/dist/cli/chunks/{chunk-HMDSBWF6.js → chunk-SP2JO53K.js} +2 -2
  130. package/dist/cli/chunks/{chunk-WJ7657IX.js → chunk-SRDECRTL.js} +2 -2
  131. package/dist/cli/chunks/{chunk-CRYZXTSQ.js → chunk-TBVPNN65.js} +2 -2
  132. package/dist/cli/chunks/{chunk-UX4BOI6K.js → chunk-U5AVZ3T2.js} +1 -1
  133. package/dist/cli/chunks/{chunk-ZSKQPXRW.js → chunk-UCSGZVJX.js} +1 -1
  134. package/dist/cli/chunks/{chunk-URWT3EQT.js → chunk-UGNTLSBL.js} +2 -2
  135. package/dist/cli/chunks/{chunk-IM67YHDK.js → chunk-UTALYUMW.js} +2 -2
  136. package/dist/cli/chunks/{chunk-FCMCQ6OX.js → chunk-UZDTRCVU.js} +2 -2
  137. package/dist/cli/chunks/{chunk-WUSSZ2S6.js → chunk-V5NYGDSX.js} +2 -2
  138. package/dist/cli/chunks/{chunk-KTLYL3BS.js → chunk-VGN46ZT4.js} +2 -2
  139. package/dist/cli/chunks/{chunk-MOSXT6AO.js → chunk-VHBZADYK.js} +2 -2
  140. package/dist/cli/chunks/{chunk-6OL2WES5.js → chunk-VOKIUF7I.js} +1 -1
  141. package/dist/cli/chunks/{chunk-HYWW4A2E.js → chunk-VRT736E3.js} +2 -2
  142. package/dist/cli/chunks/{chunk-Z7XCXHEB.js → chunk-VUBLJBHQ.js} +2 -2
  143. package/dist/cli/chunks/{chunk-6O4KVU4K.js → chunk-VX7CQUO7.js} +2 -2
  144. package/dist/cli/chunks/{chunk-YYVLMW65.js → chunk-W7EHNX3Y.js} +2 -2
  145. package/dist/cli/chunks/{chunk-J4EJMAH3.js → chunk-WI7I6LMM.js} +1 -1
  146. package/dist/cli/chunks/{chunk-5TEPPW4J.js → chunk-WLOHTLHO.js} +2 -2
  147. package/dist/cli/chunks/{chunk-WBCE6V2N.js → chunk-WQZBKLAG.js} +1 -1
  148. package/dist/cli/chunks/{chunk-YH7VOLBP.js → chunk-WSND64RL.js} +2 -2
  149. package/dist/cli/chunks/{chunk-D75HDHX3.js → chunk-WSUYEVSY.js} +1 -1
  150. package/dist/cli/chunks/{chunk-HXT4XDQO.js → chunk-WTMLRMKW.js} +2 -2
  151. package/dist/cli/chunks/{chunk-FRZVLRVR.js → chunk-WW4RJ6BH.js} +2 -2
  152. package/dist/cli/chunks/{chunk-QR5ILM34.js → chunk-X335K4SU.js} +2 -2
  153. package/dist/cli/chunks/{chunk-326V7N25.js → chunk-X33LID2T.js} +1 -1
  154. package/dist/cli/chunks/{chunk-NL6HKEPR.js → chunk-XTGVGZ4J.js} +3 -3
  155. package/dist/cli/chunks/{chunk-AXJ75X6I.js → chunk-XV2TIODR.js} +1 -1
  156. package/dist/cli/chunks/{chunk-2JEPRQMT.js → chunk-XXW4KFBB.js} +1 -1
  157. package/dist/cli/chunks/{chunk-TZH2QAFZ.js → chunk-YCGU2LI7.js} +2 -2
  158. package/dist/cli/chunks/chunk-YGEC3PSD.js +2 -0
  159. package/dist/cli/chunks/{chunk-W7P7EOJ4.js → chunk-YGKU2QRC.js} +1 -1
  160. package/dist/cli/chunks/{chunk-XQBH3366.js → chunk-YHZGFWJE.js} +2 -2
  161. package/dist/cli/chunks/{chunk-E6GANSLP.js → chunk-YJH7UFA2.js} +2 -2
  162. package/dist/cli/chunks/{chunk-IBAXNCR2.js → chunk-YQ3ZW47V.js} +2 -2
  163. package/dist/cli/chunks/{chunk-MYDZBABD.js → chunk-YTRGMILO.js} +2 -2
  164. package/dist/cli/chunks/chunk-YW4GM36K.js +2 -0
  165. package/dist/cli/chunks/{chunk-W5EKSBS4.js → chunk-Z7JPWXW2.js} +2 -2
  166. package/dist/cli/chunks/{chunk-2AWU2E6R.js → chunk-Z7UGEQ4G.js} +1 -1
  167. package/dist/cli/chunks/{chunk-B4H66LPR.js → chunk-ZATQLTYL.js} +1 -1
  168. package/dist/cli/chunks/{chunk-N4MNSEKY.js → chunk-ZI6NJEBY.js} +1 -1
  169. package/dist/cli/chunks/{chunk-YJSKT6G6.js → chunk-ZJW4HRUA.js} +1 -1
  170. package/dist/cli/chunks/{chunk-QB7H62A4.js → chunk-ZL2GYU7H.js} +2 -2
  171. package/dist/cli/chunks/{ci-JNBOR6FP.js → ci-JPISJ25U.js} +3 -3
  172. package/dist/cli/chunks/{ci-output-FYNKONEQ.js → ci-output-DPHTFIGX.js} +2 -2
  173. package/dist/cli/chunks/{circuit-breaker-KOIXRDAD.js → circuit-breaker-PQ65VU2M.js} +2 -2
  174. package/dist/cli/chunks/{claude-flow-setup-4CO7KHRN.js → claude-flow-setup-GKHVO7AD.js} +2 -2
  175. package/dist/cli/chunks/client-BS7I637W.js +2 -0
  176. package/dist/cli/chunks/{cline-installer-CMYAPKK5.js → cline-installer-HWMQZJ64.js} +2 -2
  177. package/dist/cli/chunks/{code-WFIAEP3H.js → code-OTY7BF3D.js} +3 -3
  178. package/dist/cli/chunks/{code-index-extractor-IYM6HWJN.js → code-index-extractor-FG3TMHHR.js} +2 -2
  179. package/dist/cli/chunks/{codex-installer-DORVWRSU.js → codex-installer-63JARKKS.js} +2 -2
  180. package/dist/cli/chunks/{completions-54VM2MX2.js → completions-4ZHONFML.js} +2 -2
  181. package/dist/cli/chunks/{complexity-analyzer-EGZDP5N4.js → complexity-analyzer-FYHTJW5Y.js} +2 -2
  182. package/dist/cli/chunks/{continuedev-installer-4SDVDD4T.js → continuedev-installer-ZAWDSUR3.js} +2 -2
  183. package/dist/cli/chunks/{copilot-installer-7FJQ7PCL.js → copilot-installer-5QK565JX.js} +2 -2
  184. package/dist/cli/chunks/core-handlers-UG7RMTK5.js +2 -0
  185. package/dist/cli/chunks/cost-tracker-AWWMPPBJ.js +2 -0
  186. package/dist/cli/chunks/{coverage-DI5LDRJ7.js → coverage-SMFQEGKE.js} +3 -3
  187. package/dist/cli/chunks/cross-domain-router-NX7F6TOF.js +2 -0
  188. package/dist/cli/chunks/{cursor-installer-RTSZP5YD.js → cursor-installer-3BL7JACV.js} +2 -2
  189. package/dist/cli/chunks/{daemon-LM7LETPV.js → daemon-OJ624POF.js} +4 -4
  190. package/dist/cli/chunks/{daemon-SP3APEZY.js → daemon-R6ULBHHF.js} +3 -3
  191. package/dist/cli/chunks/{dag-attention-scheduler-C3QBODFE.js → dag-attention-scheduler-J6I3LTMY.js} +2 -2
  192. package/dist/cli/chunks/{detect-I4RBUFFJ.js → detect-5Q5W33UR.js} +2 -2
  193. package/dist/cli/chunks/{dist-node-PT6TCBCO.js → dist-node-GJNW56NA.js} +2 -2
  194. package/dist/cli/chunks/{domain-handler-MJMTMB5X.js → domain-handler-IZQY2G44.js} +2 -2
  195. package/dist/cli/chunks/{domain-plugins-Y4A2WYJW.js → domain-plugins-PIGO3KI2.js} +2 -2
  196. package/dist/cli/chunks/{domain-transfer-DUO42TLA.js → domain-transfer-NU3B4FQG.js} +2 -2
  197. package/dist/cli/chunks/dream-GYEH57FW.js +2 -0
  198. package/dist/cli/chunks/{embed-and-insert-pattern-66ZQK4AI.js → embed-and-insert-pattern-5QDDRPWV.js} +2 -2
  199. package/dist/cli/chunks/{eval-NQ7H27UF.js → eval-TB5HOAUY.js} +2 -2
  200. package/dist/cli/chunks/{experience-capture-middleware-MHEYPTIG.js → experience-capture-middleware-SIYVLKDE.js} +3 -3
  201. package/dist/cli/chunks/{fast-paths-YYDGN6ZC.js → fast-paths-T7QELS6D.js} +2 -2
  202. package/dist/cli/chunks/{feature-flags-YFGUORHY.js → feature-flags-T3CNNYMJ.js} +2 -2
  203. package/dist/cli/chunks/{feature-flags-FY4DOYS2.js → feature-flags-TNZ7ZAJV.js} +2 -2
  204. package/dist/cli/chunks/{file-discovery-TOMDY7TK.js → file-discovery-M45P2ZCY.js} +2 -2
  205. package/dist/cli/chunks/{fleet-MO3UCWB4.js → fleet-DSBZPHBZ.js} +3 -3
  206. package/dist/cli/chunks/{gnn-wrapper-SLW4PPXQ.js → gnn-wrapper-EHODCF32.js} +2 -2
  207. package/dist/cli/chunks/{heartbeat-handler-36RFCP4E.js → heartbeat-handler-V5DBVF7V.js} +4 -4
  208. package/dist/cli/chunks/heartbeat-scheduler-4TJ3T7LR.js +2 -0
  209. package/dist/cli/chunks/hnsw-adapter-PHFK4EAP.js +2 -0
  210. package/dist/cli/chunks/hnsw-index-434XDDBH.js +2 -0
  211. package/dist/cli/chunks/{hnsw-legacy-bridge-BJLWBKHE.js → hnsw-legacy-bridge-IYKDYA2F.js} +2 -2
  212. package/dist/cli/chunks/{hnswlib-node-RAYNVJCJ.js → hnswlib-node-DKG4LW3X.js} +2 -2
  213. package/dist/cli/chunks/{hooks-JMHFWVEQ.js → hooks-VKNMAILY.js} +10 -10
  214. package/dist/cli/chunks/hybrid-backend-DYVJQENQ.js +2 -0
  215. package/dist/cli/chunks/{hypergraph-engine-JUDBKPOX.js → hypergraph-engine-AXZVP7A7.js} +2 -2
  216. package/dist/cli/chunks/{hypergraph-handler-AXTWXOZU.js → hypergraph-handler-6EO6JN4Z.js} +3 -3
  217. package/dist/cli/chunks/impact-analyzer-CBAST6M2.js +2 -0
  218. package/dist/cli/chunks/{init-handler-PARJNZFF.js → init-handler-N3NG3RHN.js} +6 -6
  219. package/dist/cli/chunks/init-wizard-DWIJW7HY.js +2 -0
  220. package/dist/cli/chunks/kernel-AQGCS4X2.js +2 -0
  221. package/dist/cli/chunks/{kilocode-installer-22HX2E4V.js → kilocode-installer-JICGAHLM.js} +2 -2
  222. package/dist/cli/chunks/{kiro-installer-OVPBLY7J.js → kiro-installer-VYBFP6ZH.js} +2 -2
  223. package/dist/cli/chunks/knowledge-graph-2ICXFUUV.js +2 -0
  224. package/dist/cli/chunks/{learning-DWXPJ3R6.js → learning-3BHEZEPK.js} +3 -3
  225. package/dist/cli/chunks/{llm-router-7PPVVKNG.js → llm-router-GPTEZCUN.js} +4 -4
  226. package/dist/cli/chunks/llm-router-service-C47RGTH6.js +2 -0
  227. package/dist/cli/chunks/{load-VI5XHNZA.js → load-W5BIRPU4.js} +2 -2
  228. package/dist/cli/chunks/load-test-LRDAW3N6.js +2 -0
  229. package/dist/cli/chunks/{mcp-UW4Z3Z64.js → mcp-EBV4DZPG.js} +2 -2
  230. package/dist/cli/chunks/{memory-UD2KCB5M.js → memory-7F6YYKNL.js} +5 -5
  231. package/dist/cli/chunks/memory-backend-UFBAYPQ6.js +2 -0
  232. package/dist/cli/chunks/memory-handlers-OGLJHAAJ.js +2 -0
  233. package/dist/cli/chunks/{multi-model-executor-5O4WWU5Z.js → multi-model-executor-3ZIA2YOL.js} +2 -2
  234. package/dist/cli/chunks/{opencode-installer-DTRFDGM7.js → opencode-installer-2XRZUTLR.js} +2 -2
  235. package/dist/cli/chunks/{orchestrator-ENJIKV6Z.js → orchestrator-VSZVJUJW.js} +85 -26
  236. package/dist/cli/chunks/pattern-null-store-27FCITT3.js +2 -0
  237. package/dist/cli/chunks/{pattern-usage-recorder-QPNIU5PD.js → pattern-usage-recorder-I2IGVHRL.js} +2 -2
  238. package/dist/cli/chunks/{pipeline-G3JYDNPE.js → pipeline-5G3O6WBY.js} +2 -2
  239. package/dist/cli/chunks/{platform-P4WR6N3D.js → platform-6GUFDIA3.js} +2 -2
  240. package/dist/cli/chunks/{plugin-C7763Q5W.js → plugin-GYXE4CIC.js} +2 -2
  241. package/dist/cli/chunks/{prime-radiant-advanced-wasm-DH6R3XSZ.js → prime-radiant-advanced-wasm-THX6JLGZ.js} +2 -2
  242. package/dist/cli/chunks/{project-root-7DTXDLEG.js → project-root-QJRBKZQU.js} +2 -2
  243. package/dist/cli/chunks/protocol-executor-XWXXTMEW.js +2 -0
  244. package/dist/cli/chunks/{protocol-handler-EODULGOZ.js → protocol-handler-B54LRU26.js} +2 -2
  245. package/dist/cli/chunks/{prove-A7G3SIOF.js → prove-PCY2WQOD.js} +2 -2
  246. package/dist/cli/chunks/qe-reasoning-bank-3RMYXENE.js +2 -0
  247. package/dist/cli/chunks/{quality-JTURFUX3.js → quality-LPVDZC7U.js} +2 -2
  248. package/dist/cli/chunks/{quality-gate-M2EI754V.js → quality-gate-L3KXL6WE.js} +3 -3
  249. package/dist/cli/chunks/queen-coordinator-AS6DZ7UJ.js +2 -0
  250. package/dist/cli/chunks/{real-embeddings-DI7JMCG7.js → real-embeddings-N3H523PJ.js} +2 -2
  251. package/dist/cli/chunks/{ref-validation-MSFMNKDR.js → ref-validation-6BKDPHZ7.js} +2 -2
  252. package/dist/cli/chunks/{roocode-installer-XIMFFHOH.js → roocode-installer-NSGGTWXE.js} +2 -2
  253. package/dist/cli/chunks/router-OVNLNGHO.js +2 -0
  254. package/dist/cli/chunks/routing-feedback-TBOWEB6H.js +2 -0
  255. package/dist/cli/chunks/{routing-handler-MCDKNBQW.js → routing-handler-SRQNUBG3.js} +2 -2
  256. package/dist/cli/chunks/{ruvector-commands-OBSYAK2X.js → ruvector-commands-2IGULGDE.js} +2 -2
  257. package/dist/cli/chunks/rvf-dual-writer-YJYRCYGT.js +2 -0
  258. package/dist/cli/chunks/rvf-migration-adapter-VMRQ2SFO.js +2 -0
  259. package/dist/cli/chunks/{rvf-migration-coordinator-4DTRIHY6.js → rvf-migration-coordinator-ZD6WK5CK.js} +2 -2
  260. package/dist/cli/chunks/rvf-native-adapter-B75L3ALW.js +2 -0
  261. package/dist/cli/chunks/{rvf-store-integrity-CWAVMRC4.js → rvf-store-integrity-QULKUBBI.js} +2 -2
  262. package/dist/cli/chunks/safe-db-CRQHMCV6.js +2 -0
  263. package/dist/cli/chunks/schedule-L3DKJRXU.js +2 -0
  264. package/dist/cli/chunks/scheduler-VRHYUGY5.js +2 -0
  265. package/dist/cli/chunks/{security-74TWSO74.js → security-JW4EBARW.js} +3 -3
  266. package/dist/cli/chunks/{shared-rvf-adapter-ZHNAGE5H.js → shared-rvf-adapter-VQ7NJTGY.js} +2 -2
  267. package/dist/cli/chunks/{shared-rvf-dual-writer-BS5WAVCC.js → shared-rvf-dual-writer-SKTS52HK.js} +2 -2
  268. package/dist/cli/chunks/sqlite-persistence-JVAZETTL.js +2 -0
  269. package/dist/cli/chunks/{standalone-memory-3HGHTE7S.js → standalone-memory-3N4YJCSY.js} +2 -2
  270. package/dist/cli/chunks/{status-handler-XWEEGNGH.js → status-handler-5BQ2IIDG.js} +2 -2
  271. package/dist/cli/chunks/{structural-health-TB5JGMVS.js → structural-health-WGYR2RJB.js} +2 -2
  272. package/dist/cli/chunks/{sync-T4VLBURM.js → sync-DLKSXTIR.js} +2 -2
  273. package/dist/cli/chunks/sync-R5OKUBTQ.js +2 -0
  274. package/dist/cli/chunks/{task-handler-RQ65QKXX.js → task-handler-Z5KNTSUX.js} +2 -2
  275. package/dist/cli/chunks/{task-handlers-USYWJ4H2.js → task-handlers-RZFMYFSC.js} +3 -3
  276. package/dist/cli/chunks/test-LHWKZJRN.js +34 -0
  277. package/dist/cli/chunks/test-scheduling-EN7WXUMS.js +15 -0
  278. package/dist/cli/chunks/token-bootstrap-4V3OO4EC.js +2 -0
  279. package/dist/cli/chunks/{token-usage-CISTB5K5.js → token-usage-PFC2BYBS.js} +2 -2
  280. package/dist/cli/chunks/{transformers-C7LV763N.js → transformers-VZCC4SHC.js} +2 -2
  281. package/dist/cli/chunks/{tree-sitter-wasm-parser-P26JC3YV.js → tree-sitter-wasm-parser-ZYDQXGKN.js} +2 -2
  282. package/dist/cli/chunks/{types-YMVMKIWB.js → types-I6AWHZZQ.js} +2 -2
  283. package/dist/cli/chunks/unified-memory-WOOCCIUM.js +2 -0
  284. package/dist/cli/chunks/unified-memory-hnsw-PDDHFLUB.js +2 -0
  285. package/dist/cli/chunks/unified-persistence-6ETD3JSC.js +2 -0
  286. package/dist/cli/chunks/{upgrade-U2REOPAW.js → upgrade-T7SG75PA.js} +2 -2
  287. package/dist/cli/chunks/{validate-NDTCKN7P.js → validate-YLYEHTY3.js} +2 -2
  288. package/dist/cli/chunks/{validate-swarm-OJUGVH5Q.js → validate-swarm-VTLTRUE3.js} +2 -2
  289. package/dist/cli/chunks/visual-security-O4OT2YPY.js +2 -0
  290. package/dist/cli/chunks/{web-tree-sitter-2CLRSA7K.js → web-tree-sitter-JUM7ZY5M.js} +2 -2
  291. package/dist/cli/chunks/{windsurf-installer-DSUJJ4PG.js → windsurf-installer-4KS2466T.js} +2 -2
  292. package/dist/cli/chunks/witness-chain-67JHPDCN.js +2 -0
  293. package/dist/cli/chunks/{witness-chain-TEGL4ZWB.js → witness-chain-E4X6TOCT.js} +2 -2
  294. package/dist/cli/chunks/witness-chain-repair-MB53OZO6.js +2 -0
  295. package/dist/cli/chunks/{witness-chain-verifier-SPXKFC67.js → witness-chain-verifier-LBWJHO7Y.js} +2 -2
  296. package/dist/cli/chunks/{witness-key-manager-EALOV4OV.js → witness-key-manager-5IHVMXHJ.js} +2 -2
  297. package/dist/cli/chunks/{workflow-PYI6HCAG.js → workflow-XUQXIRNE.js} +4 -4
  298. package/dist/cli/chunks/workflow-orchestrator-ZVFSNRYZ.js +2 -0
  299. package/dist/cli/chunks/wrappers-YVF5SQUN.js +2 -0
  300. package/dist/cli/commands/test.js +30 -12
  301. package/dist/cli/utils/generated-test-writer.d.ts +35 -0
  302. package/dist/cli/utils/generated-test-writer.js +44 -0
  303. package/dist/context/compiler.js +4 -1
  304. package/dist/coordination/consensus/providers/ollama-provider.js +16 -27
  305. package/dist/coordination/consensus/providers/openrouter-provider.js +13 -24
  306. package/dist/coordination/handlers/test-execution-handlers.js +4 -2
  307. package/dist/coordination/protocols/defect-investigation.js +4 -1
  308. package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +3 -3
  309. package/dist/domains/coverage-analysis/services/gap-detector.js +3 -1
  310. package/dist/domains/learning-optimization/services/learning-coordinator.js +4 -2
  311. package/dist/domains/test-execution/services/flaky-detector.js +8 -2
  312. package/dist/domains/test-execution/services/retry-handler.js +23 -20
  313. package/dist/domains/test-execution/services/test-executor.js +5 -2
  314. package/dist/domains/test-generation/services/test-generator.js +5 -2
  315. package/dist/governance/compliance-reporter.js +8 -7
  316. package/dist/governance/proof-envelope-integration.js +3 -1
  317. package/dist/init/phases/07-hooks.js +30 -4
  318. package/dist/init/phases/10-workers.js +42 -6
  319. package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.d.ts +4 -1
  320. package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.js +6 -2
  321. package/dist/integrations/browser/qe-dashboard/wasm-vector-store.js +2 -1
  322. package/dist/integrations/ruvector/coverage-router.d.ts +3 -1
  323. package/dist/integrations/ruvector/coverage-router.js +7 -6
  324. package/dist/integrations/ruvector/diff-risk-classifier.js +5 -4
  325. package/dist/integrations/ruvector/rvf-dual-writer.js +10 -1
  326. package/dist/integrations/vibium/runtime.js +2 -6
  327. package/dist/learning/dream/dream-engine.d.ts +5 -0
  328. package/dist/learning/dream/dream-engine.js +20 -3
  329. package/dist/learning/embedding-space.d.ts +18 -0
  330. package/dist/learning/embedding-space.js +33 -0
  331. package/dist/learning/rvf-pattern-store.js +19 -5
  332. package/dist/mcp/bundle.js +443 -441
  333. package/dist/mcp/handlers/handler-factory.js +3 -1
  334. package/dist/mcp/handlers/save-results-option.d.ts +62 -0
  335. package/dist/mcp/handlers/save-results-option.js +35 -0
  336. package/dist/mcp/protocol-server.js +22 -11
  337. package/dist/mcp/security/rate-limiter.d.ts +8 -1
  338. package/dist/mcp/security/rate-limiter.js +33 -4
  339. package/dist/mcp/services/session-resume.js +11 -0
  340. package/dist/mcp/services/session-store.d.ts +31 -2
  341. package/dist/mcp/services/session-store.js +84 -15
  342. package/dist/mcp/services/session-write-buffer.d.ts +55 -0
  343. package/dist/mcp/services/session-write-buffer.js +144 -0
  344. package/dist/memory/crdt/g-counter.js +10 -8
  345. package/dist/shared/embeddings/ollama-client.d.ts +1 -1
  346. package/dist/shared/embeddings/ollama-client.js +30 -31
  347. package/dist/shared/git/git-analyzer.d.ts +4 -1
  348. package/dist/shared/git/git-analyzer.js +9 -4
  349. package/dist/shared/llm/cost-tracker.js +8 -6
  350. package/dist/shared/llm/providers/azure-openai.js +5 -21
  351. package/dist/shared/llm/providers/bedrock.js +5 -21
  352. package/dist/shared/llm/providers/claude.js +5 -21
  353. package/dist/shared/llm/providers/cognitum.js +5 -17
  354. package/dist/shared/llm/providers/gemini.js +9 -23
  355. package/dist/shared/llm/providers/ollama.js +5 -21
  356. package/dist/shared/llm/providers/openai.js +5 -21
  357. package/dist/shared/llm/providers/openrouter.js +9 -23
  358. package/dist/shared/llm/providers/response-deadline.d.ts +3 -0
  359. package/dist/shared/llm/providers/response-deadline.js +100 -0
  360. package/dist/shared/llm/spend-ledger.js +3 -2
  361. package/dist/shared/metrics/code-metrics.d.ts +1 -0
  362. package/dist/shared/metrics/code-metrics.js +3 -44
  363. package/dist/shared/metrics/cognitive-complexity.d.ts +17 -0
  364. package/dist/shared/metrics/cognitive-complexity.js +108 -0
  365. package/dist/shared/npm-cli-invocation.d.ts +21 -0
  366. package/dist/shared/npm-cli-invocation.js +28 -0
  367. package/dist/shared/optional-module.js +24 -0
  368. package/dist/shared/test-runner-args.d.ts +42 -0
  369. package/dist/shared/test-runner-args.js +74 -0
  370. package/dist/shared/utils/safe-record.d.ts +18 -0
  371. package/dist/shared/utils/safe-record.js +28 -0
  372. package/dist/test-scheduling/executors/vitest-executor.js +23 -5
  373. package/dist/workers/quality-daemon/git-watcher.js +5 -0
  374. package/package.json +1 -1
  375. package/dist/adapters/ag-ui/json-patch-utils.d.ts +0 -136
  376. package/dist/adapters/ag-ui/json-patch-utils.js +0 -575
  377. package/dist/cli/chunks/adapter-EUIELRLI.js +0 -2
  378. package/dist/cli/chunks/aqe-learning-engine-LXRKHASR.js +0 -2
  379. package/dist/cli/chunks/base-4DSLX33Y.js +0 -2
  380. package/dist/cli/chunks/browser-workflow-AWCQLQZK.js +0 -2
  381. package/dist/cli/chunks/chunk-E2QHUMCR.js +0 -2
  382. package/dist/cli/chunks/chunk-I7ECEOFV.js +0 -2
  383. package/dist/cli/chunks/chunk-LW4BCFIV.js +0 -15
  384. package/dist/cli/chunks/chunk-QJGKL67W.js +0 -54
  385. package/dist/cli/chunks/chunk-X43HA3RF.js +0 -14
  386. package/dist/cli/chunks/chunk-Z3K4JZXQ.js +0 -4
  387. package/dist/cli/chunks/client-UJVHZXNQ.js +0 -2
  388. package/dist/cli/chunks/core-handlers-AFXZOSH3.js +0 -2
  389. package/dist/cli/chunks/cost-tracker-D6YSKTQC.js +0 -2
  390. package/dist/cli/chunks/cross-domain-router-ZLNVKLIR.js +0 -2
  391. package/dist/cli/chunks/dream-4OPJXXEG.js +0 -2
  392. package/dist/cli/chunks/heartbeat-scheduler-J5KLHO6C.js +0 -2
  393. package/dist/cli/chunks/hnsw-adapter-56P6XSFR.js +0 -2
  394. package/dist/cli/chunks/hnsw-index-GFZ6XCEW.js +0 -2
  395. package/dist/cli/chunks/hybrid-backend-TUBWJDDN.js +0 -2
  396. package/dist/cli/chunks/impact-analyzer-FXVGKS6B.js +0 -2
  397. package/dist/cli/chunks/init-wizard-LK73HQ7W.js +0 -2
  398. package/dist/cli/chunks/kernel-TCZDKRSI.js +0 -2
  399. package/dist/cli/chunks/knowledge-graph-TWMB2GH2.js +0 -2
  400. package/dist/cli/chunks/llm-router-service-HPDH3P77.js +0 -2
  401. package/dist/cli/chunks/load-test-HTYOUYSN.js +0 -2
  402. package/dist/cli/chunks/memory-backend-X5BE2MPK.js +0 -2
  403. package/dist/cli/chunks/memory-handlers-SQXMFX5X.js +0 -2
  404. package/dist/cli/chunks/pattern-null-store-OCQGQZU6.js +0 -2
  405. package/dist/cli/chunks/protocol-executor-CYEQHQCL.js +0 -2
  406. package/dist/cli/chunks/qe-reasoning-bank-GSTA5WJ4.js +0 -2
  407. package/dist/cli/chunks/queen-coordinator-Y2Q5RQL7.js +0 -2
  408. package/dist/cli/chunks/router-4QB5L4IW.js +0 -2
  409. package/dist/cli/chunks/routing-feedback-YBVHJY5L.js +0 -2
  410. package/dist/cli/chunks/rvf-dual-writer-T5B456SW.js +0 -2
  411. package/dist/cli/chunks/rvf-migration-adapter-2O2NL7ZF.js +0 -2
  412. package/dist/cli/chunks/rvf-native-adapter-RDB3GWTW.js +0 -2
  413. package/dist/cli/chunks/safe-db-YXVMLFU4.js +0 -2
  414. package/dist/cli/chunks/schedule-K6XWCCSK.js +0 -2
  415. package/dist/cli/chunks/scheduler-4MW22D6Q.js +0 -2
  416. package/dist/cli/chunks/sqlite-persistence-UVDHUSAU.js +0 -2
  417. package/dist/cli/chunks/sync-LSPNSVDI.js +0 -2
  418. package/dist/cli/chunks/test-M2XTKD62.js +0 -33
  419. package/dist/cli/chunks/test-scheduling-GYXJQHJL.js +0 -15
  420. package/dist/cli/chunks/token-bootstrap-OTEMRUFR.js +0 -2
  421. package/dist/cli/chunks/unified-memory-UUK77NSE.js +0 -2
  422. package/dist/cli/chunks/unified-memory-hnsw-JOUE6WNF.js +0 -2
  423. package/dist/cli/chunks/unified-persistence-3DRJGNQE.js +0 -2
  424. package/dist/cli/chunks/visual-security-EM7FQG5X.js +0 -2
  425. package/dist/cli/chunks/witness-chain-7NZ6IIUN.js +0 -2
  426. package/dist/cli/chunks/witness-chain-repair-ZWS5WXFL.js +0 -2
  427. package/dist/cli/chunks/workflow-orchestrator-3C3S5FIM.js +0 -2
  428. package/dist/cli/chunks/wrappers-NXJHGK3W.js +0 -2
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.2");process.exit(0)}
3
- import{b}from"./chunks/chunk-J4EJMAH3.js";import{b as v,c as E,e as A}from"./chunks/chunk-IAOB2G3X.js";import{d as P}from"./chunks/chunk-HFF5ERIE.js";import{a as C}from"./chunks/chunk-2AWU2E6R.js";import{b as L,c as y,d as I}from"./chunks/chunk-YH7VOLBP.js";import{a as W}from"./chunks/chunk-I7ECEOFV.js";import{b as k,c as F}from"./chunks/chunk-CV7E627D.js";import"./chunks/chunk-5TEPPW4J.js";import{a as g,e as T}from"./chunks/chunk-3KTAMNKI.js";import{Q as w,S as H}from"./chunks/chunk-3DCRAW43.js";import{h as S}from"./chunks/chunk-GHXNRF63.js";import"./chunks/chunk-MYDZBABD.js";import"./chunks/chunk-JSTKSPYT.js";import"./chunks/chunk-N653RGT3.js";import"./chunks/chunk-D75HDHX3.js";T();H();import{createRequire as G}from"node:module";import{Command as j}from"commander";import l from"chalk";W();F();I();var x=!1;function h(){if(!x){x=!0;try{P()}catch{}try{S()}catch{}try{L()}catch{}}}function D(e,a,c,i){let m=e.command(a).description(c);if(i)for(let u of i)m.alias(u);return m.helpOption(!1),m.allowUnknownOption(!0),m.allowExcessArguments(!0),m}function R(e,a){let c=e.commands,i=c.indexOf(a);i>=0&&c.splice(i,1)}function n(e,a){let c=D(e,a.name,a.description,a.aliases);c.action(async()=>{try{let i=await a.factory();R(e,c),e.addCommand(i),await e.parseAsync(process.argv)}catch(i){console.error(`Failed to load command '${a.name}':`,i instanceof Error?i.message:i),process.exit(1)}})}function d(e,a,c,i,m,u){let f=D(e,a,c,u);f.action(async()=>{try{let p=await i();R(e,f),p.register(e,m),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${a}':`,p instanceof Error?p.message:p),process.exit(1)}})}I();A();process.on("exit",h);var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function q(e,a){let c=e.getDomainAPI("visual-accessibility");if(c?.registerWorkflowActions)try{c.registerWorkflowActions(a)}catch(m){console.error(l.yellow(` Warning: Could not register visual-accessibility workflow actions: ${g(m)}`))}let i=e.getDomainAPI("requirements-validation");if(i?.registerWorkflowActions)try{i.registerWorkflowActions(a)}catch(m){console.error(l.yellow(` Warning: Could not register requirements-validation workflow actions: ${g(m)}`))}}async function B(){let{QEKernelImpl:e}=await import("./chunks/kernel-TCZDKRSI.js"),{CrossDomainEventRouter:a}=await import("./chunks/cross-domain-router-ZLNVKLIR.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-CYEQHQCL.js"),{WorkflowOrchestrator:i}=await import("./chunks/workflow-orchestrator-3C3S5FIM.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-Y2Q5RQL7.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-4MW22D6Q.js"),{loadCLIDomainPlugins:f}=await import("./chunks/domain-plugins-Y4A2WYJW.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...C],enableExperienceBridge:!1}),await t.kernel.initialize();let p=await f(t.kernel.plugins);t.router=new a(t.kernel.eventBus),await t.router.initialize();let O=_=>t.kernel.getDomainAPI(_),V=new c(t.kernel.eventBus,t.kernel.memory,O);t.workflowOrchestrator=new i(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),q(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=m(t.kernel,t.router,V,void 0,p),await t.queen.initialize();let{adoptExternalFleet:M}=await import("./chunks/core-handlers-AFXZOSH3.js");M({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function Q(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=await import("path"),{findProjectRoot:c}=await import("./chunks/project-root-7DTXDLEG.js"),i=a.join(c(),".agentic-qe");return e.existsSync(i)?s():(console.error(l.red(`
2
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.3");process.exit(0)}
3
+ import{b}from"./chunks/chunk-WI7I6LMM.js";import{b as v,c as E,e as A}from"./chunks/chunk-5LEUEWJY.js";import{d as P}from"./chunks/chunk-A3IQU2ND.js";import{a as C}from"./chunks/chunk-Z7UGEQ4G.js";import{b as L,c as y,d as I}from"./chunks/chunk-WSND64RL.js";import{a as W}from"./chunks/chunk-INVDDFJC.js";import{b as k,c as F}from"./chunks/chunk-FPFGN2Z5.js";import"./chunks/chunk-WLOHTLHO.js";import{a as g,e as T}from"./chunks/chunk-2GJJGO5D.js";import{Q as w,S as H}from"./chunks/chunk-6TYTBQPV.js";import{h as S}from"./chunks/chunk-PUPEKA2J.js";import"./chunks/chunk-YTRGMILO.js";import"./chunks/chunk-L6OSEWOS.js";import"./chunks/chunk-4TM5K6EZ.js";import"./chunks/chunk-WSUYEVSY.js";T();H();import{createRequire as G}from"node:module";import{Command as j}from"commander";import l from"chalk";W();F();I();var x=!1;function h(){if(!x){x=!0;try{P()}catch{}try{S()}catch{}try{L()}catch{}}}function D(e,a,c,i){let m=e.command(a).description(c);if(i)for(let u of i)m.alias(u);return m.helpOption(!1),m.allowUnknownOption(!0),m.allowExcessArguments(!0),m}function R(e,a){let c=e.commands,i=c.indexOf(a);i>=0&&c.splice(i,1)}function n(e,a){let c=D(e,a.name,a.description,a.aliases);c.action(async()=>{try{let i=await a.factory();R(e,c),e.addCommand(i),await e.parseAsync(process.argv)}catch(i){console.error(`Failed to load command '${a.name}':`,i instanceof Error?i.message:i),process.exit(1)}})}function d(e,a,c,i,m,u){let f=D(e,a,c,u);f.action(async()=>{try{let p=await i();R(e,f),p.register(e,m),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${a}':`,p instanceof Error?p.message:p),process.exit(1)}})}I();A();process.on("exit",h);var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function q(e,a){let c=e.getDomainAPI("visual-accessibility");if(c?.registerWorkflowActions)try{c.registerWorkflowActions(a)}catch(m){console.error(l.yellow(` Warning: Could not register visual-accessibility workflow actions: ${g(m)}`))}let i=e.getDomainAPI("requirements-validation");if(i?.registerWorkflowActions)try{i.registerWorkflowActions(a)}catch(m){console.error(l.yellow(` Warning: Could not register requirements-validation workflow actions: ${g(m)}`))}}async function B(){let{QEKernelImpl:e}=await import("./chunks/kernel-AQGCS4X2.js"),{CrossDomainEventRouter:a}=await import("./chunks/cross-domain-router-NX7F6TOF.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-XWXXTMEW.js"),{WorkflowOrchestrator:i}=await import("./chunks/workflow-orchestrator-ZVFSNRYZ.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-AS6DZ7UJ.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-VRHYUGY5.js"),{loadCLIDomainPlugins:f}=await import("./chunks/domain-plugins-PIGO3KI2.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...C],enableExperienceBridge:!1}),await t.kernel.initialize();let p=await f(t.kernel.plugins);t.router=new a(t.kernel.eventBus),await t.router.initialize();let O=_=>t.kernel.getDomainAPI(_),V=new c(t.kernel.eventBus,t.kernel.memory,O);t.workflowOrchestrator=new i(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),q(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=m(t.kernel,t.router,V,void 0,p),await t.queen.initialize();let{adoptExternalFleet:M}=await import("./chunks/core-handlers-UG7RMTK5.js");M({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function Q(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=await import("path"),{findProjectRoot:c}=await import("./chunks/project-root-QJRBKZQU.js"),i=a.join(c(),".agentic-qe");return e.existsSync(i)?s():(console.error(l.red(`
4
4
  Error: AQE system not initialized in this directory.`)),console.log(l.yellow("Run `aqe init` first to set up this project.\n")),process.exitCode=1,!1)}async function s(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=E(1);e&&process.stderr.write(l.gray("Auto-initializing v3 system...")+`
5
5
  `);let a=3e4,c=new Promise((i,m)=>{setTimeout(()=>m(new Error("Initialization timeout after 30 seconds")),a)});try{return await Promise.race([B(),c]),e&&process.stderr.write(l.green("System ready")+`
6
6
 
7
- `),!0}catch(i){return i.message.includes("timeout")?(console.error(l.red("Initialization timed out after 30 seconds.")),console.log(l.yellow("Try running `aqe init` manually."))):(console.error(l.red("Failed to auto-initialize:"),i),console.log(l.yellow("Try running `aqe init` manually."))),process.exitCode=1,!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}h(),process.exit(e)}var r=new j,N=G(import.meta.url),de=N("../../package.json").version,z="3.15.2";r.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(z).addHelpText("after",`
7
+ `),!0}catch(i){return i.message.includes("timeout")?(console.error(l.red("Initialization timed out after 30 seconds.")),console.log(l.yellow("Try running `aqe init` manually."))):(console.error(l.red("Failed to auto-initialize:"),i),console.log(l.yellow("Try running `aqe init` manually."))),process.exitCode=1,!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}h(),process.exit(e)}var r=new j,N=G(import.meta.url),de=N("../../package.json").version,z="3.15.3";r.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(z).addHelpText("after",`
8
8
  Environment:
9
9
  AQE_LOG_LEVEL Internal log level: debug | info | warn | error | silent (default: warn)
10
10
  LOG_LEVEL Same as AQE_LOG_LEVEL; AQE_LOG_LEVEL takes precedence
11
11
  AQE_VERBOSE=1 Shorthand for info-level logging (full system-init output)
12
- Diagnostics are written to stderr; stdout carries command output only.`);r.hook("preAction",(e,a)=>{v(a.opts())});d(r,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-PARJNZFF.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-XWEEGNGH.js").then(e=>e.createStatusHandler(o,Q)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-XWEEGNGH.js").then(e=>e.createHealthHandler(o,Q)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-RQ65QKXX.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-E47ITH45.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-MJMTMB5X.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-EODULGOZ.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-FKDONZYA.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-AXTWXOZU.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-36RFCP4E.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-MCDKNBQW.js").then(e=>e.createRoutingHandler(o)),t);n(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-PYI6HCAG.js").then(e=>e.createWorkflowCommand(t,o,s))});n(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-M2XTKD62.js").then(e=>e.createTestCommand(t,o,s))});n(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-DI5LDRJ7.js").then(e=>e.createCoverageCommand(t,o,s))});n(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-JTURFUX3.js").then(e=>e.createQualityCommand(t,o,s))});n(r,{name:"quality-gate",description:"Two-gate, three-valued quality verdict against a pinned checklist (ADR-119)",factory:()=>import("./chunks/quality-gate-M2EI754V.js").then(e=>e.createQualityGateCommand(t,o,s))});n(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-74TWSO74.js").then(e=>e.createSecurityCommand(t,o,s))});n(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-JM3OY263.js").then(e=>e.createArenaCommand(t,o,s))});n(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-WFIAEP3H.js").then(e=>e.createCodeCommand(t,o,s))});n(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-54VM2MX2.js").then(e=>e.createCompletionsCommand(o))});n(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-U2REOPAW.js").then(e=>e.createUpgradeCommand(o))});n(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-MO3UCWB4.js").then(e=>e.createFleetCommand(t,o,s,q))});n(r,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-OJUGVH5Q.js").then(e=>e.createValidateSwarmCommand(t,o,s))});n(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-NDTCKN7P.js").then(e=>e.createValidateCommand(t,o,s))});n(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-NQ7H27UF.js").then(e=>e.createEvalCommand())});n(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-JNBOR6FP.js").then(e=>e.createCICommand(t,o,s))});n(r,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-CISTB5K5.js").then(e=>e.createTokenUsageCommand())});n(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-7PPVVKNG.js").then(e=>e.createLLMRouterCommand())});n(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-T4VLBURM.js").then(e=>e.createSyncCommands())});n(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-JMHFWVEQ.js").then(e=>e.createHooksCommand())});n(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-DWXPJ3R6.js").then(e=>e.createLearningCommand())});n(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-UD2KCB5M.js"),import("./chunks/standalone-memory-3HGHTE7S.js")]).then(([e,a])=>e.createMemoryCommand(t,o,a.createEnsureMemoryBackend(t)))});n(r,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-UW4Z3Z64.js").then(e=>e.createMcpCommand())});n(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-P4WR6N3D.js").then(e=>e.createPlatformCommand())});n(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-A7G3SIOF.js").then(e=>e.createProveCommand(t,o,s))});n(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-OBSYAK2X.js").then(e=>e.createRuVectorCommand())});n(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-HVBRC5AS.js").then(e=>e.createAuditCommand(t,o,s))});n(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-G3JYDNPE.js").then(e=>e.createPipelineCommand(t,o,s))});n(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-C7763Q5W.js").then(e=>e.createPluginCommand())});n(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-SP3APEZY.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{y("SIGINT")||(console.log(l.yellow(`
12
+ Diagnostics are written to stderr; stdout carries command output only.`);r.hook("preAction",(e,a)=>{v(a.opts())});d(r,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-N3NG3RHN.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-5BQ2IIDG.js").then(e=>e.createStatusHandler(o,Q)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-5BQ2IIDG.js").then(e=>e.createHealthHandler(o,Q)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-Z5KNTSUX.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-WTFYFZKL.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-IZQY2G44.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-B54LRU26.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-FHKLQTB4.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-6EO6JN4Z.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-V5DBVF7V.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-SRQNUBG3.js").then(e=>e.createRoutingHandler(o)),t);n(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-XUQXIRNE.js").then(e=>e.createWorkflowCommand(t,o,s))});n(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-LHWKZJRN.js").then(e=>e.createTestCommand(t,o,s))});n(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-SMFQEGKE.js").then(e=>e.createCoverageCommand(t,o,s))});n(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-LPVDZC7U.js").then(e=>e.createQualityCommand(t,o,s))});n(r,{name:"quality-gate",description:"Two-gate, three-valued quality verdict against a pinned checklist (ADR-119)",factory:()=>import("./chunks/quality-gate-L3KXL6WE.js").then(e=>e.createQualityGateCommand(t,o,s))});n(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-JW4EBARW.js").then(e=>e.createSecurityCommand(t,o,s))});n(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-S72QW44C.js").then(e=>e.createArenaCommand(t,o,s))});n(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-OTY7BF3D.js").then(e=>e.createCodeCommand(t,o,s))});n(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-4ZHONFML.js").then(e=>e.createCompletionsCommand(o))});n(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-T7SG75PA.js").then(e=>e.createUpgradeCommand(o))});n(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-DSBZPHBZ.js").then(e=>e.createFleetCommand(t,o,s,q))});n(r,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-VTLTRUE3.js").then(e=>e.createValidateSwarmCommand(t,o,s))});n(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-YLYEHTY3.js").then(e=>e.createValidateCommand(t,o,s))});n(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-TB5HOAUY.js").then(e=>e.createEvalCommand())});n(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-JPISJ25U.js").then(e=>e.createCICommand(t,o,s))});n(r,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-PFC2BYBS.js").then(e=>e.createTokenUsageCommand())});n(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-GPTEZCUN.js").then(e=>e.createLLMRouterCommand())});n(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-DLKSXTIR.js").then(e=>e.createSyncCommands())});n(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-VKNMAILY.js").then(e=>e.createHooksCommand())});n(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-3BHEZEPK.js").then(e=>e.createLearningCommand())});n(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-7F6YYKNL.js"),import("./chunks/standalone-memory-3N4YJCSY.js")]).then(([e,a])=>e.createMemoryCommand(t,o,a.createEnsureMemoryBackend(t)))});n(r,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-EBV4DZPG.js").then(e=>e.createMcpCommand())});n(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-6GUFDIA3.js").then(e=>e.createPlatformCommand())});n(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-PCY2WQOD.js").then(e=>e.createProveCommand(t,o,s))});n(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-2IGULGDE.js").then(e=>e.createRuVectorCommand())});n(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-KPYIEQJ3.js").then(e=>e.createAuditCommand(t,o,s))});n(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-5G3O6WBY.js").then(e=>e.createPipelineCommand(t,o,s))});n(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-GYXE4CIC.js").then(e=>e.createPluginCommand())});n(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-R6ULBHHF.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{y("SIGINT")||(console.log(l.yellow(`
13
13
 
14
14
  Shutting down...`)),console.log(l.green(`Shutdown complete
15
15
  `)),await o(0))});process.on("SIGTERM",async()=>{y("SIGTERM")||(console.log(l.yellow(`
16
- Received SIGTERM, shutting down gracefully...`)),await o(0))});async function U(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-YYDGN6ZC.js");e(process.argv)&&(console.log(z),process.exit(0)),w();let a=process.argv.slice(2).filter(i=>i!=="--");if(!(a[0]==="learning"&&(a[1]==="backup"||a[1]==="restore"))){let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-OTEMRUFR.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"})}await r.parseAsync(),!b()&&await o(process.exitCode??0)}U().catch(async e=>{console.error(l.red("Fatal error:"),k(e)),await o(1)});
16
+ Received SIGTERM, shutting down gracefully...`)),await o(0))});async function U(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-T7QELS6D.js");e(process.argv)&&(console.log(z),process.exit(0)),w();let a=process.argv.slice(2).filter(i=>i!=="--");if(!(a[0]==="learning"&&(a[1]==="backup"||a[1]==="restore"))){let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-4V3OO4EC.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"})}await r.parseAsync(),!b()&&await o(process.exitCode??0)}U().catch(async e=>{console.error(l.red("Fatal error:"),k(e)),await o(1)});
@@ -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.15.3");process.exit(0)}
2
+ import{a,b,c}from"./chunk-XTGVGZ4J.js";import"./chunk-ED5HUPUR.js";import"./chunk-3MNKYCLH.js";import"./chunk-UGNTLSBL.js";import"./chunk-2GJJGO5D.js";import"./chunk-WSUYEVSY.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
@@ -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.15.2");process.exit(0)}
2
- import{a as x}from"./chunk-I7ECEOFV.js";import{e as f}from"./chunk-CV7E627D.js";import"./chunk-5TEPPW4J.js";import"./chunk-D75HDHX3.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
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.15.3");process.exit(0)}
2
+ import{a as x}from"./chunk-INVDDFJC.js";import{e as f}from"./chunk-FPFGN2Z5.js";import"./chunk-WLOHTLHO.js";import"./chunk-WSUYEVSY.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
@@ -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.15.2");process.exit(0)}
2
- import{b as p}from"./chunk-55T7PDYP.js";import{a as g}from"./chunk-ATGIGJSL.js";import"./chunk-URWT3EQT.js";import"./chunk-D75HDHX3.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),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.15.3");process.exit(0)}
2
+ import{b as p}from"./chunk-RGD2CG23.js";import{a as g}from"./chunk-A6PII4R4.js";import"./chunk-UGNTLSBL.js";import"./chunk-WSUYEVSY.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
3
3
  Agents (${a.length})
4
4
  `)),a.length===0)console.log(s.gray(" No agents found"));else{let e=new Map;for(let i of a)e.has(i.domain)||e.set(i.domain,[]),e.get(i.domain).push(i);let o=Array.from(e.entries());for(let[i,m]of o){console.log(s.cyan(` ${i}:`));for(let r of m)console.log(` ${r.id}`),console.log(` Type: ${r.type}`),console.log(` Status: ${g(r.status)}`),r.startedAt&&console.log(s.gray(` Started: ${r.startedAt.toISOString()}`));console.log("")}}}catch(a){console.error(s.red(`
5
5
  Failed to list agents:`),a),await this.cleanupAndExit(1)}}async executeSpawn(n,t,a){if(await this.ensureInitialized())try{let e=t.capabilities.split(",");console.log(s.blue(`
@@ -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.15.2");process.exit(0)}
2
- import"./chunk-D75HDHX3.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
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.15.3");process.exit(0)}
2
+ import"./chunk-WSUYEVSY.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
@@ -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.15.3");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-FTUNC4EI.js";import"./chunk-2M75CW5Q.js";import"./chunk-D5V6C3XG.js";import"./chunk-EQGT4VLC.js";import"./chunk-6W6GZHQA.js";import"./chunk-JJBTM4JO.js";import"./chunk-ZJW4HRUA.js";import"./chunk-3ZTBV6M3.js";import"./chunk-OMHISPPF.js";import"./chunk-AOZJ6UUZ.js";import"./chunk-OT6SOPAL.js";import"./chunk-UCSGZVJX.js";import"./chunk-TBVPNN65.js";import"./chunk-QUXX2DP7.js";import"./chunk-WQZBKLAG.js";import"./chunk-6EQDA4EC.js";import"./chunk-7SWHW5AC.js";import"./chunk-OGARNKLS.js";import"./chunk-UGNTLSBL.js";import"./chunk-ASUXS4N4.js";import"./chunk-UTALYUMW.js";import"./chunk-NT6FYFJA.js";import"./chunk-7TW5UGDP.js";import"./chunk-D6PUDLJ4.js";import"./chunk-M3ONCPSU.js";import"./chunk-HVIFA73X.js";import"./chunk-GPZH6OPP.js";import"./chunk-CNQUU6CF.js";import"./chunk-POTVF6BY.js";import"./chunk-Z7UGEQ4G.js";import"./chunk-WSND64RL.js";import"./chunk-INVDDFJC.js";import"./chunk-FPFGN2Z5.js";import"./chunk-WLOHTLHO.js";import"./chunk-2GJJGO5D.js";import"./chunk-6TYTBQPV.js";import"./chunk-PUPEKA2J.js";import"./chunk-YTRGMILO.js";import"./chunk-L6OSEWOS.js";import"./chunk-4TM5K6EZ.js";import"./chunk-Z7JPWXW2.js";import"./chunk-34Y4CIHD.js";import"./chunk-WSUYEVSY.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
@@ -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.15.2");process.exit(0)}
2
- import{a as c,e as f}from"./chunk-3KTAMNKI.js";import"./chunk-D75HDHX3.js";f();import{Command as $}from"commander";import r from"chalk";function x(v,g,p){let m=new $("arena").description("Competitive test-strategy tournaments (ADR-104)").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.15.3");process.exit(0)}
2
+ import{a as c,e as f}from"./chunk-2GJJGO5D.js";import"./chunk-WSUYEVSY.js";f();import{Command as $}from"commander";import r from"chalk";function x(v,g,p){let m=new $("arena").description("Competitive test-strategy tournaments (ADR-104)").addHelpText("after",`
3
3
  Examples:
4
4
  # Run a 4-strategy tournament against the demo fixture (reproducible under --seed)
5
5
  aqe arena run --strategies 4 --target fixtures/arena-demo --seed 42
@@ -9,10 +9,10 @@ Examples:
9
9
 
10
10
  # List persisted runs
11
11
  aqe arena list
12
- `);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-ZU5CGBGH.js"),t=i({target:a.target,strategies:parseInt(a.strategies,10),seed:parseInt(a.seed,10),maxMutants:parseInt(a.maxMutants,10),evolveSteps:parseInt(a.evolve,10),log:a.json?()=>{}:e=>console.error(r.dim(` ${e}`))});try{let{getUnifiedMemory:e}=await import("./unified-memory-UUK77NSE.js"),s=e();s.isInitialized()||await s.initialize(),s.getDatabase().prepare("INSERT OR REPLACE INTO kv_store (namespace, key, value) VALUES ('arena', ?, ?)").run(`run:${t.seed}:${t.target}`,JSON.stringify(t))}catch(e){console.error(r.dim(` note: run not persisted (${c(e)})`))}if(a.json){console.log(JSON.stringify(t,null,2));return}let d=new Map(t.strategies.map(e=>[e.id,e]));console.log(r.blue(`
12
+ `);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-ZFXQEVUQ.js"),t=i({target:a.target,strategies:parseInt(a.strategies,10),seed:parseInt(a.seed,10),maxMutants:parseInt(a.maxMutants,10),evolveSteps:parseInt(a.evolve,10),log:a.json?()=>{}:e=>console.error(r.dim(` ${e}`))});try{let{getUnifiedMemory:e}=await import("./unified-memory-WOOCCIUM.js"),s=e();s.isInitialized()||await s.initialize(),s.getDatabase().prepare("INSERT OR REPLACE INTO kv_store (namespace, key, value) VALUES ('arena', ?, ?)").run(`run:${t.seed}:${t.target}`,JSON.stringify(t))}catch(e){console.error(r.dim(` note: run not persisted (${c(e)})`))}if(a.json){console.log(JSON.stringify(t,null,2));return}let d=new Map(t.strategies.map(e=>[e.id,e]));console.log(r.blue(`
13
13
  Arena: ${t.target} \xB7 seed ${t.seed} \xB7 ${t.mutantsTotal} mutants
14
14
  `)),console.log(" rank id kill-rate coverage cost fitness groups"),t.ranking.forEach((e,s)=>{let n=d.get(e),u=n.coveragePct===null?" n/a":`${n.coveragePct.toFixed(2)}%`.padStart(7);console.log(` ${String(s+1).padEnd(5)}${n.id.padEnd(5)}${(n.killRate*100).toFixed(1).padStart(6)}% ${u} ${n.suiteCostRatio.toFixed(2).padEnd(6)}${n.fitness.toFixed(4).padEnd(9)}${n.name}`+(n.baselinePassed?"":r.red(" [baseline FAILED]")))}),console.log(`
15
15
  competitive array (row beats column = 1):`);let o=t.strategies.map(e=>e.id);if(console.log(` ${o.map(e=>e.padEnd(4)).join("")}`),t.competitiveArray.forEach((e,s)=>{console.log(` ${o[s].padEnd(4)}${e.map(n=>String(n).padStart(2).padEnd(4)).join("")}`)}),t.evolution.length>0){console.log(`
16
16
  evolution:`);for(let e of t.evolution)console.log(` step ${e.step}: [${e.groups.join("+")}] fitness ${e.fitness.toFixed(4)} ${e.accepted?r.green("accepted"):"rejected"}`)}let l=d.get(t.ranking[0]);console.log(r.green(`
17
17
  winner: ${l.id} [${l.name}] \u2014 kill ${(l.killRate*100).toFixed(1)}%, fitness ${l.fitness.toFixed(4)}
18
- `))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-UUK77NSE.js"),t=i();t.isInitialized()||await t.initialize();let d=t.getDatabase().prepare("SELECT key, value FROM kv_store WHERE namespace = 'arena' ORDER BY key").all();if(a.json){console.log(JSON.stringify(d.map(o=>({key:o.key,result:JSON.parse(o.value)})),null,2));return}if(d.length===0){console.log(r.yellow(" no persisted arena runs"));return}for(let o of d){let l=JSON.parse(o.value),e=l.strategies.find(s=>s.id===l.ranking[0]);console.log(` ${r.green(o.key)} \u2014 winner ${e?.id} [${e?.name}] fitness ${e?.fitness}`)}}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m}export{x as createArenaCommand};
18
+ `))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-WOOCCIUM.js"),t=i();t.isInitialized()||await t.initialize();let d=t.getDatabase().prepare("SELECT key, value FROM kv_store WHERE namespace = 'arena' ORDER BY key").all();if(a.json){console.log(JSON.stringify(d.map(o=>({key:o.key,result:JSON.parse(o.value)})),null,2));return}if(d.length===0){console.log(r.yellow(" no persisted arena runs"));return}for(let o of d){let l=JSON.parse(o.value),e=l.strategies.find(s=>s.id===l.ranking[0]);console.log(` ${r.green(o.key)} \u2014 winner ${e?.id} [${e?.name}] fitness ${e?.fitness}`)}}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m}export{x as createArenaCommand};
@@ -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.15.2");process.exit(0)}
2
- import"./chunk-D75HDHX3.js";import*as K from"fs";import*as M from"path";function G(t){let r=t>>>0;return function(){r|=0,r=r+1831565813|0;let n=Math.imul(r^r>>>15,1|r);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function w(t,r){return Math.floor(t()*r)}var z=[["===","!=="],["!==","==="],["<=","<"],[">=",">"],["&&","||"],["||","&&"],["<","<="],[">",">="],["+","-"],["*","+"]];function H(t){let r=new Array(t.length).fill(!1),n=0,e="code";for(;n<t.length;){let s=t[n],i=t[n+1];e==="code"?(s==="'"?e="single":s==='"'?e="double":s==="`"?e="template":s==="/"&&i==="/"?e="line-comment":s==="/"&&i==="*"&&(e="block-comment"),e!=="code"&&(r[n]=!0)):(r[n]=!0,e==="single"&&s==="'"&&t[n-1]!=="\\"||e==="double"&&s==='"'&&t[n-1]!=="\\"||e==="template"&&s==="`"&&t[n-1]!=="\\"||e==="line-comment"&&s===`
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.15.3");process.exit(0)}
2
+ import"./chunk-WSUYEVSY.js";import*as K from"fs";import*as M from"path";function G(t){let r=t>>>0;return function(){r|=0,r=r+1831565813|0;let n=Math.imul(r^r>>>15,1|r);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function w(t,r){return Math.floor(t()*r)}var z=[["===","!=="],["!==","==="],["<=","<"],[">=",">"],["&&","||"],["||","&&"],["<","<="],[">",">="],["+","-"],["*","+"]];function H(t){let r=new Array(t.length).fill(!1),n=0,e="code";for(;n<t.length;){let s=t[n],i=t[n+1];e==="code"?(s==="'"?e="single":s==='"'?e="double":s==="`"?e="template":s==="/"&&i==="/"?e="line-comment":s==="/"&&i==="*"&&(e="block-comment"),e!=="code"&&(r[n]=!0)):(r[n]=!0,e==="single"&&s==="'"&&t[n-1]!=="\\"||e==="double"&&s==='"'&&t[n-1]!=="\\"||e==="template"&&s==="`"&&t[n-1]!=="\\"||e==="line-comment"&&s===`
3
3
  `?e="code":e==="block-comment"&&s==="*"&&i==="/"&&(r[n+1]=!0,n++,e="code")),n++}return r}function E(t,r){let n=1;for(let e=0;e<r;e++)t[e]===`
4
4
  `&&n++;return n}function A(t,r){let n=H(t),e=new Array(t.length).fill(!1),s=[];for(let[i,c]of z){let a=t.indexOf(i);for(;a!==-1;){let u=a+i.length,y=e.slice(a,u).some(Boolean),h=n.slice(a,u).some(Boolean),v=i===">"&&t[a-1]==="=",S=(i==="<"||i===">")&&(t[u]==="="||t[a-1]==="<"||t[a-1]===">");if(!y&&!h&&!v&&!S){for(let d=a;d<u;d++)e[d]=!0;s.push({id:`${r}:${E(t,a)}:${a}:${i}->${c}`,index:a,from:i,to:c,line:E(t,a)})}a=t.indexOf(i,a+1)}}return s.sort((i,c)=>i.index-c.index)}function W(t,r){return t.slice(0,r.index)+r.to+t.slice(r.index+r.from.length)}import*as m from"fs";import*as f from"path";import*as L from"os";import{spawnSync as J}from"child_process";function I(t){let r=f.resolve(t),n=f.join(r,"src"),e=f.join(r,"tests");if(!m.existsSync(n)||!m.existsSync(e))throw new Error(`not an arena fixture (expected src/ and tests/): ${r}`);let s=m.readdirSync(n).filter(c=>c.endsWith(".mjs")).sort().map(c=>f.join("src",c)),i={};for(let c of m.readdirSync(e).filter(a=>a.endsWith(".test.mjs")).sort())i[c.replace(".test.mjs","")]=f.join("tests",c);if(s.length===0||Object.keys(i).length===0)throw new Error(`fixture has no src/*.mjs or tests/*.test.mjs: ${r}`);return{root:r,sourceFiles:s,testGroups:i}}function T(t,r){let n=m.mkdtempSync(f.join(r,"arena-ws-"));m.mkdirSync(f.join(n,"src"),{recursive:!0}),m.mkdirSync(f.join(n,"tests"),{recursive:!0});for(let e of t.layout.sourceFiles){let s=t.mutatedFile&&t.mutatedFile.relPath===e?t.mutatedFile.content:m.readFileSync(f.join(t.layout.root,e),"utf8");m.writeFileSync(f.join(n,e),s)}for(let e of t.groups){let s=t.layout.testGroups[e];m.copyFileSync(f.join(t.layout.root,s),f.join(n,s))}return n}function $(t,r={}){let n=["--test"];r.coverage&&n.push("--experimental-test-coverage");let e=m.readdirSync(f.join(t,"tests")).filter(u=>u.endsWith(".test.mjs")).sort().map(u=>f.join("tests",u));n.push(...e);let s=process.hrtime.bigint(),i=J(process.execPath,n,{cwd:t,timeout:r.timeoutMs??12e4,encoding:"utf8"}),c=Number(process.hrtime.bigint()-s)/1e6,a=null;if(r.coverage){let u=/all files\s*\|\s*([\d.]+)/.exec(i.stdout??"");a=u?Number(u[1]):null}return{ok:i.status===0,durationMs:Math.round(c),coveragePct:a}}function N(){return m.mkdtempSync(f.join(L.tmpdir(),"qe-arena-"))}function B(t){m.rmSync(t,{recursive:!0,force:!0})}var k={kill:.6,coverage:.3,runtimePenalty:.1};function Q(t,r,n){let e=[...t].sort(),s=new Set([e.join("+")]),i=[{id:"s1",name:`all(${e.join("+")})`,groups:e}],c=0;for(;i.length<r&&c++<200;){let a=e.filter(()=>n()<.5);if(a.length===0)continue;let u=a.join("+");s.has(u)||(s.add(u),i.push({id:`s${i.length+1}`,name:u,groups:a}))}return i}function C(t,r,n){let e=r===null?0:r/100,s=k.kill*t+k.coverage*e-k.runtimePenalty*n;return Math.round(s*1e4)/1e4}function D(t,r,n,e){let s=T({layout:t,groups:r.groups},e),i=$(s,{coverage:!0});if(!i.ok)return{baselinePassed:!1,killed:0,total:0,coveragePct:i.coveragePct,runtimeMs:i.durationMs};let c=0,a=0;for(let u of n)for(let y of u.mutants){a++;let h=T({layout:t,groups:r.groups,mutatedFile:{relPath:u.relPath,content:W(u.source,y)}},e);$(h).ok||c++}return{baselinePassed:!0,killed:c,total:a,coveragePct:i.coveragePct,runtimeMs:i.durationMs}}function rt(t){let r=t.seed??42,n=t.log??(()=>{}),e=G(r),s=I(t.target),i=N();try{let c=t.maxMutants??24,a=s.sourceFiles.map(l=>{let o=K.readFileSync(M.join(s.root,l),"utf8");return{relPath:l,source:o,mutants:A(o,l)}}),u=a.flatMap(l=>l.mutants.map(o=>({file:l.relPath,m:o})));if(u.length>c){let l=new Set;for(;l.size<c;)l.add(u[w(e,u.length)].m.id);for(let o of a)o.mutants=o.mutants.filter(p=>l.has(p.id));u=a.flatMap(o=>o.mutants.map(p=>({file:o.relPath,m:p})))}n(`mutants: ${u.length} (of ${a.reduce((l,o)=>l+A(o.source,o.relPath).length,0)} enumerated)`);let y=Q(Object.keys(s.testGroups),t.strategies??4,e),h={},v=y.map(l=>{n(`evaluating ${l.id} [${l.name}] ...`);let o=D(s,l,a,i);return h[l.id]=o.runtimeMs,{s:l,e:o}}),S=Object.keys(s.testGroups).length,d=v.map(({s:l,e:o})=>{let p=o.total>0?Math.round(o.killed/o.total*1e4)/1e4:0,g=Math.round(l.groups.length/S*1e4)/1e4;return{...l,baselinePassed:o.baselinePassed,mutantsKilled:o.killed,mutantsTotal:o.total,killRate:p,coveragePct:o.coveragePct,suiteCostRatio:g,fitness:o.baselinePassed?C(p,o.coveragePct,g):0}}),P=[...d].sort((l,o)=>o.fitness-l.fitness||l.id.localeCompare(o.id)).map(l=>l.id),U=d.map(l=>d.map(o=>l.fitness>o.fitness?1:l.fitness<o.fitness?-1:0)),j=[];if(t.evolveSteps&&t.evolveSteps>0){let l=Object.keys(s.testGroups).sort(),o=d.find(g=>g.id===P[0]).groups,p=d.find(g=>g.id===P[0]).fitness;for(let g=1;g<=t.evolveSteps;g++){let R=l[w(e,l.length)],b=o.includes(R)?o.filter(q=>q!==R):[...o,R].sort();if(b.length===0){j.push({step:g,groups:b,fitness:0,accepted:!1});continue}let x=D(s,{id:`evo${g}`,name:b.join("+"),groups:b},a,i),_=x.total>0?x.killed/x.total:0,F=x.baselinePassed?C(_,x.coveragePct,b.length/l.length):0,O=F>p;j.push({step:g,groups:b,fitness:F,accepted:O}),O&&(o=b,p=F)}}return{contract:"arena-result@1",seed:r,target:M.relative(process.cwd(),s.root)||".",weights:{...k},mutantsTotal:u.length,strategies:d,ranking:P,competitiveArray:U,evolution:j,informational:{runtimesMs:h}}}finally{B(i)}}export{Q as buildStrategies,rt as runArena};
@@ -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.15.2");process.exit(0)}
2
- import{d as g,e as y,f as k,g as w}from"./chunk-2B2MGJ2W.js";import{s as x}from"./chunk-3KXKJSKS.js";import"./chunk-QZNFZ5IQ.js";import"./chunk-URWT3EQT.js";import"./chunk-IM67YHDK.js";import"./chunk-2Q4Y3VQ6.js";import"./chunk-FH6N2LKG.js";import"./chunk-ZIKH7U5A.js";import"./chunk-WBZIOTY6.js";import"./chunk-ITM26I6O.js";import"./chunk-3RC5UMRJ.js";import"./chunk-YH7VOLBP.js";import"./chunk-I7ECEOFV.js";import"./chunk-CV7E627D.js";import"./chunk-5TEPPW4J.js";import"./chunk-3KTAMNKI.js";import"./chunk-3DCRAW43.js";import{b as l}from"./chunk-MYDZBABD.js";import"./chunk-W5EKSBS4.js";import{p as F,q as j}from"./chunk-PZK7O445.js";import{f as v}from"./chunk-D75HDHX3.js";import{Command as E}from"commander";import s from"chalk";x();import{existsSync as f}from"node:fs";import p from"node:path";function b(e,a,n){let t=[];t.push(s.bold("Witness Chain Audit Verification")),t.push("");let r=a?s.green("ENABLED"):s.yellow("DISABLED");t.push(` Feature Flag: ${r}`),t.push(` Chain Length: ${e.length} receipts`);let o=n?.status==="forked"?s.yellow("FORKED (no tampering detected)"):e.valid?s.green(n?.status==="valid-with-forks"?"VALID (forks re-anchored)":"VALID"):s.red(n?.status==="tampered"?"BROKEN (tampering detected)":"BROKEN");t.push(` Integrity: ${o}`),e.length>0&&t.push(` Last Hash: ${e.lastHash.slice(0,16)}...`);let i=n?.forks?.length??0;if(i>0){let d=n?.acknowledgedForks?.length??0;t.push(` Forks: ${i} accidental (pre-3.14.5 concurrent writes, #753), ${d} re-anchored`)}if(n?.status==="forked")t.push(""),t.push(s.yellow(` ${e.message}`));else if(!e.valid&&e.brokenAt>=0){t.push("");let d=n?.status==="tampered"&&n.tamperedAt!==void 0?n.tamperedAt:e.brokenAt;t.push(s.red(` Break detected at index ${d}${n?.tamperReason?` (${n.tamperReason})`:""}`)),t.push(s.red(` ${e.message}`))}else e.valid&&i>0&&(t.push(""),t.push(s.green(` ${e.message}`)));return t.push(""),t.join(`
3
- `)}function O(){try{let e=l(),a=p.join(e,".agentic-qe","memory.db");if(!f(a))return null;let n=(j(),v(F)),t=new n(a),r=g(t),o=k(r);return t.close(),o}catch{return null}}async function P(e){let a=w(),t=(O()??y()).verifyChain(),r={featureEnabled:a,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return e.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(b(t,a)),r}async function L(e){let{WitnessChain:a,hashWith:n,serializeEntry:t}=await import("./witness-chain-7NZ6IIUN.js"),{dbPath:r,keyDir:o}=R(),i;if(!f(r))i={featureEnabled:!0,chainLength:0,integrity:!0,brokenAt:-1,lastHash:"",message:`No database found at ${r} \u2014 nothing to verify`};else{let{default:d}=await import("./better-sqlite3-45JLBQX3.js"),u=new d(r,{readonly:!0});try{let m=new a(u,await A(o)??void 0);await m.initialize();let c=m.verify({includeArchive:!0,checkSignatures:!1}),{tableExists:C}=await import("./witness-chain-verifier-SPXKFC67.js"),h=C(u,"witness_chain")?u.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get():void 0,$=h?n(h.hash_algo||"sha256",t(h)):"";i={featureEnabled:!0,chainLength:c.entriesChecked,integrity:c.valid,brokenAt:c.brokenAt??-1,lastHash:$,message:V(c),status:c.status,tampered:c.tampered,...c.tamperedAt!==void 0?{tamperedAt:c.tamperedAt}:{},...c.tamperReason?{tamperReason:c.tamperReason}:{},forks:c.forks,acknowledgedForks:c.acknowledgedForks}}finally{u.close()}}return e.format==="json"?console.log(JSON.stringify(i,null,2)):console.log(b({valid:i.integrity,length:i.chainLength,brokenAt:i.brokenAt,lastHash:i.lastHash,message:i.message},i.featureEnabled,i)),i}function R(){let e=l();return{dbPath:p.join(e,".agentic-qe","memory.db"),keyDir:p.join(e,".agentic-qe","witness-keys")}}async function A(e){if(!f(e))return null;let{WitnessKeyManager:a}=await import("./witness-key-manager-EALOV4OV.js");return new a({keyDir:e,autoGenerate:!1})}function V(e){let a=e.entriesChecked,n=e.forks.length,t=n-e.acknowledgedForks.length;switch(e.status){case"valid":return`Audit chain verified: ${a} entries checked, ${e.signatureFailures??0} signature failures`;case"valid-with-forks":return`Audit chain verified: ${a} entries checked; ${n} accidental fork(s) from pre-3.14.5 concurrent writes are re-anchored by CHAIN_REANCHOR, no tampering detected`;case"forked":return`${t} accidental fork(s) (pre-3.14.5 concurrent writes, #753), no tampering detected \u2014 ${a} entries checked, first fork at id=${e.brokenAt}. Run \`aqe audit repair --chain audit\` to back up the store and re-anchor.`;default:return`Audit chain BROKEN: tampering detected at id=${e.tamperedAt} (${e.tamperReason}); ${a} entries checked`+(n>0?`, ${n} accidental fork(s) found before it`:"")}}function W(e){return e.action==="refused"?!0:e.action==="reanchored"&&!(e.after?.status==="valid"||e.after?.status==="valid-with-forks")}async function D(e){let{repairWitnessChainForks:a}=await import("./witness-chain-repair-ZWS5WXFL.js"),{dbPath:n,keyDir:t}=R(),r=e.dryRun===!0,o;if(f(n)){let{openDatabase:i}=await import("./safe-db-YXVMLFU4.js"),d=i(n,{readonly:r,fileMustExist:!0});try{let u=r?await A(t):(await import("./witness-key-manager-EALOV4OV.js")).getDefaultWitnessKeyManager();o=await a(d,{dbPath:n,dryRun:r,keyManager:u})}finally{d.close()}}else{let i={status:"valid",entriesChecked:0,forks:0,unacknowledgedForks:0};o={action:"none",dryRun:r,message:`No database found at ${n} \u2014 nothing to repair`,before:i,rowsBefore:{live:0,archive:0},rowsAfter:{live:0,archive:0},forksAcknowledged:[]}}return e.format==="json"?console.log(JSON.stringify(o,null,2)):console.log(S(o)),o}function S(e){let a=e.action==="refused"?s.red:e.action==="reanchored"?s.green:s.yellow,n=[s.bold("Witness Chain Audit Repair"),"",` Action: ${a(e.action.toUpperCase())}${e.dryRun?" (dry run)":""}`,` Before: ${e.before.status}, ${e.before.forks} fork(s), ${e.before.unacknowledgedForks} unacknowledged`,` Rows: live ${e.rowsBefore.live} -> ${e.rowsAfter.live}, archive ${e.rowsBefore.archive} -> ${e.rowsAfter.archive}`];return e.after&&n.push(` After: ${e.after.status}`),e.backupPath&&n.push(` Backup: ${e.backupPath}`),n.push("",` ${a(e.message)}`,""),n.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.15.3");process.exit(0)}
2
+ import{d as g,e as y,f as k,g as w}from"./chunk-BO43BGHX.js";import{s as x}from"./chunk-7SWHW5AC.js";import"./chunk-OGARNKLS.js";import"./chunk-UGNTLSBL.js";import"./chunk-ASUXS4N4.js";import"./chunk-UTALYUMW.js";import"./chunk-NT6FYFJA.js";import"./chunk-7TW5UGDP.js";import"./chunk-D6PUDLJ4.js";import"./chunk-M3ONCPSU.js";import"./chunk-HVIFA73X.js";import"./chunk-CNQUU6CF.js";import"./chunk-WSND64RL.js";import"./chunk-INVDDFJC.js";import"./chunk-FPFGN2Z5.js";import"./chunk-WLOHTLHO.js";import"./chunk-2GJJGO5D.js";import"./chunk-6TYTBQPV.js";import{b as l}from"./chunk-YTRGMILO.js";import"./chunk-Z7JPWXW2.js";import{p as F,q as j}from"./chunk-34Y4CIHD.js";import{f as v}from"./chunk-WSUYEVSY.js";import{Command as E}from"commander";import s from"chalk";x();import{existsSync as f}from"node:fs";import p from"node:path";function b(e,a,n){let t=[];t.push(s.bold("Witness Chain Audit Verification")),t.push("");let r=a?s.green("ENABLED"):s.yellow("DISABLED");t.push(` Feature Flag: ${r}`),t.push(` Chain Length: ${e.length} receipts`);let o=n?.status==="forked"?s.yellow("FORKED (no tampering detected)"):e.valid?s.green(n?.status==="valid-with-forks"?"VALID (forks re-anchored)":"VALID"):s.red(n?.status==="tampered"?"BROKEN (tampering detected)":"BROKEN");t.push(` Integrity: ${o}`),e.length>0&&t.push(` Last Hash: ${e.lastHash.slice(0,16)}...`);let i=n?.forks?.length??0;if(i>0){let d=n?.acknowledgedForks?.length??0;t.push(` Forks: ${i} accidental (pre-3.14.5 concurrent writes, #753), ${d} re-anchored`)}if(n?.status==="forked")t.push(""),t.push(s.yellow(` ${e.message}`));else if(!e.valid&&e.brokenAt>=0){t.push("");let d=n?.status==="tampered"&&n.tamperedAt!==void 0?n.tamperedAt:e.brokenAt;t.push(s.red(` Break detected at index ${d}${n?.tamperReason?` (${n.tamperReason})`:""}`)),t.push(s.red(` ${e.message}`))}else e.valid&&i>0&&(t.push(""),t.push(s.green(` ${e.message}`)));return t.push(""),t.join(`
3
+ `)}function O(){try{let e=l(),a=p.join(e,".agentic-qe","memory.db");if(!f(a))return null;let n=(j(),v(F)),t=new n(a),r=g(t),o=k(r);return t.close(),o}catch{return null}}async function P(e){let a=w(),t=(O()??y()).verifyChain(),r={featureEnabled:a,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return e.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(b(t,a)),r}async function L(e){let{WitnessChain:a,hashWith:n,serializeEntry:t}=await import("./witness-chain-67JHPDCN.js"),{dbPath:r,keyDir:o}=R(),i;if(!f(r))i={featureEnabled:!0,chainLength:0,integrity:!0,brokenAt:-1,lastHash:"",message:`No database found at ${r} \u2014 nothing to verify`};else{let{default:d}=await import("./better-sqlite3-L2M3TI5D.js"),u=new d(r,{readonly:!0});try{let m=new a(u,await A(o)??void 0);await m.initialize();let c=m.verify({includeArchive:!0,checkSignatures:!1}),{tableExists:C}=await import("./witness-chain-verifier-LBWJHO7Y.js"),h=C(u,"witness_chain")?u.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get():void 0,$=h?n(h.hash_algo||"sha256",t(h)):"";i={featureEnabled:!0,chainLength:c.entriesChecked,integrity:c.valid,brokenAt:c.brokenAt??-1,lastHash:$,message:V(c),status:c.status,tampered:c.tampered,...c.tamperedAt!==void 0?{tamperedAt:c.tamperedAt}:{},...c.tamperReason?{tamperReason:c.tamperReason}:{},forks:c.forks,acknowledgedForks:c.acknowledgedForks}}finally{u.close()}}return e.format==="json"?console.log(JSON.stringify(i,null,2)):console.log(b({valid:i.integrity,length:i.chainLength,brokenAt:i.brokenAt,lastHash:i.lastHash,message:i.message},i.featureEnabled,i)),i}function R(){let e=l();return{dbPath:p.join(e,".agentic-qe","memory.db"),keyDir:p.join(e,".agentic-qe","witness-keys")}}async function A(e){if(!f(e))return null;let{WitnessKeyManager:a}=await import("./witness-key-manager-5IHVMXHJ.js");return new a({keyDir:e,autoGenerate:!1})}function V(e){let a=e.entriesChecked,n=e.forks.length,t=n-e.acknowledgedForks.length;switch(e.status){case"valid":return`Audit chain verified: ${a} entries checked, ${e.signatureFailures??0} signature failures`;case"valid-with-forks":return`Audit chain verified: ${a} entries checked; ${n} accidental fork(s) from pre-3.14.5 concurrent writes are re-anchored by CHAIN_REANCHOR, no tampering detected`;case"forked":return`${t} accidental fork(s) (pre-3.14.5 concurrent writes, #753), no tampering detected \u2014 ${a} entries checked, first fork at id=${e.brokenAt}. Run \`aqe audit repair --chain audit\` to back up the store and re-anchor.`;default:return`Audit chain BROKEN: tampering detected at id=${e.tamperedAt} (${e.tamperReason}); ${a} entries checked`+(n>0?`, ${n} accidental fork(s) found before it`:"")}}function W(e){return e.action==="refused"?!0:e.action==="reanchored"&&!(e.after?.status==="valid"||e.after?.status==="valid-with-forks")}async function D(e){let{repairWitnessChainForks:a}=await import("./witness-chain-repair-MB53OZO6.js"),{dbPath:n,keyDir:t}=R(),r=e.dryRun===!0,o;if(f(n)){let{openDatabase:i}=await import("./safe-db-CRQHMCV6.js"),d=i(n,{readonly:r,fileMustExist:!0});try{let u=r?await A(t):(await import("./witness-key-manager-5IHVMXHJ.js")).getDefaultWitnessKeyManager();o=await a(d,{dbPath:n,dryRun:r,keyManager:u})}finally{d.close()}}else{let i={status:"valid",entriesChecked:0,forks:0,unacknowledgedForks:0};o={action:"none",dryRun:r,message:`No database found at ${n} \u2014 nothing to repair`,before:i,rowsBefore:{live:0,archive:0},rowsAfter:{live:0,archive:0},forksAcknowledged:[]}}return e.format==="json"?console.log(JSON.stringify(o,null,2)):console.log(S(o)),o}function S(e){let a=e.action==="refused"?s.red:e.action==="reanchored"?s.green:s.yellow,n=[s.bold("Witness Chain Audit Repair"),"",` Action: ${a(e.action.toUpperCase())}${e.dryRun?" (dry run)":""}`,` Before: ${e.before.status}, ${e.before.forks} fork(s), ${e.before.unacknowledgedForks} unacknowledged`,` Rows: live ${e.rowsBefore.live} -> ${e.rowsAfter.live}, archive ${e.rowsBefore.archive} -> ${e.rowsAfter.archive}`];return e.after&&n.push(` After: ${e.after.status}`),e.backupPath&&n.push(` Backup: ${e.backupPath}`),n.push("",` ${a(e.message)}`,""),n.join(`
4
4
  `)}function q(e,a,n){let t=new E("audit").description("Witness chain audit trail management");return t.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").option("-C, --chain <chain>","Which chain to verify: governance (29 decision receipts) or audit (full QE audit trail)","governance").action(async r=>{try{let o=r.format,i=r.chain==="audit"?await L({format:o}):await P({format:o});await a(i.integrity?0:1)}catch(o){console.error("Failed to verify witness chain:",o),await a(1)}}),t.command("repair").description("Re-anchor accidental pre-3.14.5 forks in the audit chain (#753); backs up first, refuses on tampering").option("-C, --chain <chain>",'Chain to repair (only "audit" is supported)',"audit").option("--dry-run","Report what would be done without writing anything",!1).option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{if(r.chain!=="audit"){console.error(`aqe audit repair supports only --chain audit (got "${r.chain}")`),await a(1);return}let o=await D({format:r.format,dryRun:r.dryRun===!0});await a(W(o)?1:0)}catch(o){console.error("Failed to repair witness chain:",o),await a(1)}}),t}export{q as createAuditCommand,b as formatVerificationText,D as handleAuditChainRepair,L as handleAuditChainVerify,P as handleAuditVerify};
@@ -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.15.3");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-AS54N3H7.js";import"./chunk-YHZGFWJE.js";import"./chunk-GJB3LPCS.js";import"./chunk-7SWHW5AC.js";import"./chunk-OGARNKLS.js";import"./chunk-UGNTLSBL.js";import"./chunk-ASUXS4N4.js";import"./chunk-UTALYUMW.js";import"./chunk-NT6FYFJA.js";import"./chunk-7TW5UGDP.js";import"./chunk-D6PUDLJ4.js";import"./chunk-M3ONCPSU.js";import"./chunk-HVIFA73X.js";import"./chunk-CNQUU6CF.js";import"./chunk-POTVF6BY.js";import"./chunk-WSND64RL.js";import"./chunk-INVDDFJC.js";import"./chunk-FPFGN2Z5.js";import"./chunk-WLOHTLHO.js";import"./chunk-2GJJGO5D.js";import"./chunk-6TYTBQPV.js";import"./chunk-YTRGMILO.js";import"./chunk-Z7JPWXW2.js";import"./chunk-34Y4CIHD.js";import"./chunk-WSUYEVSY.js";export{l as MCPToolBase,k as defaultToolLogger,j as getKernel,i as getLLMRouter,e as getMemoryBackend,g as getSharedLLMRouter,c as getSharedMemoryBackend,a as isMemoryOnlyMode,b as registerRvfResetFn,h as resetSharedLLMRouter,d as resetSharedMemoryBackend,f as setSharedLLMRouter};
@@ -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.15.2");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-PZK7O445.js";import"./chunk-D75HDHX3.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o 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.15.3");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-34Y4CIHD.js";import"./chunk-WSUYEVSY.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
@@ -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.15.2");process.exit(0)}
2
- import{a as L,b as z,c as K,d as _,e as ie,f as W,g as G,h as A,i as Ce,j as se,k as Q,l as xe,m as J,n as le,o as Ie,p as P,q as Y,r as X,s as Z,t as ee}from"./chunk-NBV37CEK.js";import{c as Ee}from"./chunk-JCB6K24D.js";import{b as ve}from"./chunk-DGKPGRBT.js";import{a as Se,d as ae,e as _e}from"./chunk-ZSKQPXRW.js";import"./chunk-3KXKJSKS.js";import"./chunk-QZNFZ5IQ.js";import{b as k,d as oe}from"./chunk-URWT3EQT.js";import"./chunk-IM67YHDK.js";import"./chunk-2Q4Y3VQ6.js";import"./chunk-FH6N2LKG.js";import"./chunk-ZIKH7U5A.js";import"./chunk-WBZIOTY6.js";import"./chunk-ITM26I6O.js";import"./chunk-3RC5UMRJ.js";import"./chunk-YH7VOLBP.js";import"./chunk-I7ECEOFV.js";import"./chunk-CV7E627D.js";import"./chunk-5TEPPW4J.js";import"./chunk-3KTAMNKI.js";import"./chunk-3DCRAW43.js";import"./chunk-MYDZBABD.js";import{a as we,b as Re,c as H,d as V,f as nn}from"./chunk-N653RGT3.js";import{a as F,b as tn}from"./chunk-W5EKSBS4.js";import"./chunk-PZK7O445.js";import"./chunk-D75HDHX3.js";import $ from"path";import o from"chalk";tn();oe();import{existsSync as te,mkdirSync as rn,writeFileSync as on,readFileSync as ce}from"fs";import{join as D,resolve as de}from"path";function ne(e,n){let r="shake256",t=JSON.stringify(n),a=e.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get(),i=a?ae(r,_e(a)):Se;e.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.15.3");process.exit(0)}
2
+ import{a as L,b as z,c as K,d as _,e as ie,f as W,g as G,h as A,i as Ce,j as se,k as Q,l as xe,m as J,n as le,o as Ie,p as P,q as Y,r as X,s as Z,t as ee}from"./chunk-5WOBFN2T.js";import{c as Ee}from"./chunk-AOZJ6UUZ.js";import{b as ve}from"./chunk-OT6SOPAL.js";import{a as Se,d as ae,e as _e}from"./chunk-UCSGZVJX.js";import"./chunk-7SWHW5AC.js";import"./chunk-OGARNKLS.js";import{b as k,d as oe}from"./chunk-UGNTLSBL.js";import"./chunk-ASUXS4N4.js";import"./chunk-UTALYUMW.js";import"./chunk-NT6FYFJA.js";import"./chunk-7TW5UGDP.js";import"./chunk-D6PUDLJ4.js";import"./chunk-M3ONCPSU.js";import"./chunk-HVIFA73X.js";import"./chunk-CNQUU6CF.js";import"./chunk-WSND64RL.js";import"./chunk-INVDDFJC.js";import"./chunk-FPFGN2Z5.js";import"./chunk-WLOHTLHO.js";import"./chunk-2GJJGO5D.js";import"./chunk-6TYTBQPV.js";import"./chunk-YTRGMILO.js";import{a as we,b as Re,c as H,d as V,f as nn}from"./chunk-4TM5K6EZ.js";import{a as F,b as tn}from"./chunk-Z7JPWXW2.js";import"./chunk-34Y4CIHD.js";import"./chunk-WSUYEVSY.js";import $ from"path";import o from"chalk";tn();oe();import{existsSync as te,mkdirSync as rn,writeFileSync as on,readFileSync as ce}from"fs";import{join as D,resolve as de}from"path";function ne(e,n){let r="shake256",t=JSON.stringify(n),a=e.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get(),i=a?ae(r,_e(a)):Se;e.prepare(`
3
3
  INSERT INTO witness_chain
4
4
  (prev_hash, action_hash, action_type, action_data, timestamp, actor, hash_algo)
5
5
  VALUES (?, ?, 'BRAIN_IMPORT', ?, ?, 'brain-import', ?)
@@ -79,7 +79,7 @@ Examples:
79
79
  aqe brain diff ./brain-a ./brain-b --verbose
80
80
  aqe brain search -i ./brain-export --query oauth --domain test-generation
81
81
  aqe brain search -i ./brain-export --since 2026-03-01 --limit 50 --json
82
- `}};async function ye(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-UUK77NSE.js");return $.join(n(),".agentic-qe","memory.db")}function Ze(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Wn(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function Jn(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let i=a.trim();i&&r.push(i)}return r.length>0?r:void 0}function Un(e,n){console.log(o.blue(`
82
+ `}};async function ye(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-WOOCCIUM.js");return $.join(n(),".agentic-qe","memory.db")}function Ze(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Wn(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function Jn(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let i=a.trim();i&&r.push(i)}return r.length>0?r:void 0}function Un(e,n){console.log(o.blue(`
83
83
  Brain Diff
84
84
  `)),console.log(` A: ${o.cyan(e.pathA)} (${e.formatA})`),console.log(` B: ${o.cyan(e.pathB)} (${e.formatB})`),console.log(` Versions: ${o.cyan(e.manifestA.version)} \u2192 ${o.cyan(e.manifestB.version)}`+(e.versionMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Checksums: ${o.gray(e.manifestA.checksum.slice(0,12))}\u2026 \u2192 ${o.gray(e.manifestB.checksum.slice(0,12))}\u2026`+(e.checksumMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Exported: ${o.gray(e.manifestA.exportedAt)} \u2192 ${o.gray(e.manifestB.exportedAt)}`),console.log(` Records: ${o.cyan(e.manifestA.totalRecords)} \u2192 ${o.cyan(e.manifestB.totalRecords)} `+en(e.manifestB.totalRecords-e.manifestA.totalRecords)),(e.domainsOnlyInA.length>0||e.domainsOnlyInB.length>0)&&(console.log(o.blue(`
85
85
  Domains:`)),e.domainsOnlyInA.length>0&&console.log(` Only in A: ${o.yellow(e.domainsOnlyInA.join(", "))}`),e.domainsOnlyInB.length>0&&console.log(` Only in B: ${o.yellow(e.domainsOnlyInB.join(", "))}`)),e.recordLevel||console.log(o.gray(`
@@ -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.15.2");process.exit(0)}
2
- import"./chunk-D75HDHX3.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
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.15.3");process.exit(0)}
2
+ import"./chunk-WSUYEVSY.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
3
3
  `),l=!1;for(let i=0;i<n.length;i++){let d=n[i],t=d.trim(),c=i+1,u=d.length-d.trimStart().length+1;if(l){t.includes("*/")&&(l=!1);continue}if(t.startsWith("/*")){l=!t.includes("*/");continue}if(t.startsWith("//"))continue;if(/^\s*if\s*\(/.test(d)&&(this.findMatchingElse(n,i)||r.push({file:s,line:c,column:u,language:this.language,construct:"if-without-else",triggerCondition:"when condition is false",currentHandling:"falls through \u2014 no else branch",suggestedGuard:"Add else branch or document why falsy path is safe",severity:"medium"})),/^\s*switch\s*\(/.test(d)){let a=this.extractBlock(n,i);if(a&&!a.includes("default:")&&!a.includes("default :")&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-no-default",triggerCondition:"when value matches no case",currentHandling:"falls through \u2014 no default case",suggestedGuard:"Add default case with error handling or exhaustive check",severity:"high"}),a){let g=a.match(/case\s+[^:]+:/g)||[],h=a.match(/\b(break|return|throw|continue)\b/g)||[];g.length>0&&h.length<g.length&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-missing-break",triggerCondition:"when case falls through to next case",currentHandling:"fall-through \u2014 may execute unintended cases",suggestedGuard:"Add break/return to each case or add explicit // falls through comment",severity:"medium"})}}if(/\bcatch\s*\(/.test(t)||/\bcatch\s*\{/.test(t)){let a=this.extractBlock(n,i);if(a!==null){let g=a.replace(/[{}]/g,"").trim();(g.length===0||/^\s*\/\//.test(g))&&r.push({file:s,line:c,column:u,language:this.language,construct:"try-empty-catch",triggerCondition:"when exception is thrown",currentHandling:"exception silently swallowed",suggestedGuard:"Log the error or rethrow with context",severity:"high"})}}if(/\btry\s*\{/.test(t)&&this.extractBlock(n,i)&&(n.slice(i,Math.min(i+30,n.length)).join(`
4
4
  `).includes("finally")||r.push({file:s,line:c,column:u,language:this.language,construct:"try-no-finally",triggerCondition:"when cleanup is needed regardless of success/failure",currentHandling:"no finally block \u2014 cleanup may be skipped on exception",suggestedGuard:"Add finally block for resource cleanup if applicable",severity:"low"})),t.includes("?.")){let a=t.match(/(\w+(?:\.\w+)*)\?\./g)||[];for(let g of a)if(!t.includes("??")&&!t.includes("|| ")&&!t.includes("if")){r.push({file:s,line:c,column:u,language:this.language,construct:"optional-chaining-null-path",triggerCondition:`when ${g.replace("?.","")} is null/undefined`,currentHandling:"returns undefined \u2014 may propagate",suggestedGuard:"Add ?? fallback or explicit null check",severity:"low"});break}}if(t.includes("??")&&!t.includes("?.")&&r.push({file:s,line:c,column:u,language:this.language,construct:"nullish-coalescing-fallback",triggerCondition:"when left side is null/undefined",currentHandling:"uses fallback value",suggestedGuard:"Verify fallback value is appropriate for all null cases",severity:"low"}),/\.\s*then\s*\(/.test(t)&&!t.includes(".catch")&&!t.includes("await")){let a=n.slice(i,Math.min(i+5,n.length)).join(" ");!a.includes(".catch")&&!a.includes("try")&&r.push({file:s,line:c,column:u,language:this.language,construct:"promise-no-catch",triggerCondition:"when promise rejects",currentHandling:"unhandled rejection \u2014 may crash process",suggestedGuard:"Add .catch() handler or use try/catch with await",severity:"high"})}let p=["map","filter","reduce","forEach","find","some","every","flatMap"];for(let a of p)if(new RegExp(`\\.${a}\\s*\\(`).test(t)){let h=n.slice(Math.max(0,i-3),i).join(" ");if(!h.includes(".length")&&!h.includes("if (")&&!h.includes("?.")){r.push({file:s,line:c,column:u,language:this.language,construct:"array-callback-empty",triggerCondition:`when array is empty before .${a}()`,currentHandling:a==="reduce"?"may throw without initial value":"returns empty result \u2014 may cause downstream issues",suggestedGuard:a==="reduce"?"Provide initial value or check array length":"Check array length or handle empty result",severity:a==="reduce"?"high":"low"});break}}/\|\|\s*['"`\d]/.test(t)&&!t.includes("??")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-or-falsy",triggerCondition:'when left side is falsy (0, "", false, null, undefined)',currentHandling:'uses fallback \u2014 may unintentionally override 0, "", or false',suggestedGuard:"Use ?? instead of || if only null/undefined should trigger fallback",severity:"medium"}),/&&\s*\w+\s*\(/.test(t)&&!t.includes("if")&&!t.includes("while")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-and-short-circuit",triggerCondition:"when left side is falsy \u2014 right side never executes",currentHandling:"short-circuits \u2014 function call skipped silently",suggestedGuard:"Use explicit if-statement for clarity when side effects matter",severity:"low"}),(t.match(/\?/g)||[]).length>=2&&t.includes(":")&&r.push({file:s,line:c,column:u,language:this.language,construct:"ternary-complex",triggerCondition:"when nested ternary conditions interact",currentHandling:"nested ternary \u2014 hard to read and maintain",suggestedGuard:"Refactor to if/else or switch for readability",severity:"medium"}),(/\btypeof\s+\w+\s*===?\s*['"]/.test(t)||/\binstanceof\b/.test(t))&&!t.includes("else")&&!this.findMatchingElse(n,i)&&r.push({file:s,line:c,column:u,language:this.language,construct:"type-guard-unhandled",triggerCondition:"when value does not match the guarded type",currentHandling:"unguarded type path \u2014 may cause runtime type errors",suggestedGuard:"Add else branch or exhaustive type checking",severity:"medium"})}return r}findMatchingElse(e,s){let r={depth:0};for(let n=s;n<Math.min(s+30,e.length);n++){let l=e[n];for(let i of l)i==="{"&&r.depth++,i==="}"&&r.depth--;if(r.depth===0&&n>s){if((e[n+1]?.trim()||"").startsWith("else")||e[n].trim().endsWith("else")||e[n].trim().endsWith("else {")||e[n].includes("} else"))return!0;break}}return!1}extractBlock(e,s){let r=0,n=!1,l=[];for(let i=s;i<Math.min(s+50,e.length);i++){let d=e[i];for(let t of d)t==="{"&&(r++,n=!0),t==="}"&&r--;if(n&&(l.push(d),r===0))return l.join(`
5
5
  `)}return null}};function y(o,e,s){let r=Date.now(),n=s||(e.endsWith(".ts")||e.endsWith(".tsx")?"typescript":"javascript"),i=new f(n).enumerate(o,e);return{file:e,language:n,branches:i,totalConstructs:i.length,unhandledCount:i.length,duration:Date.now()-r}}function b(o){let e=[];if(e.push(`# Branch Enumeration Report: ${o.file}`),e.push(""),e.push(`**Language**: ${o.language} | **Branches**: ${o.unhandledCount} | **Duration**: ${o.duration}ms`),e.push(""),o.branches.length===0)return e.push("No unhandled branches detected."),e.join(`
@@ -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.15.2");process.exit(0)}
2
- import{a as p}from"./chunk-2JEPRQMT.js";import"./chunk-D75HDHX3.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y,dirname as W}from"path";import{fileURLToPath as v}from"url";import{parse as d}from"yaml";var b=v(import.meta.url),E=W(b),l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(E,"templates")}async load(r){if(this.cache.has(r))return this.cache.get(r);try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n),i=await this.validate(o);if(!i.valid)throw new Error(`Invalid workflow template ${r}:
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.15.3");process.exit(0)}
2
+ import{a as p}from"./chunk-XXW4KFBB.js";import"./chunk-WSUYEVSY.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y,dirname as W}from"path";import{fileURLToPath as v}from"url";import{parse as d}from"yaml";var b=v(import.meta.url),E=W(b),l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(E,"templates")}async load(r){if(this.cache.has(r))return this.cache.get(r);try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n),i=await this.validate(o);if(!i.valid)throw new Error(`Invalid workflow template ${r}:
3
3
  ${i.errors.join(`
4
4
  `)}`);return this.cache.set(r,o),o}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}async list(){try{return(await k(this.templatesDir)).filter(e=>e.endsWith(".yaml")||e.endsWith(".yml")).map(e=>y(e,e.endsWith(".yaml")?".yaml":".yml")).sort()}catch(r){if(r.code==="ENOENT")return[];throw r}}async validate(r){let e=[],n=[];if(r.name||e.push("Workflow must have a name"),r.version||e.push("Workflow must have a version"),r.description||n.push("Workflow should have a description"),Array.isArray(r.variables)?r.variables.forEach((o,i)=>{o.name||e.push(`Variable at index ${i} must have a name`),o.type||e.push(`Variable ${o.name} must have a type`),o.required===void 0&&n.push(`Variable ${o.name} should specify if it's required`)}):e.push("Workflow must have a variables array"),!Array.isArray(r.steps))e.push("Workflow must have a steps array");else if(r.steps.length===0)e.push("Workflow must have at least one step");else{r.steps.forEach((t,s)=>{t.name||e.push(`Step at index ${s} must have a name`),t.action||e.push(`Step ${t.name||s} must have an action`),(!t.config||typeof t.config!="object")&&e.push(`Step ${t.name||s} must have a config object`),t.assertions&&Array.isArray(t.assertions)&&t.assertions.forEach((f,u)=>{f.condition||e.push(`Assertion ${u} in step ${t.name||s} must have a condition`),f.message||n.push(`Assertion ${u} in step ${t.name||s} should have a message`)})});let o=r.steps.map(t=>t.name),i=o.filter((t,s)=>o.indexOf(t)!==s);i.length>0&&e.push(`Duplicate step names found: ${i.join(", ")}`)}return{valid:e.length===0,errors:e,warnings:n}}async createContext(r,e){let n=await this.load(r),o=n.variables.filter(t=>t.required&&!(t.name in e)).map(t=>t.name);if(o.length>0)throw new Error(`Missing required variables: ${o.join(", ")}`);let i={};return n.variables.forEach(t=>{t.name in e?i[t.name]=e[t.name]:"default"in t&&(i[t.name]=t.default)}),{variables:i,results:new Map,metadata:{startTime:Date.now(),workflow:n.name,templateName:r}}}async getMetadata(r){try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n);return{name:o.name,version:o.version,description:o.description}}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}clearCache(){this.cache.clear()}async reload(r){return this.cache.delete(r),this.load(r)}},x=new l;function w(a,r){return a.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{let i=n.trim().split("."),t=r;for(let s of i)if(t&&typeof t=="object"&&s in t)t=t[s];else return e;return t!=null?String(t):e})}function T(a,r){let e={...r.variables,result:r.results.get("__last_result__")},n=w(a,e);return p(n,e,!1)}var g=["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"],A={"login-flow":"Authentication testing workflow for login forms with credential validation","oauth-flow":"OAuth2/OIDC authentication testing workflow with provider integration","scraping-workflow":"Data extraction workflow for web scraping with pagination and structured output","visual-regression":"Screenshot comparison workflow for visual regression testing across breakpoints","form-validation":"Input validation testing workflow for form fields with error handling","navigation-flow":"Multi-page navigation workflow for testing user journeys and state persistence","api-integration":"Browser-API hybrid testing workflow for validating frontend-backend integration","performance-audit":"Lighthouse-style performance audit workflow with Core Web Vitals","accessibility-audit":"WCAG 2.1 Level AA compliance audit workflow with automated accessibility testing"},h={authentication:["login-flow","oauth-flow"],testing:["form-validation","navigation-flow","api-integration"],quality:["visual-regression","performance-audit","accessibility-audit"],automation:["scraping-workflow"]};function _(a){return h[a]}function P(a){return g.includes(a)}function L(){return g.map(a=>{let r=Object.entries(h).find(([e,n])=>n.includes(a))?.[0]||"other";return{name:a,description:A[a],category:r}})}export{h as WORKFLOW_CATEGORIES,A as WORKFLOW_DESCRIPTIONS,g as WORKFLOW_TEMPLATES,l as WorkflowLoader,x as defaultWorkflowLoader,T as evaluateCondition,L as getAllWorkflowTemplates,_ as getWorkflowsByCategory,w as interpolateVariables,P as isValidWorkflowTemplate};
@@ -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.15.3");process.exit(0)}
2
+ import{a}from"./chunk-OKNMZLGB.js";import"./chunk-AS54N3H7.js";import"./chunk-YHZGFWJE.js";import"./chunk-GJB3LPCS.js";import"./chunk-7SWHW5AC.js";import"./chunk-OGARNKLS.js";import"./chunk-UGNTLSBL.js";import"./chunk-ASUXS4N4.js";import"./chunk-UTALYUMW.js";import"./chunk-NT6FYFJA.js";import"./chunk-7TW5UGDP.js";import"./chunk-D6PUDLJ4.js";import"./chunk-M3ONCPSU.js";import"./chunk-HVIFA73X.js";import"./chunk-CNQUU6CF.js";import"./chunk-POTVF6BY.js";import"./chunk-WSND64RL.js";import"./chunk-INVDDFJC.js";import"./chunk-FPFGN2Z5.js";import"./chunk-WLOHTLHO.js";import"./chunk-2GJJGO5D.js";import"./chunk-6TYTBQPV.js";import"./chunk-YTRGMILO.js";import"./chunk-Z7JPWXW2.js";import"./chunk-34Y4CIHD.js";import"./chunk-WSUYEVSY.js";export{a as BrowserWorkflowTool};
@@ -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.15.2");process.exit(0)}
2
- import{b as o}from"./chunk-D75HDHX3.js";function s(n){return n instanceof Error?n.message:String(n)}function u(n){return n instanceof Error?n:new Error(String(n))}function a(n){return n instanceof r||typeof n=="object"&&n!==null&&n.callerError===!0}var r,e=o(()=>{"use strict";r=class extends Error{callerError=!0;constructor(t){super(t),this.name="CallerInputError"}}});export{s as a,u as b,r as c,a as d,e};
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.15.3");process.exit(0)}
2
+ import{b as o}from"./chunk-WSUYEVSY.js";function s(n){return n instanceof Error?n.message:String(n)}function u(n){return n instanceof Error?n:new Error(String(n))}function a(n){return n instanceof r||typeof n=="object"&&n!==null&&n.callerError===!0}var r,e=o(()=>{"use strict";r=class extends Error{callerError=!0;constructor(t){super(t),this.name="CallerInputError"}}});export{s as a,u as b,r as c,a as d,e};