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,704 @@
|
|
|
1
|
+
import { g as redactSecrets, x as registerSecret } from "./redact-t-L3VGy8.js";
|
|
2
|
+
import { t as InfraError } from "./types-CbcnJxCy.js";
|
|
3
|
+
import { t as PrepareError } from "./provider-ieWOn4YS.js";
|
|
4
|
+
import { o as recipeOf } from "./recipe-qyIpP96r.js";
|
|
5
|
+
import { n as missingSshTool, r as newKey, t as createPooledSshSandbox } from "./ssh-pool-Dvfx5GuV.js";
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import { join } from "node:path";
|
|
8
|
+
import { createHash, randomBytes } from "node:crypto";
|
|
9
|
+
import { tmpdir } from "node:os";
|
|
10
|
+
import { pathToFileURL } from "node:url";
|
|
11
|
+
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
12
|
+
import { connect, isIPv6 } from "node:net";
|
|
13
|
+
// src/sandbox/labels.ts
|
|
14
|
+
/** The variable naming labels for every VM `boat()` and `daytona()` create: `key=value,key=value`. */
|
|
15
|
+
const SANDBOX_LABELS = "REEVAL_SANDBOX_LABELS";
|
|
16
|
+
const KEY = /^[A-Za-z0-9][A-Za-z0-9._/-]{0,62}$/;
|
|
17
|
+
/** Boat takes at most 20 labels a sandbox, and reeval sets 2 of its own. */
|
|
18
|
+
const MAX_LABELS = 18;
|
|
19
|
+
const MAX_VALUE_BYTES = 256;
|
|
20
|
+
/**
|
|
21
|
+
* The labels {@link SANDBOX_LABELS} adds to reeval's own on every VM it creates, so something
|
|
22
|
+
* outside the run can find them if the run dies. Throws, naming
|
|
23
|
+
* the variable, on a pair either provider would refuse or one that would replace reeval's own.
|
|
24
|
+
*/
|
|
25
|
+
function sandboxLabels(env = process.env) {
|
|
26
|
+
const text = env[SANDBOX_LABELS]?.trim();
|
|
27
|
+
if (!text) return {};
|
|
28
|
+
const labels = {};
|
|
29
|
+
for (const pair of text.split(",")) {
|
|
30
|
+
const at = pair.indexOf("=");
|
|
31
|
+
const key = (at < 0 ? pair : pair.slice(0, at)).trim();
|
|
32
|
+
const value = at < 0 ? "" : pair.slice(at + 1).trim();
|
|
33
|
+
const bad = (why) => /* @__PURE__ */ new Error(`${SANDBOX_LABELS} has ${JSON.stringify(pair.trim())}: ${why}`);
|
|
34
|
+
if (at < 0) throw bad("each label is key=value, and labels are separated by commas");
|
|
35
|
+
if (!KEY.test(key)) throw bad("a key is 1 to 63 letters, digits, \".\", \"_\", \"/\" or \"-\", starting with a letter or digit");
|
|
36
|
+
if (key.startsWith("reeval-")) throw bad("keys starting reeval- are reeval's own");
|
|
37
|
+
if (key in labels) throw bad(`${key} is set twice`);
|
|
38
|
+
if (Buffer.byteLength(value) > MAX_VALUE_BYTES) throw bad(`a value is at most ${MAX_VALUE_BYTES} bytes`);
|
|
39
|
+
labels[key] = value;
|
|
40
|
+
}
|
|
41
|
+
if (Object.keys(labels).length > MAX_LABELS) throw new Error(`${SANDBOX_LABELS} sets more than ${MAX_LABELS} labels`);
|
|
42
|
+
return labels;
|
|
43
|
+
}
|
|
44
|
+
// src/sandbox/optional-peer.ts
|
|
45
|
+
const missing = (error) => error.code === "ERR_MODULE_NOT_FOUND" || error.code === "MODULE_NOT_FOUND";
|
|
46
|
+
/**
|
|
47
|
+
* A loader of the package `name`, from beside reeval or else from the project: a package manager
|
|
48
|
+
* that doesn't link peers into reeval's own `node_modules` still has it in the project's. Without
|
|
49
|
+
* it, a usage error that says `message`. A failed load is tried again next time.
|
|
50
|
+
*/
|
|
51
|
+
function optionalPeer(name, o) {
|
|
52
|
+
let loaded;
|
|
53
|
+
return (projectRoot = process.cwd()) => {
|
|
54
|
+
loaded ??= (async () => {
|
|
55
|
+
try {
|
|
56
|
+
return await import(name);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
if (!missing(error)) throw error;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const path = createRequire(join(projectRoot, "noop.js")).resolve(name);
|
|
62
|
+
return await import(pathToFileURL(path).href);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
if (!missing(error)) throw error;
|
|
65
|
+
throw new PrepareError({
|
|
66
|
+
class: "config",
|
|
67
|
+
stage: o.stage,
|
|
68
|
+
ref: null,
|
|
69
|
+
cause: null,
|
|
70
|
+
log: null,
|
|
71
|
+
usage: true,
|
|
72
|
+
message: o.message
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
})();
|
|
76
|
+
loaded.catch(() => {
|
|
77
|
+
loaded = void 0;
|
|
78
|
+
});
|
|
79
|
+
return loaded;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// src/sandbox/boat.ts
|
|
83
|
+
const BOAT_SDK = "@boatdev/sdk";
|
|
84
|
+
const BOAT_BASE_URL = "BOAT_BASE_URL";
|
|
85
|
+
const boatService = (sandbox) => ({
|
|
86
|
+
helper: "boat()",
|
|
87
|
+
kind: "boat",
|
|
88
|
+
name: "Boat",
|
|
89
|
+
credential: `the API key in ${sandbox.apiKey.from}`,
|
|
90
|
+
scope: "account",
|
|
91
|
+
starts: "per hour",
|
|
92
|
+
maxLabels: 20
|
|
93
|
+
});
|
|
94
|
+
const boatSpec = (sandbox) => ({
|
|
95
|
+
prefix: sandbox.prefix,
|
|
96
|
+
type: sandbox.type ?? "small",
|
|
97
|
+
size: sandbox.type ?? "small",
|
|
98
|
+
...sandbox.maxConcurrent !== void 0 && { maxConcurrent: sandbox.maxConcurrent },
|
|
99
|
+
...sandbox.reuse !== void 0 && { reuse: sandbox.reuse },
|
|
100
|
+
...sandbox.attemptsPerMachine !== void 0 && { attemptsPerMachine: sandbox.attemptsPerMachine }
|
|
101
|
+
});
|
|
102
|
+
/** The fix for a project without the SDK. */
|
|
103
|
+
const INSTALL_SDK = `Install the Boat SDK in this project: npm i ${BOAT_SDK}`;
|
|
104
|
+
/**
|
|
105
|
+
* The Boat SDK, from beside reeval or else from the project: a package manager that doesn't link
|
|
106
|
+
* peers into reeval's own `node_modules` still has it in the project's.
|
|
107
|
+
*/
|
|
108
|
+
const loadBoatSdk = optionalPeer(BOAT_SDK, {
|
|
109
|
+
stage: "boat",
|
|
110
|
+
message: `boat() needs the Boat SDK, which isn't installed. ${INSTALL_SDK}`
|
|
111
|
+
});
|
|
112
|
+
/** Why `sandbox`'s key can't be read from this process's environment, or null. */
|
|
113
|
+
function boatKeyProblem(sandbox) {
|
|
114
|
+
const name = sandbox.apiKey.from;
|
|
115
|
+
const value = process.env[name];
|
|
116
|
+
if (!value) return `boat() needs a Boat API key in ${name}, which isn't set`;
|
|
117
|
+
if (/\s/.test(value)) return `${name} has whitespace or a line break in it (a key pasted from a wrapped line?); set it to the key alone`;
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
/** A client for `sandbox`'s account; the key goes from the environment to the SDK, nowhere else. */
|
|
121
|
+
async function boatClient(sandbox, projectRoot) {
|
|
122
|
+
const problem = boatKeyProblem(sandbox);
|
|
123
|
+
if (problem) throw new PrepareError({
|
|
124
|
+
class: "config",
|
|
125
|
+
stage: "boat",
|
|
126
|
+
ref: null,
|
|
127
|
+
cause: null,
|
|
128
|
+
log: null,
|
|
129
|
+
usage: true,
|
|
130
|
+
message: `${problem}. Set it in the environment or the project's .env.local.`
|
|
131
|
+
});
|
|
132
|
+
const { BoatApi, Configuration } = await loadBoatSdk(projectRoot);
|
|
133
|
+
const basePath = process.env[BOAT_BASE_URL];
|
|
134
|
+
const accessToken = process.env[sandbox.apiKey.from];
|
|
135
|
+
registerSecret(accessToken);
|
|
136
|
+
return new BoatApi(new Configuration({
|
|
137
|
+
accessToken,
|
|
138
|
+
...basePath ? { basePath } : {}
|
|
139
|
+
}));
|
|
140
|
+
}
|
|
141
|
+
/** What Boat said about a failed call: `404 not_found: …`, or the error's own message. */
|
|
142
|
+
async function boatError(error) {
|
|
143
|
+
const response = error.response;
|
|
144
|
+
if (!response) return error instanceof Error ? error.message : String(error);
|
|
145
|
+
const body = await response.text().catch(() => "");
|
|
146
|
+
let detail = body.slice(0, 300);
|
|
147
|
+
try {
|
|
148
|
+
const e = JSON.parse(body).error;
|
|
149
|
+
if (typeof e === "string") detail = e;
|
|
150
|
+
else if (e) detail = [e.code, e.message].filter(Boolean).join(": ");
|
|
151
|
+
} catch {}
|
|
152
|
+
return `${response.status}${detail ? ` ${detail}` : ""}`;
|
|
153
|
+
}
|
|
154
|
+
const status = (error) => error.response?.status;
|
|
155
|
+
/**
|
|
156
|
+
* The attempt can't finish on a machine granted `granted` seconds of the `asked` it asked for,
|
|
157
|
+
* which leaves `TTL_MARGIN_S` for teardown: an error saying so, rather than the machine stopping
|
|
158
|
+
* mid-attempt.
|
|
159
|
+
*/
|
|
160
|
+
function tooShort(service, id, asked, granted) {
|
|
161
|
+
const needs = asked - 600;
|
|
162
|
+
if (typeof granted !== "number" || granted >= needs) return null;
|
|
163
|
+
return new InfraError(`${service.name} gave sandbox ${id} ${granted}s to live, and the attempt needs ${needs}s, its timeout and setup${service.ttlLimit ?? ""}`);
|
|
164
|
+
}
|
|
165
|
+
/** `error` from `doing` as an attempt's infra error, a refused credential saying so. */
|
|
166
|
+
async function serviceFailed(service, error, doing, why) {
|
|
167
|
+
why ??= await boatError(error);
|
|
168
|
+
if (status(error) === 401) return new InfraError(`${service.name} refused ${service.credential}${service.expiry ?? ""}: ${why}`);
|
|
169
|
+
return new InfraError(`${service.name} ${doing}: ${why}`);
|
|
170
|
+
}
|
|
171
|
+
/** The part of every sandbox name that says which run made it. */
|
|
172
|
+
const runTag = (runId) => createHash("sha256").update(runId).digest("hex").slice(0, 8);
|
|
173
|
+
/** `<prefix>-<run>-`: what every sandbox of the run is named with first. */
|
|
174
|
+
const runPrefix = (sandbox, runId) => `${sandbox.prefix}-${runTag(runId)}-`;
|
|
175
|
+
/** The labels every sandbox of the run carries, beside those {@link sandboxLabels} adds. */
|
|
176
|
+
const runLabels = (sandbox, runId) => ({
|
|
177
|
+
"reeval-prefix": sandbox.prefix,
|
|
178
|
+
"reeval-run": runTag(runId)
|
|
179
|
+
});
|
|
180
|
+
/** How long a created sandbox may take to be ready. */
|
|
181
|
+
const READY_TIMEOUT_MS = 12e4;
|
|
182
|
+
/** How long a check of the account may wait on Boat, so an unreachable API can't stall a plan. */
|
|
183
|
+
const LIMITS_TIMEOUT_MS = 15e3;
|
|
184
|
+
/** How long a run's cleanup may wait on one account, so an unreachable API can't stall a resume. */
|
|
185
|
+
const CLEANUP_TIMEOUT_MS = 15e3;
|
|
186
|
+
/** Boat's states a sandbox never leaves for `ready`; 'cancelled' answers 404 after it's reported. */
|
|
187
|
+
const DEAD_STATES = [
|
|
188
|
+
"archived",
|
|
189
|
+
"archiving",
|
|
190
|
+
"error",
|
|
191
|
+
"cancelled"
|
|
192
|
+
];
|
|
193
|
+
/**
|
|
194
|
+
* How long reeval keeps deleting a sandbox that never got ready: Boat can drop a delete sent while
|
|
195
|
+
* it provisions and bring the VM up idle minutes later.
|
|
196
|
+
*/
|
|
197
|
+
const UNREADY_DELETE_MS = 6e5;
|
|
198
|
+
async function untilReady(service, api, id, signal) {
|
|
199
|
+
const deadline = Date.now() + READY_TIMEOUT_MS;
|
|
200
|
+
for (;;) {
|
|
201
|
+
const { sandbox } = await api.get({ sandboxId: id }).catch(async (error) => {
|
|
202
|
+
throw await serviceFailed(service, error, `didn't report sandbox ${id}`);
|
|
203
|
+
});
|
|
204
|
+
if ([
|
|
205
|
+
"ready",
|
|
206
|
+
"idle",
|
|
207
|
+
"running"
|
|
208
|
+
].includes(sandbox.state)) return sandbox;
|
|
209
|
+
if (DEAD_STATES.includes(sandbox.state)) throw new InfraError(`${service.name} sandbox ${id} stopped starting: ${sandbox.state}${sandbox.error ? ` (${sandbox.error})` : ""}`);
|
|
210
|
+
if (Date.now() > deadline) throw new InfraError(`${service.name} sandbox ${id} wasn't ready after ${READY_TIMEOUT_MS / 1e3}s (still ${sandbox.state})`);
|
|
211
|
+
if (signal.aborted) throw signal.reason;
|
|
212
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/** Deletes a sandbox; one already gone is deleted. */
|
|
216
|
+
async function deleteSandbox(api, id, signal) {
|
|
217
|
+
try {
|
|
218
|
+
await api.deleteSandbox({
|
|
219
|
+
sandboxId: id,
|
|
220
|
+
xAsciiConfirmDelete: id
|
|
221
|
+
}, { signal });
|
|
222
|
+
} catch (error) {
|
|
223
|
+
if (status(error) !== 404) throw error;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Deletes a sandbox that never got ready, sending the delete again every `redeleteMs` until Boat
|
|
228
|
+
* answers 404 or reports one of {@link DEAD_STATES}, for at most `deadlineMs`. Once `signal` is
|
|
229
|
+
* aborted it sends the delete once and stops: a canceled run's `cleanupRun` and the sandbox's TTL
|
|
230
|
+
* take it from there, so the cancel doesn't wait on Boat. Whether it went.
|
|
231
|
+
*/
|
|
232
|
+
async function deleteUntilGone(api, id, o = {}) {
|
|
233
|
+
const until = Date.now() + (o.deadlineMs ?? UNREADY_DELETE_MS);
|
|
234
|
+
const pollMs = o.pollMs ?? 5e3;
|
|
235
|
+
const redeleteMs = o.redeleteMs ?? 3e4;
|
|
236
|
+
let deletedAt = Number.NEGATIVE_INFINITY;
|
|
237
|
+
for (;;) {
|
|
238
|
+
if (Date.now() - deletedAt >= redeleteMs) {
|
|
239
|
+
await deleteSandbox(api, id).catch(() => {});
|
|
240
|
+
deletedAt = Date.now();
|
|
241
|
+
}
|
|
242
|
+
if (o.signal?.aborted) return false;
|
|
243
|
+
const state = await api.get({ sandboxId: id }).then(({ sandbox }) => sandbox.state, (error) => status(error) === 404 ? null : "unknown");
|
|
244
|
+
if (state === null || DEAD_STATES.includes(state)) return true;
|
|
245
|
+
if (Date.now() >= until || o.signal?.aborted) return false;
|
|
246
|
+
await new Promise((resolve) => {
|
|
247
|
+
const done = () => {
|
|
248
|
+
clearTimeout(timer);
|
|
249
|
+
o.signal?.removeEventListener("abort", done);
|
|
250
|
+
resolve();
|
|
251
|
+
};
|
|
252
|
+
const timer = setTimeout(done, pollMs);
|
|
253
|
+
o.signal?.addEventListener("abort", done, { once: true });
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Where a sandbox's sshd answers, best first: the VM's own address on port 22, then the public
|
|
259
|
+
* endpoint Boat forwards. The address is IPv6, which a host without IPv6 can't reach; the endpoint
|
|
260
|
+
* is NAT'd, which another VM on the same Boat host can't reach.
|
|
261
|
+
*/
|
|
262
|
+
function sshRoutes(reply) {
|
|
263
|
+
const routes = [];
|
|
264
|
+
if (reply.machineIp) routes.push({
|
|
265
|
+
host: reply.machineIp,
|
|
266
|
+
port: 22,
|
|
267
|
+
via: "machine address"
|
|
268
|
+
});
|
|
269
|
+
const endpoint = /^(.+):(\d+)$/.exec(reply.sshEndpoint ?? "");
|
|
270
|
+
if (endpoint) {
|
|
271
|
+
const host = endpoint[1].replace(/^\[(.*)\]$/, "$1");
|
|
272
|
+
routes.push({
|
|
273
|
+
host,
|
|
274
|
+
port: Number(endpoint[2]),
|
|
275
|
+
via: "public endpoint"
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
return routes;
|
|
279
|
+
}
|
|
280
|
+
const routeLabel = (r) => `${isIPv6(r.host) ? `[${r.host}]` : r.host}:${r.port} (${r.via})`;
|
|
281
|
+
/** How long one try at a route may take to greet, so an address that drops packets costs little. */
|
|
282
|
+
const PROBE_MS = 3e3;
|
|
283
|
+
/** How long the VM may take, after it reports ready, to greet on any route. */
|
|
284
|
+
const REACH_MS = 6e4;
|
|
285
|
+
/** Whether `route` greets with an SSH banner within `timeoutMs`, or why not. */
|
|
286
|
+
function probe(route, timeoutMs, signal) {
|
|
287
|
+
return new Promise((resolve) => {
|
|
288
|
+
const socket = connect({
|
|
289
|
+
host: route.host,
|
|
290
|
+
port: route.port
|
|
291
|
+
});
|
|
292
|
+
let banner = "";
|
|
293
|
+
const done = (result) => {
|
|
294
|
+
clearTimeout(timer);
|
|
295
|
+
signal.removeEventListener("abort", stop);
|
|
296
|
+
socket.destroy();
|
|
297
|
+
resolve(result);
|
|
298
|
+
};
|
|
299
|
+
const stop = () => done("not needed");
|
|
300
|
+
signal.addEventListener("abort", stop, { once: true });
|
|
301
|
+
const timer = setTimeout(() => done(`no SSH greeting in ${timeoutMs / 1e3}s`), timeoutMs);
|
|
302
|
+
socket.on("data", (d) => {
|
|
303
|
+
banner += d.toString("latin1");
|
|
304
|
+
if (banner.startsWith("SSH-")) done(true);
|
|
305
|
+
else if (banner.length >= 4) done("answered, but not as SSH");
|
|
306
|
+
});
|
|
307
|
+
socket.on("error", (e) => done(e.code ?? e.message));
|
|
308
|
+
socket.on("close", () => done("closed before an SSH greeting"));
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* The first of `routes`, in order, whose sshd greets: each round tries them all at once and takes
|
|
313
|
+
* the best that answered, so a route this host can't use costs at most one probe. A VM that just
|
|
314
|
+
* reported ready may not greet yet, so rounds repeat until `reachMs` has passed.
|
|
315
|
+
*/
|
|
316
|
+
async function firstReachable(routes, o = {}) {
|
|
317
|
+
const probeMs = o.probeMs ?? PROBE_MS;
|
|
318
|
+
const deadline = Date.now() + (o.reachMs ?? REACH_MS);
|
|
319
|
+
for (;;) {
|
|
320
|
+
const round = new AbortController();
|
|
321
|
+
const tries = routes.map((r) => probe(r, probeMs, round.signal));
|
|
322
|
+
const results = [];
|
|
323
|
+
for (const [i, attempt] of tries.entries()) {
|
|
324
|
+
results.push(await attempt);
|
|
325
|
+
if (results[i] === true) {
|
|
326
|
+
round.abort();
|
|
327
|
+
return { route: routes[i] };
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (Date.now() >= deadline || o.signal?.aborted) return { why: routes.map((r, i) => `${routeLabel(r)}: ${results[i]}`).join("; ") };
|
|
331
|
+
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/** Boat refused a start for now: 429, with when to try again if it said. */
|
|
335
|
+
var BoatRateLimited = class extends Error {
|
|
336
|
+
retryAfterMs;
|
|
337
|
+
constructor(message, retryAfterMs) {
|
|
338
|
+
super(message);
|
|
339
|
+
this.name = "BoatRateLimited";
|
|
340
|
+
this.retryAfterMs = retryAfterMs;
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* How long a 429 asks to wait: its `Retry-After` (seconds, or an HTTP date), else the time its
|
|
345
|
+
* message names (`… again at 14:05 UTC`), else null.
|
|
346
|
+
*/
|
|
347
|
+
function retryAfterMs(header, message, now = Date.now()) {
|
|
348
|
+
if (header) {
|
|
349
|
+
const seconds = Number(header);
|
|
350
|
+
if (Number.isFinite(seconds) && seconds >= 0) return Math.ceil(seconds * 1e3);
|
|
351
|
+
const at = Date.parse(header);
|
|
352
|
+
if (Number.isFinite(at)) return Math.max(0, at - now);
|
|
353
|
+
}
|
|
354
|
+
const named = /\b(\d{1,2}):(\d{2})(?::(\d{2}))? ?UTC\b/.exec(message);
|
|
355
|
+
if (named) {
|
|
356
|
+
const day = new Date(now);
|
|
357
|
+
let at = Date.UTC(day.getUTCFullYear(), day.getUTCMonth(), day.getUTCDate(), Number(named[1]), Number(named[2]), Number(named[3] ?? 0));
|
|
358
|
+
if (at < now) at += 864e5;
|
|
359
|
+
return at - now;
|
|
360
|
+
}
|
|
361
|
+
return null;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* A pool on the account: Boat's start caps (the paid ceilings when the account pays for starts
|
|
365
|
+
* past its plan), less the hour's starts already made, and the machines it would still run, are
|
|
366
|
+
* the account's limits; `maxConcurrent` caps the pool's own machines.
|
|
367
|
+
*/
|
|
368
|
+
const openBoatPool = async (sandbox, o) => openVmPool(boatService(sandbox), {
|
|
369
|
+
...boatSpec(sandbox),
|
|
370
|
+
...typeof o.image === "string" && { from: o.image }
|
|
371
|
+
}, await boatClient(sandbox, o.root), o.runId);
|
|
372
|
+
/** The pool of `spec`'s machines on `api`, within the start caps and machines its limits allow. */
|
|
373
|
+
async function openVmPool(service, spec, api, runId) {
|
|
374
|
+
const limits = await readLimits(service, api);
|
|
375
|
+
const k = spec.attemptsPerMachine ?? 1;
|
|
376
|
+
const free = limits ? Math.max(1, limits.maxActiveSandboxes - limits.activeSandboxes) : 1;
|
|
377
|
+
const caps = limits?.startLimitsWithWallet ?? limits?.startLimits;
|
|
378
|
+
const hourUsed = limits?.starts?.hour?.used ?? 0;
|
|
379
|
+
const left = caps?.perHour === void 0 ? null : caps.perHour - hourUsed;
|
|
380
|
+
return {
|
|
381
|
+
provider: vmPoolProvider(service, spec, api, runId),
|
|
382
|
+
options: {
|
|
383
|
+
limits: {
|
|
384
|
+
machines: free,
|
|
385
|
+
startsPerMinute: caps?.perMinute ?? null,
|
|
386
|
+
...service.starts === "per run" ? {
|
|
387
|
+
startsPerHour: null,
|
|
388
|
+
starts: left === null ? null : Math.max(0, left)
|
|
389
|
+
} : { startsPerHour: left === null ? null : Math.max(1, left) }
|
|
390
|
+
},
|
|
391
|
+
...spec.maxConcurrent && { machines: Math.ceil(spec.maxConcurrent / k) },
|
|
392
|
+
attemptsPerMachine: k,
|
|
393
|
+
reuse: spec.reuse ?? false
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
const limitsWarned = /* @__PURE__ */ new Set();
|
|
398
|
+
/**
|
|
399
|
+
* The account's limits, or null, warning once, when the service doesn't answer: the pool then
|
|
400
|
+
* runs one machine with no start caps of its own, holding back only when a start is refused.
|
|
401
|
+
*/
|
|
402
|
+
async function readLimits(service, api) {
|
|
403
|
+
try {
|
|
404
|
+
if (!api) throw new Error(`no ${service.name} client`);
|
|
405
|
+
return await api.limits({}, { signal: AbortSignal.timeout(LIMITS_TIMEOUT_MS) });
|
|
406
|
+
} catch (error) {
|
|
407
|
+
if (!limitsWarned.has(service.kind)) {
|
|
408
|
+
limitsWarned.add(service.kind);
|
|
409
|
+
console.warn(`warning: ${service.helper} couldn't read the account's limits (${error?.message ?? error}), so the run starts one machine at a time and runs its attemptsPerMachine attempts on it`);
|
|
410
|
+
}
|
|
411
|
+
return null;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
/** Starting, keeping and removing `spec`'s machines for the run's pool, in the main process. */
|
|
415
|
+
function vmPoolProvider(service, spec, api, runId) {
|
|
416
|
+
const { type, size } = spec;
|
|
417
|
+
const labels = {
|
|
418
|
+
...sandboxLabels(),
|
|
419
|
+
...runLabels(spec, runId)
|
|
420
|
+
};
|
|
421
|
+
const dirs = /* @__PURE__ */ new Map();
|
|
422
|
+
return {
|
|
423
|
+
helper: service.helper,
|
|
424
|
+
rateLimited: (error) => error instanceof BoatRateLimited ? { retryAfterMs: error.retryAfterMs } : null,
|
|
425
|
+
async keepAlive(id, ttlSeconds) {
|
|
426
|
+
const short = tooShort(service, id, ttlSeconds, (await api.update({
|
|
427
|
+
sandboxId: id,
|
|
428
|
+
updateSandboxRequest: { ttlSeconds }
|
|
429
|
+
}))?.sandbox?.ttlSeconds);
|
|
430
|
+
if (short) throw short;
|
|
431
|
+
},
|
|
432
|
+
async remove(id) {
|
|
433
|
+
await deleteSandbox(api, id).catch(() => {});
|
|
434
|
+
const dir = dirs.get(id);
|
|
435
|
+
dirs.delete(id);
|
|
436
|
+
if (dir) await rm(dir, {
|
|
437
|
+
recursive: true,
|
|
438
|
+
force: true
|
|
439
|
+
});
|
|
440
|
+
},
|
|
441
|
+
async start(signal, ttlSeconds) {
|
|
442
|
+
const vm = await startVm(service, api, {
|
|
443
|
+
name: `${runPrefix(spec, runId)}${randomBytes(3).toString("hex")}`,
|
|
444
|
+
type,
|
|
445
|
+
size,
|
|
446
|
+
ttlSeconds,
|
|
447
|
+
snapshots: false,
|
|
448
|
+
...spec.from !== void 0 && { from: spec.from },
|
|
449
|
+
labels,
|
|
450
|
+
signal
|
|
451
|
+
});
|
|
452
|
+
dirs.set(vm.id, vm.dir);
|
|
453
|
+
return {
|
|
454
|
+
id: vm.id,
|
|
455
|
+
info: vm.info
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Creates a machine named `name`, waits until it's ready and reachable over SSH with a key of its
|
|
462
|
+
* own, and returns it; one that fails on the way is deleted. The caller removes `dir` with it.
|
|
463
|
+
*/
|
|
464
|
+
async function startVm(service, api, o) {
|
|
465
|
+
const { name, type, size, ttlSeconds, signal } = o;
|
|
466
|
+
const dir = await mkdtemp(join(tmpdir(), `reeval-${service.kind}-`));
|
|
467
|
+
let id;
|
|
468
|
+
let ready = false;
|
|
469
|
+
try {
|
|
470
|
+
const key = await newKey(dir, service.name);
|
|
471
|
+
const made = await api.create({
|
|
472
|
+
idempotencyKey: name,
|
|
473
|
+
createSandboxRequest: {
|
|
474
|
+
type,
|
|
475
|
+
name,
|
|
476
|
+
ttlSeconds,
|
|
477
|
+
noEnv: true,
|
|
478
|
+
snapshots: o.snapshots,
|
|
479
|
+
...o.from !== void 0 && { from: o.from },
|
|
480
|
+
monitoring: false,
|
|
481
|
+
labels: o.labels
|
|
482
|
+
}
|
|
483
|
+
}).catch(async (error) => {
|
|
484
|
+
const why = await boatError(error);
|
|
485
|
+
if (status(error) === 429) {
|
|
486
|
+
const response = error.response;
|
|
487
|
+
throw new BoatRateLimited(`${service.name} is limiting starts: ${why}`, retryAfterMs(response?.headers.get("retry-after") ?? null, why));
|
|
488
|
+
}
|
|
489
|
+
if (status(error) === 403) throw new InfraError(`${service.name} won't start another sandbox for this ${service.scope}: ${why}`);
|
|
490
|
+
throw await serviceFailed(service, error, "didn't create a sandbox", why);
|
|
491
|
+
});
|
|
492
|
+
id = made.sandbox.id;
|
|
493
|
+
const short = tooShort(service, id, ttlSeconds, made.ttlSeconds ?? made.sandbox.ttlSeconds);
|
|
494
|
+
if (short) throw short;
|
|
495
|
+
await untilReady(service, api, id, signal);
|
|
496
|
+
ready = true;
|
|
497
|
+
const ssh = await api.sshKey({
|
|
498
|
+
sandboxId: id,
|
|
499
|
+
sshKeyRequest: { key: key.pub }
|
|
500
|
+
}).catch(async (error) => {
|
|
501
|
+
throw await serviceFailed(service, error, "didn't authorize the machine's SSH key");
|
|
502
|
+
});
|
|
503
|
+
const routes = sshRoutes(ssh);
|
|
504
|
+
if (!routes.length || !ssh.hostKey) throw new InfraError(`${service.name} gave sandbox ${id} no SSH address and host key to connect with`);
|
|
505
|
+
const knownHostsFile = join(dir, "known_hosts");
|
|
506
|
+
await writeFile(knownHostsFile, `${id} ${ssh.hostKey.trim()}\n`);
|
|
507
|
+
const reached = await firstReachable(routes, { signal });
|
|
508
|
+
signal.throwIfAborted();
|
|
509
|
+
if ("why" in reached) throw new InfraError(`${service.name} sandbox ${id} is up, but this host can't reach its SSH server: ${reached.why}`);
|
|
510
|
+
return {
|
|
511
|
+
id,
|
|
512
|
+
dir,
|
|
513
|
+
info: {
|
|
514
|
+
id,
|
|
515
|
+
name,
|
|
516
|
+
size,
|
|
517
|
+
host: reached.route.host,
|
|
518
|
+
port: reached.route.port,
|
|
519
|
+
route: routeLabel(reached.route),
|
|
520
|
+
user: ssh.sshUser ?? "user",
|
|
521
|
+
identityFile: key.file,
|
|
522
|
+
knownHostsFile
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
} catch (error) {
|
|
526
|
+
if (id && ready) await deleteSandbox(api, id).catch(() => {});
|
|
527
|
+
else if (id) await deleteUntilGone(api, id, { signal }).catch(() => {});
|
|
528
|
+
await rm(dir, {
|
|
529
|
+
recursive: true,
|
|
530
|
+
force: true
|
|
531
|
+
});
|
|
532
|
+
throw error;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
async function createBoatSandbox(descriptor, options) {
|
|
536
|
+
if (recipeOf(descriptor)) {
|
|
537
|
+
if (!options.base) throw new InfraError("The boat() sandbox's image wasn't prepared before the run started");
|
|
538
|
+
const { createVmContainerSandbox } = await import("./vm-container-BVn7pXfD.js");
|
|
539
|
+
return createVmContainerSandbox(descriptor, options.base, options, {
|
|
540
|
+
fn: "boat",
|
|
541
|
+
sandbox: "boat",
|
|
542
|
+
size: "small",
|
|
543
|
+
description: (info) => `boat sandbox ${info.id} (${info.size})`
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
return createPooledSshSandbox(descriptor, options, {
|
|
547
|
+
helper: "boat()",
|
|
548
|
+
sandbox: "boat",
|
|
549
|
+
size: descriptor.type ?? "small",
|
|
550
|
+
description: (info) => `boat sandbox ${info.id} (${info.size})`
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
/** Every sandbox on `sandbox`'s account whose name starts with `prefix`, across pages. */
|
|
554
|
+
async function sandboxesNamed(api, prefix, signal) {
|
|
555
|
+
const found = [];
|
|
556
|
+
let cursor;
|
|
557
|
+
do {
|
|
558
|
+
const page = await api.sandboxes({
|
|
559
|
+
namePrefix: prefix,
|
|
560
|
+
limit: 100,
|
|
561
|
+
...cursor && { cursor }
|
|
562
|
+
}, { signal });
|
|
563
|
+
found.push(...page.sandboxes.filter((s) => s.name.startsWith(prefix)));
|
|
564
|
+
cursor = page.pageInfo?.hasMore ? page.pageInfo.nextCursor ?? void 0 : void 0;
|
|
565
|
+
} while (cursor);
|
|
566
|
+
return found;
|
|
567
|
+
}
|
|
568
|
+
/** Deletes every sandbox on `api` whose name starts with `prefix`, waiting on it for so long. */
|
|
569
|
+
async function removeNamed(api, prefix) {
|
|
570
|
+
const signal = AbortSignal.timeout(CLEANUP_TIMEOUT_MS);
|
|
571
|
+
const left = await sandboxesNamed(api, prefix, signal).catch(() => []);
|
|
572
|
+
await Promise.all(left.map((s) => deleteSandbox(api, s.id, signal).catch(() => {})));
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Deletes every sandbox the run left on each account and prefix in `sandboxes`. Nothing else
|
|
576
|
+
* names them: another prefix, or another run's tag, is someone else's.
|
|
577
|
+
*/
|
|
578
|
+
async function removeRunSandboxes(runId, sandboxes) {
|
|
579
|
+
const seen = /* @__PURE__ */ new Set();
|
|
580
|
+
for (const sandbox of sandboxes) {
|
|
581
|
+
const prefix = runPrefix(sandbox, runId);
|
|
582
|
+
const key = `${sandbox.apiKey.from}\0${prefix}`;
|
|
583
|
+
if (seen.has(key) || boatKeyProblem(sandbox)) continue;
|
|
584
|
+
seen.add(key);
|
|
585
|
+
const api = await boatClient(sandbox).catch(() => null);
|
|
586
|
+
if (api) await removeNamed(api, prefix);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
const boatCapacity = async (sandbox) => vmCapacity(boatService(sandbox), boatSpec(sandbox), await boatClient(sandbox).catch(() => null));
|
|
590
|
+
/**
|
|
591
|
+
* Machines the service would still start for the account (its cap on sandboxes at once, less
|
|
592
|
+
* what's running), and the attempts the run's pool keeps going on them: a minute's starts' worth
|
|
593
|
+
* of machines at most, each running `attemptsPerMachine`.
|
|
594
|
+
*/
|
|
595
|
+
async function vmCapacity(service, spec, api) {
|
|
596
|
+
const limits = await readLimits(service, api);
|
|
597
|
+
const k = spec.attemptsPerMachine ?? 1;
|
|
598
|
+
if (!limits) return {
|
|
599
|
+
machines: 1,
|
|
600
|
+
attempts: Math.min(k, spec.maxConcurrent ?? k)
|
|
601
|
+
};
|
|
602
|
+
const machines = Math.max(0, limits.maxActiveSandboxes - limits.activeSandboxes);
|
|
603
|
+
const perMinute = (limits.startLimitsWithWallet ?? limits.startLimits)?.perMinute;
|
|
604
|
+
const attempts = Math.min(machines, perMinute ?? machines) * k;
|
|
605
|
+
return {
|
|
606
|
+
machines,
|
|
607
|
+
attempts: Math.max(1, Math.min(attempts, spec.maxConcurrent ?? attempts))
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Preflight's check of one account: the host has OpenSSH, the key is set, the SDK loads, Boat
|
|
612
|
+
* takes the key and would start the machine size asked for.
|
|
613
|
+
*/
|
|
614
|
+
const checkBoat = (sandbox, projectRoot) => checkVmService(boatService(sandbox), boatSpec(sandbox), () => boatClient(sandbox, projectRoot));
|
|
615
|
+
/**
|
|
616
|
+
* Preflight's check of a service: the labels parse, the host has OpenSSH, `client` makes a client,
|
|
617
|
+
* the service takes its credential and would start `spec`'s machine type.
|
|
618
|
+
*/
|
|
619
|
+
async function checkVmService(service, spec, client) {
|
|
620
|
+
const refuse = (message, usage) => new PrepareError({
|
|
621
|
+
class: "config",
|
|
622
|
+
stage: service.kind,
|
|
623
|
+
ref: null,
|
|
624
|
+
cause: null,
|
|
625
|
+
log: null,
|
|
626
|
+
usage,
|
|
627
|
+
message
|
|
628
|
+
});
|
|
629
|
+
let labels;
|
|
630
|
+
try {
|
|
631
|
+
labels = sandboxLabels();
|
|
632
|
+
} catch (error) {
|
|
633
|
+
throw refuse(error.message, true);
|
|
634
|
+
}
|
|
635
|
+
const reserved = Object.keys(labels).find((key) => service.reservedLabels && key.toLowerCase().startsWith(service.reservedLabels));
|
|
636
|
+
if (reserved) throw refuse(`${SANDBOX_LABELS} sets ${reserved}, and keys starting ${service.reservedLabels} are ${service.name}'s own`, true);
|
|
637
|
+
const own = Object.keys(runLabels(spec, "run")).length;
|
|
638
|
+
if (Object.keys(labels).length + own > service.maxLabels) throw refuse(`${SANDBOX_LABELS} sets more than the ${service.maxLabels - own} labels ${service.helper} takes beside reeval's own`, true);
|
|
639
|
+
const tool = await missingSshTool();
|
|
640
|
+
if (tool) throw refuse(`${service.helper} runs every command over SSH, and there's no ${tool} on PATH: install an OpenSSH client (openssh-client on Debian and Ubuntu)`, true);
|
|
641
|
+
const limits = await (await client()).limits({}, { signal: AbortSignal.timeout(LIMITS_TIMEOUT_MS) }).catch(async (error) => {
|
|
642
|
+
const code = status(error);
|
|
643
|
+
if (code === 401 || code === 403) throw refuse(`${service.name} refused ${service.credential}: ${await boatError(error)}`, true);
|
|
644
|
+
throw new PrepareError({
|
|
645
|
+
class: "transient",
|
|
646
|
+
stage: service.kind,
|
|
647
|
+
ref: null,
|
|
648
|
+
cause: null,
|
|
649
|
+
log: null,
|
|
650
|
+
message: `Couldn't reach ${service.name}: ${await boatError(error)}`
|
|
651
|
+
});
|
|
652
|
+
});
|
|
653
|
+
const machine = limits.machineTypes?.find((m) => m.type === spec.type);
|
|
654
|
+
if (machine && !machine.available) throw refuse(`${service.name} won't start a ${spec.size} machine on this ${service.scope}: ${machine.reason ?? "unavailable"}`, true);
|
|
655
|
+
if (!limits.canStart) throw refuse(`${service.name} won't start sandboxes on this ${service.scope}: ${limits.startBlockedReason ?? "no reason given"}`, false);
|
|
656
|
+
}
|
|
657
|
+
/** `reeval doctor`: the OpenSSH client, and each Boat account and machine size `sandboxes` use. */
|
|
658
|
+
async function boatDoctor(sandboxes, ctx) {
|
|
659
|
+
const accounts = /* @__PURE__ */ new Map();
|
|
660
|
+
for (const sandbox of sandboxes) accounts.set(`${sandbox.apiKey.from}\0${sandbox.type ?? "small"}`, sandbox);
|
|
661
|
+
if (!accounts.size) return [];
|
|
662
|
+
const missing = await ctx.deps.missingSshTool();
|
|
663
|
+
const checks = [missing ? {
|
|
664
|
+
id: "ssh",
|
|
665
|
+
status: "fail",
|
|
666
|
+
summary: `boat() runs every command over SSH, and there's no ${missing} on PATH`,
|
|
667
|
+
fix: "install an OpenSSH client (openssh-client on Debian and Ubuntu)"
|
|
668
|
+
} : {
|
|
669
|
+
id: "ssh",
|
|
670
|
+
status: "ok",
|
|
671
|
+
summary: "an OpenSSH client for boat()"
|
|
672
|
+
}];
|
|
673
|
+
for (const sandbox of accounts.values()) {
|
|
674
|
+
const key = sandbox.apiKey.from;
|
|
675
|
+
const type = sandbox.type ?? "small";
|
|
676
|
+
if (!ctx.deps.env[key]) {
|
|
677
|
+
checks.push({
|
|
678
|
+
id: "boat",
|
|
679
|
+
status: "fail",
|
|
680
|
+
summary: `boat() needs a Boat API key in ${key}, which isn't set`,
|
|
681
|
+
fix: `set ${key} in ${ctx.envFile}`
|
|
682
|
+
});
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
try {
|
|
686
|
+
await ctx.deps.boatAccount(sandbox, ctx.root, ctx.online);
|
|
687
|
+
checks.push({
|
|
688
|
+
id: "boat",
|
|
689
|
+
status: "ok",
|
|
690
|
+
summary: ctx.online ? `Boat takes the key in ${key} and starts ${type} machines` : `the Boat SDK loads, and ${key} is set (--online asks Boat whether it takes the key)`
|
|
691
|
+
});
|
|
692
|
+
} catch (error) {
|
|
693
|
+
checks.push({
|
|
694
|
+
id: "boat",
|
|
695
|
+
status: "fail",
|
|
696
|
+
summary: redactSecrets(error.message)
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
return checks;
|
|
701
|
+
}
|
|
702
|
+
export { vmPoolProvider as A, retryAfterMs as C, sshRoutes as D, runTag as E, sandboxLabels as M, startVm as O, removeRunSandboxes as S, runPrefix as T, firstReachable as _, INSTALL_SDK as a, openVmPool as b, boatDoctor as c, boatService as d, checkBoat as f, deleteUntilGone as g, deleteSandbox as h, DEAD_STATES as i, optionalPeer as j, vmCapacity as k, boatError as l, createBoatSandbox as m, BOAT_SDK as n, boatCapacity as o, checkVmService as p, BoatRateLimited as r, boatClient as s, BOAT_BASE_URL as t, boatKeyProblem as u, loadBoatSdk as v, runLabels as w, removeNamed as x, openBoatPool as y };
|
|
703
|
+
|
|
704
|
+
//# sourceMappingURL=boat-DKjqo_ie.js.map
|