niceeval 0.13.1 → 0.13.2
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 +25 -2
- package/README.md +9 -10
- package/README.zh.md +9 -10
- package/dist/agents/ai-sdk.cjs.map +1 -1
- package/dist/agents/ai-sdk.d.cts +1 -1
- package/dist/agents/ai-sdk.d.mts +1 -1
- package/dist/agents/ai-sdk.d.ts +1 -1
- package/dist/agents/bub-install-spec.cjs +19 -5
- package/dist/agents/bub-install-spec.cjs.map +1 -1
- package/dist/agents/bub-install-spec.d.cts +9 -2
- package/dist/agents/bub-install-spec.d.mts +9 -2
- package/dist/agents/bub-install-spec.d.ts +9 -2
- package/dist/agents/bub-install-spec.js +14 -12
- package/dist/agents/bub.cjs +10 -6
- package/dist/agents/bub.cjs.map +1 -1
- package/dist/agents/bub.d.cts +2 -2
- package/dist/agents/bub.d.mts +2 -2
- package/dist/agents/bub.d.ts +2 -2
- package/dist/agents/claude-code.cjs.map +1 -1
- package/dist/agents/claude-code.d.cts +2 -2
- package/dist/agents/claude-code.d.mts +2 -2
- package/dist/agents/claude-code.d.ts +2 -2
- package/dist/agents/codex.cjs +4 -4
- package/dist/agents/codex.cjs.map +1 -1
- package/dist/agents/codex.d.cts +3 -3
- package/dist/agents/codex.d.mts +3 -3
- package/dist/agents/codex.d.ts +3 -3
- package/dist/agents/coding-cli-versions.cjs +10 -1
- package/dist/agents/coding-cli-versions.cjs.map +1 -1
- package/dist/agents/coding-cli-versions.d.cts +8 -3
- package/dist/agents/coding-cli-versions.d.mts +8 -3
- package/dist/agents/coding-cli-versions.d.ts +8 -3
- package/dist/agents/coding-cli-versions.js +18 -12
- package/dist/agents/deepseek-harness.cjs +151 -0
- package/dist/agents/deepseek-harness.cjs.map +1 -0
- package/dist/agents/deepseek-harness.d.cts +14 -0
- package/dist/agents/deepseek-harness.d.mts +14 -0
- package/dist/agents/deepseek-harness.d.ts +14 -0
- package/dist/agents/deepseek-harness.js +7 -0
- package/dist/agents/deepseek-harness.js.map +1 -0
- package/dist/agents/exact-npm-plugins.cjs +28 -0
- package/dist/agents/exact-npm-plugins.cjs.map +1 -0
- package/dist/agents/exact-npm-plugins.d.cts +10 -0
- package/dist/agents/exact-npm-plugins.d.mts +10 -0
- package/dist/agents/exact-npm-plugins.d.ts +10 -0
- package/dist/agents/exact-npm-plugins.js +8 -0
- package/dist/agents/exact-npm-plugins.js.map +1 -0
- package/dist/agents/index.cjs +5 -1
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +4 -0
- package/dist/agents/index.d.mts +4 -0
- package/dist/agents/index.d.ts +4 -0
- package/dist/agents/index.js +54 -50
- package/dist/agents/index.mjs +54 -50
- package/dist/agents/omp.cjs +170 -0
- package/dist/agents/omp.cjs.map +1 -0
- package/dist/agents/omp.d.cts +14 -0
- package/dist/agents/omp.d.mts +14 -0
- package/dist/agents/omp.d.ts +14 -0
- package/dist/agents/omp.js +7 -0
- package/dist/agents/omp.js.map +1 -0
- package/dist/agents/openclaw.cjs +51 -2
- package/dist/agents/openclaw.cjs.map +1 -1
- package/dist/agents/openclaw.d.cts +2 -0
- package/dist/agents/openclaw.d.mts +2 -0
- package/dist/agents/openclaw.d.ts +2 -0
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +4 -4
- package/dist/agents/types.d.mts +4 -4
- package/dist/agents/types.d.ts +4 -4
- package/dist/agents/ui-message-stream.cjs +24 -7
- package/dist/agents/ui-message-stream.cjs.map +1 -1
- package/dist/analysis/api.cjs +28 -2
- package/dist/analysis/api.cjs.map +1 -1
- package/dist/analysis/api.d.cts +22 -1
- package/dist/analysis/api.d.mts +22 -1
- package/dist/analysis/api.d.ts +22 -1
- package/dist/analysis/api.js +8 -6
- package/dist/analysis/bindings.cjs +11 -18
- package/dist/analysis/bindings.cjs.map +1 -1
- package/dist/analysis/bindings.d.cts +177 -49
- package/dist/analysis/bindings.d.mts +177 -49
- package/dist/analysis/bindings.d.ts +177 -49
- package/dist/analysis/contracts.cjs +1 -0
- package/dist/analysis/contracts.cjs.map +1 -1
- package/dist/analysis/contracts.d.cts +43 -3
- package/dist/analysis/contracts.d.mts +43 -3
- package/dist/analysis/contracts.d.ts +43 -3
- package/dist/analysis/cost-projection.cjs +2 -1
- package/dist/analysis/cost-projection.cjs.map +1 -1
- package/dist/analysis/cost-projection.d.cts +1 -1
- package/dist/analysis/cost-projection.d.mts +1 -1
- package/dist/analysis/cost-projection.d.ts +1 -1
- package/dist/analysis/cost.cjs +13 -3
- package/dist/analysis/cost.cjs.map +1 -1
- package/dist/analysis/cost.d.cts +10 -3
- package/dist/analysis/cost.d.mts +10 -3
- package/dist/analysis/cost.d.ts +10 -3
- package/dist/analysis/experiment-groups.cjs +96 -0
- package/dist/analysis/experiment-groups.cjs.map +1 -0
- package/dist/analysis/experiment-groups.d.cts +9 -0
- package/dist/analysis/experiment-groups.d.mts +9 -0
- package/dist/analysis/experiment-groups.d.ts +9 -0
- package/dist/analysis/experiment-groups.js +10 -0
- package/dist/analysis/experiment-groups.js.map +1 -0
- package/dist/analysis/index.cjs +4 -1
- package/dist/analysis/index.cjs.map +1 -1
- package/dist/analysis/index.d.cts +4 -2
- package/dist/analysis/index.d.mts +4 -2
- package/dist/analysis/index.d.ts +4 -2
- package/dist/analysis/index.js +40 -36
- package/dist/analysis/index.mjs +40 -36
- package/dist/assertions/limits.cjs +4 -0
- package/dist/assertions/limits.cjs.map +1 -1
- package/dist/assertions/limits.d.cts +4 -0
- package/dist/assertions/limits.d.mts +4 -0
- package/dist/assertions/limits.d.ts +4 -0
- package/dist/assertions/match.cjs +63 -25
- package/dist/assertions/match.cjs.map +1 -1
- package/dist/assertions/match.d.cts +7 -0
- package/dist/assertions/match.d.mts +7 -0
- package/dist/assertions/match.d.ts +7 -0
- package/dist/assertions/record/attachment.cjs +32 -4
- package/dist/assertions/record/attachment.cjs.map +1 -1
- package/dist/assertions/record/diff.cjs +10 -4
- package/dist/assertions/record/diff.cjs.map +1 -1
- package/dist/assertions/record/producer.cjs +101 -4
- package/dist/assertions/record/producer.cjs.map +1 -1
- package/dist/assertions/record/producer.d.cts +4 -1
- package/dist/assertions/record/producer.d.mts +4 -1
- package/dist/assertions/record/producer.d.ts +4 -1
- package/dist/assertions/runtime.cjs +45 -5
- package/dist/assertions/runtime.cjs.map +1 -1
- package/dist/cli/record.cjs +113 -8
- package/dist/cli/record.cjs.map +1 -1
- package/dist/cli/record.d.cts +20 -1
- package/dist/cli/record.d.mts +20 -1
- package/dist/cli/record.d.ts +20 -1
- package/dist/cli/record.js +4 -2
- package/dist/cli.cjs +386 -31
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +10 -2
- package/dist/cli.d.mts +10 -2
- package/dist/cli.d.ts +10 -2
- package/dist/context/send-retry.cjs +4 -4
- package/dist/context/send-retry.cjs.map +1 -1
- package/dist/coordination/host/runtime.cjs +8 -30
- package/dist/coordination/host/runtime.cjs.map +1 -1
- package/dist/coordination/host/runtime.d.cts +3 -3
- package/dist/coordination/host/runtime.d.mts +3 -3
- package/dist/coordination/host/runtime.d.ts +3 -3
- package/dist/coordination/host/types.cjs.map +1 -1
- package/dist/coordination/host/types.d.cts +0 -5
- package/dist/coordination/host/types.d.mts +0 -5
- package/dist/coordination/host/types.d.ts +0 -5
- package/dist/coordination/platform/node.cjs +90 -9
- package/dist/coordination/platform/node.cjs.map +1 -1
- package/dist/define.cjs +25 -1
- package/dist/define.cjs.map +1 -1
- package/dist/experiment/host/index.cjs +1 -0
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/i18n/en.cjs +26 -8
- package/dist/i18n/en.cjs.map +1 -1
- package/dist/i18n/en.d.cts +19 -6
- package/dist/i18n/en.d.mts +19 -6
- package/dist/i18n/en.d.ts +19 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/o11y/parsers/hermes.cjs +1 -1
- package/dist/o11y/parsers/hermes.cjs.map +1 -1
- package/dist/o11y/prices.json +1 -1
- package/dist/o11y/record/families.cjs +12 -3
- package/dist/o11y/record/families.cjs.map +1 -1
- package/dist/o11y/record/families.d.cts +8 -8
- package/dist/o11y/record/families.d.mts +8 -8
- package/dist/o11y/record/families.d.ts +8 -8
- package/dist/o11y/record/family-projectors.d.cts +66 -18
- package/dist/o11y/record/family-projectors.d.mts +66 -18
- package/dist/o11y/record/family-projectors.d.ts +66 -18
- package/dist/o11y/record/family-writers.d.cts +11 -3
- package/dist/o11y/record/family-writers.d.mts +11 -3
- package/dist/o11y/record/family-writers.d.ts +11 -3
- package/dist/o11y/record/runner-producer.cjs +14 -4
- package/dist/o11y/record/runner-producer.cjs.map +1 -1
- package/dist/record/codec/core.d.cts +2 -2
- package/dist/record/codec/core.d.mts +2 -2
- package/dist/record/codec/core.d.ts +2 -2
- package/dist/record/family/catalog.d.cts +44 -12
- package/dist/record/family/catalog.d.mts +44 -12
- package/dist/record/family/catalog.d.ts +44 -12
- package/dist/record/family/index.js +128 -124
- package/dist/record/family/observability-v1.cjs +35 -0
- package/dist/record/family/observability-v1.cjs.map +1 -0
- package/dist/record/family/observability-v1.d.cts +3 -0
- package/dist/record/family/observability-v1.d.mts +3 -0
- package/dist/record/family/observability-v1.d.ts +3 -0
- package/dist/record/family/observability-v1.js +6 -0
- package/dist/record/family/observability-v1.js.map +1 -0
- package/dist/record/family/observability.cjs +58 -9
- package/dist/record/family/observability.cjs.map +1 -1
- package/dist/record/family/observability.d.cts +1014 -15
- package/dist/record/family/observability.d.mts +1014 -15
- package/dist/record/family/observability.d.ts +1014 -15
- package/dist/record/family/observability.js +22 -18
- package/dist/record/host/runtime.cjs +600 -31
- 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 +33 -9
- package/dist/record/host/types.d.mts +33 -9
- package/dist/record/host/types.d.ts +33 -9
- package/dist/record/maintenance/runtime.cjs +1 -2
- package/dist/record/maintenance/runtime.cjs.map +1 -1
- package/dist/record/model/core.cjs.map +1 -1
- package/dist/record/model/core.d.cts +1 -1
- package/dist/record/model/core.d.mts +1 -1
- package/dist/record/model/core.d.ts +1 -1
- package/dist/record/model/definition.d.cts +6 -6
- package/dist/record/model/definition.d.mts +6 -6
- package/dist/record/model/definition.d.ts +6 -6
- package/dist/record/model/identifiers.cjs +1 -1
- package/dist/record/model/identifiers.cjs.map +1 -1
- package/dist/record/model/identifiers.d.cts +1 -1
- package/dist/record/model/identifiers.d.mts +1 -1
- package/dist/record/model/identifiers.d.ts +1 -1
- package/dist/record/platform/node.cjs +159 -23
- package/dist/record/platform/node.cjs.map +1 -1
- package/dist/record/platform/services.cjs.map +1 -1
- package/dist/record/platform/services.d.cts +15 -2
- package/dist/record/platform/services.d.mts +15 -2
- package/dist/record/platform/services.d.ts +15 -2
- package/dist/record/reader/errors.cjs +37 -1
- package/dist/record/reader/errors.cjs.map +1 -1
- package/dist/record/reader/errors.d.cts +49 -1
- package/dist/record/reader/errors.d.mts +49 -1
- package/dist/record/reader/errors.d.ts +49 -1
- package/dist/record/reader/errors.js +22 -12
- package/dist/record/reader/format.cjs +76 -17
- package/dist/record/reader/format.cjs.map +1 -1
- package/dist/record/reader/format.d.cts +11 -4
- package/dist/record/reader/format.d.mts +11 -4
- package/dist/record/reader/format.d.ts +11 -4
- package/dist/record/reader/format.js +2 -0
- package/dist/record/reader/index.js +32 -18
- package/dist/record/reader/runtime.cjs +64 -0
- package/dist/record/reader/runtime.cjs.map +1 -1
- package/dist/record/reader/runtime.d.cts +15 -0
- package/dist/record/reader/runtime.d.mts +15 -0
- package/dist/record/reader/runtime.d.ts +15 -0
- package/dist/record/reader/runtime.js +2 -0
- package/dist/report/assets/styles.css +53 -29
- package/dist/report/built-in/analysis-values.cjs +21 -13
- package/dist/report/built-in/analysis-values.cjs.map +1 -1
- package/dist/report/built-in/analysis-values.d.cts +11 -22
- package/dist/report/built-in/analysis-values.d.mts +11 -22
- package/dist/report/built-in/analysis-values.d.ts +11 -22
- package/dist/report/built-in/analysis-values.js +4 -6
- package/dist/report/built-in/index.cjs +1 -3
- package/dist/report/built-in/index.cjs.map +1 -1
- package/dist/report/built-in/index.d.cts +1 -1
- package/dist/report/built-in/index.d.mts +1 -1
- package/dist/report/built-in/index.d.ts +1 -1
- package/dist/report/built-in/index.js +4 -8
- package/dist/report/built-in/index.mjs +4 -8
- package/dist/report/built-in/machine.cjs +0 -2
- package/dist/report/built-in/machine.cjs.map +1 -1
- package/dist/report/built-in/machine.d.cts +0 -2
- package/dist/report/built-in/machine.d.mts +0 -2
- package/dist/report/built-in/machine.d.ts +0 -2
- package/dist/report/built-in/result-components.cjs +49 -51
- package/dist/report/built-in/result-components.cjs.map +1 -1
- package/dist/report/built-in/result-components.d.cts +16 -17
- package/dist/report/built-in/result-components.d.mts +16 -17
- package/dist/report/built-in/result-components.d.ts +16 -17
- package/dist/report/built-in/result-components.js +0 -4
- package/dist/report/built-in/run-membership-overview.cjs +126 -17
- package/dist/report/built-in/run-membership-overview.cjs.map +1 -1
- package/dist/report/built-in/run-membership-overview.d.cts +14 -0
- package/dist/report/built-in/run-membership-overview.d.mts +14 -0
- package/dist/report/built-in/run-membership-overview.d.ts +14 -0
- package/dist/report/built-in/run-membership-overview.js +4 -2
- package/dist/report/built-in/standard.cjs +80 -45
- package/dist/report/built-in/standard.cjs.map +1 -1
- package/dist/report/built-in/standard.d.cts +19 -41
- package/dist/report/built-in/standard.d.mts +19 -41
- package/dist/report/built-in/standard.d.ts +19 -41
- package/dist/report/built-in/standard.js +6 -6
- package/dist/report/components/attempt-detail/compute.cjs +78 -2
- package/dist/report/components/attempt-detail/compute.cjs.map +1 -1
- package/dist/report/components/attempt-detail/compute.d.cts +1 -1
- package/dist/report/components/attempt-detail/compute.d.mts +1 -1
- package/dist/report/components/attempt-detail/compute.d.ts +1 -1
- 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 +42 -5
- package/dist/report/components/entity-lists/compute.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.d.cts +10 -8
- package/dist/report/components/entity-lists/compute.d.mts +10 -8
- package/dist/report/components/entity-lists/compute.d.ts +10 -8
- package/dist/report/components/entity-lists/content.cjs +31 -6
- package/dist/report/components/entity-lists/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.cjs +9 -4
- package/dist/report/components/entity-lists/index.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.d.cts +4 -7
- package/dist/report/components/entity-lists/index.d.mts +4 -7
- package/dist/report/components/entity-lists/index.d.ts +4 -7
- package/dist/report/components/summaries/compute.cjs +8 -1
- package/dist/report/components/summaries/compute.cjs.map +1 -1
- package/dist/report/components/summaries/compute.d.cts +9 -1
- package/dist/report/components/summaries/compute.d.mts +9 -1
- package/dist/report/components/summaries/compute.d.ts +9 -1
- package/dist/report/components/summaries/index.cjs +48 -4
- package/dist/report/components/summaries/index.cjs.map +1 -1
- package/dist/report/components/summaries/index.d.cts +7 -4
- package/dist/report/components/summaries/index.d.mts +7 -4
- package/dist/report/components/summaries/index.d.ts +7 -4
- package/dist/report/definition/cell.cjs +3 -0
- 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/chart.cjs +8 -5
- package/dist/report/definition/primitives/chart.cjs.map +1 -1
- package/dist/report/definition/primitives/points-dataset.cjs +1 -0
- package/dist/report/definition/primitives/points-dataset.cjs.map +1 -1
- package/dist/report/definition/primitives.cjs +15 -2
- package/dist/report/definition/primitives.cjs.map +1 -1
- package/dist/report/definition/report.cjs +27 -3
- package/dist/report/definition/report.cjs.map +1 -1
- package/dist/report/definition/report.d.cts +8 -0
- package/dist/report/definition/report.d.mts +8 -0
- package/dist/report/definition/report.d.ts +8 -0
- package/dist/report/execution/machine.cjs +30 -14
- package/dist/report/execution/machine.cjs.map +1 -1
- package/dist/report/execution/machine.d.cts +20 -10
- package/dist/report/execution/machine.d.mts +20 -10
- package/dist/report/execution/machine.d.ts +20 -10
- package/dist/report/execution/machine.js +6 -6
- package/dist/report/host/execute.cjs +25 -16
- package/dist/report/host/execute.cjs.map +1 -1
- package/dist/report/host/execute.d.cts +4 -0
- package/dist/report/host/execute.d.mts +4 -0
- package/dist/report/host/execute.d.ts +4 -0
- package/dist/report/host/from-record.cjs +22 -5
- package/dist/report/host/from-record.cjs.map +1 -1
- package/dist/report/host/machine.cjs +53 -11
- package/dist/report/host/machine.cjs.map +1 -1
- package/dist/report/host/site-runtime.cjs +9 -8
- package/dist/report/host/site-runtime.cjs.map +1 -1
- package/dist/report/host/site-runtime.d.cts +1 -1
- package/dist/report/host/site-runtime.d.mts +1 -1
- package/dist/report/host/site-runtime.d.ts +1 -1
- package/dist/report/host/static.cjs +56 -9
- package/dist/report/host/static.cjs.map +1 -1
- package/dist/report/index.cjs.map +1 -1
- package/dist/report/index.d.cts +1 -1
- package/dist/report/index.d.mts +1 -1
- package/dist/report/index.d.ts +1 -1
- package/dist/report/model/dataset.cjs +7 -2
- package/dist/report/model/dataset.cjs.map +1 -1
- package/dist/report/model/locale.cjs +2 -0
- package/dist/report/model/locale.cjs.map +1 -1
- package/dist/report/model/locale.d.cts +1 -0
- package/dist/report/model/locale.d.mts +1 -0
- package/dist/report/model/locale.d.ts +1 -0
- package/dist/report/model/metrics.cjs +3 -1
- package/dist/report/model/metrics.cjs.map +1 -1
- package/dist/report/model/pricing.cjs +16 -11
- package/dist/report/model/pricing.cjs.map +1 -1
- package/dist/report/react/styles.css +53 -29
- package/dist/runner/adoption.cjs +1 -0
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/attempt.cjs +44 -5
- package/dist/runner/attempt.cjs.map +1 -1
- package/dist/runner/attempt.d.cts +13 -1
- package/dist/runner/attempt.d.mts +13 -1
- package/dist/runner/attempt.d.ts +13 -1
- package/dist/runner/config-identity.cjs +10 -2
- package/dist/runner/config-identity.cjs.map +1 -1
- package/dist/runner/config-identity.d.cts +4 -2
- package/dist/runner/config-identity.d.mts +4 -2
- package/dist/runner/config-identity.d.ts +4 -2
- package/dist/runner/feedback/human.cjs +298 -59
- package/dist/runner/feedback/human.cjs.map +1 -1
- package/dist/runner/feedback/json.cjs +14 -6
- package/dist/runner/feedback/json.cjs.map +1 -1
- package/dist/runner/feedback/json.d.cts +3 -2
- package/dist/runner/feedback/json.d.mts +3 -2
- package/dist/runner/feedback/json.d.ts +3 -2
- package/dist/runner/feedback/reducer.cjs +2 -0
- package/dist/runner/feedback/reducer.cjs.map +1 -1
- package/dist/runner/judge-config.cjs +1 -1
- package/dist/runner/judge-config.cjs.map +1 -1
- package/dist/runner/ledger.cjs +124 -12
- package/dist/runner/ledger.cjs.map +1 -1
- package/dist/runner/project-current.cjs +13 -5
- package/dist/runner/project-current.cjs.map +1 -1
- package/dist/runner/run.cjs +564 -256
- package/dist/runner/run.cjs.map +1 -1
- package/dist/runner/sandbox-pool.cjs +161 -30
- package/dist/runner/sandbox-pool.cjs.map +1 -1
- package/dist/runner/sandbox-pool.d.cts +34 -2
- package/dist/runner/sandbox-pool.d.mts +34 -2
- package/dist/runner/sandbox-pool.d.ts +34 -2
- package/dist/runner/shared-state-lease.cjs +803 -0
- package/dist/runner/shared-state-lease.cjs.map +1 -0
- package/dist/runner/shared-state-lease.d.cts +121 -0
- package/dist/runner/shared-state-lease.d.mts +121 -0
- package/dist/runner/shared-state-lease.d.ts +121 -0
- package/dist/runner/shared-state-lease.js +24 -0
- package/dist/runner/shared-state-lease.js.map +1 -0
- package/dist/runner/teardown-registry.cjs +97 -34
- package/dist/runner/teardown-registry.cjs.map +1 -1
- package/dist/runner/teardown-registry.d.cts +27 -1
- package/dist/runner/teardown-registry.d.mts +27 -1
- package/dist/runner/teardown-registry.d.ts +27 -1
- package/dist/runner/teardown-registry.js +20 -16
- package/dist/runner/types.cjs.map +1 -1
- package/dist/runner/types.d.cts +31 -5
- package/dist/runner/types.d.mts +31 -5
- package/dist/runner/types.d.ts +31 -5
- package/dist/sample/analysis.cjs +249 -459
- package/dist/sample/analysis.cjs.map +1 -1
- package/dist/sample/capability.cjs +138 -7
- package/dist/sample/capability.cjs.map +1 -1
- package/dist/sample/capability.d.cts +3 -1
- package/dist/sample/capability.d.mts +3 -1
- package/dist/sample/capability.d.ts +3 -1
- package/dist/sample/capability.js +8 -6
- package/dist/sandbox/docker-agent-image.cjs +5 -1
- package/dist/sandbox/docker-agent-image.cjs.map +1 -1
- package/dist/sandbox/docker-agent-image.d.cts +2 -0
- package/dist/sandbox/docker-agent-image.d.mts +2 -0
- package/dist/sandbox/docker-agent-image.d.ts +2 -0
- package/dist/sandbox/docker-agent-image.js +14 -10
- package/dist/sandbox/docker-profile/schema.cjs +283 -534
- package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
- package/dist/sandbox/docker-profile/schema.d.cts +10 -27
- package/dist/sandbox/docker-profile/schema.d.mts +10 -27
- package/dist/sandbox/docker-profile/schema.d.ts +10 -27
- package/dist/sandbox/e2b-agent-template.cjs +5 -2
- package/dist/sandbox/e2b-agent-template.cjs.map +1 -1
- package/dist/sandbox/index.cjs +4 -2
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +1 -1
- package/dist/sandbox/index.d.mts +1 -1
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/sandbox/index.js +120 -116
- package/dist/sandbox/index.mjs +120 -116
- package/dist/sandbox/keep-registry.cjs +28 -66
- package/dist/sandbox/keep-registry.cjs.map +1 -1
- package/dist/sandbox/types.cjs.map +1 -1
- package/dist/sandbox/types.d.cts +1 -1
- package/dist/sandbox/types.d.mts +1 -1
- package/dist/sandbox/types.d.ts +1 -1
- package/dist/shared/aggregate.cjs +16 -6
- package/dist/shared/aggregate.cjs.map +1 -1
- package/dist/shared/aggregate.d.cts +12 -4
- package/dist/shared/aggregate.d.mts +12 -4
- package/dist/shared/aggregate.d.ts +12 -4
- package/dist/shared/turn-label.cjs +20 -2
- package/dist/shared/turn-label.cjs.map +1 -1
- package/dist/shared/turn-label.d.cts +2 -0
- package/dist/shared/turn-label.d.mts +2 -0
- package/dist/shared/turn-label.d.ts +2 -0
- package/dist/shared/turn-label.js +4 -2
- package/dist/vendor/remark/remark-gfm.cjs +7 -7
- package/dist/vendor/remark/remark-gfm.cjs.map +1 -1
- package/dist/vendor/remark/remark-parse.cjs +12 -12
- package/dist/vendor/remark/remark-parse.cjs.map +1 -1
- package/dist/vendor/remark/remark.cjs +13 -13
- package/dist/vendor/remark/remark.cjs.map +1 -1
- package/dist/view/server.cjs +6 -0
- package/dist/view/server.cjs.map +1 -1
- package/docs-site/images/hitl-handshake-zh.svg +3 -3
- package/docs-site/zh/examples/ai-agent-application.mdx +1 -1
- package/docs-site/zh/examples/coding-agent-extensions.mdx +1 -1
- package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +4 -3
- package/docs-site/zh/examples/integrations/claude-sdk.mdx +3 -3
- package/docs-site/zh/examples/integrations/codex-sdk.mdx +5 -5
- package/docs-site/zh/examples/integrations/langgraph.mdx +4 -4
- package/docs-site/zh/examples/integrations/pi-sdk.mdx +5 -5
- package/docs-site/zh/explanation/adapter.mdx +5 -5
- package/docs-site/zh/explanation/assert.mdx +7 -7
- package/docs-site/zh/explanation/drive.mdx +4 -2
- package/docs-site/zh/explanation/evals.mdx +10 -8
- package/docs-site/zh/explanation/experiment.mdx +2 -2
- package/docs-site/zh/explanation/hitl.mdx +9 -9
- package/docs-site/zh/explanation/judge.mdx +5 -5
- package/docs-site/zh/explanation/overview.mdx +3 -3
- package/docs-site/zh/explanation/runner.mdx +1 -1
- package/docs-site/zh/index.mdx +3 -3
- package/docs-site/zh/reference/builtin-agents.mdx +13 -13
- package/docs-site/zh/reference/capabilities.mdx +1 -1
- package/docs-site/zh/reference/cli.mdx +18 -12
- package/docs-site/zh/reference/define-agent.mdx +130 -5
- package/docs-site/zh/reference/define-config.mdx +2 -2
- package/docs-site/zh/reference/define-eval.mdx +4 -4
- package/docs-site/zh/reference/events.mdx +11 -11
- package/docs-site/zh/reference/official-adapters.mdx +6 -6
- package/docs-site/zh/reference/results-data.mdx +6 -0
- package/docs-site/zh/troubleshooting/debugging.mdx +1 -1
- package/docs-site/zh/troubleshooting/recover-after-kill.mdx +37 -5
- package/docs-site/zh/tutorials/accept-results.mdx +72 -0
- package/docs-site/zh/tutorials/agent-onboarding.mdx +6 -6
- package/docs-site/zh/tutorials/authoring.mdx +9 -13
- package/docs-site/zh/tutorials/ci-integration.mdx +6 -6
- package/docs-site/zh/tutorials/compare-runs.mdx +61 -0
- package/docs-site/zh/tutorials/concurrency.mdx +13 -12
- package/docs-site/zh/tutorials/configuration.mdx +4 -6
- package/docs-site/zh/tutorials/connect-your-agent.mdx +1 -1
- package/docs-site/zh/tutorials/control-run-cost.mdx +58 -0
- package/docs-site/zh/tutorials/criteria-files.mdx +2 -2
- package/docs-site/zh/tutorials/custom-reports.mdx +2 -2
- package/docs-site/zh/tutorials/debug-lifecycle-plan.mdx +46 -0
- package/docs-site/zh/tutorials/docker-in-docker.mdx +52 -43
- package/docs-site/zh/tutorials/eval-groups.mdx +6 -6
- package/docs-site/zh/tutorials/evaluation-kinds.mdx +3 -3
- package/docs-site/zh/tutorials/experiments.mdx +2 -3
- package/docs-site/zh/tutorials/handle-execution-failures.mdx +18 -10
- package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +16 -8
- package/docs-site/zh/tutorials/nixos-managed-dind.mdx +160 -0
- package/docs-site/zh/tutorials/plugins.mdx +14 -0
- package/docs-site/zh/tutorials/rerun-and-cache.mdx +4 -2
- package/docs-site/zh/tutorials/sandbox-agent.mdx +17 -11
- package/docs-site/zh/tutorials/sandbox-providers.mdx +17 -13
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +12 -19
- package/docs-site/zh/tutorials/select-and-preview.mdx +65 -0
- package/docs-site/zh/tutorials/verify-judge.mdx +78 -0
- package/docs-site/zh/tutorials/viewing-results.mdx +38 -1
- package/docs-site/zh/tutorials/write-experiment.mdx +7 -5
- package/docs-site/zh/tutorials/write-send.mdx +9 -8
- package/package.json +9 -5
- package/dist/report/built-in/overview.cjs +0 -44
- package/dist/report/built-in/overview.cjs.map +0 -1
- package/dist/report/built-in/overview.d.cts +0 -6
- package/dist/report/built-in/overview.d.mts +0 -6
- package/dist/report/built-in/overview.d.ts +0 -6
- package/dist/report/built-in/overview.js +0 -9
- package/dist/report/built-in/overview.js.map +0 -1
- package/dist/runner/gate-lease.cjs +0 -283
- package/dist/runner/gate-lease.cjs.map +0 -1
- package/dist/runner/gate-lease.d.cts +0 -62
- package/dist/runner/gate-lease.d.mts +0 -62
- package/dist/runner/gate-lease.d.ts +0 -62
- package/dist/runner/gate-lease.js +0 -22
- package/dist/runner/gate-lease.js.map +0 -1
|
@@ -49,18 +49,26 @@ export default defineEval({
|
|
|
49
49
|
});
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
共享服务无法访问时,把检查写进真实评估用例的 `test(t)` callback。先把
|
|
53
|
+
`serviceHealthUrl` 换成服务的健康检查地址,再用 `ExperimentFatalError` 停止同一实验的剩余 Attempt:
|
|
53
54
|
|
|
54
55
|
```ts
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
// evals/coding/shared-service-health.eval.ts
|
|
57
|
+
import { defineEval, ExperimentFatalError } from "niceeval";
|
|
58
|
+
|
|
59
|
+
const serviceHealthUrl = "https://service.example.test/health";
|
|
60
|
+
|
|
61
|
+
export default defineEval({
|
|
62
|
+
async test(t) {
|
|
63
|
+
const health = await t.sandbox.runCommand("curl", ["-fsS", serviceHealthUrl]);
|
|
64
|
+
if (health.exitCode !== 0) {
|
|
65
|
+
throw new ExperimentFatalError(
|
|
66
|
+
"共享服务无法访问。请检查服务和隧道,然后重跑实验。",
|
|
67
|
+
{ cause: health.stderr },
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
});
|
|
64
72
|
```
|
|
65
73
|
|
|
66
74
|
错误消息会出现在终端和运行记录中。请写明发生了什么,以及下一步怎么修复。
|
|
@@ -13,10 +13,12 @@ Node.js CLI 可以使用 `createNpmCliInstaller`。下面的代码把 npm 包 `m
|
|
|
13
13
|
```ts
|
|
14
14
|
// agents/my-agent.ts
|
|
15
15
|
import {
|
|
16
|
-
completeEvidenceCoverage,
|
|
17
16
|
createNpmCliInstaller,
|
|
18
17
|
defineSandboxAgent,
|
|
19
|
-
|
|
18
|
+
agentBin,
|
|
19
|
+
responsesEvidenceCoverage,
|
|
20
|
+
turnFromResponses,
|
|
21
|
+
type ResponseLike,
|
|
20
22
|
} from "niceeval/adapter";
|
|
21
23
|
|
|
22
24
|
const { ensure, installer } = createNpmCliInstaller({
|
|
@@ -36,7 +38,7 @@ const { ensure, installer } = createNpmCliInstaller({
|
|
|
36
38
|
|
|
37
39
|
export default defineSandboxAgent({
|
|
38
40
|
name: "my-agent",
|
|
39
|
-
evidenceCoverage:
|
|
41
|
+
evidenceCoverage: responsesEvidenceCoverage,
|
|
40
42
|
ensure,
|
|
41
43
|
installers: [installer],
|
|
42
44
|
|
|
@@ -45,16 +47,22 @@ export default defineSandboxAgent({
|
|
|
45
47
|
},
|
|
46
48
|
|
|
47
49
|
async send(input, ctx) {
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
+
const result = await ctx.sandbox.runCommand("sh", [
|
|
51
|
+
"-lc",
|
|
52
|
+
`exec ${agentBin("my-agent")} run --json "$1"`,
|
|
53
|
+
"my-agent",
|
|
54
|
+
input.text,
|
|
55
|
+
]);
|
|
50
56
|
if (result.exitCode !== 0) {
|
|
51
57
|
throw new Error(`my-agent 退出码 ${result.exitCode}: ${result.stderr}`);
|
|
52
58
|
}
|
|
53
|
-
return
|
|
59
|
+
return turnFromResponses(JSON.parse(result.stdout) as ResponseLike);
|
|
54
60
|
},
|
|
55
61
|
});
|
|
56
62
|
```
|
|
57
63
|
|
|
64
|
+
这个示例约定 `my-agent run --json` 输出一个 OpenAI Responses 兼容的 JSON 对象。`turnFromResponses` 会把其中的 `output` 项与 usage 转成 NiceEval 的 `Turn`;如果 CLI 输出的是另一套 schema,就把这一行替换成对 `events`、`status` 与 `usage` 的显式映射。
|
|
65
|
+
|
|
58
66
|
`identity.version` 是 CLI 的精确版本。同一版本的安装步骤变化时,同时更新 `identity.revision`。不要在这里使用 `latest`。
|
|
59
67
|
|
|
60
68
|
`setup` 只写鉴权和运行配置。CLI 安装由 `installer` 负责,因此每个 Attempt 都会先完成版本检查。
|
|
@@ -72,7 +80,7 @@ import myAgent from "../agents/my-agent.ts";
|
|
|
72
80
|
export default defineExperiment({
|
|
73
81
|
agent: myAgent,
|
|
74
82
|
model: "acme-model-v2",
|
|
75
|
-
sandbox: dockerSandbox({ source: { type: "image", image: "
|
|
83
|
+
sandbox: dockerSandbox({ source: { type: "image", image: "node:22-slim" } }),
|
|
76
84
|
});
|
|
77
85
|
```
|
|
78
86
|
|
|
@@ -80,7 +88,7 @@ export default defineExperiment({
|
|
|
80
88
|
npx niceeval exp my-agent fixtures/button
|
|
81
89
|
```
|
|
82
90
|
|
|
83
|
-
Sandbox
|
|
91
|
+
普通 npm 包要求 Sandbox 提供 Node.js 与 npm。`createNpmCliInstaller` 在宿主机打包、上传,再在 Sandbox 内执行 `npm install -g`。Sandbox 如果已有正确版本,NiceEval 会直接使用它。只有真正自包含的 `platformPackage` 才能省掉这项运行时前置条件。
|
|
84
92
|
|
|
85
93
|
## 检查安装失败
|
|
86
94
|
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "在 NixOS 上配置 Managed DinD"
|
|
3
|
+
sidebarTitle: "NixOS Managed DinD"
|
|
4
|
+
description: "使用 NiceEval 的 NixOS module 部署 managed rootless Docker profile,并通过 doctor 验证宿主环境。"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Managed rootless DinD 适合在共享 NixOS 宿主上运行不可信 Agent。NiceEval 的 NixOS module 会创建专用
|
|
8
|
+
系统用户、rootless Docker daemon、容量受限的数据盘、资源 slice 和 watchdog。日常运行 NiceEval
|
|
9
|
+
不需要 `sudo`,但首次部署和更新系统配置需要管理员权限。
|
|
10
|
+
|
|
11
|
+
如果任务可以信任 Agent,或者只在一次性 VM 中运行,先阅读[让 Sandbox 使用 Docker](/zh/tutorials/docker-in-docker)
|
|
12
|
+
选择 Docker socket 或 raw privileged DinD。它们不需要本页的宿主 profile。
|
|
13
|
+
|
|
14
|
+
## 前置条件
|
|
15
|
+
|
|
16
|
+
开始前确认:
|
|
17
|
+
|
|
18
|
+
- NixOS 使用 flake 管理系统配置;
|
|
19
|
+
- 宿主使用 systemd 和 cgroup v2;
|
|
20
|
+
- 你知道日常运行 NiceEval 的 NixOS 用户名;
|
|
21
|
+
- 宿主有足够的 CPU、内存和磁盘留给评估容器。
|
|
22
|
+
|
|
23
|
+
下面假设系统配置仓库已经有 `flake.nix`,配置名是 `my-host`,日常用户名是 `alice`。请把它们替换成
|
|
24
|
+
自己的值。
|
|
25
|
+
|
|
26
|
+
## 引入 NiceEval module
|
|
27
|
+
|
|
28
|
+
在系统配置的 `flake.nix` 中加入 NiceEval input,并把 module 放进主机的 `modules`:
|
|
29
|
+
|
|
30
|
+
```nix title="flake.nix"
|
|
31
|
+
{
|
|
32
|
+
inputs = {
|
|
33
|
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
34
|
+
niceeval.url = "github:NiceEval/NiceEval";
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
outputs = { self, nixpkgs, niceeval, ... }: {
|
|
38
|
+
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
|
|
39
|
+
system = "x86_64-linux";
|
|
40
|
+
modules = [
|
|
41
|
+
niceeval.nixosModules.default
|
|
42
|
+
./configuration.nix
|
|
43
|
+
];
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
第一次运行 Nix 命令后,Nix 会把 NiceEval 的具体 commit 写进你的 `flake.lock`。提交这份锁文件,避免
|
|
50
|
+
不同机器在未确认的时间使用不同 module 版本。
|
|
51
|
+
|
|
52
|
+
## 声明 profile
|
|
53
|
+
|
|
54
|
+
在 NixOS 配置中声明一个名为 `default` 的 profile:
|
|
55
|
+
|
|
56
|
+
```nix title="configuration.nix"
|
|
57
|
+
{ ... }:
|
|
58
|
+
{
|
|
59
|
+
services.niceeval.dockerProfiles.default = {
|
|
60
|
+
enable = true;
|
|
61
|
+
accessUsers = [ "alice" ];
|
|
62
|
+
|
|
63
|
+
capacity = {
|
|
64
|
+
cpus = 4;
|
|
65
|
+
memory = "8G";
|
|
66
|
+
pids = 4096;
|
|
67
|
+
maxContainers = 2;
|
|
68
|
+
maxBuilds = 1;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
aggregate = {
|
|
72
|
+
cpus = 6;
|
|
73
|
+
memory = "12G";
|
|
74
|
+
pids = 6144;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
storage = {
|
|
78
|
+
size = "30G";
|
|
79
|
+
backing = "loop-ext4";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`capacity` 是 NiceEval 可以分配给评估任务的预算。`aggregate` 是 daemon、构建进程、watchdog 和评估
|
|
86
|
+
容器共同受到的硬限制,因此每一项都不能小于 `capacity`。两者之间的余量留给宿主侧开销。
|
|
87
|
+
|
|
88
|
+
`loop-ext4` 会在 `/var/lib/niceeval/docker-profiles/default.img` 创建稀疏镜像,并挂载为 Docker
|
|
89
|
+
data root。`size` 是这个 profile 的磁盘上限,不代表 rebuild 时立即占用同等物理空间。
|
|
90
|
+
|
|
91
|
+
## 应用系统配置
|
|
92
|
+
|
|
93
|
+
先检查配置能够求值,再切换系统:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
nix flake check
|
|
97
|
+
sudo nixos-rebuild switch --flake .#my-host
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
module 会把 `alice` 加入 profile 的 access group。rebuild 完成后退出当前登录会话并重新登录,让新组
|
|
101
|
+
成员身份生效。只在旧 shell 中重新运行命令不会刷新 supplementary groups。
|
|
102
|
+
|
|
103
|
+
重新登录后检查服务:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
systemctl status niceeval-docker-profile-default.service
|
|
107
|
+
systemctl status niceeval-docker-profile-watchdog-default.service
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
两个服务都应显示 `active (running)`。失败时读取对应 unit 的日志:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
journalctl -u niceeval-docker-profile-default.service -b
|
|
114
|
+
journalctl -u niceeval-docker-profile-watchdog-default.service -b
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 验证 profile
|
|
118
|
+
|
|
119
|
+
进入已经安装 NiceEval 的评估项目,以日常用户运行:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
pnpm exec niceeval docker profile list
|
|
123
|
+
pnpm exec niceeval docker profile doctor default --smoke
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`list` 应显示 `default`。`doctor --smoke` 会检查 descriptor、Unix socket、cgroup、容量和 watchdog,
|
|
127
|
+
然后启动一个受限的外层容器及一个内层 Alpine 容器。所有项目都通过后,宿主 profile 才可以用于正式
|
|
128
|
+
评估。
|
|
129
|
+
|
|
130
|
+
不要用 `sudo pnpm exec niceeval ...` 绕过权限错误。日常用户无法访问 profile 时,先确认用户名已经写入
|
|
131
|
+
`accessUsers`,再重新登录并重跑 doctor。
|
|
132
|
+
|
|
133
|
+
## 在 Experiment 中使用
|
|
134
|
+
|
|
135
|
+
宿主通过验收后,在 Experiment 的 Docker Sandbox 中引用同一个别名:
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
dockerAccess: {
|
|
139
|
+
mode: "dind",
|
|
140
|
+
isolation: "managed-rootless",
|
|
141
|
+
profile: "default",
|
|
142
|
+
},
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Experiment 还必须声明单容器 CPU、内存、PID、只读 rootfs 和 tmpfs。完整配置见
|
|
146
|
+
[让 Sandbox 使用 Docker](/zh/tutorials/docker-in-docker#managed-rootless-dind)。先用较小的
|
|
147
|
+
`maxConcurrency` 运行一次,再根据 profile 的 `capacity` 增加并发。
|
|
148
|
+
|
|
149
|
+
## 更新 module
|
|
150
|
+
|
|
151
|
+
需要更新 NiceEval module 时,在系统配置仓库更新对应 input,检查 diff 后重新构建:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
nix flake update niceeval
|
|
155
|
+
nix flake check
|
|
156
|
+
sudo nixos-rebuild switch --flake .#my-host
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
更新会改变宿主服务,不能只更新评估项目里的 npm 依赖。保留旧 generation,确认 doctor 和实际评估都
|
|
160
|
+
通过后再清理 NixOS generation。
|
|
@@ -39,6 +39,15 @@ export const memory = definePlugin<MemoryOptions>({
|
|
|
39
39
|
teardown: (_sandbox, ctx) => ctx.progress({ message: "断开当前 Sandbox" }),
|
|
40
40
|
}),
|
|
41
41
|
});
|
|
42
|
+
|
|
43
|
+
export const telemetry = definePlugin({
|
|
44
|
+
name: "acme.telemetry",
|
|
45
|
+
behaviorRevision: "1",
|
|
46
|
+
experiment: () => ({
|
|
47
|
+
setup: (ctx) => ctx.progress({ message: "启动 telemetry 收集" }),
|
|
48
|
+
teardown: (ctx) => ctx.progress({ message: "停止 telemetry 收集" }),
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
42
51
|
```
|
|
43
52
|
|
|
44
53
|
`name` 命名 Plugin family。`instanceKey(options)` 区分同一 family 的不同配置。实现语义改变时提高 `behaviorRevision`,让旧结果不再被精确沿用。
|
|
@@ -50,6 +59,11 @@ export const memory = definePlugin<MemoryOptions>({
|
|
|
50
59
|
`plugins` 始终接收数组:
|
|
51
60
|
|
|
52
61
|
```ts
|
|
62
|
+
import { defineExperiment } from "niceeval";
|
|
63
|
+
import { codexAgent } from "niceeval/adapter";
|
|
64
|
+
import { dockerSandbox } from "niceeval/sandbox";
|
|
65
|
+
import { memory, telemetry } from "./shared/memory.ts";
|
|
66
|
+
|
|
53
67
|
export default defineExperiment({
|
|
54
68
|
agent: codexAgent({
|
|
55
69
|
skills: [{ kind: "local", path: ".agents/skills/memory" }],
|
|
@@ -62,13 +62,15 @@ npx niceeval exp checkout --rerun all
|
|
|
62
62
|
|
|
63
63
|
## 明确接受已有 Attempt
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
身份变化不一定表示历史结果已经失效,但 NiceEval 不会替操作者猜测。先从 dry run 或结果页取得完整 locator,核对候选 Attempt;确认它在新配置下仍然成立时,明确接受它:
|
|
66
66
|
|
|
67
67
|
```sh
|
|
68
68
|
npx niceeval accept @1K1P0VJAPVJ12
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
`accept`
|
|
71
|
+
`accept` 会发布一个新的采用 Run,不会修改原 Attempt。一次需要接受多个结果时,把全部 locator 放在同一条命令中;NiceEval 会先原子预检所有输入,避免只接受一半。
|
|
72
|
+
|
|
73
|
+
候选 locator 的取得方式、审阅项目、原子预检和失败处理见[审阅并采用历史 Attempt](/zh/tutorials/accept-results)。
|
|
72
74
|
|
|
73
75
|
## 发布后不可修改
|
|
74
76
|
|
|
@@ -13,16 +13,16 @@ Sandbox agent 会在隔离环境中启动 coding-agent CLI,给它 workspace
|
|
|
13
13
|
运行 Anthropic Claude Code CLI,需要 `ANTHROPIC_API_KEY`。
|
|
14
14
|
</Card>
|
|
15
15
|
<Card title="codex" icon="terminal">
|
|
16
|
-
运行 OpenAI Codex CLI,需要 `
|
|
16
|
+
运行 OpenAI Codex CLI,需要 `OPENAI_API_KEY`。
|
|
17
17
|
</Card>
|
|
18
18
|
<Card title="bub" icon="robot">
|
|
19
|
-
运行 bub coding agent
|
|
19
|
+
运行 bub coding agent,需要 `OPENAI_API_KEY` 与 `OPENAI_BASE_URL`。
|
|
20
20
|
</Card>
|
|
21
21
|
</CardGroup>
|
|
22
22
|
|
|
23
23
|
## 运行内置 agent
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
在评估用例或 Experiment 上设置 `sandbox`,选择 [NiceEval](https://niceeval.com/) 在哪里创建隔离环境:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
28
|
// experiments/local.ts
|
|
@@ -45,7 +45,7 @@ npx niceeval exp local fixtures/button --attempts 10
|
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
<Note>
|
|
48
|
-
没有对应的 CLI flag,也没有项目级默认 provider
|
|
48
|
+
没有对应的 CLI flag,也没有项目级默认 provider。评估用例与 Experiment 都没贡献 template-bearing layer 时,link planning 会在创建任何 Sandbox 前失败。
|
|
49
49
|
</Note>
|
|
50
50
|
|
|
51
51
|
云端跑 coding agent 时,可以直接使用 NiceEval 已发布的 E2B 公共模板,避免每个 Attempt 安装 CLI:
|
|
@@ -95,8 +95,10 @@ export default defineExperiment({
|
|
|
95
95
|
| Agent | 必需变量 |
|
|
96
96
|
|---|---|
|
|
97
97
|
| `claude-code` | `ANTHROPIC_API_KEY` |
|
|
98
|
-
| `codex` | `
|
|
99
|
-
| `bub` |
|
|
98
|
+
| `codex` | `OPENAI_API_KEY` |
|
|
99
|
+
| `bub` | `OPENAI_API_KEY`、`OPENAI_BASE_URL` |
|
|
100
|
+
|
|
101
|
+
省略工厂参数时,NiceEval 的 `bubAgent()` 与 `codexAgent()` 都读取这组 OpenAI-compatible 变量。旧的 `BUB_API_KEY`、`BUB_API_BASE`、`CODEX_API_KEY`、`CODEX_BASE_URL` 不再读取;运行 Experiment 前要完成改名。
|
|
100
102
|
|
|
101
103
|
## 工作流程
|
|
102
104
|
|
|
@@ -140,7 +142,7 @@ export default defineEval({
|
|
|
140
142
|
|
|
141
143
|
pattern 是 gitignore 风格,以 workdir 根为基准:不带 `/` 的匹配任意深度的同名项,带 `/` 的从 workdir 根匹配,末尾 `/` 表示目录。项目自己的 `.gitignore` 不参与判断,被项目忽略的文件照常记录。清单在第一次记账时冻结,agent 事后改 `.gitignore` 影响不了它。
|
|
142
144
|
|
|
143
|
-
单个 `t.send()`
|
|
145
|
+
单个 `t.send()` 窗口最多扫描 100,000 个路径和 256 MiB 去重文本。扫描结果中,File Changes 最多保留 10,000 条 change;候选更多时,它保存确定性前缀,并用 `collection-cap-reached` 把 collection 标为 `partial`。只有超过扫描上限才会报执行错误,不会伪装成「一个文件都没改」让文件断言假通过。异常大的 workspace 应用 `diff.include` 或 `diff.ignore` 收窄。
|
|
144
146
|
|
|
145
147
|
生命周期(`.setup()` / `.teardown()`)挂在 experiment `sandbox` 字段的 spec 上,用来做"按实验变化的环境准备"——装某个实验专属的二进制、预热、跨 attempt 载入和回存状态。它写下的文件属于环境,不会被算进 agent 产出的 diff。写法和规则见 [Sandbox provider · 生命周期](/zh/tutorials/sandbox-providers#生命周期)。
|
|
146
148
|
|
|
@@ -151,7 +153,7 @@ import {
|
|
|
151
153
|
completeEvidenceCoverage,
|
|
152
154
|
createNpmCliInstaller,
|
|
153
155
|
defineSandboxAgent,
|
|
154
|
-
|
|
156
|
+
agentBin,
|
|
155
157
|
} from "niceeval/adapter";
|
|
156
158
|
|
|
157
159
|
const { ensure, installer } = createNpmCliInstaller({
|
|
@@ -167,8 +169,12 @@ export default defineSandboxAgent({
|
|
|
167
169
|
installers: [installer],
|
|
168
170
|
async send(input, ctx) {
|
|
169
171
|
ctx.progress({ message: "运行 my-agent CLI" });
|
|
170
|
-
|
|
171
|
-
|
|
172
|
+
await ctx.sandbox.runCommand("sh", [
|
|
173
|
+
"-lc",
|
|
174
|
+
`exec ${agentBin("my-agent")} run "$1" --json-out agent-events.json`,
|
|
175
|
+
"my-agent",
|
|
176
|
+
input.text,
|
|
177
|
+
]);
|
|
172
178
|
const transcript = await ctx.sandbox.readText("agent-events.json");
|
|
173
179
|
if (transcript.trim() === "") {
|
|
174
180
|
ctx.diagnostic({
|
|
@@ -185,7 +191,7 @@ export default defineSandboxAgent({
|
|
|
185
191
|
});
|
|
186
192
|
```
|
|
187
193
|
|
|
188
|
-
`createNpmCliInstaller` 会在宿主机准备 npm
|
|
194
|
+
`createNpmCliInstaller` 会在宿主机准备 npm 包、送入 Sandbox,再用 npm 安装普通包。这类 Sandbox 需要 Node.js 与 npm;只有自包含的 `platformPackage` 才能省掉它们。完整步骤见[为自定义 Sandbox Agent 安装 CLI](/zh/tutorials/install-custom-sandbox-agent)。
|
|
189
195
|
|
|
190
196
|
`setup`、每次 `send` 和 `teardown` 都拿到各自作用域的反馈方法:
|
|
191
197
|
|
|
@@ -42,7 +42,7 @@ export default defineExperiment({
|
|
|
42
42
|
});
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
评估用例与 Experiment 都没声明 template-bearing layer 时,link planning 会在创建任何 Sandbox 前失败,而不会猜一个 provider。
|
|
46
46
|
|
|
47
47
|
三个内置 provider 的 SDK 不随 NiceEval 一起安装——用哪个就装哪个,避免把用不到的依赖(以及它们的原生构建脚本)带进你的项目:
|
|
48
48
|
|
|
@@ -70,11 +70,11 @@ sandbox: dockerComposeSandbox({
|
|
|
70
70
|
|
|
71
71
|
`workspaceService` 指定 Compose 文件里哪个 service 是主 Sandbox。Agent、`t.sandbox` 的命令与文件操作、`workdir`、变更 diff,全部只落在这一个容器上。Compose 文件里的其它 service(数据库、mock server 之类)是伴随资源,不经过 `Sandbox` 接口——不能对它们 `runCommand`、上传或读写文件,也看不到它们的 diff。要用到这些伴随 service,只能靠题目自己的网络访问,例如从 `client` 容器里用 Compose 内置 DNS 访问 `db:5432`。
|
|
72
72
|
|
|
73
|
-
### 让 Agent自己运行 Docker
|
|
73
|
+
### 让 Agent 自己运行 Docker
|
|
74
74
|
|
|
75
|
-
如果 Agent需要执行 `docker build`、`docker run
|
|
76
|
-
也可以选择 raw privileged或 managed rootless Docker-in-Docker。三种模式的适用场景、Dockerfile和
|
|
77
|
-
完整配置见[让 Sandbox使用 Docker](/zh/tutorials/docker-in-docker)。
|
|
75
|
+
如果 Agent 需要执行 `docker build`、`docker run` 或 `docker compose`,可以显式挂已有 Unix socket,
|
|
76
|
+
也可以选择 raw privileged 或 managed rootless Docker-in-Docker。三种模式的适用场景、Dockerfile 和
|
|
77
|
+
完整配置见[让 Sandbox 使用 Docker](/zh/tutorials/docker-in-docker)。
|
|
78
78
|
|
|
79
79
|
## 生命周期
|
|
80
80
|
|
|
@@ -88,7 +88,7 @@ sandbox: dockerComposeSandbox({
|
|
|
88
88
|
import type { SandboxHook, SandboxHookContext } from "niceeval/sandbox";
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
稳定且体积大的依赖不要在这里重复安装。系统包、Agent CLI、编译好的二进制和大模型缓存应该先做进 Docker image、Vercel
|
|
91
|
+
稳定且体积大的依赖不要在这里重复安装。系统包、Agent CLI、编译好的二进制和大模型缓存应该先做进 Docker image、Vercel Sandbox 快照或 E2B template。每个 Attempt 从预制环境启动,`.setup()` 只做薄薄的一层动态配置和 fail-fast 检查。
|
|
92
92
|
|
|
93
93
|
```ts
|
|
94
94
|
export default defineExperiment({
|
|
@@ -97,6 +97,7 @@ export default defineExperiment({
|
|
|
97
97
|
.setup(mempalSetup("codex")) // 预检、写 hook、载入状态
|
|
98
98
|
.teardown(mempalTeardown("codex")), // 回存状态
|
|
99
99
|
maxConcurrency: 1, // 载入和回存之间不能并发,声明串行
|
|
100
|
+
sharedState: { key: "mempal/codex/cohort-a" },
|
|
100
101
|
});
|
|
101
102
|
```
|
|
102
103
|
|
|
@@ -176,17 +177,19 @@ vercelSandbox({ snapshotId: "snap_abc123" })
|
|
|
176
177
|
e2bSandbox({ template: "my-evals" })
|
|
177
178
|
```
|
|
178
179
|
|
|
179
|
-
Docker image、Vercel
|
|
180
|
+
Docker image、Vercel Sandbox 快照和 E2B template 的凭据、构建上下文、发布和过期方式不同。项目应使用 provider 的官方工具维护构建脚本,把最终 ID 或名字放进 experiment。适合预制的判断很简单:如果所有 Attempt 都要下载或安装同一份内容,而且它稳定、昂贵或体积大,就把它移到预制环境。
|
|
180
181
|
|
|
181
182
|
### 从官方基线继续构建以提速
|
|
182
183
|
|
|
183
184
|
稳定、体积大、每个 Attempt 都相同的内容——系统包、Agent CLI、编译好的二进制、大模型缓存——应在跑评估用例之前烘焙进 provider 的可发布构建输出,让每个 Attempt 从预制环境启动、跳过运行时安装。三个内置 provider 都能从官方基线继续派生,不必从空白环境装 Agent。但它们的构建工具、凭据和发布语义不同,NiceEval 只统一**消费**产物 ID(`image` / `snapshotId` / `template`),不伪造跨 provider 的构建 DSL。
|
|
184
185
|
|
|
185
|
-
Adapter 与 Sandbox 不互相猜配置:Adapter 负责检查所需 CLI,Sandbox spec 负责选择 provider 和构建输出。Claude Code 与 Codex 缺少 CLI 时会回退到运行时安装(构建输出在题面网络之外准备,经文件 API 送入),所以烘焙纯粹是提速。Codex 送进去的是该平台自带运行时的原生包,任务镜像不带 Node 也能装,Claude Code 仍要求镜像里有 npm。
|
|
186
|
+
Adapter 与 Sandbox 不互相猜配置:Adapter 负责检查所需 CLI,Sandbox spec 负责选择 provider 和构建输出。Claude Code 与 Codex 缺少 CLI 时会回退到运行时安装(构建输出在题面网络之外准备,经文件 API 送入),所以烘焙纯粹是提速。Codex 送进去的是该平台自带运行时的原生包,任务镜像不带 Node 也能装,Claude Code 仍要求镜像里有 npm。
|
|
187
|
+
|
|
188
|
+
默认 Bub 0.4.0 配方除 OTel 插件外,还固定 `any-llm-sdk==1.17.0` 和 `openai==2.31.0`。安装指纹同时覆盖 Bub requirement、这两个 client override、OTel 插件和规范化后的 Python 插件集,不能仅凭 `command -v bub` 跳过安装。旧 marker 的预制环境会重装一次;显式选择其它 Bub 版本时,传递依赖闭包仍由调用方负责。三个 provider 的构建都只在环境依赖变化时跑一次,产物换一个版本化名字,不要写入每个 Attempt 的 `.setup()`。
|
|
186
189
|
|
|
187
190
|
#### E2B:从官方与公共模板派生
|
|
188
191
|
|
|
189
|
-
E2B 已提供 Claude Code 的 `claude` template 和 Codex 的 `codex` template。NiceEval 提供一个 E2B 专属的薄封装,让你从这两个官方起点继续链原生 E2B API。E2B 暂无 Bub 官方 template
|
|
192
|
+
E2B 已提供 Claude Code 的 `claude` template 和 Codex 的 `codex` template。NiceEval 提供一个 E2B 专属的薄封装,让你从这两个官方起点继续链原生 E2B API。E2B 暂无 Bub 官方 template,因此默认 Bub 分支与 `bubAgent()` 使用同一份完整 client 闭包和 OTel 插件:
|
|
190
193
|
|
|
191
194
|
NiceEval 同时发布了三份任何 E2B Team 都能引用的公共模板。完整 namespace 与版本由 NiceEval 自己维护,
|
|
192
195
|
下游直接取完整引用:
|
|
@@ -203,7 +206,7 @@ e2bSandbox({ template: NICEEVAL_CODEX_E2B_TEMPLATE })
|
|
|
203
206
|
e2bSandbox({ template: NICEEVAL_BUB_E2B_TEMPLATE })
|
|
204
207
|
```
|
|
205
208
|
|
|
206
|
-
这些基线都实际启动验证过:Claude Code `2.1.207`、Codex `0.144.1`、Bub `0.4.0
|
|
209
|
+
这些基线都实际启动验证过:Claude Code `2.1.207`、Codex `0.144.1`、Bub `0.4.0`(安装指纹随 Bub requirement、client override、OTel 插件和 Python 插件 pin 一起变)。模板的版本号跟着它装的那个 Agent 走(形如 `0.144.1-r1`:Agent 版本 + NiceEval 配方修订号),三个 Agent 各自独立发版,NiceEval 库自己的版本不参与命名。所以业务仓库直接用常量,不复制这些字符串、也不跟踪版本。派生模板需要记录 base 身份时,同样用常量的值。
|
|
207
210
|
|
|
208
211
|
当前这批公共模板中,Claude Code 模板沿用 E2B 官方 `/usr` npm prefix,普通用户不能直接写全局模块。需要在运行时追加 pnpm、yarn 等全局 Node 工具时,显式把它们装到两个模板都已加入 PATH 的 `/usr/local`:
|
|
209
212
|
|
|
@@ -315,7 +318,7 @@ Docker Sandbox 沿用镜像自己声明的执行身份:上面这份 Dockerfile
|
|
|
315
318
|
|
|
316
319
|
#### Vercel:从官方 runtime 拍快照
|
|
317
320
|
|
|
318
|
-
Vercel 没有 E2B 式的 template registry,也没有 Dockerfile
|
|
321
|
+
Vercel 没有 E2B 式的 template registry,也没有 Dockerfile。Sandbox 快照是从一台跑起来的 microVM 拍出来的。用 Vercel SDK 从官方 runtime(`node24`)起一台 Sandbox,装好 Agent CLI,调 `.snapshot()` 拿到 `snap_...`,再把它交给 `vercelSandbox({ snapshotId })`:
|
|
319
322
|
|
|
320
323
|
```ts title="scripts/build-vercel-snapshot.ts"
|
|
321
324
|
import { Sandbox } from "@vercel/sandbox";
|
|
@@ -359,7 +362,8 @@ await restoreCheckpoint(nextSandbox, data);
|
|
|
359
362
|
这适合运行时缓存,不会创建可发布的 image/template/snapshot,也不管理共享、版本和过期。归档或恢复失败会直接抛错。
|
|
360
363
|
|
|
361
364
|
如果这些目录或快照要跨 Attempt 延续,把 `restoreCheckpoint()` 放进 `SandboxLayer.setup()`,把 `createCheckpoint()` 放进配对的 `teardown()`。`setup()` 在实际 Sandbox 创建后恢复,因此新 run 也走同一边界。`teardown()` 在实例退休、Provider finalizer 前回存。
|
|
362
|
-
|
|
365
|
+
|
|
366
|
+
`sandboxReuse: true` 只让同一个物理实例在本 Invocation 内继续存在。多个 Invocation 会读写同一 checkpoint 时,在 Experiment 顶层声明 `sharedState: { key }`。NiceEval 在 Experiment setup 或创建 Sandbox 前取得租约,等 checkpoint 回存、Provider finalizer 与 Experiment teardown 完成后释放。它只提供互斥,不负责 checkpoint 存储、事务恢复或跨机器协调。
|
|
363
367
|
|
|
364
368
|
## 瞬时错误重试
|
|
365
369
|
|
|
@@ -405,7 +409,7 @@ NiceEval 只观察、不还原:Agent 改了什么会真实落在你的工作
|
|
|
405
409
|
|
|
406
410
|
## 自定义 Provider
|
|
407
411
|
|
|
408
|
-
用 `defineSandbox` 接入其它服务。`create` 的 `feedback` 已绑定到 `sandbox.create`
|
|
412
|
+
用 `defineSandbox` 接入其它服务。`create` 的 `feedback` 已绑定到 `sandbox.create` 阶段,可以报告分配实例、拉镜像或恢复 Sandbox 快照的状态:
|
|
409
413
|
|
|
410
414
|
```ts
|
|
411
415
|
import { defineSandbox } from "niceeval/sandbox";
|
|
@@ -64,18 +64,11 @@ export default defineExperiment({
|
|
|
64
64
|
|
|
65
65
|
## 多开终端时 Sandbox 不共享
|
|
66
66
|
|
|
67
|
-
Sandbox 复用只发生在一次 Invocation 里。两个终端同时跑一个实验时,两边有各自的 Run 和 Sandbox 池。NiceEval 不把运行中的 Sandbox handle
|
|
67
|
+
Sandbox 复用只发生在一次 Invocation 里。两个终端同时跑一个实验时,两边有各自的 Run 和 Sandbox 池。NiceEval 不把运行中的 Sandbox handle 交给另一个进程;两个 Invocation 可以并发向同一个 Record root 追加已发布结果。
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Record maintenance 是独占操作。`clean` 或其它维护命令报告 `record-maintenance-busy` 时,先停止占用该 root 的 reader 和 writer,再重试维护命令。正常并发运行不需要为了避开 writer 冲突而拆成多个 Record root。
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
niceeval exp experiments/mempal.ts --record .niceeval/mempal-a
|
|
73
|
-
niceeval exp experiments/mempal.ts --record .niceeval/mempal-b
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
两个 root 各自形成完整结果,NiceEval 不自动合并它们。
|
|
77
|
-
|
|
78
|
-
如果 Sandbox 只保留自己的临时状态,两边可以同时跑不同评估用例。两边都会在 Sandbox `setup()` 恢复同一 checkpoint,并在 `teardown()` 回存时,再给实验声明稳定的非密 key:
|
|
71
|
+
如果 Sandbox 只保留自己的临时状态,两边可以同时跑不同评估用例。Sandbox Hook 恢复、回存同一个外部 checkpoint 时,为 Experiment 声明稳定且不含秘密的 key:
|
|
79
72
|
|
|
80
73
|
```typescript
|
|
81
74
|
export default defineExperiment({
|
|
@@ -88,9 +81,9 @@ export default defineExperiment({
|
|
|
88
81
|
});
|
|
89
82
|
```
|
|
90
83
|
|
|
91
|
-
NiceEval
|
|
84
|
+
NiceEval 会在 Experiment setup 或创建 Sandbox 前取得这个 key,直到 Sandbox `teardown`、Provider finalizer 与 Experiment `teardown` 全部完成才释放。等待方不会创建 Sandbox;租约释放后,它继续自己的计划,不读取或采用另一条 Run 的结果。
|
|
92
85
|
|
|
93
|
-
key
|
|
86
|
+
key 会进入结果的配置身份。更换 key 就是更换状态 cohort,旧结果不会混进来。租约只保护外部 checkpoint,与 Record root 无关;普通 append writer 仍可并发使用同一个 root。不同机器或 working copy 仍需外部分布式锁。
|
|
94
87
|
|
|
95
88
|
## 生命周期:谁跑几次
|
|
96
89
|
|
|
@@ -120,8 +113,9 @@ key 会进入结果的配置身份。换 key 表示换了状态 cohort,旧结
|
|
|
120
113
|
`.setup()`。它每个 Sandbox 只跑一次,产物成为题间重置点的一部分,每道题白拿。
|
|
121
114
|
- **只有这道题要的素材**(它自己的仓库、数据、依赖)→ 评估用例自己的 `setup` 或
|
|
122
115
|
`test(t)`。每题重置后重放,所以必须是重放一遍还对的代码。每题各自 clone 时,
|
|
123
|
-
|
|
124
|
-
`rm -rf .
|
|
116
|
+
整个 Experiment 使用同一个具名临时目录,例如 `.niceeval-task-clone`,并把它加进
|
|
117
|
+
`diff.ignore`。clone 前只运行 `rm -rf .niceeval-task-clone` 清掉上一题的残留。
|
|
118
|
+
绝不能删除 `workdir` 根的 `.git`:题间 `git reset` 依赖它,且它会活过题间重置。
|
|
125
119
|
- **起了后台进程、占了端口** → 评估用例的 `teardown` 自己收,题间重置不杀进程。
|
|
126
120
|
|
|
127
121
|
## 幂等是硬要求:一反一正
|
|
@@ -164,12 +158,11 @@ npm install # 调和到 package.json/lockfile 声明的状态,本身
|
|
|
164
158
|
`setup`。marketplace 拉取太慢时用 `sparse` 只拉插件路径,或把插件烘进 template
|
|
165
159
|
并从 `plugins` 里拿掉声明——代价是安装 manifest 里就没有插件与解析版本的记录了。
|
|
166
160
|
|
|
167
|
-
##
|
|
161
|
+
## 一批里混了不同 Sandbox layer
|
|
168
162
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
约束的是所有组加起来的同时执行数。
|
|
163
|
+
选中的评估用例声明不同 template-bearing `sandbox` layer 时,不需要拆命令。Link planning
|
|
164
|
+
逐条解析评估用例 × Experiment 配对。物理 Sandbox identity 不同的 Attempt 不共享 Sandbox,
|
|
165
|
+
也不共享 Sandbox 级 `setup` 产物;实验的 `maxConcurrency` 约束全部选中工作的同时执行数。
|
|
173
166
|
|
|
174
167
|
## 典型节奏
|
|
175
168
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "选择并预览运行范围"
|
|
3
|
+
sidebarTitle: "选择并预览运行范围"
|
|
4
|
+
description: "先列出 Experiment,再用路径、评估用例前缀和 tag 收窄范围,最后用 --dry 确认计划后再花费模型与 Sandbox 成本。"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
仓库里有多组 Experiment 和大量评估用例时,先确认定义,再预览本次计划。不要靠文件名猜 ID,也不要直接启动一批可能选错的任务。
|
|
8
|
+
|
|
9
|
+
## 列出可运行的 Experiment
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm exec niceeval exp list
|
|
13
|
+
pnpm exec niceeval exp list compare/codex
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
每行会显示 Experiment ID、描述、Agent、模型、Attempt 数量、选中的评估用例数量和 labels。`exp list` 只做发现与选择,不创建 Invocation、Sandbox 或模型调用。
|
|
17
|
+
|
|
18
|
+
脚本需要完整清单时使用 JSON:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
pnpm exec niceeval exp list --json > experiments.json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 用位置参数收窄范围
|
|
25
|
+
|
|
26
|
+
第一个位置参数选择 Experiment ID、目录或文件名前缀。后续参数只从这些 Experiment 已经选择的评估用例中继续按 ID 前缀收窄:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
pnpm exec niceeval exp compare/codex memory/commit0
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
精确 Experiment ID 优先于前缀。目录段必须精确匹配;评估用例前缀不能把 Experiment 长期范围之外的题目加回来。
|
|
33
|
+
|
|
34
|
+
只想运行带有某个标签的评估用例时使用 `--tag`:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
pnpm exec niceeval exp compare --tag smoke
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
长期范围应写进 Experiment 的 `evals`。位置参数和 `--tag` 只负责一次调用的临时收窄。
|
|
41
|
+
|
|
42
|
+
## 用 `--dry` 检查计划
|
|
43
|
+
|
|
44
|
+
在真实运行前加上 `--dry`:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
pnpm exec niceeval exp compare/codex memory/commit0 --dry
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
计划会列出评估用例、运行配置、Attempt 序号,以及每个位置会执行还是采用历史结果。它不会创建 Invocation、Run、Sandbox 或模型调用,也不会写 JUnit。
|
|
51
|
+
|
|
52
|
+
机器需要读取计划时组合 `--json`:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
pnpm exec niceeval exp compare/codex memory/commit0 --dry --json > plan.json
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
确认数量、模型、Attempt 和历史结果处置都符合预期后,去掉 `--dry` 运行同一条命令。
|
|
59
|
+
|
|
60
|
+
## 处理选择失败
|
|
61
|
+
|
|
62
|
+
- Experiment 零命中时,CLI 会列出可浏览的目录,并提示先运行 `exp <path> --dry`。
|
|
63
|
+
- 评估用例零命中时,CLI 会明确报告 `No evals selected`,不会退回整个 Experiment 范围。
|
|
64
|
+
- 想查看生命周期命令而不是运行矩阵时,使用[运行前检查生命周期计划](/zh/tutorials/debug-lifecycle-plan)。
|
|
65
|
+
- 想决定哪些旧结果可以沿用时,继续阅读[重跑与沿用结果](/zh/tutorials/rerun-and-cache)。
|