agentic-qe 3.14.8 → 3.15.1

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 (375) hide show
  1. package/.claude/skills/release/SKILL.md +6 -0
  2. package/.claude/skills/skills-manifest.json +1 -1
  3. package/CHANGELOG.md +189 -0
  4. package/README.md +143 -366
  5. package/assets/readme/credit-ruflo.svg +1 -0
  6. package/assets/readme/credit-ruvector.svg +1 -0
  7. package/assets/readme/project-header.svg +1 -0
  8. package/assets/readme/quality-loop.svg +1 -0
  9. package/assets/skills/skills-manifest.json +1 -1
  10. package/dist/adapters/a2a/notifications/retry-queue.js +5 -1
  11. package/dist/adapters/ag-ui/json-patch.js +14 -7
  12. package/dist/adapters/ag-ui/state-delta-cache.js +20 -12
  13. package/dist/cli/bundle.js +5 -5
  14. package/dist/cli/chunks/adapter-Q6RPGMUE.js +2 -0
  15. package/dist/cli/chunks/{agent-booster-wasm-67OKGDGZ.js → agent-booster-wasm-XUHRLKWP.js} +2 -2
  16. package/dist/cli/chunks/{agent-handler-4HZEQ3WQ.js → agent-handler-CL7MJP5W.js} +2 -2
  17. package/dist/cli/chunks/{agent-memory-branch-IBHZQSRN.js → agent-memory-branch-F7RV72FC.js} +2 -2
  18. package/dist/cli/chunks/aqe-learning-engine-JQPXIU7C.js +2 -0
  19. package/dist/cli/chunks/{arena-LCLRGUIK.js → arena-GRRNK7IN.js} +4 -4
  20. package/dist/cli/chunks/{arena-EJBIGSF4.js → arena-LHLVOQHW.js} +2 -2
  21. package/dist/cli/chunks/{audit-PY4JNDQQ.js → audit-EOP2K34L.js} +3 -3
  22. package/dist/cli/chunks/base-5SK64NXB.js +2 -0
  23. package/dist/cli/chunks/{better-sqlite3-2JG5K6XT.js → better-sqlite3-YERQ5DOL.js} +2 -2
  24. package/dist/cli/chunks/{brain-handler-3UYK55GA.js → brain-handler-FBXBM5XE.js} +3 -3
  25. package/dist/cli/chunks/{branch-enumerator-GOSWOX46.js → branch-enumerator-NWO6LNHB.js} +2 -2
  26. package/dist/cli/chunks/{browser-DC2JV47Z.js → browser-EDCG7TNF.js} +2 -2
  27. package/dist/cli/chunks/browser-workflow-WN7XNTCJ.js +2 -0
  28. package/dist/cli/chunks/{chunk-Z5UZOYQS.js → chunk-25IWHVMW.js} +2 -2
  29. package/dist/cli/chunks/chunk-27S47AYK.js +3 -0
  30. package/dist/cli/chunks/{chunk-SUNXA2UR.js → chunk-2IPBCXTT.js} +2 -2
  31. package/dist/cli/chunks/chunk-2K3QFLX2.js +2 -0
  32. package/dist/cli/chunks/{chunk-775WGWLL.js → chunk-35XRY6ZW.js} +2 -2
  33. package/dist/cli/chunks/{chunk-RTD4U7IW.js → chunk-3NOSMJS4.js} +2 -2
  34. package/dist/cli/chunks/{chunk-GVLRE3BV.js → chunk-3TZRJ5QD.js} +3 -3
  35. package/dist/cli/chunks/{chunk-RJJIPTVH.js → chunk-46DUU44C.js} +2 -2
  36. package/dist/cli/chunks/{chunk-H5UH234L.js → chunk-4AEFJEZH.js} +1 -1
  37. package/dist/cli/chunks/{chunk-EXQGHTPD.js → chunk-4KHSWNFW.js} +4 -4
  38. package/dist/cli/chunks/{chunk-CLUHGBLN.js → chunk-4KSCJ462.js} +1 -1
  39. package/dist/cli/chunks/{chunk-3EKG7HFV.js → chunk-4P7CGSRL.js} +3 -3
  40. package/dist/cli/chunks/{chunk-XFT4FYTC.js → chunk-4THIRDBL.js} +2 -2
  41. package/dist/cli/chunks/{chunk-7TNCEVWX.js → chunk-4XEZ562Q.js} +2 -2
  42. package/dist/cli/chunks/{chunk-CIEXUYY7.js → chunk-53C7TGC4.js} +1 -1
  43. package/dist/cli/chunks/{chunk-LQVS5IWH.js → chunk-53HWWWFZ.js} +2 -2
  44. package/dist/cli/chunks/{chunk-EMOZ5O5S.js → chunk-54JYUOSR.js} +1 -1
  45. package/dist/cli/chunks/{chunk-J24AJEDE.js → chunk-5B5TA3X4.js} +2 -2
  46. package/dist/cli/chunks/{chunk-BITFGVZ4.js → chunk-5C4UYXQL.js} +2 -2
  47. package/dist/cli/chunks/{chunk-F6JJNBE5.js → chunk-5JJWVFUV.js} +1 -1
  48. package/dist/cli/chunks/{chunk-M7QKCHLQ.js → chunk-5QEXDXHQ.js} +2 -2
  49. package/dist/cli/chunks/{chunk-I6NZFBT3.js → chunk-5TEDVUEB.js} +2 -2
  50. package/dist/cli/chunks/{chunk-673XJBGW.js → chunk-66HKJJFH.js} +2 -2
  51. package/dist/cli/chunks/{chunk-AR2S4DOB.js → chunk-6AVVC7Y3.js} +1 -1
  52. package/dist/cli/chunks/{chunk-EBV3WFIR.js → chunk-6DF6X3SZ.js} +2 -2
  53. package/dist/cli/chunks/{chunk-GHMJFICO.js → chunk-6MGJMGAD.js} +2 -2
  54. package/dist/cli/chunks/{chunk-XECZYQT5.js → chunk-6Q7PWKWV.js} +2 -2
  55. package/dist/cli/chunks/{chunk-VV2JVYOI.js → chunk-6U6JQS4Z.js} +2 -2
  56. package/dist/cli/chunks/{chunk-BHPTHC5O.js → chunk-6WW6A6JM.js} +2 -2
  57. package/dist/cli/chunks/{chunk-G3C7Z6FO.js → chunk-7B3XVVYP.js} +2 -2
  58. package/dist/cli/chunks/{chunk-J5HTQHJK.js → chunk-7FGSX4UD.js} +2 -2
  59. package/dist/cli/chunks/{chunk-YIWBJ637.js → chunk-A5LOELVV.js} +2 -2
  60. package/dist/cli/chunks/{chunk-VCSNNLWL.js → chunk-ADEYBXAS.js} +2 -2
  61. package/dist/cli/chunks/{chunk-A53MMSGC.js → chunk-ALLABEUK.js} +2 -2
  62. package/dist/cli/chunks/{chunk-HBAFXWSO.js → chunk-ARGMYSDY.js} +1 -1
  63. package/dist/cli/chunks/{chunk-HPVYJ6JH.js → chunk-ARWSPV2C.js} +2 -2
  64. package/dist/cli/chunks/{chunk-VSPNIDQK.js → chunk-AVOYMVD6.js} +2 -2
  65. package/dist/cli/chunks/{chunk-BUVJIVFG.js → chunk-B3DWOR5R.js} +1 -1
  66. package/dist/cli/chunks/{chunk-K6EOHGKS.js → chunk-BW7S6LIJ.js} +2 -2
  67. package/dist/cli/chunks/{chunk-4HXFPBAA.js → chunk-C3BW3Q27.js} +1 -1
  68. package/dist/cli/chunks/{chunk-JRK5GX56.js → chunk-CFZJEOCD.js} +1 -1
  69. package/dist/cli/chunks/{chunk-3S5IIK32.js → chunk-CHX65QXY.js} +1 -1
  70. package/dist/cli/chunks/{chunk-FRC7AFB4.js → chunk-CTK7NMSJ.js} +2 -2
  71. package/dist/cli/chunks/{chunk-RM6OC35G.js → chunk-CTLHNFPM.js} +1 -1
  72. package/dist/cli/chunks/{chunk-3576QGPP.js → chunk-D3LREV4P.js} +1 -1
  73. package/dist/cli/chunks/{chunk-TCQWVVSR.js → chunk-DKWB4ERY.js} +1 -1
  74. package/dist/cli/chunks/{chunk-JQAJUXRE.js → chunk-DREYYJ7A.js} +2 -2
  75. package/dist/cli/chunks/{chunk-OZJQN7YE.js → chunk-DV7I6CRH.js} +2 -2
  76. package/dist/cli/chunks/{chunk-AEYJ4ZLA.js → chunk-EQ3BJS37.js} +1 -1
  77. package/dist/cli/chunks/{chunk-KNSQWM2E.js → chunk-FIIHSEXP.js} +2 -2
  78. package/dist/cli/chunks/{chunk-LRGTPUJA.js → chunk-FQYXPSWD.js} +2 -2
  79. package/dist/cli/chunks/{chunk-QQVE65ER.js → chunk-FRGNM6SW.js} +2 -2
  80. package/dist/cli/chunks/{chunk-AOD2ES44.js → chunk-FTHXV7N7.js} +2 -2
  81. package/dist/cli/chunks/{chunk-DZHXCOSK.js → chunk-GAKVCN3C.js} +1 -1
  82. package/dist/cli/chunks/{chunk-LMAI74EP.js → chunk-GDSYJHVB.js} +1 -1
  83. package/dist/cli/chunks/{chunk-VAXTPLO3.js → chunk-GUHJWBPN.js} +2 -2
  84. package/dist/cli/chunks/{chunk-OX7MJFLC.js → chunk-GUKBN3BS.js} +2 -2
  85. package/dist/cli/chunks/{chunk-R6I5I724.js → chunk-HU4QGCIJ.js} +2 -2
  86. package/dist/cli/chunks/{chunk-LTHV4PIG.js → chunk-HVAYG54D.js} +2 -2
  87. package/dist/cli/chunks/{chunk-AJMAKUS3.js → chunk-IUGY6Z4Q.js} +2 -2
  88. package/dist/cli/chunks/{chunk-WFKE7NZ5.js → chunk-J2WALRWR.js} +2 -2
  89. package/dist/cli/chunks/{chunk-Z6G3QVZ4.js → chunk-J4ULR4QR.js} +19 -19
  90. package/dist/cli/chunks/{chunk-YHX74M7C.js → chunk-JEXPSOT2.js} +2 -2
  91. package/dist/cli/chunks/{chunk-25EEIAHS.js → chunk-JHKMUY4W.js} +2 -2
  92. package/dist/cli/chunks/{chunk-L5T32SRF.js → chunk-JQVECGYL.js} +1 -1
  93. package/dist/cli/chunks/{chunk-UHLZKH6B.js → chunk-JSHASVQ2.js} +25 -25
  94. package/dist/cli/chunks/{chunk-SPS472C5.js → chunk-JW2HNT3J.js} +2 -2
  95. package/dist/cli/chunks/{chunk-SMBGK7XI.js → chunk-JY6HWYC4.js} +1 -1
  96. package/dist/cli/chunks/{chunk-F57FTFWS.js → chunk-JYF3QF4C.js} +2 -2
  97. package/dist/cli/chunks/{chunk-CBWM5NOO.js → chunk-K4NB3MYN.js} +2 -2
  98. package/dist/cli/chunks/{chunk-LKFBW2QM.js → chunk-KBK4GBJQ.js} +2 -2
  99. package/dist/cli/chunks/{chunk-6F7MFHTY.js → chunk-KHVWIUAF.js} +2 -2
  100. package/dist/cli/chunks/{chunk-JDOVO4E4.js → chunk-KP6LNSDO.js} +126 -130
  101. package/dist/cli/chunks/{chunk-T53ZN4NO.js → chunk-KTBA2HJC.js} +2 -2
  102. package/dist/cli/chunks/{chunk-WVEHKAIH.js → chunk-L5GEWKR3.js} +3 -3
  103. package/dist/cli/chunks/chunk-LDDIYDIP.js +742 -0
  104. package/dist/cli/chunks/{chunk-QPACHVDI.js → chunk-LI7N45GM.js} +1 -1
  105. package/dist/cli/chunks/{chunk-UQGIC5OX.js → chunk-LQI5GVH7.js} +1 -1
  106. package/dist/cli/chunks/{chunk-T4WQPE77.js → chunk-MEOAKMKF.js} +1 -1
  107. package/dist/cli/chunks/{chunk-BT3MI2BW.js → chunk-N4HQ6FE2.js} +1 -1
  108. package/dist/cli/chunks/{chunk-JRLZ7LZ3.js → chunk-N5OSH5JO.js} +2 -2
  109. package/dist/cli/chunks/{chunk-BZIPW2PA.js → chunk-NF6SLLE6.js} +2 -2
  110. package/dist/cli/chunks/{chunk-QYCZYJH7.js → chunk-NGDRSF6Y.js} +2 -2
  111. package/dist/cli/chunks/{chunk-O4QB2GFL.js → chunk-NK2BR4QZ.js} +2 -2
  112. package/dist/cli/chunks/{chunk-B2QKBQYD.js → chunk-NS4RIZ4F.js} +1 -1
  113. package/dist/cli/chunks/{chunk-CQEWL32R.js → chunk-NTLWHLAY.js} +1 -1
  114. package/dist/cli/chunks/{chunk-NWUFTLSF.js → chunk-NWNZMXNO.js} +2 -2
  115. package/dist/cli/chunks/{chunk-6GJWT2OY.js → chunk-OABFAREV.js} +2 -2
  116. package/dist/cli/chunks/{chunk-T7YCNOW5.js → chunk-OH4SKOAM.js} +2 -2
  117. package/dist/cli/chunks/{chunk-BL6273KR.js → chunk-OKS25EGZ.js} +3 -3
  118. package/dist/cli/chunks/{chunk-NJEEKYEP.js → chunk-OPBPFNBO.js} +2 -2
  119. package/dist/cli/chunks/{chunk-SKJQKOFJ.js → chunk-P24ZBDZY.js} +2 -2
  120. package/dist/cli/chunks/{chunk-KKXH25IH.js → chunk-PBWR2SKH.js} +2 -2
  121. package/dist/cli/chunks/{chunk-TGRHO4ES.js → chunk-PDLVO3ZR.js} +2 -2
  122. package/dist/cli/chunks/{chunk-GK5WLUX3.js → chunk-PGARKOE6.js} +1 -1
  123. package/dist/cli/chunks/{chunk-XAESN54Q.js → chunk-PNK5KHSI.js} +1 -1
  124. package/dist/cli/chunks/{chunk-BFIXUKOR.js → chunk-PZBYZV5M.js} +1 -1
  125. package/dist/cli/chunks/{chunk-EKO5QL2B.js → chunk-PZDI7WQ3.js} +1 -1
  126. package/dist/cli/chunks/{chunk-BCCSV3RH.js → chunk-Q7ONRZBD.js} +1 -1
  127. package/dist/cli/chunks/{chunk-N3ASALOL.js → chunk-QMHWJBD3.js} +2 -2
  128. package/dist/cli/chunks/{chunk-OA75C4HY.js → chunk-QOOADAT7.js} +2 -2
  129. package/dist/cli/chunks/{chunk-ES7TAJRJ.js → chunk-QVTV47TM.js} +2 -2
  130. package/dist/cli/chunks/{chunk-7X3LMTRA.js → chunk-R2ICZKQA.js} +2 -2
  131. package/dist/cli/chunks/{chunk-D2Y36V5J.js → chunk-RDI3W4H6.js} +2 -2
  132. package/dist/cli/chunks/{chunk-QP7EKLWU.js → chunk-REGPCPEJ.js} +2 -2
  133. package/dist/cli/chunks/{chunk-U2QTL5T2.js → chunk-RXKOZ6VS.js} +3 -3
  134. package/dist/cli/chunks/{chunk-OVMG6EEF.js → chunk-SRXXPZVT.js} +2 -2
  135. package/dist/cli/chunks/{chunk-CXUC7YKA.js → chunk-SUFXUM6W.js} +2 -2
  136. package/dist/cli/chunks/{chunk-77WL5HQW.js → chunk-T5K6ZCA6.js} +1 -1
  137. package/dist/cli/chunks/{chunk-3X2JSW3R.js → chunk-TBCQWD5A.js} +1 -1
  138. package/dist/cli/chunks/{chunk-BOIUENWW.js → chunk-TCJ65NPY.js} +1 -1
  139. package/dist/cli/chunks/{chunk-HE3BDBAO.js → chunk-TJCMG3QE.js} +2 -2
  140. package/dist/cli/chunks/{chunk-56M4QNXU.js → chunk-TLUMENRZ.js} +2 -2
  141. package/dist/cli/chunks/{chunk-JTOFLDU7.js → chunk-TR37Q7A6.js} +6 -6
  142. package/dist/cli/chunks/{chunk-SVP3BP52.js → chunk-UE33MZOC.js} +2 -2
  143. package/dist/cli/chunks/{chunk-T6W2EYHC.js → chunk-UGUZFUQG.js} +2 -2
  144. package/dist/cli/chunks/{chunk-3FCHH4VP.js → chunk-UOHZRR5C.js} +1 -1
  145. package/dist/cli/chunks/{chunk-QKM4XT2F.js → chunk-UTFNHITI.js} +2 -2
  146. package/dist/cli/chunks/{chunk-6GNWVPMR.js → chunk-V3ISBQ5Q.js} +2 -2
  147. package/dist/cli/chunks/{chunk-6VTC3OHD.js → chunk-V5RP2SU3.js} +2 -2
  148. package/dist/cli/chunks/{chunk-5X4HDW5W.js → chunk-VEKRK3R6.js} +2 -2
  149. package/dist/cli/chunks/{chunk-TUZNWRYC.js → chunk-VGYLV6VD.js} +1 -1
  150. package/dist/cli/chunks/{chunk-C647D42G.js → chunk-VLL7ASGH.js} +2 -2
  151. package/dist/cli/chunks/{chunk-QH7C4PTX.js → chunk-W5HQQTVH.js} +1 -1
  152. package/dist/cli/chunks/{chunk-A5CLVZC3.js → chunk-W5NHBYYS.js} +2 -2
  153. package/dist/cli/chunks/{chunk-ISBOHF6Y.js → chunk-W6K77PQR.js} +1 -1
  154. package/dist/cli/chunks/{chunk-AUFV2G2J.js → chunk-WFDDWRWY.js} +5 -5
  155. package/dist/cli/chunks/{chunk-AJ5PCJQ2.js → chunk-WHBDSJUE.js} +3 -3
  156. package/dist/cli/chunks/{chunk-4RNCVSVN.js → chunk-WONHFDWF.js} +2 -2
  157. package/dist/cli/chunks/{chunk-VW7AXJQS.js → chunk-WPG6SW7C.js} +2 -2
  158. package/dist/cli/chunks/{chunk-GA63ESNT.js → chunk-WQZR6DS6.js} +2 -2
  159. package/dist/cli/chunks/{chunk-G36RZF2Y.js → chunk-WTFVYFRZ.js} +1 -1
  160. package/dist/cli/chunks/{chunk-F2WAB4WK.js → chunk-WYE3ICSL.js} +2 -2
  161. package/dist/cli/chunks/{chunk-TT45RCLN.js → chunk-X4PGLEPQ.js} +2 -2
  162. package/dist/cli/chunks/{chunk-QDRFLM77.js → chunk-X6W35QXO.js} +2 -2
  163. package/dist/cli/chunks/{chunk-HHANMCD2.js → chunk-XCVD57GW.js} +1 -1
  164. package/dist/cli/chunks/{chunk-GQJ4QDEN.js → chunk-XYZUBAR6.js} +4 -4
  165. package/dist/cli/chunks/{chunk-TP7L4EX6.js → chunk-XZGRHJGC.js} +2 -2
  166. package/dist/cli/chunks/{chunk-BTBJ2NLH.js → chunk-YDM2DPUU.js} +2 -2
  167. package/dist/cli/chunks/{chunk-NEXBTLN6.js → chunk-YDMPTCJ3.js} +2 -2
  168. package/dist/cli/chunks/{chunk-4PY44TKH.js → chunk-YM3GAJMN.js} +2 -2
  169. package/dist/cli/chunks/{chunk-UNFE4RPV.js → chunk-YTMWPGVR.js} +1 -1
  170. package/dist/cli/chunks/{chunk-DSJJHPPS.js → chunk-YWX7KLNG.js} +3 -3
  171. package/dist/cli/chunks/{chunk-UIWXKRTK.js → chunk-ZE6WJDXM.js} +2 -2
  172. package/dist/cli/chunks/{chunk-W7JUD4EZ.js → chunk-ZX4I7IND.js} +2 -2
  173. package/dist/cli/chunks/{chunk-PVJLQ2YZ.js → chunk-ZZV6GR46.js} +1 -1
  174. package/dist/cli/chunks/{ci-5LIV2HW5.js → ci-K7DG4GSO.js} +3 -3
  175. package/dist/cli/chunks/{ci-output-UO5BDFU4.js → ci-output-EBSUG6HP.js} +2 -2
  176. package/dist/cli/chunks/{circuit-breaker-UQDPXYRD.js → circuit-breaker-P6N6YIRZ.js} +2 -2
  177. package/dist/cli/chunks/{claude-flow-setup-62QES3QX.js → claude-flow-setup-P6EZPQZT.js} +2 -2
  178. package/dist/cli/chunks/client-ZYH66YRI.js +2 -0
  179. package/dist/cli/chunks/{cline-installer-X7VZTSZG.js → cline-installer-EVZZ3EFY.js} +2 -2
  180. package/dist/cli/chunks/{code-H3BF4L4H.js → code-3WLBG2XK.js} +3 -3
  181. package/dist/cli/chunks/{code-index-extractor-BJGFZGGL.js → code-index-extractor-ZP6D4WL2.js} +2 -2
  182. package/dist/cli/chunks/{codex-installer-KVZWKU6S.js → codex-installer-XAUI4SB7.js} +2 -2
  183. package/dist/cli/chunks/{completions-YMILE6V7.js → completions-RHFNDDG3.js} +2 -2
  184. package/dist/cli/chunks/{complexity-analyzer-J26N2PWG.js → complexity-analyzer-DCW7Q3OR.js} +2 -2
  185. package/dist/cli/chunks/{continuedev-installer-MAR42OV7.js → continuedev-installer-53SQA5T6.js} +2 -2
  186. package/dist/cli/chunks/{copilot-installer-CVOJF6OT.js → copilot-installer-SXXMFB6T.js} +2 -2
  187. package/dist/cli/chunks/core-handlers-XKSPHEHE.js +2 -0
  188. package/dist/cli/chunks/{cost-tracker-SXLWXE55.js → cost-tracker-CKLDQ5AZ.js} +2 -2
  189. package/dist/cli/chunks/{coverage-D7HCHFP3.js → coverage-AWCS2SP7.js} +3 -3
  190. package/dist/cli/chunks/cross-domain-router-6VYNFQZA.js +2 -0
  191. package/dist/cli/chunks/{cursor-installer-X37VHIKW.js → cursor-installer-4TYF5V5J.js} +2 -2
  192. package/dist/cli/chunks/{daemon-LIW47IDM.js → daemon-CTZXGN5V.js} +4 -4
  193. package/dist/cli/chunks/{daemon-JN7SOH6F.js → daemon-OOY4H6RJ.js} +3 -3
  194. package/dist/cli/chunks/{dag-attention-scheduler-QCHHIZBT.js → dag-attention-scheduler-3WG24Q33.js} +2 -2
  195. package/dist/cli/chunks/{detect-WRFCWAX5.js → detect-O7MUZ6NX.js} +2 -2
  196. package/dist/cli/chunks/{dist-node-6FWT4XZO.js → dist-node-H4XI7BAF.js} +2 -2
  197. package/dist/cli/chunks/{domain-handler-SNFPNMRT.js → domain-handler-FU4WZ23B.js} +2 -2
  198. package/dist/cli/chunks/{domain-plugins-MXKHH62P.js → domain-plugins-XK26KYNJ.js} +2 -2
  199. package/dist/cli/chunks/{domain-transfer-47UJNERX.js → domain-transfer-6B5NOVH6.js} +2 -2
  200. package/dist/cli/chunks/dream-DRSSIHPP.js +2 -0
  201. package/dist/cli/chunks/{embed-and-insert-pattern-LZFAUNBQ.js → embed-and-insert-pattern-XNZXPZNL.js} +2 -2
  202. package/dist/cli/chunks/{eval-AMUXTMJB.js → eval-J3Q5TTI7.js} +2 -2
  203. package/dist/cli/chunks/{experience-capture-middleware-3D65TR2C.js → experience-capture-middleware-COKIGMXW.js} +3 -3
  204. package/dist/cli/chunks/{fast-paths-Y7BBMM56.js → fast-paths-IHWPJI6I.js} +2 -2
  205. package/dist/cli/chunks/{feature-flags-VESRRQ6V.js → feature-flags-G7ONDNTT.js} +2 -2
  206. package/dist/cli/chunks/{feature-flags-JMQQ7JW4.js → feature-flags-WUXFWZLR.js} +2 -2
  207. package/dist/cli/chunks/{file-discovery-JJKQQUV6.js → file-discovery-JN3YMBOJ.js} +2 -2
  208. package/dist/cli/chunks/{fleet-WIGHICJF.js → fleet-OUHUZJE4.js} +3 -3
  209. package/dist/cli/chunks/{gnn-wrapper-BFNPETTT.js → gnn-wrapper-PRH55ZT6.js} +2 -2
  210. package/dist/cli/chunks/{heartbeat-handler-HDXKTGUI.js → heartbeat-handler-6YF35AQS.js} +4 -4
  211. package/dist/cli/chunks/heartbeat-scheduler-FMICCNWK.js +2 -0
  212. package/dist/cli/chunks/hnsw-adapter-4TGBNJEZ.js +2 -0
  213. package/dist/cli/chunks/hnsw-index-J4NSCPAZ.js +2 -0
  214. package/dist/cli/chunks/{hnsw-legacy-bridge-6A7OTAPT.js → hnsw-legacy-bridge-7PAFSTJO.js} +2 -2
  215. package/dist/cli/chunks/{hnswlib-node-LKV2H47B.js → hnswlib-node-UETDZNNN.js} +2 -2
  216. package/dist/cli/chunks/{hooks-KDSFYQQG.js → hooks-QQNUKQAS.js} +10 -10
  217. package/dist/cli/chunks/hybrid-backend-NKPA3QE7.js +2 -0
  218. package/dist/cli/chunks/{hypergraph-engine-GDLPEPUC.js → hypergraph-engine-5GDGE3ET.js} +2 -2
  219. package/dist/cli/chunks/{hypergraph-handler-4UMFA2EW.js → hypergraph-handler-C3F2OJYA.js} +3 -3
  220. package/dist/cli/chunks/impact-analyzer-MWX7XY7X.js +2 -0
  221. package/dist/cli/chunks/{init-handler-4GCHPQHD.js → init-handler-C7ZBDAC5.js} +6 -6
  222. package/dist/cli/chunks/init-wizard-EX5N5Q7X.js +2 -0
  223. package/dist/cli/chunks/kernel-EQLZDHDD.js +2 -0
  224. package/dist/cli/chunks/{kilocode-installer-HJZMT2G5.js → kilocode-installer-VLJENC76.js} +2 -2
  225. package/dist/cli/chunks/{kiro-installer-WUPY67HG.js → kiro-installer-UYPYM6LA.js} +2 -2
  226. package/dist/cli/chunks/knowledge-graph-A3WSMQ6U.js +2 -0
  227. package/dist/cli/chunks/{learning-AXKIS7IG.js → learning-SFIWIG6Z.js} +3 -3
  228. package/dist/cli/chunks/{llm-router-HUDPNZLJ.js → llm-router-V633KAS5.js} +4 -4
  229. package/dist/cli/chunks/llm-router-service-A6XYWTL6.js +2 -0
  230. package/dist/cli/chunks/{load-RM44POD7.js → load-UWZV4JRA.js} +2 -2
  231. package/dist/cli/chunks/load-test-WF2PCXLI.js +2 -0
  232. package/dist/cli/chunks/{mcp-5JVQRBOP.js → mcp-XVFHUKCP.js} +2 -2
  233. package/dist/cli/chunks/{memory-VGZ2V6PL.js → memory-BQ5652VK.js} +5 -5
  234. package/dist/cli/chunks/memory-backend-BKGLI2RF.js +2 -0
  235. package/dist/cli/chunks/{memory-handlers-EI537Z32.js → memory-handlers-PWI3G4P4.js} +2 -2
  236. package/dist/cli/chunks/{multi-model-executor-WPRKCSCM.js → multi-model-executor-X6AQ7VVR.js} +2 -2
  237. package/dist/cli/chunks/{opencode-installer-YAJMRCQO.js → opencode-installer-N3V2Z4EF.js} +2 -2
  238. package/dist/cli/chunks/{orchestrator-MUGWBUYP.js → orchestrator-KNEKS4F7.js} +5 -5
  239. package/dist/cli/chunks/pattern-null-store-YTBLEH7D.js +2 -0
  240. package/dist/cli/chunks/{pattern-usage-recorder-ZQJJ2YNG.js → pattern-usage-recorder-MZIM6XWU.js} +2 -2
  241. package/dist/cli/chunks/{pipeline-F4DXDUDC.js → pipeline-LNLBKSXR.js} +2 -2
  242. package/dist/cli/chunks/{platform-HI3A3OWF.js → platform-OMUDXHD3.js} +2 -2
  243. package/dist/cli/chunks/{plugin-XRITPTR7.js → plugin-HGY6KKZW.js} +2 -2
  244. package/dist/cli/chunks/{prime-radiant-advanced-wasm-HHNJP7CQ.js → prime-radiant-advanced-wasm-LZBHLQYN.js} +2 -2
  245. package/dist/cli/chunks/{project-root-2VN4WO2A.js → project-root-VPSCDBMD.js} +2 -2
  246. package/dist/cli/chunks/protocol-executor-HFR2D54O.js +2 -0
  247. package/dist/cli/chunks/{protocol-handler-ZEVHSEBG.js → protocol-handler-LZXT3TXU.js} +2 -2
  248. package/dist/cli/chunks/{prove-C4BLZWBS.js → prove-I4VKQEYQ.js} +2 -2
  249. package/dist/cli/chunks/qe-reasoning-bank-MYFBQUYV.js +2 -0
  250. package/dist/cli/chunks/{quality-M3DTE4KK.js → quality-VVAWK2DD.js} +2 -2
  251. package/dist/cli/chunks/{quality-gate-V6KS7ML3.js → quality-gate-RGXLWYT6.js} +3 -3
  252. package/dist/cli/chunks/queen-coordinator-CQQMOTIW.js +2 -0
  253. package/dist/cli/chunks/{real-embeddings-YWSE3IRT.js → real-embeddings-WM66PMQ6.js} +2 -2
  254. package/dist/cli/chunks/{ref-validation-ZWOTFA3T.js → ref-validation-ZIWJNI6M.js} +2 -2
  255. package/dist/cli/chunks/{roocode-installer-GJBIWETD.js → roocode-installer-QYSI3STC.js} +2 -2
  256. package/dist/cli/chunks/router-GKWLPA3N.js +2 -0
  257. package/dist/cli/chunks/routing-feedback-WA4D5JRF.js +2 -0
  258. package/dist/cli/chunks/{routing-handler-CFYLGNAR.js → routing-handler-BID3EOLE.js} +2 -2
  259. package/dist/cli/chunks/{ruvector-commands-EDKG456B.js → ruvector-commands-DXIFMF4W.js} +2 -2
  260. package/dist/cli/chunks/rvf-dual-writer-H3ZXS5MA.js +2 -0
  261. package/dist/cli/chunks/rvf-migration-adapter-J7MTCOQA.js +2 -0
  262. package/dist/cli/chunks/{rvf-migration-coordinator-ZMEYMAI6.js → rvf-migration-coordinator-EV5E6SAO.js} +2 -2
  263. package/dist/cli/chunks/rvf-native-adapter-HXBY4VYI.js +2 -0
  264. package/dist/cli/chunks/{rvf-store-integrity-AH6PNJP6.js → rvf-store-integrity-IT6DCCJK.js} +2 -2
  265. package/dist/cli/chunks/safe-db-INVJ5LHR.js +2 -0
  266. package/dist/cli/chunks/schedule-XRIPPL52.js +2 -0
  267. package/dist/cli/chunks/scheduler-HBN3KPRW.js +2 -0
  268. package/dist/cli/chunks/{security-ZU2GW3ZM.js → security-AAFAEATQ.js} +3 -3
  269. package/dist/cli/chunks/{shared-rvf-adapter-5FOVSL3T.js → shared-rvf-adapter-QIHSYHAF.js} +2 -2
  270. package/dist/cli/chunks/{shared-rvf-dual-writer-IO4DC4XV.js → shared-rvf-dual-writer-V7OZ6TBR.js} +2 -2
  271. package/dist/cli/chunks/sqlite-persistence-6KNLT5Q2.js +2 -0
  272. package/dist/cli/chunks/{standalone-memory-3UXDZ7HI.js → standalone-memory-ALZI6VPX.js} +2 -2
  273. package/dist/cli/chunks/{status-handler-264CHTWS.js → status-handler-DED5A3OW.js} +2 -2
  274. package/dist/cli/chunks/{structural-health-E2QPUOZE.js → structural-health-CB7L3NWH.js} +2 -2
  275. package/dist/cli/chunks/{sync-2ACMWM7D.js → sync-QNPGETIO.js} +2 -2
  276. package/dist/cli/chunks/{sync-N2L2OST4.js → sync-S6Z2U46T.js} +2 -2
  277. package/dist/cli/chunks/{task-handler-IB5CVOTY.js → task-handler-CGHXYFIF.js} +2 -2
  278. package/dist/cli/chunks/{task-handlers-QBMYNJHE.js → task-handlers-A6BGQJIB.js} +3 -3
  279. package/dist/cli/chunks/{test-7RGLRDSP.js → test-IISTF5W6.js} +4 -4
  280. package/dist/cli/chunks/{test-scheduling-RJABJT2W.js → test-scheduling-FKYX4OLF.js} +7 -7
  281. package/dist/cli/chunks/{token-bootstrap-JVHMHB72.js → token-bootstrap-OKO3JEKT.js} +2 -2
  282. package/dist/cli/chunks/{token-usage-3ECHQVCY.js → token-usage-25BRFKJ5.js} +2 -2
  283. package/dist/cli/chunks/{transformers-KJH3IJWI.js → transformers-TBVVSZMF.js} +2 -2
  284. package/dist/cli/chunks/{tree-sitter-wasm-parser-XN6PFI32.js → tree-sitter-wasm-parser-N7KCOQT4.js} +2 -2
  285. package/dist/cli/chunks/{types-5BAPXOLS.js → types-TFHWJGRK.js} +2 -2
  286. package/dist/cli/chunks/unified-memory-WVELSL6T.js +2 -0
  287. package/dist/cli/chunks/unified-memory-hnsw-7P5MVKXD.js +2 -0
  288. package/dist/cli/chunks/unified-persistence-YLFCEWYY.js +2 -0
  289. package/dist/cli/chunks/{upgrade-S5NFQZID.js → upgrade-4VWQU7RD.js} +2 -2
  290. package/dist/cli/chunks/{validate-BIBWOLJD.js → validate-FF7WVXMP.js} +2 -2
  291. package/dist/cli/chunks/{validate-swarm-WAA3LBHH.js → validate-swarm-NRLH4EDC.js} +2 -2
  292. package/dist/cli/chunks/visual-security-T5OM742H.js +2 -0
  293. package/dist/cli/chunks/{web-tree-sitter-OTBQTHAV.js → web-tree-sitter-VVU3LULW.js} +2 -2
  294. package/dist/cli/chunks/{windsurf-installer-NNQ22EW6.js → windsurf-installer-Q2ZNWG2D.js} +2 -2
  295. package/dist/cli/chunks/witness-chain-D6X4OZP5.js +2 -0
  296. package/dist/cli/chunks/{witness-chain-E7MUBOJW.js → witness-chain-FP3D4PQL.js} +2 -2
  297. package/dist/cli/chunks/{witness-chain-repair-FW4QSN4C.js → witness-chain-repair-3LG4BF7C.js} +2 -2
  298. package/dist/cli/chunks/{witness-chain-verifier-YMROEBVL.js → witness-chain-verifier-LACGL6BK.js} +2 -2
  299. package/dist/cli/chunks/{witness-key-manager-4CGRNDMJ.js → witness-key-manager-GQZIB5ZE.js} +2 -2
  300. package/dist/cli/chunks/{workflow-4VRSTRAN.js → workflow-JPA5Y7L6.js} +4 -4
  301. package/dist/cli/chunks/workflow-orchestrator-OORDDKT3.js +2 -0
  302. package/dist/cli/chunks/{wrappers-4M4UTGEU.js → wrappers-2B5NHICD.js} +2 -2
  303. package/dist/cli/utils/workflow-parser.js +73 -57
  304. package/dist/domains/code-intelligence/services/metric-collector/test-counter.d.ts +1 -1
  305. package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +17 -15
  306. package/dist/domains/test-execution/services/retry-handler.js +6 -3
  307. package/dist/governance/ab-benchmarking.d.ts +5 -1
  308. package/dist/governance/ab-benchmarking.js +64 -29
  309. package/dist/mcp/bundle.js +414 -412
  310. package/dist/mcp/security/rate-limiter.d.ts +1 -0
  311. package/dist/mcp/security/rate-limiter.js +22 -5
  312. package/dist/mcp/services/session-store.js +17 -17
  313. package/dist/mcp/tools/planning/goap-status.d.ts +2 -0
  314. package/dist/mcp/tools/planning/goap-status.js +8 -2
  315. package/dist/planning/goap-planner.d.ts +3 -0
  316. package/dist/planning/goap-planner.js +80 -37
  317. package/dist/shared/embeddings/embedding-cache.js +1 -1
  318. package/dist/shared/embeddings/nomic-embedder.js +17 -7
  319. package/dist/shared/embeddings/ollama-client.js +5 -3
  320. package/dist/shared/git/git-analyzer.js +31 -30
  321. package/dist/shared/http/http-client.js +20 -13
  322. package/dist/shared/io/file-reader.js +11 -8
  323. package/dist/shared/llm/cache.d.ts +8 -29
  324. package/dist/shared/llm/cache.js +6 -2
  325. package/dist/shared/llm/cost-tracker.js +2 -1
  326. package/dist/shared/llm/provider-manager.js +4 -22
  327. package/dist/shared/llm/providers/gemini.d.ts +1 -0
  328. package/dist/shared/llm/providers/gemini.js +14 -5
  329. package/dist/shared/llm/providers/openrouter.js +6 -3
  330. package/dist/shared/metrics/code-metrics.js +1 -1
  331. package/dist/shared/metrics/system-metrics.js +8 -2
  332. package/dist/shared/retry-engine.js +2 -12
  333. package/dist/test-scheduling/executors/vitest-executor.js +26 -17
  334. package/package.json +3 -1
  335. package/dist/cli/chunks/adapter-XYCOXQCC.js +0 -2
  336. package/dist/cli/chunks/aqe-learning-engine-DTJCROTG.js +0 -2
  337. package/dist/cli/chunks/base-5TQ34GMD.js +0 -2
  338. package/dist/cli/chunks/browser-workflow-KWX4ESTJ.js +0 -2
  339. package/dist/cli/chunks/chunk-7STWD4KJ.js +0 -3
  340. package/dist/cli/chunks/chunk-PFXCRRR6.js +0 -736
  341. package/dist/cli/chunks/chunk-U64QORFO.js +0 -2
  342. package/dist/cli/chunks/client-AJZKCP4I.js +0 -2
  343. package/dist/cli/chunks/core-handlers-MQHEMGDV.js +0 -2
  344. package/dist/cli/chunks/cross-domain-router-3QNMZV5R.js +0 -2
  345. package/dist/cli/chunks/dream-OSWAITPT.js +0 -2
  346. package/dist/cli/chunks/heartbeat-scheduler-BVRVVIE2.js +0 -2
  347. package/dist/cli/chunks/hnsw-adapter-MZTHXULS.js +0 -2
  348. package/dist/cli/chunks/hnsw-index-KHEX4VDG.js +0 -2
  349. package/dist/cli/chunks/hybrid-backend-2B3LCLR4.js +0 -2
  350. package/dist/cli/chunks/impact-analyzer-4R4VWOGQ.js +0 -2
  351. package/dist/cli/chunks/init-wizard-TAOPXHHD.js +0 -2
  352. package/dist/cli/chunks/kernel-6I6VZUWY.js +0 -2
  353. package/dist/cli/chunks/knowledge-graph-KFMTTUR5.js +0 -2
  354. package/dist/cli/chunks/llm-router-service-2D74XVM3.js +0 -2
  355. package/dist/cli/chunks/load-test-53FWOWNS.js +0 -2
  356. package/dist/cli/chunks/memory-backend-KFJDDPEZ.js +0 -2
  357. package/dist/cli/chunks/pattern-null-store-7DMU5CJ4.js +0 -2
  358. package/dist/cli/chunks/protocol-executor-2EMTBTMG.js +0 -2
  359. package/dist/cli/chunks/qe-reasoning-bank-VZHZZPHE.js +0 -2
  360. package/dist/cli/chunks/queen-coordinator-7MYTTUHI.js +0 -2
  361. package/dist/cli/chunks/router-ZD4LXAWA.js +0 -2
  362. package/dist/cli/chunks/routing-feedback-FSLMDVGD.js +0 -2
  363. package/dist/cli/chunks/rvf-dual-writer-LTKTDRFS.js +0 -2
  364. package/dist/cli/chunks/rvf-migration-adapter-IF24EVC5.js +0 -2
  365. package/dist/cli/chunks/rvf-native-adapter-E6JNBKMZ.js +0 -2
  366. package/dist/cli/chunks/safe-db-F6TRB5KZ.js +0 -2
  367. package/dist/cli/chunks/schedule-HBD4BYTE.js +0 -2
  368. package/dist/cli/chunks/scheduler-6FYWPMQC.js +0 -2
  369. package/dist/cli/chunks/sqlite-persistence-DOU72F5Z.js +0 -2
  370. package/dist/cli/chunks/unified-memory-GHAYAXWZ.js +0 -2
  371. package/dist/cli/chunks/unified-memory-hnsw-CCC63YXT.js +0 -2
  372. package/dist/cli/chunks/unified-persistence-HKRHI5PG.js +0 -2
  373. package/dist/cli/chunks/visual-security-APOXJ3Q3.js +0 -2
  374. package/dist/cli/chunks/witness-chain-7IP5IJGT.js +0 -2
  375. package/dist/cli/chunks/workflow-orchestrator-2HNW5ZMQ.js +0 -2
