reeval 0.10.0 → 0.12.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 +64 -39
- package/THIRD_PARTY_NOTICES.md +75 -106
- package/bin/mcp-timer.cjs +224 -0
- package/dist/{adapter-DWlpOtRn.js → adapter-DigeVFWC.js} +3 -3
- package/dist/{adapter-DWlpOtRn.js.map → adapter-DigeVFWC.js.map} +1 -1
- package/dist/{agent-CaS_2Sce.js → agent-CatUEo5h.js} +21 -6
- package/dist/{agent-CaS_2Sce.js.map → agent-CatUEo5h.js.map} +1 -1
- package/dist/{assemble-B9Alds-z.js → assemble-CF063ms6.js} +19 -17
- package/dist/assemble-CF063ms6.js.map +1 -0
- package/dist/assemble-CJoD_Rzr.js +1 -0
- package/dist/bridge/index.mjs +15 -7
- package/dist/{capture-CNb9SuU5.js → capture-BiD7lVaM.js} +26 -18
- package/dist/{capture-CNb9SuU5.js.map → capture-BiD7lVaM.js.map} +1 -1
- package/dist/capture-Dp3q7K7Y.js +1 -0
- package/dist/{cli-D303Vj5N.js → cli-B5zQCR2r.js} +266 -547
- package/dist/cli-B5zQCR2r.js.map +1 -0
- package/dist/{cli-spec-BPZbQG2p.js → cli-spec-BXIBUlaK.js} +46 -18
- package/dist/cli-spec-BXIBUlaK.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{command-BT9a37ZR.js → command-BMHXHqMT.js} +17 -14
- package/dist/command-BMHXHqMT.js.map +1 -0
- package/dist/command-C94CQNh8.js +91 -0
- package/dist/command-C94CQNh8.js.map +1 -0
- package/dist/command-CVtgyqlM.js +335 -0
- package/dist/command-CVtgyqlM.js.map +1 -0
- package/dist/{command-BLfT7vnQ.js → command-CaZgCTIw.js} +13 -17
- package/dist/command-CaZgCTIw.js.map +1 -0
- package/dist/{command-CMJtHKRa.js → command-DTgBZR0k.js} +6 -6
- package/dist/{command-CMJtHKRa.js.map → command-DTgBZR0k.js.map} +1 -1
- package/dist/{commands-1p-bIWhN.js → commands-BXzIDB3X.js} +1 -1
- package/dist/commands-CjpGBUWr.js +666 -0
- package/dist/commands-CjpGBUWr.js.map +1 -0
- package/dist/{config-DEgnUiU-.js → config-Dv5MG7Rp.js} +31 -34
- package/dist/config-Dv5MG7Rp.js.map +1 -0
- package/dist/{context-C1mxXh80.js → context-Dgn48BqT.js} +13 -2
- package/dist/context-Dgn48BqT.js.map +1 -0
- package/dist/contrasts-CcoMLC_y.js +101 -0
- package/dist/contrasts-CcoMLC_y.js.map +1 -0
- package/dist/db-BeqRiWLl.js +602 -0
- package/dist/db-BeqRiWLl.js.map +1 -0
- package/dist/db-CJDRVQal.js +2 -0
- package/dist/{dist-B8hJImYt.js → dist-CMjp3qqF.js} +81 -14
- package/dist/dist-CMjp3qqF.js.map +1 -0
- package/dist/{docker-sZrNrr82.js → docker-BbTlMmYi.js} +2 -2
- package/dist/{docker-sZrNrr82.js.map → docker-BbTlMmYi.js.map} +1 -1
- package/dist/{docker-7b_2SaH7.js → docker-CCXdbREk.js} +20 -4
- package/dist/{docker-7b_2SaH7.js.map → docker-CCXdbREk.js.map} +1 -1
- package/dist/{docker-yauK-9X8.js → docker-DC69dKxB.js} +1 -1
- package/dist/{doctor-BYNok4UO.js → doctor-CqttrZcs.js} +56 -22
- package/dist/doctor-CqttrZcs.js.map +1 -0
- package/dist/{egress-C4PZTSSe.js → egress-BfK_O9ce.js} +435 -31
- package/dist/egress-BfK_O9ce.js.map +1 -0
- package/dist/{environment-DNjRk0nU.js → environment-BBz1Yes9.js} +225 -12
- package/dist/environment-BBz1Yes9.js.map +1 -0
- package/dist/{evaluate-D4zeRGBF.js → evaluate-CXQ1o-pd.js} +539 -562
- package/dist/evaluate-CXQ1o-pd.js.map +1 -0
- package/dist/{evaluate-C1UVL21l.d.ts → evaluate-yjZKUexW.d.ts} +2 -2
- package/dist/facts-DtENlf9s.js +898 -0
- package/dist/facts-DtENlf9s.js.map +1 -0
- package/dist/{files-BXUdY8tr.js → files-B-eUpCZ1.js} +30 -7
- package/dist/files-B-eUpCZ1.js.map +1 -0
- package/dist/files-BsQbYz2i.js +65 -0
- package/dist/files-BsQbYz2i.js.map +1 -0
- package/dist/{files-DQmHE7pb.js → files-COHQLEHE.js} +6 -17
- package/dist/files-COHQLEHE.js.map +1 -0
- package/dist/files-DqCBW7i8.js +1 -0
- package/dist/files-Ha-jsQXf.js +1 -0
- package/dist/generate-Cs2TMH_k.js +1647 -0
- package/dist/generate-Cs2TMH_k.js.map +1 -0
- package/dist/{git-DfG-YJ1u.js → git-DhykwgKF.js} +2 -2
- package/dist/{git-DfG-YJ1u.js.map → git-DhykwgKF.js.map} +1 -1
- package/dist/{harness-B8QC9u0O.js → harness-BAjw1fcr.js} +3 -3
- package/dist/{harness-B8QC9u0O.js.map → harness-BAjw1fcr.js.map} +1 -1
- package/dist/harness.d.ts +1 -1
- package/dist/harness.js +1 -1
- package/dist/{header-hK-Z_Po9.js → header-kSmWatcO.js} +10 -3
- package/dist/{header-hK-Z_Po9.js.map → header-kSmWatcO.js.map} +1 -1
- package/dist/{images-0On0cztu.js → images-BmJRuTpm.js} +61 -13
- package/dist/images-BmJRuTpm.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/init-Bwc9byQr.js +543 -0
- package/dist/init-Bwc9byQr.js.map +1 -0
- package/dist/init-D7Y1ny1z.js +1 -0
- package/dist/insights-B2Xmhz9o.js +64 -0
- package/dist/insights-B2Xmhz9o.js.map +1 -0
- package/dist/{invocations-DbGfBAA_.js → invocations-CQTbP092.js} +3 -3
- package/dist/{invocations-DbGfBAA_.js.map → invocations-CQTbP092.js.map} +1 -1
- package/dist/{judge-DW_GDOmB.js → judge-Dt6KW6_O.js} +5 -3
- package/dist/judge-Dt6KW6_O.js.map +1 -0
- package/dist/judge.d.ts +7 -6
- package/dist/judge.js +8 -7
- package/dist/judge.js.map +1 -1
- package/dist/{live-jlfszAbb.js → live-DYd2QEyR.js} +2 -2
- package/dist/{live-jlfszAbb.js.map → live-DYd2QEyR.js.map} +1 -1
- package/dist/{model-h_cDtcRr.js → model-B-mel-Gv.js} +46 -20
- package/dist/model-B-mel-Gv.js.map +1 -0
- package/dist/model-BGKYVpoj.js +1 -0
- package/dist/{model-DaVCY3rb.js → model-C7tSwT7f.js} +2 -2
- package/dist/{model-DaVCY3rb.js.map → model-C7tSwT7f.js.map} +1 -1
- package/dist/{model-oqcDplJG.js → model-CWlAqmbU.js} +150 -46
- package/dist/model-CWlAqmbU.js.map +1 -0
- package/dist/model-DHY-dfoO.js +1 -0
- package/dist/{node-B3ydHo6t.js → node-D0mtjRAO.js} +3 -3
- package/dist/{node-B3ydHo6t.js.map → node-D0mtjRAO.js.map} +1 -1
- package/dist/{options-Bh2W63dK.js → options-CPUW97_7.js} +9 -12
- package/dist/options-CPUW97_7.js.map +1 -0
- package/dist/{pairs-CnInRu-G.js → pairs-DP6XOJby.js} +2 -2
- package/dist/{pairs-CnInRu-G.js.map → pairs-DP6XOJby.js.map} +1 -1
- package/dist/{patch-Zac5aIRM.js → patch-D4oluWzH.js} +2 -2
- package/dist/{patch-Zac5aIRM.js.map → patch-D4oluWzH.js.map} +1 -1
- package/dist/{plan-C9Cy27Ay.js → plan-OkwUcJQ9.js} +31 -12
- package/dist/plan-OkwUcJQ9.js.map +1 -0
- package/dist/plugins-CUWMnSNb.js +654 -0
- package/dist/plugins-CUWMnSNb.js.map +1 -0
- package/dist/{preflight-CPWpQeBI.js → preflight-B6pY89bF.js} +1 -1
- package/dist/{preflight-D7iFPKeK.js → preflight-Bjm7_ylE.js} +14 -10
- package/dist/preflight-Bjm7_ylE.js.map +1 -0
- package/dist/{prepare-doGxaAGR.js → prepare-CQmK3SBn.js} +71 -24
- package/dist/prepare-CQmK3SBn.js.map +1 -0
- package/dist/prepare-DbdgtZKe.js +2 -0
- package/dist/{provenance-DmE9uPVt.js → provenance-B3Y17oCC.js} +2 -2
- package/dist/{provenance-DmE9uPVt.js.map → provenance-B3Y17oCC.js.map} +1 -1
- package/dist/providers-CXN2RFz-.js +1 -0
- package/dist/{providers-tAOD1NQN.js → providers-eoniqK6w.js} +24 -10
- package/dist/providers-eoniqK6w.js.map +1 -0
- package/dist/query-CLRZmWBT.js +139 -0
- package/dist/query-CLRZmWBT.js.map +1 -0
- package/dist/query-CmBDYt0_.js +1 -0
- package/dist/{questions-DjAwMxZ3.js → questions-1XOulevV.js} +6 -6
- package/dist/{questions-DjAwMxZ3.js.map → questions-1XOulevV.js.map} +1 -1
- package/dist/{record-BKmMvZ6O.js → record-kk9M1hj-.js} +8 -4
- package/dist/record-kk9M1hj-.js.map +1 -0
- package/dist/remarks-1521zwfW.js +38 -0
- package/dist/remarks-1521zwfW.js.map +1 -0
- package/dist/remarks-BhAV1H4V.js +1 -0
- package/dist/remarks-DlJCqWRs.js +278 -0
- package/dist/remarks-DlJCqWRs.js.map +1 -0
- package/dist/{remote-HDRt16ew.js → remote-cE2VWfkJ.js} +3 -3
- package/dist/{remote-HDRt16ew.js.map → remote-cE2VWfkJ.js.map} +1 -1
- package/dist/resolve-C4zeccCH.js +724 -0
- package/dist/resolve-C4zeccCH.js.map +1 -0
- package/dist/resolve-D30yZYmB.js +1 -0
- package/dist/{results-DuauQI3Z.js → results-Drtt0uFl.js} +33 -7
- package/dist/results-Drtt0uFl.js.map +1 -0
- package/dist/{resume-BRfa8E_s.js → resume-BEFazUfy.js} +4 -4
- package/dist/{resume-BRfa8E_s.js.map → resume-BEFazUfy.js.map} +1 -1
- package/dist/rules-BFzQqPIm.js +317 -0
- package/dist/rules-BFzQqPIm.js.map +1 -0
- package/dist/run-BeMy92Us.js +88 -0
- package/dist/run-BeMy92Us.js.map +1 -0
- package/dist/{sandbox-D3A8oUb7.js → sandbox-CQaJj7n9.js} +2 -2
- package/dist/{sandbox-D3A8oUb7.js.map → sandbox-CQaJj7n9.js.map} +1 -1
- package/dist/sandbox.d.ts +1 -1
- package/dist/sandbox.js +1 -1
- package/dist/server-V4-2w0l8.js +1 -0
- package/dist/{server-XDleKaF_.js → server-xK0les4f.js} +8 -8
- package/dist/{server-XDleKaF_.js.map → server-xK0les4f.js.map} +1 -1
- package/dist/{shared-DYpIb1BI.js → shared-CA61BuPJ.js} +25 -3
- package/dist/shared-CA61BuPJ.js.map +1 -0
- package/dist/source-BDow_oW8.js +1 -0
- package/dist/{source-C8xumIWj.js → source-Q1hEKbCs.js} +2 -2
- package/dist/{source-C8xumIWj.js.map → source-Q1hEKbCs.js.map} +1 -1
- package/dist/src-B9L9yGKI.js +1 -0
- package/dist/{src-ofUaYbuY.js → src-Bcah6ZkT.js} +1 -1
- package/dist/{src-DvCg0NBs.js → src-BhmaorOU.js} +28 -6
- package/dist/{src-DvCg0NBs.js.map → src-BhmaorOU.js.map} +1 -1
- package/dist/{src-CF17Ug08.js → src-C0CeKiLU.js} +19 -4
- package/dist/{src-CF17Ug08.js.map → src-C0CeKiLU.js.map} +1 -1
- package/dist/src-C0xowZ3C.js +2 -0
- package/dist/src-CHIfIKUu.js +2 -0
- package/dist/src-DLtyz4w5.js +2 -0
- package/dist/src-DPIjmReZ.js +2 -0
- package/dist/{src-C_lPtowT.js → src-DXNh5mTr.js} +1 -1
- package/dist/{src-FGXhkEkH.js → src-DiLMkIr9.js} +142 -13
- package/dist/src-DiLMkIr9.js.map +1 -0
- package/dist/{src-B7treWa8.js → src-LekQrr_S.js} +324 -32
- package/dist/src-LekQrr_S.js.map +1 -0
- package/dist/src-bCnsA6Vp.js +2 -0
- package/dist/{src-u8_ixn_F.js → src-cbCb-MPy.js} +20 -4
- package/dist/src-cbCb-MPy.js.map +1 -0
- package/dist/{src-DvK0EIZx.js → src-qGoFkuJF.js} +55 -6
- package/dist/{src-DvK0EIZx.js.map → src-qGoFkuJF.js.map} +1 -1
- package/dist/{src-jzagbuqH.js → src-ynBVosfX.js} +1 -1
- package/dist/state-BQR_BCm4.js +1 -0
- package/dist/{state-C__9swoG.js → state-BmZ8QVZ8.js} +12 -12
- package/dist/{state-C__9swoG.js.map → state-BmZ8QVZ8.js.map} +1 -1
- package/dist/studio-app/assets/index-CnYJijyI.js +58 -0
- package/dist/studio-app/index.html +1 -1
- package/dist/suite-BaHPmAGy.js +1 -0
- package/dist/suite-C8sw2pox.js +481 -0
- package/dist/suite-C8sw2pox.js.map +1 -0
- package/dist/summary-0oQNGskv.js +837 -0
- package/dist/summary-0oQNGskv.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +2 -2
- package/dist/{text-gEcKjAyp.js → text-CrVy5ioL.js} +18 -2
- package/dist/text-CrVy5ioL.js.map +1 -0
- package/dist/{transcript-BNNANU8A.js → transcript-BTxJpW4R.js} +2 -2
- package/dist/{transcript-BNNANU8A.js.map → transcript-BTxJpW4R.js.map} +1 -1
- package/dist/types-C5vI3g1C.js.map +1 -1
- package/dist/{types-g17bRAzt.d.ts → types-GraZtfHN.d.ts} +858 -39
- package/dist/usage-BDo2q_yu.js +1 -0
- package/dist/{command-Bge8F7Ko.js → validate-BdoXUuL_.js} +35 -383
- package/dist/validate-BdoXUuL_.js.map +1 -0
- package/dist/view/index.d.ts +20 -9
- package/dist/view/index.js +7 -6
- package/dist/views-BoUoX4_A.js +125 -0
- package/dist/views-BoUoX4_A.js.map +1 -0
- package/dist/views-noVQNCUP.js +2 -0
- package/dist/{worker-entry-yOchGYYv.js → worker-entry-D0-GErmU.js} +2 -2
- package/dist/{worker-entry-yOchGYYv.js.map → worker-entry-D0-GErmU.js.map} +1 -1
- package/dist/{workspace-D8sSgpiy.js → workspace-B90YDU_a.js} +1 -1
- package/dist/{workspace-CgyHEM0l.js → workspace-tjZFkjxC.js} +4 -4
- package/dist/{workspace-CgyHEM0l.js.map → workspace-tjZFkjxC.js.map} +1 -1
- package/package.json +10 -8
- package/skills/eval-rubric/SKILL.md +130 -0
- package/dist/agent-CURAwx_q.js +0 -334
- package/dist/agent-CURAwx_q.js.map +0 -1
- package/dist/assemble-B9Alds-z.js.map +0 -1
- package/dist/assemble-J5MukZFY.js +0 -1
- package/dist/capture-jquXZBKK.js +0 -1
- package/dist/cli-D303Vj5N.js.map +0 -1
- package/dist/cli-spec-BPZbQG2p.js.map +0 -1
- package/dist/command-BLfT7vnQ.js.map +0 -1
- package/dist/command-BT9a37ZR.js.map +0 -1
- package/dist/command-Bge8F7Ko.js.map +0 -1
- package/dist/command-BkFjijN2.js +0 -1
- package/dist/commands-BFx16WB8.js +0 -225
- package/dist/commands-BFx16WB8.js.map +0 -1
- package/dist/config-DEgnUiU-.js.map +0 -1
- package/dist/context-C1mxXh80.js.map +0 -1
- package/dist/db-CdHizc4_.js +0 -1406
- package/dist/db-CdHizc4_.js.map +0 -1
- package/dist/db-Dm1cRJJP.js +0 -2
- package/dist/dist-B8hJImYt.js.map +0 -1
- package/dist/doctor-BYNok4UO.js.map +0 -1
- package/dist/duration-CEOQww97.js +0 -26
- package/dist/duration-CEOQww97.js.map +0 -1
- package/dist/egress-C4PZTSSe.js.map +0 -1
- package/dist/environment-DNjRk0nU.js.map +0 -1
- package/dist/evaluate-D4zeRGBF.js.map +0 -1
- package/dist/family-D2b7WD10.js +0 -67
- package/dist/family-D2b7WD10.js.map +0 -1
- package/dist/files-BXUdY8tr.js.map +0 -1
- package/dist/files-BhyltlDB.js +0 -1
- package/dist/files-DQmHE7pb.js.map +0 -1
- package/dist/files-ZZPqfAo6.js +0 -1
- package/dist/images-0On0cztu.js.map +0 -1
- package/dist/init-B77Rpcqc.js +0 -360
- package/dist/init-B77Rpcqc.js.map +0 -1
- package/dist/init-BrOWin3W.js +0 -1
- package/dist/judge-DW_GDOmB.js.map +0 -1
- package/dist/model-NM3ID0uR.js +0 -1
- package/dist/model-h_cDtcRr.js.map +0 -1
- package/dist/model-nwWJvaUR.js +0 -1
- package/dist/model-oqcDplJG.js.map +0 -1
- package/dist/options-Bh2W63dK.js.map +0 -1
- package/dist/plan-C9Cy27Ay.js.map +0 -1
- package/dist/preflight-D7iFPKeK.js.map +0 -1
- package/dist/prepare-BGjePFQl.js +0 -2
- package/dist/prepare-doGxaAGR.js.map +0 -1
- package/dist/process-CSVO_jsc.js +0 -119
- package/dist/process-CSVO_jsc.js.map +0 -1
- package/dist/providers-gDMko8fl.js +0 -1
- package/dist/providers-tAOD1NQN.js.map +0 -1
- package/dist/query-Bes9Kh6Y.js +0 -91
- package/dist/query-Bes9Kh6Y.js.map +0 -1
- package/dist/query-C_G_svLU.js +0 -1
- package/dist/record-BKmMvZ6O.js.map +0 -1
- package/dist/results-DuauQI3Z.js.map +0 -1
- package/dist/server-C7sg1ndo.js +0 -1
- package/dist/shared-DYpIb1BI.js.map +0 -1
- package/dist/source-fGd0SaKP.js +0 -1
- package/dist/src-B7treWa8.js.map +0 -1
- package/dist/src-DNnG4e4R.js +0 -2
- package/dist/src-DTbrY1hi.js +0 -2
- package/dist/src-DdyJEh2v.js +0 -2
- package/dist/src-Dj9PAroc.js +0 -2
- package/dist/src-Du8H85Qq.js +0 -2
- package/dist/src-FGXhkEkH.js.map +0 -1
- package/dist/src-pJZOrYR9.js +0 -1
- package/dist/src-u8_ixn_F.js.map +0 -1
- package/dist/state-CgjQo29K.js +0 -1
- package/dist/studio-app/assets/index-DrQc2Yxd.js +0 -58
- package/dist/summary-BLAVLySU.js +0 -385
- package/dist/summary-BLAVLySU.js.map +0 -1
- package/dist/summary-DgyjUh_l.js +0 -192
- package/dist/summary-DgyjUh_l.js.map +0 -1
- package/dist/text-gEcKjAyp.js.map +0 -1
- package/dist/tools-GCyNYSc1.js +0 -249
- package/dist/tools-GCyNYSc1.js.map +0 -1
- package/dist/views-BW6oCDUQ.js +0 -2
- package/dist/views-BmQF4UCI.js +0 -225
- package/dist/views-BmQF4UCI.js.map +0 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { n as isOneOf } from "./object-CLf2-tNq.js";
|
|
2
2
|
import { n as UsageError } from "./errors-B6BSMs03.js";
|
|
3
|
-
import {
|
|
4
|
-
import { f as sandboxId, s as harnessId } from "./options-
|
|
5
|
-
import { A as workspaceLabel, p as environmentSandbox } from "./environment-
|
|
6
|
-
import { a as fromCwd,
|
|
7
|
-
import {
|
|
3
|
+
import { p as parseDuration } from "./shared-CA61BuPJ.js";
|
|
4
|
+
import { f as sandboxId, s as harnessId } from "./options-CPUW97_7.js";
|
|
5
|
+
import { A as workspaceLabel, p as environmentSandbox } from "./environment-BBz1Yes9.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 } from "./config-Dv5MG7Rp.js";
|
|
8
8
|
import { n as loadEnvFiles, t as inCI } from "./env-BQqj93gu.js";
|
|
9
|
-
import {
|
|
9
|
+
import { U as LABEL, it as imageInfo } from "./src-LekQrr_S.js";
|
|
10
10
|
import { o as PACKAGE_VERSION } from "./root-DICDHCtp.js";
|
|
11
|
-
import {
|
|
11
|
+
import { o as redactSecrets, s as registerSecret } from "./redact-DJ9JCShu.js";
|
|
12
|
+
import { C as pluginBuildsLabel } from "./plugins-CUWMnSNb.js";
|
|
12
13
|
import { s as debugTime } from "./debug-D24NOQH1.js";
|
|
13
|
-
import { i as
|
|
14
|
+
import { i as formatDuration, n as clip, o as sandboxWarningLine } from "./text-CrVy5ioL.js";
|
|
14
15
|
import { t as PrepareError } from "./provider-CmAYTQQs.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { n as
|
|
18
|
-
import {
|
|
19
|
-
import { c as writeLiveProgress, i as prepareResume, o as resolveResume, r as loadPrevious, s as writeCurrent, t as completedKeysFor } from "./resume-BRfa8E_s.js";
|
|
20
|
-
import { a as commandHelpText, n as FLAGS, r as GLOBAL, s as helpText, t as COMMANDS } from "./cli-spec-BPZbQG2p.js";
|
|
21
|
-
import { i as runtimeInfo, n as gitInfo, r as runnerInfo, t as author } from "./provenance-DmE9uPVt.js";
|
|
22
|
-
import { t as budgetMarker } from "./budget-DBUrH4jX.js";
|
|
23
|
-
import { n as prepareAll, o as writePrepared, r as prepareTargets, t as RunStopError } from "./preflight-D7iFPKeK.js";
|
|
24
|
-
import { n as imageHarness } from "./prepare-doGxaAGR.js";
|
|
25
|
-
import { r as createProviders, t as attemptImage } from "./providers-tAOD1NQN.js";
|
|
26
|
-
import { a as redactArgv, r as commandOf, t as logInvocation } from "./invocations-DbGfBAA_.js";
|
|
16
|
+
import { T as runOutcome, g as formatUsage } from "./model-CWlAqmbU.js";
|
|
17
|
+
import { l as suiteResult } from "./suite-C8sw2pox.js";
|
|
18
|
+
import { a as commandHelpText, n as FLAGS, r as GLOBAL, s as helpText, t as COMMANDS } from "./cli-spec-BXIBUlaK.js";
|
|
19
|
+
import { p as render } from "./summary-0oQNGskv.js";
|
|
27
20
|
import { n as stripAnsi, t as colors } from "./colors-QV9dFVhN.js";
|
|
21
|
+
import { i as runtimeInfo, n as gitInfo, r as runnerInfo, t as author } from "./provenance-B3Y17oCC.js";
|
|
22
|
+
import { t as budgetMarker } from "./budget-DBUrH4jX.js";
|
|
23
|
+
import { c as writeLiveProgress, i as prepareResume, o as resolveResume, r as loadPrevious, s as writeCurrent, t as completedKeysFor } from "./resume-BEFazUfy.js";
|
|
24
|
+
import { n as prepareAll, o as writePrepared, r as prepareTargets, t as RunStopError } from "./preflight-Bjm7_ylE.js";
|
|
25
|
+
import { n as imageHarness } from "./prepare-CQmK3SBn.js";
|
|
26
|
+
import { i as createProviders, n as attemptImage } from "./providers-eoniqK6w.js";
|
|
27
|
+
import { a as redactArgv, r as commandOf, t as logInvocation } from "./invocations-CQTbP092.js";
|
|
28
28
|
import { existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs";
|
|
29
29
|
import { dirname, join } from "node:path";
|
|
30
30
|
import { inspect } from "node:util";
|
|
@@ -58,6 +58,7 @@ function parseCli(argv) {
|
|
|
58
58
|
});
|
|
59
59
|
for (const [name, spec] of Object.entries(COMMANDS)) {
|
|
60
60
|
const command = configure(program.command(name), `reeval ${name}`, spec.flags);
|
|
61
|
+
if (name === "query") takeStatements(command);
|
|
61
62
|
command.argument("[args...]").action(() => {
|
|
62
63
|
const max = spec.sub && !spec.help ? Number.POSITIVE_INFINITY : spec.positionals;
|
|
63
64
|
parsed = done(program, command, [name], spec.flags, max);
|
|
@@ -86,6 +87,28 @@ function configure(command, name, flags) {
|
|
|
86
87
|
for (const flag of flags) command.addOption(OPTIONS[flag]());
|
|
87
88
|
return command;
|
|
88
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Makes an argument that starts with `-` but has whitespace before any `=` (SQL opening with a
|
|
92
|
+
* `-- comment`) a positional: no flag looks like that, and commander would refuse it as one.
|
|
93
|
+
*/
|
|
94
|
+
function takeStatements(command) {
|
|
95
|
+
const parseOptions = command.parseOptions.bind(command);
|
|
96
|
+
command.parseOptions = (args) => {
|
|
97
|
+
const held = /* @__PURE__ */ new Map();
|
|
98
|
+
const masked = args.map((arg, i) => {
|
|
99
|
+
if (!arg.startsWith("-") || !/\s/.test(arg.split("=")[0] ?? "")) return arg;
|
|
100
|
+
const token = `\0statement-${i}`;
|
|
101
|
+
held.set(token, arg);
|
|
102
|
+
return token;
|
|
103
|
+
});
|
|
104
|
+
const restore = (list) => list.map((arg) => held.get(arg) ?? arg);
|
|
105
|
+
const { operands, unknown } = parseOptions(masked);
|
|
106
|
+
return {
|
|
107
|
+
operands: restore(operands),
|
|
108
|
+
unknown: restore(unknown)
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
}
|
|
89
112
|
function done(program, command, path, flags, max) {
|
|
90
113
|
const values = {
|
|
91
114
|
...valuesOf(program, GLOBAL),
|
|
@@ -119,16 +142,17 @@ function valuesOf(command, flags) {
|
|
|
119
142
|
}
|
|
120
143
|
/** Commander's error, in reeval's words, naming the command whose flag it is. */
|
|
121
144
|
function usageError(error, command) {
|
|
122
|
-
const
|
|
145
|
+
const text = error.message.replace(/^error: /, "");
|
|
146
|
+
const [first = ""] = text.split("\n");
|
|
123
147
|
if (error.code === "commander.unknownOption") {
|
|
124
|
-
const arg =
|
|
148
|
+
const [, arg = "", suggestion] = /^unknown option '([\s\S]*)'(?:\n\((.*)\))?$/.exec(text) ?? [];
|
|
125
149
|
const [flag = "", value] = arg.replace(/^--?/, "").split("=");
|
|
126
150
|
const known = arg.startsWith("--") ? FLAGS[flag] : Object.entries(FLAGS).find(([, s]) => "short" in s && s.short === flag)?.[1];
|
|
127
151
|
const long = arg.startsWith("--") ? flag : Object.entries(FLAGS).find(([, s]) => "short" in s && s.short === flag)?.[0];
|
|
128
152
|
if (known && value !== void 0 && known.type === "boolean") return new UsageError(`--${flag} doesn't take a value: pass --${flag} on its own.`);
|
|
129
153
|
if (known) return new UsageError(`--${long} isn't an option of ${command}. Run reeval --help.`);
|
|
130
|
-
const
|
|
131
|
-
return new UsageError(`Unknown option '${
|
|
154
|
+
const shown = arg.replace(/\r/g, "\\r").replace(/\n/g, "\\n");
|
|
155
|
+
return new UsageError(`Unknown option '${shown}'. ${suggestion ? `${suggestion} ` : ""}Run reeval --help.`);
|
|
132
156
|
}
|
|
133
157
|
if (error.code === "commander.optionMissingArgument") {
|
|
134
158
|
const usage = /'([^']+)'/.exec(first)?.[1] ?? "";
|
|
@@ -139,12 +163,15 @@ function usageError(error, command) {
|
|
|
139
163
|
}
|
|
140
164
|
//#endregion
|
|
141
165
|
//#region src/preflight.ts
|
|
142
|
-
/**
|
|
143
|
-
|
|
166
|
+
/**
|
|
167
|
+
* How the terminal names a sandbox to prepare: its cell id, `+ install`, `+ plugin builds`, and a
|
|
168
|
+
* harness other than Cursor.
|
|
169
|
+
*/
|
|
170
|
+
function prepareLabel({ sandbox, harness, plugins }) {
|
|
144
171
|
if (sandbox.kind !== "docker") return sandboxId(sandbox);
|
|
145
172
|
const baked = imageHarness(harness);
|
|
146
173
|
const install = sandbox.install?.length ? " + install" : "";
|
|
147
|
-
return `${sandboxId(sandbox)}${install}${baked === "cursor" ? "" : ` · ${baked}`}`;
|
|
174
|
+
return `${sandboxId(sandbox)}${install}${pluginBuildsLabel(plugins)}${baked === "cursor" ? "" : ` · ${baked}`}`;
|
|
148
175
|
}
|
|
149
176
|
/** A run that stopped in preflight on an infra failure: exit 3. */
|
|
150
177
|
var PreflightInfraError = class extends Error {
|
|
@@ -221,24 +248,10 @@ function outcomeOf(e) {
|
|
|
221
248
|
if (e.meta?.errorKind === "aborted") return "cancelled";
|
|
222
249
|
return e.meta?.outcome ?? (e.state === "passed" ? "pass" : "fail");
|
|
223
250
|
}
|
|
224
|
-
function attemptOutcome(a) {
|
|
225
|
-
return a.error?.kind === "aborted" ? "cancelled" : a.outcome;
|
|
226
|
-
}
|
|
227
251
|
/** What tells an eval's attempts apart: the axes that vary (`cursor:composer-2.5 · with-skill`), else the harness. */
|
|
228
252
|
function attemptAxes(a, fallback) {
|
|
229
253
|
return a?.label.replace(/\s*#\d+$/, "") || a?.harness.kind || fallback;
|
|
230
254
|
}
|
|
231
|
-
function mark(c, outcome) {
|
|
232
|
-
return {
|
|
233
|
-
pass: c.green("✓"),
|
|
234
|
-
fail: c.red("✗"),
|
|
235
|
-
infra_error: c.yellow("!"),
|
|
236
|
-
skipped: c.dim("↓"),
|
|
237
|
-
cancelled: c.yellow("✗")
|
|
238
|
-
}[outcome];
|
|
239
|
-
}
|
|
240
|
-
/** An expected miss's mark: neutral, since it doesn't fail the run. */
|
|
241
|
-
const MISS_MARK = (c) => c.dim("○");
|
|
242
255
|
const plural = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
243
256
|
/** A command on one line: the first line, cut to 80 characters at a word boundary. */
|
|
244
257
|
function oneLine(text, max = 80) {
|
|
@@ -363,330 +376,25 @@ function prepareLines(c, e, max) {
|
|
|
363
376
|
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)}`)];
|
|
364
377
|
}
|
|
365
378
|
//#endregion
|
|
366
|
-
//#region src/ui/
|
|
367
|
-
|
|
368
|
-
const KINDS = [
|
|
369
|
-
{
|
|
370
|
-
title: "Judge failures",
|
|
371
|
-
test: (a) => a.error?.kind === "judge"
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
title: "Assertion failures",
|
|
375
|
-
test: (a) => a.error?.kind === "assertion"
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
title: "Timeouts",
|
|
379
|
-
test: (a) => a.error?.kind === "timeout"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
title: "Infra errors",
|
|
383
|
-
test: (_, o) => o === "infra_error"
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
title: "Cancelled",
|
|
387
|
-
test: (_, o) => o === "cancelled"
|
|
388
|
-
}
|
|
389
|
-
];
|
|
390
|
-
/** The engine's result for an attempt, or one rebuilt from the record (e.g. cancelled ones). */
|
|
391
|
-
function resultFor(entry, attempt, results) {
|
|
392
|
-
const key = attemptKey(entry.id, attempt.cell, attempt.n);
|
|
393
|
-
const found = results.find((r) => r.key === key);
|
|
394
|
-
const errorKind = attempt.error?.kind ?? null;
|
|
395
|
-
const meta = {
|
|
396
|
-
outcome: attempt.outcome === "skipped" ? "pass" : attempt.outcome,
|
|
397
|
-
errorKind,
|
|
398
|
-
judgements: attempt.judgements.map((j) => ({ ...j })),
|
|
399
|
-
turnErrors: attempt.turns.flatMap((t, i) => t.error ? [`turn ${i + 1} error: ${t.error}`] : []),
|
|
400
|
-
recordPath: ""
|
|
401
|
-
};
|
|
402
|
-
if (found) return {
|
|
403
|
-
...found,
|
|
404
|
-
meta: found.meta ? {
|
|
405
|
-
...found.meta,
|
|
406
|
-
errorKind
|
|
407
|
-
} : meta
|
|
408
|
-
};
|
|
409
|
-
return {
|
|
410
|
-
id: entry.id,
|
|
411
|
-
key,
|
|
412
|
-
file: entry.file,
|
|
413
|
-
group: entry.group,
|
|
414
|
-
name: entry.name,
|
|
415
|
-
attempt: void 0,
|
|
416
|
-
state: attempt.outcome === "pass" ? "passed" : attempt.outcome === "skipped" ? "skipped" : "failed",
|
|
417
|
-
durationMs: attempt.durationMs,
|
|
418
|
-
errors: attempt.error ? [attempt.error.message] : [],
|
|
419
|
-
formattedErrors: [],
|
|
420
|
-
meta
|
|
421
|
-
};
|
|
422
|
-
}
|
|
423
|
-
function entryOutcome(e) {
|
|
424
|
-
const outcomes = e.attempts.map(attemptOutcome);
|
|
425
|
-
if (outcomes.length && outcomes.every((o) => o === "cancelled")) return "cancelled";
|
|
426
|
-
return evalMarkOutcome(e);
|
|
427
|
-
}
|
|
428
|
-
/** Every cell is `gate: 'none'`: the eval reports its attempts but nothing gates it. */
|
|
429
|
-
const allUngated = (e) => e.cells.length > 0 && e.cells.every((c) => c.gate === "none");
|
|
430
|
-
const pct = (rate) => rate === null ? " – " : `${Math.round(rate * 100)}%`.padStart(4);
|
|
431
|
-
function evalColumns(c, e) {
|
|
432
|
-
const [attempt, ...more] = e.attempts;
|
|
433
|
-
if (e.todo) return c.dim("todo");
|
|
434
|
-
if (!attempt || e.outcome === "skipped") return c.dim("skipped");
|
|
435
|
-
if (more.length) {
|
|
436
|
-
const pass = e.attempts.filter((a) => a.outcome === "pass").length;
|
|
437
|
-
const counted = e.attempts.filter((a) => a.outcome === "pass" || a.outcome === "fail").length;
|
|
438
|
-
const rate = allUngated(e) ? " · not gated" : hasUngatedCells(e.cells) ? ` · pass@1 ${pct(e.passRate).trim()} gated` : ` pass@1 ${pct(e.passRate)}`;
|
|
439
|
-
return c.dim(`${`${pass}/${counted}`.padStart(7)}${rate} ${e.attempts.length} attempts`);
|
|
440
|
-
}
|
|
441
|
-
if (attemptOutcome(attempt) === "cancelled") return c.yellow("cancelled");
|
|
442
|
-
const cols = [formatDuration(attempt.durationMs).padStart(7)];
|
|
443
|
-
const judges = collapsedJudgeLabel(attempt.judgements);
|
|
444
|
-
if (judges) cols.push(judges);
|
|
445
|
-
const turns = attempt.turns.length;
|
|
446
|
-
cols.push(`${turns} turn${turns === 1 ? "" : "s"}`);
|
|
447
|
-
const tokens = formatUsage(attempt.usage);
|
|
448
|
-
if (tokens) cols.push(tokens);
|
|
449
|
-
return c.dim(cols.join(" "));
|
|
450
|
-
}
|
|
451
|
-
/** pass@1 per cell for evals with several attempts; with compare, each cell's role and lift. */
|
|
452
|
-
function cellRows(c, e, indent) {
|
|
453
|
-
if (e.attempts.length < 2) return [];
|
|
454
|
-
const compare = e.cells.some((cell) => cell.role === "variant");
|
|
455
|
-
const width = Math.max(...e.cells.map((cell) => cell.key.length));
|
|
456
|
-
return e.cells.flatMap((cell) => {
|
|
457
|
-
const role = compare ? ` ${cell.role.padEnd(7)}` : "";
|
|
458
|
-
const counts = `${cell.pass}/${cell.pass + cell.fail}`.padStart(5);
|
|
459
|
-
const infra = cell.infraError ? c.yellow(` ${cell.infraError} infra`) : "";
|
|
460
|
-
let note = "";
|
|
461
|
-
if (cell.lift) {
|
|
462
|
-
const { minLift } = cell.lift;
|
|
463
|
-
const below = minLift !== void 0 && cell.lift.interval.lo < minLift;
|
|
464
|
-
const text = `${liftLabel(cell.lift)}${minLift !== void 0 ? ` (minLift ${Math.round(minLift * 100)})` : ""}`;
|
|
465
|
-
note = ` ${below ? c.red(`${text} ✗`) : text}`;
|
|
466
|
-
} else if (compare && cell.gate === "none" && cell.fail > 0) note = ` ${c.dim("not gated")}`;
|
|
467
|
-
if (cell.gate !== "all" && cell.gate !== "none") note += ` ${c.dim(`gate ${gateLabel(cell.gate)}`)}`;
|
|
468
|
-
const tokens = formatUsage(cellUsage(e, cell.key));
|
|
469
|
-
const usage = tokens ? ` ${c.dim(tokens)}` : "";
|
|
470
|
-
const rows = [`${indent}${c.dim(cell.key.padEnd(width))}${role} ${counts} pass@1 ${pct(cell.passRate)}${note}${infra}${usage}`];
|
|
471
|
-
const rates = judgeRatesLabel(summaryJudgeRates(e, cell));
|
|
472
|
-
if (rates) rows.push(`${indent} ${c.dim(rates)}`);
|
|
473
|
-
const effort = cellContrast(e, cell.key);
|
|
474
|
-
if (effort) rows.push(`${indent} ${c.dim(`effort: ${effortLabel(effort)}`)}`);
|
|
475
|
-
const checks = checksLabel(cell);
|
|
476
|
-
if (checks) rows.push(`${indent} ${c.dim(`checks: ${checks}`)}`);
|
|
477
|
-
if (cell.overrides.length) rows.push(`${indent} ${c.dim(`overrides: ${cell.overrides.join(", ")}`)}`);
|
|
478
|
-
return rows;
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
/** With two variants or more, each pair of arms on one harness: lift, checks and effort. */
|
|
482
|
-
function contrastRows(c, e, indent) {
|
|
483
|
-
const lines = contrastLines(e);
|
|
484
|
-
if (!lines.length) return [];
|
|
485
|
-
return [`${indent}${c.dim("contrasts (each pair of arms, same harness)")}`, ...lines.map((line) => `${indent} ${c.dim(line)}`)];
|
|
486
|
-
}
|
|
487
|
-
/** One row per compare question: its win rates, or why it has none. They never gate. */
|
|
488
|
-
function questionRows(c, e, indent) {
|
|
489
|
-
return (e.answers ?? []).flatMap((a) => {
|
|
490
|
-
const label = answersLabel(a);
|
|
491
|
-
return [
|
|
492
|
-
`${indent}${c.dim("question")} ${a.error !== void 0 ? c.yellow(label) : label}`,
|
|
493
|
-
...headToHeadLines(a.votes).map((line) => `${indent} ${line}`),
|
|
494
|
-
...sampleReasons(a.votes).map((reason) => `${indent} ${c.dim(reason)}`)
|
|
495
|
-
];
|
|
496
|
-
});
|
|
497
|
-
}
|
|
498
|
-
/** A family's mark: its pooled gate's and its cases' worst. */
|
|
499
|
-
function familyOutcome(family, cases) {
|
|
500
|
-
const outcomes = [family.outcome, ...cases.map(entryOutcome)];
|
|
501
|
-
for (const o of [
|
|
502
|
-
"fail",
|
|
503
|
-
"infra_error",
|
|
504
|
-
"cancelled"
|
|
505
|
-
]) if (outcomes.includes(o)) return o;
|
|
506
|
-
return outcomes.every((o) => o === "skipped") ? "skipped" : "pass";
|
|
507
|
-
}
|
|
508
|
-
/** The width case marks wrap at. */
|
|
509
|
-
const CASE_WIDTH = 96;
|
|
510
|
-
/** A pooled family's rows under its header: its cases' marks, then each pooled rate or lift. */
|
|
511
|
-
function familyRows(c, family, cases, indent) {
|
|
512
|
-
const marks = cases.map((e) => `${mark(c, entryOutcome(e))} ${caseLabel(family.name, e.name)}`);
|
|
513
|
-
const plain = cases.map((e) => `x ${caseLabel(family.name, e.name)}`);
|
|
514
|
-
const rows = [];
|
|
515
|
-
let line = [];
|
|
516
|
-
let width = 0;
|
|
517
|
-
marks.forEach((m, i) => {
|
|
518
|
-
const w = plain[i].length + 2;
|
|
519
|
-
if (line.length && width + w > CASE_WIDTH) {
|
|
520
|
-
rows.push(`${indent}${line.join(" ")}`);
|
|
521
|
-
line = [];
|
|
522
|
-
width = 0;
|
|
523
|
-
}
|
|
524
|
-
line.push(m);
|
|
525
|
-
width += w;
|
|
526
|
-
});
|
|
527
|
-
if (line.length) rows.push(`${indent}${line.join(" ")}`);
|
|
528
|
-
if (family.lifts.length) {
|
|
529
|
-
const keyWidth = Math.max(...family.lifts.map((l) => l.variant.length));
|
|
530
|
-
for (const lift of family.lifts) {
|
|
531
|
-
const below = lift.outcome === "fail";
|
|
532
|
-
const gate = lift.minLift !== void 0 ? ` (minLift ${Math.round(lift.minLift * 100)}${below ? " ✗" : ""})` : "";
|
|
533
|
-
const text = `${familyLiftLabel(lift)}${gate}`;
|
|
534
|
-
rows.push(`${indent}${c.dim(lift.variant.padEnd(keyWidth))} ${below ? c.red(text) : text}`);
|
|
535
|
-
const effort = familyEffortLabel(lift);
|
|
536
|
-
if (effort) rows.push(`${indent} ${c.dim(`effort: ${effort}`)}`);
|
|
537
|
-
}
|
|
538
|
-
} else if (family.rates.length === 1) rows.push(`${indent}${familyRateLabel(family.rates[0])}`);
|
|
539
|
-
else {
|
|
540
|
-
const keyWidth = Math.max(...family.rates.map((r) => r.cell.length));
|
|
541
|
-
for (const rate of family.rates) rows.push(`${indent}${c.dim(rate.cell.padEnd(keyWidth))} ${familyRateLabel(rate)}`);
|
|
542
|
-
}
|
|
543
|
-
return rows;
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* The run's evals as a file › group tree, one row per eval and per cell of a matrix. A pooled
|
|
547
|
-
* family is one row, its template, with its cases' marks and the pooled results under it.
|
|
548
|
-
*/
|
|
549
|
-
function tree(c, evals, families = []) {
|
|
550
|
-
const rows = [];
|
|
551
|
-
const shown = /* @__PURE__ */ new Set();
|
|
552
|
-
let path = [];
|
|
553
|
-
for (const e of evals) {
|
|
554
|
-
const family = e.family && families.find((f) => f.id === e.family?.id);
|
|
555
|
-
if (family && shown.has(family.id)) continue;
|
|
556
|
-
const next = [e.file, ...e.group];
|
|
557
|
-
let same = 0;
|
|
558
|
-
while (same < path.length && same < next.length && path[same] === next[same]) same++;
|
|
559
|
-
for (let i = same; i < next.length; i++) rows.push({
|
|
560
|
-
indent: i,
|
|
561
|
-
text: i === 0 ? c.bold(next[i] ?? "") : next[i] ?? ""
|
|
562
|
-
});
|
|
563
|
-
path = next;
|
|
564
|
-
if (family) {
|
|
565
|
-
shown.add(family.id);
|
|
566
|
-
rows.push({
|
|
567
|
-
indent: next.length,
|
|
568
|
-
text: family.name,
|
|
569
|
-
family
|
|
570
|
-
});
|
|
571
|
-
} else rows.push({
|
|
572
|
-
indent: next.length,
|
|
573
|
-
text: e.name,
|
|
574
|
-
entry: e
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
const width = Math.max(...rows.filter((r) => r.entry || r.family).map((r) => r.indent * 2 + 2 + r.text.length));
|
|
578
|
-
return rows.flatMap(({ indent, text, entry, family }) => {
|
|
579
|
-
const pad = " ".repeat(indent);
|
|
580
|
-
const fill = " ".repeat(Math.max(0, width - indent * 2 - 2 - text.length));
|
|
581
|
-
if (family) {
|
|
582
|
-
const cases = familyCases(family, evals);
|
|
583
|
-
return [` ${pad}${mark(c, familyOutcome(family, cases))} ${text}${fill} ${c.dim(familyHeadLabel(family))}`, ...familyRows(c, family, cases, ` ${pad} `)];
|
|
584
|
-
}
|
|
585
|
-
if (!entry) return [` ${pad}${text}`];
|
|
586
|
-
return [
|
|
587
|
-
` ${pad}${`${entryOutcome(entry) === "pass" && allUngated(entry) && entry.attempts.some((a) => isUngatedMiss(entry, a)) ? MISS_MARK(c) : mark(c, entryOutcome(entry))} ${text}`}${fill} ${evalColumns(c, entry)}`,
|
|
588
|
-
...cellRows(c, entry, ` ${pad} `),
|
|
589
|
-
...contrastRows(c, entry, ` ${pad} `),
|
|
590
|
-
...questionRows(c, entry, ` ${pad} `)
|
|
591
|
-
];
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
function totals(c, s, cancelled = 0) {
|
|
595
|
-
const fail = s.fail - s.notGated - cancelled;
|
|
596
|
-
const parts = [
|
|
597
|
-
s.pass && c.green(`${s.pass} passed`),
|
|
598
|
-
fail > 0 && c.red(`${fail} failed`),
|
|
599
|
-
s.notGated > 0 && c.dim(`${s.notGated} missed, not gated`),
|
|
600
|
-
s.infraError && c.yellow(`${s.infraError} infra error`),
|
|
601
|
-
cancelled && c.yellow(`${cancelled} cancelled`),
|
|
602
|
-
s.skipped && c.dim(`${s.skipped} skipped`)
|
|
603
|
-
].filter(Boolean);
|
|
604
|
-
const scope = s.attempts === s.evals ? `${s.evals}` : `${s.attempts} attempts, ${s.evals} evals`;
|
|
605
|
-
return parts.length ? `${parts.join(c.dim(" · "))} ${c.dim(`(${scope})`)}` : "no evals ran";
|
|
606
|
-
}
|
|
607
|
-
/** `1 passed · 1 failed (2)`: the families' pooled gates. */
|
|
608
|
-
function familyTotals(c, families) {
|
|
609
|
-
const fail = families.filter((f) => f.outcome === "fail").length;
|
|
610
|
-
const pass = families.length - fail;
|
|
611
|
-
return `${[pass && c.green(`${pass} passed`), fail && c.red(`${fail} failed`)].filter(Boolean).join(c.dim(" · "))} ${c.dim(`(${families.length})`)}`;
|
|
612
|
-
}
|
|
613
|
-
/** Failing attempts, in run order, including expected misses. */
|
|
614
|
-
function failingAttempts(evals) {
|
|
615
|
-
return evals.flatMap((entry) => entry.attempts.map((attempt) => ({
|
|
616
|
-
entry,
|
|
617
|
-
attempt,
|
|
618
|
-
outcome: attemptOutcome(attempt)
|
|
619
|
-
})).filter(({ outcome }) => outcome !== "pass" && outcome !== "skipped"));
|
|
620
|
-
}
|
|
621
|
-
function renderSummary(c, e, attemptDir) {
|
|
379
|
+
//#region src/ui/result.ts
|
|
380
|
+
function resultLines(c, e, verbose) {
|
|
622
381
|
const { record } = e;
|
|
623
|
-
const lines = [];
|
|
624
|
-
if (record.evals.length) lines.push(c.bold("Summary"), ...tree(c, record.evals, record.families));
|
|
625
|
-
const all = failingAttempts(record.evals);
|
|
626
|
-
const missed = all.filter(({ entry, attempt }) => isUngatedMiss(entry, attempt));
|
|
627
|
-
const failing = all.filter((f) => !missed.includes(f));
|
|
628
|
-
if (failing.length) {
|
|
629
|
-
lines.push("", c.bold(c.red(`Failures (${failing.length})`)));
|
|
630
|
-
for (const kind of KINDS) {
|
|
631
|
-
const members = failing.filter(({ attempt, outcome }) => kind.test(attempt, outcome));
|
|
632
|
-
if (!members.length) continue;
|
|
633
|
-
lines.push("", c.bold(`${kind.title} (${members.length})`));
|
|
634
|
-
for (const { entry, attempt, outcome } of members) {
|
|
635
|
-
const result = resultFor(entry, attempt, e.results);
|
|
636
|
-
const which = entry.attempts.length > 1 ? ` ${c.dim(attempt.id)}` : "";
|
|
637
|
-
const gated = entry.cells.find((x) => x.key === attempt.cell)?.gate !== "none";
|
|
638
|
-
lines.push(` ${mark(c, outcome)} ${entry.id}${which}${gated ? "" : ` ${c.dim("(not gated)")}`}`);
|
|
639
|
-
if (outcome !== "cancelled") for (const line of failureLines(c, result, { max: FAILURE_LINES })) lines.push(` ${line}`);
|
|
640
|
-
if (!attempt.error?.prepare) lines.push(` ${c.dim("record")} ${attemptDir(entry.id, attempt.cell, attempt.n)}`);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
if (missed.length) {
|
|
645
|
-
lines.push("", c.bold(`Expected misses, not gated (${missed.length})`));
|
|
646
|
-
const pooled = /* @__PURE__ */ new Map();
|
|
647
|
-
for (const { entry, attempt } of missed) {
|
|
648
|
-
if (!entry.family) continue;
|
|
649
|
-
const key = `${entry.family.id}\0${attempt.cell}`;
|
|
650
|
-
pooled.set(key, (pooled.get(key) ?? 0) + 1);
|
|
651
|
-
}
|
|
652
|
-
for (const [key, n] of pooled) {
|
|
653
|
-
const [id, cell] = key.split("\0");
|
|
654
|
-
lines.push(` ${MISS_MARK(c)} ${id} ${c.dim(`${n} ${n === 1 ? "attempt" : "attempts"} on ${cell}`)}`);
|
|
655
|
-
}
|
|
656
|
-
for (const { entry, attempt } of missed) {
|
|
657
|
-
if (entry.family) continue;
|
|
658
|
-
const which = entry.attempts.length > 1 ? ` ${c.dim(attempt.id)}` : "";
|
|
659
|
-
const [reason] = failureLines(colors(false), resultFor(entry, attempt, e.results), { max: 1 }).filter((l) => l.trim());
|
|
660
|
-
lines.push(` ${MISS_MARK(c)} ${entry.id}${which}`);
|
|
661
|
-
if (reason) lines.push(` ${c.dim(reason.trim())}`);
|
|
662
|
-
lines.push(` ${c.dim("record")} ${attemptDir(entry.id, attempt.cell, attempt.n)}`);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
for (const error of e.unhandledErrors) lines.push("", c.red(`error: ${error}`));
|
|
666
|
-
const cancelled = failing.filter((f) => f.outcome === "cancelled").length;
|
|
667
|
-
const label = record.summary.attempts === record.summary.evals ? " Evals" : "Attempts";
|
|
668
|
-
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)}`] : []));
|
|
669
|
-
for (const family of record.families ?? []) for (const lift of family.lifts) {
|
|
670
|
-
if (lift.outcome !== "fail" || lift.minLift === void 0) continue;
|
|
671
|
-
lifted.push(`${family.id} ${lift.variant} pooled ${familyLiftLabel(lift)}: its lower bound is below minLift ${Math.round(lift.minLift * 100)}`);
|
|
672
|
-
}
|
|
673
|
-
const idle = undiscriminating(record.evals);
|
|
674
|
-
if (idle.length) {
|
|
675
|
-
lines.push("", c.bold(`Checks that don't discriminate (${idle.length})`));
|
|
676
|
-
for (const x of idle) lines.push(` ${c.dim("·")} ${undiscriminatingLabel(x)}`);
|
|
677
|
-
}
|
|
678
|
-
if (lifted.length) {
|
|
679
|
-
lines.push("", c.bold(c.red(`Lift below minLift (${lifted.length})`)));
|
|
680
|
-
for (const line of lifted) lines.push(` ${c.red("✗")} ${line}`);
|
|
681
|
-
}
|
|
682
|
-
if (record.status === "budget") lines.push("", c.yellow("Budget reached: attempts that hadn’t started were skipped"));
|
|
683
|
-
lines.push("");
|
|
684
|
-
if (record.families?.length) lines.push(`${c.dim("Families")} ${familyTotals(c, record.families)}`);
|
|
685
|
-
lines.push(`${c.dim(label)} ${totals(c, record.summary, cancelled)}`, `${c.dim("Duration")} ${formatDuration(record.durationMs)}`);
|
|
686
382
|
const tokens = formatUsage(record.cost.usage);
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
383
|
+
const notes = [
|
|
384
|
+
...record.status === "budget" ? [c.yellow("Budget reached: attempts that hadn’t started were skipped")] : [],
|
|
385
|
+
...record.status === "interrupted" ? [c.yellow("Interrupted: attempts that hadn’t finished were cancelled")] : [],
|
|
386
|
+
c.dim([
|
|
387
|
+
formatDuration(record.durationMs),
|
|
388
|
+
tokens,
|
|
389
|
+
`results ${e.summaryPath}`
|
|
390
|
+
].filter(Boolean).join(" · "))
|
|
391
|
+
];
|
|
392
|
+
return render(suiteResult(record), e.insights ?? null, {
|
|
393
|
+
color: c.enabled,
|
|
394
|
+
verbose,
|
|
395
|
+
notes: [...(e.insightLines ?? []).map((l) => c.yellow(l)), ...notes],
|
|
396
|
+
hint: e.hint
|
|
397
|
+
});
|
|
690
398
|
}
|
|
691
399
|
//#endregion
|
|
692
400
|
//#region src/ui/tags.ts
|
|
@@ -749,16 +457,9 @@ var Tagger = class {
|
|
|
749
457
|
//#endregion
|
|
750
458
|
//#region src/ui/agent.ts
|
|
751
459
|
const MAX_LINES = 12;
|
|
752
|
-
const WORD = {
|
|
753
|
-
fail: "FAIL",
|
|
754
|
-
infra_error: "INFRA",
|
|
755
|
-
cancelled: "CANCELLED"
|
|
756
|
-
};
|
|
757
460
|
var AgentRenderer = class {
|
|
758
461
|
#o;
|
|
759
462
|
#c = colors(false);
|
|
760
|
-
#logs = /* @__PURE__ */ new Map();
|
|
761
|
-
#printed = /* @__PURE__ */ new Set();
|
|
762
463
|
/** `[key]` prefixes for `-v` lines, from each attempt's start. */
|
|
763
464
|
#labels = /* @__PURE__ */ new Map();
|
|
764
465
|
#tags = new Tagger();
|
|
@@ -768,30 +469,6 @@ var AgentRenderer = class {
|
|
|
768
469
|
#write(text) {
|
|
769
470
|
this.#o.out.write(`${text.trimEnd()}\n`);
|
|
770
471
|
}
|
|
771
|
-
#failure(result, cell, n) {
|
|
772
|
-
const outcome = outcomeOf(result);
|
|
773
|
-
if (outcome === "pass" || outcome === "skipped") return;
|
|
774
|
-
this.#printed.add(result.key);
|
|
775
|
-
const kind = outcome === "fail" ? result.meta?.errorKind ?? "assertion" : null;
|
|
776
|
-
const detail = [
|
|
777
|
-
formatDuration(result.durationMs),
|
|
778
|
-
kind,
|
|
779
|
-
result.attempt?.gate === "none" ? "not gated" : ""
|
|
780
|
-
].filter(Boolean).join(", ");
|
|
781
|
-
const which = result.attempt?.label ? ` [${result.attempt.label}]` : "";
|
|
782
|
-
const missed = outcome === "fail" && result.attempt?.gate === "none";
|
|
783
|
-
this.#write(`${missed ? "MISS" : WORD[outcome]} ${result.id}${which} (${detail})`);
|
|
784
|
-
if (outcome !== "cancelled") {
|
|
785
|
-
const lines = failureLines(this.#c, result, { max: MAX_LINES });
|
|
786
|
-
for (const line of missed ? lines.filter((l) => l.trim()).slice(0, 1) : lines) this.#write(` ${line}`);
|
|
787
|
-
}
|
|
788
|
-
const logs = missed ? void 0 : this.#logs.get(result.key);
|
|
789
|
-
if (logs?.length) {
|
|
790
|
-
this.#write(" console:");
|
|
791
|
-
for (const line of capLines(logs.join("\n"), MAX_LINES)) this.#write(` ${line}`);
|
|
792
|
-
}
|
|
793
|
-
if (!result.meta?.prepare) this.#write(` record: ${this.#o.attemptDir(result.id, cell, n)}`);
|
|
794
|
-
}
|
|
795
472
|
onEvent(e) {
|
|
796
473
|
switch (e.type) {
|
|
797
474
|
case "plan":
|
|
@@ -814,65 +491,22 @@ var AgentRenderer = class {
|
|
|
814
491
|
for (const line of debugLines(this.#c, e.line, this.#o.verbosity === 2)) this.#write(`${label} ${line}`);
|
|
815
492
|
return;
|
|
816
493
|
}
|
|
817
|
-
case "log": {
|
|
818
|
-
if (!e.key) return;
|
|
819
|
-
const logs = this.#logs.get(e.key) ?? [];
|
|
820
|
-
logs.push(...e.text.replace(/\n$/, "").split("\n"));
|
|
821
|
-
this.#logs.set(e.key, logs);
|
|
822
|
-
return;
|
|
823
|
-
}
|
|
824
494
|
case "eval-progress": {
|
|
825
495
|
if (e.progress.kind !== "browser-download") return;
|
|
826
496
|
const label = this.#labels.get(e.key) ?? `[${e.key}]`;
|
|
827
497
|
this.#write(`${label} ${progressLine(this.#c, e.progress)}`);
|
|
828
498
|
return;
|
|
829
499
|
}
|
|
830
|
-
case "eval-end": {
|
|
831
|
-
const { attempt } = e.result;
|
|
832
|
-
this.#failure(e.result, attempt?.cell.key ?? "", attempt?.n ?? 1);
|
|
833
|
-
return;
|
|
834
|
-
}
|
|
835
500
|
case "prepare":
|
|
836
501
|
for (const line of prepareLines(this.#c, e, MAX_LINES)) this.#write(line);
|
|
837
502
|
return;
|
|
838
503
|
case "notice":
|
|
839
504
|
if (e.level !== "info") this.#write(e.text);
|
|
840
505
|
return;
|
|
841
|
-
case "run-end":
|
|
842
|
-
|
|
843
|
-
for (const
|
|
844
|
-
const result = resultFor(entry, attempt, e.results);
|
|
845
|
-
if (outcome === "cancelled" && !this.#printed.has(result.key)) this.#failure(result, attempt.cell, attempt.n);
|
|
846
|
-
}
|
|
847
|
-
for (const error of e.unhandledErrors) this.#write(`ERROR ${error}`);
|
|
848
|
-
for (const entry of e.record.evals) for (const a of entry.answers ?? []) {
|
|
849
|
-
this.#write(`question ${entry.id}: ${answersLabel(a)}`);
|
|
850
|
-
for (const line of headToHeadLines(a.votes)) this.#write(` ${line}`);
|
|
851
|
-
for (const reason of sampleReasons(a.votes)) this.#write(` ${reason}`);
|
|
852
|
-
}
|
|
853
|
-
for (const x of undiscriminating(e.record.evals)) this.#write(`check doesn't discriminate: ${undiscriminatingLabel(x)}`);
|
|
854
|
-
for (const family of e.record.families ?? []) {
|
|
855
|
-
const pooled = family.lifts.length ? family.lifts.map((l) => {
|
|
856
|
-
const gate = l.minLift === void 0 ? "" : ` (minLift ${Math.round(l.minLift * 100)}${l.outcome === "fail" ? ", FAIL" : ""})`;
|
|
857
|
-
return `${l.variant} ${familyLiftLabel(l)}${gate}`;
|
|
858
|
-
}) : family.rates.map((r) => `${r.cell} ${familyRateLabel(r)}`);
|
|
859
|
-
this.#write(`family ${family.id}: ${familyHeadLabel(family)} · ${pooled.join(" · ")}`);
|
|
860
|
-
}
|
|
861
|
-
const s = e.record.summary;
|
|
862
|
-
const cancelled = failing.filter((f) => f.outcome === "cancelled").length;
|
|
863
|
-
const parts = [
|
|
864
|
-
s.pass && `${s.pass} passed`,
|
|
865
|
-
s.fail - s.notGated - cancelled > 0 && `${s.fail - s.notGated - cancelled} failed`,
|
|
866
|
-
s.notGated > 0 && `${s.notGated} missed, not gated`,
|
|
867
|
-
s.infraError && `${s.infraError} infra error`,
|
|
868
|
-
cancelled && `${cancelled} cancelled`,
|
|
869
|
-
s.skipped && `${s.skipped} skipped`
|
|
870
|
-
].filter(Boolean);
|
|
871
|
-
const scope = s.attempts === s.evals ? "" : ` (${s.attempts} attempts, ${s.evals} evals)`;
|
|
872
|
-
this.#write(parts.length ? `${parts.join(", ")}${scope}` : "no evals ran");
|
|
873
|
-
this.#write(`summary: ${e.summaryPath}`);
|
|
506
|
+
case "run-end":
|
|
507
|
+
this.#write("");
|
|
508
|
+
for (const line of resultLines(this.#c, e, (this.#o.verbosity ?? 0) > 0)) this.#write(line);
|
|
874
509
|
return;
|
|
875
|
-
}
|
|
876
510
|
default: return;
|
|
877
511
|
}
|
|
878
512
|
}
|
|
@@ -889,6 +523,8 @@ const STARTS = {
|
|
|
889
523
|
"browser-download": "browser-download"
|
|
890
524
|
};
|
|
891
525
|
const ERROR_LINES = 12;
|
|
526
|
+
/** Back to the start of the line and clear it, for the live status line. */
|
|
527
|
+
const CLEAR = "\r\x1B[2K";
|
|
892
528
|
/** GitHub Actions workflow-command escaping. */
|
|
893
529
|
const ghEscape = (s, property = false) => {
|
|
894
530
|
const out = s.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
|
|
@@ -914,10 +550,20 @@ var PlainRenderer = class {
|
|
|
914
550
|
#runStartedAt = 0;
|
|
915
551
|
#lastWrite = 0;
|
|
916
552
|
#timer;
|
|
553
|
+
/** On a TTY: the status line is drawn under everything else, and redrawn after each write. */
|
|
554
|
+
#live;
|
|
555
|
+
#status = "";
|
|
556
|
+
/** Evals and tries collected (not skipped), and the tries that ended. */
|
|
557
|
+
#evals = /* @__PURE__ */ new Set();
|
|
558
|
+
#tries = /* @__PURE__ */ new Set();
|
|
559
|
+
#ended = /* @__PURE__ */ new Set();
|
|
560
|
+
/** Insights after the last attempt, once they've started: they take the status line. */
|
|
561
|
+
#insights = null;
|
|
917
562
|
constructor(options) {
|
|
918
563
|
this.#o = options;
|
|
919
564
|
this.#c = options.colors;
|
|
920
565
|
this.#now = options.now ?? Date.now;
|
|
566
|
+
this.#live = options.output.requested === "live";
|
|
921
567
|
const { heartbeatMs } = options.output;
|
|
922
568
|
if (options.timers !== false && heartbeatMs > 0) {
|
|
923
569
|
this.#timer = setInterval(() => this.tick(), Math.min(heartbeatMs, 5e3));
|
|
@@ -925,9 +571,29 @@ var PlainRenderer = class {
|
|
|
925
571
|
}
|
|
926
572
|
}
|
|
927
573
|
#write(text) {
|
|
928
|
-
|
|
574
|
+
const line = `${text.trimEnd()}\n`;
|
|
575
|
+
this.#o.out.write(this.#status ? `${CLEAR}${line}${this.#status}` : line);
|
|
929
576
|
this.#lastWrite = this.#now();
|
|
930
577
|
}
|
|
578
|
+
/** `7 evals · 12/28 tries`: what's collected so far and how many tries ended; then `insights 3/7…`. */
|
|
579
|
+
#drawStatus() {
|
|
580
|
+
if (!this.#live) return;
|
|
581
|
+
let status;
|
|
582
|
+
if (this.#insights) status = this.#c.dim(`insights ${this.#insights.done}/${this.#insights.total}…`);
|
|
583
|
+
else {
|
|
584
|
+
if (!this.#tries.size) return;
|
|
585
|
+
const evals = `${this.#evals.size} eval${this.#evals.size === 1 ? "" : "s"}`;
|
|
586
|
+
status = this.#c.dim(`${evals} · ${this.#ended.size}/${this.#tries.size} tries`);
|
|
587
|
+
}
|
|
588
|
+
if (status === this.#status) return;
|
|
589
|
+
this.#o.out.write(`${CLEAR}${status}`);
|
|
590
|
+
this.#status = status;
|
|
591
|
+
}
|
|
592
|
+
#clearStatus() {
|
|
593
|
+
if (!this.#status) return;
|
|
594
|
+
this.#o.out.write(CLEAR);
|
|
595
|
+
this.#status = "";
|
|
596
|
+
}
|
|
931
597
|
#attempt(ref, startedAt) {
|
|
932
598
|
const n = ref.attempt?.n ?? 1;
|
|
933
599
|
const label = `[${this.#tags.label(ref.id, n)} ${attemptAxes(ref.attempt, this.#o.harness)}]`;
|
|
@@ -973,14 +639,20 @@ var PlainRenderer = class {
|
|
|
973
639
|
return;
|
|
974
640
|
case "collected":
|
|
975
641
|
this.#tags.addFile(e.evals);
|
|
976
|
-
for (const x of e.evals)
|
|
642
|
+
for (const x of e.evals) {
|
|
643
|
+
if (x.skipped) continue;
|
|
644
|
+
this.#queued.add(x.key);
|
|
645
|
+
this.#evals.add(x.id);
|
|
646
|
+
this.#tries.add(x.key);
|
|
647
|
+
}
|
|
648
|
+
this.#drawStatus();
|
|
977
649
|
return;
|
|
978
650
|
case "eval-start": {
|
|
979
651
|
const a = this.#attempt(e, e.at);
|
|
980
652
|
a.last = e;
|
|
981
653
|
this.#queued.delete(e.key);
|
|
982
654
|
this.#running.set(e.key, a);
|
|
983
|
-
this.#write(`${this.#prefix(a)} ${c.dim("▶")} ${e.id}`);
|
|
655
|
+
if (this.#streaming) this.#write(`${this.#prefix(a)} ${c.dim("▶")} ${e.id}`);
|
|
984
656
|
return;
|
|
985
657
|
}
|
|
986
658
|
case "eval-progress": {
|
|
@@ -1028,6 +700,8 @@ var PlainRenderer = class {
|
|
|
1028
700
|
}
|
|
1029
701
|
case "eval-end":
|
|
1030
702
|
this.#end(e.result, e.at);
|
|
703
|
+
if (this.#tries.has(e.result.key)) this.#ended.add(e.result.key);
|
|
704
|
+
this.#drawStatus();
|
|
1031
705
|
return;
|
|
1032
706
|
case "prepare":
|
|
1033
707
|
for (const line of prepareLines(c, e, ERROR_LINES)) this.#write(line);
|
|
@@ -1038,6 +712,14 @@ var PlainRenderer = class {
|
|
|
1038
712
|
this.#write(`::error title=${title}::${ghEscape(failure.message)}`);
|
|
1039
713
|
}
|
|
1040
714
|
return;
|
|
715
|
+
case "insights-progress":
|
|
716
|
+
this.#insights = {
|
|
717
|
+
done: e.done,
|
|
718
|
+
total: e.total,
|
|
719
|
+
startedAt: this.#insights?.startedAt ?? e.at
|
|
720
|
+
};
|
|
721
|
+
this.#drawStatus();
|
|
722
|
+
return;
|
|
1041
723
|
case "notice": {
|
|
1042
724
|
const paint = {
|
|
1043
725
|
info: c.dim,
|
|
@@ -1048,8 +730,9 @@ var PlainRenderer = class {
|
|
|
1048
730
|
return;
|
|
1049
731
|
}
|
|
1050
732
|
case "run-end":
|
|
733
|
+
this.#clearStatus();
|
|
1051
734
|
this.#write("");
|
|
1052
|
-
for (const line of
|
|
735
|
+
for (const line of resultLines(c, e, (this.#o.verbosity ?? 0) > 0)) this.#write(line);
|
|
1053
736
|
return;
|
|
1054
737
|
}
|
|
1055
738
|
}
|
|
@@ -1062,6 +745,11 @@ var PlainRenderer = class {
|
|
|
1062
745
|
const title = w.kind === "root" ? "Sandbox runs as root" : "Sandbox has extra capabilities";
|
|
1063
746
|
this.#write(`::warning ${file}title=${ghEscape(title, true)}::${ghEscape(w.message)}`);
|
|
1064
747
|
}
|
|
748
|
+
/**
|
|
749
|
+
* An ended attempt's logs, as `--output-logs` picks: grouped, its block under a `▶` header;
|
|
750
|
+
* streamed, only its error lines, since the rest already printed. A sandbox that failed to
|
|
751
|
+
* prepare was annotated once, for all its attempts.
|
|
752
|
+
*/
|
|
1065
753
|
#end(result, at) {
|
|
1066
754
|
const c = this.#c;
|
|
1067
755
|
const a = this.#running.get(result.key) ?? this.#attempt(result, at - result.durationMs);
|
|
@@ -1069,18 +757,17 @@ var PlainRenderer = class {
|
|
|
1069
757
|
this.#queued.delete(result.key);
|
|
1070
758
|
const outcome = outcomeOf(result);
|
|
1071
759
|
const failed = outcome !== "pass" && outcome !== "skipped";
|
|
1072
|
-
const
|
|
1073
|
-
const
|
|
1074
|
-
const missed = ungated !== "" && outcome === "fail";
|
|
1075
|
-
const head = `${this.#prefix(a)} ${missed ? MISS_MARK(c) : mark(c, outcome)} ${result.id}${time}${ungated}`;
|
|
760
|
+
const ungated = failed && result.attempt?.gate === "none";
|
|
761
|
+
const missed = ungated && outcome === "fail";
|
|
1076
762
|
const { outputLogs, githubActions, logPrefix } = this.#o.output;
|
|
1077
763
|
const showDetail = !this.#streaming && a.lines.length > 0 && (outputLogs === "full" || outputLogs === "errors-only" && failed);
|
|
1078
764
|
const judged = result.meta?.errorKind === "judge" && (showDetail || this.#streaming);
|
|
1079
765
|
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 }) : [];
|
|
1080
766
|
const lines = a.lines.filter((l) => l.kind !== "cleanup").sort((x, y) => x.at - y.at);
|
|
1081
767
|
const prefixed = logPrefix === "task";
|
|
768
|
+
const head = `${this.#prefix(a)} ${c.dim("▶")} ${result.id}`;
|
|
1082
769
|
const group = githubActions && showDetail && (!failed || missed);
|
|
1083
|
-
this.#write(group ? `::group::${stripAnsi(head)}` : head);
|
|
770
|
+
if (showDetail || !this.#streaming && errors.length) this.#write(group ? `::group::${stripAnsi(head)}` : head);
|
|
1084
771
|
if (showDetail) for (const line of lines) this.#write(this.#detail(a, line, prefixed));
|
|
1085
772
|
for (const line of errors) this.#write(prefixed ? `${this.#prefix(a)} ${line}` : ` ${line}`);
|
|
1086
773
|
if (group) this.#write("::endgroup::");
|
|
@@ -1093,12 +780,19 @@ var PlainRenderer = class {
|
|
|
1093
780
|
this.#write(`::error file=${ghEscape(result.file, true)}${where},title=${title}::${message}`);
|
|
1094
781
|
}
|
|
1095
782
|
}
|
|
1096
|
-
/** Prints the heartbeat if nothing was written for `heartbeatMs` and evals are running. */
|
|
783
|
+
/** Prints the heartbeat if nothing was written for `heartbeatMs` and evals or insights are running. */
|
|
1097
784
|
tick(now = this.#now()) {
|
|
1098
785
|
const { heartbeatMs } = this.#o.output;
|
|
1099
|
-
if (
|
|
786
|
+
if (this.#live || heartbeatMs <= 0) return;
|
|
1100
787
|
if (now - this.#lastWrite < heartbeatMs) return;
|
|
1101
788
|
const c = this.#c;
|
|
789
|
+
const insights = this.#insights;
|
|
790
|
+
if (insights) {
|
|
791
|
+
const elapsed = formatDuration(now - insights.startedAt);
|
|
792
|
+
if (insights.done < insights.total) this.#write(c.dim(`… insights ${insights.done}/${insights.total} after ${elapsed}`));
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
if (this.#running.size === 0) return;
|
|
1102
796
|
const running = [...this.#running.values()].map((a) => {
|
|
1103
797
|
const progress = a.last?.type === "eval-progress" ? a.last.progress : void 0;
|
|
1104
798
|
return `${this.#prefix(a)} ${phaseOf(progress)} ${c.dim(formatDuration(now - a.startedAt))}`;
|
|
@@ -1109,6 +803,7 @@ var PlainRenderer = class {
|
|
|
1109
803
|
}
|
|
1110
804
|
close() {
|
|
1111
805
|
clearInterval(this.#timer);
|
|
806
|
+
this.#clearStatus();
|
|
1112
807
|
}
|
|
1113
808
|
};
|
|
1114
809
|
//#endregion
|
|
@@ -1172,7 +867,7 @@ function resolveOutput(input) {
|
|
|
1172
867
|
mode,
|
|
1173
868
|
logOrder,
|
|
1174
869
|
logPrefix,
|
|
1175
|
-
outputLogs: logs && logs !== "auto" ? logs : "full",
|
|
870
|
+
outputLogs: logs && logs !== "auto" ? logs : flags.verbose ? "full" : "errors-only",
|
|
1176
871
|
color: env.NO_COLOR ? false : env.FORCE_COLOR !== void 0 && env.FORCE_COLOR !== "" ? set(env, "FORCE_COLOR") : mode === "agent" ? false : input.isTTY || githubActions,
|
|
1177
872
|
githubActions,
|
|
1178
873
|
heartbeatMs: mode === "agent" ? 0 : parseHeartbeat(env.REEVAL_HEARTBEAT)
|
|
@@ -1231,6 +926,11 @@ const invocation = {
|
|
|
1231
926
|
let interrupted = false;
|
|
1232
927
|
/** The last signal that cancelled the run: 130 after SIGINT, 143 after SIGTERM. */
|
|
1233
928
|
let stopCode = EXIT.interrupted;
|
|
929
|
+
/**
|
|
930
|
+
* Set while insights run, after the attempts and the exit code: Ctrl-C or SIGTERM then stops the
|
|
931
|
+
* insights instead of cancelling the run, which has nothing left to cancel.
|
|
932
|
+
*/
|
|
933
|
+
let onInsightsSignal = null;
|
|
1234
934
|
async function run(argv) {
|
|
1235
935
|
const { values, positionals } = parseCli(argv);
|
|
1236
936
|
invocation.flags = values;
|
|
@@ -1248,7 +948,7 @@ async function run(argv) {
|
|
|
1248
948
|
return values.help ? EXIT.ok : EXIT.usage;
|
|
1249
949
|
}
|
|
1250
950
|
if (command === "init") {
|
|
1251
|
-
const { initCommand } = await import("./init-
|
|
951
|
+
const { initCommand } = await import("./init-D7Y1ny1z.js");
|
|
1252
952
|
return initCommand(values, filters, {
|
|
1253
953
|
out: (s) => console.log(s),
|
|
1254
954
|
input: process.stdin,
|
|
@@ -1257,7 +957,7 @@ async function run(argv) {
|
|
|
1257
957
|
});
|
|
1258
958
|
}
|
|
1259
959
|
if (command === "doctor") {
|
|
1260
|
-
const { doctorCommand } = await import("./doctor-
|
|
960
|
+
const { doctorCommand } = await import("./doctor-CqttrZcs.js");
|
|
1261
961
|
return doctorCommand(values, {
|
|
1262
962
|
out: (s) => console.log(s),
|
|
1263
963
|
color: !!process.stdout.isTTY && !process.env.NO_COLOR,
|
|
@@ -1265,7 +965,7 @@ async function run(argv) {
|
|
|
1265
965
|
});
|
|
1266
966
|
}
|
|
1267
967
|
if (command === "report") {
|
|
1268
|
-
const { reportCommand } = await import("./command-
|
|
968
|
+
const { reportCommand } = await import("./command-CaZgCTIw.js");
|
|
1269
969
|
return reportCommand(values, filters, {
|
|
1270
970
|
out: (s) => console.log(s),
|
|
1271
971
|
err: (s) => console.error(dim(s)),
|
|
@@ -1280,7 +980,7 @@ async function run(argv) {
|
|
|
1280
980
|
}
|
|
1281
981
|
if (command === "studio") {
|
|
1282
982
|
const config = await loadConfig(configPath, "studio");
|
|
1283
|
-
const { studioCommand } = await import("./command-
|
|
983
|
+
const { studioCommand } = await import("./command-DTgBZR0k.js");
|
|
1284
984
|
return studioCommand({
|
|
1285
985
|
config,
|
|
1286
986
|
flags: values,
|
|
@@ -1291,7 +991,7 @@ async function run(argv) {
|
|
|
1291
991
|
if (command === "mcp") {
|
|
1292
992
|
if (!values.http) console.log = console.info = console.debug = console.error;
|
|
1293
993
|
const config = await loadConfig(configPath, "mcp");
|
|
1294
|
-
const { mcpCommand } = await import("./command-
|
|
994
|
+
const { mcpCommand } = await import("./command-BMHXHqMT.js");
|
|
1295
995
|
return mcpCommand({
|
|
1296
996
|
config,
|
|
1297
997
|
flags: values,
|
|
@@ -1300,7 +1000,7 @@ async function run(argv) {
|
|
|
1300
1000
|
}
|
|
1301
1001
|
if (command in HISTORY_COMMANDS) {
|
|
1302
1002
|
const config = await loadConfig(configPath, command);
|
|
1303
|
-
const commands = await import("./commands-
|
|
1003
|
+
const commands = await import("./commands-BXzIDB3X.js");
|
|
1304
1004
|
const ctx = {
|
|
1305
1005
|
config,
|
|
1306
1006
|
flags: values,
|
|
@@ -1313,7 +1013,7 @@ async function run(argv) {
|
|
|
1313
1013
|
case "compare": return commands.compareCommand(ctx, filters);
|
|
1314
1014
|
case "checkout": return commands.checkoutCommand(ctx, filters);
|
|
1315
1015
|
case "query": {
|
|
1316
|
-
const { queryCommand } = await import("./query-
|
|
1016
|
+
const { queryCommand } = await import("./query-CmBDYt0_.js");
|
|
1317
1017
|
return queryCommand({
|
|
1318
1018
|
...ctx,
|
|
1319
1019
|
err: (s) => console.error(dim(s))
|
|
@@ -1321,7 +1021,7 @@ async function run(argv) {
|
|
|
1321
1021
|
}
|
|
1322
1022
|
case "analyze": {
|
|
1323
1023
|
loadEnvFiles(configPath);
|
|
1324
|
-
const { analyzeCommand } = await import("./command-
|
|
1024
|
+
const { analyzeCommand } = await import("./command-CVtgyqlM.js");
|
|
1325
1025
|
return analyzeCommand({
|
|
1326
1026
|
...ctx,
|
|
1327
1027
|
err: (s) => console.error(dim(s))
|
|
@@ -1360,8 +1060,8 @@ async function cleanCommand(flags, configPath) {
|
|
|
1360
1060
|
const where = fromCwd(debugRoot(config.root)) || ".";
|
|
1361
1061
|
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}`);
|
|
1362
1062
|
if (flags.images) {
|
|
1363
|
-
const { dockerAvailable, pruneImages } = await import("./src-
|
|
1364
|
-
const { requireDocker } = await import("./providers-
|
|
1063
|
+
const { dockerAvailable, pruneImages } = await import("./src-B9L9yGKI.js");
|
|
1064
|
+
const { requireDocker } = await import("./providers-CXN2RFz-.js");
|
|
1365
1065
|
const engines = [];
|
|
1366
1066
|
for (const engine of ["docker", "podman"]) if (await dockerAvailable(engine)) engines.push(engine);
|
|
1367
1067
|
if (!engines.length) await requireDocker();
|
|
@@ -1382,7 +1082,7 @@ function verbosityOf(flags) {
|
|
|
1382
1082
|
* does. Needs a config, as `reeval run` does: there is no default image.
|
|
1383
1083
|
*/
|
|
1384
1084
|
async function imageBuildCommand(flags, configPath, filters) {
|
|
1385
|
-
const { buildImages, imagePlanLines, imageTargets, plannedImageUses } = await import("./images-
|
|
1085
|
+
const { buildImages, imagePlanLines, imageTargets, plannedImageUses } = await import("./images-BmJRuTpm.js");
|
|
1386
1086
|
const { runId, stagingDir, config, runs, tags, concurrency, profile } = await startRun(await prepareRun({
|
|
1387
1087
|
...flags,
|
|
1388
1088
|
"dry-run": true
|
|
@@ -1442,13 +1142,12 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1442
1142
|
if (githubOut) await appendFile(githubOut, `run-id=${ctx.runId}\n`).catch(() => {});
|
|
1443
1143
|
const stepStart = process.env.GITHUB_STEP_SUMMARY;
|
|
1444
1144
|
if (stepStart) await appendFile(stepStart, `run ${ctx.runId}\n`).catch(() => {});
|
|
1445
|
-
const { engineVersions } = await import("./node-
|
|
1145
|
+
const { engineVersions } = await import("./node-D0mtjRAO.js");
|
|
1446
1146
|
const renderer = createRenderer({
|
|
1447
|
-
out: setup.json ? { write: () => true } : process.stdout,
|
|
1147
|
+
out: setup.json ? setup.dryRun ? { write: () => true } : process.stderr : process.stdout,
|
|
1448
1148
|
output: setup.output,
|
|
1449
1149
|
verbosity: ctx.verbosity ?? 0,
|
|
1450
|
-
harness: setup.config.harness[0]?.kind ?? "agent"
|
|
1451
|
-
attemptDir: (id, cell, n) => fromCwd(join(ctx.scratch, ctx.runId, evalSlug(id), evalSlug(cell), String(n)))
|
|
1150
|
+
harness: setup.config.harness[0]?.kind ?? "agent"
|
|
1452
1151
|
});
|
|
1453
1152
|
let executed;
|
|
1454
1153
|
try {
|
|
@@ -1461,27 +1160,13 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1461
1160
|
});
|
|
1462
1161
|
throw error;
|
|
1463
1162
|
}
|
|
1464
|
-
const { engineRun, plan, sandboxVersions, budgetReached, live,
|
|
1163
|
+
const { engineRun, plan, sandboxVersions, budgetReached, live, questions } = executed;
|
|
1465
1164
|
invocation.unhandledErrors = engineRun.unhandledErrors;
|
|
1466
1165
|
const engines = [...new Set(plan?.sandboxes.flatMap((s) => s.kind === "docker" ? [s.engine ?? "docker"] : []))];
|
|
1467
1166
|
if ((interrupted || engineRun.cancelled) && engines.length) {
|
|
1468
|
-
const { removeRunContainers } = await import("./docker-
|
|
1167
|
+
const { removeRunContainers } = await import("./docker-DC69dKxB.js");
|
|
1469
1168
|
await removeRunContainers(ctx.runId, engines);
|
|
1470
1169
|
}
|
|
1471
|
-
if (notes) {
|
|
1472
|
-
const cancelled = interrupted || engineRun.cancelled;
|
|
1473
|
-
const written = await notes.finish(cancelled);
|
|
1474
|
-
if (!cancelled && written.length) {
|
|
1475
|
-
const { notesLine } = await import("./agent-CURAwx_q.js");
|
|
1476
|
-
const text = notesLine(ctx.config.root, ctx.runId, written);
|
|
1477
|
-
renderer.onEvent({
|
|
1478
|
-
type: "notice",
|
|
1479
|
-
at: Date.now(),
|
|
1480
|
-
level: "info",
|
|
1481
|
-
text
|
|
1482
|
-
});
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
1170
|
if (engineRun.stopped || !plan) {
|
|
1486
1171
|
live?.remove();
|
|
1487
1172
|
renderer.close();
|
|
@@ -1489,8 +1174,8 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1489
1174
|
}
|
|
1490
1175
|
const stopped = interrupted || engineRun.cancelled;
|
|
1491
1176
|
const answers = questions && !stopped ? await questions.settle() : void 0;
|
|
1492
|
-
const { lockfiles } = await import("./state-
|
|
1493
|
-
const { writeScratchRun } = await import("./results-
|
|
1177
|
+
const { lockfiles } = await import("./state-BQR_BCm4.js");
|
|
1178
|
+
const { writeScratchRun } = await import("./results-Drtt0uFl.js");
|
|
1494
1179
|
const run = await writeScratchRun({
|
|
1495
1180
|
ctx,
|
|
1496
1181
|
author: ctx.author,
|
|
@@ -1514,17 +1199,56 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1514
1199
|
...answers?.size ? { answers } : {}
|
|
1515
1200
|
}, () => live?.stop());
|
|
1516
1201
|
const { record } = run;
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1202
|
+
const outcome = runOutcome(record);
|
|
1203
|
+
const code = stopped ? stopCode : outcome === "fail" ? EXIT.failed : outcome === "infra_error" ? EXIT.infra : EXIT.ok;
|
|
1204
|
+
let insights = run.insights;
|
|
1205
|
+
let insightLines = [];
|
|
1206
|
+
const { runInsights, wantsInsights } = await import("./run-BeMy92Us.js");
|
|
1207
|
+
const wanted = !stopped && wantsInsights(ctx.config, !flags["no-insights"]);
|
|
1208
|
+
if (wanted && interrupted) insightLines = [`insights skipped (${stopCode === EXIT.terminated ? "SIGTERM" : "Ctrl-C"}): reeval analyze ${record.runId} --insights to write them`];
|
|
1209
|
+
else if (wanted) {
|
|
1210
|
+
const { scratchDir } = await import("./files-DqCBW7i8.js");
|
|
1211
|
+
const stop = new AbortController();
|
|
1212
|
+
let stopSignal = "SIGINT";
|
|
1213
|
+
onInsightsSignal = (signal) => {
|
|
1214
|
+
if (stop.signal.aborted) {
|
|
1215
|
+
renderer.close();
|
|
1216
|
+
process.exit(code);
|
|
1217
|
+
}
|
|
1218
|
+
stopSignal = signal;
|
|
1219
|
+
stop.abort(/* @__PURE__ */ new Error(signal === "SIGTERM" ? "SIGTERM" : "Ctrl-C"));
|
|
1220
|
+
};
|
|
1221
|
+
try {
|
|
1222
|
+
const done = await runInsights({
|
|
1223
|
+
config: ctx.config,
|
|
1224
|
+
record,
|
|
1225
|
+
runDir: run.artifactDir ?? join(scratchDir(ctx.config.root), record.runId),
|
|
1226
|
+
remarks: run.insights,
|
|
1227
|
+
verbose: (ctx.verbosity ?? 0) > 0,
|
|
1228
|
+
signal: stop.signal,
|
|
1229
|
+
stopSignal: () => stopSignal,
|
|
1230
|
+
onStart: (text) => {
|
|
1231
|
+
renderer.onEvent({
|
|
1232
|
+
type: "notice",
|
|
1233
|
+
at: Date.now(),
|
|
1234
|
+
level: "info",
|
|
1235
|
+
text
|
|
1236
|
+
});
|
|
1237
|
+
},
|
|
1238
|
+
onProgress: (n, total) => {
|
|
1239
|
+
renderer.onEvent({
|
|
1240
|
+
type: "insights-progress",
|
|
1241
|
+
at: Date.now(),
|
|
1242
|
+
done: n,
|
|
1243
|
+
total
|
|
1244
|
+
});
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
insights = done.insights ?? insights;
|
|
1248
|
+
insightLines = done.lines;
|
|
1249
|
+
} finally {
|
|
1250
|
+
onInsightsSignal = null;
|
|
1251
|
+
}
|
|
1528
1252
|
}
|
|
1529
1253
|
const { pruneDebug } = await import("./files-BAt0i00X.js");
|
|
1530
1254
|
await pruneDebug(ctx.config.root, ctx.config.debug.keep).catch(() => {});
|
|
@@ -1535,7 +1259,9 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1535
1259
|
record,
|
|
1536
1260
|
summaryPath: fromCwd(summary),
|
|
1537
1261
|
results: engineRun.evals,
|
|
1538
|
-
|
|
1262
|
+
hint: !hasAnalysisModel(ctx.config),
|
|
1263
|
+
insights,
|
|
1264
|
+
insightLines
|
|
1539
1265
|
});
|
|
1540
1266
|
renderer.close();
|
|
1541
1267
|
const stepSummary = process.env.GITHUB_STEP_SUMMARY;
|
|
@@ -1543,17 +1269,20 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1543
1269
|
const { config } = ctx;
|
|
1544
1270
|
const mode = setup.record;
|
|
1545
1271
|
if ((flags.record || mode === "always" || mode === "ci" && inCI()) && record.status !== "interrupted") {
|
|
1546
|
-
const { record: recordCmd } = await import("./commands-
|
|
1272
|
+
const { record: recordCmd } = await import("./commands-BXzIDB3X.js");
|
|
1547
1273
|
const allow = record.status === "budget" ? { "allow-incomplete": true } : {};
|
|
1548
|
-
|
|
1274
|
+
const line = await recordCmd(config, record.runId, {
|
|
1549
1275
|
...flags,
|
|
1550
1276
|
...allow
|
|
1551
|
-
})
|
|
1277
|
+
});
|
|
1278
|
+
if (setup.json) console.error(line);
|
|
1279
|
+
else console.log(line);
|
|
1552
1280
|
}
|
|
1553
|
-
if (
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1281
|
+
if (setup.json) {
|
|
1282
|
+
const { suiteResult } = await import("./suite-BaHPmAGy.js");
|
|
1283
|
+
process.stdout.write(`${JSON.stringify(suiteResult(record), null, 2)}\n`);
|
|
1284
|
+
}
|
|
1285
|
+
return code;
|
|
1557
1286
|
}
|
|
1558
1287
|
/** Everything that can fail before the evals are collected: output mode, config, profile, flags. */
|
|
1559
1288
|
async function prepareRun(flags, configPath) {
|
|
@@ -1562,13 +1291,13 @@ async function prepareRun(flags, configPath) {
|
|
|
1562
1291
|
ui: flags.ui,
|
|
1563
1292
|
logOrder: flags["log-order"],
|
|
1564
1293
|
logPrefix: flags["log-prefix"],
|
|
1565
|
-
outputLogs: flags["output-logs"]
|
|
1294
|
+
outputLogs: flags["output-logs"],
|
|
1295
|
+
verbose: verbosityOf(flags) > 0
|
|
1566
1296
|
},
|
|
1567
1297
|
env: process.env,
|
|
1568
|
-
isTTY: !!process.stdout.isTTY,
|
|
1298
|
+
isTTY: !!(flags.json && !flags["dry-run"] ? process.stderr : process.stdout).isTTY,
|
|
1569
1299
|
agent: detectAgent().name
|
|
1570
1300
|
});
|
|
1571
|
-
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.");
|
|
1572
1301
|
const path = requireConfig(configPath);
|
|
1573
1302
|
loadEnvFiles(path);
|
|
1574
1303
|
const named = flags.profile ?? (process.env.REEVAL_PROFILE || void 0);
|
|
@@ -1583,7 +1312,7 @@ async function prepareRun(flags, configPath) {
|
|
|
1583
1312
|
const concurrency = await resolveConcurrency(config, flags.concurrency, async () => {
|
|
1584
1313
|
const container = sandboxes.find((s) => s.kind === "docker");
|
|
1585
1314
|
if (!container) return hostCapacity();
|
|
1586
|
-
const { dockerCapacity } = await import("./src-
|
|
1315
|
+
const { dockerCapacity } = await import("./src-B9L9yGKI.js");
|
|
1587
1316
|
return await dockerCapacity(container.engine) ?? hostCapacity();
|
|
1588
1317
|
});
|
|
1589
1318
|
return {
|
|
@@ -1598,6 +1327,8 @@ async function prepareRun(flags, configPath) {
|
|
|
1598
1327
|
dryRun: !!flags["dry-run"],
|
|
1599
1328
|
json: !!flags.json,
|
|
1600
1329
|
force: !!flags.force,
|
|
1330
|
+
/** `--no-insights` turns them off for this run. */
|
|
1331
|
+
insights: !flags["no-insights"],
|
|
1601
1332
|
verbosity: verbosityOf(flags),
|
|
1602
1333
|
configFile: configLabel(path),
|
|
1603
1334
|
/** Named in the plan line when the project root isn't the current directory. */
|
|
@@ -1610,11 +1341,11 @@ async function prepareRun(flags, configPath) {
|
|
|
1610
1341
|
async function startRun({ config, profile, runs, tags, concurrency, verbosity, configFile, resume, dryRun }) {
|
|
1611
1342
|
const startedAt = /* @__PURE__ */ new Date();
|
|
1612
1343
|
const git = await gitInfo(config.root, [config.history.dir]);
|
|
1613
|
-
const { worktreePatch } = await import("./state-
|
|
1344
|
+
const { worktreePatch } = await import("./state-BQR_BCm4.js");
|
|
1614
1345
|
const patch = git?.dirty ? await worktreePatch(config.root, [config.history.dir]) : null;
|
|
1615
1346
|
const who = await author(config.root);
|
|
1616
|
-
const { stagingDir, sweepStaging } = await import("./results-
|
|
1617
|
-
const { scratchDir } = await import("./files-
|
|
1347
|
+
const { stagingDir, sweepStaging } = await import("./results-Drtt0uFl.js");
|
|
1348
|
+
const { scratchDir } = await import("./files-DqCBW7i8.js");
|
|
1618
1349
|
const scratch = scratchDir(config.root);
|
|
1619
1350
|
if (resume !== void 0) {
|
|
1620
1351
|
const target = await resolveResume(config.root, resume || void 0);
|
|
@@ -1625,7 +1356,7 @@ async function startRun({ config, profile, runs, tags, concurrency, verbosity, c
|
|
|
1625
1356
|
artifacts: target.previousArtifacts
|
|
1626
1357
|
} : await loadPrevious(stagingDir(config.root, target.runId));
|
|
1627
1358
|
if (!dryRun) try {
|
|
1628
|
-
const { removeRunContainers } = await import("./docker-
|
|
1359
|
+
const { removeRunContainers } = await import("./docker-DC69dKxB.js");
|
|
1629
1360
|
await removeRunContainers(target.runId, ["docker", "podman"]);
|
|
1630
1361
|
} catch {}
|
|
1631
1362
|
return {
|
|
@@ -1696,8 +1427,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1696
1427
|
configFile,
|
|
1697
1428
|
completed: []
|
|
1698
1429
|
}));
|
|
1699
|
-
const { runEngine } = await import("./node-
|
|
1700
|
-
const { buildPlan, checkAttemptBudget, planDocument, planLine, planTable } = await import("./plan-
|
|
1430
|
+
const { runEngine } = await import("./node-D0mtjRAO.js");
|
|
1431
|
+
const { buildPlan, checkAttemptBudget, planDocument, planInsights, planLine, planTable } = await import("./plan-OkwUcJQ9.js");
|
|
1701
1432
|
let plan;
|
|
1702
1433
|
let sandboxVersions = { images: [] };
|
|
1703
1434
|
let preflightStop;
|
|
@@ -1705,7 +1436,6 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1705
1436
|
let budgetTimer;
|
|
1706
1437
|
let toRun = [];
|
|
1707
1438
|
let live;
|
|
1708
|
-
let notes;
|
|
1709
1439
|
let questions;
|
|
1710
1440
|
const onPlan = async ({ planned, excluded, matched, unmatched }) => {
|
|
1711
1441
|
if (unmatched.length) throw unmatchedFilter(config, unmatched);
|
|
@@ -1724,7 +1454,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1724
1454
|
} : p);
|
|
1725
1455
|
toRun = skipped;
|
|
1726
1456
|
for (const p of skipped) for (const name of p.attempt.secretVars) registerSecret(process.env[name]);
|
|
1727
|
-
const models = skipped.some((p) => !p.attempt.plan.skip && p.attempt.plan.questions?.length) ? await import("./model-
|
|
1457
|
+
const models = skipped.some((p) => !p.attempt.plan.skip && p.attempt.plan.questions?.length) ? await import("./model-BGKYVpoj.js") : void 0;
|
|
1728
1458
|
plan = await buildPlan({
|
|
1729
1459
|
planned: skipped,
|
|
1730
1460
|
profile,
|
|
@@ -1732,7 +1462,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1732
1462
|
concurrency,
|
|
1733
1463
|
root: config.root,
|
|
1734
1464
|
historyDir: config.history.dir,
|
|
1735
|
-
questionModel: models?.questionModelLabel(config) ?? null
|
|
1465
|
+
questionModel: models?.questionModelLabel(config) ?? null,
|
|
1466
|
+
insights: await planInsights(config, setup.insights)
|
|
1736
1467
|
});
|
|
1737
1468
|
plan.runId = runId;
|
|
1738
1469
|
if (completed.size) plan.resume = {
|
|
@@ -1740,13 +1471,14 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1740
1471
|
completed: completed.size
|
|
1741
1472
|
};
|
|
1742
1473
|
run.completed = [...completed];
|
|
1743
|
-
const { imageStages, imageTargets } = await import("./images-
|
|
1474
|
+
const { imageStages, imageTargets } = await import("./images-BmJRuTpm.js");
|
|
1744
1475
|
const targets = imageTargets(skipped.filter((p) => !p.attempt.plan.skip).map((p) => ({
|
|
1745
1476
|
id: p.id,
|
|
1746
1477
|
harness: p.attempt.harness,
|
|
1747
|
-
sandbox: p.attempt.sandbox
|
|
1478
|
+
sandbox: p.attempt.sandbox,
|
|
1479
|
+
plugins: p.attempt.pluginBuilds ?? []
|
|
1748
1480
|
})));
|
|
1749
|
-
if (setup.json) {
|
|
1481
|
+
if (setup.json && setup.dryRun) {
|
|
1750
1482
|
const images = await Promise.all(targets.map(async (t) => ({
|
|
1751
1483
|
id: t.id,
|
|
1752
1484
|
harness: t.harness,
|
|
@@ -1761,8 +1493,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1761
1493
|
if (setup.dryRun) {
|
|
1762
1494
|
const todos = excluded.filter((e) => e.mode === "todo").map((e) => e.id);
|
|
1763
1495
|
lines.push(...planTable(plan, todos));
|
|
1764
|
-
const { imageStatusLines } = await import("./images-
|
|
1765
|
-
const { dockerAvailable, engineSpec } = await import("./src-
|
|
1496
|
+
const { imageStatusLines } = await import("./images-BmJRuTpm.js");
|
|
1497
|
+
const { dockerAvailable, engineSpec } = await import("./src-B9L9yGKI.js");
|
|
1766
1498
|
const engines = [...new Set(targets.map((t) => t.sandbox.engine ?? "docker"))];
|
|
1767
1499
|
const down = [];
|
|
1768
1500
|
for (const engine of engines) if (!await dockerAvailable(engine)) down.push(engine);
|
|
@@ -1772,6 +1504,10 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1772
1504
|
lines.push(`images not checked: ${names} ${down.length === 1 ? "is" : "are"} not running`);
|
|
1773
1505
|
}
|
|
1774
1506
|
}
|
|
1507
|
+
if (setup.dryRun && plan.insights) {
|
|
1508
|
+
const { formatTokens } = await import("./usage-BDo2q_yu.js");
|
|
1509
|
+
lines.push(`insights ${plan.insights.model} · up to ${formatTokens(plan.insights.maxTokens)} tokens`);
|
|
1510
|
+
}
|
|
1775
1511
|
lines.push(...plan.warnings.map((w) => `warning: ${w}`));
|
|
1776
1512
|
lines.push(...plan.hints.map((h) => `hint: ${h}`));
|
|
1777
1513
|
renderer.onEvent({
|
|
@@ -1782,8 +1518,6 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1782
1518
|
});
|
|
1783
1519
|
if (setup.dryRun) return false;
|
|
1784
1520
|
checkAttemptBudget(plan, setup.force, config.file);
|
|
1785
|
-
const analysis = config.analysis.agent ? await import("./model-NM3ID0uR.js") : null;
|
|
1786
|
-
analysis?.analysisModelName(config, "agent");
|
|
1787
1521
|
const questionModels = /* @__PURE__ */ new Set();
|
|
1788
1522
|
const asked = [];
|
|
1789
1523
|
for (const row of plan.rows) {
|
|
@@ -1813,24 +1547,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1813
1547
|
questionModels: [...questionModels]
|
|
1814
1548
|
});
|
|
1815
1549
|
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.`);
|
|
1816
|
-
if (analysis) {
|
|
1817
|
-
const { startNotes } = await import("./agent-CURAwx_q.js");
|
|
1818
|
-
notes = startNotes({
|
|
1819
|
-
config,
|
|
1820
|
-
model: analysis.resolveAnalysisModel(config, "agent"),
|
|
1821
|
-
runId,
|
|
1822
|
-
stagingDir,
|
|
1823
|
-
planned: skipped,
|
|
1824
|
-
warn: (text) => renderer.onEvent({
|
|
1825
|
-
type: "notice",
|
|
1826
|
-
at: Date.now(),
|
|
1827
|
-
level: "warn",
|
|
1828
|
-
text
|
|
1829
|
-
})
|
|
1830
|
-
});
|
|
1831
|
-
}
|
|
1832
1550
|
if (asked.length) {
|
|
1833
|
-
const { questionRunner } = await import("./questions-
|
|
1551
|
+
const { questionRunner } = await import("./questions-1XOulevV.js");
|
|
1834
1552
|
questions = questionRunner({
|
|
1835
1553
|
evals: asked,
|
|
1836
1554
|
stagingDir,
|
|
@@ -1847,7 +1565,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1847
1565
|
}
|
|
1848
1566
|
});
|
|
1849
1567
|
}
|
|
1850
|
-
const { prepareWorkspaces, workspaceKey } = await import("./workspace-
|
|
1568
|
+
const { prepareWorkspaces, workspaceKey } = await import("./workspace-B90YDU_a.js");
|
|
1851
1569
|
const live = skipped.filter((p) => !p.attempt.plan.skip);
|
|
1852
1570
|
const outcomes = await prepareWorkspaces(live.flatMap(({ attempt: a }) => a.workspace ? [{
|
|
1853
1571
|
workspace: a.workspace,
|
|
@@ -1877,6 +1595,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1877
1595
|
label: `workspace ${o.label}`,
|
|
1878
1596
|
sandbox: user.attempt.sandbox,
|
|
1879
1597
|
harness: user.attempt.harness,
|
|
1598
|
+
plugins: [],
|
|
1880
1599
|
setBy: o.setBy,
|
|
1881
1600
|
runWide: false
|
|
1882
1601
|
};
|
|
@@ -1896,6 +1615,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1896
1615
|
sandboxVersions = await preflight(skipped.filter((p) => !p.attempt.plan.skip).map((p) => ({
|
|
1897
1616
|
harness: p.attempt.harness,
|
|
1898
1617
|
sandbox: p.attempt.sandbox,
|
|
1618
|
+
plugins: p.attempt.pluginBuilds ?? [],
|
|
1899
1619
|
setBy: p.attempt.setBy
|
|
1900
1620
|
})), {
|
|
1901
1621
|
root: config.root,
|
|
@@ -1961,7 +1681,6 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1961
1681
|
}
|
|
1962
1682
|
if (e.type === "eval-end") {
|
|
1963
1683
|
live?.end(e.result);
|
|
1964
|
-
notes?.onResult(e.result);
|
|
1965
1684
|
questions?.onEvalEnd(e.result);
|
|
1966
1685
|
}
|
|
1967
1686
|
if (interrupted && e.type === "eval-end" && e.result.state === "skipped") return;
|
|
@@ -1969,6 +1688,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1969
1688
|
},
|
|
1970
1689
|
onCancellable: (cancel) => {
|
|
1971
1690
|
const onSignal = (signal) => {
|
|
1691
|
+
if (onInsightsSignal) return onInsightsSignal(signal === "SIGTERM" ? "SIGTERM" : "SIGINT");
|
|
1972
1692
|
stopCode = signal === "SIGTERM" ? EXIT.terminated : EXIT.interrupted;
|
|
1973
1693
|
if (interrupted) {
|
|
1974
1694
|
renderer.close();
|
|
@@ -1995,9 +1715,9 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1995
1715
|
throw error;
|
|
1996
1716
|
} finally {
|
|
1997
1717
|
clearTimeout(budgetTimer);
|
|
1998
|
-
const { removePrepared } = await import("./preflight-
|
|
1718
|
+
const { removePrepared } = await import("./preflight-B6pY89bF.js");
|
|
1999
1719
|
removePrepared(config.root, runId);
|
|
2000
|
-
const { removePreparedWorkspaces } = await import("./workspace-
|
|
1720
|
+
const { removePreparedWorkspaces } = await import("./workspace-B90YDU_a.js");
|
|
2001
1721
|
removePreparedWorkspaces(config.root, runId);
|
|
2002
1722
|
}
|
|
2003
1723
|
if (preflightStop) throw preflightStop;
|
|
@@ -2010,7 +1730,6 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
2010
1730
|
sandboxVersions,
|
|
2011
1731
|
budgetReached: () => reached,
|
|
2012
1732
|
live,
|
|
2013
|
-
notes,
|
|
2014
1733
|
questions
|
|
2015
1734
|
};
|
|
2016
1735
|
}
|
|
@@ -2080,4 +1799,4 @@ run(process.argv.slice(2)).finally(() => {
|
|
|
2080
1799
|
//#endregion
|
|
2081
1800
|
export {};
|
|
2082
1801
|
|
|
2083
|
-
//# sourceMappingURL=cli-
|
|
1802
|
+
//# sourceMappingURL=cli-B5zQCR2r.js.map
|