agentic-qe 3.9.13 → 3.9.15

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 (326) hide show
  1. package/.claude/skills/accessibility-testing/SKILL.md +18 -0
  2. package/.claude/skills/enterprise-integration-testing/SKILL.md +1 -1
  3. package/.claude/skills/pentest-validation/SKILL.md +1 -1
  4. package/.claude/skills/qe-browser/evals/qe-browser.yaml +46 -63
  5. package/.claude/skills/qe-browser/scripts/smoke-test.sh +16 -4
  6. package/.claude/skills/skills-manifest.json +1 -1
  7. package/CHANGELOG.md +51 -0
  8. package/assets/skills/accessibility-testing/SKILL.md +18 -0
  9. package/assets/skills/qe-browser/evals/qe-browser.yaml +46 -63
  10. package/assets/skills/qe-browser/scripts/smoke-test.sh +16 -4
  11. package/assets/skills/skills-manifest.json +1 -1
  12. package/dist/cli/bundle.js +5 -5
  13. package/dist/cli/chunks/adapter-P2EPBJLF.js +2 -0
  14. package/dist/cli/chunks/{agent-booster-wasm-3RBPTJAU.js → agent-booster-wasm-NA2VN5U2.js} +2 -2
  15. package/dist/cli/chunks/{agent-handler-XV45GCWC.js → agent-handler-NRIF5IOC.js} +2 -2
  16. package/dist/cli/chunks/{agent-memory-branch-V6EXWWMY.js → agent-memory-branch-NW3UB2UW.js} +2 -2
  17. package/dist/cli/chunks/aqe-learning-engine-6UITO3NJ.js +2 -0
  18. package/dist/cli/chunks/{audit-WXFI4AC4.js → audit-5CSEDVJR.js} +2 -2
  19. package/dist/cli/chunks/base-JHBJXVGP.js +2 -0
  20. package/dist/cli/chunks/{better-sqlite3-23MIVVHF.js → better-sqlite3-FZ32SHZ6.js} +2 -2
  21. package/dist/cli/chunks/{brain-handler-LQUMAACV.js → brain-handler-ISVST4MR.js} +3 -3
  22. package/dist/cli/chunks/{branch-enumerator-HE37VX7G.js → branch-enumerator-IUHWHIMV.js} +2 -2
  23. package/dist/cli/chunks/{browser-3VG5M7WM.js → browser-D4F3327X.js} +2 -2
  24. package/dist/cli/chunks/browser-workflow-U4OON5DZ.js +2 -0
  25. package/dist/cli/chunks/{chunk-ZS5BM2EE.js → chunk-2BBKAX7X.js} +2 -2
  26. package/dist/cli/chunks/{chunk-6GYMFSPA.js → chunk-2CN2NPJQ.js} +2 -2
  27. package/dist/cli/chunks/{chunk-OGHIQCJU.js → chunk-2L5ZFBHP.js} +2 -2
  28. package/dist/cli/chunks/{chunk-VCJP7HQG.js → chunk-2XW36KDQ.js} +2 -2
  29. package/dist/cli/chunks/{chunk-AOTEEGQA.js → chunk-37ZSWRRP.js} +2 -2
  30. package/dist/cli/chunks/chunk-3BA2FGSA.js +2 -0
  31. package/dist/cli/chunks/{chunk-54A2LVKM.js → chunk-3FUKJT4S.js} +2 -2
  32. package/dist/cli/chunks/chunk-3NIHJIWP.js +2 -0
  33. package/dist/cli/chunks/{chunk-LHZLH6I4.js → chunk-3RSPEFU3.js} +2 -2
  34. package/dist/cli/chunks/{chunk-I6O4MVEY.js → chunk-3Y4YZDHJ.js} +4 -4
  35. package/dist/cli/chunks/{chunk-AEKTVLLF.js → chunk-4M7RBSW6.js} +2 -2
  36. package/dist/cli/chunks/{chunk-LRHJOYKY.js → chunk-4T36OQUK.js} +3 -3
  37. package/dist/cli/chunks/{chunk-XV42SKJD.js → chunk-56YHSI6R.js} +2 -2
  38. package/dist/cli/chunks/{chunk-OBDM6OJL.js → chunk-62MVVEGH.js} +1 -1
  39. package/dist/cli/chunks/chunk-65QA7MYW.js +2 -0
  40. package/dist/cli/chunks/{chunk-RYPUA6E2.js → chunk-6AMD4PZB.js} +2 -2
  41. package/dist/cli/chunks/{chunk-OUNZPHTA.js → chunk-6BHAGCZD.js} +1 -1
  42. package/dist/cli/chunks/{chunk-YBKSENTJ.js → chunk-6F3H2C5H.js} +5 -5
  43. package/dist/cli/chunks/{chunk-OM7A3YC3.js → chunk-6OEGZSRK.js} +2 -2
  44. package/dist/cli/chunks/{chunk-Q3MQYATA.js → chunk-6TOUMCSE.js} +2 -2
  45. package/dist/cli/chunks/chunk-6Z7LYE2B.js +2 -0
  46. package/dist/cli/chunks/{chunk-TRJRRJV3.js → chunk-7J5KWUC2.js} +1 -1
  47. package/dist/cli/chunks/{chunk-VWEGO7BY.js → chunk-7ZPNQ3T6.js} +1 -1
  48. package/dist/cli/chunks/{chunk-6LDRSG7C.js → chunk-AE65B2ZE.js} +3 -3
  49. package/dist/cli/chunks/{chunk-D22MEX2U.js → chunk-AVKUFN3C.js} +2 -2
  50. package/dist/cli/chunks/{chunk-4VETZICF.js → chunk-B4BOOOYM.js} +1 -1
  51. package/dist/cli/chunks/{chunk-Y7YSJD4I.js → chunk-BGUCXJEJ.js} +2 -2
  52. package/dist/cli/chunks/{chunk-JV7HKHQS.js → chunk-C5BRTU4V.js} +2 -2
  53. package/dist/cli/chunks/{chunk-FEGITTAE.js → chunk-CF3W34BA.js} +1 -1
  54. package/dist/cli/chunks/chunk-CSB2M7IX.js +2 -0
  55. package/dist/cli/chunks/{chunk-ERGY45RL.js → chunk-CUQBOVRP.js} +1 -1
  56. package/dist/cli/chunks/{chunk-W6LEOFA4.js → chunk-CWWUBZNX.js} +2 -2
  57. package/dist/cli/chunks/{chunk-GKRKCJ6D.js → chunk-D32YCVCA.js} +2 -2
  58. package/dist/cli/chunks/{chunk-E7P6GAD7.js → chunk-D3FV5NNA.js} +2 -2
  59. package/dist/cli/chunks/{chunk-YYQVSVBO.js → chunk-D3ZUSXFY.js} +2 -2
  60. package/dist/cli/chunks/{chunk-6HSHLSGU.js → chunk-DATFN5DG.js} +2 -2
  61. package/dist/cli/chunks/{chunk-UCCNB75R.js → chunk-DPEG44BS.js} +2 -2
  62. package/dist/cli/chunks/chunk-DYQ7HTEU.js +12 -0
  63. package/dist/cli/chunks/{chunk-SL66MHDM.js → chunk-E3EDVRB5.js} +1 -1
  64. package/dist/cli/chunks/chunk-ELLNKP3I.js +24 -0
  65. package/dist/cli/chunks/{chunk-3RM2VNYG.js → chunk-EORSYD66.js} +2 -2
  66. package/dist/cli/chunks/{chunk-OHG6SNIA.js → chunk-ESQSX37W.js} +2 -2
  67. package/dist/cli/chunks/{chunk-H53V7GI3.js → chunk-EY2DGYQX.js} +1 -1
  68. package/dist/cli/chunks/chunk-FEVTMHO6.js +2 -0
  69. package/dist/cli/chunks/{chunk-Q7TWE55T.js → chunk-FSOY2XB4.js} +4 -4
  70. package/dist/cli/chunks/{chunk-QIE76ERL.js → chunk-FW6QBTPE.js} +1 -1
  71. package/dist/cli/chunks/{chunk-5TDHUYYF.js → chunk-G3FUOFXA.js} +2 -2
  72. package/dist/cli/chunks/{chunk-BUIMIUJA.js → chunk-GHEO5YVA.js} +1 -1
  73. package/dist/cli/chunks/chunk-GLJ6CJNY.js +5 -0
  74. package/dist/cli/chunks/{chunk-V6UODTBP.js → chunk-GWUO3RY5.js} +1 -1
  75. package/dist/cli/chunks/{chunk-3IJ4NRJF.js → chunk-H6DAP4KS.js} +2 -2
  76. package/dist/cli/chunks/chunk-HJNFBJT5.js +3021 -0
  77. package/dist/cli/chunks/{chunk-KULWZMVC.js → chunk-HNAQNAGI.js} +4 -4
  78. package/dist/cli/chunks/{chunk-VU7ENCSU.js → chunk-HPY7HGVQ.js} +2 -2
  79. package/dist/cli/chunks/{chunk-4PCHU2X7.js → chunk-HWK27KJK.js} +1 -1
  80. package/dist/cli/chunks/chunk-ICXWXO5P.js +2 -0
  81. package/dist/cli/chunks/{chunk-OKCI6BNZ.js → chunk-IHDW4HW7.js} +2 -2
  82. package/dist/cli/chunks/chunk-II5KTTIS.js +65 -0
  83. package/dist/cli/chunks/{chunk-OP54A7C6.js → chunk-IMLH32AG.js} +2 -2
  84. package/dist/cli/chunks/{chunk-TNQBHQFH.js → chunk-IPTGPCEL.js} +2 -2
  85. package/dist/cli/chunks/{chunk-V2CV6J2A.js → chunk-IPVKVPAF.js} +2 -2
  86. package/dist/cli/chunks/{chunk-AV23XNRL.js → chunk-ISNXE6TP.js} +2 -2
  87. package/dist/cli/chunks/{chunk-CF5EJGOV.js → chunk-JAIIPEE6.js} +2 -2
  88. package/dist/cli/chunks/{chunk-3AOWTHLS.js → chunk-JJDHD7SC.js} +2 -2
  89. package/dist/cli/chunks/{chunk-HXLAXSEM.js → chunk-JQRR37YY.js} +2 -2
  90. package/dist/cli/chunks/chunk-KJTXY3DW.js +3 -0
  91. package/dist/cli/chunks/{chunk-XXQYSDLV.js → chunk-KKBSX43Q.js} +2 -2
  92. package/dist/cli/chunks/{chunk-EBQUXPIG.js → chunk-LLVS3UYZ.js} +2 -2
  93. package/dist/cli/chunks/{chunk-VJN7NQGI.js → chunk-LNUWNRRJ.js} +10 -10
  94. package/dist/cli/chunks/{chunk-IQGVQBVS.js → chunk-MBDX4OHD.js} +1 -1
  95. package/dist/cli/chunks/{chunk-ZXJNX5D2.js → chunk-MHL6CPGY.js} +1 -1
  96. package/dist/cli/chunks/{chunk-YCQ2GHFH.js → chunk-MO4Q5ZGE.js} +2 -2
  97. package/dist/cli/chunks/{chunk-AZPDX4KS.js → chunk-MS6T4VCU.js} +2 -2
  98. package/dist/cli/chunks/chunk-N2RPLPVG.js +18 -0
  99. package/dist/cli/chunks/chunk-NL2PQLRD.js +2 -0
  100. package/dist/cli/chunks/{chunk-GHAEDZDE.js → chunk-NWMYV7KG.js} +2 -2
  101. package/dist/cli/chunks/{chunk-ZUW3KVML.js → chunk-O6CHLZYT.js} +2 -2
  102. package/dist/cli/chunks/{chunk-EC2CI3ZC.js → chunk-O6J7MKRV.js} +2 -2
  103. package/dist/cli/chunks/{chunk-SSZMISGC.js → chunk-OBZMQFWG.js} +3 -3
  104. package/dist/cli/chunks/{chunk-TU3JIH3U.js → chunk-OHESV6I3.js} +4 -4
  105. package/dist/cli/chunks/{chunk-X3UVXJIK.js → chunk-OMTYOIOS.js} +2 -2
  106. package/dist/cli/chunks/{chunk-TPTKR5ZO.js → chunk-ORKGVVXK.js} +1 -1
  107. package/dist/cli/chunks/{chunk-QHCOAG7D.js → chunk-OUP2X3LT.js} +1 -1
  108. package/dist/cli/chunks/{chunk-DY5JRJXV.js → chunk-PSOIVDD2.js} +3 -3
  109. package/dist/cli/chunks/{chunk-UDIRBCZW.js → chunk-Q3E6Z2RQ.js} +1 -1
  110. package/dist/cli/chunks/{chunk-RMNZSGTE.js → chunk-Q3GDSFGA.js} +2 -2
  111. package/dist/cli/chunks/{chunk-FLML5IT7.js → chunk-QNLZKD7E.js} +2 -2
  112. package/dist/cli/chunks/{chunk-WVWB7K6H.js → chunk-R4G64UH3.js} +2 -2
  113. package/dist/cli/chunks/{chunk-ES6CEZG2.js → chunk-REUGPZIA.js} +1 -1
  114. package/dist/cli/chunks/{chunk-FS4TPAAA.js → chunk-RODJK6G6.js} +1 -1
  115. package/dist/cli/chunks/{chunk-4MZZMWF6.js → chunk-RPOW5LWO.js} +1 -1
  116. package/dist/cli/chunks/{chunk-BE2DYHUB.js → chunk-RSOOENGE.js} +2 -2
  117. package/dist/cli/chunks/{chunk-RURYOWWU.js → chunk-RTVD7SZQ.js} +1 -1
  118. package/dist/cli/chunks/{chunk-Z6F4GRXY.js → chunk-RWVFOXYM.js} +2 -2
  119. package/dist/cli/chunks/{chunk-2RTGP76Y.js → chunk-SSQ42GI7.js} +2 -2
  120. package/dist/cli/chunks/{chunk-AXDGBI4Y.js → chunk-SXUX6PTE.js} +1 -1
  121. package/dist/cli/chunks/{chunk-MXT7YUOZ.js → chunk-TJDAXI6E.js} +2 -2
  122. package/dist/cli/chunks/{chunk-ZN7KPIJW.js → chunk-TZWCVGG2.js} +1 -1
  123. package/dist/cli/chunks/{chunk-TWRGM5TY.js → chunk-U4WDJPRL.js} +2 -2
  124. package/dist/cli/chunks/chunk-UZOFXYNC.js +2 -0
  125. package/dist/cli/chunks/{chunk-TOS3PI5Q.js → chunk-V65DK6ZZ.js} +1 -1
  126. package/dist/cli/chunks/{chunk-7HX2PMBB.js → chunk-V6QARSVQ.js} +2 -2
  127. package/dist/cli/chunks/{chunk-VHSDZEYF.js → chunk-V775NJOM.js} +1 -1
  128. package/dist/cli/chunks/{chunk-QNUVC6OX.js → chunk-VBEVZUQW.js} +1 -1
  129. package/dist/cli/chunks/{chunk-OJGR56BP.js → chunk-VDDQSW4L.js} +2 -2
  130. package/dist/cli/chunks/{chunk-DHYJMGKC.js → chunk-W4PUKTBF.js} +1 -1
  131. package/dist/cli/chunks/{chunk-CPRYUCPC.js → chunk-WAQ3U4FC.js} +1 -1
  132. package/dist/cli/chunks/{chunk-HJHFGPGP.js → chunk-WCOJGDGO.js} +2 -2
  133. package/dist/cli/chunks/{chunk-77GZ7LXL.js → chunk-WI6UA5HV.js} +2 -2
  134. package/dist/cli/chunks/{chunk-HHRUXDLT.js → chunk-XALB3KRR.js} +2 -2
  135. package/dist/cli/chunks/{chunk-W2YCNX4O.js → chunk-XXRDI53H.js} +2 -2
  136. package/dist/cli/chunks/{chunk-JOCR5TWI.js → chunk-YCYFUYCE.js} +2 -2
  137. package/dist/cli/chunks/{chunk-WQIB5ERQ.js → chunk-ZHTCZGML.js} +2 -2
  138. package/dist/cli/chunks/{chunk-WQGP5ULD.js → chunk-ZOAPOVYW.js} +2 -2
  139. package/dist/cli/chunks/{chunk-VVVIRGO7.js → chunk-ZSC7NHK3.js} +2 -2
  140. package/dist/cli/chunks/{ci-FEEIAOQN.js → ci-BGUUHDUS.js} +2 -2
  141. package/dist/cli/chunks/{ci-output-2WMUTORB.js → ci-output-CDFRGBNU.js} +2 -2
  142. package/dist/cli/chunks/{circuit-breaker-MFEE23XA.js → circuit-breaker-S3NFX6RQ.js} +2 -2
  143. package/dist/cli/chunks/{claude-flow-setup-6D655INK.js → claude-flow-setup-AJIPJFMC.js} +2 -2
  144. package/dist/cli/chunks/client-UHHMKUPF.js +2 -0
  145. package/dist/cli/chunks/{cline-installer-5PIYMPAG.js → cline-installer-6O4KZ5UH.js} +2 -2
  146. package/dist/cli/chunks/{code-ACS453WG.js → code-IZALXUL5.js} +2 -2
  147. package/dist/cli/chunks/{code-index-extractor-5SERI6TM.js → code-index-extractor-N7VDH4XF.js} +2 -2
  148. package/dist/cli/chunks/{codex-installer-WCUUWHP5.js → codex-installer-35GTWCFJ.js} +2 -2
  149. package/dist/cli/chunks/{completions-6WFG3FPJ.js → completions-XPJFHGG2.js} +2 -2
  150. package/dist/cli/chunks/{complexity-analyzer-IFZEFCB6.js → complexity-analyzer-DNLCJGUJ.js} +2 -2
  151. package/dist/cli/chunks/{continuedev-installer-RW6FEEND.js → continuedev-installer-PXAIKNYO.js} +2 -2
  152. package/dist/cli/chunks/{copilot-installer-UZPE65RL.js → copilot-installer-2TQ5IZNY.js} +2 -2
  153. package/dist/cli/chunks/{cost-tracker-2R4FT6TY.js → cost-tracker-A5XH4W6S.js} +2 -2
  154. package/dist/cli/chunks/{coverage-ZUC5U47P.js → coverage-EPIMXTLW.js} +3 -3
  155. package/dist/cli/chunks/cross-domain-router-GEBXTPZW.js +2 -0
  156. package/dist/cli/chunks/{cursor-installer-7JBZT7JZ.js → cursor-installer-WMMRPW44.js} +2 -2
  157. package/dist/cli/chunks/daemon-55DSODOH.js +19 -0
  158. package/dist/cli/chunks/{dag-attention-scheduler-MS7D2NFM.js → dag-attention-scheduler-5DSWXMMK.js} +2 -2
  159. package/dist/cli/chunks/{detect-UHOSHYVB.js → detect-NOS46AWN.js} +2 -2
  160. package/dist/cli/chunks/{domain-handler-BVW4AX7O.js → domain-handler-BFRNU6S3.js} +2 -2
  161. package/dist/cli/chunks/{domain-transfer-PA2ENF3D.js → domain-transfer-BPSA4HFR.js} +2 -2
  162. package/dist/cli/chunks/dream-XBRGYPBC.js +2 -0
  163. package/dist/cli/chunks/esm-node-EV4HOHTZ.js +2 -0
  164. package/dist/cli/chunks/eval-YDLM23FB.js +15 -0
  165. package/dist/cli/chunks/{fast-paths-DYQ5NC4Y.js → fast-paths-GISZ7HBO.js} +2 -2
  166. package/dist/cli/chunks/{feature-flags-V34UZPHG.js → feature-flags-3FLJF6CQ.js} +2 -2
  167. package/dist/cli/chunks/{feature-flags-YMMGYWT3.js → feature-flags-5WGZLUPQ.js} +2 -2
  168. package/dist/cli/chunks/{file-discovery-75ZHSK4G.js → file-discovery-PPHUMFSI.js} +2 -2
  169. package/dist/cli/chunks/{fleet-DD2CFGJL.js → fleet-LHFZ53FS.js} +3 -3
  170. package/dist/cli/chunks/{gnn-wrapper-UXM3L5LV.js → gnn-wrapper-Z45DRWGI.js} +2 -2
  171. package/dist/cli/chunks/{heartbeat-handler-ANHRYXNS.js → heartbeat-handler-VMLJ5PDH.js} +4 -4
  172. package/dist/cli/chunks/heartbeat-scheduler-GUWYDHEY.js +2 -0
  173. package/dist/cli/chunks/hnsw-adapter-BG73YVXI.js +2 -0
  174. package/dist/cli/chunks/hnsw-index-K73ZTLJN.js +2 -0
  175. package/dist/cli/chunks/{hnsw-legacy-bridge-IFUEUOVF.js → hnsw-legacy-bridge-S7UZWDUP.js} +2 -2
  176. package/dist/cli/chunks/{hnswlib-node-GYVDPTWU.js → hnswlib-node-MIAAS7OI.js} +2 -2
  177. package/dist/cli/chunks/{hooks-R3DQNG2F.js → hooks-ZN4FV5XS.js} +6 -6
  178. package/dist/cli/chunks/{hybrid-router-MSCQ2XGU.js → hybrid-router-Y6LBFPL7.js} +2 -2
  179. package/dist/cli/chunks/{hypergraph-engine-3TKB5O7T.js → hypergraph-engine-KK73LZYZ.js} +2 -2
  180. package/dist/cli/chunks/{hypergraph-handler-4APYID2S.js → hypergraph-handler-OBGDPIWG.js} +3 -3
  181. package/dist/cli/chunks/impact-analyzer-GWIUYYCQ.js +2 -0
  182. package/dist/cli/chunks/{init-handler-E7B2GKH3.js → init-handler-JJJ7VHM4.js} +6 -6
  183. package/dist/cli/chunks/init-wizard-RIJJAKE3.js +2 -0
  184. package/dist/cli/chunks/kernel-SIPBCRGL.js +2 -0
  185. package/dist/cli/chunks/{kilocode-installer-WY6VTFSA.js → kilocode-installer-EF6DPX2D.js} +2 -2
  186. package/dist/cli/chunks/{kiro-installer-SCNF3JXD.js → kiro-installer-SG74CEVO.js} +2 -2
  187. package/dist/cli/chunks/knowledge-graph-NOYZXHIG.js +2 -0
  188. package/dist/cli/chunks/learning-LVWYMHF6.js +107 -0
  189. package/dist/cli/chunks/{llm-router-RBKYYHBJ.js → llm-router-QFK7MNPY.js} +4 -4
  190. package/dist/cli/chunks/{load-FY64UGHV.js → load-6XPV4WA2.js} +2 -2
  191. package/dist/cli/chunks/load-test-DIMUH75F.js +2 -0
  192. package/dist/cli/chunks/{mcp-6VMQOWMX.js → mcp-GZXOPYMH.js} +2 -2
  193. package/dist/cli/chunks/{memory-Y5RO4PGM.js → memory-QTE2Z5HU.js} +5 -5
  194. package/dist/cli/chunks/memory-backend-IWOGO4BV.js +2 -0
  195. package/dist/cli/chunks/{memory-handlers-CMMVHHPG.js → memory-handlers-PC4P4YEF.js} +2 -2
  196. package/dist/cli/chunks/{multi-model-executor-JO3MNMPZ.js → multi-model-executor-FZOPSUOT.js} +3 -3
  197. package/dist/cli/chunks/{opencode-installer-WQBTY6JT.js → opencode-installer-CITDTCUQ.js} +2 -2
  198. package/dist/cli/chunks/{orchestrator-4J7OSNSG.js → orchestrator-ZTG7MFHQ.js} +20 -20
  199. package/dist/cli/chunks/{pipeline-63T6HN72.js → pipeline-QXO4EJP4.js} +2 -2
  200. package/dist/cli/chunks/{platform-UJMD4EPZ.js → platform-JJEDYCAK.js} +2 -2
  201. package/dist/cli/chunks/{plugin-NDOZ63JW.js → plugin-ZEKRM6F7.js} +2 -2
  202. package/dist/cli/chunks/{prime-radiant-advanced-wasm-ELGHVIFI.js → prime-radiant-advanced-wasm-GRS4T6LR.js} +2 -2
  203. package/dist/cli/chunks/protocol-executor-NT4TILJW.js +2 -0
  204. package/dist/cli/chunks/{protocol-handler-KYERIMVF.js → protocol-handler-KWI2T6OR.js} +2 -2
  205. package/dist/cli/chunks/{prove-ATSSBP4Z.js → prove-7FJN2HEH.js} +2 -2
  206. package/dist/cli/chunks/{provider-manager-YYMIF23V.js → provider-manager-QYYZZLLO.js} +2 -2
  207. package/dist/cli/chunks/qe-reasoning-bank-VDROHXFS.js +2 -0
  208. package/dist/cli/chunks/{quality-2AGJSJW6.js → quality-4NHO2NY5.js} +2 -2
  209. package/dist/cli/chunks/queen-coordinator-7LO73IV3.js +2 -0
  210. package/dist/cli/chunks/{real-embeddings-H36GVXMI.js → real-embeddings-SIELAOWX.js} +2 -2
  211. package/dist/cli/chunks/{roocode-installer-PMRBAY7O.js → roocode-installer-ANYXH3NR.js} +2 -2
  212. package/dist/cli/chunks/router-SFVOLN2W.js +2 -0
  213. package/dist/cli/chunks/routing-feedback-MRFV7WUZ.js +2 -0
  214. package/dist/cli/chunks/{routing-handler-Z7VZSDXW.js → routing-handler-6QQHK4KV.js} +2 -2
  215. package/dist/cli/chunks/{ruvector-commands-N3FZ3ZEE.js → ruvector-commands-YEUA3MZB.js} +2 -2
  216. package/dist/cli/chunks/{rvf-dual-writer-L5DQHUF3.js → rvf-dual-writer-UJFRHPVE.js} +2 -2
  217. package/dist/cli/chunks/{rvf-migration-adapter-NPGFA3SL.js → rvf-migration-adapter-CSDFG7UA.js} +2 -2
  218. package/dist/cli/chunks/{rvf-migration-coordinator-MCJDNKXG.js → rvf-migration-coordinator-QO7OENQF.js} +2 -2
  219. package/dist/cli/chunks/rvf-native-adapter-6L7FZZC7.js +2 -0
  220. package/dist/cli/chunks/safe-db-PYWBVGOV.js +2 -0
  221. package/dist/cli/chunks/schedule-BUQU75HY.js +2 -0
  222. package/dist/cli/chunks/scheduler-XOSKWZO2.js +2 -0
  223. package/dist/cli/chunks/{security-TX7TXUGI.js → security-QCIUC5FX.js} +3 -3
  224. package/dist/cli/chunks/shared-rvf-adapter-OZ7S4ZQL.js +2 -0
  225. package/dist/cli/chunks/{shared-rvf-dual-writer-6K3ZAG7P.js → shared-rvf-dual-writer-LVJJS3PD.js} +2 -2
  226. package/dist/cli/chunks/sqlite-persistence-7UXQZ5Y6.js +2 -0
  227. package/dist/cli/chunks/{status-handler-MIRLQRNN.js → status-handler-O77A4JWM.js} +2 -2
  228. package/dist/cli/chunks/{structural-health-CIHASLUE.js → structural-health-WIIBIIQI.js} +2 -2
  229. package/dist/cli/chunks/{sync-FGLAP7EK.js → sync-UN6D6OF2.js} +2 -2
  230. package/dist/cli/chunks/{task-handler-7HMPRCHY.js → task-handler-RBOSMJCK.js} +2 -2
  231. package/dist/cli/chunks/{task-handlers-DQLQCLCT.js → task-handlers-VWMXQKAT.js} +2 -2
  232. package/dist/cli/chunks/{test-JKDO5ZHU.js → test-XK5M3PGT.js} +4 -4
  233. package/dist/cli/chunks/{test-scheduling-2YKZ7PVZ.js → test-scheduling-CTQ3JJ7G.js} +4 -4
  234. package/dist/cli/chunks/{token-bootstrap-C7UUPMQN.js → token-bootstrap-D5CQ3I5M.js} +2 -2
  235. package/dist/cli/chunks/{token-usage-2RVIPCY4.js → token-usage-L4QSLWQ5.js} +2 -2
  236. package/dist/cli/chunks/{transformers-UEMAGHQ5.js → transformers-SRPJDBKA.js} +2 -2
  237. package/dist/cli/chunks/{tree-sitter-wasm-parser-MELABICK.js → tree-sitter-wasm-parser-DOU5ITWB.js} +2 -2
  238. package/dist/cli/chunks/{types-5B4RD7ZV.js → types-LECYZUBN.js} +2 -2
  239. package/dist/cli/chunks/unified-memory-L6735TFM.js +2 -0
  240. package/dist/cli/chunks/unified-memory-hnsw-7TZNEDGY.js +2 -0
  241. package/dist/cli/chunks/unified-persistence-FNYZ3C2B.js +2 -0
  242. package/dist/cli/chunks/{validate-CHDG7SC3.js → validate-SIKNIS6B.js} +2 -2
  243. package/dist/cli/chunks/{validate-swarm-LB7GORKE.js → validate-swarm-EHAMMILJ.js} +2 -2
  244. package/dist/cli/chunks/{vibium-ZMC4G2YA.js → vibium-LJ4NYXMZ.js} +2 -2
  245. package/dist/cli/chunks/visual-security-SMPZPDY4.js +2 -0
  246. package/dist/cli/chunks/{web-tree-sitter-THNO6S2V.js → web-tree-sitter-DZQ3T4JD.js} +2 -2
  247. package/dist/cli/chunks/{windsurf-installer-LRB43BPX.js → windsurf-installer-U6Z73O6J.js} +2 -2
  248. package/dist/cli/chunks/witness-chain-FNCOTWFA.js +2 -0
  249. package/dist/cli/chunks/{witness-chain-JC5UBXPM.js → witness-chain-JE3QU4YP.js} +2 -2
  250. package/dist/cli/chunks/{workflow-Q4IYQ6F2.js → workflow-62QXGZQO.js} +4 -4
  251. package/dist/cli/chunks/workflow-orchestrator-RCR4N7OA.js +2 -0
  252. package/dist/cli/chunks/{wrappers-WSSLMFSE.js → wrappers-CAX5EZSH.js} +2 -2
  253. package/dist/cli/commands/eval.js +86 -0
  254. package/dist/cli/commands/learning.js +28 -8
  255. package/dist/domains/chaos-resilience/services/chaos-engineer.js +1 -1
  256. package/dist/domains/constants.d.ts +1 -1
  257. package/dist/domains/constants.js +1 -1
  258. package/dist/domains/contract-testing/services/contract-validator.js +1 -1
  259. package/dist/domains/learning-optimization/services/learning-coordinator.js +1 -1
  260. package/dist/domains/test-execution/services/test-executor.js +1 -1
  261. package/dist/domains/test-generation/services/test-data-generator.d.ts +1 -0
  262. package/dist/domains/test-generation/services/test-data-generator.js +17 -3
  263. package/dist/domains/visual-accessibility/services/visual-tester.js +1 -1
  264. package/dist/init/browser-engine-installer.d.ts +60 -1
  265. package/dist/init/browser-engine-installer.js +73 -3
  266. package/dist/init/phases/09-assets.js +9 -2
  267. package/dist/mcp/bundle.js +1782 -1790
  268. package/dist/mcp/protocol-server.js +20 -10
  269. package/dist/validation/command-eval-runner.d.ts +154 -0
  270. package/dist/validation/command-eval-runner.js +293 -0
  271. package/dist/validation/index.d.ts +2 -0
  272. package/dist/validation/index.js +4 -0
  273. package/package.json +7 -5
  274. package/dist/cli/chunks/adapter-VP3WBXE5.js +0 -2
  275. package/dist/cli/chunks/aqe-learning-engine-ASPPEOKQ.js +0 -2
  276. package/dist/cli/chunks/base-SIAOYPTD.js +0 -2
  277. package/dist/cli/chunks/browser-workflow-BG3M3RZU.js +0 -2
  278. package/dist/cli/chunks/chunk-3I6KWFJT.js +0 -2
  279. package/dist/cli/chunks/chunk-4WJ3BHCN.js +0 -24
  280. package/dist/cli/chunks/chunk-67TMNSO3.js +0 -3
  281. package/dist/cli/chunks/chunk-APQYMAKG.js +0 -65
  282. package/dist/cli/chunks/chunk-BSTCXDVH.js +0 -2
  283. package/dist/cli/chunks/chunk-F74IVEON.js +0 -2
  284. package/dist/cli/chunks/chunk-FHWDVN65.js +0 -18
  285. package/dist/cli/chunks/chunk-HEHGQM2H.js +0 -3029
  286. package/dist/cli/chunks/chunk-HRD7LL7Q.js +0 -2
  287. package/dist/cli/chunks/chunk-QKTB5FZP.js +0 -2
  288. package/dist/cli/chunks/chunk-R4B2B6MZ.js +0 -5
  289. package/dist/cli/chunks/chunk-SI7AQK7I.js +0 -2
  290. package/dist/cli/chunks/chunk-TVASP2E6.js +0 -2
  291. package/dist/cli/chunks/chunk-VLZBQ3XN.js +0 -2
  292. package/dist/cli/chunks/chunk-Y2ONHWXI.js +0 -2
  293. package/dist/cli/chunks/chunk-YCTGWMCP.js +0 -12
  294. package/dist/cli/chunks/client-LMOHUGOA.js +0 -2
  295. package/dist/cli/chunks/cross-domain-router-IZB5ZMXO.js +0 -2
  296. package/dist/cli/chunks/daemon-YNF54UYB.js +0 -19
  297. package/dist/cli/chunks/dream-SAPSS25B.js +0 -2
  298. package/dist/cli/chunks/esm-node-FTBUMV4L.js +0 -2
  299. package/dist/cli/chunks/eval-Y3ODM7JU.js +0 -15
  300. package/dist/cli/chunks/heartbeat-scheduler-HYVMXCXT.js +0 -2
  301. package/dist/cli/chunks/hnsw-adapter-CBDRZLXX.js +0 -2
  302. package/dist/cli/chunks/hnsw-index-EOJG4VF4.js +0 -2
  303. package/dist/cli/chunks/impact-analyzer-C2TXXYPC.js +0 -2
  304. package/dist/cli/chunks/init-wizard-IQV7SBMW.js +0 -2
  305. package/dist/cli/chunks/kernel-NJOPFGK7.js +0 -2
  306. package/dist/cli/chunks/knowledge-graph-EUMGCQPH.js +0 -2
  307. package/dist/cli/chunks/learning-Y4OZJFBV.js +0 -107
  308. package/dist/cli/chunks/load-test-LBYVVG35.js +0 -2
  309. package/dist/cli/chunks/memory-backend-NQMJKHCQ.js +0 -2
  310. package/dist/cli/chunks/protocol-executor-ZSWPG5SU.js +0 -2
  311. package/dist/cli/chunks/qe-reasoning-bank-4RLPRCGF.js +0 -2
  312. package/dist/cli/chunks/queen-coordinator-KQ673NYE.js +0 -2
  313. package/dist/cli/chunks/router-UBNV4H5S.js +0 -2
  314. package/dist/cli/chunks/routing-feedback-BMMGZ346.js +0 -2
  315. package/dist/cli/chunks/rvf-native-adapter-LXBCTTVF.js +0 -2
  316. package/dist/cli/chunks/safe-db-FFSPBUAK.js +0 -2
  317. package/dist/cli/chunks/schedule-2MOMNZ6B.js +0 -2
  318. package/dist/cli/chunks/scheduler-5VGVANFG.js +0 -2
  319. package/dist/cli/chunks/shared-rvf-adapter-6JWYF7WV.js +0 -2
  320. package/dist/cli/chunks/sqlite-persistence-LCOAORK7.js +0 -2
  321. package/dist/cli/chunks/unified-memory-CZCWZUFP.js +0 -2
  322. package/dist/cli/chunks/unified-memory-hnsw-QEOXVSOZ.js +0 -2
  323. package/dist/cli/chunks/unified-persistence-HGZAYZGP.js +0 -2
  324. package/dist/cli/chunks/visual-security-ITKF4E4Z.js +0 -2
  325. package/dist/cli/chunks/witness-chain-SYFYXQD3.js +0 -2
  326. package/dist/cli/chunks/workflow-orchestrator-GZS2O3KW.js +0 -2
