agentic-qe 3.12.1 → 3.12.2

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 (357) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +48 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/cli/bundle.js +5 -5
  5. package/dist/cli/chunks/adapter-RL6GNUOS.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-P4VYM5KK.js → agent-booster-wasm-3KYNICBC.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-PBQ7L2TO.js → agent-handler-NGPTMI6E.js} +2 -2
  8. package/dist/cli/chunks/{agent-memory-branch-UPWO3X6V.js → agent-memory-branch-GNTQKQMG.js} +2 -2
  9. package/dist/cli/chunks/aqe-learning-engine-UEEW6AQG.js +2 -0
  10. package/dist/cli/chunks/{arena-QYTP3FG6.js → arena-HQEP2NWI.js} +4 -4
  11. package/dist/cli/chunks/{arena-LEUTILZ7.js → arena-PA7VIYD4.js} +2 -2
  12. package/dist/cli/chunks/{audit-TB6M2YLK.js → audit-XSDM57GC.js} +3 -3
  13. package/dist/cli/chunks/base-JQA5YULE.js +2 -0
  14. package/dist/cli/chunks/{hnswlib-node-62RTSHAY.js → better-sqlite3-RQCOOAZC.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-JF3OK35F.js → brain-handler-T7RDPKNM.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-WEIP3DXB.js → branch-enumerator-ZW7RNMUF.js} +2 -2
  17. package/dist/cli/chunks/{browser-HY6VLXHZ.js → browser-4LU22CPP.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-XTKUHTIT.js +2 -0
  19. package/dist/cli/chunks/{chunk-OXVAGR64.js → chunk-2L7K2J2T.js} +2 -2
  20. package/dist/cli/chunks/{chunk-3I3Z4C5X.js → chunk-2R7J4ZGT.js} +1 -1
  21. package/dist/cli/chunks/{chunk-BBNQDHGF.js → chunk-2R7XZ2WP.js} +2 -2
  22. package/dist/cli/chunks/{chunk-MIAY35K6.js → chunk-327YEKBU.js} +2 -2
  23. package/dist/cli/chunks/{chunk-LAJHHR3Q.js → chunk-3AJUJAUJ.js} +1 -1
  24. package/dist/cli/chunks/{chunk-7KK6XSYK.js → chunk-3LELACAQ.js} +2 -2
  25. package/dist/cli/chunks/{chunk-NK2Z6FGF.js → chunk-4FHJYJCH.js} +2 -2
  26. package/dist/cli/chunks/{chunk-6BCVKCG5.js → chunk-4KEOBDEI.js} +2 -2
  27. package/dist/cli/chunks/{chunk-REJGZP27.js → chunk-56MXYSYY.js} +2 -2
  28. package/dist/cli/chunks/{chunk-YGB3MT3R.js → chunk-5CGTBAVF.js} +1 -1
  29. package/dist/cli/chunks/{chunk-W52R3G22.js → chunk-5SM57X4D.js} +2 -2
  30. package/dist/cli/chunks/{chunk-OJORNYN3.js → chunk-5YLY2WT2.js} +3 -3
  31. package/dist/cli/chunks/{chunk-J4IAMQZI.js → chunk-6FBXYS6X.js} +2 -2
  32. package/dist/cli/chunks/{chunk-QXZOUETY.js → chunk-6N62KS3C.js} +2 -2
  33. package/dist/cli/chunks/{chunk-M5P5WNXA.js → chunk-6SWR2BN7.js} +1 -1
  34. package/dist/cli/chunks/{chunk-FFSS3Y6W.js → chunk-6X65BGGK.js} +2 -2
  35. package/dist/cli/chunks/{chunk-UZXDYT6O.js → chunk-7DV42KFP.js} +2 -2
  36. package/dist/cli/chunks/{chunk-X2K3BTI4.js → chunk-7KMYBRKJ.js} +2 -2
  37. package/dist/cli/chunks/{chunk-KQV5644J.js → chunk-7OD6HFCP.js} +3 -3
  38. package/dist/cli/chunks/chunk-ABHKXMOJ.js +2 -0
  39. package/dist/cli/chunks/{chunk-IE6FDICX.js → chunk-ACDZ2CRV.js} +2 -2
  40. package/dist/cli/chunks/{chunk-CYYT6YEV.js → chunk-ADZTWGEB.js} +2 -2
  41. package/dist/cli/chunks/{chunk-QORWBION.js → chunk-AJ6DZXKK.js} +2 -2
  42. package/dist/cli/chunks/{chunk-PQ4NSXZM.js → chunk-AL5QT6OX.js} +2 -2
  43. package/dist/cli/chunks/{chunk-VTFYY4SH.js → chunk-AMPYON7M.js} +2 -2
  44. package/dist/cli/chunks/{chunk-XDRAU3W6.js → chunk-APVXTHTA.js} +2 -2
  45. package/dist/cli/chunks/{chunk-774X6OJY.js → chunk-B7DI76SY.js} +2 -2
  46. package/dist/cli/chunks/{chunk-C2K4LQI5.js → chunk-BDVOXGY5.js} +1 -1
  47. package/dist/cli/chunks/{chunk-3W2FZXFD.js → chunk-BDX54WJV.js} +1 -1
  48. package/dist/cli/chunks/{chunk-XTAXSKPC.js → chunk-BMRR3MBR.js} +2 -2
  49. package/dist/cli/chunks/{chunk-6432JORM.js → chunk-BOR5MME3.js} +1 -1
  50. package/dist/cli/chunks/{chunk-BXIJY6SB.js → chunk-BPSEFLJ6.js} +1 -1
  51. package/dist/cli/chunks/{chunk-PRA73XZY.js → chunk-BUKGW63B.js} +2 -2
  52. package/dist/cli/chunks/{chunk-UR655D4K.js → chunk-C7VNQ4PY.js} +2 -2
  53. package/dist/cli/chunks/{chunk-ZNITDSWL.js → chunk-CDMAVNV5.js} +1 -1
  54. package/dist/cli/chunks/{chunk-O65OPAZH.js → chunk-CKFZOPZN.js} +2 -2
  55. package/dist/cli/chunks/{chunk-HDI3FD4G.js → chunk-CMKCPRWX.js} +1 -1
  56. package/dist/cli/chunks/{chunk-JWZNWVLG.js → chunk-CQKEVUMO.js} +2 -2
  57. package/dist/cli/chunks/{chunk-USTUWUCE.js → chunk-CTFW7CMI.js} +2 -2
  58. package/dist/cli/chunks/{chunk-2PQ7YADF.js → chunk-DGOZ3CGB.js} +2 -2
  59. package/dist/cli/chunks/{chunk-6ONUCDVL.js → chunk-DTXHRALB.js} +2 -2
  60. package/dist/cli/chunks/{chunk-DSNFOX22.js → chunk-E5XWCGSX.js} +2 -2
  61. package/dist/cli/chunks/{chunk-4LKQZW2H.js → chunk-EGU54SNK.js} +1 -1
  62. package/dist/cli/chunks/{chunk-DQ3J7ZT6.js → chunk-EKTWIEEO.js} +2 -2
  63. package/dist/cli/chunks/{chunk-4U5MJX2H.js → chunk-ERQL3D2O.js} +2 -2
  64. package/dist/cli/chunks/{chunk-UGPBL7LX.js → chunk-EZ3JVN6S.js} +2 -2
  65. package/dist/cli/chunks/{chunk-BPM7NEHS.js → chunk-F3CKOVZM.js} +4 -4
  66. package/dist/cli/chunks/{chunk-42GFB7VX.js → chunk-FKUH33L3.js} +2 -2
  67. package/dist/cli/chunks/{chunk-LF5XOYR7.js → chunk-FTG4ZVTX.js} +11 -11
  68. package/dist/cli/chunks/{chunk-JRHRC2MP.js → chunk-FUBN5GPY.js} +1 -1
  69. package/dist/cli/chunks/{chunk-BCBITOMT.js → chunk-GCQATSMK.js} +2 -2
  70. package/dist/cli/chunks/{chunk-55MQ2SFP.js → chunk-GECWGFRR.js} +2 -2
  71. package/dist/cli/chunks/{chunk-SFQFBLWQ.js → chunk-GP7IXYOY.js} +1 -1
  72. package/dist/cli/chunks/{chunk-S42RFOZJ.js → chunk-GUGUYFU5.js} +2 -2
  73. package/dist/cli/chunks/{chunk-NVXSM7UO.js → chunk-HH5Y4NCR.js} +2 -2
  74. package/dist/cli/chunks/{chunk-IHWWZOHP.js → chunk-HNU32LN3.js} +1 -1
  75. package/dist/cli/chunks/{chunk-U5ITD7ZD.js → chunk-HU6ETNA7.js} +1 -1
  76. package/dist/cli/chunks/{chunk-BKKJEKNT.js → chunk-IKIKIHFQ.js} +2 -2
  77. package/dist/cli/chunks/{chunk-OEXSBR72.js → chunk-ILNQPPKB.js} +1 -1
  78. package/dist/cli/chunks/{chunk-6RX5QZMU.js → chunk-IQ56KMMH.js} +1 -1
  79. package/dist/cli/chunks/{chunk-74VIADSJ.js → chunk-J6EFAKDQ.js} +2 -2
  80. package/dist/cli/chunks/{chunk-7N2SCRWJ.js → chunk-K43YXI7C.js} +2 -2
  81. package/dist/cli/chunks/{chunk-XJTGLG7G.js → chunk-KBAXD6PH.js} +1 -1
  82. package/dist/cli/chunks/{chunk-HZGFER4N.js → chunk-KBXW7S3W.js} +3 -3
  83. package/dist/cli/chunks/{chunk-BNMV5DCM.js → chunk-KDGLNJPB.js} +1 -1
  84. package/dist/cli/chunks/{chunk-UBWSYDO5.js → chunk-KJJP446A.js} +1 -1
  85. package/dist/cli/chunks/{chunk-JIM4VSLF.js → chunk-KNOO6TFO.js} +3 -3
  86. package/dist/cli/chunks/{chunk-TGIKKD43.js → chunk-KPV4N4KT.js} +2 -2
  87. package/dist/cli/chunks/{chunk-C7HGYLNF.js → chunk-KV5OZ6T3.js} +2 -2
  88. package/dist/cli/chunks/{chunk-I4BZLVFE.js → chunk-LGEPR7MH.js} +3 -3
  89. package/dist/cli/chunks/{chunk-BALFQQB7.js → chunk-LIAW5FD7.js} +2 -2
  90. package/dist/cli/chunks/{chunk-FBYFDD7L.js → chunk-LOZAUP6L.js} +2 -2
  91. package/dist/cli/chunks/{chunk-GASACVTU.js → chunk-LWVUNBZO.js} +2 -2
  92. package/dist/cli/chunks/{chunk-WBDV4V3H.js → chunk-M4XVEUUM.js} +2 -2
  93. package/dist/cli/chunks/{chunk-J6ZCULWG.js → chunk-MALFTRCT.js} +2 -2
  94. package/dist/cli/chunks/{chunk-45QNHMTP.js → chunk-MF4FULAI.js} +1 -1
  95. package/dist/cli/chunks/{chunk-4KI72C2E.js → chunk-MNHGBG4D.js} +1 -1
  96. package/dist/cli/chunks/{chunk-ZCDGLNJ7.js → chunk-MNNNA57O.js} +2 -2
  97. package/dist/cli/chunks/{chunk-SHKOPOPD.js → chunk-N57BKUVE.js} +1 -1
  98. package/dist/cli/chunks/{chunk-QZBPXJ5C.js → chunk-NDAJWCXN.js} +2 -2
  99. package/dist/cli/chunks/{chunk-PDS5P5QD.js → chunk-OELLHV7S.js} +2 -2
  100. package/dist/cli/chunks/{chunk-GXMNCW2M.js → chunk-OEZNUXY7.js} +1 -1
  101. package/dist/cli/chunks/{chunk-ONSNNY6J.js → chunk-OIUIVV2N.js} +1 -1
  102. package/dist/cli/chunks/{chunk-AGWKCY42.js → chunk-OMIGKGJJ.js} +2 -2
  103. package/dist/cli/chunks/{chunk-GGF5FZWS.js → chunk-OSAPKOGN.js} +1 -1
  104. package/dist/cli/chunks/{chunk-VFRWLSQO.js → chunk-P2FYRAC5.js} +1 -1
  105. package/dist/cli/chunks/{chunk-BLU7OLQZ.js → chunk-P65S7AZA.js} +2 -2
  106. package/dist/cli/chunks/{chunk-EOBZJDJR.js → chunk-PHIEJAQK.js} +3 -3
  107. package/dist/cli/chunks/chunk-PSA2SOON.js +18 -0
  108. package/dist/cli/chunks/{chunk-VHJCQBD2.js → chunk-PXKVW6PT.js} +2 -2
  109. package/dist/cli/chunks/{chunk-PZ3Q34OT.js → chunk-QYST2TZW.js} +2 -2
  110. package/dist/cli/chunks/{chunk-XYV6YUWS.js → chunk-R554WVIG.js} +2 -2
  111. package/dist/cli/chunks/{chunk-NOCPO55P.js → chunk-R5HC6JVJ.js} +2 -2
  112. package/dist/cli/chunks/{chunk-NTMN2ZJY.js → chunk-R6LDR3IO.js} +2 -2
  113. package/dist/cli/chunks/{chunk-5H5A74U2.js → chunk-RFQIC6ZF.js} +1 -1
  114. package/dist/cli/chunks/{chunk-GW3M7GQH.js → chunk-RXEQB4OT.js} +2 -2
  115. package/dist/cli/chunks/{chunk-LZ6TJ7XL.js → chunk-RXH2TC2K.js} +2 -2
  116. package/dist/cli/chunks/{chunk-MCUILJ33.js → chunk-SVUWAV6Y.js} +1 -1
  117. package/dist/cli/chunks/{chunk-7KHIOWBN.js → chunk-SYLTJKN2.js} +1 -1
  118. package/dist/cli/chunks/{chunk-QOAI6ETC.js → chunk-T6TQPF5P.js} +3 -3
  119. package/dist/cli/chunks/{chunk-CJTXZI37.js → chunk-T75VH6NT.js} +2 -2
  120. package/dist/cli/chunks/{chunk-BWNMAXV7.js → chunk-TERRRQVY.js} +1 -1
  121. package/dist/cli/chunks/{chunk-HHMTQQUE.js → chunk-TFVWUR2U.js} +2 -2
  122. package/dist/cli/chunks/{chunk-D72N5V2S.js → chunk-TLYZPOA7.js} +2 -2
  123. package/dist/cli/chunks/{chunk-WPEGG6DX.js → chunk-TMQ3S7HR.js} +1 -1
  124. package/dist/cli/chunks/{chunk-XS6BIOPQ.js → chunk-TQNNKW7K.js} +2 -2
  125. package/dist/cli/chunks/{chunk-NHRBKOYD.js → chunk-TRHUH24V.js} +2 -2
  126. package/dist/cli/chunks/{chunk-BAHXVVX3.js → chunk-UEIIIDBJ.js} +2 -2
  127. package/dist/cli/chunks/{chunk-R4A6PY5D.js → chunk-UF3YOGHV.js} +2 -2
  128. package/dist/cli/chunks/{chunk-X2CEX4KC.js → chunk-UFPCNUJA.js} +10 -10
  129. package/dist/cli/chunks/{chunk-JRNDFC23.js → chunk-V2QYW5KW.js} +2 -2
  130. package/dist/cli/chunks/{chunk-GLO53MUQ.js → chunk-VHYACXLN.js} +2 -2
  131. package/dist/cli/chunks/chunk-VM6VBRRU.js +43 -0
  132. package/dist/cli/chunks/{chunk-WPG5LXR7.js → chunk-VOHYQ6MX.js} +2 -2
  133. package/dist/cli/chunks/{chunk-5HMGDB7B.js → chunk-VQU2JXTK.js} +3 -3
  134. package/dist/cli/chunks/{chunk-U55X2ZUM.js → chunk-W7LBT3BF.js} +2 -2
  135. package/dist/cli/chunks/{chunk-PZZDAECU.js → chunk-WC5PM33J.js} +3 -3
  136. package/dist/cli/chunks/{chunk-JDZIBSMY.js → chunk-WE5QHYL7.js} +1 -1
  137. package/dist/cli/chunks/chunk-WKWIUS5G.js +3 -0
  138. package/dist/cli/chunks/chunk-WL5VMIO4.js +2 -0
  139. package/dist/cli/chunks/{chunk-RJ7TU2MP.js → chunk-WMNGPIP3.js} +1 -1
  140. package/dist/cli/chunks/{chunk-TMPRR3FZ.js → chunk-WRMUQVKY.js} +2 -2
  141. package/dist/cli/chunks/{chunk-HGKSU4QV.js → chunk-WY5CX3VH.js} +2 -2
  142. package/dist/cli/chunks/{chunk-42PYEEYQ.js → chunk-WYFEVPLO.js} +1 -1
  143. package/dist/cli/chunks/{chunk-UBPJQKYS.js → chunk-X47GHZY3.js} +2 -2
  144. package/dist/cli/chunks/{chunk-UKF4V7LE.js → chunk-XNNYHQLW.js} +5 -5
  145. package/dist/cli/chunks/{chunk-IC6SOVGO.js → chunk-YDZIPP3Y.js} +2 -2
  146. package/dist/cli/chunks/{chunk-RIASOMB2.js → chunk-YRO7HNS4.js} +2 -2
  147. package/dist/cli/chunks/{chunk-NEXJUTHF.js → chunk-YSCEUK55.js} +2 -2
  148. package/dist/cli/chunks/chunk-YY4KXDI6.js +2 -0
  149. package/dist/cli/chunks/{chunk-CP4GSICY.js → chunk-YYV3FYVB.js} +1 -1
  150. package/dist/cli/chunks/{chunk-CXUHD2O5.js → chunk-YZ44FUVJ.js} +2 -2
  151. package/dist/cli/chunks/{chunk-UEC53US3.js → chunk-Z3FA5KR6.js} +4 -4
  152. package/dist/cli/chunks/{chunk-QJXUK54J.js → chunk-Z63IOTDW.js} +2 -2
  153. package/dist/cli/chunks/{chunk-75AVUS5U.js → chunk-ZBYMF2QJ.js} +1 -1
  154. package/dist/cli/chunks/{chunk-N3PSRG6F.js → chunk-ZF65VOQH.js} +2 -2
  155. package/dist/cli/chunks/{chunk-LRWBOJ5Y.js → chunk-ZHWXI4SK.js} +2 -2
  156. package/dist/cli/chunks/{chunk-YNXQMJGJ.js → chunk-ZL7ZOIHO.js} +1 -1
  157. package/dist/cli/chunks/{ci-IU5HVUL5.js → ci-NT4DUGQ4.js} +2 -2
  158. package/dist/cli/chunks/{ci-output-CLI4A43F.js → ci-output-PXBD2QPH.js} +2 -2
  159. package/dist/cli/chunks/{circuit-breaker-ZR5OFMW7.js → circuit-breaker-ZPCCEEDX.js} +2 -2
  160. package/dist/cli/chunks/{claude-flow-setup-UBMA6ZHJ.js → claude-flow-setup-CZCDFZOE.js} +2 -2
  161. package/dist/cli/chunks/client-S7DIRNFJ.js +2 -0
  162. package/dist/cli/chunks/{cline-installer-EWYELOBI.js → cline-installer-6J2S7GLM.js} +2 -2
  163. package/dist/cli/chunks/{code-YSPF4MXN.js → code-UTERK5AP.js} +2 -2
  164. package/dist/cli/chunks/{code-index-extractor-WW5OKSTN.js → code-index-extractor-O3MJTOS2.js} +2 -2
  165. package/dist/cli/chunks/{codex-installer-GLADK5PY.js → codex-installer-AZJIVXJR.js} +2 -2
  166. package/dist/cli/chunks/{completions-2KTWZ3AK.js → completions-A6ANQSZN.js} +2 -2
  167. package/dist/cli/chunks/{complexity-analyzer-KMX4OWKB.js → complexity-analyzer-MRSN7VUP.js} +2 -2
  168. package/dist/cli/chunks/{continuedev-installer-4FHU4OEJ.js → continuedev-installer-6LMKQRUI.js} +2 -2
  169. package/dist/cli/chunks/{copilot-installer-AKR4WE7B.js → copilot-installer-KP3TWUNO.js} +2 -2
  170. package/dist/cli/chunks/core-handlers-NM2KCI6Z.js +2 -0
  171. package/dist/cli/chunks/{cost-tracker-BUJ6WEWY.js → cost-tracker-R3C5IQPZ.js} +2 -2
  172. package/dist/cli/chunks/{coverage-OB6HVQS4.js → coverage-MR4QA2NM.js} +3 -3
  173. package/dist/cli/chunks/cross-domain-router-3TSZMCBM.js +2 -0
  174. package/dist/cli/chunks/{cursor-installer-3AOE4O3Q.js → cursor-installer-LPZ7NGOS.js} +2 -2
  175. package/dist/cli/chunks/{daemon-JGSPLYGO.js → daemon-K3KW2UDV.js} +4 -4
  176. package/dist/cli/chunks/{daemon-4RAL5URG.js → daemon-X5KXHRY3.js} +3 -3
  177. package/dist/cli/chunks/{dag-attention-scheduler-DSBTHIMH.js → dag-attention-scheduler-J4FJSGNN.js} +2 -2
  178. package/dist/cli/chunks/{detect-6CVW2VUQ.js → detect-22TX2NCA.js} +2 -2
  179. package/dist/cli/chunks/{dist-node-EWPKBTYA.js → dist-node-QI4I4QPS.js} +2 -2
  180. package/dist/cli/chunks/{domain-handler-HLVIJU25.js → domain-handler-ZYZGPNOQ.js} +2 -2
  181. package/dist/cli/chunks/{domain-transfer-7Y3BR3YU.js → domain-transfer-2EEQTNIU.js} +2 -2
  182. package/dist/cli/chunks/dream-QIIJONYI.js +2 -0
  183. package/dist/cli/chunks/{embed-and-insert-pattern-ZMJ3263X.js → embed-and-insert-pattern-LYCTU5BS.js} +2 -2
  184. package/dist/cli/chunks/eval-SOA72GUX.js +17 -0
  185. package/dist/cli/chunks/{experience-capture-middleware-OGJ3JOSQ.js → experience-capture-middleware-AFFYOMYM.js} +3 -3
  186. package/dist/cli/chunks/{fast-paths-5XCY3Y6U.js → fast-paths-WNMHOSUH.js} +2 -2
  187. package/dist/cli/chunks/{feature-flags-R5V2FRJR.js → feature-flags-FT4YBZH4.js} +2 -2
  188. package/dist/cli/chunks/{feature-flags-VULQI6KY.js → feature-flags-HAP5IAAY.js} +2 -2
  189. package/dist/cli/chunks/{file-discovery-HW33C3HC.js → file-discovery-B4FFOH3Z.js} +2 -2
  190. package/dist/cli/chunks/{fleet-NH3XR5OY.js → fleet-2ICPYV3J.js} +3 -3
  191. package/dist/cli/chunks/{gnn-wrapper-L3XMLPTG.js → gnn-wrapper-XIBJAHMW.js} +2 -2
  192. package/dist/cli/chunks/{heartbeat-handler-TIQFBT4D.js → heartbeat-handler-NSLSKDOI.js} +4 -4
  193. package/dist/cli/chunks/heartbeat-scheduler-CDNGLJJO.js +2 -0
  194. package/dist/cli/chunks/hnsw-adapter-CR7Y4OAM.js +2 -0
  195. package/dist/cli/chunks/hnsw-index-TEDO4MQC.js +2 -0
  196. package/dist/cli/chunks/{hnsw-legacy-bridge-YL2SUIPA.js → hnsw-legacy-bridge-FTV4CCBB.js} +2 -2
  197. package/dist/cli/chunks/{better-sqlite3-IPKCAVLS.js → hnswlib-node-BCASOCNU.js} +2 -2
  198. package/dist/cli/chunks/{hooks-UR2ZF54G.js → hooks-SM4EU52N.js} +10 -10
  199. package/dist/cli/chunks/hybrid-router-O24ZDIP5.js +2 -0
  200. package/dist/cli/chunks/{hypergraph-engine-NX45AOPY.js → hypergraph-engine-RRMX4N3L.js} +2 -2
  201. package/dist/cli/chunks/{hypergraph-handler-LUM4YI4K.js → hypergraph-handler-MNFGDKAP.js} +3 -3
  202. package/dist/cli/chunks/impact-analyzer-PDM4SDB6.js +2 -0
  203. package/dist/cli/chunks/{init-handler-YTKKNTVV.js → init-handler-BNHIJ5TX.js} +6 -6
  204. package/dist/cli/chunks/init-wizard-F4KODPNW.js +2 -0
  205. package/dist/cli/chunks/kernel-77UM35L6.js +2 -0
  206. package/dist/cli/chunks/{kilocode-installer-ZW7DVH7T.js → kilocode-installer-GFKUKPLY.js} +2 -2
  207. package/dist/cli/chunks/{kiro-installer-IA7INW4N.js → kiro-installer-YBIYKODN.js} +2 -2
  208. package/dist/cli/chunks/knowledge-graph-R6ZWWV2K.js +2 -0
  209. package/dist/cli/chunks/{learning-4AZ5PGTT.js → learning-QEWUPCK6.js} +3 -3
  210. package/dist/cli/chunks/{llm-router-WQ4E3AOP.js → llm-router-D5FQIMVQ.js} +5 -5
  211. package/dist/cli/chunks/llm-router-service-7QYCZ66H.js +2 -0
  212. package/dist/cli/chunks/{load-4FAH7CZO.js → load-CLBUCKZQ.js} +2 -2
  213. package/dist/cli/chunks/load-test-AWVA3CAQ.js +2 -0
  214. package/dist/cli/chunks/{mcp-KLLHI6DG.js → mcp-VOMG5DPV.js} +2 -2
  215. package/dist/cli/chunks/{memory-Q5HLIUC6.js → memory-WZO63VSC.js} +5 -5
  216. package/dist/cli/chunks/memory-backend-YESSIHFW.js +2 -0
  217. package/dist/cli/chunks/memory-handlers-EOOWSUHI.js +2 -0
  218. package/dist/cli/chunks/{multi-model-executor-ABI73AFV.js → multi-model-executor-7UKW43VV.js} +2 -2
  219. package/dist/cli/chunks/{opencode-installer-KRPQ6JOJ.js → opencode-installer-MLFPRRL2.js} +2 -2
  220. package/dist/cli/chunks/{orchestrator-SUPEONRG.js → orchestrator-XNYDBGIN.js} +5 -5
  221. package/dist/cli/chunks/pattern-null-store-X3UXLJNL.js +2 -0
  222. package/dist/cli/chunks/{pattern-usage-recorder-R4GKK6RZ.js → pattern-usage-recorder-ZAP7ASQI.js} +2 -2
  223. package/dist/cli/chunks/{pipeline-LCUETNGD.js → pipeline-4EJYOPBC.js} +2 -2
  224. package/dist/cli/chunks/{platform-WJDIB4X3.js → platform-ALPOWCOH.js} +2 -2
  225. package/dist/cli/chunks/{plugin-2X5NY2RF.js → plugin-S2RX3KHR.js} +2 -2
  226. package/dist/cli/chunks/{prime-radiant-advanced-wasm-3T665QC6.js → prime-radiant-advanced-wasm-P2JB73XX.js} +2 -2
  227. package/dist/cli/chunks/protocol-executor-KXDCTMWI.js +2 -0
  228. package/dist/cli/chunks/{protocol-handler-JTXRF7GU.js → protocol-handler-ZBJXSESA.js} +2 -2
  229. package/dist/cli/chunks/{prove-BFPWWPOC.js → prove-MYJ5YV45.js} +2 -2
  230. package/dist/cli/chunks/provider-manager-XJZVHYI6.js +2 -0
  231. package/dist/cli/chunks/qe-reasoning-bank-DPHPNIC6.js +2 -0
  232. package/dist/cli/chunks/{quality-F7UZU4RN.js → quality-NIACQC4M.js} +2 -2
  233. package/dist/cli/chunks/{quality-gate-R5L4UZIX.js → quality-gate-OAZ23ON5.js} +3 -3
  234. package/dist/cli/chunks/queen-coordinator-EVGWME5C.js +2 -0
  235. package/dist/cli/chunks/{real-embeddings-LZD6HTQF.js → real-embeddings-6I4LP7PL.js} +2 -2
  236. package/dist/cli/chunks/{roocode-installer-6TTG7VSH.js → roocode-installer-LRQHP6MK.js} +2 -2
  237. package/dist/cli/chunks/router-R2N7TMAS.js +2 -0
  238. package/dist/cli/chunks/routing-feedback-G6W3H26L.js +2 -0
  239. package/dist/cli/chunks/{routing-handler-SW442GK7.js → routing-handler-A7BW7MV4.js} +2 -2
  240. package/dist/cli/chunks/{ruvector-commands-CLFGKXMW.js → ruvector-commands-ZDRRFSJS.js} +2 -2
  241. package/dist/cli/chunks/{rvf-dual-writer-EVPPXXXS.js → rvf-dual-writer-QWE3Z6BB.js} +2 -2
  242. package/dist/cli/chunks/{rvf-migration-adapter-NOHDIRIP.js → rvf-migration-adapter-6UDAP7QB.js} +2 -2
  243. package/dist/cli/chunks/{rvf-migration-coordinator-BYJ3M7WZ.js → rvf-migration-coordinator-FEW2N4R4.js} +2 -2
  244. package/dist/cli/chunks/rvf-native-adapter-D7R2GWXK.js +2 -0
  245. package/dist/cli/chunks/safe-db-CQZGF2KA.js +2 -0
  246. package/dist/cli/chunks/schedule-UP7E3LRC.js +2 -0
  247. package/dist/cli/chunks/scheduler-ENIZHYSL.js +2 -0
  248. package/dist/cli/chunks/{security-IXDKBPSG.js → security-KFXBV65O.js} +3 -3
  249. package/dist/cli/chunks/{shared-rvf-adapter-VCOK3OVD.js → shared-rvf-adapter-HDDCXCHY.js} +2 -2
  250. package/dist/cli/chunks/{shared-rvf-dual-writer-FFKBKYNL.js → shared-rvf-dual-writer-CXXTB7CU.js} +2 -2
  251. package/dist/cli/chunks/sqlite-persistence-CEVJVWS5.js +2 -0
  252. package/dist/cli/chunks/status-handler-CXSVM236.js +47 -0
  253. package/dist/cli/chunks/{structural-health-55X6BTLT.js → structural-health-LMHSM7MJ.js} +2 -2
  254. package/dist/cli/chunks/{sync-NUG67HGK.js → sync-DMOUY2EY.js} +2 -2
  255. package/dist/cli/chunks/{sync-BUGDXW3Y.js → sync-REEFKICL.js} +2 -2
  256. package/dist/cli/chunks/{task-handler-T6ZKXV4S.js → task-handler-DMSNFIH3.js} +2 -2
  257. package/dist/cli/chunks/{task-handlers-H63TB2UI.js → task-handlers-3Z3QV7X7.js} +3 -3
  258. package/dist/cli/chunks/{test-VEK76SBT.js → test-U6CGMDLN.js} +4 -4
  259. package/dist/cli/chunks/{test-scheduling-QZM6PNZH.js → test-scheduling-YHYA3BP5.js} +3 -3
  260. package/dist/cli/chunks/{token-bootstrap-W5IAMJW4.js → token-bootstrap-MQCTJURQ.js} +2 -2
  261. package/dist/cli/chunks/{token-usage-OBY6UEUR.js → token-usage-EOOTM7Q3.js} +2 -2
  262. package/dist/cli/chunks/{transformers-EFNY2MRX.js → transformers-EKDJW2H6.js} +2 -2
  263. package/dist/cli/chunks/{tree-sitter-wasm-parser-EU2S5NVM.js → tree-sitter-wasm-parser-HTGAXDQA.js} +2 -2
  264. package/dist/cli/chunks/{types-3DYRKX23.js → types-GLRXY4RY.js} +2 -2
  265. package/dist/cli/chunks/unified-memory-PXOQ4N53.js +2 -0
  266. package/dist/cli/chunks/unified-memory-hnsw-VEXD6ASE.js +2 -0
  267. package/dist/cli/chunks/unified-persistence-46G6MZYC.js +2 -0
  268. package/dist/cli/chunks/{upgrade-H5V53FRF.js → upgrade-KU55H77X.js} +2 -2
  269. package/dist/cli/chunks/{validate-IL22VB5I.js → validate-26VSBOJN.js} +2 -2
  270. package/dist/cli/chunks/{validate-swarm-WZKECK3W.js → validate-swarm-OIALRDKF.js} +2 -2
  271. package/dist/cli/chunks/{vibium-KKM23OTQ.js → vibium-LOTWW25P.js} +2 -2
  272. package/dist/cli/chunks/visual-security-4X3T3MFL.js +2 -0
  273. package/dist/cli/chunks/{web-tree-sitter-NJM5YBOY.js → web-tree-sitter-6LWPPBYU.js} +2 -2
  274. package/dist/cli/chunks/{windsurf-installer-SLP43TVT.js → windsurf-installer-ILOQYENG.js} +2 -2
  275. package/dist/cli/chunks/witness-chain-XW4S3LVW.js +2 -0
  276. package/dist/cli/chunks/{witness-chain-XBEPT4XD.js → witness-chain-YBS6OHS4.js} +2 -2
  277. package/dist/cli/chunks/{witness-key-manager-DAAMNYOW.js → witness-key-manager-SI3WV3ZQ.js} +2 -2
  278. package/dist/cli/chunks/{workflow-SZOOU6D3.js → workflow-GY6SJRQW.js} +4 -4
  279. package/dist/cli/chunks/workflow-orchestrator-IIVV6TCP.js +2 -0
  280. package/dist/cli/chunks/{wrappers-I2CBKWGF.js → wrappers-MMO5YKOZ.js} +2 -2
  281. package/dist/cli/commands/eval.js +73 -3
  282. package/dist/cli/commands/llm-router.js +2 -0
  283. package/dist/cli/handlers/status-handler.d.ts +5 -0
  284. package/dist/cli/handlers/status-handler.js +35 -0
  285. package/dist/coordination/consensus/providers/index.js +11 -0
  286. package/dist/mcp/bundle.js +412 -393
  287. package/dist/shared/llm/billing-modes.d.ts +24 -0
  288. package/dist/shared/llm/billing-modes.js +56 -0
  289. package/dist/shared/llm/cost-tracker.js +2 -0
  290. package/dist/shared/llm/interfaces.d.ts +61 -3
  291. package/dist/shared/llm/provider-manager.d.ts +34 -0
  292. package/dist/shared/llm/provider-manager.js +152 -3
  293. package/dist/shared/llm/providers/claude-code.d.ts +57 -0
  294. package/dist/shared/llm/providers/claude-code.js +312 -0
  295. package/dist/shared/llm/providers/cognitum.d.ts +64 -0
  296. package/dist/shared/llm/providers/cognitum.js +369 -0
  297. package/dist/shared/llm/providers/index.d.ts +2 -0
  298. package/dist/shared/llm/providers/index.js +2 -0
  299. package/dist/shared/llm/router/config-store.d.ts +31 -11
  300. package/dist/shared/llm/router/config-store.js +82 -12
  301. package/dist/shared/llm/router/hybrid-router.js +16 -0
  302. package/dist/shared/llm/router/types.js +7 -0
  303. package/dist/shared/llm/spend-ledger.d.ts +64 -0
  304. package/dist/shared/llm/spend-ledger.js +115 -0
  305. package/dist/shared/llm/translation/message-formatter.js +2 -0
  306. package/dist/shared/llm/translation/prompt-translator.js +2 -0
  307. package/dist/shared/llm/translation/tool-translator.js +2 -0
  308. package/dist/validation/index.d.ts +1 -0
  309. package/dist/validation/index.js +2 -0
  310. package/dist/validation/provider-llm-executor.d.ts +45 -0
  311. package/dist/validation/provider-llm-executor.js +98 -0
  312. package/package.json +1 -1
  313. package/dist/cli/chunks/adapter-X4UEC6UJ.js +0 -2
  314. package/dist/cli/chunks/aqe-learning-engine-5FG7JCY7.js +0 -2
  315. package/dist/cli/chunks/base-CWPMFSZG.js +0 -2
  316. package/dist/cli/chunks/browser-workflow-A77OFBVY.js +0 -2
  317. package/dist/cli/chunks/chunk-CDVKFAYP.js +0 -18
  318. package/dist/cli/chunks/chunk-FNMEVLSN.js +0 -2
  319. package/dist/cli/chunks/chunk-P7G5LGUE.js +0 -3
  320. package/dist/cli/chunks/chunk-R7XEACKR.js +0 -2
  321. package/dist/cli/chunks/chunk-RAS7WRN5.js +0 -24
  322. package/dist/cli/chunks/client-KKCFGD7R.js +0 -2
  323. package/dist/cli/chunks/core-handlers-KRSSJEO5.js +0 -2
  324. package/dist/cli/chunks/cross-domain-router-27QGWU27.js +0 -2
  325. package/dist/cli/chunks/dream-M6K47Q4H.js +0 -2
  326. package/dist/cli/chunks/eval-73XW2WJD.js +0 -15
  327. package/dist/cli/chunks/heartbeat-scheduler-URXBF5RW.js +0 -2
  328. package/dist/cli/chunks/hnsw-adapter-WWAGM6HK.js +0 -2
  329. package/dist/cli/chunks/hnsw-index-UFV2HSZE.js +0 -2
  330. package/dist/cli/chunks/hybrid-router-3U6Q6OTL.js +0 -2
  331. package/dist/cli/chunks/impact-analyzer-EUEX6ZRO.js +0 -2
  332. package/dist/cli/chunks/init-wizard-POKY2LRY.js +0 -2
  333. package/dist/cli/chunks/kernel-HPAONLZY.js +0 -2
  334. package/dist/cli/chunks/knowledge-graph-2WCUFG63.js +0 -2
  335. package/dist/cli/chunks/llm-router-service-D5VMG6SD.js +0 -2
  336. package/dist/cli/chunks/load-test-DHG26REU.js +0 -2
  337. package/dist/cli/chunks/memory-backend-GLWQ4DAL.js +0 -2
  338. package/dist/cli/chunks/memory-handlers-P72I4VV4.js +0 -2
  339. package/dist/cli/chunks/pattern-null-store-Y2YFTE3V.js +0 -2
  340. package/dist/cli/chunks/protocol-executor-HNT67NN5.js +0 -2
  341. package/dist/cli/chunks/provider-manager-5YGPZIEZ.js +0 -2
  342. package/dist/cli/chunks/qe-reasoning-bank-Z5UGOA3F.js +0 -2
  343. package/dist/cli/chunks/queen-coordinator-P5LU5NWI.js +0 -2
  344. package/dist/cli/chunks/router-CRGHUAVR.js +0 -2
  345. package/dist/cli/chunks/routing-feedback-BVX5ZBCF.js +0 -2
  346. package/dist/cli/chunks/rvf-native-adapter-FZJSQOJM.js +0 -2
  347. package/dist/cli/chunks/safe-db-USYNEOC6.js +0 -2
  348. package/dist/cli/chunks/schedule-KCRCQ3PS.js +0 -2
  349. package/dist/cli/chunks/scheduler-CX3UHI4U.js +0 -2
  350. package/dist/cli/chunks/sqlite-persistence-K23C4TFH.js +0 -2
  351. package/dist/cli/chunks/status-handler-M5W64S5U.js +0 -46
  352. package/dist/cli/chunks/unified-memory-NCDBQLLF.js +0 -2
  353. package/dist/cli/chunks/unified-memory-hnsw-T7NSGQ2H.js +0 -2
  354. package/dist/cli/chunks/unified-persistence-XUAYDCMM.js +0 -2
  355. package/dist/cli/chunks/visual-security-3TUC4GPP.js +0 -2
  356. package/dist/cli/chunks/witness-chain-QLOKUZXC.js +0 -2
  357. package/dist/cli/chunks/workflow-orchestrator-6JAYTZ7L.js +0 -2
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Agentic QE v3 — LLM Spend Ledger (ADR-123)
3
+ *
4
+ * Issue #557: AQE declared budget caps (`maxCostPerHour/Day`,
5
+ * `COST_LIMIT_EXCEEDED`, `CostTracker.wouldExceedLimit`) but enforced none of
6
+ * them, and `CostTracker` is per-process in-memory — so a fleet of N agent
7
+ * processes each sees $0 cumulative spend and no cap can hold across them.
8
+ *
9
+ * This module persists every LLM charge to the unified `.agentic-qe/memory.db`
10
+ * (ADR: one DB, one schema — the `llm_spend` table is additive, never a new
11
+ * file) so a budget check reads the *shared* rolling-window spend across every
12
+ * process. When the unified DB is unavailable (e.g. a standalone eval script
13
+ * with no kernel), it degrades to an in-memory ledger that still enforces
14
+ * within the current process — never worse than today's behavior.
15
+ *
16
+ * better-sqlite3 is fully synchronous, so record/query are sync; multiple
17
+ * connections (one per process) to a WAL-mode DB is exactly the supported
18
+ * cross-process pattern.
19
+ */
20
+ import type { Database as DatabaseType } from 'better-sqlite3';
21
+ import type { CostSource } from './interfaces';
22
+ /** A single persisted charge. */
23
+ export interface SpendEntry {
24
+ provider: string;
25
+ model: string;
26
+ costUsd: number;
27
+ costSource: CostSource;
28
+ promptTokens: number;
29
+ completionTokens: number;
30
+ requestId: string;
31
+ }
32
+ /** Cross-process spend ledger. */
33
+ export interface SpendLedger {
34
+ /** Persist a charge. Never throws for the caller — failures degrade silently. */
35
+ record(entry: SpendEntry): void;
36
+ /** Total USD charged within the last `windowMs` (rolling window ending now). */
37
+ spentSince(windowMs: number, nowMs?: number): number;
38
+ }
39
+ /**
40
+ * SQLite-backed ledger. Cross-process because every process opens its own
41
+ * connection to the same WAL-mode `memory.db`.
42
+ */
43
+ export declare class SqliteSpendLedger implements SpendLedger {
44
+ private readonly db;
45
+ constructor(db: DatabaseType);
46
+ record(entry: SpendEntry): void;
47
+ spentSince(windowMs: number, nowMs?: number): number;
48
+ }
49
+ /**
50
+ * In-process fallback ledger. Used when no unified DB is available. Enforces
51
+ * within the current process only — no worse than the pre-ADR-123 behavior.
52
+ */
53
+ export declare class InMemorySpendLedger implements SpendLedger {
54
+ private readonly entries;
55
+ record(entry: SpendEntry): void;
56
+ spentSince(windowMs: number, nowMs?: number): number;
57
+ }
58
+ /**
59
+ * Build the default ledger. Prefers the unified `memory.db` (cross-process);
60
+ * falls back to an in-memory ledger if the kernel DB can't be reached. Uses a
61
+ * dynamic import so the LLM layer stays statically decoupled from the kernel.
62
+ */
63
+ export declare function createDefaultSpendLedger(): Promise<SpendLedger>;
64
+ //# sourceMappingURL=spend-ledger.d.ts.map
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Agentic QE v3 — LLM Spend Ledger (ADR-123)
3
+ *
4
+ * Issue #557: AQE declared budget caps (`maxCostPerHour/Day`,
5
+ * `COST_LIMIT_EXCEEDED`, `CostTracker.wouldExceedLimit`) but enforced none of
6
+ * them, and `CostTracker` is per-process in-memory — so a fleet of N agent
7
+ * processes each sees $0 cumulative spend and no cap can hold across them.
8
+ *
9
+ * This module persists every LLM charge to the unified `.agentic-qe/memory.db`
10
+ * (ADR: one DB, one schema — the `llm_spend` table is additive, never a new
11
+ * file) so a budget check reads the *shared* rolling-window spend across every
12
+ * process. When the unified DB is unavailable (e.g. a standalone eval script
13
+ * with no kernel), it degrades to an in-memory ledger that still enforces
14
+ * within the current process — never worse than today's behavior.
15
+ *
16
+ * better-sqlite3 is fully synchronous, so record/query are sync; multiple
17
+ * connections (one per process) to a WAL-mode DB is exactly the supported
18
+ * cross-process pattern.
19
+ */
20
+ const CREATE_TABLE_SQL = `
21
+ CREATE TABLE IF NOT EXISTS llm_spend (
22
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
23
+ ts INTEGER NOT NULL,
24
+ provider TEXT NOT NULL,
25
+ model TEXT NOT NULL,
26
+ cost_usd REAL NOT NULL,
27
+ cost_source TEXT NOT NULL,
28
+ prompt_tokens INTEGER NOT NULL DEFAULT 0,
29
+ completion_tokens INTEGER NOT NULL DEFAULT 0,
30
+ request_id TEXT
31
+ );
32
+ CREATE INDEX IF NOT EXISTS idx_llm_spend_ts ON llm_spend(ts);
33
+ `;
34
+ /**
35
+ * SQLite-backed ledger. Cross-process because every process opens its own
36
+ * connection to the same WAL-mode `memory.db`.
37
+ */
38
+ export class SqliteSpendLedger {
39
+ db;
40
+ constructor(db) {
41
+ this.db = db;
42
+ // Additive schema only — CREATE TABLE/INDEX IF NOT EXISTS never drops data.
43
+ this.db.exec(CREATE_TABLE_SQL);
44
+ }
45
+ record(entry) {
46
+ try {
47
+ this.db
48
+ .prepare(`INSERT INTO llm_spend
49
+ (ts, provider, model, cost_usd, cost_source, prompt_tokens, completion_tokens, request_id)
50
+ VALUES (@ts, @provider, @model, @cost_usd, @cost_source, @prompt_tokens, @completion_tokens, @request_id)`)
51
+ .run({
52
+ ts: Date.now(),
53
+ provider: entry.provider,
54
+ model: entry.model,
55
+ cost_usd: entry.costUsd,
56
+ cost_source: entry.costSource,
57
+ prompt_tokens: entry.promptTokens,
58
+ completion_tokens: entry.completionTokens,
59
+ request_id: entry.requestId,
60
+ });
61
+ }
62
+ catch {
63
+ // A ledger write must never break a generation call.
64
+ }
65
+ }
66
+ spentSince(windowMs, nowMs = Date.now()) {
67
+ try {
68
+ const row = this.db
69
+ .prepare(`SELECT COALESCE(SUM(cost_usd), 0) AS total FROM llm_spend WHERE ts >= ?`)
70
+ .get(nowMs - windowMs);
71
+ return row?.total ?? 0;
72
+ }
73
+ catch {
74
+ return 0;
75
+ }
76
+ }
77
+ }
78
+ /**
79
+ * In-process fallback ledger. Used when no unified DB is available. Enforces
80
+ * within the current process only — no worse than the pre-ADR-123 behavior.
81
+ */
82
+ export class InMemorySpendLedger {
83
+ entries = [];
84
+ record(entry) {
85
+ this.entries.push({ ts: Date.now(), costUsd: entry.costUsd });
86
+ }
87
+ spentSince(windowMs, nowMs = Date.now()) {
88
+ const cutoff = nowMs - windowMs;
89
+ let total = 0;
90
+ for (const e of this.entries) {
91
+ if (e.ts >= cutoff)
92
+ total += e.costUsd;
93
+ }
94
+ return total;
95
+ }
96
+ }
97
+ /**
98
+ * Build the default ledger. Prefers the unified `memory.db` (cross-process);
99
+ * falls back to an in-memory ledger if the kernel DB can't be reached. Uses a
100
+ * dynamic import so the LLM layer stays statically decoupled from the kernel.
101
+ */
102
+ export async function createDefaultSpendLedger() {
103
+ try {
104
+ const mod = await import('../../kernel/unified-memory.js');
105
+ const mem = mod.getUnifiedMemory();
106
+ if (!mem.isInitialized()) {
107
+ await mem.initialize();
108
+ }
109
+ return new SqliteSpendLedger(mem.getDatabase());
110
+ }
111
+ catch {
112
+ return new InMemorySpendLedger();
113
+ }
114
+ }
115
+ //# sourceMappingURL=spend-ledger.js.map
@@ -15,12 +15,14 @@
15
15
  */
