agentic-qe 3.14.5 → 3.14.7

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 (494) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +150 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/adapters/ag-ui/event-types.d.ts +1 -1
  5. package/dist/audit/witness-chain-hash.d.ts +18 -0
  6. package/dist/audit/witness-chain-hash.js +37 -0
  7. package/dist/audit/witness-chain-repair.d.ts +71 -0
  8. package/dist/audit/witness-chain-repair.js +203 -0
  9. package/dist/audit/witness-chain-verifier.d.ts +152 -0
  10. package/dist/audit/witness-chain-verifier.js +293 -0
  11. package/dist/audit/witness-chain.d.ts +10 -43
  12. package/dist/audit/witness-chain.js +16 -106
  13. package/dist/audit/witness-findings.js +4 -1
  14. package/dist/cli/bundle.js +8 -8
  15. package/dist/cli/chunks/adapter-TVQKH65T.js +2 -0
  16. package/dist/cli/chunks/agent-booster-wasm-AK2W76RG.js +2 -0
  17. package/dist/cli/chunks/{agent-handler-V6CZ7Q6S.js → agent-handler-MGZCWHIY.js} +2 -2
  18. package/dist/cli/chunks/{agent-memory-branch-ZMD6ULC3.js → agent-memory-branch-JZ54MCSP.js} +2 -2
  19. package/dist/cli/chunks/aqe-learning-engine-ULGTVVWE.js +2 -0
  20. package/dist/cli/chunks/{arena-QLSBESC7.js → arena-CUVH3V7H.js} +2 -2
  21. package/dist/cli/chunks/{arena-4UPAEHFT.js → arena-YSWTKBCL.js} +4 -4
  22. package/dist/cli/chunks/audit-LVU76QGA.js +4 -0
  23. package/dist/cli/chunks/base-W42BURDL.js +2 -0
  24. package/dist/cli/chunks/{better-sqlite3-4DSBPDRH.js → better-sqlite3-DB3LOJQU.js} +2 -2
  25. package/dist/cli/chunks/{brain-handler-GBY4EZ4P.js → brain-handler-SD63KOQ6.js} +3 -3
  26. package/dist/cli/chunks/{branch-enumerator-XYBVXCNO.js → branch-enumerator-4MNOPUC7.js} +2 -2
  27. package/dist/cli/chunks/{browser-32F6MREU.js → browser-OLPNTWQE.js} +2 -2
  28. package/dist/cli/chunks/browser-workflow-HKGHFFFT.js +2 -0
  29. package/dist/cli/chunks/{chunk-WLXK2KNU.js → chunk-23CX7JNL.js} +2 -2
  30. package/dist/cli/chunks/{chunk-O3JTQ7N4.js → chunk-25P6JA6V.js} +1 -1
  31. package/dist/cli/chunks/{chunk-DO6EI5KB.js → chunk-2G63VIJE.js} +1 -1
  32. package/dist/cli/chunks/{chunk-G3L5L6YQ.js → chunk-2IMSJ7IO.js} +1 -1
  33. package/dist/cli/chunks/{chunk-RD6TEZ64.js → chunk-36VKMAMN.js} +2 -2
  34. package/dist/cli/chunks/{chunk-KIP6WZGV.js → chunk-3M7J4U74.js} +3 -3
  35. package/dist/cli/chunks/chunk-3QJU4Q4R.js +5 -0
  36. package/dist/cli/chunks/{chunk-2JGEZHWY.js → chunk-4EKV7PHB.js} +2 -2
  37. package/dist/cli/chunks/chunk-4INST4ZL.js +4 -0
  38. package/dist/cli/chunks/{chunk-DPBRWP4J.js → chunk-53BXTTRO.js} +3 -3
  39. package/dist/cli/chunks/chunk-5D7ZFWDS.js +2 -0
  40. package/dist/cli/chunks/{chunk-XLAUGSW7.js → chunk-5FSLMYAC.js} +2 -2
  41. package/dist/cli/chunks/chunk-5GFKTJ65.js +4 -0
  42. package/dist/cli/chunks/{chunk-WOIGKU2N.js → chunk-5U6N4V5M.js} +11 -11
  43. package/dist/cli/chunks/{chunk-PSPKSUF6.js → chunk-6EGS77BB.js} +1 -1
  44. package/dist/cli/chunks/{chunk-QIRL6B3C.js → chunk-6PJPQGF4.js} +2 -2
  45. package/dist/cli/chunks/{chunk-I6X3EGJI.js → chunk-6RD44SCE.js} +1 -1
  46. package/dist/cli/chunks/{chunk-IGBEJ4UJ.js → chunk-74IOEOMH.js} +2 -2
  47. package/dist/cli/chunks/{chunk-E3W6XQ57.js → chunk-77QZHIVX.js} +2 -2
  48. package/dist/cli/chunks/{chunk-R74ZKREV.js → chunk-7EZ2Z2CK.js} +1 -1
  49. package/dist/cli/chunks/{chunk-UTBYJ4RF.js → chunk-7MIOK72I.js} +18 -35
  50. package/dist/cli/chunks/{chunk-URVHZPWY.js → chunk-7QYOTUOX.js} +2 -2
  51. package/dist/cli/chunks/{chunk-K27SU3RE.js → chunk-A2VUCUTT.js} +2 -2
  52. package/dist/cli/chunks/{chunk-2KJQ2UQE.js → chunk-A3DK3XNZ.js} +1 -1
  53. package/dist/cli/chunks/{chunk-5D36YHS3.js → chunk-A5MA7A23.js} +4 -4
  54. package/dist/cli/chunks/{chunk-WJHWH5D2.js → chunk-AEUEMVJK.js} +2 -2
  55. package/dist/cli/chunks/{chunk-6CR4VQBQ.js → chunk-AJUBT4NP.js} +2 -2
  56. package/dist/cli/chunks/chunk-B2YGVSOP.js +27 -0
  57. package/dist/cli/chunks/{chunk-D6OUCB2H.js → chunk-B4I43GE2.js} +2 -2
  58. package/dist/cli/chunks/{chunk-WK7B4B6Y.js → chunk-BD7FEUN3.js} +2 -2
  59. package/dist/cli/chunks/{chunk-OEIQTWQP.js → chunk-BE4KALTE.js} +1 -1
  60. package/dist/cli/chunks/{chunk-JROVR6YS.js → chunk-BEFTQVEW.js} +2 -2
  61. package/dist/cli/chunks/{chunk-HBCGYMQU.js → chunk-BLG7SH4A.js} +1 -1
  62. package/dist/cli/chunks/{chunk-2OMLTYQK.js → chunk-C3FXFU2T.js} +1 -1
  63. package/dist/cli/chunks/{chunk-6A44AOGN.js → chunk-CBONQM5D.js} +2 -2
  64. package/dist/cli/chunks/{chunk-73EI4C2E.js → chunk-CQNMGK6Y.js} +2 -2
  65. package/dist/cli/chunks/{chunk-IIAR5S7Q.js → chunk-CVOQ6ESD.js} +2 -2
  66. package/dist/cli/chunks/{chunk-6TU7FEMD.js → chunk-DOBKEXMJ.js} +1 -1
  67. package/dist/cli/chunks/{chunk-BHFR2EXL.js → chunk-DYTQHRUS.js} +1 -1
  68. package/dist/cli/chunks/{chunk-E4AZXCT5.js → chunk-EADSQN5T.js} +1 -1
  69. package/dist/cli/chunks/{chunk-CYE2TJFV.js → chunk-EGOIIUBD.js} +2 -2
  70. package/dist/cli/chunks/{chunk-DKUBQQFG.js → chunk-EIGRV3J6.js} +2 -2
  71. package/dist/cli/chunks/{chunk-RP2ZKPYV.js → chunk-EJ6MMYLK.js} +1 -1
  72. package/dist/cli/chunks/{chunk-HSVKZ5KI.js → chunk-ENK44A6Q.js} +2 -2
  73. package/dist/cli/chunks/{chunk-67YV75XP.js → chunk-EYXE2XKP.js} +2 -2
  74. package/dist/cli/chunks/{chunk-HYEJJJY3.js → chunk-F2OPFVQH.js} +1 -1
  75. package/dist/cli/chunks/{chunk-XUR2M2WB.js → chunk-FBZC4IGB.js} +2 -2
  76. package/dist/cli/chunks/{chunk-BXVAVFGU.js → chunk-FSSR6WBE.js} +2 -2
  77. package/dist/cli/chunks/{chunk-W2XCZU62.js → chunk-FW4DJ4FJ.js} +1 -1
  78. package/dist/cli/chunks/{chunk-KKHYJF5U.js → chunk-FYPX5WBJ.js} +1 -1
  79. package/dist/cli/chunks/{chunk-K7NJHFLZ.js → chunk-G367W7XR.js} +3 -3
  80. package/dist/cli/chunks/{chunk-IUDWEOLX.js → chunk-GLGKQX2V.js} +2 -2
  81. package/dist/cli/chunks/{chunk-JVQBWYHW.js → chunk-GV4DYPJP.js} +2 -2
  82. package/dist/cli/chunks/{chunk-GTKCGPJZ.js → chunk-GVVFTFMB.js} +2 -2
  83. package/dist/cli/chunks/{chunk-AFEDJ3RU.js → chunk-H5RQPO3X.js} +2 -2
  84. package/dist/cli/chunks/{chunk-4FWTLJEP.js → chunk-HPWWYT67.js} +2 -2
  85. package/dist/cli/chunks/{chunk-G3W6BMVJ.js → chunk-HXXHMLJ5.js} +1 -1
  86. package/dist/cli/chunks/{chunk-NU7UTXMP.js → chunk-HYFQUWNB.js} +2 -2
  87. package/dist/cli/chunks/chunk-HYOPJHHW.js +2 -0
  88. package/dist/cli/chunks/{chunk-6LKDHEBY.js → chunk-HZY42OVU.js} +2 -2
  89. package/dist/cli/chunks/{chunk-C3HQL6S4.js → chunk-IAENZ2DR.js} +2 -2
  90. package/dist/cli/chunks/{chunk-M23ZOZVY.js → chunk-IEJ7ZV3M.js} +1 -1
  91. package/dist/cli/chunks/{chunk-RIZVC4XY.js → chunk-IWFFO6VT.js} +2 -2
  92. package/dist/cli/chunks/chunk-J7AQZLIH.js +21 -0
  93. package/dist/cli/chunks/{chunk-3KDL6QDK.js → chunk-JHJUSSAU.js} +2 -2
  94. package/dist/cli/chunks/{chunk-DLF5BOJD.js → chunk-JOZ47MV6.js} +1 -1
  95. package/dist/cli/chunks/{chunk-ELBZON4V.js → chunk-JZT7BU44.js} +2 -2
  96. package/dist/cli/chunks/{chunk-3DDXWYMO.js → chunk-KD2BLA5Y.js} +1 -1
  97. package/dist/cli/chunks/{chunk-VD5IO5EO.js → chunk-KUHLTVWC.js} +1 -1
  98. package/dist/cli/chunks/{chunk-YDFL445W.js → chunk-LU2EDWQK.js} +2 -2
  99. package/dist/cli/chunks/chunk-LXZMP3VX.js +736 -0
  100. package/dist/cli/chunks/{chunk-3YUB5HER.js → chunk-LY7MFGBD.js} +196 -187
  101. package/dist/cli/chunks/chunk-MM56VPNE.js +180 -0
  102. package/dist/cli/chunks/{chunk-37TUN44F.js → chunk-MNQN7UZX.js} +2 -2
  103. package/dist/cli/chunks/{chunk-7DETTOPZ.js → chunk-MQZ53OR3.js} +2 -2
  104. package/dist/cli/chunks/{chunk-BYG36QC5.js → chunk-MT7UNBZ7.js} +2 -2
  105. package/dist/cli/chunks/{chunk-JES6R5KP.js → chunk-MZB2UV2O.js} +1 -1
  106. package/dist/cli/chunks/{chunk-QZMUXJHZ.js → chunk-MZMG6CUJ.js} +2 -2
  107. package/dist/cli/chunks/chunk-N5XOXPHZ.js +4 -0
  108. package/dist/cli/chunks/{chunk-RD2VGOUH.js → chunk-NBLDBVAW.js} +1 -1
  109. package/dist/cli/chunks/{chunk-HVU64GP5.js → chunk-ND4QTZOL.js} +2 -2
  110. package/dist/cli/chunks/{chunk-SQF6HRXR.js → chunk-NHUGHAY6.js} +1 -1
  111. package/dist/cli/chunks/{chunk-TUSSPKRM.js → chunk-NOHWJOBS.js} +1 -1
  112. package/dist/cli/chunks/{chunk-NVYBM3R4.js → chunk-O5V7RHVG.js} +2 -2
  113. package/dist/cli/chunks/{chunk-6VAZAHQG.js → chunk-O6MO5KMR.js} +2 -2
  114. package/dist/cli/chunks/{chunk-IUHB5GVS.js → chunk-OAZX6WFU.js} +2 -2
  115. package/dist/cli/chunks/{chunk-LSUILON7.js → chunk-OEPNNLR4.js} +1 -1
  116. package/dist/cli/chunks/{chunk-IJHCIXJC.js → chunk-OIDWDGLG.js} +2 -2
  117. package/dist/cli/chunks/{chunk-CPC7FN52.js → chunk-ON2UTP2U.js} +2 -2
  118. package/dist/cli/chunks/{chunk-UJWAWIRV.js → chunk-ONR2NXXD.js} +7 -7
  119. package/dist/cli/chunks/{chunk-7VFY7TUR.js → chunk-OXHF3L2T.js} +2 -2
  120. package/dist/cli/chunks/{chunk-QYOGD2VW.js → chunk-OZGIOKEA.js} +1 -1
  121. package/dist/cli/chunks/{chunk-WJTSY5MC.js → chunk-P2UPYSDJ.js} +1 -1
  122. package/dist/cli/chunks/{chunk-52L77RMG.js → chunk-P7XSPP5D.js} +2 -2
  123. package/dist/cli/chunks/{chunk-M5AEL7IS.js → chunk-PCJQCEBA.js} +2 -2
  124. package/dist/cli/chunks/chunk-PELENDDQ.js +2 -0
  125. package/dist/cli/chunks/{chunk-C3Z4VVHP.js → chunk-PYKY22GC.js} +5 -5
  126. package/dist/cli/chunks/{chunk-AF4XKLXO.js → chunk-Q3NSU24F.js} +2 -2
  127. package/dist/cli/chunks/chunk-Q6NTEICT.js +2 -0
  128. package/dist/cli/chunks/chunk-QFETNCNN.js +12 -0
  129. package/dist/cli/chunks/{chunk-KYA5LARK.js → chunk-QGOWNVVG.js} +1 -1
  130. package/dist/cli/chunks/{chunk-Y5L3ES4L.js → chunk-QPLSYEWJ.js} +2 -2
  131. package/dist/cli/chunks/{chunk-F34OAHOM.js → chunk-QQFQDEUE.js} +2 -2
  132. package/dist/cli/chunks/{chunk-EFV4ADMO.js → chunk-QUORH2MG.js} +55 -79
  133. package/dist/cli/chunks/{chunk-QWUXCG2L.js → chunk-QVH5Y7AP.js} +1 -1
  134. package/dist/cli/chunks/{chunk-I2NENQ44.js → chunk-RC2A4JZ5.js} +2 -2
  135. package/dist/cli/chunks/{chunk-XZSMZHM2.js → chunk-RDGPXENG.js} +2 -2
  136. package/dist/cli/chunks/{chunk-N7H767TP.js → chunk-RKI3IQKQ.js} +2 -2
  137. package/dist/cli/chunks/{chunk-LULD4JV2.js → chunk-RKUAWQOF.js} +2 -2
  138. package/dist/cli/chunks/chunk-RLW25X66.js +2 -0
  139. package/dist/cli/chunks/{chunk-UKGXWW64.js → chunk-ROVZSZCS.js} +3 -3
  140. package/dist/cli/chunks/{chunk-EOR2UT72.js → chunk-RT6O2HW2.js} +2 -2
  141. package/dist/cli/chunks/{chunk-75QJ5HWE.js → chunk-SM2YJ2AL.js} +2 -2
  142. package/dist/cli/chunks/{chunk-KO4FNAUR.js → chunk-SRPLERER.js} +3 -3
  143. package/dist/cli/chunks/{chunk-NRE4NAVA.js → chunk-T77GZF4B.js} +1 -1
  144. package/dist/cli/chunks/{chunk-R6IU3EWP.js → chunk-TFK2AYIN.js} +2 -2
  145. package/dist/cli/chunks/chunk-TW3SR4TS.js +2 -0
  146. package/dist/cli/chunks/{chunk-IYTLXUBO.js → chunk-TXSPBLBT.js} +2 -2
  147. package/dist/cli/chunks/chunk-UA7TDVL7.js +12 -0
  148. package/dist/cli/chunks/{chunk-WX6RRIGW.js → chunk-UBJG3IHT.js} +2 -2
  149. package/dist/cli/chunks/{chunk-NQI7FWCS.js → chunk-UFSVUBTR.js} +2 -2
  150. package/dist/cli/chunks/{chunk-FUNGTIF2.js → chunk-UOI6ULCH.js} +2 -2
  151. package/dist/cli/chunks/{chunk-HVXJC3OC.js → chunk-UYUJT6QO.js} +2 -2
  152. package/dist/cli/chunks/{chunk-KEY43ANX.js → chunk-V5AK56DA.js} +2 -2
  153. package/dist/cli/chunks/{chunk-XFPPERA2.js → chunk-V6RE4YRQ.js} +2 -2
  154. package/dist/cli/chunks/{chunk-DDCIYOGT.js → chunk-VW6FRMLW.js} +2 -2
  155. package/dist/cli/chunks/chunk-VXKWNRGA.js +2 -0
  156. package/dist/cli/chunks/{chunk-CVMNJSCB.js → chunk-VYDVI6FZ.js} +2 -2
  157. package/dist/cli/chunks/{chunk-7JZJJA7U.js → chunk-WF6UISKW.js} +3 -3
  158. package/dist/cli/chunks/{chunk-SQKW3B6B.js → chunk-WIH522AP.js} +1 -1
  159. package/dist/cli/chunks/{chunk-KLTP5IDB.js → chunk-WOV6XI3A.js} +1 -1
  160. package/dist/cli/chunks/{chunk-VTOVWHEM.js → chunk-X7ADKL7T.js} +2 -2
  161. package/dist/cli/chunks/{chunk-SX4JLSLV.js → chunk-XBYQ2BS4.js} +2 -2
  162. package/dist/cli/chunks/{chunk-E4EYPYR3.js → chunk-XL5KIYE3.js} +2 -2
  163. package/dist/cli/chunks/{chunk-3VIXOHMS.js → chunk-XWYELBZS.js} +1 -1
  164. package/dist/cli/chunks/{chunk-YQGPQBCX.js → chunk-XYLQZWF6.js} +2 -2
  165. package/dist/cli/chunks/{chunk-XEZIIQYJ.js → chunk-Y6AKKQIQ.js} +1 -1
  166. package/dist/cli/chunks/{chunk-BJPL6THQ.js → chunk-YMW57PEL.js} +1 -1
  167. package/dist/cli/chunks/{chunk-JSZ663MU.js → chunk-YO4ESCB4.js} +1 -1
  168. package/dist/cli/chunks/{chunk-AMMQOV35.js → chunk-YRHTQZU4.js} +2 -2
  169. package/dist/cli/chunks/chunk-Z4Q5PCRZ.js +65 -0
  170. package/dist/cli/chunks/{chunk-RKOUXVZZ.js → chunk-ZELWDJXT.js} +2 -2
  171. package/dist/cli/chunks/{chunk-QRCIZFNK.js → chunk-ZQZD55MN.js} +2 -2
  172. package/dist/cli/chunks/{chunk-UMGFMKDW.js → chunk-ZS4XVJGV.js} +2 -2
  173. package/dist/cli/chunks/{chunk-6ITZZIQX.js → chunk-ZUB5YOCM.js} +2 -2
  174. package/dist/cli/chunks/chunk-ZUOVNFXK.js +2 -0
  175. package/dist/cli/chunks/{chunk-RGGK6VZ7.js → chunk-ZWEKAEEV.js} +1 -1
  176. package/dist/cli/chunks/{ci-RACDAJMR.js → ci-J3TDK5RA.js} +8 -8
  177. package/dist/cli/chunks/{ci-output-EHRSZBKG.js → ci-output-RLS32FUY.js} +2 -2
  178. package/dist/cli/chunks/{circuit-breaker-GBV7M5XG.js → circuit-breaker-MRCC7WCM.js} +2 -2
  179. package/dist/cli/chunks/claude-flow-setup-LIZCEKDF.js +2 -0
  180. package/dist/cli/chunks/client-3BD2DI4N.js +2 -0
  181. package/dist/cli/chunks/{cline-installer-W4NMXJSG.js → cline-installer-T7H6R2RC.js} +2 -2
  182. package/dist/cli/chunks/{code-JWXJMYXB.js → code-XMBLI7OF.js} +3 -3
  183. package/dist/cli/chunks/{code-index-extractor-RVI2IFTM.js → code-index-extractor-QS7BYLEX.js} +2 -2
  184. package/dist/cli/chunks/{codex-installer-3BORJINH.js → codex-installer-6PGT5FM6.js} +6 -6
  185. package/dist/cli/chunks/{completions-A55NCTAO.js → completions-2A3WRXY2.js} +2 -2
  186. package/dist/cli/chunks/{complexity-analyzer-JCXHGGLY.js → complexity-analyzer-23HOOGJ7.js} +2 -2
  187. package/dist/cli/chunks/{continuedev-installer-PUVFMGYW.js → continuedev-installer-4FSF7B3N.js} +2 -2
  188. package/dist/cli/chunks/{copilot-installer-4DCMYWHB.js → copilot-installer-A5GRQQUU.js} +2 -2
  189. package/dist/cli/chunks/core-handlers-C3H2ZCS2.js +2 -0
  190. package/dist/cli/chunks/{cost-tracker-5TV2GGKY.js → cost-tracker-Z4STQ5VB.js} +2 -2
  191. package/dist/cli/chunks/{coverage-NNWM7TX3.js → coverage-NUPP6KZZ.js} +3 -3
  192. package/dist/cli/chunks/cross-domain-router-JCQ7SWDP.js +2 -0
  193. package/dist/cli/chunks/{cursor-installer-4NCHGJGK.js → cursor-installer-FVJ7ROPJ.js} +2 -2
  194. package/dist/cli/chunks/{daemon-QIKCXKWO.js → daemon-7ZZA2MMN.js} +4 -4
  195. package/dist/cli/chunks/{daemon-T4JO4IXP.js → daemon-D662EX5N.js} +3 -3
  196. package/dist/cli/chunks/{dag-attention-scheduler-RPAAIDAD.js → dag-attention-scheduler-IB4TQ2KA.js} +2 -2
  197. package/dist/cli/chunks/{detect-SBEEVDSN.js → detect-LGLBZN4I.js} +2 -2
  198. package/dist/cli/chunks/{dist-node-ZHI6NCSU.js → dist-node-Z3OL42YE.js} +2 -2
  199. package/dist/cli/chunks/{domain-handler-LBC3GJ7Z.js → domain-handler-L3CLNL7U.js} +2 -2
  200. package/dist/cli/chunks/{domain-plugins-H6IZ5USZ.js → domain-plugins-GQ3V5X6L.js} +2 -2
  201. package/dist/cli/chunks/domain-transfer-MFCI76IY.js +2 -0
  202. package/dist/cli/chunks/dream-FTP33IJB.js +2 -0
  203. package/dist/cli/chunks/{embed-and-insert-pattern-AHTR7CRU.js → embed-and-insert-pattern-UGD6USYH.js} +2 -2
  204. package/dist/cli/chunks/{eval-DZU2KISM.js → eval-3B7UIYGY.js} +2 -2
  205. package/dist/cli/chunks/{experience-capture-middleware-5IQCWKSL.js → experience-capture-middleware-3RQ4NYY3.js} +3 -3
  206. package/dist/cli/chunks/{fast-paths-2KLDUWCY.js → fast-paths-QOSAEPYD.js} +2 -2
  207. package/dist/cli/chunks/{feature-flags-7AC3XDZA.js → feature-flags-3S5TH6P4.js} +2 -2
  208. package/dist/cli/chunks/{feature-flags-N6UAEZY4.js → feature-flags-TLF4NKOH.js} +2 -2
  209. package/dist/cli/chunks/{file-discovery-5SDIW4V2.js → file-discovery-AEVMJRNB.js} +2 -2
  210. package/dist/cli/chunks/{fleet-ZIQCAZ2Y.js → fleet-E6WTXWFL.js} +3 -3
  211. package/dist/cli/chunks/{gnn-wrapper-DUMBZJEV.js → gnn-wrapper-MCKH3AUU.js} +2 -2
  212. package/dist/cli/chunks/{heartbeat-handler-6HVM6ZMR.js → heartbeat-handler-U7XENHRR.js} +4 -4
  213. package/dist/cli/chunks/heartbeat-scheduler-HXBJVJL2.js +2 -0
  214. package/dist/cli/chunks/hnsw-adapter-TU6WG2ME.js +2 -0
  215. package/dist/cli/chunks/hnsw-index-MS5KODD7.js +2 -0
  216. package/dist/cli/chunks/{hnsw-legacy-bridge-5DRL5FLX.js → hnsw-legacy-bridge-5GW4SAEI.js} +2 -2
  217. package/dist/cli/chunks/{hnswlib-node-GW67GTCL.js → hnswlib-node-7BLZBK5T.js} +2 -2
  218. package/dist/cli/chunks/{hooks-QHH6FVO4.js → hooks-F3O2SB6H.js} +10 -10
  219. package/dist/cli/chunks/hybrid-backend-HT45LBHC.js +2 -0
  220. package/dist/cli/chunks/{hypergraph-engine-7XDCCVG2.js → hypergraph-engine-PV4EKXHB.js} +2 -2
  221. package/dist/cli/chunks/{hypergraph-handler-QHF7NOU5.js → hypergraph-handler-VOWO5ZTW.js} +3 -3
  222. package/dist/cli/chunks/impact-analyzer-AP4AGTG5.js +2 -0
  223. package/dist/cli/chunks/{init-handler-5UIVOM7K.js → init-handler-ENJ5ONJX.js} +16 -14
  224. package/dist/cli/chunks/init-wizard-I5DFZUQL.js +2 -0
  225. package/dist/cli/chunks/kernel-MISPSPPA.js +2 -0
  226. package/dist/cli/chunks/{kilocode-installer-TGGV6K5Q.js → kilocode-installer-HNNJOOPE.js} +2 -2
  227. package/dist/cli/chunks/{kiro-installer-4XYBHZWW.js → kiro-installer-UZBIQ3IC.js} +2 -2
  228. package/dist/cli/chunks/knowledge-graph-L26JESGE.js +2 -0
  229. package/dist/cli/chunks/{learning-STE5W6BS.js → learning-YMLCVFUT.js} +3 -3
  230. package/dist/cli/chunks/{llm-router-NKF7J3RI.js → llm-router-YWTARCCT.js} +4 -4
  231. package/dist/cli/chunks/llm-router-service-MWGC43ZA.js +2 -0
  232. package/dist/cli/chunks/{load-B2T77UJQ.js → load-DKE3F3IP.js} +2 -2
  233. package/dist/cli/chunks/load-test-H5ISNNM5.js +2 -0
  234. package/dist/cli/chunks/mcp-5PSGIUCW.js +2 -0
  235. package/dist/cli/chunks/{memory-WRFZKG56.js → memory-3L3O6JMM.js} +5 -5
  236. package/dist/cli/chunks/memory-backend-HWDNOBKW.js +2 -0
  237. package/dist/cli/chunks/memory-handlers-ZFDVQZM5.js +2 -0
  238. package/dist/cli/chunks/multi-model-executor-AEEO7IA4.js +14 -0
  239. package/dist/cli/chunks/{opencode-installer-J36EMQU7.js → opencode-installer-ABBO355U.js} +2 -2
  240. package/dist/cli/chunks/orchestrator-E36Q7MKE.js +393 -0
  241. package/dist/cli/chunks/pattern-null-store-GQP6ICWK.js +2 -0
  242. package/dist/cli/chunks/{pattern-usage-recorder-BVMTWI3E.js → pattern-usage-recorder-H4XKSID4.js} +2 -2
  243. package/dist/cli/chunks/{pipeline-OWAHDUAQ.js → pipeline-BGFEHXIN.js} +2 -2
  244. package/dist/cli/chunks/{platform-ANGBFWBV.js → platform-GK7ZVDJI.js} +2 -2
  245. package/dist/cli/chunks/{plugin-OO7ON2YW.js → plugin-CAH2CKI6.js} +2 -2
  246. package/dist/cli/chunks/{prime-radiant-advanced-wasm-HFG3BXWU.js → prime-radiant-advanced-wasm-M5EYRONA.js} +2 -2
  247. package/dist/cli/chunks/{project-root-LNOYVTYY.js → project-root-BSNZC243.js} +2 -2
  248. package/dist/cli/chunks/protocol-executor-AD5A4DAI.js +2 -0
  249. package/dist/cli/chunks/{protocol-handler-CE3Q6LY4.js → protocol-handler-JDSSC2SF.js} +2 -2
  250. package/dist/cli/chunks/{prove-7XPN53PY.js → prove-ANPTOZJE.js} +2 -2
  251. package/dist/cli/chunks/qe-reasoning-bank-W3Z2PKTR.js +2 -0
  252. package/dist/cli/chunks/{quality-TT23JRFX.js → quality-SXWGYRQR.js} +2 -2
  253. package/dist/cli/chunks/{quality-gate-PPPRP255.js → quality-gate-GYNCA4ZY.js} +3 -3
  254. package/dist/cli/chunks/queen-coordinator-HQRHLIJX.js +2 -0
  255. package/dist/cli/chunks/{real-embeddings-EYNZIFJE.js → real-embeddings-WSRYAOZM.js} +2 -2
  256. package/dist/cli/chunks/{ref-validation-QQR64ZXD.js → ref-validation-AZ3LRWEK.js} +2 -2
  257. package/dist/cli/chunks/{roocode-installer-UIGS7ZJD.js → roocode-installer-2QKGFIEU.js} +2 -2
  258. package/dist/cli/chunks/router-MTP5LH4H.js +2 -0
  259. package/dist/cli/chunks/routing-feedback-GWETVB4L.js +2 -0
  260. package/dist/cli/chunks/{routing-handler-6AENUIRG.js → routing-handler-UYDC5MMD.js} +2 -2
  261. package/dist/cli/chunks/{ruvector-commands-5AWMEV34.js → ruvector-commands-QXADPVEY.js} +2 -2
  262. package/dist/cli/chunks/rvf-dual-writer-4UE5S7WP.js +2 -0
  263. package/dist/cli/chunks/rvf-migration-adapter-PHH3HF4Q.js +2 -0
  264. package/dist/cli/chunks/{rvf-migration-coordinator-NWRJ7C22.js → rvf-migration-coordinator-GD4NBFKT.js} +2 -2
  265. package/dist/cli/chunks/rvf-native-adapter-KTLZBUWV.js +2 -0
  266. package/dist/cli/chunks/{rvf-store-integrity-ISKRP563.js → rvf-store-integrity-7SXG66IL.js} +2 -2
  267. package/dist/cli/chunks/safe-db-FWWGAPVE.js +2 -0
  268. package/dist/cli/chunks/schedule-TPA4V4D5.js +2 -0
  269. package/dist/cli/chunks/scheduler-5ZTEPNDD.js +2 -0
  270. package/dist/cli/chunks/{security-325A7FMB.js → security-YKB622PK.js} +3 -3
  271. package/dist/cli/chunks/shared-rvf-adapter-KMLAV7JK.js +2 -0
  272. package/dist/cli/chunks/{shared-rvf-dual-writer-THFDYS2Z.js → shared-rvf-dual-writer-OYY27DFV.js} +2 -2
  273. package/dist/cli/chunks/sqlite-persistence-HPTT624C.js +2 -0
  274. package/dist/cli/chunks/{standalone-memory-UD4MJ6GZ.js → standalone-memory-2DOABVLC.js} +2 -2
  275. package/dist/cli/chunks/{status-handler-CPFTN4XL.js → status-handler-EXRKETV7.js} +2 -2
  276. package/dist/cli/chunks/{structural-health-2MG2IVBL.js → structural-health-2SKK6DU6.js} +2 -2
  277. package/dist/cli/chunks/sync-DQ2YUNI6.js +2 -0
  278. package/dist/cli/chunks/{sync-EE4VVKOW.js → sync-UW7SX7GO.js} +2 -2
  279. package/dist/cli/chunks/{task-handler-7H5OYJG4.js → task-handler-LYQ6WYUY.js} +2 -2
  280. package/dist/cli/chunks/task-handlers-DIJO232S.js +9 -0
  281. package/dist/cli/chunks/test-WRHZMUCW.js +33 -0
  282. package/dist/cli/chunks/{test-scheduling-CHQ4ZLLJ.js → test-scheduling-HI23RXFK.js} +3 -3
  283. package/dist/cli/chunks/token-bootstrap-23SA6SWZ.js +2 -0
  284. package/dist/cli/chunks/{token-usage-EBXUJNRB.js → token-usage-M7RRDPXO.js} +2 -2
  285. package/dist/cli/chunks/{transformers-ZEKS2OJZ.js → transformers-4TC35KKS.js} +2 -2
  286. package/dist/cli/chunks/tree-sitter-wasm-parser-F4LTKAWD.js +2 -0
  287. package/dist/cli/chunks/{types-KYAA5VLV.js → types-NBXV6LXQ.js} +2 -2
  288. package/dist/cli/chunks/unified-memory-OVFEPRPS.js +2 -0
  289. package/dist/cli/chunks/unified-memory-hnsw-KKRSCZHR.js +2 -0
  290. package/dist/cli/chunks/unified-persistence-7GLR4RI3.js +2 -0
  291. package/dist/cli/chunks/{upgrade-UJBJ5AYM.js → upgrade-4BGOU5RM.js} +2 -2
  292. package/dist/cli/chunks/{validate-RUV6YMWS.js → validate-EDWAR63H.js} +2 -2
  293. package/dist/cli/chunks/{validate-swarm-IVEVMGVM.js → validate-swarm-VI72CPR7.js} +2 -2
  294. package/dist/cli/chunks/visual-security-2FUM5GLI.js +2 -0
  295. package/dist/cli/chunks/{web-tree-sitter-AVWA6HKE.js → web-tree-sitter-Y5XBRQXF.js} +2 -2
  296. package/dist/cli/chunks/{windsurf-installer-DAH7HI2W.js → windsurf-installer-VEX23WAF.js} +2 -2
  297. package/dist/cli/chunks/witness-chain-3YNL6YGY.js +2 -0
  298. package/dist/cli/chunks/witness-chain-MH6GA5L6.js +2 -0
  299. package/dist/cli/chunks/witness-chain-repair-MJZGZRWT.js +2 -0
  300. package/dist/cli/chunks/witness-chain-verifier-TTJYXTBE.js +2 -0
  301. package/dist/cli/chunks/{witness-key-manager-JSTBMG43.js → witness-key-manager-EM6YXYOY.js} +2 -2
  302. package/dist/cli/chunks/{workflow-TWOIA6LZ.js → workflow-2RBDOM7V.js} +4 -4
  303. package/dist/cli/chunks/workflow-orchestrator-H6G65YKU.js +2 -0
  304. package/dist/cli/chunks/wrappers-5OTAVVOV.js +2 -0
  305. package/dist/cli/commands/audit.d.ts +20 -2
  306. package/dist/cli/commands/audit.js +158 -16
  307. package/dist/cli/commands/ci.js +1 -1
  308. package/dist/cli/commands/claude-flow-setup.js +5 -4
  309. package/dist/cli/commands/test.js +18 -3
  310. package/dist/cli/handlers/init-handler.d.ts +2 -0
  311. package/dist/cli/handlers/init-handler.js +8 -2
  312. package/dist/cli/index.js +10 -1
  313. package/dist/coordination/handlers/test-execution-handlers.js +13 -8
  314. package/dist/coordination/index.d.ts +1 -1
  315. package/dist/coordination/queen-event-handlers.js +9 -6
  316. package/dist/coordination/result-saver.js +1 -1
  317. package/dist/coordination/services/index.d.ts +1 -1
  318. package/dist/coordination/services/task-audit-logger.d.ts +38 -13
  319. package/dist/coordination/services/task-audit-logger.js +33 -5
  320. package/dist/coordination/task-executor.d.ts +5 -0
  321. package/dist/coordination/task-executor.js +10 -5
  322. package/dist/domains/test-generation/coordinator.js +6 -5
  323. package/dist/domains/test-generation/interfaces.d.ts +11 -1
  324. package/dist/domains/test-generation/services/behavior-example-validation.d.ts +36 -0
  325. package/dist/domains/test-generation/services/behavior-example-validation.js +89 -0
  326. package/dist/domains/test-generation/services/behavior-examples.d.ts +8 -0
  327. package/dist/domains/test-generation/services/behavior-examples.js +65 -0
  328. package/dist/domains/test-generation/services/test-generator.d.ts +1 -1
  329. package/dist/domains/test-generation/services/test-generator.js +59 -30
  330. package/dist/domains/visual-accessibility/services/axe-core-audit.d.ts +0 -15
  331. package/dist/domains/visual-accessibility/services/axe-core-audit.js +12 -10
  332. package/dist/init/agents-installer.d.ts +4 -0
  333. package/dist/init/agents-installer.js +24 -11
  334. package/dist/init/browser-engine-installer.d.ts +5 -5
  335. package/dist/init/browser-engine-installer.js +28 -6
  336. package/dist/init/codex-installer.js +4 -2
  337. package/dist/init/idempotent-write.d.ts +53 -0
  338. package/dist/init/idempotent-write.js +160 -0
  339. package/dist/init/init-wizard.d.ts +2 -0
  340. package/dist/init/orchestrator.js +1 -0
  341. package/dist/init/phases/05-learning.js +3 -1
  342. package/dist/init/phases/07-hooks.js +32 -16
  343. package/dist/init/phases/08-mcp.js +4 -2
  344. package/dist/init/phases/09-assets.js +8 -18
  345. package/dist/init/phases/10-workers.js +7 -5
  346. package/dist/init/phases/12-verification.js +7 -2
  347. package/dist/init/phases/phase-interface.d.ts +2 -0
  348. package/dist/init/project-analyzer.d.ts +9 -0
  349. package/dist/init/project-analyzer.js +20 -1
  350. package/dist/init/self-configurator.d.ts +5 -3
  351. package/dist/init/self-configurator.js +18 -29
  352. package/dist/init/skills-installer.js +4 -2
  353. package/dist/init/types.d.ts +6 -0
  354. package/dist/init/types.js +20 -24
  355. package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +2 -5
  356. package/dist/integrations/coherence/coherence-service.js +84 -24
  357. package/dist/integrations/coherence/vote-tally.d.ts +38 -0
  358. package/dist/integrations/coherence/vote-tally.js +39 -0
  359. package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +23 -0
  360. package/dist/integrations/ruvector/shared-rvf-adapter.js +24 -0
  361. package/dist/integrations/vibium/client.d.ts +1 -0
  362. package/dist/integrations/vibium/client.js +24 -11
  363. package/dist/integrations/vibium/runtime.d.ts +14 -0
  364. package/dist/integrations/vibium/runtime.js +94 -0
  365. package/dist/kernel/kernel.js +3 -2
  366. package/dist/kernel/pattern-fts-self-heal.d.ts +63 -0
  367. package/dist/kernel/pattern-fts-self-heal.js +193 -0
  368. package/dist/kernel/process-lifecycle.d.ts +60 -0
  369. package/dist/kernel/process-lifecycle.js +91 -0
  370. package/dist/kernel/unified-memory-schemas.d.ts +15 -1
  371. package/dist/kernel/unified-memory-schemas.js +53 -25
  372. package/dist/kernel/unified-memory.js +31 -34
  373. package/dist/kernel/unified-persistence.js +12 -6
  374. package/dist/learning/experience-capture.d.ts +2 -1
  375. package/dist/learning/experience-capture.js +23 -8
  376. package/dist/learning/pattern-store.d.ts +12 -1
  377. package/dist/learning/pattern-store.js +45 -30
  378. package/dist/learning/qe-patterns.d.ts +12 -0
  379. package/dist/learning/qe-patterns.js +7 -1
  380. package/dist/learning/qe-reasoning-bank.d.ts +1 -0
  381. package/dist/learning/qe-reasoning-bank.js +17 -4
  382. package/dist/learning/real-qe-reasoning-bank.d.ts +9 -4
  383. package/dist/learning/real-qe-reasoning-bank.js +28 -4
  384. package/dist/learning/rvf-pattern-store.js +36 -23
  385. package/dist/learning/sqlite-persistence.d.ts +8 -1
  386. package/dist/learning/sqlite-persistence.js +58 -33
  387. package/dist/logging/console-logger.d.ts +2 -5
  388. package/dist/logging/console-logger.js +10 -46
  389. package/dist/logging/index.d.ts +2 -0
  390. package/dist/logging/index.js +1 -0
  391. package/dist/logging/redaction.d.ts +27 -0
  392. package/dist/logging/redaction.js +170 -0
  393. package/dist/mcp/bundle.js +522 -545
  394. package/dist/mcp/entry.js +52 -6
  395. package/dist/mcp/handlers/core-handlers.js +5 -4
  396. package/dist/mcp/handlers/domain-handler-configs.js +12 -4
  397. package/dist/mcp/handlers/task-handlers.js +11 -7
  398. package/dist/mcp/protocol-server.js +20 -4
  399. package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
  400. package/dist/mcp/services/reasoning-bank-service.js +5 -1
  401. package/dist/mcp/tools/base.d.ts +9 -2
  402. package/dist/mcp/tools/base.js +7 -0
  403. package/dist/mcp/tools/coherence/consensus.js +51 -2
  404. package/dist/mcp/tools/planning/goap-plan.d.ts +20 -7
  405. package/dist/mcp/tools/planning/goap-plan.js +92 -20
  406. package/dist/mcp/tools/planning/goap-status.d.ts +37 -12
  407. package/dist/mcp/tools/planning/goap-status.js +52 -23
  408. package/dist/mcp/tools/planning/world-state.d.ts +101 -0
  409. package/dist/mcp/tools/planning/world-state.js +274 -0
  410. package/dist/mcp/tools/test-execution/e2e-execute.js +9 -1
  411. package/dist/mcp/tools/test-generation/generate.d.ts +6 -1
  412. package/dist/mcp/tools/test-generation/generate.js +8 -0
  413. package/dist/mcp/types.d.ts +10 -4
  414. package/dist/planning/goap-planner.d.ts +60 -4
  415. package/dist/planning/goap-planner.js +218 -60
  416. package/dist/planning/index.d.ts +1 -1
  417. package/dist/planning/index.js +1 -1
  418. package/dist/planning/plan-executor.d.ts +20 -1
  419. package/dist/planning/plan-executor.js +209 -100
  420. package/dist/planning/types.d.ts +16 -0
  421. package/dist/planning/types.js +17 -0
  422. package/dist/shared/error-utils.d.ts +15 -0
  423. package/dist/shared/error-utils.js +21 -0
  424. package/dist/shared/events/domain-events.d.ts +2 -1
  425. package/package.json +10 -6
  426. package/dist/cli/chunks/adapter-IYC62SXA.js +0 -2
  427. package/dist/cli/chunks/agent-booster-wasm-EDNKP3SP.js +0 -2
  428. package/dist/cli/chunks/aqe-learning-engine-LLOU2IXD.js +0 -2
  429. package/dist/cli/chunks/audit-CVZQMF55.js +0 -3
  430. package/dist/cli/chunks/base-P3Z4IKCT.js +0 -2
  431. package/dist/cli/chunks/browser-workflow-YYHQQ25X.js +0 -2
  432. package/dist/cli/chunks/chunk-3EZ5DR2R.js +0 -21
  433. package/dist/cli/chunks/chunk-5WOSWNDN.js +0 -2
  434. package/dist/cli/chunks/chunk-7CD7PBHY.js +0 -3
  435. package/dist/cli/chunks/chunk-7X7JYWT4.js +0 -27
  436. package/dist/cli/chunks/chunk-CZO4BJG5.js +0 -2
  437. package/dist/cli/chunks/chunk-J27F4NSB.js +0 -2
  438. package/dist/cli/chunks/chunk-J5UNP6W3.js +0 -2
  439. package/dist/cli/chunks/chunk-MI5Q55DG.js +0 -65
  440. package/dist/cli/chunks/chunk-TY5WC3FT.js +0 -12
  441. package/dist/cli/chunks/chunk-UDHVCKGA.js +0 -5
  442. package/dist/cli/chunks/chunk-XQSIRBKT.js +0 -180
  443. package/dist/cli/chunks/chunk-YXP6BKGS.js +0 -730
  444. package/dist/cli/chunks/chunk-ZBABIZ2D.js +0 -2
  445. package/dist/cli/chunks/chunk-ZCWERUYB.js +0 -12
  446. package/dist/cli/chunks/claude-flow-setup-5LVJOFKP.js +0 -2
  447. package/dist/cli/chunks/client-HUVFA5PF.js +0 -2
  448. package/dist/cli/chunks/core-handlers-UEXO3VAA.js +0 -2
  449. package/dist/cli/chunks/cross-domain-router-ODU5IZD6.js +0 -2
  450. package/dist/cli/chunks/domain-transfer-JZA5TMW3.js +0 -2
  451. package/dist/cli/chunks/dream-HE3OX42F.js +0 -2
  452. package/dist/cli/chunks/heartbeat-scheduler-QUIFGGLX.js +0 -2
  453. package/dist/cli/chunks/hnsw-adapter-42KB37KP.js +0 -2
  454. package/dist/cli/chunks/hnsw-index-T2PGO77J.js +0 -2
  455. package/dist/cli/chunks/hybrid-backend-FRNWYRKH.js +0 -2
  456. package/dist/cli/chunks/impact-analyzer-A5QYOYBR.js +0 -2
  457. package/dist/cli/chunks/init-wizard-XBU674YH.js +0 -2
  458. package/dist/cli/chunks/kernel-DV5MTNZD.js +0 -2
  459. package/dist/cli/chunks/knowledge-graph-4ACGVJQK.js +0 -2
  460. package/dist/cli/chunks/llm-router-service-PSMASERT.js +0 -2
  461. package/dist/cli/chunks/load-test-MRUO2VPF.js +0 -2
  462. package/dist/cli/chunks/mcp-JGSFCEMH.js +0 -2
  463. package/dist/cli/chunks/memory-backend-2MPGI6JW.js +0 -2
  464. package/dist/cli/chunks/memory-handlers-XT4HMITB.js +0 -2
  465. package/dist/cli/chunks/multi-model-executor-26Q5BSVG.js +0 -14
  466. package/dist/cli/chunks/orchestrator-D5IFV65I.js +0 -393
  467. package/dist/cli/chunks/pattern-null-store-TGWUL237.js +0 -2
  468. package/dist/cli/chunks/protocol-executor-GEVH5KD6.js +0 -2
  469. package/dist/cli/chunks/qe-reasoning-bank-DJ2JL6QB.js +0 -2
  470. package/dist/cli/chunks/queen-coordinator-F7E3AS26.js +0 -2
  471. package/dist/cli/chunks/router-OZH3QSAU.js +0 -2
  472. package/dist/cli/chunks/routing-feedback-J2E3ADZB.js +0 -2
  473. package/dist/cli/chunks/rvf-dual-writer-HK525Y5Y.js +0 -2
  474. package/dist/cli/chunks/rvf-migration-adapter-Q7FB3BKR.js +0 -2
  475. package/dist/cli/chunks/rvf-native-adapter-5ZRCGUI6.js +0 -2
  476. package/dist/cli/chunks/safe-db-3OYEPVEH.js +0 -2
  477. package/dist/cli/chunks/schedule-AG4C2EIQ.js +0 -2
  478. package/dist/cli/chunks/scheduler-SQS2CZFZ.js +0 -2
  479. package/dist/cli/chunks/shared-rvf-adapter-NFL6QSZ6.js +0 -2
  480. package/dist/cli/chunks/sqlite-persistence-MAKDFSHC.js +0 -2
  481. package/dist/cli/chunks/sync-MBTW5XBF.js +0 -2
  482. package/dist/cli/chunks/task-handlers-NH4GJHCJ.js +0 -9
  483. package/dist/cli/chunks/test-MPHGT4T6.js +0 -33
  484. package/dist/cli/chunks/token-bootstrap-SSDCYEKK.js +0 -2
  485. package/dist/cli/chunks/tree-sitter-wasm-parser-J6ZMAK37.js +0 -2
  486. package/dist/cli/chunks/unified-memory-DDWMC435.js +0 -2
  487. package/dist/cli/chunks/unified-memory-hnsw-4JA7SGBK.js +0 -2
  488. package/dist/cli/chunks/unified-persistence-F6OSNTXY.js +0 -2
  489. package/dist/cli/chunks/vibium-HOGMFJ2Z.js +0 -2
  490. package/dist/cli/chunks/visual-security-25SMBIYT.js +0 -2
  491. package/dist/cli/chunks/witness-chain-PJOQPFUX.js +0 -2
  492. package/dist/cli/chunks/witness-chain-ZW6KKUZU.js +0 -2
  493. package/dist/cli/chunks/workflow-orchestrator-UKSIDM7Q.js +0 -2
  494. package/dist/cli/chunks/wrappers-UR7BLXKV.js +0 -2
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Witness Chain verification with break classification (ADR-070, issue #753).
3
+ *
4
+ * Before v3.14.5, two AQE processes appending at once could both read the
5
+ * same tail and write a row whose `prev_hash` points at an older row: an
6
+ * accidental FORK. `verify()` used to stop at the first such break, so the
7
+ * rows after it were never checked and a forked store looked exactly like a
8
+ * tampered one.
9
+ *
10
+ * Every row is now classified:
11
+ *
12
+ * - linked: `prev_hash` is the hash of its predecessor (array-adjacent row,
13
+ * or row `id - 1` in either table, which covers the archival boundary), and
14
+ * no id between the two is missing from live ∪ archive.
15
+ * - fork: the row's own `action_hash` recomputes, its `prev_hash` is the exact
16
+ * hash of an EARLIER row that still exists (live or archive), every id
17
+ * between that parent and the row still exists (no deleted history), and,
18
+ * when the row is signed with a key this verifier holds, the Ed25519
19
+ * signature verifies. The walk records the fork and CONTINUES, checking the
20
+ * next row against the fork row exactly as before.
21
+ * - tamper: anything else. The walk stops there.
22
+ *
23
+ * A fork alone does not make the chain valid: it is only accepted once a later,
24
+ * normally linked `CHAIN_REANCHOR` entry (written by `aqe audit repair`) lists
25
+ * that exact row (id + prev_hash + action_hash + parent id). Forks that appear
26
+ * after a re-anchor are unacknowledged again. The re-anchor also pins the hash
27
+ * of every dead-end row (a losing race sibling that no later row links to), so
28
+ * editing or deleting one after the repair is reported as tampering.
29
+ *
30
+ * Limits (documented in ADR-070): for UNSIGNED rows the fork class is
31
+ * structural, not cryptographic. A row whose prev_hash is the genesis sentinel
32
+ * mid-chain (the legacy #759 brain-import splice) is reported as tamper: the
33
+ * sentinel proves nothing about this chain and is exactly what a forged or
34
+ * history-deleting edit produces.
35
+ */
36
+ import { GENESIS_PREV_HASH, hashWith, serializeEntry, signaturePayload } from './witness-chain-hash.js';
37
+ export const CHAIN_REANCHOR_ACTION = 'CHAIN_REANCHOR';
38
+ /** Row hash under the row's own algorithm (how pins are recorded). */
39
+ export function ownHash(row) {
40
+ return hashWith(row.hash_algo || 'sha256', serializeEntry(row));
41
+ }
42
+ /** Stateful single-use walker; see file header for the classification rules. */
43
+ export class WitnessChainVerifier {
44
+ db;
45
+ keyManager;
46
+ options;
47
+ archiveRows = null;
48
+ parentIndex = new Map();
49
+ acks = new Map();
50
+ pins = [];
51
+ forks = [];
52
+ tamper;
53
+ signatureFailures = 0;
54
+ firstSignatureFailure;
55
+ entriesChecked = 0;
56
+ archiveExists;
57
+ constructor(db, keyManager, options = {}) {
58
+ this.db = db;
59
+ this.keyManager = keyManager;
60
+ this.options = options;
61
+ }
62
+ run() {
63
+ const live = tableExists(this.db, 'witness_chain')
64
+ ? this.db.prepare('SELECT * FROM witness_chain ORDER BY id ASC').all()
65
+ : [];
66
+ if (live.length === 0) {
67
+ // Archiving never moves genesis (id 1) out of the live table, so archived
68
+ // rows with no live chain mean the live table was emptied or dropped.
69
+ if (this.getArchive().length > 0) {
70
+ this.tamper = { id: 1, reason: 'live-chain-missing' };
71
+ return this.result(1);
72
+ }
73
+ return { valid: true, entriesChecked: 0, status: 'valid', tampered: false, forks: [], acknowledgedForks: [], forkDetails: [] };
74
+ }
75
+ // Live table first, then the archive as its own contiguous slice — NOT a
76
+ // merged id-sorted array, which would wrongly treat an archived row as the
77
+ // predecessor of a live row appended (and chained to the live tail) after
78
+ // that row was archived.
79
+ if (this.walk(live, 'live') && this.options.includeArchive)
80
+ this.walk(this.getArchive(), 'archive');
81
+ if (!this.tamper)
82
+ this.checkPins();
83
+ return this.result(live[0].id);
84
+ }
85
+ walk(rows, table) {
86
+ for (let i = 0; i < rows.length; i++) {
87
+ const current = rows[i];
88
+ this.entriesChecked++;
89
+ const link = this.classify(current, i > 0 ? rows[i - 1] : undefined);
90
+ if (link.kind === 'tamper') {
91
+ this.tamper = { id: current.id, reason: link.reason };
92
+ return false;
93
+ }
94
+ if (link.kind === 'fork') {
95
+ this.forks.push({
96
+ id: current.id, parentId: link.parentId, prevHash: current.prev_hash,
97
+ actionHash: current.action_hash, table, acknowledged: false,
98
+ });
99
+ }
100
+ else if (current.action_type === CHAIN_REANCHOR_ACTION) {
101
+ if (this.checkSignature(current) === 'invalid') {
102
+ this.tamper = { id: current.id, reason: 'reanchor-signature-invalid' };
103
+ return false;
104
+ }
105
+ this.registerReanchor(current);
106
+ }
107
+ this.checkAllSignatures(current);
108
+ }
109
+ return true;
110
+ }
111
+ classify(current, arrayAdjacent) {
112
+ const algo = current.hash_algo || 'sha256';
113
+ if (current.action_hash !== hashWith(algo, current.action_data)) {
114
+ return { kind: 'tamper', reason: 'action-hash-mismatch' };
115
+ }
116
+ if (current.id === 1) {
117
+ return current.prev_hash === GENESIS_PREV_HASH
118
+ ? { kind: 'linked' } : { kind: 'tamper', reason: 'genesis-link-mismatch' };
119
+ }
120
+ if (arrayAdjacent && current.prev_hash === hashWith(algo, serializeEntry(arrayAdjacent))) {
121
+ // Array-adjacent may skip ids that were archived; it may not skip ids that are gone.
122
+ return this.idsContiguous(arrayAdjacent.id, current.id)
123
+ ? { kind: 'linked' } : { kind: 'tamper', reason: 'id-gap' };
124
+ }
125
+ const predecessor = this.findEntryById(current.id - 1);
126
+ if (predecessor && current.prev_hash === hashWith(algo, serializeEntry(predecessor))) {
127
+ return { kind: 'linked' };
128
+ }
129
+ const parentId = this.lookupParent(algo, current.prev_hash);
130
+ if (parentId !== undefined && parentId < current.id) {
131
+ if (!this.idsContiguous(parentId, current.id))
132
+ return { kind: 'tamper', reason: 'id-gap' };
133
+ if (this.checkSignature(current) === 'invalid')
134
+ return { kind: 'tamper', reason: 'fork-signature-invalid' };
135
+ return { kind: 'fork', parentId };
136
+ }
137
+ return {
138
+ kind: 'tamper',
139
+ reason: current.prev_hash === GENESIS_PREV_HASH ? 'unlinked-genesis-prev-hash' : 'unlinked-prev-hash',
140
+ };
141
+ }
142
+ findEntryById(id) {
143
+ return this.db.prepare('SELECT * FROM witness_chain WHERE id = ?').get(id)
144
+ ?? (this.hasArchive()
145
+ ? this.db.prepare('SELECT * FROM witness_chain_archive WHERE id = ?').get(id)
146
+ : undefined);
147
+ }
148
+ getArchive() {
149
+ if (!this.archiveRows) {
150
+ this.archiveRows = this.hasArchive()
151
+ ? this.db.prepare('SELECT * FROM witness_chain_archive ORDER BY id ASC').all()
152
+ : [];
153
+ }
154
+ return this.archiveRows;
155
+ }
156
+ /** Stores written before archiving existed (or opened read-only) may lack the archive table. */
157
+ hasArchive() {
158
+ if (this.archiveExists === undefined)
159
+ this.archiveExists = tableExists(this.db, 'witness_chain_archive');
160
+ return this.archiveExists;
161
+ }
162
+ /** hash → id over every row (live + archive), built lazily per hash algo on the first fork candidate. */
163
+ lookupParent(algo, prevHash) {
164
+ let index = this.parentIndex.get(algo);
165
+ if (!index) {
166
+ index = new Map();
167
+ const live = this.db.prepare('SELECT * FROM witness_chain').iterate();
168
+ for (const row of live)
169
+ index.set(hashWith(algo, serializeEntry(row)), row.id);
170
+ for (const row of this.getArchive()) {
171
+ const h = hashWith(algo, serializeEntry(row));
172
+ if (!index.has(h))
173
+ index.set(h, row.id);
174
+ }
175
+ this.parentIndex.set(algo, index);
176
+ }
177
+ return index.get(prevHash);
178
+ }
179
+ /**
180
+ * True when every id strictly between `from` and `to` exists in live ∪
181
+ * archive. AUTOINCREMENT ids are never reused and a rolled-back insert does
182
+ * not consume one, so a missing id means a row was deleted.
183
+ */
184
+ idsContiguous(from, to) {
185
+ const expected = to - from - 1;
186
+ if (expected <= 0)
187
+ return true;
188
+ const row = (this.hasArchive()
189
+ ? this.db.prepare(`SELECT COUNT(*) AS n FROM (
190
+ SELECT id FROM witness_chain WHERE id > ? AND id < ?
191
+ UNION SELECT id FROM witness_chain_archive WHERE id > ? AND id < ?)`).get(from, to, from, to)
192
+ : this.db.prepare('SELECT COUNT(*) AS n FROM witness_chain WHERE id > ? AND id < ?').get(from, to));
193
+ return row.n === expected;
194
+ }
195
+ /**
196
+ * Signature status of one row against the keys this verifier holds. A row
197
+ * signed by a key it does not hold is `unverifiable` (e.g. a key from before
198
+ * persistent key storage) — classified on structure alone, like unsigned rows.
199
+ */
200
+ checkSignature(entry) {
201
+ if (!entry.signature || !entry.signer_key_id)
202
+ return 'unsigned';
203
+ if (!this.keyManager || !this.keyManager.hasKey(entry.signer_key_id))
204
+ return 'unverifiable';
205
+ return this.keyManager.verify(signaturePayload(entry), Buffer.from(entry.signature, 'hex'), entry.signer_key_id)
206
+ ? 'ok' : 'invalid';
207
+ }
208
+ /** Legacy `checkSignatures` option: every signed row must verify (unknown key = failure). */
209
+ checkAllSignatures(entry) {
210
+ if (this.options.checkSignatures !== true || !this.keyManager)
211
+ return;
212
+ if (!entry.signature || !entry.signer_key_id)
213
+ return;
214
+ const ok = this.keyManager.verify(signaturePayload(entry), Buffer.from(entry.signature, 'hex'), entry.signer_key_id);
215
+ if (!ok) {
216
+ this.signatureFailures++;
217
+ this.firstSignatureFailure ??= entry.id;
218
+ }
219
+ }
220
+ registerReanchor(entry) {
221
+ let data;
222
+ try {
223
+ data = JSON.parse(entry.action_data) ?? {};
224
+ }
225
+ catch {
226
+ return;
227
+ }
228
+ if (Array.isArray(data.forks)) {
229
+ for (const f of data.forks) {
230
+ if (typeof f?.id !== 'number' || f.id >= entry.id)
231
+ continue;
232
+ if (typeof f.parentId !== 'number' || typeof f.prevHash !== 'string' || typeof f.actionHash !== 'string')
233
+ continue;
234
+ const list = this.acks.get(f.id) ?? [];
235
+ list.push({ id: f.id, parentId: f.parentId, prevHash: f.prevHash, actionHash: f.actionHash });
236
+ this.acks.set(f.id, list);
237
+ }
238
+ }
239
+ if (Array.isArray(data.pins)) {
240
+ for (const p of data.pins) {
241
+ if (typeof p?.id === 'number' && typeof p.hash === 'string')
242
+ this.pins.push({ id: p.id, hash: p.hash });
243
+ }
244
+ }
245
+ }
246
+ /** Rows frozen by a verified re-anchor must still exist with the same hash. */
247
+ checkPins() {
248
+ for (const pin of this.pins) {
249
+ const row = this.findEntryById(pin.id);
250
+ if (!row || ownHash(row) !== pin.hash) {
251
+ this.tamper = { id: pin.id, reason: 'reanchored-row-changed' };
252
+ return;
253
+ }
254
+ }
255
+ }
256
+ result(firstLiveId) {
257
+ for (const fork of this.forks) {
258
+ fork.acknowledged = (this.acks.get(fork.id) ?? []).some((a) => a.parentId === fork.parentId && a.prevHash === fork.prevHash && a.actionHash === fork.actionHash);
259
+ }
260
+ const unacknowledged = this.forks.filter((f) => !f.acknowledged);
261
+ const tampered = this.tamper !== undefined || this.signatureFailures > 0;
262
+ const status = tampered ? 'tampered'
263
+ : unacknowledged.length > 0 ? 'forked'
264
+ : this.forks.length > 0 ? 'valid-with-forks' : 'valid';
265
+ const valid = status === 'valid' || status === 'valid-with-forks';
266
+ // Legacy: a signature failure alone reported brokenAt = first live id.
267
+ const brokenAt = unacknowledged[0]?.id ?? this.tamper?.id
268
+ ?? (this.signatureFailures > 0 ? firstLiveId : undefined);
269
+ return {
270
+ valid,
271
+ entriesChecked: this.entriesChecked,
272
+ signatureFailures: this.signatureFailures,
273
+ status,
274
+ tampered,
275
+ forks: this.forks.map((f) => f.id),
276
+ acknowledgedForks: this.forks.filter((f) => f.acknowledged).map((f) => f.id),
277
+ forkDetails: this.forks,
278
+ ...(brokenAt !== undefined && !valid ? { brokenAt } : {}),
279
+ ...(tampered ? {
280
+ tamperedAt: this.tamper?.id ?? this.firstSignatureFailure,
281
+ tamperReason: this.tamper?.reason ?? 'signature-invalid',
282
+ } : {}),
283
+ };
284
+ }
285
+ }
286
+ export function verifyWitnessChain(db, keyManager, options) {
287
+ return new WitnessChainVerifier(db, keyManager, options).run();
288
+ }
289
+ /** True when `name` is a table in the connected database. */
290
+ export function tableExists(db, name) {
291
+ return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(name) !== undefined;
292
+ }
293
+ //# sourceMappingURL=witness-chain-verifier.js.map
@@ -7,7 +7,11 @@
7
7
  */
8
8
  import { type Database as DatabaseType } from 'better-sqlite3';
9
9
  import { type WitnessKeyManager } from './witness-key-manager.js';
10
- export type WitnessActionType = 'PATTERN_CREATE' | 'PATTERN_UPDATE' | 'PATTERN_PROMOTE' | 'PATTERN_QUARANTINE' | 'DREAM_MERGE' | 'DREAM_DISCARD' | 'QUALITY_GATE_PASS' | 'QUALITY_GATE_FAIL' | 'ROUTING_DECISION' | 'FINDING_DELIVERED' | 'FINDING_BLOCKED' | 'BRANCH_MERGE' | 'BRANCH_DISCARD' | 'HEBBIAN_PENALTY' | 'KEY_ROTATION' | 'BRAIN_IMPORT';
10
+ import { GENESIS_PREV_HASH, sha256, shake256, hashWith, serializeEntry, signaturePayload } from './witness-chain-hash.js';
11
+ import { type VerifyOptions, type VerifyResult } from './witness-chain-verifier.js';
12
+ export type { VerifyOptions, VerifyResult, ChainStatus, TamperReason, WitnessForkInfo, ReanchorForkRecord, } from './witness-chain-verifier.js';
13
+ export { CHAIN_REANCHOR_ACTION } from './witness-chain-verifier.js';
14
+ export type WitnessActionType = 'PATTERN_CREATE' | 'PATTERN_UPDATE' | 'PATTERN_PROMOTE' | 'PATTERN_QUARANTINE' | 'DREAM_MERGE' | 'DREAM_DISCARD' | 'QUALITY_GATE_PASS' | 'QUALITY_GATE_FAIL' | 'ROUTING_DECISION' | 'FINDING_DELIVERED' | 'FINDING_BLOCKED' | 'BRANCH_MERGE' | 'BRANCH_DISCARD' | 'HEBBIAN_PENALTY' | 'KEY_ROTATION' | 'BRAIN_IMPORT' | 'CHAIN_REANCHOR';
11
15
  export interface WitnessEntry {
12
16
  id: number;
13
17
  prev_hash: string;
@@ -28,32 +32,6 @@ export interface WitnessFilter {
28
32
  limit?: number;
29
33
  offset?: number;
30
34
  }
31
- export interface VerifyOptions {
32
- /** Also verify Ed25519 signatures. Requires keyManager on the chain. */
33
- checkSignatures?: boolean;
34
- /**
35
- * Also walk `witness_chain_archive` and validate it as part of the same
36
- * hash chain (archived rows are hash-linked to each other and to the live
37
- * table exactly like un-archived rows). Off by default: the live-only walk
38
- * is enough to catch tampering with current data and already correctly
39
- * bridges the archival boundary; this option adds full historical coverage
40
- * for a deep CI gate at the cost of reading the (potentially large) archive.
41
- */
42
- includeArchive?: boolean;
43
- }
44
- export interface VerifyResult {
45
- valid: boolean;
46
- brokenAt?: number;
47
- entriesChecked: number;
48
- signatureFailures?: number;
49
- }
50
- declare const GENESIS_PREV_HASH: string;
51
- declare function sha256(data: string): string;
52
- /** SHAKE-256 (32-byte output) with SHA-256 fallback for older Node.js runtimes. */
53
- declare function shake256(data: string): string;
54
- declare function hashWith(algo: string, data: string): string;
55
- /** Serialize a WitnessEntry to a deterministic string (original 7-field format). */
56
- declare function serializeEntry(entry: WitnessEntry): string;
57
35
  /**
58
36
  * Hash-chained append-only audit log with optional Ed25519 signing.
59
37
  * New entries use SHAKE-256. Existing SHA-256 entries remain valid.
@@ -72,22 +50,11 @@ export declare class WitnessChain {
72
50
  /** Append a new SHAKE-256-hashed entry, optionally Ed25519-signed. */
73
51
  append(actionType: WitnessActionType, actionData: Record<string, unknown>, actor: string): WitnessEntry;
74
52
  /**
75
- * Find the entry with the given id, checking the live table first and then
76
- * the archive. Used to recover a predecessor that array-adjacency can't
77
- * see directly (it was archived, possibly by an earlier archival run than
78
- * the one that affects the entry currently being checked).
79
- */
80
- private findEntryById;
81
- /**
82
- * Check one entry's self-hash and chain link. `arrayAdjacent` is whatever
83
- * entry sits immediately before `current` in the array currently being
84
- * scanned (undefined at the start of that array) — it's tried first since
85
- * it's free (already fetched); a cross-table lookup by id only runs on a
86
- * mismatch, e.g. because the true predecessor was moved to the archive by
87
- * a *different* archival run than the one this scan is walking.
53
+ * Verify chain integrity. Supports mixed SHA-256/SHAKE-256 and optional
54
+ * signature checks. Classifies every break as a fork (pre-3.14.5 concurrent
55
+ * append, #753) or tampering, and keeps walking past forks so later rows are
56
+ * still checked; see witness-chain-verifier.ts for the exact rules.
88
57
  */
89
- private checkEntryLink;
90
- /** Verify chain integrity. Supports mixed SHA-256/SHAKE-256 and optional signature checks. */
91
58
  verify(options?: VerifyOptions): VerifyResult;
92
59
  /** Query entries with optional filters. */
93
60
  getEntries(filter?: WitnessFilter): WitnessEntry[];
@@ -117,5 +84,5 @@ export declare function createWitnessChain(db: DatabaseType, keyManager?: Witnes
117
84
  * memory growth doesn't compound across the file (issue #448 step 3).
118
85
  */
119
86
  export declare function _resetWitnessChainForTests(): void;
120
- export { GENESIS_PREV_HASH, sha256, shake256, hashWith, serializeEntry };
87
+ export { GENESIS_PREV_HASH, sha256, shake256, hashWith, serializeEntry, signaturePayload };
121
88
  //# sourceMappingURL=witness-chain.d.ts.map
@@ -5,34 +5,11 @@
5
5
  * SHAKE-256 / SHA-256 hash-chained append-only log with optional Ed25519 signing.
6
6
  * Tamper-evident: modifying any entry breaks the hash chain, detectable by verify().
7
7
  */
8
- import { createHash } from 'crypto';
9
8
  import { getUnifiedMemory } from '../kernel/unified-memory.js';
10
9
  import { getDefaultWitnessKeyManager } from './witness-key-manager.js';
11
- // --- Constants & Hash Functions ---
12
- const GENESIS_PREV_HASH = '0'.repeat(64);
13
- function sha256(data) {
14
- return createHash('sha256').update(data, 'utf-8').digest('hex');
15
- }
16
- /** SHAKE-256 (32-byte output) with SHA-256 fallback for older Node.js runtimes. */
17
- function shake256(data) {
18
- try {
19
- return createHash('shake256', { outputLength: 32 }).update(data, 'utf-8').digest('hex');
20
- }
21
- catch {
22
- return sha256(data);
23
- }
24
- }
25
- function hashWith(algo, data) {
26
- return algo === 'shake256' ? shake256(data) : sha256(data);
27
- }
28
- /** Serialize a WitnessEntry to a deterministic string (original 7-field format). */
29
- function serializeEntry(entry) {
30
- return JSON.stringify({
31
- id: entry.id, prev_hash: entry.prev_hash, action_hash: entry.action_hash,
32
- action_type: entry.action_type, action_data: entry.action_data,
33
- timestamp: entry.timestamp, actor: entry.actor,
34
- });
35
- }
10
+ import { GENESIS_PREV_HASH, sha256, shake256, hashWith, serializeEntry, signaturePayload, } from './witness-chain-hash.js';
11
+ import { verifyWitnessChain } from './witness-chain-verifier.js';
12
+ export { CHAIN_REANCHOR_ACTION } from './witness-chain-verifier.js';
36
13
  // --- WitnessChain ---
37
14
  /**
38
15
  * Hash-chained append-only audit log with optional Ed25519 signing.
@@ -66,6 +43,10 @@ export class WitnessChain {
66
43
  ensureTable() {
67
44
  if (!this.db)
68
45
  throw new Error('Database not initialized');
46
+ // A read-only connection (e.g. `aqe audit verify`) must not create or
47
+ // migrate the schema; readers treat missing tables as empty instead.
48
+ if (this.db.readonly)
49
+ return;
69
50
  this.db.exec(`
70
51
  CREATE TABLE IF NOT EXISTS witness_chain (
71
52
  id INTEGER PRIMARY KEY AUTOINCREMENT,
@@ -120,8 +101,9 @@ export class WitnessChain {
120
101
  let signature = null;
121
102
  let signerKeyId = null;
122
103
  if (this.keyManager) {
123
- const sigData = Buffer.from(prevHash + actionHash + actionType + timestamp + actor, 'utf-8');
124
- const result = this.keyManager.sign(sigData);
104
+ const result = this.keyManager.sign(signaturePayload({
105
+ prev_hash: prevHash, action_hash: actionHash, action_type: actionType, timestamp, actor,
106
+ }));
125
107
  signature = result.signature.toString('hex');
126
108
  signerKeyId = result.keyId;
127
109
  }
@@ -137,87 +119,15 @@ export class WitnessChain {
137
119
  return appendEntry.immediate();
138
120
  }
139
121
  /**
140
- * Find the entry with the given id, checking the live table first and then
141
- * the archive. Used to recover a predecessor that array-adjacency can't
142
- * see directly (it was archived, possibly by an earlier archival run than
143
- * the one that affects the entry currently being checked).
144
- */
145
- findEntryById(id) {
146
- if (!this.db)
147
- return undefined;
148
- return this.db.prepare('SELECT * FROM witness_chain WHERE id = ?').get(id)
149
- ?? this.db.prepare('SELECT * FROM witness_chain_archive WHERE id = ?').get(id);
150
- }
151
- /**
152
- * Check one entry's self-hash and chain link. `arrayAdjacent` is whatever
153
- * entry sits immediately before `current` in the array currently being
154
- * scanned (undefined at the start of that array) — it's tried first since
155
- * it's free (already fetched); a cross-table lookup by id only runs on a
156
- * mismatch, e.g. because the true predecessor was moved to the archive by
157
- * a *different* archival run than the one this scan is walking.
122
+ * Verify chain integrity. Supports mixed SHA-256/SHAKE-256 and optional
123
+ * signature checks. Classifies every break as a fork (pre-3.14.5 concurrent
124
+ * append, #753) or tampering, and keeps walking past forks so later rows are
125
+ * still checked; see witness-chain-verifier.ts for the exact rules.
158
126
  */
159
- checkEntryLink(current, arrayAdjacent) {
160
- const algo = current.hash_algo || 'sha256';
161
- if (current.action_hash !== hashWith(algo, current.action_data))
162
- return false;
163
- if (current.id === 1)
164
- return current.prev_hash === GENESIS_PREV_HASH; // genesis, never archived
165
- if (arrayAdjacent && current.prev_hash === hashWith(algo, serializeEntry(arrayAdjacent))) {
166
- return true;
167
- }
168
- const predecessor = this.findEntryById(current.id - 1);
169
- return predecessor !== undefined && current.prev_hash === hashWith(algo, serializeEntry(predecessor));
170
- }
171
- /** Verify chain integrity. Supports mixed SHA-256/SHAKE-256 and optional signature checks. */
172
127
  verify(options) {
173
128
  if (!this.db)
174
129
  throw new Error('WitnessChain not initialized');
175
- const live = this.db.prepare('SELECT * FROM witness_chain ORDER BY id ASC').all();
176
- if (live.length === 0)
177
- return { valid: true, entriesChecked: 0 };
178
- let signatureFailures = 0;
179
- const checkSigs = options?.checkSignatures === true && this.keyManager !== null;
180
- const checkSignature = (current) => {
181
- if (checkSigs && current.signature && current.signer_key_id) {
182
- const sigData = Buffer.from(current.prev_hash + current.action_hash + current.action_type + current.timestamp + current.actor, 'utf-8');
183
- if (!this.keyManager.verify(Buffer.from(sigData), Buffer.from(current.signature, 'hex'), current.signer_key_id)) {
184
- signatureFailures++;
185
- }
186
- }
187
- };
188
- // Live table: always its own valid chain, since append() always chains
189
- // to whatever the live tail is at write time — array-adjacency is right
190
- // by construction *except* at a boundary where the true predecessor has
191
- // since been archived, which checkEntryLink()'s fallback covers.
192
- for (let i = 0; i < live.length; i++) {
193
- const current = live[i];
194
- if (!this.checkEntryLink(current, i > 0 ? live[i - 1] : undefined)) {
195
- return { valid: false, brokenAt: current.id, entriesChecked: i + 1, signatureFailures };
196
- }
197
- checkSignature(current);
198
- }
199
- let entriesChecked = live.length;
200
- if (options?.includeArchive) {
201
- // The archived segment is its own contiguous slice of history (by id)
202
- // and is checked the same way — NOT by merging archive+live into one
203
- // id-sorted array, which would wrongly treat an archived row as the
204
- // predecessor of a live row that was actually appended (and correctly
205
- // chained to the live tail) well after that row was archived.
206
- const archived = this.db.prepare('SELECT * FROM witness_chain_archive ORDER BY id ASC').all();
207
- for (let i = 0; i < archived.length; i++) {
208
- const current = archived[i];
209
- if (!this.checkEntryLink(current, i > 0 ? archived[i - 1] : undefined)) {
210
- return { valid: false, brokenAt: current.id, entriesChecked: entriesChecked + i + 1, signatureFailures };
211
- }
212
- checkSignature(current);
213
- }
214
- entriesChecked += archived.length;
215
- }
216
- const valid = signatureFailures === 0;
217
- return {
218
- valid, entriesChecked, signatureFailures,
219
- ...(signatureFailures > 0 ? { brokenAt: live[0].id } : {}),
220
- };
130
+ return verifyWitnessChain(this.db, this.keyManager, options);
221
131
  }
222
132
  /** Query entries with optional filters. */
223
133
  getEntries(filter) {
@@ -330,5 +240,5 @@ export function createWitnessChain(db, keyManager) {
330
240
  export function _resetWitnessChainForTests() {
331
241
  _instance = null;
332
242
  }
333
- export { GENESIS_PREV_HASH, sha256, shake256, hashWith, serializeEntry };
243
+ export { GENESIS_PREV_HASH, sha256, shake256, hashWith, serializeEntry, signaturePayload };
334
244
  //# sourceMappingURL=witness-chain.js.map
@@ -31,7 +31,10 @@ export function recordGateResult(chain, result, actor = DEFAULT_ACTOR) {
31
31
  export function verifyDeliveryChain(chain, opts) {
32
32
  const r = chain.verify({ checkSignatures: opts?.checkSignatures === true });
33
33
  if (!r.valid) {
34
- throw new Error(`Witness delivery chain INVALID — tampering detected at entry ${r.brokenAt ?? '?'} (checked ${r.entriesChecked}). Delivered findings cannot be trusted.`);
34
+ const what = r.tampered
35
+ ? `tampering detected at entry ${r.tamperedAt ?? r.brokenAt ?? '?'}`
36
+ : `${r.forks.length - r.acknowledgedForks.length} unacknowledged fork(s), first at entry ${r.brokenAt ?? '?'}`;
37
+ throw new Error(`Witness delivery chain INVALID — ${what} (checked ${r.entriesChecked}). Delivered findings cannot be trusted.`);
35
38
  }
36
39
  if (opts?.checkSignatures && (r.signatureFailures ?? 0) > 0) {
37
40
  throw new Error(`Witness delivery chain has ${r.signatureFailures} signature failure(s) — provenance unverifiable.`);
@@ -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.5");process.exit(0)}
3
- import{b as v}from"./chunks/chunk-SQF6HRXR.js";import{b as w,c as C,e as k}from"./chunks/chunk-IUHB5GVS.js";import{a as h}from"./chunks/chunk-XEZIIQYJ.js";import{a as z}from"./chunks/chunk-J27F4NSB.js";import"./chunks/chunk-7CD7PBHY.js";import{a as f,c as q}from"./chunks/chunk-J5UNP6W3.js";import{Q as y,S as Q}from"./chunks/chunk-WJHWH5D2.js";import"./chunks/chunk-JSZ663MU.js";q();Q();import{createRequire as R}from"node:module";import{Command as O}from"commander";import l from"chalk";z();function E(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 A(e,a){let c=e.commands,i=c.indexOf(a);i>=0&&c.splice(i,1)}function n(e,a){let c=E(e,a.name,a.description,a.aliases);c.action(async()=>{try{let i=await a.factory();A(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 g=E(e,a,c,u);g.action(async()=>{try{let p=await i();A(e,g),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)}})}k();var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function L(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: ${f(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: ${f(m)}`))}}async function V(){let{QEKernelImpl:e}=await import("./chunks/kernel-DV5MTNZD.js"),{CrossDomainEventRouter:a}=await import("./chunks/cross-domain-router-ODU5IZD6.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-GEVH5KD6.js"),{WorkflowOrchestrator:i}=await import("./chunks/workflow-orchestrator-UKSIDM7Q.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-F7E3AS26.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-SQS2CZFZ.js"),{loadCLIDomainPlugins:g}=await import("./chunks/domain-plugins-H6IZ5USZ.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...h],enableExperienceBridge:!1}),await t.kernel.initialize();let p=await g(t.kernel.plugins);t.router=new a(t.kernel.eventBus),await t.router.initialize();let S=D=>t.kernel.getDomainAPI(D),b=new c(t.kernel.eventBus,t.kernel.memory,S);t.workflowOrchestrator=new i(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),L(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=m(t.kernel,t.router,b,void 0,p),await t.queen.initialize();let{adoptExternalFleet:x}=await import("./chunks/core-handlers-UEXO3VAA.js");x({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function P(){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-LNOYVTYY.js"),i=a.join(c(),".agentic-qe");return e.existsSync(i)?s():(console.error(l.red(`
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=C(1);e&&process.stderr.write(l.gray("Auto-initializing v3 system...")+`
5
- `);let a=3e4,c=new Promise((i,m)=>{setTimeout(()=>m(new Error("Initialization timeout after 30 seconds")),a)});try{return await Promise.race([V(),c]),e&&process.stderr.write(l.green("System ready")+`
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.7");process.exit(0)}
3
+ import{b as A}from"./chunks/chunk-NHUGHAY6.js";import{b as k,c as E,e as v}from"./chunks/chunk-OAZX6WFU.js";import{a as w}from"./chunks/chunk-Y6AKKQIQ.js";import{b as y,c as M}from"./chunks/chunk-PELENDDQ.js";import{a as V}from"./chunks/chunk-TW3SR4TS.js";import{b as C,c as O}from"./chunks/chunk-5GFKTJ65.js";import"./chunks/chunk-5D7ZFWDS.js";import{a as g,e as R}from"./chunks/chunk-ZUOVNFXK.js";import{Q as h,S as z}from"./chunks/chunk-AEUEMVJK.js";import"./chunks/chunk-YO4ESCB4.js";R();z();import{createRequire as _}from"node:module";import{Command as T}from"commander";import l from"chalk";V();O();function L(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 I(e,a){let c=e.commands,i=c.indexOf(a);i>=0&&c.splice(i,1)}function n(e,a){let c=L(e,a.name,a.description,a.aliases);c.action(async()=>{try{let i=await a.factory();I(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=L(e,a,c,u);f.action(async()=>{try{let p=await i();I(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)}})}M();v();var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function P(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 H(){let{QEKernelImpl:e}=await import("./chunks/kernel-MISPSPPA.js"),{CrossDomainEventRouter:a}=await import("./chunks/cross-domain-router-JCQ7SWDP.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-AD5A4DAI.js"),{WorkflowOrchestrator:i}=await import("./chunks/workflow-orchestrator-H6G65YKU.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-HQRHLIJX.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-5ZTEPNDD.js"),{loadCLIDomainPlugins:f}=await import("./chunks/domain-plugins-GQ3V5X6L.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...w],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 x=Q=>t.kernel.getDomainAPI(Q),D=new c(t.kernel.eventBus,t.kernel.memory,x);t.workflowOrchestrator=new i(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),P(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=m(t.kernel,t.router,D,void 0,p),await t.queen.initialize();let{adoptExternalFleet:q}=await import("./chunks/core-handlers-C3H2ZCS2.js");q({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function S(){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-BSNZC243.js"),i=a.join(c(),".agentic-qe");return e.existsSync(i)?s():(console.error(l.red(`
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
+ `);let a=3e4,c=new Promise((i,m)=>{setTimeout(()=>m(new Error("Initialization timeout after 30 seconds")),a)});try{return await Promise.race([H(),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{}process.exit(e)}var r=new O,_=R(import.meta.url),Y=_("../../package.json").version,I="3.14.5";r.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(I).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{}process.exit(e)}var r=new T,F=_(import.meta.url),te=F("../../package.json").version,b="3.14.7";r.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(b).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)=>{w(a.opts())});d(r,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-5UIVOM7K.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-CPFTN4XL.js").then(e=>e.createStatusHandler(o,P)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-CPFTN4XL.js").then(e=>e.createHealthHandler(o,P)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-7H5OYJG4.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-V6CZ7Q6S.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-LBC3GJ7Z.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-CE3Q6LY4.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-GBY4EZ4P.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-QHF7NOU5.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-6HVM6ZMR.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-6AENUIRG.js").then(e=>e.createRoutingHandler(o)),t);n(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-TWOIA6LZ.js").then(e=>e.createWorkflowCommand(t,o,s))});n(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-MPHGT4T6.js").then(e=>e.createTestCommand(t,o,s))});n(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-NNWM7TX3.js").then(e=>e.createCoverageCommand(t,o,s))});n(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-TT23JRFX.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-PPPRP255.js").then(e=>e.createQualityGateCommand(t,o,s))});n(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-325A7FMB.js").then(e=>e.createSecurityCommand(t,o,s))});n(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-4UPAEHFT.js").then(e=>e.createArenaCommand(t,o,s))});n(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-JWXJMYXB.js").then(e=>e.createCodeCommand(t,o,s))});n(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-A55NCTAO.js").then(e=>e.createCompletionsCommand(o))});n(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-UJBJ5AYM.js").then(e=>e.createUpgradeCommand(o))});n(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-ZIQCAZ2Y.js").then(e=>e.createFleetCommand(t,o,s,L))});n(r,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-IVEVMGVM.js").then(e=>e.createValidateSwarmCommand(t,o,s))});n(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-RUV6YMWS.js").then(e=>e.createValidateCommand(t,o,s))});n(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-DZU2KISM.js").then(e=>e.createEvalCommand())});n(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-RACDAJMR.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-EBXUJNRB.js").then(e=>e.createTokenUsageCommand())});n(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-NKF7J3RI.js").then(e=>e.createLLMRouterCommand())});n(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-EE4VVKOW.js").then(e=>e.createSyncCommands())});n(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-QHH6FVO4.js").then(e=>e.createHooksCommand())});n(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-STE5W6BS.js").then(e=>e.createLearningCommand())});n(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-WRFZKG56.js"),import("./chunks/standalone-memory-UD4MJ6GZ.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-JGSFCEMH.js").then(e=>e.createMcpCommand())});n(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-ANGBFWBV.js").then(e=>e.createPlatformCommand())});n(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-7XPN53PY.js").then(e=>e.createProveCommand(t,o,s))});n(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-5AWMEV34.js").then(e=>e.createRuVectorCommand())});n(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-CVZQMF55.js").then(e=>e.createAuditCommand(t,o,s))});n(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-OWAHDUAQ.js").then(e=>e.createPipelineCommand(t,o,s))});n(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-OO7ON2YW.js").then(e=>e.createPluginCommand())});n(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-T4JO4IXP.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(l.yellow(`
12
+ Diagnostics are written to stderr; stdout carries command output only.`);r.hook("preAction",(e,a)=>{k(a.opts())});d(r,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-ENJ5ONJX.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-EXRKETV7.js").then(e=>e.createStatusHandler(o,S)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-EXRKETV7.js").then(e=>e.createHealthHandler(o,S)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-LYQ6WYUY.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-MGZCWHIY.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-L3CLNL7U.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-JDSSC2SF.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-SD63KOQ6.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-VOWO5ZTW.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-U7XENHRR.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-UYDC5MMD.js").then(e=>e.createRoutingHandler(o)),t);n(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-2RBDOM7V.js").then(e=>e.createWorkflowCommand(t,o,s))});n(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-WRHZMUCW.js").then(e=>e.createTestCommand(t,o,s))});n(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-NUPP6KZZ.js").then(e=>e.createCoverageCommand(t,o,s))});n(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-SXWGYRQR.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-GYNCA4ZY.js").then(e=>e.createQualityGateCommand(t,o,s))});n(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-YKB622PK.js").then(e=>e.createSecurityCommand(t,o,s))});n(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-YSWTKBCL.js").then(e=>e.createArenaCommand(t,o,s))});n(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-XMBLI7OF.js").then(e=>e.createCodeCommand(t,o,s))});n(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-2A3WRXY2.js").then(e=>e.createCompletionsCommand(o))});n(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-4BGOU5RM.js").then(e=>e.createUpgradeCommand(o))});n(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-E6WTXWFL.js").then(e=>e.createFleetCommand(t,o,s,P))});n(r,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-VI72CPR7.js").then(e=>e.createValidateSwarmCommand(t,o,s))});n(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-EDWAR63H.js").then(e=>e.createValidateCommand(t,o,s))});n(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-3B7UIYGY.js").then(e=>e.createEvalCommand())});n(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-J3TDK5RA.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-M7RRDPXO.js").then(e=>e.createTokenUsageCommand())});n(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-YWTARCCT.js").then(e=>e.createLLMRouterCommand())});n(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-UW7SX7GO.js").then(e=>e.createSyncCommands())});n(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-F3O2SB6H.js").then(e=>e.createHooksCommand())});n(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-YMLCVFUT.js").then(e=>e.createLearningCommand())});n(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-3L3O6JMM.js"),import("./chunks/standalone-memory-2DOABVLC.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-5PSGIUCW.js").then(e=>e.createMcpCommand())});n(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-GK7ZVDJI.js").then(e=>e.createPlatformCommand())});n(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-ANPTOZJE.js").then(e=>e.createProveCommand(t,o,s))});n(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-QXADPVEY.js").then(e=>e.createRuVectorCommand())});n(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-LVU76QGA.js").then(e=>e.createAuditCommand(t,o,s))});n(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-BGFEHXIN.js").then(e=>e.createPipelineCommand(t,o,s))});n(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-CAH2CKI6.js").then(e=>e.createPluginCommand())});n(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-D662EX5N.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
- `)),await o(0)});process.on("SIGTERM",async()=>{console.log(l.yellow(`
16
- Received SIGTERM, shutting down gracefully...`)),await o(0)});async function M(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-2KLDUWCY.js");e(process.argv)&&(console.log(I),process.exit(0)),y();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-SSDCYEKK.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"})}await r.parseAsync(),!v()&&await o(process.exitCode??0)}M().catch(async e=>{console.error(l.red("Fatal error:"),e),await o(1)});
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 G(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-QOSAEPYD.js");e(process.argv)&&(console.log(b),process.exit(0)),h();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-23SA6SWZ.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"})}await r.parseAsync(),!A()&&await o(process.exitCode??0)}G().catch(async e=>{console.error(l.red("Fatal error:"),C(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.14.7");process.exit(0)}
2
+ import{a,b,c}from"./chunk-ROVZSZCS.js";import"./chunk-RC2A4JZ5.js";import"./chunk-JOZ47MV6.js";import"./chunk-OIDWDGLG.js";import"./chunk-ZUOVNFXK.js";import"./chunk-YO4ESCB4.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};