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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.js","sourceRoot":"","sources":["machine.ts"],"names":[],"mappings":";;;AAsMA,wDAqCC;AAED,wDAEC;AAED,0DA2BC;AAuID,wEAYC;AAED,gEAMC;AAED,wEAWC;AAED,gEAOC;AAKD,wDAwBC;AAED,kDA4BC;AAMD,sEA4CC;AAED,oDAEC;AAED,4CAEC;AAKD,0DAEC;AAzjBD,mCAAgC;AAGhC,oDAAqF;AAErF,kEAA8E;AAC9E,gDAAsD;AAGtD,gEAAgE;AACnD,QAAA,oBAAoB,GAAG,kBAAkB,CAAC;AAC1C,QAAA,8BAA8B,GAAG,qCAAqC,CAAC;AACvE,QAAA,yBAAyB,GAAG,gCAAgC,CAAC;AAoL1E;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,KAGtC;IACG,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,KAAK,IAAI;QAChD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,GAAG,EAAU,CAAC,C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AC;AACjF,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type { JsonValue, Sample, } from \"../../analysis/contracts.ts\";\nimport { isCostProjectionValue, type PricingProfile, } from \"../../analysis/cost.ts\";\nimport type { LocalizedText } from \"../../shared/types.ts\";\nimport { compareUtf8, type ResolvedPage, } from \"../runtime/resolved-page.ts\";\nimport { resolvedPageText } from \"../runtime/text.ts\";\n/** Content-addressed identities are opaque, printable strings at this boundary. */\nexport type ContentAddress = string;\n/** The exact machine schemas in docs/feature/reports/cli.md. */\nexport const BUILT_IN_SHOW_SCHEMA = \"niceeval.show/v1\";\nexport const CUSTOM_TARGET_EXECUTION_SCHEMA = \"niceeval.report-target-execution/v1\";\nexport const REPORT_PROJECTIONS_SCHEMA = \"niceeval.report-projections/v1\";\nexport type BuiltInReportToken = string;\nexport type ShowSelection = {\n readonly kind: \"project-current\";\n readonly sampleIdentity: ContentAddress;\n readonly experimentIds: readonly string[];\n} | {\n readonly kind: \"explicit-runs\";\n readonly sampleIdentity: ContentAddress;\n readonly runIds: readonly string[];\n} | {\n readonly kind: \"attempt-locator\";\n readonly sampleIdentity: ContentAddress;\n readonly locator: string;\n};\n/**\n * Host-owned problems expose canonical ordering inputs. Their exact detailed\n * shape remains Host-owned; no callback, Error, Cause, or reader is allowed.\n */\nexport interface ReportProblem {\n readonly code: string;\n readonly path: readonly string[];\n readonly refs: readonly string[];\n readonly summary?: string;\n}\n/**\n * Built-ins may emit only their declared domain families. This is intentionally\n * not a generic component/HTML/text reverse-engineering format.\n */\nexport type BuiltInShowData = {\n readonly kind: \"leaderboard\";\n readonly rows: JsonValue;\n} | {\n readonly kind: \"attempt\";\n readonly evidence: JsonValue;\n readonly observability: JsonValue;\n readonly fileChanges: JsonValue;\n} | {\n readonly kind: \"source\";\n readonly sources: JsonValue;\n} | {\n readonly kind: \"execution\";\n readonly execution: JsonValue;\n} | {\n readonly kind: \"timing\";\n readonly timing: JsonValue;\n};\nexport interface BuiltInShowDocument {\n readonly schema: typeof BUILT_IN_SHOW_SCHEMA;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/**\n * The custom schema is a single target execution manifest, never a revision.\n * It contains only the selected Page's closed English text—not a React tree,\n * HTML body, site identity, Sample capability, Record payload, or raw bytes.\n */\nexport interface CustomTargetExecutionManifest {\n readonly schema: typeof CUSTOM_TARGET_EXECUTION_SCHEMA;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n readonly renderedText: string;\n };\n readonly downloads: readonly {\n readonly path: string;\n readonly mediaType: string;\n readonly bytes: number;\n }[];\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/** One captured cost projection bound to the Page execution that requested it. */\nexport interface ReportProjectionCost {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, JsonValue>>;\n };\n readonly profileIdentity: string;\n /** Analysis-owned closed projection; Report never rebuilds it from `value`. */\n readonly projection: JsonValue;\n}\n/**\n * The top-level projections object shared verbatim by the built-in show\n * document and the custom target-execution manifest, and written as the site\n * revision's `_niceeval/data/projections.json`. `pricingProfile` is the\n * closed JSON form of the Report's PricingProfile, or null when the Report\n * declares none. `costs` is canonical: route → pageId → measureId → row.key\n * → profileIdentity. A projection may appear on distinct Pages; distinct\n * dimensions or projections at one canonical capture key are a build failure.\n */\nexport interface ReportProjections {\n readonly schema: typeof REPORT_PROJECTIONS_SCHEMA;\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCost[];\n}\nexport interface ReportProjectionCostInput {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, unknown>>;\n };\n readonly profileIdentity: string;\n readonly projection: unknown;\n}\n/** A same-key, different row-content failure that a Host can surface directly. */\nexport interface ReportProjectionConflict {\n readonly code: \"report-cost-projection-conflict\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Capture and projection must name the same Analysis-owned PricingProfile. */\nexport interface ReportProjectionProfileIdentityMismatch {\n readonly code: \"report-cost-projection-profile-identity-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly projectionProfileIdentity: string | null;\n}\n/** A cost capture cannot exist when the Report declares no PricingProfile. */\nexport interface ReportProjectionReportPricingMissing {\n readonly code: \"report-cost-projection-report-pricing-missing\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Every captured cost must use the exact Profile declared by the Report. */\nexport interface ReportProjectionReportPricingMismatch {\n readonly code: \"report-cost-projection-report-pricing-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly reportPricingProfileIdentity: string;\n}\nexport type ReportProjectionBuildFailure = ReportProjectionConflict | ReportProjectionProfileIdentityMismatch | ReportProjectionReportPricingMissing | ReportProjectionReportPricingMismatch;\n/**\n * Closes, deduplicates, and canonically sorts captured projection entries.\n * Two identical entries at one canonical capture key collapse. Different\n * Page bindings deliberately do not collide; distinct dimensions at one key\n * do, because they represent distinct captured rows.\n */\nexport function buildReportProjections(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjections {\n const pricingProfile = input.pricingProfile === null\n ? null\n : closeJson(input.pricingProfile, new Set<object>());\n const failure = reportProjectionFailure({ pricingProfile, costs: input.costs });\n if (failure !== undefined)\n throw failure;\n const byKey = new Map<string, {\n readonly cost: ReportProjectionCost;\n readonly content: string;\n }>();\n for (const entry of input.costs) {\n const cost = closeProjectionCost(entry);\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const existing = byKey.get(key);\n if (existing === undefined) {\n byKey.set(key, Object.freeze({ cost, content }));\n continue;\n }\n if (existing.content !== content) {\n throw projectionConflict(cost);\n }\n }\n const costs = Object.freeze([...byKey.values()].map((entry) => entry.cost).sort((left, right) => compareUtf8(left.page.route, right.page.route) ||\n compareUtf8(left.page.pageId, right.page.pageId) ||\n compareUtf8(left.measureId, right.measureId) ||\n compareUtf8(left.row.key, right.row.key) ||\n compareUtf8(left.profileIdentity, right.profileIdentity)));\n return Object.freeze({\n schema: REPORT_PROJECTIONS_SCHEMA,\n pricingProfile,\n costs,\n });\n}\n/** The empty projections for a Page or site that captured no cost values. */\nexport function emptyReportProjections(pricingProfile: JsonValue | null): ReportProjections {\n return buildReportProjections({ pricingProfile, costs: [] });\n}\n/** Validates Report Profile binding and same-key row-content identity. */\nexport function reportProjectionFailure(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjectionBuildFailure | undefined {\n const reportPricingProfileIdentity = pricingProfileIdentity(input.pricingProfile);\n const byKey = new Map<string, {\n readonly content: string;\n }>();\n for (const inputEntry of input.costs) {\n const cost = closeProjectionCost(inputEntry);\n if (reportPricingProfileIdentity === null)\n return reportPricingMissing(cost);\n const profileIdentity = projectionProfileIdentity(cost.projection);\n if (profileIdentity !== cost.profileIdentity)\n return projectionProfileIdentityMismatch(cost, profileIdentity);\n if (cost.profileIdentity !== reportPricingProfileIdentity) {\n return reportPricingMismatch(cost, reportPricingProfileIdentity);\n }\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const prior = byKey.get(key);\n if (prior !== undefined && prior.content !== content) {\n return projectionConflict(cost);\n }\n byKey.set(key, Object.freeze({ content }));\n }\n return undefined;\n}\nfunction closeProjectionCost(input: ReportProjectionCostInput): ReportProjectionCost {\n const page = input.page;\n const row = input.row;\n if (!isPlainRecord(page) || !isPlainRecord(row)) {\n throw new TypeError(\"projection cost page and row must be plain data objects\");\n }\n // CostProjectionValue has one closed-domain validator in Analysis. This\n // machine boundary deliberately calls it before JSON closing rather than\n // accepting any projection-shaped payload from a capture.\n if (!isCostProjectionValue(input.projection)) {\n throw new TypeError(\"projection cost projection must be an Analysis CostProjectionValue\");\n }\n const dimensions = closeJson(row.dimensions, new Set<object>());\n if (dimensions === null || Array.isArray(dimensions) || typeof dimensions !== \"object\") {\n throw new TypeError(\"projection cost row.dimensions must be a plain data object\");\n }\n return Object.freeze({\n page: Object.freeze({\n pageId: requireNonEmptyString(page.pageId, \"projection cost page.pageId\"),\n route: requireNonEmptyString(page.route, \"projection cost page.route\"),\n }),\n measureId: requireNonEmptyString(input.measureId, \"projection cost measureId\"),\n row: Object.freeze({\n key: requireString(row.key, \"projection cost row.key\"),\n dimensions: dimensions as Readonly<Record<string, JsonValue>>,\n }),\n profileIdentity: requireNonEmptyString(input.profileIdentity, \"projection cost profileIdentity\"),\n projection: closeJson(input.projection, new Set<object>()),\n });\n}\nfunction projectionCostKey(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze([\n cost.page.route,\n cost.page.pageId,\n cost.measureId,\n cost.row.key,\n cost.profileIdentity,\n ]));\n}\n/**\n * Dimensions are retained outside the canonical capture key so they do not\n * affect sort order, but they remain part of the captured row's meaning. Two\n * entries at one key can collapse only when both dimensions and projection\n * are byte-identical canonical JSON.\n */\nfunction projectionCostContent(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze({\n dimensions: cost.row.dimensions,\n projection: cost.projection,\n }));\n}\nfunction projectionConflict(cost: ReportProjectionCost): ReportProjectionConflict {\n return Object.freeze({\n code: \"report-cost-projection-conflict\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction projectionProfileIdentity(value: JsonValue): string | null {\n if (value === null || Array.isArray(value) || typeof value !== \"object\")\n return null;\n const profile = (value as Readonly<Record<string, JsonValue>>).profile;\n if (profile === null || Array.isArray(profile) || typeof profile !== \"object\")\n return null;\n const record = profile as Readonly<Record<string, JsonValue>>;\n return typeof record.contentIdentity === \"string\" && record.contentIdentity.length > 0\n ? record.contentIdentity\n : null;\n}\nfunction pricingProfileIdentity(value: JsonValue | null): string | null {\n if (value === null)\n return null;\n if (!isPlainRecord(value) || typeof value.contentIdentity !== \"string\" || value.contentIdentity.length === 0) {\n throw new TypeError(\"projection pricingProfile must be a closed PricingProfile JSON object\");\n }\n return value.contentIdentity;\n}\nfunction projectionProfileIdentityMismatch(cost: ReportProjectionCost, projectionProfileIdentity: string | null): ReportProjectionProfileIdentityMismatch {\n return Object.freeze({\n code: \"report-cost-projection-profile-identity-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n projectionProfileIdentity,\n });\n}\nfunction reportPricingMissing(cost: ReportProjectionCost): ReportProjectionReportPricingMissing {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-missing\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction reportPricingMismatch(cost: ReportProjectionCost, reportPricingProfileIdentity: string): ReportProjectionReportPricingMismatch {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n reportPricingProfileIdentity,\n });\n}\nconst BUILT_IN_MACHINE_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-descriptor/v2\");\nconst BUILT_IN_MACHINE_REPORT_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-report-descriptor/v2\");\nconst BUILT_IN_MACHINE_DESCRIPTOR_BRAND = \"niceeval.report.built-in-machine-descriptor/v2\";\n/**\n * A descriptor intentionally contains only one versioned producer id. The\n * Symbol.for brand makes that data identity work across duplicate packages.\n */\nexport interface BuiltInMachineDescriptor {\n readonly producerId: string;\n}\nexport interface BuiltInMachineProducerInput {\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}\n/** This callback is held only in a Host registry—not on a descriptor. */\nexport type BuiltInMachineProducer<Error, Requirements> = (input: BuiltInMachineProducerInput) => Effect.Effect<BuiltInShowData, Error, Requirements>;\nexport interface BuiltInMachineRegistry<Error, Requirements> {\n readonly producers: ReadonlyMap<string, BuiltInMachineProducer<Error, Requirements>>;\n}\nexport interface BuiltInMachineProducerMissing {\n readonly code: \"report-built-in-machine-producer-missing\";\n readonly producerId: string;\n}\n/** Defines a data-only descriptor. It has no executable producer field. */\nexport function defineBuiltInMachineDescriptor(producerId: string): BuiltInMachineDescriptor {\n if (!isVersionedProducerId(producerId)) {\n throw new TypeError(\"a built-in machine producer id must end in @v<positive integer>\");\n }\n const descriptor: BuiltInMachineDescriptor = { producerId };\n Object.defineProperty(descriptor, BUILT_IN_MACHINE_DESCRIPTOR, {\n value: BUILT_IN_MACHINE_DESCRIPTOR_BRAND,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return Object.freeze(descriptor);\n}\n/** A duplicate installed package recognizes the same descriptor through Symbol.for. */\nexport function isBuiltInMachineDescriptor(value: unknown): value is BuiltInMachineDescriptor {\n if (!isBuiltInDescriptorRecord(value) || !hasOnlyFields(value, [\"producerId\"]) || !isVersionedProducerId(value.producerId)) {\n return false;\n }\n const brand = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_DESCRIPTOR);\n return brand !== undefined && \"value\" in brand && brand.value === BUILT_IN_MACHINE_DESCRIPTOR_BRAND;\n}\n/** Installs data identity before a built-in definition is frozen; it installs no callback. */\nexport function attachBuiltInMachineDescriptor<Definition extends object>(definition: Definition, descriptor: BuiltInMachineDescriptor): Definition {\n if (!isBuiltInMachineDescriptor(descriptor)) {\n throw new TypeError(\"a built-in Report must use a valid machine descriptor\");\n }\n Object.defineProperty(definition, BUILT_IN_MACHINE_REPORT_DESCRIPTOR, {\n value: descriptor,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return definition;\n}\n/** Reads only the stable data descriptor, never a process-local WeakMap. */\nexport function builtInMachineDescriptorOf(value: unknown): BuiltInMachineDescriptor | undefined {\n if ((typeof value !== \"object\" && typeof value !== \"function\") || value === null)\n return undefined;\n const property = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_REPORT_DESCRIPTOR);\n return property !== undefined && \"value\" in property && isBuiltInMachineDescriptor(property.value)\n ? property.value\n : undefined;\n}\n/**\n * The Host selects the producer from its own registry by producerId. The\n * descriptor is never called and cannot contain a callback to call.\n */\nexport function produceBuiltInShowData<Error, Requirements>(input: {\n readonly registry: BuiltInMachineRegistry<Error, Requirements>;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}): Effect.Effect<BuiltInShowData, Error | BuiltInMachineProducerMissing, Requirements | Scope.Scope> {\n if (!isBuiltInMachineDescriptor(input.descriptor)) {\n throw new TypeError(\"a built-in machine descriptor must be created by defineBuiltInMachineDescriptor\");\n }\n const producer = input.registry.producers.get(input.descriptor.producerId);\n if (producer === undefined) {\n return Effect.fail(Object.freeze({\n code: \"report-built-in-machine-producer-missing\" as const,\n producerId: input.descriptor.producerId,\n }));\n }\n return producer({\n sample: input.sample,\n selection: input.selection,\n route: input.route,\n pageId: input.pageId,\n });\n}\n/** Builds the docs-defined built-in show document from already closed domain data. */\nexport function builtInShowDocument(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): BuiltInShowDocument {\n return Object.freeze({\n schema: BUILT_IN_SHOW_SCHEMA,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n token: requireNonEmptyString(input.report.token, \"report.token\"),\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n }),\n page: freezePage(input.page),\n data: freezeBuiltInData(input.data),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/**\n * Builds the docs-defined custom single-target manifest. `ResolvedPage` has\n * already closed every author callback, so reading its English text performs\n * neither component resolution nor a second Analysis request.\n */\nexport function customTargetExecutionManifest(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: ResolvedPage;\n readonly textWidth: number;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): CustomTargetExecutionManifest {\n if (!isPositiveSafeInteger(input.textWidth)) {\n throw new TypeError(\"custom target execution textWidth must be a positive safe integer\");\n }\n const text = resolvedPageText(input.page, { locale: \"en\", width: input.textWidth, panelMode: \"plain\" });\n if (!(\"state\" in text) || text.state !== \"rendered\") {\n throw new TypeError(\"the selected Page lacks a closed English text projection at the requested width\");\n }\n return Object.freeze({\n schema: CUSTOM_TARGET_EXECUTION_SCHEMA,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n title: freezeLocalizedText(input.report.title, \"report.title\"),\n }),\n page: Object.freeze({\n route: input.page.target.route,\n pageId: input.page.target.pageId,\n title: freezeLocalizedText(input.page.title, \"page.title\"),\n renderedText: text.text,\n }),\n // Assets remain revision payloads. The target-page manifest intentionally\n // exposes only the docs-defined download summaries, never either payload.\n downloads: Object.freeze([...input.page.downloads]\n .map((download) => Object.freeze({\n path: download.path,\n mediaType: download.mediaType,\n bytes: download.byteLength,\n }))\n .sort((left, right) => compareUtf8(left.path, right.path) || compareUtf8(left.mediaType, right.mediaType) || left.bytes - right.bytes)),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/** Canonical UTF-8 JSON for the two show schemas. */\nexport function canonicalMachineJson(value: BuiltInShowDocument | CustomTargetExecutionManifest): string {\n return writeCanonicalJson(closeMachineJson(value));\n}\n/** Strict JSON clone for a Host-owned closed domain value. */\nexport function closeMachineJson(value: unknown): JsonValue {\n return closeJson(value, new Set<object>());\n}\n/**\n * A PricingProfile carries an internal Symbol descriptor for cross-package\n * validation. Machine documents expose only its closed enumerable data form.\n */\nexport function closePricingProfileJson(profile: PricingProfile): JsonValue {\n return closeMachineJson(Object.fromEntries(Object.entries(profile)));\n}\nfunction freezeSelection(value: ShowSelection): ShowSelection {\n const sampleIdentity = requireNonEmptyString(value.sampleIdentity, \"selection.sampleIdentity\");\n switch (value.kind) {\n case \"project-current\":\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity,\n experimentIds: freezeSortedUniqueStrings(value.experimentIds, \"selection.experimentIds\"),\n });\n case \"explicit-runs\":\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity,\n runIds: freezeSortedUniqueStrings(value.runIds, \"selection.runIds\"),\n });\n case \"attempt-locator\":\n return Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity,\n locator: requireNonEmptyString(value.locator, \"selection.locator\"),\n });\n }\n}\nfunction freezePage(value: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n}): {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n} {\n return Object.freeze({\n route: requireNonEmptyString(value.route, \"page.route\"),\n pageId: requireNonEmptyString(value.pageId, \"page.pageId\"),\n title: freezeLocalizedText(value.title, \"page.title\"),\n });\n}\nfunction freezeBuiltInData(value: BuiltInShowData): BuiltInShowData {\n if (!isPlainRecord(value) || typeof value.kind !== \"string\") {\n throw new TypeError(\"built-in show data must be a named domain result\");\n }\n // Domain arrays are deliberately not given a generic renderer sort here.\n // The selected registry producer owns their stable identities and must close\n // them in the canonical order defined for that domain before returning.\n switch (value.kind) {\n case \"leaderboard\":\n assertExactFields(value, [\"kind\", \"rows\"], \"leaderboard show data\");\n return Object.freeze({ kind: \"leaderboard\" as const, rows: closeMachineJson(value.rows) });\n case \"attempt\":\n assertExactFields(value, [\"kind\", \"evidence\", \"observability\", \"fileChanges\"], \"attempt show data\");\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(value.evidence),\n observability: closeMachineJson(value.observability),\n fileChanges: closeMachineJson(value.fileChanges),\n });\n case \"source\":\n assertExactFields(value, [\"kind\", \"sources\"], \"source show data\");\n return Object.freeze({ kind: \"source\" as const, sources: closeMachineJson(value.sources) });\n case \"execution\":\n assertExactFields(value, [\"kind\", \"execution\"], \"execution show data\");\n return Object.freeze({ kind: \"execution\" as const, execution: closeMachineJson(value.execution) });\n case \"timing\":\n assertExactFields(value, [\"kind\", \"timing\"], \"timing show data\");\n return Object.freeze({ kind: \"timing\" as const, timing: closeMachineJson(value.timing) });\n default:\n throw new TypeError(\"built-in show data kind is not declared by the show schema\");\n }\n}\n/** Re-closes a ReportProjections value: validates schema, dedupes, and canonically sorts. */\nfunction freezeProjections(value: ReportProjections): ReportProjections {\n if (!isPlainRecord(value) || value.schema !== REPORT_PROJECTIONS_SCHEMA) {\n throw new TypeError(\"projections must be a niceeval.report-projections/v1 value\");\n }\n return buildReportProjections({\n pricingProfile: value.pricingProfile,\n costs: value.costs.map((entry) => ({\n page: entry.page,\n measureId: entry.measureId,\n row: entry.row,\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n })),\n });\n}\nfunction freezeProblems(value: readonly ReportProblem[]): readonly ReportProblem[] {\n if (!Array.isArray(value))\n throw new TypeError(\"problems must be an array\");\n const entries = value.map((problem, index) => {\n if (!isNonEmptyString(problem.code))\n throw new TypeError(`problems[${index}].code must be a non-empty string`);\n const path = freezeStrings(problem.path, `problems[${index}].path`);\n const refs = freezeSortedUniqueStrings(problem.refs, `problems[${index}].refs`);\n if (problem.summary !== undefined && !isNonEmptyString(problem.summary)) {\n throw new TypeError(`problems[${index}].summary must be a non-empty string when supplied`);\n }\n return Object.freeze({\n code: problem.code,\n path,\n refs,\n ...(problem.summary === undefined ? {} : { summary: problem.summary }),\n });\n });\n return Object.freeze(entries.sort((left, right) => compareUtf8(left.code, right.code) ||\n comparePath(left.path, right.path) ||\n compareStringArrays(left.refs, right.refs) ||\n compareUtf8(left.summary ?? \"\", right.summary ?? \"\")));\n}\nfunction freezeLocalizedText(value: LocalizedText, label: string): LocalizedText {\n if (typeof value === \"string\")\n return value;\n const closed = closeMachineJson(value);\n if (closed === null || Array.isArray(closed) || typeof closed !== \"object\") {\n throw new TypeError(`${label} must be a string or locale map`);\n }\n const entries = Object.entries(closed);\n if (entries.length === 0 || entries.some(([locale, text]) => !isNonEmptyString(locale) || typeof text !== \"string\")) {\n throw new TypeError(`${label} must be a non-empty locale map of strings`);\n }\n const result: Record<string, string> = Object.create(null) as Record<string, string>;\n for (const [locale, text] of entries) {\n // The validation above proves this is a locale-string pair.\n result[locale] = text as string;\n }\n return Object.freeze(result);\n}\nfunction freezeStrings(value: readonly string[], label: string): readonly string[] {\n if (!Array.isArray(value) || value.some((entry) => !isNonEmptyString(entry))) {\n throw new TypeError(`${label} must be an array of non-empty strings`);\n }\n return Object.freeze([...value]);\n}\nfunction freezeSortedUniqueStrings(value: readonly string[], label: string): readonly string[] {\n const entries = freezeStrings(value, label);\n return Object.freeze([...new Set(entries)].sort(compareUtf8));\n}\nfunction comparePath(left: readonly string[], right: readonly string[]): number {\n const length = Math.min(left.length, right.length);\n for (let index = 0; index < length; index += 1) {\n const difference = compareUtf8(left[index]!, right[index]!);\n if (difference !== 0)\n return difference;\n }\n return left.length - right.length;\n}\nfunction compareStringArrays(left: readonly string[], right: readonly string[]): number {\n return comparePath(left, right);\n}\nfunction closeJson(value: unknown, active: Set<object>): JsonValue {\n if (value === null || typeof value === \"boolean\" || typeof value === \"string\")\n return value;\n if (typeof value === \"number\") {\n if (!Number.isFinite(value))\n throw new TypeError(\"machine JSON cannot contain a non-finite number\");\n return Object.is(value, -0) ? 0 : value;\n }\n if (typeof value === \"undefined\" || typeof value === \"bigint\" || typeof value === \"symbol\" || typeof value === \"function\") {\n throw new TypeError(\"machine JSON must be data only\");\n }\n if (active.has(value))\n throw new TypeError(\"machine JSON cannot contain a cycle\");\n active.add(value);\n try {\n if (Array.isArray(value))\n return Object.freeze(value.map((entry) => closeJson(entry, active)));\n if (!isPlainRecord(value))\n throw new TypeError(\"machine JSON must use plain data objects\");\n const copy: Record<string, JsonValue> = Object.create(null) as Record<string, JsonValue>;\n for (const key of Object.keys(value).sort(compareUtf8))\n copy[key] = closeJson(value[key], active);\n return Object.freeze(copy);\n }\n finally {\n active.delete(value);\n }\n}\nfunction writeCanonicalJson(value: JsonValue): string {\n if (value === null)\n return \"null\";\n switch (typeof value) {\n case \"boolean\":\n return value ? \"true\" : \"false\";\n case \"number\":\n return JSON.stringify(value);\n case \"string\":\n return JSON.stringify(value);\n case \"object\":\n break;\n }\n if (Array.isArray(value))\n return `[${value.map(writeCanonicalJson).join(\",\")}]`;\n const record = value as Readonly<Record<string, JsonValue>>;\n const keys = Object.keys(record).sort(compareUtf8);\n return `{${keys.map((key) => `${JSON.stringify(key)}:${writeCanonicalJson(record[key]!)}`).join(\",\")}}`;\n}\nfunction isPlainRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null)\n return false;\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key !== \"string\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !descriptor.enumerable || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\n/** The descriptor alone is allowed its one non-enumerable Symbol.for brand. */\nfunction isBuiltInDescriptorRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null)\n return false;\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key === \"symbol\" && key !== BUILT_IN_MACHINE_DESCRIPTOR)\n return false;\n if (typeof key !== \"string\" && typeof key !== \"symbol\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\nfunction hasOnlyFields(value: Readonly<Record<string, unknown>>, keys: readonly string[]): boolean {\n const actual = Object.getOwnPropertyNames(value);\n return actual.length === keys.length && keys.every((key) => Object.hasOwn(value, key));\n}\nfunction assertExactFields(value: Readonly<Record<string, unknown>>, keys: readonly string[], label: string): void {\n if (!hasOnlyFields(value, keys))\n throw new TypeError(`${label} has an invalid field set`);\n}\nfunction isVersionedProducerId(value: unknown): value is string {\n return typeof value === \"string\" && /^[^\\s@][^\\s]*@v[1-9][0-9]*$/u.test(value);\n}\nfunction requireNonEmptyString(value: unknown, label: string): string {\n if (!isNonEmptyString(value))\n throw new TypeError(`${label} must be a non-empty string`);\n return value;\n}\nfunction requireString(value: unknown, label: string): string {\n if (typeof value !== \"string\")\n throw new TypeError(`${label} must be a string`);\n return value;\n}\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0;\n}\nfunction isPositiveSafeInteger(value: unknown): value is number {\n return typeof value === \"number\" && Number.isSafeInteger(value) && value > 0;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"machine.js","sourceRoot":"","sources":["machine.ts"],"names":[],"mappings":";;;AAgNA,wDAqCC;AAED,wDAEC;AAED,0DA2BC;AAuID,wEAYC;AAED,gEAMC;AAED,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M,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AACjF,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type * as Scope from \"effect/Scope\";\nimport type { JsonValue, Sample, } from \"../../analysis/contracts.ts\";\nimport { isCostProjectionValue, type PricingProfile, } from \"../../analysis/cost.ts\";\nimport type { LocalizedText } from \"../../shared/types.ts\";\nimport { compareUtf8, type ResolvedPage, } from \"../runtime/resolved-page.ts\";\nimport { resolvedPageText } from \"../runtime/text.ts\";\n/** Content-addressed identities are opaque, printable strings at this boundary. */\nexport type ContentAddress = string;\n/** The exact regenerable machine formats in docs/feature/reports/cli.md. */\nexport const BUILT_IN_SHOW_FORMAT = \"niceeval.show\";\nexport const CUSTOM_TARGET_EXECUTION_FORMAT = \"niceeval.report-target-execution/v1\";\nexport const REPORT_PROJECTIONS_FORMAT = \"niceeval.report-projections/v1\";\nexport type BuiltInReportToken = string;\nexport type ShowSelection = {\n readonly kind: \"project-current\";\n readonly sampleIdentity: ContentAddress;\n readonly experimentIds: readonly string[];\n} | {\n readonly kind: \"explicit-runs\";\n readonly sampleIdentity: ContentAddress;\n readonly runIds: readonly string[];\n} | {\n readonly kind: \"attempt-locator\";\n readonly sampleIdentity: ContentAddress;\n readonly locator: string;\n};\n/**\n * Host-owned problems expose canonical ordering inputs. Their exact detailed\n * shape remains Host-owned; no callback, Error, Cause, or reader is allowed.\n */\nexport interface ReportProblem {\n readonly code: string;\n readonly path: readonly string[];\n readonly refs: readonly string[];\n readonly summary?: string;\n}\n/**\n * Built-ins may emit only their declared domain families. This is intentionally\n * not a generic component/HTML/text reverse-engineering format.\n */\nexport type BuiltInShowData = {\n readonly kind: \"groups\";\n readonly groups: JsonValue;\n} | {\n readonly kind: \"experiment-group\";\n readonly group: JsonValue;\n readonly comparison: JsonValue;\n} | {\n readonly kind: \"run-membership\";\n readonly summary: JsonValue;\n readonly members: JsonValue;\n readonly errors: JsonValue;\n readonly evidence: JsonValue;\n} | {\n readonly kind: \"attempt\";\n readonly evidence: JsonValue;\n readonly observability: JsonValue;\n readonly fileChanges: JsonValue;\n} | {\n readonly kind: \"source\";\n readonly sources: JsonValue;\n} | {\n readonly kind: \"execution\";\n readonly execution: JsonValue;\n} | {\n readonly kind: \"timing\";\n readonly timing: JsonValue;\n};\nexport interface BuiltInShowDocument {\n readonly format: typeof BUILT_IN_SHOW_FORMAT;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/**\n * The custom format is a single target execution manifest, never a revision.\n * It contains only the selected Page's closed English text—not a React tree,\n * HTML body, site identity, Sample capability, Record payload, or raw bytes.\n */\nexport interface CustomTargetExecutionManifest {\n readonly format: typeof CUSTOM_TARGET_EXECUTION_FORMAT;\n readonly locale: \"en\";\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n readonly renderedText: string;\n };\n readonly downloads: readonly {\n readonly path: string;\n readonly mediaType: string;\n readonly bytes: number;\n }[];\n readonly projections: ReportProjections;\n readonly problems: readonly ReportProblem[];\n}\n/** One captured cost projection bound to the Page execution that requested it. */\nexport interface ReportProjectionCost {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, JsonValue>>;\n };\n readonly profileIdentity: string;\n /** Analysis-owned closed projection; Report never rebuilds it from `value`. */\n readonly projection: JsonValue;\n}\n/**\n * The top-level projections object shared verbatim by the built-in show\n * document and the custom target-execution manifest, and written as the site\n * revision's `_niceeval/data/projections.json`. `pricingProfile` is the\n * closed JSON form of the Report's PricingProfile, or null when the Report\n * declares none. `costs` is canonical: route → pageId → measureId → row.key\n * → profileIdentity. A projection may appear on distinct Pages; distinct\n * dimensions or projections at one canonical capture key are a build failure.\n */\nexport interface ReportProjections {\n readonly format: typeof REPORT_PROJECTIONS_FORMAT;\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCost[];\n}\nexport interface ReportProjectionCostInput {\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly row: {\n readonly key: string;\n readonly dimensions: Readonly<Record<string, unknown>>;\n };\n readonly profileIdentity: string;\n readonly projection: unknown;\n}\n/** A same-key, different row-content failure that a Host can surface directly. */\nexport interface ReportProjectionConflict {\n readonly code: \"report-cost-projection-conflict\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Capture and projection must name the same Analysis-owned PricingProfile. */\nexport interface ReportProjectionProfileIdentityMismatch {\n readonly code: \"report-cost-projection-profile-identity-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly projectionProfileIdentity: string | null;\n}\n/** A cost capture cannot exist when the Report declares no PricingProfile. */\nexport interface ReportProjectionReportPricingMissing {\n readonly code: \"report-cost-projection-report-pricing-missing\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n}\n/** Every captured cost must use the exact Profile declared by the Report. */\nexport interface ReportProjectionReportPricingMismatch {\n readonly code: \"report-cost-projection-report-pricing-mismatch\";\n readonly page: {\n readonly pageId: string;\n readonly route: string;\n };\n readonly measureId: string;\n readonly rowKey: string;\n readonly profileIdentity: string;\n readonly reportPricingProfileIdentity: string;\n}\nexport type ReportProjectionBuildFailure = ReportProjectionConflict | ReportProjectionProfileIdentityMismatch | ReportProjectionReportPricingMissing | ReportProjectionReportPricingMismatch;\n/**\n * Closes, deduplicates, and canonically sorts captured projection entries.\n * Two identical entries at one canonical capture key collapse. Different\n * Page bindings deliberately do not collide; distinct dimensions at one key\n * do, because they represent distinct captured rows.\n */\nexport function buildReportProjections(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjections {\n const pricingProfile = input.pricingProfile === null\n ? null\n : closeJson(input.pricingProfile, new Set<object>());\n const failure = reportProjectionFailure({ pricingProfile, costs: input.costs });\n if (failure !== undefined)\n throw failure;\n const byKey = new Map<string, {\n readonly cost: ReportProjectionCost;\n readonly content: string;\n }>();\n for (const entry of input.costs) {\n const cost = closeProjectionCost(entry);\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const existing = byKey.get(key);\n if (existing === undefined) {\n byKey.set(key, Object.freeze({ cost, content }));\n continue;\n }\n if (existing.content !== content) {\n throw projectionConflict(cost);\n }\n }\n const costs = Object.freeze([...byKey.values()].map((entry) => entry.cost).sort((left, right) => compareUtf8(left.page.route, right.page.route) ||\n compareUtf8(left.page.pageId, right.page.pageId) ||\n compareUtf8(left.measureId, right.measureId) ||\n compareUtf8(left.row.key, right.row.key) ||\n compareUtf8(left.profileIdentity, right.profileIdentity)));\n return Object.freeze({\n format: REPORT_PROJECTIONS_FORMAT,\n pricingProfile,\n costs,\n });\n}\n/** The empty projections for a Page or site that captured no cost values. */\nexport function emptyReportProjections(pricingProfile: JsonValue | null): ReportProjections {\n return buildReportProjections({ pricingProfile, costs: [] });\n}\n/** Validates Report Profile binding and same-key row-content identity. */\nexport function reportProjectionFailure(input: {\n readonly pricingProfile: JsonValue | null;\n readonly costs: readonly ReportProjectionCostInput[];\n}): ReportProjectionBuildFailure | undefined {\n const reportPricingProfileIdentity = pricingProfileIdentity(input.pricingProfile);\n const byKey = new Map<string, {\n readonly content: string;\n }>();\n for (const inputEntry of input.costs) {\n const cost = closeProjectionCost(inputEntry);\n if (reportPricingProfileIdentity === null)\n return reportPricingMissing(cost);\n const profileIdentity = projectionProfileIdentity(cost.projection);\n if (profileIdentity !== cost.profileIdentity)\n return projectionProfileIdentityMismatch(cost, profileIdentity);\n if (cost.profileIdentity !== reportPricingProfileIdentity) {\n return reportPricingMismatch(cost, reportPricingProfileIdentity);\n }\n const key = projectionCostKey(cost);\n const content = projectionCostContent(cost);\n const prior = byKey.get(key);\n if (prior !== undefined && prior.content !== content) {\n return projectionConflict(cost);\n }\n byKey.set(key, Object.freeze({ content }));\n }\n return undefined;\n}\nfunction closeProjectionCost(input: ReportProjectionCostInput): ReportProjectionCost {\n const page = input.page;\n const row = input.row;\n if (!isPlainRecord(page) || !isPlainRecord(row)) {\n throw new TypeError(\"projection cost page and row must be plain data objects\");\n }\n // CostProjectionValue has one closed-domain validator in Analysis. This\n // machine boundary deliberately calls it before JSON closing rather than\n // accepting any projection-shaped payload from a capture.\n if (!isCostProjectionValue(input.projection)) {\n throw new TypeError(\"projection cost projection must be an Analysis CostProjectionValue\");\n }\n const dimensions = closeJson(row.dimensions, new Set<object>());\n if (dimensions === null || Array.isArray(dimensions) || typeof dimensions !== \"object\") {\n throw new TypeError(\"projection cost row.dimensions must be a plain data object\");\n }\n return Object.freeze({\n page: Object.freeze({\n pageId: requireNonEmptyString(page.pageId, \"projection cost page.pageId\"),\n route: requireNonEmptyString(page.route, \"projection cost page.route\"),\n }),\n measureId: requireNonEmptyString(input.measureId, \"projection cost measureId\"),\n row: Object.freeze({\n key: requireString(row.key, \"projection cost row.key\"),\n dimensions: dimensions as Readonly<Record<string, JsonValue>>,\n }),\n profileIdentity: requireNonEmptyString(input.profileIdentity, \"projection cost profileIdentity\"),\n projection: closeJson(input.projection, new Set<object>()),\n });\n}\nfunction projectionCostKey(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze([\n cost.page.route,\n cost.page.pageId,\n cost.measureId,\n cost.row.key,\n cost.profileIdentity,\n ]));\n}\n/**\n * Dimensions are retained outside the canonical capture key so they do not\n * affect sort order, but they remain part of the captured row's meaning. Two\n * entries at one key can collapse only when both dimensions and projection\n * are byte-identical canonical JSON.\n */\nfunction projectionCostContent(cost: ReportProjectionCost): string {\n return writeCanonicalJson(Object.freeze({\n dimensions: cost.row.dimensions,\n projection: cost.projection,\n }));\n}\nfunction projectionConflict(cost: ReportProjectionCost): ReportProjectionConflict {\n return Object.freeze({\n code: \"report-cost-projection-conflict\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction projectionProfileIdentity(value: JsonValue): string | null {\n if (value === null || Array.isArray(value) || typeof value !== \"object\")\n return null;\n const profile = (value as Readonly<Record<string, JsonValue>>).profile;\n if (profile === null || Array.isArray(profile) || typeof profile !== \"object\")\n return null;\n const record = profile as Readonly<Record<string, JsonValue>>;\n return typeof record.contentIdentity === \"string\" && record.contentIdentity.length > 0\n ? record.contentIdentity\n : null;\n}\nfunction pricingProfileIdentity(value: JsonValue | null): string | null {\n if (value === null)\n return null;\n if (!isPlainRecord(value) || typeof value.contentIdentity !== \"string\" || value.contentIdentity.length === 0) {\n throw new TypeError(\"projection pricingProfile must be a closed PricingProfile JSON object\");\n }\n return value.contentIdentity;\n}\nfunction projectionProfileIdentityMismatch(cost: ReportProjectionCost, projectionProfileIdentity: string | null): ReportProjectionProfileIdentityMismatch {\n return Object.freeze({\n code: \"report-cost-projection-profile-identity-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n projectionProfileIdentity,\n });\n}\nfunction reportPricingMissing(cost: ReportProjectionCost): ReportProjectionReportPricingMissing {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-missing\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n });\n}\nfunction reportPricingMismatch(cost: ReportProjectionCost, reportPricingProfileIdentity: string): ReportProjectionReportPricingMismatch {\n return Object.freeze({\n code: \"report-cost-projection-report-pricing-mismatch\" as const,\n page: cost.page,\n measureId: cost.measureId,\n rowKey: cost.row.key,\n profileIdentity: cost.profileIdentity,\n reportPricingProfileIdentity,\n });\n}\nconst BUILT_IN_MACHINE_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-descriptor/v2\");\nconst BUILT_IN_MACHINE_REPORT_DESCRIPTOR = Symbol.for(\"niceeval.report.built-in-machine-report-descriptor/v2\");\nconst BUILT_IN_MACHINE_DESCRIPTOR_BRAND = \"niceeval.report.built-in-machine-descriptor/v2\";\n/**\n * A descriptor intentionally contains only one versioned producer id. The\n * Symbol.for brand makes that data identity work across duplicate packages.\n */\nexport interface BuiltInMachineDescriptor {\n readonly producerId: string;\n}\nexport interface BuiltInMachineProducerInput {\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}\n/** This callback is held only in a Host registry—not on a descriptor. */\nexport type BuiltInMachineProducer<Error, Requirements> = (input: BuiltInMachineProducerInput) => Effect.Effect<BuiltInShowData, Error, Requirements>;\nexport interface BuiltInMachineRegistry<Error, Requirements> {\n readonly producers: ReadonlyMap<string, BuiltInMachineProducer<Error, Requirements>>;\n}\nexport interface BuiltInMachineProducerMissing {\n readonly code: \"report-built-in-machine-producer-missing\";\n readonly producerId: string;\n}\n/** Defines a data-only descriptor. It has no executable producer field. */\nexport function defineBuiltInMachineDescriptor(producerId: string): BuiltInMachineDescriptor {\n if (!isVersionedProducerId(producerId)) {\n throw new TypeError(\"a built-in machine producer id must end in @v<positive integer>\");\n }\n const descriptor: BuiltInMachineDescriptor = { producerId };\n Object.defineProperty(descriptor, BUILT_IN_MACHINE_DESCRIPTOR, {\n value: BUILT_IN_MACHINE_DESCRIPTOR_BRAND,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return Object.freeze(descriptor);\n}\n/** A duplicate installed package recognizes the same descriptor through Symbol.for. */\nexport function isBuiltInMachineDescriptor(value: unknown): value is BuiltInMachineDescriptor {\n if (!isBuiltInDescriptorRecord(value) || !hasOnlyFields(value, [\"producerId\"]) || !isVersionedProducerId(value.producerId)) {\n return false;\n }\n const brand = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_DESCRIPTOR);\n return brand !== undefined && \"value\" in brand && brand.value === BUILT_IN_MACHINE_DESCRIPTOR_BRAND;\n}\n/** Installs data identity before a built-in definition is frozen; it installs no callback. */\nexport function attachBuiltInMachineDescriptor<Definition extends object>(definition: Definition, descriptor: BuiltInMachineDescriptor): Definition {\n if (!isBuiltInMachineDescriptor(descriptor)) {\n throw new TypeError(\"a built-in Report must use a valid machine descriptor\");\n }\n Object.defineProperty(definition, BUILT_IN_MACHINE_REPORT_DESCRIPTOR, {\n value: descriptor,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return definition;\n}\n/** Reads only the stable data descriptor, never a process-local WeakMap. */\nexport function builtInMachineDescriptorOf(value: unknown): BuiltInMachineDescriptor | undefined {\n if ((typeof value !== \"object\" && typeof value !== \"function\") || value === null)\n return undefined;\n const property = Object.getOwnPropertyDescriptor(value, BUILT_IN_MACHINE_REPORT_DESCRIPTOR);\n return property !== undefined && \"value\" in property && isBuiltInMachineDescriptor(property.value)\n ? property.value\n : undefined;\n}\n/**\n * The Host selects the producer from its own registry by producerId. The\n * descriptor is never called and cannot contain a callback to call.\n */\nexport function produceBuiltInShowData<Error, Requirements>(input: {\n readonly registry: BuiltInMachineRegistry<Error, Requirements>;\n readonly descriptor: BuiltInMachineDescriptor;\n readonly sample: Sample;\n readonly selection: ShowSelection;\n readonly route: string;\n readonly pageId: string;\n}): Effect.Effect<BuiltInShowData, Error | BuiltInMachineProducerMissing, Requirements | Scope.Scope> {\n if (!isBuiltInMachineDescriptor(input.descriptor)) {\n throw new TypeError(\"a built-in machine descriptor must be created by defineBuiltInMachineDescriptor\");\n }\n const producer = input.registry.producers.get(input.descriptor.producerId);\n if (producer === undefined) {\n return Effect.fail(Object.freeze({\n code: \"report-built-in-machine-producer-missing\" as const,\n producerId: input.descriptor.producerId,\n }));\n }\n return producer({\n sample: input.sample,\n selection: input.selection,\n route: input.route,\n pageId: input.pageId,\n });\n}\n/** Builds the docs-defined built-in show document from already closed domain data. */\nexport function builtInShowDocument(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly token: BuiltInReportToken;\n readonly identity: ContentAddress;\n };\n readonly page: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n };\n readonly data: BuiltInShowData;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): BuiltInShowDocument {\n return Object.freeze({\n format: BUILT_IN_SHOW_FORMAT,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n token: requireNonEmptyString(input.report.token, \"report.token\"),\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n }),\n page: freezePage(input.page),\n data: freezeBuiltInData(input.data),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/**\n * Builds the docs-defined custom single-target manifest. `ResolvedPage` has\n * already closed every author callback, so reading its English text performs\n * neither component resolution nor a second Analysis request.\n */\nexport function customTargetExecutionManifest(input: {\n readonly selection: ShowSelection;\n readonly report: {\n readonly identity: ContentAddress;\n readonly title: LocalizedText;\n };\n readonly page: ResolvedPage;\n readonly textWidth: number;\n readonly projections: ReportProjections;\n readonly problems?: readonly ReportProblem[];\n}): CustomTargetExecutionManifest {\n if (!isPositiveSafeInteger(input.textWidth)) {\n throw new TypeError(\"custom target execution textWidth must be a positive safe integer\");\n }\n const text = resolvedPageText(input.page, { locale: \"en\", width: input.textWidth, panelMode: \"plain\" });\n if (!(\"state\" in text) || text.state !== \"rendered\") {\n throw new TypeError(\"the selected Page lacks a closed English text projection at the requested width\");\n }\n return Object.freeze({\n format: CUSTOM_TARGET_EXECUTION_FORMAT,\n locale: \"en\" as const,\n selection: freezeSelection(input.selection),\n report: Object.freeze({\n identity: requireNonEmptyString(input.report.identity, \"report.identity\"),\n title: freezeLocalizedText(input.report.title, \"report.title\"),\n }),\n page: Object.freeze({\n route: input.page.target.route,\n pageId: input.page.target.pageId,\n title: freezeLocalizedText(input.page.title, \"page.title\"),\n renderedText: text.text,\n }),\n // Assets remain revision payloads. The target-page manifest intentionally\n // exposes only the docs-defined download summaries, never either payload.\n downloads: Object.freeze([...input.page.downloads]\n .map((download) => Object.freeze({\n path: download.path,\n mediaType: download.mediaType,\n bytes: download.byteLength,\n }))\n .sort((left, right) => compareUtf8(left.path, right.path) || compareUtf8(left.mediaType, right.mediaType) || left.bytes - right.bytes)),\n projections: freezeProjections(input.projections),\n problems: freezeProblems(input.problems ?? []),\n });\n}\n/** Canonical UTF-8 JSON for the two show schemas. */\nexport function canonicalMachineJson(value: BuiltInShowDocument | CustomTargetExecutionManifest): string {\n return writeCanonicalJson(closeMachineJson(value));\n}\n/** Strict JSON clone for a Host-owned closed domain value. */\nexport function closeMachineJson(value: unknown): JsonValue {\n return closeJson(value, new Set<object>());\n}\n/**\n * A PricingProfile carries an internal Symbol descriptor for cross-package\n * validation. Machine documents expose only its closed enumerable data form.\n */\nexport function closePricingProfileJson(profile: PricingProfile): JsonValue {\n return closeMachineJson(Object.fromEntries(Object.entries(profile)));\n}\nfunction freezeSelection(value: ShowSelection): ShowSelection {\n const sampleIdentity = requireNonEmptyString(value.sampleIdentity, \"selection.sampleIdentity\");\n switch (value.kind) {\n case \"project-current\":\n return Object.freeze({\n kind: \"project-current\" as const,\n sampleIdentity,\n experimentIds: freezeSortedUniqueStrings(value.experimentIds, \"selection.experimentIds\"),\n });\n case \"explicit-runs\":\n return Object.freeze({\n kind: \"explicit-runs\" as const,\n sampleIdentity,\n runIds: freezeSortedUniqueStrings(value.runIds, \"selection.runIds\"),\n });\n case \"attempt-locator\":\n return Object.freeze({\n kind: \"attempt-locator\" as const,\n sampleIdentity,\n locator: requireNonEmptyString(value.locator, \"selection.locator\"),\n });\n }\n}\nfunction freezePage(value: {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n}): {\n readonly route: string;\n readonly pageId: string;\n readonly title: LocalizedText;\n} {\n return Object.freeze({\n route: requireNonEmptyString(value.route, \"page.route\"),\n pageId: requireNonEmptyString(value.pageId, \"page.pageId\"),\n title: freezeLocalizedText(value.title, \"page.title\"),\n });\n}\nfunction freezeBuiltInData(value: BuiltInShowData): BuiltInShowData {\n if (!isPlainRecord(value) || typeof value.kind !== \"string\") {\n throw new TypeError(\"built-in show data must be a named domain result\");\n }\n // Domain arrays are deliberately not given a generic renderer sort here.\n // The selected registry producer owns their stable identities and must close\n // them in the canonical order defined for that domain before returning.\n switch (value.kind) {\n case \"groups\":\n assertExactFields(value, [\"kind\", \"groups\"], \"groups show data\");\n return Object.freeze({ kind: \"groups\" as const, groups: closeMachineJson(value.groups) });\n case \"experiment-group\":\n assertExactFields(value, [\"kind\", \"group\", \"comparison\"], \"experiment-group show data\");\n return Object.freeze({\n kind: \"experiment-group\" as const,\n group: closeMachineJson(value.group),\n comparison: closeMachineJson(value.comparison),\n });\n case \"run-membership\":\n assertExactFields(value, [\"kind\", \"summary\", \"members\", \"errors\", \"evidence\"], \"run-membership show data\");\n return Object.freeze({\n kind: \"run-membership\" as const,\n summary: closeMachineJson(value.summary),\n members: closeMachineJson(value.members),\n errors: closeMachineJson(value.errors),\n evidence: closeMachineJson(value.evidence),\n });\n case \"attempt\":\n assertExactFields(value, [\"kind\", \"evidence\", \"observability\", \"fileChanges\"], \"attempt show data\");\n return Object.freeze({\n kind: \"attempt\" as const,\n evidence: closeMachineJson(value.evidence),\n observability: closeMachineJson(value.observability),\n fileChanges: closeMachineJson(value.fileChanges),\n });\n case \"source\":\n assertExactFields(value, [\"kind\", \"sources\"], \"source show data\");\n return Object.freeze({ kind: \"source\" as const, sources: closeMachineJson(value.sources) });\n case \"execution\":\n assertExactFields(value, [\"kind\", \"execution\"], \"execution show data\");\n return Object.freeze({ kind: \"execution\" as const, execution: closeMachineJson(value.execution) });\n case \"timing\":\n assertExactFields(value, [\"kind\", \"timing\"], \"timing show data\");\n return Object.freeze({ kind: \"timing\" as const, timing: closeMachineJson(value.timing) });\n default:\n throw new TypeError(\"built-in show data kind is not declared by the show format\");\n }\n}\n/** Re-closes a ReportProjections value: validates format, dedupes, and canonically sorts. */\nfunction freezeProjections(value: ReportProjections): ReportProjections {\n if (!isPlainRecord(value) || value.format !== REPORT_PROJECTIONS_FORMAT) {\n throw new TypeError(\"projections must be a niceeval.report-projections/v1 value\");\n }\n return buildReportProjections({\n pricingProfile: value.pricingProfile,\n costs: value.costs.map((entry) => ({\n page: entry.page,\n measureId: entry.measureId,\n row: entry.row,\n profileIdentity: entry.profileIdentity,\n projection: entry.projection,\n })),\n });\n}\nfunction freezeProblems(value: readonly ReportProblem[]): readonly ReportProblem[] {\n if (!Array.isArray(value))\n throw new TypeError(\"problems must be an array\");\n const entries = value.map((problem, index) => {\n if (!isNonEmptyString(problem.code))\n throw new TypeError(`problems[${index}].code must be a non-empty string`);\n const path = freezeStrings(problem.path, `problems[${index}].path`);\n const refs = freezeSortedUniqueStrings(problem.refs, `problems[${index}].refs`);\n if (problem.summary !== undefined && !isNonEmptyString(problem.summary)) {\n throw new TypeError(`problems[${index}].summary must be a non-empty string when supplied`);\n }\n return Object.freeze({\n code: problem.code,\n path,\n refs,\n ...(problem.summary === undefined ? {} : { summary: problem.summary }),\n });\n });\n return Object.freeze(entries.sort((left, right) => compareUtf8(left.code, right.code) ||\n comparePath(left.path, right.path) ||\n compareStringArrays(left.refs, right.refs) ||\n compareUtf8(left.summary ?? \"\", right.summary ?? \"\")));\n}\nfunction freezeLocalizedText(value: LocalizedText, label: string): LocalizedText {\n if (typeof value === \"string\")\n return value;\n const closed = closeMachineJson(value);\n if (closed === null || Array.isArray(closed) || typeof closed !== \"object\") {\n throw new TypeError(`${label} must be a string or locale map`);\n }\n const entries = Object.entries(closed);\n if (entries.length === 0 || entries.some(([locale, text]) => !isNonEmptyString(locale) || typeof text !== \"string\")) {\n throw new TypeError(`${label} must be a non-empty locale map of strings`);\n }\n const result: Record<string, string> = Object.create(null) as Record<string, string>;\n for (const [locale, text] of entries) {\n // The validation above proves this is a locale-string pair.\n result[locale] = text as string;\n }\n return Object.freeze(result);\n}\nfunction freezeStrings(value: readonly string[], label: string): readonly string[] {\n if (!Array.isArray(value) || value.some((entry) => !isNonEmptyString(entry))) {\n throw new TypeError(`${label} must be an array of non-empty strings`);\n }\n return Object.freeze([...value]);\n}\nfunction freezeSortedUniqueStrings(value: readonly string[], label: string): readonly string[] {\n const entries = freezeStrings(value, label);\n return Object.freeze([...new Set(entries)].sort(compareUtf8));\n}\nfunction comparePath(left: readonly string[], right: readonly string[]): number {\n const length = Math.min(left.length, right.length);\n for (let index = 0; index < length; index += 1) {\n const difference = compareUtf8(left[index]!, right[index]!);\n if (difference !== 0)\n return difference;\n }\n return left.length - right.length;\n}\nfunction compareStringArrays(left: readonly string[], right: readonly string[]): number {\n return comparePath(left, right);\n}\nfunction closeJson(value: unknown, active: Set<object>): JsonValue {\n if (value === null || typeof value === \"boolean\" || typeof value === \"string\")\n return value;\n if (typeof value === \"number\") {\n if (!Number.isFinite(value))\n throw new TypeError(\"machine JSON cannot contain a non-finite number\");\n return Object.is(value, -0) ? 0 : value;\n }\n if (typeof value === \"undefined\" || typeof value === \"bigint\" || typeof value === \"symbol\" || typeof value === \"function\") {\n throw new TypeError(\"machine JSON must be data only\");\n }\n if (active.has(value))\n throw new TypeError(\"machine JSON cannot contain a cycle\");\n active.add(value);\n try {\n if (Array.isArray(value))\n return Object.freeze(value.map((entry) => closeJson(entry, active)));\n if (!isPlainRecord(value))\n throw new TypeError(\"machine JSON must use plain data objects\");\n const copy: Record<string, JsonValue> = Object.create(null) as Record<string, JsonValue>;\n for (const key of Object.keys(value).sort(compareUtf8))\n copy[key] = closeJson(value[key], active);\n return Object.freeze(copy);\n }\n finally {\n active.delete(value);\n }\n}\nfunction writeCanonicalJson(value: JsonValue): string {\n if (value === null)\n return \"null\";\n switch (typeof value) {\n case \"boolean\":\n return value ? \"true\" : \"false\";\n case \"number\":\n return JSON.stringify(value);\n case \"string\":\n return JSON.stringify(value);\n case \"object\":\n break;\n }\n if (Array.isArray(value))\n return `[${value.map(writeCanonicalJson).join(\",\")}]`;\n const record = value as Readonly<Record<string, JsonValue>>;\n const keys = Object.keys(record).sort(compareUtf8);\n return `{${keys.map((key) => `${JSON.stringify(key)}:${writeCanonicalJson(record[key]!)}`).join(\",\")}}`;\n}\nfunction isPlainRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null)\n return false;\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key !== \"string\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !descriptor.enumerable || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\n/** The descriptor alone is allowed its one non-enumerable Symbol.for brand. */\nfunction isBuiltInDescriptorRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n if (typeof value !== \"object\" || value === null || Array.isArray(value) || value instanceof Uint8Array)\n return false;\n const prototype = Object.getPrototypeOf(value);\n if (prototype !== Object.prototype && prototype !== null)\n return false;\n for (const key of Reflect.ownKeys(value)) {\n if (typeof key === \"symbol\" && key !== BUILT_IN_MACHINE_DESCRIPTOR)\n return false;\n if (typeof key !== \"string\" && typeof key !== \"symbol\")\n return false;\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor === undefined || !(\"value\" in descriptor))\n return false;\n }\n return true;\n}\nfunction hasOnlyFields(value: Readonly<Record<string, unknown>>, keys: readonly string[]): boolean {\n const actual = Object.getOwnPropertyNames(value);\n return actual.length === keys.length && keys.every((key) => Object.hasOwn(value, key));\n}\nfunction assertExactFields(value: Readonly<Record<string, unknown>>, keys: readonly string[], label: string): void {\n if (!hasOnlyFields(value, keys))\n throw new TypeError(`${label} has an invalid field set`);\n}\nfunction isVersionedProducerId(value: unknown): value is string {\n return typeof value === \"string\" && /^[^\\s@][^\\s]*@v[1-9][0-9]*$/u.test(value);\n}\nfunction requireNonEmptyString(value: unknown, label: string): string {\n if (!isNonEmptyString(value))\n throw new TypeError(`${label} must be a non-empty string`);\n return value;\n}\nfunction requireString(value: unknown, label: string): string {\n if (typeof value !== \"string\")\n throw new TypeError(`${label} must be a string`);\n return value;\n}\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0;\n}\nfunction isPositiveSafeInteger(value: unknown): value is number {\n return typeof value === \"number\" && Number.isSafeInteger(value) && value > 0;\n}\n"]}
|
|
@@ -6,10 +6,10 @@ import type { LocalizedText } from "../../shared/types.cjs";
|
|
|
6
6
|
import { type ResolvedPage } from "../runtime/resolved-page.cjs";
|
|
7
7
|
/** Content-addressed identities are opaque, printable strings at this boundary. */
|
|
8
8
|
export type ContentAddress = string;
|
|
9
|
-
/** The exact machine
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
9
|
+
/** The exact regenerable machine formats in docs/feature/reports/cli.md. */
|
|
10
|
+
export declare const BUILT_IN_SHOW_FORMAT = "niceeval.show";
|
|
11
|
+
export declare const CUSTOM_TARGET_EXECUTION_FORMAT = "niceeval.report-target-execution/v1";
|
|
12
|
+
export declare const REPORT_PROJECTIONS_FORMAT = "niceeval.report-projections/v1";
|
|
13
13
|
export type BuiltInReportToken = string;
|
|
14
14
|
export type ShowSelection = {
|
|
15
15
|
readonly kind: "project-current";
|
|
@@ -39,8 +39,18 @@ export interface ReportProblem {
|
|
|
39
39
|
* not a generic component/HTML/text reverse-engineering format.
|
|
40
40
|
*/
|
|
41
41
|
export type BuiltInShowData = {
|
|
42
|
-
readonly kind: "
|
|
43
|
-
readonly
|
|
42
|
+
readonly kind: "groups";
|
|
43
|
+
readonly groups: JsonValue;
|
|
44
|
+
} | {
|
|
45
|
+
readonly kind: "experiment-group";
|
|
46
|
+
readonly group: JsonValue;
|
|
47
|
+
readonly comparison: JsonValue;
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: "run-membership";
|
|
50
|
+
readonly summary: JsonValue;
|
|
51
|
+
readonly members: JsonValue;
|
|
52
|
+
readonly errors: JsonValue;
|
|
53
|
+
readonly evidence: JsonValue;
|
|
44
54
|
} | {
|
|
45
55
|
readonly kind: "attempt";
|
|
46
56
|
readonly evidence: JsonValue;
|
|
@@ -57,7 +67,7 @@ export type BuiltInShowData = {
|
|
|
57
67
|
readonly timing: JsonValue;
|
|
58
68
|
};
|
|
59
69
|
export interface BuiltInShowDocument {
|
|
60
|
-
readonly
|
|
70
|
+
readonly format: typeof BUILT_IN_SHOW_FORMAT;
|
|
61
71
|
readonly locale: "en";
|
|
62
72
|
readonly selection: ShowSelection;
|
|
63
73
|
readonly report: {
|
|
@@ -74,12 +84,12 @@ export interface BuiltInShowDocument {
|
|
|
74
84
|
readonly problems: readonly ReportProblem[];
|
|
75
85
|
}
|
|
76
86
|
/**
|
|
77
|
-
* The custom
|
|
87
|
+
* The custom format is a single target execution manifest, never a revision.
|
|
78
88
|
* It contains only the selected Page's closed English text—not a React tree,
|
|
79
89
|
* HTML body, site identity, Sample capability, Record payload, or raw bytes.
|
|
80
90
|
*/
|
|
81
91
|
export interface CustomTargetExecutionManifest {
|
|
82
|
-
readonly
|
|
92
|
+
readonly format: typeof CUSTOM_TARGET_EXECUTION_FORMAT;
|
|
83
93
|
readonly locale: "en";
|
|
84
94
|
readonly selection: ShowSelection;
|
|
85
95
|
readonly report: {
|
|
@@ -125,7 +135,7 @@ export interface ReportProjectionCost {
|
|
|
125
135
|
* dimensions or projections at one canonical capture key are a build failure.
|
|
126
136
|
*/
|
|
127
137
|
export interface ReportProjections {
|
|
128
|
-
readonly
|
|
138
|
+
readonly format: typeof REPORT_PROJECTIONS_FORMAT;
|
|
129
139
|
readonly pricingProfile: JsonValue | null;
|
|
130
140
|
readonly costs: readonly ReportProjectionCost[];
|
|
131
141
|
}
|
|
@@ -6,10 +6,10 @@ import type { LocalizedText } from "../../shared/types.mjs";
|
|
|
6
6
|
import { type ResolvedPage } from "../runtime/resolved-page.mjs";
|
|
7
7
|
/** Content-addressed identities are opaque, printable strings at this boundary. */
|
|
8
8
|
export type ContentAddress = string;
|
|
9
|
-
/** The exact machine
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
9
|
+
/** The exact regenerable machine formats in docs/feature/reports/cli.md. */
|
|
10
|
+
export declare const BUILT_IN_SHOW_FORMAT = "niceeval.show";
|
|
11
|
+
export declare const CUSTOM_TARGET_EXECUTION_FORMAT = "niceeval.report-target-execution/v1";
|
|
12
|
+
export declare const REPORT_PROJECTIONS_FORMAT = "niceeval.report-projections/v1";
|
|
13
13
|
export type BuiltInReportToken = string;
|
|
14
14
|
export type ShowSelection = {
|
|
15
15
|
readonly kind: "project-current";
|
|
@@ -39,8 +39,18 @@ export interface ReportProblem {
|
|
|
39
39
|
* not a generic component/HTML/text reverse-engineering format.
|
|
40
40
|
*/
|
|
41
41
|
export type BuiltInShowData = {
|
|
42
|
-
readonly kind: "
|
|
43
|
-
readonly
|
|
42
|
+
readonly kind: "groups";
|
|
43
|
+
readonly groups: JsonValue;
|
|
44
|
+
} | {
|
|
45
|
+
readonly kind: "experiment-group";
|
|
46
|
+
readonly group: JsonValue;
|
|
47
|
+
readonly comparison: JsonValue;
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: "run-membership";
|
|
50
|
+
readonly summary: JsonValue;
|
|
51
|
+
readonly members: JsonValue;
|
|
52
|
+
readonly errors: JsonValue;
|
|
53
|
+
readonly evidence: JsonValue;
|
|
44
54
|
} | {
|
|
45
55
|
readonly kind: "attempt";
|
|
46
56
|
readonly evidence: JsonValue;
|
|
@@ -57,7 +67,7 @@ export type BuiltInShowData = {
|
|
|
57
67
|
readonly timing: JsonValue;
|
|
58
68
|
};
|
|
59
69
|
export interface BuiltInShowDocument {
|
|
60
|
-
readonly
|
|
70
|
+
readonly format: typeof BUILT_IN_SHOW_FORMAT;
|
|
61
71
|
readonly locale: "en";
|
|
62
72
|
readonly selection: ShowSelection;
|
|
63
73
|
readonly report: {
|
|
@@ -74,12 +84,12 @@ export interface BuiltInShowDocument {
|
|
|
74
84
|
readonly problems: readonly ReportProblem[];
|
|
75
85
|
}
|
|
76
86
|
/**
|
|
77
|
-
* The custom
|
|
87
|
+
* The custom format is a single target execution manifest, never a revision.
|
|
78
88
|
* It contains only the selected Page's closed English text—not a React tree,
|
|
79
89
|
* HTML body, site identity, Sample capability, Record payload, or raw bytes.
|
|
80
90
|
*/
|
|
81
91
|
export interface CustomTargetExecutionManifest {
|
|
82
|
-
readonly
|
|
92
|
+
readonly format: typeof CUSTOM_TARGET_EXECUTION_FORMAT;
|
|
83
93
|
readonly locale: "en";
|
|
84
94
|
readonly selection: ShowSelection;
|
|
85
95
|
readonly report: {
|
|
@@ -125,7 +135,7 @@ export interface ReportProjectionCost {
|
|
|
125
135
|
* dimensions or projections at one canonical capture key are a build failure.
|
|
126
136
|
*/
|
|
127
137
|
export interface ReportProjections {
|
|
128
|
-
readonly
|
|
138
|
+
readonly format: typeof REPORT_PROJECTIONS_FORMAT;
|
|
129
139
|
readonly pricingProfile: JsonValue | null;
|
|
130
140
|
readonly costs: readonly ReportProjectionCost[];
|
|
131
141
|
}
|
|
@@ -6,10 +6,10 @@ import type { LocalizedText } from "../../shared/types.js";
|
|
|
6
6
|
import { type ResolvedPage } from "../runtime/resolved-page.js";
|
|
7
7
|
/** Content-addressed identities are opaque, printable strings at this boundary. */
|
|
8
8
|
export type ContentAddress = string;
|
|
9
|
-
/** The exact machine
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
9
|
+
/** The exact regenerable machine formats in docs/feature/reports/cli.md. */
|
|
10
|
+
export declare const BUILT_IN_SHOW_FORMAT = "niceeval.show";
|
|
11
|
+
export declare const CUSTOM_TARGET_EXECUTION_FORMAT = "niceeval.report-target-execution/v1";
|
|
12
|
+
export declare const REPORT_PROJECTIONS_FORMAT = "niceeval.report-projections/v1";
|
|
13
13
|
export type BuiltInReportToken = string;
|
|
14
14
|
export type ShowSelection = {
|
|
15
15
|
readonly kind: "project-current";
|
|
@@ -39,8 +39,18 @@ export interface ReportProblem {
|
|
|
39
39
|
* not a generic component/HTML/text reverse-engineering format.
|
|
40
40
|
*/
|
|
41
41
|
export type BuiltInShowData = {
|
|
42
|
-
readonly kind: "
|
|
43
|
-
readonly
|
|
42
|
+
readonly kind: "groups";
|
|
43
|
+
readonly groups: JsonValue;
|
|
44
|
+
} | {
|
|
45
|
+
readonly kind: "experiment-group";
|
|
46
|
+
readonly group: JsonValue;
|
|
47
|
+
readonly comparison: JsonValue;
|
|
48
|
+
} | {
|
|
49
|
+
readonly kind: "run-membership";
|
|
50
|
+
readonly summary: JsonValue;
|
|
51
|
+
readonly members: JsonValue;
|
|
52
|
+
readonly errors: JsonValue;
|
|
53
|
+
readonly evidence: JsonValue;
|
|
44
54
|
} | {
|
|
45
55
|
readonly kind: "attempt";
|
|
46
56
|
readonly evidence: JsonValue;
|
|
@@ -57,7 +67,7 @@ export type BuiltInShowData = {
|
|
|
57
67
|
readonly timing: JsonValue;
|
|
58
68
|
};
|
|
59
69
|
export interface BuiltInShowDocument {
|
|
60
|
-
readonly
|
|
70
|
+
readonly format: typeof BUILT_IN_SHOW_FORMAT;
|
|
61
71
|
readonly locale: "en";
|
|
62
72
|
readonly selection: ShowSelection;
|
|
63
73
|
readonly report: {
|
|
@@ -74,12 +84,12 @@ export interface BuiltInShowDocument {
|
|
|
74
84
|
readonly problems: readonly ReportProblem[];
|
|
75
85
|
}
|
|
76
86
|
/**
|
|
77
|
-
* The custom
|
|
87
|
+
* The custom format is a single target execution manifest, never a revision.
|
|
78
88
|
* It contains only the selected Page's closed English text—not a React tree,
|
|
79
89
|
* HTML body, site identity, Sample capability, Record payload, or raw bytes.
|
|
80
90
|
*/
|
|
81
91
|
export interface CustomTargetExecutionManifest {
|
|
82
|
-
readonly
|
|
92
|
+
readonly format: typeof CUSTOM_TARGET_EXECUTION_FORMAT;
|
|
83
93
|
readonly locale: "en";
|
|
84
94
|
readonly selection: ShowSelection;
|
|
85
95
|
readonly report: {
|
|
@@ -125,7 +135,7 @@ export interface ReportProjectionCost {
|
|
|
125
135
|
* dimensions or projections at one canonical capture key are a build failure.
|
|
126
136
|
*/
|
|
127
137
|
export interface ReportProjections {
|
|
128
|
-
readonly
|
|
138
|
+
readonly format: typeof REPORT_PROJECTIONS_FORMAT;
|
|
129
139
|
readonly pricingProfile: JsonValue | null;
|
|
130
140
|
readonly costs: readonly ReportProjectionCost[];
|
|
131
141
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __niceevalCreateRequire } from "node:module";
|
|
2
2
|
const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
|
|
3
3
|
const __niceevalCanonical = __niceevalRequire("./machine.cjs");
|
|
4
|
-
const __niceevalExport0 = __niceevalCanonical["
|
|
5
|
-
export { __niceevalExport0 as
|
|
6
|
-
const __niceevalExport1 = __niceevalCanonical["
|
|
7
|
-
export { __niceevalExport1 as
|
|
8
|
-
const __niceevalExport2 = __niceevalCanonical["
|
|
9
|
-
export { __niceevalExport2 as
|
|
4
|
+
const __niceevalExport0 = __niceevalCanonical["BUILT_IN_SHOW_FORMAT"];
|
|
5
|
+
export { __niceevalExport0 as BUILT_IN_SHOW_FORMAT };
|
|
6
|
+
const __niceevalExport1 = __niceevalCanonical["CUSTOM_TARGET_EXECUTION_FORMAT"];
|
|
7
|
+
export { __niceevalExport1 as CUSTOM_TARGET_EXECUTION_FORMAT };
|
|
8
|
+
const __niceevalExport2 = __niceevalCanonical["REPORT_PROJECTIONS_FORMAT"];
|
|
9
|
+
export { __niceevalExport2 as REPORT_PROJECTIONS_FORMAT };
|
|
10
10
|
const __niceevalExport3 = __niceevalCanonical["attachBuiltInMachineDescriptor"];
|
|
11
11
|
export { __niceevalExport3 as attachBuiltInMachineDescriptor };
|
|
12
12
|
const __niceevalExport4 = __niceevalCanonical["buildReportProjections"];
|
|
@@ -73,7 +73,7 @@ function executeReportSite(input) {
|
|
|
73
73
|
return yield* effect_1.Effect.ensuring(effect_1.Effect.gen(function* () {
|
|
74
74
|
const pages = [];
|
|
75
75
|
const routeOwners = new Map();
|
|
76
|
-
const
|
|
76
|
+
const siteProblems = [];
|
|
77
77
|
const projectionCosts = [];
|
|
78
78
|
const pricingProfile = reportPricingProfileJson(input.report);
|
|
79
79
|
// The Report declaration is the only page owner. A custom Report that
|
|
@@ -95,7 +95,7 @@ function executeReportSite(input) {
|
|
|
95
95
|
});
|
|
96
96
|
yield* addSitePage(pages, routeOwners, page, definition.navigation);
|
|
97
97
|
yield* registerProjectionCosts(pricingProfile, projectionCosts, pageCosts);
|
|
98
|
-
|
|
98
|
+
siteProblems.push(...analysisProblems(issues, page.target.pageId));
|
|
99
99
|
continue;
|
|
100
100
|
}
|
|
101
101
|
const values = yield* invokeAuthor(definition.id, "enumerate", outerCapture, () => definition.params.enumerate(input.sample));
|
|
@@ -129,13 +129,13 @@ function executeReportSite(input) {
|
|
|
129
129
|
},
|
|
130
130
|
capturePage: (capture) => capturedProjectionCosts(capture, route, definition.id),
|
|
131
131
|
});
|
|
132
|
-
yield* addSitePage(pages, routeOwners, page, false);
|
|
132
|
+
yield* addSitePage(pages, routeOwners, page, false, definition.role);
|
|
133
133
|
yield* registerProjectionCosts(pricingProfile, projectionCosts, pageCosts);
|
|
134
|
-
|
|
134
|
+
siteProblems.push(...analysisProblems(issues, page.target.pageId));
|
|
135
135
|
yield* checkBuildBudgets(input.budget);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
|
|
138
|
+
siteProblems.push(...analysisProblems(outerCapture.issues()));
|
|
139
139
|
return Object.freeze({
|
|
140
140
|
startedAtMs,
|
|
141
141
|
baselineRssBytes,
|
|
@@ -148,7 +148,7 @@ function executeReportSite(input) {
|
|
|
148
148
|
pricingProfile,
|
|
149
149
|
costs: projectionCosts,
|
|
150
150
|
}),
|
|
151
|
-
problems:
|
|
151
|
+
problems: mergeReportProblems(siteProblems),
|
|
152
152
|
});
|
|
153
153
|
}), effect_1.Effect.sync(() => outerCapture.close()));
|
|
154
154
|
});
|
|
@@ -195,16 +195,18 @@ function capturedProjectionCosts(capture, route, pageId) {
|
|
|
195
195
|
function reportPricingProfileJson(report) {
|
|
196
196
|
return report.pricing === null ? null : (0, machine_ts_1.closePricingProfileJson)(report.pricing);
|
|
197
197
|
}
|
|
198
|
-
/** Merges
|
|
199
|
-
function
|
|
198
|
+
/** Merges captures without discarding the Page scope that produced each issue. */
|
|
199
|
+
function mergeReportProblems(problems) {
|
|
200
200
|
const unique = new Map();
|
|
201
|
-
for (const
|
|
202
|
-
const key = `${
|
|
203
|
-
.map((ref) => ref.identity.locator).sort(compareUtf8).join("\u0001")}`;
|
|
201
|
+
for (const problem of problems) {
|
|
202
|
+
const key = `${problem.code}\u0000${problem.path.join("\u0001")}\u0000${problem.refs.join("\u0001")}\u0000${problem.summary ?? ""}`;
|
|
204
203
|
if (!unique.has(key))
|
|
205
|
-
unique.set(key,
|
|
204
|
+
unique.set(key, problem);
|
|
206
205
|
}
|
|
207
|
-
return Object.freeze([...unique.values()].sort((left, right) => compareUtf8(left.code, right.code) ||
|
|
206
|
+
return Object.freeze([...unique.values()].sort((left, right) => compareUtf8(left.code, right.code) ||
|
|
207
|
+
compareUtf8(left.path.join("\u0001"), right.path.join("\u0001")) ||
|
|
208
|
+
compareUtf8(left.refs.join("\u0001"), right.refs.join("\u0001")) ||
|
|
209
|
+
compareUtf8(left.summary ?? "", right.summary ?? "")));
|
|
208
210
|
}
|
|
209
211
|
function executeTarget(input) {
|
|
210
212
|
return (0, show_target_ts_1.executeShowTarget)({
|
|
@@ -315,7 +317,7 @@ function invokeAuthor(pageId, phase, capture, callback) {
|
|
|
315
317
|
catch: (cause) => pageFailure(pageId, phase, boundedReason(cause)),
|
|
316
318
|
});
|
|
317
319
|
}
|
|
318
|
-
function addSitePage(pages, routeOwners, page, navigation) {
|
|
320
|
+
function addSitePage(pages, routeOwners, page, navigation, role) {
|
|
319
321
|
const owner = routeOwners.get(page.target.route);
|
|
320
322
|
if (owner !== undefined) {
|
|
321
323
|
return effect_1.Effect.fail(Object.freeze({
|
|
@@ -328,7 +330,7 @@ function addSitePage(pages, routeOwners, page, navigation) {
|
|
|
328
330
|
return effect_1.Effect.fail((0, model_ts_1.reportBuildBudgetExceeded)("pages", model_ts_1.REPORT_PAGES_MAX, pages.length + 1));
|
|
329
331
|
}
|
|
330
332
|
routeOwners.set(page.target.route, page.target.pageId);
|
|
331
|
-
pages.push(Object.freeze({ page, navigation }));
|
|
333
|
+
pages.push(Object.freeze({ page, navigation, ...(role === undefined ? {} : { role }) }));
|
|
332
334
|
return effect_1.Effect.void;
|
|
333
335
|
}
|
|
334
336
|
/** Starts the budget before Record selection opens the fixed Sample. */
|
|
@@ -431,7 +433,14 @@ function relativeHref(sourceFile, targetFile) {
|
|
|
431
433
|
}
|
|
432
434
|
function commandForTarget(pages, target) {
|
|
433
435
|
const route = routeForTarget(pages, target);
|
|
434
|
-
|
|
436
|
+
if (route === undefined)
|
|
437
|
+
return undefined;
|
|
438
|
+
const page = pages.find((candidate) => candidate.id === target.page);
|
|
439
|
+
if (page?.params !== undefined && page.role?.kind === "experiment-group") {
|
|
440
|
+
const key = route.slice(page.path.length + 1);
|
|
441
|
+
return `niceeval show --experiment ${shellQuote(key)}`;
|
|
442
|
+
}
|
|
443
|
+
return `niceeval show --page ${shellQuote(route)}`;
|
|
435
444
|
}
|
|
436
445
|
function shellQuote(value) {
|
|
437
446
|
return `'${value.replaceAll("'", `'\\''`)}'`;
|