agentic-qe 3.14.6 → 3.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +74 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/cli/bundle.js +8 -8
  5. package/dist/cli/chunks/adapter-TVQKH65T.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-2YGML6OU.js → agent-booster-wasm-AK2W76RG.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-D5SSQYNU.js → agent-handler-MGZCWHIY.js} +2 -2
  8. package/dist/cli/chunks/{agent-memory-branch-YHPLTITV.js → agent-memory-branch-JZ54MCSP.js} +2 -2
  9. package/dist/cli/chunks/aqe-learning-engine-ULGTVVWE.js +2 -0
  10. package/dist/cli/chunks/{arena-7BGOXGXO.js → arena-CUVH3V7H.js} +2 -2
  11. package/dist/cli/chunks/{arena-MCE6EU7K.js → arena-YSWTKBCL.js} +4 -4
  12. package/dist/cli/chunks/{audit-BMWTQECB.js → audit-LVU76QGA.js} +3 -3
  13. package/dist/cli/chunks/base-W42BURDL.js +2 -0
  14. package/dist/cli/chunks/{better-sqlite3-PMUNGASU.js → better-sqlite3-DB3LOJQU.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-QPUFYX7F.js → brain-handler-SD63KOQ6.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-WKFDGRN4.js → branch-enumerator-4MNOPUC7.js} +2 -2
  17. package/dist/cli/chunks/{browser-VY5HKH5X.js → browser-OLPNTWQE.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-HKGHFFFT.js +2 -0
  19. package/dist/cli/chunks/{chunk-62N4NUJH.js → chunk-23CX7JNL.js} +2 -2
  20. package/dist/cli/chunks/{chunk-MW2GGZZ5.js → chunk-25P6JA6V.js} +1 -1
  21. package/dist/cli/chunks/{chunk-RSXXCL4A.js → chunk-2G63VIJE.js} +1 -1
  22. package/dist/cli/chunks/{chunk-3NIG7S5W.js → chunk-2IMSJ7IO.js} +1 -1
  23. package/dist/cli/chunks/{chunk-I33ERSGB.js → chunk-36VKMAMN.js} +2 -2
  24. package/dist/cli/chunks/{chunk-2TMWAQQ3.js → chunk-3M7J4U74.js} +3 -3
  25. package/dist/cli/chunks/{chunk-CM7U6TAX.js → chunk-3QJU4Q4R.js} +2 -2
  26. package/dist/cli/chunks/{chunk-H5BS5VH7.js → chunk-4EKV7PHB.js} +2 -2
  27. package/dist/cli/chunks/{chunk-IG5GNEC6.js → chunk-4INST4ZL.js} +1 -1
  28. package/dist/cli/chunks/{chunk-YHKEDEAA.js → chunk-53BXTTRO.js} +3 -3
  29. package/dist/cli/chunks/{chunk-ENGZ4D5V.js → chunk-5D7ZFWDS.js} +2 -2
  30. package/dist/cli/chunks/{chunk-DZ3AUAAB.js → chunk-5FSLMYAC.js} +2 -2
  31. package/dist/cli/chunks/{chunk-FBMN7B46.js → chunk-5GFKTJ65.js} +2 -2
  32. package/dist/cli/chunks/{chunk-NMAIY4PX.js → chunk-5U6N4V5M.js} +11 -11
  33. package/dist/cli/chunks/{chunk-B6D2CHEH.js → chunk-6EGS77BB.js} +1 -1
  34. package/dist/cli/chunks/{chunk-NQZ5AR3D.js → chunk-6PJPQGF4.js} +2 -2
  35. package/dist/cli/chunks/{chunk-ICTXTNQZ.js → chunk-6RD44SCE.js} +1 -1
  36. package/dist/cli/chunks/{chunk-2NPKIBAZ.js → chunk-74IOEOMH.js} +2 -2
  37. package/dist/cli/chunks/{chunk-RTFO5UQH.js → chunk-77QZHIVX.js} +2 -2
  38. package/dist/cli/chunks/{chunk-D45SG6CP.js → chunk-7EZ2Z2CK.js} +1 -1
  39. package/dist/cli/chunks/{chunk-UNFFDHER.js → chunk-7MIOK72I.js} +10 -32
  40. package/dist/cli/chunks/{chunk-HNFVJP4I.js → chunk-7QYOTUOX.js} +2 -2
  41. package/dist/cli/chunks/{chunk-Q7EAGKAE.js → chunk-A2VUCUTT.js} +2 -2
  42. package/dist/cli/chunks/{chunk-TVYY3OCX.js → chunk-A3DK3XNZ.js} +1 -1
  43. package/dist/cli/chunks/{chunk-RETBYIAC.js → chunk-A5MA7A23.js} +4 -4
  44. package/dist/cli/chunks/{chunk-DUYOVM5I.js → chunk-AEUEMVJK.js} +2 -2
  45. package/dist/cli/chunks/{chunk-6U7LNMWZ.js → chunk-AJUBT4NP.js} +2 -2
  46. package/dist/cli/chunks/{chunk-7CUQCCMD.js → chunk-B2YGVSOP.js} +2 -2
  47. package/dist/cli/chunks/{chunk-SNOBH4AZ.js → chunk-B4I43GE2.js} +2 -2
  48. package/dist/cli/chunks/{chunk-VMNWDJIZ.js → chunk-BD7FEUN3.js} +2 -2
  49. package/dist/cli/chunks/{chunk-HM6ZSCPI.js → chunk-BE4KALTE.js} +1 -1
  50. package/dist/cli/chunks/{chunk-WGM35YWL.js → chunk-BEFTQVEW.js} +2 -2
  51. package/dist/cli/chunks/{chunk-SMDN3BQZ.js → chunk-BLG7SH4A.js} +1 -1
  52. package/dist/cli/chunks/{chunk-AJRUJAAK.js → chunk-C3FXFU2T.js} +1 -1
  53. package/dist/cli/chunks/{chunk-IQO7UCFR.js → chunk-CBONQM5D.js} +2 -2
  54. package/dist/cli/chunks/{chunk-L4RUBPLR.js → chunk-CQNMGK6Y.js} +2 -2
  55. package/dist/cli/chunks/{chunk-NHWGMJAP.js → chunk-CVOQ6ESD.js} +2 -2
  56. package/dist/cli/chunks/{chunk-P6OYS755.js → chunk-DOBKEXMJ.js} +1 -1
  57. package/dist/cli/chunks/{chunk-QZANMBIT.js → chunk-DYTQHRUS.js} +1 -1
  58. package/dist/cli/chunks/{chunk-FZOBD67M.js → chunk-EADSQN5T.js} +1 -1
  59. package/dist/cli/chunks/{chunk-DHVX5UB2.js → chunk-EGOIIUBD.js} +2 -2
  60. package/dist/cli/chunks/{chunk-6OS76PHI.js → chunk-EIGRV3J6.js} +2 -2
  61. package/dist/cli/chunks/{chunk-CD542DNJ.js → chunk-EJ6MMYLK.js} +1 -1
  62. package/dist/cli/chunks/{chunk-ELLBS5RP.js → chunk-ENK44A6Q.js} +2 -2
  63. package/dist/cli/chunks/{chunk-VGFFFKGK.js → chunk-EYXE2XKP.js} +2 -2
  64. package/dist/cli/chunks/{chunk-72KXSMWI.js → chunk-F2OPFVQH.js} +1 -1
  65. package/dist/cli/chunks/{chunk-DK4XN4CU.js → chunk-FBZC4IGB.js} +2 -2
  66. package/dist/cli/chunks/{chunk-MUOG6QXR.js → chunk-FSSR6WBE.js} +2 -2
  67. package/dist/cli/chunks/{chunk-DPYSUDAO.js → chunk-FW4DJ4FJ.js} +1 -1
  68. package/dist/cli/chunks/{chunk-ZVWVV4EX.js → chunk-FYPX5WBJ.js} +1 -1
  69. package/dist/cli/chunks/{chunk-7J6QC567.js → chunk-G367W7XR.js} +3 -3
  70. package/dist/cli/chunks/{chunk-IAF6T27S.js → chunk-GLGKQX2V.js} +2 -2
  71. package/dist/cli/chunks/{chunk-JXGFRBUO.js → chunk-GV4DYPJP.js} +2 -2
  72. package/dist/cli/chunks/{chunk-BPEDWS6O.js → chunk-GVVFTFMB.js} +2 -2
  73. package/dist/cli/chunks/{chunk-CF2ISEOJ.js → chunk-H5RQPO3X.js} +2 -2
  74. package/dist/cli/chunks/{chunk-GSF6MB64.js → chunk-HPWWYT67.js} +2 -2
  75. package/dist/cli/chunks/{chunk-RG52OKAM.js → chunk-HXXHMLJ5.js} +1 -1
  76. package/dist/cli/chunks/{chunk-SESK3ARK.js → chunk-HYFQUWNB.js} +2 -2
  77. package/dist/cli/chunks/{chunk-7D3V65N5.js → chunk-HYOPJHHW.js} +1 -1
  78. package/dist/cli/chunks/{chunk-7LPR6HJG.js → chunk-HZY42OVU.js} +2 -2
  79. package/dist/cli/chunks/{chunk-SDRHUMJB.js → chunk-IAENZ2DR.js} +2 -2
  80. package/dist/cli/chunks/{chunk-B6MOJC3X.js → chunk-IEJ7ZV3M.js} +1 -1
  81. package/dist/cli/chunks/{chunk-UCFQALXO.js → chunk-IWFFO6VT.js} +2 -2
  82. package/dist/cli/chunks/chunk-J7AQZLIH.js +21 -0
  83. package/dist/cli/chunks/{chunk-H52HZ67P.js → chunk-JHJUSSAU.js} +2 -2
  84. package/dist/cli/chunks/{chunk-2YXGBZWV.js → chunk-JOZ47MV6.js} +1 -1
  85. package/dist/cli/chunks/{chunk-EAY2JMZG.js → chunk-JZT7BU44.js} +2 -2
  86. package/dist/cli/chunks/{chunk-BVR7RMC5.js → chunk-KD2BLA5Y.js} +1 -1
  87. package/dist/cli/chunks/{chunk-BAMN2CHI.js → chunk-KUHLTVWC.js} +1 -1
  88. package/dist/cli/chunks/{chunk-5QQSIGUA.js → chunk-LU2EDWQK.js} +2 -2
  89. package/dist/cli/chunks/{chunk-D6CJIGRU.js → chunk-LXZMP3VX.js} +54 -54
  90. package/dist/cli/chunks/{chunk-GPYVDFB3.js → chunk-LY7MFGBD.js} +196 -187
  91. package/dist/cli/chunks/{chunk-W6HXLH5G.js → chunk-MM56VPNE.js} +2 -2
  92. package/dist/cli/chunks/{chunk-E6G2RD5H.js → chunk-MNQN7UZX.js} +2 -2
  93. package/dist/cli/chunks/{chunk-ZCRTRYXK.js → chunk-MQZ53OR3.js} +2 -2
  94. package/dist/cli/chunks/{chunk-3HZS4M3O.js → chunk-MT7UNBZ7.js} +2 -2
  95. package/dist/cli/chunks/{chunk-XAS3XRYM.js → chunk-MZB2UV2O.js} +1 -1
  96. package/dist/cli/chunks/{chunk-GDSXITFH.js → chunk-MZMG6CUJ.js} +2 -2
  97. package/dist/cli/chunks/{chunk-6SQM2MUX.js → chunk-N5XOXPHZ.js} +2 -2
  98. package/dist/cli/chunks/{chunk-5OOMJGFN.js → chunk-NBLDBVAW.js} +1 -1
  99. package/dist/cli/chunks/{chunk-PI7TJS62.js → chunk-ND4QTZOL.js} +2 -2
  100. package/dist/cli/chunks/{chunk-H6ZM3PUT.js → chunk-NHUGHAY6.js} +1 -1
  101. package/dist/cli/chunks/{chunk-5VFPCSK7.js → chunk-NOHWJOBS.js} +1 -1
  102. package/dist/cli/chunks/{chunk-DBDPRORT.js → chunk-O5V7RHVG.js} +2 -2
  103. package/dist/cli/chunks/{chunk-UQ32JHES.js → chunk-O6MO5KMR.js} +2 -2
  104. package/dist/cli/chunks/{chunk-WO4QMXIG.js → chunk-OAZX6WFU.js} +2 -2
  105. package/dist/cli/chunks/{chunk-GGRHV6D7.js → chunk-OEPNNLR4.js} +1 -1
  106. package/dist/cli/chunks/{chunk-AIRGNL55.js → chunk-OIDWDGLG.js} +2 -2
  107. package/dist/cli/chunks/{chunk-V4DM6ELU.js → chunk-ON2UTP2U.js} +2 -2
  108. package/dist/cli/chunks/{chunk-MBRHSU6W.js → chunk-ONR2NXXD.js} +10 -10
  109. package/dist/cli/chunks/{chunk-WCJBU2KI.js → chunk-OXHF3L2T.js} +2 -2
  110. package/dist/cli/chunks/{chunk-AVBJYI5I.js → chunk-OZGIOKEA.js} +1 -1
  111. package/dist/cli/chunks/{chunk-YFBSPLJG.js → chunk-P2UPYSDJ.js} +1 -1
  112. package/dist/cli/chunks/{chunk-C6KWXUFJ.js → chunk-P7XSPP5D.js} +2 -2
  113. package/dist/cli/chunks/{chunk-QDFTT3RF.js → chunk-PCJQCEBA.js} +2 -2
  114. package/dist/cli/chunks/chunk-PELENDDQ.js +2 -0
  115. package/dist/cli/chunks/{chunk-257E2A5M.js → chunk-PYKY22GC.js} +5 -5
  116. package/dist/cli/chunks/{chunk-LL3IGZBI.js → chunk-Q3NSU24F.js} +2 -2
  117. package/dist/cli/chunks/{chunk-Y3LZ35OG.js → chunk-Q6NTEICT.js} +2 -2
  118. package/dist/cli/chunks/chunk-QFETNCNN.js +12 -0
  119. package/dist/cli/chunks/{chunk-SE4WIB26.js → chunk-QGOWNVVG.js} +1 -1
  120. package/dist/cli/chunks/{chunk-6RE3X4V5.js → chunk-QPLSYEWJ.js} +2 -2
  121. package/dist/cli/chunks/{chunk-FWASDOT2.js → chunk-QQFQDEUE.js} +2 -2
  122. package/dist/cli/chunks/{chunk-2JVWITNK.js → chunk-QUORH2MG.js} +55 -79
  123. package/dist/cli/chunks/{chunk-5J6W7SIA.js → chunk-QVH5Y7AP.js} +1 -1
  124. package/dist/cli/chunks/{chunk-YSLL6VSL.js → chunk-RC2A4JZ5.js} +2 -2
  125. package/dist/cli/chunks/{chunk-IB27QACC.js → chunk-RDGPXENG.js} +2 -2
  126. package/dist/cli/chunks/{chunk-PX5YDCRH.js → chunk-RKI3IQKQ.js} +2 -2
  127. package/dist/cli/chunks/{chunk-BMAPORJ7.js → chunk-RKUAWQOF.js} +2 -2
  128. package/dist/cli/chunks/chunk-RLW25X66.js +2 -0
  129. package/dist/cli/chunks/{chunk-RFNPJK6N.js → chunk-ROVZSZCS.js} +3 -3
  130. package/dist/cli/chunks/{chunk-MQROI74N.js → chunk-RT6O2HW2.js} +2 -2
  131. package/dist/cli/chunks/{chunk-Y3UOUNHM.js → chunk-SM2YJ2AL.js} +2 -2
  132. package/dist/cli/chunks/{chunk-BBT64TII.js → chunk-SRPLERER.js} +3 -3
  133. package/dist/cli/chunks/{chunk-YS4FCTWF.js → chunk-T77GZF4B.js} +1 -1
  134. package/dist/cli/chunks/{chunk-IV5UZOHH.js → chunk-TFK2AYIN.js} +2 -2
  135. package/dist/cli/chunks/chunk-TW3SR4TS.js +2 -0
  136. package/dist/cli/chunks/{chunk-7Z5LHRC3.js → chunk-TXSPBLBT.js} +2 -2
  137. package/dist/cli/chunks/chunk-UA7TDVL7.js +12 -0
  138. package/dist/cli/chunks/{chunk-3EZOZN25.js → chunk-UBJG3IHT.js} +2 -2
  139. package/dist/cli/chunks/{chunk-QW6VMTBR.js → chunk-UFSVUBTR.js} +2 -2
  140. package/dist/cli/chunks/{chunk-ZEV3YTO7.js → chunk-UOI6ULCH.js} +2 -2
  141. package/dist/cli/chunks/{chunk-JZOS5FCX.js → chunk-UYUJT6QO.js} +2 -2
  142. package/dist/cli/chunks/{chunk-3EA536JF.js → chunk-V5AK56DA.js} +2 -2
  143. package/dist/cli/chunks/{chunk-UKA2KOXE.js → chunk-V6RE4YRQ.js} +2 -2
  144. package/dist/cli/chunks/{chunk-RZZCUIAI.js → chunk-VW6FRMLW.js} +2 -2
  145. package/dist/cli/chunks/chunk-VXKWNRGA.js +2 -0
  146. package/dist/cli/chunks/{chunk-6SH5VZUD.js → chunk-VYDVI6FZ.js} +2 -2
  147. package/dist/cli/chunks/{chunk-BJTJLJRZ.js → chunk-WF6UISKW.js} +3 -3
  148. package/dist/cli/chunks/{chunk-ZL6SYKUK.js → chunk-WIH522AP.js} +1 -1
  149. package/dist/cli/chunks/{chunk-JIXUMYKZ.js → chunk-WOV6XI3A.js} +1 -1
  150. package/dist/cli/chunks/{chunk-JBTPOIAC.js → chunk-X7ADKL7T.js} +2 -2
  151. package/dist/cli/chunks/{chunk-JVNTSNWU.js → chunk-XBYQ2BS4.js} +2 -2
  152. package/dist/cli/chunks/{chunk-Z7WODOTH.js → chunk-XL5KIYE3.js} +2 -2
  153. package/dist/cli/chunks/{chunk-JMONHE4B.js → chunk-XWYELBZS.js} +1 -1
  154. package/dist/cli/chunks/{chunk-SJUXE4IC.js → chunk-XYLQZWF6.js} +2 -2
  155. package/dist/cli/chunks/{chunk-KNNISEDY.js → chunk-Y6AKKQIQ.js} +1 -1
  156. package/dist/cli/chunks/{chunk-CCK4BF76.js → chunk-YMW57PEL.js} +1 -1
  157. package/dist/cli/chunks/{chunk-64VGZQLB.js → chunk-YO4ESCB4.js} +1 -1
  158. package/dist/cli/chunks/{chunk-ZSPU4MOS.js → chunk-YRHTQZU4.js} +2 -2
  159. package/dist/cli/chunks/chunk-Z4Q5PCRZ.js +65 -0
  160. package/dist/cli/chunks/{chunk-Q5XTSMWR.js → chunk-ZELWDJXT.js} +2 -2
  161. package/dist/cli/chunks/{chunk-SPV2VKC5.js → chunk-ZQZD55MN.js} +2 -2
  162. package/dist/cli/chunks/{chunk-66VWCR67.js → chunk-ZS4XVJGV.js} +2 -2
  163. package/dist/cli/chunks/{chunk-6LIHFV7O.js → chunk-ZUB5YOCM.js} +2 -2
  164. package/dist/cli/chunks/chunk-ZUOVNFXK.js +2 -0
  165. package/dist/cli/chunks/{chunk-7NITCZWD.js → chunk-ZWEKAEEV.js} +1 -1
  166. package/dist/cli/chunks/{ci-W6K6G2KZ.js → ci-J3TDK5RA.js} +8 -8
  167. package/dist/cli/chunks/{ci-output-LDT24TS3.js → ci-output-RLS32FUY.js} +2 -2
  168. package/dist/cli/chunks/{circuit-breaker-F5V4KITU.js → circuit-breaker-MRCC7WCM.js} +2 -2
  169. package/dist/cli/chunks/{claude-flow-setup-DT6WQQVD.js → claude-flow-setup-LIZCEKDF.js} +2 -2
  170. package/dist/cli/chunks/client-3BD2DI4N.js +2 -0
  171. package/dist/cli/chunks/{cline-installer-G7TJOAEX.js → cline-installer-T7H6R2RC.js} +2 -2
  172. package/dist/cli/chunks/{code-PGE6A42V.js → code-XMBLI7OF.js} +3 -3
  173. package/dist/cli/chunks/{code-index-extractor-RNITH372.js → code-index-extractor-QS7BYLEX.js} +2 -2
  174. package/dist/cli/chunks/{codex-installer-LBX77AI3.js → codex-installer-6PGT5FM6.js} +2 -2
  175. package/dist/cli/chunks/{completions-4AWLAARX.js → completions-2A3WRXY2.js} +2 -2
  176. package/dist/cli/chunks/{complexity-analyzer-ZPNSS476.js → complexity-analyzer-23HOOGJ7.js} +2 -2
  177. package/dist/cli/chunks/{continuedev-installer-UAPWX6OA.js → continuedev-installer-4FSF7B3N.js} +2 -2
  178. package/dist/cli/chunks/{copilot-installer-BJN2YJGI.js → copilot-installer-A5GRQQUU.js} +2 -2
  179. package/dist/cli/chunks/core-handlers-C3H2ZCS2.js +2 -0
  180. package/dist/cli/chunks/{cost-tracker-MHP2VJ63.js → cost-tracker-Z4STQ5VB.js} +2 -2
  181. package/dist/cli/chunks/{coverage-PQB4IEFG.js → coverage-NUPP6KZZ.js} +3 -3
  182. package/dist/cli/chunks/cross-domain-router-JCQ7SWDP.js +2 -0
  183. package/dist/cli/chunks/{cursor-installer-ZXBWYAS3.js → cursor-installer-FVJ7ROPJ.js} +2 -2
  184. package/dist/cli/chunks/{daemon-N2BEGEFY.js → daemon-7ZZA2MMN.js} +4 -4
  185. package/dist/cli/chunks/{daemon-64C7R6OJ.js → daemon-D662EX5N.js} +3 -3
  186. package/dist/cli/chunks/{dag-attention-scheduler-SPZDAPNL.js → dag-attention-scheduler-IB4TQ2KA.js} +2 -2
  187. package/dist/cli/chunks/{detect-LXJBSSZW.js → detect-LGLBZN4I.js} +2 -2
  188. package/dist/cli/chunks/{dist-node-U3TKZ2IZ.js → dist-node-Z3OL42YE.js} +2 -2
  189. package/dist/cli/chunks/{domain-handler-3DDWUVSR.js → domain-handler-L3CLNL7U.js} +2 -2
  190. package/dist/cli/chunks/{domain-plugins-JJVWI4OQ.js → domain-plugins-GQ3V5X6L.js} +2 -2
  191. package/dist/cli/chunks/{domain-transfer-M36KUJ2U.js → domain-transfer-MFCI76IY.js} +2 -2
  192. package/dist/cli/chunks/dream-FTP33IJB.js +2 -0
  193. package/dist/cli/chunks/{embed-and-insert-pattern-JPAR7TXX.js → embed-and-insert-pattern-UGD6USYH.js} +2 -2
  194. package/dist/cli/chunks/{eval-SOLG23EA.js → eval-3B7UIYGY.js} +2 -2
  195. package/dist/cli/chunks/{experience-capture-middleware-T7G2VOOD.js → experience-capture-middleware-3RQ4NYY3.js} +3 -3
  196. package/dist/cli/chunks/{fast-paths-32N3ELI4.js → fast-paths-QOSAEPYD.js} +2 -2
  197. package/dist/cli/chunks/{feature-flags-NAHKLDRN.js → feature-flags-3S5TH6P4.js} +2 -2
  198. package/dist/cli/chunks/{feature-flags-APJDQ4N7.js → feature-flags-TLF4NKOH.js} +2 -2
  199. package/dist/cli/chunks/{file-discovery-YKVM3MDB.js → file-discovery-AEVMJRNB.js} +2 -2
  200. package/dist/cli/chunks/{fleet-55M5CJS4.js → fleet-E6WTXWFL.js} +3 -3
  201. package/dist/cli/chunks/{gnn-wrapper-UD6E6S6Z.js → gnn-wrapper-MCKH3AUU.js} +2 -2
  202. package/dist/cli/chunks/{heartbeat-handler-OYVW3VSC.js → heartbeat-handler-U7XENHRR.js} +4 -4
  203. package/dist/cli/chunks/heartbeat-scheduler-HXBJVJL2.js +2 -0
  204. package/dist/cli/chunks/hnsw-adapter-TU6WG2ME.js +2 -0
  205. package/dist/cli/chunks/hnsw-index-MS5KODD7.js +2 -0
  206. package/dist/cli/chunks/{hnsw-legacy-bridge-HBYIS3ZW.js → hnsw-legacy-bridge-5GW4SAEI.js} +2 -2
  207. package/dist/cli/chunks/{hnswlib-node-EQPM42OU.js → hnswlib-node-7BLZBK5T.js} +2 -2
  208. package/dist/cli/chunks/{hooks-5ZSSJWO6.js → hooks-F3O2SB6H.js} +10 -10
  209. package/dist/cli/chunks/hybrid-backend-HT45LBHC.js +2 -0
  210. package/dist/cli/chunks/{hypergraph-engine-XBGVQ4PD.js → hypergraph-engine-PV4EKXHB.js} +2 -2
  211. package/dist/cli/chunks/{hypergraph-handler-CAWAQ673.js → hypergraph-handler-VOWO5ZTW.js} +3 -3
  212. package/dist/cli/chunks/impact-analyzer-AP4AGTG5.js +2 -0
  213. package/dist/cli/chunks/{init-handler-PRHXSARK.js → init-handler-ENJ5ONJX.js} +16 -14
  214. package/dist/cli/chunks/init-wizard-I5DFZUQL.js +2 -0
  215. package/dist/cli/chunks/kernel-MISPSPPA.js +2 -0
  216. package/dist/cli/chunks/{kilocode-installer-F7LXBM7I.js → kilocode-installer-HNNJOOPE.js} +2 -2
  217. package/dist/cli/chunks/{kiro-installer-NM723ZRG.js → kiro-installer-UZBIQ3IC.js} +2 -2
  218. package/dist/cli/chunks/knowledge-graph-L26JESGE.js +2 -0
  219. package/dist/cli/chunks/{learning-5QYIDHH3.js → learning-YMLCVFUT.js} +3 -3
  220. package/dist/cli/chunks/{llm-router-43HKWPSX.js → llm-router-YWTARCCT.js} +4 -4
  221. package/dist/cli/chunks/llm-router-service-MWGC43ZA.js +2 -0
  222. package/dist/cli/chunks/{load-5YDBWSCS.js → load-DKE3F3IP.js} +2 -2
  223. package/dist/cli/chunks/load-test-H5ISNNM5.js +2 -0
  224. package/dist/cli/chunks/{mcp-UMAPMNMY.js → mcp-5PSGIUCW.js} +2 -2
  225. package/dist/cli/chunks/{memory-FWCPCQFP.js → memory-3L3O6JMM.js} +5 -5
  226. package/dist/cli/chunks/memory-backend-HWDNOBKW.js +2 -0
  227. package/dist/cli/chunks/memory-handlers-ZFDVQZM5.js +2 -0
  228. package/dist/cli/chunks/{multi-model-executor-2XTBGLE4.js → multi-model-executor-AEEO7IA4.js} +2 -2
  229. package/dist/cli/chunks/{opencode-installer-GIXOJ6NS.js → opencode-installer-ABBO355U.js} +2 -2
  230. package/dist/cli/chunks/{orchestrator-VW6BKHLI.js → orchestrator-E36Q7MKE.js} +17 -17
  231. package/dist/cli/chunks/pattern-null-store-GQP6ICWK.js +2 -0
  232. package/dist/cli/chunks/{pattern-usage-recorder-7CEUC3J7.js → pattern-usage-recorder-H4XKSID4.js} +2 -2
  233. package/dist/cli/chunks/{pipeline-IGUQPPPO.js → pipeline-BGFEHXIN.js} +2 -2
  234. package/dist/cli/chunks/{platform-2P636I7B.js → platform-GK7ZVDJI.js} +2 -2
  235. package/dist/cli/chunks/{plugin-NY6SWDPE.js → plugin-CAH2CKI6.js} +2 -2
  236. package/dist/cli/chunks/{prime-radiant-advanced-wasm-2UUDTIO2.js → prime-radiant-advanced-wasm-M5EYRONA.js} +2 -2
  237. package/dist/cli/chunks/{project-root-IOISG5KX.js → project-root-BSNZC243.js} +2 -2
  238. package/dist/cli/chunks/protocol-executor-AD5A4DAI.js +2 -0
  239. package/dist/cli/chunks/{protocol-handler-ZTPCRQ5W.js → protocol-handler-JDSSC2SF.js} +2 -2
  240. package/dist/cli/chunks/{prove-SQX5A3IG.js → prove-ANPTOZJE.js} +2 -2
  241. package/dist/cli/chunks/qe-reasoning-bank-W3Z2PKTR.js +2 -0
  242. package/dist/cli/chunks/{quality-DROILKRY.js → quality-SXWGYRQR.js} +2 -2
  243. package/dist/cli/chunks/{quality-gate-PWKWDJY2.js → quality-gate-GYNCA4ZY.js} +3 -3
  244. package/dist/cli/chunks/queen-coordinator-HQRHLIJX.js +2 -0
  245. package/dist/cli/chunks/{real-embeddings-P5U3MGYC.js → real-embeddings-WSRYAOZM.js} +2 -2
  246. package/dist/cli/chunks/{ref-validation-KY73NQXD.js → ref-validation-AZ3LRWEK.js} +2 -2
  247. package/dist/cli/chunks/{roocode-installer-6JPPRB3W.js → roocode-installer-2QKGFIEU.js} +2 -2
  248. package/dist/cli/chunks/router-MTP5LH4H.js +2 -0
  249. package/dist/cli/chunks/routing-feedback-GWETVB4L.js +2 -0
  250. package/dist/cli/chunks/{routing-handler-VTJIVFUO.js → routing-handler-UYDC5MMD.js} +2 -2
  251. package/dist/cli/chunks/{ruvector-commands-C6RPSJJO.js → ruvector-commands-QXADPVEY.js} +2 -2
  252. package/dist/cli/chunks/rvf-dual-writer-4UE5S7WP.js +2 -0
  253. package/dist/cli/chunks/rvf-migration-adapter-PHH3HF4Q.js +2 -0
  254. package/dist/cli/chunks/{rvf-migration-coordinator-R53URRIO.js → rvf-migration-coordinator-GD4NBFKT.js} +2 -2
  255. package/dist/cli/chunks/rvf-native-adapter-KTLZBUWV.js +2 -0
  256. package/dist/cli/chunks/{rvf-store-integrity-MMXN5TEJ.js → rvf-store-integrity-7SXG66IL.js} +2 -2
  257. package/dist/cli/chunks/safe-db-FWWGAPVE.js +2 -0
  258. package/dist/cli/chunks/schedule-TPA4V4D5.js +2 -0
  259. package/dist/cli/chunks/scheduler-5ZTEPNDD.js +2 -0
  260. package/dist/cli/chunks/{security-3B3R2NL4.js → security-YKB622PK.js} +3 -3
  261. package/dist/cli/chunks/{shared-rvf-adapter-VIJB7JUS.js → shared-rvf-adapter-KMLAV7JK.js} +2 -2
  262. package/dist/cli/chunks/{shared-rvf-dual-writer-UVWGDUWC.js → shared-rvf-dual-writer-OYY27DFV.js} +2 -2
  263. package/dist/cli/chunks/sqlite-persistence-HPTT624C.js +2 -0
  264. package/dist/cli/chunks/{standalone-memory-M4LWAAYZ.js → standalone-memory-2DOABVLC.js} +2 -2
  265. package/dist/cli/chunks/{status-handler-YYFV6OZL.js → status-handler-EXRKETV7.js} +2 -2
  266. package/dist/cli/chunks/{structural-health-27E6LLKB.js → structural-health-2SKK6DU6.js} +2 -2
  267. package/dist/cli/chunks/sync-DQ2YUNI6.js +2 -0
  268. package/dist/cli/chunks/{sync-J3LJ56WN.js → sync-UW7SX7GO.js} +2 -2
  269. package/dist/cli/chunks/{task-handler-4MCEBQZL.js → task-handler-LYQ6WYUY.js} +2 -2
  270. package/dist/cli/chunks/task-handlers-DIJO232S.js +9 -0
  271. package/dist/cli/chunks/test-WRHZMUCW.js +33 -0
  272. package/dist/cli/chunks/{test-scheduling-ZJBFRZ3J.js → test-scheduling-HI23RXFK.js} +3 -3
  273. package/dist/cli/chunks/token-bootstrap-23SA6SWZ.js +2 -0
  274. package/dist/cli/chunks/{token-usage-3X5WMTG2.js → token-usage-M7RRDPXO.js} +2 -2
  275. package/dist/cli/chunks/{transformers-MVL4C5IX.js → transformers-4TC35KKS.js} +2 -2
  276. package/dist/cli/chunks/{tree-sitter-wasm-parser-SLW65ZFO.js → tree-sitter-wasm-parser-F4LTKAWD.js} +2 -2
  277. package/dist/cli/chunks/{types-TG5P3CRS.js → types-NBXV6LXQ.js} +2 -2
  278. package/dist/cli/chunks/unified-memory-OVFEPRPS.js +2 -0
  279. package/dist/cli/chunks/unified-memory-hnsw-KKRSCZHR.js +2 -0
  280. package/dist/cli/chunks/unified-persistence-7GLR4RI3.js +2 -0
  281. package/dist/cli/chunks/{upgrade-ETBHDEPY.js → upgrade-4BGOU5RM.js} +2 -2
  282. package/dist/cli/chunks/{validate-C2A73LZK.js → validate-EDWAR63H.js} +2 -2
  283. package/dist/cli/chunks/{validate-swarm-67XN42ML.js → validate-swarm-VI72CPR7.js} +2 -2
  284. package/dist/cli/chunks/visual-security-2FUM5GLI.js +2 -0
  285. package/dist/cli/chunks/{web-tree-sitter-USJN77P4.js → web-tree-sitter-Y5XBRQXF.js} +2 -2
  286. package/dist/cli/chunks/{windsurf-installer-5GGZXGJW.js → windsurf-installer-VEX23WAF.js} +2 -2
  287. package/dist/cli/chunks/{witness-chain-IWS5ZHHL.js → witness-chain-3YNL6YGY.js} +2 -2
  288. package/dist/cli/chunks/witness-chain-MH6GA5L6.js +2 -0
  289. package/dist/cli/chunks/witness-chain-repair-MJZGZRWT.js +2 -0
  290. package/dist/cli/chunks/{witness-chain-verifier-3GEADWPE.js → witness-chain-verifier-TTJYXTBE.js} +2 -2
  291. package/dist/cli/chunks/{witness-key-manager-ZWEIK3VJ.js → witness-key-manager-EM6YXYOY.js} +2 -2
  292. package/dist/cli/chunks/{workflow-KHMVVBBA.js → workflow-2RBDOM7V.js} +4 -4
  293. package/dist/cli/chunks/workflow-orchestrator-H6G65YKU.js +2 -0
  294. package/dist/cli/chunks/wrappers-5OTAVVOV.js +2 -0
  295. package/dist/cli/commands/ci.js +1 -1
  296. package/dist/cli/commands/test.js +18 -3
  297. package/dist/cli/handlers/init-handler.d.ts +2 -0
  298. package/dist/cli/handlers/init-handler.js +8 -2
  299. package/dist/cli/index.js +8 -0
  300. package/dist/coordination/handlers/test-execution-handlers.js +13 -8
  301. package/dist/coordination/index.d.ts +1 -1
  302. package/dist/coordination/queen-event-handlers.js +9 -6
  303. package/dist/coordination/result-saver.js +1 -1
  304. package/dist/coordination/services/index.d.ts +1 -1
  305. package/dist/coordination/services/task-audit-logger.d.ts +38 -13
  306. package/dist/coordination/services/task-audit-logger.js +33 -5
  307. package/dist/coordination/task-executor.d.ts +5 -0
  308. package/dist/coordination/task-executor.js +10 -5
  309. package/dist/domains/test-generation/coordinator.js +6 -5
  310. package/dist/domains/test-generation/interfaces.d.ts +11 -1
  311. package/dist/domains/test-generation/services/behavior-example-validation.d.ts +36 -0
  312. package/dist/domains/test-generation/services/behavior-example-validation.js +89 -0
  313. package/dist/domains/test-generation/services/behavior-examples.d.ts +8 -0
  314. package/dist/domains/test-generation/services/behavior-examples.js +65 -0
  315. package/dist/domains/test-generation/services/test-generator.d.ts +1 -1
  316. package/dist/domains/test-generation/services/test-generator.js +59 -30
  317. package/dist/domains/visual-accessibility/services/axe-core-audit.d.ts +0 -15
  318. package/dist/domains/visual-accessibility/services/axe-core-audit.js +12 -10
  319. package/dist/init/browser-engine-installer.d.ts +5 -5
  320. package/dist/init/browser-engine-installer.js +28 -6
  321. package/dist/init/init-wizard.d.ts +2 -0
  322. package/dist/init/orchestrator.js +1 -0
  323. package/dist/init/phases/09-assets.js +8 -18
  324. package/dist/init/phases/phase-interface.d.ts +2 -0
  325. package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +2 -5
  326. package/dist/integrations/vibium/client.d.ts +1 -0
  327. package/dist/integrations/vibium/client.js +24 -11
  328. package/dist/integrations/vibium/runtime.d.ts +14 -0
  329. package/dist/integrations/vibium/runtime.js +94 -0
  330. package/dist/kernel/pattern-fts-self-heal.d.ts +63 -0
  331. package/dist/kernel/pattern-fts-self-heal.js +193 -0
  332. package/dist/kernel/process-lifecycle.d.ts +60 -0
  333. package/dist/kernel/process-lifecycle.js +91 -0
  334. package/dist/kernel/unified-memory-schemas.d.ts +15 -1
  335. package/dist/kernel/unified-memory-schemas.js +53 -25
  336. package/dist/kernel/unified-memory.js +31 -34
  337. package/dist/kernel/unified-persistence.js +12 -6
  338. package/dist/learning/experience-capture.d.ts +2 -1
  339. package/dist/learning/experience-capture.js +23 -8
  340. package/dist/learning/pattern-store.d.ts +1 -1
  341. package/dist/learning/pattern-store.js +27 -30
  342. package/dist/learning/qe-patterns.d.ts +6 -0
  343. package/dist/learning/qe-reasoning-bank.d.ts +1 -0
  344. package/dist/learning/qe-reasoning-bank.js +14 -4
  345. package/dist/learning/real-qe-reasoning-bank.d.ts +9 -4
  346. package/dist/learning/real-qe-reasoning-bank.js +28 -4
  347. package/dist/learning/rvf-pattern-store.js +19 -19
  348. package/dist/learning/sqlite-persistence.js +9 -24
  349. package/dist/mcp/bundle.js +508 -545
  350. package/dist/mcp/entry.js +52 -6
  351. package/dist/mcp/handlers/domain-handler-configs.js +12 -4
  352. package/dist/mcp/handlers/task-handlers.js +11 -7
  353. package/dist/mcp/protocol-server.js +18 -3
  354. package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
  355. package/dist/mcp/services/reasoning-bank-service.js +5 -1
  356. package/dist/mcp/tools/test-execution/e2e-execute.js +9 -1
  357. package/dist/mcp/tools/test-generation/generate.d.ts +6 -1
  358. package/dist/mcp/tools/test-generation/generate.js +8 -0
  359. package/dist/mcp/types.d.ts +6 -2
  360. package/dist/shared/error-utils.d.ts +15 -0
  361. package/dist/shared/error-utils.js +21 -0
  362. package/dist/shared/events/domain-events.d.ts +2 -1
  363. package/package.json +10 -6
  364. package/dist/cli/chunks/adapter-UYOJPTOX.js +0 -2
  365. package/dist/cli/chunks/aqe-learning-engine-JR5AVQXR.js +0 -2
  366. package/dist/cli/chunks/base-DRZ2LS6X.js +0 -2
  367. package/dist/cli/chunks/browser-workflow-CJ7T3MXF.js +0 -2
  368. package/dist/cli/chunks/chunk-4N23RFDU.js +0 -2
  369. package/dist/cli/chunks/chunk-AHKELLIO.js +0 -12
  370. package/dist/cli/chunks/chunk-MJS53PRX.js +0 -2
  371. package/dist/cli/chunks/chunk-PZPWRQ2M.js +0 -21
  372. package/dist/cli/chunks/chunk-QGA55PFM.js +0 -12
  373. package/dist/cli/chunks/chunk-TCHGOB2N.js +0 -2
  374. package/dist/cli/chunks/chunk-Z6GGIRQQ.js +0 -65
  375. package/dist/cli/chunks/client-KHWJT6FB.js +0 -2
  376. package/dist/cli/chunks/core-handlers-HING5RRG.js +0 -2
  377. package/dist/cli/chunks/cross-domain-router-PQTD6AZN.js +0 -2
  378. package/dist/cli/chunks/dream-WUGRSNCV.js +0 -2
  379. package/dist/cli/chunks/heartbeat-scheduler-33XX5XNQ.js +0 -2
  380. package/dist/cli/chunks/hnsw-adapter-XQPERX3H.js +0 -2
  381. package/dist/cli/chunks/hnsw-index-2GNXTWHH.js +0 -2
  382. package/dist/cli/chunks/hybrid-backend-CCF7URKI.js +0 -2
  383. package/dist/cli/chunks/impact-analyzer-HGKAZWIG.js +0 -2
  384. package/dist/cli/chunks/init-wizard-72MFBI3G.js +0 -2
  385. package/dist/cli/chunks/kernel-BRCBVMSK.js +0 -2
  386. package/dist/cli/chunks/knowledge-graph-DG44IPEI.js +0 -2
  387. package/dist/cli/chunks/llm-router-service-24KXFX32.js +0 -2
  388. package/dist/cli/chunks/load-test-N4TAYJY3.js +0 -2
  389. package/dist/cli/chunks/memory-backend-NVYFYVAU.js +0 -2
  390. package/dist/cli/chunks/memory-handlers-UTWCNCHL.js +0 -2
  391. package/dist/cli/chunks/pattern-null-store-SBPNYDBR.js +0 -2
  392. package/dist/cli/chunks/protocol-executor-IBYEII5Q.js +0 -2
  393. package/dist/cli/chunks/qe-reasoning-bank-7IETWW6W.js +0 -2
  394. package/dist/cli/chunks/queen-coordinator-NHUK2MWJ.js +0 -2
  395. package/dist/cli/chunks/router-SRSO3IHF.js +0 -2
  396. package/dist/cli/chunks/routing-feedback-PASRE5HY.js +0 -2
  397. package/dist/cli/chunks/rvf-dual-writer-4M4J67OU.js +0 -2
  398. package/dist/cli/chunks/rvf-migration-adapter-TSXGT5LF.js +0 -2
  399. package/dist/cli/chunks/rvf-native-adapter-MOF3E7BR.js +0 -2
  400. package/dist/cli/chunks/safe-db-QJLFO33B.js +0 -2
  401. package/dist/cli/chunks/schedule-YIVXW5O2.js +0 -2
  402. package/dist/cli/chunks/scheduler-AON7DWSJ.js +0 -2
  403. package/dist/cli/chunks/sqlite-persistence-75VHKKQB.js +0 -2
  404. package/dist/cli/chunks/sync-26CEGSTC.js +0 -2
  405. package/dist/cli/chunks/task-handlers-GYBAWKE2.js +0 -9
  406. package/dist/cli/chunks/test-MPC5HRH5.js +0 -33
  407. package/dist/cli/chunks/token-bootstrap-2Y2XITBX.js +0 -2
  408. package/dist/cli/chunks/unified-memory-UCQ6AB32.js +0 -2
  409. package/dist/cli/chunks/unified-memory-hnsw-IXYUMKRR.js +0 -2
  410. package/dist/cli/chunks/unified-persistence-7E6JQ4FZ.js +0 -2
  411. package/dist/cli/chunks/vibium-NILGKHLN.js +0 -2
  412. package/dist/cli/chunks/visual-security-4VZXPEVG.js +0 -2
  413. package/dist/cli/chunks/witness-chain-JQA2VPZI.js +0 -2
  414. package/dist/cli/chunks/witness-chain-repair-4UA7IPS3.js +0 -2
  415. package/dist/cli/chunks/workflow-orchestrator-GI5NQH7C.js +0 -2
  416. package/dist/cli/chunks/wrappers-N6XIK5PT.js +0 -2
@@ -37,6 +37,8 @@ export class InitHandler {
37
37
  .option('--wizard', 'Run interactive setup wizard')
38
38
  .option('--auto', 'Auto-configure based on project analysis')
39
39
  .option('-u, --upgrade', 'Upgrade existing installation (overwrite skills, agents, validation)')
40
+ .option('--browser-engine', 'Install optional Vibium and browser payload (explicit download)', false)
41
+ .option('--no-browser-engine', 'Skip optional browser setup (default)')
40
42
  .option('--minimal', 'Minimal configuration (skip optional features)')
41
43
  .option('--skip-patterns', 'Skip loading pre-trained patterns')
42
44
  .option('--skip-code-index', 'Skip code intelligence pre-scan (supported escape hatch — KG can be built later via `aqe code index`, also via env AQE_SKIP_CODE_INDEX=1)')
@@ -103,7 +105,7 @@ export class InitHandler {
103
105
  if (options.wizard || options.auto) {
104
106
  console.log(chalk.blue('\n Agentic QE v3 Initialization\n'));
105
107
  // Use modular orchestrator for --auto or --modular
106
- if (options.auto || options.modular) {
108
+ if (options.auto || options.modular || options.browserEngine) {
107
109
  await this.runModularInit(options, context);
108
110
  return;
109
111
  }
@@ -128,7 +130,7 @@ export class InitHandler {
128
130
  // surface it was meant to suppress.
129
131
  const noClaudeRequested = options.claude === false;
130
132
  const noStatusLineRequested = options.statusline === false;
131
- if (options.modular || platformRequested || databaseFree || noClaudeRequested || noStatusLineRequested) {
133
+ if (options.browserEngine || options.modular || platformRequested || databaseFree || noClaudeRequested || noStatusLineRequested) {
132
134
  console.log(chalk.blue('\n Agentic QE v3 Initialization\n'));
133
135
  await this.runModularInit(options, context);
134
136
  return;
@@ -173,6 +175,7 @@ export class InitHandler {
173
175
  autoMode: options.auto,
174
176
  upgrade: options.upgrade,
175
177
  minimal: options.minimal,
178
+ browserEngine: options.browserEngine,
176
179
  skipPatterns: options.skipPatterns,
177
180
  skipCodeIndex: options.skipCodeIndex,
178
181
  withN8n: options.withN8n,
@@ -301,6 +304,7 @@ export class InitHandler {
301
304
  projectRoot: process.cwd(),
302
305
  autoMode: options.auto,
303
306
  minimal: options.minimal,
307
+ browserEngine: options.browserEngine,
304
308
  skipPatterns: options.skipPatterns,
305
309
  withN8n: options.withN8n,
306
310
  };
@@ -449,6 +453,8 @@ Options:
449
453
  -u, --upgrade Upgrade existing installation (overwrite skills, agents, validation)
450
454
  --minimal Minimal configuration (skip optional features)
451
455
  --skip-patterns Skip loading pre-trained patterns
456
+ --browser-engine Install optional Vibium and browser payload
457
+ --no-browser-engine Skip browser setup (default)
452
458
  --with-n8n Install n8n workflow testing agents and skills
453
459
  --with-opencode Include OpenCode agent/skill provisioning
454
460
  --with-codex Include OpenAI Codex hooks, instructions, skills, and MCP
package/dist/cli/index.js CHANGED
@@ -214,6 +214,7 @@ program.hook('preAction', (_thisCommand, actionCommand) => {
214
214
  // ============================================================================
215
215
  import { registerLazyCommand, registerLazyHandler } from './lazy-registry.js';
216
216
  import { isForegroundCommandActive } from './foreground-command.js';
217
+ import { requestOwnedShutdown } from '../kernel/process-lifecycle.js';
217
218
  registerLazyHandler(program, 'init', 'Initialize the AQE v3 system', () => import('./handlers/init-handler.js').then(m => m.createInitHandler(cleanupAndExit)), context);
218
219
  registerLazyHandler(program, 'status', 'Show system status', () => import('./handlers/status-handler.js').then(m => m.createStatusHandler(cleanupAndExit, ensureInitializedStrict)), context);
219
220
  registerLazyHandler(program, 'health', 'Check system health', () => import('./handlers/status-handler.js').then(m => m.createHealthHandler(cleanupAndExit, ensureInitializedStrict)), context);
@@ -379,12 +380,19 @@ registerLazyCommand(program, {
379
380
  // ============================================================================
380
381
  // Shutdown Handlers
381
382
  // ============================================================================
383
+ // #801: `aqe mcp` runs the MCP server in this process and it claims the
384
+ // lifecycle; exiting here would pre-empt its graceful shutdown (which releases
385
+ // the shared patterns RVF lock). Every other command keeps the immediate exit.
382
386
  process.on('SIGINT', async () => {
387
+ if (requestOwnedShutdown('SIGINT'))
388
+ return;
383
389
  console.log(chalk.yellow('\n\nShutting down...'));
384
390
  console.log(chalk.green('Shutdown complete\n'));
385
391
  await cleanupAndExit(0);
386
392
  });
387
393
  process.on('SIGTERM', async () => {
394
+ if (requestOwnedShutdown('SIGTERM'))
395
+ return;
388
396
  console.log(chalk.yellow('\nReceived SIGTERM, shutting down gracefully...'));
389
397
  await cleanupAndExit(0);
390
398
  });
@@ -87,7 +87,7 @@ export function registerTestExecutionHandlers(ctx) {
87
87
  // Return a graceful fallback with warning when no source files provided
88
88
  return ok({
89
89
  testsGenerated: 0,
90
- coverageEstimate: 0,
90
+ coverageEstimate: null,
91
91
  tests: [],
92
92
  patternsUsed: [],
93
93
  warning: 'No source files or code provided for test generation. Provide sourceCode, filePath, or sourceFiles in the payload.',
@@ -111,6 +111,7 @@ export function registerTestExecutionHandlers(ctx) {
111
111
  coverageTarget: payload.coverageGoal || 80,
112
112
  patterns: [],
113
113
  importPathOverrides,
114
+ behaviorExamples: payload.behaviorExamples,
114
115
  });
115
116
  // Always clean up the temp file we created — even on failure
116
117
  if (tempPath) {
@@ -134,6 +135,8 @@ export function registerTestExecutionHandlers(ctx) {
134
135
  type: t.type,
135
136
  sourceFile: rewritten.sourceFile,
136
137
  assertions: t.assertions,
138
+ generationMode: t.generationMode,
139
+ generationLimits: t.generationLimits,
137
140
  testCode: rewritten.testCode,
138
141
  };
139
142
  });
@@ -148,13 +151,15 @@ export function registerTestExecutionHandlers(ctx) {
148
151
  patternsUsed: generatedTests.patternsUsed,
149
152
  llmEnhanced,
150
153
  ...(llmEnhanced ? {} : {
151
- generationMode: 'deterministic-template',
152
- note: payload.aiEnhancement === false
153
- ? 'LLM enhancement was disabled by the caller (aiEnhancement: false).'
154
- : 'No LLM provider was available, so tests are deterministic template ' +
155
- 'scaffolding rather than source-aware. Configure a provider in ' +
156
- '.agentic-qe/llm-config.json (or set a provider API key) and ensure ' +
157
- 'AQE_LLM_ROUTER_DISABLED is not set.',
154
+ generationMode: generatedTests.tests.some(t => t.generationMode === 'behavior-examples') ? 'behavior-examples' : 'deterministic-template',
155
+ note: generatedTests.tests.some(t => t.generationMode === 'behavior-examples')
156
+ ? 'Assertions use caller-supplied specification examples. Coverage is unmeasured; inspect generationLimits on each test.'
157
+ : payload.aiEnhancement === false
158
+ ? 'LLM enhancement was disabled by the caller (aiEnhancement: false). Coverage is unmeasured; inspect generationLimits on each test.'
159
+ : 'No LLM provider was available, so tests are deterministic template ' +
160
+ 'scaffolding rather than source-aware. Configure a provider in ' +
161
+ '.agentic-qe/llm-config.json (or set a provider API key) and ensure ' +
162
+ 'AQE_LLM_ROUTER_DISABLED is not set.',
158
163
  }),
159
164
  });
160
165
  }
@@ -7,7 +7,7 @@ export * from './consensus';
7
7
  export * from './claims';
8
8
  export type { Protocol, ProtocolSchedule, ProtocolAction, ProtocolExecution, ProtocolExecutionStatus, ActionExecutionResult, ActionExecutionStatus, ProtocolExecutor, WorkflowDefinition as CrossDomainWorkflowDefinition, WorkflowStep as CrossDomainWorkflowStep, WorkflowCondition, WorkflowTrigger as CrossDomainWorkflowTrigger, WorkflowHandler, WorkflowContext as CrossDomainWorkflowContext, WorkflowExecution as CrossDomainWorkflowExecution, WorkflowExecutionStatus as CrossDomainWorkflowExecutionStatus, StepExecutionResult as CrossDomainStepExecutionResult, WorkflowExecutor, CrossDomainHandler, CrossDomainHandlerConfig, DomainRoute, EventSubscription, EventCorrelation, EventAggregation, CrossDomainRouter, } from './interfaces';
9
9
  export { TaskAuditLogger, createTaskAuditLogger, } from './services';
10
- export type { TaskAuditEntry, TaskAuditConfig, TaskOperation, } from './services';
10
+ export type { TaskAuditEntry, TaskAuditSequencedEntry, TaskAuditConfig, TaskAuditFilter, TaskAuditWindow, TaskAuditSnapshot, TaskOperation, } from './services';
11
11
  export { CrossDomainEventRouter, createCrossDomainRouter, } from './cross-domain-router';
12
12
  export { DefaultProtocolExecutor, createProtocolExecutor, } from './protocol-executor';
13
13
  export { WorkflowOrchestrator, createWorkflowOrchestrator, WorkflowEvents, } from './workflow-orchestrator';
@@ -162,7 +162,7 @@ export async function handleTaskCompleted(ctx, event) {
162
162
  // Task failed handler
163
163
  // ============================================================================
164
164
  export async function handleTaskFailed(ctx, event) {
165
- const { taskId, error } = event.payload;
165
+ const { taskId, error, callerError } = event.payload;
166
166
  const cancelled = settleCancelledTask(ctx.tasks, taskId);
167
167
  if (cancelled.ignored) {
168
168
  if (cancelled.settledNow) {
@@ -177,8 +177,10 @@ export async function handleTaskFailed(ctx, event) {
177
177
  if (execution.status === 'running' || execution.status === 'assigned') {
178
178
  ctx.runningTaskCounter = Math.max(0, ctx.runningTaskCounter - 1);
179
179
  }
180
- // ADR-064: Record failure in domain circuit breaker
181
- if (ctx.domainBreakerRegistry && execution.assignedDomain) {
180
+ // ADR-064: Record failure in domain circuit breaker. A task rejected for
181
+ // invalid caller input says nothing about the domain's health, so it must
182
+ // not open the breaker for every other caller (#795).
183
+ if (ctx.domainBreakerRegistry && execution.assignedDomain && !callerError) {
182
184
  ctx.domainBreakerRegistry.getBreaker(execution.assignedDomain).recordFailure(new Error(error || 'Task failed'));
183
185
  }
184
186
  // ADR-064 Phase 3: Fail the trace span for this task
@@ -189,8 +191,9 @@ export async function handleTaskFailed(ctx, event) {
189
191
  ctx.taskTraceContexts.delete(taskId);
190
192
  }
191
193
  }
192
- // Check if we should retry
193
- if (execution.retryCount < ctx.config.taskRetryLimit) {
194
+ // Check if we should retry. Caller-input errors are deterministic, so a
195
+ // retry would fail the same way.
196
+ if (!callerError && execution.retryCount < ctx.config.taskRetryLimit) {
194
197
  ctx.auditLogger.logFail(taskId, execution.assignedAgents[0], error);
195
198
  const retried = {
196
199
  ...execution,
@@ -227,7 +230,7 @@ export async function handleTaskFailed(ctx, event) {
227
230
  }
228
231
  // ADR-064 Phase 4A: Create competing hypotheses investigation for
229
232
  // permanent failures in critical domains (p0/p1 priority)
230
- if (ctx.hypothesisManager && (execution.task.priority === 'p0' || execution.task.priority === 'p1')) {
233
+ if (!callerError && ctx.hypothesisManager && (execution.task.priority === 'p0' || execution.task.priority === 'p1')) {
231
234
  try {
232
235
  const domain = execution.assignedDomain || 'test-generation';
233
236
  const investigation = ctx.hypothesisManager.createInvestigation(taskId, domain, `Root cause analysis for ${execution.task.type} failure: ${error}`);
@@ -372,7 +372,7 @@ end_of_record
372
372
  | Metric | Value |
373
373
  |--------|-------|
374
374
  | Tests Generated | ${data.testsGenerated} |
375
- | Coverage Estimate | ${data.coverageEstimate}% |
375
+ | Coverage Estimate | ${data.coverageEstimate == null ? 'Unmeasured' : data.coverageEstimate + '%'} |
376
376
  | Patterns Used | ${data.patternsUsed.length} |
377
377
 
378
378
  ## Patterns Applied
@@ -2,5 +2,5 @@
2
2
  * Agentic QE v3 - Coordination Services
3
3
  * Exports services used by coordination components
4
4
  */
5
- export { TaskAuditLogger, createTaskAuditLogger, type TaskAuditEntry, type TaskAuditConfig, type TaskOperation, } from './task-audit-logger';
5
+ export { TaskAuditLogger, createTaskAuditLogger, type TaskAuditEntry, type TaskAuditSequencedEntry, type TaskAuditConfig, type TaskAuditFilter, type TaskAuditWindow, type TaskAuditSnapshot, type TaskOperation, } from './task-audit-logger';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -21,6 +21,34 @@ export interface TaskAuditEntry {
21
21
  readonly domain?: DomainName;
22
22
  readonly details?: Record<string, unknown>;
23
23
  }
24
+ /** An entry produced by this logger, positioned within its generation. */
25
+ export interface TaskAuditSequencedEntry extends TaskAuditEntry {
26
+ readonly sequence: number;
27
+ }
28
+ /** Filters select retained entries; they do not change retention metadata. */
29
+ export interface TaskAuditFilter {
30
+ operation?: TaskOperation;
31
+ taskId?: string;
32
+ agentId?: string;
33
+ domain?: DomainName;
34
+ fromTimestamp?: Date;
35
+ toTimestamp?: Date;
36
+ limit?: number;
37
+ }
38
+ /** Completeness of the bounded observation window since construction/clear. */
39
+ export interface TaskAuditWindow {
40
+ generation: string;
41
+ recordedEntries: number;
42
+ retainedEntries: number;
43
+ droppedEntries: number;
44
+ firstRetainedSequence: number | null;
45
+ lastRetainedSequence: number | null;
46
+ disposition: 'complete' | 'truncated';
47
+ }
48
+ /** Filtered entries with metadata for the entire retained window. */
49
+ export interface TaskAuditSnapshot extends TaskAuditWindow {
50
+ entries: TaskAuditSequencedEntry[];
51
+ }
24
52
  /**
25
53
  * Configuration for task audit logger
26
54
  */
@@ -41,6 +69,9 @@ export interface TaskAuditConfig {
41
69
  export declare class TaskAuditLogger {
42
70
  private readonly entries;
43
71
  private readonly config;
72
+ private generation;
73
+ private recordedEntries;
74
+ private droppedEntries;
44
75
  constructor(config?: Partial<TaskAuditConfig>);
45
76
  /**
46
77
  * Log a task operation
@@ -65,19 +96,13 @@ export declare class TaskAuditLogger {
65
96
  /**
66
97
  * Get audit entries with optional filtering
67
98
  */
68
- getEntries(filter?: {
69
- operation?: TaskOperation;
70
- taskId?: string;
71
- agentId?: string;
72
- domain?: DomainName;
73
- fromTimestamp?: Date;
74
- toTimestamp?: Date;
75
- limit?: number;
76
- }): TaskAuditEntry[];
77
- /**
78
- * Get statistics about task operations
79
- */
80
- getStatistics(): {
99
+ getEntries(filter?: TaskAuditFilter): TaskAuditSequencedEntry[];
100
+ /** Get selected entries without losing evidence of earlier evictions/resets. */
101
+ getSnapshot(filter?: TaskAuditFilter): TaskAuditSnapshot;
102
+ private getWindow;
103
+ /** Get counts for the retained window, with its completeness metadata. */
104
+ getStatistics(): TaskAuditWindow & {
105
+ basis: 'retained-window';
81
106
  totalEntries: number;
82
107
  operationCounts: Record<TaskOperation, number>;
83
108
  taskCount: number;
@@ -5,6 +5,7 @@
5
5
  * This replaces the full authorization service with simple audit logging
6
6
  * for a local CLI tool where all agents are trusted.
7
7
  */
8
+ import { randomUUID } from 'node:crypto';
8
9
  const DEFAULT_CONFIG = {
9
10
  enableConsoleLog: true,
10
11
  maxEntries: 1000,
@@ -19,14 +20,21 @@ const DEFAULT_CONFIG = {
19
20
  export class TaskAuditLogger {
20
21
  entries = [];
21
22
  config;
23
+ generation = randomUUID();
24
+ recordedEntries = 0;
25
+ droppedEntries = 0;
22
26
  constructor(config = {}) {
23
27
  this.config = { ...DEFAULT_CONFIG, ...config };
28
+ if (!Number.isSafeInteger(this.config.maxEntries) || this.config.maxEntries < 0) {
29
+ throw new RangeError('maxEntries must be a non-negative safe integer');
30
+ }
24
31
  }
25
32
  /**
26
33
  * Log a task operation
27
34
  */
28
35
  log(operation, taskId, options) {
29
36
  const entry = {
37
+ sequence: ++this.recordedEntries,
30
38
  timestamp: new Date(),
31
39
  operation,
32
40
  taskId,
@@ -37,7 +45,9 @@ export class TaskAuditLogger {
37
45
  this.entries.push(entry);
38
46
  // Trim if exceeds max
39
47
  if (this.entries.length > this.config.maxEntries) {
40
- this.entries.splice(0, this.entries.length - this.config.maxEntries);
48
+ const dropped = this.entries.length - this.config.maxEntries;
49
+ this.entries.splice(0, dropped);
50
+ this.droppedEntries += dropped;
41
51
  }
42
52
  // Console log if enabled
43
53
  if (this.config.enableConsoleLog) {
@@ -102,11 +112,24 @@ export class TaskAuditLogger {
102
112
  }
103
113
  }
104
114
  const limit = filter?.limit ?? result.length;
105
- return result.slice(-limit);
115
+ return limit === 0 ? [] : result.slice(-limit);
106
116
  }
107
- /**
108
- * Get statistics about task operations
109
- */
117
+ /** Get selected entries without losing evidence of earlier evictions/resets. */
118
+ getSnapshot(filter) {
119
+ return { ...this.getWindow(), entries: this.getEntries(filter) };
120
+ }
121
+ getWindow() {
122
+ return {
123
+ generation: this.generation,
124
+ recordedEntries: this.recordedEntries,
125
+ retainedEntries: this.entries.length,
126
+ droppedEntries: this.droppedEntries,
127
+ firstRetainedSequence: this.entries[0]?.sequence ?? null,
128
+ lastRetainedSequence: this.entries[this.entries.length - 1]?.sequence ?? null,
129
+ disposition: this.droppedEntries > 0 ? 'truncated' : 'complete',
130
+ };
131
+ }
132
+ /** Get counts for the retained window, with its completeness metadata. */
110
133
  getStatistics() {
111
134
  const operationCounts = {
112
135
  submit: 0,
@@ -129,6 +152,8 @@ export class TaskAuditLogger {
129
152
  }
130
153
  }
131
154
  return {
155
+ ...this.getWindow(),
156
+ basis: 'retained-window',
132
157
  totalEntries: this.entries.length,
133
158
  operationCounts,
134
159
  taskCount: taskIds.size,
@@ -140,6 +165,9 @@ export class TaskAuditLogger {
140
165
  */
141
166
  clear() {
142
167
  this.entries.length = 0;
168
+ this.generation = randomUUID();
169
+ this.recordedEntries = 0;
170
+ this.droppedEntries = 0;
143
171
  }
144
172
  }
145
173
  /**
@@ -154,6 +154,11 @@ export declare class DomainTaskExecutor implements TaskHandlerContext {
154
154
  private getTaskDomain;
155
155
  private timeout;
156
156
  private publishTaskCompleted;
157
+ /**
158
+ * @param callerError true when the task was rejected because of invalid
159
+ * caller input; the queen then neither retries it nor counts it toward
160
+ * the domain circuit breaker.
161
+ */
157
162
  private publishTaskFailed;
158
163
  }
159
164
  export declare function createTaskExecutor(kernel: QEKernel, config?: Partial<TaskExecutorConfig>): DomainTaskExecutor;
@@ -13,7 +13,7 @@
13
13
  * Handler implementations are extracted into ./handlers/ modules.
14
14
  */
15
15
  import { v4 as uuidv4 } from 'uuid';
16
- import { toErrorMessage } from '../shared/error-utils.js';
16
+ import { isCallerInputError, toErrorMessage } from '../shared/error-utils.js';
17
17
  import { createResultSaver } from './result-saver.js';
18
18
  import { createLogger } from '../logging/logger-factory.js';
19
19
  import { getClaudeModelForTier } from '../shared/llm/model-registry.js';
@@ -436,7 +436,7 @@ export class DomainTaskExecutor {
436
436
  ]);
437
437
  if (!result.success) {
438
438
  const errorMsg = 'error' in result ? result.error.message : 'Unknown error';
439
- await this.publishTaskFailed(task.id, errorMsg, domain);
439
+ await this.publishTaskFailed(task.id, errorMsg, domain, 'error' in result && isCallerInputError(result.error));
440
440
  // ADR-051: Record failed outcome
441
441
  this.recordOutcome(task, routingTier, false, Date.now() - startTime).catch((e) => { logger.warn('recordOutcome failed', { error: e instanceof Error ? e.message : String(e), taskId: task.id }); });
442
442
  return {
@@ -486,7 +486,7 @@ export class DomainTaskExecutor {
486
486
  }
487
487
  catch (error) {
488
488
  const errorMessage = toErrorMessage(error);
489
- await this.publishTaskFailed(task.id, errorMessage, domain);
489
+ await this.publishTaskFailed(task.id, errorMessage, domain, isCallerInputError(error));
490
490
  // ADR-051: Record failed outcome
491
491
  this.recordOutcome(task, routingTier, false, Date.now() - startTime).catch((e) => { logger.warn('recordOutcome failed', { error: e instanceof Error ? e.message : String(e), taskId: task.id }); });
492
492
  return {
@@ -655,13 +655,18 @@ export class DomainTaskExecutor {
655
655
  payload: { taskId, result },
656
656
  });
657
657
  }
658
- async publishTaskFailed(taskId, error, domain) {
658
+ /**
659
+ * @param callerError true when the task was rejected because of invalid
660
+ * caller input; the queen then neither retries it nor counts it toward
661
+ * the domain circuit breaker.
662
+ */
663
+ async publishTaskFailed(taskId, error, domain, callerError = false) {
659
664
  await this.eventBus.publish({
660
665
  id: uuidv4(),
661
666
  type: 'TaskFailed',
662
667
  timestamp: new Date(),
663
668
  source: domain,
664
- payload: { taskId, error },
669
+ payload: { taskId, error, ...(callerError ? { callerError: true } : {}) },
665
670
  });
666
671
  }
667
672
  }
@@ -249,7 +249,7 @@ export class TestGenerationCoordinator extends BaseDomainCoordinator {
249
249
  this.startWorkflow(workflowId, 'generate');
250
250
  // Opt-in (plan 06, D7-wire): try the FREE local model first with a repair
251
251
  // loop. Fully guarded — any miss falls through to the normal LLM path.
252
- if (this.freeTierExecutor) {
252
+ if (this.freeTierExecutor && !request.behaviorExamples?.length) {
253
253
  try {
254
254
  const ft = await this.tryFreeTierGeneration(request);
255
255
  if (ft) {
@@ -354,11 +354,12 @@ export class TestGenerationCoordinator extends BaseDomainCoordinator {
354
354
  }
355
355
  }
356
356
  // Three-loop protocol: instantAdapt must precede recordOutcome
357
- if (isSONAThreeLoopEnabled() && this.qesona?.isThreeLoopEnabled()) {
357
+ const coverageEstimate = result.value.coverageEstimate;
358
+ if (coverageEstimate !== null && isSONAThreeLoopEnabled() && this.qesona?.isThreeLoopEnabled()) {
358
359
  const tests = result.value;
359
360
  this.qesona.instantAdapt([
360
361
  tests.tests.length / 20,
361
- tests.coverageEstimate / 100,
362
+ coverageEstimate / 100,
362
363
  tests.patternsUsed.length / 10,
363
364
  request.sourceFiles.length / 20,
364
365
  (request.coverageTarget ?? 80) / 100,
@@ -476,7 +477,7 @@ export class TestGenerationCoordinator extends BaseDomainCoordinator {
476
477
  framework,
477
478
  llmEnhanced: true,
478
479
  };
479
- return { tests: [test], coverageEstimate: 0, patternsUsed: ['free-tier-local', `tier:${r.tierUsed}`] };
480
+ return { tests: [test], coverageEstimate: null, patternsUsed: ['free-tier-local', `tier:${r.tierUsed}`] };
480
481
  }
481
482
  /**
482
483
  * Generate tests using TDD workflow
@@ -953,7 +954,7 @@ export class TestGenerationCoordinator extends BaseDomainCoordinator {
953
954
  * Per ADR-040: Store test generation patterns in SONA
954
955
  */
955
956
  async storeTestGenerationPattern(tests, request) {
956
- if (!this.qesona) {
957
+ if (!this.qesona || tests.coverageEstimate === null) {
957
958
  return;
958
959
  }
959
960
  try {
@@ -16,7 +16,14 @@ export interface ITestGenerationAPI {
16
16
  /** Learn patterns from existing tests */
17
17
  learnPatterns(request: ILearnPatternsRequest): Promise<Result<ILearnedPatterns, Error>>;
18
18
  }
19
+ /** Caller-owned specifications; expected values are never inferred from source. */
20
+ export interface BehaviorExample {
21
+ functionName: string;
22
+ args: unknown[];
23
+ expected: unknown;
24
+ }
19
25
  export interface IGenerateTestsRequest {
26
+ behaviorExamples?: BehaviorExample[];
20
27
  sourceFiles: string[];
21
28
  testType: 'unit' | 'integration' | 'e2e';
22
29
  framework?: TestFramework;
@@ -41,7 +48,8 @@ export interface IGenerateTestsRequest {
41
48
  }
42
49
  export interface IGeneratedTests {
43
50
  tests: IGeneratedTest[];
44
- coverageEstimate: number;
51
+ /** null means unmeasured; never coerce unknown coverage to measured zero. */
52
+ coverageEstimate: number | null;
45
53
  /** Human-readable pattern names, for display (reports, CLI output). */
46
54
  patternsUsed: string[];
47
55
  /** Real qe_patterns.id values for the same patterns, for usage/ADR-110 tracking. */
@@ -61,6 +69,8 @@ export interface IGeneratedTest {
61
69
  compilationErrors?: string[];
62
70
  /** ADR-051: Whether test was enhanced by LLM */
63
71
  llmEnhanced?: boolean;
72
+ generationMode?: 'behavior-examples' | 'scaffolding';
73
+ generationLimits?: string[];
64
74
  /** Test quality gate validation result (loki-mode Gates 8 & 9) */
65
75
  qualityGateResult?: TestQualityGateResult;
66
76
  /** ADR-062: Whether this test is a holdout test (not shown to developer, runs in CI only) */
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Boundary validation for caller-supplied behavior examples (#787 / #795).
3
+ *
4
+ * Shared by the MCP handlers, the CLI `--behavior-examples` path and the
5
+ * domain service so every entry point rejects the same malformed input with
6
+ * the same message. Failures are `CallerInputError`s: they are the caller's
7
+ * problem, not a sign of an unhealthy test-generation domain, and must never
8
+ * count toward its circuit breaker.
9
+ *
10
+ * Only the shape is checked here. Whether `functionName` exists in the source
11
+ * and whether `args` matches its arity can only be decided against the parsed
12
+ * source (see behavior-examples.ts), which also throws `CallerInputError`.
13
+ *
14
+ * Kept free of heavy imports (no `typescript`) so boundary layers can use it.
15
+ */
16
+ import type { BehaviorExample } from '../interfaces.js';
17
+ /**
18
+ * JSON Schema for one `behaviorExamples` element. Single source of truth for
19
+ * every tool definition that advertises `behaviorExamples` (protocol server
20
+ * `test_generate_enhanced` and `qe/tests/generate`).
21
+ */
22
+ export declare const BEHAVIOR_EXAMPLE_ITEM_SCHEMA: Record<string, unknown>;
23
+ /**
24
+ * Throw unless `value` is plain JSON data that can be emitted as a literal:
25
+ * finite numbers (no -0), strings, booleans, null, arrays and plain objects,
26
+ * without cycles.
27
+ */
28
+ export declare function assertBehaviorJsonValue(value: unknown, label?: string): void;
29
+ /**
30
+ * Validate the shape of `behaviorExamples` at a system boundary.
31
+ *
32
+ * @returns the examples typed as `BehaviorExample[]`, or `undefined` when omitted
33
+ * @throws CallerInputError describing the first invalid entry
34
+ */
35
+ export declare function validateBehaviorExamples(value: unknown): BehaviorExample[] | undefined;
36
+ //# sourceMappingURL=behavior-example-validation.d.ts.map
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Boundary validation for caller-supplied behavior examples (#787 / #795).
3
+ *
4
+ * Shared by the MCP handlers, the CLI `--behavior-examples` path and the
5
+ * domain service so every entry point rejects the same malformed input with
6
+ * the same message. Failures are `CallerInputError`s: they are the caller's
7
+ * problem, not a sign of an unhealthy test-generation domain, and must never
8
+ * count toward its circuit breaker.
9
+ *
10
+ * Only the shape is checked here. Whether `functionName` exists in the source
11
+ * and whether `args` matches its arity can only be decided against the parsed
12
+ * source (see behavior-examples.ts), which also throws `CallerInputError`.
13
+ *
14
+ * Kept free of heavy imports (no `typescript`) so boundary layers can use it.
15
+ */
16
+ import { CallerInputError } from '../../../shared/error-utils.js';
17
+ const SHAPE_HINT = 'expected [{ "functionName": "add", "args": [2, 3], "expected": 5 }]';
18
+ /**
19
+ * JSON Schema for one `behaviorExamples` element. Single source of truth for
20
+ * every tool definition that advertises `behaviorExamples` (protocol server
21
+ * `test_generate_enhanced` and `qe/tests/generate`).
22
+ */
23
+ export const BEHAVIOR_EXAMPLE_ITEM_SCHEMA = {
24
+ type: 'object',
25
+ description: 'One caller-owned specification example',
26
+ properties: {
27
+ functionName: { type: 'string', description: 'Named export of the source file to call' },
28
+ args: { type: 'array', description: 'Positional JSON arguments; length must equal the function arity', items: {} },
29
+ expected: { description: 'Expected JSON return value (use null for a null result)' },
30
+ },
31
+ required: ['functionName', 'args', 'expected'],
32
+ };
33
+ /**
34
+ * Throw unless `value` is plain JSON data that can be emitted as a literal:
35
+ * finite numbers (no -0), strings, booleans, null, arrays and plain objects,
36
+ * without cycles.
37
+ */
38
+ export function assertBehaviorJsonValue(value, label = 'Behavior example value') {
39
+ const visit = (v, seen) => {
40
+ if (v === null || typeof v === 'string' || typeof v === 'boolean')
41
+ return;
42
+ if (typeof v === 'number' && Number.isFinite(v) && !Object.is(v, -0))
43
+ return;
44
+ if (typeof v !== 'object' || seen.has(v)) {
45
+ throw new CallerInputError(`${label} must be finite JSON data (no undefined, functions, NaN/Infinity, cycles, or negative zero)`);
46
+ }
47
+ if (!Array.isArray(v) && Object.getPrototypeOf(v) !== Object.prototype && Object.getPrototypeOf(v) !== null) {
48
+ throw new CallerInputError(`${label} must contain only plain JSON objects`);
49
+ }
50
+ seen.add(v);
51
+ for (const item of Array.isArray(v) ? Array.from(v) : Object.values(v))
52
+ visit(item, seen);
53
+ seen.delete(v);
54
+ };
55
+ visit(value, new Set());
56
+ }
57
+ /**
58
+ * Validate the shape of `behaviorExamples` at a system boundary.
59
+ *
60
+ * @returns the examples typed as `BehaviorExample[]`, or `undefined` when omitted
61
+ * @throws CallerInputError describing the first invalid entry
62
+ */
63
+ export function validateBehaviorExamples(value) {
64
+ if (value === undefined)
65
+ return undefined;
66
+ if (!Array.isArray(value)) {
67
+ throw new CallerInputError(`behaviorExamples must be an array; ${SHAPE_HINT}`);
68
+ }
69
+ value.forEach((example, index) => {
70
+ const at = `behaviorExamples[${index}]`;
71
+ if (typeof example !== 'object' || example === null || Array.isArray(example)) {
72
+ throw new CallerInputError(`${at} must be an object; ${SHAPE_HINT}`);
73
+ }
74
+ const record = example;
75
+ if (typeof record.functionName !== 'string' || record.functionName.trim() === '') {
76
+ throw new CallerInputError(`${at}.functionName must be a non-empty string`);
77
+ }
78
+ if (!Array.isArray(record.args)) {
79
+ throw new CallerInputError(`${at}.args must be an array of arguments`);
80
+ }
81
+ if (!Object.prototype.hasOwnProperty.call(record, 'expected')) {
82
+ throw new CallerInputError(`${at}.expected is required (use null for a null result)`);
83
+ }
84
+ assertBehaviorJsonValue(record.args, `${at}.args`);
85
+ assertBehaviorJsonValue(record.expected, `${at}.expected`);
86
+ });
87
+ return value;
88
+ }
89
+ //# sourceMappingURL=behavior-example-validation.js.map
@@ -0,0 +1,8 @@
1
+ import type { BehaviorExample } from '../interfaces.js';
2
+ export declare function generateBehaviorExamples(source: string, sourceFile: string, importPath: string, framework: string, examples: BehaviorExample[] | undefined, testType: string): {
3
+ code: string;
4
+ limits: string[];
5
+ assertions: number;
6
+ mode: "behavior-examples" | "scaffolding";
7
+ };
8
+ //# sourceMappingURL=behavior-examples.d.ts.map