agentic-qe 3.15.15 → 3.15.17

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 (526) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +168 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/audit/witness-chain.d.ts +7 -0
  5. package/dist/audit/witness-chain.js +10 -0
  6. package/dist/cli/bundle.js +6 -6
  7. package/dist/cli/chunks/adapter-OMILP6KH.js +2 -0
  8. package/dist/cli/chunks/{agent-booster-wasm-EUF4XVUC.js → agent-booster-wasm-6BUOFQZA.js} +2 -2
  9. package/dist/cli/chunks/{agent-handler-MOX6PSIQ.js → agent-handler-HPDK3JI3.js} +2 -2
  10. package/dist/cli/chunks/{agent-memory-branch-AEXKIGDG.js → agent-memory-branch-5QKUTWK5.js} +2 -2
  11. package/dist/cli/chunks/aqe-learning-engine-OXH5CCOS.js +2 -0
  12. package/dist/cli/chunks/{arena-IQ5ZZDRF.js → arena-7OKPMNHD.js} +2 -2
  13. package/dist/cli/chunks/{arena-M7GA3CVG.js → arena-HZ35LESR.js} +4 -4
  14. package/dist/cli/chunks/{audit-4IPBMKWB.js → audit-XI575SVK.js} +3 -3
  15. package/dist/cli/chunks/base-MAK2BLTG.js +2 -0
  16. package/dist/cli/chunks/{better-sqlite3-IKDKJ2IE.js → better-sqlite3-YO5X7ZJS.js} +2 -2
  17. package/dist/cli/chunks/{brain-handler-5NQUDH4W.js → brain-handler-GCQZFZGQ.js} +3 -3
  18. package/dist/cli/chunks/{branch-enumerator-KSXELWRC.js → branch-enumerator-N6G44UU2.js} +2 -2
  19. package/dist/cli/chunks/{browser-6LACARWE.js → browser-EVKPTLOI.js} +2 -2
  20. package/dist/cli/chunks/browser-workflow-IR3VF2TL.js +2 -0
  21. package/dist/cli/chunks/{chunk-DKX4GNRU.js → chunk-2EQK7B5L.js} +2 -2
  22. package/dist/cli/chunks/chunk-2PCEMDIX.js +757 -0
  23. package/dist/cli/chunks/{chunk-JCQGJGGZ.js → chunk-2UUZCQSD.js} +7 -7
  24. package/dist/cli/chunks/chunk-2YWYW7NU.js +21 -0
  25. package/dist/cli/chunks/{chunk-PFQCV6YS.js → chunk-45223KK6.js} +6 -6
  26. package/dist/cli/chunks/chunk-4EJLHNER.js +12 -0
  27. package/dist/cli/chunks/{chunk-E5G4WZ2T.js → chunk-4L6WX5KC.js} +1 -1
  28. package/dist/cli/chunks/{chunk-UQPA33UK.js → chunk-4NKZU2JZ.js} +2 -2
  29. package/dist/cli/chunks/{chunk-OBDONJQM.js → chunk-4UKTIQDT.js} +2 -2
  30. package/dist/cli/chunks/{chunk-7BLZHFKD.js → chunk-4YM45Z5B.js} +1 -1
  31. package/dist/cli/chunks/{chunk-ZWBGYJ7K.js → chunk-5FSPELOG.js} +2 -2
  32. package/dist/cli/chunks/{chunk-NWIIYHT6.js → chunk-5WATBVU6.js} +2 -2
  33. package/dist/cli/chunks/{chunk-7ACCBHRB.js → chunk-5WYZVSL2.js} +1 -1
  34. package/dist/cli/chunks/{chunk-ZYJB6FML.js → chunk-6LSZCEW2.js} +1 -1
  35. package/dist/cli/chunks/{chunk-U62OUXBF.js → chunk-6V6BD6PH.js} +1 -1
  36. package/dist/cli/chunks/{chunk-MIA447GY.js → chunk-74MDUIAZ.js} +1 -1
  37. package/dist/cli/chunks/{chunk-AJPROCDW.js → chunk-776K4ZLE.js} +2 -2
  38. package/dist/cli/chunks/{chunk-CBK5CT6T.js → chunk-7BSOO3CY.js} +2 -2
  39. package/dist/cli/chunks/{chunk-ERN56H6S.js → chunk-7SNSI4VY.js} +1 -1
  40. package/dist/cli/chunks/{chunk-JKJOB65O.js → chunk-A4BVDYIL.js} +1 -1
  41. package/dist/cli/chunks/{chunk-MV55NXTD.js → chunk-AGCS5GSO.js} +2 -2
  42. package/dist/cli/chunks/{chunk-XIVVTYM2.js → chunk-AVHYJ3XP.js} +2 -2
  43. package/dist/cli/chunks/{chunk-KJBPB7P5.js → chunk-BE7ZHM34.js} +2 -2
  44. package/dist/cli/chunks/{chunk-GKSMRBHU.js → chunk-BHQ2DLJU.js} +1 -1
  45. package/dist/cli/chunks/{chunk-7XB3FCKM.js → chunk-BKHEQIRZ.js} +2 -2
  46. package/dist/cli/chunks/{chunk-G242G224.js → chunk-BSIWI4ES.js} +2 -2
  47. package/dist/cli/chunks/{chunk-NQS3BWS6.js → chunk-C7QLLMYI.js} +1 -1
  48. package/dist/cli/chunks/{chunk-XWIAZG3C.js → chunk-CMN7PU2H.js} +2 -2
  49. package/dist/cli/chunks/{chunk-4X3SWKBA.js → chunk-COTQ44YO.js} +2 -2
  50. package/dist/cli/chunks/{chunk-3J3RNJNX.js → chunk-CQER6IJ5.js} +1 -1
  51. package/dist/cli/chunks/{chunk-6KCSKGVY.js → chunk-CVPXHDQU.js} +1 -1
  52. package/dist/cli/chunks/{chunk-R6LHJ7ME.js → chunk-CVYPMGUM.js} +2 -2
  53. package/dist/cli/chunks/chunk-CXCMATZ6.js +3 -0
  54. package/dist/cli/chunks/{chunk-PYPS65P7.js → chunk-D75GLKEL.js} +2 -2
  55. package/dist/cli/chunks/chunk-DCDSN67A.js +2 -0
  56. package/dist/cli/chunks/{chunk-6RBTS3NF.js → chunk-DHKSPOUQ.js} +2 -2
  57. package/dist/cli/chunks/{chunk-JW74KRBC.js → chunk-DJDVD6RM.js} +2 -2
  58. package/dist/cli/chunks/{chunk-X33CWRDF.js → chunk-DNVRTJKB.js} +2 -2
  59. package/dist/cli/chunks/{chunk-BQ47GQPK.js → chunk-DS5IFRY6.js} +2 -2
  60. package/dist/cli/chunks/{chunk-AHMWD6JG.js → chunk-E7XIMOKW.js} +2 -2
  61. package/dist/cli/chunks/{chunk-SON6ZRH3.js → chunk-ECKHDHR2.js} +2 -2
  62. package/dist/cli/chunks/chunk-EPVPXHL7.js +2 -0
  63. package/dist/cli/chunks/{chunk-BP5T3OEV.js → chunk-ERYADKMZ.js} +4 -4
  64. package/dist/cli/chunks/{chunk-DUKE27HC.js → chunk-EUWG2JG4.js} +2 -2
  65. package/dist/cli/chunks/chunk-FAQ24UHB.js +29 -0
  66. package/dist/cli/chunks/{chunk-XG4F4XH4.js → chunk-FBBPRVNF.js} +2 -2
  67. package/dist/cli/chunks/{chunk-5PTAFGJT.js → chunk-FBSBXCZS.js} +2 -2
  68. package/dist/cli/chunks/chunk-G2X3OLMN.js +153 -0
  69. package/dist/cli/chunks/{chunk-IXL5ZHWJ.js → chunk-GG7PMTHD.js} +1 -1
  70. package/dist/cli/chunks/{chunk-6BRQPHMZ.js → chunk-GN6OE3JT.js} +1 -1
  71. package/dist/cli/chunks/{chunk-SZAZQZWI.js → chunk-GPPTRKEM.js} +2 -2
  72. package/dist/cli/chunks/{chunk-LTQVUAPH.js → chunk-H2LHWZRE.js} +2 -2
  73. package/dist/cli/chunks/{chunk-WVXJ2QIG.js → chunk-HAQJFUAQ.js} +2 -2
  74. package/dist/cli/chunks/{chunk-C5CXL3JP.js → chunk-HD6W6PHV.js} +2 -2
  75. package/dist/cli/chunks/{chunk-K3WZICFA.js → chunk-HFZD5KLR.js} +1 -1
  76. package/dist/cli/chunks/{chunk-VCXI4XC4.js → chunk-HRUHHHVR.js} +2 -2
  77. package/dist/cli/chunks/{chunk-GV2QE5TO.js → chunk-HVT7RMGV.js} +1 -1
  78. package/dist/cli/chunks/chunk-HWQPMUSN.js +2 -0
  79. package/dist/cli/chunks/{chunk-4ATQP3PR.js → chunk-HZ5O7G2P.js} +1 -1
  80. package/dist/cli/chunks/{chunk-XHHWABJV.js → chunk-IHQGNDMX.js} +2 -2
  81. package/dist/cli/chunks/{chunk-UUBIQR6A.js → chunk-IJSROBM6.js} +18 -18
  82. package/dist/cli/chunks/{chunk-PS6UMZVK.js → chunk-IJZFJPHS.js} +2 -2
  83. package/dist/cli/chunks/{chunk-C4KLXFJP.js → chunk-IKB3M7OF.js} +1 -1
  84. package/dist/cli/chunks/{chunk-SJCKCSN3.js → chunk-INI3Q4CN.js} +1 -1
  85. package/dist/cli/chunks/{chunk-LYJHUNBK.js → chunk-IOWEBPXJ.js} +2 -2
  86. package/dist/cli/chunks/{chunk-HTZSRMHW.js → chunk-IQL6XRF5.js} +2 -2
  87. package/dist/cli/chunks/{chunk-DEKR3CTS.js → chunk-IRHXGCQR.js} +2 -2
  88. package/dist/cli/chunks/{chunk-TODNOP7C.js → chunk-J3QFJI2Y.js} +6 -6
  89. package/dist/cli/chunks/{chunk-OLZH5LRT.js → chunk-J6QRNQJF.js} +11 -11
  90. package/dist/cli/chunks/{chunk-HL2ANKN3.js → chunk-J7Q5TXFZ.js} +2 -2
  91. package/dist/cli/chunks/{chunk-6YVMX2TC.js → chunk-JHKKIJT2.js} +2 -2
  92. package/dist/cli/chunks/{chunk-K3XBQC3R.js → chunk-JI33PMPZ.js} +1 -1
  93. package/dist/cli/chunks/{chunk-74YG72NQ.js → chunk-JRIJM4LE.js} +3 -3
  94. package/dist/cli/chunks/{chunk-TDQWTSBS.js → chunk-JVWZAE2H.js} +2 -2
  95. package/dist/cli/chunks/{chunk-RDMRY7CT.js → chunk-K7WAI662.js} +1 -1
  96. package/dist/cli/chunks/{chunk-C4RTAVC6.js → chunk-KB34MTFZ.js} +2 -2
  97. package/dist/cli/chunks/{chunk-2CKERSMB.js → chunk-KPIPVSIP.js} +2 -2
  98. package/dist/cli/chunks/{chunk-LNX74WHQ.js → chunk-KR2TAAF6.js} +1 -1
  99. package/dist/cli/chunks/{chunk-73PBAWAF.js → chunk-KT2QCXO6.js} +2 -2
  100. package/dist/cli/chunks/{chunk-BBRROA3Z.js → chunk-KTORRIX3.js} +2 -2
  101. package/dist/cli/chunks/{chunk-GCHYOPRZ.js → chunk-LCWEQRZI.js} +2 -2
  102. package/dist/cli/chunks/{chunk-M4WMSCAE.js → chunk-LG5PPJT7.js} +1 -1
  103. package/dist/cli/chunks/{chunk-UAQZI6N4.js → chunk-LIF6UWHV.js} +2 -2
  104. package/dist/cli/chunks/chunk-LN7NKE3N.js +27 -0
  105. package/dist/cli/chunks/chunk-LOLSZG5J.js +2 -0
  106. package/dist/cli/chunks/{chunk-BLL2XU7A.js → chunk-LOMT4UC2.js} +2 -2
  107. package/dist/cli/chunks/chunk-LRKLATSH.js +2 -0
  108. package/dist/cli/chunks/{chunk-EKP2SC77.js → chunk-LRY6UIRI.js} +2 -2
  109. package/dist/cli/chunks/{chunk-JCZCJE6X.js → chunk-LV7UIK4Q.js} +2 -2
  110. package/dist/cli/chunks/{chunk-LVABQNRF.js → chunk-M2YI5YUR.js} +2 -2
  111. package/dist/cli/chunks/{chunk-RIRZHOS2.js → chunk-MCXW3DKE.js} +2 -2
  112. package/dist/cli/chunks/{chunk-ZSOMUTNL.js → chunk-MGZ6XZHU.js} +1 -1
  113. package/dist/cli/chunks/{chunk-H5DER3JY.js → chunk-MLMD3I75.js} +1 -1
  114. package/dist/cli/chunks/{chunk-UXIY4IAI.js → chunk-MVVVGQJ6.js} +2 -2
  115. package/dist/cli/chunks/{chunk-WUOOX7UG.js → chunk-ND72UDVH.js} +2 -2
  116. package/dist/cli/chunks/{chunk-AKZO6GGG.js → chunk-NE3LRUNC.js} +4 -4
  117. package/dist/cli/chunks/{chunk-O6EWL5DQ.js → chunk-NKUHMA4T.js} +2 -2
  118. package/dist/cli/chunks/{chunk-L32JNNKL.js → chunk-NQFDJ6BT.js} +1 -1
  119. package/dist/cli/chunks/{chunk-T66PPF4D.js → chunk-NZJVDOUN.js} +31 -31
  120. package/dist/cli/chunks/{chunk-EBTNMQSS.js → chunk-O7VJ3VKD.js} +2 -2
  121. package/dist/cli/chunks/{chunk-76P32JVU.js → chunk-OJIUIEI4.js} +1 -1
  122. package/dist/cli/chunks/chunk-OO2M2QUV.js +12 -0
  123. package/dist/cli/chunks/{chunk-CAOUV5GZ.js → chunk-ORQ2YBRR.js} +2 -2
  124. package/dist/cli/chunks/chunk-OWIQR6N2.js +4 -0
  125. package/dist/cli/chunks/chunk-OWIZBZLN.js +14 -0
  126. package/dist/cli/chunks/{chunk-J3FP5UGL.js → chunk-P3D7SEHW.js} +1 -1
  127. package/dist/cli/chunks/{chunk-3CYNZFKH.js → chunk-P4OB6WDJ.js} +1 -1
  128. package/dist/cli/chunks/{chunk-LHMQIZ6B.js → chunk-PCL5JRKN.js} +2 -2
  129. package/dist/cli/chunks/{chunk-KLTMOXIK.js → chunk-PIWGKGWP.js} +2 -2
  130. package/dist/cli/chunks/{chunk-VMAM46HQ.js → chunk-PK34KJH7.js} +2 -2
  131. package/dist/cli/chunks/chunk-POPSZDI2.js +65 -0
  132. package/dist/cli/chunks/{chunk-JUDUBQHA.js → chunk-Q6F3DYZN.js} +2 -2
  133. package/dist/cli/chunks/{chunk-Y2OX6KGN.js → chunk-QJSSUBO3.js} +2 -2
  134. package/dist/cli/chunks/{chunk-XM6ZVFM5.js → chunk-QN7HP2UW.js} +235 -173
  135. package/dist/cli/chunks/{chunk-T4GE7MPI.js → chunk-QSQNXBD2.js} +2 -2
  136. package/dist/cli/chunks/{chunk-5C62XMJR.js → chunk-QTQDX4TZ.js} +33 -33
  137. package/dist/cli/chunks/{chunk-DURD37JZ.js → chunk-R3KBOQ3O.js} +2 -2
  138. package/dist/cli/chunks/{chunk-LJMYRTJ7.js → chunk-REY52O7J.js} +1 -1
  139. package/dist/cli/chunks/{chunk-W5ZJG2OU.js → chunk-RKCN4B26.js} +2 -2
  140. package/dist/cli/chunks/chunk-S3DT5TPR.js +14 -0
  141. package/dist/cli/chunks/{chunk-4HKAD25N.js → chunk-S3TBOKAZ.js} +22 -22
  142. package/dist/cli/chunks/{chunk-2IIXCEMS.js → chunk-SAEECT23.js} +2 -2
  143. package/dist/cli/chunks/{chunk-LB2LGEDP.js → chunk-SAZ4PJBR.js} +2 -2
  144. package/dist/cli/chunks/{chunk-FOOW4JVS.js → chunk-SFITYZLV.js} +2 -2
  145. package/dist/cli/chunks/{chunk-2ZFLULL4.js → chunk-SRBCBVSI.js} +2 -2
  146. package/dist/cli/chunks/chunk-SUAZ5Z47.js +63 -0
  147. package/dist/cli/chunks/{chunk-RBKUU7WF.js → chunk-TDZ6N43D.js} +2 -2
  148. package/dist/cli/chunks/chunk-TIVKDIF7.js +2 -0
  149. package/dist/cli/chunks/{chunk-MPFPWJTH.js → chunk-TM75GAXG.js} +2 -2
  150. package/dist/cli/chunks/{chunk-UJABDXST.js → chunk-TWBZONKT.js} +2 -2
  151. package/dist/cli/chunks/{chunk-AOKKUB5F.js → chunk-U4S74IIZ.js} +1 -1
  152. package/dist/cli/chunks/{chunk-W62OOK7A.js → chunk-U5SMBJ6F.js} +2 -2
  153. package/dist/cli/chunks/{chunk-6LE362LZ.js → chunk-UHJVZEQA.js} +2 -2
  154. package/dist/cli/chunks/{chunk-T67R2MUN.js → chunk-UOVCTK5L.js} +2 -2
  155. package/dist/cli/chunks/{chunk-FTRSS64D.js → chunk-VDEKVIP5.js} +2 -2
  156. package/dist/cli/chunks/{chunk-BDKEAGQ2.js → chunk-VITV7AEC.js} +2 -2
  157. package/dist/cli/chunks/{chunk-BU4UQR36.js → chunk-VKREKVFI.js} +2 -2
  158. package/dist/cli/chunks/{chunk-BZULJMGH.js → chunk-VLTDW7XJ.js} +2 -2
  159. package/dist/cli/chunks/{chunk-UE2J6MA5.js → chunk-VQFV2IPV.js} +1 -1
  160. package/dist/cli/chunks/{chunk-TZIHDJZD.js → chunk-VYPVU3JF.js} +2 -2
  161. package/dist/cli/chunks/{chunk-UORB2QDU.js → chunk-WAOEQA3W.js} +2 -2
  162. package/dist/cli/chunks/{chunk-GQABPCQE.js → chunk-WBDWHHKP.js} +2 -2
  163. package/dist/cli/chunks/{chunk-GGQGCT4Y.js → chunk-WX4PO65Q.js} +2 -2
  164. package/dist/cli/chunks/chunk-X2DWHGCC.js +6 -0
  165. package/dist/cli/chunks/{chunk-337Z52QM.js → chunk-X5QD76IU.js} +2 -2
  166. package/dist/cli/chunks/{chunk-E56PVVWC.js → chunk-XBTGEYED.js} +2 -2
  167. package/dist/cli/chunks/{chunk-5AFVEWMT.js → chunk-XEMCHGAJ.js} +2 -2
  168. package/dist/cli/chunks/{chunk-E3MRDIZF.js → chunk-XEYFZLIT.js} +1 -1
  169. package/dist/cli/chunks/{chunk-KCQNFBBR.js → chunk-XFTX3KLE.js} +1 -1
  170. package/dist/cli/chunks/{chunk-QFGYH6HD.js → chunk-XPTCQKVE.js} +1 -1
  171. package/dist/cli/chunks/{chunk-PXATBHWN.js → chunk-YAJOBZE5.js} +2 -2
  172. package/dist/cli/chunks/{chunk-27HE2BHC.js → chunk-YCVLKU6H.js} +2 -2
  173. package/dist/cli/chunks/{chunk-ZIPAB5J6.js → chunk-YD2C6EPN.js} +2 -2
  174. package/dist/cli/chunks/{chunk-5G4UFTV4.js → chunk-YKRLUTK7.js} +2 -2
  175. package/dist/cli/chunks/{chunk-YUS6TWAL.js → chunk-YMUY3TES.js} +6 -6
  176. package/dist/cli/chunks/chunk-YR5QBUHZ.js +6 -0
  177. package/dist/cli/chunks/{chunk-XH4JMX5O.js → chunk-Z7SKUC6P.js} +1 -1
  178. package/dist/cli/chunks/{chunk-EFUJDMNC.js → chunk-ZAQMRFBB.js} +2 -2
  179. package/dist/cli/chunks/{chunk-22UKJGGN.js → chunk-ZC3KDNJW.js} +3 -3
  180. package/dist/cli/chunks/{chunk-AP2W7Z3A.js → chunk-ZGV7L4MW.js} +1 -1
  181. package/dist/cli/chunks/{chunk-W27AJ5B4.js → chunk-ZN35XSKF.js} +2 -2
  182. package/dist/cli/chunks/{chunk-M4CJCPCQ.js → chunk-ZNXM6WVL.js} +2 -2
  183. package/dist/cli/chunks/{chunk-5I7357KS.js → chunk-ZP5AWQRO.js} +2 -2
  184. package/dist/cli/chunks/{chunk-OQG3UQQ7.js → chunk-ZTP3DQ5M.js} +1 -1
  185. package/dist/cli/chunks/{chunk-BFQTLF5X.js → chunk-ZVMSSCTH.js} +2 -2
  186. package/dist/cli/chunks/chunk-ZWUF27P4.js +2 -0
  187. package/dist/cli/chunks/{ci-UCUJOSBW.js → ci-3RTTTS2D.js} +2 -2
  188. package/dist/cli/chunks/{ci-config-2XILD3XG.js → ci-config-XRUR3I4K.js} +2 -2
  189. package/dist/cli/chunks/{ci-output-BL6KWOHW.js → ci-output-E5IAMU2U.js} +2 -2
  190. package/dist/cli/chunks/{circuit-breaker-5XLIOXE5.js → circuit-breaker-SHR2P44P.js} +2 -2
  191. package/dist/cli/chunks/{claude-flow-setup-4IMP6ACS.js → claude-flow-setup-ZDDILFMF.js} +2 -2
  192. package/dist/cli/chunks/client-NO5FOWT4.js +2 -0
  193. package/dist/cli/chunks/{cline-installer-RYLHCDK7.js → cline-installer-BGYVUM6G.js} +2 -2
  194. package/dist/cli/chunks/{code-WY3GJXHX.js → code-PJ4MC3MC.js} +4 -3
  195. package/dist/cli/chunks/{code-index-extractor-Y4MZBZCW.js → code-index-extractor-IW2P22YG.js} +2 -2
  196. package/dist/cli/chunks/{codex-installer-SCJ3T3DX.js → codex-installer-A7WZ6OGL.js} +2 -2
  197. package/dist/cli/chunks/{completions-CN2DXQFU.js → completions-KS23WD5J.js} +2 -2
  198. package/dist/cli/chunks/{complexity-analyzer-7MDPPIBH.js → complexity-analyzer-Q7GLSR2E.js} +2 -2
  199. package/dist/cli/chunks/{continuedev-installer-GCEJRK34.js → continuedev-installer-SK55BFW2.js} +2 -2
  200. package/dist/cli/chunks/copilot-installer-3N5J3WTM.js +3 -0
  201. package/dist/cli/chunks/core-handlers-JNAZPXE2.js +2 -0
  202. package/dist/cli/chunks/{cost-tracker-VO5MFWR6.js → cost-tracker-NENVSO4A.js} +2 -2
  203. package/dist/cli/chunks/{coverage-LYFQYNH6.js → coverage-5L7UQWDH.js} +3 -3
  204. package/dist/cli/chunks/cross-domain-router-HEBM767Z.js +2 -0
  205. package/dist/cli/chunks/{cursor-installer-KP4HA7TV.js → cursor-installer-XXBO2ZE6.js} +2 -2
  206. package/dist/cli/chunks/{daemon-7RC7TS57.js → daemon-CDCQU3LR.js} +3 -3
  207. package/dist/cli/chunks/daemon-JEBJGEUK.js +18 -0
  208. package/dist/cli/chunks/{dag-attention-scheduler-NKA44RSR.js → dag-attention-scheduler-HOMMF7FA.js} +2 -2
  209. package/dist/cli/chunks/{detect-CMYAJWYF.js → detect-FXCOUG6X.js} +2 -2
  210. package/dist/cli/chunks/{dist-node-EN3PYEGW.js → dist-node-GXQ7FMTY.js} +2 -2
  211. package/dist/cli/chunks/{domain-handler-EXSZCX7A.js → domain-handler-TI3JBAPC.js} +2 -2
  212. package/dist/cli/chunks/{domain-plugins-HCQFSNL7.js → domain-plugins-R7LTUM32.js} +2 -2
  213. package/dist/cli/chunks/{domain-transfer-3LGSNTPO.js → domain-transfer-LBIAFHIQ.js} +2 -2
  214. package/dist/cli/chunks/dream-GQDCEJMS.js +2 -0
  215. package/dist/cli/chunks/embed-and-insert-pattern-33KLHDD5.js +3 -0
  216. package/dist/cli/chunks/embedding-space-HHLWTBF5.js +2 -0
  217. package/dist/cli/chunks/{eval-OQELIWJK.js → eval-KDOZMAXJ.js} +2 -2
  218. package/dist/cli/chunks/experience-capture-middleware-X45PECQN.js +40 -0
  219. package/dist/cli/chunks/{fast-paths-UV4NDEWM.js → fast-paths-462V6UUB.js} +2 -2
  220. package/dist/cli/chunks/{feature-flags-H7H33B6C.js → feature-flags-G66OT3AS.js} +2 -2
  221. package/dist/cli/chunks/{feature-flags-CKTYX67J.js → feature-flags-NIRQ4YDM.js} +2 -2
  222. package/dist/cli/chunks/file-discovery-33USPLB5.js +2 -0
  223. package/dist/cli/chunks/{fleet-ZJBCAKRG.js → fleet-PXWGB7CU.js} +3 -3
  224. package/dist/cli/chunks/{gnn-wrapper-RUE2QZRG.js → gnn-wrapper-7MUW3M5M.js} +2 -2
  225. package/dist/cli/chunks/{heartbeat-handler-XRV327M7.js → heartbeat-handler-5237PB35.js} +4 -4
  226. package/dist/cli/chunks/heartbeat-scheduler-LIXLC5IH.js +2 -0
  227. package/dist/cli/chunks/hnsw-adapter-62D5UH27.js +2 -0
  228. package/dist/cli/chunks/hnsw-index-GSGUMQQC.js +2 -0
  229. package/dist/cli/chunks/{hnsw-legacy-bridge-UJID6ZZ4.js → hnsw-legacy-bridge-OSQPW7JP.js} +2 -2
  230. package/dist/cli/chunks/{hnswlib-node-WS43R4AX.js → hnswlib-node-GX6WG2GB.js} +2 -2
  231. package/dist/cli/chunks/{hooks-YZNJKXAJ.js → hooks-GUWHL7VC.js} +23 -22
  232. package/dist/cli/chunks/hybrid-backend-FRWP4BOY.js +2 -0
  233. package/dist/cli/chunks/{hypergraph-engine-XQJSIMTS.js → hypergraph-engine-SRWLLCU3.js} +2 -2
  234. package/dist/cli/chunks/{hypergraph-handler-ZD2NYXMR.js → hypergraph-handler-AVOPRHHO.js} +3 -3
  235. package/dist/cli/chunks/impact-analyzer-7KF3AQXV.js +2 -0
  236. package/dist/cli/chunks/{init-guard-DSRUAVRT.js → init-guard-P4N6EVZS.js} +2 -2
  237. package/dist/cli/chunks/{init-handler-RJU5QMAP.js → init-handler-LRGWOJMD.js} +6 -6
  238. package/dist/cli/chunks/init-wizard-XWWAXY25.js +2 -0
  239. package/dist/cli/chunks/kernel-ZEJPNDBW.js +2 -0
  240. package/dist/cli/chunks/{kilocode-installer-BCPOCVMC.js → kilocode-installer-7R2EPOQ6.js} +2 -2
  241. package/dist/cli/chunks/{kiro-installer-GFCWCB2S.js → kiro-installer-QNM7DPOB.js} +2 -2
  242. package/dist/cli/chunks/knowledge-graph-RRZQS7KY.js +2 -0
  243. package/dist/cli/chunks/{learning-FZTD72CF.js → learning-7OIZBPXZ.js} +3 -3
  244. package/dist/cli/chunks/{llm-router-GJVKGRJL.js → llm-router-SIDXES23.js} +4 -4
  245. package/dist/cli/chunks/llm-router-service-3OSW67LC.js +2 -0
  246. package/dist/cli/chunks/{load-YKTPOYBE.js → load-EI2E2C3S.js} +2 -2
  247. package/dist/cli/chunks/load-test-7TRIH2WJ.js +2 -0
  248. package/dist/cli/chunks/{mcp-LT6R2IKS.js → mcp-IOE5WOCS.js} +2 -2
  249. package/dist/cli/chunks/{memory-4HKKOLRY.js → memory-DLYGJAP7.js} +5 -5
  250. package/dist/cli/chunks/memory-backend-G7ZW6Q2B.js +2 -0
  251. package/dist/cli/chunks/memory-handlers-TPF3KCO5.js +2 -0
  252. package/dist/cli/chunks/{multi-model-executor-2YPM2WTK.js → multi-model-executor-WHH4YCHM.js} +2 -2
  253. package/dist/cli/chunks/{opencode-installer-WBAJMH5K.js → opencode-installer-63FDZAMS.js} +2 -2
  254. package/dist/cli/chunks/{orchestrator-5W5WVMVJ.js → orchestrator-3LA776KK.js} +5 -5
  255. package/dist/cli/chunks/pattern-null-store-OU3ZC3NR.js +2 -0
  256. package/dist/cli/chunks/{pattern-usage-recorder-GXRMNPAZ.js → pattern-usage-recorder-NW54QUGI.js} +2 -2
  257. package/dist/cli/chunks/{pipeline-2NA4DRDA.js → pipeline-P3TYX6J6.js} +2 -2
  258. package/dist/cli/chunks/{platform-BGERNQ5V.js → platform-FNA2WLI6.js} +2 -2
  259. package/dist/cli/chunks/{plugin-L4EPVENR.js → plugin-NJS7BC2S.js} +2 -2
  260. package/dist/cli/chunks/{prime-radiant-advanced-wasm-RTQRTPTM.js → prime-radiant-advanced-wasm-NIAVL2OT.js} +2 -2
  261. package/dist/cli/chunks/project-root-GMOFJEKD.js +2 -0
  262. package/dist/cli/chunks/protocol-executor-AD345XRO.js +2 -0
  263. package/dist/cli/chunks/{protocol-handler-SYQXM6JK.js → protocol-handler-JU5C4JHY.js} +2 -2
  264. package/dist/cli/chunks/{prove-5O7GPJCU.js → prove-35VOSLYP.js} +2 -2
  265. package/dist/cli/chunks/qe-reasoning-bank-NLTP26RC.js +2 -0
  266. package/dist/cli/chunks/{quality-KIIDHGNF.js → quality-ET74X7HN.js} +2 -2
  267. package/dist/cli/chunks/{quality-gate-H65VECD3.js → quality-gate-FEDQISNB.js} +3 -3
  268. package/dist/cli/chunks/queen-coordinator-2TB4FWS6.js +2 -0
  269. package/dist/cli/chunks/real-embeddings-II6CXTCI.js +2 -0
  270. package/dist/cli/chunks/{ref-validation-CSBJOMZM.js → ref-validation-DTBPYCEB.js} +2 -2
  271. package/dist/cli/chunks/{roocode-installer-G7OVYXEN.js → roocode-installer-LYQEMR4J.js} +2 -2
  272. package/dist/cli/chunks/router-PLM3MWME.js +2 -0
  273. package/dist/cli/chunks/routing-feedback-I7VOX2HU.js +2 -0
  274. package/dist/cli/chunks/{routing-handler-ZNZPPI5Y.js → routing-handler-DJOJFPII.js} +2 -2
  275. package/dist/cli/chunks/{ruvector-commands-C6IG3OY3.js → ruvector-commands-VXYGJDPW.js} +2 -2
  276. package/dist/cli/chunks/rvf-dual-writer-GQZHFWO2.js +2 -0
  277. package/dist/cli/chunks/rvf-migration-adapter-3TVKBCAM.js +2 -0
  278. package/dist/cli/chunks/rvf-migration-coordinator-XUHKLMT6.js +2 -0
  279. package/dist/cli/chunks/rvf-native-adapter-5GUTYOWS.js +2 -0
  280. package/dist/cli/chunks/{rvf-store-integrity-3G6LFLT3.js → rvf-store-integrity-GA2ZYOEG.js} +2 -2
  281. package/dist/cli/chunks/safe-db-RZPQGLGQ.js +2 -0
  282. package/dist/cli/chunks/schedule-G7JMQDUX.js +2 -0
  283. package/dist/cli/chunks/scheduler-4SEGPCKD.js +2 -0
  284. package/dist/cli/chunks/{security-A3IMVLFM.js → security-MM6YOECX.js} +3 -3
  285. package/dist/cli/chunks/{shared-rvf-adapter-VHWQ6US5.js → shared-rvf-adapter-6AHPA3V5.js} +2 -2
  286. package/dist/cli/chunks/{shared-rvf-dual-writer-JB3QS7IG.js → shared-rvf-dual-writer-EYAVY2GZ.js} +2 -2
  287. package/dist/cli/chunks/sqlite-persistence-IVE4SQXR.js +2 -0
  288. package/dist/cli/chunks/{standalone-memory-DDNXCSBD.js → standalone-memory-A3PLB4CZ.js} +2 -2
  289. package/dist/cli/chunks/{status-handler-2HK7XPEK.js → status-handler-OSSFAP4Z.js} +2 -2
  290. package/dist/cli/chunks/{structural-health-DSJVLEPV.js → structural-health-PGY5XUNO.js} +2 -2
  291. package/dist/cli/chunks/{sync-NTUR53PI.js → sync-CWEHYGNN.js} +2 -2
  292. package/dist/cli/chunks/sync-PM6D7EQF.js +2 -0
  293. package/dist/cli/chunks/task-handler-LHMQ75W4.js +64 -0
  294. package/dist/cli/chunks/{task-handlers-VJR6EHRZ.js → task-handlers-S2TX5FTR.js} +4 -4
  295. package/dist/cli/chunks/test-4EGZZ6NJ.js +34 -0
  296. package/dist/cli/chunks/test-runner-process-72YACW6M.js +2 -0
  297. package/dist/cli/chunks/{test-scheduling-Q6QEEOS6.js → test-scheduling-YJQHH3XE.js} +3 -3
  298. package/dist/cli/chunks/token-bootstrap-DJNETMVW.js +2 -0
  299. package/dist/cli/chunks/{token-usage-YEEFWSSI.js → token-usage-WPNOJR6H.js} +2 -2
  300. package/dist/cli/chunks/{transformers-BZCHJJJT.js → transformers-4MRPXCPU.js} +2 -2
  301. package/dist/cli/chunks/tree-sitter-wasm-parser-UVWSDXFR.js +2 -0
  302. package/dist/cli/chunks/{types-4AOKZYOX.js → types-6P5FB4EB.js} +2 -2
  303. package/dist/cli/chunks/unified-memory-2VMGSGQL.js +2 -0
  304. package/dist/cli/chunks/unified-memory-hnsw-3KULVD3N.js +2 -0
  305. package/dist/cli/chunks/unified-persistence-QCSLU2SV.js +2 -0
  306. package/dist/cli/chunks/{upgrade-2MWW6BT2.js → upgrade-4ICTN63Y.js} +2 -2
  307. package/dist/cli/chunks/{validate-PAEV3GT5.js → validate-HQF5GZ7L.js} +2 -2
  308. package/dist/cli/chunks/{validate-swarm-ZIXACK5K.js → validate-swarm-45JYG7VW.js} +2 -2
  309. package/dist/cli/chunks/visual-security-ZYP2KPH7.js +2 -0
  310. package/dist/cli/chunks/{web-tree-sitter-VLTXZFAB.js → web-tree-sitter-UOTWZLNH.js} +2 -2
  311. package/dist/cli/chunks/{windsurf-installer-VELMLOZF.js → windsurf-installer-WDWSBXGN.js} +2 -2
  312. package/dist/cli/chunks/witness-chain-5QRT7EMX.js +2 -0
  313. package/dist/cli/chunks/witness-chain-DOYMNPC7.js +2 -0
  314. package/dist/cli/chunks/witness-chain-repair-CUF2AFQB.js +2 -0
  315. package/dist/cli/chunks/{witness-chain-verifier-MIDWD4JS.js → witness-chain-verifier-JB42X62J.js} +2 -2
  316. package/dist/cli/chunks/{witness-key-manager-OSVCWOB2.js → witness-key-manager-LXXO6L2G.js} +2 -2
  317. package/dist/cli/chunks/{workflow-MK7A7QCX.js → workflow-6ARK47NF.js} +4 -4
  318. package/dist/cli/chunks/workflow-orchestrator-RYDDWIXN.js +2 -0
  319. package/dist/cli/chunks/wrappers-CYQBOMPL.js +2 -0
  320. package/dist/cli/commands/code.js +4 -0
  321. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +10 -2
  322. package/dist/cli/commands/test.js +26 -4
  323. package/dist/cli/handlers/task-handler.d.ts +5 -0
  324. package/dist/cli/handlers/task-handler.js +21 -1
  325. package/dist/cli/utils/task-result.d.ts +11 -0
  326. package/dist/cli/utils/task-result.js +39 -0
  327. package/dist/coordination/handlers/test-execution-handlers.js +137 -59
  328. package/dist/coordination/mincut/mincut-persistence.js +29 -25
  329. package/dist/domains/code-intelligence/coordinator.d.ts +4 -0
  330. package/dist/domains/code-intelligence/coordinator.js +46 -13
  331. package/dist/domains/code-intelligence/interfaces.d.ts +10 -1
  332. package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +37 -7
  333. package/dist/domains/code-intelligence/services/semantic-analyzer.js +135 -62
  334. package/dist/domains/code-intelligence/services/text-relevance.d.ts +32 -0
  335. package/dist/domains/code-intelligence/services/text-relevance.js +63 -0
  336. package/dist/domains/learning-optimization/services/learning-coordinator.js +1 -1
  337. package/dist/domains/quality-assessment/coordinator.js +2 -1
  338. package/dist/domains/test-execution/coordinator.d.ts +3 -1
  339. package/dist/domains/test-execution/coordinator.js +21 -7
  340. package/dist/domains/test-execution/interfaces.d.ts +17 -0
  341. package/dist/domains/test-execution/plugin.js +8 -2
  342. package/dist/domains/test-execution/services/flaky-detector.d.ts +9 -1
  343. package/dist/domains/test-execution/services/flaky-detector.js +26 -8
  344. package/dist/domains/test-execution/services/retry-handler.d.ts +9 -1
  345. package/dist/domains/test-execution/services/retry-handler.js +56 -12
  346. package/dist/domains/test-execution/services/runner-test-cases.d.ts +2 -0
  347. package/dist/domains/test-execution/services/runner-test-cases.js +7 -3
  348. package/dist/domains/test-execution/services/test-executor.d.ts +6 -1
  349. package/dist/domains/test-execution/services/test-executor.js +97 -14
  350. package/dist/domains/visual-accessibility/coordinator.d.ts +15 -7
  351. package/dist/domains/visual-accessibility/coordinator.js +15 -7
  352. package/dist/domains/visual-accessibility/interfaces.d.ts +27 -3
  353. package/dist/domains/visual-accessibility/services/accessibility-contrast.d.ts +39 -0
  354. package/dist/domains/visual-accessibility/services/accessibility-contrast.js +93 -0
  355. package/dist/domains/visual-accessibility/services/accessibility-tester-browser.d.ts +18 -3
  356. package/dist/domains/visual-accessibility/services/accessibility-tester-browser.js +50 -40
  357. package/dist/domains/visual-accessibility/services/accessibility-tester-checks.d.ts +27 -0
  358. package/dist/domains/visual-accessibility/services/accessibility-tester-checks.js +137 -0
  359. package/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +5 -0
  360. package/dist/domains/visual-accessibility/services/accessibility-tester.js +43 -24
  361. package/dist/domains/visual-accessibility/services/browser-swarm-coordinator.d.ts +2 -3
  362. package/dist/domains/visual-accessibility/services/browser-swarm-coordinator.js +8 -14
  363. package/dist/feedback/coverage-learner.js +13 -9
  364. package/dist/feedback/test-outcome-tracker.js +13 -9
  365. package/dist/governance/witness-chain.d.ts +5 -0
  366. package/dist/governance/witness-chain.js +22 -6
  367. package/dist/init/copilot-installer.d.ts +6 -0
  368. package/dist/init/copilot-installer.js +37 -17
  369. package/dist/init/platform-config-generator.d.ts +10 -0
  370. package/dist/init/platform-config-generator.js +26 -1
  371. package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts +22 -0
  372. package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +115 -45
  373. package/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.d.ts +6 -0
  374. package/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.js +51 -33
  375. package/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js +17 -9
  376. package/dist/integrations/embeddings/cache/EmbeddingCache.d.ts +8 -0
  377. package/dist/integrations/embeddings/cache/EmbeddingCache.js +24 -10
  378. package/dist/integrations/ruvector/delta-tracker.d.ts +11 -0
  379. package/dist/integrations/ruvector/delta-tracker.js +16 -0
  380. package/dist/integrations/ruvector/sona-persistence.d.ts +10 -0
  381. package/dist/integrations/ruvector/sona-persistence.js +49 -24
  382. package/dist/kernel/unified-memory.d.ts +32 -0
  383. package/dist/kernel/unified-memory.js +76 -8
  384. package/dist/learning/aqe-learning-engine.js +1 -1
  385. package/dist/learning/embed-and-insert-pattern.js +4 -2
  386. package/dist/learning/embedder-endpoint-client.d.ts +76 -0
  387. package/dist/learning/embedder-endpoint-client.js +201 -13
  388. package/dist/learning/embedding-space-registry.d.ts +75 -0
  389. package/dist/learning/embedding-space-registry.js +142 -0
  390. package/dist/learning/embedding-space.d.ts +12 -0
  391. package/dist/learning/embedding-space.js +17 -0
  392. package/dist/learning/experience-capture-middleware.js +25 -13
  393. package/dist/learning/experience-capture.js +1 -1
  394. package/dist/learning/experience-consolidation.d.ts +18 -0
  395. package/dist/learning/experience-consolidation.js +55 -8
  396. package/dist/learning/experience-space-verification.d.ts +71 -0
  397. package/dist/learning/experience-space-verification.js +147 -0
  398. package/dist/learning/pattern-lifecycle.d.ts +40 -4
  399. package/dist/learning/pattern-lifecycle.js +153 -76
  400. package/dist/learning/pattern-null-store.d.ts +5 -0
  401. package/dist/learning/pattern-null-store.js +8 -0
  402. package/dist/learning/pattern-promotion.js +6 -3
  403. package/dist/learning/pattern-store.d.ts +6 -0
  404. package/dist/learning/pattern-store.js +19 -6
  405. package/dist/learning/qe-reasoning-bank.js +2 -2
  406. package/dist/learning/real-embeddings.d.ts +3 -0
  407. package/dist/learning/real-embeddings.js +52 -12
  408. package/dist/learning/real-qe-reasoning-bank.d.ts +5 -0
  409. package/dist/learning/real-qe-reasoning-bank.js +77 -47
  410. package/dist/learning/rvf-pattern-store.js +6 -2
  411. package/dist/learning/sqlite-persistence.d.ts +6 -0
  412. package/dist/learning/sqlite-persistence.js +10 -0
  413. package/dist/mcp/bundle.js +699 -619
  414. package/dist/mcp/entry.js +4 -0
  415. package/dist/mcp/handlers/domain-handler-configs.js +2 -0
  416. package/dist/mcp/handlers/trajectory-judge.js +1 -1
  417. package/dist/mcp/protocol-server.js +1 -0
  418. package/dist/mcp/tools/visual-accessibility/index.js +8 -2
  419. package/dist/mcp/types.d.ts +6 -0
  420. package/dist/optimization/session-cache.d.ts +17 -1
  421. package/dist/optimization/session-cache.js +40 -36
  422. package/dist/planning/goap-planner.d.ts +6 -0
  423. package/dist/planning/goap-planner.js +35 -19
  424. package/dist/planning/plan-executor.js +24 -15
  425. package/dist/routing/co-execution-repository.js +12 -9
  426. package/dist/routing/routing-feedback.d.ts +8 -0
  427. package/dist/routing/routing-feedback.js +46 -24
  428. package/dist/routing/routing-outcomes-migration.js +7 -2
  429. package/dist/shared/embeddings/index.d.ts +2 -2
  430. package/dist/shared/embeddings/index.js +1 -1
  431. package/dist/shared/embeddings/nomic-embedder.d.ts +8 -2
  432. package/dist/shared/embeddings/nomic-embedder.js +19 -11
  433. package/dist/shared/embeddings/ollama-client.d.ts +28 -2
  434. package/dist/shared/embeddings/ollama-client.js +84 -22
  435. package/dist/shared/embeddings/types.d.ts +15 -0
  436. package/dist/shared/embeddings/types.js +4 -0
  437. package/dist/shared/llm/spend-ledger.d.ts +9 -0
  438. package/dist/shared/llm/spend-ledger.js +64 -39
  439. package/dist/shared/pytest-junit-report.d.ts +93 -0
  440. package/dist/shared/pytest-junit-report.js +241 -0
  441. package/dist/shared/sqlite-lock-wait.d.ts +27 -0
  442. package/dist/shared/sqlite-lock-wait.js +37 -0
  443. package/dist/shared/sqlite-write-queue.d.ts +28 -0
  444. package/dist/shared/sqlite-write-queue.js +38 -0
  445. package/dist/shared/test-runner-project.d.ts +119 -0
  446. package/dist/shared/test-runner-project.js +301 -0
  447. package/dist/skills/security-visual-testing/index.d.ts +3 -1
  448. package/dist/skills/security-visual-testing/index.js +49 -35
  449. package/dist/skills/security-visual-testing/types.d.ts +19 -3
  450. package/dist/workers/workers/heartbeat-scheduler.js +5 -5
  451. package/dist/workers/workers/learning-consolidation.js +8 -7
  452. package/package.json +1 -1
  453. package/dist/cli/chunks/adapter-QU6INSKP.js +0 -2
  454. package/dist/cli/chunks/aqe-learning-engine-PAJPENJD.js +0 -2
  455. package/dist/cli/chunks/base-OTGSN6IC.js +0 -2
  456. package/dist/cli/chunks/browser-workflow-WLZGR6SB.js +0 -2
  457. package/dist/cli/chunks/chunk-2LUTPMBO.js +0 -21
  458. package/dist/cli/chunks/chunk-3HVFIITW.js +0 -2
  459. package/dist/cli/chunks/chunk-4D4CWP72.js +0 -2
  460. package/dist/cli/chunks/chunk-5KA5TVPR.js +0 -6
  461. package/dist/cli/chunks/chunk-6NBRMD25.js +0 -13
  462. package/dist/cli/chunks/chunk-7O45RQHF.js +0 -153
  463. package/dist/cli/chunks/chunk-EMSZVUYA.js +0 -29
  464. package/dist/cli/chunks/chunk-G6RDCCFV.js +0 -4
  465. package/dist/cli/chunks/chunk-HH4ED4F7.js +0 -744
  466. package/dist/cli/chunks/chunk-Q6I4SIUU.js +0 -65
  467. package/dist/cli/chunks/chunk-QGBGSQ2E.js +0 -14
  468. package/dist/cli/chunks/chunk-QRKTBSZT.js +0 -27
  469. package/dist/cli/chunks/chunk-SHRI7TKJ.js +0 -62
  470. package/dist/cli/chunks/chunk-TX2CHQD7.js +0 -2
  471. package/dist/cli/chunks/chunk-UGYM4U44.js +0 -2
  472. package/dist/cli/chunks/chunk-VY4U6DPO.js +0 -12
  473. package/dist/cli/chunks/chunk-WNTA4YKE.js +0 -14
  474. package/dist/cli/chunks/chunk-XHLYGXYE.js +0 -2
  475. package/dist/cli/chunks/client-KKRNPX4F.js +0 -2
  476. package/dist/cli/chunks/copilot-installer-BHPDSELY.js +0 -3
  477. package/dist/cli/chunks/core-handlers-47MPMED7.js +0 -2
  478. package/dist/cli/chunks/cross-domain-router-U6MBFHEC.js +0 -2
  479. package/dist/cli/chunks/daemon-AXLVPKVO.js +0 -18
  480. package/dist/cli/chunks/dream-76L6EEN7.js +0 -2
  481. package/dist/cli/chunks/embed-and-insert-pattern-B6MNHICW.js +0 -3
  482. package/dist/cli/chunks/experience-capture-middleware-SUFILYPW.js +0 -40
  483. package/dist/cli/chunks/file-discovery-VSFKZ3LJ.js +0 -2
  484. package/dist/cli/chunks/heartbeat-scheduler-NIK3KKEH.js +0 -2
  485. package/dist/cli/chunks/hnsw-adapter-WJG7LUJJ.js +0 -2
  486. package/dist/cli/chunks/hnsw-index-D6PRI5HC.js +0 -2
  487. package/dist/cli/chunks/hybrid-backend-RIUR3I7F.js +0 -2
  488. package/dist/cli/chunks/impact-analyzer-C36YYTJ5.js +0 -2
  489. package/dist/cli/chunks/init-wizard-JCKNGIGT.js +0 -2
  490. package/dist/cli/chunks/kernel-F7ILJTYD.js +0 -2
  491. package/dist/cli/chunks/knowledge-graph-VTXDBHB2.js +0 -2
  492. package/dist/cli/chunks/llm-router-service-TNOWQINA.js +0 -2
  493. package/dist/cli/chunks/load-test-FPVBK2EV.js +0 -2
  494. package/dist/cli/chunks/memory-backend-2QE7O67A.js +0 -2
  495. package/dist/cli/chunks/memory-handlers-X4CMVBXB.js +0 -2
  496. package/dist/cli/chunks/pattern-null-store-UI35ORHW.js +0 -2
  497. package/dist/cli/chunks/project-root-S7WDFTMU.js +0 -2
  498. package/dist/cli/chunks/protocol-executor-OPANXQVB.js +0 -2
  499. package/dist/cli/chunks/qe-reasoning-bank-3OTF4DYQ.js +0 -2
  500. package/dist/cli/chunks/queen-coordinator-WTYH4TAN.js +0 -2
  501. package/dist/cli/chunks/real-embeddings-DYIOLKQ3.js +0 -2
  502. package/dist/cli/chunks/router-DBBW4NC2.js +0 -2
  503. package/dist/cli/chunks/routing-feedback-W35QHCL4.js +0 -2
  504. package/dist/cli/chunks/rvf-dual-writer-X3NSL25Z.js +0 -2
  505. package/dist/cli/chunks/rvf-migration-adapter-TZR7GDOK.js +0 -2
  506. package/dist/cli/chunks/rvf-migration-coordinator-4ATTHGHD.js +0 -2
  507. package/dist/cli/chunks/rvf-native-adapter-HD25ZYV5.js +0 -2
  508. package/dist/cli/chunks/safe-db-ZS2QKANY.js +0 -2
  509. package/dist/cli/chunks/schedule-ZH6VNA32.js +0 -2
  510. package/dist/cli/chunks/scheduler-T6CD74B6.js +0 -2
  511. package/dist/cli/chunks/sqlite-persistence-47WU5EKZ.js +0 -2
  512. package/dist/cli/chunks/sync-3MUV6S5E.js +0 -2
  513. package/dist/cli/chunks/task-handler-74MZN2EO.js +0 -62
  514. package/dist/cli/chunks/test-O6FK3FVF.js +0 -34
  515. package/dist/cli/chunks/test-runner-process-2NPW3UDQ.js +0 -2
  516. package/dist/cli/chunks/token-bootstrap-TTRCECLP.js +0 -2
  517. package/dist/cli/chunks/tree-sitter-wasm-parser-RZAND65G.js +0 -2
  518. package/dist/cli/chunks/unified-memory-FZ5K2C7W.js +0 -2
  519. package/dist/cli/chunks/unified-memory-hnsw-VREWX56M.js +0 -2
  520. package/dist/cli/chunks/unified-persistence-YZGMKX6B.js +0 -2
  521. package/dist/cli/chunks/visual-security-GXGSFBVA.js +0 -2
  522. package/dist/cli/chunks/witness-chain-MRJKVCOW.js +0 -2
  523. package/dist/cli/chunks/witness-chain-WWHJKITG.js +0 -2
  524. package/dist/cli/chunks/witness-chain-repair-5SAXPETG.js +0 -2
  525. package/dist/cli/chunks/workflow-orchestrator-SG7DV72E.js +0 -2
  526. package/dist/cli/chunks/wrappers-5QFMCKXL.js +0 -2