@@ -940,7 +940,7 @@
940
940
  },
941
941
  "metadata": {
942
942
  "generatedBy": "Agentic QE Fleet",
943
- "fleetVersion": "3.14.8",
943
+ "fleetVersion": "3.15.1",
944
944
  "manifestVersion": "1.4.0",
945
945
  "lastUpdated": "2026-04-13T00:00:00.000Z",
946
946
  "contributors": [
@@ -72,7 +72,11 @@ export class RetryQueue extends EventEmitter {
72
72
  * Add a delivery to the retry queue
73
73
  */
74
74
  enqueue(delivery) {
75
- if (this.queue.size >= this.config.maxQueueSize) {
75
+ const existing = this.queue.get(delivery.id);
76
+ if (existing) {
77
+ this.removeFromScheduleIndex(existing);
78
+ }
79
+ else if (this.queue.size >= this.config.maxQueueSize) {
76
80
  // Evict oldest item
77
81
  this.evictOldest();
78
82
  }
@@ -51,6 +51,13 @@ export function buildPath(tokens) {
51
51
  }
52
52
  return '/' + tokens.map(escapePathToken).join('/');
53
53
  }
54
+ /** Parse the RFC 6901 array-index grammar without prefix coercion. */
55
+ function parseArrayIndex(token) {
56
+ if (!/^(0|[1-9][0-9]*)$/.test(token))
57
+ return Number.NaN;
58
+ const index = Number(token);
59
+ return Number.isSafeInteger(index) ? index : Number.NaN;
60
+ }
54
61
  /**
55
62
  * Get a value from an object using a JSON Pointer path
56
63
  */
@@ -65,7 +72,7 @@ export function getValueAtPath(document, path) {
65
72
  return undefined;
66
73
  }
67
74
  if (Array.isArray(current)) {
68
- const index = token === '-' ? current.length : parseInt(token, 10);
75
+ const index = parseArrayIndex(token);
69
76
  if (isNaN(index) || index < 0) {
70
77
  return undefined;
71
78
  }
@@ -94,7 +101,7 @@ export function pathExists(document, path) {
94
101
  return false;
95
102
  }
96
103
  if (Array.isArray(current)) {
97
- const index = parseInt(token, 10);
104
+ const index = parseArrayIndex(token);
98
105
  if (isNaN(index) || index < 0 || index >= current.length) {
99
106
  return false;
100
107
  }
@@ -127,7 +134,7 @@ export function setValueAtPath(document, path, value) {
127
134
  throw new JsonPatchError(`Path does not exist: ${path}`, 'PATH_NOT_FOUND', { path });
128
135
  }
129
136
  if (Array.isArray(current)) {
130
- const index = parseInt(token, 10);
137
+ const index = parseArrayIndex(token);
131
138
  if (isNaN(index) || index < 0 || index >= current.length) {
132
139
  throw new JsonPatchError(`Invalid array index: ${token}`, 'INVALID_INDEX', { token, path });
133
140
  }
@@ -144,8 +151,8 @@ export function setValueAtPath(document, path, value) {
144
151
  }
145
152
  }
146
153
  if (Array.isArray(current)) {
147
- const index = lastToken === '-' ? current.length : parseInt(lastToken, 10);
148
- if (isNaN(index) || index < 0) {
154
+ const index = lastToken === '-' ? current.length : parseArrayIndex(lastToken);
155
+ if (isNaN(index) || index < 0 || index > current.length) {
149
156
  throw new JsonPatchError(`Invalid array index: ${lastToken}`, 'INVALID_INDEX', { token: lastToken, path });
150
157
  }
151
158
  current[index] = value;
@@ -172,7 +179,7 @@ export function deleteValueAtPath(document, path) {
172
179
  throw new JsonPatchError(`Path does not exist: ${path}`, 'PATH_NOT_FOUND', { path });
173
180
  }
174
181
  if (Array.isArray(current)) {
175
- const index = parseInt(token, 10);
182
+ const index = parseArrayIndex(token);
176
183
  if (isNaN(index) || index < 0 || index >= current.length) {
177
184
  throw new JsonPatchError(`Invalid array index: ${token}`, 'INVALID_INDEX', { token, path });
178
185
  }
@@ -186,7 +193,7 @@ export function deleteValueAtPath(document, path) {
186
193
  }
187
194
  }
188
195
  if (Array.isArray(current)) {
189
- const index = parseInt(lastToken, 10);
196
+ const index = parseArrayIndex(lastToken);
190
197
  if (isNaN(index) || index < 0 || index >= current.length) {
191
198
  throw new JsonPatchError(`Invalid array index: ${lastToken}`, 'INVALID_INDEX', { token: lastToken, path });
192
199
  }
@@ -14,7 +14,7 @@
14
14
  * @module adapters/ag-ui/state-delta-cache
15
15
  */
16
16
  import { createHash } from 'crypto';
17
- import { computeDiff, deepEqual } from './json-patch.js';
17
+ import { computeDiff, deepEqual, parsePath } from './json-patch.js';
18
18
  /**
19
19
  * Default configuration values
20
20
  */
@@ -83,6 +83,9 @@ export class StateDeltaCache {
83
83
  evictions = 0;
84
84
  constructor(config = {}) {
85
85
  this.config = { ...DEFAULT_CONFIG, ...config };
86
+ if (!Number.isSafeInteger(this.config.maxSize) || this.config.maxSize <= 0) {
87
+ throw new RangeError('State delta cache maxSize must be a positive safe integer');
88
+ }
86
89
  this.cache = new Map();
87
90
  this.preComputedKeys = new Set();
88
91
  if (this.config.warmOnInit) {
@@ -110,7 +113,7 @@ export class StateDeltaCache {
110
113
  // Move to end for LRU (delete and re-add)
111
114
  this.cache.delete(key);
112
115
  this.cache.set(key, cached);
113
- return cached.delta;
116
+ return structuredClone(cached.delta);
114
117
  }
115
118
  // Cache miss - compute delta
116
119
  this.misses++;
@@ -216,12 +219,7 @@ export class StateDeltaCache {
216
219
  * Parse a JSON Pointer path into segments
217
220
  */
218
221
  parseJsonPointerPath(path) {
219
- if (path === '' || path === '/')
220
- return [];
221
- if (!path.startsWith('/')) {
222
- throw new Error(`Invalid JSON Pointer: ${path}`);
223
- }
224
- return path.slice(1).split('/');
222
+ return parsePath(path);
225
223
  }
226
224
  /**
227
225
  * Build a state object from path segments and value
@@ -329,8 +327,18 @@ export class StateDeltaCache {
329
327
  * Hash a state object for cache key
330
328
  */
331
329
  hashState(state) {
332
- // Ensure consistent key ordering by sorting
333
- const serialized = JSON.stringify(state, Object.keys(state).sort());
330
+ // A JSON replacer key list applies at every depth and drops nested fields.
331
+ // Normalize JSON values first, then sort each object without filtering keys.
332
+ const normalized = JSON.parse(JSON.stringify(state));
333
+ const encode = (value) => {
334
+ if (value === null || typeof value !== 'object')
335
+ return JSON.stringify(value);
336
+ if (Array.isArray(value))
337
+ return `[${value.map(encode).join(',')}]`;
338
+ const object = value;
339
+ return `{${Object.keys(object).sort().map(key => `${JSON.stringify(key)}:${encode(object[key])}`).join(',')}}`;
340
+ };
341
+ const serialized = encode(normalized);
334
342
  return createHash('sha256').update(serialized).digest('hex').substring(0, 16);
335
343
  }
336
344
  /**
@@ -338,12 +346,12 @@ export class StateDeltaCache {
338
346
  */
339
347
  setDelta(key, delta) {
340
348
  // Evict if at capacity (LRU)
341
- while (this.cache.size >= this.config.maxSize) {
349
+ while (!this.cache.has(key) && this.cache.size >= this.config.maxSize) {
342
350
  this.evictLRU();
343
351
  }
344
352
  const now = Date.now();
345
353
  this.cache.set(key, {
346
- delta,
354
+ delta: structuredClone(delta),
347
355
  createdAt: now,
348
356
  lastAccessedAt: now,
349
357
  accessCount: 0,
@@ -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.14.8");process.exit(0)}
3
- import{b}from"./chunks/chunk-QH7C4PTX.js";import{b as v,c as E,e as A}from"./chunks/chunk-AJMAKUS3.js";import{d as P}from"./chunks/chunk-4RNCVSVN.js";import{a as C}from"./chunks/chunk-EKO5QL2B.js";import{b as L,c as y,d as I}from"./chunks/chunk-T6W2EYHC.js";import{a as W}from"./chunks/chunk-U64QORFO.js";import{b as k,c as F}from"./chunks/chunk-J5HTQHJK.js";import"./chunks/chunk-RJJIPTVH.js";import{a as g,e as T}from"./chunks/chunk-HPVYJ6JH.js";import{Q as w,S as H}from"./chunks/chunk-R6I5I724.js";import{h as S}from"./chunks/chunk-6GJWT2OY.js";import"./chunks/chunk-Z5UZOYQS.js";import"./chunks/chunk-BOIUENWW.js";import"./chunks/chunk-4PY44TKH.js";import"./chunks/chunk-XAESN54Q.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-6I6VZUWY.js"),{CrossDomainEventRouter:a}=await import("./chunks/cross-domain-router-3QNMZV5R.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-2EMTBTMG.js"),{WorkflowOrchestrator:i}=await import("./chunks/workflow-orchestrator-2HNW5ZMQ.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-7MYTTUHI.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-6FYWPMQC.js"),{loadCLIDomainPlugins:f}=await import("./chunks/domain-plugins-MXKHH62P.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-MQHEMGDV.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-2VN4WO2A.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.1");process.exit(0)}
3
+ import{b}from"./chunks/chunk-W5HQQTVH.js";import{b as v,c as E,e as A}from"./chunks/chunk-IUGY6Z4Q.js";import{d as P}from"./chunks/chunk-WONHFDWF.js";import{a as C}from"./chunks/chunk-PZDI7WQ3.js";import{b as L,c as y,d as I}from"./chunks/chunk-UGUZFUQG.js";import{a as W}from"./chunks/chunk-2K3QFLX2.js";import{b as k,c as F}from"./chunks/chunk-7FGSX4UD.js";import"./chunks/chunk-46DUU44C.js";import{a as g,e as T}from"./chunks/chunk-ARWSPV2C.js";import{Q as w,S as H}from"./chunks/chunk-HU4QGCIJ.js";import{h as S}from"./chunks/chunk-OABFAREV.js";import"./chunks/chunk-25IWHVMW.js";import"./chunks/chunk-TCJ65NPY.js";import"./chunks/chunk-YM3GAJMN.js";import"./chunks/chunk-PNK5KHSI.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-EQLZDHDD.js"),{CrossDomainEventRouter:a}=await import("./chunks/cross-domain-router-6VYNFQZA.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-HFR2D54O.js"),{WorkflowOrchestrator:i}=await import("./chunks/workflow-orchestrator-OORDDKT3.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-CQQMOTIW.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-HBN3KPRW.js"),{loadCLIDomainPlugins:f}=await import("./chunks/domain-plugins-XK26KYNJ.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-XKSPHEHE.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-VPSCDBMD.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.14.8";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.1";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-4GCHPQHD.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-264CHTWS.js").then(e=>e.createStatusHandler(o,Q)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-264CHTWS.js").then(e=>e.createHealthHandler(o,Q)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-IB5CVOTY.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-4HZEQ3WQ.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-SNFPNMRT.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-ZEVHSEBG.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-3UYK55GA.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-4UMFA2EW.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-HDXKTGUI.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-CFYLGNAR.js").then(e=>e.createRoutingHandler(o)),t);n(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-4VRSTRAN.js").then(e=>e.createWorkflowCommand(t,o,s))});n(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-7RGLRDSP.js").then(e=>e.createTestCommand(t,o,s))});n(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-D7HCHFP3.js").then(e=>e.createCoverageCommand(t,o,s))});n(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-M3DTE4KK.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-V6KS7ML3.js").then(e=>e.createQualityGateCommand(t,o,s))});n(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-ZU2GW3ZM.js").then(e=>e.createSecurityCommand(t,o,s))});n(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-LCLRGUIK.js").then(e=>e.createArenaCommand(t,o,s))});n(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-H3BF4L4H.js").then(e=>e.createCodeCommand(t,o,s))});n(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-YMILE6V7.js").then(e=>e.createCompletionsCommand(o))});n(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-S5NFQZID.js").then(e=>e.createUpgradeCommand(o))});n(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-WIGHICJF.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-WAA3LBHH.js").then(e=>e.createValidateSwarmCommand(t,o,s))});n(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-BIBWOLJD.js").then(e=>e.createValidateCommand(t,o,s))});n(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-AMUXTMJB.js").then(e=>e.createEvalCommand())});n(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-5LIV2HW5.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-3ECHQVCY.js").then(e=>e.createTokenUsageCommand())});n(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-HUDPNZLJ.js").then(e=>e.createLLMRouterCommand())});n(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-2ACMWM7D.js").then(e=>e.createSyncCommands())});n(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-KDSFYQQG.js").then(e=>e.createHooksCommand())});n(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-AXKIS7IG.js").then(e=>e.createLearningCommand())});n(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-VGZ2V6PL.js"),import("./chunks/standalone-memory-3UXDZ7HI.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-5JVQRBOP.js").then(e=>e.createMcpCommand())});n(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-HI3A3OWF.js").then(e=>e.createPlatformCommand())});n(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-C4BLZWBS.js").then(e=>e.createProveCommand(t,o,s))});n(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-EDKG456B.js").then(e=>e.createRuVectorCommand())});n(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-PY4JNDQQ.js").then(e=>e.createAuditCommand(t,o,s))});n(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-F4DXDUDC.js").then(e=>e.createPipelineCommand(t,o,s))});n(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-XRITPTR7.js").then(e=>e.createPluginCommand())});n(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-JN7SOH6F.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-C7ZBDAC5.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-DED5A3OW.js").then(e=>e.createStatusHandler(o,Q)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-DED5A3OW.js").then(e=>e.createHealthHandler(o,Q)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-CGHXYFIF.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-CL7MJP5W.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-FU4WZ23B.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-LZXT3TXU.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-FBXBM5XE.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-C3F2OJYA.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-6YF35AQS.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-BID3EOLE.js").then(e=>e.createRoutingHandler(o)),t);n(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-JPA5Y7L6.js").then(e=>e.createWorkflowCommand(t,o,s))});n(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-IISTF5W6.js").then(e=>e.createTestCommand(t,o,s))});n(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-AWCS2SP7.js").then(e=>e.createCoverageCommand(t,o,s))});n(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-VVAWK2DD.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-RGXLWYT6.js").then(e=>e.createQualityGateCommand(t,o,s))});n(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-AAFAEATQ.js").then(e=>e.createSecurityCommand(t,o,s))});n(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-GRRNK7IN.js").then(e=>e.createArenaCommand(t,o,s))});n(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-3WLBG2XK.js").then(e=>e.createCodeCommand(t,o,s))});n(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-RHFNDDG3.js").then(e=>e.createCompletionsCommand(o))});n(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-4VWQU7RD.js").then(e=>e.createUpgradeCommand(o))});n(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-OUHUZJE4.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-NRLH4EDC.js").then(e=>e.createValidateSwarmCommand(t,o,s))});n(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-FF7WVXMP.js").then(e=>e.createValidateCommand(t,o,s))});n(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-J3Q5TTI7.js").then(e=>e.createEvalCommand())});n(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-K7DG4GSO.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-25BRFKJ5.js").then(e=>e.createTokenUsageCommand())});n(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-V633KAS5.js").then(e=>e.createLLMRouterCommand())});n(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-QNPGETIO.js").then(e=>e.createSyncCommands())});n(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-QQNUKQAS.js").then(e=>e.createHooksCommand())});n(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-SFIWIG6Z.js").then(e=>e.createLearningCommand())});n(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-BQ5652VK.js"),import("./chunks/standalone-memory-ALZI6VPX.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-XVFHUKCP.js").then(e=>e.createMcpCommand())});n(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-OMUDXHD3.js").then(e=>e.createPlatformCommand())});n(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-I4VKQEYQ.js").then(e=>e.createProveCommand(t,o,s))});n(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-DXIFMF4W.js").then(e=>e.createRuVectorCommand())});n(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-EOP2K34L.js").then(e=>e.createAuditCommand(t,o,s))});n(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-LNLBKSXR.js").then(e=>e.createPipelineCommand(t,o,s))});n(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-HGY6KKZW.js").then(e=>e.createPluginCommand())});n(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-OOY4H6RJ.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-Y7BBMM56.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-JVHMHB72.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-IHWPJI6I.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-OKO3JEKT.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.1");process.exit(0)}
2
+ import{a,b,c}from"./chunk-L5GEWKR3.js";import"./chunk-4XEZ562Q.js";import"./chunk-PZBYZV5M.js";import"./chunk-5C4UYXQL.js";import"./chunk-ARWSPV2C.js";import"./chunk-PNK5KHSI.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.14.8");process.exit(0)}
2
- import{a as x}from"./chunk-U64QORFO.js";import{e as f}from"./chunk-J5HTQHJK.js";import"./chunk-RJJIPTVH.js";import"./chunk-XAESN54Q.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.1");process.exit(0)}
2
+ import{a as x}from"./chunk-2K3QFLX2.js";import{e as f}from"./chunk-7FGSX4UD.js";import"./chunk-46DUU44C.js";import"./chunk-PNK5KHSI.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.14.8");process.exit(0)}
2
- import{b as p}from"./chunk-GHMJFICO.js";import{a as g}from"./chunk-4HXFPBAA.js";import"./chunk-BITFGVZ4.js";import"./chunk-XAESN54Q.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.1");process.exit(0)}
2
+ import{b as p}from"./chunk-6MGJMGAD.js";import{a as g}from"./chunk-C3BW3Q27.js";import"./chunk-5C4UYXQL.js";import"./chunk-PNK5KHSI.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.14.8");process.exit(0)}
2
- import"./chunk-XAESN54Q.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.1");process.exit(0)}
2
+ import"./chunk-PNK5KHSI.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.1");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-3TZRJ5QD.js";import"./chunk-SUFXUM6W.js";import"./chunk-OKS25EGZ.js";import"./chunk-CHX65QXY.js";import"./chunk-4KHSWNFW.js";import"./chunk-RDI3W4H6.js";import"./chunk-B3DWOR5R.js";import"./chunk-PGARKOE6.js";import"./chunk-XCVD57GW.js";import"./chunk-5QEXDXHQ.js";import"./chunk-N5OSH5JO.js";import"./chunk-EQ3BJS37.js";import"./chunk-HVAYG54D.js";import"./chunk-66HKJJFH.js";import"./chunk-W6K77PQR.js";import"./chunk-K4NB3MYN.js";import"./chunk-NF6SLLE6.js";import"./chunk-3NOSMJS4.js";import"./chunk-5C4UYXQL.js";import"./chunk-W5NHBYYS.js";import"./chunk-53HWWWFZ.js";import"./chunk-UE33MZOC.js";import"./chunk-ADEYBXAS.js";import"./chunk-WQZR6DS6.js";import"./chunk-WPG6SW7C.js";import"./chunk-4P7CGSRL.js";import"./chunk-SRXXPZVT.js";import"./chunk-LQI5GVH7.js";import"./chunk-PZDI7WQ3.js";import"./chunk-UGUZFUQG.js";import"./chunk-2K3QFLX2.js";import"./chunk-7FGSX4UD.js";import"./chunk-46DUU44C.js";import"./chunk-ARWSPV2C.js";import"./chunk-HU4QGCIJ.js";import"./chunk-OABFAREV.js";import"./chunk-25IWHVMW.js";import"./chunk-TCJ65NPY.js";import"./chunk-YM3GAJMN.js";import"./chunk-JW2HNT3J.js";import"./chunk-OH4SKOAM.js";import"./chunk-PNK5KHSI.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.14.8");process.exit(0)}
2
- import{a as c,e as f}from"./chunk-HPVYJ6JH.js";import"./chunk-XAESN54Q.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.1");process.exit(0)}
2
+ import{a as c,e as f}from"./chunk-ARWSPV2C.js";import"./chunk-PNK5KHSI.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-EJBIGSF4.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-GHAYAXWZ.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-LHLVOQHW.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-WVELSL6T.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-GHAYAXWZ.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-WVELSL6T.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.14.8");process.exit(0)}
2
- import"./chunk-XAESN54Q.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.1");process.exit(0)}
2
+ import"./chunk-PNK5KHSI.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.14.8");process.exit(0)}
2
- import{d as g,e as y,f as k,g as w}from"./chunk-C647D42G.js";import{s as x}from"./chunk-BZIPW2PA.js";import"./chunk-RTD4U7IW.js";import"./chunk-BITFGVZ4.js";import"./chunk-A5CLVZC3.js";import"./chunk-LQVS5IWH.js";import"./chunk-SVP3BP52.js";import"./chunk-VCSNNLWL.js";import"./chunk-GA63ESNT.js";import"./chunk-VW7AXJQS.js";import"./chunk-OVMG6EEF.js";import"./chunk-T6W2EYHC.js";import"./chunk-U64QORFO.js";import"./chunk-J5HTQHJK.js";import"./chunk-RJJIPTVH.js";import"./chunk-HPVYJ6JH.js";import"./chunk-R6I5I724.js";import{b as l}from"./chunk-Z5UZOYQS.js";import"./chunk-SPS472C5.js";import{p as F,q as j}from"./chunk-T7YCNOW5.js";import{f as v}from"./chunk-XAESN54Q.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-7IP5IJGT.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-2JG5K6XT.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-YMROEBVL.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-4CGRNDMJ.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-FW4QSN4C.js"),{dbPath:n,keyDir:t}=R(),r=e.dryRun===!0,o;if(f(n)){let{openDatabase:i}=await import("./safe-db-F6TRB5KZ.js"),d=i(n,{readonly:r,fileMustExist:!0});try{let u=r?await A(t):(await import("./witness-key-manager-4CGRNDMJ.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.1");process.exit(0)}
2
+ import{d as g,e as y,f as k,g as w}from"./chunk-VLL7ASGH.js";import{s as x}from"./chunk-NF6SLLE6.js";import"./chunk-3NOSMJS4.js";import"./chunk-5C4UYXQL.js";import"./chunk-W5NHBYYS.js";import"./chunk-53HWWWFZ.js";import"./chunk-UE33MZOC.js";import"./chunk-ADEYBXAS.js";import"./chunk-WQZR6DS6.js";import"./chunk-WPG6SW7C.js";import"./chunk-SRXXPZVT.js";import"./chunk-UGUZFUQG.js";import"./chunk-2K3QFLX2.js";import"./chunk-7FGSX4UD.js";import"./chunk-46DUU44C.js";import"./chunk-ARWSPV2C.js";import"./chunk-HU4QGCIJ.js";import{b as l}from"./chunk-25IWHVMW.js";import"./chunk-JW2HNT3J.js";import{p as F,q as j}from"./chunk-OH4SKOAM.js";import{f as v}from"./chunk-PNK5KHSI.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-D6X4OZP5.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-YERQ5DOL.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-LACGL6BK.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-GQZIB5ZE.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-3LG4BF7C.js"),{dbPath:n,keyDir:t}=R(),r=e.dryRun===!0,o;if(f(n)){let{openDatabase:i}=await import("./safe-db-INVJ5LHR.js"),d=i(n,{readonly:r,fileMustExist:!0});try{let u=r?await A(t):(await import("./witness-key-manager-GQZIB5ZE.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.1");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-PBWR2SKH.js";import"./chunk-6Q7PWKWV.js";import"./chunk-DREYYJ7A.js";import"./chunk-NF6SLLE6.js";import"./chunk-3NOSMJS4.js";import"./chunk-5C4UYXQL.js";import"./chunk-W5NHBYYS.js";import"./chunk-53HWWWFZ.js";import"./chunk-UE33MZOC.js";import"./chunk-ADEYBXAS.js";import"./chunk-WQZR6DS6.js";import"./chunk-WPG6SW7C.js";import"./chunk-SRXXPZVT.js";import"./chunk-LQI5GVH7.js";import"./chunk-UGUZFUQG.js";import"./chunk-2K3QFLX2.js";import"./chunk-7FGSX4UD.js";import"./chunk-46DUU44C.js";import"./chunk-ARWSPV2C.js";import"./chunk-HU4QGCIJ.js";import"./chunk-25IWHVMW.js";import"./chunk-JW2HNT3J.js";import"./chunk-OH4SKOAM.js";import"./chunk-PNK5KHSI.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.14.8");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-T7YCNOW5.js";import"./chunk-XAESN54Q.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.1");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-OH4SKOAM.js";import"./chunk-PNK5KHSI.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.14.8");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-J24AJEDE.js";import{c as Ee}from"./chunk-M7QKCHLQ.js";import{b as ve}from"./chunk-JRLZ7LZ3.js";import{a as Se,d as ae,e as _e}from"./chunk-AEYJ4ZLA.js";import"./chunk-BZIPW2PA.js";import"./chunk-RTD4U7IW.js";import{b as k,d as oe}from"./chunk-BITFGVZ4.js";import"./chunk-A5CLVZC3.js";import"./chunk-LQVS5IWH.js";import"./chunk-SVP3BP52.js";import"./chunk-VCSNNLWL.js";import"./chunk-GA63ESNT.js";import"./chunk-VW7AXJQS.js";import"./chunk-OVMG6EEF.js";import"./chunk-T6W2EYHC.js";import"./chunk-U64QORFO.js";import"./chunk-J5HTQHJK.js";import"./chunk-RJJIPTVH.js";import"./chunk-HPVYJ6JH.js";import"./chunk-R6I5I724.js";import"./chunk-Z5UZOYQS.js";import{a as we,b as Re,c as H,d as V,f as nn}from"./chunk-4PY44TKH.js";import{a as F,b as tn}from"./chunk-SPS472C5.js";import"./chunk-T7YCNOW5.js";import"./chunk-XAESN54Q.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.1");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-5B5TA3X4.js";import{c as Ee}from"./chunk-5QEXDXHQ.js";import{b as ve}from"./chunk-N5OSH5JO.js";import{a as Se,d as ae,e as _e}from"./chunk-EQ3BJS37.js";import"./chunk-NF6SLLE6.js";import"./chunk-3NOSMJS4.js";import{b as k,d as oe}from"./chunk-5C4UYXQL.js";import"./chunk-W5NHBYYS.js";import"./chunk-53HWWWFZ.js";import"./chunk-UE33MZOC.js";import"./chunk-ADEYBXAS.js";import"./chunk-WQZR6DS6.js";import"./chunk-WPG6SW7C.js";import"./chunk-SRXXPZVT.js";import"./chunk-UGUZFUQG.js";import"./chunk-2K3QFLX2.js";import"./chunk-7FGSX4UD.js";import"./chunk-46DUU44C.js";import"./chunk-ARWSPV2C.js";import"./chunk-HU4QGCIJ.js";import"./chunk-25IWHVMW.js";import{a as we,b as Re,c as H,d as V,f as nn}from"./chunk-YM3GAJMN.js";import{a as F,b as tn}from"./chunk-JW2HNT3J.js";import"./chunk-OH4SKOAM.js";import"./chunk-PNK5KHSI.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-GHAYAXWZ.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-WVELSL6T.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.14.8");process.exit(0)}
2
- import"./chunk-XAESN54Q.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.1");process.exit(0)}
2
+ import"./chunk-PNK5KHSI.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.14.8");process.exit(0)}
2
- import{a as p}from"./chunk-DZHXCOSK.js";import"./chunk-XAESN54Q.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.1");process.exit(0)}
2
+ import{a as p}from"./chunk-GAKVCN3C.js";import"./chunk-PNK5KHSI.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.1");process.exit(0)}
2
+ import{a}from"./chunk-KHVWIUAF.js";import"./chunk-PBWR2SKH.js";import"./chunk-6Q7PWKWV.js";import"./chunk-DREYYJ7A.js";import"./chunk-NF6SLLE6.js";import"./chunk-3NOSMJS4.js";import"./chunk-5C4UYXQL.js";import"./chunk-W5NHBYYS.js";import"./chunk-53HWWWFZ.js";import"./chunk-UE33MZOC.js";import"./chunk-ADEYBXAS.js";import"./chunk-WQZR6DS6.js";import"./chunk-WPG6SW7C.js";import"./chunk-SRXXPZVT.js";import"./chunk-LQI5GVH7.js";import"./chunk-UGUZFUQG.js";import"./chunk-2K3QFLX2.js";import"./chunk-7FGSX4UD.js";import"./chunk-46DUU44C.js";import"./chunk-ARWSPV2C.js";import"./chunk-HU4QGCIJ.js";import"./chunk-25IWHVMW.js";import"./chunk-JW2HNT3J.js";import"./chunk-OH4SKOAM.js";import"./chunk-PNK5KHSI.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.14.8");process.exit(0)}
2
- import{b as g}from"./chunk-XAESN54Q.js";import*as s from"fs";import*as f from"os";import*as t from"path";function j(){l=null,p=null}function m(a,n){let i=t.relative(n,a);return i===""||!i.startsWith("..")&&!t.isAbsolute(i)}function v(a=process.cwd()){if(process.env.AQE_PROJECT_ROOT)return process.env.AQE_PROJECT_ROOT;let n=t.resolve(a);if(l&&p===n)return l;p=n;let i=t.parse(n).root,c=null;try{c=t.resolve(f.homedir())}catch{c=null}let e=n,r=null,o=null,u=null;for(;e!==i;){let h=e===c&&e!==n&&!m(n,t.join(e,".agentic-qe"));o===null&&!h&&s.existsSync(t.join(e,".agentic-qe"))&&r===null&&(r=e),s.existsSync(t.join(e,".git"))&&o===null&&(o=e),s.existsSync(t.join(e,"package.json"))&&(u=e),e=t.dirname(e)}return r?l=r:o?l=o:u?l=u:l=n,l}var l,p,d=g(()=>{l=null,p=null});export{j as a,v as b,d as c};
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.1");process.exit(0)}
2
+ import{b as g}from"./chunk-PNK5KHSI.js";import*as s from"fs";import*as f from"os";import*as t from"path";function j(){l=null,p=null}function m(a,n){let i=t.relative(n,a);return i===""||!i.startsWith("..")&&!t.isAbsolute(i)}function v(a=process.cwd()){if(process.env.AQE_PROJECT_ROOT)return process.env.AQE_PROJECT_ROOT;let n=t.resolve(a);if(l&&p===n)return l;p=n;let i=t.parse(n).root,c=null;try{c=t.resolve(f.homedir())}catch{c=null}let e=n,r=null,o=null,u=null;for(;e!==i;){let h=e===c&&e!==n&&!m(n,t.join(e,".agentic-qe"));o===null&&!h&&s.existsSync(t.join(e,".agentic-qe"))&&r===null&&(r=e),s.existsSync(t.join(e,".git"))&&o===null&&(o=e),s.existsSync(t.join(e,"package.json"))&&(u=e),e=t.dirname(e)}return r?l=r:o?l=o:u?l=u:l=n,l}var l,p,d=g(()=>{l=null,p=null});export{j as a,v as b,d as c};