reeval 0.19.0 → 0.21.0

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 (436) hide show
  1. package/CHANGELOG.md +803 -0
  2. package/README.md +15 -15
  3. package/THIRD_PARTY_NOTICES.md +5 -5
  4. package/assets/gateway-models.mjs +65 -31
  5. package/dist/{adapter-C8xPuXYq.js → adapter-BdzhdRYo.js} +8 -6
  6. package/dist/adapter-BdzhdRYo.js.map +1 -0
  7. package/dist/{agent-CBoLndM7.js → agent-Dx-bDmlV.js} +179 -31
  8. package/dist/agent-Dx-bDmlV.js.map +1 -0
  9. package/dist/{agents-C6zhkxp3.js → agents-l0-k7vw3.js} +362 -102
  10. package/dist/agents-l0-k7vw3.js.map +1 -0
  11. package/dist/{app-files-DT5mJyV4.js → app-files-B-CQYB0c.js} +3 -3
  12. package/dist/app-files-B-CQYB0c.js.map +1 -0
  13. package/dist/{assemble-UPCRrtOz.js → assemble-CYMpN8LC.js} +1 -1
  14. package/dist/{assemble-t6h018An.js → assemble-CsZIcJo8.js} +171 -18
  15. package/dist/assemble-CsZIcJo8.js.map +1 -0
  16. package/dist/{attempt-CAdlwlNu.js → attempt-CKfKsqqw.js} +2 -2
  17. package/dist/{attempt-CAdlwlNu.js.map → attempt-CKfKsqqw.js.map} +1 -1
  18. package/dist/{attempt-host-CIm1-11m.js → attempt-host-BwSmNYkX.js} +17 -8
  19. package/dist/attempt-host-BwSmNYkX.js.map +1 -0
  20. package/dist/{boat-BjLqFJIZ.js → boat-CZpAreTB.js} +3 -3
  21. package/dist/{boat-BjLqFJIZ.js.map → boat-CZpAreTB.js.map} +1 -1
  22. package/dist/{boat-CJCtzfB1.js → boat-su1Y7LPd.js} +17 -14
  23. package/dist/boat-su1Y7LPd.js.map +1 -0
  24. package/dist/bridge/index.mjs +113 -8
  25. package/dist/{capture-iBzFiC0j.js → capture-BqIAeFyC.js} +55 -29
  26. package/dist/{capture-iBzFiC0j.js.map → capture-BqIAeFyC.js.map} +1 -1
  27. package/dist/capture-D0Ln5aCP.js +1 -0
  28. package/dist/{cases-z9E6DCd5.js → cases-CM-MQRQp.js} +133 -19
  29. package/dist/cases-CM-MQRQp.js.map +1 -0
  30. package/dist/cases-FvhbM8M5.js +1 -0
  31. package/dist/{cli-20Fpvs5H.js → cli-s_3opn_I.js} +219 -109
  32. package/dist/cli-s_3opn_I.js.map +1 -0
  33. package/dist/{cli-spec-Dsr79Qy1.js → cli-spec-DxzIjmq_.js} +109 -26
  34. package/dist/cli-spec-DxzIjmq_.js.map +1 -0
  35. package/dist/cli.js +2 -2
  36. package/dist/client-C5fIzHQa.js +803 -0
  37. package/dist/client-C5fIzHQa.js.map +1 -0
  38. package/dist/{command-CRh-cb6Z.js → command-B5OAIjp7.js} +25 -21
  39. package/dist/command-B5OAIjp7.js.map +1 -0
  40. package/dist/{command-BLNVDiIg.js → command-BJ7KqczP.js} +10 -10
  41. package/dist/{command-BLNVDiIg.js.map → command-BJ7KqczP.js.map} +1 -1
  42. package/dist/{command-aUJvENwy.js → command-BXLZsEwQ.js} +16 -16
  43. package/dist/{command-aUJvENwy.js.map → command-BXLZsEwQ.js.map} +1 -1
  44. package/dist/{command-B5OyHpOu.js → command-DA_SHQUQ.js} +16 -16
  45. package/dist/{command-B5OyHpOu.js.map → command-DA_SHQUQ.js.map} +1 -1
  46. package/dist/{commands-CWy-WndG.js → commands-BKBamOcX.js} +174 -40
  47. package/dist/commands-BKBamOcX.js.map +1 -0
  48. package/dist/{commands-CfdBX-mc.js → commands-BPvAOEmb.js} +1 -1
  49. package/dist/{config-B9mB1kF5.js → config-C0URar0t.js} +255 -89
  50. package/dist/config-C0URar0t.js.map +1 -0
  51. package/dist/{context-Bkv3ndjq.js → context-Sj58aJEu.js} +2 -2
  52. package/dist/{context-Bkv3ndjq.js.map → context-Sj58aJEu.js.map} +1 -1
  53. package/dist/{cost-BdRgySQl.js → cost-C21gGrju.js} +19 -9
  54. package/dist/cost-C21gGrju.js.map +1 -0
  55. package/dist/cost-IM80LyGD.js +1 -0
  56. package/dist/{cursor-catalog-BSn9xjmo.js → cursor-catalog-FWgSo-T1.js} +4 -4
  57. package/dist/{cursor-catalog-BSn9xjmo.js.map → cursor-catalog-FWgSo-T1.js.map} +1 -1
  58. package/dist/db-Bc4L-Wcr.js +2 -0
  59. package/dist/{db-zgC1tvKB.js → db-BjAWxVAG.js} +142 -248
  60. package/dist/db-BjAWxVAG.js.map +1 -0
  61. package/dist/debug-CIXzB4wK.js.map +1 -1
  62. package/dist/{default-effort-BAy8ixd1.js → default-effort-CWlhZ6U1.js} +1 -1
  63. package/dist/{default-effort-DGhQmu95.js → default-effort-Ck2GYIxX.js} +4 -4
  64. package/dist/{default-effort-DGhQmu95.js.map → default-effort-Ck2GYIxX.js.map} +1 -1
  65. package/dist/{dist-CAFD1yfv.js → dist-DeqeCUZe.js} +15 -8
  66. package/dist/dist-DeqeCUZe.js.map +1 -0
  67. package/dist/{docker-DAMnm3L9.js → docker-CDdK6Ity.js} +49 -22
  68. package/dist/docker-CDdK6Ity.js.map +1 -0
  69. package/dist/{docker-Cqw-CyWz.js → docker-D74l67k8.js} +4 -4
  70. package/dist/{docker-Cqw-CyWz.js.map → docker-D74l67k8.js.map} +1 -1
  71. package/dist/{docker-Dr4XeDc8.js → docker-DMug3l-a.js} +1 -1
  72. package/dist/{doctor-B2PohneB.js → doctor-eFxyn6at.js} +85 -46
  73. package/dist/doctor-eFxyn6at.js.map +1 -0
  74. package/dist/{environment-DB8o3hGi.js → environment-CJIKz-Ud.js} +49 -11
  75. package/dist/environment-CJIKz-Ud.js.map +1 -0
  76. package/dist/{errors-BZgLSZtV.js → errors-C1GBcWE2.js} +2 -2
  77. package/dist/{errors-BZgLSZtV.js.map → errors-C1GBcWE2.js.map} +1 -1
  78. package/dist/{eval-source-D3sbAzt-.js → eval-source-CXIRJ91v.js} +24 -12
  79. package/dist/eval-source-CXIRJ91v.js.map +1 -0
  80. package/dist/{evaluate-CwKeN_fo.js → evaluate-DA4QsrHO.js} +792 -281
  81. package/dist/evaluate-DA4QsrHO.js.map +1 -0
  82. package/dist/{evaluate-COdzf7Hl.d.ts → evaluate-DHrU4Wld.d.ts} +2 -2
  83. package/dist/fake-bootstrap-CnwWG3kP.js +15 -0
  84. package/dist/fake-bootstrap-CnwWG3kP.js.map +1 -0
  85. package/dist/{files-BiFU16BW.js → files-BVVWAS0A.js} +6 -6
  86. package/dist/{files-BiFU16BW.js.map → files-BVVWAS0A.js.map} +1 -1
  87. package/dist/files-BaqXvB88.js +1 -0
  88. package/dist/{files-BEwfjD8J.js → files-Bey1VAex.js} +3 -3
  89. package/dist/{files-BEwfjD8J.js.map → files-Bey1VAex.js.map} +1 -1
  90. package/dist/files-BjOJw4sn.js +1 -0
  91. package/dist/{files-DgXyaAg6.js → files-BrGVs4gY.js} +2 -2
  92. package/dist/{files-DgXyaAg6.js.map → files-BrGVs4gY.js.map} +1 -1
  93. package/dist/files-CNHhSyb3.js +1 -0
  94. package/dist/files-CW1lChNh.js +1 -0
  95. package/dist/{files-BRzV7aPh.js → files-D6j-XpaK.js} +5 -5
  96. package/dist/{files-BRzV7aPh.js.map → files-D6j-XpaK.js.map} +1 -1
  97. package/dist/{files-Cl7BQ5gE.js → files-F44NRCN0.js} +143 -20
  98. package/dist/files-F44NRCN0.js.map +1 -0
  99. package/dist/{files-DlQshsks.js → files-g1watgRC.js} +2 -2
  100. package/dist/{files-DlQshsks.js.map → files-g1watgRC.js.map} +1 -1
  101. package/dist/gateway.d.ts +1 -1
  102. package/dist/{git-fDiJ8UIV.js → git-Jqkf9SBa.js} +3 -3
  103. package/dist/{git-fDiJ8UIV.js.map → git-Jqkf9SBa.js.map} +1 -1
  104. package/dist/{harness-DXv2gnaT.js → harness-FcTyyPco.js} +17 -8
  105. package/dist/harness-FcTyyPco.js.map +1 -0
  106. package/dist/{harness-C2berMiM.js → harness-nwnyghJZ.js} +14 -11
  107. package/dist/{harness-C2berMiM.js.map → harness-nwnyghJZ.js.map} +1 -1
  108. package/dist/harness.d.ts +11 -8
  109. package/dist/harness.js +1 -1
  110. package/dist/{ids-C_advdJA.js → ids-B-JKTCP8.js} +2 -2
  111. package/dist/{ids-C_advdJA.js.map → ids-B-JKTCP8.js.map} +1 -1
  112. package/dist/{images-BNgcR77K.js → images-Dsc4Wi-F.js} +65 -30
  113. package/dist/images-Dsc4Wi-F.js.map +1 -0
  114. package/dist/index.d.ts +46 -7
  115. package/dist/index.js +6 -6
  116. package/dist/init-C0oUG3jh.js +1 -0
  117. package/dist/{init-DbuZVRrW.js → init-QB5ecPDA.js} +33 -14
  118. package/dist/init-QB5ecPDA.js.map +1 -0
  119. package/dist/{ink-list-BpfidQ1h.js → ink-list-mCJypk3d.js} +2 -2
  120. package/dist/{ink-list-BpfidQ1h.js.map → ink-list-mCJypk3d.js.map} +1 -1
  121. package/dist/{invocations-CxGNOlh0.js → invocations-BSr4lRzI.js} +5 -5
  122. package/dist/{invocations-CxGNOlh0.js.map → invocations-BSr4lRzI.js.map} +1 -1
  123. package/dist/{judge-COMXT1Hx.js → judge-eGH39PaP.js} +12 -10
  124. package/dist/{judge-COMXT1Hx.js.map → judge-eGH39PaP.js.map} +1 -1
  125. package/dist/judge.d.ts +3 -1
  126. package/dist/judge.js +1 -1
  127. package/dist/{judgments-CzgpsTqv.js → judgments-Cj8bFaDG.js} +2 -2
  128. package/dist/{judgments-CzgpsTqv.js.map → judgments-Cj8bFaDG.js.map} +1 -1
  129. package/dist/{layout-Cm85tQYk.js → layout-DfQa4mJs.js} +14 -11
  130. package/dist/layout-DfQa4mJs.js.map +1 -0
  131. package/dist/{list-DuThsE28.js → list-Dh6T0kdr.js} +23 -12
  132. package/dist/{list-DuThsE28.js.map → list-Dh6T0kdr.js.map} +1 -1
  133. package/dist/live-DwjWJTdn.js +1 -0
  134. package/dist/{live-CgYbO4Te.js → live-xTZs0c61.js} +2 -2
  135. package/dist/{live-CgYbO4Te.js.map → live-xTZs0c61.js.map} +1 -1
  136. package/dist/{live-CnGrRM6j.js → live-y1p3oNXH.js} +9 -9
  137. package/dist/{live-CnGrRM6j.js.map → live-y1p3oNXH.js.map} +1 -1
  138. package/dist/{model-CwwkrCb7.js → model-3pZZzloU.js} +7 -5
  139. package/dist/model-3pZZzloU.js.map +1 -0
  140. package/dist/{model-047Dcd-a.js → model-DEjwetkJ.js} +1 -1
  141. package/dist/{model-V3mMXp6x.js → model-DNpKiHqO.js} +6 -6
  142. package/dist/{model-V3mMXp6x.js.map → model-DNpKiHqO.js.map} +1 -1
  143. package/dist/model-calls-B0BoQfJ4.js +95 -0
  144. package/dist/model-calls-B0BoQfJ4.js.map +1 -0
  145. package/dist/{model-DJjLw-0r.js → model-jRKSQBg6.js} +5 -5
  146. package/dist/{model-DJjLw-0r.js.map → model-jRKSQBg6.js.map} +1 -1
  147. package/dist/model-nfewGTzB.js +1 -0
  148. package/dist/{node-D7pAU--0.js → node-DM-mLGdX.js} +7 -7
  149. package/dist/{node-D7pAU--0.js.map → node-DM-mLGdX.js.map} +1 -1
  150. package/dist/{opencode-providers-BGiXt8_B.js → opencode-providers-ChJTQRmz.js} +5 -2
  151. package/dist/{opencode-providers-BGiXt8_B.js.map → opencode-providers-ChJTQRmz.js.map} +1 -1
  152. package/dist/{openrouter-models-Cw1z8-sq.js → openrouter-models-C0aRo633.js} +2 -2
  153. package/dist/{openrouter-models-Cw1z8-sq.js.map → openrouter-models-C0aRo633.js.map} +1 -1
  154. package/dist/options-DpsJ_5CU.js +1 -0
  155. package/dist/{patch-DH4e_Gkd.js → patch-Bx-qp8Li.js} +2 -2
  156. package/dist/{patch-DH4e_Gkd.js.map → patch-Bx-qp8Li.js.map} +1 -1
  157. package/dist/pi-providers-HygmL1y-.js +552 -0
  158. package/dist/pi-providers-HygmL1y-.js.map +1 -0
  159. package/dist/{plain-BYUf_fUV.js → plain-Ctn8oUdp.js} +44 -10
  160. package/dist/plain-Ctn8oUdp.js.map +1 -0
  161. package/dist/{plan-Cgq9NCEX.js → plan-ChO0A-xn.js} +63 -12
  162. package/dist/plan-ChO0A-xn.js.map +1 -0
  163. package/dist/{plugins-BkmPxDiY.js → plugins-BioMWncI.js} +636 -9
  164. package/dist/plugins-BioMWncI.js.map +1 -0
  165. package/dist/{preflight-R-InZCQb.js → preflight-BUjk_6wT.js} +1 -1
  166. package/dist/{preflight-CtlloeOQ.js → preflight-CJSGzMzc.js} +8 -9
  167. package/dist/preflight-CJSGzMzc.js.map +1 -0
  168. package/dist/preflight-DD3fI4Hz.js +1 -0
  169. package/dist/{preflight-BElE_q0u.js → preflight-qFCXmxha.js} +4 -4
  170. package/dist/{preflight-BElE_q0u.js.map → preflight-qFCXmxha.js.map} +1 -1
  171. package/dist/{prepare-C7f5mPl5.js → prepare-D7oSSFNm.js} +9 -9
  172. package/dist/{prepare-C7f5mPl5.js.map → prepare-D7oSSFNm.js.map} +1 -1
  173. package/dist/{prepare-CzkAdbXm.js → prepare-xHU2BpN-.js} +2 -2
  174. package/dist/prices-B1vm_lPk.js +1 -0
  175. package/dist/{prices-5m3SzMZ3.js → prices-BrY_ihLs.js} +80 -22
  176. package/dist/prices-BrY_ihLs.js.map +1 -0
  177. package/dist/{provenance-zsc4--dP.js → provenance-B-flBAzR.js} +5 -5
  178. package/dist/{provenance-zsc4--dP.js.map → provenance-B-flBAzR.js.map} +1 -1
  179. package/dist/provider-DHT20Gl8.js +1 -0
  180. package/dist/{provider-BxzZq3Th.js → provider-ieWOn4YS.js} +2 -2
  181. package/dist/{provider-BxzZq3Th.js.map → provider-ieWOn4YS.js.map} +1 -1
  182. package/dist/provider-stop-CxzWW7Ft.js +69 -0
  183. package/dist/provider-stop-CxzWW7Ft.js.map +1 -0
  184. package/dist/{providers-B8xYMeah.js → providers-B6StVyfG.js} +215 -48
  185. package/dist/providers-B6StVyfG.js.map +1 -0
  186. package/dist/providers-Dljf6al6.js +1 -0
  187. package/dist/query-BAc2tQZj.js +1 -0
  188. package/dist/{query-Bb3SYICk.js → query-CkLmJv7R.js} +2 -2
  189. package/dist/{query-Bb3SYICk.js.map → query-CkLmJv7R.js.map} +1 -1
  190. package/dist/{questions-CWlR9ffu.js → questions-CJIh2FSX.js} +7 -7
  191. package/dist/{questions-CWlR9ffu.js.map → questions-CJIh2FSX.js.map} +1 -1
  192. package/dist/{record-6IUzwP9K.js → record-nVVujCW7.js} +2 -2
  193. package/dist/{record-6IUzwP9K.js.map → record-nVVujCW7.js.map} +1 -1
  194. package/dist/{redact-BhjtnjrU.js → redact-DL2BTykw.js} +17 -2
  195. package/dist/redact-DL2BTykw.js.map +1 -0
  196. package/dist/{remarks-vtkPmQb9.js → remarks-B3wjKscW.js} +46 -11
  197. package/dist/remarks-B3wjKscW.js.map +1 -0
  198. package/dist/{remarks-D9Lcd1fF.js → remarks-BpdM_2RC.js} +2 -1
  199. package/dist/remarks-BpdM_2RC.js.map +1 -0
  200. package/dist/remarks-CleoDlYw.js +1 -0
  201. package/dist/{remarks-DPCONFxZ.js → remarks-DqriPKxm.js} +3 -2
  202. package/dist/{remarks-DPCONFxZ.js.map → remarks-DqriPKxm.js.map} +1 -1
  203. package/dist/{remote-BgYWqogI.js → remote-C88amFRN.js} +6 -6
  204. package/dist/{remote-BgYWqogI.js.map → remote-C88amFRN.js.map} +1 -1
  205. package/dist/resolve-Bul8lHaa.js +205 -0
  206. package/dist/resolve-Bul8lHaa.js.map +1 -0
  207. package/dist/resolve-DW92wpIZ.js +1 -0
  208. package/dist/{resolve-Do0ZaYH6.js → resolve-G576PiFJ.js} +14 -11
  209. package/dist/resolve-G576PiFJ.js.map +1 -0
  210. package/dist/{results-JyuM64gy.js → results-zVHIW6xw.js} +9 -22
  211. package/dist/results-zVHIW6xw.js.map +1 -0
  212. package/dist/{resume-AW5oXzUc.js → resume-D_PcUXfG.js} +94 -16
  213. package/dist/resume-D_PcUXfG.js.map +1 -0
  214. package/dist/{retry-ChzISxmy.js → retry-BvTzCxdc.js} +4 -4
  215. package/dist/{retry-ChzISxmy.js.map → retry-BvTzCxdc.js.map} +1 -1
  216. package/dist/{root-Co0jhOT5.js → root-BzeoyfGd.js} +2 -2
  217. package/dist/{root-Co0jhOT5.js.map → root-BzeoyfGd.js.map} +1 -1
  218. package/dist/{vercel-CGlSBv63.js → routes-B0F2R-K7.js} +91 -56
  219. package/dist/routes-B0F2R-K7.js.map +1 -0
  220. package/dist/{runtime-BpW1f1Mx.js → runtime-B3r_pAq6.js} +4 -4
  221. package/dist/{runtime-BpW1f1Mx.js.map → runtime-B3r_pAq6.js.map} +1 -1
  222. package/dist/sandbox/boat.d.ts +1 -1
  223. package/dist/sandbox/boat.js +1 -1
  224. package/dist/{sandbox-kSgr7vo5.js → sandbox-Duh3z1TV.js} +3 -3
  225. package/dist/{sandbox-kSgr7vo5.js.map → sandbox-Duh3z1TV.js.map} +1 -1
  226. package/dist/sandbox.d.ts +1 -1
  227. package/dist/sandbox.js +1 -1
  228. package/dist/server-CGEsvVRG.js +1 -0
  229. package/dist/{server-Cn8VqO9S.js → server-DUWMRKik.js} +8 -8
  230. package/dist/{server-Cn8VqO9S.js.map → server-DUWMRKik.js.map} +1 -1
  231. package/dist/{shared-Cfi45Bvy.js → shared-DtZwIAfy.js} +7 -1
  232. package/dist/shared-DtZwIAfy.js.map +1 -0
  233. package/dist/{source-CYOhR98B.js → source-CHuN4Nfg.js} +2 -2
  234. package/dist/{source-CYOhR98B.js.map → source-CHuN4Nfg.js.map} +1 -1
  235. package/dist/source-Wz1Nrfue.js +1 -0
  236. package/dist/src--yl1OypK.js +2 -0
  237. package/dist/{src-Cb2MWozp.js → src-B-HuDqpH.js} +276 -41
  238. package/dist/src-B-HuDqpH.js.map +1 -0
  239. package/dist/{src-DAzaCTcN.js → src-B5r1d23Y.js} +176 -18
  240. package/dist/src-B5r1d23Y.js.map +1 -0
  241. package/dist/{src-Ck2r_EMT.js → src-BHJ4MWvY.js} +504 -119
  242. package/dist/src-BHJ4MWvY.js.map +1 -0
  243. package/dist/{src-Dw79VLa3.js → src-BI0v8qlZ.js} +202 -56
  244. package/dist/src-BI0v8qlZ.js.map +1 -0
  245. package/dist/src-BL-_0QoE.js +1 -0
  246. package/dist/{src-YvblOrBU.js → src-BqNzHHWn.js} +87 -13
  247. package/dist/src-BqNzHHWn.js.map +1 -0
  248. package/dist/{src-CV_7DkPa.js → src-C-ChdnG6.js} +102 -13
  249. package/dist/src-C-ChdnG6.js.map +1 -0
  250. package/dist/src-C-mOSczH.js +2 -0
  251. package/dist/src-CZaYu6ER.js +3 -0
  252. package/dist/src-CeBhwD8k.js +2 -0
  253. package/dist/src-CkEiiyON.js +2 -0
  254. package/dist/{src-KxS91P7L.js → src-CmA5Yev6.js} +79 -11
  255. package/dist/src-CmA5Yev6.js.map +1 -0
  256. package/dist/src-CwH_nEaw.js +2 -0
  257. package/dist/src-DA95rM6v.js +4 -0
  258. package/dist/{src-DvGns8cz.js → src-DL-EE4DU.js} +299 -17
  259. package/dist/src-DL-EE4DU.js.map +1 -0
  260. package/dist/src-De0KY5S_.js +2 -0
  261. package/dist/{src-BNQznj4z.js → src-boB6D-5T.js} +124 -45
  262. package/dist/src-boB6D-5T.js.map +1 -0
  263. package/dist/state-B3jex5KU.js +1 -0
  264. package/dist/{state-BOLt8pJg.js → state-DUBRDyMk.js} +22 -22
  265. package/dist/{state-BOLt8pJg.js.map → state-DUBRDyMk.js.map} +1 -1
  266. package/dist/store/local.d.ts +8 -0
  267. package/dist/store/local.js +16 -0
  268. package/dist/store/local.js.map +1 -0
  269. package/dist/store/s3.d.ts +10 -0
  270. package/dist/store/s3.js +18 -0
  271. package/dist/store/s3.js.map +1 -0
  272. package/dist/{suite-COglUhPd.js → suite-B9J6Afg6.js} +6 -5
  273. package/dist/{suite-COglUhPd.js.map → suite-B9J6Afg6.js.map} +1 -1
  274. package/dist/suite-Bhs9-Z7O.js +2 -0
  275. package/dist/{summary-DU5zaibx.js → summary-CSp4cfnr.js} +25 -7
  276. package/dist/{summary-DU5zaibx.js.map → summary-CSp4cfnr.js.map} +1 -1
  277. package/dist/sync-CxAY6Dki.js +559 -0
  278. package/dist/sync-CxAY6Dki.js.map +1 -0
  279. package/dist/tart-CcrrtSrp.js +704 -0
  280. package/dist/tart-CcrrtSrp.js.map +1 -0
  281. package/dist/tart-CzViW3WZ.js +186 -0
  282. package/dist/tart-CzViW3WZ.js.map +1 -0
  283. package/dist/tart-DmVuVsmX.js +1 -0
  284. package/dist/tart-bake-F-6seRC9.js +192 -0
  285. package/dist/tart-bake-F-6seRC9.js.map +1 -0
  286. package/dist/tart-bake-RK7RaT9E.js +1 -0
  287. package/dist/tart-cli-B86Jqo1t.js +89 -0
  288. package/dist/tart-cli-B86Jqo1t.js.map +1 -0
  289. package/dist/tart-cli-ClvRniLQ.js +1 -0
  290. package/dist/tart-hosts-Brii7zHM.js +1 -0
  291. package/dist/tart-hosts-DPyZsg-1.js +313 -0
  292. package/dist/tart-hosts-DPyZsg-1.js.map +1 -0
  293. package/dist/{tart-images-DZ_Mbh-g.js → tart-images-CWSf03w8.js} +64 -6
  294. package/dist/tart-images-CWSf03w8.js.map +1 -0
  295. package/dist/testing.d.ts +36 -2
  296. package/dist/testing.js +4 -4
  297. package/dist/tool-class-CVDdJy0H.js +433 -0
  298. package/dist/tool-class-CVDdJy0H.js.map +1 -0
  299. package/dist/{trace-Dx2NBE1O.js → trace-BpXByD7W.js} +13 -2
  300. package/dist/{trace-Dx2NBE1O.js.map → trace-BpXByD7W.js.map} +1 -1
  301. package/dist/{traits-DKnYkqeK.js → traits-CCD8XsmI.js} +2 -2
  302. package/dist/{traits-DKnYkqeK.js.map → traits-CCD8XsmI.js.map} +1 -1
  303. package/dist/{transcript-CCf07UmU.js → transcript-BP_2hji-.js} +3 -3
  304. package/dist/{transcript-CCf07UmU.js.map → transcript-BP_2hji-.js.map} +1 -1
  305. package/dist/{types-DBwFsGem.d.ts → types-BJ0wh8wC.d.ts} +408 -44
  306. package/dist/{types-C2mLpph3.js → types-CbcnJxCy.js} +7 -1
  307. package/dist/types-CbcnJxCy.js.map +1 -0
  308. package/dist/{usage-DJiDnh2D.js → usage-CwIRPPZ9.js} +16 -3
  309. package/dist/usage-CwIRPPZ9.js.map +1 -0
  310. package/dist/{vertex-Eb2wqahk.js → vertex-BEWxHoxH.js} +22 -6
  311. package/dist/{vertex-Eb2wqahk.js.map → vertex-BEWxHoxH.js.map} +1 -1
  312. package/dist/vertex-DXfcXYKn.js +1 -0
  313. package/dist/view/index.d.ts +27 -3
  314. package/dist/view/index.js +8 -8
  315. package/dist/{views-DAIiLiV3.js → views-DRxXCyIH.js} +6 -6
  316. package/dist/{views-DAIiLiV3.js.map → views-DRxXCyIH.js.map} +1 -1
  317. package/dist/views-i67V1ly3.js +2 -0
  318. package/dist/{worker-entry-BIROTPX1.js → worker-entry-C3Q4U63F.js} +12 -9
  319. package/dist/worker-entry-C3Q4U63F.js.map +1 -0
  320. package/dist/workspace-DhUOW8if.js +1 -0
  321. package/dist/{workspace-uuE51x35.js → workspace-P72SXLXr.js} +7 -7
  322. package/dist/{workspace-uuE51x35.js.map → workspace-P72SXLXr.js.map} +1 -1
  323. package/package.json +21 -10
  324. package/skills/eval-rubric/SKILL.md +10 -0
  325. package/skills/reeval/SKILL.md +370 -0
  326. package/skills/reeval/references/capture.md +48 -0
  327. package/skills/reeval/references/cli.md +162 -0
  328. package/skills/reeval/references/compare.md +180 -0
  329. package/skills/reeval/references/config.md +147 -0
  330. package/skills/reeval/references/environments.md +218 -0
  331. package/skills/reeval/references/evals.md +241 -0
  332. package/skills/reeval/references/mistakes.md +39 -0
  333. package/skills/reeval/references/vocabulary.md +19 -0
  334. package/skills/setup/SKILL.md +219 -0
  335. package/skills/setup/references/templates.md +258 -0
  336. package/dist/adapter-C8xPuXYq.js.map +0 -1
  337. package/dist/agent-CBoLndM7.js.map +0 -1
  338. package/dist/agents-C6zhkxp3.js.map +0 -1
  339. package/dist/app-files-DT5mJyV4.js.map +0 -1
  340. package/dist/assemble-t6h018An.js.map +0 -1
  341. package/dist/attempt-host-CIm1-11m.js.map +0 -1
  342. package/dist/boat-CJCtzfB1.js.map +0 -1
  343. package/dist/capture-DoxFUN3J.js +0 -1
  344. package/dist/cases-Dy0mifal.js +0 -1
  345. package/dist/cases-z9E6DCd5.js.map +0 -1
  346. package/dist/cli-20Fpvs5H.js.map +0 -1
  347. package/dist/cli-spec-Dsr79Qy1.js.map +0 -1
  348. package/dist/client-KM4C5r5_.js +0 -387
  349. package/dist/client-KM4C5r5_.js.map +0 -1
  350. package/dist/command-CRh-cb6Z.js.map +0 -1
  351. package/dist/commands-CWy-WndG.js.map +0 -1
  352. package/dist/config-B9mB1kF5.js.map +0 -1
  353. package/dist/cost-BdRgySQl.js.map +0 -1
  354. package/dist/cost-Cr26Alhq.js +0 -1
  355. package/dist/db-P2fXw4nx.js +0 -2
  356. package/dist/db-zgC1tvKB.js.map +0 -1
  357. package/dist/dist-CAFD1yfv.js.map +0 -1
  358. package/dist/docker-DAMnm3L9.js.map +0 -1
  359. package/dist/doctor-B2PohneB.js.map +0 -1
  360. package/dist/environment-DB8o3hGi.js.map +0 -1
  361. package/dist/eval-source-D3sbAzt-.js.map +0 -1
  362. package/dist/evaluate-CwKeN_fo.js.map +0 -1
  363. package/dist/files-B4KQUiM7.js +0 -1
  364. package/dist/files-C1Rk9FYA.js +0 -1
  365. package/dist/files-C3mCC8Mn.js +0 -1
  366. package/dist/files-Cl7BQ5gE.js.map +0 -1
  367. package/dist/files-DnlA1A7N.js +0 -1
  368. package/dist/harness-DXv2gnaT.js.map +0 -1
  369. package/dist/images-BNgcR77K.js.map +0 -1
  370. package/dist/init-4RPeD-K-.js +0 -1
  371. package/dist/init-DbuZVRrW.js.map +0 -1
  372. package/dist/kinds-C1oY3qyC.js +0 -697
  373. package/dist/kinds-C1oY3qyC.js.map +0 -1
  374. package/dist/layout-Cm85tQYk.js.map +0 -1
  375. package/dist/live-CJCK11nh.js +0 -1
  376. package/dist/matchers-CXLn-1jm.js +0 -148
  377. package/dist/matchers-CXLn-1jm.js.map +0 -1
  378. package/dist/model-Cv4GuTsZ.js +0 -1
  379. package/dist/model-CwwkrCb7.js.map +0 -1
  380. package/dist/options-CHubslQf.js +0 -1
  381. package/dist/plain-BYUf_fUV.js.map +0 -1
  382. package/dist/plan-Cgq9NCEX.js.map +0 -1
  383. package/dist/plugins-BkmPxDiY.js.map +0 -1
  384. package/dist/preflight-4gWSy0Pe.js +0 -1
  385. package/dist/preflight-CtlloeOQ.js.map +0 -1
  386. package/dist/prices-5m3SzMZ3.js.map +0 -1
  387. package/dist/provider-BnUoz4KB.js +0 -1
  388. package/dist/providers-B8xYMeah.js.map +0 -1
  389. package/dist/providers-CVu8e0xS.js +0 -1
  390. package/dist/query-DIfkUcPh.js +0 -1
  391. package/dist/redact-BhjtnjrU.js.map +0 -1
  392. package/dist/remarks-CAvTSq16.js +0 -1
  393. package/dist/remarks-D9Lcd1fF.js.map +0 -1
  394. package/dist/remarks-vtkPmQb9.js.map +0 -1
  395. package/dist/resolve-Do0ZaYH6.js.map +0 -1
  396. package/dist/resolve-amw_2Odz.js +0 -1
  397. package/dist/results-JyuM64gy.js.map +0 -1
  398. package/dist/resume-AW5oXzUc.js.map +0 -1
  399. package/dist/server-2_gUnVvf.js +0 -1
  400. package/dist/shared-Cfi45Bvy.js.map +0 -1
  401. package/dist/source-CY3etKzw.js +0 -1
  402. package/dist/src-6Zzyg4Qd.js +0 -2
  403. package/dist/src-BDhcPtnI.js +0 -2
  404. package/dist/src-BNQznj4z.js.map +0 -1
  405. package/dist/src-BRMsk9nh.js +0 -2
  406. package/dist/src-CV_7DkPa.js.map +0 -1
  407. package/dist/src-Cb2MWozp.js.map +0 -1
  408. package/dist/src-Ck2r_EMT.js.map +0 -1
  409. package/dist/src-DAzaCTcN.js.map +0 -1
  410. package/dist/src-DB7N8TYJ.js +0 -2
  411. package/dist/src-DPDaAYwh.js +0 -2
  412. package/dist/src-Dbk19BiP.js +0 -2
  413. package/dist/src-DtodMT59.js +0 -1
  414. package/dist/src-DvGns8cz.js.map +0 -1
  415. package/dist/src-Dw79VLa3.js.map +0 -1
  416. package/dist/src-KxS91P7L.js.map +0 -1
  417. package/dist/src-T-OeuJLr.js +0 -2
  418. package/dist/src-YvblOrBU.js.map +0 -1
  419. package/dist/src-zntEDlnx.js +0 -3
  420. package/dist/state-kimtIhBP.js +0 -1
  421. package/dist/suite-CKBa6MKt.js +0 -2
  422. package/dist/tart-BTVXp8rz.js +0 -373
  423. package/dist/tart-BTVXp8rz.js.map +0 -1
  424. package/dist/tart-cli-BIC9HqPg.js +0 -37
  425. package/dist/tart-cli-BIC9HqPg.js.map +0 -1
  426. package/dist/tart-cli-BMrkmBjI.js +0 -1
  427. package/dist/tart-images-DZ_Mbh-g.js.map +0 -1
  428. package/dist/tool-target-DS5d72eH.js +0 -40
  429. package/dist/tool-target-DS5d72eH.js.map +0 -1
  430. package/dist/types-C2mLpph3.js.map +0 -1
  431. package/dist/usage-DJiDnh2D.js.map +0 -1
  432. package/dist/vercel-CGlSBv63.js.map +0 -1
  433. package/dist/vertex-O88TCwgY.js +0 -1
  434. package/dist/views-DtRhj2Tn.js +0 -2
  435. package/dist/worker-entry-BIROTPX1.js.map +0 -1
  436. package/dist/workspace-CcQRT31C.js +0 -1