16
16
  const SYSTEM_PROMPT_STRATEGIES = {
17
17
  claude: 'native', // Anthropic supports separate system param
18
+ 'claude-code': 'native', // ADR-123: passed via --append-system-prompt
18
19
  openai: 'native', // OpenAI supports system role messages
19
20
  ollama: 'native', // Ollama supports system role
20
21
  openrouter: 'native', // OpenRouter passes through to underlying provider
21
22
  gemini: 'native', // Gemini supports systemInstruction
22
23
  'azure-openai': 'native', // Azure OpenAI same as OpenAI
23
24
  bedrock: 'native', // Bedrock supports system for Claude
25
+ cognitum: 'native', // ADR-123: OpenAI-compatible system role
24
26
  onnx: 'first-message', // ONNX models typically don't have system prompt support
25
27
  };
26
28
  /**
@@ -37,10 +37,12 @@ export function detectMessageFormat(messages) {
37
37
  export function getTargetFormat(provider) {
38
38
  switch (provider) {
39
39
  case 'claude':
40
+ case 'claude-code': // ADR-123: Anthropic-native (runs via `claude -p`)
40
41
  case 'bedrock':
41
42
  return 'anthropic';
42
43
  case 'openai':
43
44
  case 'azure-openai':
45
+ case 'cognitum': // ADR-123: OpenAI-compatible gateway
44
46
  return 'openai';
45
47
  case 'gemini':
46
48
  return 'gemini';
@@ -16,6 +16,7 @@
16
16
  export function getToolSchemaFormat(provider) {
17
17
  switch (provider) {
18
18
  case 'claude':
19
+ case 'claude-code': // ADR-123: Anthropic-native
19
20
  case 'bedrock':
20
21
  return 'anthropic';
21
22
  case 'openai':
@@ -23,6 +24,7 @@ export function getToolSchemaFormat(provider) {
23
24
  case 'openrouter':
24
25
  case 'ollama':
25
26
  case 'onnx':
27
+ case 'cognitum': // ADR-123: OpenAI-compatible
26
28
  return 'openai';
27
29
  case 'gemini':
28
30
  return 'gemini';
@@ -13,6 +13,7 @@
13
13
  export { SwarmSkillValidator, createSwarmSkillValidator, DEFAULT_SWARM_VALIDATION_CONFIG, P0_SKILLS, DEFAULT_VALIDATION_MODELS, } from './swarm-skill-validator.js';
14
14
  export type { SwarmValidationConfig, SwarmTopology, SwarmValidationResult, SwarmValidationSummary, SkillValidatorFn, } from './swarm-skill-validator.js';
15
15
  export { ParallelEvalRunner, createParallelEvalRunner, DEFAULT_PARALLEL_EVAL_CONFIG, MockLLMExecutor, } from './parallel-eval-runner.js';
16
+ export { ProviderLLMExecutor, resolveEvalExecutor, type EvalExecutorResolution, } from './provider-llm-executor.js';
16
17
  export type { ParallelEvalConfig, EvalTestCase, EvalTestCaseInput, EvalTestCaseExpectedOutput, EvalTestCaseValidation, EvalSuite, TestCaseTask, ParallelEvalResult, WorkerMessage, WorkerProgress, EvalProgress, LLMExecutor, } from './parallel-eval-runner.js';
17
18
  export { CommandEvalRunner, createCommandEvalRunner, evalJsonPath, severityAtLeast, isCommandEvalSuite, validateCommandResult, } from './command-eval-runner.js';
18
19
  export type { CommandEvalSuite, CommandEvalTestCase, CommandEvalExpected, CommandEvalResult, CommandEvalTestResult, CommandEvalRunnerOptions, CommandRunner, Severity, TestCasePriority, } from './command-eval-runner.js';
@@ -24,6 +24,8 @@ P0_SKILLS, DEFAULT_VALIDATION_MODELS, } from './swarm-skill-validator.js';
24
24
  // Parallel Eval Runner (ADR-056 Phase 5)
25
25
  // ============================================================================
26
26
  export { ParallelEvalRunner, createParallelEvalRunner, DEFAULT_PARALLEL_EVAL_CONFIG, MockLLMExecutor, } from './parallel-eval-runner.js';
27
+ // Issue #557 follow-up: real (non-mock) eval executor.
28
+ export { ProviderLLMExecutor, resolveEvalExecutor, } from './provider-llm-executor.js';
27
29
  // ============================================================================
28
30
  // Command Eval Runner (ADR-091: qe-browser and other shell-based skills)
29
31
  // ============================================================================
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Agentic QE v3 — Real LLM executor for the eval runner (issue #557 follow-up).
3
+ *
4
+ * `aqe eval run` historically defaulted to MockLLMExecutor (canned, keyword-
5
+ * matched responses), so LLM-mode eval suites scored fabricated output. This
6
+ * executor makes REAL model calls through the shared LLM layer, so eval
7
+ * inherits the ADR-123 guardrails automatically: enforced budget caps, the
8
+ * `AQE_LLM_PROVIDER` selector (including the claude-code subscription), the
9
+ * billing notice, and the cross-process spend ledger.
10
+ */
11
+ import type { LLMExecutor } from './parallel-eval-runner';
12
+ import { ProviderManager } from '../shared/llm/provider-manager';
13
+ import type { LLMProviderType } from '../shared/llm/interfaces';
14
+ /** Real executor: delegates to ProviderManager.generate (budget-gated). */
15
+ export declare class ProviderLLMExecutor implements LLMExecutor {
16
+ private readonly manager;
17
+ readonly providerType: LLMProviderType;
18
+ constructor(manager: ProviderManager, providerType: LLMProviderType);
19
+ execute(prompt: string, model: string, options?: {
20
+ timeout?: number;
21
+ }): Promise<{
22
+ output: string;
23
+ tokensUsed: number;
24
+ durationMs: number;
25
+ }>;
26
+ }
27
+ export interface EvalExecutorResolution {
28
+ /** The real executor, or undefined when no provider is configured. */
29
+ executor?: ProviderLLMExecutor;
30
+ /** The provider chosen (for display), when resolved. */
31
+ providerType?: LLMProviderType;
32
+ /** Billing mode of the chosen provider (for the pre-run notice). */
33
+ billingMode?: string;
34
+ /** Manager to dispose when done (caller owns lifecycle). */
35
+ manager?: ProviderManager;
36
+ /** Why no executor could be built (for a clear CLI error). */
37
+ reason?: string;
38
+ }
39
+ /**
40
+ * Resolve a real eval executor from the current environment/config. Honors
41
+ * `AQE_LLM_PROVIDER`. Returns `{ reason }` (no executor) when nothing is
42
+ * configured, so the CLI can hard-error instead of silently mocking.
43
+ */
44
+ export declare function resolveEvalExecutor(env?: NodeJS.ProcessEnv): Promise<EvalExecutorResolution>;
45
+ //# sourceMappingURL=provider-llm-executor.d.ts.map
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Agentic QE v3 — Real LLM executor for the eval runner (issue #557 follow-up).
3
+ *
4
+ * `aqe eval run` historically defaulted to MockLLMExecutor (canned, keyword-
5
+ * matched responses), so LLM-mode eval suites scored fabricated output. This
6
+ * executor makes REAL model calls through the shared LLM layer, so eval
7
+ * inherits the ADR-123 guardrails automatically: enforced budget caps, the
8
+ * `AQE_LLM_PROVIDER` selector (including the claude-code subscription), the
9
+ * billing notice, and the cross-process spend ledger.
10
+ */
11
+ import { ProviderManager } from '../shared/llm/provider-manager';
12
+ import { billingModeForType } from '../shared/llm/billing-modes';
13
+ import { loadRouterConfig, detectAvailableProvidersFromEnv, } from '../shared/llm/router/config-store';
14
+ import { ClaudeCodeProvider } from '../shared/llm/providers/claude-code';
15
+ import { OllamaProvider } from '../shared/llm/providers/ollama';
16
+ /** Real executor: delegates to ProviderManager.generate (budget-gated). */
17
+ export class ProviderLLMExecutor {
18
+ manager;
19
+ providerType;
20
+ constructor(manager, providerType) {
21
+ this.manager = manager;
22
+ this.providerType = providerType;
23
+ }
24
+ async execute(prompt, model, options) {
25
+ const response = await this.manager.generate(prompt, {
26
+ model,
27
+ timeoutMs: options?.timeout,
28
+ preferredProvider: this.providerType,
29
+ });
30
+ return {
31
+ output: response.content,
32
+ tokensUsed: response.usage.totalTokens,
33
+ durationMs: response.latencyMs,
34
+ };
35
+ }
36
+ }
37
+ /**
38
+ * Non-billing readiness check: is this provider usable WITHOUT making a paid
39
+ * probe call? API providers need a key in env; claude-code needs the CLI on
40
+ * PATH; local providers (ollama) are treated as available when selected.
41
+ */
42
+ async function isConfiguredCheaply(type, env) {
43
+ if (type === 'claude-code') {
44
+ // Free, local: just runs `claude --version`.
45
+ return new ClaudeCodeProvider().isAvailable();
46
+ }
47
+ if (type === 'ollama') {
48
+ // Local + free probe: only "configured" if the server actually answers,
49
+ // so a machine with no Ollama running falls through to the hard error
50
+ // (issue #557 choice: never silently pick a dead provider).
51
+ return new OllamaProvider().isAvailable();
52
+ }
53
+ // API providers: key presence only — never a billing probe.
54
+ return detectAvailableProvidersFromEnv(env).has(type);
55
+ }
56
+ /**
57
+ * Resolve a real eval executor from the current environment/config. Honors
58
+ * `AQE_LLM_PROVIDER`. Returns `{ reason }` (no executor) when nothing is
59
+ * configured, so the CLI can hard-error instead of silently mocking.
60
+ */
61
+ export async function resolveEvalExecutor(env = process.env) {
62
+ const config = loadRouterConfig({ env });
63
+ // Candidate order: the resolved default provider first, then any other
64
+ // enabled provider, so an AQE_LLM_PROVIDER override wins.
65
+ const enabled = Object.entries(config.providers ?? {})
66
+ .filter(([, cfg]) => cfg?.enabled)
67
+ .map(([type]) => type);
68
+ const candidates = [
69
+ config.defaultProvider,
70
+ ...enabled.filter((t) => t !== config.defaultProvider),
71
+ ];
72
+ for (const type of candidates) {
73
+ if (await isConfiguredCheaply(type, env)) {
74
+ const pmConfig = {
75
+ primary: type,
76
+ fallbacks: [],
77
+ loadBalancing: 'round-robin',
78
+ providers: { [type]: config.providers?.[type] },
79
+ global: { enableCostTracking: true },
80
+ };
81
+ const manager = new ProviderManager(pmConfig);
82
+ await manager.initialize();
83
+ return {
84
+ executor: new ProviderLLMExecutor(manager, type),
85
+ providerType: type,
86
+ billingMode: billingModeForType(type),
87
+ manager,
88
+ };
89
+ }
90
+ }
91
+ return {
92
+ reason: 'No LLM provider is configured for real eval runs. Set a provider key ' +
93
+ '(e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, COGNITUM_API_KEY), or run on your ' +
94
+ 'Claude subscription with AQE_LLM_PROVIDER=claude-code, or pass --mock to use ' +
95
+ 'canned responses (offline testing only — results are not real).',
96
+ };
97
+ }
98
+ //# sourceMappingURL=provider-llm-executor.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-qe",
3
- "version": "3.12.1",
3
+ "version": "3.12.2",
4
4
  "description": "Agentic Quality Engineering V3 - Domain-Driven Design Architecture with 13 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 60 specialized QE agents, mathematical Coherence verification, deep Claude Flow integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
2
- import{a,b,c}from"./chunk-QOAI6ETC.js";import"./chunk-C7HGYLNF.js";import"./chunk-RJ7TU2MP.js";import"./chunk-O65OPAZH.js";import"./chunk-UBPJQKYS.js";import"./chunk-U5ITD7ZD.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
2
- import{a,b,c,d,e,f}from"./chunk-OJORNYN3.js";import"./chunk-QJXUK54J.js";import"./chunk-PZZDAECU.js";import"./chunk-YGB3MT3R.js";import"./chunk-BPM7NEHS.js";import"./chunk-RIASOMB2.js";import"./chunk-42PYEEYQ.js";import"./chunk-3W2FZXFD.js";import"./chunk-JDZIBSMY.js";import"./chunk-CJTXZI37.js";import"./chunk-CYYT6YEV.js";import"./chunk-OXVAGR64.js";import"./chunk-QORWBION.js";import"./chunk-XS6BIOPQ.js";import"./chunk-EOBZJDJR.js";import"./chunk-XDRAU3W6.js";import"./chunk-PQ4NSXZM.js";import"./chunk-FNMEVLSN.js";import"./chunk-NOCPO55P.js";import"./chunk-IE6FDICX.js";import"./chunk-O65OPAZH.js";import"./chunk-M5P5WNXA.js";import"./chunk-NHRBKOYD.js";import"./chunk-QXZOUETY.js";import"./chunk-BLU7OLQZ.js";import"./chunk-4LKQZW2H.js";import"./chunk-UBPJQKYS.js";import"./chunk-75AVUS5U.js";import"./chunk-TMPRR3FZ.js";import"./chunk-R4A6PY5D.js";import"./chunk-JRNDFC23.js";import"./chunk-6BCVKCG5.js";import"./chunk-UR655D4K.js";import"./chunk-PZ3Q34OT.js";import"./chunk-CXUHD2O5.js";import"./chunk-IC6SOVGO.js";import"./chunk-USTUWUCE.js";import"./chunk-U5ITD7ZD.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-BALFQQB7.js";import"./chunk-LRWBOJ5Y.js";import"./chunk-XDRAU3W6.js";import"./chunk-PQ4NSXZM.js";import"./chunk-FNMEVLSN.js";import"./chunk-NOCPO55P.js";import"./chunk-IE6FDICX.js";import"./chunk-O65OPAZH.js";import"./chunk-BLU7OLQZ.js";import"./chunk-UBPJQKYS.js";import"./chunk-75AVUS5U.js";import"./chunk-4U5MJX2H.js";import"./chunk-TMPRR3FZ.js";import"./chunk-R4A6PY5D.js";import"./chunk-JRNDFC23.js";import"./chunk-6BCVKCG5.js";import"./chunk-UR655D4K.js";import"./chunk-PZ3Q34OT.js";import"./chunk-CXUHD2O5.js";import"./chunk-IC6SOVGO.js";import"./chunk-USTUWUCE.js";import"./chunk-U5ITD7ZD.js";export{l as MCPToolBase,k as defaultToolLogger,j as getKernel,i as getLLMRouter,e as getMemoryBackend,g as getSharedLLMRouter,c as getSharedMemoryBackend,a as isMemoryOnlyMode,b as registerRvfResetFn,h as resetSharedLLMRouter,d as resetSharedMemoryBackend,f as setSharedLLMRouter};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
2
- import{a}from"./chunk-774X6OJY.js";import"./chunk-BALFQQB7.js";import"./chunk-LRWBOJ5Y.js";import"./chunk-XDRAU3W6.js";import"./chunk-PQ4NSXZM.js";import"./chunk-FNMEVLSN.js";import"./chunk-NOCPO55P.js";import"./chunk-IE6FDICX.js";import"./chunk-O65OPAZH.js";import"./chunk-BLU7OLQZ.js";import"./chunk-UBPJQKYS.js";import"./chunk-75AVUS5U.js";import"./chunk-4U5MJX2H.js";import"./chunk-TMPRR3FZ.js";import"./chunk-R4A6PY5D.js";import"./chunk-JRNDFC23.js";import"./chunk-6BCVKCG5.js";import"./chunk-UR655D4K.js";import"./chunk-PZ3Q34OT.js";import"./chunk-CXUHD2O5.js";import"./chunk-IC6SOVGO.js";import"./chunk-USTUWUCE.js";import"./chunk-U5ITD7ZD.js";export{a as BrowserWorkflowTool};
@@ -1,18 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
2
- import{a as T,c as N}from"./chunk-UBPJQKYS.js";import{b as D,c as L,d as V}from"./chunk-6BCVKCG5.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 fe(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 be(a={}){return new O(a)}export{U as a,fe as b,de as c,be as d};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
2
- import{a as e,b as g,e as r}from"./chunk-NOCPO55P.js";import{c as o}from"./chunk-U5ITD7ZD.js";var L=o(()=>{"use strict";e();g();r()});export{L as a};
@@ -1,3 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
2
- import{a,b as u}from"./chunk-R7XEACKR.js";import{m as P}from"./chunk-XDRAU3W6.js";import{b as p}from"./chunk-IE6FDICX.js";P();import*as i from"fs";import*as d from"path";var v="llm-config.json",f={claude:["ANTHROPIC_API_KEY","CLAUDE_API_KEY"],openai:["OPENAI_API_KEY"],ollama:[],openrouter:["OPENROUTER_API_KEY"],gemini:["GOOGLE_AI_API_KEY","GEMINI_API_KEY","GOOGLE_API_KEY"],"azure-openai":["AZURE_OPENAI_API_KEY"],bedrock:["AWS_ACCESS_KEY_ID"],onnx:[]},R=new Set(["claude","openai","ollama","openrouter","gemini","azure-openai","bedrock"]);function E(e){let r=e??p();return d.join(r,".agentic-qe",v)}function _(e=process.env){let r=new Set;for(let n of a){if(!R.has(n))continue;let o=f[n];if(o.length===0){r.add(n);continue}o.some(t=>(e[t]??"").trim().length>0)&&r.add(n)}return r}function g(e){let r=E(e);if(!i.existsSync(r))return{};let n=i.readFileSync(r,"utf8");if(!n.trim())return{};let o=JSON.parse(n);if(typeof o!="object"||o===null)throw new Error(`Invalid ${v}: expected object, got ${typeof o}`);return o}function C(e,r){let n=E(r),o=d.dirname(n);i.existsSync(o)||i.mkdirSync(o,{recursive:!0});let t=y(e),s=JSON.stringify(t,null,2)+`
3
- `,c=n+".tmp-"+process.pid;i.writeFileSync(c,s,{encoding:"utf8",mode:384}),i.renameSync(c,n)}function y(e){if(!e.providers)return JSON.parse(JSON.stringify(e));let r=JSON.parse(JSON.stringify(e)),n=[];if(r.providers)for(let o of Object.keys(r.providers)){let t=r.providers[o];t&&"apiKey"in t&&t.apiKey&&(delete t.apiKey,n.push(o))}return n.length>0&&console.warn(`[router-config] Refused to persist apiKey for: ${n.join(", ")}. API keys belong in environment variables (e.g. ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY), NOT in .agentic-qe/llm-config.json which may be checked into source control.`),r}function l(e,r){let n={...e,...r,providers:{...e.providers??{}}};if(r.providers)for(let[o,t]of Object.entries(r.providers)){if(!t)continue;let s=o;n.providers[s]={...e.providers?.[s]??{},...t}}return n}function m(e,r=process.env){let n=_(r),o={...e,providers:{...e.providers??{}}};for(let t of n){if(f[t].length===0)continue;let c=o.providers[t]??{enabled:!1};c.enabled||(o.providers[t]={...c,enabled:!0})}return o}function A(e={}){let r=g(e.projectRoot),n=l(u,r),o=m(n,e.env);return e.override?l(o,e.override):o}function S(e={}){let r=e.env??process.env;for(let o of a){let t=f[o];if(t.length!==0&&t.some(s=>(r[s]??"").trim().length>0))return!0}let n=g(e.projectRoot);if(n.providers){for(let o of Object.values(n.providers))if(o?.enabled)return!0}return!1}export{_ as a,C as b,A as c,S as d};
@@ -1,2 +0,0 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.1");process.exit(0)}
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};