niceeval 0.13.2-canary.35 → 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 +24 -2
- 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/deepseek-harness.cjs +50 -2
- package/dist/agents/deepseek-harness.cjs.map +1 -1
- package/dist/agents/deepseek-harness.d.cts +2 -0
- package/dist/agents/deepseek-harness.d.mts +2 -0
- package/dist/agents/deepseek-harness.d.ts +2 -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/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 +2 -2
- package/dist/agents/types.d.mts +2 -2
- package/dist/agents/types.d.ts +2 -2
- package/dist/agents/ui-message-stream.cjs +24 -7
- package/dist/agents/ui-message-stream.cjs.map +1 -1
- package/dist/analysis/api.cjs +19 -1
- package/dist/analysis/api.cjs.map +1 -1
- package/dist/analysis/api.d.cts +2 -2
- package/dist/analysis/api.d.mts +2 -2
- package/dist/analysis/api.d.ts +2 -2
- 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 +19 -6
- package/dist/i18n/en.cjs.map +1 -1
- package/dist/i18n/en.d.cts +12 -4
- package/dist/i18n/en.d.mts +12 -4
- package/dist/i18n/en.d.ts +12 -4
- 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/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 +0 -8
- package/dist/report/built-in/analysis-values.cjs.map +1 -1
- package/dist/report/built-in/analysis-values.d.cts +0 -13
- package/dist/report/built-in/analysis-values.d.mts +0 -13
- package/dist/report/built-in/analysis-values.d.ts +0 -13
- 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 +25 -73
- package/dist/report/built-in/result-components.cjs.map +1 -1
- package/dist/report/built-in/result-components.d.cts +3 -19
- package/dist/report/built-in/result-components.d.mts +3 -19
- package/dist/report/built-in/result-components.d.ts +3 -19
- package/dist/report/built-in/result-components.js +0 -4
- package/dist/report/built-in/run-membership-overview.cjs +30 -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 -46
- package/dist/report/built-in/standard.cjs.map +1 -1
- package/dist/report/built-in/standard.d.cts +19 -42
- package/dist/report/built-in/standard.d.mts +19 -42
- package/dist/report/built-in/standard.d.ts +19 -42
- 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 +2 -2
- package/dist/report/components/entity-lists/compute.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.d.cts +2 -2
- package/dist/report/components/entity-lists/compute.d.mts +2 -2
- package/dist/report/components/entity-lists/compute.d.ts +2 -2
- package/dist/report/components/entity-lists/index.cjs +6 -2
- package/dist/report/components/entity-lists/index.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.d.cts +3 -6
- package/dist/report/components/entity-lists/index.d.mts +3 -6
- package/dist/report/components/entity-lists/index.d.ts +3 -6
- 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/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 +6 -0
- 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 +139 -64
- 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 +521 -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 +46 -8
- package/dist/sample/capability.cjs.map +1 -1
- 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/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/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 +1 -0
- package/docs-site/zh/examples/integrations/langgraph.mdx +1 -1
- package/docs-site/zh/explanation/assert.mdx +6 -6
- package/docs-site/zh/explanation/drive.mdx +1 -1
- package/docs-site/zh/explanation/evals.mdx +9 -9
- package/docs-site/zh/explanation/experiment.mdx +2 -2
- package/docs-site/zh/explanation/hitl.mdx +3 -3
- 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 +9 -9
- 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 +1 -1
- package/docs-site/zh/reference/official-adapters.mdx +5 -5
- 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 +50 -44
- 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/plugins.mdx +14 -0
- package/docs-site/zh/tutorials/rerun-and-cache.mdx +3 -17
- 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 +27 -8
- package/docs-site/zh/tutorials/write-experiment.mdx +7 -5
- package/docs-site/zh/tutorials/write-send.mdx +2 -2
- package/package.json +9 -5
- package/dist/report/built-in/overview.cjs +0 -45
- 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
|
@@ -47,8 +47,7 @@ function panelCapabilityForFeedback(io) {
|
|
|
47
47
|
const HUMAN_FAILURE_CAP = 10;
|
|
48
48
|
/** live 面板 FAILURES 分节滚动保留的条数(见 cli.md「运行中的 live 面板」)。 */
|
|
49
49
|
const LIVE_FAILURES_VISIBLE = 5;
|
|
50
|
-
/**
|
|
51
|
-
* `+K more kinds — niceeval view` 尾行(见 cli.md「人看的结束反馈」)。 */
|
|
50
|
+
/** 结束反馈中断言失败形态的展开上限;execution error 必须逐条保留自己的 message,不受此上限折叠。 */
|
|
52
51
|
const FAILURE_GROUPS_CAP = 10;
|
|
53
52
|
/** 非 TTY / `--json` 没有可依赖的终端宽度,失败单行投影用固定预算(见
|
|
54
53
|
* docs/feature/assertions/library/display.md「一条摘要怎样排版」)。 */
|
|
@@ -59,6 +58,7 @@ const NON_TTY_HEARTBEAT_IDLE_MS = 30000;
|
|
|
59
58
|
* 这里只需要给「下一帧」留出一行余地,不需要额外的表头/尾行预留)。 */
|
|
60
59
|
const DASHBOARD_ROW_RESERVE = 1;
|
|
61
60
|
const HUMAN_RESULTS_EXPERIMENT_CAP = 5;
|
|
61
|
+
const HUMAN_ERROR_TEXT_MAX_BYTES = 240;
|
|
62
62
|
function freshHumanResult(result) {
|
|
63
63
|
const score = result.scoreResult;
|
|
64
64
|
const scoreState = score === undefined
|
|
@@ -145,14 +145,21 @@ function buildResultsPanelRows(items) {
|
|
|
145
145
|
}
|
|
146
146
|
return rows;
|
|
147
147
|
}
|
|
148
|
-
function buildPreAttemptErrorRows(results) {
|
|
148
|
+
function buildPreAttemptErrorRows(results, runIdsByExperiment, panel) {
|
|
149
149
|
const errored = results.filter((result) => result.verdict === "errored" && result.locator === undefined && result.error !== undefined);
|
|
150
150
|
if (errored.length === 0)
|
|
151
151
|
return undefined;
|
|
152
152
|
const groups = new Map();
|
|
153
153
|
for (const result of errored) {
|
|
154
154
|
const error = result.error;
|
|
155
|
-
const
|
|
155
|
+
const runId = result.experimentId === undefined
|
|
156
|
+
? undefined
|
|
157
|
+
: runIdsByExperiment.get(result.experimentId);
|
|
158
|
+
// Run timing node IDs are local identities. The same `n1` in another Run
|
|
159
|
+
// names a different physical failure and must not absorb its message.
|
|
160
|
+
const failureId = error.origin.scope === "run"
|
|
161
|
+
? `${runId ?? result.experimentId ?? "default"}\u0000${error.origin.timingNodeId}`
|
|
162
|
+
: `${result.experimentId ?? "default"}\u0000${error.code}:${error.message}`;
|
|
156
163
|
const members = groups.get(failureId);
|
|
157
164
|
if (members)
|
|
158
165
|
members.push(result);
|
|
@@ -160,28 +167,34 @@ function buildPreAttemptErrorRows(results) {
|
|
|
160
167
|
groups.set(failureId, [result]);
|
|
161
168
|
}
|
|
162
169
|
const rows = [];
|
|
163
|
-
|
|
170
|
+
const contentWidth = (0, panel_ts_1.panelContentWidth)(panel.width, panel.mode);
|
|
171
|
+
for (const members of groups.values()) {
|
|
164
172
|
const representative = members[0];
|
|
165
173
|
const error = representative.error;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
rows.push({
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const text = line.trimEnd();
|
|
176
|
-
if (text.length > 0)
|
|
177
|
-
rows.push({ kind: "line", text: ` ${text}` });
|
|
178
|
-
}
|
|
179
|
-
if (errorCode === "ERR_PNPM_IGNORED_BUILDS") {
|
|
180
|
-
rows.push({ kind: "line", text: " fix: Review these dependencies and configure pnpm allowBuilds." });
|
|
181
|
-
}
|
|
174
|
+
rows.push({
|
|
175
|
+
kind: "line",
|
|
176
|
+
text: `${FAILURE_SYMBOL} ${representative.experimentId ?? "default"} · ${preAttemptErrorTitle(error.origin)}`,
|
|
177
|
+
});
|
|
178
|
+
rows.push({
|
|
179
|
+
kind: "line",
|
|
180
|
+
text: ` affected: ${members.map((member) => `${member.experimentId ?? "default"}/${member.id}`).join(", ")}`,
|
|
181
|
+
});
|
|
182
|
+
rows.push(...labelledWrappedRows("error", boundedHumanError(error.message), contentWidth));
|
|
182
183
|
}
|
|
183
184
|
return { rows, slots: errored.length };
|
|
184
185
|
}
|
|
186
|
+
function preAttemptErrorTitle(origin) {
|
|
187
|
+
if (origin.scope === "run")
|
|
188
|
+
return "Sandbox image build failed";
|
|
189
|
+
const phase = origin.phase;
|
|
190
|
+
switch (phase) {
|
|
191
|
+
case "judge.precheck": return "Judge precheck failed";
|
|
192
|
+
case "experiment.setup": return "Experiment setup failed";
|
|
193
|
+
case "sandbox.queue": return "Sandbox queue failed";
|
|
194
|
+
case "sandbox.create": return "Sandbox provisioning failed";
|
|
195
|
+
default: return `${phaseLabel(phase)} failed`;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
185
198
|
/** 按 `io.stderr.isTTY` 派发:构造时选一次,运行期不再切换。 */
|
|
186
199
|
function createHumanRenderer(options) {
|
|
187
200
|
const { io, command } = options;
|
|
@@ -305,7 +318,7 @@ function renderDurableLines(event, state, panel) {
|
|
|
305
318
|
case "summary":
|
|
306
319
|
return buildSummaryLines(event, state, panel);
|
|
307
320
|
case "receipt":
|
|
308
|
-
return buildReceiptLines(event, panel);
|
|
321
|
+
return buildReceiptLines(event, state, panel);
|
|
309
322
|
default: {
|
|
310
323
|
// 穷尽性检查:新增 DurableFeedbackEvent 变体时这里编译期报错提醒补上对应分支。
|
|
311
324
|
const exhaustive = event;
|
|
@@ -381,20 +394,9 @@ function buildFailureFactLine(failure, maxWidth) {
|
|
|
381
394
|
const budget = Math.max(0, maxWidth - (0, text_layout_ts_1.stringWidth)(prefix));
|
|
382
395
|
const info = failure.fact
|
|
383
396
|
? (0, display_ts_1.fitCompactAssertionSummary)(failure.fact, budget)
|
|
384
|
-
:
|
|
397
|
+
: `error: ${boundedHumanError(failure.reason)}`;
|
|
385
398
|
return prefix + clipDisplayWidth(info, budget);
|
|
386
399
|
}
|
|
387
|
-
/**
|
|
388
|
-
* errored 且没有主 Fact 摘要(真正的结构化执行错误)时的信息段:
|
|
389
|
-
* `errored · <phase> · <code>`,余量够再接 `: <message>`。`phase`/`code` 用未翻译的原始字面量
|
|
390
|
-
* (`LifecyclePhase` 枚举值 / `AttemptError.code`),不走 `phaseLabel()` 的人读短语 —— 这一段
|
|
391
|
-
* 是给读者对照 `--json` `error` 事件、`result.json` 与 `show` 里同一个字面量用的,不是散文。
|
|
392
|
-
*/
|
|
393
|
-
function buildErroredInfo(phase, code, reason) {
|
|
394
|
-
const parts = ["errored", ...(phase ? [phase] : []), ...(code ? [code] : [])];
|
|
395
|
-
const base = parts.join(" · ");
|
|
396
|
-
return reason ? `${base}: ${reason}` : base;
|
|
397
|
-
}
|
|
398
400
|
/** 按显示列硬夹紧,超宽尾部截断补 `…`。`fitCompactAssertionSummary` 的截断口径是字符数,不是
|
|
399
401
|
* 显示列(见该函数注释「显示宽度的精确裁剪仍归渲染面」);这里补上那道显示宽度的硬夹紧,
|
|
400
402
|
* 堵住 CJK 内容"按字符数收口仍超显示列"的缝,保证渲染行恒不超过预算。 */
|
|
@@ -423,6 +425,11 @@ function buildDiagnosticLines(event, state) {
|
|
|
423
425
|
// 跨用例撞上同一类状况时,读者需要的是「这类事发生了 N 次」,不是 N 段几乎相同的文字;
|
|
424
426
|
// 逐 code 的次数与首条 message 由结束反馈的 WARNINGS / RECOVERY 面板汇总。
|
|
425
427
|
const code = event.code ?? event.key;
|
|
428
|
+
// Judge precheck already has a live lifecycle row and a terminal pre-Attempt
|
|
429
|
+
// error block. Repeating its machine code in Human output adds no fact and
|
|
430
|
+
// exposes machine vocabulary in the default profile.
|
|
431
|
+
if (code === "judge-precheck-failed")
|
|
432
|
+
return [];
|
|
426
433
|
const firstForCode = state.diagnostics.find((d) => (d.code ?? d.key) === code);
|
|
427
434
|
const count = state.diagnostics.find((d) => d.key === event.key)?.count ?? 1;
|
|
428
435
|
if (count > 1 || firstForCode?.key !== event.key)
|
|
@@ -511,11 +518,11 @@ function buildSummaryLines(event, state, panel) {
|
|
|
511
518
|
mode: panel.mode,
|
|
512
519
|
}));
|
|
513
520
|
}
|
|
514
|
-
const preAttemptErrors = buildPreAttemptErrorRows(summary.results);
|
|
521
|
+
const preAttemptErrors = buildPreAttemptErrorRows(summary.results, state.runIdsByExperiment, panel);
|
|
515
522
|
if (preAttemptErrors !== undefined) {
|
|
516
523
|
blocks.push((0, panel_ts_1.renderPanel)({
|
|
517
524
|
title: (0, index_ts_1.t)("feedback.human.errorsHeader"),
|
|
518
|
-
meta: `${preAttemptErrors.slots} slots`,
|
|
525
|
+
meta: `${preAttemptErrors.slots} attempt${preAttemptErrors.slots === 1 ? "" : "s"} not started`,
|
|
519
526
|
rows: preAttemptErrors.rows,
|
|
520
527
|
width: panel.width,
|
|
521
528
|
mode: panel.mode,
|
|
@@ -554,7 +561,10 @@ function buildSummaryLines(event, state, panel) {
|
|
|
554
561
|
// `WARNINGS`(有诊断才出现,位于 FAILURES 与 NEXT 之间,见 cli.md「人看的结束反馈」):
|
|
555
562
|
// 按 code 汇总本次去重后的诊断,运行中同 code 只完整打印过第一条,这里是「这类事一共
|
|
556
563
|
// 发生了几次」的权威答案。
|
|
557
|
-
const
|
|
564
|
+
const preAttemptCodes = new Set(summary.results.flatMap((result) => result.verdict === "errored" && result.locator === undefined && result.error !== undefined
|
|
565
|
+
? [result.error.code]
|
|
566
|
+
: []));
|
|
567
|
+
const warningsRows = buildWarningsPanelRows(state.diagnostics.filter((diagnostic) => diagnostic.severity !== "error" || !preAttemptCodes.has(diagnostic.code ?? diagnostic.key)));
|
|
558
568
|
if (warningsRows) {
|
|
559
569
|
blocks.push((0, panel_ts_1.renderPanel)({ title: (0, index_ts_1.t)("feedback.human.warningsHeader"), rows: warningsRows, width: panel.width, mode: panel.mode }));
|
|
560
570
|
}
|
|
@@ -574,7 +584,14 @@ function buildSummaryLines(event, state, panel) {
|
|
|
574
584
|
function buildFailuresPanelRows(failures, panel) {
|
|
575
585
|
const groups = groupFailuresByShape(failures);
|
|
576
586
|
const contentWidth = (0, panel_ts_1.panelContentWidth)(panel.width, panel.mode);
|
|
577
|
-
|
|
587
|
+
let shownAssertionKinds = 0;
|
|
588
|
+
const shown = groups.filter((group) => {
|
|
589
|
+
if (group.representative.fact === undefined)
|
|
590
|
+
return true;
|
|
591
|
+
shownAssertionKinds += 1;
|
|
592
|
+
return shownAssertionKinds <= FAILURE_GROUPS_CAP;
|
|
593
|
+
});
|
|
594
|
+
const omitted = groups.length - shown.length;
|
|
578
595
|
const multi = shown.filter((g) => g.size > 1);
|
|
579
596
|
const countWidth = Math.max(0, ...multi.map((g) => (0, text_layout_ts_1.stringWidth)(`${FAILURE_SYMBOL} ×${g.size}`)));
|
|
580
597
|
const rows = [];
|
|
@@ -586,10 +603,10 @@ function buildFailuresPanelRows(failures, panel) {
|
|
|
586
603
|
rows.push(buildMultiFailureGroupRow(group, countWidth));
|
|
587
604
|
}
|
|
588
605
|
}
|
|
589
|
-
if (
|
|
606
|
+
if (omitted > 0) {
|
|
590
607
|
rows.push({
|
|
591
608
|
kind: "line",
|
|
592
|
-
text: (0, index_ts_1.t)("feedback.human.moreFailureKinds", { count:
|
|
609
|
+
text: (0, index_ts_1.t)("feedback.human.moreFailureKinds", { count: omitted }),
|
|
593
610
|
});
|
|
594
611
|
}
|
|
595
612
|
return { rows, meta: (0, index_ts_1.t)("feedback.human.failuresTotalKinds", { total: failures.length, kinds: groups.length }) };
|
|
@@ -610,18 +627,14 @@ function groupFailuresByShape(failures) {
|
|
|
610
627
|
.map(([key, g]) => ({ key, ...g }))
|
|
611
628
|
.sort((a, b) => b.size - a.size);
|
|
612
629
|
}
|
|
613
|
-
/**
|
|
614
|
-
*
|
|
615
|
-
* 结构化执行错误)按 `phase · code` 分组,摘要文本复用 `buildErroredInfo`(不带 message)。 */
|
|
630
|
+
/** 断言按稳定形态聚合;execution error 的 key 包含 locator,确保不同 Attempt 不会因共享
|
|
631
|
+
* phase/code 而吞掉各自的 Provider message。 */
|
|
616
632
|
function failureShapeOf(failure) {
|
|
617
633
|
if (failure.fact) {
|
|
618
634
|
const shapeText = (0, display_ts_1.compactAssertionSummary)({ ...failure.fact, received: undefined, additionalFailures: 0 });
|
|
619
635
|
return { key: `fact\u0000${failure.fact.title}\u0000${failure.fact.matcher ?? ""}`, shapeText };
|
|
620
636
|
}
|
|
621
|
-
return {
|
|
622
|
-
key: `errored\u0000${failure.phase ?? "?"}\u0000${failure.code ?? "?"}`,
|
|
623
|
-
shapeText: buildErroredInfo(failure.phase, failure.code, ""),
|
|
624
|
-
};
|
|
637
|
+
return { key: `errored\u0000${failure.locator}`, shapeText: "error" };
|
|
625
638
|
}
|
|
626
639
|
function buildMultiFailureGroupRow(group, countWidth) {
|
|
627
640
|
const countToken = (0, text_layout_ts_1.padStartDisplay)(`${FAILURE_SYMBOL} ×${group.size}`, countWidth);
|
|
@@ -636,13 +649,15 @@ function buildSingleFailureGroupRows(failure, contentWidth) {
|
|
|
636
649
|
const identityLine = `${FAILURE_SYMBOL} ${failure.locator} ${failure.identity.evalId} [${failure.who}]`;
|
|
637
650
|
const indent = (0, text_layout_ts_1.stringWidth)(`${FAILURE_SYMBOL} `);
|
|
638
651
|
const budget = Math.max(0, contentWidth - indent);
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
:
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
652
|
+
const rows = [{ kind: "line", text: identityLine }];
|
|
653
|
+
if (failure.fact) {
|
|
654
|
+
rows.push({ kind: "line", text: `${" ".repeat(indent)}${clipDisplayWidth((0, display_ts_1.fitCompactAssertionSummary)(failure.fact, budget), budget)}` });
|
|
655
|
+
}
|
|
656
|
+
else {
|
|
657
|
+
rows.push(...labelledWrappedRows("error", boundedHumanError(failure.reason), contentWidth));
|
|
658
|
+
}
|
|
659
|
+
rows.push(...labelledWrappedRows("details", `niceeval show ${failure.locator}`, contentWidth));
|
|
660
|
+
return rows;
|
|
646
661
|
}
|
|
647
662
|
/** `WARNINGS` 面板:`state.diagnostics` 已经按去重 key 折叠,这里再按对外稳定词法 `code` 二次
|
|
648
663
|
* 聚合。info 由自己的完成面板消费;没有 warning/error 时返回 undefined。 */
|
|
@@ -672,38 +687,98 @@ function buildWarningsPanelRows(diagnostics) {
|
|
|
672
687
|
}));
|
|
673
688
|
}
|
|
674
689
|
function buildRecoveryPanelRows(diagnostics) {
|
|
675
|
-
let slots = 0;
|
|
676
690
|
let locks = 0;
|
|
677
691
|
for (const d of diagnostics) {
|
|
678
692
|
if (d.severity !== "info" || d.code !== types_ts_1.COORDINATION_RECOVERED_CODE)
|
|
679
693
|
continue;
|
|
680
|
-
if (d.data?.resource === "concurrency-slot")
|
|
681
|
-
slots += d.count;
|
|
682
694
|
if (d.data?.resource === "case-lock")
|
|
683
695
|
locks += d.count;
|
|
684
696
|
}
|
|
685
|
-
if (
|
|
697
|
+
if (locks === 0)
|
|
686
698
|
return undefined;
|
|
687
|
-
const summary = (
|
|
688
|
-
slots: pluralUnit(slots, "feedback.human.unit.concurrencySlot", "feedback.human.unit.concurrencySlots"),
|
|
689
|
-
locks: pluralUnit(locks, "feedback.human.unit.caseLock", "feedback.human.unit.caseLocks"),
|
|
690
|
-
});
|
|
699
|
+
const summary = pluralUnit(locks, "feedback.human.unit.caseLock", "feedback.human.unit.caseLocks");
|
|
691
700
|
return [{ kind: "line", text: `i ${types_ts_1.COORDINATION_RECOVERED_CODE} ${summary}` }];
|
|
692
701
|
}
|
|
693
702
|
function warningCodeLabel(code, count) {
|
|
694
703
|
return count > 1 ? `${code} ×${count}` : code;
|
|
695
704
|
}
|
|
696
705
|
/** `NEXT` 面板只由 receipt 的真实 Run ID 给出 Record 读取命令。 */
|
|
697
|
-
function buildReceiptLines(event, panel) {
|
|
706
|
+
function buildReceiptLines(event, state, panel) {
|
|
698
707
|
const rows = [];
|
|
708
|
+
const published = new Set(event.receipt.runIds);
|
|
709
|
+
const emitted = new Set();
|
|
710
|
+
for (const [experimentId, runId] of state.runIdsByExperiment) {
|
|
711
|
+
if (!published.has(runId))
|
|
712
|
+
continue;
|
|
713
|
+
rows.push({ kind: "line", text: experimentId });
|
|
714
|
+
rows.push(...labelledWrappedRows("details", `niceeval show --run ${runId}`, (0, panel_ts_1.panelContentWidth)(panel.width, panel.mode)));
|
|
715
|
+
emitted.add(runId);
|
|
716
|
+
}
|
|
699
717
|
for (const runId of event.receipt.runIds) {
|
|
700
|
-
|
|
718
|
+
if (!emitted.has(runId))
|
|
719
|
+
rows.push({ kind: "line", text: `details: niceeval show --run ${runId}` });
|
|
701
720
|
}
|
|
702
721
|
if (rows.length === 0) {
|
|
703
722
|
rows.push({ kind: "line", text: "No published Record Runs are available for this invocation." });
|
|
704
723
|
}
|
|
705
724
|
return (0, panel_ts_1.renderPanel)({ title: (0, index_ts_1.t)("feedback.human.nextHeader"), rows, width: panel.width, mode: panel.mode });
|
|
706
725
|
}
|
|
726
|
+
function boundedHumanError(message) {
|
|
727
|
+
const safe = (0, display_ts_1.stripControl)(message).replace(/\s+/gu, " ").trim();
|
|
728
|
+
const signalIndexes = [
|
|
729
|
+
safe.search(/\b[1-5]\d{2}\s+[A-Z][A-Za-z -]{2,40}(?:\s+[—·:-]\s+[A-Z][A-Z0-9_-]+)?/u),
|
|
730
|
+
safe.search(/\b[A-Z][A-Z0-9]+(?:_[A-Z0-9]+){1,}\b/u),
|
|
731
|
+
].filter((index) => index >= 0);
|
|
732
|
+
// Wrappers often prepend a long command or transport path before the
|
|
733
|
+
// Provider's safe status/code. Focus the Human budget at that first stable
|
|
734
|
+
// signal; the full structured error remains available through details.
|
|
735
|
+
const focused = signalIndexes.length === 0 ? safe : safe.slice(Math.min(...signalIndexes));
|
|
736
|
+
if (utf8Bytes(focused) <= HUMAN_ERROR_TEXT_MAX_BYTES)
|
|
737
|
+
return focused;
|
|
738
|
+
const separator = " … ";
|
|
739
|
+
const available = HUMAN_ERROR_TEXT_MAX_BYTES - utf8Bytes(separator);
|
|
740
|
+
const head = Math.ceil(available / 2);
|
|
741
|
+
const tail = available - head;
|
|
742
|
+
return `${utf8Prefix(focused, head)}${separator}${utf8Suffix(focused, tail)}`;
|
|
743
|
+
}
|
|
744
|
+
function utf8Bytes(value) {
|
|
745
|
+
return new TextEncoder().encode(value).byteLength;
|
|
746
|
+
}
|
|
747
|
+
function utf8Prefix(value, maximumBytes) {
|
|
748
|
+
let bytes = 0;
|
|
749
|
+
let result = "";
|
|
750
|
+
for (const character of value) {
|
|
751
|
+
const nextBytes = utf8Bytes(character);
|
|
752
|
+
if (bytes + nextBytes > maximumBytes)
|
|
753
|
+
break;
|
|
754
|
+
result += character;
|
|
755
|
+
bytes += nextBytes;
|
|
756
|
+
}
|
|
757
|
+
return result;
|
|
758
|
+
}
|
|
759
|
+
function utf8Suffix(value, maximumBytes) {
|
|
760
|
+
let bytes = 0;
|
|
761
|
+
const result = [];
|
|
762
|
+
const characters = Array.from(value);
|
|
763
|
+
for (let index = characters.length - 1; index >= 0; index -= 1) {
|
|
764
|
+
const character = characters[index];
|
|
765
|
+
const nextBytes = utf8Bytes(character);
|
|
766
|
+
if (bytes + nextBytes > maximumBytes)
|
|
767
|
+
break;
|
|
768
|
+
result.push(character);
|
|
769
|
+
bytes += nextBytes;
|
|
770
|
+
}
|
|
771
|
+
return result.reverse().join("");
|
|
772
|
+
}
|
|
773
|
+
function labelledWrappedRows(label, text, contentWidth) {
|
|
774
|
+
const prefix = ` ${label}: `;
|
|
775
|
+
const continuation = " ".repeat((0, text_layout_ts_1.stringWidth)(prefix));
|
|
776
|
+
const lines = (0, text_layout_ts_1.wrapDisplay)(text, Math.max(4, contentWidth - (0, text_layout_ts_1.stringWidth)(prefix)));
|
|
777
|
+
return lines.map((line, index) => ({
|
|
778
|
+
kind: "line",
|
|
779
|
+
text: `${index === 0 ? prefix : continuation}${line}`,
|
|
780
|
+
}));
|
|
781
|
+
}
|
|
707
782
|
/** estimated cost 展示:金额前加 `~`,明确是价目表估算(observed 只留在 result.usage.costUSD)。 */
|
|
708
783
|
function formatEstimatedCost(value) {
|
|
709
784
|
const cost = (0, format_ts_1.formatCost)(value);
|