agentic-qe 3.14.4 → 3.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +169 -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 +43 -126
  13. package/dist/audit/witness-findings.js +4 -1
  14. package/dist/cli/bundle.js +13 -10
  15. package/dist/cli/chunks/adapter-UYOJPTOX.js +2 -0
  16. package/dist/cli/chunks/agent-booster-wasm-2YGML6OU.js +2 -0
  17. package/dist/cli/chunks/{agent-handler-RDNTK4CA.js → agent-handler-D5SSQYNU.js} +2 -2
  18. package/dist/cli/chunks/{agent-memory-branch-NAAMBWIR.js → agent-memory-branch-YHPLTITV.js} +2 -2
  19. package/dist/cli/chunks/aqe-learning-engine-JR5AVQXR.js +2 -0
  20. package/dist/cli/chunks/{arena-KXFHRWX4.js → arena-7BGOXGXO.js} +2 -2
  21. package/dist/cli/chunks/{arena-HXTWJ5YY.js → arena-MCE6EU7K.js} +4 -4
  22. package/dist/cli/chunks/audit-BMWTQECB.js +4 -0
  23. package/dist/cli/chunks/base-DRZ2LS6X.js +2 -0
  24. package/dist/cli/chunks/{better-sqlite3-UICJZIDG.js → better-sqlite3-PMUNGASU.js} +2 -2
  25. package/dist/cli/chunks/brain-handler-QPUFYX7F.js +94 -0
  26. package/dist/cli/chunks/{branch-enumerator-SS7UNVIA.js → branch-enumerator-WKFDGRN4.js} +2 -2
  27. package/dist/cli/chunks/{browser-77GI6KBE.js → browser-VY5HKH5X.js} +2 -2
  28. package/dist/cli/chunks/browser-workflow-CJ7T3MXF.js +2 -0
  29. package/dist/cli/chunks/{chunk-PZJOPURC.js → chunk-257E2A5M.js} +5 -5
  30. package/dist/cli/chunks/{chunk-55RWDRJD.js → chunk-2JVWITNK.js} +4 -4
  31. package/dist/cli/chunks/{chunk-BOARZKU3.js → chunk-2NPKIBAZ.js} +2 -2
  32. package/dist/cli/chunks/chunk-2TMWAQQ3.js +13 -0
  33. package/dist/cli/chunks/{chunk-M4WJKGVK.js → chunk-2YXGBZWV.js} +1 -1
  34. package/dist/cli/chunks/{chunk-3VOQRIQM.js → chunk-3EA536JF.js} +2 -2
  35. package/dist/cli/chunks/{chunk-ZZDIMOOV.js → chunk-3EZOZN25.js} +2 -2
  36. package/dist/cli/chunks/{chunk-MNW6QGNJ.js → chunk-3HZS4M3O.js} +2 -2
  37. package/dist/cli/chunks/{chunk-EKQ673SA.js → chunk-3NIG7S5W.js} +1 -1
  38. package/dist/cli/chunks/{chunk-7D777LTF.js → chunk-4N23RFDU.js} +2 -2
  39. package/dist/cli/chunks/{chunk-BOZZYWCR.js → chunk-5J6W7SIA.js} +1 -1
  40. package/dist/cli/chunks/{chunk-HIVA55CJ.js → chunk-5OOMJGFN.js} +1 -1
  41. package/dist/cli/chunks/{chunk-W7BWUTVV.js → chunk-5QQSIGUA.js} +2 -2
  42. package/dist/cli/chunks/{chunk-PAWXJ73E.js → chunk-5VFPCSK7.js} +1 -1
  43. package/dist/cli/chunks/{chunk-KPA7MZ6C.js → chunk-62N4NUJH.js} +2 -2
  44. package/dist/cli/chunks/chunk-64VGZQLB.js +2 -0
  45. package/dist/cli/chunks/{chunk-64PFWE2F.js → chunk-66VWCR67.js} +2 -2
  46. package/dist/cli/chunks/{chunk-XRT2WRMS.js → chunk-6LIHFV7O.js} +2 -2
  47. package/dist/cli/chunks/{chunk-STJCATGN.js → chunk-6OS76PHI.js} +2 -2
  48. package/dist/cli/chunks/{chunk-ZNPKDCZR.js → chunk-6RE3X4V5.js} +2 -2
  49. package/dist/cli/chunks/{chunk-BFP7KO7P.js → chunk-6SH5VZUD.js} +2 -2
  50. package/dist/cli/chunks/chunk-6SQM2MUX.js +4 -0
  51. package/dist/cli/chunks/{chunk-IPR4QP3H.js → chunk-6U7LNMWZ.js} +2 -2
  52. package/dist/cli/chunks/{chunk-MIQTXNBG.js → chunk-72KXSMWI.js} +1 -1
  53. package/dist/cli/chunks/chunk-7CUQCCMD.js +27 -0
  54. package/dist/cli/chunks/chunk-7D3V65N5.js +2 -0
  55. package/dist/cli/chunks/{chunk-JZ3ORVZ3.js → chunk-7J6QC567.js} +3 -3
  56. package/dist/cli/chunks/{chunk-4OYFXLBK.js → chunk-7LPR6HJG.js} +2 -2
  57. package/dist/cli/chunks/{chunk-4MHXCAG2.js → chunk-7NITCZWD.js} +1 -1
  58. package/dist/cli/chunks/{chunk-M5QUBZY6.js → chunk-7Z5LHRC3.js} +2 -2
  59. package/dist/cli/chunks/{chunk-CSU5NYOX.js → chunk-AHKELLIO.js} +4 -4
  60. package/dist/cli/chunks/{chunk-DHJPWQBR.js → chunk-AIRGNL55.js} +2 -2
  61. package/dist/cli/chunks/{chunk-C2WU3533.js → chunk-AJRUJAAK.js} +1 -1
  62. package/dist/cli/chunks/{chunk-HIYXCDEP.js → chunk-AVBJYI5I.js} +1 -1
  63. package/dist/cli/chunks/{chunk-U5K45TFH.js → chunk-B6D2CHEH.js} +1 -1
  64. package/dist/cli/chunks/{chunk-FRH6VAUS.js → chunk-B6MOJC3X.js} +1 -1
  65. package/dist/cli/chunks/{chunk-HUWNIPZ5.js → chunk-BAMN2CHI.js} +1 -1
  66. package/dist/cli/chunks/{chunk-ONII3572.js → chunk-BBT64TII.js} +3 -3
  67. package/dist/cli/chunks/{chunk-KSKEF7LZ.js → chunk-BJTJLJRZ.js} +3 -3
  68. package/dist/cli/chunks/chunk-BMAPORJ7.js +15 -0
  69. package/dist/cli/chunks/{chunk-CIZ5JPDC.js → chunk-BPEDWS6O.js} +3 -3
  70. package/dist/cli/chunks/{chunk-Z3RHREWF.js → chunk-BVR7RMC5.js} +1 -1
  71. package/dist/cli/chunks/{chunk-HDSAM2RE.js → chunk-C6KWXUFJ.js} +2 -2
  72. package/dist/cli/chunks/{chunk-ZBAKA4YB.js → chunk-CCK4BF76.js} +1 -1
  73. package/dist/cli/chunks/{chunk-IFCLB7FJ.js → chunk-CD542DNJ.js} +1 -1
  74. package/dist/cli/chunks/{chunk-6KJABXAR.js → chunk-CF2ISEOJ.js} +2 -2
  75. package/dist/cli/chunks/chunk-CM7U6TAX.js +5 -0
  76. package/dist/cli/chunks/{chunk-3X3DJZJJ.js → chunk-D45SG6CP.js} +1 -1
  77. package/dist/cli/chunks/{chunk-DAEFDCJ4.js → chunk-D6CJIGRU.js} +89 -83
  78. package/dist/cli/chunks/{chunk-MVPCNSPY.js → chunk-DBDPRORT.js} +2 -2
  79. package/dist/cli/chunks/{chunk-AUXFKCQL.js → chunk-DHVX5UB2.js} +2 -2
  80. package/dist/cli/chunks/{chunk-GPLQ6DOK.js → chunk-DK4XN4CU.js} +2 -2
  81. package/dist/cli/chunks/{chunk-SRKETSFF.js → chunk-DPYSUDAO.js} +1 -1
  82. package/dist/cli/chunks/{chunk-CNG6GQEZ.js → chunk-DUYOVM5I.js} +2 -2
  83. package/dist/cli/chunks/{chunk-VIHTL3U2.js → chunk-DZ3AUAAB.js} +2 -2
  84. package/dist/cli/chunks/{chunk-CU46J64M.js → chunk-E6G2RD5H.js} +2 -2
  85. package/dist/cli/chunks/{chunk-5YPYDPBJ.js → chunk-EAY2JMZG.js} +2 -2
  86. package/dist/cli/chunks/{chunk-V3QLFNA2.js → chunk-ELLBS5RP.js} +4 -4
  87. package/dist/cli/chunks/chunk-ENGZ4D5V.js +2 -0
  88. package/dist/cli/chunks/chunk-FBMN7B46.js +4 -0
  89. package/dist/cli/chunks/{chunk-EDJ3O7RH.js → chunk-FWASDOT2.js} +2 -2
  90. package/dist/cli/chunks/{chunk-MDWCE7YW.js → chunk-FZOBD67M.js} +1 -1
  91. package/dist/cli/chunks/{chunk-A4FYONNU.js → chunk-GDSXITFH.js} +2 -2
  92. package/dist/cli/chunks/{chunk-2JW3BCGG.js → chunk-GGRHV6D7.js} +1 -1
  93. package/dist/cli/chunks/{chunk-ISDMD6EU.js → chunk-GPYVDFB3.js} +90 -90
  94. package/dist/cli/chunks/{chunk-CDKG6EI7.js → chunk-GSF6MB64.js} +2 -2
  95. package/dist/cli/chunks/{chunk-WLG5AJ4N.js → chunk-H52HZ67P.js} +2 -2
  96. package/dist/cli/chunks/{chunk-FGYMFUE2.js → chunk-H5BS5VH7.js} +2 -2
  97. package/dist/cli/chunks/{chunk-34WO57CW.js → chunk-H6ZM3PUT.js} +1 -1
  98. package/dist/cli/chunks/{chunk-6CQN24ZK.js → chunk-HM6ZSCPI.js} +1 -1
  99. package/dist/cli/chunks/{chunk-DPFRKBOG.js → chunk-HNFVJP4I.js} +2 -2
  100. package/dist/cli/chunks/{chunk-TPGED2IF.js → chunk-I33ERSGB.js} +2 -2
  101. package/dist/cli/chunks/{chunk-UEM7ZF5K.js → chunk-IAF6T27S.js} +2 -2
  102. package/dist/cli/chunks/{chunk-KCZR45PA.js → chunk-IB27QACC.js} +2 -2
  103. package/dist/cli/chunks/{chunk-SGYJ4NFZ.js → chunk-ICTXTNQZ.js} +1 -1
  104. package/dist/cli/chunks/chunk-IG5GNEC6.js +4 -0
  105. package/dist/cli/chunks/{chunk-KHFNNVJA.js → chunk-IQO7UCFR.js} +2 -2
  106. package/dist/cli/chunks/{chunk-3TW5W5LX.js → chunk-IV5UZOHH.js} +2 -2
  107. package/dist/cli/chunks/{chunk-7ZIOFPL3.js → chunk-JBTPOIAC.js} +2 -2
  108. package/dist/cli/chunks/{chunk-ZNEMGX5O.js → chunk-JIXUMYKZ.js} +1 -1
  109. package/dist/cli/chunks/{chunk-MTZH7AHC.js → chunk-JMONHE4B.js} +1 -1
  110. package/dist/cli/chunks/{chunk-TDZ53WO2.js → chunk-JVNTSNWU.js} +2 -2
  111. package/dist/cli/chunks/{chunk-PFR4G3DJ.js → chunk-JXGFRBUO.js} +2 -2
  112. package/dist/cli/chunks/chunk-JZOS5FCX.js +2 -0
  113. package/dist/cli/chunks/{chunk-STM3UDNO.js → chunk-KNNISEDY.js} +2 -2
  114. package/dist/cli/chunks/{chunk-TWAWHOP7.js → chunk-L4RUBPLR.js} +2 -2
  115. package/dist/cli/chunks/chunk-LL3IGZBI.js +2 -0
  116. package/dist/cli/chunks/{chunk-CIKSHTEQ.js → chunk-MBRHSU6W.js} +10 -10
  117. package/dist/cli/chunks/{chunk-G6T45OIC.js → chunk-MJS53PRX.js} +2 -2
  118. package/dist/cli/chunks/{chunk-PO3IXGMQ.js → chunk-MQROI74N.js} +2 -2
  119. package/dist/cli/chunks/{chunk-DOTK76IJ.js → chunk-MUOG6QXR.js} +2 -2
  120. package/dist/cli/chunks/{chunk-MVNP7GIR.js → chunk-MW2GGZZ5.js} +1 -1
  121. package/dist/cli/chunks/{chunk-FWGOHAAB.js → chunk-NHWGMJAP.js} +2 -2
  122. package/dist/cli/chunks/{chunk-ZBJ4XOOV.js → chunk-NMAIY4PX.js} +4 -4
  123. package/dist/cli/chunks/{chunk-CDHQFHRP.js → chunk-NQZ5AR3D.js} +2 -2
  124. package/dist/cli/chunks/{chunk-FLYOJOKN.js → chunk-P6OYS755.js} +1 -1
  125. package/dist/cli/chunks/{chunk-BGE6FOLM.js → chunk-PI7TJS62.js} +2 -2
  126. package/dist/cli/chunks/chunk-PX5YDCRH.js +4 -0
  127. package/dist/cli/chunks/{chunk-Q5DO24IJ.js → chunk-PZPWRQ2M.js} +3 -3
  128. package/dist/cli/chunks/{chunk-R4VL6E65.js → chunk-Q5XTSMWR.js} +2 -2
  129. package/dist/cli/chunks/{chunk-JBNEE5UH.js → chunk-Q7EAGKAE.js} +2 -2
  130. package/dist/cli/chunks/{chunk-R5NE6B2M.js → chunk-QDFTT3RF.js} +2 -2
  131. package/dist/cli/chunks/{chunk-DFZCKIGY.js → chunk-QGA55PFM.js} +3 -3
  132. package/dist/cli/chunks/{chunk-RJCYCLZV.js → chunk-QW6VMTBR.js} +2 -2
  133. package/dist/cli/chunks/{chunk-6VRA2QGL.js → chunk-QZANMBIT.js} +1 -1
  134. package/dist/cli/chunks/{chunk-MEGDYJPV.js → chunk-RETBYIAC.js} +4 -4
  135. package/dist/cli/chunks/{chunk-XJ7QNVI5.js → chunk-RFNPJK6N.js} +3 -3
  136. package/dist/cli/chunks/{chunk-NJBGXDQ7.js → chunk-RG52OKAM.js} +1 -1
  137. package/dist/cli/chunks/{chunk-DA5K5754.js → chunk-RSXXCL4A.js} +1 -1
  138. package/dist/cli/chunks/{chunk-HV2J7KKQ.js → chunk-RTFO5UQH.js} +2 -2
  139. package/dist/cli/chunks/{chunk-6UWGMOND.js → chunk-RZZCUIAI.js} +2 -2
  140. package/dist/cli/chunks/chunk-SDRHUMJB.js +2 -0
  141. package/dist/cli/chunks/{chunk-TSRSV3LD.js → chunk-SE4WIB26.js} +1 -1
  142. package/dist/cli/chunks/{chunk-ODKLFVYC.js → chunk-SESK3ARK.js} +2 -2
  143. package/dist/cli/chunks/{chunk-AWWNB2T7.js → chunk-SJUXE4IC.js} +2 -2
  144. package/dist/cli/chunks/{chunk-QGIU2WRL.js → chunk-SMDN3BQZ.js} +1 -1
  145. package/dist/cli/chunks/{chunk-VD6QRULW.js → chunk-SNOBH4AZ.js} +2 -2
  146. package/dist/cli/chunks/{chunk-OSLYSG3B.js → chunk-SPV2VKC5.js} +2 -2
  147. package/dist/cli/chunks/chunk-TCHGOB2N.js +2 -0
  148. package/dist/cli/chunks/{chunk-MOBNBMFW.js → chunk-TVYY3OCX.js} +1 -1
  149. package/dist/cli/chunks/{chunk-UGVHCMUN.js → chunk-UCFQALXO.js} +3 -3
  150. package/dist/cli/chunks/{chunk-3QHGWY7T.js → chunk-UKA2KOXE.js} +2 -2
  151. package/dist/cli/chunks/{chunk-MCUJEZT6.js → chunk-UNFFDHER.js} +16 -11
  152. package/dist/cli/chunks/{chunk-6QYNWR7U.js → chunk-UQ32JHES.js} +2 -2
  153. package/dist/cli/chunks/{chunk-OULHKEVH.js → chunk-V4DM6ELU.js} +2 -2
  154. package/dist/cli/chunks/{chunk-M2JBBZQB.js → chunk-VGFFFKGK.js} +2 -2
  155. package/dist/cli/chunks/{chunk-OCWWP5PL.js → chunk-VMNWDJIZ.js} +2 -2
  156. package/dist/cli/chunks/chunk-W6HXLH5G.js +180 -0
  157. package/dist/cli/chunks/{chunk-AIHDEEJO.js → chunk-WCJBU2KI.js} +2 -2
  158. package/dist/cli/chunks/{chunk-ZBQY5GLF.js → chunk-WGM35YWL.js} +2 -2
  159. package/dist/cli/chunks/chunk-WO4QMXIG.js +3 -0
  160. package/dist/cli/chunks/{chunk-3UPAMMCB.js → chunk-XAS3XRYM.js} +1 -1
  161. package/dist/cli/chunks/chunk-Y3LZ35OG.js +2 -0
  162. package/dist/cli/chunks/{chunk-5R3QL7WN.js → chunk-Y3UOUNHM.js} +2 -2
  163. package/dist/cli/chunks/{chunk-ZJ26AQA5.js → chunk-YFBSPLJG.js} +1 -1
  164. package/dist/cli/chunks/{chunk-BDESSCVR.js → chunk-YHKEDEAA.js} +3 -3
  165. package/dist/cli/chunks/{chunk-CXQPR5MY.js → chunk-YS4FCTWF.js} +1 -1
  166. package/dist/cli/chunks/{chunk-CLTMDCSE.js → chunk-YSLL6VSL.js} +2 -2
  167. package/dist/cli/chunks/chunk-Z6GGIRQQ.js +65 -0
  168. package/dist/cli/chunks/{chunk-F3SBRQC6.js → chunk-Z7WODOTH.js} +2 -2
  169. package/dist/cli/chunks/chunk-ZCRTRYXK.js +14 -0
  170. package/dist/cli/chunks/{chunk-XRYF6JV7.js → chunk-ZEV3YTO7.js} +2 -2
  171. package/dist/cli/chunks/{chunk-YNXS6CGV.js → chunk-ZL6SYKUK.js} +1 -1
  172. package/dist/cli/chunks/{chunk-5SJHQ2CO.js → chunk-ZSPU4MOS.js} +2 -2
  173. package/dist/cli/chunks/{chunk-UDHKLT4C.js → chunk-ZVWVV4EX.js} +1 -1
  174. package/dist/cli/chunks/{ci-464KPQNP.js → ci-W6K6G2KZ.js} +2 -2
  175. package/dist/cli/chunks/{ci-output-I7FX2RSO.js → ci-output-LDT24TS3.js} +2 -2
  176. package/dist/cli/chunks/{circuit-breaker-3FW237WW.js → circuit-breaker-F5V4KITU.js} +2 -2
  177. package/dist/cli/chunks/claude-flow-setup-DT6WQQVD.js +2 -0
  178. package/dist/cli/chunks/client-KHWJT6FB.js +2 -0
  179. package/dist/cli/chunks/{cline-installer-UWFHT6VY.js → cline-installer-G7TJOAEX.js} +2 -2
  180. package/dist/cli/chunks/{code-KQSUT3FS.js → code-PGE6A42V.js} +3 -3
  181. package/dist/cli/chunks/{code-index-extractor-PABBNUSC.js → code-index-extractor-RNITH372.js} +2 -2
  182. package/dist/cli/chunks/codex-installer-LBX77AI3.js +14 -0
  183. package/dist/cli/chunks/{completions-7RWHAUAR.js → completions-4AWLAARX.js} +2 -2
  184. package/dist/cli/chunks/{complexity-analyzer-XPOAF33E.js → complexity-analyzer-ZPNSS476.js} +2 -2
  185. package/dist/cli/chunks/{continuedev-installer-V4F2FIZP.js → continuedev-installer-UAPWX6OA.js} +2 -2
  186. package/dist/cli/chunks/{copilot-installer-JMICURQB.js → copilot-installer-BJN2YJGI.js} +2 -2
  187. package/dist/cli/chunks/core-handlers-HING5RRG.js +2 -0
  188. package/dist/cli/chunks/{cost-tracker-5OFHEYFJ.js → cost-tracker-MHP2VJ63.js} +2 -2
  189. package/dist/cli/chunks/{coverage-QKN57JDS.js → coverage-PQB4IEFG.js} +3 -3
  190. package/dist/cli/chunks/cross-domain-router-PQTD6AZN.js +2 -0
  191. package/dist/cli/chunks/{cursor-installer-GBJ7YXSM.js → cursor-installer-ZXBWYAS3.js} +2 -2
  192. package/dist/cli/chunks/{daemon-GKP7CMEK.js → daemon-64C7R6OJ.js} +3 -3
  193. package/dist/cli/chunks/{daemon-IAVSO6HK.js → daemon-N2BEGEFY.js} +4 -4
  194. package/dist/cli/chunks/{dag-attention-scheduler-S225TCI7.js → dag-attention-scheduler-SPZDAPNL.js} +2 -2
  195. package/dist/cli/chunks/{detect-IUYH422U.js → detect-LXJBSSZW.js} +2 -2
  196. package/dist/cli/chunks/{dist-node-2YRE6A7C.js → dist-node-U3TKZ2IZ.js} +2 -2
  197. package/dist/cli/chunks/{domain-handler-PL2TZC6H.js → domain-handler-3DDWUVSR.js} +2 -2
  198. package/dist/cli/chunks/{domain-plugins-HCGLXKIT.js → domain-plugins-JJVWI4OQ.js} +2 -2
  199. package/dist/cli/chunks/domain-transfer-M36KUJ2U.js +2 -0
  200. package/dist/cli/chunks/dream-WUGRSNCV.js +2 -0
  201. package/dist/cli/chunks/embed-and-insert-pattern-JPAR7TXX.js +3 -0
  202. package/dist/cli/chunks/{eval-WCK7KNFN.js → eval-SOLG23EA.js} +2 -2
  203. package/dist/cli/chunks/{experience-capture-middleware-2MSQWSAR.js → experience-capture-middleware-T7G2VOOD.js} +4 -4
  204. package/dist/cli/chunks/{fast-paths-VYOSIBKF.js → fast-paths-32N3ELI4.js} +2 -2
  205. package/dist/cli/chunks/{feature-flags-WCFUKHNQ.js → feature-flags-APJDQ4N7.js} +2 -2
  206. package/dist/cli/chunks/{feature-flags-UJRHFBRX.js → feature-flags-NAHKLDRN.js} +2 -2
  207. package/dist/cli/chunks/{file-discovery-JDGL4ZWS.js → file-discovery-YKVM3MDB.js} +2 -2
  208. package/dist/cli/chunks/{fleet-ROXVMZ2F.js → fleet-55M5CJS4.js} +3 -3
  209. package/dist/cli/chunks/{gnn-wrapper-NIO4ZCO3.js → gnn-wrapper-UD6E6S6Z.js} +2 -2
  210. package/dist/cli/chunks/{heartbeat-handler-PI42WD3C.js → heartbeat-handler-OYVW3VSC.js} +4 -4
  211. package/dist/cli/chunks/heartbeat-scheduler-33XX5XNQ.js +2 -0
  212. package/dist/cli/chunks/hnsw-adapter-XQPERX3H.js +2 -0
  213. package/dist/cli/chunks/hnsw-index-2GNXTWHH.js +2 -0
  214. package/dist/cli/chunks/{hnsw-legacy-bridge-YLC7SPK2.js → hnsw-legacy-bridge-HBYIS3ZW.js} +2 -2
  215. package/dist/cli/chunks/{hnswlib-node-LG6OS3B7.js → hnswlib-node-EQPM42OU.js} +2 -2
  216. package/dist/cli/chunks/{hooks-WVALP5GX.js → hooks-5ZSSJWO6.js} +10 -10
  217. package/dist/cli/chunks/hybrid-backend-CCF7URKI.js +2 -0
  218. package/dist/cli/chunks/{hypergraph-engine-GJEMW3EG.js → hypergraph-engine-XBGVQ4PD.js} +2 -2
  219. package/dist/cli/chunks/{hypergraph-handler-BLF6LXEV.js → hypergraph-handler-CAWAQ673.js} +3 -3
  220. package/dist/cli/chunks/impact-analyzer-HGKAZWIG.js +2 -0
  221. package/dist/cli/chunks/{init-handler-K25RWRYY.js → init-handler-PRHXSARK.js} +6 -6
  222. package/dist/cli/chunks/init-wizard-72MFBI3G.js +2 -0
  223. package/dist/cli/chunks/kernel-BRCBVMSK.js +2 -0
  224. package/dist/cli/chunks/{kilocode-installer-BXN6WZ7G.js → kilocode-installer-F7LXBM7I.js} +2 -2
  225. package/dist/cli/chunks/{kiro-installer-PM362DLN.js → kiro-installer-NM723ZRG.js} +2 -2
  226. package/dist/cli/chunks/knowledge-graph-DG44IPEI.js +2 -0
  227. package/dist/cli/chunks/{learning-CPERDDRG.js → learning-5QYIDHH3.js} +3 -3
  228. package/dist/cli/chunks/{llm-router-GOAV5FPI.js → llm-router-43HKWPSX.js} +4 -4
  229. package/dist/cli/chunks/llm-router-service-24KXFX32.js +2 -0
  230. package/dist/cli/chunks/{load-2BG6SHAK.js → load-5YDBWSCS.js} +2 -2
  231. package/dist/cli/chunks/load-test-N4TAYJY3.js +2 -0
  232. package/dist/cli/chunks/mcp-UMAPMNMY.js +2 -0
  233. package/dist/cli/chunks/{memory-4NHBYT6S.js → memory-FWCPCQFP.js} +6 -6
  234. package/dist/cli/chunks/memory-backend-NVYFYVAU.js +2 -0
  235. package/dist/cli/chunks/memory-handlers-UTWCNCHL.js +2 -0
  236. package/dist/cli/chunks/multi-model-executor-2XTBGLE4.js +14 -0
  237. package/dist/cli/chunks/{opencode-installer-ATZLLK74.js → opencode-installer-GIXOJ6NS.js} +2 -2
  238. package/dist/cli/chunks/orchestrator-VW6BKHLI.js +393 -0
  239. package/dist/cli/chunks/pattern-null-store-SBPNYDBR.js +2 -0
  240. package/dist/cli/chunks/{pattern-usage-recorder-7VE4XDAI.js → pattern-usage-recorder-7CEUC3J7.js} +2 -2
  241. package/dist/cli/chunks/{pipeline-LQZSNDD2.js → pipeline-IGUQPPPO.js} +2 -2
  242. package/dist/cli/chunks/platform-2P636I7B.js +2 -0
  243. package/dist/cli/chunks/{plugin-EJ6K2MGU.js → plugin-NY6SWDPE.js} +2 -2
  244. package/dist/cli/chunks/{prime-radiant-advanced-wasm-OIHTKJMN.js → prime-radiant-advanced-wasm-2UUDTIO2.js} +2 -2
  245. package/dist/cli/chunks/project-root-IOISG5KX.js +2 -0
  246. package/dist/cli/chunks/protocol-executor-IBYEII5Q.js +2 -0
  247. package/dist/cli/chunks/{protocol-handler-NRBROAU7.js → protocol-handler-ZTPCRQ5W.js} +2 -2
  248. package/dist/cli/chunks/{prove-EJOGEGD3.js → prove-SQX5A3IG.js} +2 -2
  249. package/dist/cli/chunks/qe-reasoning-bank-7IETWW6W.js +2 -0
  250. package/dist/cli/chunks/{quality-E55UC73D.js → quality-DROILKRY.js} +2 -2
  251. package/dist/cli/chunks/{quality-gate-OIQATNT3.js → quality-gate-PWKWDJY2.js} +3 -3
  252. package/dist/cli/chunks/queen-coordinator-NHUK2MWJ.js +2 -0
  253. package/dist/cli/chunks/real-embeddings-P5U3MGYC.js +2 -0
  254. package/dist/cli/chunks/{ref-validation-OPO6J7OL.js → ref-validation-KY73NQXD.js} +2 -2
  255. package/dist/cli/chunks/{roocode-installer-ODY5KRWU.js → roocode-installer-6JPPRB3W.js} +2 -2
  256. package/dist/cli/chunks/router-SRSO3IHF.js +2 -0
  257. package/dist/cli/chunks/routing-feedback-PASRE5HY.js +2 -0
  258. package/dist/cli/chunks/{routing-handler-KQM6VWLC.js → routing-handler-VTJIVFUO.js} +2 -2
  259. package/dist/cli/chunks/{ruvector-commands-U2GVV6PF.js → ruvector-commands-C6RPSJJO.js} +2 -2
  260. package/dist/cli/chunks/rvf-dual-writer-4M4J67OU.js +2 -0
  261. package/dist/cli/chunks/rvf-migration-adapter-TSXGT5LF.js +2 -0
  262. package/dist/cli/chunks/rvf-migration-coordinator-R53URRIO.js +2 -0
  263. package/dist/cli/chunks/rvf-native-adapter-MOF3E7BR.js +2 -0
  264. package/dist/cli/chunks/{rvf-store-integrity-KMIHD3LP.js → rvf-store-integrity-MMXN5TEJ.js} +2 -2
  265. package/dist/cli/chunks/safe-db-QJLFO33B.js +2 -0
  266. package/dist/cli/chunks/schedule-YIVXW5O2.js +2 -0
  267. package/dist/cli/chunks/scheduler-AON7DWSJ.js +2 -0
  268. package/dist/cli/chunks/{security-P5NM353C.js → security-3B3R2NL4.js} +3 -3
  269. package/dist/cli/chunks/shared-rvf-adapter-VIJB7JUS.js +2 -0
  270. package/dist/cli/chunks/{shared-rvf-dual-writer-2CSG7C4W.js → shared-rvf-dual-writer-UVWGDUWC.js} +2 -2
  271. package/dist/cli/chunks/sqlite-persistence-75VHKKQB.js +2 -0
  272. package/dist/cli/chunks/standalone-memory-M4LWAAYZ.js +2 -0
  273. package/dist/cli/chunks/{status-handler-6TU6O37R.js → status-handler-YYFV6OZL.js} +2 -2
  274. package/dist/cli/chunks/{structural-health-KBIJSTXJ.js → structural-health-27E6LLKB.js} +2 -2
  275. package/dist/cli/chunks/sync-26CEGSTC.js +2 -0
  276. package/dist/cli/chunks/{sync-LNHI5SB7.js → sync-J3LJ56WN.js} +2 -2
  277. package/dist/cli/chunks/task-handler-4MCEBQZL.js +54 -0
  278. package/dist/cli/chunks/task-handlers-GYBAWKE2.js +9 -0
  279. package/dist/cli/chunks/{test-DHAAI3DU.js → test-MPC5HRH5.js} +4 -4
  280. package/dist/cli/chunks/{test-scheduling-XDBZ3QC2.js → test-scheduling-ZJBFRZ3J.js} +3 -3
  281. package/dist/cli/chunks/token-bootstrap-2Y2XITBX.js +2 -0
  282. package/dist/cli/chunks/{token-usage-Q2YG5YQN.js → token-usage-3X5WMTG2.js} +2 -2
  283. package/dist/cli/chunks/{transformers-F5UQTQCY.js → transformers-MVL4C5IX.js} +2 -2
  284. package/dist/cli/chunks/tree-sitter-wasm-parser-SLW65ZFO.js +2 -0
  285. package/dist/cli/chunks/{types-JQ7EQO5Q.js → types-TG5P3CRS.js} +2 -2
  286. package/dist/cli/chunks/unified-memory-UCQ6AB32.js +2 -0
  287. package/dist/cli/chunks/unified-memory-hnsw-IXYUMKRR.js +2 -0
  288. package/dist/cli/chunks/unified-persistence-7E6JQ4FZ.js +2 -0
  289. package/dist/cli/chunks/{upgrade-TJRVGHGD.js → upgrade-ETBHDEPY.js} +2 -2
  290. package/dist/cli/chunks/{validate-BWPCVHBN.js → validate-C2A73LZK.js} +2 -2
  291. package/dist/cli/chunks/{validate-swarm-QVVKCQLP.js → validate-swarm-67XN42ML.js} +2 -2
  292. package/dist/cli/chunks/{vibium-ZFATIWHO.js → vibium-NILGKHLN.js} +2 -2
  293. package/dist/cli/chunks/visual-security-4VZXPEVG.js +2 -0
  294. package/dist/cli/chunks/{web-tree-sitter-KPLY7ONR.js → web-tree-sitter-USJN77P4.js} +2 -2
  295. package/dist/cli/chunks/{windsurf-installer-H7XM7ISA.js → windsurf-installer-5GGZXGJW.js} +2 -2
  296. package/dist/cli/chunks/witness-chain-IWS5ZHHL.js +2 -0
  297. package/dist/cli/chunks/witness-chain-JQA2VPZI.js +2 -0
  298. package/dist/cli/chunks/witness-chain-repair-4UA7IPS3.js +2 -0
  299. package/dist/cli/chunks/witness-chain-verifier-3GEADWPE.js +2 -0
  300. package/dist/cli/chunks/{witness-key-manager-DFRL42GE.js → witness-key-manager-ZWEIK3VJ.js} +2 -2
  301. package/dist/cli/chunks/{workflow-2ZQO6WYI.js → workflow-KHMVVBBA.js} +4 -4
  302. package/dist/cli/chunks/workflow-orchestrator-GI5NQH7C.js +2 -0
  303. package/dist/cli/chunks/wrappers-N6XIK5PT.js +2 -0
  304. package/dist/cli/commands/audit.d.ts +20 -2
  305. package/dist/cli/commands/audit.js +158 -16
  306. package/dist/cli/commands/claude-flow-setup.js +5 -4
  307. package/dist/cli/commands/mcp.js +6 -0
  308. package/dist/cli/commands/memory.d.ts +1 -1
  309. package/dist/cli/commands/memory.js +8 -8
  310. package/dist/cli/commands/platform.js +15 -2
  311. package/dist/cli/commands/upgrade.d.ts +3 -3
  312. package/dist/cli/commands/upgrade.js +3 -3
  313. package/dist/cli/handlers/init-handler.d.ts +10 -0
  314. package/dist/cli/handlers/task-handler.js +24 -3
  315. package/dist/cli/helpers/standalone-memory.d.ts +12 -0
  316. package/dist/cli/helpers/standalone-memory.js +46 -0
  317. package/dist/cli/index.js +39 -42
  318. package/dist/cli/log-gate.d.ts +66 -0
  319. package/dist/cli/log-gate.js +170 -0
  320. package/dist/init/agents-installer.d.ts +4 -0
  321. package/dist/init/agents-installer.js +24 -11
  322. package/dist/init/codex-installer.js +22 -8
  323. package/dist/init/idempotent-write.d.ts +53 -0
  324. package/dist/init/idempotent-write.js +160 -0
  325. package/dist/init/orchestrator.js +1 -0
  326. package/dist/init/phases/05-learning.js +3 -1
  327. package/dist/init/phases/07-hooks.js +32 -16
  328. package/dist/init/phases/08-mcp.js +4 -2
  329. package/dist/init/phases/09-assets.d.ts +10 -0
  330. package/dist/init/phases/09-assets.js +3 -0
  331. package/dist/init/phases/10-workers.js +7 -5
  332. package/dist/init/phases/12-verification.js +7 -2
  333. package/dist/init/project-analyzer.d.ts +9 -0
  334. package/dist/init/project-analyzer.js +20 -1
  335. package/dist/init/self-configurator.d.ts +5 -3
  336. package/dist/init/self-configurator.js +18 -29
  337. package/dist/init/skills-installer.js +4 -2
  338. package/dist/init/token-bootstrap.d.ts +1 -1
  339. package/dist/init/token-bootstrap.js +12 -2
  340. package/dist/init/types.d.ts +16 -0
  341. package/dist/init/types.js +20 -24
  342. package/dist/integrations/coherence/coherence-service.js +84 -24
  343. package/dist/integrations/coherence/vote-tally.d.ts +38 -0
  344. package/dist/integrations/coherence/vote-tally.js +39 -0
  345. package/dist/integrations/ruvector/brain-exporter.js +17 -0
  346. package/dist/integrations/ruvector/brain-import-audit.d.ts +20 -0
  347. package/dist/integrations/ruvector/brain-import-audit.js +22 -0
  348. package/dist/integrations/ruvector/brain-rvf-exporter.js +16 -0
  349. package/dist/integrations/ruvector/brain-shared.js +1 -1
  350. package/dist/integrations/ruvector/rvf-dual-writer.js +6 -1
  351. package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +23 -0
  352. package/dist/integrations/ruvector/shared-rvf-adapter.js +24 -0
  353. package/dist/kernel/hybrid-backend.d.ts +6 -0
  354. package/dist/kernel/hybrid-backend.js +18 -0
  355. package/dist/kernel/kernel.js +12 -16
  356. package/dist/kernel/project-root.d.ts +1 -1
  357. package/dist/kernel/project-root.js +24 -3
  358. package/dist/learning/embedder-identity-store.js +4 -3
  359. package/dist/learning/pattern-store.d.ts +11 -0
  360. package/dist/learning/pattern-store.js +31 -9
  361. package/dist/learning/qe-patterns.d.ts +6 -0
  362. package/dist/learning/qe-patterns.js +7 -1
  363. package/dist/learning/qe-reasoning-bank.js +3 -0
  364. package/dist/learning/real-embeddings.d.ts +8 -0
  365. package/dist/learning/real-embeddings.js +16 -0
  366. package/dist/learning/rvf-pattern-store.js +30 -10
  367. package/dist/learning/sqlite-persistence.d.ts +8 -1
  368. package/dist/learning/sqlite-persistence.js +49 -9
  369. package/dist/logging/console-logger.d.ts +2 -5
  370. package/dist/logging/console-logger.js +10 -46
  371. package/dist/logging/index.d.ts +2 -0
  372. package/dist/logging/index.js +1 -0
  373. package/dist/logging/redaction.d.ts +27 -0
  374. package/dist/logging/redaction.js +170 -0
  375. package/dist/mcp/bundle.js +463 -449
  376. package/dist/mcp/entry.js +2 -0
  377. package/dist/mcp/handlers/core-handlers.js +5 -4
  378. package/dist/mcp/handlers/memory-handlers.d.ts +6 -1
  379. package/dist/mcp/handlers/memory-handlers.js +44 -22
  380. package/dist/mcp/handlers/task-handlers.js +14 -1
  381. package/dist/mcp/protocol-server.js +3 -1
  382. package/dist/mcp/services/session-store.js +5 -1
  383. package/dist/mcp/tools/base.d.ts +9 -2
  384. package/dist/mcp/tools/base.js +7 -0
  385. package/dist/mcp/tools/coherence/consensus.js +51 -2
  386. package/dist/mcp/tools/planning/goap-plan.d.ts +20 -7
  387. package/dist/mcp/tools/planning/goap-plan.js +92 -20
  388. package/dist/mcp/tools/planning/goap-status.d.ts +37 -12
  389. package/dist/mcp/tools/planning/goap-status.js +52 -23
  390. package/dist/mcp/tools/planning/world-state.d.ts +101 -0
  391. package/dist/mcp/tools/planning/world-state.js +274 -0
  392. package/dist/mcp/types.d.ts +4 -2
  393. package/dist/planning/goap-planner.d.ts +60 -4
  394. package/dist/planning/goap-planner.js +218 -60
  395. package/dist/planning/index.d.ts +1 -1
  396. package/dist/planning/index.js +1 -1
  397. package/dist/planning/plan-executor.d.ts +20 -1
  398. package/dist/planning/plan-executor.js +209 -100
  399. package/dist/planning/types.d.ts +16 -0
  400. package/dist/planning/types.js +17 -0
  401. package/dist/plugins/cache.d.ts +2 -0
  402. package/dist/plugins/cache.js +15 -2
  403. package/dist/plugins/lifecycle.js +15 -2
  404. package/dist/plugins/manifest.js +7 -5
  405. package/dist/plugins/resolver.d.ts +13 -22
  406. package/dist/plugins/resolver.js +169 -61
  407. package/dist/plugins/version-policy.d.ts +13 -0
  408. package/dist/plugins/version-policy.js +18 -0
  409. package/dist/shared/types/index.d.ts +6 -0
  410. package/dist/shared/types/index.js +8 -0
  411. package/package.json +2 -1
  412. package/dist/cli/chunks/adapter-TNNNJRDG.js +0 -2
  413. package/dist/cli/chunks/agent-booster-wasm-5PC7D2FW.js +0 -2
  414. package/dist/cli/chunks/aqe-learning-engine-5ZRMYJLB.js +0 -2
  415. package/dist/cli/chunks/audit-YSGA7UWT.js +0 -3
  416. package/dist/cli/chunks/base-KWZHOPSH.js +0 -2
  417. package/dist/cli/chunks/brain-handler-ET6YAP4B.js +0 -90
  418. package/dist/cli/chunks/browser-workflow-2FZTKDUL.js +0 -2
  419. package/dist/cli/chunks/chunk-33YYYWBQ.js +0 -4
  420. package/dist/cli/chunks/chunk-5Z6XZV7K.js +0 -65
  421. package/dist/cli/chunks/chunk-6J62K3SW.js +0 -2
  422. package/dist/cli/chunks/chunk-6TPKK7LD.js +0 -15
  423. package/dist/cli/chunks/chunk-DEYLEDJN.js +0 -27
  424. package/dist/cli/chunks/chunk-J6GNQS62.js +0 -5
  425. package/dist/cli/chunks/chunk-KGT36Z42.js +0 -14
  426. package/dist/cli/chunks/chunk-NA7B2QYB.js +0 -2
  427. package/dist/cli/chunks/chunk-NDPFGIMJ.js +0 -13
  428. package/dist/cli/chunks/chunk-OBAP2TXZ.js +0 -2
  429. package/dist/cli/chunks/chunk-PEPFCPES.js +0 -2
  430. package/dist/cli/chunks/chunk-T6BVLVI5.js +0 -2
  431. package/dist/cli/chunks/chunk-TT23RRB7.js +0 -2
  432. package/dist/cli/chunks/chunk-XC7DYDSY.js +0 -180
  433. package/dist/cli/chunks/chunk-XWMZ6D6N.js +0 -2
  434. package/dist/cli/chunks/chunk-Y3MW3YBC.js +0 -3
  435. package/dist/cli/chunks/claude-flow-setup-6JKMBPGU.js +0 -2
  436. package/dist/cli/chunks/client-7E4LM2WW.js +0 -2
  437. package/dist/cli/chunks/codex-installer-CQ24DTP5.js +0 -14
  438. package/dist/cli/chunks/core-handlers-IFG3757P.js +0 -2
  439. package/dist/cli/chunks/cross-domain-router-EK7W4PGP.js +0 -2
  440. package/dist/cli/chunks/domain-transfer-KQJRUPXA.js +0 -2
  441. package/dist/cli/chunks/dream-NFSCSLY7.js +0 -2
  442. package/dist/cli/chunks/embed-and-insert-pattern-ZPAG7235.js +0 -3
  443. package/dist/cli/chunks/heartbeat-scheduler-ZATCDJDK.js +0 -2
  444. package/dist/cli/chunks/hnsw-adapter-WXQABRCA.js +0 -2
  445. package/dist/cli/chunks/hnsw-index-TPSWLEA5.js +0 -2
  446. package/dist/cli/chunks/impact-analyzer-HNIU45P5.js +0 -2
  447. package/dist/cli/chunks/init-wizard-JUIPBMHG.js +0 -2
  448. package/dist/cli/chunks/kernel-5BOZQ754.js +0 -2
  449. package/dist/cli/chunks/knowledge-graph-EWDAENWM.js +0 -2
  450. package/dist/cli/chunks/llm-router-service-3YT7JGBS.js +0 -2
  451. package/dist/cli/chunks/load-test-BP2CPLIV.js +0 -2
  452. package/dist/cli/chunks/mcp-5TTB37DC.js +0 -2
  453. package/dist/cli/chunks/memory-backend-4PYQBPRM.js +0 -2
  454. package/dist/cli/chunks/memory-handlers-2B27NITS.js +0 -2
  455. package/dist/cli/chunks/multi-model-executor-KCWSGCDT.js +0 -14
  456. package/dist/cli/chunks/orchestrator-RKB7XJRG.js +0 -393
  457. package/dist/cli/chunks/pattern-null-store-OYOQOV2O.js +0 -2
  458. package/dist/cli/chunks/platform-OD5H5U6G.js +0 -2
  459. package/dist/cli/chunks/protocol-executor-3ATJTXWG.js +0 -2
  460. package/dist/cli/chunks/qe-reasoning-bank-LLMYZT4X.js +0 -2
  461. package/dist/cli/chunks/queen-coordinator-RN7L6KG5.js +0 -2
  462. package/dist/cli/chunks/real-embeddings-FPFFNOSZ.js +0 -2
  463. package/dist/cli/chunks/router-MDHITQ2V.js +0 -2
  464. package/dist/cli/chunks/routing-feedback-5XLNJ3Y3.js +0 -2
  465. package/dist/cli/chunks/rvf-dual-writer-JBW4O3II.js +0 -2
  466. package/dist/cli/chunks/rvf-migration-adapter-BPPQL4XJ.js +0 -2
  467. package/dist/cli/chunks/rvf-migration-coordinator-V2GHCJKN.js +0 -2
  468. package/dist/cli/chunks/rvf-native-adapter-S4562CG5.js +0 -2
  469. package/dist/cli/chunks/safe-db-FIRHSXVF.js +0 -2
  470. package/dist/cli/chunks/schedule-RVXFB4HK.js +0 -2
  471. package/dist/cli/chunks/scheduler-IKKAMAOO.js +0 -2
  472. package/dist/cli/chunks/shared-rvf-adapter-LVIUOO4S.js +0 -2
  473. package/dist/cli/chunks/sqlite-persistence-SQ3HCUQ7.js +0 -2
  474. package/dist/cli/chunks/sync-UHOX6RJW.js +0 -2
  475. package/dist/cli/chunks/task-handler-AVDHMLGI.js +0 -49
  476. package/dist/cli/chunks/task-handlers-KYK4VTRA.js +0 -9
  477. package/dist/cli/chunks/token-bootstrap-GUTTLPZX.js +0 -2
  478. package/dist/cli/chunks/tree-sitter-wasm-parser-DEGOHS6F.js +0 -2
  479. package/dist/cli/chunks/unified-memory-CXHLHB5I.js +0 -2
  480. package/dist/cli/chunks/unified-memory-hnsw-I7WAE54M.js +0 -2
  481. package/dist/cli/chunks/unified-persistence-6CPF65WI.js +0 -2
  482. package/dist/cli/chunks/visual-security-GNPHME5H.js +0 -2
  483. package/dist/cli/chunks/witness-chain-RRN6NDCH.js +0 -2
  484. package/dist/cli/chunks/witness-chain-VT4UHHBR.js +0 -2
  485. package/dist/cli/chunks/workflow-orchestrator-DB3HIECD.js +0 -2
  486. package/dist/cli/chunks/wrappers-SUS6XEJD.js +0 -2