@@ -940,7 +940,7 @@
940
940
  },
941
941
  "metadata": {
942
942
  "generatedBy": "Agentic QE Fleet",
943
- "fleetVersion": "3.15.15",
943
+ "fleetVersion": "3.15.17",
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,174 @@ 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.15.17] - 2026-10-28
9
+
10
+ Python projects can run their pytest suites through AQE, and those runs now
11
+ count as measured outcomes. VS Code Copilot picks up the current AQE tools
12
+ after an upgrade instead of keeping a stale cached tool list. The learning
13
+ system keeps the same embedding space when the same model restarts, and
14
+ refuses a different model behind the same endpoint. Semantic code search
15
+ uses an installed Ollama MiniLM model, and text matches are ranked by how
16
+ closely they match.
17
+
18
+ ### Added
19
+
20
+ - **pytest support** ([#1248], [#1303]): `aqe test execute` and
21
+ `test_execute_parallel` run `.py` test files with
22
+ `python -m pytest --junitxml` and report passed, failed and skipped tests
23
+ by name. Python projects are detected from `pytest.ini`, `pyproject.toml`,
24
+ `setup.cfg`, `tox.ini` or `conftest.py`. Set `AQE_PYTHON` to choose the
25
+ interpreter. A run that does not finish (pytest not installed, no tests
26
+ collected, a collection error) is reported as an error, never as a pass,
27
+ and Python files are never sent to Vitest. Follow-ups, including recording
28
+ outcomes from the CLI and pytest coverage, are tracked in [#1304].
29
+
30
+ ### Fixed
31
+
32
+ - **VS Code Copilot no longer keeps stale AQE tools after an upgrade**
33
+ ([#1269], [#1293]): VS Code caches each MCP server's tools and refreshes
34
+ them only when the server's launch settings change, so after an upgrade
35
+ Copilot could keep rejecting an old tool schema. `aqe init` now writes
36
+ the installed AQE version into the server's `env` in `.vscode/mcp.json`
37
+ (still launching `agentic-qe@latest`), so re-running init after an
38
+ upgrade makes VS Code reload the tools. Re-init only updates AQE's own
39
+ entry and leaves a file with comments untouched. If Copilot still shows
40
+ the error, run "MCP: Reset Cached Tools". A check in the test suite now
41
+ fails the build if any tool schema has an array without `items`.
42
+ - **A different embedding model behind the same endpoint is refused**
43
+ ([#1282], [#1295]): after the circuit breaker recovered, the embedder
44
+ client accepted whatever model now answered. It now refuses a changed
45
+ model with a clear error, so vectors from two models are never mixed.
46
+ The same model with tiny numeric differences is still accepted.
47
+ - **The same model keeps its embedding space after a restart** ([#1298],
48
+ [#1301]): the embedding space id came from an exact fingerprint, so tiny
49
+ float differences after a restart started a new space and hid earlier
50
+ experiences. Known spaces are now recorded and matched by similarity, and
51
+ `backfill-embeddings` no longer rewrites stored vectors after such a
52
+ restart. Remaining edge cases are tracked in [#1302].
53
+ - **Semantic code search uses an installed Ollama MiniLM model** ([#1229],
54
+ [#1297]): `all-minilm` (the L6 model, under any tag Ollama lists) is
55
+ recognised and requested by its installed name, so search no longer drops
56
+ to text-only. The error says whether the model is missing, Ollama is not
57
+ reachable, or the request failed. `AQE_OLLAMA_EMBEDDING_MODEL` selects
58
+ another Ollama model, which gets its own embedding space.
59
+ - **Ranking among text matches** ([#1287], [#1299]): when several files
60
+ match the query words equally, an exact identifier match comes first,
61
+ then words next to each other, whole words before partial ones, and more
62
+ occurrences before fewer. Scores are unchanged.
63
+ - **Test runs pick each package's runner** ([#1272], [#1300]): a Jest
64
+ package in a monorepo is run with Jest even when the default is Vitest,
65
+ the flaky detector runs from the package directory, and
66
+ `aqe test execute --project-root <dir>` is available on the CLI.
67
+ `--framework` is only passed on when you set it.
68
+
69
+ [#1229]: https://github.com/proffesor-for-testing/agentic-qe/issues/1229
70
+ [#1248]: https://github.com/proffesor-for-testing/agentic-qe/issues/1248
71
+ [#1269]: https://github.com/proffesor-for-testing/agentic-qe/issues/1269
72
+ [#1272]: https://github.com/proffesor-for-testing/agentic-qe/issues/1272
73
+ [#1282]: https://github.com/proffesor-for-testing/agentic-qe/issues/1282
74
+ [#1287]: https://github.com/proffesor-for-testing/agentic-qe/issues/1287
75
+ [#1293]: https://github.com/proffesor-for-testing/agentic-qe/pull/1293
76
+ [#1295]: https://github.com/proffesor-for-testing/agentic-qe/pull/1295
77
+ [#1297]: https://github.com/proffesor-for-testing/agentic-qe/pull/1297
78
+ [#1298]: https://github.com/proffesor-for-testing/agentic-qe/issues/1298
79
+ [#1299]: https://github.com/proffesor-for-testing/agentic-qe/pull/1299
80
+ [#1300]: https://github.com/proffesor-for-testing/agentic-qe/pull/1300
81
+ [#1301]: https://github.com/proffesor-for-testing/agentic-qe/pull/1301
82
+ [#1302]: https://github.com/proffesor-for-testing/agentic-qe/issues/1302
83
+ [#1303]: https://github.com/proffesor-for-testing/agentic-qe/pull/1303
84
+ [#1304]: https://github.com/proffesor-for-testing/agentic-qe/issues/1304
85
+
86
+ ## [3.15.16] - 2026-10-27
87
+
88
+ A locked `.agentic-qe/memory.db` no longer freezes the MCP server: database
89
+ writes from tool calls and background workers wait for the lock without
90
+ blocking other calls. Accessibility checks report what axe-core actually
91
+ measured, or say "not measured", instead of made-up values. Test runs in a
92
+ monorepo use each package's own runner config. Code search covers every
93
+ indexed file and says when part of the result is a text match. The learning
94
+ system no longer waits on a silent embedder host and only compares
95
+ experiences embedded by the same model.
96
+
97
+ ### Fixed
98
+
99
+ - **A locked memory.db no longer stalls the MCP server** ([#1263], [#1274],
100
+ [#1275], [#1284], [#1290]): while another process held the write lock,
101
+ each blocked write froze the server for up to 5 seconds, so every tool
102
+ call, even `fleet_status`, could wait 10–15 seconds. Writes from tool
103
+ calls, the session cache, learning, the spend ledger, planning and the
104
+ background workers (heartbeat, consolidation, SONA saves) now go through
105
+ one queue that waits for the lock without blocking. Under a held lock,
106
+ `fleet_status` now answers in about 0.2 s instead of 3.5 s. Callers get
107
+ the same result as before: success, or a busy error after the usual 5 s.
108
+ Some startup schema changes and separate connections are still tracked
109
+ in [#1283].
110
+ - **Accessibility results are measured, not made up** ([#1228], [#1271],
111
+ [#1270], [#1277]): contrast failures report the colours and ratios
112
+ axe-core measured (they used to report black on white at ratio 1.0), and
113
+ axe's `serious` and `minor` impacts are no longer reported as `moderate`.
114
+ PII, layout-shift and keyboard focus checks that did not run say "not
115
+ measured" instead of reporting a clean result. `aqe task submit --wait`
116
+ prints the task's result, and `--output <file>` saves it.
117
+ - **Monorepo test runs use each package's config** ([#1247], [#1273]):
118
+ `test_execute_parallel` and `aqe test execute` run each test file from the
119
+ nearest directory with its own Vitest or Jest config, so package setup
120
+ files and aliases load. `test_execute_parallel` takes an optional
121
+ `projectRoot`, which must be inside the project.
122
+ - **Code search covers every indexed file** ([#1230], [#1231], [#1278],
123
+ [#1279], [#1286], [#1287]): indexing no longer stops embedding after 100
124
+ files, and a search reports `partial-vector` mode with coverage when some
125
+ files only have text. Text matching now requires the query word to appear
126
+ inside a word of the file, so a short word in the file no longer matches
127
+ a longer query word. How
128
+ tied text matches are ordered is tracked in [#1287].
129
+ - **The learning system no longer hangs on a silent embedder host**
130
+ ([#1216], [#1280], [#1285], [#1289]): a request that times out opens the
131
+ circuit breaker at once, the recovery probe runs in the background, and
132
+ each request removes its socket listeners when it finishes.
133
+ - **Experiences are compared only within one embedding space** ([#1217],
134
+ [#1280], [#1281], [#1288]): experience search and consolidation only use
135
+ vectors from the active embedding model, so experiences from another model
136
+ are no longer merged as near-duplicates. Older rows are marked
137
+ with their space only when the current model reproduces the stored vector;
138
+ stored vectors are never rewritten. A client that accepts a changed model
139
+ fingerprint after the breaker recovers is tracked in [#1282].
140
+
141
+ ### Changed
142
+
143
+ - **CI:** the coverage run is split into 3 parallel shards and merged into
144
+ the same report, so Coverage Analysis no longer hits its time limit
145
+ ([#1201], [#1276]).
146
+
147
+ [#1201]: https://github.com/proffesor-for-testing/agentic-qe/issues/1201
148
+ [#1216]: https://github.com/proffesor-for-testing/agentic-qe/issues/1216
149
+ [#1217]: https://github.com/proffesor-for-testing/agentic-qe/issues/1217
150
+ [#1228]: https://github.com/proffesor-for-testing/agentic-qe/issues/1228
151
+ [#1230]: https://github.com/proffesor-for-testing/agentic-qe/issues/1230
152
+ [#1231]: https://github.com/proffesor-for-testing/agentic-qe/issues/1231
153
+ [#1247]: https://github.com/proffesor-for-testing/agentic-qe/issues/1247
154
+ [#1263]: https://github.com/proffesor-for-testing/agentic-qe/issues/1263
155
+ [#1270]: https://github.com/proffesor-for-testing/agentic-qe/issues/1270
156
+ [#1271]: https://github.com/proffesor-for-testing/agentic-qe/pull/1271
157
+ [#1273]: https://github.com/proffesor-for-testing/agentic-qe/pull/1273
158
+ [#1274]: https://github.com/proffesor-for-testing/agentic-qe/issues/1274
159
+ [#1275]: https://github.com/proffesor-for-testing/agentic-qe/pull/1275
160
+ [#1276]: https://github.com/proffesor-for-testing/agentic-qe/pull/1276
161
+ [#1277]: https://github.com/proffesor-for-testing/agentic-qe/pull/1277
162
+ [#1278]: https://github.com/proffesor-for-testing/agentic-qe/pull/1278
163
+ [#1279]: https://github.com/proffesor-for-testing/agentic-qe/issues/1279
164
+ [#1280]: https://github.com/proffesor-for-testing/agentic-qe/pull/1280
165
+ [#1281]: https://github.com/proffesor-for-testing/agentic-qe/issues/1281
166
+ [#1282]: https://github.com/proffesor-for-testing/agentic-qe/issues/1282
167
+ [#1283]: https://github.com/proffesor-for-testing/agentic-qe/issues/1283
168
+ [#1284]: https://github.com/proffesor-for-testing/agentic-qe/pull/1284
169
+ [#1285]: https://github.com/proffesor-for-testing/agentic-qe/issues/1285
170
+ [#1286]: https://github.com/proffesor-for-testing/agentic-qe/pull/1286
171
+ [#1287]: https://github.com/proffesor-for-testing/agentic-qe/issues/1287
172
+ [#1288]: https://github.com/proffesor-for-testing/agentic-qe/pull/1288
173
+ [#1289]: https://github.com/proffesor-for-testing/agentic-qe/pull/1289
174
+ [#1290]: https://github.com/proffesor-for-testing/agentic-qe/pull/1290
175
+
8
176
  ## [3.15.15] - 2026-10-26
9
177
 
10
178
  `aqe init` no longer gives Claude Code standing permission to run
@@ -940,7 +940,7 @@
940
940
  },
941
941
  "metadata": {
942
942
  "generatedBy": "Agentic QE Fleet",
943
- "fleetVersion": "3.15.15",
943
+ "fleetVersion": "3.15.17",
944
944
  "manifestVersion": "1.4.0",
945
945
  "lastUpdated": "2026-04-13T00:00:00.000Z",
946
946
  "contributors": [
@@ -47,6 +47,13 @@ export declare class WitnessChain {
47
47
  getKeyManager(): WitnessKeyManager | null;
48
48
  private ensureTable;
49
49
  private addColumnIfMissing;
50
+ /**
51
+ * append() through the shared connection's write queue (#1283), for
52
+ * fire-and-forget callers in the MCP server: a locked memory.db does not
53
+ * freeze the event loop. The tail is still read inside the same BEGIN
54
+ * IMMEDIATE transaction, so the chain cannot fork.
55
+ */
56
+ appendWhenUnlocked(actionType: WitnessActionType, actionData: Record<string, unknown>, actor: string): Promise<WitnessEntry>;
50
57
  /** Append a new SHAKE-256-hashed entry, optionally Ed25519-signed. */
51
58
  append(actionType: WitnessActionType, actionData: Record<string, unknown>, actor: string): WitnessEntry;
52
59
  /**
@@ -6,6 +6,7 @@
6
6
  * Tamper-evident: modifying any entry breaks the hash chain, detectable by verify().
7
7
  */
8
8
  import { getUnifiedMemory } from '../kernel/unified-memory.js';
9
+ import { writeWhenUnlockedOn } from '../shared/sqlite-write-queue.js';
9
10
  import { getDefaultWitnessKeyManager } from './witness-key-manager.js';
10
11
  import { GENESIS_PREV_HASH, sha256, shake256, hashWith, serializeEntry, signaturePayload, } from './witness-chain-hash.js';
11
12
  import { verifyWitnessChain } from './witness-chain-verifier.js';
@@ -81,6 +82,15 @@ export class WitnessChain {
81
82
  this.db.exec(`ALTER TABLE witness_chain ADD COLUMN ${column} ${definition}`);
82
83
  }
83
84
  }
85
+ /**
86
+ * append() through the shared connection's write queue (#1283), for
87
+ * fire-and-forget callers in the MCP server: a locked memory.db does not
88
+ * freeze the event loop. The tail is still read inside the same BEGIN
89
+ * IMMEDIATE transaction, so the chain cannot fork.
90
+ */
91
+ appendWhenUnlocked(actionType, actionData, actor) {
92
+ return writeWhenUnlockedOn(this.db, () => this.append(actionType, actionData, actor));
93
+ }
84
94
  /** Append a new SHAKE-256-hashed entry, optionally Ed25519-signed. */
85
95
  append(actionType, actionData, actor) {
86
96
  const db = this.db;
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
3
- import{b as x}from"./chunks/chunk-4ATQP3PR.js";import{b as v,c as E,e as A}from"./chunks/chunk-W27AJ5B4.js";import{d as P}from"./chunks/chunk-BDKEAGQ2.js";import{a as C}from"./chunks/chunk-LJMYRTJ7.js";import{b as S,c as y,d as I}from"./chunks/chunk-G242G224.js";import{a as W}from"./chunks/chunk-3HVFIITW.js";import"./chunks/chunk-BQ47GQPK.js";import{c as k,d as F}from"./chunks/chunk-ZWBGYJ7K.js";import"./chunks/chunk-UJABDXST.js";import{Q as w,S as H}from"./chunks/chunk-6YVMX2TC.js";import{h as L}from"./chunks/chunk-DURD37JZ.js";import"./chunks/chunk-SZAZQZWI.js";import"./chunks/chunk-MPFPWJTH.js";import"./chunks/chunk-AOKKUB5F.js";import"./chunks/chunk-T4GE7MPI.js";import{a as g,e as T}from"./chunks/chunk-HL2ANKN3.js";import"./chunks/chunk-XH4JMX5O.js";T();H();import{createRequire as G}from"node:module";import{Command as j}from"commander";import l from"chalk";W();F();I();var b=!1;function h(){if(!b){b=!0;try{P()}catch{}try{L()}catch{}try{S()}catch{}}}function R(e,n,c,a){let m=e.command(n).description(c);if(a)for(let u of a)m.alias(u);return m.helpOption(!1),m.allowUnknownOption(!0),m.allowExcessArguments(!0),m}function D(e,n){let c=e.commands,a=c.indexOf(n);a>=0&&c.splice(a,1)}function i(e,n){let c=R(e,n.name,n.description,n.aliases);c.action(async()=>{try{let a=await n.factory();D(e,c),e.addCommand(a),await e.parseAsync(process.argv)}catch(a){console.error(`Failed to load command '${n.name}':`,a instanceof Error?a.message:a),process.exit(1)}})}function d(e,n,c,a,m,u){let f=R(e,n,c,u);f.action(async()=>{try{let p=await a();D(e,f),p.register(e,m),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${n}':`,p instanceof Error?p.message:p),process.exit(1)}})}I();A();process.on("exit",h);var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function q(e,n){let c=e.getDomainAPI("visual-accessibility");if(c?.registerWorkflowActions)try{c.registerWorkflowActions(n)}catch(m){console.error(l.yellow(` Warning: Could not register visual-accessibility workflow actions: ${g(m)}`))}let a=e.getDomainAPI("requirements-validation");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(n)}catch(m){console.error(l.yellow(` Warning: Could not register requirements-validation workflow actions: ${g(m)}`))}}async function B(){let{QEKernelImpl:e}=await import("./chunks/kernel-F7ILJTYD.js"),{CrossDomainEventRouter:n}=await import("./chunks/cross-domain-router-U6MBFHEC.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-OPANXQVB.js"),{WorkflowOrchestrator:a}=await import("./chunks/workflow-orchestrator-SG7DV72E.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-WTYH4TAN.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-T6CD74B6.js"),{loadCLIDomainPlugins:f}=await import("./chunks/domain-plugins-HCQFSNL7.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...C],enableExperienceBridge:!1}),await t.kernel.initialize();let p=await f(t.kernel.plugins);t.router=new n(t.kernel.eventBus),await t.router.initialize();let O=_=>t.kernel.getDomainAPI(_),V=new c(t.kernel.eventBus,t.kernel.memory,O);t.workflowOrchestrator=new a(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),q(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=m(t.kernel,t.router,V,void 0,p),await t.queen.initialize();let{adoptExternalFleet:M}=await import("./chunks/core-handlers-47MPMED7.js");M({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function Q(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),n=await import("path"),{findProjectRoot:c}=await import("./chunks/project-root-S7WDFTMU.js"),a=n.join(c(),".agentic-qe");return e.existsSync(a)?s():(console.error(l.red(`
2
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
3
+ import{b as x}from"./chunks/chunk-HZ5O7G2P.js";import{b as v,c as E,e as A}from"./chunks/chunk-ZN35XSKF.js";import{d as P}from"./chunks/chunk-VITV7AEC.js";import{a as C}from"./chunks/chunk-REY52O7J.js";import{b as S,c as y,d as I}from"./chunks/chunk-BSIWI4ES.js";import{a as W}from"./chunks/chunk-TIVKDIF7.js";import"./chunks/chunk-DS5IFRY6.js";import{c as k,d as F}from"./chunks/chunk-5FSPELOG.js";import"./chunks/chunk-TWBZONKT.js";import{Q as w,S as H}from"./chunks/chunk-JHKKIJT2.js";import{h as L}from"./chunks/chunk-R3KBOQ3O.js";import"./chunks/chunk-GPPTRKEM.js";import"./chunks/chunk-TM75GAXG.js";import"./chunks/chunk-U4S74IIZ.js";import"./chunks/chunk-QSQNXBD2.js";import{a as g,e as T}from"./chunks/chunk-J7Q5TXFZ.js";import"./chunks/chunk-Z7SKUC6P.js";T();H();import{createRequire as G}from"node:module";import{Command as j}from"commander";import l from"chalk";W();F();I();var b=!1;function h(){if(!b){b=!0;try{P()}catch{}try{L()}catch{}try{S()}catch{}}}function R(e,n,c,a){let m=e.command(n).description(c);if(a)for(let u of a)m.alias(u);return m.helpOption(!1),m.allowUnknownOption(!0),m.allowExcessArguments(!0),m}function D(e,n){let c=e.commands,a=c.indexOf(n);a>=0&&c.splice(a,1)}function i(e,n){let c=R(e,n.name,n.description,n.aliases);c.action(async()=>{try{let a=await n.factory();D(e,c),e.addCommand(a),await e.parseAsync(process.argv)}catch(a){console.error(`Failed to load command '${n.name}':`,a instanceof Error?a.message:a),process.exit(1)}})}function d(e,n,c,a,m,u){let f=R(e,n,c,u);f.action(async()=>{try{let p=await a();D(e,f),p.register(e,m),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${n}':`,p instanceof Error?p.message:p),process.exit(1)}})}I();A();process.on("exit",h);var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function q(e,n){let c=e.getDomainAPI("visual-accessibility");if(c?.registerWorkflowActions)try{c.registerWorkflowActions(n)}catch(m){console.error(l.yellow(` Warning: Could not register visual-accessibility workflow actions: ${g(m)}`))}let a=e.getDomainAPI("requirements-validation");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(n)}catch(m){console.error(l.yellow(` Warning: Could not register requirements-validation workflow actions: ${g(m)}`))}}async function B(){let{QEKernelImpl:e}=await import("./chunks/kernel-ZEJPNDBW.js"),{CrossDomainEventRouter:n}=await import("./chunks/cross-domain-router-HEBM767Z.js"),{DefaultProtocolExecutor:c}=await import("./chunks/protocol-executor-AD345XRO.js"),{WorkflowOrchestrator:a}=await import("./chunks/workflow-orchestrator-RYDDWIXN.js"),{createQueenCoordinator:m}=await import("./chunks/queen-coordinator-2TB4FWS6.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-4SEGPCKD.js"),{loadCLIDomainPlugins:f}=await import("./chunks/domain-plugins-R7LTUM32.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...C],enableExperienceBridge:!1}),await t.kernel.initialize();let p=await f(t.kernel.plugins);t.router=new n(t.kernel.eventBus),await t.router.initialize();let O=_=>t.kernel.getDomainAPI(_),V=new c(t.kernel.eventBus,t.kernel.memory,O);t.workflowOrchestrator=new a(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),q(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=m(t.kernel,t.router,V,void 0,p),await t.queen.initialize();let{adoptExternalFleet:M}=await import("./chunks/core-handlers-JNAZPXE2.js");M({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function Q(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),n=await import("path"),{findProjectRoot:c}=await import("./chunks/project-root-GMOFJEKD.js"),a=n.join(c(),".agentic-qe");return e.existsSync(a)?s():(console.error(l.red(`
4
4
  Error: AQE system not initialized in this directory.`)),console.log(l.yellow("Run `aqe init` first to set up this project.\n")),process.exitCode=1,!1)}async function s(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=E(1);e&&process.stderr.write(l.gray("Auto-initializing v3 system...")+`
5
5
  `);let n=3e4,c=new Promise((a,m)=>{setTimeout(()=>m(new Error("Initialization timeout after 30 seconds")),n)});try{return await Promise.race([B(),c]),e&&process.stderr.write(l.green("System ready")+`
6
6
 
7
- `),!0}catch(a){return a.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:"),a),console.log(l.yellow("Try running `aqe init` manually."))),process.exitCode=1,!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}h(),process.exit(e)}var r=new j,N=G(import.meta.url),de=N("../../package.json").version,z="3.15.15";r.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(z).addHelpText("after",`
7
+ `),!0}catch(a){return a.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:"),a),console.log(l.yellow("Try running `aqe init` manually."))),process.exitCode=1,!1}}async function o(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}h(),process.exit(e)}var r=new j,N=G(import.meta.url),de=N("../../package.json").version,z="3.15.17";r.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(z).addHelpText("after",`
8
8
  Environment:
9
9
  AQE_LOG_LEVEL Internal log level: debug | info | warn | error | silent (default: warn)
10
10
  LOG_LEVEL Same as AQE_LOG_LEVEL; AQE_LOG_LEVEL takes precedence
11
11
  AQE_VERBOSE=1 Shorthand for info-level logging (full system-init output)
12
- Diagnostics are written to stderr; stdout carries command output only.`);r.hook("preAction",(e,n)=>{v(n.opts())});d(r,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-RJU5QMAP.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-2HK7XPEK.js").then(e=>e.createStatusHandler(o,Q)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-2HK7XPEK.js").then(e=>e.createHealthHandler(o,Q)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-74MZN2EO.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-MOX6PSIQ.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-EXSZCX7A.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-SYQXM6JK.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-5NQUDH4W.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-ZD2NYXMR.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-XRV327M7.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-ZNZPPI5Y.js").then(e=>e.createRoutingHandler(o)),t);i(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-MK7A7QCX.js").then(e=>e.createWorkflowCommand(t,o,s))});i(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-O6FK3FVF.js").then(e=>e.createTestCommand(t,o,s))});i(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-LYFQYNH6.js").then(e=>e.createCoverageCommand(t,o,s))});i(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-KIIDHGNF.js").then(e=>e.createQualityCommand(t,o,s))});i(r,{name:"quality-gate",description:"Two-gate, three-valued quality verdict against a pinned checklist (ADR-119)",factory:()=>import("./chunks/quality-gate-H65VECD3.js").then(e=>e.createQualityGateCommand(t,o,s))});i(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-A3IMVLFM.js").then(e=>e.createSecurityCommand(t,o,s))});i(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-M7GA3CVG.js").then(e=>e.createArenaCommand(t,o,s))});i(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-WY3GJXHX.js").then(e=>e.createCodeCommand(t,o,s))});i(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-CN2DXQFU.js").then(e=>e.createCompletionsCommand(o))});i(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-2MWW6BT2.js").then(e=>e.createUpgradeCommand(o))});i(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-ZJBCAKRG.js").then(e=>e.createFleetCommand(t,o,s,q))});i(r,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-ZIXACK5K.js").then(e=>e.createValidateSwarmCommand(t,o,s))});i(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-PAEV3GT5.js").then(e=>e.createValidateCommand(t,o,s))});i(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-OQELIWJK.js").then(e=>e.createEvalCommand())});i(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-UCUJOSBW.js").then(e=>e.createCICommand(t,o,s))});i(r,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-YEEFWSSI.js").then(e=>e.createTokenUsageCommand())});i(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-GJVKGRJL.js").then(e=>e.createLLMRouterCommand())});i(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-NTUR53PI.js").then(e=>e.createSyncCommands())});i(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-YZNJKXAJ.js").then(e=>e.createHooksCommand())});i(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-FZTD72CF.js").then(e=>e.createLearningCommand())});i(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-4HKKOLRY.js"),import("./chunks/standalone-memory-DDNXCSBD.js")]).then(([e,n])=>e.createMemoryCommand(t,o,n.createEnsureMemoryBackend(t)))});i(r,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-LT6R2IKS.js").then(e=>e.createMcpCommand())});i(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-BGERNQ5V.js").then(e=>e.createPlatformCommand())});i(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-5O7GPJCU.js").then(e=>e.createProveCommand(t,o,s))});i(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-C6IG3OY3.js").then(e=>e.createRuVectorCommand())});i(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-4IPBMKWB.js").then(e=>e.createAuditCommand(t,o,s))});i(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-2NA4DRDA.js").then(e=>e.createPipelineCommand(t,o,s))});i(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-L4EPVENR.js").then(e=>e.createPluginCommand())});i(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-7RC7TS57.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{y("SIGINT")||(console.log(l.yellow(`
12
+ Diagnostics are written to stderr; stdout carries command output only.`);r.hook("preAction",(e,n)=>{v(n.opts())});d(r,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-LRGWOJMD.js").then(e=>e.createInitHandler(o)),t);d(r,"status","Show system status",()=>import("./chunks/status-handler-OSSFAP4Z.js").then(e=>e.createStatusHandler(o,Q)),t);d(r,"health","Check system health",()=>import("./chunks/status-handler-OSSFAP4Z.js").then(e=>e.createHealthHandler(o,Q)),t);d(r,"task","Manage QE tasks",()=>import("./chunks/task-handler-LHMQ75W4.js").then(e=>e.createTaskHandler(o,s)),t);d(r,"agent","Manage QE agents",()=>import("./chunks/agent-handler-HPDK3JI3.js").then(e=>e.createAgentHandler(o,s)),t);d(r,"domain","Domain operations",()=>import("./chunks/domain-handler-TI3JBAPC.js").then(e=>e.createDomainHandler(o,s)),t);d(r,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-JU5C4JHY.js").then(e=>e.createProtocolHandler(o,s)),t);d(r,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-GCQZFZGQ.js").then(e=>e.createBrainHandler(o,s)),t);d(r,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-AVOPRHHO.js").then(e=>e.createHypergraphHandler(o,s)),t,["hg"]);d(r,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-5237PB35.js").then(e=>e.createHeartbeatHandler(o)),t);d(r,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-DJOJFPII.js").then(e=>e.createRoutingHandler(o)),t);i(r,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-6ARK47NF.js").then(e=>e.createWorkflowCommand(t,o,s))});i(r,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-4EGZZ6NJ.js").then(e=>e.createTestCommand(t,o,s))});i(r,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-5L7UQWDH.js").then(e=>e.createCoverageCommand(t,o,s))});i(r,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-ET74X7HN.js").then(e=>e.createQualityCommand(t,o,s))});i(r,{name:"quality-gate",description:"Two-gate, three-valued quality verdict against a pinned checklist (ADR-119)",factory:()=>import("./chunks/quality-gate-FEDQISNB.js").then(e=>e.createQualityGateCommand(t,o,s))});i(r,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-MM6YOECX.js").then(e=>e.createSecurityCommand(t,o,s))});i(r,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-HZ35LESR.js").then(e=>e.createArenaCommand(t,o,s))});i(r,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-PJ4MC3MC.js").then(e=>e.createCodeCommand(t,o,s))});i(r,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-KS23WD5J.js").then(e=>e.createCompletionsCommand(o))});i(r,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-4ICTN63Y.js").then(e=>e.createUpgradeCommand(o))});i(r,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-PXWGB7CU.js").then(e=>e.createFleetCommand(t,o,s,q))});i(r,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-45JYG7VW.js").then(e=>e.createValidateSwarmCommand(t,o,s))});i(r,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-HQF5GZ7L.js").then(e=>e.createValidateCommand(t,o,s))});i(r,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-KDOZMAXJ.js").then(e=>e.createEvalCommand())});i(r,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-3RTTTS2D.js").then(e=>e.createCICommand(t,o,s))});i(r,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-WPNOJR6H.js").then(e=>e.createTokenUsageCommand())});i(r,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-SIDXES23.js").then(e=>e.createLLMRouterCommand())});i(r,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-CWEHYGNN.js").then(e=>e.createSyncCommands())});i(r,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-GUWHL7VC.js").then(e=>e.createHooksCommand())});i(r,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-7OIZBPXZ.js").then(e=>e.createLearningCommand())});i(r,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>Promise.all([import("./chunks/memory-DLYGJAP7.js"),import("./chunks/standalone-memory-A3PLB4CZ.js")]).then(([e,n])=>e.createMemoryCommand(t,o,n.createEnsureMemoryBackend(t)))});i(r,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-IOE5WOCS.js").then(e=>e.createMcpCommand())});i(r,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-FNA2WLI6.js").then(e=>e.createPlatformCommand())});i(r,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-35VOSLYP.js").then(e=>e.createProveCommand(t,o,s))});i(r,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-VXYGJDPW.js").then(e=>e.createRuVectorCommand())});i(r,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-XI575SVK.js").then(e=>e.createAuditCommand(t,o,s))});i(r,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-P3TYX6J6.js").then(e=>e.createPipelineCommand(t,o,s))});i(r,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-NJS7BC2S.js").then(e=>e.createPluginCommand())});i(r,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-CDCQU3LR.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{y("SIGINT")||(console.log(l.yellow(`
13
13
 
14
14
  Shutting down...`)),console.log(l.green(`Shutdown complete
15
15
  `)),await o(0))});process.on("SIGTERM",async()=>{y("SIGTERM")||(console.log(l.yellow(`
16
- Received SIGTERM, shutting down gracefully...`)),await o(0))});async function $(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-UV4NDEWM.js");e(process.argv)&&(console.log(z),process.exit(0)),w();let n=process.argv.slice(2).filter(a=>a!=="--"),c=n[0]==="learning"&&(n[1]==="backup"||n[1]==="restore");if(n[0]==="init"){let{explicitRootError:a}=await import("./chunks/init-guard-DSRUAVRT.js"),m=a();if(m){console.error(l.red(`
16
+ Received SIGTERM, shutting down gracefully...`)),await o(0))});async function $(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-462V6UUB.js");e(process.argv)&&(console.log(z),process.exit(0)),w();let n=process.argv.slice(2).filter(a=>a!=="--"),c=n[0]==="learning"&&(n[1]==="backup"||n[1]==="restore");if(n[0]==="init"){let{explicitRootError:a}=await import("./chunks/init-guard-P4N6EVZS.js"),m=a();if(m){console.error(l.red(`
17
17
  ${m}
18
- `)),await o(1);return}}if(!c){let{bootstrapTokenTracking:a}=await import("./chunks/token-bootstrap-TTRCECLP.js");await a({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"})}await r.parseAsync(),!x()&&await o(process.exitCode??0)}$().catch(async e=>{console.error(l.red("Fatal error:"),k(e)),await o(1)});
18
+ `)),await o(1);return}}if(!c){let{bootstrapTokenTracking:a}=await import("./chunks/token-bootstrap-DJNETMVW.js");await a({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"})}await r.parseAsync(),!x()&&await o(process.exitCode??0)}$().catch(async e=>{console.error(l.red("Fatal error:"),k(e)),await o(1)});
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{a,b,c}from"./chunk-JRIJM4LE.js";import"./chunk-SAZ4PJBR.js";import"./chunk-VQFV2IPV.js";import"./chunk-CMN7PU2H.js";import"./chunk-J7Q5TXFZ.js";import"./chunk-Z7SKUC6P.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import{a as b}from"./chunk-7ACCBHRB.js";import{a as v}from"./chunk-3HVFIITW.js";import{c as y}from"./chunk-BQ47GQPK.js";import"./chunk-ZWBGYJ7K.js";import"./chunk-UJABDXST.js";import"./chunk-XH4JMX5O.js";v();import{createRequire as A}from"module";import{existsSync as W}from"fs";import{dirname as M,join as x}from"path";import{fileURLToPath as h}from"url";var L=y.create("agent-booster-wasm"),r={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},C={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},s=null,u=null,p=null,d="agent_booster_wasm.js";function R(e=import.meta.url){let t=[x(M(h(e)),d)],n=b(e);return n&&t.push(x(n,"dist","integrations","agent-booster-wasm",d)),t.find(a=>W(a))??null}async function g(){if(s)return!0;if(p)return!1;try{let e=R();if(!e)throw new Error(`${d} not found next to the module or under dist/integrations/agent-booster-wasm/`);if(s=A(import.meta.url)(e),!s)throw new Error("WASM module loaded but is null");return u=new s.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function T(e){return{".js":r.JavaScript,".mjs":r.JavaScript,".cjs":r.JavaScript,".jsx":r.JavaScript,".ts":r.TypeScript,".tsx":r.TypeScript,".mts":r.TypeScript,".cts":r.TypeScript,".py":r.Python,".rs":r.Rust,".go":r.Go,".java":r.Java,".c":r.C,".h":r.C,".cpp":r.Cpp,".cc":r.Cpp,".cxx":r.Cpp,".hpp":r.Cpp}[e.toLowerCase()]??r.JavaScript}var P=[{name:"var-to-const",detect:(e,t)=>e.includes("var ")&&t.includes("const "),apply:(e,t)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,t)=>e.includes("var ")&&t.includes("let "),apply:(e,t)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,t)=>e.includes("function")&&!e.includes(":")&&t.includes(":"),apply:(e,t)=>t},{name:"async-wrapper",detect:(e,t)=>!e.includes("async")&&t.includes("async")&&t.includes("await"),apply:(e,t)=>t},{name:"try-catch-wrapper",detect:(e,t)=>!e.includes("try {")&&t.includes("try {"),apply:(e,t)=>t},{name:"null-check",detect:(e,t)=>!e.includes("if (!")&&!e.includes("if (!")&&(t.includes("if (!")||t.includes("?.")),apply:(e,t)=>t},{name:"test-assertion",detect:(e,t)=>e.includes("test(")&&!e.includes("expect(")&&t.includes("expect("),apply:(e,t)=>t}];function w(e,t){for(let n of P)if(n.detect(e,t))try{return{success:!0,code:n.apply(e,t),pattern:n.name}}catch(a){L.debug("Pattern transform failed, trying next",{pattern:n.name,error:a instanceof Error?a.message:String(a)});continue}return{success:!1,code:t}}async function S(e,t,n,a={}){let o=performance.now(),{confidenceThreshold:F=.5,allowFallback:m=!0}=a;if(!e.trim())return{success:!0,mergedCode:t,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&s)try{let c=s.WasmLanguage[C[n]],i=u.apply_edit(e,t,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(m){let f=w(e,t);if(f.success)return{success:!0,mergedCode:f.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:t,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(m){let c=w(e,t);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:t,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function E(e,t={}){return Promise.all(e.map(({original:n,edit:a,language:o})=>S(n,a,o,t)))}async function k(){return g()}async function _(){return await g()&&s?s.AgentBoosterWasm.version():"unavailable"}async function B(){if(await g(),u&&s)try{u.apply_edit("function x() {}","function x() {}",s.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var I={transform:S,batchTransform:E,isWasmAvailable:k,getVersion:_,warmup:B,Language:r,MergeStrategy:l,languageFromExtension:T};export{r as Language,l as MergeStrategy,E as batchTransform,I as default,_ as getVersion,k as isWasmAvailable,T as languageFromExtension,R as resolveWasmGlue,S as transform,B as warmup};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{a as b}from"./chunk-5WYZVSL2.js";import{a as v}from"./chunk-TIVKDIF7.js";import{c as y}from"./chunk-DS5IFRY6.js";import"./chunk-5FSPELOG.js";import"./chunk-TWBZONKT.js";import"./chunk-Z7SKUC6P.js";v();import{createRequire as A}from"module";import{existsSync as W}from"fs";import{dirname as M,join as x}from"path";import{fileURLToPath as h}from"url";var L=y.create("agent-booster-wasm"),r={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},C={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},s=null,u=null,p=null,d="agent_booster_wasm.js";function R(e=import.meta.url){let t=[x(M(h(e)),d)],n=b(e);return n&&t.push(x(n,"dist","integrations","agent-booster-wasm",d)),t.find(a=>W(a))??null}async function g(){if(s)return!0;if(p)return!1;try{let e=R();if(!e)throw new Error(`${d} not found next to the module or under dist/integrations/agent-booster-wasm/`);if(s=A(import.meta.url)(e),!s)throw new Error("WASM module loaded but is null");return u=new s.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function T(e){return{".js":r.JavaScript,".mjs":r.JavaScript,".cjs":r.JavaScript,".jsx":r.JavaScript,".ts":r.TypeScript,".tsx":r.TypeScript,".mts":r.TypeScript,".cts":r.TypeScript,".py":r.Python,".rs":r.Rust,".go":r.Go,".java":r.Java,".c":r.C,".h":r.C,".cpp":r.Cpp,".cc":r.Cpp,".cxx":r.Cpp,".hpp":r.Cpp}[e.toLowerCase()]??r.JavaScript}var P=[{name:"var-to-const",detect:(e,t)=>e.includes("var ")&&t.includes("const "),apply:(e,t)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,t)=>e.includes("var ")&&t.includes("let "),apply:(e,t)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,t)=>e.includes("function")&&!e.includes(":")&&t.includes(":"),apply:(e,t)=>t},{name:"async-wrapper",detect:(e,t)=>!e.includes("async")&&t.includes("async")&&t.includes("await"),apply:(e,t)=>t},{name:"try-catch-wrapper",detect:(e,t)=>!e.includes("try {")&&t.includes("try {"),apply:(e,t)=>t},{name:"null-check",detect:(e,t)=>!e.includes("if (!")&&!e.includes("if (!")&&(t.includes("if (!")||t.includes("?.")),apply:(e,t)=>t},{name:"test-assertion",detect:(e,t)=>e.includes("test(")&&!e.includes("expect(")&&t.includes("expect("),apply:(e,t)=>t}];function w(e,t){for(let n of P)if(n.detect(e,t))try{return{success:!0,code:n.apply(e,t),pattern:n.name}}catch(a){L.debug("Pattern transform failed, trying next",{pattern:n.name,error:a instanceof Error?a.message:String(a)});continue}return{success:!1,code:t}}async function S(e,t,n,a={}){let o=performance.now(),{confidenceThreshold:F=.5,allowFallback:m=!0}=a;if(!e.trim())return{success:!0,mergedCode:t,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&s)try{let c=s.WasmLanguage[C[n]],i=u.apply_edit(e,t,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(m){let f=w(e,t);if(f.success)return{success:!0,mergedCode:f.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:t,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(m){let c=w(e,t);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:t,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function E(e,t={}){return Promise.all(e.map(({original:n,edit:a,language:o})=>S(n,a,o,t)))}async function k(){return g()}async function _(){return await g()&&s?s.AgentBoosterWasm.version():"unavailable"}async function B(){if(await g(),u&&s)try{u.apply_edit("function x() {}","function x() {}",s.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var I={transform:S,batchTransform:E,isWasmAvailable:k,getVersion:_,warmup:B,Language:r,MergeStrategy:l,languageFromExtension:T};export{r as Language,l as MergeStrategy,E as batchTransform,I as default,_ as getVersion,k as isWasmAvailable,T as languageFromExtension,R as resolveWasmGlue,S as transform,B as warmup};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import{b as p}from"./chunk-WVXJ2QIG.js";import{a as g}from"./chunk-GV2QE5TO.js";import"./chunk-L32JNNKL.js";import"./chunk-XWIAZG3C.js";import"./chunk-XH4JMX5O.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{b as p}from"./chunk-HAQJFUAQ.js";import{a as g}from"./chunk-HVT7RMGV.js";import"./chunk-NQFDJ6BT.js";import"./chunk-CMN7PU2H.js";import"./chunk-Z7SKUC6P.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
3
3
  Agents (${a.length})
4
4
  `)),a.length===0)console.log(s.gray(" No agents found"));else{let e=new Map;for(let i of a)e.has(i.domain)||e.set(i.domain,[]),e.get(i.domain).push(i);let o=Array.from(e.entries());for(let[i,m]of o){console.log(s.cyan(` ${i}:`));for(let r of m)console.log(` ${r.id}`),console.log(` Type: ${r.type}`),console.log(` Status: ${g(r.status)}`),r.startedAt&&console.log(s.gray(` Started: ${r.startedAt.toISOString()}`));console.log("")}}}catch(a){console.error(s.red(`
5
5
  Failed to list agents:`),a),await this.cleanupAndExit(1)}}async executeSpawn(n,t,a){if(await this.ensureInitialized())try{let e=t.capabilities.split(",");console.log(s.blue(`
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import"./chunk-XH4JMX5O.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import"./chunk-Z7SKUC6P.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-OO2M2QUV.js";import"./chunk-M2YI5YUR.js";import"./chunk-45223KK6.js";import"./chunk-TDZ6N43D.js";import"./chunk-POPSZDI2.js";import"./chunk-MVVVGQJ6.js";import"./chunk-XFTX3KLE.js";import"./chunk-IKB3M7OF.js";import"./chunk-6LSZCEW2.js";import"./chunk-ERYADKMZ.js";import"./chunk-J3QFJI2Y.js";import"./chunk-SRBCBVSI.js";import"./chunk-7SNSI4VY.js";import"./chunk-4NKZU2JZ.js";import"./chunk-YMUY3TES.js";import"./chunk-XPTCQKVE.js";import"./chunk-ZGV7L4MW.js";import"./chunk-NZJVDOUN.js";import"./chunk-X5QD76IU.js";import"./chunk-IRHXGCQR.js";import"./chunk-CMN7PU2H.js";import"./chunk-YKRLUTK7.js";import"./chunk-COTQ44YO.js";import"./chunk-U5SMBJ6F.js";import"./chunk-LCWEQRZI.js";import"./chunk-2EQK7B5L.js";import"./chunk-YAJOBZE5.js";import"./chunk-4EJLHNER.js";import"./chunk-LRKLATSH.js";import"./chunk-CXCMATZ6.js";import"./chunk-ZP5AWQRO.js";import"./chunk-REY52O7J.js";import"./chunk-BSIWI4ES.js";import"./chunk-TIVKDIF7.js";import"./chunk-DS5IFRY6.js";import"./chunk-5FSPELOG.js";import"./chunk-TWBZONKT.js";import"./chunk-JHKKIJT2.js";import"./chunk-R3KBOQ3O.js";import"./chunk-GPPTRKEM.js";import"./chunk-TM75GAXG.js";import"./chunk-U4S74IIZ.js";import"./chunk-QSQNXBD2.js";import"./chunk-SFITYZLV.js";import"./chunk-J7Q5TXFZ.js";import"./chunk-VLTDW7XJ.js";import"./chunk-Z7SKUC6P.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
@@ -1,4 +1,4 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import"./chunk-XH4JMX5O.js";import*as K from"fs";import*as M from"path";function G(t){let r=t>>>0;return function(){r|=0,r=r+1831565813|0;let n=Math.imul(r^r>>>15,1|r);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function w(t,r){return Math.floor(t()*r)}var z=[["===","!=="],["!==","==="],["<=","<"],[">=",">"],["&&","||"],["||","&&"],["<","<="],[">",">="],["+","-"],["*","+"]];function H(t){let r=new Array(t.length).fill(!1),n=0,e="code";for(;n<t.length;){let s=t[n],i=t[n+1];e==="code"?(s==="'"?e="single":s==='"'?e="double":s==="`"?e="template":s==="/"&&i==="/"?e="line-comment":s==="/"&&i==="*"&&(e="block-comment"),e!=="code"&&(r[n]=!0)):(r[n]=!0,e==="single"&&s==="'"&&t[n-1]!=="\\"||e==="double"&&s==='"'&&t[n-1]!=="\\"||e==="template"&&s==="`"&&t[n-1]!=="\\"||e==="line-comment"&&s===`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import"./chunk-Z7SKUC6P.js";import*as K from"fs";import*as M from"path";function G(t){let r=t>>>0;return function(){r|=0,r=r+1831565813|0;let n=Math.imul(r^r>>>15,1|r);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function w(t,r){return Math.floor(t()*r)}var z=[["===","!=="],["!==","==="],["<=","<"],[">=",">"],["&&","||"],["||","&&"],["<","<="],[">",">="],["+","-"],["*","+"]];function H(t){let r=new Array(t.length).fill(!1),n=0,e="code";for(;n<t.length;){let s=t[n],i=t[n+1];e==="code"?(s==="'"?e="single":s==='"'?e="double":s==="`"?e="template":s==="/"&&i==="/"?e="line-comment":s==="/"&&i==="*"&&(e="block-comment"),e!=="code"&&(r[n]=!0)):(r[n]=!0,e==="single"&&s==="'"&&t[n-1]!=="\\"||e==="double"&&s==='"'&&t[n-1]!=="\\"||e==="template"&&s==="`"&&t[n-1]!=="\\"||e==="line-comment"&&s===`
3
3
  `?e="code":e==="block-comment"&&s==="*"&&i==="/"&&(r[n+1]=!0,n++,e="code")),n++}return r}function E(t,r){let n=1;for(let e=0;e<r;e++)t[e]===`
4
4
  `&&n++;return n}function A(t,r){let n=H(t),e=new Array(t.length).fill(!1),s=[];for(let[i,c]of z){let a=t.indexOf(i);for(;a!==-1;){let u=a+i.length,y=e.slice(a,u).some(Boolean),h=n.slice(a,u).some(Boolean),v=i===">"&&t[a-1]==="=",S=(i==="<"||i===">")&&(t[u]==="="||t[a-1]==="<"||t[a-1]===">");if(!y&&!h&&!v&&!S){for(let d=a;d<u;d++)e[d]=!0;s.push({id:`${r}:${E(t,a)}:${a}:${i}->${c}`,index:a,from:i,to:c,line:E(t,a)})}a=t.indexOf(i,a+1)}}return s.sort((i,c)=>i.index-c.index)}function W(t,r){return t.slice(0,r.index)+r.to+t.slice(r.index+r.from.length)}import*as m from"fs";import*as f from"path";import*as L from"os";import{spawnSync as J}from"child_process";function I(t){let r=f.resolve(t),n=f.join(r,"src"),e=f.join(r,"tests");if(!m.existsSync(n)||!m.existsSync(e))throw new Error(`not an arena fixture (expected src/ and tests/): ${r}`);let s=m.readdirSync(n).filter(c=>c.endsWith(".mjs")).sort().map(c=>f.join("src",c)),i={};for(let c of m.readdirSync(e).filter(a=>a.endsWith(".test.mjs")).sort())i[c.replace(".test.mjs","")]=f.join("tests",c);if(s.length===0||Object.keys(i).length===0)throw new Error(`fixture has no src/*.mjs or tests/*.test.mjs: ${r}`);return{root:r,sourceFiles:s,testGroups:i}}function T(t,r){let n=m.mkdtempSync(f.join(r,"arena-ws-"));m.mkdirSync(f.join(n,"src"),{recursive:!0}),m.mkdirSync(f.join(n,"tests"),{recursive:!0});for(let e of t.layout.sourceFiles){let s=t.mutatedFile&&t.mutatedFile.relPath===e?t.mutatedFile.content:m.readFileSync(f.join(t.layout.root,e),"utf8");m.writeFileSync(f.join(n,e),s)}for(let e of t.groups){let s=t.layout.testGroups[e];m.copyFileSync(f.join(t.layout.root,s),f.join(n,s))}return n}function $(t,r={}){let n=["--test"];r.coverage&&n.push("--experimental-test-coverage");let e=m.readdirSync(f.join(t,"tests")).filter(u=>u.endsWith(".test.mjs")).sort().map(u=>f.join("tests",u));n.push(...e);let s=process.hrtime.bigint(),i=J(process.execPath,n,{cwd:t,timeout:r.timeoutMs??12e4,encoding:"utf8"}),c=Number(process.hrtime.bigint()-s)/1e6,a=null;if(r.coverage){let u=/all files\s*\|\s*([\d.]+)/.exec(i.stdout??"");a=u?Number(u[1]):null}return{ok:i.status===0,durationMs:Math.round(c),coveragePct:a}}function N(){return m.mkdtempSync(f.join(L.tmpdir(),"qe-arena-"))}function B(t){m.rmSync(t,{recursive:!0,force:!0})}var k={kill:.6,coverage:.3,runtimePenalty:.1};function Q(t,r,n){let e=[...t].sort(),s=new Set([e.join("+")]),i=[{id:"s1",name:`all(${e.join("+")})`,groups:e}],c=0;for(;i.length<r&&c++<200;){let a=e.filter(()=>n()<.5);if(a.length===0)continue;let u=a.join("+");s.has(u)||(s.add(u),i.push({id:`s${i.length+1}`,name:u,groups:a}))}return i}function C(t,r,n){let e=r===null?0:r/100,s=k.kill*t+k.coverage*e-k.runtimePenalty*n;return Math.round(s*1e4)/1e4}function D(t,r,n,e){let s=T({layout:t,groups:r.groups},e),i=$(s,{coverage:!0});if(!i.ok)return{baselinePassed:!1,killed:0,total:0,coveragePct:i.coveragePct,runtimeMs:i.durationMs};let c=0,a=0;for(let u of n)for(let y of u.mutants){a++;let h=T({layout:t,groups:r.groups,mutatedFile:{relPath:u.relPath,content:W(u.source,y)}},e);$(h).ok||c++}return{baselinePassed:!0,killed:c,total:a,coveragePct:i.coveragePct,runtimeMs:i.durationMs}}function rt(t){let r=t.seed??42,n=t.log??(()=>{}),e=G(r),s=I(t.target),i=N();try{let c=t.maxMutants??24,a=s.sourceFiles.map(l=>{let o=K.readFileSync(M.join(s.root,l),"utf8");return{relPath:l,source:o,mutants:A(o,l)}}),u=a.flatMap(l=>l.mutants.map(o=>({file:l.relPath,m:o})));if(u.length>c){let l=new Set;for(;l.size<c;)l.add(u[w(e,u.length)].m.id);for(let o of a)o.mutants=o.mutants.filter(p=>l.has(p.id));u=a.flatMap(o=>o.mutants.map(p=>({file:o.relPath,m:p})))}n(`mutants: ${u.length} (of ${a.reduce((l,o)=>l+A(o.source,o.relPath).length,0)} enumerated)`);let y=Q(Object.keys(s.testGroups),t.strategies??4,e),h={},v=y.map(l=>{n(`evaluating ${l.id} [${l.name}] ...`);let o=D(s,l,a,i);return h[l.id]=o.runtimeMs,{s:l,e:o}}),S=Object.keys(s.testGroups).length,d=v.map(({s:l,e:o})=>{let p=o.total>0?Math.round(o.killed/o.total*1e4)/1e4:0,g=Math.round(l.groups.length/S*1e4)/1e4;return{...l,baselinePassed:o.baselinePassed,mutantsKilled:o.killed,mutantsTotal:o.total,killRate:p,coveragePct:o.coveragePct,suiteCostRatio:g,fitness:o.baselinePassed?C(p,o.coveragePct,g):0}}),P=[...d].sort((l,o)=>o.fitness-l.fitness||l.id.localeCompare(o.id)).map(l=>l.id),U=d.map(l=>d.map(o=>l.fitness>o.fitness?1:l.fitness<o.fitness?-1:0)),j=[];if(t.evolveSteps&&t.evolveSteps>0){let l=Object.keys(s.testGroups).sort(),o=d.find(g=>g.id===P[0]).groups,p=d.find(g=>g.id===P[0]).fitness;for(let g=1;g<=t.evolveSteps;g++){let R=l[w(e,l.length)],b=o.includes(R)?o.filter(q=>q!==R):[...o,R].sort();if(b.length===0){j.push({step:g,groups:b,fitness:0,accepted:!1});continue}let x=D(s,{id:`evo${g}`,name:b.join("+"),groups:b},a,i),_=x.total>0?x.killed/x.total:0,F=x.baselinePassed?C(_,x.coveragePct,b.length/l.length):0,O=F>p;j.push({step:g,groups:b,fitness:F,accepted:O}),O&&(o=b,p=F)}}return{contract:"arena-result@1",seed:r,target:M.relative(process.cwd(),s.root)||".",weights:{...k},mutantsTotal:u.length,strategies:d,ranking:P,competitiveArray:U,evolution:j,informational:{runtimesMs:h}}}finally{B(i)}}export{Q as buildStrategies,rt as runArena};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import{a as c,e as f}from"./chunk-HL2ANKN3.js";import"./chunk-XH4JMX5O.js";f();import{Command as $}from"commander";import r from"chalk";function x(v,g,p){let m=new $("arena").description("Competitive test-strategy tournaments (ADR-104)").addHelpText("after",`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{a as c,e as f}from"./chunk-J7Q5TXFZ.js";import"./chunk-Z7SKUC6P.js";f();import{Command as $}from"commander";import r from"chalk";function x(v,g,p){let m=new $("arena").description("Competitive test-strategy tournaments (ADR-104)").addHelpText("after",`
3
3
  Examples:
4
4
  # Run a 4-strategy tournament against the demo fixture (reproducible under --seed)
5
5
  aqe arena run --strategies 4 --target fixtures/arena-demo --seed 42
@@ -9,10 +9,10 @@ Examples:
9
9
 
10
10
  # List persisted runs
11
11
  aqe arena list
12
- `);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-IQ5ZZDRF.js"),t=i({target:a.target,strategies:parseInt(a.strategies,10),seed:parseInt(a.seed,10),maxMutants:parseInt(a.maxMutants,10),evolveSteps:parseInt(a.evolve,10),log:a.json?()=>{}:e=>console.error(r.dim(` ${e}`))});try{let{getUnifiedMemory:e}=await import("./unified-memory-FZ5K2C7W.js"),s=e();s.isInitialized()||await s.initialize(),s.getDatabase().prepare("INSERT OR REPLACE INTO kv_store (namespace, key, value) VALUES ('arena', ?, ?)").run(`run:${t.seed}:${t.target}`,JSON.stringify(t))}catch(e){console.error(r.dim(` note: run not persisted (${c(e)})`))}if(a.json){console.log(JSON.stringify(t,null,2));return}let d=new Map(t.strategies.map(e=>[e.id,e]));console.log(r.blue(`
12
+ `);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-7OKPMNHD.js"),t=i({target:a.target,strategies:parseInt(a.strategies,10),seed:parseInt(a.seed,10),maxMutants:parseInt(a.maxMutants,10),evolveSteps:parseInt(a.evolve,10),log:a.json?()=>{}:e=>console.error(r.dim(` ${e}`))});try{let{getUnifiedMemory:e}=await import("./unified-memory-2VMGSGQL.js"),s=e();s.isInitialized()||await s.initialize(),s.getDatabase().prepare("INSERT OR REPLACE INTO kv_store (namespace, key, value) VALUES ('arena', ?, ?)").run(`run:${t.seed}:${t.target}`,JSON.stringify(t))}catch(e){console.error(r.dim(` note: run not persisted (${c(e)})`))}if(a.json){console.log(JSON.stringify(t,null,2));return}let d=new Map(t.strategies.map(e=>[e.id,e]));console.log(r.blue(`
13
13
  Arena: ${t.target} \xB7 seed ${t.seed} \xB7 ${t.mutantsTotal} mutants
14
14
  `)),console.log(" rank id kill-rate coverage cost fitness groups"),t.ranking.forEach((e,s)=>{let n=d.get(e),u=n.coveragePct===null?" n/a":`${n.coveragePct.toFixed(2)}%`.padStart(7);console.log(` ${String(s+1).padEnd(5)}${n.id.padEnd(5)}${(n.killRate*100).toFixed(1).padStart(6)}% ${u} ${n.suiteCostRatio.toFixed(2).padEnd(6)}${n.fitness.toFixed(4).padEnd(9)}${n.name}`+(n.baselinePassed?"":r.red(" [baseline FAILED]")))}),console.log(`
15
15
  competitive array (row beats column = 1):`);let o=t.strategies.map(e=>e.id);if(console.log(` ${o.map(e=>e.padEnd(4)).join("")}`),t.competitiveArray.forEach((e,s)=>{console.log(` ${o[s].padEnd(4)}${e.map(n=>String(n).padStart(2).padEnd(4)).join("")}`)}),t.evolution.length>0){console.log(`
16
16
  evolution:`);for(let e of t.evolution)console.log(` step ${e.step}: [${e.groups.join("+")}] fitness ${e.fitness.toFixed(4)} ${e.accepted?r.green("accepted"):"rejected"}`)}let l=d.get(t.ranking[0]);console.log(r.green(`
17
17
  winner: ${l.id} [${l.name}] \u2014 kill ${(l.killRate*100).toFixed(1)}%, fitness ${l.fitness.toFixed(4)}
18
- `))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-FZ5K2C7W.js"),t=i();t.isInitialized()||await t.initialize();let d=t.getDatabase().prepare("SELECT key, value FROM kv_store WHERE namespace = 'arena' ORDER BY key").all();if(a.json){console.log(JSON.stringify(d.map(o=>({key:o.key,result:JSON.parse(o.value)})),null,2));return}if(d.length===0){console.log(r.yellow(" no persisted arena runs"));return}for(let o of d){let l=JSON.parse(o.value),e=l.strategies.find(s=>s.id===l.ranking[0]);console.log(` ${r.green(o.key)} \u2014 winner ${e?.id} [${e?.name}] fitness ${e?.fitness}`)}}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m}export{x as createArenaCommand};
18
+ `))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-2VMGSGQL.js"),t=i();t.isInitialized()||await t.initialize();let d=t.getDatabase().prepare("SELECT key, value FROM kv_store WHERE namespace = 'arena' ORDER BY key").all();if(a.json){console.log(JSON.stringify(d.map(o=>({key:o.key,result:JSON.parse(o.value)})),null,2));return}if(d.length===0){console.log(r.yellow(" no persisted arena runs"));return}for(let o of d){let l=JSON.parse(o.value),e=l.strategies.find(s=>s.id===l.ranking[0]);console.log(` ${r.green(o.key)} \u2014 winner ${e?.id} [${e?.name}] fitness ${e?.fitness}`)}}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m}export{x as createArenaCommand};
@@ -1,4 +1,4 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import{d as g,e as y,f as k,g as w}from"./chunk-QRKTBSZT.js";import{v as x}from"./chunk-T66PPF4D.js";import"./chunk-337Z52QM.js";import"./chunk-XWIAZG3C.js";import"./chunk-5G4UFTV4.js";import"./chunk-DEKR3CTS.js";import"./chunk-4X3SWKBA.js";import"./chunk-W62OOK7A.js";import"./chunk-GCHYOPRZ.js";import"./chunk-DKX4GNRU.js";import"./chunk-PXATBHWN.js";import"./chunk-5I7357KS.js";import"./chunk-G242G224.js";import"./chunk-3HVFIITW.js";import"./chunk-BQ47GQPK.js";import"./chunk-ZWBGYJ7K.js";import"./chunk-UJABDXST.js";import"./chunk-6YVMX2TC.js";import{c as l}from"./chunk-SZAZQZWI.js";import"./chunk-MPFPWJTH.js";import"./chunk-FOOW4JVS.js";import"./chunk-HL2ANKN3.js";import{p as F,q as j}from"./chunk-BZULJMGH.js";import{f as v}from"./chunk-XH4JMX5O.js";import{Command as E}from"commander";import s from"chalk";x();import{existsSync as f}from"node:fs";import p from"node:path";function b(e,a,n){let t=[];t.push(s.bold("Witness Chain Audit Verification")),t.push("");let r=a?s.green("ENABLED"):s.yellow("DISABLED");t.push(` Feature Flag: ${r}`),t.push(` Chain Length: ${e.length} receipts`);let o=n?.status==="forked"?s.yellow("FORKED (no tampering detected)"):e.valid?s.green(n?.status==="valid-with-forks"?"VALID (forks re-anchored)":"VALID"):s.red(n?.status==="tampered"?"BROKEN (tampering detected)":"BROKEN");t.push(` Integrity: ${o}`),e.length>0&&t.push(` Last Hash: ${e.lastHash.slice(0,16)}...`);let i=n?.forks?.length??0;if(i>0){let d=n?.acknowledgedForks?.length??0;t.push(` Forks: ${i} accidental (pre-3.14.5 concurrent writes, #753), ${d} re-anchored`)}if(n?.status==="forked")t.push(""),t.push(s.yellow(` ${e.message}`));else if(!e.valid&&e.brokenAt>=0){t.push("");let d=n?.status==="tampered"&&n.tamperedAt!==void 0?n.tamperedAt:e.brokenAt;t.push(s.red(` Break detected at index ${d}${n?.tamperReason?` (${n.tamperReason})`:""}`)),t.push(s.red(` ${e.message}`))}else e.valid&&i>0&&(t.push(""),t.push(s.green(` ${e.message}`)));return t.push(""),t.join(`
3
- `)}function O(){try{let e=l(),a=p.join(e,".agentic-qe","memory.db");if(!f(a))return null;let n=(j(),v(F)),t=new n(a),r=g(t),o=k(r);return t.close(),o}catch{return null}}async function P(e){let a=w(),t=(O()??y()).verifyChain(),r={featureEnabled:a,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return e.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(b(t,a)),r}async function L(e){let{WitnessChain:a,hashWith:n,serializeEntry:t}=await import("./witness-chain-WWHJKITG.js"),{dbPath:r,keyDir:o}=R(),i;if(!f(r))i={featureEnabled:!0,chainLength:0,integrity:!0,brokenAt:-1,lastHash:"",message:`No database found at ${r} \u2014 nothing to verify`};else{let{default:d}=await import("./better-sqlite3-IKDKJ2IE.js"),u=new d(r,{readonly:!0});try{let m=new a(u,await A(o)??void 0);await m.initialize();let c=m.verify({includeArchive:!0,checkSignatures:!1}),{tableExists:C}=await import("./witness-chain-verifier-MIDWD4JS.js"),h=C(u,"witness_chain")?u.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get():void 0,$=h?n(h.hash_algo||"sha256",t(h)):"";i={featureEnabled:!0,chainLength:c.entriesChecked,integrity:c.valid,brokenAt:c.brokenAt??-1,lastHash:$,message:V(c),status:c.status,tampered:c.tampered,...c.tamperedAt!==void 0?{tamperedAt:c.tamperedAt}:{},...c.tamperReason?{tamperReason:c.tamperReason}:{},forks:c.forks,acknowledgedForks:c.acknowledgedForks}}finally{u.close()}}return e.format==="json"?console.log(JSON.stringify(i,null,2)):console.log(b({valid:i.integrity,length:i.chainLength,brokenAt:i.brokenAt,lastHash:i.lastHash,message:i.message},i.featureEnabled,i)),i}function R(){let e=l();return{dbPath:p.join(e,".agentic-qe","memory.db"),keyDir:p.join(e,".agentic-qe","witness-keys")}}async function A(e){if(!f(e))return null;let{WitnessKeyManager:a}=await import("./witness-key-manager-OSVCWOB2.js");return new a({keyDir:e,autoGenerate:!1})}function V(e){let a=e.entriesChecked,n=e.forks.length,t=n-e.acknowledgedForks.length;switch(e.status){case"valid":return`Audit chain verified: ${a} entries checked, ${e.signatureFailures??0} signature failures`;case"valid-with-forks":return`Audit chain verified: ${a} entries checked; ${n} accidental fork(s) from pre-3.14.5 concurrent writes are re-anchored by CHAIN_REANCHOR, no tampering detected`;case"forked":return`${t} accidental fork(s) (pre-3.14.5 concurrent writes, #753), no tampering detected \u2014 ${a} entries checked, first fork at id=${e.brokenAt}. Run \`aqe audit repair --chain audit\` to back up the store and re-anchor.`;default:return`Audit chain BROKEN: tampering detected at id=${e.tamperedAt} (${e.tamperReason}); ${a} entries checked`+(n>0?`, ${n} accidental fork(s) found before it`:"")}}function W(e){return e.action==="refused"?!0:e.action==="reanchored"&&!(e.after?.status==="valid"||e.after?.status==="valid-with-forks")}async function D(e){let{repairWitnessChainForks:a}=await import("./witness-chain-repair-5SAXPETG.js"),{dbPath:n,keyDir:t}=R(),r=e.dryRun===!0,o;if(f(n)){let{openDatabase:i}=await import("./safe-db-ZS2QKANY.js"),d=i(n,{readonly:r,fileMustExist:!0});try{let u=r?await A(t):(await import("./witness-key-manager-OSVCWOB2.js")).getDefaultWitnessKeyManager();o=await a(d,{dbPath:n,dryRun:r,keyManager:u})}finally{d.close()}}else{let i={status:"valid",entriesChecked:0,forks:0,unacknowledgedForks:0};o={action:"none",dryRun:r,message:`No database found at ${n} \u2014 nothing to repair`,before:i,rowsBefore:{live:0,archive:0},rowsAfter:{live:0,archive:0},forksAcknowledged:[]}}return e.format==="json"?console.log(JSON.stringify(o,null,2)):console.log(S(o)),o}function S(e){let a=e.action==="refused"?s.red:e.action==="reanchored"?s.green:s.yellow,n=[s.bold("Witness Chain Audit Repair"),"",` Action: ${a(e.action.toUpperCase())}${e.dryRun?" (dry run)":""}`,` Before: ${e.before.status}, ${e.before.forks} fork(s), ${e.before.unacknowledgedForks} unacknowledged`,` Rows: live ${e.rowsBefore.live} -> ${e.rowsAfter.live}, archive ${e.rowsBefore.archive} -> ${e.rowsAfter.archive}`];return e.after&&n.push(` After: ${e.after.status}`),e.backupPath&&n.push(` Backup: ${e.backupPath}`),n.push("",` ${a(e.message)}`,""),n.join(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{d as g,e as y,f as k,g as w}from"./chunk-LN7NKE3N.js";import{C as x}from"./chunk-NZJVDOUN.js";import"./chunk-X5QD76IU.js";import"./chunk-IRHXGCQR.js";import"./chunk-CMN7PU2H.js";import"./chunk-YKRLUTK7.js";import"./chunk-COTQ44YO.js";import"./chunk-U5SMBJ6F.js";import"./chunk-LCWEQRZI.js";import"./chunk-2EQK7B5L.js";import"./chunk-YAJOBZE5.js";import"./chunk-LRKLATSH.js";import"./chunk-ZP5AWQRO.js";import"./chunk-BSIWI4ES.js";import"./chunk-TIVKDIF7.js";import"./chunk-DS5IFRY6.js";import"./chunk-5FSPELOG.js";import"./chunk-TWBZONKT.js";import"./chunk-JHKKIJT2.js";import{c as l}from"./chunk-GPPTRKEM.js";import"./chunk-TM75GAXG.js";import"./chunk-SFITYZLV.js";import"./chunk-J7Q5TXFZ.js";import{p as F,q as j}from"./chunk-VLTDW7XJ.js";import{f as v}from"./chunk-Z7SKUC6P.js";import{Command as E}from"commander";import s from"chalk";x();import{existsSync as f}from"node:fs";import p from"node:path";function b(e,a,n){let t=[];t.push(s.bold("Witness Chain Audit Verification")),t.push("");let r=a?s.green("ENABLED"):s.yellow("DISABLED");t.push(` Feature Flag: ${r}`),t.push(` Chain Length: ${e.length} receipts`);let o=n?.status==="forked"?s.yellow("FORKED (no tampering detected)"):e.valid?s.green(n?.status==="valid-with-forks"?"VALID (forks re-anchored)":"VALID"):s.red(n?.status==="tampered"?"BROKEN (tampering detected)":"BROKEN");t.push(` Integrity: ${o}`),e.length>0&&t.push(` Last Hash: ${e.lastHash.slice(0,16)}...`);let i=n?.forks?.length??0;if(i>0){let d=n?.acknowledgedForks?.length??0;t.push(` Forks: ${i} accidental (pre-3.14.5 concurrent writes, #753), ${d} re-anchored`)}if(n?.status==="forked")t.push(""),t.push(s.yellow(` ${e.message}`));else if(!e.valid&&e.brokenAt>=0){t.push("");let d=n?.status==="tampered"&&n.tamperedAt!==void 0?n.tamperedAt:e.brokenAt;t.push(s.red(` Break detected at index ${d}${n?.tamperReason?` (${n.tamperReason})`:""}`)),t.push(s.red(` ${e.message}`))}else e.valid&&i>0&&(t.push(""),t.push(s.green(` ${e.message}`)));return t.push(""),t.join(`
3
+ `)}function O(){try{let e=l(),a=p.join(e,".agentic-qe","memory.db");if(!f(a))return null;let n=(j(),v(F)),t=new n(a),r=g(t),o=k(r);return t.close(),o}catch{return null}}async function P(e){let a=w(),t=(O()??y()).verifyChain(),r={featureEnabled:a,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return e.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(b(t,a)),r}async function L(e){let{WitnessChain:a,hashWith:n,serializeEntry:t}=await import("./witness-chain-5QRT7EMX.js"),{dbPath:r,keyDir:o}=R(),i;if(!f(r))i={featureEnabled:!0,chainLength:0,integrity:!0,brokenAt:-1,lastHash:"",message:`No database found at ${r} \u2014 nothing to verify`};else{let{default:d}=await import("./better-sqlite3-YO5X7ZJS.js"),u=new d(r,{readonly:!0});try{let m=new a(u,await A(o)??void 0);await m.initialize();let c=m.verify({includeArchive:!0,checkSignatures:!1}),{tableExists:C}=await import("./witness-chain-verifier-JB42X62J.js"),h=C(u,"witness_chain")?u.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get():void 0,$=h?n(h.hash_algo||"sha256",t(h)):"";i={featureEnabled:!0,chainLength:c.entriesChecked,integrity:c.valid,brokenAt:c.brokenAt??-1,lastHash:$,message:V(c),status:c.status,tampered:c.tampered,...c.tamperedAt!==void 0?{tamperedAt:c.tamperedAt}:{},...c.tamperReason?{tamperReason:c.tamperReason}:{},forks:c.forks,acknowledgedForks:c.acknowledgedForks}}finally{u.close()}}return e.format==="json"?console.log(JSON.stringify(i,null,2)):console.log(b({valid:i.integrity,length:i.chainLength,brokenAt:i.brokenAt,lastHash:i.lastHash,message:i.message},i.featureEnabled,i)),i}function R(){let e=l();return{dbPath:p.join(e,".agentic-qe","memory.db"),keyDir:p.join(e,".agentic-qe","witness-keys")}}async function A(e){if(!f(e))return null;let{WitnessKeyManager:a}=await import("./witness-key-manager-LXXO6L2G.js");return new a({keyDir:e,autoGenerate:!1})}function V(e){let a=e.entriesChecked,n=e.forks.length,t=n-e.acknowledgedForks.length;switch(e.status){case"valid":return`Audit chain verified: ${a} entries checked, ${e.signatureFailures??0} signature failures`;case"valid-with-forks":return`Audit chain verified: ${a} entries checked; ${n} accidental fork(s) from pre-3.14.5 concurrent writes are re-anchored by CHAIN_REANCHOR, no tampering detected`;case"forked":return`${t} accidental fork(s) (pre-3.14.5 concurrent writes, #753), no tampering detected \u2014 ${a} entries checked, first fork at id=${e.brokenAt}. Run \`aqe audit repair --chain audit\` to back up the store and re-anchor.`;default:return`Audit chain BROKEN: tampering detected at id=${e.tamperedAt} (${e.tamperReason}); ${a} entries checked`+(n>0?`, ${n} accidental fork(s) found before it`:"")}}function W(e){return e.action==="refused"?!0:e.action==="reanchored"&&!(e.after?.status==="valid"||e.after?.status==="valid-with-forks")}async function D(e){let{repairWitnessChainForks:a}=await import("./witness-chain-repair-CUF2AFQB.js"),{dbPath:n,keyDir:t}=R(),r=e.dryRun===!0,o;if(f(n)){let{openDatabase:i}=await import("./safe-db-RZPQGLGQ.js"),d=i(n,{readonly:r,fileMustExist:!0});try{let u=r?await A(t):(await import("./witness-key-manager-LXXO6L2G.js")).getDefaultWitnessKeyManager();o=await a(d,{dbPath:n,dryRun:r,keyManager:u})}finally{d.close()}}else{let i={status:"valid",entriesChecked:0,forks:0,unacknowledgedForks:0};o={action:"none",dryRun:r,message:`No database found at ${n} \u2014 nothing to repair`,before:i,rowsBefore:{live:0,archive:0},rowsAfter:{live:0,archive:0},forksAcknowledged:[]}}return e.format==="json"?console.log(JSON.stringify(o,null,2)):console.log(S(o)),o}function S(e){let a=e.action==="refused"?s.red:e.action==="reanchored"?s.green:s.yellow,n=[s.bold("Witness Chain Audit Repair"),"",` Action: ${a(e.action.toUpperCase())}${e.dryRun?" (dry run)":""}`,` Before: ${e.before.status}, ${e.before.forks} fork(s), ${e.before.unacknowledgedForks} unacknowledged`,` Rows: live ${e.rowsBefore.live} -> ${e.rowsAfter.live}, archive ${e.rowsBefore.archive} -> ${e.rowsAfter.archive}`];return e.after&&n.push(` After: ${e.after.status}`),e.backupPath&&n.push(` Backup: ${e.backupPath}`),n.push("",` ${a(e.message)}`,""),n.join(`
4
4
  `)}function q(e,a,n){let t=new E("audit").description("Witness chain audit trail management");return t.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").option("-C, --chain <chain>","Which chain to verify: governance (29 decision receipts) or audit (full QE audit trail)","governance").action(async r=>{try{let o=r.format,i=r.chain==="audit"?await L({format:o}):await P({format:o});await a(i.integrity?0:1)}catch(o){console.error("Failed to verify witness chain:",o),await a(1)}}),t.command("repair").description("Re-anchor accidental pre-3.14.5 forks in the audit chain (#753); backs up first, refuses on tampering").option("-C, --chain <chain>",'Chain to repair (only "audit" is supported)',"audit").option("--dry-run","Report what would be done without writing anything",!1).option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{if(r.chain!=="audit"){console.error(`aqe audit repair supports only --chain audit (got "${r.chain}")`),await a(1);return}let o=await D({format:r.format,dryRun:r.dryRun===!0});await a(W(o)?1:0)}catch(o){console.error("Failed to repair witness chain:",o),await a(1)}}),t}export{q as createAuditCommand,b as formatVerificationText,D as handleAuditChainRepair,L as handleAuditChainVerify,P as handleAuditVerify};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-AVHYJ3XP.js";import"./chunk-EUWG2JG4.js";import"./chunk-UHJVZEQA.js";import"./chunk-XPTCQKVE.js";import"./chunk-NZJVDOUN.js";import"./chunk-X5QD76IU.js";import"./chunk-IRHXGCQR.js";import"./chunk-CMN7PU2H.js";import"./chunk-YKRLUTK7.js";import"./chunk-COTQ44YO.js";import"./chunk-U5SMBJ6F.js";import"./chunk-LCWEQRZI.js";import"./chunk-2EQK7B5L.js";import"./chunk-YAJOBZE5.js";import"./chunk-LRKLATSH.js";import"./chunk-ZP5AWQRO.js";import"./chunk-BSIWI4ES.js";import"./chunk-TIVKDIF7.js";import"./chunk-DS5IFRY6.js";import"./chunk-5FSPELOG.js";import"./chunk-TWBZONKT.js";import"./chunk-JHKKIJT2.js";import"./chunk-GPPTRKEM.js";import"./chunk-TM75GAXG.js";import"./chunk-SFITYZLV.js";import"./chunk-J7Q5TXFZ.js";import"./chunk-VLTDW7XJ.js";import"./chunk-Z7SKUC6P.js";export{l as MCPToolBase,k as defaultToolLogger,j as getKernel,i as getLLMRouter,e as getMemoryBackend,g as getSharedLLMRouter,c as getSharedMemoryBackend,a as isMemoryOnlyMode,b as registerRvfResetFn,h as resetSharedLLMRouter,d as resetSharedMemoryBackend,f as setSharedLLMRouter};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-BZULJMGH.js";import"./chunk-XH4JMX5O.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-VLTDW7XJ.js";import"./chunk-Z7SKUC6P.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import{a as P,b as z,c as G,d as C,e as fe,f as U,g as X,h as N,i as me,j as ue,k as Q,l as De,m as K,n as pe,o as Te,p as j,q as Y,r as Z,s as ee,t as ne}from"./chunk-MV55NXTD.js";import{c as $e}from"./chunk-TODNOP7C.js";import{b as Ne}from"./chunk-2ZFLULL4.js";import{a as ke,d as de,e as Ae}from"./chunk-ERN56H6S.js";import"./chunk-T66PPF4D.js";import"./chunk-337Z52QM.js";import{b as $,d as ce}from"./chunk-XWIAZG3C.js";import"./chunk-5G4UFTV4.js";import"./chunk-DEKR3CTS.js";import"./chunk-4X3SWKBA.js";import"./chunk-W62OOK7A.js";import"./chunk-GCHYOPRZ.js";import"./chunk-DKX4GNRU.js";import"./chunk-PXATBHWN.js";import"./chunk-5I7357KS.js";import"./chunk-G242G224.js";import"./chunk-3HVFIITW.js";import"./chunk-BQ47GQPK.js";import"./chunk-ZWBGYJ7K.js";import"./chunk-UJABDXST.js";import"./chunk-6YVMX2TC.js";import"./chunk-SZAZQZWI.js";import"./chunk-MPFPWJTH.js";import{a as Ie,b as Oe,c as H,d as W,f as pn}from"./chunk-T4GE7MPI.js";import{d as q,e as gn}from"./chunk-FOOW4JVS.js";import"./chunk-HL2ANKN3.js";import"./chunk-BZULJMGH.js";import"./chunk-XH4JMX5O.js";import M from"path";import o from"chalk";gn();ce();import{existsSync as re,mkdirSync as yn,writeFileSync as bn,readFileSync as ge}from"fs";import{join as T,resolve as ye}from"path";function te(e,n){let r="shake256",t=JSON.stringify(n),a=e.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get(),i=a?de(r,Ae(a)):ke;e.prepare(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import{a as P,b as z,c as G,d as C,e as fe,f as U,g as X,h as N,i as me,j as ue,k as Q,l as De,m as K,n as pe,o as Te,p as j,q as Y,r as Z,s as ee,t as ne}from"./chunk-AGCS5GSO.js";import{c as $e}from"./chunk-J3QFJI2Y.js";import{b as Ne}from"./chunk-SRBCBVSI.js";import{a as ke,d as de,e as Ae}from"./chunk-7SNSI4VY.js";import"./chunk-NZJVDOUN.js";import"./chunk-X5QD76IU.js";import"./chunk-IRHXGCQR.js";import{b as $,d as ce}from"./chunk-CMN7PU2H.js";import"./chunk-YKRLUTK7.js";import"./chunk-COTQ44YO.js";import"./chunk-U5SMBJ6F.js";import"./chunk-LCWEQRZI.js";import"./chunk-2EQK7B5L.js";import"./chunk-YAJOBZE5.js";import"./chunk-LRKLATSH.js";import"./chunk-ZP5AWQRO.js";import"./chunk-BSIWI4ES.js";import"./chunk-TIVKDIF7.js";import"./chunk-DS5IFRY6.js";import"./chunk-5FSPELOG.js";import"./chunk-TWBZONKT.js";import"./chunk-JHKKIJT2.js";import"./chunk-GPPTRKEM.js";import"./chunk-TM75GAXG.js";import{a as Ie,b as Oe,c as H,d as W,f as pn}from"./chunk-QSQNXBD2.js";import{d as q,e as gn}from"./chunk-SFITYZLV.js";import"./chunk-J7Q5TXFZ.js";import"./chunk-VLTDW7XJ.js";import"./chunk-Z7SKUC6P.js";import M from"path";import o from"chalk";gn();ce();import{existsSync as re,mkdirSync as yn,writeFileSync as bn,readFileSync as ge}from"fs";import{join as T,resolve as ye}from"path";function te(e,n){let r="shake256",t=JSON.stringify(n),a=e.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get(),i=a?de(r,Ae(a)):ke;e.prepare(`
3
3
  INSERT INTO witness_chain
4
4
  (prev_hash, action_hash, action_type, action_data, timestamp, actor, hash_algo)
5
5
  VALUES (?, ?, 'BRAIN_IMPORT', ?, ?, 'brain-import', ?)
@@ -80,7 +80,7 @@ Examples:
80
80
  aqe brain diff ./brain-a ./brain-b --verbose
81
81
  aqe brain search -i ./brain-export --query oauth --domain test-generation
82
82
  aqe brain search -i ./brain-export --since 2026-03-01 --limit 50 --json
83
- `}};async function _e(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-FZ5K2C7W.js");return M.join(n(),".agentic-qe","memory.db")}function dn(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function rt(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function ot(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let i=a.trim();i&&r.push(i)}return r.length>0?r:void 0}function at(e,n){console.log(o.blue(`
83
+ `}};async function _e(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-2VMGSGQL.js");return M.join(n(),".agentic-qe","memory.db")}function dn(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function rt(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function ot(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let i=a.trim();i&&r.push(i)}return r.length>0?r:void 0}function at(e,n){console.log(o.blue(`
84
84
  Brain Diff
85
85
  `)),console.log(` A: ${o.cyan(e.pathA)} (${e.formatA})`),console.log(` B: ${o.cyan(e.pathB)} (${e.formatB})`),console.log(` Versions: ${o.cyan(e.manifestA.version)} \u2192 ${o.cyan(e.manifestB.version)}`+(e.versionMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Checksums: ${o.gray(e.manifestA.checksum.slice(0,12))}\u2026 \u2192 ${o.gray(e.manifestB.checksum.slice(0,12))}\u2026`+(e.checksumMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Exported: ${o.gray(e.manifestA.exportedAt)} \u2192 ${o.gray(e.manifestB.exportedAt)}`),console.log(` Records: ${o.cyan(e.manifestA.totalRecords)} \u2192 ${o.cyan(e.manifestB.totalRecords)} `+fn(e.manifestB.totalRecords-e.manifestA.totalRecords)),(e.domainsOnlyInA.length>0||e.domainsOnlyInB.length>0)&&(console.log(o.blue(`
86
86
  Domains:`)),e.domainsOnlyInA.length>0&&console.log(` Only in A: ${o.yellow(e.domainsOnlyInA.join(", "))}`),e.domainsOnlyInB.length>0&&console.log(` Only in B: ${o.yellow(e.domainsOnlyInB.join(", "))}`)),e.recordLevel||console.log(o.gray(`
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.15");process.exit(0)}
2
- import"./chunk-XH4JMX5O.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.17");process.exit(0)}
2
+ import"./chunk-Z7SKUC6P.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
3
3
  `),l=!1;for(let i=0;i<n.length;i++){let d=n[i],t=d.trim(),c=i+1,u=d.length-d.trimStart().length+1;if(l){t.includes("*/")&&(l=!1);continue}if(t.startsWith("/*")){l=!t.includes("*/");continue}if(t.startsWith("//"))continue;if(/^\s*if\s*\(/.test(d)&&(this.findMatchingElse(n,i)||r.push({file:s,line:c,column:u,language:this.language,construct:"if-without-else",triggerCondition:"when condition is false",currentHandling:"falls through \u2014 no else branch",suggestedGuard:"Add else branch or document why falsy path is safe",severity:"medium"})),/^\s*switch\s*\(/.test(d)){let a=this.extractBlock(n,i);if(a&&!a.includes("default:")&&!a.includes("default :")&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-no-default",triggerCondition:"when value matches no case",currentHandling:"falls through \u2014 no default case",suggestedGuard:"Add default case with error handling or exhaustive check",severity:"high"}),a){let g=a.match(/case\s+[^:]+:/g)||[],h=a.match(/\b(break|return|throw|continue)\b/g)||[];g.length>0&&h.length<g.length&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-missing-break",triggerCondition:"when case falls through to next case",currentHandling:"fall-through \u2014 may execute unintended cases",suggestedGuard:"Add break/return to each case or add explicit // falls through comment",severity:"medium"})}}if(/\bcatch\s*\(/.test(t)||/\bcatch\s*\{/.test(t)){let a=this.extractBlock(n,i);if(a!==null){let g=a.replace(/[{}]/g,"").trim();(g.length===0||/^\s*\/\//.test(g))&&r.push({file:s,line:c,column:u,language:this.language,construct:"try-empty-catch",triggerCondition:"when exception is thrown",currentHandling:"exception silently swallowed",suggestedGuard:"Log the error or rethrow with context",severity:"high"})}}if(/\btry\s*\{/.test(t)&&this.extractBlock(n,i)&&(n.slice(i,Math.min(i+30,n.length)).join(`
4
4
  `).includes("finally")||r.push({file:s,line:c,column:u,language:this.language,construct:"try-no-finally",triggerCondition:"when cleanup is needed regardless of success/failure",currentHandling:"no finally block \u2014 cleanup may be skipped on exception",suggestedGuard:"Add finally block for resource cleanup if applicable",severity:"low"})),t.includes("?.")){let a=t.match(/(\w+(?:\.\w+)*)\?\./g)||[];for(let g of a)if(!t.includes("??")&&!t.includes("|| ")&&!t.includes("if")){r.push({file:s,line:c,column:u,language:this.language,construct:"optional-chaining-null-path",triggerCondition:`when ${g.replace("?.","")} is null/undefined`,currentHandling:"returns undefined \u2014 may propagate",suggestedGuard:"Add ?? fallback or explicit null check",severity:"low"});break}}if(t.includes("??")&&!t.includes("?.")&&r.push({file:s,line:c,column:u,language:this.language,construct:"nullish-coalescing-fallback",triggerCondition:"when left side is null/undefined",currentHandling:"uses fallback value",suggestedGuard:"Verify fallback value is appropriate for all null cases",severity:"low"}),/\.\s*then\s*\(/.test(t)&&!t.includes(".catch")&&!t.includes("await")){let a=n.slice(i,Math.min(i+5,n.length)).join(" ");!a.includes(".catch")&&!a.includes("try")&&r.push({file:s,line:c,column:u,language:this.language,construct:"promise-no-catch",triggerCondition:"when promise rejects",currentHandling:"unhandled rejection \u2014 may crash process",suggestedGuard:"Add .catch() handler or use try/catch with await",severity:"high"})}let p=["map","filter","reduce","forEach","find","some","every","flatMap"];for(let a of p)if(new RegExp(`\\.${a}\\s*\\(`).test(t)){let h=n.slice(Math.max(0,i-3),i).join(" ");if(!h.includes(".length")&&!h.includes("if (")&&!h.includes("?.")){r.push({file:s,line:c,column:u,language:this.language,construct:"array-callback-empty",triggerCondition:`when array is empty before .${a}()`,currentHandling:a==="reduce"?"may throw without initial value":"returns empty result \u2014 may cause downstream issues",suggestedGuard:a==="reduce"?"Provide initial value or check array length":"Check array length or handle empty result",severity:a==="reduce"?"high":"low"});break}}/\|\|\s*['"`\d]/.test(t)&&!t.includes("??")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-or-falsy",triggerCondition:'when left side is falsy (0, "", false, null, undefined)',currentHandling:'uses fallback \u2014 may unintentionally override 0, "", or false',suggestedGuard:"Use ?? instead of || if only null/undefined should trigger fallback",severity:"medium"}),/&&\s*\w+\s*\(/.test(t)&&!t.includes("if")&&!t.includes("while")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-and-short-circuit",triggerCondition:"when left side is falsy \u2014 right side never executes",currentHandling:"short-circuits \u2014 function call skipped silently",suggestedGuard:"Use explicit if-statement for clarity when side effects matter",severity:"low"}),(t.match(/\?/g)||[]).length>=2&&t.includes(":")&&r.push({file:s,line:c,column:u,language:this.language,construct:"ternary-complex",triggerCondition:"when nested ternary conditions interact",currentHandling:"nested ternary \u2014 hard to read and maintain",suggestedGuard:"Refactor to if/else or switch for readability",severity:"medium"}),(/\btypeof\s+\w+\s*===?\s*['"]/.test(t)||/\binstanceof\b/.test(t))&&!t.includes("else")&&!this.findMatchingElse(n,i)&&r.push({file:s,line:c,column:u,language:this.language,construct:"type-guard-unhandled",triggerCondition:"when value does not match the guarded type",currentHandling:"unguarded type path \u2014 may cause runtime type errors",suggestedGuard:"Add else branch or exhaustive type checking",severity:"medium"})}return r}findMatchingElse(e,s){let r={depth:0};for(let n=s;n<Math.min(s+30,e.length);n++){let l=e[n];for(let i of l)i==="{"&&r.depth++,i==="}"&&r.depth--;if(r.depth===0&&n>s){if((e[n+1]?.trim()||"").startsWith("else")||e[n].trim().endsWith("else")||e[n].trim().endsWith("else {")||e[n].includes("} else"))return!0;break}}return!1}extractBlock(e,s){let r=0,n=!1,l=[];for(let i=s;i<Math.min(s+50,e.length);i++){let d=e[i];for(let t of d)t==="{"&&(r++,n=!0),t==="}"&&r--;if(n&&(l.push(d),r===0))return l.join(`
5
5
  `)}return null}};function y(o,e,s){let r=Date.now(),n=s||(e.endsWith(".ts")||e.endsWith(".tsx")?"typescript":"javascript"),i=new f(n).enumerate(o,e);return{file:e,language:n,branches:i,totalConstructs:i.length,unhandledCount:i.length,duration:Date.now()-r}}function b(o){let e=[];if(e.push(`# Branch Enumeration Report: ${o.file}`),e.push(""),e.push(`**Language**: ${o.language} | **Branches**: ${o.unhandledCount} | **Duration**: ${o.duration}ms`),e.push(""),o.branches.length===0)return e.push("No unhandled branches detected."),e.join(`