agentic-qe 3.14.6 → 3.14.8

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 (467) hide show
  1. package/.claude/helpers/.helpers-version +1 -1
  2. package/.claude/helpers/auto-memory-hook.mjs +18 -9
  3. package/.claude/helpers/helpers.manifest.json +6 -5
  4. package/.claude/helpers/hook-handler.cjs +40 -12
  5. package/.claude/helpers/memory.cjs +86 -0
  6. package/.claude/helpers/router.cjs +105 -0
  7. package/.claude/helpers/session.cjs +166 -0
  8. package/.claude/helpers/statusline.cjs +73 -621
  9. package/.claude/skills/skills-manifest.json +1 -1
  10. package/CHANGELOG.md +204 -0
  11. package/assets/skills/skills-manifest.json +1 -1
  12. package/dist/adapters/a2a/notifications/retry-queue.js +5 -0
  13. package/dist/adapters/claude-flow/pretrain-bridge.js +3 -2
  14. package/dist/agents/claim-verifier/verifiers/file-verifier.js +3 -2
  15. package/dist/cli/bundle.js +8 -8
  16. package/dist/cli/chunks/adapter-XYCOXQCC.js +2 -0
  17. package/dist/cli/chunks/{agent-booster-wasm-2YGML6OU.js → agent-booster-wasm-67OKGDGZ.js} +2 -2
  18. package/dist/cli/chunks/{agent-handler-D5SSQYNU.js → agent-handler-4HZEQ3WQ.js} +2 -2
  19. package/dist/cli/chunks/{agent-memory-branch-YHPLTITV.js → agent-memory-branch-IBHZQSRN.js} +2 -2
  20. package/dist/cli/chunks/aqe-learning-engine-DTJCROTG.js +2 -0
  21. package/dist/cli/chunks/{arena-7BGOXGXO.js → arena-EJBIGSF4.js} +2 -2
  22. package/dist/cli/chunks/{arena-MCE6EU7K.js → arena-LCLRGUIK.js} +4 -4
  23. package/dist/cli/chunks/{audit-BMWTQECB.js → audit-PY4JNDQQ.js} +3 -3
  24. package/dist/cli/chunks/base-5TQ34GMD.js +2 -0
  25. package/dist/cli/chunks/{better-sqlite3-PMUNGASU.js → better-sqlite3-2JG5K6XT.js} +2 -2
  26. package/dist/cli/chunks/{brain-handler-QPUFYX7F.js → brain-handler-3UYK55GA.js} +4 -4
  27. package/dist/cli/chunks/{branch-enumerator-WKFDGRN4.js → branch-enumerator-GOSWOX46.js} +2 -2
  28. package/dist/cli/chunks/{browser-VY5HKH5X.js → browser-DC2JV47Z.js} +2 -2
  29. package/dist/cli/chunks/browser-workflow-KWX4ESTJ.js +2 -0
  30. package/dist/cli/chunks/{chunk-FWASDOT2.js → chunk-25EEIAHS.js} +2 -2
  31. package/dist/cli/chunks/{chunk-P6OYS755.js → chunk-3576QGPP.js} +1 -1
  32. package/dist/cli/chunks/{chunk-2TMWAQQ3.js → chunk-3EKG7HFV.js} +4 -4
  33. package/dist/cli/chunks/{chunk-QZANMBIT.js → chunk-3FCHH4VP.js} +1 -1
  34. package/dist/cli/chunks/{chunk-CD542DNJ.js → chunk-3S5IIK32.js} +1 -1
  35. package/dist/cli/chunks/{chunk-5VFPCSK7.js → chunk-3X2JSW3R.js} +1 -1
  36. package/dist/cli/chunks/{chunk-D45SG6CP.js → chunk-4HXFPBAA.js} +1 -1
  37. package/dist/cli/chunks/{chunk-JVNTSNWU.js → chunk-4PY44TKH.js} +2 -2
  38. package/dist/cli/chunks/{chunk-DZ3AUAAB.js → chunk-4RNCVSVN.js} +2 -2
  39. package/dist/cli/chunks/{chunk-JBTPOIAC.js → chunk-56M4QNXU.js} +2 -2
  40. package/dist/cli/chunks/{chunk-H52HZ67P.js → chunk-5X4HDW5W.js} +2 -2
  41. package/dist/cli/chunks/{chunk-UNFFDHER.js → chunk-673XJBGW.js} +10 -32
  42. package/dist/cli/chunks/{chunk-RTFO5UQH.js → chunk-6F7MFHTY.js} +2 -2
  43. package/dist/cli/chunks/{chunk-Y3LZ35OG.js → chunk-6GJWT2OY.js} +2 -2
  44. package/dist/cli/chunks/{chunk-JXGFRBUO.js → chunk-6GNWVPMR.js} +2 -2
  45. package/dist/cli/chunks/{chunk-3EA536JF.js → chunk-6VTC3OHD.js} +2 -2
  46. package/dist/cli/chunks/{chunk-W6HXLH5G.js → chunk-775WGWLL.js} +3 -3
  47. package/dist/cli/chunks/{chunk-TVYY3OCX.js → chunk-77WL5HQW.js} +1 -1
  48. package/dist/cli/chunks/chunk-7STWD4KJ.js +3 -0
  49. package/dist/cli/chunks/{chunk-YSLL6VSL.js → chunk-7TNCEVWX.js} +2 -2
  50. package/dist/cli/chunks/{chunk-Z7WODOTH.js → chunk-7X3LMTRA.js} +2 -2
  51. package/dist/cli/chunks/{chunk-RZZCUIAI.js → chunk-A53MMSGC.js} +2 -2
  52. package/dist/cli/chunks/{chunk-QW6VMTBR.js → chunk-A5CLVZC3.js} +2 -2
  53. package/dist/cli/chunks/{chunk-IG5GNEC6.js → chunk-AEYJ4ZLA.js} +1 -1
  54. package/dist/cli/chunks/{chunk-NMAIY4PX.js → chunk-AJ5PCJQ2.js} +11 -11
  55. package/dist/cli/chunks/{chunk-WO4QMXIG.js → chunk-AJMAKUS3.js} +2 -2
  56. package/dist/cli/chunks/{chunk-2NPKIBAZ.js → chunk-AOD2ES44.js} +2 -2
  57. package/dist/cli/chunks/chunk-AR2S4DOB.js +2 -0
  58. package/dist/cli/chunks/{chunk-257E2A5M.js → chunk-AUFV2G2J.js} +5 -5
  59. package/dist/cli/chunks/{chunk-BVR7RMC5.js → chunk-B2QKBQYD.js} +1 -1
  60. package/dist/cli/chunks/{chunk-B6D2CHEH.js → chunk-BCCSV3RH.js} +1 -1
  61. package/dist/cli/chunks/{chunk-2YXGBZWV.js → chunk-BFIXUKOR.js} +1 -1
  62. package/dist/cli/chunks/chunk-BHPTHC5O.js +4 -0
  63. package/dist/cli/chunks/{chunk-AIRGNL55.js → chunk-BITFGVZ4.js} +2 -2
  64. package/dist/cli/chunks/{chunk-MBRHSU6W.js → chunk-BL6273KR.js} +10 -10
  65. package/dist/cli/chunks/{chunk-SMDN3BQZ.js → chunk-BOIUENWW.js} +1 -1
  66. package/dist/cli/chunks/{chunk-YS4FCTWF.js → chunk-BT3MI2BW.js} +1 -1
  67. package/dist/cli/chunks/{chunk-JZOS5FCX.js → chunk-BTBJ2NLH.js} +2 -2
  68. package/dist/cli/chunks/{chunk-CCK4BF76.js → chunk-BUVJIVFG.js} +1 -1
  69. package/dist/cli/chunks/{chunk-2JVWITNK.js → chunk-BZIPW2PA.js} +56 -80
  70. package/dist/cli/chunks/{chunk-BPEDWS6O.js → chunk-C647D42G.js} +2 -2
  71. package/dist/cli/chunks/{chunk-6U7LNMWZ.js → chunk-CBWM5NOO.js} +3 -3
  72. package/dist/cli/chunks/{chunk-72KXSMWI.js → chunk-CIEXUYY7.js} +1 -1
  73. package/dist/cli/chunks/{chunk-SE4WIB26.js → chunk-CLUHGBLN.js} +4 -4
  74. package/dist/cli/chunks/{chunk-JIXUMYKZ.js → chunk-CQEWL32R.js} +1 -1
  75. package/dist/cli/chunks/{chunk-CM7U6TAX.js → chunk-CXUC7YKA.js} +2 -2
  76. package/dist/cli/chunks/{chunk-7LPR6HJG.js → chunk-D2Y36V5J.js} +2 -2
  77. package/dist/cli/chunks/{chunk-BJTJLJRZ.js → chunk-DSJJHPPS.js} +4 -4
  78. package/dist/cli/chunks/{chunk-ZVWVV4EX.js → chunk-DZHXCOSK.js} +1 -1
  79. package/dist/cli/chunks/{chunk-7Z5LHRC3.js → chunk-EBV3WFIR.js} +2 -2
  80. package/dist/cli/chunks/{chunk-KNNISEDY.js → chunk-EKO5QL2B.js} +1 -1
  81. package/dist/cli/chunks/{chunk-XAS3XRYM.js → chunk-EMOZ5O5S.js} +1 -1
  82. package/dist/cli/chunks/{chunk-62N4NUJH.js → chunk-ES7TAJRJ.js} +2 -2
  83. package/dist/cli/chunks/chunk-EXQGHTPD.js +65 -0
  84. package/dist/cli/chunks/{chunk-Q7EAGKAE.js → chunk-F2WAB4WK.js} +2 -2
  85. package/dist/cli/chunks/{chunk-L4RUBPLR.js → chunk-F57FTFWS.js} +2 -2
  86. package/dist/cli/chunks/{chunk-GGRHV6D7.js → chunk-F6JJNBE5.js} +1 -1
  87. package/dist/cli/chunks/{chunk-3EZOZN25.js → chunk-FRC7AFB4.js} +2 -2
  88. package/dist/cli/chunks/{chunk-RSXXCL4A.js → chunk-G36RZF2Y.js} +1 -1
  89. package/dist/cli/chunks/{chunk-ZSPU4MOS.js → chunk-G3C7Z6FO.js} +2 -2
  90. package/dist/cli/chunks/{chunk-SNOBH4AZ.js → chunk-GA63ESNT.js} +2 -2
  91. package/dist/cli/chunks/{chunk-HNFVJP4I.js → chunk-GHMJFICO.js} +2 -2
  92. package/dist/cli/chunks/{chunk-7D3V65N5.js → chunk-GK5WLUX3.js} +1 -1
  93. package/dist/cli/chunks/{chunk-RETBYIAC.js → chunk-GQJ4QDEN.js} +6 -6
  94. package/dist/cli/chunks/chunk-GVLRE3BV.js +12 -0
  95. package/dist/cli/chunks/{chunk-MW2GGZZ5.js → chunk-H5UH234L.js} +1 -1
  96. package/dist/cli/chunks/{chunk-HM6ZSCPI.js → chunk-HBAFXWSO.js} +1 -1
  97. package/dist/cli/chunks/{chunk-DHVX5UB2.js → chunk-HE3BDBAO.js} +2 -2
  98. package/dist/cli/chunks/{chunk-YFBSPLJG.js → chunk-HHANMCD2.js} +1 -1
  99. package/dist/cli/chunks/chunk-HPVYJ6JH.js +2 -0
  100. package/dist/cli/chunks/{chunk-PX5YDCRH.js → chunk-I6NZFBT3.js} +3 -3
  101. package/dist/cli/chunks/{chunk-5J6W7SIA.js → chunk-ISBOHF6Y.js} +1 -1
  102. package/dist/cli/chunks/{chunk-UCFQALXO.js → chunk-J24AJEDE.js} +2 -2
  103. package/dist/cli/chunks/{chunk-FBMN7B46.js → chunk-J5HTQHJK.js} +2 -2
  104. package/dist/cli/chunks/{chunk-GPYVDFB3.js → chunk-JDOVO4E4.js} +205 -195
  105. package/dist/cli/chunks/chunk-JQAJUXRE.js +2 -0
  106. package/dist/cli/chunks/{chunk-RG52OKAM.js → chunk-JRK5GX56.js} +1 -1
  107. package/dist/cli/chunks/{chunk-I33ERSGB.js → chunk-JRLZ7LZ3.js} +2 -2
  108. package/dist/cli/chunks/{chunk-NQZ5AR3D.js → chunk-JTOFLDU7.js} +2 -2
  109. package/dist/cli/chunks/{chunk-NHWGMJAP.js → chunk-K6EOHGKS.js} +2 -2
  110. package/dist/cli/chunks/{chunk-5QQSIGUA.js → chunk-KKXH25IH.js} +2 -2
  111. package/dist/cli/chunks/{chunk-VGFFFKGK.js → chunk-KNSQWM2E.js} +2 -2
  112. package/dist/cli/chunks/{chunk-B6MOJC3X.js → chunk-L5T32SRF.js} +1 -1
  113. package/dist/cli/chunks/{chunk-WGM35YWL.js → chunk-LKFBW2QM.js} +2 -2
  114. package/dist/cli/chunks/{chunk-AJRUJAAK.js → chunk-LMAI74EP.js} +1 -1
  115. package/dist/cli/chunks/{chunk-C6KWXUFJ.js → chunk-LQVS5IWH.js} +2 -2
  116. package/dist/cli/chunks/{chunk-H5BS5VH7.js → chunk-LRGTPUJA.js} +2 -2
  117. package/dist/cli/chunks/{chunk-3HZS4M3O.js → chunk-LTHV4PIG.js} +2 -2
  118. package/dist/cli/chunks/{chunk-7CUQCCMD.js → chunk-M7QKCHLQ.js} +2 -2
  119. package/dist/cli/chunks/{chunk-CF2ISEOJ.js → chunk-N3ASALOL.js} +2 -2
  120. package/dist/cli/chunks/{chunk-ZCRTRYXK.js → chunk-NEXBTLN6.js} +2 -2
  121. package/dist/cli/chunks/{chunk-VMNWDJIZ.js → chunk-NJEEKYEP.js} +3 -3
  122. package/dist/cli/chunks/{chunk-ZEV3YTO7.js → chunk-NWUFTLSF.js} +2 -2
  123. package/dist/cli/chunks/{chunk-MQROI74N.js → chunk-O4QB2GFL.js} +2 -2
  124. package/dist/cli/chunks/{chunk-GDSXITFH.js → chunk-OA75C4HY.js} +2 -2
  125. package/dist/cli/chunks/{chunk-SESK3ARK.js → chunk-OVMG6EEF.js} +2 -2
  126. package/dist/cli/chunks/{chunk-MUOG6QXR.js → chunk-OX7MJFLC.js} +2 -2
  127. package/dist/cli/chunks/{chunk-ELLBS5RP.js → chunk-OZJQN7YE.js} +2 -2
  128. package/dist/cli/chunks/{chunk-D6CJIGRU.js → chunk-PFXCRRR6.js} +55 -55
  129. package/dist/cli/chunks/{chunk-ZL6SYKUK.js → chunk-PVJLQ2YZ.js} +1 -1
  130. package/dist/cli/chunks/{chunk-6LIHFV7O.js → chunk-QDRFLM77.js} +2 -2
  131. package/dist/cli/chunks/{chunk-H6ZM3PUT.js → chunk-QH7C4PTX.js} +1 -1
  132. package/dist/cli/chunks/chunk-QKM4XT2F.js +2 -0
  133. package/dist/cli/chunks/{chunk-V4DM6ELU.js → chunk-QP7EKLWU.js} +2 -2
  134. package/dist/cli/chunks/{chunk-BAMN2CHI.js → chunk-QPACHVDI.js} +1 -1
  135. package/dist/cli/chunks/{chunk-QDFTT3RF.js → chunk-QQVE65ER.js} +2 -2
  136. package/dist/cli/chunks/{chunk-LL3IGZBI.js → chunk-QYCZYJH7.js} +2 -2
  137. package/dist/cli/chunks/{chunk-DUYOVM5I.js → chunk-R6I5I724.js} +2 -2
  138. package/dist/cli/chunks/{chunk-ENGZ4D5V.js → chunk-RJJIPTVH.js} +2 -2
  139. package/dist/cli/chunks/{chunk-7NITCZWD.js → chunk-RM6OC35G.js} +1 -1
  140. package/dist/cli/chunks/{chunk-Q5XTSMWR.js → chunk-RTD4U7IW.js} +2 -2
  141. package/dist/cli/chunks/{chunk-DBDPRORT.js → chunk-SKJQKOFJ.js} +2 -2
  142. package/dist/cli/chunks/{chunk-ICTXTNQZ.js → chunk-SMBGK7XI.js} +1 -1
  143. package/dist/cli/chunks/{chunk-PI7TJS62.js → chunk-SPS472C5.js} +2 -2
  144. package/dist/cli/chunks/{chunk-IV5UZOHH.js → chunk-SUNXA2UR.js} +2 -2
  145. package/dist/cli/chunks/{chunk-IB27QACC.js → chunk-SVP3BP52.js} +2 -2
  146. package/dist/cli/chunks/{chunk-5OOMJGFN.js → chunk-T4WQPE77.js} +1 -1
  147. package/dist/cli/chunks/{chunk-66VWCR67.js → chunk-T53ZN4NO.js} +2 -2
  148. package/dist/cli/chunks/chunk-T6W2EYHC.js +2 -0
  149. package/dist/cli/chunks/{chunk-EAY2JMZG.js → chunk-T7YCNOW5.js} +2 -2
  150. package/dist/cli/chunks/{chunk-FZOBD67M.js → chunk-TCQWVVSR.js} +1 -1
  151. package/dist/cli/chunks/{chunk-SJUXE4IC.js → chunk-TGRHO4ES.js} +2 -2
  152. package/dist/cli/chunks/{chunk-6RE3X4V5.js → chunk-TP7L4EX6.js} +2 -2
  153. package/dist/cli/chunks/{chunk-6SQM2MUX.js → chunk-TT45RCLN.js} +2 -2
  154. package/dist/cli/chunks/{chunk-AVBJYI5I.js → chunk-TUZNWRYC.js} +1 -1
  155. package/dist/cli/chunks/{chunk-YHKEDEAA.js → chunk-U2QTL5T2.js} +3 -3
  156. package/dist/cli/chunks/chunk-U64QORFO.js +2 -0
  157. package/dist/cli/chunks/{chunk-BBT64TII.js → chunk-UHLZKH6B.js} +4 -4
  158. package/dist/cli/chunks/{chunk-GSF6MB64.js → chunk-UIWXKRTK.js} +2 -2
  159. package/dist/cli/chunks/{chunk-JMONHE4B.js → chunk-UNFE4RPV.js} +1 -1
  160. package/dist/cli/chunks/{chunk-DPYSUDAO.js → chunk-UQGIC5OX.js} +1 -1
  161. package/dist/cli/chunks/{chunk-IAF6T27S.js → chunk-VAXTPLO3.js} +2 -2
  162. package/dist/cli/chunks/{chunk-6SH5VZUD.js → chunk-VCSNNLWL.js} +2 -2
  163. package/dist/cli/chunks/chunk-VSPNIDQK.js +21 -0
  164. package/dist/cli/chunks/{chunk-6OS76PHI.js → chunk-VV2JVYOI.js} +2 -2
  165. package/dist/cli/chunks/{chunk-IQO7UCFR.js → chunk-VW7AXJQS.js} +2 -2
  166. package/dist/cli/chunks/{chunk-UQ32JHES.js → chunk-W7JUD4EZ.js} +2 -2
  167. package/dist/cli/chunks/chunk-WFKE7NZ5.js +12 -0
  168. package/dist/cli/chunks/{chunk-RFNPJK6N.js → chunk-WVEHKAIH.js} +3 -3
  169. package/dist/cli/chunks/{chunk-64VGZQLB.js → chunk-XAESN54Q.js} +1 -1
  170. package/dist/cli/chunks/{chunk-BMAPORJ7.js → chunk-XECZYQT5.js} +2 -2
  171. package/dist/cli/chunks/chunk-XFT4FYTC.js +2 -0
  172. package/dist/cli/chunks/{chunk-Y3UOUNHM.js → chunk-YHX74M7C.js} +2 -2
  173. package/dist/cli/chunks/chunk-YIWBJ637.js +2 -0
  174. package/dist/cli/chunks/{chunk-SDRHUMJB.js → chunk-Z5UZOYQS.js} +2 -2
  175. package/dist/cli/chunks/{chunk-7J6QC567.js → chunk-Z6G3QVZ4.js} +12 -12
  176. package/dist/cli/chunks/ci-5LIV2HW5.js +82 -0
  177. package/dist/cli/chunks/{ci-output-LDT24TS3.js → ci-output-UO5BDFU4.js} +2 -2
  178. package/dist/cli/chunks/{circuit-breaker-F5V4KITU.js → circuit-breaker-UQDPXYRD.js} +2 -2
  179. package/dist/cli/chunks/{claude-flow-setup-DT6WQQVD.js → claude-flow-setup-62QES3QX.js} +2 -2
  180. package/dist/cli/chunks/client-AJZKCP4I.js +2 -0
  181. package/dist/cli/chunks/{cline-installer-G7TJOAEX.js → cline-installer-X7VZTSZG.js} +2 -2
  182. package/dist/cli/chunks/{code-PGE6A42V.js → code-H3BF4L4H.js} +3 -3
  183. package/dist/cli/chunks/{code-index-extractor-RNITH372.js → code-index-extractor-BJGFZGGL.js} +2 -2
  184. package/dist/cli/chunks/{codex-installer-LBX77AI3.js → codex-installer-KVZWKU6S.js} +2 -2
  185. package/dist/cli/chunks/{completions-4AWLAARX.js → completions-YMILE6V7.js} +2 -2
  186. package/dist/cli/chunks/{complexity-analyzer-ZPNSS476.js → complexity-analyzer-J26N2PWG.js} +2 -2
  187. package/dist/cli/chunks/{continuedev-installer-UAPWX6OA.js → continuedev-installer-MAR42OV7.js} +2 -2
  188. package/dist/cli/chunks/{copilot-installer-BJN2YJGI.js → copilot-installer-CVOJF6OT.js} +2 -2
  189. package/dist/cli/chunks/core-handlers-MQHEMGDV.js +2 -0
  190. package/dist/cli/chunks/{cost-tracker-MHP2VJ63.js → cost-tracker-SXLWXE55.js} +2 -2
  191. package/dist/cli/chunks/{coverage-PQB4IEFG.js → coverage-D7HCHFP3.js} +3 -3
  192. package/dist/cli/chunks/cross-domain-router-3QNMZV5R.js +2 -0
  193. package/dist/cli/chunks/{cursor-installer-ZXBWYAS3.js → cursor-installer-X37VHIKW.js} +2 -2
  194. package/dist/cli/chunks/{daemon-64C7R6OJ.js → daemon-JN7SOH6F.js} +4 -4
  195. package/dist/cli/chunks/{daemon-N2BEGEFY.js → daemon-LIW47IDM.js} +4 -4
  196. package/dist/cli/chunks/{dag-attention-scheduler-SPZDAPNL.js → dag-attention-scheduler-QCHHIZBT.js} +2 -2
  197. package/dist/cli/chunks/{detect-LXJBSSZW.js → detect-WRFCWAX5.js} +2 -2
  198. package/dist/cli/chunks/{dist-node-U3TKZ2IZ.js → dist-node-6FWT4XZO.js} +2 -2
  199. package/dist/cli/chunks/{domain-handler-3DDWUVSR.js → domain-handler-SNFPNMRT.js} +2 -2
  200. package/dist/cli/chunks/{domain-plugins-JJVWI4OQ.js → domain-plugins-MXKHH62P.js} +2 -2
  201. package/dist/cli/chunks/domain-transfer-47UJNERX.js +2 -0
  202. package/dist/cli/chunks/dream-OSWAITPT.js +2 -0
  203. package/dist/cli/chunks/{embed-and-insert-pattern-JPAR7TXX.js → embed-and-insert-pattern-LZFAUNBQ.js} +2 -2
  204. package/dist/cli/chunks/{eval-SOLG23EA.js → eval-AMUXTMJB.js} +2 -2
  205. package/dist/cli/chunks/{experience-capture-middleware-T7G2VOOD.js → experience-capture-middleware-3D65TR2C.js} +4 -4
  206. package/dist/cli/chunks/{fast-paths-32N3ELI4.js → fast-paths-Y7BBMM56.js} +2 -2
  207. package/dist/cli/chunks/{feature-flags-APJDQ4N7.js → feature-flags-JMQQ7JW4.js} +2 -2
  208. package/dist/cli/chunks/{feature-flags-NAHKLDRN.js → feature-flags-VESRRQ6V.js} +2 -2
  209. package/dist/cli/chunks/{file-discovery-YKVM3MDB.js → file-discovery-JJKQQUV6.js} +2 -2
  210. package/dist/cli/chunks/{fleet-55M5CJS4.js → fleet-WIGHICJF.js} +4 -4
  211. package/dist/cli/chunks/{gnn-wrapper-UD6E6S6Z.js → gnn-wrapper-BFNPETTT.js} +2 -2
  212. package/dist/cli/chunks/{heartbeat-handler-OYVW3VSC.js → heartbeat-handler-HDXKTGUI.js} +4 -4
  213. package/dist/cli/chunks/heartbeat-scheduler-BVRVVIE2.js +2 -0
  214. package/dist/cli/chunks/hnsw-adapter-MZTHXULS.js +2 -0
  215. package/dist/cli/chunks/hnsw-index-KHEX4VDG.js +2 -0
  216. package/dist/cli/chunks/{hnsw-legacy-bridge-HBYIS3ZW.js → hnsw-legacy-bridge-6A7OTAPT.js} +2 -2
  217. package/dist/cli/chunks/{hnswlib-node-EQPM42OU.js → hnswlib-node-LKV2H47B.js} +2 -2
  218. package/dist/cli/chunks/{hooks-5ZSSJWO6.js → hooks-KDSFYQQG.js} +10 -10
  219. package/dist/cli/chunks/hybrid-backend-2B3LCLR4.js +2 -0
  220. package/dist/cli/chunks/{hypergraph-engine-XBGVQ4PD.js → hypergraph-engine-GDLPEPUC.js} +2 -2
  221. package/dist/cli/chunks/{hypergraph-handler-CAWAQ673.js → hypergraph-handler-4UMFA2EW.js} +3 -3
  222. package/dist/cli/chunks/impact-analyzer-4R4VWOGQ.js +2 -0
  223. package/dist/cli/chunks/{init-handler-PRHXSARK.js → init-handler-4GCHPQHD.js} +16 -14
  224. package/dist/cli/chunks/init-wizard-TAOPXHHD.js +2 -0
  225. package/dist/cli/chunks/kernel-6I6VZUWY.js +2 -0
  226. package/dist/cli/chunks/{kilocode-installer-F7LXBM7I.js → kilocode-installer-HJZMT2G5.js} +2 -2
  227. package/dist/cli/chunks/{kiro-installer-NM723ZRG.js → kiro-installer-WUPY67HG.js} +2 -2
  228. package/dist/cli/chunks/knowledge-graph-KFMTTUR5.js +2 -0
  229. package/dist/cli/chunks/{learning-5QYIDHH3.js → learning-AXKIS7IG.js} +4 -4
  230. package/dist/cli/chunks/{llm-router-43HKWPSX.js → llm-router-HUDPNZLJ.js} +4 -4
  231. package/dist/cli/chunks/llm-router-service-2D74XVM3.js +2 -0
  232. package/dist/cli/chunks/{load-5YDBWSCS.js → load-RM44POD7.js} +2 -2
  233. package/dist/cli/chunks/load-test-53FWOWNS.js +2 -0
  234. package/dist/cli/chunks/{mcp-UMAPMNMY.js → mcp-5JVQRBOP.js} +2 -2
  235. package/dist/cli/chunks/{memory-FWCPCQFP.js → memory-VGZ2V6PL.js} +5 -5
  236. package/dist/cli/chunks/memory-backend-KFJDDPEZ.js +2 -0
  237. package/dist/cli/chunks/memory-handlers-EI537Z32.js +2 -0
  238. package/dist/cli/chunks/{multi-model-executor-2XTBGLE4.js → multi-model-executor-WPRKCSCM.js} +2 -2
  239. package/dist/cli/chunks/{opencode-installer-GIXOJ6NS.js → opencode-installer-YAJMRCQO.js} +2 -2
  240. package/dist/cli/chunks/{orchestrator-VW6BKHLI.js → orchestrator-MUGWBUYP.js} +17 -17
  241. package/dist/cli/chunks/pattern-null-store-7DMU5CJ4.js +2 -0
  242. package/dist/cli/chunks/{pattern-usage-recorder-7CEUC3J7.js → pattern-usage-recorder-ZQJJ2YNG.js} +2 -2
  243. package/dist/cli/chunks/{pipeline-IGUQPPPO.js → pipeline-F4DXDUDC.js} +2 -2
  244. package/dist/cli/chunks/{platform-2P636I7B.js → platform-HI3A3OWF.js} +2 -2
  245. package/dist/cli/chunks/{plugin-NY6SWDPE.js → plugin-XRITPTR7.js} +2 -2
  246. package/dist/cli/chunks/{prime-radiant-advanced-wasm-2UUDTIO2.js → prime-radiant-advanced-wasm-HHNJP7CQ.js} +2 -2
  247. package/dist/cli/chunks/{project-root-IOISG5KX.js → project-root-2VN4WO2A.js} +2 -2
  248. package/dist/cli/chunks/protocol-executor-2EMTBTMG.js +2 -0
  249. package/dist/cli/chunks/{protocol-handler-ZTPCRQ5W.js → protocol-handler-ZEVHSEBG.js} +2 -2
  250. package/dist/cli/chunks/{prove-SQX5A3IG.js → prove-C4BLZWBS.js} +2 -2
  251. package/dist/cli/chunks/qe-reasoning-bank-VZHZZPHE.js +2 -0
  252. package/dist/cli/chunks/{quality-DROILKRY.js → quality-M3DTE4KK.js} +2 -2
  253. package/dist/cli/chunks/quality-gate-V6KS7ML3.js +7 -0
  254. package/dist/cli/chunks/queen-coordinator-7MYTTUHI.js +2 -0
  255. package/dist/cli/chunks/{real-embeddings-P5U3MGYC.js → real-embeddings-YWSE3IRT.js} +2 -2
  256. package/dist/cli/chunks/{ref-validation-KY73NQXD.js → ref-validation-ZWOTFA3T.js} +2 -2
  257. package/dist/cli/chunks/{roocode-installer-6JPPRB3W.js → roocode-installer-GJBIWETD.js} +2 -2
  258. package/dist/cli/chunks/router-ZD4LXAWA.js +2 -0
  259. package/dist/cli/chunks/routing-feedback-FSLMDVGD.js +2 -0
  260. package/dist/cli/chunks/{routing-handler-VTJIVFUO.js → routing-handler-CFYLGNAR.js} +2 -2
  261. package/dist/cli/chunks/{ruvector-commands-C6RPSJJO.js → ruvector-commands-EDKG456B.js} +2 -2
  262. package/dist/cli/chunks/rvf-dual-writer-LTKTDRFS.js +2 -0
  263. package/dist/cli/chunks/rvf-migration-adapter-IF24EVC5.js +2 -0
  264. package/dist/cli/chunks/{rvf-migration-coordinator-R53URRIO.js → rvf-migration-coordinator-ZMEYMAI6.js} +2 -2
  265. package/dist/cli/chunks/rvf-native-adapter-E6JNBKMZ.js +2 -0
  266. package/dist/cli/chunks/{rvf-store-integrity-MMXN5TEJ.js → rvf-store-integrity-AH6PNJP6.js} +2 -2
  267. package/dist/cli/chunks/safe-db-F6TRB5KZ.js +2 -0
  268. package/dist/cli/chunks/schedule-HBD4BYTE.js +2 -0
  269. package/dist/cli/chunks/scheduler-6FYWPMQC.js +2 -0
  270. package/dist/cli/chunks/{security-3B3R2NL4.js → security-ZU2GW3ZM.js} +3 -3
  271. package/dist/cli/chunks/{shared-rvf-adapter-VIJB7JUS.js → shared-rvf-adapter-5FOVSL3T.js} +2 -2
  272. package/dist/cli/chunks/{shared-rvf-dual-writer-UVWGDUWC.js → shared-rvf-dual-writer-IO4DC4XV.js} +2 -2
  273. package/dist/cli/chunks/sqlite-persistence-DOU72F5Z.js +2 -0
  274. package/dist/cli/chunks/{standalone-memory-M4LWAAYZ.js → standalone-memory-3UXDZ7HI.js} +2 -2
  275. package/dist/cli/chunks/{status-handler-YYFV6OZL.js → status-handler-264CHTWS.js} +2 -2
  276. package/dist/cli/chunks/{structural-health-27E6LLKB.js → structural-health-E2QPUOZE.js} +2 -2
  277. package/dist/cli/chunks/{sync-J3LJ56WN.js → sync-2ACMWM7D.js} +2 -2
  278. package/dist/cli/chunks/sync-N2L2OST4.js +2 -0
  279. package/dist/cli/chunks/{task-handler-4MCEBQZL.js → task-handler-IB5CVOTY.js} +2 -2
  280. package/dist/cli/chunks/task-handlers-QBMYNJHE.js +9 -0
  281. package/dist/cli/chunks/test-7RGLRDSP.js +33 -0
  282. package/dist/cli/chunks/{test-scheduling-ZJBFRZ3J.js → test-scheduling-RJABJT2W.js} +3 -3
  283. package/dist/cli/chunks/token-bootstrap-JVHMHB72.js +2 -0
  284. package/dist/cli/chunks/{token-usage-3X5WMTG2.js → token-usage-3ECHQVCY.js} +2 -2
  285. package/dist/cli/chunks/{transformers-MVL4C5IX.js → transformers-KJH3IJWI.js} +2 -2
  286. package/dist/cli/chunks/{tree-sitter-wasm-parser-SLW65ZFO.js → tree-sitter-wasm-parser-XN6PFI32.js} +2 -2
  287. package/dist/cli/chunks/{types-TG5P3CRS.js → types-5BAPXOLS.js} +2 -2
  288. package/dist/cli/chunks/unified-memory-GHAYAXWZ.js +2 -0
  289. package/dist/cli/chunks/unified-memory-hnsw-CCC63YXT.js +2 -0
  290. package/dist/cli/chunks/unified-persistence-HKRHI5PG.js +2 -0
  291. package/dist/cli/chunks/{upgrade-ETBHDEPY.js → upgrade-S5NFQZID.js} +2 -2
  292. package/dist/cli/chunks/{validate-C2A73LZK.js → validate-BIBWOLJD.js} +2 -2
  293. package/dist/cli/chunks/{validate-swarm-67XN42ML.js → validate-swarm-WAA3LBHH.js} +2 -2
  294. package/dist/cli/chunks/visual-security-APOXJ3Q3.js +2 -0
  295. package/dist/cli/chunks/{web-tree-sitter-USJN77P4.js → web-tree-sitter-OTBQTHAV.js} +2 -2
  296. package/dist/cli/chunks/{windsurf-installer-5GGZXGJW.js → windsurf-installer-NNQ22EW6.js} +2 -2
  297. package/dist/cli/chunks/witness-chain-7IP5IJGT.js +2 -0
  298. package/dist/cli/chunks/{witness-chain-IWS5ZHHL.js → witness-chain-E7MUBOJW.js} +2 -2
  299. package/dist/cli/chunks/witness-chain-repair-FW4QSN4C.js +2 -0
  300. package/dist/cli/chunks/{witness-chain-verifier-3GEADWPE.js → witness-chain-verifier-YMROEBVL.js} +2 -2
  301. package/dist/cli/chunks/{witness-key-manager-ZWEIK3VJ.js → witness-key-manager-4CGRNDMJ.js} +2 -2
  302. package/dist/cli/chunks/{workflow-KHMVVBBA.js → workflow-4VRSTRAN.js} +4 -4
  303. package/dist/cli/chunks/workflow-orchestrator-2HNW5ZMQ.js +2 -0
  304. package/dist/cli/chunks/wrappers-4M4UTGEU.js +2 -0
  305. package/dist/cli/commands/ci.js +18 -7
  306. package/dist/cli/commands/quality-gate.js +6 -1
  307. package/dist/cli/commands/test.js +18 -3
  308. package/dist/cli/handlers/init-handler.d.ts +2 -0
  309. package/dist/cli/handlers/init-handler.js +8 -2
  310. package/dist/cli/index.js +15 -2
  311. package/dist/cli/process-store-cleanup.d.ts +7 -0
  312. package/dist/cli/process-store-cleanup.js +27 -0
  313. package/dist/cli/utils/ci-config.d.ts +3 -3
  314. package/dist/cli/utils/ci-config.js +202 -68
  315. package/dist/coordination/handlers/test-execution-handlers.js +13 -8
  316. package/dist/coordination/index.d.ts +1 -1
  317. package/dist/coordination/queen-event-handlers.js +9 -6
  318. package/dist/coordination/result-saver.js +1 -1
  319. package/dist/coordination/services/index.d.ts +1 -1
  320. package/dist/coordination/services/task-audit-logger.d.ts +38 -13
  321. package/dist/coordination/services/task-audit-logger.js +33 -5
  322. package/dist/coordination/task-executor.d.ts +5 -0
  323. package/dist/coordination/task-executor.js +10 -5
  324. package/dist/domains/quality-assessment/quality-evidence.d.ts +3 -1
  325. package/dist/domains/quality-assessment/quality-evidence.js +7 -2
  326. package/dist/domains/test-execution/services/retry-handler.js +32 -13
  327. package/dist/domains/test-execution/services/test-executor.d.ts +3 -3
  328. package/dist/domains/test-execution/services/test-executor.js +66 -22
  329. package/dist/domains/test-generation/coordinator.js +6 -5
  330. package/dist/domains/test-generation/interfaces.d.ts +11 -1
  331. package/dist/domains/test-generation/services/behavior-example-validation.d.ts +36 -0
  332. package/dist/domains/test-generation/services/behavior-example-validation.js +89 -0
  333. package/dist/domains/test-generation/services/behavior-examples.d.ts +8 -0
  334. package/dist/domains/test-generation/services/behavior-examples.js +65 -0
  335. package/dist/domains/test-generation/services/test-generator.d.ts +1 -1
  336. package/dist/domains/test-generation/services/test-generator.js +59 -30
  337. package/dist/domains/visual-accessibility/services/axe-core-audit.d.ts +0 -15
  338. package/dist/domains/visual-accessibility/services/axe-core-audit.js +12 -10
  339. package/dist/init/browser-engine-installer.d.ts +5 -5
  340. package/dist/init/browser-engine-installer.js +28 -6
  341. package/dist/init/fleet-integration.js +3 -2
  342. package/dist/init/init-wizard-steps.js +3 -2
  343. package/dist/init/init-wizard.d.ts +2 -0
  344. package/dist/init/orchestrator.js +1 -0
  345. package/dist/init/phases/06-code-intelligence.js +6 -4
  346. package/dist/init/phases/09-assets.js +8 -18
  347. package/dist/init/phases/phase-interface.d.ts +2 -0
  348. package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +2 -5
  349. package/dist/integrations/ruvector/sona-persistence.d.ts +1 -0
  350. package/dist/integrations/ruvector/sona-persistence.js +74 -20
  351. package/dist/integrations/ruvector/sona-wrapper.d.ts +2 -0
  352. package/dist/integrations/ruvector/sona-wrapper.js +13 -0
  353. package/dist/integrations/vibium/client.d.ts +1 -0
  354. package/dist/integrations/vibium/client.js +24 -11
  355. package/dist/integrations/vibium/runtime.d.ts +14 -0
  356. package/dist/integrations/vibium/runtime.js +94 -0
  357. package/dist/kernel/memory-backend.js +5 -4
  358. package/dist/kernel/pattern-fts-self-heal.d.ts +63 -0
  359. package/dist/kernel/pattern-fts-self-heal.js +193 -0
  360. package/dist/kernel/process-lifecycle.d.ts +60 -0
  361. package/dist/kernel/process-lifecycle.js +91 -0
  362. package/dist/kernel/unified-memory-schemas.d.ts +15 -1
  363. package/dist/kernel/unified-memory-schemas.js +53 -25
  364. package/dist/kernel/unified-memory.js +34 -36
  365. package/dist/kernel/unified-persistence.js +12 -6
  366. package/dist/learning/aqe-learning-engine.js +3 -2
  367. package/dist/learning/experience-capture.d.ts +2 -1
  368. package/dist/learning/experience-capture.js +23 -8
  369. package/dist/learning/pattern-store.d.ts +1 -1
  370. package/dist/learning/pattern-store.js +27 -30
  371. package/dist/learning/qe-patterns.d.ts +6 -0
  372. package/dist/learning/qe-reasoning-bank.d.ts +1 -0
  373. package/dist/learning/qe-reasoning-bank.js +14 -4
  374. package/dist/learning/real-qe-reasoning-bank.d.ts +9 -4
  375. package/dist/learning/real-qe-reasoning-bank.js +28 -4
  376. package/dist/learning/rvf-pattern-store.js +19 -19
  377. package/dist/learning/sqlite-persistence.js +9 -24
  378. package/dist/mcp/bundle.js +545 -581
  379. package/dist/mcp/connection-pool.d.ts +2 -0
  380. package/dist/mcp/connection-pool.js +13 -2
  381. package/dist/mcp/entry.js +52 -6
  382. package/dist/mcp/handlers/domain-handler-configs.js +12 -4
  383. package/dist/mcp/handlers/memory-handlers.d.ts +1 -0
  384. package/dist/mcp/handlers/memory-handlers.js +16 -6
  385. package/dist/mcp/handlers/task-handlers.js +11 -7
  386. package/dist/mcp/protocol-server.js +47 -11
  387. package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
  388. package/dist/mcp/services/reasoning-bank-service.js +5 -1
  389. package/dist/mcp/tools/test-execution/e2e-execute.js +9 -1
  390. package/dist/mcp/tools/test-generation/generate.d.ts +6 -1
  391. package/dist/mcp/tools/test-generation/generate.js +8 -0
  392. package/dist/mcp/types.d.ts +8 -2
  393. package/dist/optimization/session-cache.js +13 -11
  394. package/dist/plugins/cache.js +10 -3
  395. package/dist/shared/embeddings/embedding-cache.js +4 -4
  396. package/dist/shared/error-utils.d.ts +15 -0
  397. package/dist/shared/error-utils.js +21 -0
  398. package/dist/shared/events/domain-events.d.ts +2 -1
  399. package/dist/shared/llm/cache.js +7 -10
  400. package/dist/shared/retry-engine.js +4 -0
  401. package/dist/shared/test-runner-process.d.ts +10 -0
  402. package/dist/shared/test-runner-process.js +210 -0
  403. package/dist/validation/quality-verdict.js +3 -2
  404. package/dist/workers/quality-daemon/priority-queue.js +4 -1
  405. package/package.json +10 -6
  406. package/dist/cli/chunks/adapter-UYOJPTOX.js +0 -2
  407. package/dist/cli/chunks/aqe-learning-engine-JR5AVQXR.js +0 -2
  408. package/dist/cli/chunks/base-DRZ2LS6X.js +0 -2
  409. package/dist/cli/chunks/browser-workflow-CJ7T3MXF.js +0 -2
  410. package/dist/cli/chunks/chunk-3NIG7S5W.js +0 -2
  411. package/dist/cli/chunks/chunk-4N23RFDU.js +0 -2
  412. package/dist/cli/chunks/chunk-AHKELLIO.js +0 -12
  413. package/dist/cli/chunks/chunk-DK4XN4CU.js +0 -2
  414. package/dist/cli/chunks/chunk-E6G2RD5H.js +0 -4
  415. package/dist/cli/chunks/chunk-MJS53PRX.js +0 -2
  416. package/dist/cli/chunks/chunk-PZPWRQ2M.js +0 -21
  417. package/dist/cli/chunks/chunk-QGA55PFM.js +0 -12
  418. package/dist/cli/chunks/chunk-SPV2VKC5.js +0 -3
  419. package/dist/cli/chunks/chunk-TCHGOB2N.js +0 -2
  420. package/dist/cli/chunks/chunk-UKA2KOXE.js +0 -2
  421. package/dist/cli/chunks/chunk-WCJBU2KI.js +0 -2
  422. package/dist/cli/chunks/chunk-Z6GGIRQQ.js +0 -65
  423. package/dist/cli/chunks/ci-W6K6G2KZ.js +0 -81
  424. package/dist/cli/chunks/client-KHWJT6FB.js +0 -2
  425. package/dist/cli/chunks/core-handlers-HING5RRG.js +0 -2
  426. package/dist/cli/chunks/cross-domain-router-PQTD6AZN.js +0 -2
  427. package/dist/cli/chunks/domain-transfer-M36KUJ2U.js +0 -2
  428. package/dist/cli/chunks/dream-WUGRSNCV.js +0 -2
  429. package/dist/cli/chunks/heartbeat-scheduler-33XX5XNQ.js +0 -2
  430. package/dist/cli/chunks/hnsw-adapter-XQPERX3H.js +0 -2
  431. package/dist/cli/chunks/hnsw-index-2GNXTWHH.js +0 -2
  432. package/dist/cli/chunks/hybrid-backend-CCF7URKI.js +0 -2
  433. package/dist/cli/chunks/impact-analyzer-HGKAZWIG.js +0 -2
  434. package/dist/cli/chunks/init-wizard-72MFBI3G.js +0 -2
  435. package/dist/cli/chunks/kernel-BRCBVMSK.js +0 -2
  436. package/dist/cli/chunks/knowledge-graph-DG44IPEI.js +0 -2
  437. package/dist/cli/chunks/llm-router-service-24KXFX32.js +0 -2
  438. package/dist/cli/chunks/load-test-N4TAYJY3.js +0 -2
  439. package/dist/cli/chunks/memory-backend-NVYFYVAU.js +0 -2
  440. package/dist/cli/chunks/memory-handlers-UTWCNCHL.js +0 -2
  441. package/dist/cli/chunks/pattern-null-store-SBPNYDBR.js +0 -2
  442. package/dist/cli/chunks/protocol-executor-IBYEII5Q.js +0 -2
  443. package/dist/cli/chunks/qe-reasoning-bank-7IETWW6W.js +0 -2
  444. package/dist/cli/chunks/quality-gate-PWKWDJY2.js +0 -7
  445. package/dist/cli/chunks/queen-coordinator-NHUK2MWJ.js +0 -2
  446. package/dist/cli/chunks/router-SRSO3IHF.js +0 -2
  447. package/dist/cli/chunks/routing-feedback-PASRE5HY.js +0 -2
  448. package/dist/cli/chunks/rvf-dual-writer-4M4J67OU.js +0 -2
  449. package/dist/cli/chunks/rvf-migration-adapter-TSXGT5LF.js +0 -2
  450. package/dist/cli/chunks/rvf-native-adapter-MOF3E7BR.js +0 -2
  451. package/dist/cli/chunks/safe-db-QJLFO33B.js +0 -2
  452. package/dist/cli/chunks/schedule-YIVXW5O2.js +0 -2
  453. package/dist/cli/chunks/scheduler-AON7DWSJ.js +0 -2
  454. package/dist/cli/chunks/sqlite-persistence-75VHKKQB.js +0 -2
  455. package/dist/cli/chunks/sync-26CEGSTC.js +0 -2
  456. package/dist/cli/chunks/task-handlers-GYBAWKE2.js +0 -9
  457. package/dist/cli/chunks/test-MPC5HRH5.js +0 -33
  458. package/dist/cli/chunks/token-bootstrap-2Y2XITBX.js +0 -2
  459. package/dist/cli/chunks/unified-memory-UCQ6AB32.js +0 -2
  460. package/dist/cli/chunks/unified-memory-hnsw-IXYUMKRR.js +0 -2
  461. package/dist/cli/chunks/unified-persistence-7E6JQ4FZ.js +0 -2
  462. package/dist/cli/chunks/vibium-NILGKHLN.js +0 -2
  463. package/dist/cli/chunks/visual-security-4VZXPEVG.js +0 -2
  464. package/dist/cli/chunks/witness-chain-JQA2VPZI.js +0 -2
  465. package/dist/cli/chunks/witness-chain-repair-4UA7IPS3.js +0 -2
  466. package/dist/cli/chunks/workflow-orchestrator-GI5NQH7C.js +0 -2
  467. package/dist/cli/chunks/wrappers-N6XIK5PT.js +0 -2