@@ -588,7 +588,7 @@ export class MCPProtocolServer {
588
588
  category: 'agent',
589
589
  isConcurrencySafe: true,
590
590
  parameters: [
591
- { name: 'agentId', type: 'string', description: 'Specific agent ID' },
591
+ { name: 'agentId', type: 'string', description: 'Specific agent ID', required: true },
592
592
  ],
593
593
  },
594
594
  handler: (params) => handleAgentMetrics(params),
@@ -714,7 +714,7 @@ export class MCPProtocolServer {
714
714
  category: 'domain',
715
715
  isConcurrencySafe: true,
716
716
  parameters: [
717
- { name: 'target', type: 'string', description: 'Target path to analyze' },
717
+ { name: 'target', type: 'string', description: 'Target path to analyze', required: true },
718
718
  { name: 'detectGaps', type: 'boolean', description: 'Detect coverage gaps', default: true },
719
719
  ],
720
720
  },
@@ -766,7 +766,7 @@ export class MCPProtocolServer {
766
766
  description: 'Test accessibility against WCAG 2.1/2.2 and Section 508 standards. Example: accessibility_test({ url: "http://localhost:3000", standard: "wcag21-aa" })',
767
767
  category: 'domain',
768
768
  parameters: [
769
- { name: 'url', type: 'string', description: 'URL to test' },
769
+ { name: 'url', type: 'string', description: 'URL to test', required: true },
770
770
  { name: 'standard', type: 'string', description: 'Accessibility standard' },
771
771
  ],
772
772
  },