@@ -1,18 +1,11 @@
1
+ import { a as providerEndpoints, c as providerServedModel, o as providerHosts, s as providerModelResponses, u as resolveOpenCodeProvider } from "./opencode-providers-ChJTQRmz.js";
2
+ import { t as piProvider } from "./pi-providers-HygmL1y-.js";
3
+ import { D as pluginServerName, G as takesHarness, P as capabilitiesOf, U as sandboxKind, W as suggestedSandbox, a as PLUGIN_PARTS, n as PLUGIN_DIR, r as PLUGIN_MANIFEST, t as PART_PATHS } from "./plugins-BioMWncI.js";
1
4
  import { o as withoutBom } from "./text-B8-W3Cvn.js";
2
- import { d as sandboxKind, f as suggestedSandbox, n as capabilitiesOf, p as takesHarness } from "./kinds-C1oY3qyC.js";
3
- import { a as providerEndpoints, c as providerServedModel, o as providerHosts, s as providerModelResponses, u as resolveOpenCodeProvider } from "./opencode-providers-BGiXt8_B.js";
4
- import { a as VERCEL_KEY, c as servedOnVercel, i as VERCEL_HOST, n as FX_VERCEL_ENDPOINTS, r as VERCEL_GATEWAY, s as fxAskedModel, t as FX_VERCEL_CALL, u as OPENROUTER_GATEWAY } from "./vercel-CGlSBv63.js";
5
- import { a as VERTEX_ROUTES, t as SANDBOX_ACCESS_TOKEN } from "./vertex-Eb2wqahk.js";
6
- import { D as pluginServerName, a as PLUGIN_PARTS, n as PLUGIN_DIR, r as PLUGIN_MANIFEST, t as PART_PATHS } from "./plugins-BkmPxDiY.js";
7
- import { t as InfraError } from "./types-C2mLpph3.js";
8
- // src/gateway/routes.ts
9
- /** Every gateway that brokers a key, by name. */
10
- const ROUTING_GATEWAYS = {
11
- vercel: VERCEL_GATEWAY,
12
- openrouter: OPENROUTER_GATEWAY
13
- };
14
- /** Whether a harness's `gateway` names one of {@link ROUTING_GATEWAYS}. */
15
- const isRoutingGateway = (name) => name !== void 0 && Object.hasOwn(ROUTING_GATEWAYS, name);
5
+ import { a as FX_VERCEL_ENDPOINTS, i as FX_VERCEL_CALL, l as fxAskedModel, n as isRoutingGateway, o as VERCEL_HOST, r as onRoutingGateway, s as VERCEL_KEY, t as ROUTING_GATEWAYS, u as servedOnVercel } from "./routes-B0F2R-K7.js";
6
+ import { a as VERTEX_ROUTES, t as SANDBOX_ACCESS_TOKEN } from "./vertex-BEWxHoxH.js";
7
+ import { r as modelLimits } from "./prices-BrY_ihLs.js";
8
+ import { t as InfraError } from "./types-CbcnJxCy.js";
16
9
  // src/harness/agents.ts
