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
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(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.15");process.exit(0)}
2
2
  import T from"crypto";var h=new Uint8Array(256),y=h.length;function s(){return y>h.length-16&&(T.randomFillSync(h),y=0),h.slice(y,y+=16)}var A=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function q(r){return typeof r=="string"&&A.test(r)}var u=q;var o=[];for(let r=0;r<256;++r)o.push((r+256).toString(16).slice(1));function p(r,e=0){return o[r[e+0]]+o[r[e+1]]+o[r[e+2]]+o[r[e+3]]+"-"+o[r[e+4]]+o[r[e+5]]+"-"+o[r[e+6]]+o[r[e+7]]+"-"+o[r[e+8]]+o[r[e+9]]+"-"+o[r[e+10]]+o[r[e+11]]+o[r[e+12]]+o[r[e+13]]+o[r[e+14]]+o[r[e+15]]}function N(r,e=0){let t=p(r,e);if(!u(t))throw TypeError("Stringified UUID is invalid");return t}var _=N;var E,U,I=0,w=0;function R(r,e,t){let n=e&&t||0,f=e||new Array(16);r=r||{};let d=r.node||E,l=r.clockseq!==void 0?r.clockseq:U;if(d==null||l==null){let a=r.random||(r.rng||s)();d==null&&(d=E=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),l==null&&(l=U=(a[6]<<8|a[7])&16383)}let c=r.msecs!==void 0?r.msecs:Date.now(),x=r.nsecs!==void 0?r.nsecs:w+1,i=c-I+(x-w)/1e4;if(i<0&&r.clockseq===void 0&&(l=l+1&16383),(i<0||c>I)&&r.nsecs===void 0&&(x=0),x>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");I=c,w=x,U=l,c+=122192928e5;let m=((c&268435455)*1e4+x)%4294967296;f[n++]=m>>>24&255,f[n++]=m>>>16&255,f[n++]=m>>>8&255,f[n++]=m&255;let v=c/4294967296*1e4&268435455;f[n++]=v>>>8&255,f[n++]=v&255,f[n++]=v>>>24&15|16,f[n++]=v>>>16&255,f[n++]=l>>>8|128,f[n++]=l&255;for(let a=0;a<6;++a)f[n+a]=d[a];return e||p(f)}var C=R;function H(r){if(!u(r))throw TypeError("Invalid UUID");let e,t=new Uint8Array(16);return t[0]=(e=parseInt(r.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(r.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(r.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(r.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}var D=H;function L(r){r=unescape(encodeURIComponent(r));let e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t));return e}var M="6ba7b810-9dad-11d1-80b4-00c04fd430c8",P="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function g(r,e,t){function n(f,d,l,c){var x;if(typeof f=="string"&&(f=L(f)),typeof d=="string"&&(d=D(d)),((x=d)===null||x===void 0?void 0:x.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let i=new Uint8Array(16+f.length);if(i.set(d),i.set(f,d.length),i=t(i),i[6]=i[6]&15|e,i[8]=i[8]&63|128,l){c=c||0;for(let m=0;m<16;++m)l[c+m]=i[m];return l}return p(i)}try{n.name=r}catch{}return n.DNS=M,n.URL=P,n}import F from"crypto";function G(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),F.createHash("md5").update(r).digest()}var k=G;var X=g("v3",48,k),$=X;import j from"crypto";var S={randomUUID:j.randomUUID};function z(r,e,t){if(S.randomUUID&&!e&&!r)return S.randomUUID();r=r||{};let n=r.random||(r.rng||s)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let f=0;f<16;++f)e[t+f]=n[f];return e}return p(n)}var J=z;import K from"crypto";function O(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),K.createHash("sha1").update(r).digest()}var B=O;var Q=g("v5",80,B),V=Q;var W="00000000-0000-0000-0000-000000000000";function Y(r){if(!u(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var Z=Y;export{u as a,_ as b,C as c,D as d,$ as e,J as f,V as g,W as h,Z as i};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(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.15");process.exit(0)}
2
2
  var t=["claude","openai","ollama","openrouter","gemini","azure-openai","bedrock","onnx"];var e={maxAttempts:3,delayMs:100,trySameProviderAlternateModel:!0,skipOpenCircuits:!0,retryableErrors:["RATE_LIMITED","TIMEOUT","NETWORK_ERROR","PROVIDER_UNAVAILABLE"]},r=[{provider:"claude",models:["claude-sonnet-4-6","claude-haiku-4-5-20251001"],enabled:!0,priority:100,maxAttempts:2,timeoutMs:3e4},{provider:"openai",models:["gpt-4o","gpt-4o-mini"],enabled:!0,priority:90,maxAttempts:2,timeoutMs:3e4},{provider:"openrouter",models:["anthropic/claude-sonnet-4","openai/gpt-4o"],enabled:!0,priority:85,maxAttempts:2,timeoutMs:3e4},{provider:"ollama",models:["llama3.1","mistral"],enabled:!0,priority:80,maxAttempts:2,timeoutMs:6e4},{provider:"onnx",models:["phi-4","all-MiniLM-L6-v2"],enabled:!0,priority:70,maxAttempts:1,timeoutMs:12e4}],o={id:"default-fallback-chain",entries:r,maxRetries:3,retryDelayMs:100,backoffMultiplier:2,maxDelayMs:5e3},n={mode:"rule-based",rules:[],defaultProvider:"claude",defaultModel:"claude-sonnet-4-6",fallbackChain:o,fallbackBehavior:e,providers:{claude:{enabled:!0,defaultModel:"claude-sonnet-4-6"},openai:{enabled:!0,defaultModel:"gpt-4o"},ollama:{enabled:!0,defaultModel:"llama3.1"},openrouter:{enabled:!0,defaultModel:"anthropic/claude-sonnet-4"},gemini:{enabled:!1,defaultModel:"gemini-pro"},"azure-openai":{enabled:!1},bedrock:{enabled:!1},onnx:{enabled:!0,defaultModel:"phi-4"}},enableMetrics:!0,metricsConfig:{enabled:!0,collectionIntervalMs:6e4,retentionMs:864e5,trackPerRequest:!0},maxDecisionTimeMs:10,cacheDecisions:!0,decisionCacheTtlMs:6e4,cacheConfig:{enabled:!0,ttlMs:6e4,maxEntries:1e3,keyStrategy:"agent-domain"},auditConfig:{enabled:!0,maxEntries:1e4,logContent:!1,logResponse:!1}},a=[{canonicalId:"claude-opus-4-7",canonicalName:"Claude Opus 4.7",providerIds:{claude:"claude-opus-4-7",openrouter:"anthropic/claude-opus-4.7",bedrock:"anthropic.claude-opus-4-7-v1:0"},capabilities:{supportsStreaming:!0,supportsTools:!0,supportsMCP:!0,supportsVision:!0,supportsExtendedThinking:!0,supportsJsonMode:!0,maxContextTokens:1e6,maxOutputTokens:128e3},tier:"flagship",family:"claude",inputCostPer1M:5,outputCostPer1M:25},{canonicalId:"claude-sonnet-4-6",canonicalName:"Claude Sonnet 4.6",providerIds:{claude:"claude-sonnet-4-6",openrouter:"anthropic/claude-sonnet-4.6",bedrock:"anthropic.claude-sonnet-4-6-v1:0"},capabilities:{supportsStreaming:!0,supportsTools:!0,supportsMCP:!0,supportsVision:!0,supportsExtendedThinking:!0,supportsJsonMode:!0,maxContextTokens:2e5,maxOutputTokens:64e3},tier:"advanced",family:"claude",inputCostPer1M:3,outputCostPer1M:15},{canonicalId:"claude-haiku-4-5",canonicalName:"Claude Haiku 4.5",providerIds:{claude:"claude-haiku-4-5-20251001",openrouter:"anthropic/claude-haiku-4.5",bedrock:"anthropic.claude-haiku-4-5-v1:0"},capabilities:{supportsStreaming:!0,supportsTools:!0,supportsMCP:!1,supportsVision:!0,supportsExtendedThinking:!0,supportsJsonMode:!0,maxContextTokens:2e5,maxOutputTokens:16384},tier:"standard",family:"claude",inputCostPer1M:1,outputCostPer1M:5},{canonicalId:"gpt-4o",canonicalName:"GPT-4o",providerIds:{openai:"gpt-4o","azure-openai":"gpt-4o",openrouter:"openai/gpt-4o"},capabilities:{supportsStreaming:!0,supportsTools:!0,supportsMCP:!1,supportsVision:!0,supportsExtendedThinking:!1,supportsJsonMode:!0,maxContextTokens:128e3,maxOutputTokens:16384},tier:"advanced",family:"gpt",inputCostPer1M:2.5,outputCostPer1M:10},{canonicalId:"gpt-4o-mini",canonicalName:"GPT-4o Mini",providerIds:{openai:"gpt-4o-mini","azure-openai":"gpt-4o-mini",openrouter:"openai/gpt-4o-mini"},capabilities:{supportsStreaming:!0,supportsTools:!0,supportsMCP:!1,supportsVision:!0,supportsExtendedThinking:!1,supportsJsonMode:!0,maxContextTokens:128e3,maxOutputTokens:16384},tier:"standard",family:"gpt",inputCostPer1M:.15,outputCostPer1M:.6},{canonicalId:"gemini-pro",canonicalName:"Gemini 2.0 Pro",providerIds:{gemini:"gemini-2.0-pro",openrouter:"google/gemini-2.0-pro"},capabilities:{supportsStreaming:!0,supportsTools:!0,supportsMCP:!1,supportsVision:!0,supportsExtendedThinking:!1,supportsJsonMode:!0,maxContextTokens:2e6,maxOutputTokens:8192},tier:"advanced",family:"gemini",inputCostPer1M:1.25,outputCostPer1M:5},{canonicalId:"llama-3.1-70b",canonicalName:"LLaMA 3.1 70B",providerIds:{ollama:"llama3.1:70b",openrouter:"meta-llama/llama-3.1-70b",bedrock:"meta.llama3-1-70b-instruct-v1:0"},capabilities:{supportsStreaming:!0,supportsTools:!0,supportsMCP:!1,supportsVision:!1,supportsExtendedThinking:!1,supportsJsonMode:!0,maxContextTokens:128e3,maxOutputTokens:4096},tier:"advanced",family:"llama",inputCostPer1M:.9,outputCostPer1M:.9},{canonicalId:"phi-4",canonicalName:"Microsoft Phi-4",providerIds:{ollama:"phi4",onnx:"phi-4",openrouter:"microsoft/phi-4"},capabilities:{supportsStreaming:!0,supportsTools:!1,supportsMCP:!1,supportsVision:!1,supportsExtendedThinking:!1,supportsJsonMode:!1,maxContextTokens:16e3,maxOutputTokens:4096,requiresNetwork:!1},tier:"efficient",family:"phi",inputCostPer1M:0,outputCostPer1M:0}];export{t as a,n as b,a as c};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{h as s,k as o,o as m}from"./chunk-EBQUXPIG.js";import{a as u}from"./chunk-Y2ONHWXI.js";import{c as r}from"./chunk-HHRUXDLT.js";import{a,e as c}from"./chunk-ZS5BM2EE.js";m();c();u();var l=r.create("hybrid-backend"),d=class{unifiedMemory=null;config;cleanupInterval;cleanupCount=0;initialized=!1;constructor(e){this.config={sqlite:{path:e?.sqlite?.path??".agentic-qe/memory.db",walMode:e?.sqlite?.walMode??!0,poolSize:e?.sqlite?.poolSize??5,busyTimeout:e?.sqlite?.busyTimeout??a.BUSY_TIMEOUT_MS,...e?.sqlite},agentdb:{path:e?.agentdb?.path??".agentic-qe/memory.db",...e?.agentdb},enableFallback:e?.enableFallback??!0,defaultNamespace:e?.defaultNamespace??"default",cleanupInterval:e?.cleanupInterval??a.CLEANUP_INTERVAL_MS}}async initialize(){if(this.initialized)return;let e={dbPath:this.config.sqlite.path??s.dbPath,walMode:this.config.sqlite.walMode??!0,busyTimeout:this.config.sqlite.busyTimeout??a.BUSY_TIMEOUT_MS};this.unifiedMemory=o(e),await this.unifiedMemory.initialize(),this.cleanupInterval=setInterval(()=>this.cleanup(),this.config.cleanupInterval),this.cleanupInterval.unref&&this.cleanupInterval.unref(),this.initialized=!0,console.log(`[HybridBackend] Initialized with unified memory: ${this.unifiedMemory.getDbPath()}`)}async dispose(){this.cleanupInterval&&clearInterval(this.cleanupInterval),this.initialized=!1}async set(e,i,t){this.ensureInitialized();let n=t?.namespace??this.config.defaultNamespace;await this.unifiedMemory.kvSet(e,i,n,t?.ttl)}async get(e){return this.ensureInitialized(),this.unifiedMemory.kvGet(e,this.config.defaultNamespace)}async delete(e){this.ensureInitialized();let i=await this.unifiedMemory.kvDelete(e,this.config.defaultNamespace),t=await this.unifiedMemory.vectorDelete(e);return i||t}async has(e){return this.ensureInitialized(),this.unifiedMemory.kvExists(e,this.config.defaultNamespace)}async search(e,i=100){return this.ensureInitialized(),this.unifiedMemory.kvSearch(e,this.config.defaultNamespace,i)}async vectorSearch(e,i){return this.ensureInitialized(),(await this.unifiedMemory.vectorSearch(e,i)).map(n=>({key:n.id,score:n.score,metadata:n.metadata}))}async storeVector(e,i,t){this.ensureInitialized(),await this.unifiedMemory.vectorStore(e,i,this.config.defaultNamespace,t)}getHealth(){return{sqlite:this.unifiedMemory?.isInitialized()?"healthy":"unavailable",sqlitePersistent:!0,agentdb:this.unifiedMemory?.isInitialized()?"healthy":"unavailable",fallback:"inactive"}}isPersistent(){return this.unifiedMemory?.isInitialized()??!1}getConfig(){return{...this.config}}async setWithBackend(e,i,t,n){await this.set(e,i,n)}async getVectorStats(){if(!this.unifiedMemory?.isInitialized())return null;let e=await this.unifiedMemory.vectorCount(),i=this.unifiedMemory.getStats();return{vectorCount:e,indexSize:i.vectorIndexSize}}getUnifiedMemory(){return this.unifiedMemory}async count(e){return this.ensureInitialized(),this.unifiedMemory.getDatabase().prepare(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.15");process.exit(0)}
2
+ import{h as s,k as o,o as m}from"./chunk-LLVS3UYZ.js";import{a as u}from"./chunk-FEVTMHO6.js";import{c as r}from"./chunk-XALB3KRR.js";import{a,e as c}from"./chunk-2BBKAX7X.js";m();c();u();var l=r.create("hybrid-backend"),d=class{unifiedMemory=null;config;cleanupInterval;cleanupCount=0;initialized=!1;constructor(e){this.config={sqlite:{path:e?.sqlite?.path??".agentic-qe/memory.db",walMode:e?.sqlite?.walMode??!0,poolSize:e?.sqlite?.poolSize??5,busyTimeout:e?.sqlite?.busyTimeout??a.BUSY_TIMEOUT_MS,...e?.sqlite},agentdb:{path:e?.agentdb?.path??".agentic-qe/memory.db",...e?.agentdb},enableFallback:e?.enableFallback??!0,defaultNamespace:e?.defaultNamespace??"default",cleanupInterval:e?.cleanupInterval??a.CLEANUP_INTERVAL_MS}}async initialize(){if(this.initialized)return;let e={dbPath:this.config.sqlite.path??s.dbPath,walMode:this.config.sqlite.walMode??!0,busyTimeout:this.config.sqlite.busyTimeout??a.BUSY_TIMEOUT_MS};this.unifiedMemory=o(e),await this.unifiedMemory.initialize(),this.cleanupInterval=setInterval(()=>this.cleanup(),this.config.cleanupInterval),this.cleanupInterval.unref&&this.cleanupInterval.unref(),this.initialized=!0,console.log(`[HybridBackend] Initialized with unified memory: ${this.unifiedMemory.getDbPath()}`)}async dispose(){this.cleanupInterval&&clearInterval(this.cleanupInterval),this.initialized=!1}async set(e,i,t){this.ensureInitialized();let n=t?.namespace??this.config.defaultNamespace;await this.unifiedMemory.kvSet(e,i,n,t?.ttl)}async get(e){return this.ensureInitialized(),this.unifiedMemory.kvGet(e,this.config.defaultNamespace)}async delete(e){this.ensureInitialized();let i=await this.unifiedMemory.kvDelete(e,this.config.defaultNamespace),t=await this.unifiedMemory.vectorDelete(e);return i||t}async has(e){return this.ensureInitialized(),this.unifiedMemory.kvExists(e,this.config.defaultNamespace)}async search(e,i=100){return this.ensureInitialized(),this.unifiedMemory.kvSearch(e,this.config.defaultNamespace,i)}async vectorSearch(e,i){return this.ensureInitialized(),(await this.unifiedMemory.vectorSearch(e,i)).map(n=>({key:n.id,score:n.score,metadata:n.metadata}))}async storeVector(e,i,t){this.ensureInitialized(),await this.unifiedMemory.vectorStore(e,i,this.config.defaultNamespace,t)}getHealth(){return{sqlite:this.unifiedMemory?.isInitialized()?"healthy":"unavailable",sqlitePersistent:!0,agentdb:this.unifiedMemory?.isInitialized()?"healthy":"unavailable",fallback:"inactive"}}isPersistent(){return this.unifiedMemory?.isInitialized()??!1}getConfig(){return{...this.config}}async setWithBackend(e,i,t,n){await this.set(e,i,n)}async getVectorStats(){if(!this.unifiedMemory?.isInitialized())return null;let e=await this.unifiedMemory.vectorCount(),i=this.unifiedMemory.getStats();return{vectorCount:e,indexSize:i.vectorIndexSize}}getUnifiedMemory(){return this.unifiedMemory}async count(e){return this.ensureInitialized(),this.unifiedMemory.getDatabase().prepare(`
3
3
  SELECT COUNT(*) as count FROM kv_store
4
4
  WHERE namespace LIKE ?
5
5
  AND (expires_at IS NULL OR expires_at > ?)
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{c as h}from"./chunk-ERGY45RL.js";function i(t,r){if(t.length!==r.length)throw new Error(`Vector length mismatch: ${t.length} vs ${r.length}`);let e=0,o=0,l=0;for(let n=0;n<t.length;n++)e+=t[n]*r[n],o+=t[n]*t[n],l+=r[n]*r[n];let u=Math.sqrt(o)*Math.sqrt(l);return u===0?0:e/u}function c(t){let r=Math.sqrt(t.reduce((e,o)=>e+o*o,0));return r===0?t.slice():t.map(e=>e/r)}function g(t){let r=0;for(let e=0;e<t.length;e++)r+=t[e]*t[e];return Math.sqrt(r)}var m=h(()=>{"use strict"});export{i as a,c as b,g as c,m as d};
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.15");process.exit(0)}
2
+ import{c as h}from"./chunk-CUQBOVRP.js";function i(t,r){if(t.length!==r.length)throw new Error(`Vector length mismatch: ${t.length} vs ${r.length}`);let e=0,o=0,l=0;for(let n=0;n<t.length;n++)e+=t[n]*r[n],o+=t[n]*t[n],l+=r[n]*r[n];let u=Math.sqrt(o)*Math.sqrt(l);return u===0?0:e/u}function c(t){let r=Math.sqrt(t.reduce((e,o)=>e+o*o,0));return r===0?t.slice():t.map(e=>e/r)}function g(t){let r=0;for(let e=0;e<t.length;e++)r+=t[e]*t[e];return Math.sqrt(r)}var m=h(()=>{"use strict"});export{i as a,c as b,g as c,m as d};
@@ -0,0 +1,18 @@
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.15");process.exit(0)}
2
+ import{a as T,c as N}from"./chunk-JJDHD7SC.js";import{b as D,c as L,d as V}from"./chunk-D3ZUSXFY.js";N();V();import*as C from"fs";import*as v from"path";import*as W from"yaml";var q=5,H=4,Q=3e4,K=".claude/skills",B=5e3,J=500,$=100,Y=1e3,F=500,z=.8,X=.2,Z=.1,w=.1,ee=.1,te=.1,se=.1,re=200,ne=500,ae=300,ie=1,oe=.9,U={maxWorkers:q,batchSize:H,retryFailedTests:!0,timeout:Q,skillsDir:K,progressIntervalMs:B},S=class{async execute(e,r,t){let s=L($,J+$);return await new Promise(o=>setTimeout(o,s)),{output:this.generateMockResponse(e),tokensUsed:D(F,Y+F),durationMs:s}}generateMockResponse(e){let r=[];return e.includes("alt")&&r.push("alt","1.1.1","perceivable"),e.includes("contrast")&&r.push("contrast","1.4.3","4.5:1"),e.includes("keyboard")&&r.push("keyboard","2.1.1","operable","button"),e.includes("label")&&r.push("label","3.3.2","understandable"),e.includes("ARIA")&&r.push("ARIA","4.1.2","robust"),e.includes("focus")&&r.push("focus","2.4.7","outline"),e.includes("lang")&&r.push("lang","3.1.1","language"),e.includes("caption")&&r.push("caption","1.2.2","track"),e.includes("accessible")&&r.push("accessible","compliant"),r.length===0&&r.push("accessibility","WCAG","finding"),`Analysis complete. Found issues related to: ${r.join(", ")}.
3
+ Recommendations: Implement proper ${r[0]} attributes for better accessibility.
4
+ Severity: ${e.includes("critical")?"critical":"serious"}`}},M=class{constructor(e,r,t){this.executor=r;this.config=t;this.id=e}executor;config;id;status="idle";tasksCompleted=0;tasksFailed=0;lastHeartbeat=Date.now();async executeBatch(e){this.status="running";let r=[];for(let t of e){this.lastHeartbeat=Date.now();try{let s=await this.executeTestCase(t);if(r.push(s),s.passed)this.tasksCompleted++;else if(this.tasksFailed++,this.config.retryFailedTests&&!s.passed){let n=await this.executeTestCase(t,!0);n.passed&&(r[r.length-1]=n,this.tasksCompleted++,this.tasksFailed--)}}catch(s){this.tasksFailed++,r.push({testId:t.testCaseId,passed:!1,expectedPatterns:t.testCase.expected_output.must_contain||[],actualPatterns:[],reasoningQuality:0,category:t.testCase.category,priority:t.testCase.priority,error:T(s)})}}return this.status="idle",r}async executeTestCase(e,r=!1){let t=Date.now(),s=this.buildPrompt(e),n=await this.executor.execute(s,e.model,{timeout:this.config.timeout}),o=this.validateResponse(n.output,e.testCase.expected_output,e.testCase.validation);return{testId:e.testCaseId,passed:o.passed,expectedPatterns:e.testCase.expected_output.must_contain||[],actualPatterns:o.foundPatterns,reasoningQuality:o.reasoningQuality,executionTimeMs:Date.now()-t,category:e.testCase.category,priority:e.testCase.priority,error:o.error}}buildPrompt(e){let{testCase:r}=e,t=r.input.context;return`Analyze the following ${t.language||"HTML"} code for accessibility issues.
5
+ Context: ${t.description||r.description}
6
+ WCAG Level: ${t.wcagLevel||"AA"}
7
+
8
+ Code:
9
+ \`\`\`${t.language||"html"}
10
+ ${r.input.code}
11
+ \`\`\`
12
+
13
+ Provide a detailed analysis including:
14
+ 1. All accessibility issues found
15
+ 2. WCAG success criteria violated
16
+ 3. Severity classification (critical/serious/moderate/minor)
17
+ 4. Remediation recommendations with code examples`}validateResponse(e,r,t){let s=[],n=[],o=r.must_contain||[],i=0;for(let p of o)new RegExp(p,"i").test(e)&&(s.push(p),i++);let l=r.must_not_contain||[];for(let p of l)new RegExp(p,"i").test(e)&&n.push(`Output should not contain: ${p}`);let u=r.must_match_regex||[];for(let p of u)new RegExp(p,"i").test(e)||n.push(`Output should match regex: ${p}`);let f=o.length>0?i/o.length:1,m=t?.keyword_match_threshold??z,g=f>=m,c=this.calculateReasoningQuality(e,t),_=t?.reasoning_quality_min??0,h=c>=_;return{passed:g&&h&&n.length===0,foundPatterns:s,reasoningQuality:c,error:n.length>0?n.join("; "):void 0}}calculateReasoningQuality(e,r){let t=0;if(e.length>re&&(t+=X),e.length>ne&&(t+=Z),e.includes(`
18
+ `)&&(t+=w),(e.includes("1.")||e.includes("-"))&&(t+=w),e.includes("```")&&(t+=w),e.includes("WCAG")&&(t+=ee),(e.includes("remediation")||e.includes("recommendation"))&&(t+=te),(e.includes("severity")||e.includes("critical"))&&(t+=se),r?.grading_rubric){let s=r.grading_rubric,n=0;s.completeness&&e.length>ae&&(n+=s.completeness),s.accuracy&&e.includes("WCAG")&&(n+=s.accuracy),s.actionability&&(e.includes("fix")||e.includes("change"))&&(n+=s.actionability),t=Math.max(t,n)}return Math.min(t,1)}getProgress(e){return{workerId:this.id,tasksCompleted:this.tasksCompleted,tasksTotal:e,elapsedMs:Date.now()-this.lastHeartbeat}}},P=class{constructor(e=U,r,t=new S){this.config=e;this.skillValidationLearner=r;this.executor=t;for(let s=0;s<e.maxWorkers;s++)this.workers.push(new M(s,t,e))}config;skillValidationLearner;executor;workers=[];progressCallback;onProgress(e){this.progressCallback=e}async runEvalParallel(e,r){let t=Date.now(),s=this.loadEvalSuite(e);if(!s)throw new Error(`Failed to load eval suite for skill: ${e}`);let n=this.createTasks(s,r),o=this.partitionTestCases(n,this.config.batchSize),i=n.length*(this.config.timeout/2),l=[],u=[];for(let d=0;d<o.length;d++){let b=this.workers[d%this.workers.length];u.push(b.executeBatch(o[d]))}let f=this.startProgressReporting(e,r,n.length,t);try{let d=await Promise.all(u);for(let b of d)l.push(...b)}finally{f&&clearInterval(f)}let m=Date.now()-t,g=l.filter(d=>d.passed).length,c=l.filter(d=>!d.passed).length,_=n.length-l.length,h=l.length>0?g/l.length:0,x=l.length>0?l.reduce((d,b)=>d+b.reasoningQuality,0)/l.length:0,p=m>0?i/m:1,y=h>=s.success_criteria.pass_rate&&x>=(s.success_criteria.avg_reasoning_quality??0);return await this.recordOutcome({skillName:e,trustTier:this.determineTrustTier(s),validationLevel:"eval",model:r,passed:y,score:h,testCaseResults:l,timestamp:new Date,runId:`${e}-${r}-${Date.now()}`,metadata:{duration:m,parallelSpeedup:p,workersUsed:this.config.maxWorkers,version:s.version}}),{skill:e,model:r,totalTests:n.length,passedTests:g,failedTests:c,skippedTests:_,passRate:h,testResults:l,totalDurationMs:m,parallelSpeedup:p,avgReasoningQuality:x,passed:y,workersUsed:this.config.maxWorkers,timestamp:new Date}}async runMultipleEvalsParallel(e,r){let t=new Map,s=[];for(let i of e){t.set(i,[]);for(let l of r)s.push({skill:i,model:l})}let n=s.map(async({skill:i,model:l})=>{let u=await this.runEvalParallel(i,l);return{skill:i,result:u}}),o=await Promise.all(n);for(let{skill:i,result:l}of o)t.get(i).push(l);return t}loadEvalSuite(e){let r=v.isAbsolute(this.config.skillsDir)?this.config.skillsDir:v.join(process.cwd(),this.config.skillsDir),t=v.join(r,e,"evals",`${e}.yaml`);if(!C.existsSync(t))return console.error(`Eval suite not found: ${t}`),null;try{let s=C.readFileSync(t,"utf-8");return W.parse(s)}catch(s){return console.error(`Failed to parse eval suite: ${s instanceof Error?s.message:s}`),null}}createTasks(e,r){return e.test_cases.map((t,s)=>({skillName:e.skill,testCaseId:t.id,testCase:t,model:r,batchId:Math.floor(s/this.config.batchSize),indexInBatch:s%this.config.batchSize}))}partitionTestCases(e,r){let t=[];for(let s=0;s<e.length;s+=r)t.push(e.slice(s,s+r));return t}determineTrustTier(e){let r=e.mcp_integration?.enabled??!1,t=e.learning?.cross_model_comparison??!1,s=e.success_criteria.critical_pass_rate??0;return r&&t&&s>=ie?3:r||s>=oe?2:1}startProgressReporting(e,r,t,s){return this.progressCallback?setInterval(()=>{let n=Date.now()-s,o=this.workers.reduce((c,_)=>c+_.tasksCompleted,0),i=this.workers.reduce((c,_)=>c+_.tasksFailed,0),l=this.workers.filter(c=>c.status==="running").length,u=n>0?o/n:0,f=t-o,m=u>0?f/u:0,g={skill:e,model:r,totalTasks:t,completedTasks:o,failedTasks:i,activeWorkers:l,elapsedMs:n,estimatedRemainingMs:m,workerProgress:this.workers.map(c=>c.getProgress(t))};this.progressCallback(g)},this.config.progressIntervalMs):null}async recordOutcome(e){await this.skillValidationLearner.recordValidationOutcome(e)}getWorkerStatus(){return this.workers.map(e=>({id:e.id,status:e.status,tasksCompleted:e.tasksCompleted,tasksFailed:e.tasksFailed}))}resetWorkers(){for(let e of this.workers)e.tasksCompleted=0,e.tasksFailed=0,e.status="idle"}};function _e(a,e={},r){let t={...U,...e};return new P(t,a,r)}N();import*as R from"node:fs";import*as E from"node:path";import*as j from"yaml";import{spawnSync as le}from"node:child_process";var G=["none","low","medium","high","critical"];function ce(a,e){if(typeof a!="string")return!1;let r=G.indexOf(a),t=G.indexOf(e);return r>=0&&t>=0&&r>=t}function A(a,e){if(typeof e!="string"||!e.startsWith("."))return;let r=e==="."?[]:e.slice(1).split("."),t=a;for(let s of r){if(t==null||typeof t!="object")return;t=t[s]}return t}var ue=(a,e)=>{let r=le("bash",["-c",a],{timeout:e.timeoutMs,cwd:e.cwd,encoding:"utf8",maxBuffer:16777216});return{status:r.status,stdout:typeof r.stdout=="string"?r.stdout:"",stderr:typeof r.stderr=="string"?r.stderr:"",error:r.error}};function de(a){if(!a||typeof a!="object")return!1;let e=a;return!Array.isArray(e.test_cases)||e.test_cases.length===0?!1:typeof e.test_cases[0]?.input?.command=="string"}function me(a,e,r){let t=[],s=a.expected||{};s.exit_code!==void 0&&e!==s.exit_code&&t.push(`exit_code: expected ${s.exit_code}, got ${e}`);let n=!!s.json_fields||s.severity_at_least!==void 0||s.candidate_count_at_least!==void 0,o=null;if(n)try{o=JSON.parse(r)}catch(i){return t.push(`stdout is not valid JSON: ${T(i)}`),{passed:!1,failures:t}}if(s.json_fields)for(let[i,l]of Object.entries(s.json_fields)){let u=A(o,i);I(u,l)||t.push(`json_fields ${i}: expected ${JSON.stringify(l)}, got ${JSON.stringify(u)}`)}if(s.severity_at_least!==void 0){let i=A(o,".output.checkInjection.severity");ce(i,s.severity_at_least)||t.push(`severity_at_least: expected >= ${s.severity_at_least}, got ${JSON.stringify(i)}`)}if(s.candidate_count_at_least!==void 0){let i=A(o,".output.intentScore.candidateCount");(typeof i=="number"?i:Number.NaN)>=s.candidate_count_at_least||t.push(`candidate_count_at_least: expected >= ${s.candidate_count_at_least}, got ${JSON.stringify(i)}`)}return{passed:t.length===0,failures:t}}function I(a,e){if(a===e)return!0;if(a==null||e==null)return a===e;if(typeof a!=typeof e)return!1;if(Array.isArray(a))return!Array.isArray(e)||a.length!==e.length?!1:a.every((r,t)=>I(r,e[t]));if(typeof a=="object"){if(typeof e!="object"||Array.isArray(e))return!1;let r=a,t=e,s=Object.keys(r),n=Object.keys(t);return s.length!==n.length?!1:s.every(o=>I(r[o],t[o]))}return!1}var O=class{skillsDir;timeoutMs;cwd;runner;constructor(e={}){this.skillsDir=e.skillsDir??".claude/skills",this.timeoutMs=e.timeoutMs??6e4,this.cwd=e.cwd??process.cwd(),this.runner=e.runner??ue}loadSuite(e){let r=E.isAbsolute(this.skillsDir)?this.skillsDir:E.join(this.cwd,this.skillsDir),t=E.join(r,e,"evals",`${e}.yaml`);if(!R.existsSync(t))return null;try{let s=j.parse(R.readFileSync(t,"utf-8"));return de(s)?s:null}catch{return null}}async run(e){let r=Date.now(),t=this.loadSuite(e);if(!t)throw new Error(`Command-eval suite not found or not command-mode at ${this.skillsDir}/${e}/evals/${e}.yaml`);let s=[];for(let c of t.test_cases)s.push(this.executeCase(c));let n=s.filter(c=>c.passed).length,o=s.length-n,i=s.length>0?n/s.length:0,l=t.validation?.required_pass_rate??.9,u=t.validation?.critical_must_pass??!0,m=s.filter(c=>c.priority==="critical").every(c=>c.passed),g=i>=l&&(!u||m);return{skill:e,passed:g,totalTests:s.length,passedTests:n,failedTests:o,passRate:i,criticalPassed:m,testResults:s,totalDurationMs:Date.now()-r,timestamp:new Date}}executeCase(e){let r=Date.now(),t=e.input?.setup??[];for(let o of t){let i=this.runner(o,{timeoutMs:this.timeoutMs,cwd:this.cwd});if(i.status!==0)return{testId:e.id,passed:!1,category:e.category,priority:e.priority,exitCode:i.status,stdoutSnippet:k(i.stdout),stderrSnippet:k(i.stderr),failures:[],setupFailure:`setup step failed (exit ${i.status}): ${o}`,durationMs:Date.now()-r}}let s=this.runner(e.input.command,{timeoutMs:this.timeoutMs,cwd:this.cwd}),n=me(e,s.status,s.stdout);return{testId:e.id,passed:n.passed,category:e.category,priority:e.priority,exitCode:s.status,stdoutSnippet:k(s.stdout),stderrSnippet:k(s.stderr),failures:n.failures,durationMs:Date.now()-r}}};function k(a,e=500){return a.length<=e?a:`${a.slice(0,e)}\u2026[truncated ${a.length-e}b]`}function ve(a={}){return new O(a)}export{U as a,_e as b,de as c,ve as d};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.15");process.exit(0)}
2
+ import{b as d,d as c}from"./chunk-2XW36KDQ.js";import{a as l,c as g}from"./chunk-JJDHD7SC.js";g();c();import{existsSync as y,readFileSync as p}from"node:fs";import{join as o,dirname as u}from"node:path";import{fileURLToPath as m}from"node:url";var i=class extends Error{constructor(t,n,r){super(t);this.code=n;this.cause=r;this.name="PatternLoaderError"}code;cause},s=class a{static instance=null;config;patterns;isLoading=!1;constructor(e={}){this.config={basePath:e.basePath??this.getDefaultBasePath(),throwOnMissing:e.throwOnMissing??!1,validatePatterns:e.validatePatterns??!0},this.patterns={index:null,booster:null,router:null,embedding:null,reasoning:null,loadedAt:null,errors:[]}}static getInstance(e){return a.instance||(a.instance=new a(e)),a.instance}static resetInstance(){a.instance=null}getDefaultBasePath(){try{let e=import.meta.url,t=m(e),n=u(t),r=o(n,"..","..","..");return o(r,"assets","patterns")}catch{return o(process.cwd(),"assets","patterns")}}async loadPatterns(){if(!this.isLoading){this.isLoading=!0,this.patterns.errors=[];try{this.patterns.index=this.loadJsonFile("index.json");let[e,t,n,r]=await Promise.all([Promise.resolve(this.loadJsonFile("adr-051-booster-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-router-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-embedding-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-reasoning-patterns.json"))]);this.patterns.booster=e,this.patterns.router=t,this.patterns.embedding=n,this.patterns.reasoning=r,this.patterns.loadedAt=new Date,this.config.validatePatterns&&this.validateLoadedPatterns()}finally{this.isLoading=!1}}}loadJsonFile(e){let t=o(this.config.basePath,e);try{if(!y(t)){let r=`Pattern file not found: ${t}`;if(this.patterns.errors.push(r),this.config.throwOnMissing)throw new i(r,"FILE_NOT_FOUND");return null}let n=p(t,"utf-8");return d(n)}catch(n){if(n instanceof i)throw n;let r=`Failed to load pattern file ${e}: ${l(n)}`;if(this.patterns.errors.push(r),this.config.throwOnMissing)throw new i(r,"PARSE_ERROR",n instanceof Error?n:void 0);return null}}validateLoadedPatterns(){this.patterns.booster&&(Array.isArray(this.patterns.booster.patterns)||this.patterns.errors.push("Booster patterns file missing patterns array")),this.patterns.router&&(Array.isArray(this.patterns.router.patterns)||this.patterns.errors.push("Router patterns file missing patterns array")),this.patterns.embedding&&(Array.isArray(this.patterns.embedding.patterns)||this.patterns.errors.push("Embedding patterns file missing patterns array")),this.patterns.reasoning&&(Array.isArray(this.patterns.reasoning.patterns)||this.patterns.errors.push("Reasoning patterns file missing patterns array"))}async ensureLoaded(){this.patterns.loadedAt||await this.loadPatterns()}async getIndex(){return await this.ensureLoaded(),this.patterns.index}async getBoosterPatterns(){return await this.ensureLoaded(),this.patterns.booster}async getRouterPatterns(){return await this.ensureLoaded(),this.patterns.router}async getEmbeddingPatterns(){return await this.ensureLoaded(),this.patterns.embedding}async getReasoningPatterns(){return await this.ensureLoaded(),this.patterns.reasoning}async getBoosterPatternByKey(e){let t=await this.getBoosterPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getRouterPatternByKey(e){let t=await this.getRouterPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getEmbeddingPatternByKey(e){let t=await this.getEmbeddingPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getReasoningPatternByKey(e){let t=await this.getReasoningPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getEligibleBoosterTransforms(){let e=await this.getBoosterPatternByKey("booster-transform-eligibility");return e?e.eligibility_criteria.simple_transforms:[]}async getTierHierarchy(){let e=await this.getRouterPatternByKey("router-5tier-complexity");return e?e.tier_hierarchy:null}async getQualityGateThresholds(){let e=await this.getReasoningPatternByKey("reasoning-pattern-quality-gates");return e?e.gate_thresholds:null}isLoaded(){return this.patterns.loadedAt!==null}getLoadedAt(){return this.patterns.loadedAt}getErrors(){return[...this.patterns.errors]}async getStatistics(){let e=await this.getIndex();return e?e.pattern_statistics:null}async reload(){this.patterns={index:null,booster:null,router:null,embedding:null,reasoning:null,loadedAt:null,errors:[]},await this.loadPatterns()}async getAllPatterns(){return await this.ensureLoaded(),{...this.patterns}}};function x(){return s.getInstance()}export{x as a};
@@ -1,4 +1,4 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{b as f,d as v}from"./chunk-VCJP7HQG.js";import q,{MultiBar as F,Presets as k}from"cli-progress";import O from"ora";import o from"chalk";v();import{existsSync as w,readFileSync as y,writeFileSync as j,mkdirSync as W,unlinkSync as V}from"fs";import{join as p}from"path";import{homedir as C}from"os";var u={wizards:{enabled:!0,themes:["default","minimal","detailed"],defaultTheme:"default"},progress:{style:"multi-bar",updateIntervalMs:100,showETA:!0,colors:!0},completion:{maxSuggestions:10,historyWeight:.3,contextWeight:.7,fuzzyMatch:!0},streaming:{enabled:!0,bufferSize:100,updateIntervalMs:50}};function x(){return p(C(),".aqe")}function E(){return p(x(),"cli-config.json")}var g=null,d=0,T=5e3;function S(){return g?Date.now()-d<T:!1}function A(s){let e=[],t=s;if(typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"wizards.enabled",message:"must be a boolean"}),t.themes!==void 0)if(!Array.isArray(t.themes))e.push({path:"wizards.themes",message:"must be an array"});else{let r=["default","minimal","detailed"];for(let n of t.themes)r.includes(n)||e.push({path:"wizards.themes",message:`invalid theme: ${n}`})}return t.defaultTheme!==void 0&&(["default","minimal","detailed"].includes(t.defaultTheme)||e.push({path:"wizards.defaultTheme",message:`invalid theme: ${t.defaultTheme}`})),e}function P(s){let e=[],t=s;return t.style!==void 0&&(["multi-bar","single-bar","spinner"].includes(t.style)||e.push({path:"progress.style",message:`invalid style: ${t.style}`})),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"progress.updateIntervalMs",message:"must be a number >= 10"}),typeof t.showETA!="boolean"&&t.showETA!==void 0&&e.push({path:"progress.showETA",message:"must be a boolean"}),typeof t.colors!="boolean"&&t.colors!==void 0&&e.push({path:"progress.colors",message:"must be a boolean"}),e}function $(s){let e=[],t=s;return t.maxSuggestions!==void 0&&(typeof t.maxSuggestions!="number"||t.maxSuggestions<1)&&e.push({path:"completion.maxSuggestions",message:"must be a number >= 1"}),t.historyWeight!==void 0&&(typeof t.historyWeight!="number"||t.historyWeight<0||t.historyWeight>1)&&e.push({path:"completion.historyWeight",message:"must be a number between 0 and 1"}),t.contextWeight!==void 0&&(typeof t.contextWeight!="number"||t.contextWeight<0||t.contextWeight>1)&&e.push({path:"completion.contextWeight",message:"must be a number between 0 and 1"}),typeof t.fuzzyMatch!="boolean"&&t.fuzzyMatch!==void 0&&e.push({path:"completion.fuzzyMatch",message:"must be a boolean"}),e}function I(s){let e=[],t=s;return typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"streaming.enabled",message:"must be a boolean"}),t.bufferSize!==void 0&&(typeof t.bufferSize!="number"||t.bufferSize<1)&&e.push({path:"streaming.bufferSize",message:"must be a number >= 1"}),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"streaming.updateIntervalMs",message:"must be a number >= 10"}),e}function M(s){let e=[];if(typeof s!="object"||s===null)return{valid:!1,errors:[{path:"",message:"config must be an object"}]};let t=s;return t.wizards!==void 0&&(typeof t.wizards!="object"||t.wizards===null?e.push({path:"wizards",message:"must be an object"}):e.push(...A(t.wizards))),t.progress!==void 0&&(typeof t.progress!="object"||t.progress===null?e.push({path:"progress",message:"must be an object"}):e.push(...P(t.progress))),t.completion!==void 0&&(typeof t.completion!="object"||t.completion===null?e.push({path:"completion",message:"must be an object"}):e.push(...$(t.completion))),t.streaming!==void 0&&(typeof t.streaming!="object"||t.streaming===null?e.push({path:"streaming",message:"must be an object"}):e.push(...I(t.streaming))),{valid:e.length===0,errors:e}}var z=["__proto__","constructor","prototype"];function m(s,e){let t={...s};for(let r of Object.keys(e)){if(z.includes(r)){console.warn(`Security: Skipping forbidden key '${String(r)}' in configuration merge`);continue}let n=e[r],i=s[r];n!==void 0&&typeof n=="object"&&!Array.isArray(n)&&typeof i=="object"&&!Array.isArray(i)?t[r]=m(i,n):n!==void 0&&(t[r]=n)}return t}function D(){let s=E();if(!w(s))return{...u};try{let e=y(s,"utf-8"),t=f(e),r=M(t);return r.valid?m(u,t):(console.warn(`CLI config validation errors: ${r.errors.map(n=>`${n.path}: ${n.message}`).join(", ")}`),console.warn("Using default configuration"),{...u})}catch(e){return console.warn(`Failed to load CLI config: ${e instanceof Error?e.message:"Unknown error"}`),{...u}}}function c(){return S()||(g=D(),d=Date.now()),g}function B(){return process.stdout.isTTY===!0}function h(){let s=c();return process.env.NO_COLOR!==void 0?!1:process.env.FORCE_COLOR!==void 0?!0:s.progress.colors&&B()}var b=class{multiBar;agentBars=new Map;agentStates=new Map;fleetBar=null;startTime=Date.now();options;isActive=!1;constructor(e={}){let t=c(),r=h();this.options={title:"Fleet Progress",showEta:t.progress.showETA,showPercentage:!0,...e};let n=r?o.cyan("{bar}"):"{bar}",i=this.options.format||`{name} ${n} {percentage}% | {status} {eta}`;this.multiBar=new F({clearOnComplete:!1,hideCursor:!0,format:i,barCompleteChar:"\u2588",barIncompleteChar:"\u2591",forceRedraw:!0,fps:Math.round(1e3/t.progress.updateIntervalMs)},k.shades_classic)}start(e){this.isActive=!0,this.startTime=Date.now(),console.log(o.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.15");process.exit(0)}
2
+ import{b as f,d as v}from"./chunk-2XW36KDQ.js";import q,{MultiBar as F,Presets as k}from"cli-progress";import O from"ora";import o from"chalk";v();import{existsSync as w,readFileSync as y,writeFileSync as j,mkdirSync as W,unlinkSync as V}from"fs";import{join as p}from"path";import{homedir as C}from"os";var u={wizards:{enabled:!0,themes:["default","minimal","detailed"],defaultTheme:"default"},progress:{style:"multi-bar",updateIntervalMs:100,showETA:!0,colors:!0},completion:{maxSuggestions:10,historyWeight:.3,contextWeight:.7,fuzzyMatch:!0},streaming:{enabled:!0,bufferSize:100,updateIntervalMs:50}};function x(){return p(C(),".aqe")}function E(){return p(x(),"cli-config.json")}var g=null,d=0,T=5e3;function S(){return g?Date.now()-d<T:!1}function A(s){let e=[],t=s;if(typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"wizards.enabled",message:"must be a boolean"}),t.themes!==void 0)if(!Array.isArray(t.themes))e.push({path:"wizards.themes",message:"must be an array"});else{let r=["default","minimal","detailed"];for(let n of t.themes)r.includes(n)||e.push({path:"wizards.themes",message:`invalid theme: ${n}`})}return t.defaultTheme!==void 0&&(["default","minimal","detailed"].includes(t.defaultTheme)||e.push({path:"wizards.defaultTheme",message:`invalid theme: ${t.defaultTheme}`})),e}function P(s){let e=[],t=s;return t.style!==void 0&&(["multi-bar","single-bar","spinner"].includes(t.style)||e.push({path:"progress.style",message:`invalid style: ${t.style}`})),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"progress.updateIntervalMs",message:"must be a number >= 10"}),typeof t.showETA!="boolean"&&t.showETA!==void 0&&e.push({path:"progress.showETA",message:"must be a boolean"}),typeof t.colors!="boolean"&&t.colors!==void 0&&e.push({path:"progress.colors",message:"must be a boolean"}),e}function $(s){let e=[],t=s;return t.maxSuggestions!==void 0&&(typeof t.maxSuggestions!="number"||t.maxSuggestions<1)&&e.push({path:"completion.maxSuggestions",message:"must be a number >= 1"}),t.historyWeight!==void 0&&(typeof t.historyWeight!="number"||t.historyWeight<0||t.historyWeight>1)&&e.push({path:"completion.historyWeight",message:"must be a number between 0 and 1"}),t.contextWeight!==void 0&&(typeof t.contextWeight!="number"||t.contextWeight<0||t.contextWeight>1)&&e.push({path:"completion.contextWeight",message:"must be a number between 0 and 1"}),typeof t.fuzzyMatch!="boolean"&&t.fuzzyMatch!==void 0&&e.push({path:"completion.fuzzyMatch",message:"must be a boolean"}),e}function I(s){let e=[],t=s;return typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"streaming.enabled",message:"must be a boolean"}),t.bufferSize!==void 0&&(typeof t.bufferSize!="number"||t.bufferSize<1)&&e.push({path:"streaming.bufferSize",message:"must be a number >= 1"}),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"streaming.updateIntervalMs",message:"must be a number >= 10"}),e}function M(s){let e=[];if(typeof s!="object"||s===null)return{valid:!1,errors:[{path:"",message:"config must be an object"}]};let t=s;return t.wizards!==void 0&&(typeof t.wizards!="object"||t.wizards===null?e.push({path:"wizards",message:"must be an object"}):e.push(...A(t.wizards))),t.progress!==void 0&&(typeof t.progress!="object"||t.progress===null?e.push({path:"progress",message:"must be an object"}):e.push(...P(t.progress))),t.completion!==void 0&&(typeof t.completion!="object"||t.completion===null?e.push({path:"completion",message:"must be an object"}):e.push(...$(t.completion))),t.streaming!==void 0&&(typeof t.streaming!="object"||t.streaming===null?e.push({path:"streaming",message:"must be an object"}):e.push(...I(t.streaming))),{valid:e.length===0,errors:e}}var z=["__proto__","constructor","prototype"];function m(s,e){let t={...s};for(let r of Object.keys(e)){if(z.includes(r)){console.warn(`Security: Skipping forbidden key '${String(r)}' in configuration merge`);continue}let n=e[r],i=s[r];n!==void 0&&typeof n=="object"&&!Array.isArray(n)&&typeof i=="object"&&!Array.isArray(i)?t[r]=m(i,n):n!==void 0&&(t[r]=n)}return t}function D(){let s=E();if(!w(s))return{...u};try{let e=y(s,"utf-8"),t=f(e),r=M(t);return r.valid?m(u,t):(console.warn(`CLI config validation errors: ${r.errors.map(n=>`${n.path}: ${n.message}`).join(", ")}`),console.warn("Using default configuration"),{...u})}catch(e){return console.warn(`Failed to load CLI config: ${e instanceof Error?e.message:"Unknown error"}`),{...u}}}function c(){return S()||(g=D(),d=Date.now()),g}function B(){return process.stdout.isTTY===!0}function h(){let s=c();return process.env.NO_COLOR!==void 0?!1:process.env.FORCE_COLOR!==void 0?!0:s.progress.colors&&B()}var b=class{multiBar;agentBars=new Map;agentStates=new Map;fleetBar=null;startTime=Date.now();options;isActive=!1;constructor(e={}){let t=c(),r=h();this.options={title:"Fleet Progress",showEta:t.progress.showETA,showPercentage:!0,...e};let n=r?o.cyan("{bar}"):"{bar}",i=this.options.format||`{name} ${n} {percentage}% | {status} {eta}`;this.multiBar=new F({clearOnComplete:!1,hideCursor:!0,format:i,barCompleteChar:"\u2588",barIncompleteChar:"\u2591",forceRedraw:!0,fps:Math.round(1e3/t.progress.updateIntervalMs)},k.shades_classic)}start(e){this.isActive=!0,this.startTime=Date.now(),console.log(o.blue(`
3
3
  ${this.options.title}
4
4
  `)),this.fleetBar=this.multiBar.create(100,0,{name:o.white("Fleet Progress".padEnd(30)),status:"",eta:""})}addAgent(e){if(!this.isActive)return;this.agentStates.set(e.id,e);let t=this.multiBar.create(100,e.progress,{name:o.gray(this.truncateName(e.name,30).padEnd(30)),status:this.getStatusIcon(e.status),eta:e.eta?this.formatEta(e.eta):""});this.agentBars.set(e.id,t),this.updateFleetProgress()}updateAgent(e,t,r){if(!this.isActive)return;let n=this.agentStates.get(e),i=this.agentBars.get(e);!n||!i||(n.progress=Math.min(100,Math.max(0,t)),r?.status&&(n.status=r.status),r?.message&&(n.message=r.message),r?.eta!==void 0&&(n.eta=r.eta),i.update(n.progress,{name:this.getAgentNameDisplay(n),status:this.getStatusIcon(n.status),eta:n.eta?this.formatEta(n.eta):""}),this.updateFleetProgress())}completeAgent(e,t=!0){if(!this.isActive)return;let r=this.agentStates.get(e),n=this.agentBars.get(e);!r||!n||(r.status=t?"completed":"failed",r.progress=t?100:r.progress,n.update(r.progress,{name:this.getAgentNameDisplay(r),status:this.getStatusIcon(r.status),eta:""}),this.updateFleetProgress())}stop(){if(!this.isActive)return;this.isActive=!1,this.multiBar.stop();let e=Array.from(this.agentStates.values()).filter(i=>i.status==="completed").length,t=Array.from(this.agentStates.values()).filter(i=>i.status==="failed").length,r=this.agentStates.size,n=Date.now()-this.startTime;console.log(""),console.log(t===0?o.green(`All ${e}/${r} agents completed successfully (${this.formatDuration(n)})`):o.yellow(`${e}/${r} agents completed, ${t} failed (${this.formatDuration(n)})`)),console.log("")}updateFleetProgress(){if(!this.fleetBar)return;let e=Array.from(this.agentStates.values()),t=e.reduce((a,l)=>a+l.progress,0),r=e.length>0?Math.round(t/e.length):0,n=e.filter(a=>a.status==="completed").length,i=e.filter(a=>a.status==="running").length;this.fleetBar.update(r,{status:o.gray(`${n}/${e.length} complete, ${i} running`),eta:this.options.showEta?this.estimateFleetEta(e):""})}getAgentNameDisplay(e){let t=this.truncateName(e.name,26);switch(e.status){case"completed":return o.green(t.padEnd(30));case"failed":return o.red(t.padEnd(30));case"running":return o.yellow(t.padEnd(30));default:return o.gray(t.padEnd(30))}}getStatusIcon(e){switch(e){case"completed":return o.green("\u2713");case"failed":return o.red("\u2717");case"running":return o.yellow("\u25B6");default:return o.gray("\u25CB")}}truncateName(e,t){return e.length<=t?e:e.slice(0,t-3)+"..."}formatEta(e){return e<=0?"":e<1e3?`${e}ms`:e<6e4?`${Math.round(e/1e3)}s`:e<36e5?`${Math.round(e/6e4)}m`:`${Math.round(e/36e5)}h`}formatDuration(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`}estimateFleetEta(e){let t=e.filter(a=>a.status==="running"||a.status==="pending");if(t.length===0)return"";let r=t.map(a=>a.eta||0).filter(a=>a>0);if(r.length>0){let a=Math.max(...r);return o.gray(`ETA: ${this.formatEta(a)}`)}let n=Date.now()-this.startTime,i=t.reduce((a,l)=>a+l.progress,0)/t.length;if(i>0){let a=n/(i/100),l=Math.max(0,a-n);return o.gray(`ETA: ${this.formatEta(l)}`)}return""}};function X(s){let e=Date.now(),t=O({text:s,color:"cyan"}).start(),r=setInterval(()=>{let i=((Date.now()-e)/1e3).toFixed(1);t.text=`${s} (${i}s)`},100);r.unref?.();let n=()=>{clearInterval(r)};return{spinner:t,stop:()=>{n(),t.stop()},succeed:i=>{n();let a=((Date.now()-e)/1e3).toFixed(1);t.succeed(i||`${s} (${a}s)`)},fail:i=>{n();let a=((Date.now()-e)/1e3).toFixed(1);t.fail(i||`${s} failed (${a}s)`)}}}export{b as a,X as b};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{b as d,d as L}from"./chunk-EBQUXPIG.js";import{createHash as m}from"crypto";import{existsSync as g,readFileSync as R,writeFileSync as A,openSync as X,writeSync as U,closeSync as f}from"fs";var p=[`CREATE TABLE IF NOT EXISTS qe_patterns (
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.15");process.exit(0)}
2
+ import{b as d,d as L}from"./chunk-LLVS3UYZ.js";import{createHash as m}from"crypto";import{existsSync as g,readFileSync as R,writeFileSync as A,openSync as X,writeSync as U,closeSync as f}from"fs";var p=[`CREATE TABLE IF NOT EXISTS qe_patterns (
3
3
  id TEXT PRIMARY KEY, pattern_type TEXT NOT NULL, qe_domain TEXT NOT NULL,
4
4
  domain TEXT NOT NULL, name TEXT NOT NULL, description TEXT,
5
5
  confidence REAL DEFAULT 0.5, usage_count INTEGER DEFAULT 0,
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{b as A,d as M}from"./chunk-VCJP7HQG.js";import{a as S,b as D}from"./chunk-JOCR5TWI.js";import{S as Q,l as E}from"./chunk-W2YCNX4O.js";import{g as C}from"./chunk-ERGY45RL.js";M();Q();var v=(1+Math.sqrt(5))/2,R=1/v;function k(t,e=0){if(t<0||!Number.isFinite(t))throw new Error(`Invalid dither sequence length: ${t}`);if(!Number.isFinite(e))throw new Error(`Invalid dither seed: ${e}`);let n=new Float32Array(t),r=(e*R%1+1)%1;for(let i=0;i<t;i++)n[i]=((r+(i+1)*v)%1+1)%1;return n}function I(t,e,n=0){if(!(t instanceof Float32Array))throw new Error("Input vector must be a Float32Array");if(t.length===0)return{quantized:new Int32Array(0),dequantized:new Float32Array(0),bitDepth:e,seed:n,stepSize:0,minValue:0,maxValue:0};if(e<1||e>32||!Number.isInteger(e))throw new Error(`Invalid bit depth: ${e}. Must be an integer in [1, 32].`);let r=t[0],i=t[0];for(let d=1;d<t.length;d++)t[d]<r&&(r=t[d]),t[d]>i&&(i=t[d]);let s=(1<<e)-1,a=i-r,o=a===0?1:a/s,m=k(t.length,n),l=new Int32Array(t.length),u=new Float32Array(t.length);for(let d=0;d<t.length;d++){if(a===0)l[d]=Math.round(s/2);else{let L=(t[d]-r)/o+(m[d]-.5);l[d]=Math.max(0,Math.min(s,Math.round(L)))}u[d]=l[d]*o+r}return{quantized:l,dequantized:u,bitDepth:e,seed:n,stepSize:o,minValue:r,maxValue:i}}var h=null,b=null,p=null,g=null,f=null,w=null,x=!1;try{let t=(D(),C(S));h=t.RuvectorLayer,b=t.TensorCompress,p=t.differentiableSearch,g=t.hierarchicalForward,f=t.getCompressionLevel,w=t.init,x=!0}catch{}function H(){return x}function c(){if(!x)throw new Error("@ruvector/gnn native module is not available on this platform. Install the appropriate optional dependency for your platform, or use a platform where pre-built binaries are available.")}var F=!1;function V(){if(!F){c();let t=w();return F=!0,t}return"@ruvector/gnn already initialized"}var y=class{indexes;config;nextId;gnnLayers;compressor;constructor(e={}){this.config={M:e.M||16,efConstruction:e.efConstruction||200,efSearch:e.efSearch||50,dimension:e.dimension||384,metric:e.metric||"cosine",quantization:e.quantization||"none"},this.indexes=new Map,this.nextId=new Map,this.gnnLayers=new Map,c(),this.compressor=new b,V()}initializeIndex(e){this.indexes.has(e)||(this.indexes.set(e,new Map),this.nextId.set(e,0))}addEmbedding(e,n){let r=e.namespace;this.indexes.has(r)||this.initializeIndex(r);let i=this.indexes.get(r),s=n??this.nextId.get(r);return n===void 0&&this.nextId.set(r,s+1),i.set(s,e),s}addEmbeddingsBatch(e){let n=[];for(let r of e){let i=this.addEmbedding(r.embedding,r.id);n.push(i)}return n}search(e,n={}){let r=n.namespace||e.namespace;if(!this.indexes.has(r))return[];let i=this.indexes.get(r),s=n.limit||10,a=[];for(let[u,d]of i.entries())a.push({id:u,vector:Array.from(d.vector)});if(a.length===0)return[];let o=new Float32Array(e.vector),m=a.map(u=>new Float32Array(u.vector)),l=p(o,m,Math.min(s,a.length),1);return l.indices.map((u,d)=>({id:a[u]?.id??u,distance:1-l.weights[d]}))}differentiableSearchWithWeights(e,n,r,i=1){let s=new Float32Array(e.vector),a=n.map(m=>new Float32Array(m.embedding.vector)),o=p(s,a,Math.min(r,n.length),i);return{indices:o.indices.map(m=>n[m]?.id??m),weights:o.weights}}hierarchicalForward(e,n,r){let i=r.map(l=>`${l.inputDim}-${l.hiddenDim}`).join(",");if(!this.gnnLayers.has(i)){let l=[];for(let u of r){let d=new h(u.inputDim,u.hiddenDim,u.heads,u.dropout);l.push(d)}this.gnnLayers.set(i,l[0])}let a=this.gnnLayers.get(i).toJson(),o=new Float32Array(e),m=n.map(l=>l.map(u=>new Float32Array(u)));return Array.from(g(o,m,[a]))}compressEmbedding(e,n){let r=f(n),s={none:"none",half:"half",pq8:"pq8",pq4:"pq4",binary:"binary"}[r]??"none",a=new Float32Array(e.vector),o=this.compressor.compress(a,n);return{dimension:Array.from(e.vector).length,level:s,data:o,accessFreq:n}}decompressEmbedding(e){let n=this.compressor.decompress(e.data),r={none:"none",half:"fp16",pq8:"int8",pq4:"int8",binary:"binary"};return{vector:n,dimension:e.dimension,namespace:"code",text:"",timestamp:Date.now(),quantization:r[e.level]??"none"}}getCompressionLevelForFrequency(e){return c(),f(e)}getIndexStats(e){return this.indexes.has(e)?{size:this.indexes.get(e).size,maxElements:1e4,dimension:this.config.dimension,metric:this.config.metric}:null}clearIndex(e){this.indexes.delete(e),this.nextId.delete(e)}clearAll(){this.indexes.clear(),this.nextId.clear()}resizeIndex(e){}setEfSearch(e){this.config.efSearch=e}getConfig(){return{...this.config}}isInitialized(e){return this.indexes.has(e)}getInitializedNamespaces(){return Array.from(this.indexes.keys())}getSize(e){return this.indexes.get(e)?.size??0}async saveIndex(e,n){let r=this.indexes.get(e);if(!r)throw new Error(`Namespace ${e} not initialized`);let i=Array.from(r.entries()).map(([a,o])=>({id:a,vector:Array.from(o.vector),metadata:o.metadata}));await(await import("fs/promises")).writeFile(n,JSON.stringify(i,null,2))}async loadIndex(e,n){let i=await(await import("fs/promises")).readFile(n,"utf-8"),s=A(i);this.initializeIndex(e);for(let a of s){let o={vector:a.vector,dimension:a.vector.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none",metadata:a.metadata};this.addEmbedding(o,a.id)}}},q=class{static instances=new Map;static getInstance(e,n){return this.instances.has(e)||this.instances.set(e,new y(n)),this.instances.get(e)}static closeInstance(e){let n=this.instances.get(e);n&&(n.clearAll(),this.instances.delete(e))}static closeAll(){for(let e of this.instances.values())e.clearAll();this.instances.clear()}},z=class{static layers=new Map;static getLayer(e){let n=`${e.inputDim}-${e.hiddenDim}-${e.heads}-${e.dropout}`;if(!this.layers.has(n)){c();let r=new h(e.inputDim,e.hiddenDim,e.heads,e.dropout);this.layers.set(n,r)}return this.layers.get(n)}static layerFromJson(e){return c(),h.fromJson(e)}static clearCache(){this.layers.clear()}},N=class{static _compressor=null;static get compressor(){return this._compressor||(c(),this._compressor=new b),this._compressor}static compressWithLevel(e,n){let r={levelType:n,scale:1,subvectors:n==="pq8"?8:n==="pq4"?16:void 0,centroids:n==="pq8"?256:void 0,outlierThreshold:n==="pq4"?3:void 0,threshold:n==="binary"?0:void 0},i=e instanceof Float32Array?e:new Float32Array(e);return this.compressor.compressWithLevel(i,r)}static decompress(e){return this.compressor.decompress(e)}static getLevel(e){return c(),f(e)}static compressWithDither(e,n,r){let i=e instanceof Float32Array?e:new Float32Array(e),s;if(E()){let o={none:32,half:16,pq8:8,pq4:4,binary:1},m=r?.bitDepth??o[n]??8,l=r?.seed??0;s=I(i,m,l)}return{compressed:this.compressWithLevel(s?s.dequantized:e,n),ditherResult:s}}};function G(){return c(),h}function J(){return c(),b}function O(){return c(),p}function j(){return c(),g}function B(){return c(),f}function K(){return c(),w}function U(t){return t instanceof Float32Array?t:"vector"in t?t.vector instanceof Float32Array?t.vector:new Float32Array(t.vector):new Float32Array(t)}function X(t){return"vector"in t?Array.from(t.vector):Array.from(t)}function Y(t,e="code"){return{vector:t,dimension:t.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none"}}function Z(t,e,n,r=1){let i=[],s=e.map(a=>a instanceof Float32Array?a:new Float32Array(a));for(let a of t){let o=a instanceof Float32Array?a:new Float32Array(a),m=p(o,s,n,r);i.push({indices:m.indices,weights:m.weights})}return i}export{H as a,V as b,y as c,q as d,z as e,N as f,G as g,J as h,O as i,j,B as k,K as l,U as m,X as n,Y as o,Z as p};
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.15");process.exit(0)}
2
+ import{b as A,d as M}from"./chunk-2XW36KDQ.js";import{a as S,b as D}from"./chunk-YCYFUYCE.js";import{S as Q,l as E}from"./chunk-XXRDI53H.js";import{g as C}from"./chunk-CUQBOVRP.js";M();Q();var v=(1+Math.sqrt(5))/2,R=1/v;function k(t,e=0){if(t<0||!Number.isFinite(t))throw new Error(`Invalid dither sequence length: ${t}`);if(!Number.isFinite(e))throw new Error(`Invalid dither seed: ${e}`);let n=new Float32Array(t),r=(e*R%1+1)%1;for(let i=0;i<t;i++)n[i]=((r+(i+1)*v)%1+1)%1;return n}function I(t,e,n=0){if(!(t instanceof Float32Array))throw new Error("Input vector must be a Float32Array");if(t.length===0)return{quantized:new Int32Array(0),dequantized:new Float32Array(0),bitDepth:e,seed:n,stepSize:0,minValue:0,maxValue:0};if(e<1||e>32||!Number.isInteger(e))throw new Error(`Invalid bit depth: ${e}. Must be an integer in [1, 32].`);let r=t[0],i=t[0];for(let d=1;d<t.length;d++)t[d]<r&&(r=t[d]),t[d]>i&&(i=t[d]);let s=(1<<e)-1,a=i-r,o=a===0?1:a/s,m=k(t.length,n),l=new Int32Array(t.length),u=new Float32Array(t.length);for(let d=0;d<t.length;d++){if(a===0)l[d]=Math.round(s/2);else{let L=(t[d]-r)/o+(m[d]-.5);l[d]=Math.max(0,Math.min(s,Math.round(L)))}u[d]=l[d]*o+r}return{quantized:l,dequantized:u,bitDepth:e,seed:n,stepSize:o,minValue:r,maxValue:i}}var h=null,b=null,p=null,g=null,f=null,w=null,x=!1;try{let t=(D(),C(S));h=t.RuvectorLayer,b=t.TensorCompress,p=t.differentiableSearch,g=t.hierarchicalForward,f=t.getCompressionLevel,w=t.init,x=!0}catch{}function H(){return x}function c(){if(!x)throw new Error("@ruvector/gnn native module is not available on this platform. Install the appropriate optional dependency for your platform, or use a platform where pre-built binaries are available.")}var F=!1;function V(){if(!F){c();let t=w();return F=!0,t}return"@ruvector/gnn already initialized"}var y=class{indexes;config;nextId;gnnLayers;compressor;constructor(e={}){this.config={M:e.M||16,efConstruction:e.efConstruction||200,efSearch:e.efSearch||50,dimension:e.dimension||384,metric:e.metric||"cosine",quantization:e.quantization||"none"},this.indexes=new Map,this.nextId=new Map,this.gnnLayers=new Map,c(),this.compressor=new b,V()}initializeIndex(e){this.indexes.has(e)||(this.indexes.set(e,new Map),this.nextId.set(e,0))}addEmbedding(e,n){let r=e.namespace;this.indexes.has(r)||this.initializeIndex(r);let i=this.indexes.get(r),s=n??this.nextId.get(r);return n===void 0&&this.nextId.set(r,s+1),i.set(s,e),s}addEmbeddingsBatch(e){let n=[];for(let r of e){let i=this.addEmbedding(r.embedding,r.id);n.push(i)}return n}search(e,n={}){let r=n.namespace||e.namespace;if(!this.indexes.has(r))return[];let i=this.indexes.get(r),s=n.limit||10,a=[];for(let[u,d]of i.entries())a.push({id:u,vector:Array.from(d.vector)});if(a.length===0)return[];let o=new Float32Array(e.vector),m=a.map(u=>new Float32Array(u.vector)),l=p(o,m,Math.min(s,a.length),1);return l.indices.map((u,d)=>({id:a[u]?.id??u,distance:1-l.weights[d]}))}differentiableSearchWithWeights(e,n,r,i=1){let s=new Float32Array(e.vector),a=n.map(m=>new Float32Array(m.embedding.vector)),o=p(s,a,Math.min(r,n.length),i);return{indices:o.indices.map(m=>n[m]?.id??m),weights:o.weights}}hierarchicalForward(e,n,r){let i=r.map(l=>`${l.inputDim}-${l.hiddenDim}`).join(",");if(!this.gnnLayers.has(i)){let l=[];for(let u of r){let d=new h(u.inputDim,u.hiddenDim,u.heads,u.dropout);l.push(d)}this.gnnLayers.set(i,l[0])}let a=this.gnnLayers.get(i).toJson(),o=new Float32Array(e),m=n.map(l=>l.map(u=>new Float32Array(u)));return Array.from(g(o,m,[a]))}compressEmbedding(e,n){let r=f(n),s={none:"none",half:"half",pq8:"pq8",pq4:"pq4",binary:"binary"}[r]??"none",a=new Float32Array(e.vector),o=this.compressor.compress(a,n);return{dimension:Array.from(e.vector).length,level:s,data:o,accessFreq:n}}decompressEmbedding(e){let n=this.compressor.decompress(e.data),r={none:"none",half:"fp16",pq8:"int8",pq4:"int8",binary:"binary"};return{vector:n,dimension:e.dimension,namespace:"code",text:"",timestamp:Date.now(),quantization:r[e.level]??"none"}}getCompressionLevelForFrequency(e){return c(),f(e)}getIndexStats(e){return this.indexes.has(e)?{size:this.indexes.get(e).size,maxElements:1e4,dimension:this.config.dimension,metric:this.config.metric}:null}clearIndex(e){this.indexes.delete(e),this.nextId.delete(e)}clearAll(){this.indexes.clear(),this.nextId.clear()}resizeIndex(e){}setEfSearch(e){this.config.efSearch=e}getConfig(){return{...this.config}}isInitialized(e){return this.indexes.has(e)}getInitializedNamespaces(){return Array.from(this.indexes.keys())}getSize(e){return this.indexes.get(e)?.size??0}async saveIndex(e,n){let r=this.indexes.get(e);if(!r)throw new Error(`Namespace ${e} not initialized`);let i=Array.from(r.entries()).map(([a,o])=>({id:a,vector:Array.from(o.vector),metadata:o.metadata}));await(await import("fs/promises")).writeFile(n,JSON.stringify(i,null,2))}async loadIndex(e,n){let i=await(await import("fs/promises")).readFile(n,"utf-8"),s=A(i);this.initializeIndex(e);for(let a of s){let o={vector:a.vector,dimension:a.vector.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none",metadata:a.metadata};this.addEmbedding(o,a.id)}}},q=class{static instances=new Map;static getInstance(e,n){return this.instances.has(e)||this.instances.set(e,new y(n)),this.instances.get(e)}static closeInstance(e){let n=this.instances.get(e);n&&(n.clearAll(),this.instances.delete(e))}static closeAll(){for(let e of this.instances.values())e.clearAll();this.instances.clear()}},z=class{static layers=new Map;static getLayer(e){let n=`${e.inputDim}-${e.hiddenDim}-${e.heads}-${e.dropout}`;if(!this.layers.has(n)){c();let r=new h(e.inputDim,e.hiddenDim,e.heads,e.dropout);this.layers.set(n,r)}return this.layers.get(n)}static layerFromJson(e){return c(),h.fromJson(e)}static clearCache(){this.layers.clear()}},N=class{static _compressor=null;static get compressor(){return this._compressor||(c(),this._compressor=new b),this._compressor}static compressWithLevel(e,n){let r={levelType:n,scale:1,subvectors:n==="pq8"?8:n==="pq4"?16:void 0,centroids:n==="pq8"?256:void 0,outlierThreshold:n==="pq4"?3:void 0,threshold:n==="binary"?0:void 0},i=e instanceof Float32Array?e:new Float32Array(e);return this.compressor.compressWithLevel(i,r)}static decompress(e){return this.compressor.decompress(e)}static getLevel(e){return c(),f(e)}static compressWithDither(e,n,r){let i=e instanceof Float32Array?e:new Float32Array(e),s;if(E()){let o={none:32,half:16,pq8:8,pq4:4,binary:1},m=r?.bitDepth??o[n]??8,l=r?.seed??0;s=I(i,m,l)}return{compressed:this.compressWithLevel(s?s.dequantized:e,n),ditherResult:s}}};function G(){return c(),h}function J(){return c(),b}function O(){return c(),p}function j(){return c(),g}function B(){return c(),f}function K(){return c(),w}function U(t){return t instanceof Float32Array?t:"vector"in t?t.vector instanceof Float32Array?t.vector:new Float32Array(t.vector):new Float32Array(t)}function X(t){return"vector"in t?Array.from(t.vector):Array.from(t)}function Y(t,e="code"){return{vector:t,dimension:t.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none"}}function Z(t,e,n,r=1){let i=[],s=e.map(a=>a instanceof Float32Array?a:new Float32Array(a));for(let a of t){let o=a instanceof Float32Array?a:new Float32Array(a),m=p(o,s,n,r);i.push({indices:m.indices,weights:m.weights})}return i}export{H as a,V as b,y as c,q as d,z as e,N as f,G as g,J as h,O as i,j,B as k,K as l,U as m,X as n,Y as o,Z as p};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{a as T}from"./chunk-Y2ONHWXI.js";import{c as S}from"./chunk-HHRUXDLT.js";import{b as C,d as P}from"./chunk-VCJP7HQG.js";import{a as w,c as $}from"./chunk-3AOWTHLS.js";import{a as b,d as M}from"./chunk-YYQVSVBO.js";$();M();import{randomUUID as D}from"crypto";var V={topology:"hierarchical",maxConcurrentSkills:10,maxConcurrentModels:3,timeout:3e5,continueOnFailure:!0,retry:{maxRetries:2,retryDelayMs:1e3}},R=class{config;learner;skillValidator=null;workers=new Map;taskQueue=[];isRunning=!1;constructor(e,t){this.config={...V,...e},this.learner=t}setSkillValidator(e){this.skillValidator=e}async validateSkillsParallel(e,t,i){let s=Date.now(),a=i?.trustTier??3,n=i?.validationLevel??"eval",c=this.determineTopology(e.length,t.length),r=this.createValidationTasks(e,t,a,n),o=await this.executeTasksParallel(r,c),l=new Map;for(let u of o){let p=l.get(u.skill)||[];p.push(u),l.set(u.skill,p)}return await this.recordOutcomesToLearner(o,a,n),l}async validateSkillCrossModel(e,t,i){return(await this.validateSkillsParallel([e],t,i)).get(e)||[]}getSummary(e){let t=[],i=new Map,s=new Map;for(let[c,r]of e){i.set(c,r);for(let o of r){t.push(o);let l=s.get(o.model)||[];l.push(o),s.set(o.model,l)}}let a=t.filter(c=>c.errors.length===0&&c.evalPassRate>=.9).length,n=t.reduce((c,r)=>c+r.durationMs,0);return{totalSkills:i.size,totalModels:s.size,successCount:a,failureCount:t.length-a,overallPassRate:t.length>0?a/t.length:0,totalDurationMs:n,avgDurationMs:t.length>0?n/t.length:0,topology:this.config.topology,bySkill:i,byModel:s,results:t}}determineTopology(e,t){if(this.config.topology){let i=e*t;return i>20&&this.config.topology==="mesh"&&console.warn(`[SwarmSkillValidator] Large workload (${i} tasks) may be more efficient with hierarchical topology`),this.config.topology}return e>5||e>t*2?"hierarchical":t>5&&e<=3?"mesh":"hierarchical"}createValidationTasks(e,t,i,s){let a=[];for(let n of e)for(let c of t)a.push({id:`${n}-${c}-${Date.now()}-${D().slice(0,8)}`,skill:n,model:c,trustTier:i,validationLevel:s,timeout:this.config.timeout,retryCount:0});return a}async executeTasksParallel(e,t){this.isRunning=!0,this.taskQueue=[...e];let i=[],s=t==="hierarchical"?this.config.maxConcurrentSkills:Math.min(this.config.maxConcurrentSkills*this.config.maxConcurrentModels,e.length),a=[];for(let n=0;n<Math.min(s,e.length);n++){let c=`worker-${n}`;this.workers.set(c,{id:c,task:null,status:"idle"}),a.push(this.runWorker(c,i))}return await Promise.all(a),this.isRunning=!1,this.workers.clear(),i}async runWorker(e,t){let i=this.workers.get(e);if(i){for(;this.taskQueue.length>0&&this.isRunning;){let s=this.taskQueue.shift();if(!s)break;i.task=s,i.status="running",i.startTime=Date.now();try{let a=await this.executeValidationTask(s);t.push(a),i.result=a,i.status="completed"}catch(a){let n=this.createErrorResult(s,a);this.config.retry&&s.retryCount<this.config.retry.maxRetries&&this.config.continueOnFailure?(s.retryCount++,this.taskQueue.push(s),await this.delay(this.config.retry.retryDelayMs)):(t.push(n),i.result=n,i.status="failed")}}i.task=null,i.status="idle"}}async executeValidationTask(e){let t=Date.now();if(!this.skillValidator)return this.createSimulatedResult(e,t);let i=new Promise((n,c)=>{setTimeout(()=>c(new Error(`Validation timeout after ${e.timeout}ms`)),e.timeout)}),s=await Promise.race([this.skillValidator(e.skill,e.model,{trustTier:e.trustTier,validationLevel:e.validationLevel,timeout:e.timeout}),i]),a=Date.now()-t;return this.outcomeToResult(s,e,a)}outcomeToResult(e,t,i){let s=e.testCaseResults.filter(c=>c.passed).length,a=e.testCaseResults.length,n=a>0?s/a:e.score;return{skill:t.skill,model:t.model,schemaValid:e.validationLevel!=="schema"||e.passed,validatorPassed:e.validationLevel!=="validator"||e.passed,evalPassRate:n,durationMs:i,errors:e.passed?[]:["Validation failed"],trustTier:t.trustTier,validationLevel:t.validationLevel,retryCount:t.retryCount,timestamp:new Date}}createSimulatedResult(e,t){let i=Date.now()-t+b()*100,s=.85+b()*.15;return{skill:e.skill,model:e.model,schemaValid:!0,validatorPassed:s>.8,evalPassRate:s,durationMs:i,errors:s>.8?[]:["Simulated validation failure"],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}createErrorResult(e,t){let i=w(t);return{skill:e.skill,model:e.model,schemaValid:!1,validatorPassed:!1,evalPassRate:0,durationMs:0,errors:[i],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}async recordOutcomesToLearner(e,t,i){for(let s of e){let a={skillName:s.skill,trustTier:s.trustTier||t,validationLevel:s.validationLevel||i,model:s.model,passed:s.errors.length===0&&s.evalPassRate>=.9,score:s.evalPassRate,testCaseResults:this.createTestCaseResults(s),timestamp:s.timestamp,runId:`swarm-${Date.now()}`,metadata:{duration:s.durationMs,retryCount:s.retryCount}};await this.learner.recordValidationOutcome(a)}}createTestCaseResults(e){return[{testId:`${e.skill}-${e.model}-aggregate`,passed:e.errors.length===0,expectedPatterns:["valid-output"],actualPatterns:e.errors.length===0?["valid-output"]:[],reasoningQuality:e.evalPassRate,executionTimeMs:e.durationMs,category:"swarm-validation",priority:"high",error:e.errors.length>0?e.errors.join("; "):void 0}]}delay(e){return new Promise(t=>setTimeout(t,e))}getConfig(){return{...this.config}}isValidationRunning(){return this.isRunning}getWorkerStatus(){return Array.from(this.workers.values())}cancel(){this.isRunning=!1,this.taskQueue=[]}};function A(y,e){return new R(y,e)}var F=["security-testing","accessibility-testing","api-testing","performance-testing","visual-regression-testing","mutation-testing","contract-testing","chaos-testing","compliance-testing","penetration-testing"],I=["claude-sonnet","claude-haiku","claude-opus"];P();import{readFileSync as L,writeFileSync as N,existsSync as E}from"fs";var O={varianceThreshold:.04,regressionThreshold:.1,minSamples:3,autoUpdateManifest:!1},k=class{constructor(e,t,i={}){this.learner=e;this.manifestPath=t;this.config={...O,...i}}config;async aggregateResults(e){let t=`agg-${Date.now()}`,i=new Date,s=this.buildSkillResultsMap(e),a=this.calculateSummary(s,e),n=await this.detectCrossModelAnomalies(e),c=await this.detectRegressions(e,this.config.regressionThreshold),r=this.generateRecommendations(s,n,c),o={timestamp:i,runId:t,summary:a,skillResults:s,crossModelAnalysis:n,regressions:c,recommendations:r,metadata:{version:"1.0.0",environment:e[0]?.metadata?.environment,generatedBy:"ValidationResultAggregator",inputs:{runIds:e.map(l=>l.runId),models:[...new Set(e.map(l=>l.model))]}}};return this.config.autoUpdateManifest&&await this.updateManifest(o),o}buildSkillResultsMap(e){let t=new Map;for(let i of e)for(let s of i.outcomes){let a=s.skillName;t.has(a)||t.set(a,{skill:a,trustTier:s.trustTier,passRateByModel:new Map,avgPassRate:0,schemaValid:!0,validatorPassed:!0,evalPassed:!0,issues:[],executionTimeMs:0,testCount:0,passedTests:0,failedTests:0});let n=t.get(a),c=s.testCaseResults.filter(r=>r.passed).length/(s.testCaseResults.length||1);n.passRateByModel.set(i.model,c),n.testCount+=s.testCaseResults.length,n.passedTests+=s.testCaseResults.filter(r=>r.passed).length,n.failedTests+=s.testCaseResults.filter(r=>!r.passed).length,n.executionTimeMs+=s.metadata?.duration||0,s.validationLevel==="schema"&&!s.passed&&(n.schemaValid=!1),s.validationLevel==="validator"&&!s.passed&&(n.validatorPassed=!1),s.validationLevel==="eval"&&!s.passed&&(n.evalPassed=!1);for(let r of s.testCaseResults)!r.passed&&r.error&&n.issues.push({skill:a,model:i.model,severity:r.priority==="critical"?"critical":r.priority==="high"?"high":r.priority==="medium"?"medium":"low",type:this.categorizeIssueType(s.validationLevel,r.error),message:r.error,testId:r.testId})}for(let i of t.values()){let s=Array.from(i.passRateByModel.values());i.avgPassRate=s.length>0?s.reduce((a,n)=>a+n,0)/s.length:0}return t}categorizeIssueType(e,t){return t.toLowerCase().includes("timeout")?"timeout":e==="schema"?"schema_failure":e==="validator"?"validator_failure":e==="eval"?"eval_failure":"error"}calculateSummary(e,t){let i=Array.from(e.values()),s=i.filter(n=>n.avgPassRate>=.9).length,a=i.length>0?i.reduce((n,c)=>n+c.avgPassRate,0)/i.length:0;return{totalSkills:i.length,passedSkills:s,failedSkills:i.length-s,avgPassRate:a,totalDurationMs:t.reduce((n,c)=>n+c.durationMs,0),totalTests:i.reduce((n,c)=>n+c.testCount,0),passedTests:i.reduce((n,c)=>n+c.passedTests,0),failedTests:i.reduce((n,c)=>n+c.failedTests,0),modelsUsed:[...new Set(t.map(n=>n.model))]}}async detectCrossModelAnomalies(e){let t=new Map,i=new Map,s=new Map;for(let d of e){t.has(d.model)||(t.set(d.model,[]),i.set(d.model,{totalTests:0,passedTests:0,skillCount:0}));for(let g of d.outcomes){let h=g.testCaseResults.filter(m=>m.passed).length/(g.testCaseResults.length||1);t.get(d.model).push(h);let f=i.get(d.model);f.totalTests+=g.testCaseResults.length,f.passedTests+=g.testCaseResults.filter(m=>m.passed).length,f.skillCount++,s.has(g.skillName)||s.set(g.skillName,{passRates:[],models:[]}),s.get(g.skillName).passRates.push(h),s.get(g.skillName).models.push(d.model)}}let a=[];for(let d of t.values())a.push(...d);let n=a.length>0?a.reduce((d,g)=>d+g,0)/a.length:0,c=a.length>1?a.reduce((d,g)=>d+Math.pow(g-n,2),0)/a.length:0,r=Math.sqrt(c),o=[],l=new Map;for(let[d,g]of t.entries()){let h=g.reduce((v,x)=>v+x,0)/g.length,f=h-n,m=i.get(d);l.set(d,{avgPassRate:h,skillCount:m.skillCount,totalTests:m.totalTests}),Math.abs(f)>this.config.varianceThreshold*2&&o.push({model:d,type:f<0?"low_performance":"high_variance",description:`Model ${d} has ${(f*100).toFixed(1)}% difference from average`,passRate:h,avgPassRate:n,deviation:Math.abs(f)})}let u=[],p=[];for(let[d,g]of s.entries()){if(g.passRates.length<2)continue;let h=g.passRates.reduce((m,v)=>m+v,0)/g.passRates.length;g.passRates.reduce((m,v)=>m+Math.pow(v-h,2),0)/g.passRates.length<this.config.varianceThreshold?u.push(d):p.push(d)}return{variance:c,stdDeviation:r,anomalies:o,consistentSkills:u,inconsistentSkills:p,modelPerformance:l}}async detectRegressions(e,t){let i=[],s=new Set;for(let a of e)for(let n of a.outcomes){let c=`${n.skillName}-${a.model}`;if(s.has(c))continue;s.add(c);let r=await this.learner.getValidationTrends(n.skillName);if(!r)continue;let o=n.testCaseResults.filter(p=>p.passed).length/(n.testCaseResults.length||1),l=r.recentPassRate,u=l-o;u>=t&&i.push({skill:n.skillName,model:a.model,previousPassRate:l,currentPassRate:o,regressionAmount:u,trend:r.overall,possibleCauses:this.analyzePossibleCauses(n,u),severity:this.categorizeRegressionSeverity(u)})}return i.sort((a,n)=>{let c={critical:0,high:1,medium:2,low:3},r=c[a.severity]-c[n.severity];return r!==0?r:n.regressionAmount-a.regressionAmount})}analyzePossibleCauses(e,t){let i=[],s=e.testCaseResults.filter(c=>!c.passed);if(s.length>0){let c=[...new Set(s.map(r=>r.category).filter(Boolean))];c.length>0&&i.push(`Failures in categories: ${c.join(", ")}`)}let a=s.filter(c=>c.priority==="critical");a.length>0&&i.push(`${a.length} critical test(s) failing`);let n=e.testCaseResults.reduce((c,r)=>c+r.reasoningQuality,0)/(e.testCaseResults.length||1);return n<.7&&i.push(`Low reasoning quality score: ${(n*100).toFixed(1)}%`),t>.3&&i.push("Possible model behavior change or prompt drift"),i.length===0&&i.push("No specific cause identified - review test details"),i}categorizeRegressionSeverity(e){return e>=.5?"critical":e>=.3?"high":e>=.15?"medium":"low"}generateRecommendations(e,t,i){let s=[];if(t.inconsistentSkills.length>0&&s.push(`Review ${t.inconsistentSkills.length} skills with inconsistent cross-model behavior: `+t.inconsistentSkills.slice(0,3).join(", ")+(t.inconsistentSkills.length>3?` and ${t.inconsistentSkills.length-3} more`:"")),t.anomalies.some(r=>r.type==="low_performance")){let r=t.anomalies.filter(o=>o.type==="low_performance").map(o=>o.model);s.push(`Investigate low performance on model(s): ${r.join(", ")}`)}let a=i.filter(r=>r.severity==="critical");a.length>0&&s.push(`URGENT: ${a.length} critical regression(s) detected - immediate review required`);let n=Array.from(e.values()).filter(r=>r.avgPassRate<.9);if(n.length>0){let r=n.filter(l=>!l.schemaValid),o=n.filter(l=>!l.validatorPassed);r.length>0&&s.push(`Fix schema validation for: ${r.map(l=>l.skill).slice(0,3).join(", ")}`),o.length>0&&s.push(`Review validator scripts for: ${o.map(l=>l.skill).slice(0,3).join(", ")}`)}return Array.from(e.values()).reduce((r,o)=>r+o.avgPassRate,0)/e.size<.8&&s.push("Overall pass rate below 80% - consider reviewing skill definitions and test expectations"),s.length===0&&s.push("All validations passing - no immediate action required"),s}async updateManifest(e){if(!E(this.manifestPath))throw new Error(`Manifest file not found: ${this.manifestPath}`);let t=C(L(this.manifestPath,"utf-8"));for(let[s,a]of e.skillResults.entries())if(t.skills&&t.skills[s]){let n=t.skills[s];n.validation||(n.validation={}),n.validation.passRate=a.avgPassRate,n.validation.lastValidated=e.timestamp.toISOString(),n.validation.status=a.avgPassRate>=.9?"passing":"failing",n.validation.passRateByModel=Object.fromEntries(a.passRateByModel)}let i=Array.from(e.skillResults.values());t.validationStatus={passing:i.filter(s=>s.avgPassRate>=.9).length,failing:i.filter(s=>s.avgPassRate<.9).length,unknown:0,skipped:t.summary?.tier0||0},t.generatedAt=new Date().toISOString(),t.lastValidationRun={runId:e.runId,timestamp:e.timestamp.toISOString(),avgPassRate:e.summary.avgPassRate,modelsUsed:e.summary.modelsUsed},N(this.manifestPath,JSON.stringify(t,null,2))}generateMarkdownReport(e){let{summary:t,crossModelAnalysis:i,regressions:s,recommendations:a,skillResults:n}=e,c=(t.avgPassRate>=.9||t.avgPassRate>=.7,"`"),r=[];if(r.push(`# Validation Report
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.15");process.exit(0)}
2
+ import{a as T}from"./chunk-FEVTMHO6.js";import{c as S}from"./chunk-XALB3KRR.js";import{b as C,d as P}from"./chunk-2XW36KDQ.js";import{a as w,c as $}from"./chunk-JJDHD7SC.js";import{a as b,d as M}from"./chunk-D3ZUSXFY.js";$();M();import{randomUUID as D}from"crypto";var x={topology:"hierarchical",maxConcurrentSkills:10,maxConcurrentModels:3,timeout:3e5,continueOnFailure:!0,retry:{maxRetries:2,retryDelayMs:1e3}},R=class{config;learner;skillValidator=null;workers=new Map;taskQueue=[];isRunning=!1;constructor(e,t){this.config={...x,...e},this.learner=t}setSkillValidator(e){this.skillValidator=e}async validateSkillsParallel(e,t,i){let s=Date.now(),a=i?.trustTier??3,n=i?.validationLevel??"eval",c=this.determineTopology(e.length,t.length),r=this.createValidationTasks(e,t,a,n),o=await this.executeTasksParallel(r,c),l=new Map;for(let u of o){let p=l.get(u.skill)||[];p.push(u),l.set(u.skill,p)}return await this.recordOutcomesToLearner(o,a,n),l}async validateSkillCrossModel(e,t,i){return(await this.validateSkillsParallel([e],t,i)).get(e)||[]}getSummary(e){let t=[],i=new Map,s=new Map;for(let[c,r]of e){i.set(c,r);for(let o of r){t.push(o);let l=s.get(o.model)||[];l.push(o),s.set(o.model,l)}}let a=t.filter(c=>c.errors.length===0&&c.evalPassRate>=.9).length,n=t.reduce((c,r)=>c+r.durationMs,0);return{totalSkills:i.size,totalModels:s.size,successCount:a,failureCount:t.length-a,overallPassRate:t.length>0?a/t.length:0,totalDurationMs:n,avgDurationMs:t.length>0?n/t.length:0,topology:this.config.topology,bySkill:i,byModel:s,results:t}}determineTopology(e,t){if(this.config.topology){let i=e*t;return i>20&&this.config.topology==="mesh"&&console.warn(`[SwarmSkillValidator] Large workload (${i} tasks) may be more efficient with hierarchical topology`),this.config.topology}return e>5||e>t*2?"hierarchical":t>5&&e<=3?"mesh":"hierarchical"}createValidationTasks(e,t,i,s){let a=[];for(let n of e)for(let c of t)a.push({id:`${n}-${c}-${Date.now()}-${D().slice(0,8)}`,skill:n,model:c,trustTier:i,validationLevel:s,timeout:this.config.timeout,retryCount:0});return a}async executeTasksParallel(e,t){this.isRunning=!0,this.taskQueue=[...e];let i=[],s=t==="hierarchical"?this.config.maxConcurrentSkills:Math.min(this.config.maxConcurrentSkills*this.config.maxConcurrentModels,e.length),a=[];for(let n=0;n<Math.min(s,e.length);n++){let c=`worker-${n}`;this.workers.set(c,{id:c,task:null,status:"idle"}),a.push(this.runWorker(c,i))}return await Promise.all(a),this.isRunning=!1,this.workers.clear(),i}async runWorker(e,t){let i=this.workers.get(e);if(i){for(;this.taskQueue.length>0&&this.isRunning;){let s=this.taskQueue.shift();if(!s)break;i.task=s,i.status="running",i.startTime=Date.now();try{let a=await this.executeValidationTask(s);t.push(a),i.result=a,i.status="completed"}catch(a){let n=this.createErrorResult(s,a);this.config.retry&&s.retryCount<this.config.retry.maxRetries&&this.config.continueOnFailure?(s.retryCount++,this.taskQueue.push(s),await this.delay(this.config.retry.retryDelayMs)):(t.push(n),i.result=n,i.status="failed")}}i.task=null,i.status="idle"}}async executeValidationTask(e){let t=Date.now();if(!this.skillValidator)return this.createSimulatedResult(e,t);let i=new Promise((n,c)=>{setTimeout(()=>c(new Error(`Validation timeout after ${e.timeout}ms`)),e.timeout)}),s=await Promise.race([this.skillValidator(e.skill,e.model,{trustTier:e.trustTier,validationLevel:e.validationLevel,timeout:e.timeout}),i]),a=Date.now()-t;return this.outcomeToResult(s,e,a)}outcomeToResult(e,t,i){let s=e.testCaseResults.filter(c=>c.passed).length,a=e.testCaseResults.length,n=a>0?s/a:e.score;return{skill:t.skill,model:t.model,schemaValid:e.validationLevel!=="schema"||e.passed,validatorPassed:e.validationLevel!=="validator"||e.passed,evalPassRate:n,durationMs:i,errors:e.passed?[]:["Validation failed"],trustTier:t.trustTier,validationLevel:t.validationLevel,retryCount:t.retryCount,timestamp:new Date}}createSimulatedResult(e,t){let i=Date.now()-t+b()*100,s=.85+b()*.15;return{skill:e.skill,model:e.model,schemaValid:!0,validatorPassed:s>.8,evalPassRate:s,durationMs:i,errors:s>.8?[]:["Simulated validation failure"],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}createErrorResult(e,t){let i=w(t);return{skill:e.skill,model:e.model,schemaValid:!1,validatorPassed:!1,evalPassRate:0,durationMs:0,errors:[i],trustTier:e.trustTier,validationLevel:e.validationLevel,retryCount:e.retryCount,timestamp:new Date}}async recordOutcomesToLearner(e,t,i){for(let s of e){let a={skillName:s.skill,trustTier:s.trustTier||t,validationLevel:s.validationLevel||i,model:s.model,passed:s.errors.length===0&&s.evalPassRate>=.9,score:s.evalPassRate,testCaseResults:this.createTestCaseResults(s),timestamp:s.timestamp,runId:`swarm-${Date.now()}`,metadata:{duration:s.durationMs,retryCount:s.retryCount}};await this.learner.recordValidationOutcome(a)}}createTestCaseResults(e){return[{testId:`${e.skill}-${e.model}-aggregate`,passed:e.errors.length===0,expectedPatterns:["valid-output"],actualPatterns:e.errors.length===0?["valid-output"]:[],reasoningQuality:e.evalPassRate,executionTimeMs:e.durationMs,category:"swarm-validation",priority:"high",error:e.errors.length>0?e.errors.join("; "):void 0}]}delay(e){return new Promise(t=>setTimeout(t,e))}getConfig(){return{...this.config}}isValidationRunning(){return this.isRunning}getWorkerStatus(){return Array.from(this.workers.values())}cancel(){this.isRunning=!1,this.taskQueue=[]}};function A(y,e){return new R(y,e)}var F=["security-testing","accessibility-testing","api-testing","performance-testing","visual-regression-testing","mutation-testing","contract-testing","chaos-testing","compliance-testing","penetration-testing"],I=["claude-sonnet","claude-haiku","claude-opus"];P();import{readFileSync as L,writeFileSync as E,existsSync as N}from"fs";var O={varianceThreshold:.04,regressionThreshold:.1,minSamples:3,autoUpdateManifest:!1},k=class{constructor(e,t,i={}){this.learner=e;this.manifestPath=t;this.config={...O,...i}}learner;manifestPath;config;async aggregateResults(e){let t=`agg-${Date.now()}`,i=new Date,s=this.buildSkillResultsMap(e),a=this.calculateSummary(s,e),n=await this.detectCrossModelAnomalies(e),c=await this.detectRegressions(e,this.config.regressionThreshold),r=this.generateRecommendations(s,n,c),o={timestamp:i,runId:t,summary:a,skillResults:s,crossModelAnalysis:n,regressions:c,recommendations:r,metadata:{version:"1.0.0",environment:e[0]?.metadata?.environment,generatedBy:"ValidationResultAggregator",inputs:{runIds:e.map(l=>l.runId),models:[...new Set(e.map(l=>l.model))]}}};return this.config.autoUpdateManifest&&await this.updateManifest(o),o}buildSkillResultsMap(e){let t=new Map;for(let i of e)for(let s of i.outcomes){let a=s.skillName;t.has(a)||t.set(a,{skill:a,trustTier:s.trustTier,passRateByModel:new Map,avgPassRate:0,schemaValid:!0,validatorPassed:!0,evalPassed:!0,issues:[],executionTimeMs:0,testCount:0,passedTests:0,failedTests:0});let n=t.get(a),c=s.testCaseResults.filter(r=>r.passed).length/(s.testCaseResults.length||1);n.passRateByModel.set(i.model,c),n.testCount+=s.testCaseResults.length,n.passedTests+=s.testCaseResults.filter(r=>r.passed).length,n.failedTests+=s.testCaseResults.filter(r=>!r.passed).length,n.executionTimeMs+=s.metadata?.duration||0,s.validationLevel==="schema"&&!s.passed&&(n.schemaValid=!1),s.validationLevel==="validator"&&!s.passed&&(n.validatorPassed=!1),s.validationLevel==="eval"&&!s.passed&&(n.evalPassed=!1);for(let r of s.testCaseResults)!r.passed&&r.error&&n.issues.push({skill:a,model:i.model,severity:r.priority==="critical"?"critical":r.priority==="high"?"high":r.priority==="medium"?"medium":"low",type:this.categorizeIssueType(s.validationLevel,r.error),message:r.error,testId:r.testId})}for(let i of t.values()){let s=Array.from(i.passRateByModel.values());i.avgPassRate=s.length>0?s.reduce((a,n)=>a+n,0)/s.length:0}return t}categorizeIssueType(e,t){return t.toLowerCase().includes("timeout")?"timeout":e==="schema"?"schema_failure":e==="validator"?"validator_failure":e==="eval"?"eval_failure":"error"}calculateSummary(e,t){let i=Array.from(e.values()),s=i.filter(n=>n.avgPassRate>=.9).length,a=i.length>0?i.reduce((n,c)=>n+c.avgPassRate,0)/i.length:0;return{totalSkills:i.length,passedSkills:s,failedSkills:i.length-s,avgPassRate:a,totalDurationMs:t.reduce((n,c)=>n+c.durationMs,0),totalTests:i.reduce((n,c)=>n+c.testCount,0),passedTests:i.reduce((n,c)=>n+c.passedTests,0),failedTests:i.reduce((n,c)=>n+c.failedTests,0),modelsUsed:[...new Set(t.map(n=>n.model))]}}async detectCrossModelAnomalies(e){let t=new Map,i=new Map,s=new Map;for(let d of e){t.has(d.model)||(t.set(d.model,[]),i.set(d.model,{totalTests:0,passedTests:0,skillCount:0}));for(let g of d.outcomes){let h=g.testCaseResults.filter(m=>m.passed).length/(g.testCaseResults.length||1);t.get(d.model).push(h);let f=i.get(d.model);f.totalTests+=g.testCaseResults.length,f.passedTests+=g.testCaseResults.filter(m=>m.passed).length,f.skillCount++,s.has(g.skillName)||s.set(g.skillName,{passRates:[],models:[]}),s.get(g.skillName).passRates.push(h),s.get(g.skillName).models.push(d.model)}}let a=[];for(let d of t.values())a.push(...d);let n=a.length>0?a.reduce((d,g)=>d+g,0)/a.length:0,c=a.length>1?a.reduce((d,g)=>d+Math.pow(g-n,2),0)/a.length:0,r=Math.sqrt(c),o=[],l=new Map;for(let[d,g]of t.entries()){let h=g.reduce((v,V)=>v+V,0)/g.length,f=h-n,m=i.get(d);l.set(d,{avgPassRate:h,skillCount:m.skillCount,totalTests:m.totalTests}),Math.abs(f)>this.config.varianceThreshold*2&&o.push({model:d,type:f<0?"low_performance":"high_variance",description:`Model ${d} has ${(f*100).toFixed(1)}% difference from average`,passRate:h,avgPassRate:n,deviation:Math.abs(f)})}let u=[],p=[];for(let[d,g]of s.entries()){if(g.passRates.length<2)continue;let h=g.passRates.reduce((m,v)=>m+v,0)/g.passRates.length;g.passRates.reduce((m,v)=>m+Math.pow(v-h,2),0)/g.passRates.length<this.config.varianceThreshold?u.push(d):p.push(d)}return{variance:c,stdDeviation:r,anomalies:o,consistentSkills:u,inconsistentSkills:p,modelPerformance:l}}async detectRegressions(e,t){let i=[],s=new Set;for(let a of e)for(let n of a.outcomes){let c=`${n.skillName}-${a.model}`;if(s.has(c))continue;s.add(c);let r=await this.learner.getValidationTrends(n.skillName);if(!r)continue;let o=n.testCaseResults.filter(p=>p.passed).length/(n.testCaseResults.length||1),l=r.recentPassRate,u=l-o;u>=t&&i.push({skill:n.skillName,model:a.model,previousPassRate:l,currentPassRate:o,regressionAmount:u,trend:r.overall,possibleCauses:this.analyzePossibleCauses(n,u),severity:this.categorizeRegressionSeverity(u)})}return i.sort((a,n)=>{let c={critical:0,high:1,medium:2,low:3},r=c[a.severity]-c[n.severity];return r!==0?r:n.regressionAmount-a.regressionAmount})}analyzePossibleCauses(e,t){let i=[],s=e.testCaseResults.filter(c=>!c.passed);if(s.length>0){let c=[...new Set(s.map(r=>r.category).filter(Boolean))];c.length>0&&i.push(`Failures in categories: ${c.join(", ")}`)}let a=s.filter(c=>c.priority==="critical");a.length>0&&i.push(`${a.length} critical test(s) failing`);let n=e.testCaseResults.reduce((c,r)=>c+r.reasoningQuality,0)/(e.testCaseResults.length||1);return n<.7&&i.push(`Low reasoning quality score: ${(n*100).toFixed(1)}%`),t>.3&&i.push("Possible model behavior change or prompt drift"),i.length===0&&i.push("No specific cause identified - review test details"),i}categorizeRegressionSeverity(e){return e>=.5?"critical":e>=.3?"high":e>=.15?"medium":"low"}generateRecommendations(e,t,i){let s=[];if(t.inconsistentSkills.length>0&&s.push(`Review ${t.inconsistentSkills.length} skills with inconsistent cross-model behavior: `+t.inconsistentSkills.slice(0,3).join(", ")+(t.inconsistentSkills.length>3?` and ${t.inconsistentSkills.length-3} more`:"")),t.anomalies.some(r=>r.type==="low_performance")){let r=t.anomalies.filter(o=>o.type==="low_performance").map(o=>o.model);s.push(`Investigate low performance on model(s): ${r.join(", ")}`)}let a=i.filter(r=>r.severity==="critical");a.length>0&&s.push(`URGENT: ${a.length} critical regression(s) detected - immediate review required`);let n=Array.from(e.values()).filter(r=>r.avgPassRate<.9);if(n.length>0){let r=n.filter(l=>!l.schemaValid),o=n.filter(l=>!l.validatorPassed);r.length>0&&s.push(`Fix schema validation for: ${r.map(l=>l.skill).slice(0,3).join(", ")}`),o.length>0&&s.push(`Review validator scripts for: ${o.map(l=>l.skill).slice(0,3).join(", ")}`)}return Array.from(e.values()).reduce((r,o)=>r+o.avgPassRate,0)/e.size<.8&&s.push("Overall pass rate below 80% - consider reviewing skill definitions and test expectations"),s.length===0&&s.push("All validations passing - no immediate action required"),s}async updateManifest(e){if(!N(this.manifestPath))throw new Error(`Manifest file not found: ${this.manifestPath}`);let t=C(L(this.manifestPath,"utf-8"));for(let[s,a]of e.skillResults.entries())if(t.skills&&t.skills[s]){let n=t.skills[s];n.validation||(n.validation={}),n.validation.passRate=a.avgPassRate,n.validation.lastValidated=e.timestamp.toISOString(),n.validation.status=a.avgPassRate>=.9?"passing":"failing",n.validation.passRateByModel=Object.fromEntries(a.passRateByModel)}let i=Array.from(e.skillResults.values());t.validationStatus={passing:i.filter(s=>s.avgPassRate>=.9).length,failing:i.filter(s=>s.avgPassRate<.9).length,unknown:0,skipped:t.summary?.tier0||0},t.generatedAt=new Date().toISOString(),t.lastValidationRun={runId:e.runId,timestamp:e.timestamp.toISOString(),avgPassRate:e.summary.avgPassRate,modelsUsed:e.summary.modelsUsed},E(this.manifestPath,JSON.stringify(t,null,2))}generateMarkdownReport(e){let{summary:t,crossModelAnalysis:i,regressions:s,recommendations:a,skillResults:n}=e,c=(t.avgPassRate>=.9||t.avgPassRate>=.7,"`"),r=[];if(r.push(`# Validation Report
3
3
 
4
4
  > ${c} Generated: ${e.timestamp.toISOString()}
5
5
  > Run ID: ${e.runId}
@@ -88,4 +88,4 @@ ${l.issues.slice(0,5).map(u=>`- **[${u.severity}]** ${u.type}: ${u.message}${u.t
88
88
 
89
89
  *Generated by ValidationResultAggregator v${e.metadata.version}*
90
90
  *Policy: ADR-056 Trust But Verify*`),r.join(`
91
- `)}generateJsonReport(e){let t={...e,skillResults:Object.fromEntries(Array.from(e.skillResults.entries()).map(([i,s])=>[i,{...s,passRateByModel:Object.fromEntries(s.passRateByModel)}])),crossModelAnalysis:{...e.crossModelAnalysis,modelPerformance:Object.fromEntries(e.crossModelAnalysis.modelPerformance)}};return JSON.stringify(t,null,2)}};function q(y,e,t){return new k(y,e,t)}T();import*as _ from"yaml";var K=S.create("trigger-optimizer");T();var X=S.create("version-comparator");export{V as a,A as b,F as c,I as d,q as e};
91
+ `)}generateJsonReport(e){let t={...e,skillResults:Object.fromEntries(Array.from(e.skillResults.entries()).map(([i,s])=>[i,{...s,passRateByModel:Object.fromEntries(s.passRateByModel)}])),crossModelAnalysis:{...e.crossModelAnalysis,modelPerformance:Object.fromEntries(e.crossModelAnalysis.modelPerformance)}};return JSON.stringify(t,null,2)}};function q(y,e,t){return new k(y,e,t)}T();import*as _ from"yaml";var K=S.create("trigger-optimizer");T();var X=S.create("version-comparator");export{x as a,A as b,F as c,I as d,q as e};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.13");process.exit(0)}
2
- import{b as P,c as x,d as R,f as O,g as j,h as D,i as $,j as L,k as N}from"./chunk-AOTEEGQA.js";import{b as _,d as T}from"./chunk-VCJP7HQG.js";import{a as k,c as q}from"./chunk-3AOWTHLS.js";import{a as v,b as ee}from"./chunk-CF5EJGOV.js";T();import{existsSync as w,mkdirSync as Q,writeFileSync as S,readFileSync as I,copyFileSync as te}from"fs";import{join as g,dirname as ne}from"path";async function M(t,e){if(!e.hooks.claudeCode)return!1;let n=g(t,".claude");w(n)||Q(n,{recursive:!0});let r=g(n,"settings.json"),s={};if(w(r))try{let u=I(r,"utf-8");s=_(u)}catch{s={}}let i={PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks post-command --command "$TOOL_INPUT_command" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'npx agentic-qe hooks post-task --task-id "$TOOL_RESULT_agent_id" --success --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'npx agentic-qe hooks route --task "$PROMPT" --json',timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'npx agentic-qe hooks session-start --session-id "$SESSION_ID" --json',timeout:1e4,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:"npx agentic-qe hooks session-end --save-state --json",timeout:5e3,continueOnError:!0}]}]},d=s.hooks||{};s.hooks=O(d,i);let c=s.env||{};s.env={...c,...j(e)};let m=D(e,t);for(let[u,h]of Object.entries(m))if(u==="_aqePermissions"){let p=s.permissions||{},l=p.allow||[],f=h,C=[...new Set([...l,...f])];s.permissions={...p,allow:C}}else s[u]=h;let a=s.enabledMcpjsonServers||[];return a=a.filter(u=>u!=="aqe"),a.includes("agentic-qe")||a.push("agentic-qe"),s.enabledMcpjsonServers=a,S(r,JSON.stringify(s,null,2),"utf-8"),await re(t),!0}async function re(t){let e=g(t,".claude","hooks");w(e)||Q(e,{recursive:!0});let n=g(e,"cross-phase-memory.yaml");if(w(n))return;let r=[g(ne(import.meta.url.replace("file://","")),"..","..","assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"v3","assets","hooks","cross-phase-memory.yaml")];for(let i of r)try{if(w(i)){te(i,n),console.log(" \u2713 Cross-phase memory hooks installed");return}}catch{}S(n,`# Cross-Phase Memory Hooks Configuration
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.15");process.exit(0)}
2
+ import{b as P,c as x,d as R,f as O,g as j,h as D,i as $,j as L,k as N}from"./chunk-37ZSWRRP.js";import{b as _,d as T}from"./chunk-2XW36KDQ.js";import{a as k,c as q}from"./chunk-JJDHD7SC.js";import{a as v,b as ee}from"./chunk-JAIIPEE6.js";T();import{existsSync as w,mkdirSync as Q,writeFileSync as S,readFileSync as I,copyFileSync as te}from"fs";import{join as g,dirname as ne}from"path";async function M(t,e){if(!e.hooks.claudeCode)return!1;let n=g(t,".claude");w(n)||Q(n,{recursive:!0});let r=g(n,"settings.json"),s={};if(w(r))try{let u=I(r,"utf-8");s=_(u)}catch{s={}}let i={PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'npx agentic-qe hooks pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'npx agentic-qe hooks post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'npx agentic-qe hooks post-command --command "$TOOL_INPUT_command" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'npx agentic-qe hooks post-task --task-id "$TOOL_RESULT_agent_id" --success --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'npx agentic-qe hooks route --task "$PROMPT" --json',timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'npx agentic-qe hooks session-start --session-id "$SESSION_ID" --json',timeout:1e4,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:"npx agentic-qe hooks session-end --save-state --json",timeout:5e3,continueOnError:!0}]}]},d=s.hooks||{};s.hooks=O(d,i);let c=s.env||{};s.env={...c,...j(e)};let m=D(e,t);for(let[u,h]of Object.entries(m))if(u==="_aqePermissions"){let p=s.permissions||{},l=p.allow||[],f=h,C=[...new Set([...l,...f])];s.permissions={...p,allow:C}}else s[u]=h;let a=s.enabledMcpjsonServers||[];return a=a.filter(u=>u!=="aqe"),a.includes("agentic-qe")||a.push("agentic-qe"),s.enabledMcpjsonServers=a,S(r,JSON.stringify(s,null,2),"utf-8"),await re(t),!0}async function re(t){let e=g(t,".claude","hooks");w(e)||Q(e,{recursive:!0});let n=g(e,"cross-phase-memory.yaml");if(w(n))return;let r=[g(ne(import.meta.url.replace("file://","")),"..","..","assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"v3","assets","hooks","cross-phase-memory.yaml")];for(let i of r)try{if(w(i)){te(i,n),console.log(" \u2713 Cross-phase memory hooks installed");return}}catch{}S(n,`# Cross-Phase Memory Hooks Configuration
3
3
  # Generated by aqe init
4
4
  # See: https://github.com/anthropics/agentic-qe/docs/cross-phase-memory.md
5
5
 
@@ -276,7 +276,7 @@ aqe init --auto
276
276
  `).run("aqe_version",JSON.stringify(e),i),s.prepare(`
277
277
  INSERT OR REPLACE INTO kv_store (key, namespace, value, created_at)
278
278
  VALUES (?, '_system', ?, ?)
279
- `).run("init_timestamp",JSON.stringify(new Date().toISOString()),i),s.close(),console.log(` \u2713 Version ${e} written to memory.db`),!0}catch(i){return s.close(),console.warn(` \u26A0 Could not write version: ${k(i)}`),!1}}catch(r){return console.warn(` \u26A0 Could not open memory.db: ${k(r)}`),!1}}async function W(t){let e=null;try{e=(await import("./better-sqlite3-23MIVVHF.js")).default}catch{throw new Error(`SQLite persistence REQUIRED but better-sqlite3 is not installed.
279
+ `).run("init_timestamp",JSON.stringify(new Date().toISOString()),i),s.close(),console.log(` \u2713 Version ${e} written to memory.db`),!0}catch(i){return s.close(),console.warn(` \u26A0 Could not write version: ${k(i)}`),!1}}catch(r){return console.warn(` \u26A0 Could not open memory.db: ${k(r)}`),!1}}async function W(t){let e=null;try{e=(await import("./better-sqlite3-FZ32SHZ6.js")).default}catch{throw new Error(`SQLite persistence REQUIRED but better-sqlite3 is not installed.
280
280
  Install it with: npm install better-sqlite3
281
281
  If you see native compilation errors, ensure build tools are installed:
282
282
  - macOS: xcode-select --install
@@ -302,7 +302,7 @@ Database path: ${r}
302
302
  Ensure the directory is writable and has sufficient disk space.`)}}async function G(t){let e=o(t,".agentic-qe","memory.db");if(!y(e))return!1;try{let n=v(e),r=n.prepare(`
303
303
  SELECT COUNT(*) as count FROM kv_store
304
304
  WHERE namespace = 'code-intelligence:kg'
305
- `).get();return n.close(),r.count>0}catch{return!1}}async function V(t){try{let{KnowledgeGraphService:e}=await import("./knowledge-graph-EUMGCQPH.js"),{InMemoryBackend:n}=await import("./memory-backend-NQMJKHCQ.js"),r=new n;await r.initialize();let s=new e(r,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0}),d=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:t,ignore:["node_modules/**","dist/**","coverage/**",".agentic-qe/**"]}),c=await s.index({paths:d.map(m=>o(t,m)),incremental:!1,includeTests:!0});return s.destroy(),c.success?{status:"indexed",entries:c.value.nodesCreated+c.value.edgesCreated}:{status:"error",entries:0}}catch(e){return console.warn("Code intelligence scan warning:",k(e)),{status:"skipped",entries:0}}}async function B(t){let e=o(t,".agentic-qe","memory.db");try{let n=v(e),r=n.prepare(`
305
+ `).get();return n.close(),r.count>0}catch{return!1}}async function V(t){try{let{KnowledgeGraphService:e}=await import("./knowledge-graph-NOYZXHIG.js"),{InMemoryBackend:n}=await import("./memory-backend-IWOGO4BV.js"),r=new n;await r.initialize();let s=new e(r,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0}),d=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:t,ignore:["node_modules/**","dist/**","coverage/**",".agentic-qe/**"]}),c=await s.index({paths:d.map(m=>o(t,m)),incremental:!1,includeTests:!0});return s.destroy(),c.success?{status:"indexed",entries:c.value.nodesCreated+c.value.edgesCreated}:{status:"error",entries:0}}catch(e){return console.warn("Code intelligence scan warning:",k(e)),{status:"skipped",entries:0}}}async function B(t){let e=o(t,".agentic-qe","memory.db");try{let n=v(e),r=n.prepare(`
306
306
  SELECT COUNT(*) as count FROM kv_store
307
307
  WHERE namespace LIKE 'code-intelligence:kg%'
308
308
  `).get();return n.close(),r.count}catch{return 0}}async function H(t,e,n){if(!e.learning.enabled)return 0;let r=o(t,".agentic-qe","data");y(r)||b(r,{recursive:!0});let s=o(r,"hnsw");y(s)||b(s,{recursive:!0});let i=o(r,"learning-config.json"),d={embeddingModel:e.learning.embeddingModel,hnswConfig:e.learning.hnswConfig,qualityThreshold:e.learning.qualityThreshold,promotionThreshold:e.learning.promotionThreshold,databasePath:o(r,"memory.db"),hnswIndexPath:o(s,"index.bin"),initialized:new Date().toISOString()};E(i,JSON.stringify(d,null,2),"utf-8");let c=0;if(e.learning.pretrainedPatterns&&n){let m=n,a=new Map;for(let p of m.patterns){let l=p.domain||"general";a.has(l)||a.set(l,[]),a.get(l).push(p)}let u=o(r,"pretrained-index.json"),h={version:m.version,totalPatterns:m.statistics.totalPatterns,domains:Array.from(a.entries()).map(([p,l])=>({name:p,patternCount:l.length})),loadedAt:new Date().toISOString()};E(u,JSON.stringify(h,null,2),"utf-8");for(let[p,l]of a){let f=o(r,"patterns",p);y(f)||b(f,{recursive:!0});let C=o(f,"patterns.json");E(C,JSON.stringify(l,null,2),"utf-8"),c+=l.length}return c}return 0}async function J(t,e){if(!e.workers.daemonAutoStart||e.workers.enabled.length===0)return 0;let n=o(t,".agentic-qe","workers");y(n)||b(n,{recursive:!0});let r={},s={"pattern-consolidator":6e4,"coverage-gap-scanner":3e5,"flaky-test-detector":6e5,"routing-accuracy-monitor":12e4};for(let a of e.workers.enabled)r[a]={name:a,enabled:!0,interval:e.workers.intervals[a]||s[a]||6e4,lastRun:null,status:"pending"};let i=o(n,"registry.json"),d={version:e.version,maxConcurrent:e.workers.maxConcurrent,workers:r,createdAt:new Date().toISOString(),daemonPid:null};E(i,JSON.stringify(d,null,2),"utf-8");for(let a of e.workers.enabled){let u=o(n,`${a}.json`),h={name:a,enabled:!0,interval:e.workers.intervals[a]||s[a]||6e4,projectRoot:t,dataDir:o(t,".agentic-qe","data"),createdAt:new Date().toISOString()};E(u,JSON.stringify(h,null,2),"utf-8")}let c=o(n,"start-daemon.cjs");return E(c,`#!/usr/bin/env node
@@ -1,3 +1,3 @@
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 L}from"./chunk-QIE76ERL.js";import*as w from"fs";var R={"aqe test generate":{domain:"test-generation",action:"generateTests"},"aqe test execute":{domain:"test-execution",action:"execute"},"aqe coverage analyze":{domain:"coverage-analysis",action:"analyze"},"aqe coverage gaps":{domain:"coverage-analysis",action:"detectGaps"},"aqe quality gate":{domain:"quality-assessment",action:"evaluateGate"},"aqe quality assess":{domain:"quality-assessment",action:"analyzeQuality"},"aqe security scan":{domain:"security-compliance",action:"runSASTScan"},"aqe security audit":{domain:"security-compliance",action:"runAudit"},"aqe defect predict":{domain:"defect-intelligence",action:"predictDefects"},"aqe code index":{domain:"code-intelligence",action:"index"},"aqe code impact":{domain:"code-intelligence",action:"analyzeImpact"},"aqe contract validate":{domain:"contract-testing",action:"validateContract"},"aqe chaos test":{domain:"chaos-resilience",action:"runChaosTest"},"aqe requirements validate":{domain:"requirements-validation",action:"validateRequirements"},"aqe visual test":{domain:"visual-accessibility",action:"runVisualTest"},"aqe accessibility test":{domain:"visual-accessibility",action:"runAccessibilityTest"},"aqe learn optimize":{domain:"learning-optimization",action:"optimizeAllStrategies"}},D={daily:"0 0 * * *",weekly:"0 0 * * 0",hourly:"0 * * * *",minutely:"* * * * *"},S=1e4,x=20,M=1e4,W=["__proto__","constructor","prototype"];function v(t){return!W.includes(t)}function C(t){let n=t.split(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.15");process.exit(0)}
2
+ import{a as L}from"./chunk-FW6QBTPE.js";import*as w from"fs";var R={"aqe test generate":{domain:"test-generation",action:"generateTests"},"aqe test execute":{domain:"test-execution",action:"execute"},"aqe coverage analyze":{domain:"coverage-analysis",action:"analyze"},"aqe coverage gaps":{domain:"coverage-analysis",action:"detectGaps"},"aqe quality gate":{domain:"quality-assessment",action:"evaluateGate"},"aqe quality assess":{domain:"quality-assessment",action:"analyzeQuality"},"aqe security scan":{domain:"security-compliance",action:"runSASTScan"},"aqe security audit":{domain:"security-compliance",action:"runAudit"},"aqe defect predict":{domain:"defect-intelligence",action:"predictDefects"},"aqe code index":{domain:"code-intelligence",action:"index"},"aqe code impact":{domain:"code-intelligence",action:"analyzeImpact"},"aqe contract validate":{domain:"contract-testing",action:"validateContract"},"aqe chaos test":{domain:"chaos-resilience",action:"runChaosTest"},"aqe requirements validate":{domain:"requirements-validation",action:"validateRequirements"},"aqe visual test":{domain:"visual-accessibility",action:"runVisualTest"},"aqe accessibility test":{domain:"visual-accessibility",action:"runAccessibilityTest"},"aqe learn optimize":{domain:"learning-optimization",action:"optimizeAllStrategies"}},D={daily:"0 0 * * *",weekly:"0 0 * * 0",hourly:"0 * * * *",minutely:"* * * * *"},S=1e4,x=20,M=1e4,W=["__proto__","constructor","prototype"];function v(t){return!W.includes(t)}function C(t){let n=t.split(`
3
3
  `);if(n.length>S)throw new Error(`YAML content exceeds maximum allowed lines (${S}). File has ${n.length} lines.`);for(let i=0;i<n.length;i++)if(n[i].length>M)throw new Error(`YAML line ${i+1} exceeds maximum allowed length (${M} characters).`);let a={};for(let i=0;i<n.length;i++){let e=n[i];if(e.trim()===""||e.trim().startsWith("#")||e.search(/\S/)!==0)continue;let o=e.match(/^([\w_-]+):\s*(.+)$/);if(o){let[,c,u]=o;v(c)&&(a[c]=f(u))}}let r=["tags","stages","triggers"];for(let i of r){let e=new RegExp(`^${i}:\\s*$`),s=-1;for(let l=0;l<n.length;l++){let d=n[l];if(!(d.trim()===""||d.trim().startsWith("#"))&&e.test(d.trim())){s=l;break}}if(s===-1)continue;let o=[];a[i]=o;let c=n[s].search(/\S/),u=s+1;for(;u<n.length;){let l=n[u];if(l.trim()===""||l.trim().startsWith("#")){u++;continue}let d=l.search(/\S/),p=l.trim();if(d<=c&&!p.startsWith("-"))break;if(p.startsWith("- ")){let m=p.slice(2).trim();if(!m.includes(":")){o.push(f(m)),u++;continue}let g={},k=m.match(/^([\w_-]+):\s*(.*)$/);if(k){let[,h,y]=k;g[h]=f(y)}let T=d;for(u++;u<n.length;){let h=n[u];if(h.trim()===""||h.trim().startsWith("#")){u++;continue}let y=h.search(/\S/),q=h.trim();if(y<=T)break;let _=q.match(/^([\w_-]+):\s*(.*)$/);if(_){let[,A,$]=_;if($===""){let b=E(n,u+1,y,1);g[A]=b.value,u=b.nextLine;continue}else g[A]=f($)}u++}o.push(g)}else u++}}return a}function E(t,n,a,r=0){if(r>x)throw new Error(`YAML nesting exceeds maximum allowed depth (${x}).`);let i={},e=null,s=null,o=n;for(;o<t.length;){let u=t[o];if(u.trim()===""||u.trim().startsWith("#")){o++;continue}let l=u.search(/\S/),d=u.trim();if(l<=a)break;if(d.startsWith("- ")){let m=d.slice(2).trim();s&&!Array.isArray(i[s])&&(i[s]=[]),s?i[s].push(f(m)):(e||(e=[]),e.push(f(m))),o++;continue}let p=d.match(/^([\w_-]+):\s*(.*)$/);if(p){let[,m,g]=p;if(!v(m)){o++;continue}g===""?(s=m,i[m]=[]):(i[m]=f(g),s=null)}o++}if(e&&Object.keys(i).length===0)return{value:e,nextLine:o};let c=Object.keys(i);return c.length===1&&Array.isArray(i[c[0]])?{value:i[c[0]],nextLine:o}:{value:i,nextLine:o}}function f(t){if(t==="")return"";if(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))return t.slice(1,-1);if(t==="true")return!0;if(t==="false")return!1;if(t==="null"||t==="~")return null;let n=Number(t);return!isNaN(n)&&t!==""?n:t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1).split(",").map(r=>f(r.trim())):t}function K(t){let n=[];if(!w.existsSync(t))return{success:!1,errors:[`File not found: ${t}`]};let a;try{a=w.readFileSync(t,"utf-8")}catch(r){return{success:!1,errors:[`Failed to read file: ${r}`]}}return Y(a,t)}function Y(t,n){let a=[],r;try{r=C(t)}catch(s){return{success:!1,errors:[`Invalid YAML syntax: ${s}`]}}if((!r.name||typeof r.name!="string")&&a.push('Pipeline must have a "name" field'),(!r.stages||!Array.isArray(r.stages))&&a.push('Pipeline must have a "stages" array'),a.length>0)return{success:!1,errors:a};let i={name:r.name,description:r.description,version:r.version||"1.0.0",schedule:r.schedule,stages:r.stages.map((s,o)=>{let c=s;return{name:c.name||`stage-${o}`,command:c.command,params:c.params,depends_on:c.depends_on,condition:c.condition,timeout:c.timeout,retry:c.retry,continue_on_failure:c.continue_on_failure}}),triggers:r.triggers,tags:r.tags,timeout:r.timeout};for(let s=0;s<i.stages.length;s++){let o=i.stages[s];o.command||a.push(`Stage ${s+1} (${o.name}) must have a "command" field`)}if(a.length>0)return{success:!1,pipeline:i,errors:a};let e=O(i,n);return{success:!0,pipeline:i,workflow:e,errors:[]}}function O(t,n){let a=`pipeline-${t.name.replace(/\s+/g,"-").toLowerCase()}`,r=t.stages.map((e,s)=>{let o=P(e.command),c={};if(e.params)for(let[l,d]of Object.entries(e.params))v(l)&&(c[l]=`input.${l}`);let u={id:`stage-${e.name.replace(/\s+/g,"-").toLowerCase()}`,name:e.name,domain:o.domain,action:o.action,inputMapping:Object.keys(c).length>0?c:void 0,dependsOn:e.depends_on?.map(l=>`stage-${l.replace(/\s+/g,"-").toLowerCase()}`),timeout:e.timeout?e.timeout*1e3:void 0,continueOnFailure:e.continue_on_failure};return e.condition&&(u.condition={path:e.condition.path,operator:e.condition.operator,value:e.condition.value}),e.retry&&(u.retry={maxAttempts:e.retry.max_attempts||3,backoffMs:(e.retry.backoff_seconds||1)*1e3}),u}),i=t.triggers?.map(e=>{let s={eventType:I(e),sourceDomain:e.source_domain};return e.condition&&(s.condition={path:e.condition.path,operator:e.condition.operator,value:e.condition.value}),s});return{id:a,name:t.name,description:t.description||`Pipeline from ${n||"inline YAML"}`,version:t.version||"1.0.0",steps:r,triggers:i,tags:t.tags,timeout:t.timeout?t.timeout*1e3:void 0}}function P(t){let n=t.trim().replace(/\s+/g," ").toLowerCase();for(let[a,r]of Object.entries(R))if(n.startsWith(a.toLowerCase()))return r;return n.includes("test")&&n.includes("generate")?{domain:"test-generation",action:"generateTests"}:n.includes("test")&&(n.includes("execute")||n.includes("run"))?{domain:"test-execution",action:"execute"}:n.includes("coverage")?{domain:"coverage-analysis",action:"analyze"}:n.includes("quality")||n.includes("gate")?{domain:"quality-assessment",action:"evaluateGate"}:n.includes("security")||n.includes("scan")?{domain:"security-compliance",action:"runSASTScan"}:n.includes("defect")||n.includes("predict")?{domain:"defect-intelligence",action:"predictDefects"}:{domain:"learning-optimization",action:"runLearningCycle"}}function I(t){let n=t.event.toLowerCase();return n==="push"?"code-intelligence.CodePushed":n==="pull_request"||n==="pr"?"code-intelligence.PullRequestOpened":n==="schedule"?"workflow.ScheduleTrigger":n==="quality_gate"?"quality-assessment.QualityGateEvaluated":n==="test_complete"?"test-execution.TestRunCompleted":n}function F(t){let n=[],a=[];if(t.name||n.push({path:"name",message:"Pipeline name is required",severity:"error"}),!t.stages||t.stages.length===0)n.push({path:"stages",message:"Pipeline must have at least one stage",severity:"error"});else{let r=new Set;for(let e=0;e<t.stages.length;e++){let s=t.stages[e],o=`stages[${e}]`;if(r.has(s.name)&&n.push({path:`${o}.name`,message:`Duplicate stage name: ${s.name}`,severity:"error"}),r.add(s.name),s.command?P(s.command).domain==="learning-optimization"&&!s.command.toLowerCase().includes("learn")&&a.push({path:`${o}.command`,message:`Command "${s.command}" not recognized, will default to learning-optimization domain`,severity:"warning"}):n.push({path:`${o}.command`,message:"Stage must have a command",severity:"error"}),s.depends_on)for(let c of s.depends_on)t.stages.some(u=>u.name===c)||n.push({path:`${o}.depends_on`,message:`Unknown dependency: ${c}`,severity:"error"});s.timeout!==void 0&&s.timeout<=0&&n.push({path:`${o}.timeout`,message:"Timeout must be a positive number",severity:"error"}),s.retry&&s.retry.max_attempts!==void 0&&s.retry.max_attempts<1&&n.push({path:`${o}.retry.max_attempts`,message:"max_attempts must be at least 1",severity:"error"})}let i=N(t.stages);i&&n.push({path:"stages",message:`Circular dependency detected: ${i}`,severity:"error"})}if(t.schedule&&(z(t.schedule)||n.push({path:"schedule",message:`Invalid cron expression: ${t.schedule}`,severity:"error"})),t.triggers)for(let r=0;r<t.triggers.length;r++){let i=t.triggers[r],e=`triggers[${r}]`;i.event||n.push({path:`${e}.event`,message:"Trigger must have an event type",severity:"error"}),i.source_domain&&!L.includes(i.source_domain)&&a.push({path:`${e}.source_domain`,message:`Unknown domain: ${i.source_domain}`,severity:"warning"})}return{valid:n.length===0,errors:n,warnings:a}}function N(t){let n=new Set,a=new Set,r=(i,e)=>{if(a.has(i))return[...e,i].join(" -> ");if(n.has(i))return null;n.add(i),a.add(i);let s=t.find(o=>o.name===i);if(s?.depends_on)for(let o of s.depends_on){let c=r(o,[...e,i]);if(c)return c}return a.delete(i),null};for(let i of t){let e=r(i.name,[]);if(e)return e}return null}function z(t){if(Object.keys(D).includes(t))return!0;let n=t.trim().split(/\s+/);if(n.length!==5)return!1;let a=[/^(\*|[0-5]?\d)(-[0-5]?\d)?(\/\d+)?$/,/^(\*|1?\d|2[0-3])(-\d+)?(\/\d+)?$/,/^(\*|[1-9]|[12]\d|3[01])(-\d+)?(\/\d+)?$/,/^(\*|[1-9]|1[0-2])(-\d+)?(\/\d+)?$/,/^(\*|[0-7])(-[0-7])?(\/\d+)?$/];for(let r=0;r<5;r++){let i=n[r].split(",");for(let e of i)if(!a[r].test(e)&&e!=="*")return!1}return!0}function G(t){let n={"@daily":"Daily at midnight","@weekly":"Weekly on Sunday at midnight","@hourly":"Every hour","@minutely":"Every minute"};if(n[t])return n[t];if(Object.keys(D).includes(t))return{daily:"Daily at midnight",weekly:"Weekly on Sunday at midnight",hourly:"Every hour",minutely:"Every minute"}[t]||t;let a=t.trim().split(/\s+/);if(a.length!==5)return t;let[r,i,e,s,o]=a;return r==="0"&&i==="0"&&e==="*"&&s==="*"&&o==="*"?"Daily at midnight":r==="0"&&e==="*"&&s==="*"&&o==="*"?`Daily at ${i}:00`:r!=="*"&&i!=="*"&&e==="*"&&s==="*"?`Daily at ${i}:${r.padStart(2,"0")}`:i==="*"&&r==="0"?"Every hour":r!=="*"&&i==="*"?`Every hour at minute ${r}`:t}function H(t,n=new Date){let a=t.trim().split(/\s+/);if(a.length!==5)return new Date(n.getTime()+1440*60*1e3);let[r,i]=a,e=new Date(n);return i!=="*"&&r!=="*"?(e.setHours(parseInt(i,10),parseInt(r,10),0,0),e<=n&&e.setDate(e.getDate()+1)):i!=="*"?(e.setHours(parseInt(i,10),0,0,0),e<=n&&e.setDate(e.getDate()+1)):r!=="*"?(e.setMinutes(parseInt(r,10),0,0),e<=n&&e.setHours(e.getHours()+1)):(e.setSeconds(0,0),e.setMinutes(e.getMinutes()+1)),e}export{C as a,K as b,F as c,G as d,H as e};
@@ -1 +1 @@
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)}
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.15");process.exit(0)}
@@ -1,3 +1,3 @@
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)}
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.15");process.exit(0)}
2
2
  var p={"||":1,"&&":2,"===":3,"!==":3,"==":3,"!=":3,"<":4,">":4,"<=":4,">=":4,"+":5,"-":5,"*":6,"/":6,"%":6},l=new Set(Object.keys(p)),w=new Set(["!","-","+"]);function h(r){let n=[],e=0;for(;e<r.length;){let t=r[e];if(/\s/.test(t)){e++;continue}if(/\d/.test(t)||t==="."&&/\d/.test(r[e+1])){let s="";for(;e<r.length&&/[\d.]/.test(r[e]);)s+=r[e++];n.push({type:"NUMBER",value:parseFloat(s),raw:s});continue}if(t==='"'||t==="'"){let s=t,u="";for(e++;e<r.length&&r[e]!==s;){if(r[e]==="\\"&&e+1<r.length){e++;let c=r[e];switch(c){case"n":u+=`
3
3
  `;break;case"t":u+=" ";break;case"r":u+="\r";break;default:u+=c}}else u+=r[e];e++}e++,n.push({type:"STRING",value:u,raw:`${s}${u}${s}`});continue}if(/[a-zA-Z_$]/.test(t)){let s="";for(;e<r.length&&/[a-zA-Z0-9_$]/.test(r[e]);)s+=r[e++];s==="true"?n.push({type:"BOOLEAN",value:!0,raw:s}):s==="false"?n.push({type:"BOOLEAN",value:!1,raw:s}):s==="null"?n.push({type:"NULL",value:null,raw:s}):s==="undefined"?n.push({type:"UNDEFINED",value:void 0,raw:s}):n.push({type:"IDENTIFIER",value:s,raw:s});continue}let a=r.slice(e,e+2),o=r.slice(e,e+3);if(o==="==="||o==="!=="){n.push({type:"OPERATOR",value:o,raw:o}),e+=3;continue}if(a==="=="||a==="!="||a==="<="||a===">="||a==="&&"||a==="||"){n.push({type:"OPERATOR",value:a,raw:a}),e+=2;continue}if(t==="("){n.push({type:"LPAREN",value:"(",raw:"("}),e++;continue}if(t===")"){n.push({type:"RPAREN",value:")",raw:")"}),e++;continue}if(t==="."){n.push({type:"DOT",value:".",raw:"."}),e++;continue}if("+-*/%<>!".includes(t)){n.push({type:"OPERATOR",value:t,raw:t}),e++;continue}throw new Error(`Unexpected character at position ${e}: ${t}`)}return n.push({type:"EOF",value:"",raw:""}),n}var i=class{tokens;pos=0;context;constructor(n,e){this.tokens=n,this.context=e}current(){return this.tokens[this.pos]}advance(){return this.tokens[this.pos++]}expect(n){let e=this.current();if(e.type!==n)throw new Error(`Expected ${n}, got ${e.type}`);return this.advance()}parse(){let n=this.parseExpression(0);if(this.current().type!=="EOF")throw new Error(`Unexpected token: ${this.current().raw}`);return n}parseExpression(n){let e=this.parseUnary();for(;;){let t=this.current();if(t.type!=="OPERATOR"||!l.has(t.value))break;let a=p[t.value];if(a<n)break;let o=this.advance().value,s=this.parseExpression(a+1);e=this.applyBinaryOperator(o,e,s)}return e}parseUnary(){let n=this.current();if(n.type==="OPERATOR"&&w.has(n.value)){let e=this.advance().value,t=this.parseUnary();return this.applyUnaryOperator(e,t)}return this.parsePrimary()}parsePrimary(){let n=this.current();switch(n.type){case"NUMBER":case"STRING":case"BOOLEAN":case"NULL":case"UNDEFINED":return this.advance(),n.value;case"IDENTIFIER":return this.parseIdentifier();case"LPAREN":this.advance();let e=this.parseExpression(0);return this.expect("RPAREN"),e;default:throw new Error(`Unexpected token: ${n.raw}`)}}parseIdentifier(){let n=this.context,e=this.advance().value;for(typeof n=="object"&&n!==null&&(e in n)?n=n[e]:n=void 0;this.current().type==="DOT";){this.advance();let t=this.expect("IDENTIFIER").value;n!=null&&typeof n=="object"?n=n[t]:n=void 0}return n}applyBinaryOperator(n,e,t){switch(n){case"===":return e===t;case"!==":return e!==t;case"==":return e==t;case"!=":return e!=t;case"<":return e<t;case">":return e>t;case"<=":return e<=t;case">=":return e>=t;case"&&":return e&&t;case"||":return e||t;case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return e/t;case"%":return e%t;default:throw new Error(`Unknown operator: ${n}`)}}applyUnaryOperator(n,e){switch(n){case"!":return!e;case"-":return-e;case"+":return+e;default:throw new Error(`Unknown unary operator: ${n}`)}}};function E(r,n={}){if(!r||typeof r!="string")throw new Error("Expression must be a non-empty string");let e=[/\beval\b/i,/\bFunction\b/,/\bconstructor\b/,/\b__proto__\b/,/\bprototype\b/,/\bimport\b/,/\brequire\b/,/\bprocess\b/,/\bglobal\b/,/\bwindow\b/,/\bdocument\b/,/\[\s*['"`]/,/\[.*\]/];for(let o of e)if(o.test(r))throw new Error(`Expression contains potentially dangerous pattern: ${r}`);let t=h(r.trim());return new i(t,n).parse()}function b(r,n={},e=!1){try{return!!E(r,n)}catch(t){return console.warn(`[SafeEvaluator] Failed to evaluate expression: ${r}`,t),e}}export{b as a};