reeval 0.6.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +265 -0
- package/THIRD_PARTY_NOTICES.md +5 -5
- package/assets/package.json +1 -1
- package/assets/pnpm-lock.yaml +30 -307
- package/dist/{agent-DKuFnZPM.js → agent-B72lZ6w5.js} +6 -6
- package/dist/{agent-DKuFnZPM.js.map → agent-B72lZ6w5.js.map} +1 -1
- package/dist/{agent-oirN_8IS.js → agent-Cfj1wD4D.js} +5 -5
- package/dist/{agent-oirN_8IS.js.map → agent-Cfj1wD4D.js.map} +1 -1
- package/dist/{analysis-BV3TCznv.js → analysis-BTNnKh1w.js} +4 -4
- package/dist/{analysis-BV3TCznv.js.map → analysis-BTNnKh1w.js.map} +1 -1
- package/dist/{assemble-DYCDgbTq.js → assemble-BbFVjHeS.js} +125 -14
- package/dist/assemble-BbFVjHeS.js.map +1 -0
- package/dist/assemble-CXiTVyHD.js +2 -0
- package/dist/bridge/index.mjs +66 -7
- package/dist/bridge/package.json +3 -3
- package/dist/bridge/pnpm-lock.yaml +84 -89
- package/dist/capture-BXhBfmsM.js +1206 -0
- package/dist/capture-BXhBfmsM.js.map +1 -0
- package/dist/capture-N7r3yeak.js +2 -0
- package/dist/{cli-BIhzl_v_.js → cli-BMjTKY-D.js} +151 -193
- package/dist/cli-BMjTKY-D.js.map +1 -0
- package/dist/{cli-spec-DUeyuSIQ.js → cli-spec-DSvKsOK4.js} +25 -11
- package/dist/cli-spec-DSvKsOK4.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/client-CwzU9CiW.js +256 -0
- package/dist/client-CwzU9CiW.js.map +1 -0
- package/dist/{command-B8tcwUJk.js → command-BK4kOgkH.js} +15 -15
- package/dist/{command-B8tcwUJk.js.map → command-BK4kOgkH.js.map} +1 -1
- package/dist/{command-fJpZK205.js → command-BdstSEHu.js} +7 -7
- package/dist/{command-fJpZK205.js.map → command-BdstSEHu.js.map} +1 -1
- package/dist/{command-DuJBqcwu.js → command-BqJtFiPy.js} +153 -36
- package/dist/command-BqJtFiPy.js.map +1 -0
- package/dist/command-CTVGuH8y.js +2 -0
- package/dist/{command-KoOJ0ntD.js → command-JPGNzFsA.js} +9 -9
- package/dist/{command-KoOJ0ntD.js.map → command-JPGNzFsA.js.map} +1 -1
- package/dist/{commands-CHdTfPB6.js → commands-B618jg3C.js} +6 -6
- package/dist/{commands-CHdTfPB6.js.map → commands-B618jg3C.js.map} +1 -1
- package/dist/{commands-DE604ldB.js → commands-Duo2ur3r.js} +1 -1
- package/dist/{config-7-gXOgQf.js → config-B-E0xRkf.js} +4 -4
- package/dist/{config-7-gXOgQf.js.map → config-B-E0xRkf.js.map} +1 -1
- package/dist/db-CnoUy-FZ.js +3 -0
- package/dist/{db-DvkzBhM6.js → db-DFbtGIYy.js} +84 -37
- package/dist/db-DFbtGIYy.js.map +1 -0
- package/dist/{dist-DsZNsoD3.js → dist-CTzThfu_.js} +3 -3
- package/dist/{dist-DsZNsoD3.js.map → dist-CTzThfu_.js.map} +1 -1
- package/dist/{docker-BBOMThRi.js → docker-2qns7hJ2.js} +4 -4
- package/dist/{docker-BBOMThRi.js.map → docker-2qns7hJ2.js.map} +1 -1
- package/dist/{docker-CiNVc7di.js → docker-D6t23fZl.js} +1 -1
- package/dist/{docker-CzFiN2AZ.js → docker-IFRW8K5f.js} +2 -2
- package/dist/{docker-CzFiN2AZ.js.map → docker-IFRW8K5f.js.map} +1 -1
- package/dist/{doctor-C06kYs2r.js → doctor-B6oYTPoR.js} +11 -11
- package/dist/{doctor-C06kYs2r.js.map → doctor-B6oYTPoR.js.map} +1 -1
- package/dist/{egress-De64jpeQ.js → egress-IUKdeayc.js} +17 -10
- package/dist/egress-IUKdeayc.js.map +1 -0
- package/dist/fake-instructions-CUI33I_F.js +32 -0
- package/dist/fake-instructions-CUI33I_F.js.map +1 -0
- package/dist/{files-BqIF7iu4.js → files-B6aVVGrk.js} +3 -3
- package/dist/{files-BqIF7iu4.js.map → files-B6aVVGrk.js.map} +1 -1
- package/dist/files-BpYgF2z0.js +2 -0
- package/dist/{files-Cq99wif-.js → files-CMSUXAEg.js} +16 -5
- package/dist/{files-Cq99wif-.js.map → files-CMSUXAEg.js.map} +1 -1
- package/dist/files-YCCVaTQC.js +2 -0
- package/dist/{git-Dnl-kXgD.js → git-EmdFJ4DY.js} +2 -2
- package/dist/{git-Dnl-kXgD.js.map → git-EmdFJ4DY.js.map} +1 -1
- package/dist/{harness-3QUEWx8G.js → harness-iqWeJQMM.js} +35 -12
- package/dist/harness-iqWeJQMM.js.map +1 -0
- package/dist/harness.d.ts +22 -11
- package/dist/harness.js +1 -1
- package/dist/{header-IE-uIvX0.js → header-_F0EWob3.js} +2 -2
- package/dist/{header-IE-uIvX0.js.map → header-_F0EWob3.js.map} +1 -1
- package/dist/{images-B8Mp_VXZ.js → images-CscddrJU.js} +6 -6
- package/dist/{images-B8Mp_VXZ.js.map → images-CscddrJU.js.map} +1 -1
- package/dist/index.d.ts +13 -8
- package/dist/index.js +99 -24
- package/dist/index.js.map +1 -1
- package/dist/init-DBHyi92L.js +2 -0
- package/dist/{init-B8mw86E6.js → init-NQfIvi-0.js} +4 -4
- package/dist/{init-B8mw86E6.js.map → init-NQfIvi-0.js.map} +1 -1
- package/dist/{invocations-DHC946b-.js → invocations-nPvrlZPj.js} +3 -3
- package/dist/{invocations-DHC946b-.js.map → invocations-nPvrlZPj.js.map} +1 -1
- package/dist/{judge-7WjNdU9z.js → judge-CeYPN8P_.js} +2 -2
- package/dist/{judge-7WjNdU9z.js.map → judge-CeYPN8P_.js.map} +1 -1
- package/dist/judge.d.ts +5 -4
- package/dist/judge.js +4 -3
- package/dist/judge.js.map +1 -1
- package/dist/{live-DZkCtmNP.js → live-S0qODb6o.js} +2 -2
- package/dist/{live-DZkCtmNP.js.map → live-S0qODb6o.js.map} +1 -1
- package/dist/model-BbLGRtOs.js +2 -0
- package/dist/{model-CtrJdFi6.js → model-BndnmcLm.js} +241 -26
- package/dist/model-BndnmcLm.js.map +1 -0
- package/dist/{model-Cp6NoAT3.js → model-Cl507trk.js} +8 -7
- package/dist/model-Cl507trk.js.map +1 -0
- package/dist/{model-Bv8uUZ07.js → model-DEQo3FkZ.js} +6 -6
- package/dist/model-DEQo3FkZ.js.map +1 -0
- package/dist/{model-BeoRxCcJ.js → model-DMOraCcm.js} +1 -1
- package/dist/{opencode-providers-DjlA5fuC.js → opencode-providers-ByD85Q0l.js} +21 -7
- package/dist/{opencode-providers-DjlA5fuC.js.map → opencode-providers-ByD85Q0l.js.map} +1 -1
- package/dist/{options-CWYB613o.js → options-DPUlm4FI.js} +152 -29
- package/dist/options-DPUlm4FI.js.map +1 -0
- package/dist/pairs-DDsjgm5F.js +149 -0
- package/dist/pairs-DDsjgm5F.js.map +1 -0
- package/dist/{plan-CsPE24pp.js → plan-PPc4-6xd.js} +35 -18
- package/dist/plan-PPc4-6xd.js.map +1 -0
- package/dist/{preflight-r0DgibQV.js → preflight-CddycK92.js} +3 -3
- package/dist/{preflight-r0DgibQV.js.map → preflight-CddycK92.js.map} +1 -1
- package/dist/{preflight-DKZjb7ZH.js → preflight-Zumy0adT.js} +1 -1
- package/dist/{prepare-DOkvAa9D.js → prepare-CKdMoC7e.js} +2 -2
- package/dist/{prepare-CTLg3nuk.js → prepare-CsP-057p.js} +4 -4
- package/dist/{prepare-CTLg3nuk.js.map → prepare-CsP-057p.js.map} +1 -1
- package/dist/{provenance--cVNo80L.js → provenance-CsX6PHDR.js} +2 -2
- package/dist/{provenance--cVNo80L.js.map → provenance-CsX6PHDR.js.map} +1 -1
- package/dist/{providers-DNLQzVnc.js → providers-DkwiLKDS.js} +3 -3
- package/dist/{providers-DNLQzVnc.js.map → providers-DkwiLKDS.js.map} +1 -1
- package/dist/{providers-B2cSfewm.js → providers-yXZZcPfx.js} +1 -1
- package/dist/{query-DTtIZaua.js → query-BUcwCYsI.js} +2 -2
- package/dist/{query-DTtIZaua.js.map → query-BUcwCYsI.js.map} +1 -1
- package/dist/query-noGbekGF.js +2 -0
- package/dist/{questions-ZdT3JDyQ.js → questions-BEPj98fZ.js} +27 -118
- package/dist/questions-BEPj98fZ.js.map +1 -0
- package/dist/{record-CbuQH4l1.js → record-BRP9vZrj.js} +21 -1
- package/dist/record-BRP9vZrj.js.map +1 -0
- package/dist/results-BcSHWbgB.js +52 -0
- package/dist/results-BcSHWbgB.js.map +1 -0
- package/dist/resume-DZ9AmfPv.js +406 -0
- package/dist/resume-DZ9AmfPv.js.map +1 -0
- package/dist/{matchers-Bp-OH1vj.js → runtime-Dfb2r-cS.js} +2 -179
- package/dist/runtime-Dfb2r-cS.js.map +1 -0
- package/dist/sandbox.d.ts +1 -1
- package/dist/{server-BFlKK2j6.js → server-Da60oe4b.js} +9 -9
- package/dist/{server-BFlKK2j6.js.map → server-Da60oe4b.js.map} +1 -1
- package/dist/server-DiGR4JxK.js +2 -0
- package/dist/{source-B2ASbTdc.js → source-BVOnL3sn.js} +2 -2
- package/dist/{source-B2ASbTdc.js.map → source-BVOnL3sn.js.map} +1 -1
- package/dist/source-Dqu0jKwx.js +2 -0
- package/dist/src-BHNiP-5A.js +4 -0
- package/dist/{src-CDiGyoDt.js → src-BT4dB5CO.js} +1 -1
- package/dist/src-BT5pwco0.js +3 -0
- package/dist/src-BrMbt1B2.js +3 -0
- package/dist/{src-s-VffoYK.js → src-C1E9HDWO.js} +5 -3
- package/dist/{src-s-VffoYK.js.map → src-C1E9HDWO.js.map} +1 -1
- package/dist/{src-CqsERnCZ.js → src-CxTC5kNI.js} +10 -6
- package/dist/{src-CqsERnCZ.js.map → src-CxTC5kNI.js.map} +1 -1
- package/dist/src-D13vpMh0.js +3 -0
- package/dist/{src-DxFJrMUA.js → src-D95O-Smv.js} +12 -7
- package/dist/{src-DxFJrMUA.js.map → src-D95O-Smv.js.map} +1 -1
- package/dist/{src-CVoCJjEe.js → src-DDNXsD9H.js} +29 -5
- package/dist/{src-CVoCJjEe.js.map → src-DDNXsD9H.js.map} +1 -1
- package/dist/{src-DSE0FWaU.js → src-DVy58-zZ.js} +2 -2
- package/dist/{src-DSE0FWaU.js.map → src-DVy58-zZ.js.map} +1 -1
- package/dist/{src-BHFNhTTQ.js → src-D_cXqmnI.js} +59 -49
- package/dist/{src-BHFNhTTQ.js.map → src-D_cXqmnI.js.map} +1 -1
- package/dist/src-DdRlaiRc.js +3 -0
- package/dist/{src-zOeHvrzR.js → src-TdJuDYqB.js} +13 -13
- package/dist/{src-zOeHvrzR.js.map → src-TdJuDYqB.js.map} +1 -1
- package/dist/src-xczuQbE6.js +3 -0
- package/dist/{state-DBKcUJ2u.js → state-B72h_jEw.js} +14 -14
- package/dist/{state-DBKcUJ2u.js.map → state-B72h_jEw.js.map} +1 -1
- package/dist/state-Bf_Vq_pV.js +2 -0
- package/dist/studio-app/assets/{index-WQPq5K3E.js → index-Bgr-efZm.js} +9 -9
- package/dist/studio-app/index.html +1 -1
- package/dist/{summary-BBABbon9.js → summary-CJdxaRdM.js} +7 -7
- package/dist/{summary-BBABbon9.js.map → summary-CJdxaRdM.js.map} +1 -1
- package/dist/{summary-CahgSiVt.js → summary-k3mhWWXv.js} +8 -4
- package/dist/summary-k3mhWWXv.js.map +1 -0
- package/dist/testing.d.ts +14 -0
- package/dist/testing.js +2 -0
- package/dist/tool-target-BU1JnSE9.js +34 -0
- package/dist/tool-target-BU1JnSE9.js.map +1 -0
- package/dist/{tools-53YHomyk.js → tools-D0gF2QoV.js} +3 -3
- package/dist/{tools-53YHomyk.js.map → tools-D0gF2QoV.js.map} +1 -1
- package/dist/{types-CoAfC-_k.d.ts → types-_LOFdPUf.d.ts} +266 -36
- package/dist/{usage-DsYUqIUM.js → usage-DDF_6tkV.js} +4 -2
- package/dist/{usage-DsYUqIUM.js.map → usage-DDF_6tkV.js.map} +1 -1
- package/dist/view/index.d.ts +19 -6
- package/dist/view/index.js +6 -6
- package/dist/{views-Drl2OXuj.js → views-DZ1YDqey.js} +4 -4
- package/dist/{views-Drl2OXuj.js.map → views-DZ1YDqey.js.map} +1 -1
- package/dist/views-Ds0GXWtX.js +3 -0
- package/dist/{worker-entry-mCctDzig.js → worker-entry-DXeyWY-m.js} +73 -2
- package/dist/worker-entry-DXeyWY-m.js.map +1 -0
- package/dist/{workspace-BT4jd04k.js → workspace-DpXdrslo.js} +3 -3
- package/dist/{workspace-BT4jd04k.js.map → workspace-DpXdrslo.js.map} +1 -1
- package/dist/{workspace-U6M1gKzo.js → workspace-DzNL-3iO.js} +1 -1
- package/package.json +14 -8
- package/dist/assemble-DYCDgbTq.js.map +0 -1
- package/dist/assemble-DykFydSU.js +0 -2
- package/dist/capture-CisAmy-G.js +0 -587
- package/dist/capture-CisAmy-G.js.map +0 -1
- package/dist/capture-DquyqAHC.js +0 -2
- package/dist/cli-BIhzl_v_.js.map +0 -1
- package/dist/cli-spec-DUeyuSIQ.js.map +0 -1
- package/dist/command-CwuwuKJD.js +0 -2
- package/dist/command-DuJBqcwu.js.map +0 -1
- package/dist/db-BVE1kZ2w.js +0 -2
- package/dist/db-DvkzBhM6.js.map +0 -1
- package/dist/egress-De64jpeQ.js.map +0 -1
- package/dist/files-Cs8tbYQY.js +0 -2
- package/dist/files-wUtoO5aA.js +0 -2
- package/dist/harness-3QUEWx8G.js.map +0 -1
- package/dist/init-DDEpamaf.js +0 -2
- package/dist/matchers-Bp-OH1vj.js.map +0 -1
- package/dist/model-Bv8uUZ07.js.map +0 -1
- package/dist/model-C_B5JrhL.js +0 -2
- package/dist/model-Cp6NoAT3.js.map +0 -1
- package/dist/model-CtrJdFi6.js.map +0 -1
- package/dist/options-CWYB613o.js.map +0 -1
- package/dist/plan-CsPE24pp.js.map +0 -1
- package/dist/query-BWc_5Lhe.js +0 -2
- package/dist/questions-ZdT3JDyQ.js.map +0 -1
- package/dist/record-CbuQH4l1.js.map +0 -1
- package/dist/results-CrFs7_In.js +0 -37
- package/dist/results-CrFs7_In.js.map +0 -1
- package/dist/server-HRUHVcHc.js +0 -2
- package/dist/source-Co7h89WK.js +0 -2
- package/dist/src-BE19tji4.js +0 -3
- package/dist/src-Bo8GFUXg.js +0 -3
- package/dist/src-BoziVhKa.js +0 -3
- package/dist/src-CFxHPwQA.js +0 -3
- package/dist/src-CPkDaNxp.js +0 -3
- package/dist/src-D-go5-qz.js +0 -4
- package/dist/state-BaHjYXr1.js +0 -2
- package/dist/stats-BNAHlNMD.js +0 -114
- package/dist/stats-BNAHlNMD.js.map +0 -1
- package/dist/summary-CahgSiVt.js.map +0 -1
- package/dist/views-BhGinAz_.js +0 -3
- package/dist/worker-entry-mCctDzig.js.map +0 -1
|
@@ -5,25 +5,25 @@ import { o as redactSecrets, s as registerSecret } from "./redact-DJ9JCShu.js";
|
|
|
5
5
|
import { o as PACKAGE_VERSION } from "./root-CvdRlRZX.js";
|
|
6
6
|
import { T as workspaceLabel, u as environmentSandbox } from "./environment-DiCljXMD.js";
|
|
7
7
|
import { a as fromCwd, i as evalSlug, n as attemptKey, o as newRunId } from "./ids-Bp6ut7ZD.js";
|
|
8
|
-
import { I as LABEL, X as imageInfo } from "./src-
|
|
9
|
-
import { d as sandboxId, s as harnessId } from "./options-
|
|
10
|
-
import { c as hostCapacity, d as missingCredentials, f as resolveConcurrency, i as configPathFor, l as loadConfig, p as selectProfile, r as configLabel, s as findConfig, u as malformedCredentials } from "./config-
|
|
8
|
+
import { I as LABEL, X as imageInfo } from "./src-TdJuDYqB.js";
|
|
9
|
+
import { d as sandboxId, s as harnessId } from "./options-DPUlm4FI.js";
|
|
10
|
+
import { c as hostCapacity, d as missingCredentials, f as resolveConcurrency, i as configPathFor, l as loadConfig, p as selectProfile, r as configLabel, s as findConfig, u as malformedCredentials } from "./config-B-E0xRkf.js";
|
|
11
11
|
import { s as debugTime } from "./debug-D24NOQH1.js";
|
|
12
12
|
import { i as sandboxWarningLine, n as clip, r as formatDuration } from "./text-gEcKjAyp.js";
|
|
13
13
|
import { t as PrepareError } from "./provider-CmAYTQQs.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { a as liftLabel, i as gateLabel, n as answersLabel } from "./summary-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
14
|
+
import { H as cellContrast, L as judgeRatesLabel, M as cellJudgeRates, N as cellUsage, P as collapsedJudgeLabel, _ as hasUngatedCells, b as isUngatedMiss, h as formatUsage, q as effortLabel, w as runOutcome } from "./model-BndnmcLm.js";
|
|
15
|
+
import { a as sampleReasons } from "./pairs-DDsjgm5F.js";
|
|
16
|
+
import { a as liftLabel, i as gateLabel, n as answersLabel } from "./summary-k3mhWWXv.js";
|
|
17
|
+
import { c as writeLiveProgress, i as prepareResume, o as resolveResume, r as loadPrevious, s as writeCurrent, t as completedKeysFor } from "./resume-DZ9AmfPv.js";
|
|
18
|
+
import { n as FLAGS, o as helpText, r as GLOBAL, t as COMMANDS } from "./cli-spec-DSvKsOK4.js";
|
|
19
|
+
import { i as runtimeInfo, n as gitInfo, r as runnerInfo, t as author } from "./provenance-CsX6PHDR.js";
|
|
19
20
|
import { t as budgetMarker } from "./budget-DBUrH4jX.js";
|
|
20
|
-
import { n as prepareAll, o as writePrepared, r as prepareTargets, t as RunStopError } from "./preflight-
|
|
21
|
-
import { r as imageHarness } from "./prepare-
|
|
22
|
-
import { n as createProviders } from "./providers-
|
|
23
|
-
import { a as redactArgv, r as commandOf, t as logInvocation } from "./invocations-
|
|
21
|
+
import { n as prepareAll, o as writePrepared, r as prepareTargets, t as RunStopError } from "./preflight-CddycK92.js";
|
|
22
|
+
import { r as imageHarness } from "./prepare-CsP-057p.js";
|
|
23
|
+
import { n as createProviders } from "./providers-DkwiLKDS.js";
|
|
24
|
+
import { a as redactArgv, r as commandOf, t as logInvocation } from "./invocations-nPvrlZPj.js";
|
|
24
25
|
import { n as stripAnsi, t as colors } from "./colors-QV9dFVhN.js";
|
|
25
|
-
import { existsSync, mkdirSync, readdirSync,
|
|
26
|
-
import { hostname } from "node:os";
|
|
26
|
+
import { existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs";
|
|
27
27
|
import { dirname, join } from "node:path";
|
|
28
28
|
import { appendFile, readFile, rm } from "node:fs/promises";
|
|
29
29
|
import { inspect } from "node:util";
|
|
@@ -32,7 +32,7 @@ import { Command, Option } from "commander";
|
|
|
32
32
|
//#region src/cli-parse.ts
|
|
33
33
|
const OPTIONS = Object.fromEntries(Object.entries(FLAGS).map(([name, spec]) => {
|
|
34
34
|
const short = "short" in spec ? `-${spec.short}, ` : "";
|
|
35
|
-
const value = spec.type === "string" ? " <value>" : "";
|
|
35
|
+
const value = spec.type === "string" ? "optional" in spec && spec.optional ? " [value]" : " <value>" : "";
|
|
36
36
|
return [name, () => {
|
|
37
37
|
const option = new Option(`${short}--${name}${value}`);
|
|
38
38
|
if ("multiple" in spec && spec.multiple) option.argParser((v, prev = []) => [...prev, spec.type === "string" ? v : true]);
|
|
@@ -108,7 +108,10 @@ function valuesOf(command, flags) {
|
|
|
108
108
|
const value = option && opts[option.attributeName()];
|
|
109
109
|
if (option?.negate) {
|
|
110
110
|
if (value === false) values[flag] = true;
|
|
111
|
-
} else if (value !== void 0)
|
|
111
|
+
} else if (value !== void 0) {
|
|
112
|
+
const spec = FLAGS[flag];
|
|
113
|
+
values[flag] = spec.type === "string" && "optional" in spec && spec.optional && value === true ? "" : value;
|
|
114
|
+
}
|
|
112
115
|
}
|
|
113
116
|
return values;
|
|
114
117
|
}
|
|
@@ -127,118 +130,6 @@ function usageError(error, command) {
|
|
|
127
130
|
}
|
|
128
131
|
return new UsageError(first.charAt(0).toUpperCase() + first.slice(1));
|
|
129
132
|
}
|
|
130
|
-
function finished(result) {
|
|
131
|
-
const outcome = result.meta?.outcome;
|
|
132
|
-
if (result.state === "skipped") return outcome === "fail" || outcome === "infra_error" ? outcome : "skipped";
|
|
133
|
-
if (outcome === "infra_error") return "infra_error";
|
|
134
|
-
return result.state === "passed" ? "pass" : "fail";
|
|
135
|
-
}
|
|
136
|
-
/** Sharing-violation codes Windows uses while a reader has `to` open. */
|
|
137
|
-
const BUSY = /* @__PURE__ */ new Set([
|
|
138
|
-
"EPERM",
|
|
139
|
-
"EACCES",
|
|
140
|
-
"EBUSY"
|
|
141
|
-
]);
|
|
142
|
-
/** How long a busy rename is retried. A studio poll holds the file for a few milliseconds. */
|
|
143
|
-
const BUSY_MS = 1e3;
|
|
144
|
-
function pause(ms) {
|
|
145
|
-
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Renames `from` over `to`. Windows refuses while a reader (`reeval studio`) has `to` open, for a
|
|
149
|
-
* moment: try again for up to a second rather than drop the update.
|
|
150
|
-
*/
|
|
151
|
-
function replace(from, to, rename = renameSync, hooks = {}) {
|
|
152
|
-
const now = hooks.now ?? Date.now;
|
|
153
|
-
const wait = hooks.wait ?? pause;
|
|
154
|
-
const deadline = now() + (hooks.busyMs ?? BUSY_MS);
|
|
155
|
-
for (let attempt = 1;; attempt++) try {
|
|
156
|
-
rename(from, to);
|
|
157
|
-
return;
|
|
158
|
-
} catch (error) {
|
|
159
|
-
const code = error.code;
|
|
160
|
-
if (!code || !BUSY.has(code) || now() >= deadline) throw error;
|
|
161
|
-
wait(Math.min(attempt, 32));
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
/** Writes the file at once, then on every change and heartbeat. Write errors never fail the run. */
|
|
165
|
-
function writeLiveProgress(options) {
|
|
166
|
-
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
167
|
-
const file = join(options.dir, LIVE_FILE);
|
|
168
|
-
const tmp = `${file}.${process.pid}.tmp`;
|
|
169
|
-
const attempts = new Map(options.planned.map((p) => [p.key, {
|
|
170
|
-
key: p.key,
|
|
171
|
-
evalId: p.id,
|
|
172
|
-
name: p.attempt.name,
|
|
173
|
-
file: p.file,
|
|
174
|
-
cell: p.attempt.cell.key,
|
|
175
|
-
n: p.attempt.n,
|
|
176
|
-
status: p.attempt.plan.skip ? "skipped" : "queued",
|
|
177
|
-
startedAt: null,
|
|
178
|
-
durationMs: null
|
|
179
|
-
}]));
|
|
180
|
-
let phase = "running";
|
|
181
|
-
let stopped = false;
|
|
182
|
-
const read = () => {
|
|
183
|
-
const list = [...attempts.values()];
|
|
184
|
-
return {
|
|
185
|
-
schemaVersion: 1,
|
|
186
|
-
runId: options.runId,
|
|
187
|
-
startedAt: options.startedAt.toISOString(),
|
|
188
|
-
pid: process.pid,
|
|
189
|
-
host: hostname(),
|
|
190
|
-
heartbeatAt: now().toISOString(),
|
|
191
|
-
phase,
|
|
192
|
-
planned: list.length,
|
|
193
|
-
counts: liveCounts(list),
|
|
194
|
-
attempts: list
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
const write = () => {
|
|
198
|
-
if (stopped) return;
|
|
199
|
-
try {
|
|
200
|
-
writeFileSync(tmp, JSON.stringify(read()));
|
|
201
|
-
replace(tmp, file);
|
|
202
|
-
} catch {}
|
|
203
|
-
};
|
|
204
|
-
try {
|
|
205
|
-
mkdirSync(options.dir, { recursive: true });
|
|
206
|
-
} catch {}
|
|
207
|
-
write();
|
|
208
|
-
const heartbeat = setInterval(write, options.heartbeatMs ?? 2e3);
|
|
209
|
-
heartbeat.unref();
|
|
210
|
-
const stop = () => {
|
|
211
|
-
stopped = true;
|
|
212
|
-
clearInterval(heartbeat);
|
|
213
|
-
};
|
|
214
|
-
return {
|
|
215
|
-
start(key, at) {
|
|
216
|
-
const a = attempts.get(key);
|
|
217
|
-
if (!a) return;
|
|
218
|
-
a.status = "running";
|
|
219
|
-
a.startedAt = new Date(at).toISOString();
|
|
220
|
-
write();
|
|
221
|
-
},
|
|
222
|
-
end(result) {
|
|
223
|
-
const a = attempts.get(result.key);
|
|
224
|
-
if (!a) return;
|
|
225
|
-
a.status = finished(result);
|
|
226
|
-
a.durationMs = result.durationMs;
|
|
227
|
-
write();
|
|
228
|
-
},
|
|
229
|
-
phase(next) {
|
|
230
|
-
phase = next;
|
|
231
|
-
write();
|
|
232
|
-
},
|
|
233
|
-
stop,
|
|
234
|
-
remove() {
|
|
235
|
-
stop();
|
|
236
|
-
rmSync(file, { force: true });
|
|
237
|
-
rmSync(tmp, { force: true });
|
|
238
|
-
},
|
|
239
|
-
read
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
133
|
//#endregion
|
|
243
134
|
//#region src/preflight.ts
|
|
244
135
|
/** How the terminal names a sandbox to prepare: its cell id, `+ install`, and a harness other than Cursor. */
|
|
@@ -578,9 +469,9 @@ function cellRows(c, e, indent) {
|
|
|
578
469
|
}
|
|
579
470
|
/** One row per compare question: its win rates, or why it has none. They never gate. */
|
|
580
471
|
function questionRows(c, e, indent) {
|
|
581
|
-
return (e.answers ?? []).
|
|
472
|
+
return (e.answers ?? []).flatMap((a) => {
|
|
582
473
|
const label = answersLabel(a);
|
|
583
|
-
return `${indent}${c.dim("question")} ${a.error !== void 0 ? c.yellow(label) : label}
|
|
474
|
+
return [`${indent}${c.dim("question")} ${a.error !== void 0 ? c.yellow(label) : label}`, ...sampleReasons(a.votes).map((reason) => `${indent} ${c.dim(reason)}`)];
|
|
584
475
|
});
|
|
585
476
|
}
|
|
586
477
|
/** The run's evals as a file › group tree, one row per eval and per cell of a matrix. */
|
|
@@ -793,7 +684,7 @@ var AgentRenderer = class {
|
|
|
793
684
|
for (const w of e.sandboxWarnings ?? []) this.#write(sandboxWarningLine(w));
|
|
794
685
|
return;
|
|
795
686
|
case "run-start":
|
|
796
|
-
this.#write(`reeval run: ${e.files} eval file${e.files === 1 ? "" : "s"}`);
|
|
687
|
+
this.#write(`reeval run: ${e.runId} · ${e.files} eval file${e.files === 1 ? "" : "s"}`);
|
|
797
688
|
return;
|
|
798
689
|
case "collected":
|
|
799
690
|
this.#tags.addFile(e.evals);
|
|
@@ -839,7 +730,10 @@ var AgentRenderer = class {
|
|
|
839
730
|
if (outcome === "cancelled" && !this.#printed.has(result.key)) this.#failure(result, attempt.cell, attempt.n);
|
|
840
731
|
}
|
|
841
732
|
for (const error of e.unhandledErrors) this.#write(`ERROR ${error}`);
|
|
842
|
-
for (const entry of e.record.evals) for (const a of entry.answers ?? [])
|
|
733
|
+
for (const entry of e.record.evals) for (const a of entry.answers ?? []) {
|
|
734
|
+
this.#write(`question ${entry.id}: ${answersLabel(a)}`);
|
|
735
|
+
for (const reason of sampleReasons(a.votes)) this.#write(` ${reason}`);
|
|
736
|
+
}
|
|
843
737
|
const s = e.record.summary;
|
|
844
738
|
const cancelled = failing.filter((f) => f.outcome === "cancelled").length;
|
|
845
739
|
const parts = [
|
|
@@ -946,7 +840,7 @@ var PlainRenderer = class {
|
|
|
946
840
|
const files = `${e.files} eval file${e.files === 1 ? "" : "s"}`;
|
|
947
841
|
const order = `${this.#o.output.logOrder} logs`;
|
|
948
842
|
const setup = `harness ${e.harness} · sandbox ${e.sandbox} · concurrency ${e.concurrency}`;
|
|
949
|
-
this.#write(c.dim(`reeval ${e.version} · ${files} · ${setup} · ${order}`));
|
|
843
|
+
this.#write(c.dim(`reeval ${e.version} · run ${e.runId} · ${files} · ${setup} · ${order}`));
|
|
950
844
|
return;
|
|
951
845
|
}
|
|
952
846
|
case "plan":
|
|
@@ -1226,7 +1120,7 @@ async function run(argv) {
|
|
|
1226
1120
|
return values.help ? EXIT.ok : EXIT.usage;
|
|
1227
1121
|
}
|
|
1228
1122
|
if (command === "init") {
|
|
1229
|
-
const { initCommand } = await import("./init-
|
|
1123
|
+
const { initCommand } = await import("./init-DBHyi92L.js");
|
|
1230
1124
|
return initCommand(values, filters, {
|
|
1231
1125
|
out: (s) => console.log(s),
|
|
1232
1126
|
input: process.stdin,
|
|
@@ -1235,7 +1129,7 @@ async function run(argv) {
|
|
|
1235
1129
|
});
|
|
1236
1130
|
}
|
|
1237
1131
|
if (command === "doctor") {
|
|
1238
|
-
const { doctorCommand } = await import("./doctor-
|
|
1132
|
+
const { doctorCommand } = await import("./doctor-B6oYTPoR.js");
|
|
1239
1133
|
return doctorCommand(values, {
|
|
1240
1134
|
out: (s) => console.log(s),
|
|
1241
1135
|
color: !!process.stdout.isTTY && !process.env.NO_COLOR,
|
|
@@ -1243,7 +1137,7 @@ async function run(argv) {
|
|
|
1243
1137
|
});
|
|
1244
1138
|
}
|
|
1245
1139
|
if (command === "report") {
|
|
1246
|
-
const { reportCommand } = await import("./command-
|
|
1140
|
+
const { reportCommand } = await import("./command-JPGNzFsA.js");
|
|
1247
1141
|
return reportCommand(values, filters, {
|
|
1248
1142
|
out: (s) => console.log(s),
|
|
1249
1143
|
err: (s) => console.error(dim(s)),
|
|
@@ -1258,7 +1152,7 @@ async function run(argv) {
|
|
|
1258
1152
|
}
|
|
1259
1153
|
if (command === "studio") {
|
|
1260
1154
|
const config = await loadConfig(configPath, "studio");
|
|
1261
|
-
const { studioCommand } = await import("./command-
|
|
1155
|
+
const { studioCommand } = await import("./command-BdstSEHu.js");
|
|
1262
1156
|
return studioCommand({
|
|
1263
1157
|
config,
|
|
1264
1158
|
flags: values,
|
|
@@ -1269,7 +1163,7 @@ async function run(argv) {
|
|
|
1269
1163
|
if (command === "mcp") {
|
|
1270
1164
|
if (!values.http) console.log = console.info = console.debug = console.error;
|
|
1271
1165
|
const config = await loadConfig(configPath, "mcp");
|
|
1272
|
-
const { mcpCommand } = await import("./command-
|
|
1166
|
+
const { mcpCommand } = await import("./command-BK4kOgkH.js");
|
|
1273
1167
|
return mcpCommand({
|
|
1274
1168
|
config,
|
|
1275
1169
|
flags: values,
|
|
@@ -1278,7 +1172,7 @@ async function run(argv) {
|
|
|
1278
1172
|
}
|
|
1279
1173
|
if (command in HISTORY_COMMANDS) {
|
|
1280
1174
|
const config = await loadConfig(configPath, command);
|
|
1281
|
-
const commands = await import("./commands-
|
|
1175
|
+
const commands = await import("./commands-Duo2ur3r.js");
|
|
1282
1176
|
const ctx = {
|
|
1283
1177
|
config,
|
|
1284
1178
|
flags: values,
|
|
@@ -1291,7 +1185,7 @@ async function run(argv) {
|
|
|
1291
1185
|
case "compare": return commands.compareCommand(ctx, filters);
|
|
1292
1186
|
case "checkout": return commands.checkoutCommand(ctx, filters);
|
|
1293
1187
|
case "query": {
|
|
1294
|
-
const { queryCommand } = await import("./query-
|
|
1188
|
+
const { queryCommand } = await import("./query-noGbekGF.js");
|
|
1295
1189
|
return queryCommand({
|
|
1296
1190
|
...ctx,
|
|
1297
1191
|
err: (s) => console.error(dim(s))
|
|
@@ -1299,7 +1193,7 @@ async function run(argv) {
|
|
|
1299
1193
|
}
|
|
1300
1194
|
case "analyze": {
|
|
1301
1195
|
loadEnvFiles(configPath);
|
|
1302
|
-
const { analyzeCommand } = await import("./command-
|
|
1196
|
+
const { analyzeCommand } = await import("./command-CTVGuH8y.js");
|
|
1303
1197
|
return analyzeCommand({
|
|
1304
1198
|
...ctx,
|
|
1305
1199
|
err: (s) => console.error(dim(s))
|
|
@@ -1338,8 +1232,8 @@ async function cleanCommand(flags, configPath) {
|
|
|
1338
1232
|
const where = fromCwd(debugRoot(config.root)) || ".";
|
|
1339
1233
|
console.log(runs.length ? `Removed debug data for ${runs.length} run${runs.length === 1 ? "" : "s"} (${formatBytes(bytes)}) from ${where}` : `No debug data to remove in ${where}`);
|
|
1340
1234
|
if (flags.images) {
|
|
1341
|
-
const { pruneImages } = await import("./src-
|
|
1342
|
-
const { requireDocker } = await import("./providers-
|
|
1235
|
+
const { pruneImages } = await import("./src-BT4dB5CO.js");
|
|
1236
|
+
const { requireDocker } = await import("./providers-yXZZcPfx.js");
|
|
1343
1237
|
await requireDocker();
|
|
1344
1238
|
const removed = await pruneImages();
|
|
1345
1239
|
console.log(removed ? `Removed ${removed} image${removed === 1 ? "" : "s"} reeval built that nothing uses` : "No leftover images to remove");
|
|
@@ -1357,7 +1251,7 @@ function verbosityOf(flags) {
|
|
|
1357
1251
|
* does. Without a config, just reeval's image.
|
|
1358
1252
|
*/
|
|
1359
1253
|
async function imageBuildCommand(flags, configPath, filters) {
|
|
1360
|
-
const { buildImages, imagePlanLines, imageTargets } = await import("./images-
|
|
1254
|
+
const { buildImages, imagePlanLines, imageTargets } = await import("./images-CscddrJU.js");
|
|
1361
1255
|
const { docker } = await import("./sandbox.js");
|
|
1362
1256
|
let root = process.cwd();
|
|
1363
1257
|
const { fakeHarness } = await import("./harness.js");
|
|
@@ -1444,6 +1338,10 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1444
1338
|
const setup = await prepareRun(flags, configPath);
|
|
1445
1339
|
const ctx = await startRun(setup);
|
|
1446
1340
|
invocation.runId = ctx.runId;
|
|
1341
|
+
const githubOut = process.env.GITHUB_OUTPUT;
|
|
1342
|
+
if (githubOut) await appendFile(githubOut, `run-id=${ctx.runId}\n`).catch(() => {});
|
|
1343
|
+
const stepStart = process.env.GITHUB_STEP_SUMMARY;
|
|
1344
|
+
if (stepStart) await appendFile(stepStart, `run ${ctx.runId}\n`).catch(() => {});
|
|
1447
1345
|
const { engineVersions } = await import("./node-Co7EXge0.js");
|
|
1448
1346
|
const renderer = createRenderer({
|
|
1449
1347
|
out: setup.json ? { write: () => true } : process.stdout,
|
|
@@ -1457,7 +1355,7 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1457
1355
|
executed = await executeRun(ctx, setup, filters, renderer);
|
|
1458
1356
|
} catch (error) {
|
|
1459
1357
|
renderer.close();
|
|
1460
|
-
await rm(ctx.stagingDir, {
|
|
1358
|
+
if (setup.resume === void 0) await rm(ctx.stagingDir, {
|
|
1461
1359
|
recursive: true,
|
|
1462
1360
|
force: true
|
|
1463
1361
|
});
|
|
@@ -1466,14 +1364,14 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1466
1364
|
const { engineRun, plan, sandboxVersions, budgetReached, live, notes, questions } = executed;
|
|
1467
1365
|
invocation.unhandledErrors = engineRun.unhandledErrors;
|
|
1468
1366
|
if ((interrupted || engineRun.cancelled) && plan?.sandboxes.some((s) => s.kind === "docker")) {
|
|
1469
|
-
const { removeRunContainers } = await import("./docker-
|
|
1367
|
+
const { removeRunContainers } = await import("./docker-D6t23fZl.js");
|
|
1470
1368
|
await removeRunContainers(ctx.runId);
|
|
1471
1369
|
}
|
|
1472
1370
|
if (notes) {
|
|
1473
1371
|
const cancelled = interrupted || engineRun.cancelled;
|
|
1474
1372
|
const written = await notes.finish(cancelled);
|
|
1475
1373
|
if (!cancelled && written.length) {
|
|
1476
|
-
const { notesLine } = await import("./agent-
|
|
1374
|
+
const { notesLine } = await import("./agent-B72lZ6w5.js");
|
|
1477
1375
|
const text = notesLine(ctx.config.root, ctx.runId, written);
|
|
1478
1376
|
renderer.onEvent({
|
|
1479
1377
|
type: "notice",
|
|
@@ -1490,8 +1388,8 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1490
1388
|
}
|
|
1491
1389
|
const stopped = interrupted || engineRun.cancelled;
|
|
1492
1390
|
const answers = questions && !stopped ? await questions.settle() : void 0;
|
|
1493
|
-
const { lockfiles } = await import("./state-
|
|
1494
|
-
const { writeScratchRun } = await import("./results-
|
|
1391
|
+
const { lockfiles } = await import("./state-Bf_Vq_pV.js");
|
|
1392
|
+
const { writeScratchRun } = await import("./results-BcSHWbgB.js");
|
|
1495
1393
|
const run = await writeScratchRun({
|
|
1496
1394
|
ctx,
|
|
1497
1395
|
author: ctx.author,
|
|
@@ -1509,13 +1407,15 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1509
1407
|
worktreePatch: ctx.worktreePatch,
|
|
1510
1408
|
lockfiles: await lockfiles(ctx.config.root),
|
|
1511
1409
|
git: ctx.git,
|
|
1410
|
+
previous: ctx.previous,
|
|
1411
|
+
previousArtifacts: ctx.previousArtifacts,
|
|
1512
1412
|
runner: runnerInfo(),
|
|
1513
1413
|
...answers?.size ? { answers } : {}
|
|
1514
1414
|
}, () => live?.stop());
|
|
1515
1415
|
const { record } = run;
|
|
1516
1416
|
if (notes && !stopped) {
|
|
1517
|
-
const { summarizeRun } = await import("./agent-
|
|
1518
|
-
const { resolveAnalysisModel } = await import("./model-
|
|
1417
|
+
const { summarizeRun } = await import("./agent-B72lZ6w5.js");
|
|
1418
|
+
const { resolveAnalysisModel } = await import("./model-DMOraCcm.js");
|
|
1519
1419
|
const model = resolveAnalysisModel(ctx.config, "agent");
|
|
1520
1420
|
const { level, text } = await summarizeRun(ctx.config, record.runId, model);
|
|
1521
1421
|
renderer.onEvent({
|
|
@@ -1542,7 +1442,7 @@ async function runCommand(flags, configPath, filters) {
|
|
|
1542
1442
|
const { config } = ctx;
|
|
1543
1443
|
const mode = setup.record;
|
|
1544
1444
|
if ((flags.record || mode === "always" || mode === "ci" && inCI()) && record.status !== "interrupted") {
|
|
1545
|
-
const { record: recordCmd } = await import("./commands-
|
|
1445
|
+
const { record: recordCmd } = await import("./commands-Duo2ur3r.js");
|
|
1546
1446
|
const allow = record.status === "budget" ? { "allow-incomplete": true } : {};
|
|
1547
1447
|
console.log(await recordCmd(config, record.runId, {
|
|
1548
1448
|
...flags,
|
|
@@ -1580,7 +1480,7 @@ async function prepareRun(flags, configPath) {
|
|
|
1580
1480
|
const sandboxes = [environmentSandbox(config.environment, config.sandbox), ...profile?.defaults.environment ? [environmentSandbox(profile.defaults.environment, config.sandbox)] : []];
|
|
1581
1481
|
const concurrency = await resolveConcurrency(config, flags.concurrency, async () => {
|
|
1582
1482
|
if (!sandboxes.some((s) => s.kind === "docker")) return hostCapacity();
|
|
1583
|
-
const { dockerCapacity } = await import("./src-
|
|
1483
|
+
const { dockerCapacity } = await import("./src-BT4dB5CO.js");
|
|
1584
1484
|
return await dockerCapacity() ?? hostCapacity();
|
|
1585
1485
|
});
|
|
1586
1486
|
return {
|
|
@@ -1598,19 +1498,52 @@ async function prepareRun(flags, configPath) {
|
|
|
1598
1498
|
verbosity: verbosityOf(flags),
|
|
1599
1499
|
configFile: configPath && configLabel(configPath),
|
|
1600
1500
|
/** Named in the plan line when the project root isn't the current directory. */
|
|
1601
|
-
configElsewhere: !!configPath && dirname(configPath) !== process.cwd()
|
|
1501
|
+
configElsewhere: !!configPath && dirname(configPath) !== process.cwd(),
|
|
1502
|
+
/** `undefined` is a new run; `''` is newest resumable; a string is a run id or prefix. */
|
|
1503
|
+
resume: flags.resume
|
|
1602
1504
|
};
|
|
1603
1505
|
}
|
|
1604
1506
|
/** The run's id and the state it starts from: commit, uncommitted changes, author. */
|
|
1605
|
-
async function startRun({ config, profile, runs, tags, concurrency, verbosity, configFile }) {
|
|
1507
|
+
async function startRun({ config, profile, runs, tags, concurrency, verbosity, configFile, resume, dryRun }) {
|
|
1606
1508
|
const startedAt = /* @__PURE__ */ new Date();
|
|
1607
1509
|
const git = await gitInfo(config.root, [config.history.dir]);
|
|
1608
|
-
const { worktreePatch } = await import("./state-
|
|
1510
|
+
const { worktreePatch } = await import("./state-Bf_Vq_pV.js");
|
|
1609
1511
|
const patch = git?.dirty ? await worktreePatch(config.root, [config.history.dir]) : null;
|
|
1610
1512
|
const who = await author(config.root);
|
|
1611
|
-
const { stagingDir, sweepStaging } = await import("./results-
|
|
1612
|
-
const { scratchDir } = await import("./files-
|
|
1513
|
+
const { stagingDir, sweepStaging } = await import("./results-BcSHWbgB.js");
|
|
1514
|
+
const { scratchDir } = await import("./files-BpYgF2z0.js");
|
|
1613
1515
|
const scratch = scratchDir(config.root);
|
|
1516
|
+
if (resume !== void 0) {
|
|
1517
|
+
const target = await resolveResume(config.root, resume || void 0);
|
|
1518
|
+
if (!dryRun) await prepareResume(target, config.root);
|
|
1519
|
+
await sweepStaging(config.root, target.runId);
|
|
1520
|
+
const aside = dryRun ? {
|
|
1521
|
+
record: target.previous,
|
|
1522
|
+
artifacts: target.previousArtifacts
|
|
1523
|
+
} : await loadPrevious(stagingDir(config.root, target.runId));
|
|
1524
|
+
if (!dryRun) try {
|
|
1525
|
+
const { removeRunContainers } = await import("./docker-D6t23fZl.js");
|
|
1526
|
+
await removeRunContainers(target.runId);
|
|
1527
|
+
} catch {}
|
|
1528
|
+
return {
|
|
1529
|
+
runId: target.runId,
|
|
1530
|
+
stagingDir: stagingDir(config.root, target.runId),
|
|
1531
|
+
config,
|
|
1532
|
+
runs,
|
|
1533
|
+
tags,
|
|
1534
|
+
concurrency,
|
|
1535
|
+
profile,
|
|
1536
|
+
verbosity,
|
|
1537
|
+
configFile,
|
|
1538
|
+
startedAt: target.startedAt,
|
|
1539
|
+
git,
|
|
1540
|
+
worktreePatch: patch,
|
|
1541
|
+
author: who,
|
|
1542
|
+
scratch,
|
|
1543
|
+
previous: aside.record ?? target.previous,
|
|
1544
|
+
previousArtifacts: aside.artifacts ?? target.previousArtifacts
|
|
1545
|
+
};
|
|
1546
|
+
}
|
|
1614
1547
|
const stamps = new Set([scratch, config.history.dir].flatMap((dir) => existsSync(dir) ? readdirSync(dir).map((name) => name.slice(0, 16)) : []));
|
|
1615
1548
|
let runId = newRunId(startedAt, git?.sha ?? null, who);
|
|
1616
1549
|
for (let n = 1; stamps.has(runId.slice(0, 16)); n++) runId = newRunId(new Date(startedAt.getTime() + n * 1e3), git?.sha ?? null, who);
|
|
@@ -1629,7 +1562,9 @@ async function startRun({ config, profile, runs, tags, concurrency, verbosity, c
|
|
|
1629
1562
|
git,
|
|
1630
1563
|
worktreePatch: patch,
|
|
1631
1564
|
author: who,
|
|
1632
|
-
scratch
|
|
1565
|
+
scratch,
|
|
1566
|
+
previous: null,
|
|
1567
|
+
previousArtifacts: null
|
|
1633
1568
|
};
|
|
1634
1569
|
}
|
|
1635
1570
|
function noMatch(config, filters, tags) {
|
|
@@ -1646,8 +1581,20 @@ function unmatchedFilter(config, parts) {
|
|
|
1646
1581
|
*/
|
|
1647
1582
|
async function executeRun(ctx, setup, filters, renderer) {
|
|
1648
1583
|
const { runId, stagingDir, config, runs, tags, concurrency, profile, verbosity, configFile } = ctx;
|
|
1584
|
+
const run = JSON.parse(JSON.stringify({
|
|
1585
|
+
runId,
|
|
1586
|
+
stagingDir,
|
|
1587
|
+
config,
|
|
1588
|
+
runs,
|
|
1589
|
+
tags,
|
|
1590
|
+
concurrency,
|
|
1591
|
+
profile,
|
|
1592
|
+
verbosity,
|
|
1593
|
+
configFile,
|
|
1594
|
+
completed: []
|
|
1595
|
+
}));
|
|
1649
1596
|
const { runEngine } = await import("./node-Co7EXge0.js");
|
|
1650
|
-
const { buildPlan, checkAttemptBudget, planDocument, planLine, planTable } = await import("./plan-
|
|
1597
|
+
const { buildPlan, checkAttemptBudget, planDocument, planLine, planTable } = await import("./plan-PPc4-6xd.js");
|
|
1651
1598
|
let plan;
|
|
1652
1599
|
let sandboxVersions = { images: [] };
|
|
1653
1600
|
let preflightStop;
|
|
@@ -1660,11 +1607,23 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1660
1607
|
const onPlan = async ({ planned, excluded, matched, unmatched }) => {
|
|
1661
1608
|
if (unmatched.length) throw unmatchedFilter(config, unmatched);
|
|
1662
1609
|
if (matched === 0) throw noMatch(config, filters, tags);
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1610
|
+
const completed = completedKeysFor(planned, stagingDir, ctx.previous);
|
|
1611
|
+
const skipped = planned.map((p) => completed.has(p.key) ? {
|
|
1612
|
+
...p,
|
|
1613
|
+
attempt: {
|
|
1614
|
+
...p.attempt,
|
|
1615
|
+
skip: "already completed in this run",
|
|
1616
|
+
plan: {
|
|
1617
|
+
...p.attempt.plan,
|
|
1618
|
+
skip: "already completed in this run"
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
} : p);
|
|
1622
|
+
toRun = skipped;
|
|
1623
|
+
for (const p of skipped) for (const name of p.attempt.secretVars) registerSecret(process.env[name]);
|
|
1624
|
+
const models = skipped.some((p) => !p.attempt.plan.skip && p.attempt.plan.questions?.length) ? await import("./model-DMOraCcm.js") : void 0;
|
|
1666
1625
|
plan = await buildPlan({
|
|
1667
|
-
planned,
|
|
1626
|
+
planned: skipped,
|
|
1668
1627
|
profile,
|
|
1669
1628
|
budget: setup.budget,
|
|
1670
1629
|
concurrency,
|
|
@@ -1672,8 +1631,14 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1672
1631
|
historyDir: config.history.dir,
|
|
1673
1632
|
questionModel: models?.questionModelLabel(config) ?? null
|
|
1674
1633
|
});
|
|
1675
|
-
|
|
1676
|
-
|
|
1634
|
+
plan.runId = runId;
|
|
1635
|
+
if (completed.size) plan.resume = {
|
|
1636
|
+
runId,
|
|
1637
|
+
completed: completed.size
|
|
1638
|
+
};
|
|
1639
|
+
run.completed = [...completed];
|
|
1640
|
+
const { imageStages, imageTargets } = await import("./images-CscddrJU.js");
|
|
1641
|
+
const targets = imageTargets(skipped.filter((p) => !p.attempt.plan.skip).map((p) => ({
|
|
1677
1642
|
id: p.id,
|
|
1678
1643
|
harness: p.attempt.harness,
|
|
1679
1644
|
sandbox: p.attempt.sandbox
|
|
@@ -1685,16 +1650,16 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1685
1650
|
evals: t.evals,
|
|
1686
1651
|
stages: await imageStages(t, config.root)
|
|
1687
1652
|
})));
|
|
1688
|
-
const doc = planDocument(plan,
|
|
1653
|
+
const doc = planDocument(plan, skipped, excluded, images);
|
|
1689
1654
|
process.stdout.write(`${JSON.stringify(doc, null, 2)}\n`);
|
|
1690
1655
|
return false;
|
|
1691
1656
|
}
|
|
1692
|
-
const lines = [planLine(plan, setup.configElsewhere ? configFile : void 0)];
|
|
1657
|
+
const lines = [planLine(plan, setup.configElsewhere ? configFile : void 0, runId)];
|
|
1693
1658
|
if (setup.dryRun) {
|
|
1694
1659
|
const todos = excluded.filter((e) => e.mode === "todo").map((e) => e.id);
|
|
1695
1660
|
lines.push(...planTable(plan, todos));
|
|
1696
|
-
const { imageStatusLines } = await import("./images-
|
|
1697
|
-
const { dockerAvailable } = await import("./src-
|
|
1661
|
+
const { imageStatusLines } = await import("./images-CscddrJU.js");
|
|
1662
|
+
const { dockerAvailable } = await import("./src-BT4dB5CO.js");
|
|
1698
1663
|
if (targets.length && await dockerAvailable()) lines.push(...await imageStatusLines(targets, config.root));
|
|
1699
1664
|
else if (targets.length) lines.push("images not checked: Docker is not running");
|
|
1700
1665
|
}
|
|
@@ -1708,7 +1673,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1708
1673
|
});
|
|
1709
1674
|
if (setup.dryRun) return false;
|
|
1710
1675
|
checkAttemptBudget(plan, setup.force, config.file);
|
|
1711
|
-
const analysis = config.analysis.agent ? await import("./model-
|
|
1676
|
+
const analysis = config.analysis.agent ? await import("./model-DMOraCcm.js") : null;
|
|
1712
1677
|
analysis?.analysisModelName(config, "agent");
|
|
1713
1678
|
const questionModels = /* @__PURE__ */ new Set();
|
|
1714
1679
|
const asked = [];
|
|
@@ -1716,7 +1681,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1716
1681
|
if (row.plan.skip || !models) continue;
|
|
1717
1682
|
const questions = (row.plan.questions ?? []).map((q) => ({
|
|
1718
1683
|
question: q.question,
|
|
1719
|
-
model: models.questionModel(config, q, row.id)
|
|
1684
|
+
model: models.questionModel(config, q, row.id),
|
|
1685
|
+
...q.across ? { across: q.across } : {}
|
|
1720
1686
|
}));
|
|
1721
1687
|
for (const q of questions) if (typeof q.model === "string") questionModels.add(q.model);
|
|
1722
1688
|
if (questions.length) asked.push({
|
|
@@ -1737,13 +1703,13 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1737
1703
|
});
|
|
1738
1704
|
if (malformed.length) throw new UsageError(`Credentials with whitespace or a line break in them: ${malformed.join(", ")}. A key copied from a wrapped terminal line picks these up; set it again as one line.`);
|
|
1739
1705
|
if (analysis) {
|
|
1740
|
-
const { startNotes } = await import("./agent-
|
|
1706
|
+
const { startNotes } = await import("./agent-B72lZ6w5.js");
|
|
1741
1707
|
notes = startNotes({
|
|
1742
1708
|
config,
|
|
1743
1709
|
model: analysis.resolveAnalysisModel(config, "agent"),
|
|
1744
1710
|
runId,
|
|
1745
1711
|
stagingDir,
|
|
1746
|
-
planned,
|
|
1712
|
+
planned: skipped,
|
|
1747
1713
|
warn: (text) => renderer.onEvent({
|
|
1748
1714
|
type: "notice",
|
|
1749
1715
|
at: Date.now(),
|
|
@@ -1753,7 +1719,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1753
1719
|
});
|
|
1754
1720
|
}
|
|
1755
1721
|
if (asked.length) {
|
|
1756
|
-
const { questionRunner } = await import("./questions-
|
|
1722
|
+
const { questionRunner } = await import("./questions-BEPj98fZ.js");
|
|
1757
1723
|
questions = questionRunner({
|
|
1758
1724
|
evals: asked,
|
|
1759
1725
|
stagingDir,
|
|
@@ -1770,8 +1736,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1770
1736
|
}
|
|
1771
1737
|
});
|
|
1772
1738
|
}
|
|
1773
|
-
const { prepareWorkspaces, workspaceKey } = await import("./workspace-
|
|
1774
|
-
const live =
|
|
1739
|
+
const { prepareWorkspaces, workspaceKey } = await import("./workspace-DzNL-3iO.js");
|
|
1740
|
+
const live = skipped.filter((p) => !p.attempt.plan.skip);
|
|
1775
1741
|
const outcomes = await prepareWorkspaces(live.flatMap(({ attempt: a }) => a.workspace ? [{
|
|
1776
1742
|
workspace: a.workspace,
|
|
1777
1743
|
environment: a.cell.environment
|
|
@@ -1816,7 +1782,7 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1816
1782
|
});
|
|
1817
1783
|
}
|
|
1818
1784
|
try {
|
|
1819
|
-
sandboxVersions = await preflight(
|
|
1785
|
+
sandboxVersions = await preflight(skipped.filter((p) => !p.attempt.plan.skip).map((p) => ({
|
|
1820
1786
|
harness: p.attempt.harness,
|
|
1821
1787
|
sandbox: p.attempt.sandbox,
|
|
1822
1788
|
setBy: p.attempt.setBy
|
|
@@ -1855,20 +1821,11 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1855
1821
|
let engineRun;
|
|
1856
1822
|
try {
|
|
1857
1823
|
engineRun = await runEngine({
|
|
1858
|
-
run
|
|
1859
|
-
runId,
|
|
1860
|
-
stagingDir,
|
|
1861
|
-
config,
|
|
1862
|
-
runs,
|
|
1863
|
-
tags,
|
|
1864
|
-
concurrency,
|
|
1865
|
-
profile,
|
|
1866
|
-
verbosity,
|
|
1867
|
-
configFile
|
|
1868
|
-
})),
|
|
1824
|
+
run,
|
|
1869
1825
|
filters,
|
|
1870
1826
|
onPlan,
|
|
1871
1827
|
onRunStart: (files) => {
|
|
1828
|
+
writeCurrent(setup.config.root, runId);
|
|
1872
1829
|
live = writeLiveProgress({
|
|
1873
1830
|
dir: stagingDir,
|
|
1874
1831
|
runId,
|
|
@@ -1882,7 +1839,8 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1882
1839
|
files,
|
|
1883
1840
|
harness: (plan?.harnesses ?? config.harness.map(harnessId)).join(", "),
|
|
1884
1841
|
sandbox: sandboxId(config.sandbox),
|
|
1885
|
-
concurrency
|
|
1842
|
+
concurrency,
|
|
1843
|
+
runId
|
|
1886
1844
|
});
|
|
1887
1845
|
},
|
|
1888
1846
|
onEvent: (e) => {
|
|
@@ -1926,9 +1884,9 @@ async function executeRun(ctx, setup, filters, renderer) {
|
|
|
1926
1884
|
throw error;
|
|
1927
1885
|
} finally {
|
|
1928
1886
|
clearTimeout(budgetTimer);
|
|
1929
|
-
const { removePrepared } = await import("./preflight-
|
|
1887
|
+
const { removePrepared } = await import("./preflight-Zumy0adT.js");
|
|
1930
1888
|
removePrepared(config.root, runId);
|
|
1931
|
-
const { removePreparedWorkspaces } = await import("./workspace-
|
|
1889
|
+
const { removePreparedWorkspaces } = await import("./workspace-DzNL-3iO.js");
|
|
1932
1890
|
removePreparedWorkspaces(config.root, runId);
|
|
1933
1891
|
}
|
|
1934
1892
|
if (preflightStop) throw preflightStop;
|
|
@@ -2011,4 +1969,4 @@ run(process.argv.slice(2)).finally(() => {
|
|
|
2011
1969
|
//#endregion
|
|
2012
1970
|
export {};
|
|
2013
1971
|
|
|
2014
|
-
//# sourceMappingURL=cli-
|
|
1972
|
+
//# sourceMappingURL=cli-BMjTKY-D.js.map
|