@@ -940,7 +940,7 @@
940
940
  },
941
941
  "metadata": {
942
942
  "generatedBy": "Agentic QE Fleet",
943
- "fleetVersion": "3.14.4",
943
+ "fleetVersion": "3.14.6",
944
944
  "manifestVersion": "1.4.0",
945
945
  "lastUpdated": "2026-04-13T00:00:00.000Z",
946
946
  "contributors": [
package/CHANGELOG.md CHANGED
@@ -5,6 +5,175 @@ All notable changes to the Agentic QE project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.14.6] - 2026-09-29
9
+
10
+ This patch fixes an `aqe audit verify` crash on stores with no audit chain yet.
11
+ It adds `aqe audit repair` for stores forked by concurrent writers before
12
+ 3.14.5, makes repeat `aqe init --auto` runs leave an unchanged project
13
+ untouched, and makes GOAP planning work from the live fleet state. It also
14
+ redacts secrets from AQE's logs and lets keyword matches improve pattern
15
+ search.
16
+
17
+ ### Security
18
+
19
+ - Secrets are redacted from AQE's structured logs and from logged errors. This
20
+ covers API keys (`sk-ant-`, `sk-`, `ghp_`, `github_pat_`, `AKIA…`),
21
+ Bearer/Basic credentials, credentials in URLs, JWTs, PEM private keys,
22
+ cookies, and values under sensitive keys (`password`, `token`, `apiKey`,
23
+ `access_token`, …) in objects, JSON text and query strings. Command output
24
+ such as `aqe memory get` is not changed ([#789]).
25
+
26
+ ### Added
27
+
28
+ - `aqe audit verify --chain audit` now keeps checking past accidental forks
29
+ left by pre-3.14.5 concurrent writers, and reports them separately from
30
+ tampering (`status: "forked"`, `tampered: false`). The new
31
+ `aqe audit repair --chain audit [--dry-run]` acknowledges those forks with
32
+ one signed entry. It refuses if anything was tampered with, backs up the
33
+ database first, and never edits or deletes an existing row. Afterwards verify
34
+ passes again ([#784]).
35
+ - `goap_status {type:"plans"}` lists saved GOAP plans ([#791]).
36
+
37
+ ### Changed
38
+
39
+ - Running `aqe init --auto` again on an unchanged project no longer rewrites
40
+ generated files or creates `.claude/settings.json.backup`. Fresh and repeat
41
+ runs now produce the same settings: all 13 domains, and pattern promotion at
42
+ 3 successes / 0.7 success rate, which is what the learning runtime actually
43
+ enforces ([#783]).
44
+ - Keyword matches now contribute to pattern search alongside vector
45
+ similarity. A keyword-only hit is weighted by how many of the query's terms
46
+ it matches ([#779]).
47
+ - `qe_coherence_consensus` rejects malformed votes with a clear error. Only a
48
+ unanimous vote is flagged as possible false consensus, and every
49
+ recommendation states the real tally ([#781]).
50
+ - `goap_plan` rejects unknown constraint keys and supports
51
+ `constraints.maxSteps` ([#785]).
52
+
53
+ ### Fixed
54
+
55
+ - `aqe audit verify --chain audit` and `aqe audit repair --dry-run` no longer
56
+ crash with `SQLITE_READONLY` on a store that has no audit chain yet (for
57
+ example after `aqe init --minimal`) or on older stores without the archive
58
+ table. A store whose live chain was deleted while archived rows remain is
59
+ now reported as tampered instead of valid ([#788]).
60
+ - GOAP world state is read from the live fleet, and coverage from a coverage
61
+ report when one exists. Values it can't measure are reported as `null` with
62
+ `dataSource: "estimated"` instead of defaults labelled as real. Planning for
63
+ goals such as `achieve-90-percent-coverage` works again, and a plan can be
64
+ dry-run executed by its ID. A step whose domain call returns an error now
65
+ fails instead of being recorded as completed ([#785]).
66
+ - A repeat `fleet_init` reports the fleet settings actually in effect instead
67
+ of echoing the requested ones ([#790]).
68
+ - When another live process holds an RVF lock, AQE logs one clear warning and
69
+ falls back to SQLite, without a second, misleading `LockHeld` error ([#782]).
70
+ - Updated `ip-address` to 10.7.2 ([#776]).
71
+
72
+ [#776]: https://github.com/proffesor-for-testing/agentic-qe/pull/776
73
+ [#779]: https://github.com/proffesor-for-testing/agentic-qe/pull/779
74
+ [#781]: https://github.com/proffesor-for-testing/agentic-qe/pull/781
75
+ [#782]: https://github.com/proffesor-for-testing/agentic-qe/pull/782
76
+ [#783]: https://github.com/proffesor-for-testing/agentic-qe/pull/783
77
+ [#784]: https://github.com/proffesor-for-testing/agentic-qe/pull/784
78
+ [#785]: https://github.com/proffesor-for-testing/agentic-qe/pull/785
79
+ [#788]: https://github.com/proffesor-for-testing/agentic-qe/pull/788
80
+ [#789]: https://github.com/proffesor-for-testing/agentic-qe/pull/789
81
+ [#790]: https://github.com/proffesor-for-testing/agentic-qe/pull/790
82
+ [#791]: https://github.com/proffesor-for-testing/agentic-qe/pull/791
83
+
84
+ ## [3.14.5] - 2026-09-29
85
+
86
+ This patch makes Agentic QE's results trustworthy for scripts and CI: failed
87
+ commands now exit non-zero, `aqe platform setup` works again, and Codex setup
88
+ through a globally installed `aqe` installs its hooks and skills. It also stops
89
+ the audit chain from breaking when several AQE processes share a store or when
90
+ stores are merged, lets the pattern search index bind when an embedder is
91
+ configured, quiets the CLI's internal startup logging, and resolves plugin
92
+ versions with npm SemVer. Ten of the issues fixed here were reported by
93
+ [@pacphi](https://github.com/pacphi), and most of the fixes were contributed by
94
+ [@rudycelekli](https://github.com/rudycelekli).
95
+
96
+ ### Security
97
+
98
+ - Patched a high-severity undici advisory (GHSA-w293-vg96-wgc3) in the
99
+ vendored Ruflo skill tree; the published package was not affected ([#774]).
100
+
101
+ ### Changed
102
+
103
+ - The CLI is much quieter by default. Internal startup diagnostics are filtered
104
+ by `AQE_LOG_LEVEL` / `LOG_LEVEL` (default `warn`) and always go to stderr, and
105
+ `aqe memory list|get|search|store|delete|usage` open the project store
106
+ directly instead of starting the whole fleet, so they no longer print ~99
107
+ lines of startup logging. A command's own `--verbose` flag still shows its
108
+ detail ([#763]).
109
+ - Plugin versions and dependency ranges now follow npm SemVer. The newest
110
+ compatible cached version is selected, `minAqeVersion` and dependency ranges
111
+ are enforced at install and startup, and a rejected plugin is reported
112
+ without stopping independent plugins from loading. Noncanonical version
113
+ strings, `latest` ranges, and invalid `minAqeVersion` values are rejected
114
+ ([#750]).
115
+ - `aqe task submit` without `--wait` now exits 1 and tells you to use `--wait`
116
+ or the MCP server. A task submitted from the CLI only ran inside that CLI
117
+ process and was lost when it exited, so the printed ID could never be looked
118
+ up ([#769]).
119
+ - `aqe init --auto` in a project with a `.codex/` folder now applies the
120
+ selected Codex guidance mode (default `full`) to an existing `AGENTS.md`,
121
+ inside AQE's own marked block ([#767]).
122
+ - `RUVECTOR_USE_*` environment overrides now take effect in the CLI and MCP
123
+ server. Any value other than `true` switches that feature off ([#768]).
124
+ - Git submodules and worktrees inside a repository now use their own
125
+ `.agentic-qe` store instead of the parent repository's ([#741]).
126
+
127
+ ### Fixed
128
+
129
+ - Commands that report failure now exit 1 instead of 0: `platform verify`,
130
+ `plugin install` / `remove` / `info`, invalid hook provenance, and every
131
+ command whose automatic initialization fails ([#760], [#770]).
132
+ - `aqe platform setup <platform>` works again for Copilot, Cursor, Cline,
133
+ Kilo Code, Roo Code, Codex, Windsurf and Continue.dev; it failed for all of
134
+ them with "Module not found in bundle" ([#761]).
135
+ - `aqe task submit --domain` and MCP `task_submit` reject unknown domains
136
+ instead of accepting a task nothing will run ([#769]).
137
+ - `aqe init --with-codex` through a globally installed `aqe`, a project-local
138
+ install, or `npx` now installs the Codex hooks and QE skills, and warns when
139
+ packaged assets cannot be found ([#765]).
140
+ - `--codex-guidance full` is applied to an existing `AGENTS.md`, the `--json`
141
+ summary reports the bytes actually written, and switching modes no longer
142
+ piles `---` separators into your part of the file ([#767]).
143
+ - The audit chain no longer forks when two AQE processes (for example an MCP
144
+ server and hooks) append at once, so `aqe audit verify --chain audit` stays
145
+ valid ([#764]).
146
+ - `brain import` no longer copies the source store's audit rows into the
147
+ target chain; it records one `BRAIN_IMPORT` entry instead, so the target
148
+ chain still verifies after a merge ([#766], [#771]).
149
+ - With an embedder endpoint configured, the pattern search index (and
150
+ `brain.rvf`) now binds in every process instead of leaving patterns
151
+ `COMMITTED_PENDING_INDEX`. The provenance guard still refuses when no
152
+ embedder or a mismatched one is configured ([#768], [#773]).
153
+ - Running `aqe`, the hook runner or the MCP server from a subfolder no longer
154
+ creates a separate `.agentic-qe` store there; relative `AQE_MEMORY_PATH` /
155
+ `AQE_STORAGE_PATH` and MCP session journals resolve from the project root, a
156
+ stray `~/.agentic-qe` no longer claims non-git folders below your home
157
+ directory, and `status` / `health` exit 1 when they refuse to run
158
+ ([#741], [#772]).
159
+
160
+ [#750]: https://github.com/proffesor-for-testing/agentic-qe/pull/750
161
+ [#763]: https://github.com/proffesor-for-testing/agentic-qe/pull/763
162
+ [#774]: https://github.com/proffesor-for-testing/agentic-qe/pull/774
163
+ [#741]: https://github.com/proffesor-for-testing/agentic-qe/pull/741
164
+ [#760]: https://github.com/proffesor-for-testing/agentic-qe/pull/760
165
+ [#761]: https://github.com/proffesor-for-testing/agentic-qe/pull/761
166
+ [#764]: https://github.com/proffesor-for-testing/agentic-qe/pull/764
167
+ [#765]: https://github.com/proffesor-for-testing/agentic-qe/pull/765
168
+ [#766]: https://github.com/proffesor-for-testing/agentic-qe/pull/766
169
+ [#767]: https://github.com/proffesor-for-testing/agentic-qe/pull/767
170
+ [#768]: https://github.com/proffesor-for-testing/agentic-qe/pull/768
171
+ [#769]: https://github.com/proffesor-for-testing/agentic-qe/pull/769
172
+ [#770]: https://github.com/proffesor-for-testing/agentic-qe/pull/770
173
+ [#771]: https://github.com/proffesor-for-testing/agentic-qe/pull/771
174
+ [#772]: https://github.com/proffesor-for-testing/agentic-qe/pull/772
175
+ [#773]: https://github.com/proffesor-for-testing/agentic-qe/pull/773
176
+
8
177
  ## [3.14.4] - 2026-09-27
9
178
 
10
179
  This patch moves Agentic QE to the current AI model generation and fixes live
@@ -940,7 +940,7 @@
940
940
  },
941
941
  "metadata": {
942
942
  "generatedBy": "Agentic QE Fleet",
943
- "fleetVersion": "3.14.4",
943
+ "fleetVersion": "3.14.6",
944
944
  "manifestVersion": "1.4.0",
945
945
  "lastUpdated": "2026-04-13T00:00:00.000Z",
946
946
  "contributors": [
@@ -366,7 +366,7 @@ export interface AQEToolResult<T = unknown> {
366
366
  readonly domain?: string;
367
367
  readonly taskId?: string;
368
368
  readonly toolName?: string;
369
- readonly dataSource?: 'real' | 'demo' | 'fallback';
369
+ readonly dataSource?: 'real' | 'demo' | 'fallback' | 'estimated';
370
370
  };
371
371
  }
372
372
  /**
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Witness Chain hash primitives (ADR-070).
3
+ *
4
+ * Shared by the chain itself, its verifier and the brain-import audit writer
5
+ * so the link format can never drift between the code that writes a link and
6
+ * the code that checks it.
7
+ */
8
+ import type { WitnessEntry } from './witness-chain.js';
9
+ export declare const GENESIS_PREV_HASH: string;
10
+ export declare function sha256(data: string): string;
11
+ /** SHAKE-256 (32-byte output) with SHA-256 fallback for older Node.js runtimes. */
12
+ export declare function shake256(data: string): string;
13
+ export declare function hashWith(algo: string, data: string): string;
14
+ /** Serialize a WitnessEntry to a deterministic string (original 7-field format). */
15
+ export declare function serializeEntry(entry: WitnessEntry): string;
16
+ /** The bytes an Ed25519 witness signature covers (unchanged since ADR-070 Phase 6.2). */
17
+ export declare function signaturePayload(entry: Pick<WitnessEntry, 'prev_hash' | 'action_hash' | 'action_type' | 'timestamp' | 'actor'>): Buffer;
18
+ //# sourceMappingURL=witness-chain-hash.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Witness Chain hash primitives (ADR-070).
3
+ *
4
+ * Shared by the chain itself, its verifier and the brain-import audit writer
5
+ * so the link format can never drift between the code that writes a link and
6
+ * the code that checks it.
7
+ */
8
+ import { createHash } from 'crypto';
9
+ export const GENESIS_PREV_HASH = '0'.repeat(64);
10
+ export function sha256(data) {
11
+ return createHash('sha256').update(data, 'utf-8').digest('hex');
12
+ }
13
+ /** SHAKE-256 (32-byte output) with SHA-256 fallback for older Node.js runtimes. */
14
+ export function shake256(data) {
15
+ try {
16
+ return createHash('shake256', { outputLength: 32 }).update(data, 'utf-8').digest('hex');
17
+ }
18
+ catch {
19
+ return sha256(data);
20
+ }
21
+ }
22
+ export function hashWith(algo, data) {
23
+ return algo === 'shake256' ? shake256(data) : sha256(data);
24
+ }
25
+ /** Serialize a WitnessEntry to a deterministic string (original 7-field format). */
26
+ export function serializeEntry(entry) {
27
+ return JSON.stringify({
28
+ id: entry.id, prev_hash: entry.prev_hash, action_hash: entry.action_hash,
29
+ action_type: entry.action_type, action_data: entry.action_data,
30
+ timestamp: entry.timestamp, actor: entry.actor,
31
+ });
32
+ }
33
+ /** The bytes an Ed25519 witness signature covers (unchanged since ADR-070 Phase 6.2). */
34
+ export function signaturePayload(entry) {
35
+ return Buffer.from(entry.prev_hash + entry.action_hash + entry.action_type + entry.timestamp + entry.actor, 'utf-8');
36
+ }
37
+ //# sourceMappingURL=witness-chain-hash.js.map
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Witness Chain fork repair (re-anchor) — ADR-070, issue #753.
3
+ *
4
+ * Stores written before v3.14.5 can contain accidental forks from concurrent
5
+ * `append()` calls. `verify()` classifies them (witness-chain-verifier.ts) but
6
+ * keeps `valid: false` until they are acknowledged, so an existing consumer
7
+ * never sees a previously-broken store silently turn valid.
8
+ *
9
+ * Repair acknowledges them by appending ONE signed (when a key is available)
10
+ * `CHAIN_REANCHOR` entry that lists each unacknowledged fork row (id, parent
11
+ * id, prev_hash, action_hash), pins the hash of every dead-end row (the
12
+ * losing race siblings nothing else links to) and records the tip it verified.
13
+ * It:
14
+ *
15
+ * - refuses when any tamper-class break or signature failure exists;
16
+ * - backs up the database first (`VACUUM INTO <db>.bak-<epoch>`, taken while
17
+ * holding the write lock so it is exactly the state being modified) and
18
+ * checks the backup (integrity_check, witness row counts) before writing;
19
+ * - never deletes, moves or rewrites an existing row — history stays as-is
20
+ * and `verify()` still lists every fork (`status: 'valid-with-forks'`);
21
+ * - re-verifies, backs up and appends inside ONE `BEGIN IMMEDIATE`
22
+ * transaction, so no writer can slip a row in between;
23
+ * - checks row counts before/after (live +1, archive unchanged);
24
+ * - is idempotent: a second run finds nothing unacknowledged and writes nothing.
25
+ */
26
+ import { type Database as DatabaseType } from 'better-sqlite3';
27
+ import type { WitnessKeyManager } from './witness-key-manager.js';
28
+ import { type ChainStatus, type TamperReason } from './witness-chain-verifier.js';
29
+ export interface WitnessRowCounts {
30
+ live: number;
31
+ archive: number;
32
+ }
33
+ export interface VerifySummary {
34
+ status: ChainStatus;
35
+ entriesChecked: number;
36
+ forks: number;
37
+ unacknowledgedForks: number;
38
+ tamperedAt?: number;
39
+ tamperReason?: TamperReason;
40
+ }
41
+ export type RepairAction = 'none' | 'would-reanchor' | 'reanchored' | 'refused';
42
+ export interface RepairResult {
43
+ action: RepairAction;
44
+ dryRun: boolean;
45
+ message: string;
46
+ before: VerifySummary;
47
+ after?: VerifySummary;
48
+ rowsBefore: WitnessRowCounts;
49
+ rowsAfter: WitnessRowCounts;
50
+ /** Fork row ids this run acknowledged (or would, on a dry run). */
51
+ forksAcknowledged: number[];
52
+ reanchorId?: number;
53
+ backupPath?: string;
54
+ }
55
+ export interface RepairOptions {
56
+ /** Path of the database file `db` is opened on — the backup is written next to it. */
57
+ dbPath: string;
58
+ dryRun?: boolean;
59
+ /**
60
+ * Signs the CHAIN_REANCHOR row and verifies fork/re-anchor signatures.
61
+ * Pass a read-only (autoGenerate: false) manager for a dry run.
62
+ */
63
+ keyManager?: WitnessKeyManager | null;
64
+ actor?: string;
65
+ }
66
+ /**
67
+ * Re-anchor a witness chain whose only breaks are accidental forks.
68
+ * `db` must be a writable connection on `options.dbPath`.
69
+ */
70
+ export declare function repairWitnessChainForks(db: DatabaseType, options: RepairOptions): Promise<RepairResult>;
71
+ //# sourceMappingURL=witness-chain-repair.d.ts.map
@@ -0,0 +1,203 @@
1
+ /**
2
+ * Witness Chain fork repair (re-anchor) — ADR-070, issue #753.
3
+ *
4
+ * Stores written before v3.14.5 can contain accidental forks from concurrent
5
+ * `append()` calls. `verify()` classifies them (witness-chain-verifier.ts) but
6
+ * keeps `valid: false` until they are acknowledged, so an existing consumer
7
+ * never sees a previously-broken store silently turn valid.
8
+ *
9
+ * Repair acknowledges them by appending ONE signed (when a key is available)
10
+ * `CHAIN_REANCHOR` entry that lists each unacknowledged fork row (id, parent
11
+ * id, prev_hash, action_hash), pins the hash of every dead-end row (the
12
+ * losing race siblings nothing else links to) and records the tip it verified.
13
+ * It:
14
+ *
15
+ * - refuses when any tamper-class break or signature failure exists;
16
+ * - backs up the database first (`VACUUM INTO <db>.bak-<epoch>`, taken while
17
+ * holding the write lock so it is exactly the state being modified) and
18
+ * checks the backup (integrity_check, witness row counts) before writing;
19
+ * - never deletes, moves or rewrites an existing row — history stays as-is
20
+ * and `verify()` still lists every fork (`status: 'valid-with-forks'`);
21
+ * - re-verifies, backs up and appends inside ONE `BEGIN IMMEDIATE`
22
+ * transaction, so no writer can slip a row in between;
23
+ * - checks row counts before/after (live +1, archive unchanged);
24
+ * - is idempotent: a second run finds nothing unacknowledged and writes nothing.
25
+ */
26
+ import { existsSync } from 'node:fs';
27
+ import { basename } from 'node:path';
28
+ import { openDatabase } from '../shared/safe-db.js';
29
+ import { WitnessChain } from './witness-chain.js';
30
+ import { sha256, shake256, serializeEntry } from './witness-chain-hash.js';
31
+ import { ownHash, tableExists, } from './witness-chain-verifier.js';
32
+ const VERIFY_OPTIONS = { includeArchive: true };
33
+ function countRows(db) {
34
+ const n = (table) => (tableExists(db, table)
35
+ ? db.prepare(`SELECT COUNT(*) AS n FROM ${table}`).get().n
36
+ : 0);
37
+ return { live: n('witness_chain'), archive: n('witness_chain_archive') };
38
+ }
39
+ function summarize(r) {
40
+ return {
41
+ status: r.status,
42
+ entriesChecked: r.entriesChecked,
43
+ forks: r.forks.length,
44
+ unacknowledgedForks: r.forks.length - r.acknowledgedForks.length,
45
+ ...(r.tamperedAt !== undefined ? { tamperedAt: r.tamperedAt } : {}),
46
+ ...(r.tamperReason ? { tamperReason: r.tamperReason } : {}),
47
+ };
48
+ }
49
+ function unacknowledged(r) {
50
+ return r.forkDetails.filter((f) => !f.acknowledged)
51
+ .map(({ id, parentId, prevHash, actionHash }) => ({ id, parentId, prevHash, actionHash }));
52
+ }
53
+ /**
54
+ * Dead-end rows: every row except the tip whose hash no row's prev_hash
55
+ * references — the losing sibling of each race. Nothing else vouches for
56
+ * their content, so the re-anchor pins it. (Checked under both hash algos,
57
+ * since a child hashes its parent with the CHILD's algorithm.)
58
+ */
59
+ function deadEndPins(db, tipId) {
60
+ const referenced = new Set();
61
+ const prevs = db.prepare('SELECT prev_hash FROM witness_chain UNION ALL SELECT prev_hash FROM witness_chain_archive').pluck().iterate();
62
+ for (const h of prevs)
63
+ referenced.add(h);
64
+ const pins = [];
65
+ const seen = new Set();
66
+ for (const table of ['witness_chain', 'witness_chain_archive']) {
67
+ const rows = db.prepare(`SELECT * FROM ${table} ORDER BY id ASC`).iterate();
68
+ for (const row of rows) {
69
+ if (row.id === tipId || seen.has(row.id))
70
+ continue;
71
+ seen.add(row.id);
72
+ const ser = serializeEntry(row);
73
+ if (!referenced.has(shake256(ser)) && !referenced.has(sha256(ser)))
74
+ pins.push({ id: row.id, hash: ownHash(row) });
75
+ }
76
+ }
77
+ return pins.sort((a, b) => a.id - b.id);
78
+ }
79
+ function refusal(r) {
80
+ return `Refusing to repair: tampering detected at id=${r.tamperedAt} (${r.tamperReason}). ` +
81
+ 'Only accidental forks can be re-anchored; restore from a backup and investigate.';
82
+ }
83
+ function nextBackupPath(dbPath) {
84
+ const base = `${dbPath}.bak-${Math.floor(Date.now() / 1000)}`;
85
+ if (!existsSync(base))
86
+ return base;
87
+ let i = 1;
88
+ while (existsSync(`${base}-${i}`))
89
+ i++;
90
+ return `${base}-${i}`;
91
+ }
92
+ /**
93
+ * Snapshot the database with VACUUM INTO from a SECOND, read-only connection.
94
+ * Called while the repairing connection holds the write lock (BEGIN IMMEDIATE)
95
+ * and before it writes anything, so the snapshot is exactly the state about to
96
+ * be modified: no other process can commit in between (issue found in review).
97
+ * The backup must then open clean and hold exactly `expected` witness rows.
98
+ */
99
+ function backupDatabase(dbPath, expected) {
100
+ const backupPath = nextBackupPath(dbPath);
101
+ const reader = openDatabase(dbPath, { readonly: true, fileMustExist: true });
102
+ try {
103
+ reader.prepare('VACUUM INTO ?').run(backupPath);
104
+ }
105
+ finally {
106
+ reader.close();
107
+ }
108
+ const copy = openDatabase(backupPath, { readonly: true, fileMustExist: true });
109
+ try {
110
+ const check = copy.pragma('integrity_check', { simple: true });
111
+ if (check !== 'ok')
112
+ throw new Error(`backup integrity_check failed: ${String(check)}`);
113
+ const counts = countRows(copy);
114
+ if (counts.live !== expected.live || counts.archive !== expected.archive) {
115
+ throw new Error(`backup holds ${JSON.stringify(counts)} witness rows, expected ${JSON.stringify(expected)}`);
116
+ }
117
+ }
118
+ finally {
119
+ copy.close();
120
+ }
121
+ return backupPath;
122
+ }
123
+ /**
124
+ * Re-anchor a witness chain whose only breaks are accidental forks.
125
+ * `db` must be a writable connection on `options.dbPath`.
126
+ */
127
+ export async function repairWitnessChainForks(db, options) {
128
+ const dryRun = options.dryRun === true;
129
+ const chain = new WitnessChain(db, options.keyManager ?? undefined);
130
+ await chain.initialize();
131
+ const rowsBefore = countRows(db);
132
+ const before = chain.verify(VERIFY_OPTIONS);
133
+ const base = { dryRun, before: summarize(before), rowsBefore, rowsAfter: rowsBefore };
134
+ if (before.tampered) {
135
+ return { ...base, action: 'refused', message: refusal(before), forksAcknowledged: [] };
136
+ }
137
+ const pending = unacknowledged(before);
138
+ if (pending.length === 0) {
139
+ const message = before.forks.length > 0
140
+ ? `Nothing to repair: all ${before.forks.length} fork(s) are already re-anchored.`
141
+ : 'Nothing to repair: the audit chain has no forks.';
142
+ return { ...base, action: 'none', message, forksAcknowledged: [] };
143
+ }
144
+ if (dryRun) {
145
+ return {
146
+ ...base, action: 'would-reanchor', forksAcknowledged: pending.map((f) => f.id),
147
+ message: `Dry run: would back up the database and append a CHAIN_REANCHOR entry acknowledging ${pending.length} fork(s). Nothing was written.`,
148
+ };
149
+ }
150
+ // Re-verify, back up and append under ONE write lock: nothing can land
151
+ // between the check, the snapshot and the write.
152
+ let backupPath;
153
+ const reanchor = db.transaction(() => {
154
+ const txBefore = countRows(db);
155
+ const check = chain.verify(VERIFY_OPTIONS);
156
+ if (check.tampered)
157
+ return { kind: 'refused', check };
158
+ const forks = unacknowledged(check);
159
+ if (forks.length === 0)
160
+ return { kind: 'noop' };
161
+ backupPath = backupDatabase(options.dbPath, txBefore);
162
+ const tip = db.prepare('SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1').get();
163
+ const entry = chain.append('CHAIN_REANCHOR', {
164
+ reason: 'fork-repair',
165
+ issue: 'https://github.com/proffesor-for-testing/agentic-qe/issues/753',
166
+ note: 'Acknowledges accidental forks from pre-3.14.5 concurrent appends; no rows were changed.',
167
+ forkCount: forks.length,
168
+ forks,
169
+ pins: deadEndPins(db, tip.id),
170
+ verifiedTipId: tip.id,
171
+ verifiedTipHash: ownHash(tip),
172
+ entriesChecked: check.entriesChecked,
173
+ rows: txBefore,
174
+ backup: basename(backupPath),
175
+ }, options.actor ?? 'aqe-audit-repair');
176
+ const txAfter = countRows(db);
177
+ if (txAfter.live !== txBefore.live + 1 || txAfter.archive !== txBefore.archive) {
178
+ throw new Error(`row-count check failed: before ${JSON.stringify(txBefore)}, after ${JSON.stringify(txAfter)}`);
179
+ }
180
+ return { kind: 'reanchored', entry, forks, txAfter };
181
+ }).immediate();
182
+ if (reanchor.kind === 'refused') {
183
+ return { ...base, action: 'refused', message: refusal(reanchor.check), forksAcknowledged: [] };
184
+ }
185
+ if (reanchor.kind === 'noop') {
186
+ return { ...base, action: 'none', message: 'Nothing to repair (another process re-anchored first).', forksAcknowledged: [] };
187
+ }
188
+ const after = chain.verify(VERIFY_OPTIONS);
189
+ const ok = after.valid && !after.tampered;
190
+ return {
191
+ ...base,
192
+ action: 'reanchored',
193
+ after: summarize(after),
194
+ rowsAfter: reanchor.txAfter,
195
+ forksAcknowledged: reanchor.forks.map((f) => f.id),
196
+ reanchorId: reanchor.entry.id,
197
+ backupPath,
198
+ message: ok
199
+ ? `Re-anchored ${reanchor.forks.length} fork(s) with CHAIN_REANCHOR id=${reanchor.entry.id}; chain now ${after.status}. Backup: ${backupPath}`
200
+ : `Appended CHAIN_REANCHOR id=${reanchor.entry.id}, but the chain still verifies as ${after.status}. Backup: ${backupPath}`,
201
+ };
202
+ }
203
+ //# sourceMappingURL=witness-chain-repair.js.map