@@ -793,7 +793,7 @@ export class MCPProtocolServer {
793
793
  category: 'domain',
794
794
  isConcurrencySafe: true,
795
795
  parameters: [
796
- { name: 'target', type: 'string', description: 'Target path' },
796
+ { name: 'target', type: 'string', description: 'Target path', required: true },
797
797
  ],
798
798
  },
799
799
  handler: (params) => handleDefectPredict(params),
@@ -819,7 +819,7 @@ export class MCPProtocolServer {
819
819
  category: 'domain',
820
820
  isConcurrencySafe: true,
821
821
  parameters: [
822
- { name: 'target', type: 'string', description: 'Target path' },
822
+ { name: 'target', type: 'string', description: 'Target path', required: true },
823
823
  ],
824
824
  },
825
825
  handler: (params) => handleCodeIndex(params),
@@ -1232,8 +1232,8 @@ export class MCPProtocolServer {
1232
1232
  description: 'Consult a stronger advisor model for strategic guidance. Forwards a task description and context to the advisor and returns enumerated action steps. Auto-detects the best available provider. Example: advisor_consult({ agent: "qe-test-architect", task: "Generate tests for auth module", context: "Found 4 classes with external deps" })',
1233
1233
  category: 'routing',
1234
1234
  parameters: [
1235
- { name: 'agent', type: 'string', description: 'Agent name requesting advice (e.g., qe-test-architect)' },
1236
- { name: 'task', type: 'string', description: 'Task description' },
1235
+ { name: 'agent', type: 'string', description: 'Agent name requesting advice (e.g., qe-test-architect)', required: true },
1236
+ { name: 'task', type: 'string', description: 'Task description', required: true },
1237
1237
  { name: 'context', type: 'string', description: 'What the executor has found so far' },
1238
1238
  { name: 'provider', type: 'string', description: 'Provider override (openrouter, claude, ollama)' },
1239
1239
  { name: 'model', type: 'string', description: 'Model override' },
@@ -1245,13 +1245,23 @@ export class MCPProtocolServer {
1245
1245
  const { join } = await import('path');
1246
1246
  const { tmpdir } = await import('os');
1247
1247
  const p = params;
1248
+ // ADR-092 contract enforcement: reject empty/missing required fields early
1249
+ // instead of shelling out to `aqe llm advise` with placeholder values.
1250
+ const agent = typeof p.agent === 'string' ? p.agent.trim() : '';
1251
+ const task = typeof p.task === 'string' ? p.task.trim() : '';
1252
+ if (!agent) {
1253
+ return { error: "advisor_consult: 'agent' is required (non-empty string)" };
1254
+ }
1255
+ if (!task) {
1256
+ return { error: "advisor_consult: 'task' is required (non-empty string)" };
1257
+ }
1248
1258
  const transcriptDir = join(tmpdir(), 'aqe-advisor');
1249
1259
  mkdirSync(transcriptDir, { recursive: true });
1250
1260
  const transcriptPath = join(transcriptDir, `mcp-${Date.now()}.json`);
1251
1261
  const transcript = {
1252
- taskDescription: p.task ?? '',
1262
+ taskDescription: task,
1253
1263
  messages: [
1254
- { role: 'user', content: p.task ?? '' },
1264
+ { role: 'user', content: task },
1255
1265
  ...(p.context ? [{ role: 'assistant', content: p.context }] : []),
1256
1266
  ],
1257
1267
  };
@@ -1260,7 +1270,7 @@ export class MCPProtocolServer {
1260
1270
  const cliArgs = [
1261
1271
  'llm', 'advise',
1262
1272
  '--transcript', transcriptPath,
1263
- '--agent', p.agent ?? 'unknown',
1273
+ '--agent', agent,
1264
1274
  '--json',
1265
1275
  ];
1266
1276
  if (p.provider)
@@ -0,0 +1,154 @@
1
+ /**
2
+ * Command Eval Runner — shell-command-based eval suite execution.
3
+ *
4
+ * Sibling to {@link ParallelEvalRunner} (which evaluates LLM prompts against
5
+ * keyword-match patterns). This runner is for skills whose eval suite is a
6
+ * set of shell commands that produce JSON envelopes — e.g. qe-browser, whose
7
+ * five primitives (assert, batch, visual-diff, check-injection, intent-score)
8
+ * are Node scripts that exit 0/1 with structured stdout.
9
+ *
10
+ * Detection is by suite shape, not by an explicit type tag: if the first test
11
+ * case has `input.command`, we treat the suite as command-mode.
12
+ *
13
+ * Supported assertions per test case:
14
+ * - `exit_code`: strict equality against the process exit code
15
+ * - `json_fields`: a map of dotted JSONPath -> expected value, evaluated
16
+ * against parsed stdout JSON
17
+ * - `severity_at_least`: ordered comparison against
18
+ * `.output.checkInjection.severity` in the range
19
+ * `none < low < medium < high < critical`
20
+ * - `candidate_count_at_least`: numeric lower bound on
21
+ * `.output.intentScore.candidateCount`
22
+ *
23
+ * Setup steps in `input.setup[]` run sequentially before the main command;
24
+ * any non-zero setup exit short-circuits the test case as failed.
25
+ */
26
+ declare const SEVERITY_ORDER: readonly ["none", "low", "medium", "high", "critical"];
27
+ export type Severity = (typeof SEVERITY_ORDER)[number];
28
+ /**
29
+ * Return true iff `actual` is at or above `threshold` on the severity scale.
30
+ * Unknown severities return false (conservative — we never silently pass).
31
+ */
32
+ export declare function severityAtLeast(actual: unknown, threshold: Severity): boolean;
33
+ /**
34
+ * Evaluate a simple dotted JSONPath like `.output.assert.passed` against an
35
+ * already-parsed JSON value. Returns `undefined` if any segment is missing.
36
+ *
37
+ * We intentionally support only dotted paths (no `[idx]`, no filters) because
38
+ * that's the full surface area used by qe-browser's output schemas.
39
+ */
40
+ export declare function evalJsonPath(obj: unknown, jsonPath: string): unknown;
41
+ export type TestCasePriority = 'critical' | 'high' | 'medium' | 'low';
42
+ export interface CommandEvalExpected {
43
+ exit_code?: number;
44
+ /** Dotted JSONPath → expected JSON value (deep equality). */
45
+ json_fields?: Record<string, unknown>;
46
+ severity_at_least?: Severity;
47
+ candidate_count_at_least?: number;
48
+ }
49
+ export interface CommandEvalTestCase {
50
+ id: string;
51
+ description?: string;
52
+ category?: string;
53
+ priority?: TestCasePriority;
54
+ input: {
55
+ setup?: string[];
56
+ command: string;
57
+ };
58
+ expected: CommandEvalExpected;
59
+ }
60
+ export interface CommandEvalSuite {
61
+ skill: string;
62
+ version?: string;
63
+ status?: 'design-spec' | 'active' | 'deprecated';
64
+ description?: string;
65
+ test_cases: CommandEvalTestCase[];
66
+ validation?: {
67
+ required_pass_rate?: number;
68
+ critical_must_pass?: boolean;
69
+ };
70
+ }
71
+ export interface CommandEvalTestResult {
72
+ testId: string;
73
+ passed: boolean;
74
+ category?: string;
75
+ priority?: TestCasePriority;
76
+ exitCode: number | null;
77
+ stdoutSnippet: string;
78
+ stderrSnippet: string;
79
+ /** Assertion failures — empty when passed. */
80
+ failures: string[];
81
+ durationMs: number;
82
+ /** Set when a setup step failed before the main command ran. */
83
+ setupFailure?: string;
84
+ }
85
+ export interface CommandEvalResult {
86
+ skill: string;
87
+ passed: boolean;
88
+ totalTests: number;
89
+ passedTests: number;
90
+ failedTests: number;
91
+ passRate: number;
92
+ /** True iff every test with priority=critical passed. */
93
+ criticalPassed: boolean;
94
+ testResults: CommandEvalTestResult[];
95
+ totalDurationMs: number;
96
+ timestamp: Date;
97
+ }
98
+ /** Injectable runner so tests don't spawn real processes. */
99
+ export type CommandRunner = (cmd: string, options: {
100
+ timeoutMs: number;
101
+ cwd: string;
102
+ }) => {
103
+ status: number | null;
104
+ stdout: string;
105
+ stderr: string;
106
+ error?: Error;
107
+ };
108
+ /**
109
+ * A suite is command-eval mode when the first test case has `input.command`.
110
+ * We use this to dispatch from the shared `aqe eval` CLI without requiring a
111
+ * new explicit type tag in every existing LLM-style yaml.
112
+ */
113
+ export declare function isCommandEvalSuite(raw: unknown): raw is CommandEvalSuite;
114
+ /**
115
+ * Validate a single test-case result against its expected block.
116
+ * Returns the list of failures (empty == passed).
117
+ *
118
+ * Parses stdout as JSON only if at least one assertion needs it, so commands
119
+ * that only care about `exit_code` don't require JSON output.
120
+ */
121
+ export declare function validateCommandResult(tc: CommandEvalTestCase, exitCode: number | null, stdout: string): {
122
+ passed: boolean;
123
+ failures: string[];
124
+ };
125
+ export interface CommandEvalRunnerOptions {
126
+ /** Directory containing skill directories (default: `.claude/skills`). */
127
+ skillsDir?: string;
128
+ /** Per-command timeout in milliseconds (default: 60s). */
129
+ timeoutMs?: number;
130
+ /** Working directory for commands (default: `process.cwd()`). */
131
+ cwd?: string;
132
+ /** Injected runner for tests. */
133
+ runner?: CommandRunner;
134
+ }
135
+ export declare class CommandEvalRunner {
136
+ private readonly skillsDir;
137
+ private readonly timeoutMs;
138
+ private readonly cwd;
139
+ private readonly runner;
140
+ constructor(options?: CommandEvalRunnerOptions);
141
+ /**
142
+ * Load `${skill}/evals/${skill}.yaml` and return it iff it's a command-mode
143
+ * suite. Returns null if missing, unparseable, or not command-mode.
144
+ */
145
+ loadSuite(skill: string): CommandEvalSuite | null;
146
+ run(skill: string): Promise<CommandEvalResult>;
147
+ private executeCase;
148
+ }
149
+ /**
150
+ * Convenience factory.
151
+ */
152
+ export declare function createCommandEvalRunner(options?: CommandEvalRunnerOptions): CommandEvalRunner;
153
+ export {};
154
+ //# sourceMappingURL=command-eval-runner.d.ts.map
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Command Eval Runner — shell-command-based eval suite execution.
3
+ *
4
+ * Sibling to {@link ParallelEvalRunner} (which evaluates LLM prompts against
5
+ * keyword-match patterns). This runner is for skills whose eval suite is a
6
+ * set of shell commands that produce JSON envelopes — e.g. qe-browser, whose
7
+ * five primitives (assert, batch, visual-diff, check-injection, intent-score)
8
+ * are Node scripts that exit 0/1 with structured stdout.
9
+ *
10
+ * Detection is by suite shape, not by an explicit type tag: if the first test
11
+ * case has `input.command`, we treat the suite as command-mode.
12
+ *
13
+ * Supported assertions per test case:
14
+ * - `exit_code`: strict equality against the process exit code
15
+ * - `json_fields`: a map of dotted JSONPath -> expected value, evaluated
16
+ * against parsed stdout JSON
17
+ * - `severity_at_least`: ordered comparison against
18
+ * `.output.checkInjection.severity` in the range
19
+ * `none < low < medium < high < critical`
20
+ * - `candidate_count_at_least`: numeric lower bound on
21
+ * `.output.intentScore.candidateCount`
22
+ *
23
+ * Setup steps in `input.setup[]` run sequentially before the main command;
24
+ * any non-zero setup exit short-circuits the test case as failed.
25
+ */
26
+ import * as fs from 'node:fs';
27
+ import * as path from 'node:path';
28
+ import * as yaml from 'yaml';
29
+ import { spawnSync as realSpawnSync } from 'node:child_process';
30
+ import { toErrorMessage } from '../shared/error-utils.js';
31
+ // ============================================================================
32
+ // Severity ordering
33
+ // ============================================================================
34
+ const SEVERITY_ORDER = ['none', 'low', 'medium', 'high', 'critical'];
35
+ /**
36
+ * Return true iff `actual` is at or above `threshold` on the severity scale.
37
+ * Unknown severities return false (conservative — we never silently pass).
38
+ */
39
+ export function severityAtLeast(actual, threshold) {
40
+ if (typeof actual !== 'string')
41
+ return false;
42
+ const a = SEVERITY_ORDER.indexOf(actual);
43
+ const t = SEVERITY_ORDER.indexOf(threshold);
44
+ return a >= 0 && t >= 0 && a >= t;
45
+ }
46
+ // ============================================================================
47
+ // JSON path evaluation
48
+ // ============================================================================
49
+ /**
50
+ * Evaluate a simple dotted JSONPath like `.output.assert.passed` against an
51
+ * already-parsed JSON value. Returns `undefined` if any segment is missing.
52
+ *
53
+ * We intentionally support only dotted paths (no `[idx]`, no filters) because
54
+ * that's the full surface area used by qe-browser's output schemas.
55
+ */
56
+ export function evalJsonPath(obj, jsonPath) {
57
+ if (typeof jsonPath !== 'string' || !jsonPath.startsWith('.'))
58
+ return undefined;
59
+ const parts = jsonPath === '.' ? [] : jsonPath.slice(1).split('.');
60
+ let cur = obj;
61
+ for (const part of parts) {
62
+ if (cur == null || typeof cur !== 'object')
63
+ return undefined;
64
+ cur = cur[part];
65
+ }
66
+ return cur;
67
+ }
68
+ const defaultCommandRunner = (cmd, opts) => {
69
+ const result = realSpawnSync('bash', ['-c', cmd], {
70
+ timeout: opts.timeoutMs,
71
+ cwd: opts.cwd,
72
+ encoding: 'utf8',
73
+ maxBuffer: 16 * 1024 * 1024,
74
+ });
75
+ return {
76
+ status: result.status,
77
+ stdout: typeof result.stdout === 'string' ? result.stdout : '',
78
+ stderr: typeof result.stderr === 'string' ? result.stderr : '',
79
+ error: result.error,
80
+ };
81
+ };
82
+ // ============================================================================
83
+ // Suite detection
84
+ // ============================================================================
85
+ /**
86
+ * A suite is command-eval mode when the first test case has `input.command`.
87
+ * We use this to dispatch from the shared `aqe eval` CLI without requiring a
88
+ * new explicit type tag in every existing LLM-style yaml.
89
+ */
90
+ export function isCommandEvalSuite(raw) {
91
+ if (!raw || typeof raw !== 'object')
92
+ return false;
93
+ const obj = raw;
94
+ if (!Array.isArray(obj.test_cases) || obj.test_cases.length === 0)
95
+ return false;
96
+ const first = obj.test_cases[0];
97
+ return typeof first?.input?.command === 'string';
98
+ }
99
+ // ============================================================================
100
+ // Result validation
101
+ // ============================================================================
102
+ /**
103
+ * Validate a single test-case result against its expected block.
104
+ * Returns the list of failures (empty == passed).
105
+ *
106
+ * Parses stdout as JSON only if at least one assertion needs it, so commands
107
+ * that only care about `exit_code` don't require JSON output.
108
+ */
109
+ export function validateCommandResult(tc, exitCode, stdout) {
110
+ const failures = [];
111
+ const expected = tc.expected || {};
112
+ if (expected.exit_code !== undefined && exitCode !== expected.exit_code) {
113
+ failures.push(`exit_code: expected ${expected.exit_code}, got ${exitCode}`);
114
+ }
115
+ const needsJson = !!expected.json_fields ||
116
+ expected.severity_at_least !== undefined ||
117
+ expected.candidate_count_at_least !== undefined;
118
+ let parsed = null;
119
+ if (needsJson) {
120
+ try {
121
+ parsed = JSON.parse(stdout);
122
+ }
123
+ catch (e) {
124
+ failures.push(`stdout is not valid JSON: ${toErrorMessage(e)}`);
125
+ return { passed: false, failures };
126
+ }
127
+ }
128
+ if (expected.json_fields) {
129
+ for (const [jsonPath, want] of Object.entries(expected.json_fields)) {
130
+ const got = evalJsonPath(parsed, jsonPath);
131
+ if (!deepEqual(got, want)) {
132
+ failures.push(`json_fields ${jsonPath}: expected ${JSON.stringify(want)}, got ${JSON.stringify(got)}`);
133
+ }
134
+ }
135
+ }
136
+ if (expected.severity_at_least !== undefined) {
137
+ const sev = evalJsonPath(parsed, '.output.checkInjection.severity');
138
+ if (!severityAtLeast(sev, expected.severity_at_least)) {
139
+ failures.push(`severity_at_least: expected >= ${expected.severity_at_least}, got ${JSON.stringify(sev)}`);
140
+ }
141
+ }
142
+ if (expected.candidate_count_at_least !== undefined) {
143
+ const count = evalJsonPath(parsed, '.output.intentScore.candidateCount');
144
+ const countNum = typeof count === 'number' ? count : Number.NaN;
145
+ if (!(countNum >= expected.candidate_count_at_least)) {
146
+ failures.push(`candidate_count_at_least: expected >= ${expected.candidate_count_at_least}, got ${JSON.stringify(count)}`);
147
+ }
148
+ }
149
+ return { passed: failures.length === 0, failures };
150
+ }
151
+ /**
152
+ * Strict structural equality for JSON values — used to compare
153
+ * `json_fields` expected values against extracted paths. Avoids the pitfalls
154
+ * of `JSON.stringify` comparison (e.g. key order variance on objects) by
155
+ * walking both sides.
156
+ */
157
+ function deepEqual(a, b) {
158
+ if (a === b)
159
+ return true;
160
+ if (a == null || b == null)
161
+ return a === b;
162
+ if (typeof a !== typeof b)
163
+ return false;
164
+ if (Array.isArray(a)) {
165
+ if (!Array.isArray(b) || a.length !== b.length)
166
+ return false;
167
+ return a.every((v, i) => deepEqual(v, b[i]));
168
+ }
169
+ if (typeof a === 'object') {
170
+ if (typeof b !== 'object' || Array.isArray(b))
171
+ return false;
172
+ const ao = a;
173
+ const bo = b;
174
+ const ak = Object.keys(ao);
175
+ const bk = Object.keys(bo);
176
+ if (ak.length !== bk.length)
177
+ return false;
178
+ return ak.every((k) => deepEqual(ao[k], bo[k]));
179
+ }
180
+ return false;
181
+ }
182
+ export class CommandEvalRunner {
183
+ skillsDir;
184
+ timeoutMs;
185
+ cwd;
186
+ runner;
187
+ constructor(options = {}) {
188
+ this.skillsDir = options.skillsDir ?? '.claude/skills';
189
+ this.timeoutMs = options.timeoutMs ?? 60_000;
190
+ this.cwd = options.cwd ?? process.cwd();
191
+ this.runner = options.runner ?? defaultCommandRunner;
192
+ }
193
+ /**
194
+ * Load `${skill}/evals/${skill}.yaml` and return it iff it's a command-mode
195
+ * suite. Returns null if missing, unparseable, or not command-mode.
196
+ */
197
+ loadSuite(skill) {
198
+ const baseDir = path.isAbsolute(this.skillsDir)
199
+ ? this.skillsDir
200
+ : path.join(this.cwd, this.skillsDir);
201
+ const evalPath = path.join(baseDir, skill, 'evals', `${skill}.yaml`);
202
+ if (!fs.existsSync(evalPath))
203
+ return null;
204
+ try {
205
+ const raw = yaml.parse(fs.readFileSync(evalPath, 'utf-8'));
206
+ if (!isCommandEvalSuite(raw))
207
+ return null;
208
+ return raw;
209
+ }
210
+ catch {
211
+ return null;
212
+ }
213
+ }
214
+ async run(skill) {
215
+ const start = Date.now();
216
+ const suite = this.loadSuite(skill);
217
+ if (!suite) {
218
+ throw new Error(`Command-eval suite not found or not command-mode at ${this.skillsDir}/${skill}/evals/${skill}.yaml`);
219
+ }
220
+ const results = [];
221
+ // Sequential by design: setup steps (e.g. `vibium go <url>`) mutate
222
+ // shared browser state, so interleaving test cases would be racy.
223
+ for (const tc of suite.test_cases) {
224
+ results.push(this.executeCase(tc));
225
+ }
226
+ const passedTests = results.filter((r) => r.passed).length;
227
+ const failedTests = results.length - passedTests;
228
+ const passRate = results.length > 0 ? passedTests / results.length : 0;
229
+ const requiredPassRate = suite.validation?.required_pass_rate ?? 0.9;
230
+ const criticalMustPass = suite.validation?.critical_must_pass ?? true;
231
+ const criticalResults = results.filter((r) => r.priority === 'critical');
232
+ const criticalPassed = criticalResults.every((r) => r.passed);
233
+ const passed = passRate >= requiredPassRate && (!criticalMustPass || criticalPassed);
234
+ return {
235
+ skill,
236
+ passed,
237
+ totalTests: results.length,
238
+ passedTests,
239
+ failedTests,
240
+ passRate,
241
+ criticalPassed,
242
+ testResults: results,
243
+ totalDurationMs: Date.now() - start,
244
+ timestamp: new Date(),
245
+ };
246
+ }
247
+ executeCase(tc) {
248
+ const start = Date.now();
249
+ const setup = tc.input?.setup ?? [];
250
+ for (const step of setup) {
251
+ const r = this.runner(step, { timeoutMs: this.timeoutMs, cwd: this.cwd });
252
+ if (r.status !== 0) {
253
+ return {
254
+ testId: tc.id,
255
+ passed: false,
256
+ category: tc.category,
257
+ priority: tc.priority,
258
+ exitCode: r.status,
259
+ stdoutSnippet: truncate(r.stdout),
260
+ stderrSnippet: truncate(r.stderr),
261
+ failures: [],
262
+ setupFailure: `setup step failed (exit ${r.status}): ${step}`,
263
+ durationMs: Date.now() - start,
264
+ };
265
+ }
266
+ }
267
+ const r = this.runner(tc.input.command, { timeoutMs: this.timeoutMs, cwd: this.cwd });
268
+ const v = validateCommandResult(tc, r.status, r.stdout);
269
+ return {
270
+ testId: tc.id,
271
+ passed: v.passed,
272
+ category: tc.category,
273
+ priority: tc.priority,
274
+ exitCode: r.status,
275
+ stdoutSnippet: truncate(r.stdout),
276
+ stderrSnippet: truncate(r.stderr),
277
+ failures: v.failures,
278
+ durationMs: Date.now() - start,
279
+ };
280
+ }
281
+ }
282
+ function truncate(s, max = 500) {
283
+ if (s.length <= max)
284
+ return s;
285
+ return `${s.slice(0, max)}…[truncated ${s.length - max}b]`;
286
+ }
287
+ /**
288
+ * Convenience factory.
289
+ */
290
+ export function createCommandEvalRunner(options = {}) {
291
+ return new CommandEvalRunner(options);
292
+ }
293
+ //# sourceMappingURL=command-eval-runner.js.map
@@ -14,6 +14,8 @@ export { SwarmSkillValidator, createSwarmSkillValidator, DEFAULT_SWARM_VALIDATIO
14
14
  export type { SwarmValidationConfig, SwarmTopology, SwarmValidationResult, SwarmValidationSummary, SkillValidatorFn, } from './swarm-skill-validator.js';
15
15
  export { ParallelEvalRunner, createParallelEvalRunner, DEFAULT_PARALLEL_EVAL_CONFIG, MockLLMExecutor, } from './parallel-eval-runner.js';
16
16
  export type { ParallelEvalConfig, EvalTestCase, EvalTestCaseInput, EvalTestCaseExpectedOutput, EvalTestCaseValidation, EvalSuite, TestCaseTask, ParallelEvalResult, WorkerMessage, WorkerProgress, EvalProgress, LLMExecutor, } from './parallel-eval-runner.js';
17
+ export { CommandEvalRunner, createCommandEvalRunner, evalJsonPath, severityAtLeast, isCommandEvalSuite, validateCommandResult, } from './command-eval-runner.js';
18
+ export type { CommandEvalSuite, CommandEvalTestCase, CommandEvalExpected, CommandEvalResult, CommandEvalTestResult, CommandEvalRunnerOptions, CommandRunner, Severity, TestCasePriority, } from './command-eval-runner.js';
17
19
  export { ValidationResultAggregator, createValidationResultAggregator, } from './validation-result-aggregator.js';
18
20
  export type { AggregatedValidationReport, AggregatorConfig, CrossModelReport, IssueSeverity, ModelAnomaly, ParallelValidationRunResult, RegressionReport, SkillValidationSummary, ValidationIssue, } from './validation-result-aggregator.js';
19
21
  export { TriggerOptimizer, createTriggerOptimizer, parseSkillFrontmatter, } from './trigger-optimizer.js';
@@ -25,6 +25,10 @@ P0_SKILLS, DEFAULT_VALIDATION_MODELS, } from './swarm-skill-validator.js';
25
25
  // ============================================================================
26
26
  export { ParallelEvalRunner, createParallelEvalRunner, DEFAULT_PARALLEL_EVAL_CONFIG, MockLLMExecutor, } from './parallel-eval-runner.js';
27
27
  // ============================================================================
28
+ // Command Eval Runner (ADR-091: qe-browser and other shell-based skills)
29
+ // ============================================================================
30
+ export { CommandEvalRunner, createCommandEvalRunner, evalJsonPath, severityAtLeast, isCommandEvalSuite, validateCommandResult, } from './command-eval-runner.js';
31
+ // ============================================================================
28
32
  // Validation Result Aggregator (ADR-056 Phase 5)
29
33
  // ============================================================================
30
34
  export { ValidationResultAggregator, createValidationResultAggregator, } from './validation-result-aggregator.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-qe",
3
- "version": "3.9.13",
3
+ "version": "3.9.15",
4
4
  "description": "Agentic Quality Engineering V3 - Domain-Driven Design Architecture with 13 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 60 specialized QE agents, mathematical Coherence verification, deep Claude Flow integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -82,7 +82,7 @@
82
82
  "dev": "node dist/cli/bundle.js",
83
83
  "start": "node dist/cli/bundle.js",
84
84
  "typecheck": "tsc --noEmit",
85
- "lint": "eslint src tests --ext .ts",
85
+ "lint": "eslint src --ext .ts",
86
86
  "clean": "node -e \"const fs=require('fs');try{fs.rmSync('dist',{recursive:true,force:true})}catch{}\"",
87
87
  "sync:agents": "node scripts/sync-agents.cjs",
88
88
  "sync:agents:check": "node scripts/sync-agents-check.cjs",
@@ -128,7 +128,6 @@
128
128
  "author": "AQE Development Team",
129
129
  "license": "MIT",
130
130
  "dependencies": {
131
- "@claude-flow/guidance": "3.0.0-alpha.1",
132
131
  "@ruvector/attention": "0.1.3",
133
132
  "@ruvector/gnn": "0.1.25",
134
133
  "@ruvector/learning-wasm": "^0.1.29",
@@ -156,6 +155,7 @@
156
155
  },
157
156
  "optionalDependencies": {
158
157
  "@claude-flow/browser": "3.0.0-alpha.1",
158
+ "@claude-flow/guidance": "3.0.0-alpha.1",
159
159
  "@ruvector/attention-darwin-arm64": "0.1.3",
160
160
  "@ruvector/attention-darwin-x64": "0.1.3",
161
161
  "@ruvector/attention-linux-arm64-gnu": "0.1.3",
@@ -174,13 +174,15 @@
174
174
  "resolutions": {
175
175
  "graceful-fs": "^4.2.11",
176
176
  "stack-utils": "^2.0.6",
177
- "tar": ">=7.5.7"
177
+ "tar": ">=7.5.7",
178
+ "protobufjs": "^7.5.5"
178
179
  },
179
180
  "overrides": {
180
181
  "@ruvector/gnn-linux-x64-musl": "npm:@ruvector/gnn-linux-x64-gnu@0.1.25",
181
182
  "@ruvector/gnn-linux-arm64-musl": "npm:@ruvector/gnn-linux-arm64-gnu@0.1.25",
182
183
  "tar": ">=7.5.7",
183
- "markdown-it": ">=14.1.1"
184
+ "markdown-it": ">=14.1.1",
185
+ "protobufjs": "^7.5.5"
184
186
  },
185
187
  "devDependencies": {
186
188
  "@faker-js/faker": "^10.2.0",
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{a,b,c}from"./chunk-LRHJOYKY.js";import"./chunk-F74IVEON.js";import"./chunk-Z6F4GRXY.js";import"./chunk-VCJP7HQG.js";import"./chunk-3AOWTHLS.js";import"./chunk-ERGY45RL.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{a,b,c,d,e,f}from"./chunk-4WJ3BHCN.js";import"./chunk-R4B2B6MZ.js";import"./chunk-Q7TWE55T.js";import"./chunk-APQYMAKG.js";import"./chunk-TRJRRJV3.js";import"./chunk-OBDM6OJL.js";import"./chunk-TOS3PI5Q.js";import"./chunk-VVVIRGO7.js";import"./chunk-UCCNB75R.js";import"./chunk-FLML5IT7.js";import"./chunk-RYPUA6E2.js";import"./chunk-7HX2PMBB.js";import"./chunk-TWRGM5TY.js";import"./chunk-EBQUXPIG.js";import"./chunk-XXQYSDLV.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-VCJP7HQG.js";import"./chunk-QIE76ERL.js";import"./chunk-3AOWTHLS.js";import"./chunk-IQGVQBVS.js";import"./chunk-CF5EJGOV.js";import"./chunk-OM7A3YC3.js";import"./chunk-77GZ7LXL.js";import"./chunk-YYQVSVBO.js";import"./chunk-ZS5BM2EE.js";import"./chunk-AZPDX4KS.js";import"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{a,b,c,d,e,f}from"./chunk-D22MEX2U.js";import"./chunk-YCQ2GHFH.js";import"./chunk-EBQUXPIG.js";import"./chunk-XXQYSDLV.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-VCJP7HQG.js";import"./chunk-3AOWTHLS.js";import"./chunk-IQGVQBVS.js";import"./chunk-CF5EJGOV.js";import"./chunk-OM7A3YC3.js";import"./chunk-77GZ7LXL.js";import"./chunk-YYQVSVBO.js";import"./chunk-ZS5BM2EE.js";import"./chunk-AZPDX4KS.js";import"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";export{f as MCPToolBase,e as defaultToolLogger,d as getMemoryBackend,b as getSharedMemoryBackend,a as registerRvfResetFn,c as resetSharedMemoryBackend};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{a}from"./chunk-RMNZSGTE.js";import"./chunk-D22MEX2U.js";import"./chunk-YCQ2GHFH.js";import"./chunk-EBQUXPIG.js";import"./chunk-XXQYSDLV.js";import"./chunk-Y2ONHWXI.js";import"./chunk-HHRUXDLT.js";import"./chunk-VCJP7HQG.js";import"./chunk-3AOWTHLS.js";import"./chunk-IQGVQBVS.js";import"./chunk-CF5EJGOV.js";import"./chunk-OM7A3YC3.js";import"./chunk-77GZ7LXL.js";import"./chunk-YYQVSVBO.js";import"./chunk-ZS5BM2EE.js";import"./chunk-AZPDX4KS.js";import"./chunk-V2CV6J2A.js";import"./chunk-JOCR5TWI.js";import"./chunk-W2YCNX4O.js";import"./chunk-ERGY45RL.js";export{a as BrowserWorkflowTool};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{a as f}from"./chunk-Y2ONHWXI.js";import{c as p}from"./chunk-HHRUXDLT.js";import{a as l,d as b}from"./chunk-YYQVSVBO.js";import{a as d,c as g}from"./chunk-V2CV6J2A.js";f();g();b();var v={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine",namespace:"coverage-hnsw",maxElements:1e5},S=p.create("coverage-analysis/hnsw-index"),u=class{constructor(e,t={}){this.memory=e;this.config={...v,...t},this.stats={vectorCount:0,searchOperations:0,insertOperations:0}}config;stats;searchLatencies=[];backendType="ruvector-gnn";adapter=null;initialized=!1;metadataStore=new Map;async initialize(){if(this.initialized)return;let e=this.config.metric==="cosine"?"cosine":"euclidean",t=`coverage-${this.config.namespace}`;d.close(t),this.adapter=d.create(t,{dimensions:this.config.dimensions,M:this.config.M,efConstruction:this.config.efConstruction,efSearch:this.config.efSearch,metric:e}),S.info(`HnswAdapter initialized: dimension=${this.config.dimensions}, metric=${this.config.metric}, M=${this.config.M} (unified backend via ADR-071)`),this.initialized=!0}isNativeAvailable(){return this.initialized&&this.adapter!==null}getBackendType(){return this.backendType}isRuvectorAvailable(){return this.initialized&&this.adapter!==null&&this.adapter.isRuvectorAvailable()}async insert(e,t,a){this.initialized||await this.initialize(),t=this.validateVector(t),this.adapter.addByStringId(e,t),a&&this.metadataStore.set(e,a),this.stats.insertOperations++,this.stats.vectorCount=this.adapter.size()}async search(e,t){this.initialized||await this.initialize(),e=this.validateVector(e);let a=performance.now(),n=[];this.adapter.size()>0&&(n=this.adapter.searchByArray(e,t).map(({id:i,score:o})=>({key:i,score:o,distance:1-o,metadata:this.metadataStore.get(i)})));let s=performance.now()-a;return this.recordSearchLatency(s),this.stats.searchOperations++,n}async batchInsert(e){this.initialized||await this.initialize();let t=100;for(let a=0;a<e.length;a+=t){let n=e.slice(a,a+t);await Promise.all(n.map(r=>this.insert(r.key,r.vector,r.metadata)))}}async delete(e){if(!this.adapter)return!1;let t=this.adapter.removeByStringId(e);if(t){this.metadataStore.delete(e);let a=this.buildKey(e);await this.memory.delete(a),this.stats.vectorCount=this.adapter.size()}return t}async getStats(){return{nativeHNSW:this.initialized&&this.adapter!==null,backendType:this.backendType,vectorCount:this.stats.vectorCount,indexSizeBytes:this.stats.vectorCount*this.config.dimensions*4,avgSearchLatencyMs:this.calculateAvgLatency(),p95SearchLatencyMs:this.calculatePercentileLatency(95),p99SearchLatencyMs:this.calculatePercentileLatency(99),searchOperations:this.stats.searchOperations,insertOperations:this.stats.insertOperations}}async clear(){this.metadataStore.clear(),this.adapter&&this.adapter.clear(),this.stats.vectorCount=0,this.searchLatencies=[]}validateVector(e){if(e.length!==this.config.dimensions)return this.resizeVector(e,this.config.dimensions);for(let t=0;t<e.length;t++)if(!Number.isFinite(e[t]))throw new Error(`Invalid vector value at index ${t}: ${e[t]}`);return e}resizeVector(e,t){if(e.length===t)return e;if(e.length>t){let n=new Array(t).fill(0),r=e.length/t;for(let s=0;s<t;s++){let h=Math.floor(s*r),i=Math.floor((s+1)*r),o=0;for(let m=h;m<i;m++)o+=e[m];n[s]=o/(i-h)}return n}let a=new Array(t).fill(0);for(let n=0;n<e.length;n++)a[n]=e[n];return a}buildKey(e){return`${this.config.namespace}:${e}`}recordSearchLatency(e){this.searchLatencies.push(e);let t=1e3;this.searchLatencies.length>t&&(this.searchLatencies=this.searchLatencies.slice(-t))}calculateAvgLatency(){return this.searchLatencies.length===0?0:this.searchLatencies.reduce((t,a)=>t+a,0)/this.searchLatencies.length}calculatePercentileLatency(e){if(this.searchLatencies.length===0)return 0;let t=[...this.searchLatencies].sort((n,r)=>n-r),a=Math.ceil(e/100*t.length)-1;return t[Math.max(0,a)]}setEfSearch(e){this.config.efSearch=e}};function C(c,e){return new u(c,e)}async function H(c,e=1e4,t=1e3){let n=performance.now();for(let i=0;i<e;i++){let o=Array.from({length:384},()=>l());await c.insert(`bench-${i}`,o)}let r=performance.now()-n,s=performance.now();for(let i=0;i<t;i++){let o=Array.from({length:384},()=>l());await c.search(o,10)}let h=performance.now()-s;return{insertTimeMs:r,searchTimeMs:h,avgSearchLatencyMs:h/t,isNative:c.isNativeAvailable(),backendType:c.getBackendType()}}export{v as a,u as b,C as c,H as d};