niceeval 0.13.3 → 0.13.4-canary.39
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/INDEX.md +5 -5
- package/dist/agents/index.cjs +2 -2
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/project.json +6 -0
- package/dist/agents/streaming.cjs.map +1 -1
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +1 -1
- package/dist/agents/types.d.mts +1 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/analysis/bindings.d.cts +8 -8
- package/dist/analysis/bindings.d.mts +8 -8
- package/dist/analysis/bindings.d.ts +8 -8
- package/dist/analysis/contracts.cjs.map +1 -1
- package/dist/analysis/contracts.d.cts +8 -19
- package/dist/analysis/contracts.d.mts +8 -19
- package/dist/analysis/contracts.d.ts +8 -19
- package/dist/analysis/experiment-groups.cjs +7 -14
- package/dist/analysis/experiment-groups.cjs.map +1 -1
- package/dist/analysis/index.cjs.map +1 -1
- package/dist/analysis/index.d.cts +1 -1
- package/dist/analysis/index.d.mts +1 -1
- package/dist/analysis/index.d.ts +1 -1
- package/dist/cli/application.cjs +4 -13
- package/dist/cli/application.cjs.map +1 -1
- package/dist/cli/application.d.cts +62 -59
- package/dist/cli/application.d.mts +62 -59
- package/dist/cli/application.d.ts +62 -59
- package/dist/cli/application.js +6 -12
- package/dist/cli/bootstrap.cjs +28 -2
- package/dist/cli/bootstrap.cjs.map +1 -1
- package/dist/cli/contribution.cjs +185 -0
- package/dist/cli/contribution.cjs.map +1 -0
- package/dist/cli/contribution.d.cts +55 -0
- package/dist/cli/contribution.d.mts +55 -0
- package/dist/cli/contribution.d.ts +55 -0
- package/dist/cli/contribution.js +20 -0
- package/dist/cli/contribution.js.map +1 -0
- package/dist/cli/node-application.cjs +119 -87
- package/dist/cli/node-application.cjs.map +1 -1
- package/dist/cli/node-application.d.cts +2 -8
- package/dist/cli/node-application.d.mts +2 -8
- package/dist/cli/node-application.d.ts +2 -8
- package/dist/cli/node-application.js +12 -22
- package/dist/cli/program.cjs +87 -2756
- package/dist/cli/program.cjs.map +1 -1
- package/dist/cli/program.d.cts +11 -332
- package/dist/cli/program.d.mts +11 -332
- package/dist/cli/program.d.ts +11 -332
- package/dist/cli/program.js +4 -28
- package/dist/cli.cjs +0 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +0 -1
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +6 -14
- package/dist/define.cjs +1 -1
- package/dist/define.cjs.map +1 -1
- package/dist/docker/cache-administration.cjs +8 -0
- package/dist/docker/cache-administration.cjs.map +1 -0
- package/dist/docker/cache-administration.d.cts +33 -0
- package/dist/docker/cache-administration.d.mts +33 -0
- package/dist/docker/cache-administration.d.ts +33 -0
- package/dist/docker/cache-administration.js +6 -0
- package/dist/docker/cache-administration.js.map +1 -0
- package/dist/docker/cache-live.cjs +27 -0
- package/dist/docker/cache-live.cjs.map +1 -0
- package/dist/docker/cache-live.d.cts +3 -0
- package/dist/docker/cache-live.d.mts +3 -0
- package/dist/docker/cache-live.d.ts +3 -0
- package/dist/docker/cache-live.js +6 -0
- package/dist/docker/cache-live.js.map +1 -0
- package/dist/docker/cli/contribution.cjs +223 -0
- package/dist/docker/cli/contribution.cjs.map +1 -0
- package/dist/docker/cli/contribution.d.cts +48 -0
- package/dist/docker/cli/contribution.d.mts +48 -0
- package/dist/docker/cli/contribution.d.ts +48 -0
- package/dist/docker/cli/contribution.js +8 -0
- package/dist/docker/cli/contribution.js.map +1 -0
- package/dist/eval/cli/contribution.cjs +62 -0
- package/dist/eval/cli/contribution.cjs.map +1 -0
- package/dist/eval/cli/contribution.d.cts +21 -0
- package/dist/eval/cli/contribution.d.mts +21 -0
- package/dist/eval/cli/contribution.d.ts +21 -0
- package/dist/eval/cli/contribution.js +8 -0
- package/dist/eval/cli/contribution.js.map +1 -0
- package/dist/eval/host/index.cjs +23 -0
- package/dist/eval/host/index.cjs.map +1 -0
- package/dist/eval/host/index.d.cts +27 -0
- package/dist/eval/host/index.d.mts +27 -0
- package/dist/eval/host/index.d.ts +27 -0
- package/dist/eval/host/index.js +8 -0
- package/dist/eval/host/index.js.map +1 -0
- package/dist/eval/host/index.mjs +8 -0
- package/dist/eval/host/index.mjs.map +1 -0
- package/dist/experiment/host/cli/contribution.cjs +835 -0
- package/dist/experiment/host/cli/contribution.cjs.map +1 -0
- package/dist/experiment/host/cli/contribution.d.cts +329 -0
- package/dist/experiment/host/cli/contribution.d.mts +329 -0
- package/dist/experiment/host/cli/contribution.d.ts +329 -0
- package/dist/experiment/host/cli/contribution.js +22 -0
- package/dist/experiment/host/cli/contribution.js.map +1 -0
- package/dist/experiment/host/cli/index.cjs +9 -0
- package/dist/experiment/host/cli/index.cjs.map +1 -0
- package/dist/experiment/host/cli/index.d.cts +2 -0
- package/dist/experiment/host/cli/index.d.mts +2 -0
- package/dist/experiment/host/cli/index.d.ts +2 -0
- package/dist/experiment/host/cli/index.js +10 -0
- package/dist/experiment/host/cli/index.js.map +1 -0
- package/dist/experiment/host/cli/terminal.cjs +15 -0
- package/dist/experiment/host/cli/terminal.cjs.map +1 -0
- package/dist/experiment/host/cli/terminal.d.cts +14 -0
- package/dist/experiment/host/cli/terminal.d.mts +14 -0
- package/dist/experiment/host/cli/terminal.d.ts +14 -0
- package/dist/experiment/host/cli/terminal.js +8 -0
- package/dist/experiment/host/cli/terminal.js.map +1 -0
- package/dist/experiment/host/index.cjs +35 -58
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/experiment/host/index.d.cts +5 -79
- package/dist/experiment/host/index.d.mts +5 -79
- package/dist/experiment/host/index.d.ts +5 -79
- package/dist/experiment/host/index.js +4 -2
- package/dist/experiment/host/index.mjs +4 -2
- package/dist/experiment/host/operations.cjs +678 -0
- package/dist/experiment/host/operations.cjs.map +1 -0
- package/dist/experiment/host/operations.d.cts +19 -0
- package/dist/experiment/host/operations.d.mts +19 -0
- package/dist/experiment/host/operations.d.ts +19 -0
- package/dist/experiment/host/operations.js +24 -0
- package/dist/experiment/host/operations.js.map +1 -0
- package/dist/experiment/host/presentation.cjs +81 -0
- package/dist/experiment/host/presentation.cjs.map +1 -0
- package/dist/experiment/host/presentation.d.cts +9 -0
- package/dist/experiment/host/presentation.d.mts +9 -0
- package/dist/experiment/host/presentation.d.ts +9 -0
- package/dist/experiment/host/presentation.js +8 -0
- package/dist/experiment/host/presentation.js.map +1 -0
- package/dist/experiment/host/teardown.cjs +394 -0
- package/dist/experiment/host/teardown.cjs.map +1 -0
- package/dist/experiment/host/teardown.d.cts +5 -0
- package/dist/experiment/host/teardown.d.mts +5 -0
- package/dist/experiment/host/teardown.d.ts +5 -0
- package/dist/experiment/host/teardown.js +8 -0
- package/dist/experiment/host/teardown.js.map +1 -0
- package/dist/experiment/host/types.cjs +9 -0
- package/dist/experiment/host/types.cjs.map +1 -0
- package/dist/experiment/host/types.d.cts +423 -0
- package/dist/experiment/host/types.d.mts +423 -0
- package/dist/experiment/host/types.d.ts +423 -0
- package/dist/experiment/host/types.js +6 -0
- package/dist/experiment/host/types.js.map +1 -0
- package/dist/i18n/en.cjs +8 -50
- package/dist/i18n/en.cjs.map +1 -1
- package/dist/i18n/en.d.cts +2 -6
- package/dist/i18n/en.d.mts +2 -6
- package/dist/i18n/en.d.ts +2 -6
- package/dist/o11y/project.json +6 -0
- package/dist/project/cli/contribution.cjs +66 -0
- package/dist/project/cli/contribution.cjs.map +1 -0
- package/dist/project/cli/contribution.d.cts +17 -0
- package/dist/project/cli/contribution.d.mts +17 -0
- package/dist/project/cli/contribution.d.ts +17 -0
- package/dist/project/cli/contribution.js +8 -0
- package/dist/project/cli/contribution.js.map +1 -0
- package/dist/project/cli/index.cjs +7 -0
- package/dist/project/cli/index.cjs.map +1 -0
- package/dist/project/cli/index.d.cts +1 -0
- package/dist/project/cli/index.d.mts +1 -0
- package/dist/project/cli/index.d.ts +1 -0
- package/dist/project/cli/index.js +8 -0
- package/dist/project/cli/index.js.map +1 -0
- package/dist/project/host/index.cjs +11 -0
- package/dist/project/host/index.cjs.map +1 -0
- package/dist/project/host/index.d.cts +4 -0
- package/dist/project/host/index.d.mts +4 -0
- package/dist/project/host/index.d.ts +4 -0
- package/dist/project/host/index.js +14 -0
- package/dist/project/host/index.js.map +1 -0
- package/dist/project/host/index.mjs +14 -0
- package/dist/project/host/index.mjs.map +1 -0
- package/dist/project/host.cjs +59 -0
- package/dist/project/host.cjs.map +1 -0
- package/dist/project/host.d.cts +17 -0
- package/dist/project/host.d.mts +17 -0
- package/dist/project/host.d.ts +17 -0
- package/dist/project/host.js +6 -0
- package/dist/project/host.js.map +1 -0
- package/dist/project/index.cjs +11 -0
- package/dist/project/index.cjs.map +1 -0
- package/dist/project/index.d.cts +4 -0
- package/dist/project/index.d.mts +4 -0
- package/dist/project/index.d.ts +4 -0
- package/dist/project/index.js +14 -0
- package/dist/project/index.js.map +1 -0
- package/dist/project/node.cjs +91 -0
- package/dist/project/node.cjs.map +1 -0
- package/dist/project/node.d.cts +6 -0
- package/dist/project/node.d.mts +6 -0
- package/dist/project/node.d.ts +6 -0
- package/dist/project/node.js +12 -0
- package/dist/project/node.js.map +1 -0
- package/dist/project/services.cjs +17 -0
- package/dist/project/services.cjs.map +1 -0
- package/dist/project/services.d.cts +47 -0
- package/dist/project/services.d.mts +47 -0
- package/dist/project/services.d.ts +47 -0
- package/dist/project/services.js +12 -0
- package/dist/project/services.js.map +1 -0
- package/dist/project/templates.cjs +28 -0
- package/dist/project/templates.cjs.map +1 -0
- package/dist/project/templates.d.cts +4 -0
- package/dist/project/templates.d.mts +4 -0
- package/dist/project/templates.d.ts +4 -0
- package/dist/project/templates.js +12 -0
- package/dist/project/templates.js.map +1 -0
- package/dist/project.json +6 -0
- package/dist/record/family/catalog.d.cts +10 -10
- package/dist/record/family/catalog.d.mts +10 -10
- package/dist/record/family/catalog.d.ts +10 -10
- package/dist/record/family/file-changes.d.cts +8 -8
- package/dist/record/family/file-changes.d.mts +8 -8
- package/dist/record/family/file-changes.d.ts +8 -8
- package/dist/record/host/cli/contribution.cjs +206 -0
- package/dist/record/host/cli/contribution.cjs.map +1 -0
- package/dist/record/host/cli/contribution.d.cts +32 -0
- package/dist/record/host/cli/contribution.d.mts +32 -0
- package/dist/record/host/cli/contribution.d.ts +32 -0
- package/dist/record/host/cli/contribution.js +10 -0
- package/dist/record/host/cli/contribution.js.map +1 -0
- package/dist/record/host/cli/index.cjs +8 -0
- package/dist/record/host/cli/index.cjs.map +1 -0
- package/dist/record/host/cli/index.d.cts +1 -0
- package/dist/record/host/cli/index.d.mts +1 -0
- package/dist/record/host/cli/index.d.ts +1 -0
- package/dist/record/host/cli/index.js +10 -0
- package/dist/record/host/cli/index.js.map +1 -0
- package/dist/record/host/cli/presentation.cjs +122 -0
- package/dist/record/host/cli/presentation.cjs.map +1 -0
- package/dist/record/host/cli/presentation.d.cts +7 -0
- package/dist/record/host/cli/presentation.d.mts +7 -0
- package/dist/record/host/cli/presentation.d.ts +7 -0
- package/dist/record/host/cli/presentation.js +12 -0
- package/dist/record/host/cli/presentation.js.map +1 -0
- package/dist/record/host/index.cjs.map +1 -1
- package/dist/record/host/index.d.cts +1 -1
- package/dist/record/host/index.d.mts +1 -1
- package/dist/record/host/index.d.ts +1 -1
- package/dist/record/host/runtime.cjs +184 -1
- package/dist/record/host/runtime.cjs.map +1 -1
- package/dist/record/host/types.cjs.map +1 -1
- package/dist/record/host/types.d.cts +120 -0
- package/dist/record/host/types.d.mts +120 -0
- package/dist/record/host/types.d.ts +120 -0
- package/dist/record/project.json +6 -0
- package/dist/report/assets/styles.css +80 -0
- package/dist/report/cli/contribution.cjs +325 -0
- package/dist/report/cli/contribution.cjs.map +1 -0
- package/dist/report/cli/contribution.d.cts +143 -0
- package/dist/report/cli/contribution.d.mts +143 -0
- package/dist/report/cli/contribution.d.ts +143 -0
- package/dist/report/cli/contribution.js +12 -0
- package/dist/report/cli/contribution.js.map +1 -0
- package/dist/report/client-dist/app.js +9 -9
- package/dist/report/components/attempt-detail/content.cjs +1 -1
- package/dist/report/components/attempt-detail/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.cjs +5 -0
- package/dist/report/components/entity-lists/compute.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.d.cts +2 -0
- package/dist/report/components/entity-lists/compute.d.mts +2 -0
- package/dist/report/components/entity-lists/compute.d.ts +2 -0
- package/dist/report/components/entity-lists/content.cjs +35 -12
- package/dist/report/components/entity-lists/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.cjs +0 -3
- package/dist/report/components/entity-lists/index.cjs.map +1 -1
- package/dist/report/components/summaries/index.cjs +2 -4
- package/dist/report/components/summaries/index.cjs.map +1 -1
- package/dist/report/definition/cell.cjs +7 -2
- package/dist/report/definition/cell.cjs.map +1 -1
- package/dist/report/definition/cell.d.cts +2 -0
- package/dist/report/definition/cell.d.mts +2 -0
- package/dist/report/definition/cell.d.ts +2 -0
- package/dist/report/definition/primitives/assertion-evidence.cjs +190 -4
- package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -1
- package/dist/report/definition/primitives/assertion-evidence.d.cts +4 -0
- package/dist/report/definition/primitives/assertion-evidence.d.mts +4 -0
- package/dist/report/definition/primitives/assertion-evidence.d.ts +4 -0
- package/dist/report/execution/machine.cjs +2 -3
- package/dist/report/execution/machine.cjs.map +1 -1
- package/dist/report/execution/machine.d.cts +11 -8
- package/dist/report/execution/machine.d.mts +11 -8
- package/dist/report/execution/machine.d.ts +11 -8
- package/dist/report/host/from-record.cjs +13 -8
- package/dist/report/host/from-record.cjs.map +1 -1
- package/dist/report/host/index.cjs +5 -1
- package/dist/report/host/index.cjs.map +1 -1
- package/dist/report/host/index.d.cts +1 -0
- package/dist/report/host/index.d.mts +1 -0
- package/dist/report/host/index.d.ts +1 -0
- package/dist/report/host/index.js +8 -2
- package/dist/report/host/index.mjs +8 -2
- package/dist/report/host/machine.cjs +23 -22
- package/dist/report/host/machine.cjs.map +1 -1
- package/dist/report/host/machine.d.cts +1 -1
- package/dist/report/host/machine.d.mts +1 -1
- package/dist/report/host/machine.d.ts +1 -1
- package/dist/report/host/node/loader.cjs +4 -2
- package/dist/report/host/node/loader.cjs.map +1 -1
- package/dist/report/host/node/loader.d.cts +3 -1
- package/dist/report/host/node/loader.d.mts +3 -1
- package/dist/report/host/node/loader.d.ts +3 -1
- package/dist/report/host/node.cjs +44 -9
- package/dist/report/host/node.cjs.map +1 -1
- package/dist/report/host/node.d.cts +13 -3
- package/dist/report/host/node.d.mts +13 -3
- package/dist/report/host/node.d.ts +13 -3
- package/dist/report/host/node.js +44 -32
- package/dist/report/host/operations.cjs +14 -0
- package/dist/report/host/operations.cjs.map +1 -0
- package/dist/report/host/operations.d.cts +39 -0
- package/dist/report/host/operations.d.mts +39 -0
- package/dist/report/host/operations.d.ts +39 -0
- package/dist/report/host/operations.js +10 -0
- package/dist/report/host/operations.js.map +1 -0
- package/dist/report/model/chart/plot.cjs +1 -1
- package/dist/report/model/chart/plot.cjs.map +1 -1
- package/dist/report/model/locale.cjs +4 -0
- package/dist/report/model/locale.cjs.map +1 -1
- package/dist/report/model/locale.d.cts +3 -1
- package/dist/report/model/locale.d.mts +3 -1
- package/dist/report/model/locale.d.ts +3 -1
- package/dist/report/react/styles.css +80 -0
- package/dist/runner/build-preparation.cjs +5 -5
- package/dist/runner/build-preparation.cjs.map +1 -1
- package/dist/runner/build-preparation.d.cts +2 -3
- package/dist/runner/build-preparation.d.mts +2 -3
- package/dist/runner/build-preparation.d.ts +2 -3
- package/dist/runner/feedback/coordinator.cjs +18 -15
- package/dist/runner/feedback/coordinator.cjs.map +1 -1
- package/dist/runner/feedback/coordinator.d.cts +6 -0
- package/dist/runner/feedback/coordinator.d.mts +6 -0
- package/dist/runner/feedback/coordinator.d.ts +6 -0
- package/dist/runner/ledger.cjs +3 -13
- package/dist/runner/ledger.cjs.map +1 -1
- package/dist/runner/ledger.d.cts +1 -3
- package/dist/runner/ledger.d.mts +1 -3
- package/dist/runner/ledger.d.ts +1 -3
- package/dist/runner/run.cjs +63 -18
- package/dist/runner/run.cjs.map +1 -1
- package/dist/runner/session.cjs +10 -0
- package/dist/runner/session.cjs.map +1 -1
- package/dist/runner/session.d.cts +25 -0
- package/dist/runner/session.d.mts +25 -0
- package/dist/runner/session.d.ts +25 -0
- package/dist/runner/types.cjs.map +1 -1
- package/dist/runner/types.d.cts +1 -2
- package/dist/runner/types.d.mts +1 -2
- package/dist/runner/types.d.ts +1 -2
- package/dist/sandbox/build-coordinator.cjs +38 -19
- package/dist/sandbox/build-coordinator.cjs.map +1 -1
- package/dist/sandbox/build-coordinator.d.cts +47 -7
- package/dist/sandbox/build-coordinator.d.mts +47 -7
- package/dist/sandbox/build-coordinator.d.ts +47 -7
- package/dist/sandbox/build-coordinator.js +8 -4
- package/dist/sandbox/cli/contribution.cjs +128 -0
- package/dist/sandbox/cli/contribution.cjs.map +1 -0
- package/dist/sandbox/cli/contribution.d.cts +71 -0
- package/dist/sandbox/cli/contribution.d.mts +71 -0
- package/dist/sandbox/cli/contribution.d.ts +71 -0
- package/dist/sandbox/cli/contribution.js +8 -0
- package/dist/sandbox/cli/contribution.js.map +1 -0
- package/dist/sandbox/cli-commands.cjs +14 -21
- package/dist/sandbox/cli-commands.cjs.map +1 -1
- package/dist/sandbox/cli-commands.d.cts +12 -8
- package/dist/sandbox/cli-commands.d.mts +12 -8
- package/dist/sandbox/cli-commands.d.ts +12 -8
- package/dist/sandbox/compose.cjs +22 -2
- package/dist/sandbox/compose.cjs.map +1 -1
- package/dist/sandbox/compose.d.cts +1 -1
- package/dist/sandbox/compose.d.mts +1 -1
- package/dist/sandbox/compose.d.ts +1 -1
- package/dist/sandbox/docker-profile/cli.cjs +13 -9
- package/dist/sandbox/docker-profile/cli.cjs.map +1 -1
- package/dist/sandbox/docker-profile/cli.d.cts +2 -0
- package/dist/sandbox/docker-profile/cli.d.mts +2 -0
- package/dist/sandbox/docker-profile/cli.d.ts +2 -0
- package/dist/sandbox/docker-profile/runtime.cjs +68 -7
- package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
- package/dist/sandbox/docker-profile/runtime.d.cts +19 -1
- package/dist/sandbox/docker-profile/runtime.d.mts +19 -1
- package/dist/sandbox/docker-profile/runtime.d.ts +19 -1
- package/dist/sandbox/docker-profile/runtime.js +10 -8
- package/dist/sandbox/docker-profile/schema.cjs +68 -19
- package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
- package/dist/sandbox/docker-profile/schema.d.cts +23 -9
- package/dist/sandbox/docker-profile/schema.d.mts +23 -9
- package/dist/sandbox/docker-profile/schema.d.ts +23 -9
- package/dist/sandbox/docker-task-build-cache.cjs +532 -0
- package/dist/sandbox/docker-task-build-cache.cjs.map +1 -0
- package/dist/sandbox/docker-task-build-cache.d.cts +68 -0
- package/dist/sandbox/docker-task-build-cache.d.mts +68 -0
- package/dist/sandbox/docker-task-build-cache.d.ts +68 -0
- package/dist/sandbox/docker-task-build-cache.js +20 -0
- package/dist/sandbox/docker-task-build-cache.js.map +1 -0
- package/dist/sandbox/docker.cjs +50 -0
- package/dist/sandbox/docker.cjs.map +1 -1
- package/dist/sandbox/docker.d.cts +15 -0
- package/dist/sandbox/docker.d.mts +15 -0
- package/dist/sandbox/docker.d.ts +15 -0
- package/dist/sandbox/dockerfile-build.cjs +55 -5
- package/dist/sandbox/dockerfile-build.cjs.map +1 -1
- package/dist/sandbox/dockerfile-build.d.cts +2 -2
- package/dist/sandbox/dockerfile-build.d.mts +2 -2
- package/dist/sandbox/dockerfile-build.d.ts +2 -2
- package/dist/sandbox/index.cjs +5 -3
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +4 -3
- package/dist/sandbox/index.d.mts +4 -3
- package/dist/sandbox/index.d.ts +4 -3
- package/dist/sandbox/index.js +16 -14
- package/dist/sandbox/index.mjs +16 -14
- package/dist/sandbox/keep.cjs +1 -3
- package/dist/sandbox/keep.cjs.map +1 -1
- package/dist/sandbox/layer.cjs +70 -79
- package/dist/sandbox/layer.cjs.map +1 -1
- package/dist/sandbox/layer.d.cts +6 -12
- package/dist/sandbox/layer.d.mts +6 -12
- package/dist/sandbox/layer.d.ts +6 -12
- package/dist/sandbox/layer.js +16 -18
- package/dist/sandbox/ledger-paths.cjs +4 -18
- package/dist/sandbox/ledger-paths.cjs.map +1 -1
- package/dist/sandbox/ledger-paths.d.cts +3 -13
- package/dist/sandbox/ledger-paths.d.mts +3 -13
- package/dist/sandbox/ledger-paths.d.ts +3 -13
- package/dist/sandbox/ledger-paths.js +4 -8
- package/dist/sandbox/registry.cjs +1 -1
- package/dist/sandbox/registry.cjs.map +1 -1
- package/dist/sandbox/runtime.cjs +27 -37
- package/dist/sandbox/runtime.cjs.map +1 -1
- package/dist/sandbox/runtime.d.cts +1 -2
- package/dist/sandbox/runtime.d.mts +1 -2
- package/dist/sandbox/runtime.d.ts +1 -2
- package/dist/sandbox/runtime.js +6 -8
- package/dist/sandbox/types.cjs.map +1 -1
- package/dist/sandbox/types.d.cts +3 -3
- package/dist/sandbox/types.d.mts +3 -3
- package/dist/sandbox/types.d.ts +3 -3
- package/dist/sources/project.json +6 -0
- package/dist/vendor/remark/remark-gfm.cjs +72 -72
- package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
- package/dist/vendor/remark/remark-parse.cjs +54 -54
- package/dist/vendor/remark/remark-parse.cjs.map +1 -1
- package/dist/vendor/remark/remark.cjs +125 -125
- package/dist/vendor/remark/remark.cjs.map +2 -2
- package/docs-site/zh/README.md +1 -1
- package/docs-site/zh/explanation/assert.mdx +4 -0
- package/docs-site/zh/explanation/judge.mdx +40 -9
- package/docs-site/zh/reference/cli.mdx +67 -43
- package/docs-site/zh/reference/define-agent.mdx +2 -2
- package/docs-site/zh/reference/report-components.mdx +4 -3
- package/docs-site/zh/troubleshooting/debug-sandbox.mdx +6 -0
- package/docs-site/zh/troubleshooting/debugging.mdx +28 -1
- package/docs-site/zh/tutorials/agent-feedback-loop.mdx +4 -2
- package/docs-site/zh/tutorials/concurrency.mdx +2 -2
- package/docs-site/zh/tutorials/custom-reports.mdx +175 -9
- package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -7
- package/docs-site/zh/tutorials/eval-groups.mdx +1 -2
- package/docs-site/zh/tutorials/evaluation-kinds.mdx +39 -6
- package/docs-site/zh/tutorials/nixos-managed-dind.mdx +14 -5
- package/docs-site/zh/tutorials/sandbox-providers.mdx +1 -28
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +1 -1
- package/docs-site/zh/tutorials/viewing-results.mdx +2 -0
- package/package.json +24 -19
- package/README.md +0 -176
- package/README.zh.md +0 -176
- package/dist/cli/record.cjs +0 -246
- package/dist/cli/record.cjs.map +0 -1
- package/dist/cli/record.d.cts +0 -40
- package/dist/cli/record.d.mts +0 -40
- package/dist/cli/record.d.ts +0 -40
- package/dist/cli/record.js +0 -10
- package/dist/cli/record.js.map +0 -1
- package/dist/sandbox/local.cjs +0 -361
- package/dist/sandbox/local.cjs.map +0 -1
- package/dist/sandbox/local.d.cts +0 -80
- package/dist/sandbox/local.d.mts +0 -80
- package/dist/sandbox/local.d.ts +0 -80
- package/dist/sandbox/local.js +0 -6
- package/dist/sandbox/local.js.map +0 -1
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.catalog = catalog;
|
|
4
|
+
exports.check = check;
|
|
5
|
+
exports.resolveProjectCurrentTarget = resolveProjectCurrentTarget;
|
|
6
|
+
exports.listInvocationStatus = listInvocationStatus;
|
|
7
|
+
exports.showInvocationStatus = showInvocationStatus;
|
|
8
|
+
exports.planInvocation = planInvocation;
|
|
9
|
+
exports.runInvocation = runInvocation;
|
|
10
|
+
exports.planRename = planRename;
|
|
11
|
+
exports.applyRename = applyRename;
|
|
12
|
+
exports.accept = accept;
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
|
+
const effect_1 = require("effect");
|
|
15
|
+
const index_ts_1 = require("../../record/host/index.cjs");
|
|
16
|
+
const root_ts_1 = require("../../record/platform/root.cjs");
|
|
17
|
+
const accept_ts_1 = require("../../runner/accept.cjs");
|
|
18
|
+
const sink_ts_1 = require("../../runner/feedback/sink.cjs");
|
|
19
|
+
const json_ts_1 = require("../../runner/feedback/json.cjs");
|
|
20
|
+
const discover_ts_1 = require("../../runner/discover.cjs");
|
|
21
|
+
const eval_selection_ts_1 = require("../../runner/eval-selection.cjs");
|
|
22
|
+
const fingerprint_ts_1 = require("../../runner/fingerprint.cjs");
|
|
23
|
+
const record_ts_1 = require("../../runner/record.cjs");
|
|
24
|
+
const reuse_readback_ts_1 = require("../../runner/reuse-readback.cjs");
|
|
25
|
+
const run_ts_1 = require("../../runner/run.cjs");
|
|
26
|
+
const lock_ts_1 = require("../../runner/lock.cjs");
|
|
27
|
+
const project_current_ts_1 = require("../../runner/project-current.cjs");
|
|
28
|
+
const json_ts_2 = require("../../runner/reporters/json.cjs");
|
|
29
|
+
const session_ts_1 = require("../../runner/session.cjs");
|
|
30
|
+
const sandbox_selection_ts_1 = require("../../runner/sandbox-selection.cjs");
|
|
31
|
+
const timeout_ts_1 = require("../../runner/timeout.cjs");
|
|
32
|
+
const rename_experiment_ts_1 = require("../../runner/rename-experiment.cjs");
|
|
33
|
+
const aggregate_ts_1 = require("../../shared/aggregate.cjs");
|
|
34
|
+
const types_ts_1 = require("./types.cjs");
|
|
35
|
+
const presentation_ts_1 = require("./presentation.cjs");
|
|
36
|
+
function operationError(operation, cause) {
|
|
37
|
+
if (cause instanceof types_ts_1.ExperimentHostError)
|
|
38
|
+
return cause;
|
|
39
|
+
const code = typeof cause === "object" && cause !== null && typeof Reflect.get(cause, "code") === "string"
|
|
40
|
+
? String(Reflect.get(cause, "code"))
|
|
41
|
+
: "experiment-host-operation-failed";
|
|
42
|
+
return new types_ts_1.ExperimentHostError({
|
|
43
|
+
operation,
|
|
44
|
+
code,
|
|
45
|
+
message: closedFailureMessage(cause),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/** Preserve one actionable message while closing private Runner error shapes. */
|
|
49
|
+
function closedFailureMessage(cause) {
|
|
50
|
+
if (cause instanceof Error && cause.message.length > 0)
|
|
51
|
+
return cause.message;
|
|
52
|
+
if (typeof cause === "object" && cause !== null) {
|
|
53
|
+
const direct = Reflect.get(cause, "message");
|
|
54
|
+
if (typeof direct === "string" && direct.length > 0)
|
|
55
|
+
return direct;
|
|
56
|
+
const issue = Reflect.get(cause, "issue");
|
|
57
|
+
if (typeof issue === "object" && issue !== null) {
|
|
58
|
+
const nested = Reflect.get(issue, "message");
|
|
59
|
+
if (typeof nested === "string" && nested.length > 0)
|
|
60
|
+
return nested;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return String(cause);
|
|
64
|
+
}
|
|
65
|
+
function closeOperation(operation, effect) {
|
|
66
|
+
return effect.pipe(effect_1.Effect.mapError((cause) => operationError(operation, cause)));
|
|
67
|
+
}
|
|
68
|
+
const invocationPlans = new WeakMap();
|
|
69
|
+
function freezeArray(values) {
|
|
70
|
+
return Object.freeze([...values]);
|
|
71
|
+
}
|
|
72
|
+
function selectionProblem(input, selected) {
|
|
73
|
+
if (input.experimentSelector !== undefined && selected.selections.length === 0) {
|
|
74
|
+
return Object.freeze({
|
|
75
|
+
status: "experiment-no-match",
|
|
76
|
+
selector: input.experimentSelector,
|
|
77
|
+
candidates: freezeArray([...selected.experimentIds].sort()),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const selectorEvalIds = freezeArray(new Set(selected.selections.flatMap((entry) => entry.selectorEvalIds)));
|
|
81
|
+
for (const selector of input.evalSelectors ?? []) {
|
|
82
|
+
if (selectorEvalIds.some((id) => (0, aggregate_ts_1.evalPrefixPredicate)([selector])(id)))
|
|
83
|
+
continue;
|
|
84
|
+
return Object.freeze({
|
|
85
|
+
status: "eval-no-match",
|
|
86
|
+
selector,
|
|
87
|
+
experimentIds: freezeArray(selected.selections.map(({ experiment }) => experiment.id)),
|
|
88
|
+
candidates: freezeArray([...selectorEvalIds].sort()),
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (selected.selections.every((entry) => entry.selectedEvalIds.length === 0)) {
|
|
92
|
+
return Object.freeze({
|
|
93
|
+
status: "empty-selection",
|
|
94
|
+
experimentIds: freezeArray(selected.selections.map(({ experiment }) => experiment.id)),
|
|
95
|
+
candidates: freezeArray([...selected.experimentIds].sort()),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return undefined;
|
|
99
|
+
}
|
|
100
|
+
function closeSelection(input) {
|
|
101
|
+
return effect_1.Effect.gen(function* () {
|
|
102
|
+
const discovered = yield* (0, discover_ts_1.discoverEvals)(input.cwd);
|
|
103
|
+
const evals = input.tag === undefined
|
|
104
|
+
? discovered
|
|
105
|
+
: discovered.filter((definition) => definition.tags?.includes(input.tag));
|
|
106
|
+
const experiments = yield* (0, discover_ts_1.discoverExperiments)(input.cwd);
|
|
107
|
+
const experimentIds = freezeArray(experiments.map((experiment) => experiment.id));
|
|
108
|
+
const selectedIds = input.experimentSelector === undefined
|
|
109
|
+
? undefined
|
|
110
|
+
: new Set((0, aggregate_ts_1.matchExperimentSelector)(experimentIds, input.experimentSelector));
|
|
111
|
+
const selections = experiments
|
|
112
|
+
.filter((experiment) => selectedIds === undefined || selectedIds.has(experiment.id))
|
|
113
|
+
.map((experiment) => {
|
|
114
|
+
const selection = (0, eval_selection_ts_1.resolveExperimentEvals)({
|
|
115
|
+
experimentId: experiment.id,
|
|
116
|
+
selector: experiment.evals,
|
|
117
|
+
cliPatterns: input.evalSelectors ?? [],
|
|
118
|
+
evals,
|
|
119
|
+
});
|
|
120
|
+
return Object.freeze({
|
|
121
|
+
experiment,
|
|
122
|
+
selectedEvalIds: freezeArray(selection.selectedEvalIds),
|
|
123
|
+
selectorEvalIds: freezeArray(selection.selectorEvals.map((definition) => definition.id)),
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
return Object.freeze({
|
|
127
|
+
evals: freezeArray(evals),
|
|
128
|
+
experimentIds,
|
|
129
|
+
selections: freezeArray(selections),
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
function summaryOfExperiment(experiment, evalIds) {
|
|
134
|
+
return Object.freeze({
|
|
135
|
+
id: experiment.id,
|
|
136
|
+
...(experiment.description === undefined ? {} : { description: experiment.description }),
|
|
137
|
+
agent: experiment.agent.name,
|
|
138
|
+
...(experiment.model === undefined ? {} : { model: experiment.model }),
|
|
139
|
+
attempts: experiment.attempts ?? 1,
|
|
140
|
+
evalIds: freezeArray(evalIds),
|
|
141
|
+
labels: Object.freeze({ ...(experiment.labels ?? {}) }),
|
|
142
|
+
hasSetup: typeof experiment.setup === "function",
|
|
143
|
+
hasTeardown: typeof experiment.teardown === "function",
|
|
144
|
+
...(experiment.sharedState === undefined ? {} : { sharedStateKey: experiment.sharedState.key }),
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function catalog(input) {
|
|
148
|
+
return closeOperation("catalog", closeSelection(input).pipe(effect_1.Effect.map((selected) => Object.freeze({
|
|
149
|
+
status: "listed",
|
|
150
|
+
evals: freezeArray(selected.evals.map((definition) => Object.freeze({
|
|
151
|
+
id: definition.id,
|
|
152
|
+
...(definition.description === undefined ? {} : { description: definition.description }),
|
|
153
|
+
tags: freezeArray(definition.tags ?? []),
|
|
154
|
+
evaluationKind: definition.evaluationKind,
|
|
155
|
+
}))),
|
|
156
|
+
experimentIds: selected.experimentIds,
|
|
157
|
+
experiments: freezeArray(selected.selections.map(({ experiment, selectedEvalIds }) => summaryOfExperiment(experiment, selectedEvalIds))),
|
|
158
|
+
}))));
|
|
159
|
+
}
|
|
160
|
+
function agentRunFromExperiment(experiment, selectedEvalIds, overrides) {
|
|
161
|
+
return Object.freeze({
|
|
162
|
+
agent: experiment.agent,
|
|
163
|
+
model: experiment.model,
|
|
164
|
+
reasoningEffort: experiment.reasoningEffort,
|
|
165
|
+
flags: experiment.flags ?? {},
|
|
166
|
+
plugins: experiment.plugins,
|
|
167
|
+
attempts: overrides.attempts ?? experiment.attempts ?? 1,
|
|
168
|
+
earlyExit: overrides.earlyExit ?? experiment.earlyExit ?? false,
|
|
169
|
+
sandbox: experiment.sandbox,
|
|
170
|
+
sandboxReuse: experiment.sandboxReuse,
|
|
171
|
+
...(experiment.sharedState === undefined ? {} : { sharedState: experiment.sharedState }),
|
|
172
|
+
judge: experiment.judge,
|
|
173
|
+
...(0, timeout_ts_1.resolveRunTimeout)(overrides.timeoutMs, experiment.timeoutMs),
|
|
174
|
+
budget: overrides.budget ?? experiment.budget,
|
|
175
|
+
selectedEvalIds: freezeArray(selectedEvalIds),
|
|
176
|
+
experimentId: experiment.id,
|
|
177
|
+
experimentBaseDir: experiment.baseDir,
|
|
178
|
+
experimentSourcePath: experiment.sourcePath,
|
|
179
|
+
description: experiment.description,
|
|
180
|
+
labels: experiment.labels,
|
|
181
|
+
maxConcurrency: experiment.maxConcurrency,
|
|
182
|
+
setup: experiment.setup,
|
|
183
|
+
teardown: experiment.teardown,
|
|
184
|
+
classifyFailure: experiment.classifyFailure,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function prepareRuns(input) {
|
|
188
|
+
return closeSelection(input).pipe(effect_1.Effect.map((selected) => {
|
|
189
|
+
const problem = selectionProblem(input, selected);
|
|
190
|
+
if (problem !== undefined)
|
|
191
|
+
return { status: "problem", selected, problem };
|
|
192
|
+
const overrides = input.overrides ?? {};
|
|
193
|
+
return {
|
|
194
|
+
status: "ready",
|
|
195
|
+
selected,
|
|
196
|
+
runs: freezeArray(selected.selections.map(({ experiment, selectedEvalIds }) => agentRunFromExperiment(experiment, selectedEvalIds, overrides))),
|
|
197
|
+
};
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
function check(input) {
|
|
201
|
+
return closeOperation("check", effect_1.Effect.gen(function* () {
|
|
202
|
+
const prepared = yield* prepareRuns(input);
|
|
203
|
+
if (prepared.status === "problem")
|
|
204
|
+
return prepared.problem;
|
|
205
|
+
const pairs = yield* (0, sandbox_selection_ts_1.linkRunSandboxes)(prepared.selected.evals, prepared.runs);
|
|
206
|
+
return Object.freeze({
|
|
207
|
+
status: "linked",
|
|
208
|
+
experimentIds: freezeArray(prepared.runs.map((run) => run.experimentId)),
|
|
209
|
+
evalIds: freezeArray(new Set(prepared.runs.flatMap((run) => run.selectedEvalIds))),
|
|
210
|
+
pairCount: pairs.length,
|
|
211
|
+
});
|
|
212
|
+
}));
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Report-facing project-current resolution. Discovery, selection, identity
|
|
216
|
+
* planning, and the resulting watch set close here so a CLI never reaches
|
|
217
|
+
* into Runner to reconstruct the same target.
|
|
218
|
+
*/
|
|
219
|
+
function resolveProjectCurrentTarget(input) {
|
|
220
|
+
return closeOperation("resolve-project-current", effect_1.Effect.gen(function* () {
|
|
221
|
+
const loaded = yield* (0, project_current_ts_1.loadProjectCurrent)(input.cwd, {
|
|
222
|
+
config: input.config,
|
|
223
|
+
...(input.experimentSelectors === undefined ? {} : { experiments: input.experimentSelectors }),
|
|
224
|
+
...(input.freshImport === undefined ? {} : { freshImport: input.freshImport }),
|
|
225
|
+
});
|
|
226
|
+
const experimentIds = input.experimentSelectors === undefined
|
|
227
|
+
? undefined
|
|
228
|
+
: freezeArray(new Set(loaded.currentSlots.map((slot) => slot.experimentId)));
|
|
229
|
+
const selection = Object.freeze({
|
|
230
|
+
policy: "project-current",
|
|
231
|
+
currentSlots: loaded.currentSlots,
|
|
232
|
+
...(experimentIds === undefined ? {} : { experimentIds }),
|
|
233
|
+
});
|
|
234
|
+
return Object.freeze({
|
|
235
|
+
selection,
|
|
236
|
+
currentSlots: loaded.currentSlots,
|
|
237
|
+
watchInputs: freezeArray(loaded.watchInputs),
|
|
238
|
+
});
|
|
239
|
+
}));
|
|
240
|
+
}
|
|
241
|
+
/** Session data is intentionally presented as a closed, transient document. */
|
|
242
|
+
function listInvocationStatus(input) {
|
|
243
|
+
return closeOperation("invocation-status-list", (0, session_ts_1.listSessions)((0, node_path_1.resolve)(input.cwd, ".niceeval"), {
|
|
244
|
+
...(input.all === true ? { all: true } : {}),
|
|
245
|
+
...(input.experimentSelector === undefined ? {} : { selector: input.experimentSelector }),
|
|
246
|
+
}));
|
|
247
|
+
}
|
|
248
|
+
function showInvocationStatus(input) {
|
|
249
|
+
return closeOperation("invocation-status-show", (0, session_ts_1.showSession)((0, node_path_1.resolve)(input.cwd, ".niceeval"), input.invocationSelector));
|
|
250
|
+
}
|
|
251
|
+
function recordRoot(input) {
|
|
252
|
+
return (0, root_ts_1.makeRecordRoot)((0, node_path_1.resolve)(input.cwd, input.recordRoot ?? ".niceeval/record"));
|
|
253
|
+
}
|
|
254
|
+
/** Only the four explicit mutation/plan entry points may trigger migration. */
|
|
255
|
+
function ensureAutomaticMigration(input) {
|
|
256
|
+
return effect_1.Effect.gen(function* () {
|
|
257
|
+
const root = (0, root_ts_1.makeRecordRoot)((0, node_path_1.resolve)(input.cwd, input.recordRoot ?? ".niceeval/record"));
|
|
258
|
+
if (effect_1.Either.isLeft(root))
|
|
259
|
+
return yield* effect_1.Effect.fail(root.left);
|
|
260
|
+
return yield* index_ts_1.recordHost.ensureAutomaticMigration({ root: root.right });
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
function comparisonOf(slot) {
|
|
264
|
+
return freezeArray(slot.comparisons.map((comparison) => Object.freeze({ ...comparison })));
|
|
265
|
+
}
|
|
266
|
+
function jsonSnapshot(value) {
|
|
267
|
+
try {
|
|
268
|
+
return freezeJson(JSON.parse(JSON.stringify(value)));
|
|
269
|
+
}
|
|
270
|
+
catch {
|
|
271
|
+
return undefined;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
function freezeJson(value) {
|
|
275
|
+
if (Array.isArray(value))
|
|
276
|
+
return Object.freeze(value.map(freezeJson));
|
|
277
|
+
if (typeof value === "object" && value !== null) {
|
|
278
|
+
return Object.freeze(Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, freezeJson(entry)])));
|
|
279
|
+
}
|
|
280
|
+
return value;
|
|
281
|
+
}
|
|
282
|
+
function dryPlan(slots, readbacks, lockedPairs, evalGroups) {
|
|
283
|
+
const projected = slots.map((slot) => {
|
|
284
|
+
const evalGroup = evalGroups.get(slot.evalId);
|
|
285
|
+
const target = Object.freeze({
|
|
286
|
+
runId: slot.runId,
|
|
287
|
+
slotId: slot.slotId,
|
|
288
|
+
experimentId: slot.experimentId,
|
|
289
|
+
evalId: slot.evalId,
|
|
290
|
+
...(evalGroup === undefined ? {} : { evalGroupId: evalGroup.id, evalGroupIndex: evalGroup.index }),
|
|
291
|
+
attempt: slot.attempt,
|
|
292
|
+
});
|
|
293
|
+
if (slot.state === "reuse") {
|
|
294
|
+
return Object.freeze({
|
|
295
|
+
state: "reuse",
|
|
296
|
+
target,
|
|
297
|
+
source: Object.freeze({
|
|
298
|
+
attemptId: slot.source.attemptId,
|
|
299
|
+
originRunId: slot.source.origin.runId,
|
|
300
|
+
originSlotId: slot.source.origin.slotId,
|
|
301
|
+
sourceRunId: slot.source.sourceBarrier.runId,
|
|
302
|
+
}),
|
|
303
|
+
comparisons: comparisonOf(slot),
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
return Object.freeze({
|
|
307
|
+
state: "gap",
|
|
308
|
+
target,
|
|
309
|
+
reason: slot.reason,
|
|
310
|
+
scope: slot.scope,
|
|
311
|
+
issues: freezeArray(slot.issues.map((issue) => jsonSnapshot(issue) ?? Object.freeze({}))),
|
|
312
|
+
comparisons: comparisonOf(slot),
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
return Object.freeze({
|
|
316
|
+
policy: Object.freeze({ name: "project-target", version: 1 }),
|
|
317
|
+
slots: freezeArray(projected),
|
|
318
|
+
readbacks: freezeArray(readbacks),
|
|
319
|
+
lockedPairs: freezeArray(lockedPairs),
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
function planInvocation(input) {
|
|
323
|
+
return closeOperation("invocation-plan", effect_1.Effect.gen(function* () {
|
|
324
|
+
// Invocation planning is the explicit `exp` / `exp --dry` boundary. Do
|
|
325
|
+
// not move this to catalog, check, debug, teardown, or session reads: those
|
|
326
|
+
// operations must remain migration-free observations.
|
|
327
|
+
const automaticMigration = yield* ensureAutomaticMigration(input);
|
|
328
|
+
const prepared = yield* prepareRuns(input);
|
|
329
|
+
if (prepared.status === "problem") {
|
|
330
|
+
return Object.freeze({ ...prepared.problem, automaticMigration });
|
|
331
|
+
}
|
|
332
|
+
const root = recordRoot(input);
|
|
333
|
+
if (effect_1.Either.isLeft(root))
|
|
334
|
+
return yield* effect_1.Effect.fail(root.left);
|
|
335
|
+
const config = Object.freeze({
|
|
336
|
+
...input.config,
|
|
337
|
+
...(input.config.reporters === undefined
|
|
338
|
+
? {}
|
|
339
|
+
: { reporters: [...input.config.reporters] }),
|
|
340
|
+
});
|
|
341
|
+
const overrides = Object.freeze({ ...(input.overrides ?? {}) });
|
|
342
|
+
const target = yield* (0, fingerprint_ts_1.planProjectTarget)(prepared.selected.evals, prepared.runs, config.timeoutMs, {
|
|
343
|
+
configJudge: config.judge,
|
|
344
|
+
...(overrides.keepSandbox === undefined ? {} : { keepSandbox: overrides.keepSandbox }),
|
|
345
|
+
});
|
|
346
|
+
const maxConcurrency = overrides.maxConcurrency
|
|
347
|
+
?? config.maxConcurrency
|
|
348
|
+
?? (0, sandbox_selection_ts_1.recommendedConcurrencyForPreparedPairs)([...target.preparedPairsByKey.values()]);
|
|
349
|
+
const maxBuildConcurrency = overrides.maxBuildConcurrency
|
|
350
|
+
?? config.maxBuildConcurrency
|
|
351
|
+
?? 2;
|
|
352
|
+
if (!Number.isInteger(maxConcurrency) || maxConcurrency <= 0) {
|
|
353
|
+
return yield* effect_1.Effect.fail(new Error(`maxConcurrency must be a positive integer, got ${maxConcurrency}.`));
|
|
354
|
+
}
|
|
355
|
+
if (!Number.isInteger(maxBuildConcurrency) || maxBuildConcurrency <= 0) {
|
|
356
|
+
return yield* effect_1.Effect.fail(new Error(`maxBuildConcurrency must be a positive integer, got ${maxBuildConcurrency}.`));
|
|
357
|
+
}
|
|
358
|
+
const uniqueEvalIds = new Set(prepared.runs.flatMap((run) => run.selectedEvalIds));
|
|
359
|
+
const totalAttempts = prepared.runs.reduce((sum, run) => sum + run.selectedEvalIds.length * run.attempts, 0);
|
|
360
|
+
const experimentConcurrency = Object.freeze(Object.fromEntries(prepared.runs.flatMap((run) => run.experimentId !== undefined && run.maxConcurrency !== undefined
|
|
361
|
+
? [[run.experimentId, run.maxConcurrency]]
|
|
362
|
+
: [])));
|
|
363
|
+
const shape = Object.freeze({
|
|
364
|
+
experiments: prepared.runs.length,
|
|
365
|
+
evals: uniqueEvalIds.size,
|
|
366
|
+
configurations: prepared.runs.length,
|
|
367
|
+
totalAttempts,
|
|
368
|
+
attempts: Math.max(1, ...prepared.runs.map((run) => run.attempts)),
|
|
369
|
+
maxConcurrency,
|
|
370
|
+
maxBuildConcurrency,
|
|
371
|
+
experimentConcurrency,
|
|
372
|
+
});
|
|
373
|
+
const reuse = yield* (0, record_ts_1.prepareRunnerRecordReuse)({
|
|
374
|
+
evals: prepared.selected.evals,
|
|
375
|
+
runs: prepared.runs,
|
|
376
|
+
config: { timeoutMs: config.timeoutMs },
|
|
377
|
+
plannedFingerprints: target.plannedFingerprints,
|
|
378
|
+
plannedConfigHashes: target.plannedConfigHashes,
|
|
379
|
+
...(overrides.rerun === undefined ? {} : { rerun: overrides.rerun }),
|
|
380
|
+
...(overrides.keepSandbox === undefined ? {} : { keepSandbox: overrides.keepSandbox }),
|
|
381
|
+
});
|
|
382
|
+
const previewStartedAt = input.preview === true ? yield* effect_1.Clock.currentTimeMillis : undefined;
|
|
383
|
+
const preview = previewStartedAt !== undefined
|
|
384
|
+
? yield* effect_1.Effect.scoped((0, record_ts_1.withRunnerCurrentReusePreview)({
|
|
385
|
+
recordRoot: root.right,
|
|
386
|
+
startedAt: previewStartedAt,
|
|
387
|
+
evals: prepared.selected.evals,
|
|
388
|
+
runs: prepared.runs,
|
|
389
|
+
reuse,
|
|
390
|
+
use: ({ reusePlan, readReadbacks }) => effect_1.Effect.gen(function* () {
|
|
391
|
+
const readbacks = yield* readReadbacks();
|
|
392
|
+
const now = yield* effect_1.Clock.currentTimeMillis;
|
|
393
|
+
const pairs = new Map(reusePlan.slots.map((slot) => [
|
|
394
|
+
JSON.stringify([slot.experimentId, slot.evalId]),
|
|
395
|
+
[slot.experimentId, slot.evalId],
|
|
396
|
+
]));
|
|
397
|
+
const locked = yield* effect_1.Effect.all([...pairs].map(([key, [experimentId, evalId]]) => (0, lock_ts_1.readCaseLockEffect)((0, node_path_1.resolve)(input.cwd, input.coordinationRoot ?? ".niceeval"), experimentId, evalId).pipe(effect_1.Effect.catchAll(() => effect_1.Effect.succeed(undefined)), effect_1.Effect.map((record) => record !== undefined && !(0, lock_ts_1.isCaseLockExpired)(record, now) ? key : undefined))), { concurrency: "unbounded" });
|
|
398
|
+
return dryPlan(reusePlan.slots, readbacks.map(reuse_readback_ts_1.projectCurrentReuseReadback), locked.filter((key) => key !== undefined), new Map(prepared.selected.evals.flatMap((definition) => definition.evalGroup === undefined
|
|
399
|
+
? []
|
|
400
|
+
: [[definition.id, {
|
|
401
|
+
id: definition.evalGroup.id,
|
|
402
|
+
index: definition.evalGroup.evalIds.indexOf(definition.id),
|
|
403
|
+
}]])));
|
|
404
|
+
}),
|
|
405
|
+
}))
|
|
406
|
+
: undefined;
|
|
407
|
+
const plan = Object.freeze({});
|
|
408
|
+
invocationPlans.set(plan, {
|
|
409
|
+
evals: prepared.selected.evals,
|
|
410
|
+
runs: prepared.runs,
|
|
411
|
+
config,
|
|
412
|
+
recordRoot: root.right,
|
|
413
|
+
coordinationRoot: (0, node_path_1.resolve)(input.cwd, input.coordinationRoot ?? ".niceeval"),
|
|
414
|
+
overrides,
|
|
415
|
+
shape,
|
|
416
|
+
consumed: false,
|
|
417
|
+
});
|
|
418
|
+
const occurrenceAudits = new Map();
|
|
419
|
+
for (const pair of target.preparedPairsByKey.values()) {
|
|
420
|
+
for (const occurrence of pair.plugin.occurrences) {
|
|
421
|
+
const audit = jsonSnapshot(occurrence.audit);
|
|
422
|
+
if (audit !== undefined)
|
|
423
|
+
occurrenceAudits.set(JSON.stringify(audit), audit);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return Object.freeze({
|
|
427
|
+
status: "ready",
|
|
428
|
+
automaticMigration,
|
|
429
|
+
plan,
|
|
430
|
+
shape,
|
|
431
|
+
experimentIds: freezeArray(prepared.runs.map((run) => run.experimentId)),
|
|
432
|
+
evalIds: freezeArray(uniqueEvalIds),
|
|
433
|
+
pluginAudit: Object.freeze({ occurrences: freezeArray(occurrenceAudits.values()) }),
|
|
434
|
+
...(preview === undefined ? {} : { dry: preview }),
|
|
435
|
+
});
|
|
436
|
+
}));
|
|
437
|
+
}
|
|
438
|
+
function multiplexFeedbackSink(feedback, session, isFeedbackStarted) {
|
|
439
|
+
const forward = (method, ...args) => {
|
|
440
|
+
if (!isFeedbackStarted() || feedback === undefined)
|
|
441
|
+
return;
|
|
442
|
+
method(feedback, ...args);
|
|
443
|
+
};
|
|
444
|
+
return {
|
|
445
|
+
activity: (detail) => forward((sink, value) => sink.activity(value), detail),
|
|
446
|
+
diagnostic: (input) => forward((sink, value) => sink.diagnostic(value), input),
|
|
447
|
+
interrupted: () => forward((sink) => sink.interrupted()),
|
|
448
|
+
reporterError: (input) => forward((sink, value) => sink.reporterError(value), input),
|
|
449
|
+
failure: (input) => forward((sink, value) => sink.failure(value), input),
|
|
450
|
+
budgetExhausted: (input) => forward((sink, value) => sink.budgetExhausted(value), input),
|
|
451
|
+
kept: (input) => forward((sink, value) => sink.kept(value), input),
|
|
452
|
+
experimentHook: (input) => {
|
|
453
|
+
session?.onInvocationEvent({ type: "experiment-hook", ...input });
|
|
454
|
+
forward((sink, value) => sink.experimentHook(value), input);
|
|
455
|
+
},
|
|
456
|
+
precheck: (input) => forward((sink, value) => sink.precheck(value), input),
|
|
457
|
+
lockWait: (input) => {
|
|
458
|
+
session?.onInvocationEvent({ type: "lock-wait", ...input });
|
|
459
|
+
forward((sink, value) => sink.lockWait(value), input);
|
|
460
|
+
},
|
|
461
|
+
runActivity: (input) => forward((sink, value) => sink.runActivity(value), input),
|
|
462
|
+
experimentProgress: (input) => forward((sink, value) => sink.experimentProgress(value), input),
|
|
463
|
+
lifecycle: (event) => {
|
|
464
|
+
if (event.type === "attempt:start" || event.type === "attempt:complete" || event.type === "attempt:early-exit") {
|
|
465
|
+
session?.onInvocationEvent(event);
|
|
466
|
+
}
|
|
467
|
+
forward((sink, value) => sink.lifecycle(value), event);
|
|
468
|
+
},
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
function summaryOf(summary) {
|
|
472
|
+
return Object.freeze({
|
|
473
|
+
total: summary.passed + summary.failed + summary.skipped + summary.errored,
|
|
474
|
+
passed: summary.passed,
|
|
475
|
+
failed: summary.failed,
|
|
476
|
+
skipped: summary.skipped,
|
|
477
|
+
errored: summary.errored,
|
|
478
|
+
durationMs: summary.durationMs,
|
|
479
|
+
...(summary.usage?.inputTokens === undefined ? {} : { inputTokens: summary.usage.inputTokens }),
|
|
480
|
+
...(summary.usage?.outputTokens === undefined ? {} : { outputTokens: summary.usage.outputTokens }),
|
|
481
|
+
...(summary.estimatedCostUSD === undefined ? {} : { estimatedCostUSD: summary.estimatedCostUSD }),
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
function runInvocation(input) {
|
|
485
|
+
return effect_1.Effect.scoped(closeOperation("invocation-run", effect_1.Effect.gen(function* () {
|
|
486
|
+
const state = invocationPlans.get(input.plan);
|
|
487
|
+
if (state === undefined || state.consumed) {
|
|
488
|
+
return yield* effect_1.Effect.fail(new Error("Experiment Host invocation plan is forged, copied, or already consumed."));
|
|
489
|
+
}
|
|
490
|
+
state.consumed = true;
|
|
491
|
+
let completedSummary;
|
|
492
|
+
const reporters = [
|
|
493
|
+
...(input.junitPath === undefined ? [] : [{
|
|
494
|
+
reporter: (0, json_ts_2.JUnit)(input.junitPath),
|
|
495
|
+
name: "junit",
|
|
496
|
+
required: true,
|
|
497
|
+
target: input.junitPath,
|
|
498
|
+
}]),
|
|
499
|
+
...(state.config.reporters ?? []).map((reporter, index) => ({
|
|
500
|
+
reporter,
|
|
501
|
+
name: `config-reporter-${index}`,
|
|
502
|
+
required: false,
|
|
503
|
+
})),
|
|
504
|
+
{
|
|
505
|
+
name: "experiment-host-summary",
|
|
506
|
+
required: false,
|
|
507
|
+
reporter: { onInvocationComplete(summary) { completedSummary = summary; } },
|
|
508
|
+
},
|
|
509
|
+
];
|
|
510
|
+
// Session indexing is a Host-owned, project-local observation. Runner only
|
|
511
|
+
// receives the private tracker mechanism; this enclosing Scope closes its
|
|
512
|
+
// heartbeat worker on success, typed failure, or interruption.
|
|
513
|
+
const session = new session_ts_1.SessionTracker(state.coordinationRoot);
|
|
514
|
+
let sessionClosed = false;
|
|
515
|
+
let feedbackStarted = false;
|
|
516
|
+
let feedbackFinished = false;
|
|
517
|
+
yield* effect_1.Effect.addFinalizer(() => sessionClosed
|
|
518
|
+
? effect_1.Effect.void
|
|
519
|
+
: session.close({ status: "incomplete" }).pipe(effect_1.Effect.ignore));
|
|
520
|
+
yield* effect_1.Effect.addFinalizer(() => !feedbackStarted || feedbackFinished || input.feedback === undefined
|
|
521
|
+
? effect_1.Effect.void
|
|
522
|
+
: effect_1.Effect.tryPromise({
|
|
523
|
+
try: () => input.feedback.coordinator.stopDynamic(),
|
|
524
|
+
catch: () => undefined,
|
|
525
|
+
}).pipe(effect_1.Effect.ignore));
|
|
526
|
+
const feedback = input.feedback?.coordinator;
|
|
527
|
+
const sink = multiplexFeedbackSink(feedback, session, () => feedbackStarted);
|
|
528
|
+
const receipt = yield* effect_1.Effect.acquireUseRelease(effect_1.Effect.sync(() => (0, sink_ts_1.activateFeedbackSink)(sink)), () => (0, run_ts_1.runEvals)({
|
|
529
|
+
config: state.config,
|
|
530
|
+
evals: state.evals,
|
|
531
|
+
agentRuns: state.runs,
|
|
532
|
+
reporters,
|
|
533
|
+
maxConcurrency: state.shape.maxConcurrency,
|
|
534
|
+
maxBuildConcurrency: state.shape.maxBuildConcurrency,
|
|
535
|
+
coordinationRoot: state.coordinationRoot,
|
|
536
|
+
recordRoot: state.recordRoot,
|
|
537
|
+
...(state.overrides.keepSandbox === undefined ? {} : { keepSandbox: state.overrides.keepSandbox }),
|
|
538
|
+
...(state.overrides.rerun === undefined ? {} : { rerun: state.overrides.rerun }),
|
|
539
|
+
session,
|
|
540
|
+
...(input.signal === undefined ? {} : { signal: input.signal }),
|
|
541
|
+
onCurrentRecordReusePlan: (current) => effect_1.Effect.sync(() => {
|
|
542
|
+
if (feedback === undefined)
|
|
543
|
+
return;
|
|
544
|
+
feedback.start({
|
|
545
|
+
shape: Object.freeze({
|
|
546
|
+
evals: state.shape.evals,
|
|
547
|
+
configs: state.shape.configurations,
|
|
548
|
+
totalAttempts: state.shape.totalAttempts,
|
|
549
|
+
maxConcurrency: state.shape.maxConcurrency,
|
|
550
|
+
runIds: current.runIds,
|
|
551
|
+
}),
|
|
552
|
+
...(Object.keys(state.shape.experimentConcurrency).length === 0
|
|
553
|
+
? {}
|
|
554
|
+
: { experimentConcurrency: state.shape.experimentConcurrency }),
|
|
555
|
+
reused: current.reused,
|
|
556
|
+
...(current.reusedFailures.length === 0
|
|
557
|
+
? {}
|
|
558
|
+
: { reusedFailures: current.reusedFailures }),
|
|
559
|
+
});
|
|
560
|
+
feedbackStarted = true;
|
|
561
|
+
}),
|
|
562
|
+
}), (deactivate) => effect_1.Effect.sync(deactivate));
|
|
563
|
+
const summary = completedSummary;
|
|
564
|
+
if (summary === undefined) {
|
|
565
|
+
return yield* effect_1.Effect.fail(new Error("Runner completed without an invocation summary."));
|
|
566
|
+
}
|
|
567
|
+
if (feedback !== undefined && !feedbackStarted) {
|
|
568
|
+
return yield* effect_1.Effect.fail(new Error("Runner completed without starting Experiment feedback."));
|
|
569
|
+
}
|
|
570
|
+
const completion = feedback === undefined
|
|
571
|
+
? undefined
|
|
572
|
+
: (0, presentation_ts_1.assembleInvocationCompletion)(feedback.state);
|
|
573
|
+
yield* session.close({
|
|
574
|
+
status: completion?.status ?? (receipt.completion === "completed"
|
|
575
|
+
? "complete"
|
|
576
|
+
: receipt.completion === "interrupted"
|
|
577
|
+
? "interrupted"
|
|
578
|
+
: "incomplete"),
|
|
579
|
+
...(completion === undefined ? {} : { completion }),
|
|
580
|
+
receipt,
|
|
581
|
+
...(receipt.completedAt === undefined ? {} : { completedAt: receipt.completedAt }),
|
|
582
|
+
});
|
|
583
|
+
sessionClosed = true;
|
|
584
|
+
if (feedback !== undefined && completion !== undefined) {
|
|
585
|
+
yield* effect_1.Effect.tryPromise({
|
|
586
|
+
try: () => feedback.finish({ summary, completion, receipt }),
|
|
587
|
+
catch: (cause) => cause,
|
|
588
|
+
});
|
|
589
|
+
feedbackFinished = true;
|
|
590
|
+
}
|
|
591
|
+
const foldedStats = completion === undefined ? undefined : (0, presentation_ts_1.foldInvocationEvalStats)(summary);
|
|
592
|
+
return Object.freeze({
|
|
593
|
+
status: "finished",
|
|
594
|
+
receipt: Object.freeze({
|
|
595
|
+
invocationId: receipt.invocationId,
|
|
596
|
+
runIds: freezeArray(receipt.runIds),
|
|
597
|
+
startedAt: receipt.startedAt,
|
|
598
|
+
...(receipt.completedAt === undefined ? {} : { completedAt: receipt.completedAt }),
|
|
599
|
+
completion: receipt.completion,
|
|
600
|
+
}),
|
|
601
|
+
summary: summaryOf(summary),
|
|
602
|
+
...(completion === undefined ? {} : {
|
|
603
|
+
completion,
|
|
604
|
+
exitCode: (0, json_ts_1.computeExitCode)({
|
|
605
|
+
...summary,
|
|
606
|
+
failed: foldedStats.failed,
|
|
607
|
+
errored: foldedStats.errored,
|
|
608
|
+
}, completion),
|
|
609
|
+
}),
|
|
610
|
+
});
|
|
611
|
+
})));
|
|
612
|
+
}
|
|
613
|
+
function freezeRenamePlan(plan) {
|
|
614
|
+
return Object.freeze({
|
|
615
|
+
status: "plan",
|
|
616
|
+
oldId: plan.oldId,
|
|
617
|
+
newId: plan.newId,
|
|
618
|
+
migrations: freezeArray(plan.migrations.map((entry) => Object.freeze({ ...entry }))),
|
|
619
|
+
excluded: freezeArray(plan.excluded.map((entry) => Object.freeze({ ...entry }))),
|
|
620
|
+
...(plan.blocked === undefined ? {} : { blocked: Object.freeze({
|
|
621
|
+
...plan.blocked,
|
|
622
|
+
...(plan.blocked.conflictingEvals === undefined
|
|
623
|
+
? {}
|
|
624
|
+
: { conflictingEvals: freezeArray(plan.blocked.conflictingEvals) }),
|
|
625
|
+
}) }),
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
function planRename(input) {
|
|
629
|
+
return closeOperation("rename-plan", ensureAutomaticMigration(input).pipe(effect_1.Effect.zipRight((0, rename_experiment_ts_1.planExperimentRename)(input)), effect_1.Effect.map(freezeRenamePlan)));
|
|
630
|
+
}
|
|
631
|
+
function applyRename(input) {
|
|
632
|
+
return closeOperation("rename-apply", effect_1.Effect.gen(function* () {
|
|
633
|
+
yield* ensureAutomaticMigration(input);
|
|
634
|
+
const outcome = yield* effect_1.Effect.either((0, rename_experiment_ts_1.renameExperiment)(input));
|
|
635
|
+
if (effect_1.Either.isLeft(outcome)) {
|
|
636
|
+
if (!(outcome.left instanceof rename_experiment_ts_1.ExperimentRenameError))
|
|
637
|
+
return yield* effect_1.Effect.fail(outcome.left);
|
|
638
|
+
return Object.freeze({
|
|
639
|
+
status: "rejected",
|
|
640
|
+
oldId: input.oldId,
|
|
641
|
+
newId: input.newId,
|
|
642
|
+
reason: outcome.left.reason,
|
|
643
|
+
...(outcome.left.plan?.blocked?.evalId === undefined ? {} : { evalId: outcome.left.plan.blocked.evalId }),
|
|
644
|
+
...(outcome.left.plan?.blocked?.conflictingEvals === undefined
|
|
645
|
+
? {}
|
|
646
|
+
: { conflictingEvals: freezeArray(outcome.left.plan.blocked.conflictingEvals) }),
|
|
647
|
+
...(outcome.left.message === "" ? {} : { detail: outcome.left.message }),
|
|
648
|
+
});
|
|
649
|
+
}
|
|
650
|
+
const done = outcome.right;
|
|
651
|
+
return Object.freeze({
|
|
652
|
+
status: "done",
|
|
653
|
+
invocationId: done.invocationId,
|
|
654
|
+
runId: done.runId,
|
|
655
|
+
snapshotPath: done.snapshotPath,
|
|
656
|
+
oldId: done.oldId,
|
|
657
|
+
newId: done.newId,
|
|
658
|
+
migrated: freezeArray(done.migrated.map((entry) => Object.freeze({
|
|
659
|
+
evalId: entry.evalId,
|
|
660
|
+
sourceLocator: entry.sourceLocator,
|
|
661
|
+
locator: entry.locator,
|
|
662
|
+
fingerprint: entry.fingerprint,
|
|
663
|
+
verdict: entry.verdict,
|
|
664
|
+
}))),
|
|
665
|
+
});
|
|
666
|
+
}));
|
|
667
|
+
}
|
|
668
|
+
function accept(input) {
|
|
669
|
+
return closeOperation("accept", ensureAutomaticMigration(input).pipe(effect_1.Effect.zipRight((0, accept_ts_1.acceptLocators)(input)), effect_1.Effect.map((receipts) => freezeArray(receipts.map((receipt) => Object.freeze({
|
|
670
|
+
invocationId: receipt.invocationId,
|
|
671
|
+
runId: receipt.runId,
|
|
672
|
+
slotId: receipt.slotId,
|
|
673
|
+
locator: receipt.locator,
|
|
674
|
+
sourceLocator: receipt.sourceLocator,
|
|
675
|
+
fingerprint: receipt.fingerprint,
|
|
676
|
+
}))))));
|
|
677
|
+
}
|
|
678
|
+
//# sourceMappingURL=operations.cjs.map
|