reeval 0.2.0 → 0.4.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/THIRD_PARTY_NOTICES.md +9 -9
- package/assets/package.json +1 -1
- package/assets/pnpm-lock.yaml +84 -33
- package/dist/agent-C9dLMCM7.js +334 -0
- package/dist/agent-C9dLMCM7.js.map +1 -0
- package/dist/{agent-D-6z0Z3F.js → agent-M70OWyfG.js} +5 -5
- package/dist/{agent-D-6z0Z3F.js.map → agent-M70OWyfG.js.map} +1 -1
- package/dist/analysis-CxSCt1YY.js.map +1 -1
- package/dist/{assemble-DtouO0iQ.js → assemble-BmVT26kf.js} +25 -17
- package/dist/assemble-BmVT26kf.js.map +1 -0
- package/dist/assemble-DZiN1p_E.js +2 -0
- package/dist/{attempt-BdRQ9jKX.js → attempt-CGPV3BZY.js} +2 -2
- package/dist/{attempt-BdRQ9jKX.js.map → attempt-CGPV3BZY.js.map} +1 -1
- package/dist/bridge/index.mjs +1620 -1793
- package/dist/bridge/package.json +2 -2
- package/dist/bridge/pnpm-lock.yaml +75 -75
- package/dist/bridge/pnpm-workspace.yaml +1 -1
- package/dist/{cli-CGuUdOPK.js → cli-BdxFLEIc.js} +166 -55
- package/dist/cli-BdxFLEIc.js.map +1 -0
- package/dist/{cli-spec-DKAu09Gi.js → cli-spec-DUeyuSIQ.js} +11 -4
- package/dist/cli-spec-DUeyuSIQ.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/{command-CCuYRGsI.js → command-BtcBitmY.js} +12 -12
- package/dist/{command-CCuYRGsI.js.map → command-BtcBitmY.js.map} +1 -1
- package/dist/{command-BekzrvZI.js → command-ByqQ-v-j.js} +13 -13
- package/dist/{command-BekzrvZI.js.map → command-ByqQ-v-j.js.map} +1 -1
- package/dist/{command-CLKuXn6Z.js → command-CIsO5xdR.js} +11 -9
- package/dist/command-CIsO5xdR.js.map +1 -0
- package/dist/{command-CEm8PZ1N.js → command-CQiFfn-C.js} +169 -280
- package/dist/command-CQiFfn-C.js.map +1 -0
- package/dist/command-DllipyoK.js +2 -0
- package/dist/{commands-CF8mOfiu.js → commands-CPrrZ2mI.js} +29 -13
- package/dist/commands-CPrrZ2mI.js.map +1 -0
- package/dist/{commands-A4udfyKZ.js → commands-D3Dxgh60.js} +1 -1
- package/dist/{config-DqJvSqYo.js → config-B93Csktg.js} +43 -15
- package/dist/{config-DqJvSqYo.js.map → config-B93Csktg.js.map} +1 -1
- package/dist/db-DIE0bsNO.js +2 -0
- package/dist/{db-DxDzMhtB.js → db-SpvY8l1g.js} +4 -4
- package/dist/{db-DxDzMhtB.js.map → db-SpvY8l1g.js.map} +1 -1
- package/dist/{dist-BZXYHN2X.js → dist-C2k9IvL3.js} +107 -55
- package/dist/dist-C2k9IvL3.js.map +1 -0
- package/dist/{docker-Buu3a60z.js → docker-Bv1ZC6V7.js} +1 -1
- package/dist/{docker-DQDZWXF9.js → docker-C2YwD_dh.js} +3 -3
- package/dist/{docker-DQDZWXF9.js.map → docker-C2YwD_dh.js.map} +1 -1
- package/dist/{docker-w0CSdQq0.js → docker-uNaAGE2C.js} +5 -5
- package/dist/{docker-w0CSdQq0.js.map → docker-uNaAGE2C.js.map} +1 -1
- package/dist/{doctor-Bs1_pG9_.js → doctor-COH-levb.js} +88 -20
- package/dist/doctor-COH-levb.js.map +1 -0
- package/dist/{egress-QJMzVtbw.js → egress-C7Obb71D.js} +35 -19
- package/dist/egress-C7Obb71D.js.map +1 -0
- package/dist/{environment-9WHSWLxH.js → environment-lDFQY2BF.js} +116 -4
- package/dist/environment-lDFQY2BF.js.map +1 -0
- package/dist/{files-D2-qn_Dl.js → files-BO9P6msM.js} +114 -14
- package/dist/files-BO9P6msM.js.map +1 -0
- package/dist/files-BRWmQJ-9.js +2 -0
- package/dist/files-Bwr8UW4b.js +2 -0
- package/dist/{files-bF2fPuT9.js → files-CMoTBEul.js} +40 -7
- package/dist/files-CMoTBEul.js.map +1 -0
- package/dist/{git-D6hMeieS.js → git-LJp55bkf.js} +3 -3
- package/dist/{git-D6hMeieS.js.map → git-LJp55bkf.js.map} +1 -1
- package/dist/{harness-ls5aX1UO.js → harness-BbMShUC-.js} +4 -4
- package/dist/{harness-ls5aX1UO.js.map → harness-BbMShUC-.js.map} +1 -1
- package/dist/harness.d.ts +2 -2
- package/dist/harness.js +1 -1
- package/dist/{header-DzFDoMCI.js → header-sPQ9Lq2S.js} +2 -2
- package/dist/{header-DzFDoMCI.js.map → header-sPQ9Lq2S.js.map} +1 -1
- package/dist/{images-2m2U-UQc.js → images-Pph_XJ68.js} +6 -6
- package/dist/{images-2m2U-UQc.js.map → images-Pph_XJ68.js.map} +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.js +173 -65
- package/dist/index.js.map +1 -1
- package/dist/{init-CH9UY7Bt.js → init-BcYpzHXs.js} +10 -10
- package/dist/{init-CH9UY7Bt.js.map → init-BcYpzHXs.js.map} +1 -1
- package/dist/init-YS5qBRwV.js +2 -0
- package/dist/{invocations-rXktgSAn.js → invocations-DHC946b-.js} +4 -4
- package/dist/{invocations-rXktgSAn.js.map → invocations-DHC946b-.js.map} +1 -1
- package/dist/{jiti-BOLXpKyG.js → jiti-DWsGEgxD.js} +4 -4
- package/dist/{jiti-BOLXpKyG.js.map → jiti-DWsGEgxD.js.map} +1 -1
- package/dist/{judge-D8Uf4dA9.js → judge-D6wqgTDp.js} +17 -4
- package/dist/judge-D6wqgTDp.js.map +1 -0
- package/dist/judge.d.ts +12 -8
- package/dist/judge.js +13 -5
- package/dist/judge.js.map +1 -1
- package/dist/{live-Bs3LReMV.js → live-DZkCtmNP.js} +2 -2
- package/dist/{live-Bs3LReMV.js.map → live-DZkCtmNP.js.map} +1 -1
- package/dist/{matchers-DyLvm7EG.js → matchers-DbFPZQgA.js} +9 -4
- package/dist/{matchers-DyLvm7EG.js.map → matchers-DbFPZQgA.js.map} +1 -1
- package/dist/model-CJ6USX6C.js +2 -0
- package/dist/model-CNoc8t2Y.js +2 -0
- package/dist/model-DUZtNaYR.js +228 -0
- package/dist/model-DUZtNaYR.js.map +1 -0
- package/dist/{model-CDL98xue.js → model-ORtLm2UB.js} +41 -3
- package/dist/{model-CDL98xue.js.map → model-ORtLm2UB.js.map} +1 -1
- package/dist/{model-BdO79gWz.js → model-f0wprGPm.js} +3 -3
- package/dist/{model-BdO79gWz.js.map → model-f0wprGPm.js.map} +1 -1
- package/dist/{node-kG64XxdE.js → node-OXPxBD2N.js} +3 -3
- package/dist/{node-kG64XxdE.js.map → node-OXPxBD2N.js.map} +1 -1
- package/dist/{opencode-providers-DZuD_oYt.js → opencode-providers-DJVocFOU.js} +31 -3
- package/dist/opencode-providers-DJVocFOU.js.map +1 -0
- package/dist/{options-k25fjaER.js → options-Ftb2gE01.js} +85 -26
- package/dist/options-Ftb2gE01.js.map +1 -0
- package/dist/patch-BxqggH-T.js +118 -0
- package/dist/patch-BxqggH-T.js.map +1 -0
- package/dist/{plan-gwk6dJ8c.js → plan-BkhLKrsN.js} +23 -6
- package/dist/plan-BkhLKrsN.js.map +1 -0
- package/dist/{preflight-B6hfAXhh.js → preflight-CuvY0o3B.js} +3 -3
- package/dist/{preflight-B6hfAXhh.js.map → preflight-CuvY0o3B.js.map} +1 -1
- package/dist/{preflight-D2Hce5Jp.js → preflight-D3cJETui.js} +1 -1
- package/dist/{prepare-NuWsT11j.js → prepare-BI9j2-H-.js} +5 -5
- package/dist/{prepare-NuWsT11j.js.map → prepare-BI9j2-H-.js.map} +1 -1
- package/dist/{prepare-C3fefNnV.js → prepare-CVuTk5F9.js} +2 -2
- package/dist/{provenance-Dfb8YY5Y.js → provenance-6n49wska.js} +22 -4
- package/dist/provenance-6n49wska.js.map +1 -0
- package/dist/{providers-Bfx5Mnk9.js → providers-BFapaM2D.js} +3 -3
- package/dist/{providers-Bfx5Mnk9.js.map → providers-BFapaM2D.js.map} +1 -1
- package/dist/{providers-BMIGzPPG.js → providers-Cay8pI0y.js} +1 -1
- package/dist/query-Br77sQYj.js +2 -0
- package/dist/{query-CFATHZmV.js → query-CnstTDt8.js} +2 -2
- package/dist/{query-CFATHZmV.js.map → query-CnstTDt8.js.map} +1 -1
- package/dist/questions-Cm321-Mo.js +325 -0
- package/dist/questions-Cm321-Mo.js.map +1 -0
- package/dist/{record-DQ8wzyco.js → record-CbuQH4l1.js} +7 -3
- package/dist/record-CbuQH4l1.js.map +1 -0
- package/dist/{redact-C4fL_bZP.js → redact-DJ9JCShu.js} +99 -28
- package/dist/redact-DJ9JCShu.js.map +1 -0
- package/dist/{results-BtvBJAp-.js → results-D9GgBYw5.js} +4 -4
- package/dist/{results-BtvBJAp-.js.map → results-D9GgBYw5.js.map} +1 -1
- package/dist/{root-CFDjpWuc.js → root-Zeokqt3-.js} +2 -2
- package/dist/{root-CFDjpWuc.js.map → root-Zeokqt3-.js.map} +1 -1
- package/dist/{sandbox-BJPWuQE9.js → sandbox-CO__l-i1.js} +3 -3
- package/dist/{sandbox-BJPWuQE9.js.map → sandbox-CO__l-i1.js.map} +1 -1
- package/dist/sandbox.d.ts +2 -2
- package/dist/sandbox.js +1 -1
- package/dist/server-D5Zq3I5N.js +2 -0
- package/dist/{server-5DWmKKfV.js → server-DsmIrBzi.js} +12 -10
- package/dist/{server-5DWmKKfV.js.map → server-DsmIrBzi.js.map} +1 -1
- package/dist/source-BgqURlel.js +2 -0
- package/dist/{source-Bsfa3LZH.js → source-DJ1c8jwe.js} +2 -2
- package/dist/{source-Bsfa3LZH.js.map → source-DJ1c8jwe.js.map} +1 -1
- package/dist/{src-DXx_29pq.js → src-B1OT_Zhf.js} +46 -46
- package/dist/{src-DXx_29pq.js.map → src-B1OT_Zhf.js.map} +1 -1
- package/dist/{src-BQyMiWri.js → src-BAiYD4eC.js} +48 -7
- package/dist/{src-BQyMiWri.js.map → src-BAiYD4eC.js.map} +1 -1
- package/dist/{src-N7E_mfcZ.js → src-BC5FFzE8.js} +1 -1
- package/dist/src-Bi2Y3EkE.js +3 -0
- package/dist/{src-D8KYzxBX.js → src-BmBFlEIe.js} +12 -7
- package/dist/{src-D8KYzxBX.js.map → src-BmBFlEIe.js.map} +1 -1
- package/dist/src-C8WNyopo.js +3 -0
- package/dist/src-CYz-TreZ.js +3 -0
- package/dist/src-C_91Ln3Z.js +4 -0
- package/dist/{src-Cmp-7YrD.js → src-DWk0e7ix.js} +5 -5
- package/dist/{src-Cmp-7YrD.js.map → src-DWk0e7ix.js.map} +1 -1
- package/dist/{src-AEwxd1UP.js → src-DfEAlC9s.js} +4 -4
- package/dist/{src-AEwxd1UP.js.map → src-DfEAlC9s.js.map} +1 -1
- package/dist/{src-DwwiVLqv.js → src-V-iU5X9S.js} +24 -21
- package/dist/{src-DwwiVLqv.js.map → src-V-iU5X9S.js.map} +1 -1
- package/dist/{src-C-LHyTSV.js → src-gPJFzHcK.js} +1 -1
- package/dist/src-gVzsO4_f.js +3 -0
- package/dist/{state-DZ7eqb1F.js → state-DFbJrVi3.js} +15 -15
- package/dist/{state-DZ7eqb1F.js.map → state-DFbJrVi3.js.map} +1 -1
- package/dist/state-Joc2b4qk.js +2 -0
- package/dist/studio-app/assets/index-B1Pf3LAT.css +2 -0
- package/dist/studio-app/assets/index-BhorHbrj.js +58 -0
- package/dist/studio-app/index.html +2 -2
- package/dist/{summary-D7Ttky0z.js → summary-CEMYhzXm.js} +33 -5
- package/dist/summary-CEMYhzXm.js.map +1 -0
- package/dist/summary-WR5qLj_z.js +192 -0
- package/dist/summary-WR5qLj_z.js.map +1 -0
- package/dist/tools-DN-cJcfi.js +249 -0
- package/dist/tools-DN-cJcfi.js.map +1 -0
- package/dist/{types-CYJldf5N.d.ts → types-B_CqVrOS.d.ts} +210 -30
- package/dist/view/index.d.ts +63 -1
- package/dist/view/index.js +5 -5
- package/dist/{views-BrHOv6wg.js → views-DNbUdW9d.js} +4 -4
- package/dist/{views-BrHOv6wg.js.map → views-DNbUdW9d.js.map} +1 -1
- package/dist/views-DnYbVkKg.js +3 -0
- package/dist/{worker-entry-DnYkANPG.js → worker-entry-CJmG4hhE.js} +3 -3
- package/dist/{worker-entry-DnYkANPG.js.map → worker-entry-CJmG4hhE.js.map} +1 -1
- package/dist/{workspace-BVgNhC9h.js → workspace-CmSp2MXO.js} +1 -1
- package/dist/{workspace-uPapQj16.js → workspace-QtlJtRut.js} +5 -5
- package/dist/{workspace-uPapQj16.js.map → workspace-QtlJtRut.js.map} +1 -1
- package/docker/Dockerfile +2 -0
- package/docker/reeval-path.sh +21 -0
- package/package.json +13 -12
- package/dist/assemble-Dm4gD1TU.js +0 -2
- package/dist/assemble-DtouO0iQ.js.map +0 -1
- package/dist/cli-CGuUdOPK.js.map +0 -1
- package/dist/cli-spec-DKAu09Gi.js.map +0 -1
- package/dist/command-CEm8PZ1N.js.map +0 -1
- package/dist/command-CLKuXn6Z.js.map +0 -1
- package/dist/commands-CF8mOfiu.js.map +0 -1
- package/dist/db-Cjj2ZsfQ.js +0 -2
- package/dist/dist-BZXYHN2X.js.map +0 -1
- package/dist/doctor-Bs1_pG9_.js.map +0 -1
- package/dist/egress-QJMzVtbw.js.map +0 -1
- package/dist/environment-9WHSWLxH.js.map +0 -1
- package/dist/files--6CEUXm7.js +0 -2
- package/dist/files-Bd25OAQH.js +0 -2
- package/dist/files-D2-qn_Dl.js.map +0 -1
- package/dist/files-bF2fPuT9.js.map +0 -1
- package/dist/init-DJuxvYCW.js +0 -2
- package/dist/judge-D8Uf4dA9.js.map +0 -1
- package/dist/model-v-0_Ik7S.js +0 -2
- package/dist/opencode-providers-DZuD_oYt.js.map +0 -1
- package/dist/options-k25fjaER.js.map +0 -1
- package/dist/patch-BkKje4cp.js +0 -69
- package/dist/patch-BkKje4cp.js.map +0 -1
- package/dist/plan-gwk6dJ8c.js.map +0 -1
- package/dist/provenance-Dfb8YY5Y.js.map +0 -1
- package/dist/query-DR4m6CXf.js +0 -2
- package/dist/record-DQ8wzyco.js.map +0 -1
- package/dist/redact-C4fL_bZP.js.map +0 -1
- package/dist/server-buV3adNS.js +0 -2
- package/dist/source-BXzrmof5.js +0 -2
- package/dist/src-55j1zNHH.js +0 -3
- package/dist/src-BDwSuyIo.js +0 -3
- package/dist/src-DEgff9Z7.js +0 -4
- package/dist/src-W9g-y5X5.js +0 -3
- package/dist/src-daS0wKH2.js +0 -3
- package/dist/state-Cyw3QTsN.js +0 -2
- package/dist/studio-app/assets/index-Da1XDzx8.js +0 -58
- package/dist/studio-app/assets/index-xwzWdcE_.css +0 -2
- package/dist/summary-D7Ttky0z.js.map +0 -1
- package/dist/views-CwCWLWqo.js +0 -3
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { n as isTimeout, t as UsageError } from "./errors-CSxfJ4qu.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as workspaceLabel, T as parseDuration, _ as isSecretTemplate, c as defineEnvironment, g as isSecret, m as isHostFile, n as DEFAULT_SKILL_EXCLUDE, t as DEFAULT_DIRECTORY_IGNORES, u as filesOf, v as mcpHosts, w as workspaceOf, x as stepCommand, y as parseGitRepo } from "./environment-lDFQY2BF.js";
|
|
3
3
|
import { t as inCI } from "./env-BQqj93gu.js";
|
|
4
|
-
import {
|
|
4
|
+
import { o as redactSecrets, s as registerSecret } from "./redact-DJ9JCShu.js";
|
|
5
5
|
import { t as InfraError } from "./types-C5vI3g1C.js";
|
|
6
|
-
import { _ as layoutOf, a as unenforceable, h as expectedBlockedFor, n as allowedHosts, o as createFakeSandbox, p as brokeringFor, r as egressLabel, t as DEFAULT_EGRESS_ALLOW, v as refusedMcp } from "./egress-
|
|
6
|
+
import { _ as layoutOf, a as unenforceable, h as expectedBlockedFor, n as allowedHosts, o as createFakeSandbox, p as brokeringFor, r as egressLabel, t as DEFAULT_EGRESS_ALLOW, v as refusedMcp } from "./egress-C7Obb71D.js";
|
|
7
7
|
import { c as relativeFile, i as evalSlug, l as sha256, n as attemptKey, r as evalId, s as recordFileName, t as attemptId } from "./ids-Bp6ut7ZD.js";
|
|
8
|
-
import {
|
|
9
|
-
import { S as placeholder, et as run, tt as shellQuote } from "./src-
|
|
10
|
-
import { a as evalPlan, d as
|
|
11
|
-
import { n as badCharacterAt, o as defineConfig } from "./config-
|
|
12
|
-
import { a as withLease, c as registerGroup, l as registerTest, o as collectingFile, p as expect, s as getRunContext, t as HarnessCapabilityError } from "./matchers-
|
|
13
|
-
import { a as withDebug, i as debugTrace, n as attemptDebug, r as debugLog, t as AttemptDebug } from "./attempt-
|
|
8
|
+
import { c as judgeModelName, d as isApiError, i as badJudgeList, u as runJudge } from "./judge-D6wqgTDp.js";
|
|
9
|
+
import { S as placeholder, et as run, tt as shellQuote } from "./src-V-iU5X9S.js";
|
|
10
|
+
import { a as evalPlan, d as sandboxId, f as secretVarsIn, i as checkOptions, l as matchesTags, m as unbrokeredError, n as cascade, o as expand, p as unbrokered, s as harnessId, t as brokeredIn } from "./options-Ftb2gE01.js";
|
|
11
|
+
import { n as badCharacterAt, o as defineConfig } from "./config-B93Csktg.js";
|
|
12
|
+
import { a as withLease, c as registerGroup, l as registerTest, o as collectingFile, p as expect, s as getRunContext, t as HarnessCapabilityError } from "./matchers-DbFPZQgA.js";
|
|
13
|
+
import { a as withDebug, i as debugTrace, n as attemptDebug, r as debugLog, t as AttemptDebug } from "./attempt-CGPV3BZY.js";
|
|
14
14
|
import { t as attemptDebugDir } from "./files-BLlrhU4-.js";
|
|
15
15
|
import { n as clip, r as formatDuration, t as capMiddle } from "./text-gEcKjAyp.js";
|
|
16
16
|
import { t as contextTaker } from "./context-loi9OCZv.js";
|
|
17
17
|
import { t as PrepareError } from "./provider-CmAYTQQs.js";
|
|
18
|
-
import { i as preparedWorkspace } from "./workspace-
|
|
19
|
-
import {
|
|
18
|
+
import { i as preparedWorkspace } from "./workspace-QtlJtRut.js";
|
|
19
|
+
import { n as judgeDiff } from "./patch-BxqggH-T.js";
|
|
20
20
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
21
21
|
import { basename, isAbsolute, join, relative, sep } from "node:path";
|
|
22
22
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
@@ -26,12 +26,12 @@ import { parse } from "yaml";
|
|
|
26
26
|
/** Runs a check or setup step with the checks' brokered secrets swapped in (see brokerPhases). */
|
|
27
27
|
const asCheck = (a, fn) => a.phases ? a.phases.checks(fn) : fn();
|
|
28
28
|
function requireSandbox(a) {
|
|
29
|
-
if (!a.sandbox) throw new Error("No sandbox yet: call
|
|
29
|
+
if (!a.sandbox) throw new Error("No sandbox yet: call c.send() or await c.sandbox() before c.exec() or c.readFile()");
|
|
30
30
|
return a.sandbox;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Phase 4, checks: `
|
|
34
|
-
* timed; `
|
|
33
|
+
* Phase 4, checks: `c.exec` runs with the checks' variables and secrets, each run recorded and
|
|
34
|
+
* timed; `c.readFile` reads the sandbox as is.
|
|
35
35
|
*/
|
|
36
36
|
function createChecks(a) {
|
|
37
37
|
const checkEnv = () => a.env?.checkVars ?? {};
|
|
@@ -552,7 +552,8 @@ async function resolveEnvironment(environment, optionsEnv, root, where, rulesFil
|
|
|
552
552
|
}
|
|
553
553
|
const fileList = [...files].map(([path, v]) => ({
|
|
554
554
|
path,
|
|
555
|
-
content: isHostFile(v) ? readHostFile(v, envWhere) : v
|
|
555
|
+
content: isHostFile(v) ? readHostFile(v, envWhere) : v,
|
|
556
|
+
...isHostFile(v) && statSync(v.path).mode & 64 ? { executable: true } : {}
|
|
556
557
|
}));
|
|
557
558
|
const rulesContent = rules === void 0 ? void 0 : isHostFile(rules) ? Buffer.from(readHostFile(rules, envWhere)).toString("utf8") : rules;
|
|
558
559
|
const skillList = [...skills.values()];
|
|
@@ -568,6 +569,7 @@ async function resolveEnvironment(environment, optionsEnv, root, where, rulesFil
|
|
|
568
569
|
path: f.path,
|
|
569
570
|
sha256: sha256(f.content)
|
|
570
571
|
}));
|
|
572
|
+
const executable = fileList.flatMap((f) => f.executable ? [f.path] : []);
|
|
571
573
|
const rulesRecord = rulesContent === void 0 ? void 0 : {
|
|
572
574
|
path: rulesFile,
|
|
573
575
|
sha256: sha256(rulesContent)
|
|
@@ -614,6 +616,7 @@ async function resolveEnvironment(environment, optionsEnv, root, where, rulesFil
|
|
|
614
616
|
]),
|
|
615
617
|
mcp: mcpShape,
|
|
616
618
|
files: fileRecords,
|
|
619
|
+
...executable.length ? { executable } : {},
|
|
617
620
|
rules: rulesRecord?.sha256,
|
|
618
621
|
vars: literalVars,
|
|
619
622
|
secrets: secretNames,
|
|
@@ -905,7 +908,7 @@ async function callMcpTool(sandbox, servers, name, tool, signal) {
|
|
|
905
908
|
//#region src/harness/index.ts
|
|
906
909
|
async function createHarness(descriptor) {
|
|
907
910
|
if (descriptor.kind === "fake") return createFakeHarness(descriptor);
|
|
908
|
-
const { createAgentHarness } = await import("./agent-
|
|
911
|
+
const { createAgentHarness } = await import("./agent-M70OWyfG.js");
|
|
909
912
|
return createAgentHarness(descriptor);
|
|
910
913
|
}
|
|
911
914
|
/** Where each harness's agent looks for repo skills, relative to the workspace. */
|
|
@@ -932,8 +935,8 @@ async function prepareEnvironment(a, root, runId, where, signal) {
|
|
|
932
935
|
if (debug) traceEnvironment(debug, spec, env);
|
|
933
936
|
record.image = null;
|
|
934
937
|
if (spec.sandbox.kind === "docker") {
|
|
935
|
-
const { preparedFor } = await import("./preflight-
|
|
936
|
-
const { dockerProvider } = await import("./providers-
|
|
938
|
+
const { preparedFor } = await import("./preflight-D3cJETui.js");
|
|
939
|
+
const { dockerProvider } = await import("./providers-Cay8pI0y.js");
|
|
937
940
|
signal.throwIfAborted();
|
|
938
941
|
const prepared = preparedFor(root, runId, dockerProvider(), spec.sandbox, spec.harness);
|
|
939
942
|
if (!prepared) throw new InfraError(`The sandbox image for ${where} wasn't prepared before the run started`);
|
|
@@ -944,29 +947,100 @@ async function prepareEnvironment(a, root, runId, where, signal) {
|
|
|
944
947
|
} else debugLog("image", `none: the ${spec.sandbox.kind} sandbox runs on the host`);
|
|
945
948
|
}
|
|
946
949
|
//#endregion
|
|
950
|
+
//#region src/judge/size.ts
|
|
951
|
+
/** Roughly four characters a token, as `reeval analyze` counts: an estimate, not the model's. */
|
|
952
|
+
const CHARS_PER_TOKEN = 4;
|
|
953
|
+
const tokensOf = (chars) => Math.ceil(chars / CHARS_PER_TOKEN);
|
|
954
|
+
const k = (tokens) => tokens < 1e3 ? String(tokens) : `${Math.round(tokens / 1e3)}k`;
|
|
955
|
+
const diffItems = (patch) => patch.split(/(?=^diff --git )/m).map((part) => ({
|
|
956
|
+
name: /^diff --git a\/.+ b\/(.+)$/m.exec(part)?.[1] ?? "",
|
|
957
|
+
chars: part.length
|
|
958
|
+
})).filter((item) => item.name);
|
|
959
|
+
/** The state's parts by size, each with its biggest files where it has any. */
|
|
960
|
+
function partsOf(state, question) {
|
|
961
|
+
return [...Object.entries(state).map(([name, value]) => {
|
|
962
|
+
const text = typeof value === "string" ? value : JSON.stringify(value);
|
|
963
|
+
const items = name === "diff" && typeof value === "string" ? diffItems(value) : value && typeof value === "object" && !Array.isArray(value) ? Object.entries(value).map(([file, content]) => ({
|
|
964
|
+
name: file,
|
|
965
|
+
chars: typeof content === "string" ? content.length : JSON.stringify(content).length
|
|
966
|
+
})) : [];
|
|
967
|
+
return {
|
|
968
|
+
name,
|
|
969
|
+
chars: text?.length ?? 0,
|
|
970
|
+
items
|
|
971
|
+
};
|
|
972
|
+
}), {
|
|
973
|
+
name: "question",
|
|
974
|
+
chars: question.length,
|
|
975
|
+
items: []
|
|
976
|
+
}].sort((a, b) => b.chars - a.chars);
|
|
977
|
+
}
|
|
978
|
+
/** The estimated size of what the judge reads, in tokens. */
|
|
979
|
+
const inputTokens = (state, question) => tokensOf(JSON.stringify(state).length + question.length);
|
|
980
|
+
/**
|
|
981
|
+
* `diff 306k, of which dist/assets/index-….js is 296k; output 1k; …`: the state's parts by
|
|
982
|
+
* estimated tokens, naming the biggest files in each.
|
|
983
|
+
*/
|
|
984
|
+
function describeSize(state, question) {
|
|
985
|
+
const parts = partsOf(state, question);
|
|
986
|
+
const big = parts.filter((p) => tokensOf(p.chars) >= 1e3);
|
|
987
|
+
return (big.length ? big : parts.slice(0, 1)).map((p) => {
|
|
988
|
+
const top = p.items.sort((a, b) => b.chars - a.chars).slice(0, 3).filter((item) => tokensOf(item.chars) >= 1e3).map((item) => `${item.name} is ${k(tokensOf(item.chars))}`);
|
|
989
|
+
return `${p.name} ${k(tokensOf(p.chars))}${top.length ? `, of which ${top.join(", ")}` : ""}`;
|
|
990
|
+
}).join("; ");
|
|
991
|
+
}
|
|
992
|
+
const HINT = "Narrow what the judge sees with include, e.g. c.judge(question, { include: ['src/'] }), or set judge: { include } in the config; files shows chosen files in full.";
|
|
993
|
+
/**
|
|
994
|
+
* A provider's error, as the provider worded it, then what the judge's input held: its estimated
|
|
995
|
+
* size and biggest parts and files, and how to narrow it.
|
|
996
|
+
*/
|
|
997
|
+
const withInputSize = (message, state, question) => `${message}\nThe judge's input was ~${k(inputTokens(state, question))} tokens (estimated): ${describeSize(state, question)}. ${HINT}`;
|
|
998
|
+
//#endregion
|
|
947
999
|
//#region src/attempt/judge.ts
|
|
948
|
-
const noJudgeModel = (configFile) => `
|
|
1000
|
+
const noJudgeModel = (configFile) => `c.judge() has no model. Set judge: { model: 'typesafe-ai/jev-1.13.0' } in ${configFile}, on the group or eval, or pass { model } to this call.`;
|
|
949
1001
|
const isTurn = (value) => typeof value === "object" && value !== null && "transcript" in value && "diff" in value;
|
|
950
|
-
|
|
951
|
-
|
|
1002
|
+
const workspacePath = (path) => path.replace(/^\.\//, "");
|
|
1003
|
+
/**
|
|
1004
|
+
* The turn's task and output, its changed files and diff as `judgeDiff` shows them, and the whole
|
|
1005
|
+
* current content of each of `files` (null when there's no such file).
|
|
1006
|
+
*/
|
|
1007
|
+
async function judgeState(turn, output, { include, files }, readFile) {
|
|
1008
|
+
const inFull = files?.length ? files : void 0;
|
|
1009
|
+
const shown = judgeDiff(turn.diff, {
|
|
1010
|
+
...include ? { include } : {},
|
|
1011
|
+
...inFull ? { inFull: new Set(inFull.map(workspacePath)) } : {}
|
|
1012
|
+
});
|
|
1013
|
+
const state = {
|
|
952
1014
|
task: turn.prompt,
|
|
953
1015
|
output,
|
|
954
|
-
files:
|
|
955
|
-
diff:
|
|
1016
|
+
files: shown.files,
|
|
1017
|
+
diff: shown.patch
|
|
1018
|
+
};
|
|
1019
|
+
if (inFull) {
|
|
1020
|
+
const contents = {};
|
|
1021
|
+
for (const path of inFull) contents[workspacePath(path)] = await readFile(path);
|
|
1022
|
+
state.contents = contents;
|
|
1023
|
+
}
|
|
1024
|
+
return {
|
|
1025
|
+
state,
|
|
1026
|
+
dropped: shown.dropped
|
|
956
1027
|
};
|
|
957
1028
|
}
|
|
958
1029
|
/**
|
|
959
1030
|
* Phase 4, the judge: grades a turn (the last by default) or a value against a question, under
|
|
960
1031
|
* the judge provider's concurrency lease. Every call's input is recorded, including calls that
|
|
961
|
-
* fail
|
|
1032
|
+
* fail. A call that fails returns a `JudgeFailure` and fails the attempt as a judge error after the eval's body, so the judges and
|
|
1033
|
+
* checks after it still run.
|
|
962
1034
|
*/
|
|
963
|
-
function judgeCaller(a) {
|
|
1035
|
+
function judgeCaller(a, readFile) {
|
|
964
1036
|
return async (question, { on, ...call } = {}) => {
|
|
965
|
-
if (typeof question !== "string" || !question.trim()) throw new Error(`
|
|
1037
|
+
if (typeof question !== "string" || !question.trim()) throw new Error(`c.judge() needs a question: a non-empty string (got ${JSON.stringify(question)})`);
|
|
966
1038
|
const { threshold } = call;
|
|
967
|
-
if (threshold !== void 0 && !(typeof threshold === "number" && threshold >= 0 && threshold <= 1)) throw new Error(`
|
|
1039
|
+
if (threshold !== void 0 && !(typeof threshold === "number" && threshold >= 0 && threshold <= 1)) throw new Error(`c.judge() threshold must be between 0 and 1 (got ${String(threshold)})`);
|
|
1040
|
+
const bad = badJudgeList(call);
|
|
1041
|
+
if (bad) throw new Error(`c.judge() ${bad.key} must be a list of non-empty strings (got ${bad.got})`);
|
|
968
1042
|
const subject = isTurn(on) ? on : a.turns.at(-1);
|
|
969
|
-
if (!subject) throw new Error("
|
|
1043
|
+
if (!subject) throw new Error("c.judge() has no turn to grade: call c.send() first");
|
|
970
1044
|
const options = {
|
|
971
1045
|
...a.spec.judge,
|
|
972
1046
|
...call
|
|
@@ -976,35 +1050,69 @@ function judgeCaller(a) {
|
|
|
976
1050
|
a.judgeErrored = true;
|
|
977
1051
|
throw new Error(noJudgeModel(getRunContext().config.file));
|
|
978
1052
|
}
|
|
979
|
-
const
|
|
1053
|
+
const { include, files, maxConcurrent, ...judgeOptions } = options;
|
|
1054
|
+
const { state, dropped } = await judgeState(subject, on === void 0 || isTurn(on) ? subject.text : on, {
|
|
1055
|
+
include,
|
|
1056
|
+
files
|
|
1057
|
+
}, readFile);
|
|
1058
|
+
const name = judgeModelName(model);
|
|
980
1059
|
const input = {
|
|
981
1060
|
question,
|
|
982
|
-
model:
|
|
983
|
-
state
|
|
1061
|
+
model: name,
|
|
1062
|
+
state,
|
|
1063
|
+
...dropped.length ? { dropped } : {}
|
|
984
1064
|
};
|
|
985
1065
|
a.record.judgeInputs?.push(input);
|
|
986
1066
|
const start = performance.now();
|
|
987
1067
|
const ms = () => Math.round(performance.now() - start);
|
|
1068
|
+
const atLeast = options.threshold ?? .8;
|
|
988
1069
|
a.report({
|
|
989
1070
|
kind: "judge-start",
|
|
990
1071
|
question
|
|
991
1072
|
});
|
|
992
|
-
debugLog("judge", `asking ${
|
|
1073
|
+
debugLog("judge", `asking ${name}: ${JSON.stringify(clip(question, 160))}`);
|
|
1074
|
+
if (dropped.length) debugLog("judge", `left out of the judge's input: ${dropped.join(" · ")}`);
|
|
993
1075
|
debugTrace("judge", "prompt", input, "judge prompt");
|
|
994
|
-
const
|
|
995
|
-
|
|
1076
|
+
const failed = (message, retries) => {
|
|
1077
|
+
a.judgeErrored = true;
|
|
1078
|
+
a.judgeErrors.push(`c.judge(${JSON.stringify(clip(question, 80))}) failed: ${message}`);
|
|
1079
|
+
input.error = message;
|
|
1080
|
+
if (retries?.length) input.retries = retries;
|
|
1081
|
+
debugLog("judge", `${name} · ${formatDuration(ms())} · error: ${message}`);
|
|
1082
|
+
debugTrace("judge", "error", {
|
|
1083
|
+
error: message,
|
|
1084
|
+
retries
|
|
1085
|
+
}, "judge error");
|
|
1086
|
+
a.report({
|
|
1087
|
+
kind: "judge-end",
|
|
1088
|
+
question,
|
|
1089
|
+
verdict: "error",
|
|
1090
|
+
score: null,
|
|
1091
|
+
threshold: null,
|
|
1092
|
+
ms: ms()
|
|
1093
|
+
});
|
|
1094
|
+
return {
|
|
1095
|
+
verdict: "error",
|
|
1096
|
+
score: null,
|
|
1097
|
+
threshold: atLeast,
|
|
1098
|
+
question,
|
|
1099
|
+
model: name,
|
|
1100
|
+
error: message
|
|
1101
|
+
};
|
|
1102
|
+
};
|
|
1103
|
+
const provider = name.split("/")[0];
|
|
996
1104
|
try {
|
|
997
1105
|
const { verdict, retries } = await a.timed("judgeMs", () => withLease(maxConcurrent ? { [`judge:${provider}`]: maxConcurrent } : {}, () => runJudge(question, state, {
|
|
998
1106
|
...judgeOptions,
|
|
999
1107
|
model,
|
|
1000
|
-
threshold:
|
|
1108
|
+
threshold: atLeast
|
|
1001
1109
|
}, a.signal), a.signal));
|
|
1002
1110
|
a.record.judgements.push(retries.length ? {
|
|
1003
1111
|
...verdict,
|
|
1004
1112
|
retries
|
|
1005
1113
|
} : verdict);
|
|
1006
|
-
const { score
|
|
1007
|
-
debugLog("judge", `${verdict.resolvedModel ?? verdict.model} · ${formatDuration(ms())} · score ${score.toFixed(2)} ${score >= threshold ? "≥" : "<"} ${threshold} · ${verdict.verdict}${retries.length ? ` · ${retries.length} retries` : ""} · reason: P(yes) ${score.toFixed(2)} is ${score >= threshold ? "at or above" : "below"} the ${threshold} threshold`);
|
|
1114
|
+
const { score } = verdict;
|
|
1115
|
+
debugLog("judge", `${verdict.resolvedModel ?? verdict.model} · ${formatDuration(ms())} · score ${score.toFixed(2)} ${score >= verdict.threshold ? "≥" : "<"} ${verdict.threshold} · ${verdict.verdict}${retries.length ? ` · ${retries.length} retries` : ""} · reason: P(yes) ${score.toFixed(2)} is ${score >= verdict.threshold ? "at or above" : "below"} the ${verdict.threshold} threshold`);
|
|
1008
1116
|
debugTrace("judge", "response", {
|
|
1009
1117
|
verdict,
|
|
1010
1118
|
retries
|
|
@@ -1014,29 +1122,18 @@ function judgeCaller(a) {
|
|
|
1014
1122
|
question,
|
|
1015
1123
|
verdict: verdict.verdict,
|
|
1016
1124
|
score,
|
|
1017
|
-
threshold,
|
|
1125
|
+
threshold: verdict.threshold,
|
|
1018
1126
|
ms: ms()
|
|
1019
1127
|
});
|
|
1020
1128
|
return verdict;
|
|
1021
1129
|
} catch (error) {
|
|
1022
|
-
a.
|
|
1130
|
+
if (a.signal.aborted) {
|
|
1131
|
+
a.judgeErrored = true;
|
|
1132
|
+
throw error;
|
|
1133
|
+
}
|
|
1023
1134
|
const { retries } = error;
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
debugLog("judge", `${input.model} · ${formatDuration(ms())} · error: ${input.error}`);
|
|
1027
|
-
debugTrace("judge", "error", {
|
|
1028
|
-
error: input.error,
|
|
1029
|
-
retries
|
|
1030
|
-
}, "judge error");
|
|
1031
|
-
a.report({
|
|
1032
|
-
kind: "judge-end",
|
|
1033
|
-
question,
|
|
1034
|
-
verdict: "error",
|
|
1035
|
-
score: null,
|
|
1036
|
-
threshold: null,
|
|
1037
|
-
ms: ms()
|
|
1038
|
-
});
|
|
1039
|
-
throw error;
|
|
1135
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1136
|
+
return failed(isApiError(error) ? withInputSize(message, state, question) : message, retries);
|
|
1040
1137
|
}
|
|
1041
1138
|
};
|
|
1042
1139
|
}
|
|
@@ -1047,7 +1144,7 @@ async function createSandbox(descriptor, options) {
|
|
|
1047
1144
|
switch (descriptor.kind) {
|
|
1048
1145
|
case "fake": return await createFakeSandbox(descriptor, options.env);
|
|
1049
1146
|
case "docker": {
|
|
1050
|
-
const { createDockerSandbox } = await import("./docker-
|
|
1147
|
+
const { createDockerSandbox } = await import("./docker-Bv1ZC6V7.js");
|
|
1051
1148
|
return await createDockerSandbox(descriptor, options);
|
|
1052
1149
|
}
|
|
1053
1150
|
}
|
|
@@ -1258,7 +1355,8 @@ function createAttempt(spec, signal, progress) {
|
|
|
1258
1355
|
}
|
|
1259
1356
|
},
|
|
1260
1357
|
signal,
|
|
1261
|
-
judgeErrored: false
|
|
1358
|
+
judgeErrored: false,
|
|
1359
|
+
judgeErrors: []
|
|
1262
1360
|
};
|
|
1263
1361
|
}
|
|
1264
1362
|
const startTimeoutMs = (harness) => parseDuration(harness.startTimeout ?? "90s");
|
|
@@ -1423,7 +1521,13 @@ async function startSession(a, runId, setupStart) {
|
|
|
1423
1521
|
for (const f of env.files) {
|
|
1424
1522
|
await box.writeFile(f.path, f.content);
|
|
1425
1523
|
const size = typeof f.content === "string" ? Buffer.byteLength(f.content) : f.content.byteLength;
|
|
1426
|
-
debugLog("env", `file ${f.path} (${size} bytes)`);
|
|
1524
|
+
debugLog("env", `file ${f.path} (${size} bytes${f.executable ? ", executable" : ""})`);
|
|
1525
|
+
}
|
|
1526
|
+
const executable = env.files.flatMap((f) => f.executable ? [f.path.startsWith("~/") ? `${box.home}/${f.path.slice(2)}` : f.path] : []);
|
|
1527
|
+
if (executable.length) {
|
|
1528
|
+
const paths = executable.map((p) => shellQuote(p.startsWith("-") ? `./${p}` : p));
|
|
1529
|
+
const r = await box.exec(`chmod +x ${paths.join(" ")}`, { signal: a.signal });
|
|
1530
|
+
if (r.exitCode !== 0) throw new InfraError(`Couldn't make ${executable.join(", ")} executable: ${tailOf(r.stderr || r.stdout)}`);
|
|
1427
1531
|
}
|
|
1428
1532
|
const skillDir = workspaceSkillDir(spec.harness);
|
|
1429
1533
|
for (const skill of env.workspaceSkills) {
|
|
@@ -1605,7 +1709,7 @@ async function attemptBody(spec, fn, { signal: testSignal, setMeta, progress, un
|
|
|
1605
1709
|
};
|
|
1606
1710
|
const takeContext = contextTaker(a);
|
|
1607
1711
|
const { exec, readFile } = createChecks(a);
|
|
1608
|
-
const
|
|
1712
|
+
const c = {
|
|
1609
1713
|
get signal() {
|
|
1610
1714
|
return a.signal;
|
|
1611
1715
|
},
|
|
@@ -1628,7 +1732,7 @@ async function attemptBody(spec, fn, { signal: testSignal, setMeta, progress, un
|
|
|
1628
1732
|
exec,
|
|
1629
1733
|
readFile
|
|
1630
1734
|
}),
|
|
1631
|
-
judge: judgeCaller(a)
|
|
1735
|
+
judge: judgeCaller(a, readFile)
|
|
1632
1736
|
};
|
|
1633
1737
|
const timedOut = () => !!timer?.aborted && !testSignal.aborted;
|
|
1634
1738
|
try {
|
|
@@ -1639,10 +1743,12 @@ async function attemptBody(spec, fn, { signal: testSignal, setMeta, progress, un
|
|
|
1639
1743
|
timer = clock.signal;
|
|
1640
1744
|
a.signal = AbortSignal.any([testSignal, timer]);
|
|
1641
1745
|
timer.addEventListener("abort", destroy, { once: true });
|
|
1642
|
-
await fn(
|
|
1746
|
+
await fn(c);
|
|
1643
1747
|
a.signal.throwIfAborted();
|
|
1644
1748
|
const missed = await unawaited();
|
|
1645
1749
|
if (missed) throw missed;
|
|
1750
|
+
const [only, ...more] = a.judgeErrors;
|
|
1751
|
+
if (only) throw new Error(more.length ? `${more.length + 1} judge calls failed:\n${a.judgeErrors.join("\n")}` : only);
|
|
1646
1752
|
} catch (error) {
|
|
1647
1753
|
recordFailure(a, error, timedOut());
|
|
1648
1754
|
if (timedOut()) throw new Error(`Eval timed out after ${spec.timeoutMs / 1e3}s`);
|
|
@@ -1763,6 +1869,7 @@ function planEval(declaration, ctx) {
|
|
|
1763
1869
|
return plannedAttempts.map((planned) => {
|
|
1764
1870
|
if (!cells.includes(planned.cell.key)) cells.push(planned.cell.key);
|
|
1765
1871
|
const workspace = workspaceOf(planned.environment.layers);
|
|
1872
|
+
const files = filesOf(planned.environment.layers);
|
|
1766
1873
|
const attempt = {
|
|
1767
1874
|
name,
|
|
1768
1875
|
groups,
|
|
@@ -1779,6 +1886,7 @@ function planEval(declaration, ctx) {
|
|
|
1779
1886
|
secretVars: secretVarsIn(resolved.env, planned),
|
|
1780
1887
|
egress: planned.egress,
|
|
1781
1888
|
...workspace ? { workspace } : {},
|
|
1889
|
+
...files.length ? { files } : {},
|
|
1782
1890
|
plan
|
|
1783
1891
|
};
|
|
1784
1892
|
const rankFile = relativeFile(ctx.config.root, ctx.file ?? "");
|
|
@@ -1839,7 +1947,7 @@ function splitArgs(what, name, a, b) {
|
|
|
1839
1947
|
if (typeof a === "function" && typeof b === "function") throw new UsageError(`${what}("${name}") got two functions. Options must be a plain object; helpers such as secret are only available in defineConfig and defineEnvironment callbacks. Put the secret in an environment (environment: …) or in the config's env.`);
|
|
1840
1948
|
if (typeof a === "function") return [b ?? {}, a];
|
|
1841
1949
|
if (typeof b === "function") return [a ?? {}, b];
|
|
1842
|
-
throw new UsageError(what === "group" ? `group("${name}") has no function. Pass the group's body, e.g. group("${name}", () => { … }).` : `${what}("${name}") has no function. Pass the eval's body, e.g. ${what}("${name}", async (
|
|
1950
|
+
throw new UsageError(what === "group" ? `group("${name}") has no function. Pass the group's body, e.g. group("${name}", () => { … }).` : `${what}("${name}") has no function. Pass the eval's body, e.g. ${what}("${name}", async (c) => { … }).`);
|
|
1843
1951
|
}
|
|
1844
1952
|
/** `evaluate.only` and `group.only` are refused in CI, where they'd silently skip the rest. */
|
|
1845
1953
|
function checkOnly(mode, what) {
|
|
@@ -1939,12 +2047,12 @@ const defineEval = (mode) => (name, a, b) => {
|
|
|
1939
2047
|
function formatName(template, item, index) {
|
|
1940
2048
|
return template.replace(/%#/g, String(index)).replace(/%s/g, typeof item === "string" ? item : JSON.stringify(item)).replace(/\$([A-Za-z_][A-Za-z0-9_]*)/g, (whole, key) => typeof item === "object" && item !== null && key in item ? String(item[key]) : whole);
|
|
1941
2049
|
}
|
|
1942
|
-
/** One eval per case: `evaluate.for(cases)('adds $a and $b', async (
|
|
2050
|
+
/** One eval per case: `evaluate.for(cases)('adds $a and $b', async (c, { a, b }) => …)`. */
|
|
1943
2051
|
const evalFor = (cases) => (name, a, b) => {
|
|
1944
2052
|
const [own, fn] = splitArgs("evaluate.for", name, a, b);
|
|
1945
2053
|
const hint = ` For evaluate.for, put $key, %s or %# in the name ("${name}") so each case's name differs.`;
|
|
1946
2054
|
cases.forEach((item, i) => {
|
|
1947
|
-
register("run", formatName(name, item, i), own, (
|
|
2055
|
+
register("run", formatName(name, item, i), own, (c) => fn(c, item), hint);
|
|
1948
2056
|
});
|
|
1949
2057
|
};
|
|
1950
2058
|
const evaluate = Object.assign(defineEval("run"), {
|
|
@@ -1954,6 +2062,6 @@ const evaluate = Object.assign(defineEval("run"), {
|
|
|
1954
2062
|
for: evalFor
|
|
1955
2063
|
});
|
|
1956
2064
|
//#endregion
|
|
1957
|
-
export { DEFAULT_EGRESS_ALLOW, DEFAULT_SKILL_EXCLUDE, HarnessCapabilityError, defineConfig, defineEnvironment, evaluate, expect, group };
|
|
2065
|
+
export { DEFAULT_DIRECTORY_IGNORES, DEFAULT_EGRESS_ALLOW, DEFAULT_SKILL_EXCLUDE, HarnessCapabilityError, defineConfig, defineEnvironment, evaluate, expect, group };
|
|
1958
2066
|
|
|
1959
2067
|
//# sourceMappingURL=index.js.map
|