reeval 0.21.0 → 0.23.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/CHANGELOG.md +65 -0
- package/README.md +15 -15
- package/dist/{adapter-BdzhdRYo.js → adapter-Dlq3-4OS.js} +7 -50
- package/dist/adapter-Dlq3-4OS.js.map +1 -0
- package/dist/{agent-Dx-bDmlV.js → agent-OsAfayRf.js} +11 -12
- package/dist/agent-OsAfayRf.js.map +1 -0
- package/dist/{agents-l0-k7vw3.js → agents-BztvTkfM.js} +46 -37
- package/dist/agents-BztvTkfM.js.map +1 -0
- package/dist/{app-files-B-CQYB0c.js → app-files-6NHzghym.js} +3 -3
- package/dist/app-files-6NHzghym.js.map +1 -0
- package/dist/{assemble-CsZIcJo8.js → assemble-Doa1m-HW.js} +17 -15
- package/dist/{assemble-CsZIcJo8.js.map → assemble-Doa1m-HW.js.map} +1 -1
- package/dist/{assemble-CYMpN8LC.js → assemble-XrZskSNj.js} +1 -1
- package/dist/attach-BH2HdwH_.js +219 -0
- package/dist/attach-BH2HdwH_.js.map +1 -0
- package/dist/{attempt-CKfKsqqw.js → attempt-_dUsblVx.js} +2 -2
- package/dist/{attempt-CKfKsqqw.js.map → attempt-_dUsblVx.js.map} +1 -1
- package/dist/{attempt-host-BwSmNYkX.js → attempt-host-8mQV8Uee.js} +7 -7
- package/dist/{attempt-host-BwSmNYkX.js.map → attempt-host-8mQV8Uee.js.map} +1 -1
- package/dist/boat-DKRH0Gv7.js +1 -0
- package/dist/boat-DKjqo_ie.js +704 -0
- package/dist/boat-DKjqo_ie.js.map +1 -0
- package/dist/boat-images-CRN_U_eG.js +366 -0
- package/dist/boat-images-CRN_U_eG.js.map +1 -0
- package/dist/bundle-DU2aQVeq.js +780 -0
- package/dist/bundle-DU2aQVeq.js.map +1 -0
- package/dist/{capture-BqIAeFyC.js → capture-By1byHaX.js} +52 -27
- package/dist/capture-By1byHaX.js.map +1 -0
- package/dist/capture-BzjNv0qP.js +1 -0
- package/dist/{cli-s_3opn_I.js → cli-DMHOwdVr.js} +560 -1049
- package/dist/cli-DMHOwdVr.js.map +1 -0
- package/dist/{cli-spec-DxzIjmq_.js → cli-spec-D0wuUaj9.js} +179 -42
- package/dist/cli-spec-D0wuUaj9.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{client-C5fIzHQa.js → client-B41UK150.js} +8 -4
- package/dist/client-B41UK150.js.map +1 -0
- package/dist/{command-BJ7KqczP.js → command-8GIHYGZf.js} +9 -9
- package/dist/{command-BJ7KqczP.js.map → command-8GIHYGZf.js.map} +1 -1
- package/dist/{command-B5OAIjp7.js → command-CAmnWLFL.js} +14 -14
- package/dist/{command-B5OAIjp7.js.map → command-CAmnWLFL.js.map} +1 -1
- package/dist/{command-BXLZsEwQ.js → command-CXxckfsq.js} +13 -13
- package/dist/{command-BXLZsEwQ.js.map → command-CXxckfsq.js.map} +1 -1
- package/dist/{command-DA_SHQUQ.js → command-ao0NZ8h0.js} +16 -15
- package/dist/command-ao0NZ8h0.js.map +1 -0
- package/dist/{commands-BPvAOEmb.js → commands-B3lnIPj5.js} +1 -1
- package/dist/{commands-BKBamOcX.js → commands-ttChCsAy.js} +15 -15
- package/dist/{commands-BKBamOcX.js.map → commands-ttChCsAy.js.map} +1 -1
- package/dist/{config-C0URar0t.js → config-myJT1Qjc.js} +62 -37
- package/dist/config-myJT1Qjc.js.map +1 -0
- package/dist/{context-Sj58aJEu.js → context-DnzR9TNK.js} +2 -2
- package/dist/{context-Sj58aJEu.js.map → context-DnzR9TNK.js.map} +1 -1
- package/dist/cost-CdRX1s2p.js +1 -0
- package/dist/{cursor-catalog-FWgSo-T1.js → cursor-catalog-CUQrabJ_.js} +2 -2
- package/dist/{cursor-catalog-FWgSo-T1.js.map → cursor-catalog-CUQrabJ_.js.map} +1 -1
- package/dist/daytona-Dfhwtr9P.js +677 -0
- package/dist/daytona-Dfhwtr9P.js.map +1 -0
- package/dist/daytona-image-CnG6G00x.js +183 -0
- package/dist/daytona-image-CnG6G00x.js.map +1 -0
- package/dist/daytona-image-yJK3c4EV.js +1 -0
- package/dist/{db-BjAWxVAG.js → db-5H95sFii.js} +35 -9
- package/dist/{db-BjAWxVAG.js.map → db-5H95sFii.js.map} +1 -1
- package/dist/db-Bbg1n_2M.js +2 -0
- package/dist/{default-effort-CWlhZ6U1.js → default-effort-CtNY9CGW.js} +1 -1
- package/dist/{default-effort-Ck2GYIxX.js → default-effort-DYpCkJRk.js} +2 -2
- package/dist/{default-effort-Ck2GYIxX.js.map → default-effort-DYpCkJRk.js.map} +1 -1
- package/dist/{docker-D74l67k8.js → docker-CR0JZ1FE.js} +4 -4
- package/dist/{docker-D74l67k8.js.map → docker-CR0JZ1FE.js.map} +1 -1
- package/dist/docker-kpudeSxV.js +1 -0
- package/dist/{doctor-eFxyn6at.js → doctor-aE-RMbB_.js} +63 -76
- package/dist/doctor-aE-RMbB_.js.map +1 -0
- package/dist/{environment-CJIKz-Ud.js → environment-C8pUCD_A.js} +138 -53
- package/dist/environment-C8pUCD_A.js.map +1 -0
- package/dist/{errors-C1GBcWE2.js → errors-DPUoUTdK.js} +2 -2
- package/dist/{errors-C1GBcWE2.js.map → errors-DPUoUTdK.js.map} +1 -1
- package/dist/{eval-source-CXIRJ91v.js → eval-source-CaLIGH3U.js} +6 -6
- package/dist/{eval-source-CXIRJ91v.js.map → eval-source-CaLIGH3U.js.map} +1 -1
- package/dist/{evaluate-DA4QsrHO.js → evaluate-4kBVtwZZ.js} +250 -215
- package/dist/evaluate-4kBVtwZZ.js.map +1 -0
- package/dist/{evaluate-DHrU4Wld.d.ts → evaluate-DHaNtgVf.d.ts} +2 -2
- package/dist/events-CXxFvVMK.js +475 -0
- package/dist/events-CXxFvVMK.js.map +1 -0
- package/dist/{fake-bootstrap-CnwWG3kP.js → fake-bootstrap-CzxrCqO3.js} +2 -2
- package/dist/{fake-bootstrap-CnwWG3kP.js.map → fake-bootstrap-CzxrCqO3.js.map} +1 -1
- package/dist/files-BFnkOAhn.js +1 -0
- package/dist/files-BgQxoDlN.js +1 -0
- package/dist/{files-D6j-XpaK.js → files-BkvxIqfI.js} +4 -4
- package/dist/{files-D6j-XpaK.js.map → files-BkvxIqfI.js.map} +1 -1
- package/dist/{files-g1watgRC.js → files-CDfG8swM.js} +2 -2
- package/dist/{files-g1watgRC.js.map → files-CDfG8swM.js.map} +1 -1
- package/dist/files-CSe4VaMj.js +1 -0
- package/dist/{files-F44NRCN0.js → files-CX_mmvCc.js} +8 -8
- package/dist/{files-F44NRCN0.js.map → files-CX_mmvCc.js.map} +1 -1
- package/dist/{files-BrGVs4gY.js → files-Cs2dtb7-.js} +2 -2
- package/dist/{files-BrGVs4gY.js.map → files-Cs2dtb7-.js.map} +1 -1
- package/dist/{files-BaqXvB88.js → files-D6M7J3iX.js} +1 -1
- package/dist/{files-BVVWAS0A.js → files-DgHeTdCZ.js} +6 -6
- package/dist/{files-BVVWAS0A.js.map → files-DgHeTdCZ.js.map} +1 -1
- package/dist/{files-Bey1VAex.js → files-DpwJW3w6.js} +3 -3
- package/dist/{files-Bey1VAex.js.map → files-DpwJW3w6.js.map} +1 -1
- package/dist/gateway.d.ts +1 -1
- package/dist/{git-Jqkf9SBa.js → git-BnnNEXqh.js} +3 -3
- package/dist/{git-Jqkf9SBa.js.map → git-BnnNEXqh.js.map} +1 -1
- package/dist/harness-install-BfMBYDfP.js +53 -0
- package/dist/harness-install-BfMBYDfP.js.map +1 -0
- package/dist/harness.d.ts +1 -1
- package/dist/hosted-5Zz2peTR.js +260 -0
- package/dist/hosted-5Zz2peTR.js.map +1 -0
- package/dist/hosted-Co-waHe0.js +131 -0
- package/dist/hosted-Co-waHe0.js.map +1 -0
- package/dist/hosted-run-202QicZ-.js +1 -0
- package/dist/hosted-run-BfAPIMyT.js +230 -0
- package/dist/hosted-run-BfAPIMyT.js.map +1 -0
- package/dist/{ids-B-JKTCP8.js → ids-a6cr243_.js} +17 -12
- package/dist/ids-a6cr243_.js.map +1 -0
- package/dist/{images-Dsc4Wi-F.js → images-DtXwj2wL.js} +70 -55
- package/dist/images-DtXwj2wL.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/init-BiL6B3S4.js +1 -0
- package/dist/{init-QB5ecPDA.js → init-Ci_IAp8p.js} +5 -5
- package/dist/{init-QB5ecPDA.js.map → init-Ci_IAp8p.js.map} +1 -1
- package/dist/{ink-list-mCJypk3d.js → ink-list-Dnh6XD3C.js} +54 -15
- package/dist/ink-list-Dnh6XD3C.js.map +1 -0
- package/dist/inputs-load-DPUP_IFL.js +95 -0
- package/dist/inputs-load-DPUP_IFL.js.map +1 -0
- package/dist/inputs-load-M-BGe7gd.js +1 -0
- package/dist/inputs-z4JqnQ5g.js +190 -0
- package/dist/inputs-z4JqnQ5g.js.map +1 -0
- package/dist/internal/vm.d.ts +16 -0
- package/dist/internal/vm.js +22 -0
- package/dist/internal/vm.js.map +1 -0
- package/dist/{invocations-BSr4lRzI.js → invocations-C1gY3E0J.js} +4 -4
- package/dist/{invocations-BSr4lRzI.js.map → invocations-C1gY3E0J.js.map} +1 -1
- package/dist/jiti-ILwyxt93.js +54 -0
- package/dist/jiti-ILwyxt93.js.map +1 -0
- package/dist/{judge-eGH39PaP.js → judge-DwzqucLS.js} +9 -6
- package/dist/{judge-eGH39PaP.js.map → judge-DwzqucLS.js.map} +1 -1
- package/dist/judge.d.ts +1 -1
- package/dist/judge.js +1 -1
- package/dist/kinds-DEKXOWVJ.js +592 -0
- package/dist/kinds-DEKXOWVJ.js.map +1 -0
- package/dist/{layout-DfQa4mJs.js → layout-nCnU9Vu2.js} +2 -2
- package/dist/{layout-DfQa4mJs.js.map → layout-nCnU9Vu2.js.map} +1 -1
- package/dist/{list-Dh6T0kdr.js → list-MK4L8tfW.js} +14 -11
- package/dist/{list-Dh6T0kdr.js.map → list-MK4L8tfW.js.map} +1 -1
- package/dist/{live-y1p3oNXH.js → live-BkPNXVmN.js} +8 -8
- package/dist/{live-y1p3oNXH.js.map → live-BkPNXVmN.js.map} +1 -1
- package/dist/{live-xTZs0c61.js → live-Dlq-S2yy.js} +7 -5
- package/dist/live-Dlq-S2yy.js.map +1 -0
- package/dist/live-gZtkBwuo.js +1 -0
- package/dist/machine-service-Byl0BlcT.js +1 -0
- package/dist/machine-service-CZiXiVsS.js +709 -0
- package/dist/machine-service-CZiXiVsS.js.map +1 -0
- package/dist/machines-Ch5bhgvk.js +279 -0
- package/dist/machines-Ch5bhgvk.js.map +1 -0
- package/dist/model-C6aoJLg_.js +1 -0
- package/dist/{model-jRKSQBg6.js → model-CRh8aiYS.js} +6 -5
- package/dist/model-CRh8aiYS.js.map +1 -0
- package/dist/{model-3pZZzloU.js → model-DRa7yv6K.js} +6 -5
- package/dist/model-DRa7yv6K.js.map +1 -0
- package/dist/{model-DNpKiHqO.js → model-LoLnq9y1.js} +2 -2
- package/dist/{model-DNpKiHqO.js.map → model-LoLnq9y1.js.map} +1 -1
- package/dist/{model-DEjwetkJ.js → model-lLaUxxno.js} +1 -1
- package/dist/{node-DM-mLGdX.js → node-BQjSQw0d.js} +19 -8
- package/dist/node-BQjSQw0d.js.map +1 -0
- package/dist/{openrouter-models-C0aRo633.js → openrouter-models-B1sIOTD2.js} +2 -2
- package/dist/{openrouter-models-C0aRo633.js.map → openrouter-models-B1sIOTD2.js.map} +1 -1
- package/dist/options-I9I3FwMl.js +1 -0
- package/dist/own-reads-CYmBlrHK.js +15 -0
- package/dist/own-reads-CYmBlrHK.js.map +1 -0
- package/dist/{patch-Bx-qp8Li.js → patch-D8X6VB-e.js} +2 -2
- package/dist/{patch-Bx-qp8Li.js.map → patch-D8X6VB-e.js.map} +1 -1
- package/dist/{plan-ChO0A-xn.js → plan-DgIVIrXJ.js} +47 -9
- package/dist/plan-DgIVIrXJ.js.map +1 -0
- package/dist/{plugins-BioMWncI.js → plugins-DvEbow6a.js} +17 -637
- package/dist/plugins-DvEbow6a.js.map +1 -0
- package/dist/{preflight-CJSGzMzc.js → preflight-BKGbxN67.js} +9 -8
- package/dist/preflight-BKGbxN67.js.map +1 -0
- package/dist/{preflight-qFCXmxha.js → preflight-Qm4wE094.js} +9 -4
- package/dist/preflight-Qm4wE094.js.map +1 -0
- package/dist/preflight-dJqs5x3r.js +1 -0
- package/dist/preflight-fyV5nnea.js +1 -0
- package/dist/prepare-BAjRSoku.js +389 -0
- package/dist/prepare-BAjRSoku.js.map +1 -0
- package/dist/prepare-CRPPfRJf.js +2 -0
- package/dist/prices-C0gKS_8G.js +1 -0
- package/dist/{prices-BrY_ihLs.js → prices-DCokI_Ka.js} +3 -3
- package/dist/{prices-BrY_ihLs.js.map → prices-DCokI_Ka.js.map} +1 -1
- package/dist/{provenance-B-flBAzR.js → provenance-CSyRCc9B.js} +4 -4
- package/dist/{provenance-B-flBAzR.js.map → provenance-CSyRCc9B.js.map} +1 -1
- package/dist/{providers-B6StVyfG.js → providers-DkaEJvF5.js} +185 -35
- package/dist/providers-DkaEJvF5.js.map +1 -0
- package/dist/providers-DxZ26YoG.js +1 -0
- package/dist/{query-CkLmJv7R.js → query-BL66BOqL.js} +2 -2
- package/dist/{query-CkLmJv7R.js.map → query-BL66BOqL.js.map} +1 -1
- package/dist/query-C9OKU1Vz.js +1 -0
- package/dist/{questions-CJIh2FSX.js → questions-boVPzGoC.js} +7 -7
- package/dist/{questions-CJIh2FSX.js.map → questions-boVPzGoC.js.map} +1 -1
- package/dist/recipe-qyIpP96r.js +128 -0
- package/dist/recipe-qyIpP96r.js.map +1 -0
- package/dist/{record-nVVujCW7.js → record-D1_D1KFY.js} +12 -4
- package/dist/record-D1_D1KFY.js.map +1 -0
- package/dist/{redact-DL2BTykw.js → redact-t-L3VGy8.js} +91 -2
- package/dist/redact-t-L3VGy8.js.map +1 -0
- package/dist/{remarks-B3wjKscW.js → remarks-DEvk5f8v.js} +7 -7
- package/dist/{remarks-B3wjKscW.js.map → remarks-DEvk5f8v.js.map} +1 -1
- package/dist/{remote-C88amFRN.js → remote-CQoBRpOv.js} +5 -5
- package/dist/{remote-C88amFRN.js.map → remote-CQoBRpOv.js.map} +1 -1
- package/dist/resolve-BdpO8BN1.js +1 -0
- package/dist/{resolve-Bul8lHaa.js → resolve-Bfo8sjd-.js} +2 -2
- package/dist/{resolve-Bul8lHaa.js.map → resolve-Bfo8sjd-.js.map} +1 -1
- package/dist/{resolve-G576PiFJ.js → resolve-D2RqmybX.js} +9 -9
- package/dist/{resolve-G576PiFJ.js.map → resolve-D2RqmybX.js.map} +1 -1
- package/dist/resources-DqdwihhT.js +62 -0
- package/dist/resources-DqdwihhT.js.map +1 -0
- package/dist/{results-zVHIW6xw.js → results-BpxzyoMd.js} +5 -5
- package/dist/{results-zVHIW6xw.js.map → results-BpxzyoMd.js.map} +1 -1
- package/dist/{resume-D_PcUXfG.js → resume-2ekm_9OB.js} +78 -7
- package/dist/resume-2ekm_9OB.js.map +1 -0
- package/dist/{retry-BvTzCxdc.js → retry-CAhpW1hH.js} +4 -4
- package/dist/{retry-BvTzCxdc.js.map → retry-CAhpW1hH.js.map} +1 -1
- package/dist/{routes-B0F2R-K7.js → routes-Cp4gAjBZ.js} +118 -70
- package/dist/routes-Cp4gAjBZ.js.map +1 -0
- package/dist/{runtime-B3r_pAq6.js → runtime-C5fKSFCz.js} +46 -5
- package/dist/runtime-C5fKSFCz.js.map +1 -0
- package/dist/sandbox/boat.d.ts +11 -3
- package/dist/sandbox/boat.js +18 -4
- package/dist/sandbox/boat.js.map +1 -1
- package/dist/sandbox/daytona.d.ts +30 -0
- package/dist/sandbox/daytona.js +49 -0
- package/dist/sandbox/daytona.js.map +1 -0
- package/dist/{sandbox-Duh3z1TV.js → sandbox-t-Q-8lA_.js} +2 -2
- package/dist/{sandbox-Duh3z1TV.js.map → sandbox-t-Q-8lA_.js.map} +1 -1
- package/dist/sandbox.d.ts +1 -1
- package/dist/sandbox.js +1 -1
- package/dist/{server-DUWMRKik.js → server-BcLg9WzE.js} +10 -10
- package/dist/{server-DUWMRKik.js.map → server-BcLg9WzE.js.map} +1 -1
- package/dist/server-Buav2-CG.js +1 -0
- package/dist/services-BG8xuU82.js +39 -0
- package/dist/services-BG8xuU82.js.map +1 -0
- package/dist/{source-CHuN4Nfg.js → source-CrXM19HD.js} +2 -2
- package/dist/{source-CHuN4Nfg.js.map → source-CrXM19HD.js.map} +1 -1
- package/dist/source-dvxkqYvk.js +1 -0
- package/dist/src-5dCrqbFd.js +2 -0
- package/dist/{src-BI0v8qlZ.js → src-Bb3k9Kn_.js} +8 -5
- package/dist/{src-BI0v8qlZ.js.map → src-Bb3k9Kn_.js.map} +1 -1
- package/dist/{src-boB6D-5T.js → src-Bf5RZlPi.js} +2 -2
- package/dist/{src-boB6D-5T.js.map → src-Bf5RZlPi.js.map} +1 -1
- package/dist/{src-BqNzHHWn.js → src-C3OhA5pw.js} +2 -2
- package/dist/{src-BqNzHHWn.js.map → src-C3OhA5pw.js.map} +1 -1
- package/dist/{src-BHJ4MWvY.js → src-C5rrQlt8.js} +2199 -771
- package/dist/src-C5rrQlt8.js.map +1 -0
- package/dist/{src-CeBhwD8k.js → src-C6MsGyD6.js} +1 -1
- package/dist/{src-De0KY5S_.js → src-Cf4vRyea.js} +2 -2
- package/dist/src-DEbNp-rx.js +1 -0
- package/dist/{src-B-HuDqpH.js → src-DNWiU__5.js} +2 -2
- package/dist/{src-B-HuDqpH.js.map → src-DNWiU__5.js.map} +1 -1
- package/dist/src-DrLbG1HM.js +2 -0
- package/dist/{src--yl1OypK.js → src-Ds1pmXTg.js} +2 -2
- package/dist/{src-DA95rM6v.js → src-DwcCKsV0.js} +2 -2
- package/dist/{src-CmA5Yev6.js → src-DwcTn4JY.js} +2 -2
- package/dist/{src-CmA5Yev6.js.map → src-DwcTn4JY.js.map} +1 -1
- package/dist/{src-CZaYu6ER.js → src-VG2IRoT4.js} +1 -1
- package/dist/{src-DL-EE4DU.js → src-c3ZQu7Uu.js} +2 -2
- package/dist/{src-DL-EE4DU.js.map → src-c3ZQu7Uu.js.map} +1 -1
- package/dist/{src-CkEiiyON.js → src-io_SKoZ5.js} +2 -2
- package/dist/ssh-pool-BorCizYw.js +1 -0
- package/dist/ssh-pool-Dvfx5GuV.js +174 -0
- package/dist/ssh-pool-Dvfx5GuV.js.map +1 -0
- package/dist/start-COB07NpH.js +718 -0
- package/dist/start-COB07NpH.js.map +1 -0
- package/dist/{state-DUBRDyMk.js → state-B319V1p8.js} +16 -16
- package/dist/{state-DUBRDyMk.js.map → state-B319V1p8.js.map} +1 -1
- package/dist/state-C5oBvmoZ.js +1 -0
- package/dist/store/local.d.ts +1 -1
- package/dist/store/s3.d.ts +1 -1
- package/dist/suite-BwJGOhCZ.js +2 -0
- package/dist/{suite-B9J6Afg6.js → suite-D1tgXZxM.js} +2 -2
- package/dist/{suite-B9J6Afg6.js.map → suite-D1tgXZxM.js.map} +1 -1
- package/dist/{summary-CSp4cfnr.js → summary-ClLns_wv.js} +8 -5
- package/dist/summary-ClLns_wv.js.map +1 -0
- package/dist/{sync-CxAY6Dki.js → sync-mOG74RXH.js} +5 -5
- package/dist/{sync-CxAY6Dki.js.map → sync-mOG74RXH.js.map} +1 -1
- package/dist/{tart-CcrrtSrp.js → tart-DMppfbEm.js} +100 -295
- package/dist/tart-DMppfbEm.js.map +1 -0
- package/dist/{tart-bake-F-6seRC9.js → tart-bake-Cva_qdir.js} +18 -62
- package/dist/tart-bake-Cva_qdir.js.map +1 -0
- package/dist/{tart-bake-RK7RaT9E.js → tart-bake-DVIoXWr_.js} +1 -1
- package/dist/{tart-cli-ClvRniLQ.js → tart-cli-D88c5YYJ.js} +1 -1
- package/dist/{tart-cli-B86Jqo1t.js → tart-cli-LzDud2Z6.js} +2 -2
- package/dist/{tart-cli-B86Jqo1t.js.map → tart-cli-LzDud2Z6.js.map} +1 -1
- package/dist/{tart-hosts-Brii7zHM.js → tart-hosts-8N6Tt7Yb.js} +1 -1
- package/dist/{tart-hosts-DPyZsg-1.js → tart-hosts-CTRY5kQ2.js} +3 -3
- package/dist/{tart-hosts-DPyZsg-1.js.map → tart-hosts-CTRY5kQ2.js.map} +1 -1
- package/dist/{tart-images-CWSf03w8.js → tart-images-JfHirU8W.js} +2 -2
- package/dist/{tart-images-CWSf03w8.js.map → tart-images-JfHirU8W.js.map} +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +4 -4
- package/dist/{tool-class-CVDdJy0H.js → tool-class-CncfCw03.js} +2 -2
- package/dist/{tool-class-CVDdJy0H.js.map → tool-class-CncfCw03.js.map} +1 -1
- package/dist/{transcript-BP_2hji-.js → transcript-BXWZiMuC.js} +2 -2
- package/dist/{transcript-BP_2hji-.js.map → transcript-BXWZiMuC.js.map} +1 -1
- package/dist/{types-BJ0wh8wC.d.ts → types-BDo8ttQo.d.ts} +253 -5
- package/dist/types-CbcnJxCy.js.map +1 -1
- package/dist/ui-DUiVPbQ2.js +1024 -0
- package/dist/ui-DUiVPbQ2.js.map +1 -0
- package/dist/vercel-models-Ci33llXz.js +21 -0
- package/dist/vercel-models-Ci33llXz.js.map +1 -0
- package/dist/view/index.d.ts +6 -1
- package/dist/view/index.js +4 -4
- package/dist/views-B0qZR5Ef.js +2 -0
- package/dist/{views-DRxXCyIH.js → views-CiZGh3ws.js} +6 -6
- package/dist/{views-DRxXCyIH.js.map → views-CiZGh3ws.js.map} +1 -1
- package/dist/vm-container-BVn7pXfD.js +148 -0
- package/dist/vm-container-BVn7pXfD.js.map +1 -0
- package/dist/vm-images-CNk-Zl2a.js +375 -0
- package/dist/vm-images-CNk-Zl2a.js.map +1 -0
- package/dist/{worker-entry-C3Q4U63F.js → worker-entry-DmXQ2Znu.js} +31 -11
- package/dist/worker-entry-DmXQ2Znu.js.map +1 -0
- package/dist/workspace-CRgFdmgW.js +1 -0
- package/dist/{workspace-P72SXLXr.js → workspace-wwvwEHzP.js} +6 -6
- package/dist/{workspace-P72SXLXr.js.map → workspace-wwvwEHzP.js.map} +1 -1
- package/docker/Dockerfile +1 -1
- package/package.json +17 -2
- package/skills/reeval/references/environments.md +4 -3
- package/dist/adapter-BdzhdRYo.js.map +0 -1
- package/dist/agent-Dx-bDmlV.js.map +0 -1
- package/dist/agents-l0-k7vw3.js.map +0 -1
- package/dist/app-files-B-CQYB0c.js.map +0 -1
- package/dist/boat-CZpAreTB.js +0 -108
- package/dist/boat-CZpAreTB.js.map +0 -1
- package/dist/boat-su1Y7LPd.js +0 -325
- package/dist/boat-su1Y7LPd.js.map +0 -1
- package/dist/capture-BqIAeFyC.js.map +0 -1
- package/dist/capture-D0Ln5aCP.js +0 -1
- package/dist/cli-s_3opn_I.js.map +0 -1
- package/dist/cli-spec-DxzIjmq_.js.map +0 -1
- package/dist/client-C5fIzHQa.js.map +0 -1
- package/dist/command-DA_SHQUQ.js.map +0 -1
- package/dist/config-C0URar0t.js.map +0 -1
- package/dist/cost-IM80LyGD.js +0 -1
- package/dist/db-Bc4L-Wcr.js +0 -2
- package/dist/docker-CDdK6Ity.js +0 -271
- package/dist/docker-CDdK6Ity.js.map +0 -1
- package/dist/docker-DMug3l-a.js +0 -1
- package/dist/doctor-eFxyn6at.js.map +0 -1
- package/dist/environment-CJIKz-Ud.js.map +0 -1
- package/dist/evaluate-DA4QsrHO.js.map +0 -1
- package/dist/files-BjOJw4sn.js +0 -1
- package/dist/files-CNHhSyb3.js +0 -1
- package/dist/files-CW1lChNh.js +0 -1
- package/dist/ids-B-JKTCP8.js.map +0 -1
- package/dist/images-Dsc4Wi-F.js.map +0 -1
- package/dist/init-C0oUG3jh.js +0 -1
- package/dist/ink-list-mCJypk3d.js.map +0 -1
- package/dist/live-DwjWJTdn.js +0 -1
- package/dist/live-xTZs0c61.js.map +0 -1
- package/dist/model-3pZZzloU.js.map +0 -1
- package/dist/model-jRKSQBg6.js.map +0 -1
- package/dist/model-nfewGTzB.js +0 -1
- package/dist/node-DM-mLGdX.js.map +0 -1
- package/dist/options-DpsJ_5CU.js +0 -1
- package/dist/plan-ChO0A-xn.js.map +0 -1
- package/dist/plugins-BioMWncI.js.map +0 -1
- package/dist/preflight-BUjk_6wT.js +0 -1
- package/dist/preflight-CJSGzMzc.js.map +0 -1
- package/dist/preflight-DD3fI4Hz.js +0 -1
- package/dist/preflight-qFCXmxha.js.map +0 -1
- package/dist/prepare-D7oSSFNm.js +0 -268
- package/dist/prepare-D7oSSFNm.js.map +0 -1
- package/dist/prepare-xHU2BpN-.js +0 -2
- package/dist/prices-B1vm_lPk.js +0 -1
- package/dist/providers-B6StVyfG.js.map +0 -1
- package/dist/providers-Dljf6al6.js +0 -1
- package/dist/query-BAc2tQZj.js +0 -1
- package/dist/record-nVVujCW7.js.map +0 -1
- package/dist/redact-DL2BTykw.js.map +0 -1
- package/dist/resolve-DW92wpIZ.js +0 -1
- package/dist/resume-D_PcUXfG.js.map +0 -1
- package/dist/routes-B0F2R-K7.js.map +0 -1
- package/dist/runtime-B3r_pAq6.js.map +0 -1
- package/dist/server-CGEsvVRG.js +0 -1
- package/dist/source-Wz1Nrfue.js +0 -1
- package/dist/src-BHJ4MWvY.js.map +0 -1
- package/dist/src-BL-_0QoE.js +0 -1
- package/dist/src-C-mOSczH.js +0 -2
- package/dist/src-CwH_nEaw.js +0 -2
- package/dist/state-B3jex5KU.js +0 -1
- package/dist/suite-Bhs9-Z7O.js +0 -2
- package/dist/summary-CSp4cfnr.js.map +0 -1
- package/dist/tarball-CESxtK4X.js +0 -257
- package/dist/tarball-CESxtK4X.js.map +0 -1
- package/dist/tart-CcrrtSrp.js.map +0 -1
- package/dist/tart-bake-F-6seRC9.js.map +0 -1
- package/dist/views-i67V1ly3.js +0 -2
- package/dist/worker-entry-C3Q4U63F.js.map +0 -1
- package/dist/workspace-DhUOW8if.js +0 -1
|
@@ -0,0 +1,1024 @@
|
|
|
1
|
+
import { g as redactSecrets } from "./redact-t-L3VGy8.js";
|
|
2
|
+
import { a as plural, i as formatDuration } from "./text-B8-W3Cvn.js";
|
|
3
|
+
import "./config-myJT1Qjc.js";
|
|
4
|
+
import { u as suiteResult } from "./suite-D1tgXZxM.js";
|
|
5
|
+
import { n as stripAnsi, t as colors } from "./colors-DcXBvAlU.js";
|
|
6
|
+
import { _ as outcomeOf, b as tailLines, c as onHost, d as statusList, f as attemptAxes, g as offset, h as failureLines, i as listLines, l as pointerLine, m as errorCheck, n as SPINNER, p as debugLines, s as progressText, t as LiveList, v as phaseOf, y as progressLine } from "./list-MK4L8tfW.js";
|
|
7
|
+
import stringWidth from "string-width";
|
|
8
|
+
// src/ui/header.ts
|
|
9
|
+
/** ` ➜ `, ` ⚠ `: the glyph column every line of the block starts with. */
|
|
10
|
+
const GLYPH = 5;
|
|
11
|
+
/** `Est. Time: `, the longest key. */
|
|
12
|
+
const KEY = 11;
|
|
13
|
+
/** `Warning: `, the longer note label. */
|
|
14
|
+
const LABEL = 9;
|
|
15
|
+
/**
|
|
16
|
+
* `text` broken at spaces into lines of at most `width` columns, not counting color codes; a
|
|
17
|
+
* longer word keeps a line. A `·` stays with the word before it, so no line starts with one.
|
|
18
|
+
*/
|
|
19
|
+
function wrap(text, width) {
|
|
20
|
+
const words = [];
|
|
21
|
+
for (const word of text.split(/\s+/).filter(Boolean)) if (word === "·" && words.length) words[words.length - 1] += " ·";
|
|
22
|
+
else words.push(word);
|
|
23
|
+
const lines = [];
|
|
24
|
+
let line = "";
|
|
25
|
+
for (const word of words) if (line && stripAnsi(line).length + 1 + stripAnsi(word).length > width) {
|
|
26
|
+
lines.push(line);
|
|
27
|
+
line = word;
|
|
28
|
+
} else line = line ? `${line} ${word}` : word;
|
|
29
|
+
return line ? [...lines, line] : lines;
|
|
30
|
+
}
|
|
31
|
+
const indent = (n) => " ".repeat(n);
|
|
32
|
+
/** `REEVAL v0.16.1`, then the run's facts, one `➜ Key: value` line each. */
|
|
33
|
+
function headerLines(c, h, width) {
|
|
34
|
+
const name = `REEVAL v${h.version}`;
|
|
35
|
+
const title = c.bold(c.depth === 4 ? name : c.teal(name));
|
|
36
|
+
const valueWidth = width - GLYPH - KEY;
|
|
37
|
+
const row = (key, value) => {
|
|
38
|
+
const values = typeof value === "string" ? [value] : value;
|
|
39
|
+
const joined = values.join(", ");
|
|
40
|
+
return (values.length > 1 && stripAnsi(joined).length > valueWidth ? values : wrap(joined, valueWidth)).map((v, i) => i === 0 ? ` ${c.teal("➜")} ${c.dim(`${key}:`)}${indent(KEY - key.length - 1)}${v}` : `${indent(16)}${v}`);
|
|
41
|
+
};
|
|
42
|
+
const many = (one, n, many = `${one}s`) => n === 1 ? one : many;
|
|
43
|
+
const continued = [h.resumed ? `${plural(h.resumed, "attempt")} done` : "", h.retried ? `${plural(h.retried, "error")} to retry` : ""].filter(Boolean);
|
|
44
|
+
const resumed = continued.length ? c.dim(` (resumed, ${continued.join(", ")})`) : "";
|
|
45
|
+
const reason = h.profile && h.profile.reason !== "--profile" ? c.dim(` (${h.profile.reason})`) : "";
|
|
46
|
+
return [
|
|
47
|
+
h.dryRun ? `${title} ${c.dim("dry run")}` : title,
|
|
48
|
+
"",
|
|
49
|
+
...row("Run", `${h.runId}${resumed}`),
|
|
50
|
+
...h.config ? row("Config", h.config) : [],
|
|
51
|
+
...h.profile ? row("Profile", `${h.profile.name}${reason}`) : [],
|
|
52
|
+
...row(many("Harness", h.harnesses.length, "Harnesses"), h.harnesses.map((id) => harness(c, h, id))),
|
|
53
|
+
...row(many("Sandbox", h.sandboxes.length, "Sandboxes"), h.sandboxes),
|
|
54
|
+
...h.judges.length ? row(many("Judge", h.judges.length), h.judges) : [],
|
|
55
|
+
...row("Scope", scope(c, h)),
|
|
56
|
+
...row("Est. Time", estimate(c, h)),
|
|
57
|
+
...h.record && !h.dryRun ? row("Record", h.record) : []
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
/** A harness id, with the effort it runs at when the id doesn't name it. */
|
|
61
|
+
function harness(c, h, id) {
|
|
62
|
+
const effort = h.efforts?.[id];
|
|
63
|
+
if (effort === void 0 || id.includes("[effort=")) return id;
|
|
64
|
+
return `${id} ${`(effort: ${effort})`.split(" ").map((w) => c.dim(w)).join(" ")}`;
|
|
65
|
+
}
|
|
66
|
+
function scope(c, h) {
|
|
67
|
+
const attempts = h.fewest < h.attempts ? `${h.fewest}–${h.attempts} attempts` : plural(h.attempts, "attempt");
|
|
68
|
+
const parts = [
|
|
69
|
+
plural(h.files, "eval file"),
|
|
70
|
+
plural(h.evals, "eval") + (h.skipped ? ` (${h.skipped} skipped)` : ""),
|
|
71
|
+
plural(h.cells, "cell"),
|
|
72
|
+
attempts
|
|
73
|
+
];
|
|
74
|
+
const caps = [h.budget.attempts !== void 0 ? `${h.budget.attempts} ${h.attempts <= h.budget.attempts ? c.green("✓") : c.red("✗")}` : "", h.budget.duration ?? ""].filter(Boolean);
|
|
75
|
+
return `${parts.join(" · ")}${caps.length ? ` (budget: ${caps.join(", ")})` : ""}`;
|
|
76
|
+
}
|
|
77
|
+
function estimate(c, h) {
|
|
78
|
+
const serial = `~${formatDuration(h.estimateMs)} ${c.dim("(serial)")}`;
|
|
79
|
+
const most = Math.min(h.concurrency, h.attempts);
|
|
80
|
+
const parallel = h.parallel ?? most;
|
|
81
|
+
if (parallel <= 1) return serial;
|
|
82
|
+
const capped = parallel < most ? `, ${parallel} at once` : "";
|
|
83
|
+
return `${`~${formatDuration(h.estimateMs / parallel)} ${c.dim(`(concurrency: ${h.concurrency}${capped})`)}`} · ${serial}`;
|
|
84
|
+
}
|
|
85
|
+
/** `⚠ Warning: …` or `ℹ Hint: …`, wrapped under its first word. */
|
|
86
|
+
function noteLines(c, kind, text, width) {
|
|
87
|
+
const [glyph, label, paint] = kind === "hint" ? [
|
|
88
|
+
"ℹ",
|
|
89
|
+
"Hint:",
|
|
90
|
+
c.blue
|
|
91
|
+
] : [
|
|
92
|
+
"⚠",
|
|
93
|
+
"Warning:",
|
|
94
|
+
kind === "root" ? c.red : c.orange
|
|
95
|
+
];
|
|
96
|
+
const basic = {
|
|
97
|
+
warning: c.yellow,
|
|
98
|
+
hint: c.teal,
|
|
99
|
+
root: c.red
|
|
100
|
+
}[kind];
|
|
101
|
+
const lead = c.depth === 4 && kind !== "root" ? `${basic(glyph)} ${c.bold(label)}` : c.bold(paint(`${glyph} ${label}`));
|
|
102
|
+
const at = 14;
|
|
103
|
+
return wrap(text, Math.max(20, width - at)).map((line, i) => i === 0 ? ` ${lead}${indent(LABEL - label.length)}${line}` : `${indent(at)}${line}`);
|
|
104
|
+
}
|
|
105
|
+
/** A step line, `◆ Preparing 1 sandbox (docker)...`, its text wrapped under itself. */
|
|
106
|
+
function stepLines(glyph, text, width) {
|
|
107
|
+
return wrap(text, Math.max(20, width - GLYPH)).map((line, i) => i === 0 ? ` ${glyph} ${line}` : `${indent(GLYPH)}${line}`);
|
|
108
|
+
}
|
|
109
|
+
/** A run-level notice (a prepared workspace, the Ctrl-C one) as a step line. */
|
|
110
|
+
function noticeLines(c, e, width) {
|
|
111
|
+
const glyph = {
|
|
112
|
+
info: c.dim("ℹ"),
|
|
113
|
+
warn: c.orange("⚠"),
|
|
114
|
+
error: c.red("✗")
|
|
115
|
+
}[e.level];
|
|
116
|
+
const lines = stepLines(glyph, e.text, width);
|
|
117
|
+
return e.level === "info" ? lines.map((l) => c.dim(l)) : lines;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Preflight's lines: which sandboxes it prepares, each machine image it builds, each one ready,
|
|
121
|
+
* each failure, and once every sandbox has settled, how their machine images stood. One per run.
|
|
122
|
+
*/
|
|
123
|
+
var PrepareLines = class {
|
|
124
|
+
#pending = /* @__PURE__ */ new Set();
|
|
125
|
+
#images = /* @__PURE__ */ new Map();
|
|
126
|
+
#ready = 0;
|
|
127
|
+
#failed = 0;
|
|
128
|
+
#builds = [];
|
|
129
|
+
lines(c, e, width, max) {
|
|
130
|
+
if (e.state === "start") {
|
|
131
|
+
for (const t of e.targets) this.#pending.add(targetKey(t));
|
|
132
|
+
const n = e.targets.length;
|
|
133
|
+
const names = e.targets.map((t) => t.label).join(", ");
|
|
134
|
+
return stepLines(c.teal("◆"), `Preparing ${plural(n, "sandbox", "sandboxes")} (${names})...`, width);
|
|
135
|
+
}
|
|
136
|
+
if (e.state === "image") {
|
|
137
|
+
this.#images.set(targetKey(e.target), e.image);
|
|
138
|
+
return e.image.cached ? [] : [` ${c.teal("◌")} ${e.target.label} ${c.dim(`building image ${e.image.name}...`)}`];
|
|
139
|
+
}
|
|
140
|
+
const { outcome } = e;
|
|
141
|
+
this.#pending.delete(targetKey(outcome.target));
|
|
142
|
+
const image = this.#images.get(targetKey(outcome.target));
|
|
143
|
+
if (image) {
|
|
144
|
+
if (!outcome.ok) this.#failed++;
|
|
145
|
+
else {
|
|
146
|
+
this.#ready++;
|
|
147
|
+
if (!image.cached) this.#builds.push(outcome.ms);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const lines = outcome.ok ? [` ${c.green("✓")} ${outcome.target.label} ready${image ? c.dim(`, ${image.cached ? "from saved" : "built"} image ${image.name}`) : ""}${outcome.ms >= 1e3 ? ` ${c.dim(formatDuration(outcome.ms))}` : ""}`] : [` ${c.red("✗")} ${outcome.target.label} failed to prepare ${c.dim(`(set by ${outcome.target.setBy.join(", ")}; only its attempts fail)`)}`, ...tailLines(outcome.failure.message, max).map((l) => `${indent(GLYPH)}${c.orange(l)}`)];
|
|
151
|
+
if (this.#pending.size === 0 && this.#images.size) lines.push(this.#summary(c));
|
|
152
|
+
return lines;
|
|
153
|
+
}
|
|
154
|
+
/** `images: 3 ready (1 built in 1m48s)`. */
|
|
155
|
+
#summary(c) {
|
|
156
|
+
const built = this.#builds.length;
|
|
157
|
+
const longest = Math.max(0, ...this.#builds);
|
|
158
|
+
const parts = [`${this.#ready} ready${built ? ` (${built} built in ${formatDuration(longest)})` : ""}`, ...this.#failed ? [`${this.#failed} failed`] : []];
|
|
159
|
+
return ` ${c.dim(`images: ${parts.join(", ")}`)}`;
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
const targetKey = (t) => `${t.kind}\0${t.key}`;
|
|
163
|
+
/** The start line's text: how the attempts' logs will print. */
|
|
164
|
+
function startText(output) {
|
|
165
|
+
return output.outputLogs === "none" ? "Running..." : output.outputLogs === "errors-only" ? "Running; logs print for failed attempts only..." : output.logOrder === "stream" ? "Streaming logs..." : "Running; each attempt's logs print as it ends...";
|
|
166
|
+
}
|
|
167
|
+
/** The last line before the attempts' own: how their logs will print. */
|
|
168
|
+
function startLine(c, output) {
|
|
169
|
+
return ` ${c.teal("◆")} ${startText(output)}`;
|
|
170
|
+
}
|
|
171
|
+
/** What the start line's text becomes once the run ends, on a terminal that redraws it. */
|
|
172
|
+
function endText(status) {
|
|
173
|
+
return status === "interrupted" ? "Canceled." : status === "budget" ? "Stopped at the budget." : "Finished.";
|
|
174
|
+
}
|
|
175
|
+
/** The plan as the header block: its facts, `--dry-run`'s table, then each kind of note. */
|
|
176
|
+
function planLines(c, e, width) {
|
|
177
|
+
const sections = [
|
|
178
|
+
e.details,
|
|
179
|
+
[...e.warnings.flatMap((w) => noteLines(c, "warning", w, width)), ...(e.sandboxWarnings ?? []).flatMap((w) => noteLines(c, w.kind === "root" ? "root" : "warning", w.message, width))],
|
|
180
|
+
e.hints.flatMap((h) => noteLines(c, "hint", h, width))
|
|
181
|
+
];
|
|
182
|
+
const out = headerLines(c, e.header, width);
|
|
183
|
+
for (const lines of sections) if (lines.length) out.push("", ...lines);
|
|
184
|
+
out.push("");
|
|
185
|
+
return out;
|
|
186
|
+
}
|
|
187
|
+
// src/ui/tags.ts
|
|
188
|
+
const STOPWORDS = new Set("a an the and or of to in on for with without from by at as is are be it its that this when than then into via not no".split(" "));
|
|
189
|
+
const MAX_WORDS = 3;
|
|
190
|
+
const MAX_LENGTH = 24;
|
|
191
|
+
const words = (name) => name.toLowerCase().split(/[^\p{L}\p{N}]+/u).filter((w) => w && !STOPWORDS.has(w));
|
|
192
|
+
/**
|
|
193
|
+
* Short handles for the evals of one file, e.g. `greet`: the first distinctive words of each
|
|
194
|
+
* name, where words shared by most of the file's evals ("recommends Genkit over …") don't
|
|
195
|
+
* count. Depends only on the file's evals, so a tag stays the same across runs and filters.
|
|
196
|
+
*/
|
|
197
|
+
function fileTags(evals, taken) {
|
|
198
|
+
const lists = evals.map((e) => words(e.name));
|
|
199
|
+
const df = /* @__PURE__ */ new Map();
|
|
200
|
+
for (const list of lists) for (const w of new Set(list)) df.set(w, (df.get(w) ?? 0) + 1);
|
|
201
|
+
const common = (w) => evals.length > 1 && (df.get(w) ?? 0) > evals.length / 2;
|
|
202
|
+
const candidates = lists.map((list) => {
|
|
203
|
+
const rare = list.filter((w) => !common(w));
|
|
204
|
+
return rare.length ? rare : list.length ? list : ["eval"];
|
|
205
|
+
});
|
|
206
|
+
const tags = /* @__PURE__ */ new Map();
|
|
207
|
+
const clip = (tag) => tag.slice(0, MAX_LENGTH).replace(/-+$/, "");
|
|
208
|
+
const prefix = (list, n) => clip(list.slice(0, n).join("-"));
|
|
209
|
+
evals.forEach((e, i) => {
|
|
210
|
+
const own = candidates[i] ?? ["eval"];
|
|
211
|
+
let tag = prefix(own, 1);
|
|
212
|
+
for (let n = 1; n <= MAX_WORDS; n++) {
|
|
213
|
+
tag = prefix(own, n);
|
|
214
|
+
if (!candidates.some((other, j) => j !== i && prefix(other, n) === tag) && !taken.has(tag)) break;
|
|
215
|
+
}
|
|
216
|
+
let unique = tag;
|
|
217
|
+
for (let k = 2; taken.has(unique); k++) unique = `${tag}-${k}`;
|
|
218
|
+
taken.add(unique);
|
|
219
|
+
tags.set(e.id, unique);
|
|
220
|
+
});
|
|
221
|
+
return tags;
|
|
222
|
+
}
|
|
223
|
+
/** Tags evals as their files are collected; later files never rename earlier tags. */
|
|
224
|
+
var Tagger = class {
|
|
225
|
+
#tags = /* @__PURE__ */ new Map();
|
|
226
|
+
#taken = /* @__PURE__ */ new Set();
|
|
227
|
+
addFile(attempts) {
|
|
228
|
+
const fresh = [...new Map(attempts.map((a) => [a.id, a])).values()].filter((e) => !this.#tags.has(e.id));
|
|
229
|
+
for (const [id, tag] of fileTags(fresh, this.#taken)) this.#tags.set(id, tag);
|
|
230
|
+
}
|
|
231
|
+
/** `greet#1`: the eval's tag and run number. */
|
|
232
|
+
label(id, attempt) {
|
|
233
|
+
let tag = this.#tags.get(id);
|
|
234
|
+
if (!tag) {
|
|
235
|
+
this.addFile([{
|
|
236
|
+
id,
|
|
237
|
+
name: id.split(" › ").at(-1) ?? id
|
|
238
|
+
}]);
|
|
239
|
+
tag = this.#tags.get(id) ?? "eval";
|
|
240
|
+
}
|
|
241
|
+
return `${tag}#${attempt}`;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
// src/ui/agent.ts
|
|
245
|
+
const MAX_LINES = 12;
|
|
246
|
+
/** Agents read whole lines, so the header's notes don't wrap. */
|
|
247
|
+
const WIDTH = Number.POSITIVE_INFINITY;
|
|
248
|
+
var AgentRenderer = class {
|
|
249
|
+
#prepare = new PrepareLines();
|
|
250
|
+
#o;
|
|
251
|
+
#c = colors(false);
|
|
252
|
+
/** `[key]` prefixes for `-v` lines, from each attempt's start. */
|
|
253
|
+
#labels = /* @__PURE__ */ new Map();
|
|
254
|
+
#tags = new Tagger();
|
|
255
|
+
constructor(options) {
|
|
256
|
+
this.#o = options;
|
|
257
|
+
}
|
|
258
|
+
#write(text) {
|
|
259
|
+
this.#o.out.write(`${text.trimEnd()}\n`);
|
|
260
|
+
}
|
|
261
|
+
onEvent(e) {
|
|
262
|
+
switch (e.type) {
|
|
263
|
+
case "plan":
|
|
264
|
+
for (const line of planLines(this.#c, e, WIDTH)) this.#write(line);
|
|
265
|
+
return;
|
|
266
|
+
case "run-start":
|
|
267
|
+
this.#write(startLine(this.#c, {
|
|
268
|
+
...this.#o.output,
|
|
269
|
+
outputLogs: "none"
|
|
270
|
+
}));
|
|
271
|
+
return;
|
|
272
|
+
case "collected":
|
|
273
|
+
this.#tags.addFile(e.evals);
|
|
274
|
+
return;
|
|
275
|
+
case "eval-start": {
|
|
276
|
+
const tag = this.#tags.label(e.id, e.attempt?.n ?? 1);
|
|
277
|
+
this.#labels.set(e.key, `[${tag} ${attemptAxes(e.attempt, "agent")}]`);
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
case "debug": {
|
|
281
|
+
const label = this.#labels.get(e.key) ?? `[${e.key}]`;
|
|
282
|
+
for (const line of debugLines(this.#c, e.line, this.#o.verbosity === 2)) this.#write(`${label} ${line}`);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
case "eval-progress": {
|
|
286
|
+
if (e.progress.kind !== "browser-download" && e.progress.kind !== "warning") return;
|
|
287
|
+
const label = this.#labels.get(e.key) ?? `[${e.key}]`;
|
|
288
|
+
this.#write(`${label} ${progressLine(this.#c, e.progress)}`);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
case "prepare":
|
|
292
|
+
for (const line of this.#prepare.lines(this.#c, e, WIDTH, MAX_LINES)) this.#write(line);
|
|
293
|
+
return;
|
|
294
|
+
case "notice":
|
|
295
|
+
for (const line of noticeLines(this.#c, e, WIDTH)) this.#write(line);
|
|
296
|
+
return;
|
|
297
|
+
case "run-end": {
|
|
298
|
+
this.#write("");
|
|
299
|
+
const verbose = (this.#o.verbosity ?? 0) > 0;
|
|
300
|
+
const list = statusList({
|
|
301
|
+
record: e.record,
|
|
302
|
+
suite: suiteResult(e.record),
|
|
303
|
+
remarks: e.remarks ?? null,
|
|
304
|
+
verbose,
|
|
305
|
+
...e.notRun ? { notRun: e.notRun } : {}
|
|
306
|
+
});
|
|
307
|
+
const pointer = pointerLine(e.summaryPath);
|
|
308
|
+
for (const line of listLines(list, this.#c, false, pointer, verbose, true)) this.#write(line);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
default: return;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
close() {}
|
|
315
|
+
};
|
|
316
|
+
// src/ui/plain.ts
|
|
317
|
+
/** In a grouped block, an end line replaces its start line and keeps its start time. */
|
|
318
|
+
const STARTS = {
|
|
319
|
+
"sandbox-ready": "sandbox",
|
|
320
|
+
"turn-end": "turn-start",
|
|
321
|
+
"check-end": "check-start",
|
|
322
|
+
"judge-end": "judge-start",
|
|
323
|
+
"browser-download": "browser-download"
|
|
324
|
+
};
|
|
325
|
+
const ERROR_LINES = 12;
|
|
326
|
+
/** Back to the start of the line and clear it, for the live status line. */
|
|
327
|
+
const CLEAR = "\r\x1B[2K";
|
|
328
|
+
/** GitHub Actions workflow-command escaping. */
|
|
329
|
+
const ghEscape = (s, property = false) => {
|
|
330
|
+
const out = s.replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A");
|
|
331
|
+
return property ? out.replace(/:/g, "%3A").replace(/,/g, "%2C") : out;
|
|
332
|
+
};
|
|
333
|
+
/** The eval file's line in Vitest's formatted error (`❯ evals/a.eval.ts:7:33`), if any. */
|
|
334
|
+
function locate(result) {
|
|
335
|
+
const text = stripAnsi(result.formattedErrors[0] ?? "");
|
|
336
|
+
const file = result.file.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
337
|
+
const match = new RegExp(`❯ ${file}:(\\d+):(\\d+)`).exec(text);
|
|
338
|
+
return match?.[1] && match[2] ? {
|
|
339
|
+
line: match[1],
|
|
340
|
+
col: match[2]
|
|
341
|
+
} : void 0;
|
|
342
|
+
}
|
|
343
|
+
/** `evals/a.eval.ts:7` as its file and line. */
|
|
344
|
+
const splitAt = (at) => {
|
|
345
|
+
const i = at.lastIndexOf(":");
|
|
346
|
+
return [at.slice(0, i), at.slice(i + 1)];
|
|
347
|
+
};
|
|
348
|
+
var PlainRenderer = class {
|
|
349
|
+
#prepare = new PrepareLines();
|
|
350
|
+
#o;
|
|
351
|
+
#c;
|
|
352
|
+
#tags = new Tagger();
|
|
353
|
+
#running = /* @__PURE__ */ new Map();
|
|
354
|
+
#now;
|
|
355
|
+
#queued = /* @__PURE__ */ new Set();
|
|
356
|
+
#runStartedAt = 0;
|
|
357
|
+
#lastWrite = 0;
|
|
358
|
+
/** The last line written was blank, so the list needs no gap above it. */
|
|
359
|
+
#blank = false;
|
|
360
|
+
#timer;
|
|
361
|
+
/** On a TTY: the status line is drawn under everything else, and redrawn after each write. */
|
|
362
|
+
#live;
|
|
363
|
+
#status = "";
|
|
364
|
+
/** Tries collected (not skipped), as many as the plan has, and the tries that ended. */
|
|
365
|
+
#tries = /* @__PURE__ */ new Set();
|
|
366
|
+
#plannedTries = 0;
|
|
367
|
+
#ended = /* @__PURE__ */ new Set();
|
|
368
|
+
#list;
|
|
369
|
+
#lastProgress = 0;
|
|
370
|
+
constructor(options) {
|
|
371
|
+
this.#o = options;
|
|
372
|
+
this.#list = new LiveList(options.harness);
|
|
373
|
+
this.#c = options.colors;
|
|
374
|
+
this.#now = options.now ?? Date.now;
|
|
375
|
+
this.#live = options.output.statusLine;
|
|
376
|
+
const { heartbeatMs } = options.output;
|
|
377
|
+
if (options.timers !== false && heartbeatMs > 0) {
|
|
378
|
+
this.#timer = setInterval(() => this.tick(), Math.min(heartbeatMs, 5e3));
|
|
379
|
+
this.#timer.unref();
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
#write(text) {
|
|
383
|
+
const line = `${text.trimEnd()}\n`;
|
|
384
|
+
this.#o.out.write(this.#status ? `${CLEAR}${line}${this.#status}` : line);
|
|
385
|
+
this.#lastWrite = this.#now();
|
|
386
|
+
this.#blank = line === "\n";
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* `7 evals · 12/28 tries`: what the plan runs (or what's collected, when that's more) and how
|
|
390
|
+
* many tries ended.
|
|
391
|
+
*/
|
|
392
|
+
#drawStatus() {
|
|
393
|
+
if (!this.#live || !this.#tries.size) return;
|
|
394
|
+
const { total } = this.#list.counts();
|
|
395
|
+
const tries = Math.max(this.#plannedTries, this.#tries.size);
|
|
396
|
+
const status = this.#c.dim(`${plural(total, "eval")} · ${this.#ended.size}/${tries} tries`);
|
|
397
|
+
if (status === this.#status) return;
|
|
398
|
+
this.#o.out.write(`${CLEAR}${status}`);
|
|
399
|
+
this.#status = status;
|
|
400
|
+
}
|
|
401
|
+
#clearStatus() {
|
|
402
|
+
if (!this.#status) return;
|
|
403
|
+
this.#o.out.write(CLEAR);
|
|
404
|
+
this.#status = "";
|
|
405
|
+
}
|
|
406
|
+
#attempt(ref, startedAt) {
|
|
407
|
+
const n = ref.attempt?.n ?? 1;
|
|
408
|
+
const label = `[${this.#tags.label(ref.id, n)} ${attemptAxes(ref.attempt, this.#o.harness)}]`;
|
|
409
|
+
const ungated = ref.attempt?.gate === "none";
|
|
410
|
+
return {
|
|
411
|
+
key: ref.key,
|
|
412
|
+
id: ref.id,
|
|
413
|
+
label,
|
|
414
|
+
startedAt,
|
|
415
|
+
lines: [],
|
|
416
|
+
last: void 0,
|
|
417
|
+
ungated
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
#prefix(a) {
|
|
421
|
+
return this.#c.tag(a.label)(a.label);
|
|
422
|
+
}
|
|
423
|
+
#detail(a, line, prefixed) {
|
|
424
|
+
const body = line.debug ? ` ${line.text}` : ` ${this.#c.dim(offset(line.at - a.startedAt))} ${line.text}`;
|
|
425
|
+
return prefixed ? `${this.#prefix(a)}${body}` : body.slice(1);
|
|
426
|
+
}
|
|
427
|
+
get #streaming() {
|
|
428
|
+
return this.#o.output.logOrder === "stream" && this.#o.output.outputLogs === "full";
|
|
429
|
+
}
|
|
430
|
+
#add(a, line) {
|
|
431
|
+
if (line.kind === "warning" && !this.#streaming) {
|
|
432
|
+
this.#write(this.#detail(a, line, true));
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
a.lines.push(line);
|
|
436
|
+
if (this.#streaming) this.#write(this.#detail(a, line, true));
|
|
437
|
+
}
|
|
438
|
+
onEvent(e) {
|
|
439
|
+
const c = this.#c;
|
|
440
|
+
switch (e.type) {
|
|
441
|
+
case "run-start":
|
|
442
|
+
this.#runStartedAt = e.at;
|
|
443
|
+
this.#write(startLine(c, this.#o.output));
|
|
444
|
+
this.#write("");
|
|
445
|
+
return;
|
|
446
|
+
case "plan":
|
|
447
|
+
this.#list.planned(e.header.evals);
|
|
448
|
+
this.#plannedTries = e.header.attempts;
|
|
449
|
+
for (const line of planLines(c, e, this.#columns)) this.#write(line);
|
|
450
|
+
if (this.#o.output.githubActions) for (const w of e.sandboxWarnings ?? []) this.#annotate(w);
|
|
451
|
+
return;
|
|
452
|
+
case "collected":
|
|
453
|
+
this.#list.collected(e.file, e.evals);
|
|
454
|
+
this.#tags.addFile(e.evals);
|
|
455
|
+
for (const x of e.evals) {
|
|
456
|
+
if (x.skipped) continue;
|
|
457
|
+
this.#queued.add(x.key);
|
|
458
|
+
this.#tries.add(x.key);
|
|
459
|
+
}
|
|
460
|
+
this.#drawStatus();
|
|
461
|
+
return;
|
|
462
|
+
case "eval-start": {
|
|
463
|
+
const a = this.#attempt(e, e.at);
|
|
464
|
+
this.#list.start(e);
|
|
465
|
+
a.last = e;
|
|
466
|
+
this.#queued.delete(e.key);
|
|
467
|
+
this.#running.set(e.key, a);
|
|
468
|
+
if (this.#streaming) this.#write(`${this.#prefix(a)} ${c.dim("▶")} ${e.id}`);
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
case "eval-progress": {
|
|
472
|
+
const a = this.#running.get(e.key);
|
|
473
|
+
if (!a) return;
|
|
474
|
+
this.#list.progress(e.key, e.progress);
|
|
475
|
+
if (e.progress.kind !== "warning") a.last = e;
|
|
476
|
+
const { progress } = e;
|
|
477
|
+
const paint = a.ungated ? {
|
|
478
|
+
...c,
|
|
479
|
+
red: c.dim
|
|
480
|
+
} : c;
|
|
481
|
+
const line = {
|
|
482
|
+
at: progress.at,
|
|
483
|
+
text: progressLine(paint, progress),
|
|
484
|
+
kind: progress.kind
|
|
485
|
+
};
|
|
486
|
+
const start = STARTS[progress.kind];
|
|
487
|
+
const open = start && a.lines.findLastIndex((l) => l.kind === start);
|
|
488
|
+
if (!this.#streaming && open !== void 0 && open >= 0) {
|
|
489
|
+
line.at = a.lines[open]?.at ?? line.at;
|
|
490
|
+
a.lines.splice(open, 1);
|
|
491
|
+
}
|
|
492
|
+
this.#add(a, line);
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
case "debug": {
|
|
496
|
+
const a = this.#running.get(e.key);
|
|
497
|
+
if (!a) return;
|
|
498
|
+
for (const text of debugLines(c, e.line, this.#o.verbosity === 2)) this.#add(a, {
|
|
499
|
+
at: e.line.at,
|
|
500
|
+
text,
|
|
501
|
+
debug: true
|
|
502
|
+
});
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
case "log": {
|
|
506
|
+
const a = e.key ? this.#running.get(e.key) : void 0;
|
|
507
|
+
const label = e.stream === "stderr" ? c.yellow("stderr |") : c.dim("stdout |");
|
|
508
|
+
for (const text of e.text.replace(/\n$/, "").split("\n")) if (a) this.#add(a, {
|
|
509
|
+
at: e.at,
|
|
510
|
+
text: `${label} ${text}`
|
|
511
|
+
});
|
|
512
|
+
else this.#write(`${label} ${text}`);
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
case "eval-end":
|
|
516
|
+
this.#list.end(e.result);
|
|
517
|
+
this.#end(e.result, e.at);
|
|
518
|
+
if (this.#tries.has(e.result.key)) this.#ended.add(e.result.key);
|
|
519
|
+
this.#drawStatus();
|
|
520
|
+
return;
|
|
521
|
+
case "prepare":
|
|
522
|
+
for (const line of this.#prepare.lines(c, e, this.#columns, ERROR_LINES)) this.#write(line);
|
|
523
|
+
if (e.state === "failed" && this.#o.output.githubActions) {
|
|
524
|
+
const { target, failure } = e.outcome;
|
|
525
|
+
const what = target.kind === "workspace" ? "The" : "Sandbox";
|
|
526
|
+
const title = ghEscape(`${what} ${target.label} failed to prepare`, true);
|
|
527
|
+
this.#write(`::error title=${title}::${ghEscape(failure.message)}`);
|
|
528
|
+
}
|
|
529
|
+
return;
|
|
530
|
+
case "notice":
|
|
531
|
+
for (const line of noticeLines(c, e, this.#columns)) this.#write(line);
|
|
532
|
+
return;
|
|
533
|
+
case "run-end": {
|
|
534
|
+
this.#clearStatus();
|
|
535
|
+
if (!this.#blank) this.#write("");
|
|
536
|
+
const verbose = (this.#o.verbosity ?? 0) > 0;
|
|
537
|
+
const list = statusList({
|
|
538
|
+
record: e.record,
|
|
539
|
+
suite: suiteResult(e.record),
|
|
540
|
+
remarks: e.remarks ?? null,
|
|
541
|
+
verbose,
|
|
542
|
+
...e.notRun ? { notRun: e.notRun } : {}
|
|
543
|
+
});
|
|
544
|
+
for (const line of listLines(list, c, true, pointerLine(e.summaryPath), verbose)) this.#write(line);
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
get #columns() {
|
|
550
|
+
return this.#o.columns || Number.POSITIVE_INFINITY;
|
|
551
|
+
}
|
|
552
|
+
/** The header block names a sandbox warning; GitHub Actions also annotates it. */
|
|
553
|
+
#annotate(w) {
|
|
554
|
+
const file = w.file ? `file=${ghEscape(w.file, true)},` : "";
|
|
555
|
+
const title = w.kind === "root" ? "Sandbox runs as root" : "Sandbox has extra capabilities";
|
|
556
|
+
this.#write(`::warning ${file}title=${ghEscape(title, true)}::${ghEscape(w.message)}`);
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* An ended attempt's logs, as `--output-logs` picks: grouped, its block under a `▶` header;
|
|
560
|
+
* streamed, only its error lines, since the rest already printed. A sandbox that failed to
|
|
561
|
+
* prepare was annotated once, for all its attempts.
|
|
562
|
+
*/
|
|
563
|
+
#end(result, at) {
|
|
564
|
+
const c = this.#c;
|
|
565
|
+
const a = this.#running.get(result.key) ?? this.#attempt(result, at - result.durationMs);
|
|
566
|
+
this.#running.delete(result.key);
|
|
567
|
+
this.#queued.delete(result.key);
|
|
568
|
+
const outcome = outcomeOf(result);
|
|
569
|
+
const failed = outcome !== "pass" && outcome !== "skipped";
|
|
570
|
+
const ungated = failed && result.attempt?.gate === "none";
|
|
571
|
+
const missed = ungated && outcome === "fail";
|
|
572
|
+
const { outputLogs, githubActions, logPrefix } = this.#o.output;
|
|
573
|
+
const showDetail = !this.#streaming && a.lines.length > 0 && (outputLogs === "full" || outputLogs === "errors-only" && failed);
|
|
574
|
+
const judged = result.meta?.errorKind === "judge" && (showDetail || this.#streaming);
|
|
575
|
+
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 }) : [];
|
|
576
|
+
const lines = a.lines.filter((l) => l.kind !== "cleanup").sort((x, y) => x.at - y.at);
|
|
577
|
+
const prefixed = logPrefix === "task";
|
|
578
|
+
const head = `${this.#prefix(a)} ${c.dim("▶")} ${result.id}`;
|
|
579
|
+
const group = githubActions && showDetail && (!failed || missed);
|
|
580
|
+
if (showDetail || !this.#streaming && errors.length) this.#write(group ? `::group::${stripAnsi(head)}` : head);
|
|
581
|
+
if (showDetail) for (const line of lines) this.#write(this.#detail(a, line, prefixed));
|
|
582
|
+
for (const line of errors) this.#write(prefixed ? `${this.#prefix(a)} ${line}` : ` ${line}`);
|
|
583
|
+
if (group) this.#write("::endgroup::");
|
|
584
|
+
if (githubActions && failed && !ungated && !result.meta?.prepare) {
|
|
585
|
+
const which = result.attempt?.label ? ` [${result.attempt.label}]` : "";
|
|
586
|
+
const title = ghEscape(`${result.id}${which}`, true);
|
|
587
|
+
const checks = (result.meta?.failedChecks ?? []).filter((x) => x.at);
|
|
588
|
+
for (const x of checks) {
|
|
589
|
+
const [file, line] = splitAt(x.at);
|
|
590
|
+
const label = ghEscape(`${result.id}${which}: ${x.label}`, true);
|
|
591
|
+
this.#write(`::error file=${ghEscape(file, true)},line=${line},title=${label}::${ghEscape(x.message)}`);
|
|
592
|
+
}
|
|
593
|
+
if (!errorCheck(result)?.at) {
|
|
594
|
+
const message = ghEscape(failureLines(colors(false), result, { max: ERROR_LINES }).join("\n").replace(/^✗ failed {2}/, ""));
|
|
595
|
+
const at = locate(result);
|
|
596
|
+
const where = at ? `,line=${at.line},col=${at.col}` : "";
|
|
597
|
+
this.#write(`::error file=${ghEscape(result.file, true)}${where},title=${title}::${message}`);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Every `heartbeatMs` while attempts run. Without attempt logs, how many evals are done; with
|
|
603
|
+
* them, each running attempt's phase, when nothing printed for that long.
|
|
604
|
+
*/
|
|
605
|
+
tick(now = this.#now()) {
|
|
606
|
+
const { heartbeatMs, outputLogs } = this.#o.output;
|
|
607
|
+
if (this.#live || heartbeatMs <= 0) return;
|
|
608
|
+
if (this.#running.size === 0) return;
|
|
609
|
+
const c = this.#c;
|
|
610
|
+
if (outputLogs === "none") {
|
|
611
|
+
if (now - Math.max(this.#lastProgress, this.#runStartedAt) < heartbeatMs) return;
|
|
612
|
+
const { done, total } = this.#list.counts();
|
|
613
|
+
this.#write(c.dim(progressText(done, total, now - this.#runStartedAt)));
|
|
614
|
+
this.#lastProgress = now;
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
if (now - this.#lastWrite < heartbeatMs) return;
|
|
618
|
+
const running = [...this.#running.values()].map((a) => {
|
|
619
|
+
const progress = a.last?.type === "eval-progress" ? a.last.progress : void 0;
|
|
620
|
+
return `${this.#prefix(a)} ${phaseOf(progress)} ${c.dim(formatDuration(now - a.startedAt))}`;
|
|
621
|
+
});
|
|
622
|
+
const queued = this.#queued.size ? `, ${this.#queued.size} queued` : "";
|
|
623
|
+
const elapsed = formatDuration(now - this.#runStartedAt);
|
|
624
|
+
this.#write(`${c.dim(`… ${this.#running.size} running${queued} after ${elapsed}:`)} ${running.join(c.dim(", "))}`);
|
|
625
|
+
}
|
|
626
|
+
close() {
|
|
627
|
+
clearInterval(this.#timer);
|
|
628
|
+
this.#clearStatus();
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
// src/ui/tty.ts
|
|
632
|
+
/** The list's state, which the Ink app reads with `useSyncExternalStore`. */
|
|
633
|
+
var ListStore = class {
|
|
634
|
+
#state = {
|
|
635
|
+
files: [],
|
|
636
|
+
logs: [],
|
|
637
|
+
counts: {
|
|
638
|
+
done: 0,
|
|
639
|
+
total: 0
|
|
640
|
+
},
|
|
641
|
+
phase: null,
|
|
642
|
+
finished: null
|
|
643
|
+
};
|
|
644
|
+
#listeners = /* @__PURE__ */ new Set();
|
|
645
|
+
get = () => this.#state;
|
|
646
|
+
subscribe = (listener) => {
|
|
647
|
+
this.#listeners.add(listener);
|
|
648
|
+
return () => this.#listeners.delete(listener);
|
|
649
|
+
};
|
|
650
|
+
set(next) {
|
|
651
|
+
this.#state = {
|
|
652
|
+
...this.#state,
|
|
653
|
+
...next
|
|
654
|
+
};
|
|
655
|
+
for (const l of this.#listeners) l();
|
|
656
|
+
}
|
|
657
|
+
};
|
|
658
|
+
const FRAME_MS = 80;
|
|
659
|
+
const CANCELABLE_MS = 1e3;
|
|
660
|
+
const ESC = String.fromCharCode(27);
|
|
661
|
+
const BEL = String.fromCharCode(7);
|
|
662
|
+
/** A CSI sequence (colors, cursor moves) or an OSC one (a hyperlink), which take no columns. */
|
|
663
|
+
const ESCAPE = new RegExp(`${ESC}(?:\\[[0-9;?]*[ -/]*[@-~]|\\][^${BEL}${ESC}]*(?:${BEL}|${ESC}\\\\))`, "g");
|
|
664
|
+
const graphemes = new Intl.Segmenter();
|
|
665
|
+
/**
|
|
666
|
+
* Terminal rows one line takes at `columns`, placed as a terminal places it: a wide character that
|
|
667
|
+
* doesn't fit in the row's last column moves to the next row, `\r` returns to the row's start and
|
|
668
|
+
* `\t` goes to the next stop of eight without wrapping.
|
|
669
|
+
*/
|
|
670
|
+
function rowsOf(line, columns) {
|
|
671
|
+
let rows = 1;
|
|
672
|
+
let column = 0;
|
|
673
|
+
for (const { segment } of graphemes.segment(line.replace(ESCAPE, ""))) if (segment === "\r") column = 0;
|
|
674
|
+
else if (segment === " ") column = Math.min(columns - 1, (Math.floor(column / 8) + 1) * 8);
|
|
675
|
+
else if (segment === "\b") column = Math.max(0, column - 1);
|
|
676
|
+
else {
|
|
677
|
+
const width = stringWidth(segment);
|
|
678
|
+
if (!width) continue;
|
|
679
|
+
if (column + width > columns) {
|
|
680
|
+
rows += 1;
|
|
681
|
+
column = 0;
|
|
682
|
+
}
|
|
683
|
+
column += width;
|
|
684
|
+
}
|
|
685
|
+
return rows;
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Before the list is up, the sandbox prepare step: the glyph of its `◆ Preparing…` line spins in
|
|
689
|
+
* place (the cursor goes up to it and back) until each sandbox is ready or failed, then settles to
|
|
690
|
+
* `◆`. What prints under it is kept and measured in rows as the terminal placed it, so a wide
|
|
691
|
+
* character still finds the step line. Once the step line would be out of reach, or the width
|
|
692
|
+
* changes (some terminals reflow what they show, some don't, so its row is unknown), it stops
|
|
693
|
+
* without drawing.
|
|
694
|
+
*/
|
|
695
|
+
var StepSpinner = class {
|
|
696
|
+
#write;
|
|
697
|
+
#c;
|
|
698
|
+
#size;
|
|
699
|
+
#timer;
|
|
700
|
+
#frame = 0;
|
|
701
|
+
/** The step line and everything printed under it since. */
|
|
702
|
+
#text = "";
|
|
703
|
+
/** The width `#text` was printed at. */
|
|
704
|
+
#columns = 0;
|
|
705
|
+
#pending = 0;
|
|
706
|
+
constructor(write, c, size) {
|
|
707
|
+
this.#write = write;
|
|
708
|
+
this.#c = c;
|
|
709
|
+
this.#size = size;
|
|
710
|
+
}
|
|
711
|
+
/** Terminal lines from the step line down to the cursor after `text`. */
|
|
712
|
+
#up(text = this.#text) {
|
|
713
|
+
const columns = Math.max(1, this.#columns);
|
|
714
|
+
const lines = text.split("\n");
|
|
715
|
+
if (lines.at(-1) === "") lines.pop();
|
|
716
|
+
return lines.reduce((n, l) => n + rowsOf(l, columns), 0);
|
|
717
|
+
}
|
|
718
|
+
/** The step line was just written as `text`; it spins until `targets` have reported. */
|
|
719
|
+
start(text, targets) {
|
|
720
|
+
this.settle();
|
|
721
|
+
this.#text = text;
|
|
722
|
+
this.#columns = this.#size().columns;
|
|
723
|
+
this.#pending = targets;
|
|
724
|
+
this.#timer = setInterval(() => this.#draw(), FRAME_MS);
|
|
725
|
+
this.#timer.unref();
|
|
726
|
+
this.#draw();
|
|
727
|
+
}
|
|
728
|
+
/** Before `text` prints under it; settles first if the step line would scroll out of reach. */
|
|
729
|
+
before(text) {
|
|
730
|
+
if (!this.#timer) return;
|
|
731
|
+
const next = this.#text + text;
|
|
732
|
+
if (!this.#reachable(next)) this.settle();
|
|
733
|
+
this.#text = next;
|
|
734
|
+
}
|
|
735
|
+
/** One sandbox reported; the last settles it. */
|
|
736
|
+
reported() {
|
|
737
|
+
this.#pending -= 1;
|
|
738
|
+
if (this.#pending <= 0) this.settle();
|
|
739
|
+
}
|
|
740
|
+
#reachable(text = this.#text) {
|
|
741
|
+
const { rows, columns } = this.#size();
|
|
742
|
+
return columns === this.#columns && this.#up(text) < rows - 1;
|
|
743
|
+
}
|
|
744
|
+
#draw(glyph = SPINNER[this.#frame++ % SPINNER.length] ?? "◆") {
|
|
745
|
+
if (!this.#reachable()) {
|
|
746
|
+
clearInterval(this.#timer);
|
|
747
|
+
this.#timer = void 0;
|
|
748
|
+
return;
|
|
749
|
+
}
|
|
750
|
+
const up = this.#up();
|
|
751
|
+
this.#write(`\x1b[${up}A\r\x1b[2C${this.#c.teal(glyph)}\r\x1b[${up}B`);
|
|
752
|
+
}
|
|
753
|
+
settle() {
|
|
754
|
+
if (!this.#timer) return;
|
|
755
|
+
this.#draw("◆");
|
|
756
|
+
clearInterval(this.#timer);
|
|
757
|
+
this.#timer = void 0;
|
|
758
|
+
}
|
|
759
|
+
};
|
|
760
|
+
var InteractiveRenderer = class {
|
|
761
|
+
#o;
|
|
762
|
+
#c;
|
|
763
|
+
#store = new ListStore();
|
|
764
|
+
#list;
|
|
765
|
+
/** The header and run-level lines, as every terminal prints them. */
|
|
766
|
+
#plain;
|
|
767
|
+
#app;
|
|
768
|
+
/** Set once the list couldn't load: from then on, the run prints as a pipe's does. */
|
|
769
|
+
#fallback;
|
|
770
|
+
#ended;
|
|
771
|
+
#closed = false;
|
|
772
|
+
#detached = false;
|
|
773
|
+
#pending;
|
|
774
|
+
#polling;
|
|
775
|
+
#spinner;
|
|
776
|
+
/** What the plain renderer wrote since `#written` was reset, while the list isn't up. */
|
|
777
|
+
#written = "";
|
|
778
|
+
constructor(options) {
|
|
779
|
+
this.#o = options;
|
|
780
|
+
this.#c = options.colors;
|
|
781
|
+
this.#list = new LiveList(options.harness);
|
|
782
|
+
this.#spinner = new StepSpinner((text) => options.out.write(text), options.colors, () => sizeOf(options.stdout));
|
|
783
|
+
const out = { write: (text) => {
|
|
784
|
+
if (!this.#app || this.#fallback) {
|
|
785
|
+
this.#spinner.before(redactSecrets(String(text)));
|
|
786
|
+
this.#written += String(text);
|
|
787
|
+
return options.out.write(text);
|
|
788
|
+
}
|
|
789
|
+
const lines = String(text).replace(/\n$/, "").split("\n");
|
|
790
|
+
this.#store.set({ logs: [...this.#store.get().logs, ...lines] });
|
|
791
|
+
return true;
|
|
792
|
+
} };
|
|
793
|
+
this.#plain = new PlainRenderer({
|
|
794
|
+
...options,
|
|
795
|
+
out,
|
|
796
|
+
timers: false,
|
|
797
|
+
output: {
|
|
798
|
+
...options.output,
|
|
799
|
+
statusLine: false,
|
|
800
|
+
interactive: false,
|
|
801
|
+
outputLogs: "none"
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
#mount() {
|
|
806
|
+
if (this.#app || this.#closed) return;
|
|
807
|
+
const { attached } = this.#o;
|
|
808
|
+
const cancel = attached ? this.#o.cancel : this.#o.cancel ?? (() => process.kill(process.pid, "SIGINT"));
|
|
809
|
+
const load = this.#o.load ?? (() => import("./ink-list-Dnh6XD3C.js"));
|
|
810
|
+
const asked = attached?.cancelable;
|
|
811
|
+
if (asked) {
|
|
812
|
+
const poll = () => {
|
|
813
|
+
const cancelable = asked();
|
|
814
|
+
if (cancelable !== this.#store.get().cancelable) this.#store.set({ cancelable });
|
|
815
|
+
};
|
|
816
|
+
poll();
|
|
817
|
+
this.#polling = setInterval(poll, CANCELABLE_MS);
|
|
818
|
+
this.#polling.unref();
|
|
819
|
+
}
|
|
820
|
+
this.#app = load().then((m) => m.mountList({
|
|
821
|
+
store: this.#store,
|
|
822
|
+
colors: this.#c,
|
|
823
|
+
...cancel ? { cancel } : {},
|
|
824
|
+
...attached ? { detach: () => {
|
|
825
|
+
this.#detached = true;
|
|
826
|
+
attached.detach();
|
|
827
|
+
} } : {},
|
|
828
|
+
stdout: this.#o.stdout,
|
|
829
|
+
stdin: this.#o.stdin
|
|
830
|
+
})).catch((error) => {
|
|
831
|
+
this.#fallBack(error);
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
#fallBack(error) {
|
|
835
|
+
const out = this.#o.out;
|
|
836
|
+
const { logs, phase } = this.#store.get();
|
|
837
|
+
for (const line of logs) out.write(`${line}\n`);
|
|
838
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
839
|
+
out.write(`${this.#c.yellow(`Couldn't draw the interactive list (${reason}).`)}\n`);
|
|
840
|
+
if (phase) out.write(` ${this.#c.teal("◆")} ${phase}\n`);
|
|
841
|
+
this.#fallback = new PlainRenderer({
|
|
842
|
+
...this.#o,
|
|
843
|
+
timers: false,
|
|
844
|
+
output: {
|
|
845
|
+
...this.#o.output,
|
|
846
|
+
statusLine: false,
|
|
847
|
+
interactive: false
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
if (this.#ended) this.#fallback.onEvent(this.#ended.event);
|
|
851
|
+
}
|
|
852
|
+
#update() {
|
|
853
|
+
this.#pending ??= setImmediate(() => this.#flush());
|
|
854
|
+
}
|
|
855
|
+
#flush() {
|
|
856
|
+
if (this.#pending) clearImmediate(this.#pending);
|
|
857
|
+
this.#pending = void 0;
|
|
858
|
+
const { done, total, failed, failing } = this.#list.counts();
|
|
859
|
+
this.#store.set({
|
|
860
|
+
files: this.#list.files(),
|
|
861
|
+
counts: {
|
|
862
|
+
done,
|
|
863
|
+
total,
|
|
864
|
+
failed,
|
|
865
|
+
failing
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
onEvent(e) {
|
|
870
|
+
if (this.#fallback) {
|
|
871
|
+
if (e.type !== "run-start") this.#fallback.onEvent(e);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
switch (e.type) {
|
|
875
|
+
case "run-start":
|
|
876
|
+
this.#spinner.settle();
|
|
877
|
+
this.#store.set({ phase: startText(this.#o.output) });
|
|
878
|
+
return;
|
|
879
|
+
case "prepare":
|
|
880
|
+
this.#written = "";
|
|
881
|
+
this.#plain.onEvent(e);
|
|
882
|
+
if (this.#app || this.#o.timers === false || process.env.REEVAL_DEBUG) return;
|
|
883
|
+
if (e.state === "start") this.#spinner.start(this.#written, e.targets.length);
|
|
884
|
+
else this.#spinner.reported();
|
|
885
|
+
return;
|
|
886
|
+
case "plan": {
|
|
887
|
+
this.#list.planned(e.header.evals);
|
|
888
|
+
const { record } = e.header;
|
|
889
|
+
const host = this.#o.attached?.host;
|
|
890
|
+
this.#plain.onEvent(record && host ? {
|
|
891
|
+
...e,
|
|
892
|
+
header: {
|
|
893
|
+
...e.header,
|
|
894
|
+
record: onHost(record, host)
|
|
895
|
+
}
|
|
896
|
+
} : e);
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
case "collected":
|
|
900
|
+
this.#spinner.settle();
|
|
901
|
+
this.#list.collected(e.file, e.evals);
|
|
902
|
+
this.#mount();
|
|
903
|
+
this.#update();
|
|
904
|
+
return;
|
|
905
|
+
case "eval-start":
|
|
906
|
+
this.#list.start(e);
|
|
907
|
+
this.#update();
|
|
908
|
+
return;
|
|
909
|
+
case "eval-progress":
|
|
910
|
+
if (e.progress.kind === "warning" || e.progress.kind === "browser-download") this.#plain.onEvent(e);
|
|
911
|
+
this.#list.progress(e.key, e.progress);
|
|
912
|
+
this.#update();
|
|
913
|
+
return;
|
|
914
|
+
case "eval-end":
|
|
915
|
+
this.#list.end(e.result);
|
|
916
|
+
this.#update();
|
|
917
|
+
return;
|
|
918
|
+
case "debug": return;
|
|
919
|
+
case "run-end": {
|
|
920
|
+
const host = this.#o.attached?.host;
|
|
921
|
+
const listOf = (verbose) => statusList({
|
|
922
|
+
record: e.record,
|
|
923
|
+
suite: suiteResult(e.record),
|
|
924
|
+
remarks: e.remarks ?? null,
|
|
925
|
+
verbose,
|
|
926
|
+
...e.notRun ? { notRun: e.notRun } : {},
|
|
927
|
+
...host ? { host } : {}
|
|
928
|
+
});
|
|
929
|
+
const list = listOf(false);
|
|
930
|
+
const verbose = (this.#o.verbosity ?? 0) > 0;
|
|
931
|
+
if (!this.#app) {
|
|
932
|
+
this.#plain.onEvent(e);
|
|
933
|
+
return;
|
|
934
|
+
}
|
|
935
|
+
this.#flush();
|
|
936
|
+
this.#stopPolling();
|
|
937
|
+
const pointer = pointerLine(e.summaryPath, host);
|
|
938
|
+
this.#ended = {
|
|
939
|
+
scrollback: verbose ? listOf(true) : list,
|
|
940
|
+
verbose,
|
|
941
|
+
pointer,
|
|
942
|
+
event: e
|
|
943
|
+
};
|
|
944
|
+
this.#store.set({
|
|
945
|
+
files: list.files,
|
|
946
|
+
...this.#store.get().phase ? { phase: endText(e.record.status) } : {},
|
|
947
|
+
finished: {
|
|
948
|
+
done: list.done,
|
|
949
|
+
notes: list.notes,
|
|
950
|
+
pointer,
|
|
951
|
+
errors: list.errors
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
default: this.#plain.onEvent(e);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
#stopPolling() {
|
|
960
|
+
clearInterval(this.#polling);
|
|
961
|
+
this.#polling = void 0;
|
|
962
|
+
}
|
|
963
|
+
close() {
|
|
964
|
+
this.#stopPolling();
|
|
965
|
+
if (this.#pending) this.#flush();
|
|
966
|
+
this.#spinner.settle();
|
|
967
|
+
this.#plain.close();
|
|
968
|
+
this.#fallback?.close();
|
|
969
|
+
if (!this.#store.get().finished && !this.#detached) {
|
|
970
|
+
this.#closed = true;
|
|
971
|
+
this.#app?.then((a) => a?.unmount());
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* Until the user quits the list, then the whole list into the scrollback; at once when there's
|
|
976
|
+
* none. Detached from a run that goes on, until the list is down, with nothing printed.
|
|
977
|
+
*/
|
|
978
|
+
async wait() {
|
|
979
|
+
const app = await this.#app;
|
|
980
|
+
if (!app || !(this.#ended || this.#detached)) return;
|
|
981
|
+
await app.waitUntilExit();
|
|
982
|
+
if (!this.#ended) return;
|
|
983
|
+
const { phase } = this.#store.get();
|
|
984
|
+
const { scrollback, verbose, pointer } = this.#ended;
|
|
985
|
+
const text = [...phase ? [` ${this.#c.teal("◆")} ${phase}`, ""] : [], ...listLines(scrollback, this.#c, true, pointer, verbose)];
|
|
986
|
+
this.#o.out.write(`${text.join("\n")}\n`);
|
|
987
|
+
}
|
|
988
|
+
/** Takes a finished list down without a key, then prints it as `wait` does. */
|
|
989
|
+
async dismiss() {
|
|
990
|
+
if (this.#ended) this.#store.set({ quit: true });
|
|
991
|
+
await this.wait();
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
const sizeOf = (stdout) => {
|
|
995
|
+
const { rows, columns } = stdout ?? {};
|
|
996
|
+
return {
|
|
997
|
+
rows: rows || 24,
|
|
998
|
+
columns: columns || 80
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
// src/ui/index.ts
|
|
1002
|
+
const depthOf = (bits = 4) => bits >= 24 ? 24 : bits >= 8 ? 8 : 4;
|
|
1003
|
+
function createRenderer(options) {
|
|
1004
|
+
const out = { write: (text) => options.out.write(redactSecrets(text)) };
|
|
1005
|
+
if (options.output.mode === "agent") return new AgentRenderer({
|
|
1006
|
+
...options,
|
|
1007
|
+
out
|
|
1008
|
+
});
|
|
1009
|
+
const paint = colors(options.output.color, depthOf(options.colorDepth));
|
|
1010
|
+
if (options.output.interactive && options.tty) return new InteractiveRenderer({
|
|
1011
|
+
...options,
|
|
1012
|
+
...options.tty,
|
|
1013
|
+
out,
|
|
1014
|
+
colors: paint
|
|
1015
|
+
});
|
|
1016
|
+
return new PlainRenderer({
|
|
1017
|
+
...options,
|
|
1018
|
+
out,
|
|
1019
|
+
colors: paint
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
1022
|
+
export { createRenderer as t };
|
|
1023
|
+
|
|
1024
|
+
//# sourceMappingURL=ui-DUiVPbQ2.js.map
|