@@ -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
@@ -0,0 +1,65 @@
1
+ import ts from 'typescript';
2
+ import { CallerInputError } from '../../../shared/error-utils.js';
3
+ import { assertBehaviorJsonValue, validateBehaviorExamples } from './behavior-example-validation.js';
4
+ /** JSON-only data is emitted as a parsed string, never interpolated as source. */
5
+ function literal(value) {
6
+ assertBehaviorJsonValue(value);
7
+ return `JSON.parse(${JSON.stringify(JSON.stringify(value))})`;
8
+ }
9
+ export function generateBehaviorExamples(source, sourceFile, importPath, framework, examples, testType) {
10
+ const supported = ['vitest', 'jest', 'node-test'].includes(framework) && testType === 'unit';
11
+ const ast = ts.createSourceFile(sourceFile, source, ts.ScriptTarget.Latest, true);
12
+ const diagnostics = ast.parseDiagnostics;
13
+ if (diagnostics.length)
14
+ throw new CallerInputError('Cannot generate behavior examples from syntactically invalid source');
15
+ const exports = new Map();
16
+ for (const node of ast.statements) {
17
+ if (!ts.canHaveModifiers(node) || !ts.getModifiers(node)?.some(m => m.kind === ts.SyntaxKind.ExportKeyword))
18
+ continue;
19
+ if (ts.getModifiers(node)?.some(m => m.kind === ts.SyntaxKind.DefaultKeyword))
20
+ continue;
21
+ const add = (name, fn) => {
22
+ if (fn.body && !fn.asteriskToken && fn.parameters.every(p => ts.isIdentifier(p.name) && p.name.text !== 'this' && !p.dotDotDotToken && !p.questionToken && !p.initializer))
23
+ exports.set(name, fn.parameters.length);
24
+ };
25
+ if (ts.isFunctionDeclaration(node) && node.name)
26
+ add(node.name.text, node);
27
+ if (ts.isVariableStatement(node))
28
+ for (const decl of node.declarationList.declarations) {
29
+ if (ts.isIdentifier(decl.name) && decl.initializer && (ts.isArrowFunction(decl.initializer) || ts.isFunctionExpression(decl.initializer)))
30
+ add(decl.name.text, decl.initializer);
31
+ }
32
+ }
33
+ validateBehaviorExamples(examples);
34
+ if (examples?.length && !supported)
35
+ throw new CallerInputError('Behavior examples support unit tests with vitest, jest, or node-test only');
36
+ const limits = [];
37
+ if (importPath === './module-under-test')
38
+ limits.push('Inline source: save the source and replace ./module-under-test with its real import path before running.');
39
+ const lines = [framework === 'node-test' ? "import { test } from 'node:test';\nimport assert from 'node:assert/strict';" : framework === 'vitest' ? "import { test, expect } from 'vitest';" : "import { test, expect } from '@jest/globals';"];
40
+ if (!examples?.length) {
41
+ limits.push('Scaffolding only: supply behaviorExamples from a specification or trusted fixtures. No behavior or coverage has been verified.');
42
+ lines.push(`test.skip('Scaffolding: behaviorExamples required for ${exports.size} supported named exports', () => {});`);
43
+ }
44
+ else {
45
+ lines.push(`import * as subject from ${JSON.stringify(importPath)};`);
46
+ for (const [index, example] of examples.entries()) {
47
+ if (!example || typeof example.functionName !== 'string' || !exports.has(example.functionName))
48
+ throw new CallerInputError(`Behavior example ${index + 1} must target a named exported function with required simple parameters; '${String(example?.functionName)}' is not one (supported: ${[...exports.keys()].join(', ') || 'none'})`);
49
+ if (!Array.isArray(example.args) || example.args.length !== exports.get(example.functionName))
50
+ throw new CallerInputError(`Behavior example argument count does not match ${example.functionName}`);
51
+ if (!Object.prototype.hasOwnProperty.call(example, 'expected'))
52
+ throw new CallerInputError('Behavior example requires an explicit expected value');
53
+ const call = `await subject[${JSON.stringify(example.functionName)}](${Array.from(example.args).map(a => literal(a)).join(', ')})`;
54
+ const assertion = framework === 'node-test' ? `assert.deepStrictEqual(${call}, ${literal(example.expected)});` : `expect(${call}).toStrictEqual(${literal(example.expected)});`;
55
+ lines.push(`test(${JSON.stringify(`${example.functionName}: specification example ${index + 1}`)}, async () => { ${assertion} });`);
56
+ }
57
+ const uncovered = [...exports.keys()].filter(name => !examples.some(e => e.functionName === name));
58
+ if (uncovered.length)
59
+ limits.push(`No supplied behavior examples for: ${uncovered.join(', ')}`);
60
+ limits.push('Only supplied examples are asserted; coverage is unmeasured. Re-exports, default exports, classes, rest/default/destructured/optional parameters and thrown-error specifications are unsupported.');
61
+ }
62
+ return { code: `// ${limits.join('\n// ')}\n${lines.join('\n')}\n`, limits, assertions: examples?.length ?? 0,
63
+ mode: examples?.length ? 'behavior-examples' : 'scaffolding' };
64
+ }
65
+ //# sourceMappingURL=behavior-examples.js.map
@@ -70,6 +70,7 @@ export declare class TestGeneratorService implements ITestGenerationService {
70
70
  private readonly config;
71
71
  private readonly memory;
72
72
  private readonly generatorFactory;
73
+ private readonly usesDefaultGenerator;
73
74
  private readonly tddGenerator;
74
75
  private readonly propertyTestGenerator;
75
76
  private readonly testDataGenerator;
@@ -164,7 +165,6 @@ export declare class TestGeneratorService implements ITestGenerationService {
164
165
  private extractModuleName;
165
166
  private getImportPath;
166
167
  private countAssertions;
167
- private estimateCoverage;
168
168
  private storeGenerationMetadata;
169
169
  }
170
170
  /**
@@ -6,13 +6,15 @@
6
6
  * Uses TypeScript AST parser for code analysis
7
7
  * Delegates to specialized services for TDD, property tests, and test data
8
8
  */
9
+ import { generateBehaviorExamples } from './behavior-examples.js';
10
+ import { validateBehaviorExamples } from './behavior-example-validation.js';
9
11
  import { LoggerFactory } from '../../../logging/index.js';
10
12
  import { v4 as uuidv4 } from 'uuid';
11
13
  import * as fs from 'fs';
12
14
  import * as path from 'path';
13
15
  import ts from 'typescript';
14
16
  import { ok, err } from '../../../shared/types/index.js';
15
- import { toErrorMessage } from '../../../shared/error-utils.js';
17
+ import { CallerInputError, toErrorMessage } from '../../../shared/error-utils.js';
16
18
  import { TestGeneratorFactory } from '../factories/test-generator-factory.js';
17
19
  import { TDDGeneratorService } from './tdd-generator.js';
18
20
  import { PropertyTestGeneratorService } from './property-test-generator.js';
@@ -83,6 +85,7 @@ export class TestGeneratorService {
83
85
  config;
84
86
  memory;
85
87
  generatorFactory;
88
+ usesDefaultGenerator;
86
89
  tddGenerator;
87
90
  propertyTestGenerator;
88
91
  testDataGenerator;
@@ -92,6 +95,7 @@ export class TestGeneratorService {
92
95
  constructor(dependencies, config = {}) {
93
96
  this.config = { ...DEFAULT_CONFIG, ...config };
94
97
  this.memory = dependencies.memory;
98
+ this.usesDefaultGenerator = !dependencies.generatorFactory;
95
99
  this.generatorFactory = dependencies.generatorFactory || new TestGeneratorFactory();
96
100
  this.tddGenerator = dependencies.tddGenerator || new TDDGeneratorService();
97
101
  this.propertyTestGenerator = dependencies.propertyTestGenerator || new PropertyTestGeneratorService();
@@ -123,11 +127,11 @@ export class TestGeneratorService {
123
127
  * Enhance generated test code using LLM
124
128
  * Adds edge cases, improves assertions, and adds documentation
125
129
  */
126
- async enhanceTestWithLLM(testCode, sourceCode, analysis, sourceFilePath, context) {
130
+ async enhanceTestWithLLM(testCode, sourceCode, analysis, sourceFilePath, context, showSourcePath = true) {
127
131
  if (!this.llmRouter)
128
132
  return { code: testCode, enhanced: false };
129
133
  try {
130
- let prompt = this.buildTestEnhancementPrompt(testCode, sourceCode, analysis);
134
+ let prompt = this.buildTestEnhancementPrompt(testCode, sourceCode, analysis, showSourcePath ? sourceFilePath : undefined, context?.importPath);
131
135
  // Prepend historical edge case patterns if injector is available (loki-mode Item 5)
132
136
  if (this.edgeCaseInjector) {
133
137
  try {
@@ -223,8 +227,17 @@ Return ONLY the enhanced test code, no explanations.`,
223
227
  /**
224
228
  * Build prompt for test enhancement
225
229
  */
226
- buildTestEnhancementPrompt(testCode, sourceCode, analysis) {
227
- let prompt = `## Source Code to Test:\n\`\`\`typescript\n${sourceCode}\n\`\`\`\n\n`;
230
+ buildTestEnhancementPrompt(testCode, sourceCode, analysis, sourceFilePath, importPath) {
231
+ let prompt = '';
232
+ if (sourceFilePath || importPath) {
233
+ prompt += '## Module Under Test:\n';
234
+ if (sourceFilePath)
235
+ prompt += `- Source file: ${sourceFilePath}\n`;
236
+ if (importPath)
237
+ prompt += `- Import it in the tests from: '${importPath}'\n`;
238
+ prompt += '\n';
239
+ }
240
+ prompt += `## Source Code to Test:\n\`\`\`typescript\n${sourceCode}\n\`\`\`\n\n`;
228
241
  prompt += `## Current Test Code:\n\`\`\`typescript\n${testCode}\n\`\`\`\n\n`;
229
242
  if (analysis) {
230
243
  if (analysis.functions.length > 0) {
@@ -303,6 +316,8 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
303
316
  */
304
317
  async generateTests(request) {
305
318
  try {
319
+ // Throws CallerInputError (caught below) for malformed examples.
320
+ validateBehaviorExamples(request.behaviorExamples);
306
321
  // Auto-detect language and framework if not provided (ADR-078)
307
322
  const resolved = resolveRequest({
308
323
  sourceFiles: request.sourceFiles,
@@ -312,7 +327,10 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
312
327
  });
313
328
  const effectiveFramework = (request.framework || resolved?.framework || 'vitest');
314
329
  const effectiveLanguage = request.language || resolved?.language;
315
- const { sourceFiles, testType, coverageTarget = this.config.coverageTargetDefault, patterns = [], } = request;
330
+ const { sourceFiles, testType, patterns = [], } = request;
331
+ if (request.behaviorExamples?.length && sourceFiles.length !== 1) {
332
+ return err(new CallerInputError('behaviorExamples requires exactly one source file'));
333
+ }
316
334
  if (sourceFiles.length === 0) {
317
335
  return err(new Error('No source files provided'));
318
336
  }
@@ -335,7 +353,9 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
335
353
  }
336
354
  }
337
355
  }
338
- const coverageEstimate = this.estimateCoverage(tests, coverageTarget);
356
+ // Generation does not execute or instrument the source. Assertion counts
357
+ // are not coverage evidence, including LLM-generated and empty results.
358
+ const coverageEstimate = null;
339
359
  await this.storeGenerationMetadata(tests, patternsUsed);
340
360
  return ok({
341
361
  tests,
@@ -458,16 +478,41 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
458
478
  dependencies,
459
479
  similarCode,
460
480
  };
461
- let testCode = generator.generateTests(context);
462
- // ADR-051: Enhance with LLM if enabled and available.
481
+ const hasExamples = (originalRequest?.behaviorExamples?.length ?? 0) > 0;
482
+ const jsSource = /\.(?:[cm]?[jt]s|[jt]sx)$/i.test(sourceFile);
483
+ const deterministicEligible = (this.usesDefaultGenerator || hasExamples)
484
+ && testType === 'unit' && jsSource && ['vitest', 'jest', 'node-test'].includes(framework);
485
+ if (hasExamples && !deterministicEligible) {
486
+ throw new CallerInputError('Behavior examples require JavaScript/TypeScript and vitest, jest, or node-test');
487
+ }
488
+ const buildDeterministic = () => generateBehaviorExamples(sourceContent, sourceFile, originalRequest?.importPathOverrides?.[sourceFile] ?? path.resolve(sourceFile), framework, originalRequest?.behaviorExamples, testType);
489
+ // ADR-051: Enhance with LLM if enabled and available. Caller-supplied
490
+ // behavior examples are the oracle, so they are never rewritten by an LLM.
463
491
  // #567: `llmEnhanced` reflects whether the LLM actually produced the code,
464
492
  // not merely whether a router was configured — a broken provider must not
465
493
  // report AI-enhanced output it did not produce.
494
+ const willEnhance = this.isLLMEnhancementAvailable() && !!sourceContent && !hasExamples;
495
+ // #795: without fixtures the LLM must start from the framework template,
496
+ // which carries the real import line for the module under test. The
497
+ // zero-assertion scaffold is only emitted when no LLM output is used.
498
+ let deterministic = deterministicEligible && !willEnhance ? buildDeterministic() : undefined;
499
+ let testCode = deterministic?.code ?? generator.generateTests(context);
466
500
  let llmEnhanced = false;
467
- if (this.isLLMEnhancementAvailable() && sourceContent) {
468
- const result = await this.enhanceTestWithLLM(testCode, sourceContent, codeAnalysis, sourceFile, context);
469
- testCode = result.code;
501
+ if (willEnhance) {
502
+ // An import override means `sourceFile` is a stand-in (the MCP handler's
503
+ // /tmp/aqe-temp-* copy of inline source). Do not show the LLM that path:
504
+ // it could echo it into the test in a form the temp-path rewrite misses.
505
+ const result = await this.enhanceTestWithLLM(testCode, sourceContent, codeAnalysis, sourceFile, context, originalRequest?.importPathOverrides?.[sourceFile] === undefined);
470
506
  llmEnhanced = result.enhanced;
507
+ if (llmEnhanced) {
508
+ testCode = result.code;
509
+ }
510
+ else if (deterministicEligible) {
511
+ // The LLM produced nothing usable: fall back to the honest scaffold,
512
+ // never to template assertions with guessed expected values (#787).
513
+ deterministic = buildDeterministic();
514
+ testCode = deterministic.code;
515
+ }
471
516
  }
472
517
  const test = {
473
518
  id: uuidv4(),
@@ -476,7 +521,8 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
476
521
  testFile,
477
522
  testCode,
478
523
  type: testType,
479
- assertions: this.countAssertions(testCode),
524
+ assertions: deterministic && !llmEnhanced ? deterministic.assertions : this.countAssertions(testCode),
525
+ ...(!llmEnhanced && deterministic ? { generationMode: deterministic.mode, generationLimits: deterministic.limits } : {}),
480
526
  // ADR-078: Include detected language and framework
481
527
  language: effectiveLanguage,
482
528
  framework: framework,
@@ -976,23 +1022,6 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
976
1022
  }
977
1023
  return Math.max(1, count);
978
1024
  }
979
- estimateCoverage(tests, target) {
980
- const totalAssertions = tests.reduce((sum, t) => sum + t.assertions, 0);
981
- const totalTests = tests.length;
982
- const testBasedCoverage = totalTests * 4;
983
- const assertionCoverage = totalAssertions * 1.5;
984
- const typeMultiplier = tests.reduce((mult, t) => {
985
- if (t.type === 'integration')
986
- return mult + 0.1;
987
- if (t.type === 'e2e')
988
- return mult + 0.15;
989
- return mult;
990
- }, 1);
991
- const rawEstimate = (testBasedCoverage + assertionCoverage) * typeMultiplier;
992
- const diminishedEstimate = rawEstimate * (1 - rawEstimate / 200);
993
- const estimatedCoverage = Math.min(target, Math.max(0, diminishedEstimate));
994
- return Math.round(estimatedCoverage * 10) / 10;
995
- }
996
1025
  async storeGenerationMetadata(tests, patterns) {
997
1026
  const metadata = {
998
1027
  generatedAt: new Date().toISOString(),
@@ -1,18 +1,3 @@
1
- /**
2
- * Agentic QE v3 - Axe-Core Accessibility Audit
3
- *
4
- * Lightweight implementation using vibium + axe-core for accessibility testing.
5
- * Vibium provides browser automation via WebDriver BiDi (~202KB),
6
- * axe-core provides accessibility rules (~3MB).
7
- *
8
- * Features:
9
- * - WCAG 2.0/2.1/2.2 compliance testing
10
- * - Section 508 compliance
11
- * - Best practices validation
12
- * - Custom rule configuration
13
- *
14
- * @module visual-accessibility/axe-core-audit
15
- */
16
1
  /**
17
2
  * WCAG conformance levels
18
3
  */
@@ -1,3 +1,4 @@
1
+ import { loadVibium, isVibiumReady, VIBIUM_SETUP } from '../../../integrations/vibium/runtime.js';
1
2
  /**
2
3
  * Agentic QE v3 - Axe-Core Accessibility Audit
3
4
  *
@@ -83,8 +84,8 @@ export class AccessibilityAuditor {
83
84
  }
84
85
  // Check for vibium
85
86
  try {
86
- await import('vibium');
87
- this.toolsAvailable.vibium = true;
87
+ await loadVibium();
88
+ this.toolsAvailable.vibium = isVibiumReady();
88
89
  }
89
90
  catch {
90
91
  this.toolsAvailable.vibium = false;
@@ -138,11 +139,12 @@ export class AccessibilityAuditor {
138
139
  * Run actual axe-core audit using vibium
139
140
  */
140
141
  async runAxeCoreAudit(startTime) {
141
- const { browser } = await import('vibium');
142
- let vibe = null;
142
+ const { browser } = await loadVibium();
143
+ let instance = null;
143
144
  try {
144
145
  // Launch browser
145
- vibe = await browser.launch();
146
+ instance = await browser.start({ headless: true });
147
+ const vibe = await instance.page();
146
148
  // Navigate to URL
147
149
  await vibe.go(this.config.url);
148
150
  // Wait for selector if configured
@@ -153,12 +155,12 @@ export class AccessibilityAuditor {
153
155
  }
154
156
  // Inject axe-core library
155
157
  const axeSource = loadAxeCoreSource();
156
- await vibe.evaluate(axeSource);
158
+ await vibe.addScript(axeSource);
157
159
  // Build axe configuration
158
160
  const axeConfig = this.buildAxeConfig();
159
161
  // Run axe-core audit
160
162
  const axeScript = `
161
- return axe.run(${this.config.context ? `'${this.config.context}'` : 'document'}, ${JSON.stringify(axeConfig)});
163
+ axe.run(${this.config.context ? JSON.stringify(this.config.context) : 'document'}, ${JSON.stringify(axeConfig)})
162
164
  `;
163
165
  const results = await vibe.evaluate(axeScript);
164
166
  // Convert results
@@ -188,8 +190,8 @@ export class AccessibilityAuditor {
188
190
  };
189
191
  }
190
192
  finally {
191
- if (vibe) {
192
- await vibe.quit();
193
+ if (instance) {
194
+ await instance.stop();
193
195
  }
194
196
  }
195
197
  }
@@ -218,7 +220,7 @@ export class AccessibilityAuditor {
218
220
  createFallbackResult(startTime) {
219
221
  const errors = [];
220
222
  if (!this.toolsAvailable.vibium) {
221
- errors.push('vibium is not installed. Install with: npm install vibium');
223
+ errors.push(`Vibium runtime or browser payload unavailable; run ${VIBIUM_SETUP}`);
222
224
  }
223
225
  if (!this.toolsAvailable.axeCore) {
224
226
  errors.push('axe-core is not installed. Install with: npm install axe-core');
@@ -9,13 +9,13 @@
9
9
  * Design goals:
10
10
  * - Graceful: never fail init if Vibium install fails; report and continue.
11
11
  * - Idempotent: skip if Vibium is already on PATH.
12
- * - Opt-out friendly: respect --minimal and --no-browser-engine flags.
12
+ * - Opt-in only: called by init only with --browser-engine.
13
13
  * - No new runtime deps: shells out to `npm install -g vibium` via child_process.
14
14
  */
15
15
  import { type SpawnSyncReturns } from 'node:child_process';
16
16
  /**
17
- * Default Vibium npm spec. Major-line pin via caret (`^26.3.18`) — npm
18
- * semver will accept any 26.x.y >= 26.3.18 but reject 27.0.0+. The intent
17
+ * Default Vibium npm spec. Major-line pin via caret (`^26.8.21`) — npm
18
+ * semver will accept any 26.x.y >= 26.8.21 but reject 27.0.0+. The intent
19
19
  * is to auto-receive security patches and additive minor features while
20
20
  * blocking breaking-change major bumps, which is where Vibium's CLI
21
21
  * contract (`go`, `--headless`, `viewport`, exit codes) can change.
@@ -27,7 +27,7 @@ import { type SpawnSyncReturns } from 'node:child_process';
27
27
  * Bump procedure: update this constant (e.g. to ^27.0.0 at a major), run
28
28
  * scripts/smoke-test.sh against the new version, then land the bump.
29
29
  */
30
- export declare const DEFAULT_VIBIUM_SPEC = "vibium@^26.3.18";
30
+ export declare const DEFAULT_VIBIUM_SPEC = "vibium@^26.8.21";
31
31
  /**
32
32
  * Spawner injected into {@link installBrowserEngine} so tests can mock the
33
33
  * shell-out without monkey-patching the child_process module (ESM namespaces
@@ -66,7 +66,7 @@ export interface BrowserEngineInstallResult {
66
66
  */
67
67
  platformHint?: PlatformHint;
68
68
  }
69
- export type BrowserEngineDetectionStatus = 'ready' | 'cli-missing' | 'payload-missing';
69
+ export type BrowserEngineDetectionStatus = 'ready' | 'cli-missing' | 'payload-missing' | 'unsupported-version';
70
70
  export interface BrowserEngineDetectionResult {
71
71
  status: BrowserEngineDetectionStatus;
72
72
  version?: string;
@@ -9,7 +9,7 @@
9
9
  * Design goals:
10
10
  * - Graceful: never fail init if Vibium install fails; report and continue.
11
11
  * - Idempotent: skip if Vibium is already on PATH.
12
- * - Opt-out friendly: respect --minimal and --no-browser-engine flags.
12
+ * - Opt-in only: called by init only with --browser-engine.
13
13
  * - No new runtime deps: shells out to `npm install -g vibium` via child_process.
14
14
  */
15
15
  import { spawnSync as realSpawnSync } from 'node:child_process';
@@ -17,8 +17,8 @@ import * as os from 'node:os';
17
17
  import * as fs from 'node:fs';
18
18
  import { toErrorMessage } from '../shared/error-utils.js';
19
19
  /**
20
- * Default Vibium npm spec. Major-line pin via caret (`^26.3.18`) — npm
21
- * semver will accept any 26.x.y >= 26.3.18 but reject 27.0.0+. The intent
20
+ * Default Vibium npm spec. Major-line pin via caret (`^26.8.21`) — npm
21
+ * semver will accept any 26.x.y >= 26.8.21 but reject 27.0.0+. The intent
22
22
  * is to auto-receive security patches and additive minor features while
23
23
  * blocking breaking-change major bumps, which is where Vibium's CLI
24
24
  * contract (`go`, `--headless`, `viewport`, exit codes) can change.
@@ -30,7 +30,7 @@ import { toErrorMessage } from '../shared/error-utils.js';
30
30
  * Bump procedure: update this constant (e.g. to ^27.0.0 at a major), run
31
31
  * scripts/smoke-test.sh against the new version, then land the bump.
32
32
  */
33
- export const DEFAULT_VIBIUM_SPEC = 'vibium@^26.3.18';
33
+ export const DEFAULT_VIBIUM_SPEC = 'vibium@^26.8.21';
34
34
  const defaultPlatformProbe = {
35
35
  platform: () => os.platform(),
36
36
  arch: () => os.arch(),
@@ -109,7 +109,7 @@ export function detectVibium(spawner = defaultSpawner, timeoutMs = 5_000) {
109
109
  const raw = stdout || stderr;
110
110
  if (!raw)
111
111
  return 'unknown';
112
- // Extract first semver-looking token if present (e.g. "vibium version 26.3.18" → "26.3.18")
112
+ // Extract first semver-looking token if present (e.g. "vibium version 26.8.21" → "26.8.21")
113
113
  const match = raw.match(/v?(\d+\.\d+\.\d+(?:[-+][\w.]+)?)/);
114
114
  return match ? match[1] : raw.split(/\s+/)[0] || 'unknown';
115
115
  }
@@ -121,6 +121,15 @@ export function detectBrowserEngine(spawner = defaultSpawner, timeoutMs = 5_000)
121
121
  const version = detectVibium(spawner, timeoutMs);
122
122
  if (!version)
123
123
  return { status: 'cli-missing' };
124
+ // The modern JS adapter is supported only by stable 26.x releases >= 26.8.21.
125
+ const semver = /^(\d+)\.(\d+)\.(\d+)(?:\+[\w.]+)?$/.exec(version);
126
+ if (!semver || Number(semver[1]) !== 26 ||
127
+ Number(semver[2]) < 8 || (Number(semver[2]) === 8 && Number(semver[3]) < 21)) {
128
+ return {
129
+ status: 'unsupported-version', version,
130
+ message: `Vibium ${version} is unsupported; install ${DEFAULT_VIBIUM_SPEC} for the browser.start() API`,
131
+ };
132
+ }
124
133
  const payload = tryRun(spawner, 'vibium', ['is-installed'], timeoutMs);
125
134
  if (payload.status === 0)
126
135
  return { status: 'ready', version };
@@ -176,7 +185,20 @@ export function installBrowserEngine(options = {}) {
176
185
  'unknown npm install failure',
177
186
  };
178
187
  }
179
- const verified = detectBrowserEngine(spawner);
188
+ let verified = detectBrowserEngine(spawner);
189
+ if (verified.status === 'payload-missing') {
190
+ // Reinstalling an already-current npm package may not rerun postinstall.
191
+ // This installer is explicitly requested, so provision the payload directly.
192
+ const payloadInstall = tryRun(spawner, 'vibium', ['install'], timeoutMs);
193
+ if (payloadInstall.status !== 0) {
194
+ return {
195
+ status: 'install-failed', packageSpec, platformHint,
196
+ message: `Browser payload installation failed: ${payloadInstall.stderr?.trim() ||
197
+ payloadInstall.stdout?.trim() || 'vibium install failed'}. Run \`vibium install\` and verify with \`vibium is-installed\`.`,
198
+ };
199
+ }
200
+ verified = detectBrowserEngine(spawner);
201
+ }
180
202
  if (verified.status !== 'ready') {
181
203
  const reason = verified.message ? `: ${verified.message}` : '';
182
204
  return {
@@ -122,12 +122,13 @@ export class FleetInitEnhancer {
122
122
  enableVectorEmbeddings: true,
123
123
  });
124
124
  // Find all source files
125
- const glob = await import('fast-glob');
126
- const files = await glob.default([
125
+ const { glob } = await import('tinyglobby');
126
+ const files = await glob([
127
127
  '**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.py'
128
128
  ], {
129
129
  cwd: this.projectRoot,
130
130
  ignore: ['node_modules/**', 'dist/**', 'coverage/**', '.agentic-qe/**'],
131
+ expandDirectories: false,
131
132
  });
132
133
  console.log(chalk.gray(` Indexing ${files.length} files...`));
133
134
  // Index files