17
10
  const WEB_EVENTS = {
18
11
  webSearch: "web-search",
@@ -23,6 +16,22 @@ function cursorUnreported(harnessMetadata) {
23
16
  const tools = harnessMetadata?.cursorSdk?.unreportedTools;
24
17
  return Array.isArray(tools) ? tools.flatMap((t) => WEB_EVENTS[t] ? [WEB_EVENTS[t]] : []) : [];
25
18
  }
19
+ const usdIn = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0 ? v : void 0;
20
+ /** Claude Code's `total_cost_usd`, its session's cost so far, as its bridge reports it. */
21
+ function claudeCodeCost(harnessMetadata) {
22
+ const meta = harnessMetadata?.["claude-code"];
23
+ const usd = usdIn(meta?.costUsd);
24
+ if (usd === void 0) return void 0;
25
+ return {
26
+ usd,
27
+ session: typeof meta?.sessionId === "string" ? meta.sessionId : ""
28
+ };
29
+ }
30
+ /** The sum of the turn's model calls' `cost.total`, which pi prices itself. */
31
+ function piCost(harnessMetadata) {
32
+ const usd = usdIn(harnessMetadata?.pi?.costUsd);
33
+ return usd === void 0 ? void 0 : { usd };
34
+ }
26
35
  /** A Gemini API key's only request: `POST /v1beta/models/<model>:streamGenerateContent`. */
27
36
  const GEMINI_ENDPOINTS = [{
28
37
  host: "generativelanguage.googleapis.com",
@@ -73,6 +82,12 @@ const XAI_MODEL_RESPONSES = XAI_ENDPOINTS.filter((e) => e.path.exact === "/v1/ch
73
82
  const xaiServedModel = ({ host, responseModel }) => host === "api.x.ai" ? responseModel : void 0;
74
83
  /** The model a Gemini API request names in its URL. */
75
84
  const geminiServedModel = ({ host, path }) => host === "generativelanguage.googleapis.com" ? /^\/v1beta\/models\/([^/:]+):streamGenerateContent$/.exec(path)?.[1] : void 0;
85
+ /** Cursor's agent stream: one call per turn, which carries the turn's model output and tool calls. */
86
+ const CURSOR_RUN = {
87
+ host: "api2.cursor.sh",
88
+ path: { exact: "/agent.v1.AgentService/RunSSE" },
89
+ method: ["POST"]
90
+ };
76
91
  /** Cursor's key exchange: the only request the Cursor SDK sends the API key on. */
77
92
  const CURSOR_EXCHANGE = {
78
93
  host: "api2.cursor.sh",
@@ -110,6 +125,7 @@ function opencodeForModel(model, env = process.env) {
110
125
  credential: provider.env,
111
126
  endpoints: providerEndpoints(provider),
112
127
  ...modelResponses.length ? { modelResponses } : {},
128
+ modelCalls: providerEndpoints(provider).filter((e) => e.method.includes("POST")),
113
129
  servedModel: (request) => providerServedModel(provider, request),
114
130
  hosts: [...providerHosts(provider), "mcp.exa.ai"]
115
131
  };
@@ -123,6 +139,141 @@ function opencodeVars(model, env = process.env) {
123
139
  if ("error" in resolved) throw new InfraError(`opencode(): ${resolved.error}`);
124
140
  return resolved.vars;
125
141
  }
142
+ /** The `<provider>` a pi or Goose model id, `<provider>/<model>`, names. */
143
+ const providerOf = (model) => model.slice(0, Math.max(model.indexOf("/"), 0));
144
+ /** The model id pi or Goose asks its provider for: the id without its `<provider>/`. */
145
+ const withoutProvider = (model) => model.slice(model.indexOf("/") + 1);
146
+ /** reeval's name for a provider's key where it isn't the agent's: Google's, which the judge reads too. */
147
+ const HOST_CREDENTIAL = { google: "GOOGLE_GENERATIVE_AI_API_KEY" };
148
+ /** A provider's model calls: the POST requests among those its key is sent on. */
149
+ const modelCallsOf = (endpoints) => endpoints.filter((e) => e.method?.includes("POST"));
150
+ /** The model a response from `hosts`' model calls names. */
151
+ const respondedOn = (...hosts) => (request) => hosts.includes(request.host) && request.method === "POST" ? request.responseModel : void 0;
152
+ /**
153
+ * pi on the model's provider (`xai/grok-4.5` is xAI's), from the table probed on the pinned pi
154
+ * (harness-pi's pi-provider-table.ts): its key, the requests pi sends it on, their hosts, and the
155
+ * served model from a Gemini API's URL or the response body. Throws naming why reeval can't run a
156
+ * provider pi has, or that pi has none of that name.
157
+ */
158
+ function piForModel(model) {
159
+ const id = providerOf(model);
160
+ const provider = piProvider(id);
161
+ if ("refused" in provider) throw new InfraError(`pi(): ${directProviderRefusal("pi", model)}`);
162
+ const endpoints = provider.endpoints.map(({ host, method, path }) => ({
163
+ host,
164
+ method,
165
+ path
166
+ }));
167
+ const hosts = [...new Set(endpoints.map((e) => e.host))];
168
+ const inUrl = provider.endpoints.some((e) => e.api === "google-generative-ai");
169
+ const modelResponses = provider.endpoints.filter((e) => e.api !== "google-generative-ai").map(({ host, method, path }) => ({
170
+ host,
171
+ method,
172
+ path
173
+ }));
174
+ return {
175
+ credential: HOST_CREDENTIAL[id] ?? provider.credentialEnv,
176
+ authAs: provider.credentialEnv,
177
+ endpoints,
178
+ modelCalls: modelCallsOf(endpoints),
179
+ ...modelResponses.length ? { modelResponses } : {},
180
+ servedModel: (request) => openaiServedModel(request) ?? (inUrl && hosts.includes(request.host) ? /\/models\/([^/:]+):streamGenerateContent$/.exec(request.path)?.[1] : void 0) ?? respondedOn(...hosts)(request),
181
+ hosts
182
+ };
183
+ }
184
+ /** A provider pi runs on its own key; throws naming why reeval can't run one. */
185
+ function keyed(provider) {
186
+ if ("refused" in provider) throw new InfraError(`pi(): ${provider.refused}`);
187
+ return provider;
188
+ }
189
+ /** Anthropic's Messages API, whose response names the model that served it. */
190
+ const ANTHROPIC_MESSAGES = [{
191
+ host: "api.anthropic.com",
192
+ path: { exact: "/v1/messages" },
193
+ method: ["POST"]
194
+ }];
195
+ /** OpenAI's Chat Completions API, whose response names the model that served it. */
196
+ const OPENAI_CHAT = [{
197
+ host: "api.openai.com",
198
+ path: { exact: "/v1/chat/completions" },
199
+ method: ["POST"]
200
+ }];
201
+ /** xAI's Chat Completions API, which Goose's OpenAI-compatible `xai` provider calls. */
202
+ const XAI_CHAT = [{
203
+ host: "api.x.ai",
204
+ path: { exact: "/v1/chat/completions" },
205
+ method: ["POST"]
206
+ }];
207
+ /**
208
+ * Goose on each provider reeval brokers its key for (Goose's `google`, `anthropic`, `openai` and
209
+ * `xai`): its model calls and the model list it fetches.
210
+ */
211
+ const GOOSE_DIRECT = {
212
+ google: {
213
+ credential: "GOOGLE_GENERATIVE_AI_API_KEY",
214
+ authAs: "GOOGLE_API_KEY",
215
+ endpoints: GOOSE_ENDPOINTS,
216
+ servedModel: geminiServedModel,
217
+ hosts: ["generativelanguage.googleapis.com"]
218
+ },
219
+ anthropic: {
220
+ credential: "ANTHROPIC_API_KEY",
221
+ authAs: "ANTHROPIC_API_KEY",
222
+ endpoints: [...ANTHROPIC_MESSAGES, {
223
+ host: "api.anthropic.com",
224
+ path: { exact: "/v1/models" },
225
+ method: ["GET"]
226
+ }],
227
+ modelResponses: ANTHROPIC_MESSAGES,
228
+ servedModel: respondedOn("api.anthropic.com"),
229
+ hosts: ["api.anthropic.com"]
230
+ },
231
+ openai: {
232
+ credential: "OPENAI_API_KEY",
233
+ authAs: "OPENAI_API_KEY",
234
+ endpoints: [
235
+ ...OPENAI_CHAT,
236
+ ...OPENAI_MODEL_ENDPOINTS,
237
+ {
238
+ host: "api.openai.com",
239
+ path: { exact: "/v1/models" },
240
+ method: ["GET"]
241
+ }
242
+ ],
243
+ modelResponses: [...OPENAI_CHAT, ...OPENAI_MODEL_ENDPOINTS],
244
+ servedModel: (request) => openaiServedModel(request) ?? respondedOn("api.openai.com")(request),
245
+ hosts: ["api.openai.com"]
246
+ },
247
+ xai: {
248
+ credential: "XAI_API_KEY",
249
+ authAs: "XAI_API_KEY",
250
+ endpoints: [...XAI_CHAT, {
251
+ host: "api.x.ai",
252
+ path: { exact: "/v1/models" },
253
+ method: ["GET"]
254
+ }],
255
+ modelResponses: XAI_CHAT,
256
+ servedModel: xaiServedModel,
257
+ hosts: ["api.x.ai"]
258
+ }
259
+ };
260
+ /** The Goose providers reeval runs on their own keys, for messages. */
261
+ const GOOSE_PROVIDERS = Object.keys(GOOSE_DIRECT);
262
+ /** Goose on the model's provider; throws naming the providers reeval brokers a key for. */
263
+ function gooseForModel(model) {
264
+ const direct = GOOSE_DIRECT[providerOf(model)];
265
+ if (!direct) throw new InfraError(`goose(): ${directProviderRefusal("goose", model)}`);
266
+ return {
267
+ ...direct,
268
+ modelCalls: modelCallsOf(direct.endpoints)
269
+ };
270
+ }
271
+ /** Why pi or Goose can't run `model` on its provider's own key, or undefined when it can. */
272
+ function directProviderRefusal(kind, model) {
273
+ if (kind === "goose") return GOOSE_DIRECT[providerOf(model)] ? void 0 : `reeval runs Goose on its own key for its ${GOOSE_PROVIDERS.join(", ")} providers, so not ${model}: where Goose's other providers send their keys isn't probed yet. Run it through a gateway`;
274
+ const provider = piProvider(providerOf(model));
275
+ return "refused" in provider ? `${provider.refused}, so not ${model}` : void 0;
276
+ }
126
277
  /** Codex's `config.toml` `[mcp_servers]` shape. */
127
278
  function codexMcpServers(servers) {
128
279
  return Object.fromEntries(Object.entries(servers).map(([name, s]) => {
@@ -504,6 +655,7 @@ const LAYOUTS = {
504
655
  rulesFile: "AGENTS.md",
505
656
  workspaceSkillDir: ".agents/skills",
506
657
  harnessSkillDir: ".gemini/config/skills",
658
+ builtinSkillDirs: [".gemini/antigravity-cli/builtin/skills"],
507
659
  pluginPlacement: "namespaced",
508
660
  pluginHookEvents: [
509
661
  "SessionStart",
@@ -516,6 +668,7 @@ const LAYOUTS = {
516
668
  rulesFile: "AGENTS.md",
517
669
  workspaceSkillDir: ".opencode/skills",
518
670
  harnessSkillDir: ".config/opencode/skills",
671
+ alsoReadsSkillDirs: [".claude/skills", ".agents/skills"],
519
672
  pluginPlacement: "flat",
520
673
  pluginUnpack: OPENCODE_PLUGIN_UNPACK
521
674
  },
@@ -523,6 +676,7 @@ const LAYOUTS = {
523
676
  rulesFile: "AGENTS.md",
524
677
  workspaceSkillDir: ".goose/skills",
525
678
  harnessSkillDir: ".ai-sdk-harness/.harness-bootstrap/goose/home/.config/goose/skills",
679
+ alsoReadsSkillDirs: [".agents/skills", ".claude/skills"],
526
680
  pluginPlacement: "flat"
527
681
  },
528
682
  pi: {
@@ -548,6 +702,7 @@ const LAYOUTS = {
548
702
  rulesFile: "AGENTS.md",
549
703
  workspaceSkillDir: ".grok/skills",
550
704
  harnessSkillDir: ".ai-sdk-harness/.harness-bootstrap/grok-build/home/.grok/skills",
705
+ alsoReadsSkillDirs: [".agents/skills", ".claude/skills"],
551
706
  pluginPlacement: "namespaced"
552
707
  }
553
708
  };
@@ -558,11 +713,13 @@ const AGENTS = {
558
713
  pluginParts: PLUGIN_PARTS,
559
714
  name: "Cursor",
560
715
  factory: "cursor",
561
- platforms: ["linux"],
716
+ platforms: ["linux", "darwin"],
562
717
  reasoning: "streamed",
563
718
  reasoningTokens: false,
564
719
  credential: "CURSOR_API_KEY",
565
720
  endpoints: [CURSOR_EXCHANGE],
721
+ modelCalls: [CURSOR_RUN],
722
+ modelStream: true,
566
723
  tokens: {
567
724
  endpoint: CURSOR_EXCHANGE,
568
725
  fields: ["accessToken", "refreshToken"],
@@ -570,7 +727,7 @@ const AGENTS = {
570
727
  },
571
728
  unreported: cursorUnreported,
572
729
  mcpServers: cursorMcpServers,
573
- adapter: async ({ auth, mcpServers, descriptor }) => (await import("./src-6Zzyg4Qd.js")).createCursorSdk({
730
+ adapter: async ({ auth, mcpServers, descriptor }) => (await import("./src-CeBhwD8k.js")).createCursorSdk({
574
731
  auth,
575
732
  ...mcpServers ? { mcpServers } : {},
576
733
  ...descriptor.kind === "cursor" && descriptor.params ? { modelParams: descriptor.params } : {},
@@ -583,11 +740,19 @@ const AGENTS = {
583
740
  pluginParts: CLAUDE_FORMAT_PARTS,
584
741
  name: "Claude Code",
585
742
  factory: "claudeCode",
586
- platforms: ["linux"],
743
+ bridgePort: true,
744
+ platforms: ["linux", "darwin"],
587
745
  reasoning: "streamed",
588
- reasoningTokens: false,
746
+ reasoningTokens: true,
589
747
  subagentCalls: true,
748
+ reportedCost: claudeCodeCost,
590
749
  credential: "ANTHROPIC_API_KEY",
750
+ fallbackCredentials: ["CLAUDE_CODE_OAUTH_TOKEN"],
751
+ modelCalls: [{
752
+ host: "api.anthropic.com",
753
+ path: { exact: "/v1/messages" },
754
+ method: ["POST"]
755
+ }],
591
756
  endpoints: [
592
757
  {
593
758
  host: "api.anthropic.com",
@@ -611,7 +776,7 @@ const AGENTS = {
611
776
  }
612
777
  ],
613
778
  mcpServers: claudeMcpServers,
614
- adapter: async ({ auth, env, mcpServers, descriptor }) => (await import("./dist-CAFD1yfv.js")).createClaudeCode({
779
+ adapter: async ({ auth, env, mcpServers, descriptor }) => (await import("./dist-DeqeCUZe.js")).createClaudeCode({
615
780
  auth,
616
781
  ...mcpServers ? { mcpServers } : {},
617
782
  ...descriptor.kind === "claude-code" && descriptor.effort ? { effort: descriptor.effort } : {},
@@ -633,18 +798,20 @@ const AGENTS = {
633
798
  ],
634
799
  name: "Antigravity",
635
800
  factory: "antigravity",
636
- platforms: ["linux"],
637
- reasoning: "none",
801
+ keychainTrust: true,
802
+ platforms: ["linux", "darwin"],
803
+ reasoning: "recovered",
638
804
  reasoningTokens: true,
639
805
  credential: "GEMINI_API_KEY",
640
806
  endpoints: ANTIGRAVITY_ENDPOINTS,
807
+ modelCalls: ANTIGRAVITY_ENDPOINTS,
641
808
  expectedBlocked: {
642
809
  hosts: ["play.googleapis.com", "antigravity-unleash.goog"],
643
810
  why: "Antigravity's telemetry and feature flags, which its CLI sends even with telemetry off"
644
811
  },
645
812
  servedModel: geminiServedModel,
646
813
  mcpServers: antigravityMcpServers,
647
- adapter: async ({ auth, mcpServers, descriptor, plugins, vertex }) => (await import("./src-T-OeuJLr.js")).createAntigravity({
814
+ adapter: async ({ auth, mcpServers, descriptor, plugins, vertex }) => (await import("./src-C-mOSczH.js")).createAntigravity({
648
815
  auth,
649
816
  ...vertex ? { vertex } : {},
650
817
  ...mcpServers ? { mcpServers } : {},
@@ -666,16 +833,21 @@ const AGENTS = {
666
833
  ],
667
834
  name: "OpenCode",
668
835
  factory: "opencode",
669
- platforms: ["linux"],
836
+ bridgePort: true,
837
+ platforms: ["linux", "darwin"],
670
838
  configuredModelOnStart: true,
671
839
  reasoning: "streamed",
672
840
  reasoningTokens: "provider",
673
- credential: "GOOGLE_GENERATIVE_AI_API_KEY",
674
- endpoints: GEMINI_ENDPOINTS,
675
- servedModel: geminiServedModel,
841
+ storedUsage: async () => {
842
+ const m = await import("./src-CZaYu6ER.js");
843
+ return {
844
+ command: m.openCodeStoredUsageCommand,
845
+ parse: m.parseOpenCodeStoredUsage
846
+ };
847
+ },
676
848
  forModel: opencodeForModel,
677
849
  mcpServers: opencodeMcpServers,
678
- adapter: async ({ auth, mcpServers, descriptor, model, vertex }) => (await import("./src-zntEDlnx.js")).createOpenCode({
850
+ adapter: async ({ auth, mcpServers, descriptor, model, vertex }) => (await import("./src-CZaYu6ER.js")).createOpenCode({
679
851
  auth,
680
852
  model,
681
853
  ...vertex ? { vertex } : { vars: opencodeVars(model) },
@@ -689,32 +861,48 @@ const AGENTS = {
689
861
  pluginParts: ["skills", "mcp"],
690
862
  name: "Goose",
691
863
  factory: "goose",
692
- platforms: ["linux"],
864
+ keychainTrust: true,
865
+ bridgePort: true,
866
+ platforms: ["linux", "darwin"],
693
867
  configuredModelOnStart: true,
694
868
  reasoning: "streamed",
695
869
  reasoningTokens: false,
696
- credential: "GOOGLE_GENERATIVE_AI_API_KEY",
697
- endpoints: GOOSE_ENDPOINTS,
870
+ storedUsage: async () => {
871
+ const m = await import("./src-CkEiiyON.js");
872
+ return {
873
+ command: m.gooseStoredUsageCommand,
874
+ parse: m.parseGooseStoredUsage,
875
+ mark: m.gooseUsageMark
876
+ };
877
+ },
878
+ forModel: gooseForModel,
879
+ modelId: withoutProvider,
698
880
  expectedBlocked: {
699
881
  hosts: ["models.dev"],
700
882
  why: "Goose's model catalog refresh, which no setting turns off"
701
883
  },
702
- servedModel: geminiServedModel,
703
884
  mcpServers: gooseMcpServers,
704
- adapter: async ({ auth, mcpServers, descriptor, model, vertex }) => (await import("./src-BRMsk9nh.js")).createGoose({
705
- ...vertex ? { vertex } : {},
706
- ...auth["AI_GATEWAY_API_KEY"] ? {
707
- auth,
708
- provider: (await import("./src-BRMsk9nh.js")).AI_GATEWAY_PROVIDER
709
- } : auth["OPENROUTER_API_KEY"] ? {
885
+ adapter: async ({ auth, mcpServers, descriptor, model, vertex }) => {
886
+ const goose = await import("./src-CkEiiyON.js");
887
+ const direct = {
888
+ google: goose.GEMINI_PROVIDER,
889
+ anthropic: goose.ANTHROPIC_PROVIDER,
890
+ openai: goose.OPENAI_PROVIDER,
891
+ xai: goose.XAI_PROVIDER
892
+ };
893
+ const provider = onRoutingGateway(descriptor, {
894
+ vercel: goose.AI_GATEWAY_PROVIDER,
895
+ openrouter: goose.OPENROUTER_PROVIDER
896
+ }) ?? direct[providerOf(descriptor.model)];
897
+ return goose.createGoose({
898
+ ...vertex ? { vertex } : provider ? { provider } : {},
710
899
  auth,
711
- provider: (await import("./src-BRMsk9nh.js")).OPENROUTER_PROVIDER
712
- } : { auth: { GOOGLE_API_KEY: auth.GOOGLE_GENERATIVE_AI_API_KEY ?? "" } },
713
- model,
714
- ...descriptor.kind === "goose" && descriptor.effort ? { effort: descriptor.effort } : {},
715
- ...mcpServers ? { mcpServers } : {},
716
- requireCredentialBrokering: true
717
- })
900
+ model,
901
+ ...descriptor.kind === "goose" && descriptor.effort ? { effort: descriptor.effort } : {},
902
+ ...mcpServers ? { mcpServers } : {},
903
+ requireCredentialBrokering: true
904
+ });
905
+ }
718
906
  },
719
907
  pi: {
720
908
  ...LAYOUTS.pi,
@@ -725,28 +913,31 @@ const AGENTS = {
725
913
  ],
726
914
  name: "pi",
727
915
  factory: "pi",
728
- platforms: ["linux"],
916
+ platforms: ["linux", "darwin"],
729
917
  reasoning: "streamed",
730
918
  reasoningTokens: true,
731
- credential: "GOOGLE_GENERATIVE_AI_API_KEY",
732
- endpoints: GEMINI_ENDPOINTS,
733
- servedModel: geminiServedModel,
919
+ reportedCost: piCost,
920
+ forModel: piForModel,
921
+ modelId: withoutProvider,
734
922
  mcpServers: piMcpServers,
735
- adapter: async ({ auth, mcpServers, descriptor, vertex }) => (await import("./src-BDhcPtnI.js")).createPi({
736
- ...auth["AI_GATEWAY_API_KEY"] ? {
737
- auth,
738
- gateway: (await import("./src-BDhcPtnI.js")).PI_AI_GATEWAY
739
- } : auth["OPENROUTER_API_KEY"] ? {
923
+ adapter: async ({ auth, mcpServers, descriptor, model, vertex }) => {
924
+ const pi = await import("./src-DA95rM6v.js");
925
+ const gateway = onRoutingGateway(descriptor, {
926
+ vercel: pi.PI_AI_GATEWAY,
927
+ openrouter: pi.PI_OPENROUTER
928
+ });
929
+ const modelInfo = gateway && model && !pi.piGatewayDescribes(gateway, model) ? await modelLimits(model) : void 0;
930
+ return pi.createPi({
740
931
  auth,
741
- gateway: (await import("./src-BDhcPtnI.js")).PI_OPENROUTER
742
- } : {
743
- auth: { GEMINI_API_KEY: auth.GOOGLE_GENERATIVE_AI_API_KEY ?? "" },
744
- ...vertex ? { vertex } : {}
745
- },
746
- ...descriptor.kind === "pi" && descriptor.effort ? { effort: descriptor.effort } : {},
747
- ...mcpServers ? { mcpServers } : {},
748
- requireCredentialBrokering: true
749
- })
932
+ ...gateway ? {
933
+ gateway,
934
+ ...modelInfo ? { modelInfo } : {}
935
+ } : vertex ? { vertex } : { provider: keyed(piProvider(providerOf(descriptor.model))) },
936
+ ...descriptor.kind === "pi" && descriptor.effort ? { effort: descriptor.effort } : {},
937
+ ...mcpServers ? { mcpServers } : {},
938
+ requireCredentialBrokering: true
939
+ });
940
+ }
750
941
  },
751
942
  codex: {
752
943
  ...LAYOUTS.codex,
@@ -757,9 +948,18 @@ const AGENTS = {
757
948
  pluginServersByName: true,
758
949
  name: "Codex",
759
950
  factory: "codex",
760
- platforms: ["linux"],
951
+ keychainTrust: true,
952
+ platforms: ["linux", "darwin"],
761
953
  reasoning: "whole",
762
954
  reasoningTokens: true,
955
+ storedUsage: async () => {
956
+ const m = await import("./src--yl1OypK.js");
957
+ return {
958
+ command: m.codexStoredUsageCommand,
959
+ parse: m.parseCodexStoredUsage
960
+ };
961
+ },
962
+ fullToolOutput: "all",
763
963
  credential: "OPENAI_API_KEY",
764
964
  endpoints: OPENAI_ENDPOINTS,
765
965
  modelResponses: OPENAI_MODEL_ENDPOINTS,
@@ -774,34 +974,46 @@ const AGENTS = {
774
974
  },
775
975
  servedModel: openaiServedModel,
776
976
  mcpServers: codexMcpServers,
777
- adapter: async ({ auth, mcpServers, descriptor, plugins }) => (await import("./src-DB7N8TYJ.js")).createCodex({
778
- auth,
779
- ...auth["AI_GATEWAY_API_KEY"] ? { provider: (await import("./src-DB7N8TYJ.js")).AI_GATEWAY_PROVIDER } : auth["OPENROUTER_API_KEY"] ? { provider: (await import("./src-DB7N8TYJ.js")).OPENROUTER_PROVIDER } : {},
780
- ...descriptor.kind === "codex" && descriptor.effort ? { effort: descriptor.effort } : {},
781
- ...mcpServers ? { mcpServers } : {},
782
- ...plugins.length ? { plugins: plugins.map(({ name, dir }) => ({
783
- name,
784
- dir
785
- })) } : {},
786
- requireCredentialBrokering: true
787
- })
977
+ adapter: async ({ auth, mcpServers, descriptor, plugins }) => {
978
+ const codex = await import("./src--yl1OypK.js");
979
+ const provider = onRoutingGateway(descriptor, {
980
+ vercel: codex.AI_GATEWAY_PROVIDER,
981
+ openrouter: codex.OPENROUTER_PROVIDER
982
+ });
983
+ return codex.createCodex({
984
+ auth,
985
+ ...provider ? { provider } : {},
986
+ ...descriptor.kind === "codex" && descriptor.effort ? { effort: descriptor.effort } : {},
987
+ ...mcpServers ? { mcpServers } : {},
988
+ ...plugins.length ? { plugins: plugins.map(({ name, dir }) => ({
989
+ name,
990
+ dir
991
+ })) } : {},
992
+ requireCredentialBrokering: true
993
+ });
994
+ }
788
995
  },
789
996
  fx: {
790
997
  ...LAYOUTS.fx,
791
998
  pluginParts: ["skills", "mcp"],
792
999
  name: "fx",
793
1000
  factory: "fx",
794
- platforms: ["linux"],
1001
+ bridgePort: true,
1002
+ platforms: ["linux", "darwin"],
795
1003
  configuredModelOnStart: true,
796
1004
  reasoning: "streamed",
797
1005
  reasoningTokens: "provider",
1006
+ fullToolOutput: ["bash"],
798
1007
  ...fxForModel("provider/model"),
799
1008
  forModel: fxForModel,
800
1009
  mcpServers: acpMcpServers,
801
- adapter: async ({ auth, env, mcpServers, model, descriptor }) => (await import("./src-DPDaAYwh.js")).createFx({
1010
+ adapter: async ({ auth, env, mcpServers, model, descriptor }) => (await import("./src-CwH_nEaw.js")).createFx({
802
1011
  auth,
803
1012
  model,
804
- ...auth["OPENROUTER_API_KEY"] ? { provider: "openrouter" } : {},
1013
+ ...onRoutingGateway(descriptor, {
1014
+ vercel: {},
1015
+ openrouter: { provider: "openrouter" }
1016
+ }),
805
1017
  ...env?.FX_VERTEX_PROJECT ? { vertex: {
806
1018
  project: env.FX_VERTEX_PROJECT,
807
1019
  location: env.FX_VERTEX_LOCATION ?? ""
@@ -817,24 +1029,36 @@ const AGENTS = {
817
1029
  pluginServersByName: true,
818
1030
  name: "Grok Build",
819
1031
  factory: "grokBuild",
820
- platforms: ["linux"],
1032
+ keychainTrust: true,
1033
+ bridgePort: true,
1034
+ platforms: ["linux", "darwin"],
821
1035
  configuredModelOnStart: true,
822
1036
  reasoning: "streamed",
823
1037
  reasoningTokens: true,
1038
+ storedUsage: async () => {
1039
+ const m = await import("./src-De0KY5S_.js");
1040
+ return {
1041
+ command: m.grokStoredUsageCommand,
1042
+ parse: m.parseGrokStoredUsage
1043
+ };
1044
+ },
824
1045
  credential: "XAI_API_KEY",
825
1046
  endpoints: XAI_ENDPOINTS,
826
1047
  modelResponses: XAI_MODEL_RESPONSES,
827
1048
  servedModel: xaiServedModel,
828
1049
  mcpServers: acpMcpServers,
829
1050
  adapter: async ({ auth, mcpServers, descriptor, plugins, model, vertexChat }) => {
830
- const grok = await import("./src-Dbk19BiP.js");
1051
+ const grok = await import("./src-De0KY5S_.js");
831
1052
  return grok.createGrokBuild({
832
1053
  ...vertexChat ? {
833
1054
  auth: { [grok.VERTEX_TOKEN_ENV]: SANDBOX_ACCESS_TOKEN },
834
1055
  provider: grok.vertexProvider(vertexChat.project, vertexChat.region)
835
1056
  } : {
836
1057
  auth,
837
- ...auth["AI_GATEWAY_API_KEY"] ? { provider: grok.AI_GATEWAY_PROVIDER } : auth["OPENROUTER_API_KEY"] ? { provider: grok.OPENROUTER_PROVIDER } : {}
1058
+ ...onRoutingGateway(descriptor, {
1059
+ vercel: { provider: grok.AI_GATEWAY_PROVIDER },
1060
+ openrouter: { provider: grok.OPENROUTER_PROVIDER }
1061
+ })
838
1062
  },
839
1063
  model,
840
1064
  ...plugins.length ? {
@@ -883,7 +1107,7 @@ function unverifiedHarness(harness, sandbox) {
883
1107
  const kind = sandboxKind(sandbox);
884
1108
  const names = (capabilities.harnesses === "all" ? [] : capabilities.harnesses).flatMap((k) => isAgentKind(k) ? [AGENTS[k].name] : []);
885
1109
  const elsewhere = suggestedSandbox((c) => c.harnessSession && takesHarness(c, harness.kind));
886
- return `The ${AGENTS[harness.kind].name} harness doesn't run in the ${kind.provider(sandbox)} sandbox yet: it runs ${names.join(", ") || "no real harness"} so far. ${kind.unverifiedHarnesses ?? `Run it in ${elsewhere}.`}`;
1110
+ return `The ${AGENTS[harness.kind].name} harness doesn't run in the ${kind.provider(sandbox)} sandbox yet: it runs ${names.length > 1 ? `${names.slice(0, -1).join(", ")} and ${names.at(-1)}` : names[0] || "no real harness"} so far. ${kind.unverifiedHarnesses ?? `Run it in ${elsewhere}.`}`;
887
1111
  }
888
1112
  /**
889
1113
  * Why a harness's agent can't take the environment's MCP servers (Goose, OpenCode, pi and Codex
@@ -1036,12 +1260,13 @@ function refusedPlugins(harness, plugins, own, unread = []) {
1036
1260
  */
1037
1261
  function agentFor(h, vertex) {
1038
1262
  const agent = AGENTS[h.kind];
1263
+ const { fallbackCredentials: _, ...routed } = agent;
1039
1264
  if (h.gateway === "vertex") {
1040
1265
  const route = VERTEX_ROUTES[h.kind];
1041
1266
  if (!route) throw new InfraError(`reeval doesn't run ${agent.name} on Vertex AI`);
1042
1267
  if (!vertex) throw new InfraError(`${agent.name} on Vertex AI has no vertex() settings`);
1043
1268
  return {
1044
- ...agent,
1269
+ ...routed,
1045
1270
  ...route(vertex)
1046
1271
  };
1047
1272
  }
@@ -1050,10 +1275,14 @@ function agentFor(h, vertex) {
1050
1275
  const route = gateway.routes[h.kind];
1051
1276
  if (!route) throw new InfraError(`reeval doesn't run ${agent.name} on ${gateway.name}`);
1052
1277
  return {
1053
- ...agent,
1278
+ ...routed,
1054
1279
  ...route(process.env)
1055
1280
  };
1056
1281
  }
1282
+ if (agent.credential === void 0) return {
1283
+ ...agent,
1284
+ ...agent.forModel(h.model)
1285
+ };
1057
1286
  return agent.forModel ? {
1058
1287
  ...agent,
1059
1288
  ...agent.forModel(h.model)
@@ -1061,11 +1290,15 @@ function agentFor(h, vertex) {
1061
1290
  }
1062
1291
  /** The catalog entry for a harness's agent; undefined for the fake harness. */
1063
1292
  const agentOf = (h, vertex) => h.kind === "fake" ? void 0 : agentFor(h, vertex);
1293
+ /** The host variables an agent authenticates with, any one of which will do: `credential` first. */
1294
+ const credentialsOf = (agent) => [agent.credential, ...agent.fallbackCredentials ?? []];
1295
+ /** The host variable the agent authenticates with in `env`: the first set, else `credential`. */
1296
+ const credentialIn = (agent, env = process.env) => credentialsOf(agent).find((name) => env[name]) ?? agent.credential;
1064
1297
  /**
1065
- * The host variable a harness authenticates with; undefined for the fake harness, and on Vertex,
1066
- * whose token comes from Application Default Credentials.
1298
+ * The host variables a harness authenticates with, any one of which will do; none for the fake
1299
+ * harness, and on Vertex, whose token comes from Application Default Credentials.
1067
1300
  */
1068
- const credentialOf = (h) => h.kind === "fake" || h.gateway === "vertex" ? void 0 : agentFor(h).credential;
1301
+ const harnessCredentials = (h) => h.kind === "fake" || h.gateway === "vertex" ? [] : credentialsOf(agentFor(h));
1069
1302
  /** The fake agent's own layout. */
1070
1303
  const FAKE_LAYOUT = {
1071
1304
  rulesFile: "AGENTS.md",
@@ -1073,6 +1306,17 @@ const FAKE_LAYOUT = {
1073
1306
  harnessSkillDir: ".agents/skills",
1074
1307
  pluginPlacement: "flat"
1075
1308
  };
1309
+ /**
1310
+ * Every skill directory some agent reads, as a path's tail (`.claude/skills`, `.config/goose/skills`):
1311
+ * a skill under one is the agent's to load, whoever put it there.
1312
+ */
1313
+ const SKILL_DIRS = [...new Set([FAKE_LAYOUT, ...Object.values(LAYOUTS)].flatMap((l) => [
1314
+ l.workspaceSkillDir,
1315
+ l.harnessSkillDir.replace(/^\.ai-sdk-harness\/\.harness-bootstrap\/[^/]+\/home\//, ""),
1316
+ ...l.alsoReadsSkillDirs ?? []
1317
+ ]))];
1318
+ /** Every agent CLI's own skill directories (`builtinSkillDirs`), as a path's tail. */
1319
+ const BUILTIN_SKILL_DIRS = [...new Set(Object.values(LAYOUTS).flatMap((l) => l.builtinSkillDirs ?? []))];
1076
1320
  /** Where a harness's agent reads rules and skills; a fake one with `layout` mimics that agent. */
1077
1321
  function layoutOf(descriptor) {
1078
1322
  if (descriptor.kind !== "fake") return LAYOUTS[descriptor.kind];
@@ -1102,7 +1346,7 @@ const REFUSED_KEY = /\bHTTP 401\b|\b401\b.{0,40}\bunauthori[sz]ed\b|\bunauthori[
1102
1346
  function authHint(agent, message, refused = false) {
1103
1347
  if (!refused && !REFUSED_KEY.test(message)) return void 0;
1104
1348
  if (agent.token) return `The API rejected the access token reeval minted from ${agent.credential}: check gcloud auth application-default login (or GOOGLE_APPLICATION_CREDENTIALS) and the project's Vertex AI access`;
1105
- return keyRejected(agent.credential);
1349
+ return keyRejected(credentialIn(agent));
1106
1350
  }
1107
1351
  /** What to do when the API refused the key in `credential`, naming it. */
1108
1352
  const keyRejected = (credential) => `The API rejected ${credential}: set a valid key in the environment or .env.local`;
@@ -1112,26 +1356,40 @@ const keyRejected = (credential) => `The API rejected ${credential}: set a valid
1112
1356
  */
1113
1357
  function agentAuth(agent, env = process.env) {
1114
1358
  if (agent.token) return {};
1115
- const value = env[agent.credential];
1116
- if (!value) throw new InfraError(`${agent.credential} isn't set, so the ${agent.name} harness can't authenticate. Set it in the environment or .env.local.`);
1359
+ const name = credentialIn(agent, env);
1360
+ const value = env[name];
1361
+ if (!value) {
1362
+ const names = credentialsOf(agent);
1363
+ const unset = names.length === 1 ? `${name} isn't set` : `Neither ${names.join(" nor ")} is set`;
1364
+ throw new InfraError(`${unset}, so the ${agent.name} harness can't authenticate. Set ${names.length === 1 ? "it" : "one"} in the environment or .env.local.`);
1365
+ }
1117
1366
  return {
1118
1367
  ...agent.authEnv,
1119
- [agent.authAs ?? agent.credential]: value
1368
+ [name === agent.credential ? agent.authAs ?? name : name]: value
1369
+ };
1370
+ }
1371
+ /**
1372
+ * The key the fake agent brokers with `layout`, and where: the agent's own, or, for one that takes
1373
+ * its model's provider's key, a key of the fake's own on no endpoint.
1374
+ */
1375
+ function fakeBrokering(layout = "cursor") {
1376
+ const { credential, endpoints } = AGENTS[layout];
1377
+ return credential === void 0 ? {
1378
+ credential: "FAKE_AGENT_API_KEY",
1379
+ endpoints: []
1380
+ } : {
1381
+ credential,
1382
+ endpoints
1120
1383
  };
1121
1384
  }
1122
1385
  function brokeringFor(h, vertex) {
1123
- if (h.kind === "fake") {
1124
- if (!h.brokers) return void 0;
1125
- const { credential, endpoints } = AGENTS[h.layout ?? "cursor"];
1126
- return {
1127
- credential,
1128
- endpoints
1129
- };
1130
- }
1386
+ if (h.kind === "fake") return h.brokers ? fakeBrokering(h.layout) : void 0;
1131
1387
  const agent = agentOf(h, vertex);
1132
1388
  if (!agent) return void 0;
1133
- const { credential, endpoints, tokens, servedModel, askedModel, modelResponses, upstream } = agent;
1134
- const { localResponses } = agent;
1389
+ const { endpoints, tokens, servedModel, askedModel, modelResponses, upstream } = agent;
1390
+ const { localResponses, modelStream } = agent;
1391
+ const credential = credentialIn(agent);
1392
+ const modelCalls = [...agent.modelCalls ?? [], ...modelResponses ?? []];
1135
1393
  return {
1136
1394
  credential,
1137
1395
  endpoints,
@@ -1142,10 +1400,12 @@ function brokeringFor(h, vertex) {
1142
1400
  ...servedModel ? { servedModel } : {},
1143
1401
  ...askedModel ? { askedModel } : {},
1144
1402
  ...modelResponses ? { modelResponses } : {},
1403
+ ...modelCalls.length ? { modelCalls } : {},
1404
+ ...modelStream ? { modelStream } : {},
1145
1405
  ...upstream ? { upstream } : {},
1146
1406
  ...localResponses?.length ? { localResponses } : {}
1147
1407
  };
1148
1408
  }
1149
- export { unverifiedHarness as _, agentFor as a, isRoutingGateway as b, brokeringFor as c, expectedBlockedFor as d, isAgentKind as f, refusedPlugins as g, refusedMcp as h, agentAuth as i, claudeMcpServers as l, layoutOf as m, DEFAULT_HARNESS as n, agentMcp as o, keyRejected as p, HARNESS_EXAMPLE as r, authHint as s, AGENTS as t, credentialOf as u, writePluginFiles as v, ROUTING_GATEWAYS as y };
1409
+ export { writePluginFiles as C, unverifiedHarness as S, isAgentKind as _, SKILL_DIRS as a, refusedMcp as b, agentMcp as c, brokeringFor as d, claudeMcpServers as f, harnessCredentials as g, fakeBrokering as h, HARNESS_EXAMPLE as i, agentOf as l, expectedBlockedFor as m, BUILTIN_SKILL_DIRS as n, agentAuth as o, directProviderRefusal as p, DEFAULT_HARNESS as r, agentFor as s, AGENTS as t, authHint as u, keyRejected as v, refusedPlugins as x, layoutOf as y };
1150
1410
 
1151
- //# sourceMappingURL=agents-C6zhkxp3.js.map
1411
+ //# sourceMappingURL=agents-l0-k7vw3.js.map