reeval 0.9.0 → 0.11.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.
- package/README.md +99 -64
- package/THIRD_PARTY_NOTICES.md +288 -112
- package/assets/package.json +1 -1
- package/assets/pnpm-lock.yaml +30 -30
- package/dist/adapter-Bwy3QxAK.js +279 -0
- package/dist/adapter-Bwy3QxAK.js.map +1 -0
- package/dist/{agent-6FefIhX7.js → agent-D483ru7D.js} +6 -6
- package/dist/{agent-6FefIhX7.js.map → agent-D483ru7D.js.map} +1 -1
- package/dist/{agent-WSmTaesf.js → agent-DpE80WPz.js} +46 -15
- package/dist/agent-DpE80WPz.js.map +1 -0
- package/dist/{analysis-DlGBDjTj.js → analysis-Bxub9LMT.js} +4 -4
- package/dist/{analysis-DlGBDjTj.js.map → analysis-Bxub9LMT.js.map} +1 -1
- package/dist/assemble-D5KGrwnJ.js +1 -0
- package/dist/{assemble-BCZzTyR7.js → assemble-D9GWr-HS.js} +69 -41
- package/dist/assemble-D9GWr-HS.js.map +1 -0
- package/dist/{client-Bbo9SPlK.js → assert-EUIoRdIt.js} +10 -113
- package/dist/assert-EUIoRdIt.js.map +1 -0
- package/dist/bridge/index.mjs +260 -60
- package/dist/{capture-Bp74Z6Fr.js → capture-BQlGHiMC.js} +146 -32
- package/dist/capture-BQlGHiMC.js.map +1 -0
- package/dist/capture-CYGLpWxR.js +1 -0
- package/dist/{cli-CVrMh_qz.js → cli-ClpPT8kn.js} +229 -537
- package/dist/cli-ClpPT8kn.js.map +1 -0
- package/dist/{cli-spec-CKEYa8V2.js → cli-spec-qmEnQ25_.js} +50 -22
- package/dist/cli-spec-qmEnQ25_.js.map +1 -0
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/client-fcwgwOAD.js +106 -0
- package/dist/client-fcwgwOAD.js.map +1 -0
- package/dist/{command-DUT5l13I.js → command-Bj39y-Wm.js} +329 -87
- package/dist/command-Bj39y-Wm.js.map +1 -0
- package/dist/{command-BFP0hKEb.js → command-BlM0y8jN.js} +14 -14
- package/dist/{command-BFP0hKEb.js.map → command-BlM0y8jN.js.map} +1 -1
- package/dist/command-C-cVjlny.js +1 -0
- package/dist/{command-CzIFp1JQ.js → command-DbAe1Rzb.js} +19 -19
- package/dist/command-DbAe1Rzb.js.map +1 -0
- package/dist/{command-C5xFPKHM.js → command-TgbzPizb.js} +378 -74
- package/dist/command-TgbzPizb.js.map +1 -0
- package/dist/commands-CthqwkAn.js +1 -0
- package/dist/{commands-CLmPBrTS.js → commands-YUwlyTbr.js} +14 -11
- package/dist/commands-YUwlyTbr.js.map +1 -0
- package/dist/config-DrVSEVN0.js +774 -0
- package/dist/config-DrVSEVN0.js.map +1 -0
- package/dist/{context-DbSMEVKs.js → context-C1mxXh80.js} +11 -3
- package/dist/context-C1mxXh80.js.map +1 -0
- package/dist/contrasts-5zsj32gk.js +101 -0
- package/dist/contrasts-5zsj32gk.js.map +1 -0
- package/dist/db-CKg5NtiW.js +2 -0
- package/dist/{db-CfQFwJtq.js → db-DfhipHEF.js} +467 -38
- package/dist/db-DfhipHEF.js.map +1 -0
- package/dist/debug-D7bEv_UV.js +1 -0
- package/dist/{dist-CTzThfu_.js → dist-CuY4ehEk.js} +95 -15
- package/dist/dist-CuY4ehEk.js.map +1 -0
- package/dist/{docker-CRQGQbIt.js → docker-D1HZDS6q.js} +22 -21
- package/dist/docker-D1HZDS6q.js.map +1 -0
- package/dist/docker-DNmMPOBb.js +1 -0
- package/dist/{docker-DV2GNgle.js → docker-DOvjji9I.js} +3 -3
- package/dist/docker-DOvjji9I.js.map +1 -0
- package/dist/{doctor-DlKycx5H.js → doctor-D2MbNO8L.js} +262 -84
- package/dist/doctor-D2MbNO8L.js.map +1 -0
- package/dist/{egress-BhzNh7Yi.js → egress-2-qzPvGi.js} +146 -15
- package/dist/egress-2-qzPvGi.js.map +1 -0
- package/dist/environment-Cca6a4wB.js +1132 -0
- package/dist/environment-Cca6a4wB.js.map +1 -0
- package/dist/{errors-yDAEwmZo.js → errors-B6BSMs03.js} +2 -2
- package/dist/errors-B6BSMs03.js.map +1 -0
- package/dist/{errors-C9w_ud7g.js → errors-r025B0Zb.js} +4 -4
- package/dist/errors-r025B0Zb.js.map +1 -0
- package/dist/evaluate-DKIl54Hb.js +2348 -0
- package/dist/evaluate-DKIl54Hb.js.map +1 -0
- package/dist/evaluate-DMyaGQEj.d.ts +92 -0
- package/dist/files-BAt0i00X.js +1 -0
- package/dist/{files-DJUFg-4e.js → files-BXHZFWmx.js} +5 -5
- package/dist/{files-DJUFg-4e.js.map → files-BXHZFWmx.js.map} +1 -1
- package/dist/files-Bk1mC3AN.js +43 -0
- package/dist/files-Bk1mC3AN.js.map +1 -0
- package/dist/{files-CSzVADHn.js → files-BpUYBwGu.js} +11 -10
- package/dist/{files-CSzVADHn.js.map → files-BpUYBwGu.js.map} +1 -1
- package/dist/files-Bw8lWEjg.js +1 -0
- package/dist/files-D6J0iSdx.js +1 -0
- package/dist/{git-DfG-YJ1u.js → git-Crl3b87o.js} +2 -2
- package/dist/{git-DfG-YJ1u.js.map → git-Crl3b87o.js.map} +1 -1
- package/dist/harness-CEuntrla.js +323 -0
- package/dist/harness-CEuntrla.js.map +1 -0
- package/dist/harness.d.ts +16 -30
- package/dist/harness.js +1 -2
- package/dist/{header-CALhmafp.js → header-DHQv_ZrF.js} +2 -2
- package/dist/{header-CALhmafp.js.map → header-DHQv_ZrF.js.map} +1 -1
- package/dist/{images-BMgdpMAX.js → images-Bi3aGxb9.js} +114 -45
- package/dist/images-Bi3aGxb9.js.map +1 -0
- package/dist/index.d.ts +9 -37
- package/dist/index.js +6 -2138
- package/dist/{init-BIdLF0F9.js → init-Cl3f3NBT.js} +26 -8
- package/dist/init-Cl3f3NBT.js.map +1 -0
- package/dist/init-fhOXED8F.js +1 -0
- package/dist/{invocations-CLaL8AuW.js → invocations-BYDPe3fV.js} +4 -4
- package/dist/{invocations-CLaL8AuW.js.map → invocations-BYDPe3fV.js.map} +1 -1
- package/dist/{judge-CeYPN8P_.js → judge-DW_GDOmB.js} +11 -19
- package/dist/{judge-CeYPN8P_.js.map → judge-DW_GDOmB.js.map} +1 -1
- package/dist/judge.d.ts +2 -2
- package/dist/judge.js +1 -1
- package/dist/{live-S0qODb6o.js → live-jlfszAbb.js} +9 -20
- package/dist/live-jlfszAbb.js.map +1 -0
- package/dist/matchers-Ddmc2z7H.js +118 -0
- package/dist/matchers-Ddmc2z7H.js.map +1 -0
- package/dist/model-CXhrziBe.js +1 -0
- package/dist/{model-B1BZoZ9b.js → model-D0IcOQao.js} +22 -20
- package/dist/model-D0IcOQao.js.map +1 -0
- package/dist/{model-DEQo3FkZ.js → model-DaVCY3rb.js} +2 -2
- package/dist/{model-DEQo3FkZ.js.map → model-DaVCY3rb.js.map} +1 -1
- package/dist/{model-BOnlAPzs.js → model-DaX4bNLZ.js} +123 -22
- package/dist/model-DaX4bNLZ.js.map +1 -0
- package/dist/model-_bxNrk2h.js +1 -0
- package/dist/{node-Co7EXge0.js → node-B3ydHo6t.js} +10 -47
- package/dist/node-B3ydHo6t.js.map +1 -0
- package/dist/object-CLf2-tNq.js +9 -0
- package/dist/object-CLf2-tNq.js.map +1 -0
- package/dist/{opencode-providers-ByD85Q0l.js → opencode-providers-J9colP0-.js} +96 -21
- package/dist/opencode-providers-J9colP0-.js.map +1 -0
- package/dist/options-C0d0AzeR.js +1118 -0
- package/dist/options-C0d0AzeR.js.map +1 -0
- package/dist/{pairs-DDsjgm5F.js → pairs-CnInRu-G.js} +76 -2
- package/dist/{pairs-DDsjgm5F.js.map → pairs-CnInRu-G.js.map} +1 -1
- package/dist/{patch-bDV8YFW0.js → patch-B1bnfhN-.js} +6 -6
- package/dist/{patch-bDV8YFW0.js.map → patch-B1bnfhN-.js.map} +1 -1
- package/dist/{plan-DUydFc_1.js → plan-DgQxp9yy.js} +34 -13
- package/dist/plan-DgQxp9yy.js.map +1 -0
- package/dist/{preflight-BkoSxf4C.js → preflight-BRzD30L5.js} +8 -7
- package/dist/preflight-BRzD30L5.js.map +1 -0
- package/dist/preflight-DlQvbySb.js +1 -0
- package/dist/{prepare-CUAWHebF.js → prepare-B_y-AFMv.js} +38 -30
- package/dist/prepare-B_y-AFMv.js.map +1 -0
- package/dist/prepare-DCKTLHN3.js +2 -0
- package/dist/{provenance-D7HK3vzt.js → provenance-DQ0AXn6c.js} +5 -5
- package/dist/{provenance-D7HK3vzt.js.map → provenance-DQ0AXn6c.js.map} +1 -1
- package/dist/provider-DehR4CMN.js +1 -0
- package/dist/providers-B9yTdIqF.js +1 -0
- package/dist/providers-DoTq1jHW.js +165 -0
- package/dist/providers-DoTq1jHW.js.map +1 -0
- package/dist/query-BO-ux7RB.js +139 -0
- package/dist/query-BO-ux7RB.js.map +1 -0
- package/dist/query-CRQfsw0e.js +1 -0
- package/dist/questions-C2dym2ce.js +524 -0
- package/dist/questions-C2dym2ce.js.map +1 -0
- package/dist/{record-BRP9vZrj.js → record-BKmMvZ6O.js} +9 -1
- package/dist/{record-BRP9vZrj.js.map → record-BKmMvZ6O.js.map} +1 -1
- package/dist/remote-CPPW86Q9.js +378 -0
- package/dist/remote-CPPW86Q9.js.map +1 -0
- package/dist/{results-Di7m8dQ3.js → results-BE2f-1XS.js} +6 -5
- package/dist/results-BE2f-1XS.js.map +1 -0
- package/dist/{resume-SUz1GskV.js → resume-Ca1c8vix.js} +10 -10
- package/dist/{resume-SUz1GskV.js.map → resume-Ca1c8vix.js.map} +1 -1
- package/dist/{root-CvdRlRZX.js → root-DICDHCtp.js} +4 -4
- package/dist/{root-CvdRlRZX.js.map → root-DICDHCtp.js.map} +1 -1
- package/dist/{runtime-DdsfnRz_.js → runtime-PX_oXiCS.js} +23 -71
- package/dist/runtime-PX_oXiCS.js.map +1 -0
- package/dist/sandbox-DLrsvu7U.js +70 -0
- package/dist/sandbox-DLrsvu7U.js.map +1 -0
- package/dist/sandbox.d.ts +19 -6
- package/dist/sandbox.js +1 -2
- package/dist/server-Dp8eOeK5.js +1 -0
- package/dist/{server-BNnXtmS8.js → server-TUY5xA_A.js} +11 -11
- package/dist/server-TUY5xA_A.js.map +1 -0
- package/dist/shared-CA61BuPJ.js +188 -0
- package/dist/shared-CA61BuPJ.js.map +1 -0
- package/dist/{source-Dof0NQBm.js → source-DJGS0a0u.js} +2 -2
- package/dist/{source-Dof0NQBm.js.map → source-DJGS0a0u.js.map} +1 -1
- package/dist/source-DdbLGR1M.js +1 -0
- package/dist/src-BxfCKA3_.js +2 -0
- package/dist/{src-C1E9HDWO.js → src-C7_1SqDP.js} +3 -3
- package/dist/{src-C1E9HDWO.js.map → src-C7_1SqDP.js.map} +1 -1
- package/dist/{src-DDNXsD9H.js → src-CF17Ug08.js} +5 -4
- package/dist/src-CF17Ug08.js.map +1 -0
- package/dist/{src-C_4Umgh2.js → src-CFp86GtV.js} +52 -51
- package/dist/src-CFp86GtV.js.map +1 -0
- package/dist/src-CLoOMVWI.js +3 -0
- package/dist/src-CcrQbpG8.js +2 -0
- package/dist/src-DCFtJRp0.js +2 -0
- package/dist/src-DIL0jST0.js +368 -0
- package/dist/src-DIL0jST0.js.map +1 -0
- package/dist/src-DSYYPEOj.js +2 -0
- package/dist/src-DYO3DdnQ.js +1 -0
- package/dist/src-DvCg0NBs.js +324 -0
- package/dist/src-DvCg0NBs.js.map +1 -0
- package/dist/{src-COgE7991.js → src-DvK0EIZx.js} +5 -5
- package/dist/{src-COgE7991.js.map → src-DvK0EIZx.js.map} +1 -1
- package/dist/{src-DVy58-zZ.js → src-FGXhkEkH.js} +5 -5
- package/dist/{src-DVy58-zZ.js.map → src-FGXhkEkH.js.map} +1 -1
- package/dist/src-WD-zgQYZ.js +2 -0
- package/dist/src-_oI9AePb.js +2 -0
- package/dist/{src-8rRXy4u9.js → src-ftu5wPSt.js} +1652 -182
- package/dist/src-ftu5wPSt.js.map +1 -0
- package/dist/src-qsKCqv7a.js +2 -0
- package/dist/{src-D95O-Smv.js → src-u8_ixn_F.js} +15 -11
- package/dist/src-u8_ixn_F.js.map +1 -0
- package/dist/state-CeR6oz0k.js +66 -0
- package/dist/state-CeR6oz0k.js.map +1 -0
- package/dist/{state-CiXyLqg0.js → state-DfpHox6b.js} +36 -24
- package/dist/state-DfpHox6b.js.map +1 -0
- package/dist/state-DpAxYyED.js +1 -0
- package/dist/studio-app/assets/index-CBkhNAv8.js +58 -0
- package/dist/studio-app/assets/index-CwQN3f_h.css +2 -0
- package/dist/studio-app/index.html +2 -2
- package/dist/suite-Cw_7G2RM.js +429 -0
- package/dist/suite-Cw_7G2RM.js.map +1 -0
- package/dist/suite-DamAEnNF.js +1 -0
- package/dist/summary-BUKfU-9l.js +611 -0
- package/dist/summary-BUKfU-9l.js.map +1 -0
- package/dist/{summary-2OAWF2N7.js → summary-Baa4rTHS.js} +7 -7
- package/dist/{summary-2OAWF2N7.js.map → summary-Baa4rTHS.js.map} +1 -1
- package/dist/testing.d.ts +3 -2
- package/dist/testing.js +3 -2
- package/dist/{tool-target-BU1JnSE9.js → tool-target-D2mcYlSQ.js} +14 -7
- package/dist/tool-target-D2mcYlSQ.js.map +1 -0
- package/dist/{tools-B10Uj7OI.js → tools-DLHgetpx.js} +6 -6
- package/dist/tools-DLHgetpx.js.map +1 -0
- package/dist/transcript-BNNANU8A.js +64 -0
- package/dist/transcript-BNNANU8A.js.map +1 -0
- package/dist/{types-D8RLfkFP.d.ts → types-BYdlwMwo.d.ts} +398 -46
- package/dist/{usage-DDF_6tkV.js → usage-CleNKkly.js} +4 -2
- package/dist/{usage-DDF_6tkV.js.map → usage-CleNKkly.js.map} +1 -1
- package/dist/view/index.d.ts +290 -8
- package/dist/view/index.js +7 -7
- package/dist/{views-Dqa5ojfZ.js → views-B8w2J-gD.js} +19 -24
- package/dist/views-B8w2J-gD.js.map +1 -0
- package/dist/views-DblnI3kA.js +2 -0
- package/dist/{worker-entry-BAikHl9F.js → worker-entry-DNnveLqx.js} +16 -229
- package/dist/worker-entry-DNnveLqx.js.map +1 -0
- package/dist/{workspace-C-TrNIUc.js → workspace-C4RA3srV.js} +7 -7
- package/dist/{workspace-C-TrNIUc.js.map → workspace-C4RA3srV.js.map} +1 -1
- package/dist/workspace-C_X0tdv6.js +1 -0
- package/package.json +12 -12
- package/dist/agent-WSmTaesf.js.map +0 -1
- package/dist/assemble-BCZzTyR7.js.map +0 -1
- package/dist/assemble-C5qq5yT2.js +0 -2
- package/dist/capture-Bp74Z6Fr.js.map +0 -1
- package/dist/capture-DS-cPyuE.js +0 -2
- package/dist/cli-CVrMh_qz.js.map +0 -1
- package/dist/cli-spec-CKEYa8V2.js.map +0 -1
- package/dist/client-Bbo9SPlK.js.map +0 -1
- package/dist/command-BrmXUC-W.js +0 -2
- package/dist/command-C5xFPKHM.js.map +0 -1
- package/dist/command-CzIFp1JQ.js.map +0 -1
- package/dist/command-DUT5l13I.js.map +0 -1
- package/dist/commands-CLmPBrTS.js.map +0 -1
- package/dist/commands-fI3G2Wnh.js +0 -2
- package/dist/config-CGvBeewH.js +0 -457
- package/dist/config-CGvBeewH.js.map +0 -1
- package/dist/context-DbSMEVKs.js.map +0 -1
- package/dist/db-CSSFtGcN.js +0 -3
- package/dist/db-CfQFwJtq.js.map +0 -1
- package/dist/debug-SEmW4w8f.js +0 -2
- package/dist/dist-CTzThfu_.js.map +0 -1
- package/dist/docker-CRQGQbIt.js.map +0 -1
- package/dist/docker-DV2GNgle.js.map +0 -1
- package/dist/docker-Df_YOxxB.js +0 -2
- package/dist/doctor-DlKycx5H.js.map +0 -1
- package/dist/duration-JsJrIWXq.js +0 -26
- package/dist/duration-JsJrIWXq.js.map +0 -1
- package/dist/egress-BhzNh7Yi.js.map +0 -1
- package/dist/env-BQqj93gu.js +0 -21
- package/dist/env-BQqj93gu.js.map +0 -1
- package/dist/environment-1jE-HhO-.js +0 -657
- package/dist/environment-1jE-HhO-.js.map +0 -1
- package/dist/errors-C9w_ud7g.js.map +0 -1
- package/dist/errors-yDAEwmZo.js.map +0 -1
- package/dist/fake-instructions-CUI33I_F.js +0 -32
- package/dist/fake-instructions-CUI33I_F.js.map +0 -1
- package/dist/family-D2b7WD10.js +0 -67
- package/dist/family-D2b7WD10.js.map +0 -1
- package/dist/files-AiEKuEZe.js +0 -2
- package/dist/files-BM78_nnF.js +0 -2
- package/dist/files-BMCvfB4X.js +0 -2
- package/dist/harness-CeCp2GSW.js +0 -171
- package/dist/harness-CeCp2GSW.js.map +0 -1
- package/dist/images-BMgdpMAX.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init-B6vegaP_.js +0 -2
- package/dist/init-BIdLF0F9.js.map +0 -1
- package/dist/jiti-BcJHCtrb.js +0 -46
- package/dist/jiti-BcJHCtrb.js.map +0 -1
- package/dist/live-S0qODb6o.js.map +0 -1
- package/dist/model-B1BZoZ9b.js.map +0 -1
- package/dist/model-BOnlAPzs.js.map +0 -1
- package/dist/model-DWeg5J7z.js +0 -2
- package/dist/model-FXko2kl7.js +0 -2
- package/dist/node-Co7EXge0.js.map +0 -1
- package/dist/opencode-providers-ByD85Q0l.js.map +0 -1
- package/dist/options-CKqyPGxX.js +0 -739
- package/dist/options-CKqyPGxX.js.map +0 -1
- package/dist/plan-DUydFc_1.js.map +0 -1
- package/dist/preflight-BkoSxf4C.js.map +0 -1
- package/dist/preflight-D5LW7Oqi.js +0 -2
- package/dist/prepare-CUAWHebF.js.map +0 -1
- package/dist/prepare-oji2oO8W.js +0 -3
- package/dist/process-CSVO_jsc.js +0 -119
- package/dist/process-CSVO_jsc.js.map +0 -1
- package/dist/provider-BDbNOQhQ.js +0 -2
- package/dist/providers-B1DzMvmH.js +0 -107
- package/dist/providers-B1DzMvmH.js.map +0 -1
- package/dist/providers-CpEfNU1F.js +0 -2
- package/dist/query-BjBMLa-C.js +0 -91
- package/dist/query-BjBMLa-C.js.map +0 -1
- package/dist/query-oPO_XrTy.js +0 -2
- package/dist/questions-B8by4Bbt.js +0 -234
- package/dist/questions-B8by4Bbt.js.map +0 -1
- package/dist/results-Di7m8dQ3.js.map +0 -1
- package/dist/runtime-DdsfnRz_.js.map +0 -1
- package/dist/sandbox-D5v-of6d.js +0 -139
- package/dist/sandbox-D5v-of6d.js.map +0 -1
- package/dist/server-BNnXtmS8.js.map +0 -1
- package/dist/server-BNwoKzlm.js +0 -2
- package/dist/source-Bk_0ZaEY.js +0 -2
- package/dist/src-8rRXy4u9.js.map +0 -1
- package/dist/src-BGWuWp6I.js +0 -3
- package/dist/src-BRt0O02i.js +0 -3
- package/dist/src-Bx2x1ekD.js +0 -3
- package/dist/src-C_4Umgh2.js.map +0 -1
- package/dist/src-D95O-Smv.js.map +0 -1
- package/dist/src-DDNXsD9H.js.map +0 -1
- package/dist/src-DLa-ESW0.js +0 -4
- package/dist/src-cN0aB-WR.js +0 -3
- package/dist/src-cdIVjC5b.js +0 -2
- package/dist/src-sIsDHWYq.js +0 -3
- package/dist/state-Bo5zg4da.js +0 -2
- package/dist/state-CiXyLqg0.js.map +0 -1
- package/dist/studio-app/assets/index-B9MCTfuu.css +0 -2
- package/dist/studio-app/assets/index-CROH2NB3.js +0 -58
- package/dist/summary-BTksrIxn.js +0 -254
- package/dist/summary-BTksrIxn.js.map +0 -1
- package/dist/tool-target-BU1JnSE9.js.map +0 -1
- package/dist/tools-B10Uj7OI.js.map +0 -1
- package/dist/views-Cs2Oqayd.js +0 -3
- package/dist/views-Dqa5ojfZ.js.map +0 -1
- package/dist/worker-entry-BAikHl9F.js.map +0 -1
- package/dist/workspace-Do_SiWBs.js +0 -2
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { n as isOneOf } from "./object-CLf2-tNq.js";
|
|
2
|
+
import { n as UsageError } from "./errors-B6BSMs03.js";
|
|
3
|
+
import { p as parseDuration } from "./shared-CA61BuPJ.js";
|
|
4
|
+
import { f as sandboxId, s as harnessId } from "./options-C0d0AzeR.js";
|
|
5
|
+
import { A as workspaceLabel, p as environmentSandbox } from "./environment-Cca6a4wB.js";
|
|
6
|
+
import { a as fromCwd, o as newRunId } from "./ids-Bp6ut7ZD.js";
|
|
7
|
+
import { _ as selectProfile, a as configLabel, d as hostCapacity, f as loadConfig, g as resolveConcurrency, h as requireConfig, l as findConfig, m as missingCredentials, o as configPathFor, p as malformedCredentials, u as hasAnalysisModel, v as inCI, y as loadEnvFiles } from "./config-DrVSEVN0.js";
|
|
4
8
|
import { o as redactSecrets, s as registerSecret } from "./redact-DJ9JCShu.js";
|
|
5
|
-
import { o as PACKAGE_VERSION } from "./root-
|
|
6
|
-
import {
|
|
7
|
-
import { a as fromCwd, i as evalSlug, n as attemptKey, o as newRunId } from "./ids-Bp6ut7ZD.js";
|
|
8
|
-
import { I as LABEL, X as imageInfo } from "./src-8rRXy4u9.js";
|
|
9
|
-
import { d as sandboxId, s as harnessId } from "./options-CKqyPGxX.js";
|
|
10
|
-
import { a as configPathFor, c as findConfig, d as malformedCredentials, f as missingCredentials, h as selectProfile, i as configLabel, l as hostCapacity, m as resolveConcurrency, p as requireConfig, u as loadConfig } from "./config-CGvBeewH.js";
|
|
9
|
+
import { o as PACKAGE_VERSION } from "./root-DICDHCtp.js";
|
|
10
|
+
import { I as LABEL, X as imageInfo } from "./src-ftu5wPSt.js";
|
|
11
11
|
import { s as debugTime } from "./debug-D24NOQH1.js";
|
|
12
12
|
import { i as sandboxWarningLine, n as clip, r as formatDuration } from "./text-gEcKjAyp.js";
|
|
13
13
|
import { t as PrepareError } from "./provider-CmAYTQQs.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { a as sampleReasons } from "./pairs-DDsjgm5F.js";
|
|
17
|
-
import { a as gateLabel, d as undiscriminating, f as undiscriminatingLabel, i as checksLabel, n as answersLabel, o as liftLabel } from "./summary-BTksrIxn.js";
|
|
18
|
-
import { c as writeLiveProgress, i as prepareResume, o as resolveResume, r as loadPrevious, s as writeCurrent, t as completedKeysFor } from "./resume-SUz1GskV.js";
|
|
19
|
-
import { n as FLAGS, o as helpText, r as GLOBAL, t as COMMANDS } from "./cli-spec-CKEYa8V2.js";
|
|
20
|
-
import { i as runtimeInfo, n as gitInfo, r as runnerInfo, t as author } from "./provenance-D7HK3vzt.js";
|
|
21
|
-
import { t as budgetMarker } from "./budget-DBUrH4jX.js";
|
|
22
|
-
import { n as prepareAll, o as writePrepared, r as prepareTargets, t as RunStopError } from "./preflight-BkoSxf4C.js";
|
|
23
|
-
import { r as imageHarness } from "./prepare-CUAWHebF.js";
|
|
24
|
-
import { n as createProviders } from "./providers-B1DzMvmH.js";
|
|
25
|
-
import { a as redactArgv, r as commandOf, t as logInvocation } from "./invocations-CLaL8AuW.js";
|
|
14
|
+
import { T as runOutcome, g as formatUsage } from "./model-DaX4bNLZ.js";
|
|
15
|
+
import { s as suiteResult } from "./suite-Cw_7G2RM.js";
|
|
26
16
|
import { n as stripAnsi, t as colors } from "./colors-QV9dFVhN.js";
|
|
17
|
+
import { a as render } from "./summary-BUKfU-9l.js";
|
|
18
|
+
import { c as writeLiveProgress, i as prepareResume, o as resolveResume, r as loadPrevious, s as writeCurrent, t as completedKeysFor } from "./resume-Ca1c8vix.js";
|
|
19
|
+
import { a as commandHelpText, n as FLAGS, r as GLOBAL, s as helpText, t as COMMANDS } from "./cli-spec-qmEnQ25_.js";
|
|
20
|
+
import { i as runtimeInfo, n as gitInfo, r as runnerInfo, t as author } from "./provenance-DQ0AXn6c.js";
|
|
21
|
+
import { t as budgetMarker } from "./budget-DBUrH4jX.js";
|
|
22
|
+
import { n as prepareAll, o as writePrepared, r as prepareTargets, t as RunStopError } from "./preflight-BRzD30L5.js";
|
|
23
|
+
import { n as imageHarness } from "./prepare-B_y-AFMv.js";
|
|
24
|
+
import { r as createProviders, t as attemptImage } from "./providers-DoTq1jHW.js";
|
|
25
|
+
import { a as redactArgv, r as commandOf, t as logInvocation } from "./invocations-BYDPe3fV.js";
|
|
27
26
|
import { existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs";
|
|
28
27
|
import { dirname, join } from "node:path";
|
|
29
|
-
import { appendFile, readFile, rm } from "node:fs/promises";
|
|
30
28
|
import { inspect } from "node:util";
|
|
29
|
+
import { appendFile, readFile, rm } from "node:fs/promises";
|
|
31
30
|
import { detectAgent } from "std-env";
|
|
32
31
|
import { Command, Option } from "commander";
|
|
33
32
|
//#region src/cli-parse.ts
|
|
@@ -57,6 +56,7 @@ function parseCli(argv) {
|
|
|
57
56
|
});
|
|
58
57
|
for (const [name, spec] of Object.entries(COMMANDS)) {
|
|
59
58
|
const command = configure(program.command(name), `reeval ${name}`, spec.flags);
|
|
59
|
+
if (name === "query") takeStatements(command);
|
|
60
60
|
command.argument("[args...]").action(() => {
|
|
61
61
|
const max = spec.sub && !spec.help ? Number.POSITIVE_INFINITY : spec.positionals;
|
|
62
62
|
parsed = done(program, command, [name], spec.flags, max);
|
|
@@ -65,13 +65,13 @@ function parseCli(argv) {
|
|
|
65
65
|
const subcommand = configure(command.command(subName), `reeval ${name} ${subName}`, sub.flags);
|
|
66
66
|
subcommand.argument("[args...]").action(() => {
|
|
67
67
|
const [stray] = Object.keys(valuesOf(command, spec.flags));
|
|
68
|
-
if (stray) throw new UsageError(`--${stray} isn't an option of reeval ${name} ${subName}
|
|
68
|
+
if (stray) throw new UsageError(`--${stray} isn't an option of reeval ${name} ${subName}. Run reeval --help.`);
|
|
69
69
|
parsed = done(program, subcommand, [name, subName], sub.flags, sub.positionals);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
program.parse(argv, { from: "user" });
|
|
74
|
-
if (!parsed) throw new UsageError("Run reeval --help.");
|
|
74
|
+
if (!parsed) throw new UsageError("reeval couldn't read that command line. Run reeval --help.");
|
|
75
75
|
return parsed;
|
|
76
76
|
}
|
|
77
77
|
function configure(command, name, flags) {
|
|
@@ -85,6 +85,28 @@ function configure(command, name, flags) {
|
|
|
85
85
|
for (const flag of flags) command.addOption(OPTIONS[flag]());
|
|
86
86
|
return command;
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Makes an argument that starts with `-` but has whitespace before any `=` (SQL opening with a
|
|
90
|
+
* `-- comment`) a positional: no flag looks like that, and commander would refuse it as one.
|
|
91
|
+
*/
|
|
92
|
+
function takeStatements(command) {
|
|
93
|
+
const parseOptions = command.parseOptions.bind(command);
|
|
94
|
+
command.parseOptions = (args) => {
|
|
95
|
+
const held = /* @__PURE__ */ new Map();
|
|
96
|
+
const masked = args.map((arg, i) => {
|
|
97
|
+
if (!arg.startsWith("-") || !/\s/.test(arg.split("=")[0] ?? "")) return arg;
|
|
98
|
+
const token = `\0statement-${i}`;
|
|
99
|
+
held.set(token, arg);
|
|
100
|
+
return token;
|
|
101
|
+
});
|
|
102
|
+
const restore = (list) => list.map((arg) => held.get(arg) ?? arg);
|
|
103
|
+
const { operands, unknown } = parseOptions(masked);
|
|
104
|
+
return {
|
|
105
|
+
operands: restore(operands),
|
|
106
|
+
unknown: restore(unknown)
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
}
|
|
88
110
|
function done(program, command, path, flags, max) {
|
|
89
111
|
const values = {
|
|
90
112
|
...valuesOf(program, GLOBAL),
|
|
@@ -118,16 +140,22 @@ function valuesOf(command, flags) {
|
|
|
118
140
|
}
|
|
119
141
|
/** Commander's error, in reeval's words, naming the command whose flag it is. */
|
|
120
142
|
function usageError(error, command) {
|
|
121
|
-
const
|
|
143
|
+
const text = error.message.replace(/^error: /, "");
|
|
144
|
+
const [first = ""] = text.split("\n");
|
|
122
145
|
if (error.code === "commander.unknownOption") {
|
|
123
|
-
const arg =
|
|
146
|
+
const [, arg = "", suggestion] = /^unknown option '([\s\S]*)'(?:\n\((.*)\))?$/.exec(text) ?? [];
|
|
124
147
|
const [flag = "", value] = arg.replace(/^--?/, "").split("=");
|
|
125
148
|
const known = arg.startsWith("--") ? FLAGS[flag] : Object.entries(FLAGS).find(([, s]) => "short" in s && s.short === flag)?.[1];
|
|
126
149
|
const long = arg.startsWith("--") ? flag : Object.entries(FLAGS).find(([, s]) => "short" in s && s.short === flag)?.[0];
|
|
127
|
-
if (known && value !== void 0 && known.type === "boolean") return new UsageError(
|
|
150
|
+
if (known && value !== void 0 && known.type === "boolean") return new UsageError(`--${flag} doesn't take a value: pass --${flag} on its own.`);
|
|
128
151
|
if (known) return new UsageError(`--${long} isn't an option of ${command}. Run reeval --help.`);
|
|
129
|
-
const
|
|
130
|
-
return new UsageError(`Unknown option '${
|
|
152
|
+
const shown = arg.replace(/\r/g, "\\r").replace(/\n/g, "\\n");
|
|
153
|
+
return new UsageError(`Unknown option '${shown}'. ${suggestion ? `${suggestion} ` : ""}Run reeval --help.`);
|
|
154
|
+
}
|
|
155
|
+
if (error.code === "commander.optionMissingArgument") {
|
|
156
|
+
const usage = /'([^']+)'/.exec(first)?.[1] ?? "";
|
|
157
|
+
const flag = usage.split(/[ ,]/).find((part) => part.startsWith("--")) ?? usage;
|
|
158
|
+
return new UsageError(`${flag} needs a value, e.g. ${usage}. Run reeval --help.`);
|
|
131
159
|
}
|
|
132
160
|
return new UsageError(first.charAt(0).toUpperCase() + first.slice(1));
|
|
133
161
|
}
|
|
@@ -172,10 +200,10 @@ async function preflight(uses, options) {
|
|
|
172
200
|
writePrepared(options.root, options.runId, outcomes);
|
|
173
201
|
const images = [];
|
|
174
202
|
for (const o of outcomes) {
|
|
175
|
-
if (!o.ok || o.target.kind !== "docker") continue;
|
|
176
|
-
const { ref, id, agentCli } = o.handle;
|
|
203
|
+
if (!o.ok || o.target.sandbox.kind !== "docker") continue;
|
|
204
|
+
const { ref, id, agentCli } = attemptImage(o.handle);
|
|
177
205
|
if (images.some((i) => i.id === id)) continue;
|
|
178
|
-
const info = await imageInfo(ref);
|
|
206
|
+
const info = await imageInfo(ref, o.target.sandbox.engine);
|
|
179
207
|
images.push({
|
|
180
208
|
ref,
|
|
181
209
|
id,
|
|
@@ -215,24 +243,10 @@ function outcomeOf(e) {
|
|
|
215
243
|
if (e.meta?.errorKind === "aborted") return "cancelled";
|
|
216
244
|
return e.meta?.outcome ?? (e.state === "passed" ? "pass" : "fail");
|
|
217
245
|
}
|
|
218
|
-
function attemptOutcome(a) {
|
|
219
|
-
return a.error?.kind === "aborted" ? "cancelled" : a.outcome;
|
|
220
|
-
}
|
|
221
246
|
/** What tells an eval's attempts apart: the axes that vary (`cursor:composer-2.5 · with-skill`), else the harness. */
|
|
222
247
|
function attemptAxes(a, fallback) {
|
|
223
248
|
return a?.label.replace(/\s*#\d+$/, "") || a?.harness.kind || fallback;
|
|
224
249
|
}
|
|
225
|
-
function mark(c, outcome) {
|
|
226
|
-
return {
|
|
227
|
-
pass: c.green("✓"),
|
|
228
|
-
fail: c.red("✗"),
|
|
229
|
-
infra_error: c.yellow("!"),
|
|
230
|
-
skipped: c.dim("↓"),
|
|
231
|
-
cancelled: c.yellow("✗")
|
|
232
|
-
}[outcome];
|
|
233
|
-
}
|
|
234
|
-
/** An expected miss's mark: neutral, since it doesn't fail the run. */
|
|
235
|
-
const MISS_MARK = (c) => c.dim("○");
|
|
236
250
|
const plural = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
237
251
|
/** A command on one line: the first line, cut to 80 characters at a word boundary. */
|
|
238
252
|
function oneLine(text, max = 80) {
|
|
@@ -357,317 +371,25 @@ function prepareLines(c, e, max) {
|
|
|
357
371
|
return [`${c.red("✗")} ${outcome.target.label} failed to prepare ${c.dim(`(set by ${who}; only its attempts fail)`)}`, ...tailLines(outcome.failure.message, max).map((l) => ` ${c.yellow(l)}`)];
|
|
358
372
|
}
|
|
359
373
|
//#endregion
|
|
360
|
-
//#region src/ui/
|
|
361
|
-
|
|
362
|
-
const KINDS = [
|
|
363
|
-
{
|
|
364
|
-
title: "Judge failures",
|
|
365
|
-
test: (a) => a.error?.kind === "judge"
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
title: "Assertion failures",
|
|
369
|
-
test: (a) => a.error?.kind === "assertion"
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
title: "Timeouts",
|
|
373
|
-
test: (a) => a.error?.kind === "timeout"
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
title: "Infra errors",
|
|
377
|
-
test: (_, o) => o === "infra_error"
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
title: "Cancelled",
|
|
381
|
-
test: (_, o) => o === "cancelled"
|
|
382
|
-
}
|
|
383
|
-
];
|
|
384
|
-
/** The engine's result for an attempt, or one rebuilt from the record (e.g. cancelled ones). */
|
|
385
|
-
function resultFor(entry, attempt, results) {
|
|
386
|
-
const key = attemptKey(entry.id, attempt.cell, attempt.n);
|
|
387
|
-
const found = results.find((r) => r.key === key);
|
|
388
|
-
const errorKind = attempt.error?.kind ?? null;
|
|
389
|
-
const meta = {
|
|
390
|
-
outcome: attempt.outcome === "skipped" ? "pass" : attempt.outcome,
|
|
391
|
-
errorKind,
|
|
392
|
-
judgements: attempt.judgements.map((j) => ({ ...j })),
|
|
393
|
-
turnErrors: attempt.turns.flatMap((t, i) => t.error ? [`turn ${i + 1} error: ${t.error}`] : []),
|
|
394
|
-
recordPath: ""
|
|
395
|
-
};
|
|
396
|
-
if (found) return {
|
|
397
|
-
...found,
|
|
398
|
-
meta: found.meta ? {
|
|
399
|
-
...found.meta,
|
|
400
|
-
errorKind
|
|
401
|
-
} : meta
|
|
402
|
-
};
|
|
403
|
-
return {
|
|
404
|
-
id: entry.id,
|
|
405
|
-
key,
|
|
406
|
-
file: entry.file,
|
|
407
|
-
group: entry.group,
|
|
408
|
-
name: entry.name,
|
|
409
|
-
attempt: void 0,
|
|
410
|
-
state: attempt.outcome === "pass" ? "passed" : attempt.outcome === "skipped" ? "skipped" : "failed",
|
|
411
|
-
durationMs: attempt.durationMs,
|
|
412
|
-
errors: attempt.error ? [attempt.error.message] : [],
|
|
413
|
-
formattedErrors: [],
|
|
414
|
-
meta
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
function entryOutcome(e) {
|
|
418
|
-
const outcomes = e.attempts.map(attemptOutcome);
|
|
419
|
-
if (outcomes.length && outcomes.every((o) => o === "cancelled")) return "cancelled";
|
|
420
|
-
return e.outcome;
|
|
421
|
-
}
|
|
422
|
-
const pct = (rate) => rate === null ? " – " : `${Math.round(rate * 100)}%`.padStart(4);
|
|
423
|
-
function evalColumns(c, e) {
|
|
424
|
-
const [attempt, ...more] = e.attempts;
|
|
425
|
-
if (e.todo) return c.dim("todo");
|
|
426
|
-
if (!attempt || e.outcome === "skipped") return c.dim("skipped");
|
|
427
|
-
if (more.length) {
|
|
428
|
-
const pass = e.attempts.filter((a) => a.outcome === "pass").length;
|
|
429
|
-
const counted = e.attempts.filter((a) => a.outcome === "pass" || a.outcome === "fail").length;
|
|
430
|
-
const rate = hasUngatedCells(e.cells) ? ` · pass@1 ${pct(e.passRate).trim()} gated` : ` pass@1 ${pct(e.passRate)}`;
|
|
431
|
-
return c.dim(`${`${pass}/${counted}`.padStart(7)}${rate} ${e.attempts.length} attempts`);
|
|
432
|
-
}
|
|
433
|
-
if (attemptOutcome(attempt) === "cancelled") return c.yellow("cancelled");
|
|
434
|
-
const cols = [formatDuration(attempt.durationMs).padStart(7)];
|
|
435
|
-
const judges = collapsedJudgeLabel(attempt.judgements);
|
|
436
|
-
if (judges) cols.push(judges);
|
|
437
|
-
const turns = attempt.turns.length;
|
|
438
|
-
cols.push(`${turns} turn${turns === 1 ? "" : "s"}`);
|
|
439
|
-
const tokens = formatUsage(attempt.usage);
|
|
440
|
-
if (tokens) cols.push(tokens);
|
|
441
|
-
return c.dim(cols.join(" "));
|
|
442
|
-
}
|
|
443
|
-
/** pass@1 per cell for evals with several attempts; with compare, each cell's role and lift. */
|
|
444
|
-
function cellRows(c, e, indent) {
|
|
445
|
-
if (e.attempts.length < 2) return [];
|
|
446
|
-
const compare = e.cells.some((cell) => cell.role === "variant");
|
|
447
|
-
const width = Math.max(...e.cells.map((cell) => cell.key.length));
|
|
448
|
-
return e.cells.flatMap((cell) => {
|
|
449
|
-
const role = compare ? ` ${cell.role.padEnd(7)}` : "";
|
|
450
|
-
const counts = `${cell.pass}/${cell.pass + cell.fail}`.padStart(5);
|
|
451
|
-
const infra = cell.infraError ? c.yellow(` ${cell.infraError} infra`) : "";
|
|
452
|
-
let note = "";
|
|
453
|
-
if (cell.lift) {
|
|
454
|
-
const { minLift } = cell.lift;
|
|
455
|
-
const below = minLift !== void 0 && cell.lift.interval.lo < minLift;
|
|
456
|
-
const text = `${liftLabel(cell.lift)}${minLift !== void 0 ? ` (minLift ${Math.round(minLift * 100)})` : ""}`;
|
|
457
|
-
note = ` ${below ? c.red(`${text} ✗`) : text}`;
|
|
458
|
-
} else if (compare && cell.gate === "none" && cell.fail > 0) note = ` ${c.dim("not gated")}`;
|
|
459
|
-
if (cell.gate !== "all" && cell.gate !== "none") note += ` ${c.dim(`gate ${gateLabel(cell.gate)}`)}`;
|
|
460
|
-
const tokens = formatUsage(cellUsage(e, cell.key));
|
|
461
|
-
const usage = tokens ? ` ${c.dim(tokens)}` : "";
|
|
462
|
-
const rows = [`${indent}${c.dim(cell.key.padEnd(width))}${role} ${counts} pass@1 ${pct(cell.passRate)}${note}${infra}${usage}`];
|
|
463
|
-
const rates = judgeRatesLabel(cellJudgeRates(e, cell.key));
|
|
464
|
-
if (rates) rows.push(`${indent} ${c.dim(rates)}`);
|
|
465
|
-
const effort = cellContrast(e, cell.key);
|
|
466
|
-
if (effort) rows.push(`${indent} ${c.dim(`effort: ${effortLabel(effort)}`)}`);
|
|
467
|
-
const checks = checksLabel(cell);
|
|
468
|
-
if (checks) rows.push(`${indent} ${c.dim(`checks: ${checks}`)}`);
|
|
469
|
-
if (cell.overrides.length) rows.push(`${indent} ${c.dim(`overrides: ${cell.overrides.join(", ")}`)}`);
|
|
470
|
-
return rows;
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
/** One row per compare question: its win rates, or why it has none. They never gate. */
|
|
474
|
-
function questionRows(c, e, indent) {
|
|
475
|
-
return (e.answers ?? []).flatMap((a) => {
|
|
476
|
-
const label = answersLabel(a);
|
|
477
|
-
return [`${indent}${c.dim("question")} ${a.error !== void 0 ? c.yellow(label) : label}`, ...sampleReasons(a.votes).map((reason) => `${indent} ${c.dim(reason)}`)];
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
/** A family's mark: its pooled gate's and its cases' worst. */
|
|
481
|
-
function familyOutcome(family, cases) {
|
|
482
|
-
const outcomes = [family.outcome, ...cases.map(entryOutcome)];
|
|
483
|
-
for (const o of [
|
|
484
|
-
"fail",
|
|
485
|
-
"infra_error",
|
|
486
|
-
"cancelled"
|
|
487
|
-
]) if (outcomes.includes(o)) return o;
|
|
488
|
-
return outcomes.every((o) => o === "skipped") ? "skipped" : "pass";
|
|
489
|
-
}
|
|
490
|
-
/** The width case marks wrap at. */
|
|
491
|
-
const CASE_WIDTH = 96;
|
|
492
|
-
/** A pooled family's rows under its header: its cases' marks, then each pooled rate or lift. */
|
|
493
|
-
function familyRows(c, family, cases, indent) {
|
|
494
|
-
const marks = cases.map((e) => `${mark(c, entryOutcome(e))} ${caseLabel(family.name, e.name)}`);
|
|
495
|
-
const plain = cases.map((e) => `x ${caseLabel(family.name, e.name)}`);
|
|
496
|
-
const rows = [];
|
|
497
|
-
let line = [];
|
|
498
|
-
let width = 0;
|
|
499
|
-
marks.forEach((m, i) => {
|
|
500
|
-
const w = plain[i].length + 2;
|
|
501
|
-
if (line.length && width + w > CASE_WIDTH) {
|
|
502
|
-
rows.push(`${indent}${line.join(" ")}`);
|
|
503
|
-
line = [];
|
|
504
|
-
width = 0;
|
|
505
|
-
}
|
|
506
|
-
line.push(m);
|
|
507
|
-
width += w;
|
|
508
|
-
});
|
|
509
|
-
if (line.length) rows.push(`${indent}${line.join(" ")}`);
|
|
510
|
-
if (family.lifts.length) {
|
|
511
|
-
const keyWidth = Math.max(...family.lifts.map((l) => l.variant.length));
|
|
512
|
-
for (const lift of family.lifts) {
|
|
513
|
-
const below = lift.outcome === "fail";
|
|
514
|
-
const gate = lift.minLift !== void 0 ? ` (minLift ${Math.round(lift.minLift * 100)}${below ? " ✗" : ""})` : "";
|
|
515
|
-
const text = `${familyLiftLabel(lift)}${gate}`;
|
|
516
|
-
rows.push(`${indent}${c.dim(lift.variant.padEnd(keyWidth))} ${below ? c.red(text) : text}`);
|
|
517
|
-
const effort = familyEffortLabel(lift);
|
|
518
|
-
if (effort) rows.push(`${indent} ${c.dim(`effort: ${effort}`)}`);
|
|
519
|
-
}
|
|
520
|
-
} else if (family.rates.length === 1) rows.push(`${indent}${familyRateLabel(family.rates[0])}`);
|
|
521
|
-
else {
|
|
522
|
-
const keyWidth = Math.max(...family.rates.map((r) => r.cell.length));
|
|
523
|
-
for (const rate of family.rates) rows.push(`${indent}${c.dim(rate.cell.padEnd(keyWidth))} ${familyRateLabel(rate)}`);
|
|
524
|
-
}
|
|
525
|
-
return rows;
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* The run's evals as a file › group tree, one row per eval and per cell of a matrix. A pooled
|
|
529
|
-
* family is one row, its template, with its cases' marks and the pooled results under it.
|
|
530
|
-
*/
|
|
531
|
-
function tree(c, evals, families = []) {
|
|
532
|
-
const rows = [];
|
|
533
|
-
const shown = /* @__PURE__ */ new Set();
|
|
534
|
-
let path = [];
|
|
535
|
-
for (const e of evals) {
|
|
536
|
-
const family = e.family && families.find((f) => f.id === e.family?.id);
|
|
537
|
-
if (family && shown.has(family.id)) continue;
|
|
538
|
-
const next = [e.file, ...e.group];
|
|
539
|
-
let same = 0;
|
|
540
|
-
while (same < path.length && same < next.length && path[same] === next[same]) same++;
|
|
541
|
-
for (let i = same; i < next.length; i++) rows.push({
|
|
542
|
-
indent: i,
|
|
543
|
-
text: i === 0 ? c.bold(next[i] ?? "") : next[i] ?? ""
|
|
544
|
-
});
|
|
545
|
-
path = next;
|
|
546
|
-
if (family) {
|
|
547
|
-
shown.add(family.id);
|
|
548
|
-
rows.push({
|
|
549
|
-
indent: next.length,
|
|
550
|
-
text: family.name,
|
|
551
|
-
family
|
|
552
|
-
});
|
|
553
|
-
} else rows.push({
|
|
554
|
-
indent: next.length,
|
|
555
|
-
text: e.name,
|
|
556
|
-
entry: e
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
const width = Math.max(...rows.filter((r) => r.entry || r.family).map((r) => r.indent * 2 + 2 + r.text.length));
|
|
560
|
-
return rows.flatMap(({ indent, text, entry, family }) => {
|
|
561
|
-
const pad = " ".repeat(indent);
|
|
562
|
-
const fill = " ".repeat(Math.max(0, width - indent * 2 - 2 - text.length));
|
|
563
|
-
if (family) {
|
|
564
|
-
const cases = familyCases(family, evals);
|
|
565
|
-
return [` ${pad}${mark(c, familyOutcome(family, cases))} ${text}${fill} ${c.dim(familyHeadLabel(family))}`, ...familyRows(c, family, cases, ` ${pad} `)];
|
|
566
|
-
}
|
|
567
|
-
if (!entry) return [` ${pad}${text}`];
|
|
568
|
-
return [
|
|
569
|
-
` ${pad}${`${mark(c, entryOutcome(entry))} ${text}`}${fill} ${evalColumns(c, entry)}`,
|
|
570
|
-
...cellRows(c, entry, ` ${pad} `),
|
|
571
|
-
...questionRows(c, entry, ` ${pad} `)
|
|
572
|
-
];
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
function totals(c, s, cancelled = 0) {
|
|
576
|
-
const fail = s.fail - s.notGated - cancelled;
|
|
577
|
-
const parts = [
|
|
578
|
-
s.pass && c.green(`${s.pass} passed`),
|
|
579
|
-
fail > 0 && c.red(`${fail} failed`),
|
|
580
|
-
s.notGated > 0 && c.dim(`${s.notGated} missed, not gated`),
|
|
581
|
-
s.infraError && c.yellow(`${s.infraError} infra error`),
|
|
582
|
-
cancelled && c.yellow(`${cancelled} cancelled`),
|
|
583
|
-
s.skipped && c.dim(`${s.skipped} skipped`)
|
|
584
|
-
].filter(Boolean);
|
|
585
|
-
const scope = s.attempts === s.evals ? `${s.evals}` : `${s.attempts} attempts, ${s.evals} evals`;
|
|
586
|
-
return parts.length ? `${parts.join(c.dim(" · "))} ${c.dim(`(${scope})`)}` : "no evals ran";
|
|
587
|
-
}
|
|
588
|
-
/** `1 passed · 1 failed (2)`: the families' pooled gates. */
|
|
589
|
-
function familyTotals(c, families) {
|
|
590
|
-
const fail = families.filter((f) => f.outcome === "fail").length;
|
|
591
|
-
const pass = families.length - fail;
|
|
592
|
-
return `${[pass && c.green(`${pass} passed`), fail && c.red(`${fail} failed`)].filter(Boolean).join(c.dim(" · "))} ${c.dim(`(${families.length})`)}`;
|
|
593
|
-
}
|
|
594
|
-
/** Failing attempts, in run order, including expected misses. */
|
|
595
|
-
function failingAttempts(evals) {
|
|
596
|
-
return evals.flatMap((entry) => entry.attempts.map((attempt) => ({
|
|
597
|
-
entry,
|
|
598
|
-
attempt,
|
|
599
|
-
outcome: attemptOutcome(attempt)
|
|
600
|
-
})).filter(({ outcome }) => outcome !== "pass" && outcome !== "skipped"));
|
|
601
|
-
}
|
|
602
|
-
function renderSummary(c, e, attemptDir) {
|
|
374
|
+
//#region src/ui/result.ts
|
|
375
|
+
function resultLines(c, e, verbose) {
|
|
603
376
|
const { record } = e;
|
|
604
|
-
const lines = [];
|
|
605
|
-
if (record.evals.length) lines.push(c.bold("Summary"), ...tree(c, record.evals, record.families));
|
|
606
|
-
const all = failingAttempts(record.evals);
|
|
607
|
-
const missed = all.filter(({ entry, attempt }) => isUngatedMiss(entry, attempt));
|
|
608
|
-
const failing = all.filter((f) => !missed.includes(f));
|
|
609
|
-
if (failing.length) {
|
|
610
|
-
lines.push("", c.bold(c.red(`Failures (${failing.length})`)));
|
|
611
|
-
for (const kind of KINDS) {
|
|
612
|
-
const members = failing.filter(({ attempt, outcome }) => kind.test(attempt, outcome));
|
|
613
|
-
if (!members.length) continue;
|
|
614
|
-
lines.push("", c.bold(`${kind.title} (${members.length})`));
|
|
615
|
-
for (const { entry, attempt, outcome } of members) {
|
|
616
|
-
const result = resultFor(entry, attempt, e.results);
|
|
617
|
-
const which = entry.attempts.length > 1 ? ` ${c.dim(attempt.id)}` : "";
|
|
618
|
-
const gated = entry.cells.find((x) => x.key === attempt.cell)?.gate !== "none";
|
|
619
|
-
lines.push(` ${mark(c, outcome)} ${entry.id}${which}${gated ? "" : ` ${c.dim("(not gated)")}`}`);
|
|
620
|
-
if (outcome !== "cancelled") for (const line of failureLines(c, result, { max: FAILURE_LINES })) lines.push(` ${line}`);
|
|
621
|
-
if (!attempt.error?.prepare) lines.push(` ${c.dim("record")} ${attemptDir(entry.id, attempt.cell, attempt.n)}`);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
if (missed.length) {
|
|
626
|
-
lines.push("", c.bold(`Expected misses, not gated (${missed.length})`));
|
|
627
|
-
const pooled = /* @__PURE__ */ new Map();
|
|
628
|
-
for (const { entry, attempt } of missed) {
|
|
629
|
-
if (!entry.family) continue;
|
|
630
|
-
const key = `${entry.family.id}\0${attempt.cell}`;
|
|
631
|
-
pooled.set(key, (pooled.get(key) ?? 0) + 1);
|
|
632
|
-
}
|
|
633
|
-
for (const [key, n] of pooled) {
|
|
634
|
-
const [id, cell] = key.split("\0");
|
|
635
|
-
lines.push(` ${MISS_MARK(c)} ${id} ${c.dim(`${n} ${n === 1 ? "attempt" : "attempts"} on ${cell}`)}`);
|
|
636
|
-
}
|
|
637
|
-
for (const { entry, attempt } of missed) {
|
|
638
|
-
if (entry.family) continue;
|
|
639
|
-
const which = entry.attempts.length > 1 ? ` ${c.dim(attempt.id)}` : "";
|
|
640
|
-
const [reason] = failureLines(colors(false), resultFor(entry, attempt, e.results), { max: 1 }).filter((l) => l.trim());
|
|
641
|
-
lines.push(` ${MISS_MARK(c)} ${entry.id}${which}`);
|
|
642
|
-
if (reason) lines.push(` ${c.dim(reason.trim())}`);
|
|
643
|
-
lines.push(` ${c.dim("record")} ${attemptDir(entry.id, attempt.cell, attempt.n)}`);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
for (const error of e.unhandledErrors) lines.push("", c.red(`error: ${error}`));
|
|
647
|
-
const cancelled = failing.filter((f) => f.outcome === "cancelled").length;
|
|
648
|
-
const label = record.summary.attempts === record.summary.evals ? " Evals" : "Attempts";
|
|
649
|
-
const lifted = record.evals.flatMap((entry) => entry.cells.flatMap((cell) => cell.lift?.minLift !== void 0 && cell.lift.interval.lo < cell.lift.minLift ? [`${entry.id} ${cell.key} ${liftLabel(cell.lift)}: its lower bound is below minLift ${Math.round(cell.lift.minLift * 100)}`] : []));
|
|
650
|
-
for (const family of record.families ?? []) for (const lift of family.lifts) {
|
|
651
|
-
if (lift.outcome !== "fail" || lift.minLift === void 0) continue;
|
|
652
|
-
lifted.push(`${family.id} ${lift.variant} pooled ${familyLiftLabel(lift)}: its lower bound is below minLift ${Math.round(lift.minLift * 100)}`);
|
|
653
|
-
}
|
|
654
|
-
const idle = undiscriminating(record.evals);
|
|
655
|
-
if (idle.length) {
|
|
656
|
-
lines.push("", c.bold(`Checks that don't discriminate (${idle.length})`));
|
|
657
|
-
for (const x of idle) lines.push(` ${c.dim("·")} ${undiscriminatingLabel(x)}`);
|
|
658
|
-
}
|
|
659
|
-
if (lifted.length) {
|
|
660
|
-
lines.push("", c.bold(c.red(`Lift below minLift (${lifted.length})`)));
|
|
661
|
-
for (const line of lifted) lines.push(` ${c.red("✗")} ${line}`);
|
|
662
|
-
}
|
|
663
|
-
if (record.status === "budget") lines.push("", c.yellow("Budget reached: attempts that hadn’t started were skipped"));
|
|
664
|
-
lines.push("");
|
|
665
|
-
if (record.families?.length) lines.push(`${c.dim("Families")} ${familyTotals(c, record.families)}`);
|
|
666
|
-
lines.push(`${c.dim(label)} ${totals(c, record.summary, cancelled)}`, `${c.dim("Duration")} ${formatDuration(record.durationMs)}`);
|
|
667
377
|
const tokens = formatUsage(record.cost.usage);
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
378
|
+
const notes = [
|
|
379
|
+
...record.status === "budget" ? [c.yellow("Budget reached: attempts that hadn’t started were skipped")] : [],
|
|
380
|
+
...record.status === "interrupted" ? [c.yellow("Interrupted: attempts that hadn’t finished were cancelled")] : [],
|
|
381
|
+
c.dim([
|
|
382
|
+
formatDuration(record.durationMs),
|
|
383
|
+
tokens,
|
|
384
|
+
`results ${e.summaryPath}`
|
|
385
|
+
].filter(Boolean).join(" · "))
|
|
386
|
+
];
|
|
387
|
+
return [...e.unhandledErrors.flatMap((error) => [c.red(`error: ${error}`), ""]), ...render(suiteResult(record), null, {
|
|
388
|
+
color: c.enabled,
|
|
389
|
+
verbose,
|
|
390
|
+
notes,
|
|
391
|
+
hint: e.hint
|
|
392
|
+
})];
|
|
671
393
|
}
|
|
672
394
|
//#endregion
|
|
673
395
|
//#region src/ui/tags.ts
|
|
@@ -730,16 +452,9 @@ var Tagger = class {
|
|
|
730
452
|
//#endregion
|
|
731
453
|
//#region src/ui/agent.ts
|
|
732
454
|
const MAX_LINES = 12;
|
|
733
|
-
const WORD = {
|
|
734
|
-
fail: "FAIL",
|
|
735
|
-
infra_error: "INFRA",
|
|
736
|
-
cancelled: "CANCELLED"
|
|
737
|
-
};
|
|
738
455
|
var AgentRenderer = class {
|
|
739
456
|
#o;
|
|
740
457
|
#c = colors(false);
|
|
741
|
-
#logs = /* @__PURE__ */ new Map();
|
|
742
|
-
#printed = /* @__PURE__ */ new Set();
|
|
743
458
|
/** `[key]` prefixes for `-v` lines, from each attempt's start. */
|
|
744
459
|
#labels = /* @__PURE__ */ new Map();
|
|
745
460
|
#tags = new Tagger();
|
|
@@ -749,30 +464,6 @@ var AgentRenderer = class {
|
|
|
749
464
|
#write(text) {
|
|
750
465
|
this.#o.out.write(`${text.trimEnd()}\n`);
|
|
751
466
|
}
|
|
752
|
-
#failure(result, cell, n) {
|
|
753
|
-
const outcome = outcomeOf(result);
|
|
754
|
-
if (outcome === "pass" || outcome === "skipped") return;
|
|
755
|
-
this.#printed.add(result.key);
|
|
756
|
-
const kind = outcome === "fail" ? result.meta?.errorKind ?? "assertion" : null;
|
|
757
|
-
const detail = [
|
|
758
|
-
formatDuration(result.durationMs),
|
|
759
|
-
kind,
|
|
760
|
-
result.attempt?.gate === "none" ? "not gated" : ""
|
|
761
|
-
].filter(Boolean).join(", ");
|
|
762
|
-
const which = result.attempt?.label ? ` [${result.attempt.label}]` : "";
|
|
763
|
-
const missed = outcome === "fail" && result.attempt?.gate === "none";
|
|
764
|
-
this.#write(`${missed ? "MISS" : WORD[outcome]} ${result.id}${which} (${detail})`);
|
|
765
|
-
if (outcome !== "cancelled") {
|
|
766
|
-
const lines = failureLines(this.#c, result, { max: MAX_LINES });
|
|
767
|
-
for (const line of missed ? lines.filter((l) => l.trim()).slice(0, 1) : lines) this.#write(` ${line}`);
|
|
768
|
-
}
|
|
769
|
-
const logs = missed ? void 0 : this.#logs.get(result.key);
|
|
770
|
-
if (logs?.length) {
|
|
771
|
-
this.#write(" console:");
|
|
772
|
-
for (const line of capLines(logs.join("\n"), MAX_LINES)) this.#write(` ${line}`);
|
|
773
|
-
}
|
|
774
|
-
if (!result.meta?.prepare) this.#write(` record: ${this.#o.attemptDir(result.id, cell, n)}`);
|
|
775
|
-
}
|
|
776
467
|
onEvent(e) {
|
|
777
468
|
switch (e.type) {
|
|
778
469
|
case "plan":
|
|
@@ -795,64 +486,22 @@ var AgentRenderer = class {
|
|
|
795
486
|
for (const line of debugLines(this.#c, e.line, this.#o.verbosity === 2)) this.#write(`${label} ${line}`);
|
|
796
487
|
return;
|
|
797
488
|
}
|
|
798
|
-
case "log": {
|
|
799
|
-
if (!e.key) return;
|
|
800
|
-
const logs = this.#logs.get(e.key) ?? [];
|
|
801
|
-
logs.push(...e.text.replace(/\n$/, "").split("\n"));
|
|
802
|
-
this.#logs.set(e.key, logs);
|
|
803
|
-
return;
|
|
804
|
-
}
|
|
805
489
|
case "eval-progress": {
|
|
806
490
|
if (e.progress.kind !== "browser-download") return;
|
|
807
491
|
const label = this.#labels.get(e.key) ?? `[${e.key}]`;
|
|
808
492
|
this.#write(`${label} ${progressLine(this.#c, e.progress)}`);
|
|
809
493
|
return;
|
|
810
494
|
}
|
|
811
|
-
case "eval-end": {
|
|
812
|
-
const { attempt } = e.result;
|
|
813
|
-
this.#failure(e.result, attempt?.cell.key ?? "", attempt?.n ?? 1);
|
|
814
|
-
return;
|
|
815
|
-
}
|
|
816
495
|
case "prepare":
|
|
817
496
|
for (const line of prepareLines(this.#c, e, MAX_LINES)) this.#write(line);
|
|
818
497
|
return;
|
|
819
498
|
case "notice":
|
|
820
499
|
if (e.level !== "info") this.#write(e.text);
|
|
821
500
|
return;
|
|
822
|
-
case "run-end":
|
|
823
|
-
|
|
824
|
-
for (const
|
|
825
|
-
const result = resultFor(entry, attempt, e.results);
|
|
826
|
-
if (outcome === "cancelled" && !this.#printed.has(result.key)) this.#failure(result, attempt.cell, attempt.n);
|
|
827
|
-
}
|
|
828
|
-
for (const error of e.unhandledErrors) this.#write(`ERROR ${error}`);
|
|
829
|
-
for (const entry of e.record.evals) for (const a of entry.answers ?? []) {
|
|
830
|
-
this.#write(`question ${entry.id}: ${answersLabel(a)}`);
|
|
831
|
-
for (const reason of sampleReasons(a.votes)) this.#write(` ${reason}`);
|
|
832
|
-
}
|
|
833
|
-
for (const x of undiscriminating(e.record.evals)) this.#write(`check doesn't discriminate: ${undiscriminatingLabel(x)}`);
|
|
834
|
-
for (const family of e.record.families ?? []) {
|
|
835
|
-
const pooled = family.lifts.length ? family.lifts.map((l) => {
|
|
836
|
-
const gate = l.minLift === void 0 ? "" : ` (minLift ${Math.round(l.minLift * 100)}${l.outcome === "fail" ? ", FAIL" : ""})`;
|
|
837
|
-
return `${l.variant} ${familyLiftLabel(l)}${gate}`;
|
|
838
|
-
}) : family.rates.map((r) => `${r.cell} ${familyRateLabel(r)}`);
|
|
839
|
-
this.#write(`family ${family.id}: ${familyHeadLabel(family)} · ${pooled.join(" · ")}`);
|
|
840
|
-
}
|
|
841
|
-
const s = e.record.summary;
|
|
842
|
-
const cancelled = failing.filter((f) => f.outcome === "cancelled").length;
|
|
843
|
-
const parts = [
|
|
844
|
-
s.pass && `${s.pass} passed`,
|
|
845
|
-
s.fail - s.notGated - cancelled > 0 && `${s.fail - s.notGated - cancelled} failed`,
|
|
846
|
-
s.notGated > 0 && `${s.notGated} missed, not gated`,
|
|
847
|
-
s.infraError && `${s.infraError} infra error`,
|
|
848
|
-
cancelled && `${cancelled} cancelled`,
|
|
849
|
-
s.skipped && `${s.skipped} skipped`
|
|
850
|
-
].filter(Boolean);
|
|
851
|
-
const scope = s.attempts === s.evals ? "" : ` (${s.attempts} attempts, ${s.evals} evals)`;
|
|
852
|
-
this.#write(parts.length ? `${parts.join(", ")}${scope}` : "no evals ran");
|
|
853
|
-
this.#write(`summary: ${e.summaryPath}`);
|
|
501
|
+
case "run-end":
|
|
502
|
+
this.#write("");
|
|
503
|
+
for (const line of resultLines(this.#c, e, (this.#o.verbosity ?? 0) > 0)) this.#write(line);
|
|
854
504
|
return;
|
|
855
|
-
}
|
|
856
505
|
default: return;
|
|
857
506
|
}
|
|
858
507
|
}
|
|
@@ -869,6 +518,8 @@ const STARTS = {
|
|
|
869
518
|
"browser-download": "browser-download"
|
|
870
519
|
};
|
|
871
520
|
const ERROR_LINES = 12;
|
|
521
|
+
/** Back to the start of the line and clear it, for the live status line. */
|
|
522
|
+
const CLEAR = "\r\x1B[2K";
|
|
872
523
|
/** GitHub Actions workflow-command escaping. */
|
|
873
524
|
const ghEscape = (s, property = false) => {
|
|
874
525
|
const out = s.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
|
|
@@ -894,10 +545,18 @@ var PlainRenderer = class {
|
|
|
894
545
|
#runStartedAt = 0;
|
|
895
546
|
#lastWrite = 0;
|
|
896
547
|
#timer;
|
|
548
|
+
/** On a TTY: the status line is drawn under everything else, and redrawn after each write. */
|
|
549
|
+
#live;
|
|
550
|
+
#status = "";
|
|
551
|
+
/** Evals and tries collected (not skipped), and the tries that ended. */
|
|
552
|
+
#evals = /* @__PURE__ */ new Set();
|
|
553
|
+
#tries = /* @__PURE__ */ new Set();
|
|
554
|
+
#ended = /* @__PURE__ */ new Set();
|
|
897
555
|
constructor(options) {
|
|
898
556
|
this.#o = options;
|
|
899
557
|
this.#c = options.colors;
|
|
900
558
|
this.#now = options.now ?? Date.now;
|
|
559
|
+
this.#live = options.output.requested === "live";
|
|
901
560
|
const { heartbeatMs } = options.output;
|
|
902
561
|
if (options.timers !== false && heartbeatMs > 0) {
|
|
903
562
|
this.#timer = setInterval(() => this.tick(), Math.min(heartbeatMs, 5e3));
|
|
@@ -905,9 +564,24 @@ var PlainRenderer = class {
|
|
|
905
564
|
}
|
|
906
565
|
}
|
|
907
566
|
#write(text) {
|
|
908
|
-
|
|
567
|
+
const line = `${text.trimEnd()}\n`;
|
|
568
|
+
this.#o.out.write(this.#status ? `${CLEAR}${line}${this.#status}` : line);
|
|
909
569
|
this.#lastWrite = this.#now();
|
|
910
570
|
}
|
|
571
|
+
/** `7 evals · 12/28 tries`: what's collected so far and how many tries ended. */
|
|
572
|
+
#drawStatus() {
|
|
573
|
+
if (!this.#live || !this.#tries.size) return;
|
|
574
|
+
const evals = `${this.#evals.size} eval${this.#evals.size === 1 ? "" : "s"}`;
|
|
575
|
+
const status = this.#c.dim(`${evals} · ${this.#ended.size}/${this.#tries.size} tries`);
|
|
576
|
+
if (status === this.#status) return;
|
|
577
|
+
this.#o.out.write(`${CLEAR}${status}`);
|
|
578
|
+
this.#status = status;
|
|
579
|
+
}
|
|
580
|
+
#clearStatus() {
|
|
581
|
+
if (!this.#status) return;
|
|
582
|
+
this.#o.out.write(CLEAR);
|
|
583
|
+
this.#status = "";
|
|
584
|
+
}
|
|
911
585
|
#attempt(ref, startedAt) {
|
|
912
586
|
const n = ref.attempt?.n ?? 1;
|
|
913
587
|
const label = `[${this.#tags.label(ref.id, n)} ${attemptAxes(ref.attempt, this.#o.harness)}]`;
|
|
@@ -953,14 +627,20 @@ var PlainRenderer = class {
|
|
|
953
627
|
return;
|
|
954
628
|
case "collected":
|
|
955
629
|
this.#tags.addFile(e.evals);
|
|
956
|
-
for (const x of e.evals)
|
|
630
|
+
for (const x of e.evals) {
|
|
631
|
+
if (x.skipped) continue;
|
|
632
|
+
this.#queued.add(x.key);
|
|
633
|
+
this.#evals.add(x.id);
|
|
634
|
+
this.#tries.add(x.key);
|
|
635
|
+
}
|
|
636
|
+
this.#drawStatus();
|
|
957
637
|
return;
|
|
958
638
|
case "eval-start": {
|
|
959
639
|
const a = this.#attempt(e, e.at);
|
|
960
640
|
a.last = e;
|
|
961
641
|
this.#queued.delete(e.key);
|
|
962
642
|
this.#running.set(e.key, a);
|
|
963
|
-
this.#write(`${this.#prefix(a)} ${c.dim("▶")} ${e.id}`);
|
|
643
|
+
if (this.#streaming) this.#write(`${this.#prefix(a)} ${c.dim("▶")} ${e.id}`);
|
|
964
644
|
return;
|
|
965
645
|
}
|
|
966
646
|
case "eval-progress": {
|
|
@@ -1008,6 +688,8 @@ var PlainRenderer = class {
|
|
|
1008
688
|
}
|
|
1009
689
|
case "eval-end":
|
|
1010
690
|
this.#end(e.result, e.at);
|
|
691
|
+
if (this.#tries.has(e.result.key)) this.#ended.add(e.result.key);
|
|
692
|
+
this.#drawStatus();
|
|
1011
693
|
return;
|
|
1012
694
|
case "prepare":
|
|
1013
695
|
for (const line of prepareLines(c, e, ERROR_LINES)) this.#write(line);
|
|
@@ -1028,8 +710,9 @@ var PlainRenderer = class {
|
|
|
1028
710
|
return;
|
|
1029
711
|
}
|
|
1030
712
|
case "run-end":
|
|
713
|
+
this.#clearStatus();
|
|
1031
714
|
this.#write("");
|
|
1032
|
-
for (const line of
|
|
715
|
+
for (const line of resultLines(c, e, (this.#o.verbosity ?? 0) > 0)) this.#write(line);
|
|
1033
716
|
return;
|
|
1034
717
|
}
|
|
1035
718
|
}
|
|
@@ -1042,6 +725,11 @@ var PlainRenderer = class {
|
|
|
1042
725
|
const title = w.kind === "root" ? "Sandbox runs as root" : "Sandbox has extra capabilities";
|
|
1043
726
|
this.#write(`::warning ${file}title=${ghEscape(title, true)}::${ghEscape(w.message)}`);
|
|
1044
727
|
}
|
|
728
|
+
/**
|
|
729
|
+
* An ended attempt's logs, as `--output-logs` picks: grouped, its block under a `▶` header;
|
|
730
|
+
* streamed, only its error lines, since the rest already printed. A sandbox that failed to
|
|
731
|
+
* prepare was annotated once, for all its attempts.
|
|
732
|
+
*/
|
|
1045
733
|
#end(result, at) {
|
|
1046
734
|
const c = this.#c;
|
|
1047
735
|
const a = this.#running.get(result.key) ?? this.#attempt(result, at - result.durationMs);
|
|
@@ -1049,18 +737,17 @@ var PlainRenderer = class {
|
|
|
1049
737
|
this.#queued.delete(result.key);
|
|
1050
738
|
const outcome = outcomeOf(result);
|
|
1051
739
|
const failed = outcome !== "pass" && outcome !== "skipped";
|
|
1052
|
-
const
|
|
1053
|
-
const
|
|
1054
|
-
const missed = ungated !== "" && outcome === "fail";
|
|
1055
|
-
const head = `${this.#prefix(a)} ${missed ? MISS_MARK(c) : mark(c, outcome)} ${result.id}${time}${ungated}`;
|
|
740
|
+
const ungated = failed && result.attempt?.gate === "none";
|
|
741
|
+
const missed = ungated && outcome === "fail";
|
|
1056
742
|
const { outputLogs, githubActions, logPrefix } = this.#o.output;
|
|
1057
743
|
const showDetail = !this.#streaming && a.lines.length > 0 && (outputLogs === "full" || outputLogs === "errors-only" && failed);
|
|
1058
744
|
const judged = result.meta?.errorKind === "judge" && (showDetail || this.#streaming);
|
|
1059
745
|
const errors = failed && outputLogs !== "none" && !judged ? missed ? failureLines(colors(false), result, { max: 1 }).filter((l) => l.trim()).slice(0, 1).map((l) => c.dim(l)) : failureLines(c, result, { max: ERROR_LINES }) : [];
|
|
1060
746
|
const lines = a.lines.filter((l) => l.kind !== "cleanup").sort((x, y) => x.at - y.at);
|
|
1061
747
|
const prefixed = logPrefix === "task";
|
|
748
|
+
const head = `${this.#prefix(a)} ${c.dim("▶")} ${result.id}`;
|
|
1062
749
|
const group = githubActions && showDetail && (!failed || missed);
|
|
1063
|
-
this.#write(group ? `::group::${stripAnsi(head)}` : head);
|
|
750
|
+
if (showDetail || !this.#streaming && errors.length) this.#write(group ? `::group::${stripAnsi(head)}` : head);
|
|
1064
751
|
if (showDetail) for (const line of lines) this.#write(this.#detail(a, line, prefixed));
|
|
1065
752
|
for (const line of errors) this.#write(prefixed ? `${this.#prefix(a)} ${line}` : ` ${line}`);
|
|
1066
753
|
if (group) this.#write("::endgroup::");
|
|
@@ -1076,7 +763,7 @@ var PlainRenderer = class {
|
|
|
1076
763
|
/** Prints the heartbeat if nothing was written for `heartbeatMs` and evals are running. */
|
|
1077
764
|
tick(now = this.#now()) {
|
|
1078
765
|
const { heartbeatMs } = this.#o.output;
|
|
1079
|
-
if (heartbeatMs <= 0 || this.#running.size === 0) return;
|
|
766
|
+
if (this.#live || heartbeatMs <= 0 || this.#running.size === 0) return;
|
|
1080
767
|
if (now - this.#lastWrite < heartbeatMs) return;
|
|
1081
768
|
const c = this.#c;
|
|
1082
769
|
const running = [...this.#running.values()].map((a) => {
|
|
@@ -1089,6 +776,7 @@ var PlainRenderer = class {
|
|
|
1089
776
|
}
|
|
1090
777
|
close() {
|
|
1091
778
|
clearInterval(this.#timer);
|
|
779
|
+
this.#clearStatus();
|
|
1092
780
|
}
|
|
1093
781
|
};
|
|
1094
782
|
//#endregion
|
|
@@ -1113,13 +801,13 @@ const CI_VARS = [
|
|
|
1113
801
|
const isCI = (env) => CI_VARS.some((name) => set(env, name));
|
|
1114
802
|
function pick(name, value, allowed) {
|
|
1115
803
|
if (value === void 0 || value === "") return void 0;
|
|
1116
|
-
if (value === "auto" || allowed
|
|
1117
|
-
throw new UsageError(`${name}
|
|
804
|
+
if (value === "auto" || isOneOf(allowed, value)) return value;
|
|
805
|
+
throw new UsageError(`${name} is one of ${[...allowed, "auto"].join(", ")} (got ${value})`);
|
|
1118
806
|
}
|
|
1119
807
|
function parseHeartbeat(value) {
|
|
1120
808
|
if (!value) return 6e4;
|
|
1121
809
|
const match = /^(\d+(?:\.\d+)?)(ms|s|m)?$/.exec(value);
|
|
1122
|
-
if (!match) throw new UsageError(`REEVAL_HEARTBEAT must be a duration like 30s or 0`);
|
|
810
|
+
if (!match) throw new UsageError(`REEVAL_HEARTBEAT must be a duration like 30s, or 0 for none (got ${value})`);
|
|
1123
811
|
const unit = {
|
|
1124
812
|
ms: 1,
|
|
1125
813
|
s: 1e3,
|
|
@@ -1152,7 +840,7 @@ function resolveOutput(input) {
|
|
|
1152
840
|
mode,
|
|
1153
841
|
logOrder,
|
|
1154
842
|
logPrefix,
|
|
1155
|
-
outputLogs: logs && logs !== "auto" ? logs : "full",
|
|
843
|
+
outputLogs: logs && logs !== "auto" ? logs : flags.verbose ? "full" : "errors-only",
|
|
1156
844
|
color: env.NO_COLOR ? false : env.FORCE_COLOR !== void 0 && env.FORCE_COLOR !== "" ? set(env, "FORCE_COLOR") : mode === "agent" ? false : input.isTTY || githubActions,
|
|
1157
845
|
githubActions,
|
|
1158
846
|
heartbeatMs: mode === "agent" ? 0 : parseHeartbeat(env.REEVAL_HEARTBEAT)
|
|
@@ -1219,12 +907,16 @@ async function run(argv) {
|
|
|
1219
907
|
return EXIT.ok;
|
|
1220
908
|
}
|
|
1221
909
|
const [command, ...filters] = positionals;
|
|
910
|
+
if (values.help && command) {
|
|
911
|
+
console.log(commandHelpText(version, positionals));
|
|
912
|
+
return EXIT.ok;
|
|
913
|
+
}
|
|
1222
914
|
if (values.help || !command) {
|
|
1223
915
|
console.log(HELP);
|
|
1224
916
|
return values.help ? EXIT.ok : EXIT.usage;
|
|
1225
917
|
}
|
|
1226
918
|
if (command === "init") {
|
|
1227
|
-
const { initCommand } = await import("./init-
|
|
919
|
+
const { initCommand } = await import("./init-fhOXED8F.js");
|
|
1228
920
|
return initCommand(values, filters, {
|
|
1229
921
|
out: (s) => console.log(s),
|
|
1230
922
|
input: process.stdin,
|
|
@@ -1233,7 +925,7 @@ async function run(argv) {
|
|
|
1233
925
|
});
|
|
1234
926
|
}
|
|
1235
927
|
if (command === "doctor") {
|
|
1236
|
-
const { doctorCommand } = await import("./doctor-
|
|
928
|
+
const { doctorCommand } = await import("./doctor-D2MbNO8L.js");
|
|
1237
929
|
return doctorCommand(values, {
|
|
1238
930
|
out: (s) => console.log(s),
|
|
1239
931
|
color: !!process.stdout.isTTY && !process.env.NO_COLOR,
|
|
@@ -1241,7 +933,7 @@ async function run(argv) {
|
|
|
1241
933
|
});
|
|
1242
934
|
}
|
|
1243
935
|
if (command === "report") {
|
|
1244
|
-
const { reportCommand } = await import("./command-
|
|
936
|
+
const { reportCommand } = await import("./command-DbAe1Rzb.js");
|
|
1245
937
|
return reportCommand(values, filters, {
|
|
1246
938
|
out: (s) => console.log(s),
|
|
1247
939
|
err: (s) => console.error(dim(s)),
|
|
@@ -1256,7 +948,7 @@ async function run(argv) {
|
|
|
1256
948
|
}
|
|
1257
949
|
if (command === "studio") {
|
|
1258
950
|
const config = await loadConfig(configPath, "studio");
|
|
1259
|
-
const { studioCommand } = await import("./command-
|
|
951
|
+
const { studioCommand } = await import("./command-BlM0y8jN.js");
|
|
1260
952
|
return studioCommand({
|
|
1261
953
|
config,
|
|
1262
954
|
flags: values,
|
|
@@ -1267,7 +959,7 @@ async function run(argv) {
|
|
|
1267
959
|
if (command === "mcp") {
|
|
1268
960
|
if (!values.http) console.log = console.info = console.debug = console.error;
|
|
1269
961
|
const config = await loadConfig(configPath, "mcp");
|
|
1270
|
-
const { mcpCommand } = await import("./command-
|
|
962
|
+
const { mcpCommand } = await import("./command-TgbzPizb.js");
|
|
1271
963
|
return mcpCommand({
|
|
1272
964
|
config,
|
|
1273
965
|
flags: values,
|
|
@@ -1276,7 +968,7 @@ async function run(argv) {
|
|
|
1276
968
|
}
|
|
1277
969
|
if (command in HISTORY_COMMANDS) {
|
|
1278
970
|
const config = await loadConfig(configPath, command);
|
|
1279
|
-
const commands = await import("./commands-
|
|
971
|
+
const commands = await import("./commands-CthqwkAn.js");
|
|
1280
972
|
const ctx = {
|
|
1281
973
|
config,
|
|
1282
974
|
flags: values,
|
|
@@ -1289,7 +981,7 @@ async function run(argv) {
|
|
|
1289
981
|
case "compare": return commands.compareCommand(ctx, filters);
|
|
1290
982
|
case "checkout": return commands.checkoutCommand(ctx, filters);
|
|
1291
983
|
case "query": {
|
|
1292
|
-
const { queryCommand } = await import("./query-
|
|
984
|
+
const { queryCommand } = await import("./query-CRQfsw0e.js");
|
|
1293
985
|
return queryCommand({
|
|
1294
986
|
...ctx,
|
|
1295
987
|
err: (s) => console.error(dim(s))
|
|
@@ -1297,7 +989,7 @@ async function run(argv) {
|
|
|
1297
989
|
}
|
|
1298
990
|
case "analyze": {
|
|
1299
991
|
loadEnvFiles(configPath);
|
|
1300
|
-
const { analyzeCommand } = await import("./command-
|
|
992
|
+
const { analyzeCommand } = await import("./command-C-cVjlny.js");
|
|
1301
993
|
return analyzeCommand({
|
|
1302
994
|
...ctx,
|
|
1303
995
|
err: (s) => console.error(dim(s))
|
|
@@ -1330,16 +1022,19 @@ async function cleanCommand(flags, configPath) {
|
|
|
1330
1022
|
keep = Number(flags.keep);
|
|
1331
1023
|
if (!(Number.isInteger(keep) && keep >= 0)) throw new UsageError(`--keep must be a whole number (got ${flags.keep})`);
|
|
1332
1024
|
}
|
|
1333
|
-
const { debugRoot, pruneDebug } = await import("./files-
|
|
1334
|
-
const { formatBytes } = await import("./debug-
|
|
1025
|
+
const { debugRoot, pruneDebug } = await import("./files-BAt0i00X.js");
|
|
1026
|
+
const { formatBytes } = await import("./debug-D7bEv_UV.js");
|
|
1335
1027
|
const { runs, bytes } = await pruneDebug(config.root, keep);
|
|
1336
1028
|
const where = fromCwd(debugRoot(config.root)) || ".";
|
|
1337
1029
|
console.log(runs.length ? `Removed debug data for ${runs.length} run${runs.length === 1 ? "" : "s"} (${formatBytes(bytes)}) from ${where}` : `No debug data to remove in ${where}`);
|
|
1338
1030
|
if (flags.images) {
|
|
1339
|
-
const { pruneImages } = await import("./src-
|
|
1340
|
-
const { requireDocker } = await import("./providers-
|
|
1341
|
-
|
|
1342
|
-
const
|
|
1031
|
+
const { dockerAvailable, pruneImages } = await import("./src-DYO3DdnQ.js");
|
|
1032
|
+
const { requireDocker } = await import("./providers-B9yTdIqF.js");
|
|
1033
|
+
const engines = [];
|
|
1034
|
+
for (const engine of ["docker", "podman"]) if (await dockerAvailable(engine)) engines.push(engine);
|
|
1035
|
+
if (!engines.length) await requireDocker();
|
|
1036
|
+
let removed = 0;
|
|
1037
|
+
for (const engine of engines) removed += await pruneImages(engine);
|
|
1343
1038
|
console.log(removed ? `Removed ${removed} image${removed === 1 ? "" : "s"} reeval built that nothing uses` : "No leftover images to remove");
|
|
1344
1039
|
}
|
|
1345
1040
|
return EXIT.ok;
|
|
@@ -1355,40 +1050,21 @@ function verbosityOf(flags) {
|
|
|
1355
1050
|
* does. Needs a config, as `reeval run` does: there is no default image.
|
|
1356
1051
|
*/
|
|
1357
1052
|
async function imageBuildCommand(flags, configPath, filters) {
|
|
1358
|
-
const { buildImages, imagePlanLines, imageTargets } = await import("./images-
|
|
1053
|
+
const { buildImages, imagePlanLines, imageTargets, plannedImageUses } = await import("./images-Bi3aGxb9.js");
|
|
1359
1054
|
const { runId, stagingDir, config, runs, tags, concurrency, profile } = await startRun(await prepareRun({
|
|
1360
1055
|
...flags,
|
|
1361
1056
|
"dry-run": true
|
|
1362
1057
|
}, configPath));
|
|
1363
1058
|
const root = config.root;
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
concurrency,
|
|
1374
|
-
profile
|
|
1375
|
-
})),
|
|
1376
|
-
filters,
|
|
1377
|
-
onPlan: async (collected) => {
|
|
1378
|
-
if (collected.unmatched.length) throw unmatchedFilter(config, collected.unmatched);
|
|
1379
|
-
planned = collected.planned.filter((p) => !p.attempt.plan.skip);
|
|
1380
|
-
return false;
|
|
1381
|
-
}
|
|
1382
|
-
});
|
|
1383
|
-
const targets = imageTargets(planned.length ? planned.map((p) => ({
|
|
1384
|
-
id: p.id,
|
|
1385
|
-
harness: p.attempt.harness,
|
|
1386
|
-
sandbox: p.attempt.sandbox
|
|
1387
|
-
})) : config.harness.map((harness) => ({
|
|
1388
|
-
id: "",
|
|
1389
|
-
harness,
|
|
1390
|
-
sandbox: config.sandbox
|
|
1391
|
-
})));
|
|
1059
|
+
const targets = imageTargets(await plannedImageUses({
|
|
1060
|
+
runId,
|
|
1061
|
+
stagingDir,
|
|
1062
|
+
config,
|
|
1063
|
+
runs,
|
|
1064
|
+
tags,
|
|
1065
|
+
concurrency,
|
|
1066
|
+
profile
|
|
1067
|
+
}, filters, (parts) => unmatchedFilter(config, parts)));
|
|
1392
1068
|
if (targets.length === 0) {
|
|
1393
1069
|
console.log("No eval runs in a Docker sandbox, so there are no images to build.");
|
|
1394
1070
|
return EXIT.ok;
|
|
@@ -1397,7 +1073,7 @@ async function imageBuildCommand(flags, configPath, filters) {
|
|
|
1397
1073
|
for (const line of await imagePlanLines(targets, root)) console.log(line);
|
|
1398
1074
|
return EXIT.ok;
|
|
1399
1075
|
}
|
|
1400
|
-
const { PrepareError } = await import("./provider-
|
|
1076
|
+
const { PrepareError } = await import("./provider-DehR4CMN.js");
|
|
1401
1077
|
let built;
|
|
1402
1078
|
try {
|
|
1403
1079
|
built = await buildImages(targets, root, {
|
|
@@ -1434,13 +1110,12 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1434
1110
|
if (githubOut) await appendFile(githubOut, `run-id=${ctx.runId}\n`).catch(() => {});
|
|
1435
1111
|
const stepStart = process.env.GITHUB_STEP_SUMMARY;
|
|
1436
1112
|
if (stepStart) await appendFile(stepStart, `run ${ctx.runId}\n`).catch(() => {});
|
|
1437
|
-
const { engineVersions } = await import("./node-
|
|
1113
|
+
const { engineVersions } = await import("./node-B3ydHo6t.js");
|
|
1438
1114
|
const renderer = createRenderer({
|
|
1439
|
-
out: setup.json ? { write: () => true } : process.stdout,
|
|
1115
|
+
out: setup.json ? setup.dryRun ? { write: () => true } : process.stderr : process.stdout,
|
|
1440
1116
|
output: setup.output,
|
|
1441
1117
|
verbosity: ctx.verbosity ?? 0,
|
|
1442
|
-
harness: setup.config.harness[0]?.kind ?? "agent"
|
|
1443
|
-
attemptDir: (id, cell, n) => fromCwd(join(ctx.scratch, ctx.runId, evalSlug(id), evalSlug(cell), String(n)))
|
|
1118
|
+
harness: setup.config.harness[0]?.kind ?? "agent"
|
|
1444
1119
|
});
|
|
1445
1120
|
let executed;
|
|
1446
1121
|
try {
|
|
@@ -1455,15 +1130,16 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1455
1130
|
}
|
|
1456
1131
|
const { engineRun, plan, sandboxVersions, budgetReached, live, notes, questions } = executed;
|
|
1457
1132
|
invocation.unhandledErrors = engineRun.unhandledErrors;
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
await
|
|
1133
|
+
const engines = [...new Set(plan?.sandboxes.flatMap((s) => s.kind === "docker" ? [s.engine ?? "docker"] : []))];
|
|
1134
|
+
if ((interrupted || engineRun.cancelled) && engines.length) {
|
|
1135
|
+
const { removeRunContainers } = await import("./docker-DNmMPOBb.js");
|
|
1136
|
+
await removeRunContainers(ctx.runId, engines);
|
|
1461
1137
|
}
|
|
1462
1138
|
if (notes) {
|
|
1463
1139
|
const cancelled = interrupted || engineRun.cancelled;
|
|
1464
1140
|
const written = await notes.finish(cancelled);
|
|
1465
1141
|
if (!cancelled && written.length) {
|
|
1466
|
-
const { notesLine } = await import("./agent-
|
|
1142
|
+
const { notesLine } = await import("./agent-D483ru7D.js");
|
|
1467
1143
|
const text = notesLine(ctx.config.root, ctx.runId, written);
|
|
1468
1144
|
renderer.onEvent({
|
|
1469
1145
|
type: "notice",
|
|
@@ -1480,8 +1156,8 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1480
1156
|
}
|
|
1481
1157
|
const stopped = interrupted || engineRun.cancelled;
|
|
1482
1158
|
const answers = questions && !stopped ? await questions.settle() : void 0;
|
|
1483
|
-
const { lockfiles } = await import("./state-
|
|
1484
|
-
const { writeScratchRun } = await import("./results-
|
|
1159
|
+
const { lockfiles } = await import("./state-DpAxYyED.js");
|
|
1160
|
+
const { writeScratchRun } = await import("./results-BE2f-1XS.js");
|
|
1485
1161
|
const run = await writeScratchRun({
|
|
1486
1162
|
ctx,
|
|
1487
1163
|
author: ctx.author,
|
|
@@ -1491,7 +1167,7 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1491
1167
|
interrupted: stopped,
|
|
1492
1168
|
budgetReached: budgetReached(),
|
|
1493
1169
|
plan,
|
|
1494
|
-
|
|
1170
|
+
reeval: version,
|
|
1495
1171
|
runtime: runtimeInfo(),
|
|
1496
1172
|
language: { name: "typescript" },
|
|
1497
1173
|
enginePackages: engineVersions,
|
|
@@ -1506,8 +1182,8 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1506
1182
|
}, () => live?.stop());
|
|
1507
1183
|
const { record } = run;
|
|
1508
1184
|
if (notes && !stopped) {
|
|
1509
|
-
const { summarizeRun } = await import("./agent-
|
|
1510
|
-
const { resolveAnalysisModel } = await import("./model-
|
|
1185
|
+
const { summarizeRun } = await import("./agent-D483ru7D.js");
|
|
1186
|
+
const { resolveAnalysisModel } = await import("./model-CXhrziBe.js");
|
|
1511
1187
|
const model = resolveAnalysisModel(ctx.config, "agent");
|
|
1512
1188
|
const { level, text } = await summarizeRun(ctx.config, record.runId, model);
|
|
1513
1189
|
renderer.onEvent({
|
|
@@ -1517,7 +1193,7 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1517
1193
|
text
|
|
1518
1194
|
});
|
|
1519
1195
|
}
|
|
1520
|
-
const { pruneDebug } = await import("./files-
|
|
1196
|
+
const { pruneDebug } = await import("./files-BAt0i00X.js");
|
|
1521
1197
|
await pruneDebug(ctx.config.root, ctx.config.debug.keep).catch(() => {});
|
|
1522
1198
|
const summary = run.artifactDir ? join(run.artifactDir, "summary.md") : run.recordPath;
|
|
1523
1199
|
renderer.onEvent({
|
|
@@ -1526,7 +1202,8 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1526
1202
|
record,
|
|
1527
1203
|
summaryPath: fromCwd(summary),
|
|
1528
1204
|
results: engineRun.evals,
|
|
1529
|
-
unhandledErrors: engineRun.unhandledErrors
|
|
1205
|
+
unhandledErrors: engineRun.unhandledErrors,
|
|
1206
|
+
hint: !hasAnalysisModel(ctx.config)
|
|
1530
1207
|
});
|
|
1531
1208
|
renderer.close();
|
|
1532
1209
|
const stepSummary = process.env.GITHUB_STEP_SUMMARY;
|
|
@@ -1534,12 +1211,18 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1534
1211
|
const { config } = ctx;
|
|
1535
1212
|
const mode = setup.record;
|
|
1536
1213
|
if ((flags.record || mode === "always" || mode === "ci" && inCI()) && record.status !== "interrupted") {
|
|
1537
|
-
const { record: recordCmd } = await import("./commands-
|
|
1214
|
+
const { record: recordCmd } = await import("./commands-CthqwkAn.js");
|
|
1538
1215
|
const allow = record.status === "budget" ? { "allow-incomplete": true } : {};
|
|
1539
|
-
|
|
1216
|
+
const line = await recordCmd(config, record.runId, {
|
|
1540
1217
|
...flags,
|
|
1541
1218
|
...allow
|
|
1542
|
-
})
|
|
1219
|
+
});
|
|
1220
|
+
if (setup.json) console.error(line);
|
|
1221
|
+
else console.log(line);
|
|
1222
|
+
}
|
|
1223
|
+
if (setup.json) {
|
|
1224
|
+
const { suiteResult } = await import("./suite-DamAEnNF.js");
|
|
1225
|
+
process.stdout.write(`${JSON.stringify(suiteResult(record), null, 2)}\n`);
|
|
1543
1226
|
}
|
|
1544
1227
|
if (interrupted || engineRun.cancelled) return stopCode;
|
|
1545
1228
|
if (engineRun.unhandledErrors.length > 0) return EXIT.failed;
|
|
@@ -1553,13 +1236,13 @@ async function prepareRun(flags, configPath) {
|
|
|
1553
1236
|
ui: flags.ui,
|
|
1554
1237
|
logOrder: flags["log-order"],
|
|
1555
1238
|
logPrefix: flags["log-prefix"],
|
|
1556
|
-
outputLogs: flags["output-logs"]
|
|
1239
|
+
outputLogs: flags["output-logs"],
|
|
1240
|
+
verbose: verbosityOf(flags) > 0
|
|
1557
1241
|
},
|
|
1558
1242
|
env: process.env,
|
|
1559
|
-
isTTY: !!process.stdout.isTTY,
|
|
1243
|
+
isTTY: !!(flags.json && !flags["dry-run"] ? process.stderr : process.stdout).isTTY,
|
|
1560
1244
|
agent: detectAgent().name
|
|
1561
1245
|
});
|
|
1562
|
-
if (flags.json && !flags["dry-run"]) throw new UsageError("reeval run --json only prints the plan: add --dry-run. A run writes its record to .reeval/runs; read it with reeval show --json.");
|
|
1563
1246
|
const path = requireConfig(configPath);
|
|
1564
1247
|
loadEnvFiles(path);
|
|
1565
1248
|
const named = flags.profile ?? (process.env.REEVAL_PROFILE || void 0);
|
|
@@ -1572,9 +1255,10 @@ async function prepareRun(flags, configPath) {
|
|
|
1572
1255
|
}
|
|
1573
1256
|
const sandboxes = [environmentSandbox(config.environment, config.sandbox), ...profile?.defaults.environment ? [environmentSandbox(profile.defaults.environment, config.sandbox)] : []];
|
|
1574
1257
|
const concurrency = await resolveConcurrency(config, flags.concurrency, async () => {
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1258
|
+
const container = sandboxes.find((s) => s.kind === "docker");
|
|
1259
|
+
if (!container) return hostCapacity();
|
|
1260
|
+
const { dockerCapacity } = await import("./src-DYO3DdnQ.js");
|
|
1261
|
+
return await dockerCapacity(container.engine) ?? hostCapacity();
|
|
1578
1262
|
});
|
|
1579
1263
|
return {
|
|
1580
1264
|
output,
|
|
@@ -1600,11 +1284,11 @@ async function prepareRun(flags, configPath) {
|
|
|
1600
1284
|
async function startRun({ config, profile, runs, tags, concurrency, verbosity, configFile, resume, dryRun }) {
|
|
1601
1285
|
const startedAt = /* @__PURE__ */ new Date();
|
|
1602
1286
|
const git = await gitInfo(config.root, [config.history.dir]);
|
|
1603
|
-
const { worktreePatch } = await import("./state-
|
|
1287
|
+
const { worktreePatch } = await import("./state-DpAxYyED.js");
|
|
1604
1288
|
const patch = git?.dirty ? await worktreePatch(config.root, [config.history.dir]) : null;
|
|
1605
1289
|
const who = await author(config.root);
|
|
1606
|
-
const { stagingDir, sweepStaging } = await import("./results-
|
|
1607
|
-
const { scratchDir } = await import("./files-
|
|
1290
|
+
const { stagingDir, sweepStaging } = await import("./results-BE2f-1XS.js");
|
|
1291
|
+
const { scratchDir } = await import("./files-Bw8lWEjg.js");
|
|
1608
1292
|
const scratch = scratchDir(config.root);
|
|
1609
1293
|
if (resume !== void 0) {
|
|
1610
1294
|
const target = await resolveResume(config.root, resume || void 0);
|
|
@@ -1615,8 +1299,8 @@ async function startRun({ config, profile, runs, tags, concurrency, verbosity, c
|
|
|
1615
1299
|
artifacts: target.previousArtifacts
|
|
1616
1300
|
} : await loadPrevious(stagingDir(config.root, target.runId));
|
|
1617
1301
|
if (!dryRun) try {
|
|
1618
|
-
const { removeRunContainers } = await import("./docker-
|
|
1619
|
-
await removeRunContainers(target.runId);
|
|
1302
|
+
const { removeRunContainers } = await import("./docker-DNmMPOBb.js");
|
|
1303
|
+
await removeRunContainers(target.runId, ["docker", "podman"]);
|
|
1620
1304
|
} catch {}
|
|
1621
1305
|
return {
|
|
1622
1306
|
runId: target.runId,
|
|
@@ -1686,8 +1370,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1686
1370
|
configFile,
|
|
1687
1371
|
completed: []
|
|
1688
1372
|
}));
|
|
1689
|
-
const { runEngine } = await import("./node-
|
|
1690
|
-
const { buildPlan, checkAttemptBudget, planDocument, planLine, planTable } = await import("./plan-
|
|
1373
|
+
const { runEngine } = await import("./node-B3ydHo6t.js");
|
|
1374
|
+
const { buildPlan, checkAttemptBudget, planDocument, planLine, planTable } = await import("./plan-DgQxp9yy.js");
|
|
1691
1375
|
let plan;
|
|
1692
1376
|
let sandboxVersions = { images: [] };
|
|
1693
1377
|
let preflightStop;
|
|
@@ -1714,7 +1398,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1714
1398
|
} : p);
|
|
1715
1399
|
toRun = skipped;
|
|
1716
1400
|
for (const p of skipped) for (const name of p.attempt.secretVars) registerSecret(process.env[name]);
|
|
1717
|
-
const models = skipped.some((p) => !p.attempt.plan.skip && p.attempt.plan.questions?.length) ? await import("./model-
|
|
1401
|
+
const models = skipped.some((p) => !p.attempt.plan.skip && p.attempt.plan.questions?.length) ? await import("./model-CXhrziBe.js") : void 0;
|
|
1718
1402
|
plan = await buildPlan({
|
|
1719
1403
|
planned: skipped,
|
|
1720
1404
|
profile,
|
|
@@ -1730,13 +1414,13 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1730
1414
|
completed: completed.size
|
|
1731
1415
|
};
|
|
1732
1416
|
run.completed = [...completed];
|
|
1733
|
-
const { imageStages, imageTargets } = await import("./images-
|
|
1417
|
+
const { imageStages, imageTargets } = await import("./images-Bi3aGxb9.js");
|
|
1734
1418
|
const targets = imageTargets(skipped.filter((p) => !p.attempt.plan.skip).map((p) => ({
|
|
1735
1419
|
id: p.id,
|
|
1736
1420
|
harness: p.attempt.harness,
|
|
1737
1421
|
sandbox: p.attempt.sandbox
|
|
1738
1422
|
})));
|
|
1739
|
-
if (setup.json) {
|
|
1423
|
+
if (setup.json && setup.dryRun) {
|
|
1740
1424
|
const images = await Promise.all(targets.map(async (t) => ({
|
|
1741
1425
|
id: t.id,
|
|
1742
1426
|
harness: t.harness,
|
|
@@ -1751,10 +1435,16 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1751
1435
|
if (setup.dryRun) {
|
|
1752
1436
|
const todos = excluded.filter((e) => e.mode === "todo").map((e) => e.id);
|
|
1753
1437
|
lines.push(...planTable(plan, todos));
|
|
1754
|
-
const { imageStatusLines } = await import("./images-
|
|
1755
|
-
const { dockerAvailable } = await import("./src-
|
|
1756
|
-
|
|
1757
|
-
|
|
1438
|
+
const { imageStatusLines } = await import("./images-Bi3aGxb9.js");
|
|
1439
|
+
const { dockerAvailable, engineSpec } = await import("./src-DYO3DdnQ.js");
|
|
1440
|
+
const engines = [...new Set(targets.map((t) => t.sandbox.engine ?? "docker"))];
|
|
1441
|
+
const down = [];
|
|
1442
|
+
for (const engine of engines) if (!await dockerAvailable(engine)) down.push(engine);
|
|
1443
|
+
if (targets.length && !down.length) lines.push(...await imageStatusLines(targets, config.root));
|
|
1444
|
+
else if (targets.length) {
|
|
1445
|
+
const names = down.map((e) => engineSpec(e).name).join(" and ");
|
|
1446
|
+
lines.push(`images not checked: ${names} ${down.length === 1 ? "is" : "are"} not running`);
|
|
1447
|
+
}
|
|
1758
1448
|
}
|
|
1759
1449
|
lines.push(...plan.warnings.map((w) => `warning: ${w}`));
|
|
1760
1450
|
lines.push(...plan.hints.map((h) => `hint: ${h}`));
|
|
@@ -1766,7 +1456,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1766
1456
|
});
|
|
1767
1457
|
if (setup.dryRun) return false;
|
|
1768
1458
|
checkAttemptBudget(plan, setup.force, config.file);
|
|
1769
|
-
const analysis = config.analysis.agent ? await import("./model-
|
|
1459
|
+
const analysis = config.analysis.agent ? await import("./model-CXhrziBe.js") : null;
|
|
1770
1460
|
analysis?.analysisModelName(config, "agent");
|
|
1771
1461
|
const questionModels = /* @__PURE__ */ new Set();
|
|
1772
1462
|
const asked = [];
|
|
@@ -1775,7 +1465,9 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1775
1465
|
const questions = (row.plan.questions ?? []).map((q) => ({
|
|
1776
1466
|
question: q.question,
|
|
1777
1467
|
model: models.questionModel(config, q, row.id),
|
|
1778
|
-
...q.across ? { across: q.across } : {}
|
|
1468
|
+
...q.across ? { across: q.across } : {},
|
|
1469
|
+
...q.state ? { state: q.state } : {},
|
|
1470
|
+
...q.artifacts !== void 0 ? { artifacts: q.artifacts } : {}
|
|
1779
1471
|
}));
|
|
1780
1472
|
for (const q of questions) if (typeof q.model === "string") questionModels.add(q.model);
|
|
1781
1473
|
if (questions.length) asked.push({
|
|
@@ -1796,7 +1488,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1796
1488
|
});
|
|
1797
1489
|
if (malformed.length) throw new UsageError(`Credentials with whitespace or a line break in them: ${malformed.join(", ")}. A key copied from a wrapped terminal line picks these up; set it again as one line.`);
|
|
1798
1490
|
if (analysis) {
|
|
1799
|
-
const { startNotes } = await import("./agent-
|
|
1491
|
+
const { startNotes } = await import("./agent-D483ru7D.js");
|
|
1800
1492
|
notes = startNotes({
|
|
1801
1493
|
config,
|
|
1802
1494
|
model: analysis.resolveAnalysisModel(config, "agent"),
|
|
@@ -1812,7 +1504,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1812
1504
|
});
|
|
1813
1505
|
}
|
|
1814
1506
|
if (asked.length) {
|
|
1815
|
-
const { questionRunner } = await import("./questions-
|
|
1507
|
+
const { questionRunner } = await import("./questions-C2dym2ce.js");
|
|
1816
1508
|
questions = questionRunner({
|
|
1817
1509
|
evals: asked,
|
|
1818
1510
|
stagingDir,
|
|
@@ -1829,7 +1521,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1829
1521
|
}
|
|
1830
1522
|
});
|
|
1831
1523
|
}
|
|
1832
|
-
const { prepareWorkspaces, workspaceKey } = await import("./workspace-
|
|
1524
|
+
const { prepareWorkspaces, workspaceKey } = await import("./workspace-C_X0tdv6.js");
|
|
1833
1525
|
const live = skipped.filter((p) => !p.attempt.plan.skip);
|
|
1834
1526
|
const outcomes = await prepareWorkspaces(live.flatMap(({ attempt: a }) => a.workspace ? [{
|
|
1835
1527
|
workspace: a.workspace,
|
|
@@ -1977,14 +1669,14 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1977
1669
|
throw error;
|
|
1978
1670
|
} finally {
|
|
1979
1671
|
clearTimeout(budgetTimer);
|
|
1980
|
-
const { removePrepared } = await import("./preflight-
|
|
1672
|
+
const { removePrepared } = await import("./preflight-DlQvbySb.js");
|
|
1981
1673
|
removePrepared(config.root, runId);
|
|
1982
|
-
const { removePreparedWorkspaces } = await import("./workspace-
|
|
1674
|
+
const { removePreparedWorkspaces } = await import("./workspace-C_X0tdv6.js");
|
|
1983
1675
|
removePreparedWorkspaces(config.root, runId);
|
|
1984
1676
|
}
|
|
1985
1677
|
if (preflightStop) throw preflightStop;
|
|
1986
1678
|
if (engineRun.noFiles || !engineRun.stopped && engineRun.evals.length === 0 && !interrupted) live?.remove();
|
|
1987
|
-
if (engineRun.noFiles && !filters.length && !tags.length) throw new UsageError(`No eval files match ${config.include.join(", ")}
|
|
1679
|
+
if (engineRun.noFiles && !filters.length && !tags.length) throw new UsageError(`No eval files in ${config.root} match include: ${config.include.join(", ")}. Name eval files to match it, or set include in ${config.file}.`);
|
|
1988
1680
|
if (engineRun.noFiles || !engineRun.stopped && engineRun.evals.length === 0 && !interrupted) throw noMatch(config, filters, tags);
|
|
1989
1681
|
return {
|
|
1990
1682
|
engineRun,
|
|
@@ -2013,7 +1705,7 @@ function finish(code, error, kind) {
|
|
|
2013
1705
|
const command = commandOf(argv);
|
|
2014
1706
|
logInvocation(root, {
|
|
2015
1707
|
at: new Date(startedAt).toISOString(),
|
|
2016
|
-
|
|
1708
|
+
reeval: version,
|
|
2017
1709
|
argv: redactArgv(argv),
|
|
2018
1710
|
command,
|
|
2019
1711
|
exitCode: code,
|
|
@@ -2062,4 +1754,4 @@ run(process.argv.slice(2)).finally(() => {
|
|
|
2062
1754
|
//#endregion
|
|
2063
1755
|
export {};
|
|
2064
1756
|
|
|
2065
|
-
//# sourceMappingURL=cli-
|
|
1757
|
+
//# sourceMappingURL=cli-ClpPT8kn.js.map
|