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
|
@@ -437,6 +437,8 @@ function buildSiteFiles(site, theme) {
|
|
|
437
437
|
function parameterizedRoutePrefixes(site) {
|
|
438
438
|
const prefixes = new Set();
|
|
439
439
|
for (const entry of site.pages) {
|
|
440
|
+
if (entry.role?.kind === "experiment-group")
|
|
441
|
+
continue;
|
|
440
442
|
if (entry.page.target.params === undefined)
|
|
441
443
|
continue;
|
|
442
444
|
const route = entry.page.target.route;
|
|
@@ -463,27 +465,68 @@ function renderPage(site, entry, paramRoutes) {
|
|
|
463
465
|
const bodyZh = projection(page, "zh-CN");
|
|
464
466
|
const navigationEn = renderNavigation(site.pages, page.target.route, output, "en");
|
|
465
467
|
const navigationZh = renderNavigation(site.pages, page.target.route, output, "zh-CN");
|
|
466
|
-
const
|
|
467
|
-
const
|
|
468
|
+
const groupsEn = renderExperimentGroupNavigation(site.pages, page.target.route, output, "en");
|
|
469
|
+
const groupsZh = renderExperimentGroupNavigation(site.pages, page.target.route, output, "zh-CN");
|
|
470
|
+
const pageProblems = site.problems.filter((problem) => problem.path.length === 0 || (problem.path[0] === "page" && problem.path[1] === page.target.pageId));
|
|
471
|
+
const problemsEn = renderProblems(pageProblems, "en");
|
|
472
|
+
const problemsZh = renderProblems(pageProblems, "zh-CN");
|
|
468
473
|
const paramRoutesAttr = paramRoutes.length === 0
|
|
469
474
|
? ""
|
|
470
475
|
: ` data-niceeval-param-routes="${escapeAttribute(paramRoutes.join(" "))}"`;
|
|
471
476
|
const siteRootHref = relativeHref(output, "index.html");
|
|
472
|
-
return `<!doctype html><html class="niceeval-view-document" lang="en" data-niceeval-title-en="${escapeAttribute(titleEn)}" data-niceeval-title-zh-cn="${escapeAttribute(titleZh)}" data-niceeval-site-root="${escapeAttribute(siteRootHref)}"${paramRoutesAttr}><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeText(titleEn)}</title><link rel="stylesheet" href="${escapeAttribute(stylesheetHref)}"><link rel="stylesheet" href="${escapeAttribute(themeHref)}">${authorHead}${rendererAssets}<script src="${escapeAttribute(runtimeHref)}" defer></script></head><body><header class="niceeval-view-shell"><a class="niceeval-view-brand" href="${escapeAttribute(NICEEVAL_BRAND_HREF)}" target="_blank" rel="noopener"><span class="niceeval-view-mark" aria-hidden="true"></span><span>NiceEval</span></a><nav class="niceeval-view-nav" data-niceeval-locale="en" aria-label="Report pages">${navigationEn}</nav><nav class="niceeval-view-nav" data-niceeval-locale="zh-CN" aria-label="报告页面" hidden>${navigationZh}</nav><div class="niceeval-view-
|
|
477
|
+
return `<!doctype html><html class="niceeval-view-document" lang="en" data-niceeval-title-en="${escapeAttribute(titleEn)}" data-niceeval-title-zh-cn="${escapeAttribute(titleZh)}" data-niceeval-site-root="${escapeAttribute(siteRootHref)}"${paramRoutesAttr}><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeText(titleEn)}</title><link rel="stylesheet" href="${escapeAttribute(stylesheetHref)}"><link rel="stylesheet" href="${escapeAttribute(themeHref)}">${authorHead}${rendererAssets}<script src="${escapeAttribute(runtimeHref)}" defer></script></head><body><header class="niceeval-view-shell"><a class="niceeval-view-brand" href="${escapeAttribute(NICEEVAL_BRAND_HREF)}" target="_blank" rel="noopener"><span class="niceeval-view-mark" aria-hidden="true"></span><span>NiceEval</span></a><div class="niceeval-view-pages"><nav class="niceeval-view-nav" data-niceeval-locale="en" aria-label="Report pages">${navigationEn}</nav><nav class="niceeval-view-nav" data-niceeval-locale="zh-CN" aria-label="报告页面" hidden>${navigationZh}</nav></div><div class="niceeval-view-controls">${groupsEn}${groupsZh}<label class="niceeval-view-language"><select aria-label="Language" data-niceeval-locale-select><option value="en">EN</option><option value="zh-CN">中文</option></select></label></div></header><main class="niceeval-view-main"><div class="niceeval-view-report-slot" data-niceeval-locale="en" data-page-id="${escapeAttribute(page.target.pageId)}">${bodyEn}${problemsEn}</div><div class="niceeval-view-report-slot" data-niceeval-locale="zh-CN" data-page-id="${escapeAttribute(page.target.pageId)}" hidden>${bodyZh}${problemsZh}</div><noscript><p class="niceeval-view-noscript">This report remains readable without JavaScript; language selection is unavailable.</p></noscript></main></body></html>`;
|
|
473
478
|
}
|
|
474
|
-
function
|
|
475
|
-
const
|
|
479
|
+
function renderExperimentGroupNavigation(pages, currentRoute, sourceFile, locale) {
|
|
480
|
+
const groups = pages.filter((entry) => entry.role?.kind === "experiment-group").sort(compareSitePages);
|
|
481
|
+
if (groups.length < 2)
|
|
482
|
+
return "";
|
|
483
|
+
const options = groups.map(({ page }) => {
|
|
484
|
+
const current = page.target.route === currentRoute ? " selected" : "";
|
|
485
|
+
const href = relativeHref(sourceFile, (0, paths_ts_1.staticPathForRoute)(page.target.route).posix);
|
|
486
|
+
const params = page.target.params;
|
|
487
|
+
const label = typeof params?.groupId === "string" ? params.groupId
|
|
488
|
+
: typeof params?.experimentId === "string" ? params.experimentId : page.target.route;
|
|
489
|
+
return `<option value="${escapeAttribute(href)}"${current}>${escapeText(label)}</option>`;
|
|
490
|
+
});
|
|
491
|
+
const links = groups.map(({ page }) => {
|
|
476
492
|
const current = page.target.route === currentRoute ? " aria-current=\"page\"" : "";
|
|
477
493
|
const href = relativeHref(sourceFile, (0, paths_ts_1.staticPathForRoute)(page.target.route).posix);
|
|
494
|
+
const params = page.target.params;
|
|
495
|
+
const label = typeof params?.groupId === "string" ? params.groupId
|
|
496
|
+
: typeof params?.experimentId === "string" ? params.experimentId : page.target.route;
|
|
497
|
+
return `<li><a href="${escapeAttribute(href)}"${current}>${escapeText(label)}</a></li>`;
|
|
498
|
+
});
|
|
499
|
+
const hidden = locale === "zh-CN" ? " hidden" : "";
|
|
500
|
+
const label = locale === "zh-CN" ? "实验" : "Experiments";
|
|
501
|
+
return `<div class="niceeval-view-experiment" data-niceeval-locale="${locale}"${hidden}><label><span>${label}</span><select aria-label="${label}" data-niceeval-experiment-select>${options.join("")}</select></label><noscript><nav class="niceeval-view-nav" aria-label="${label}"><ul>${links.join("")}</ul></nav></noscript></div>`;
|
|
502
|
+
}
|
|
503
|
+
function renderNavigation(pages, currentRoute, sourceFile, locale) {
|
|
504
|
+
const groups = pages.filter((entry) => entry.role?.kind === "experiment-group").sort(compareSitePages);
|
|
505
|
+
const groupRoutes = new Set(groups.map((entry) => entry.page.target.route));
|
|
506
|
+
const selectedGroupRoute = groupRoutes.has(currentRoute) ? currentRoute : groups[0]?.page.target.route;
|
|
507
|
+
const items = pages.filter((entry) => entry.navigation).sort(compareSitePages).map(({ page }) => {
|
|
508
|
+
const targetRoute = page.target.route === "/" && selectedGroupRoute !== undefined
|
|
509
|
+
? selectedGroupRoute
|
|
510
|
+
: page.target.route;
|
|
511
|
+
const current = page.target.route === currentRoute || (page.target.route === "/" && groupRoutes.has(currentRoute))
|
|
512
|
+
? " aria-current=\"page\""
|
|
513
|
+
: "";
|
|
514
|
+
const href = relativeHref(sourceFile, (0, paths_ts_1.staticPathForRoute)(targetRoute).posix);
|
|
478
515
|
return `<li><a href="${escapeAttribute(href)}"${current}>${escapeText((0, locale_ts_1.resolveLocalizedText)(page.title, locale))}</a></li>`;
|
|
479
516
|
});
|
|
480
517
|
return `<ul>${items.join("")}</ul>`;
|
|
481
518
|
}
|
|
482
519
|
function renderProblems(problems, locale) {
|
|
483
|
-
|
|
520
|
+
const visible = problems.filter((problem) => !isGenericMissingSlotProblem(problem));
|
|
521
|
+
if (visible.length === 0)
|
|
484
522
|
return "";
|
|
485
523
|
const title = locale === "zh-CN" ? "数据说明" : "Data notes";
|
|
486
|
-
return `<aside class="niceeval-view-problems"><h2>${title}</h2><ul>${
|
|
524
|
+
return `<aside class="niceeval-view-problems"><h2>${title}</h2><ul>${visible.map((problem) => `<li><code>${escapeText(problem.code)}</code>${problem.summary === undefined ? "" : ` — ${escapeText(problem.summary)}`}</li>`).join("")}</ul></aside>`;
|
|
525
|
+
}
|
|
526
|
+
function isGenericMissingSlotProblem(problem) {
|
|
527
|
+
return problem.code === "analysis-missing" &&
|
|
528
|
+
problem.refs.length === 0 &&
|
|
529
|
+
problem.summary === "the selected logical Slot has no input value";
|
|
487
530
|
}
|
|
488
531
|
function projection(page, locale) {
|
|
489
532
|
const found = page.web.find((candidate) => candidate.locale === locale);
|
|
@@ -593,9 +636,13 @@ function inlineThemeStyles(theme) {
|
|
|
593
636
|
}
|
|
594
637
|
}).join("\n");
|
|
595
638
|
}
|
|
596
|
-
/**
|
|
639
|
+
/** A grouped site always opens a concrete comparison; other sites use their first navigable Page. */
|
|
597
640
|
function defaultRouteForSite(site) {
|
|
598
|
-
return site.pages
|
|
641
|
+
return [...site.pages]
|
|
642
|
+
.filter((entry) => entry.role?.kind === "experiment-group")
|
|
643
|
+
.sort(compareSitePages)[0]?.page.target.route
|
|
644
|
+
?? site.pages.find((entry) => entry.navigation)?.page.target.route
|
|
645
|
+
?? site.pages[0]?.page.target.route;
|
|
599
646
|
}
|
|
600
647
|
function closedProblemsFromFiles(files) {
|
|
601
648
|
const file = files.find((candidate) => candidate.path === PROBLEMS_PATH);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.js","sourceRoot":"","sources":["static.ts"],"names":[],"mapp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AAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IAC9F,CAAC;IACD,MAAM,WAAW,CAAC,UAAU,EAAE,0BAA0B,OAAO,KAAK,EAAE,CAAC,CAAC;AAC5E,CAAC;AACD,SAAS,WAAW,CAAC,SAA8C,EAAE,MAAc;IAC/E,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,0BAAmC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;AAC3F,CAAC;AACD,SAAS,kBAAkB,CAAC,KAAc;IACtC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,0BAA0B,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ;QACtG,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC;AACzC,CAAC;AACD,SAAS,aAAa,CAAC,KAAc;IACjC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,8BAA8B,CAAC;AAC5E,CAAC;AACD,SAAS,aAAa,CAAC,KAAc;IACjC,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnE,OAAO,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,mBAAmB,CAAC;AACzG,CAAC","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport { Context, Effect } from \"effect\";\nimport { REPORT_BUILD_RSS_BYTES_MAX, REPORT_BUILD_TIME_MS_MAX, REPORT_DIFF_ASSET_BYTES_MAX, REPORT_DOWNLOAD_FILE_BYTES_MAX, REPORT_DOWNLOAD_FILES_MAX, REPORT_PAGE_HTML_BYTES_MAX, REPORT_SOURCE_ASSET_BYTES_MAX, REPORT_SOURCE_DIFF_ASSET_BYTES_MAX, REPORT_SITE_HTML_BYTES_MAX, REPORT_STATIC_ASSET_BYTES_MAX, closedSiteRevisionData, compareUtf8, makeClosedSiteRevision, reportBuildBudgetExceeded, type ClosedSiteFile, type ClosedSiteRevision, type ReportBuildBudgetExceeded, } from \"../execution/model.ts\";\nimport { hostStaticPath, staticPathConflicts, staticPathForDownload, staticPathForRoute, validateDownloadPath, validateReportRoute, type ReportStaticPath, } from \"../execution/paths.ts\";\nimport type { ReportProblem } from \"../execution/machine.ts\";\nimport { resolveLocalizedText } from \"../model/locale.ts\";\nimport type { ResolvedPage, ResolvedPageAsset } from \"../runtime/resolved-page.ts\";\nimport { basalt, themeSourceBase, themeStylesheet, type ThemeDefinition, } from \"../theme.ts\";\nimport type { ClosedReportSite, ClosedSitePage } from \"./execute.ts\";\nimport { REPORT_REFRESH_RUNTIME_PATH, REPORT_STYLESHEET_PATH, } from \"./site-assets.ts\";\nimport { reportSiteRuntime } from \"./site-runtime.ts\";\nexport interface ReportHostOutputPath {\n readonly value: string;\n}\nexport interface ReportFileSystemError {\n readonly code: \"report-export-write-failed\";\n readonly operation: string;\n}\nexport interface ReportExportTargetExists {\n readonly code: \"report-export-target-exists\";\n}\nexport type ReportFileSystemFailure = ReportFileSystemError | ReportExportTargetExists;\nexport interface ReportFileSystemService {\n readonly prepareOutput: (out: string) => Effect.Effect<void, ReportFileSystemFailure>;\n readonly writeFile: (input: {\n readonly out: string;\n readonly path: ReportHostOutputPath;\n readonly bytes: Uint8Array;\n }) => Effect.Effect<void, ReportFileSystemFailure>;\n readonly writeCompleteMarker: (out: string) => Effect.Effect<void, ReportFileSystemFailure>;\n readonly syncDirectory: (out: string) => Effect.Effect<void, ReportFileSystemFailure>;\n}\nexport class ReportFileSystem extends Context.Tag(\"@niceeval/report/ReportFileSystem\")<ReportFileSystem, ReportFileSystemService>() {\n}\nexport interface ReportStaticExportReceipt {\n readonly out: string;\n /** Does not include the zero-byte publication marker. */\n readonly filesWritten: number;\n}\nexport interface ReportSiteBuildFailure {\n readonly code: \"report-site-build-failed\";\n readonly operation: \"render\" | \"identity\" | \"path\" | \"asset\" | \"download\";\n readonly reason: string;\n}\nexport type ReportSiteBuildError = ReportSiteBuildFailure | ReportBuildBudgetExceeded;\nexport type ReportExportError = ReportFileSystemFailure | ReportSiteBuildFailure;\n/** The one Host-owned static resource path for a closed Theme stylesheet. */\nexport const REPORT_THEME_STYLESHEET_PATH = \"_niceeval/theme.css\";\n/** The Host-owned renderer identity carried by every static revision. */\nexport const REPORT_STATIC_RENDERER = \"niceeval.report-ssg/v1\" as const;\nconst MANIFEST_PATH = \"_niceeval/manifest.json\";\nconst PROBLEMS_PATH = \"_niceeval/problems.json\";\nconst PROJECTIONS_PATH = \"_niceeval/data/projections.json\";\nconst COMPLETE_PATH = \"_niceeval/complete\";\nconst NICEEVAL_BRAND_HREF = \"https://niceeval.com/?utm_source=report&utm_medium=brand\";\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder();\nconst PRODUCT_STYLESHEET = readFileSync(new URL(\"../assets/styles.css\", __niceevalImportMetaUrl), \"utf8\");\nconst PRODUCT_ENHANCER = readFileSync(new URL(\"../assets/enhance.js\", __niceevalImportMetaUrl), \"utf8\");\n/**\n * Host-owned parameterized-Page dialog for the shared view/static runtime.\n * A click on a same-site `<pageId>/<key>/index.html` href writes the legacy\n * hash deep link and opens a native `<dialog>` filled with that standalone\n * detail document's own slot bytes. No-JS and direct hrefs keep reading the\n * same document. The route list comes from the revision's closed pages, not\n * from any author declaration. The report content inside the dialog is styled\n * by the existing product stylesheet; only the dialog chrome is styled here.\n */\nconst PARAM_PAGE_DIALOG_RUNTIME = `(() => {\n \"use strict\";\n if (typeof window === \"undefined\" || typeof HTMLDialogElement !== \"function\") return;\n if (location.protocol !== \"http:\" && location.protocol !== \"https:\") return;\n const routes = (document.documentElement.getAttribute(\"data-niceeval-param-routes\") || \"\")\n .split(\" \")\n .filter((value) => value.length > 0);\n if (routes.length === 0) return;\n const siteRoot = document.documentElement.getAttribute(\"data-niceeval-site-root\") || \"index.html\";\n\n function closest(target, selector) {\n return target && target.closest ? target.closest(selector) : null;\n }\n\n function escapeRegExp(value) {\n const special = \".+*?^$()[]{}|\";\n let escaped = \"\";\n for (const character of value) {\n if (special.includes(character) || character.charCodeAt(0) === 92) {\n escaped += String.fromCharCode(92);\n }\n escaped += character;\n }\n return escaped;\n }\n\n function matchTarget(url) {\n if (url.origin !== location.origin) return null;\n for (const prefix of routes) {\n const root = new URL(siteRoot, document.baseURI);\n const pattern = new RegExp(\"^\" + escapeRegExp(new URL(prefix + \"/\", root).pathname) + \"([^/]+)/index\\\\\\\\.html$\");\n const match = pattern.exec(url.pathname);\n if (!match) continue;\n let key;\n try {\n key = decodeURIComponent(match[1]);\n } catch {\n return null;\n }\n if (!key || key.includes(\"/\")) return null;\n return { prefix, key, url };\n }\n return null;\n }\n\n function targetFromHash() {\n const match = location.hash.startsWith(\"#/\") ? location.hash.slice(2).split(\"/\") : [];\n if (match.length !== 2 || !routes.includes(match[0]) || !match[1]) return null;\n const root = new URL(siteRoot, document.baseURI);\n return {\n prefix: match[0],\n key: match[1],\n url: new URL(match[0] + \"/\" + encodeURIComponent(match[1]) + \"/index.html\", root),\n };\n }\n\n function hashForTarget(target) {\n return \"#/\" + target.prefix + \"/\" + target.key;\n }\n\n function currentLocale() {\n return document.documentElement.lang === \"zh-CN\" ? \"zh-CN\" : \"en\";\n }\n\n function rebaseSlotUrls(slot, responseUrl) {\n for (const element of slot.querySelectorAll(\"[href], [src]\")) {\n for (const attribute of [\"href\", \"src\"]) {\n const value = element.getAttribute(attribute);\n if (value === null) continue;\n // Fragment and non-document schemes retain their literal browser\n // meaning. Every other relative reference must keep the fetched\n // detail document as its base after this slot moves into the root\n // page's dialog.\n if (value.startsWith(\"#\") || /^(?:data:|mailto:|tel:)/i.test(value)) continue;\n try {\n element.setAttribute(attribute, new URL(value, responseUrl).href);\n } catch {\n // Leave malformed author data untouched; the standalone document\n // would have the same browser-level handling.\n }\n }\n }\n }\n\n function extractDocument(html, locale, responseUrl) {\n const parsed = new DOMParser().parseFromString(html, \"text/html\");\n const slot = parsed.querySelector('.niceeval-view-report-slot[data-niceeval-locale=\"' + locale + '\"]');\n if (!slot) return null;\n rebaseSlotUrls(slot, responseUrl);\n return { title: parsed.title, content: slot.innerHTML };\n }\n\n let dialog = null;\n let ownsHistory = false;\n let requestRevision = 0;\n let requestedTarget = null;\n\n function ensureDialog() {\n if (dialog !== null) return;\n dialog = document.createElement(\"dialog\");\n dialog.className = \"niceeval-view-dialog\";\n const head = document.createElement(\"div\");\n head.className = \"niceeval-view-dialog-head\";\n const title = document.createElement(\"span\");\n title.className = \"niceeval-view-dialog-title\";\n title.id = \"niceeval-view-dialog-title\";\n const close = document.createElement(\"button\");\n close.type = \"button\";\n close.className = \"niceeval-view-dialog-close\";\n close.setAttribute(\"aria-label\", \"Close\");\n // Keep the static host visually identical to the legacy React/Radix\n // dialog. The old DialogClose renders a literal x, rather than the\n // typographic multiplication sign.\n close.textContent = \"x\";\n close.addEventListener(\"click\", closeFromUi);\n head.appendChild(title);\n head.appendChild(close);\n const body = document.createElement(\"div\");\n body.className = \"niceeval-view-dialog-body niceeval-view-report-slot\";\n dialog.appendChild(head);\n dialog.appendChild(body);\n dialog.setAttribute(\"aria-labelledby\", title.id);\n dialog.addEventListener(\"click\", (event) => {\n if (event.target === dialog) closeFromUi();\n });\n dialog.addEventListener(\"cancel\", (event) => {\n event.preventDefault();\n closeFromUi();\n });\n document.body.appendChild(dialog);\n }\n\n function closeFromUi() {\n if (dialog === null || !dialog.open) return;\n requestedTarget = null;\n requestRevision++;\n if (!ownsHistory) {\n dialog.close();\n history.replaceState(null, \"\", location.pathname + location.search);\n return;\n }\n ownsHistory = false;\n history.back();\n }\n\n function openTarget(target, nextOwnsHistory) {\n ensureDialog();\n requestedTarget = target;\n const revision = ++requestRevision;\n fetch(target.url.href, { credentials: \"same-origin\" })\n .then((response) => {\n if (!response.ok) throw new Error(\"http \" + response.status);\n return response.text().then((html) => ({ html, responseUrl: response.url || target.url.href }));\n })\n .then(({ html, responseUrl }) => {\n if (revision !== requestRevision || requestedTarget !== target) return;\n const extracted = extractDocument(html, currentLocale(), responseUrl);\n if (extracted === null) {\n location.href = target.url.href;\n return;\n }\n dialog.querySelector(\".niceeval-view-dialog-title\").textContent = extracted.title;\n dialog.querySelector(\".niceeval-view-dialog-close\").setAttribute(\n \"aria-label\",\n currentLocale() === \"zh-CN\" ? \"关闭\" : \"Close\",\n );\n dialog.querySelector(\".niceeval-view-dialog-body\").innerHTML = extracted.content;\n if (!dialog.open) dialog.showModal();\n ownsHistory = nextOwnsHistory;\n })\n .catch(() => {\n if (revision === requestRevision && requestedTarget === target) location.href = target.url.href;\n });\n }\n\n function onHashChange() {\n const target = targetFromHash();\n if (target !== null) {\n openTarget(target, true);\n return;\n }\n requestedTarget = null;\n requestRevision++;\n ownsHistory = false;\n if (dialog !== null && dialog.open) dialog.close();\n }\n\n const initialTarget = targetFromHash();\n if (initialTarget !== null) openTarget(initialTarget, false);\n window.addEventListener(\"hashchange\", onHashChange);\n window.addEventListener(\"popstate\", () => {\n if (location.hash) return;\n onHashChange();\n });\n\n document.addEventListener(\"click\", (event) => {\n if (event.defaultPrevented || event.button !== 0) return;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n const anchor = closest(event.target, \"a[href]\");\n if (!anchor) return;\n const anchorTarget = anchor.getAttribute(\"target\");\n if (anchorTarget !== null && anchorTarget !== \"_self\") return;\n if (anchor.hasAttribute(\"download\")) return;\n let url;\n try {\n url = new URL(anchor.getAttribute(\"href\"), document.baseURI);\n } catch {\n return;\n }\n const target = matchTarget(url);\n if (target === null) return;\n event.preventDefault();\n location.hash = hashForTarget(target);\n });\n})();`;\n/** Forms one byte-complete revision; neither view nor static renders afterward. */\nexport function buildSiteRevision(input: {\n readonly site: ClosedReportSite;\n readonly theme?: ThemeDefinition;\n}): Effect.Effect<ClosedSiteRevision, ReportSiteBuildError> {\n return Effect.try({\n try: () => {\n const files = buildSiteFiles(input.site, input.theme ?? input.site.theme ?? basalt);\n assertFinalBuildBudgets(input.site.startedAtMs, input.site.baselineRssBytes);\n const defaultRoute = defaultRouteForSite(input.site);\n return signClosedSiteRevision({\n sampleIdentity: input.site.sampleIdentity,\n reportIdentity: input.site.reportIdentity,\n files,\n routes: input.site.pages.map(({ page }) => page.target.route),\n ...(defaultRoute === undefined ? {} : { defaultRoute }),\n });\n },\n catch: (cause): ReportSiteBuildError => isBudgetError(cause)\n ? cause\n : siteFailure(isSiteBuildFailure(cause) ? cause.operation : \"render\", isSiteBuildFailure(cause) ? cause.reason : boundedReason(cause)),\n });\n}\n/**\n * Host-only final signer for a byte-complete static site. It derives the\n * problem table from the closed `_niceeval/problems.json` resource, so callers\n * which retain only closed bytes never need to retain revision problem values.\n */\nexport function signClosedSiteRevision(input: {\n readonly sampleIdentity: string;\n readonly reportIdentity: string;\n readonly files: readonly ClosedSiteFile[];\n readonly routes: readonly string[];\n readonly defaultRoute?: string;\n}): ClosedSiteRevision {\n const files = Object.freeze([...input.files].sort((left, right) => compareUtf8(left.path, right.path)));\n const problems = closedProblemsFromFiles(files);\n return makeClosedSiteRevision({\n contentHash: siteRevisionIdentity({\n sampleIdentity: input.sampleIdentity,\n reportIdentity: input.reportIdentity,\n files,\n ...(input.defaultRoute === undefined ? {} : { defaultRoute: input.defaultRoute }),\n problems,\n }),\n files,\n routes: input.routes,\n ...(input.defaultRoute === undefined ? {} : { defaultRoute: input.defaultRoute }),\n problems,\n });\n}\n/**\n * Closes exactly the stylesheet bytes used by the static builder. Watch cache\n * code may request these bytes but must not reproduce Theme asset resolution.\n */\nexport function closeStaticThemeStylesheet(theme: ThemeDefinition): Uint8Array {\n return encoder.encode(`${themeStylesheet(theme)}\\n${inlineThemeStyles(theme)}\\n`);\n}\nfunction assertFinalBuildBudgets(startedAtMs: number, baselineRssBytes: number): void {\n const elapsed = Date.now() - startedAtMs;\n if (elapsed > REPORT_BUILD_TIME_MS_MAX) {\n throw reportBuildBudgetExceeded(\"build-time\", REPORT_BUILD_TIME_MS_MAX, elapsed);\n }\n const rssGrowth = Math.max(0, process.memoryUsage().rss - baselineRssBytes);\n if (rssGrowth > REPORT_BUILD_RSS_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"build-rss\", REPORT_BUILD_RSS_BYTES_MAX, rssGrowth);\n }\n}\n/** Writes only the immutable revision mapping, then publishes its marker last. */\nexport function exportStaticReport(input: {\n readonly revision: ClosedSiteRevision;\n readonly out: string;\n}): Effect.Effect<ReportStaticExportReceipt, ReportExportError, ReportFileSystem> {\n return Effect.gen(function* () {\n const files = closedSiteRevisionData(input.revision).files;\n const fileSystem = yield* ReportFileSystem;\n yield* fileSystem.prepareOutput(input.out);\n let written = 0;\n for (const file of files) {\n if (file.path === COMPLETE_PATH)\n continue;\n yield* fileSystem.writeFile({\n out: input.out,\n path: Object.freeze({ value: file.path }),\n bytes: file.bytes,\n });\n written += 1;\n }\n yield* fileSystem.writeCompleteMarker(input.out);\n yield* fileSystem.syncDirectory(input.out);\n return Object.freeze({ out: input.out, filesWritten: written });\n });\n}\nfunction buildSiteFiles(site: ClosedReportSite, theme: ThemeDefinition): readonly ClosedSiteFile[] {\n const files = new Map<string, ClosedSiteFile>();\n const paths: ReportStaticPath[] = [];\n const add = (file: ClosedSiteFile, owner: ReportStaticPath): void => {\n const prior = files.get(file.path);\n if (prior !== undefined) {\n if (prior.mediaType === file.mediaType && bytesEqual(prior.bytes, file.bytes))\n return;\n throw siteFailure(\"path\", `two site resources produce ${file.path}`);\n }\n files.set(file.path, file);\n paths.push(owner);\n };\n const stylesheet = textFile(REPORT_STYLESHEET_PATH, PRODUCT_STYLESHEET, \"text/css; charset=utf-8\");\n const themeFile = binaryFile(REPORT_THEME_STYLESHEET_PATH, \"text/css; charset=utf-8\", closeStaticThemeStylesheet(theme));\n const runtime = textFile(REPORT_REFRESH_RUNTIME_PATH, `${reportSiteRuntime(PRODUCT_ENHANCER).trimEnd()}\\n${PARAM_PAGE_DIALOG_RUNTIME}\\n`, \"text/javascript; charset=utf-8\");\n add(stylesheet, hostStaticPath(stylesheet.path));\n add(themeFile, hostStaticPath(themeFile.path));\n add(runtime, hostStaticPath(runtime.path));\n const pages = [...site.pages].sort(compareSitePages);\n const paramRoutes = parameterizedRoutePrefixes(site);\n let siteHtmlBytes = 0;\n for (const entry of pages) {\n assertFinalBuildBudgets(site.startedAtMs, site.baselineRssBytes);\n const routeIssue = validateReportRoute(entry.page.target.route);\n if (routeIssue !== undefined || entry.page.target.route === \"/_niceeval\" ||\n entry.page.target.route.startsWith(\"/_niceeval/\")) {\n throw siteFailure(\"path\", routeIssue?.reason ?? \"author routes cannot occupy /_niceeval\");\n }\n const output = staticPathForRoute(entry.page.target.route);\n const pageFile = textFile(output.posix, renderPage(site, entry, paramRoutes), \"text/html; charset=utf-8\");\n if (pageFile.bytes.byteLength > REPORT_PAGE_HTML_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"page-html-bytes\", REPORT_PAGE_HTML_BYTES_MAX, pageFile.bytes.byteLength, { pageId: entry.page.target.pageId, route: entry.page.target.route });\n }\n siteHtmlBytes += pageFile.bytes.byteLength;\n if (siteHtmlBytes > REPORT_SITE_HTML_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"site-html-bytes\", REPORT_SITE_HTML_BYTES_MAX, siteHtmlBytes);\n }\n add(pageFile, output);\n for (const asset of entry.page.assets)\n addPageAsset(add, asset);\n }\n const downloads = collectDownloads(site.pages);\n if (downloads.length > REPORT_DOWNLOAD_FILES_MAX) {\n throw reportBuildBudgetExceeded(\"download-files\", REPORT_DOWNLOAD_FILES_MAX, downloads.length);\n }\n for (const download of downloads) {\n if (download.bytes.byteLength > REPORT_DOWNLOAD_FILE_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"download-file-bytes\", REPORT_DOWNLOAD_FILE_BYTES_MAX, download.bytes.byteLength);\n }\n const invalid = validateDownloadPath(download.path);\n if (invalid !== undefined)\n throw siteFailure(\"download\", invalid.reason);\n const output = staticPathForDownload(download.path);\n add(binaryFile(output.posix, download.mediaType, download.bytes), output);\n }\n const problems = textFile(PROBLEMS_PATH, `${canonicalJson(site.problems)}\\n`, \"application/json; charset=utf-8\");\n add(problems, hostStaticPath(problems.path));\n // Every closed site revision carries its projections document: the same\n // canonical bytes view serves and static export writes, and the same file\n // that enters the revision content hash below.\n const projections = textFile(PROJECTIONS_PATH, `${canonicalJson(site.projections)}\\n`, \"application/json; charset=utf-8\");\n add(projections, hostStaticPath(projections.path));\n assertAssetBudgets(files, site.pages);\n const manifestValue = Object.freeze({\n format: \"niceeval.report-static/v1\",\n sampleIdentity: site.sampleIdentity,\n reportIdentity: site.reportIdentity,\n pages: pages.map((entry) => Object.freeze({\n pageId: entry.page.target.pageId,\n route: entry.page.target.route,\n path: staticPathForRoute(entry.page.target.route).posix,\n navigation: entry.navigation,\n })),\n files: [...files.keys(), MANIFEST_PATH, COMPLETE_PATH].sort(compareUtf8),\n stylesheet: REPORT_STYLESHEET_PATH,\n theme: REPORT_THEME_STYLESHEET_PATH,\n runtime: REPORT_REFRESH_RUNTIME_PATH,\n problems: PROBLEMS_PATH,\n projections: PROJECTIONS_PATH,\n });\n const manifest = textFile(MANIFEST_PATH, `${canonicalJson(manifestValue)}\\n`, \"application/json; charset=utf-8\");\n add(manifest, hostStaticPath(manifest.path));\n add(binaryFile(COMPLETE_PATH, \"application/octet-stream\", new Uint8Array()), hostStaticPath(COMPLETE_PATH));\n const conflicts = staticPathConflicts(paths);\n if (conflicts.length > 0) {\n const first = conflicts[0]!;\n throw siteFailure(\"path\", `${first.kind} collision between ${first.left.posix} and ${first.right.posix}`);\n }\n return Object.freeze([...files.values()].sort((left, right) => compareUtf8(left.path, right.path)));\n}\n/**\n * The closed parameterized Page route prefixes of this site (the instance\n * route minus its final key segment, without the leading slash). The shared\n * dialog runtime uses them to recognize same-site detail hrefs.\n */\nfunction parameterizedRoutePrefixes(site: ClosedReportSite): readonly string[] {\n const prefixes = new Set<string>();\n for (const entry of site.pages) {\n if (entry.page.target.params === undefined)\n continue;\n const route = entry.page.target.route;\n const cut = route.lastIndexOf(\"/\");\n prefixes.add(route.slice(1, cut));\n }\n return Object.freeze([...prefixes].sort(compareUtf8));\n}\nfunction renderPage(site: ClosedReportSite, entry: ClosedSitePage, paramRoutes: readonly string[]): string {\n const page = entry.page;\n const output = staticPathForRoute(page.target.route).posix;\n const stylesheetHref = relativeHref(output, REPORT_STYLESHEET_PATH);\n const themeHref = relativeHref(output, REPORT_THEME_STYLESHEET_PATH);\n const runtimeHref = relativeHref(output, REPORT_REFRESH_RUNTIME_PATH);\n const titleEn = resolveLocalizedText(page.title, \"en\");\n const titleZh = resolveLocalizedText(page.title, \"zh-CN\");\n const authorHead = renderHead(page, output);\n const rendererAssets = page.assets.map((asset) => asset.kind === \"style\"\n ? `<link rel=\"stylesheet\" href=\"${escapeAttribute(relativeHref(output, asset.path))}\">`\n : asset.kind === \"script\"\n ? `<script src=\"${escapeAttribute(relativeHref(output, asset.path))}\" defer></script>`\n : \"\").join(\"\");\n const bodyEn = projection(page, \"en\");\n const bodyZh = projection(page, \"zh-CN\");\n const navigationEn = renderNavigation(site.pages, page.target.route, output, \"en\");\n const navigationZh = renderNavigation(site.pages, page.target.route, output, \"zh-CN\");\n const problemsEn = renderProblems(site.problems, \"en\");\n const problemsZh = renderProblems(site.problems, \"zh-CN\");\n const paramRoutesAttr = paramRoutes.length === 0\n ? \"\"\n : ` data-niceeval-param-routes=\"${escapeAttribute(paramRoutes.join(\" \"))}\"`;\n const siteRootHref = relativeHref(output, \"index.html\");\n return `<!doctype html><html class=\"niceeval-view-document\" lang=\"en\" data-niceeval-title-en=\"${escapeAttribute(titleEn)}\" data-niceeval-title-zh-cn=\"${escapeAttribute(titleZh)}\" data-niceeval-site-root=\"${escapeAttribute(siteRootHref)}\"${paramRoutesAttr}><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><title>${escapeText(titleEn)}</title><link rel=\"stylesheet\" href=\"${escapeAttribute(stylesheetHref)}\"><link rel=\"stylesheet\" href=\"${escapeAttribute(themeHref)}\">${authorHead}${rendererAssets}<script src=\"${escapeAttribute(runtimeHref)}\" defer></script></head><body><header class=\"niceeval-view-shell\"><a class=\"niceeval-view-brand\" href=\"${escapeAttribute(NICEEVAL_BRAND_HREF)}\" target=\"_blank\" rel=\"noopener\"><span class=\"niceeval-view-mark\" aria-hidden=\"true\"></span><span>NiceEval</span></a><nav class=\"niceeval-view-nav\" data-niceeval-locale=\"en\" aria-label=\"Report pages\">${navigationEn}</nav><nav class=\"niceeval-view-nav\" data-niceeval-locale=\"zh-CN\" aria-label=\"报告页面\" hidden>${navigationZh}</nav><div class=\"niceeval-view-locale\" aria-label=\"Language\"><button class=\"is-active\" type=\"button\" data-niceeval-locale-button=\"en\" aria-pressed=\"true\">EN</button><button type=\"button\" data-niceeval-locale-button=\"zh-CN\" aria-pressed=\"false\">中文</button></div></header><main class=\"niceeval-view-main\"><div class=\"niceeval-view-report-slot\" data-niceeval-locale=\"en\" data-page-id=\"${escapeAttribute(page.target.pageId)}\">${bodyEn}${problemsEn}</div><div class=\"niceeval-view-report-slot\" data-niceeval-locale=\"zh-CN\" data-page-id=\"${escapeAttribute(page.target.pageId)}\" hidden>${bodyZh}${problemsZh}</div><noscript><p class=\"niceeval-view-noscript\">This report remains readable without JavaScript; language selection is unavailable.</p></noscript></main></body></html>`;\n}\nfunction renderNavigation(pages: readonly ClosedSitePage[], currentRoute: string, sourceFile: string, locale: string): string {\n const items = pages.filter((entry) => entry.navigation).sort(compareSitePages).map(({ page }) => {\n const current = page.target.route === currentRoute ? \" aria-current=\\\"page\\\"\" : \"\";\n const href = relativeHref(sourceFile, staticPathForRoute(page.target.route).posix);\n return `<li><a href=\"${escapeAttribute(href)}\"${current}>${escapeText(resolveLocalizedText(page.title, locale))}</a></li>`;\n });\n return `<ul>${items.join(\"\")}</ul>`;\n}\nfunction renderProblems(problems: readonly ReportProblem[], locale: string): string {\n if (problems.length === 0)\n return \"\";\n const title = locale === \"zh-CN\" ? \"数据说明\" : \"Data notes\";\n return `<aside class=\"niceeval-view-problems\"><h2>${title}</h2><ul>${problems.map((problem) => `<li><code>${escapeText(problem.code)}</code>${problem.summary === undefined ? \"\" : ` — ${escapeText(problem.summary)}`}</li>`).join(\"\")}</ul></aside>`;\n}\nfunction projection(page: ResolvedPage, locale: string): string {\n const found = page.web.find((candidate) => candidate.locale === locale);\n if (found === undefined)\n throw siteFailure(\"render\", `Page ${page.target.pageId} lacks ${locale} web projection`);\n return found.html;\n}\nfunction renderHead(page: ResolvedPage, sourceFile: string): string {\n if (!Array.isArray(page.head))\n return \"\";\n return page.head.map((raw) => {\n if (!isRecord(raw) || typeof raw.tag !== \"string\")\n return \"\";\n const attrs = renderAttributes(raw.attrs, sourceFile, raw.tag);\n switch (raw.tag) {\n case \"meta\":\n case \"link\":\n return `<${raw.tag}${attrs}>`;\n case \"style\":\n return typeof raw.children === \"string\" ? `<style${attrs}>${raw.children}</style>` : \"\";\n case \"script\":\n return typeof raw.children === \"string\"\n ? `<script${attrs}>${raw.children}</script>`\n : `<script${attrs}></script>`;\n default:\n return \"\";\n }\n }).join(\"\");\n}\nfunction renderAttributes(value: unknown, sourceFile: string, tag: string): string {\n if (!isRecord(value))\n return \"\";\n return Object.entries(value).sort(([left], [right]) => compareUtf8(left, right)).map(([name, raw]) => {\n const normalized = (tag === \"link\" && name === \"href\") || (tag === \"script\" && name === \"src\")\n ? typeof raw === \"string\" && isLocalReference(raw) ? relativeHref(sourceFile, raw) : raw\n : raw;\n return normalized === true\n ? ` ${escapeAttribute(name)}`\n : typeof normalized === \"string\"\n ? ` ${escapeAttribute(name)}=\"${escapeAttribute(normalized)}\"`\n : \"\";\n }).join(\"\");\n}\nfunction isLocalReference(value: string): boolean {\n return !/^[a-z][a-z0-9+.-]*:/iu.test(value) && !value.startsWith(\"//\") && !value.startsWith(\"/\");\n}\nfunction addPageAsset(add: (file: ClosedSiteFile, owner: ReportStaticPath) => void, asset: ResolvedPageAsset): void {\n const path = asset.path;\n if (path.startsWith(\"/\") || path.includes(\"\\\\\") || path.split(\"/\").some((segment) => segment.length === 0 || segment === \".\" || segment === \"..\"))\n throw siteFailure(\"asset\", `invalid asset path ${path}`);\n add(binaryFile(path, asset.mediaType, asset.bytes), hostStaticPath(path));\n}\nfunction collectDownloads(pages: readonly ClosedSitePage[]): readonly ResolvedPage[\"downloads\"][number][] {\n const byPath = new Map<string, ResolvedPage[\"downloads\"][number]>();\n for (const { page } of pages) {\n for (const download of page.downloads) {\n const prior = byPath.get(download.path);\n if (prior !== undefined && (prior.mediaType !== download.mediaType || !bytesEqual(prior.bytes, download.bytes))) {\n throw siteFailure(\"download\", `two downloads produce ${download.path}`);\n }\n if (prior === undefined)\n byPath.set(download.path, download);\n }\n }\n return Object.freeze([...byPath.values()].sort((left, right) => compareUtf8(left.path, right.path)));\n}\nfunction assertAssetBudgets(files: ReadonlyMap<string, ClosedSiteFile>, pages: readonly ClosedSitePage[]): void {\n const assetsByPath = new Map<string, ResolvedPageAsset>();\n for (const { page } of pages)\n for (const asset of page.assets)\n assetsByPath.set(asset.path, asset);\n let sourceDiffBytes = 0;\n for (const asset of assetsByPath.values()) {\n if (asset.kind === \"source\" && asset.byteLength > REPORT_SOURCE_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"source-asset-bytes\", REPORT_SOURCE_ASSET_BYTES_MAX, asset.byteLength);\n }\n if (asset.kind === \"diff\" && asset.byteLength > REPORT_DIFF_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"diff-asset-bytes\", REPORT_DIFF_ASSET_BYTES_MAX, asset.byteLength);\n }\n if (asset.kind === \"source\" || asset.kind === \"diff\")\n sourceDiffBytes += asset.byteLength;\n }\n if (sourceDiffBytes > REPORT_SOURCE_DIFF_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"source-diff-asset-bytes\", REPORT_SOURCE_DIFF_ASSET_BYTES_MAX, sourceDiffBytes);\n }\n const assetBytes = [...files.values()]\n .filter((file) => !file.path.endsWith(\"index.html\") && !file.path.startsWith(\"downloads/\") &&\n file.path !== PROBLEMS_PATH)\n .reduce((total, file) => total + file.bytes.byteLength, 0);\n if (assetBytes > REPORT_STATIC_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"static-asset-bytes\", REPORT_STATIC_ASSET_BYTES_MAX, assetBytes);\n }\n}\nfunction inlineThemeStyles(theme: ThemeDefinition): string {\n return (theme.styles ?? []).map((asset) => {\n if (\"inline\" in asset)\n return asset.inline;\n const base = themeSourceBase(theme);\n if (base === undefined) {\n throw siteFailure(\"asset\", `theme asset ${asset.src} has no trusted module base`);\n }\n try {\n return readFileSync(resolve(base, asset.src), \"utf8\");\n }\n catch (cause) {\n throw siteFailure(\"asset\", `theme asset ${asset.src} could not be read: ${boundedReason(cause)}`);\n }\n }).join(\"\\n\");\n}\n/** Uses show's first navigable Page, then the first closed route as a fallback. */\nfunction defaultRouteForSite(site: ClosedReportSite): string | undefined {\n return site.pages.find((entry) => entry.navigation)?.page.target.route ?? site.pages[0]?.page.target.route;\n}\nfunction closedProblemsFromFiles(files: readonly ClosedSiteFile[]): readonly ReportProblem[] {\n const file = files.find((candidate) => candidate.path === PROBLEMS_PATH);\n if (file === undefined || file.mediaType !== \"application/json; charset=utf-8\") {\n throw siteFailure(\"identity\", \"closed site is missing its canonical problems resource\");\n }\n let raw: unknown;\n try {\n raw = JSON.parse(decoder.decode(file.bytes));\n }\n catch (cause) {\n throw siteFailure(\"identity\", `closed problems resource is invalid JSON: ${boundedReason(cause)}`);\n }\n if (!Array.isArray(raw)) {\n throw siteFailure(\"identity\", \"closed problems resource must be an array\");\n }\n const problems = raw.map((value, index): ReportProblem => {\n if (!isRecord(value) || typeof value.code !== \"string\" || !Array.isArray(value.path) ||\n !Array.isArray(value.refs) || !value.path.every((part) => typeof part === \"string\") ||\n !value.refs.every((ref) => typeof ref === \"string\") ||\n (value.summary !== undefined && typeof value.summary !== \"string\")) {\n throw siteFailure(\"identity\", `closed problems resource has an invalid entry at index ${index}`);\n }\n return Object.freeze({\n code: value.code,\n path: Object.freeze([...value.path]),\n refs: Object.freeze([...value.refs]),\n ...(value.summary === undefined ? {} : { summary: value.summary }),\n });\n });\n const canonical = encoder.encode(`${canonicalJson(problems)}\\n`);\n if (!bytesEqual(file.bytes, canonical)) {\n throw siteFailure(\"identity\", \"closed problems resource is not canonical\");\n }\n return Object.freeze(problems);\n}\nfunction siteRevisionIdentity(input: {\n readonly sampleIdentity: string;\n readonly reportIdentity: string;\n readonly files: readonly ClosedSiteFile[];\n readonly defaultRoute?: string;\n readonly problems: readonly ReportProblem[];\n}): string {\n const hash = createHash(\"sha256\");\n hash.update(canonicalJson({\n format: \"niceeval.report-site-revision/v1\",\n renderer: REPORT_STATIC_RENDERER,\n sampleIdentity: input.sampleIdentity,\n reportIdentity: input.reportIdentity,\n ...(input.defaultRoute === undefined ? {} : { defaultRoute: input.defaultRoute }),\n problems: input.problems,\n }));\n hash.update(\"\\0\");\n for (const file of input.files) {\n hash.update(file.path);\n hash.update(\"\\0\");\n hash.update(file.mediaType);\n hash.update(\"\\0\");\n hash.update(file.bytes);\n hash.update(\"\\0\");\n }\n return hash.digest(\"hex\");\n}\nfunction relativeHref(sourceFile: string, targetFile: string): string {\n const source = sourceFile.split(\"/\");\n source.pop();\n const target = targetFile.split(\"/\");\n let common = 0;\n while (common < source.length && common < target.length && source[common] === target[common])\n common += 1;\n const value = [...source.slice(common).map(() => \"..\"), ...target.slice(common)].join(\"/\");\n return value || \"./\";\n}\nfunction compareSitePages(left: ClosedSitePage, right: ClosedSitePage): number {\n return compareUtf8(left.page.target.route, right.page.target.route) ||\n compareUtf8(left.page.target.pageId, right.page.target.pageId);\n}\nfunction textFile(path: string, text: string, mediaType: string): ClosedSiteFile {\n return Object.freeze({ path, mediaType, bytes: encoder.encode(text) });\n}\nfunction binaryFile(path: string, mediaType: string, bytes: Uint8Array): ClosedSiteFile {\n return Object.freeze({ path, mediaType, bytes: new Uint8Array(bytes) });\n}\nfunction bytesEqual(left: Uint8Array, right: Uint8Array): boolean {\n return left.byteLength === right.byteLength && left.every((byte, index) => byte === right[index]);\n}\nfunction escapeText(value: string): string {\n return value.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\").replaceAll(\">\", \">\");\n}\nfunction escapeAttribute(value: string): string {\n return escapeText(value).replaceAll('\"', \""\").replaceAll(\"'\", \"'\");\n}\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction canonicalJson(value: unknown): string {\n if (value === null)\n return \"null\";\n if (typeof value === \"string\" || typeof value === \"boolean\")\n return JSON.stringify(value);\n if (typeof value === \"number\") {\n if (!Number.isFinite(value))\n throw siteFailure(\"identity\", \"canonical JSON rejects non-finite numbers\");\n return JSON.stringify(Object.is(value, -0) ? 0 : value);\n }\n if (Array.isArray(value))\n return `[${value.map(canonicalJson).join(\",\")}]`;\n if (isRecord(value)) {\n return `{${Object.entries(value).filter(([, entry]) => entry !== undefined)\n .sort(([left], [right]) => compareUtf8(left, right))\n .map(([key, entry]) => `${JSON.stringify(key)}:${canonicalJson(entry)}`).join(\",\")}}`;\n }\n throw siteFailure(\"identity\", `canonical JSON rejects ${typeof value}`);\n}\nfunction siteFailure(operation: ReportSiteBuildFailure[\"operation\"], reason: string): ReportSiteBuildFailure {\n return Object.freeze({ code: \"report-site-build-failed\" as const, operation, reason });\n}\nfunction isSiteBuildFailure(value: unknown): value is ReportSiteBuildFailure {\n return isRecord(value) && value.code === \"report-site-build-failed\" && typeof value.operation === \"string\" &&\n typeof value.reason === \"string\";\n}\nfunction isBudgetError(value: unknown): value is ReportBuildBudgetExceeded {\n return isRecord(value) && value.code === \"report-build-budget-exceeded\";\n}\nfunction boundedReason(cause: unknown): string {\n const raw = cause instanceof Error ? cause.message : String(cause);\n return raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"site build failed\";\n}\n"]}
|
|
1
|
+
{"version":3,"file":"static.js","sourceRoot":"","sources":["static.ts"],"names":[],"mappings":";;;AA8RA,8CAqBC;AAMD,wDAsBC;AAKD,gEAEC;AAYD,gDAuBC;AAzXD,6CAAyC;AACzC,qCAAuC;AACvC,yCAAoC;AACpC,mCAAyC;AACzC,oDAAsf;AACtf,oDAA0L;AAE1L,kDAA0D;AAE1D,0CAA8F;AAE9F,qDAAwF;AACxF,uDAAsD;AAsBtD,MAAa,gBAAiB,SAAQ,gBAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,EAA6C;CAClI;AADD,4CACC;AAaD,6EAA6E;AAChE,QAAA,4BAA4B,GAAG,qBAAqB,CAAC;AAClE,yEAAyE;AAC5D,QAAA,sBAAsB,GAAG,wBAAiC,CAAC;AACxE,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,gBAAgB,GAAG,iCAAiC,CAAC;AAC3D,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAC3C,MAAM,mBAAmB,GAAG,0DAA0D,CAAC;AACvF,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,kBAAkB,GAAG,IAAA,sBAAY,EAAC,IAAI,GAAG,CAAC,sBAAsB,EAAE,uBAAuB,CAAC,EAAE,MAAM,CAAC,CAAC;AAC1G,MAAM,gBAAgB,GAAG,IAAA,sBAAY,EAAC,IAAI,GAAG,CAAC,sBAAsB,EAAE,uBAAuB,CAAC,EAAE,MAAM,CAAC,CAA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AAK,0BAA0B,IAAI,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ;QACtG,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC;AACzC,CAAC;AACD,SAAS,aAAa,CAAC,KAAc;IACjC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,8BAA8B,CAAC;AAC5E,CAAC;AACD,SAAS,aAAa,CAAC,KAAc;IACjC,MAAM,GAAG,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnE,OAAO,GAAG,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,mBAAmB,CAAC;AACzG,CAAC","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport { Context, Effect } from \"effect\";\nimport { REPORT_BUILD_RSS_BYTES_MAX, REPORT_BUILD_TIME_MS_MAX, REPORT_DIFF_ASSET_BYTES_MAX, REPORT_DOWNLOAD_FILE_BYTES_MAX, REPORT_DOWNLOAD_FILES_MAX, REPORT_PAGE_HTML_BYTES_MAX, REPORT_SOURCE_ASSET_BYTES_MAX, REPORT_SOURCE_DIFF_ASSET_BYTES_MAX, REPORT_SITE_HTML_BYTES_MAX, REPORT_STATIC_ASSET_BYTES_MAX, closedSiteRevisionData, compareUtf8, makeClosedSiteRevision, reportBuildBudgetExceeded, type ClosedSiteFile, type ClosedSiteRevision, type ReportBuildBudgetExceeded, } from \"../execution/model.ts\";\nimport { hostStaticPath, staticPathConflicts, staticPathForDownload, staticPathForRoute, validateDownloadPath, validateReportRoute, type ReportStaticPath, } from \"../execution/paths.ts\";\nimport type { ReportProblem } from \"../execution/machine.ts\";\nimport { resolveLocalizedText } from \"../model/locale.ts\";\nimport type { ResolvedPage, ResolvedPageAsset } from \"../runtime/resolved-page.ts\";\nimport { basalt, themeSourceBase, themeStylesheet, type ThemeDefinition, } from \"../theme.ts\";\nimport type { ClosedReportSite, ClosedSitePage } from \"./execute.ts\";\nimport { REPORT_REFRESH_RUNTIME_PATH, REPORT_STYLESHEET_PATH, } from \"./site-assets.ts\";\nimport { reportSiteRuntime } from \"./site-runtime.ts\";\nexport interface ReportHostOutputPath {\n readonly value: string;\n}\nexport interface ReportFileSystemError {\n readonly code: \"report-export-write-failed\";\n readonly operation: string;\n}\nexport interface ReportExportTargetExists {\n readonly code: \"report-export-target-exists\";\n}\nexport type ReportFileSystemFailure = ReportFileSystemError | ReportExportTargetExists;\nexport interface ReportFileSystemService {\n readonly prepareOutput: (out: string) => Effect.Effect<void, ReportFileSystemFailure>;\n readonly writeFile: (input: {\n readonly out: string;\n readonly path: ReportHostOutputPath;\n readonly bytes: Uint8Array;\n }) => Effect.Effect<void, ReportFileSystemFailure>;\n readonly writeCompleteMarker: (out: string) => Effect.Effect<void, ReportFileSystemFailure>;\n readonly syncDirectory: (out: string) => Effect.Effect<void, ReportFileSystemFailure>;\n}\nexport class ReportFileSystem extends Context.Tag(\"@niceeval/report/ReportFileSystem\")<ReportFileSystem, ReportFileSystemService>() {\n}\nexport interface ReportStaticExportReceipt {\n readonly out: string;\n /** Does not include the zero-byte publication marker. */\n readonly filesWritten: number;\n}\nexport interface ReportSiteBuildFailure {\n readonly code: \"report-site-build-failed\";\n readonly operation: \"render\" | \"identity\" | \"path\" | \"asset\" | \"download\";\n readonly reason: string;\n}\nexport type ReportSiteBuildError = ReportSiteBuildFailure | ReportBuildBudgetExceeded;\nexport type ReportExportError = ReportFileSystemFailure | ReportSiteBuildFailure;\n/** The one Host-owned static resource path for a closed Theme stylesheet. */\nexport const REPORT_THEME_STYLESHEET_PATH = \"_niceeval/theme.css\";\n/** The Host-owned renderer identity carried by every static revision. */\nexport const REPORT_STATIC_RENDERER = \"niceeval.report-ssg/v1\" as const;\nconst MANIFEST_PATH = \"_niceeval/manifest.json\";\nconst PROBLEMS_PATH = \"_niceeval/problems.json\";\nconst PROJECTIONS_PATH = \"_niceeval/data/projections.json\";\nconst COMPLETE_PATH = \"_niceeval/complete\";\nconst NICEEVAL_BRAND_HREF = \"https://niceeval.com/?utm_source=report&utm_medium=brand\";\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder();\nconst PRODUCT_STYLESHEET = readFileSync(new URL(\"../assets/styles.css\", __niceevalImportMetaUrl), \"utf8\");\nconst PRODUCT_ENHANCER = readFileSync(new URL(\"../assets/enhance.js\", __niceevalImportMetaUrl), \"utf8\");\n/**\n * Host-owned parameterized-Page dialog for the shared view/static runtime.\n * A click on a same-site `<pageId>/<key>/index.html` href writes the legacy\n * hash deep link and opens a native `<dialog>` filled with that standalone\n * detail document's own slot bytes. No-JS and direct hrefs keep reading the\n * same document. The route list comes from the revision's closed pages, not\n * from any author declaration. The report content inside the dialog is styled\n * by the existing product stylesheet; only the dialog chrome is styled here.\n */\nconst PARAM_PAGE_DIALOG_RUNTIME = `(() => {\n \"use strict\";\n if (typeof window === \"undefined\" || typeof HTMLDialogElement !== \"function\") return;\n if (location.protocol !== \"http:\" && location.protocol !== \"https:\") return;\n const routes = (document.documentElement.getAttribute(\"data-niceeval-param-routes\") || \"\")\n .split(\" \")\n .filter((value) => value.length > 0);\n if (routes.length === 0) return;\n const siteRoot = document.documentElement.getAttribute(\"data-niceeval-site-root\") || \"index.html\";\n\n function closest(target, selector) {\n return target && target.closest ? target.closest(selector) : null;\n }\n\n function escapeRegExp(value) {\n const special = \".+*?^$()[]{}|\";\n let escaped = \"\";\n for (const character of value) {\n if (special.includes(character) || character.charCodeAt(0) === 92) {\n escaped += String.fromCharCode(92);\n }\n escaped += character;\n }\n return escaped;\n }\n\n function matchTarget(url) {\n if (url.origin !== location.origin) return null;\n for (const prefix of routes) {\n const root = new URL(siteRoot, document.baseURI);\n const pattern = new RegExp(\"^\" + escapeRegExp(new URL(prefix + \"/\", root).pathname) + \"([^/]+)/index\\\\\\\\.html$\");\n const match = pattern.exec(url.pathname);\n if (!match) continue;\n let key;\n try {\n key = decodeURIComponent(match[1]);\n } catch {\n return null;\n }\n if (!key || key.includes(\"/\")) return null;\n return { prefix, key, url };\n }\n return null;\n }\n\n function targetFromHash() {\n const match = location.hash.startsWith(\"#/\") ? location.hash.slice(2).split(\"/\") : [];\n if (match.length !== 2 || !routes.includes(match[0]) || !match[1]) return null;\n const root = new URL(siteRoot, document.baseURI);\n return {\n prefix: match[0],\n key: match[1],\n url: new URL(match[0] + \"/\" + encodeURIComponent(match[1]) + \"/index.html\", root),\n };\n }\n\n function hashForTarget(target) {\n return \"#/\" + target.prefix + \"/\" + target.key;\n }\n\n function currentLocale() {\n return document.documentElement.lang === \"zh-CN\" ? \"zh-CN\" : \"en\";\n }\n\n function rebaseSlotUrls(slot, responseUrl) {\n for (const element of slot.querySelectorAll(\"[href], [src]\")) {\n for (const attribute of [\"href\", \"src\"]) {\n const value = element.getAttribute(attribute);\n if (value === null) continue;\n // Fragment and non-document schemes retain their literal browser\n // meaning. Every other relative reference must keep the fetched\n // detail document as its base after this slot moves into the root\n // page's dialog.\n if (value.startsWith(\"#\") || /^(?:data:|mailto:|tel:)/i.test(value)) continue;\n try {\n element.setAttribute(attribute, new URL(value, responseUrl).href);\n } catch {\n // Leave malformed author data untouched; the standalone document\n // would have the same browser-level handling.\n }\n }\n }\n }\n\n function extractDocument(html, locale, responseUrl) {\n const parsed = new DOMParser().parseFromString(html, \"text/html\");\n const slot = parsed.querySelector('.niceeval-view-report-slot[data-niceeval-locale=\"' + locale + '\"]');\n if (!slot) return null;\n rebaseSlotUrls(slot, responseUrl);\n return { title: parsed.title, content: slot.innerHTML };\n }\n\n let dialog = null;\n let ownsHistory = false;\n let requestRevision = 0;\n let requestedTarget = null;\n\n function ensureDialog() {\n if (dialog !== null) return;\n dialog = document.createElement(\"dialog\");\n dialog.className = \"niceeval-view-dialog\";\n const head = document.createElement(\"div\");\n head.className = \"niceeval-view-dialog-head\";\n const title = document.createElement(\"span\");\n title.className = \"niceeval-view-dialog-title\";\n title.id = \"niceeval-view-dialog-title\";\n const close = document.createElement(\"button\");\n close.type = \"button\";\n close.className = \"niceeval-view-dialog-close\";\n close.setAttribute(\"aria-label\", \"Close\");\n // Keep the static host visually identical to the legacy React/Radix\n // dialog. The old DialogClose renders a literal x, rather than the\n // typographic multiplication sign.\n close.textContent = \"x\";\n close.addEventListener(\"click\", closeFromUi);\n head.appendChild(title);\n head.appendChild(close);\n const body = document.createElement(\"div\");\n body.className = \"niceeval-view-dialog-body niceeval-view-report-slot\";\n dialog.appendChild(head);\n dialog.appendChild(body);\n dialog.setAttribute(\"aria-labelledby\", title.id);\n dialog.addEventListener(\"click\", (event) => {\n if (event.target === dialog) closeFromUi();\n });\n dialog.addEventListener(\"cancel\", (event) => {\n event.preventDefault();\n closeFromUi();\n });\n document.body.appendChild(dialog);\n }\n\n function closeFromUi() {\n if (dialog === null || !dialog.open) return;\n requestedTarget = null;\n requestRevision++;\n if (!ownsHistory) {\n dialog.close();\n history.replaceState(null, \"\", location.pathname + location.search);\n return;\n }\n ownsHistory = false;\n history.back();\n }\n\n function openTarget(target, nextOwnsHistory) {\n ensureDialog();\n requestedTarget = target;\n const revision = ++requestRevision;\n fetch(target.url.href, { credentials: \"same-origin\" })\n .then((response) => {\n if (!response.ok) throw new Error(\"http \" + response.status);\n return response.text().then((html) => ({ html, responseUrl: response.url || target.url.href }));\n })\n .then(({ html, responseUrl }) => {\n if (revision !== requestRevision || requestedTarget !== target) return;\n const extracted = extractDocument(html, currentLocale(), responseUrl);\n if (extracted === null) {\n location.href = target.url.href;\n return;\n }\n dialog.querySelector(\".niceeval-view-dialog-title\").textContent = extracted.title;\n dialog.querySelector(\".niceeval-view-dialog-close\").setAttribute(\n \"aria-label\",\n currentLocale() === \"zh-CN\" ? \"关闭\" : \"Close\",\n );\n dialog.querySelector(\".niceeval-view-dialog-body\").innerHTML = extracted.content;\n if (!dialog.open) dialog.showModal();\n ownsHistory = nextOwnsHistory;\n })\n .catch(() => {\n if (revision === requestRevision && requestedTarget === target) location.href = target.url.href;\n });\n }\n\n function onHashChange() {\n const target = targetFromHash();\n if (target !== null) {\n openTarget(target, true);\n return;\n }\n requestedTarget = null;\n requestRevision++;\n ownsHistory = false;\n if (dialog !== null && dialog.open) dialog.close();\n }\n\n const initialTarget = targetFromHash();\n if (initialTarget !== null) openTarget(initialTarget, false);\n window.addEventListener(\"hashchange\", onHashChange);\n window.addEventListener(\"popstate\", () => {\n if (location.hash) return;\n onHashChange();\n });\n\n document.addEventListener(\"click\", (event) => {\n if (event.defaultPrevented || event.button !== 0) return;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n const anchor = closest(event.target, \"a[href]\");\n if (!anchor) return;\n const anchorTarget = anchor.getAttribute(\"target\");\n if (anchorTarget !== null && anchorTarget !== \"_self\") return;\n if (anchor.hasAttribute(\"download\")) return;\n let url;\n try {\n url = new URL(anchor.getAttribute(\"href\"), document.baseURI);\n } catch {\n return;\n }\n const target = matchTarget(url);\n if (target === null) return;\n event.preventDefault();\n location.hash = hashForTarget(target);\n });\n})();`;\n/** Forms one byte-complete revision; neither view nor static renders afterward. */\nexport function buildSiteRevision(input: {\n readonly site: ClosedReportSite;\n readonly theme?: ThemeDefinition;\n}): Effect.Effect<ClosedSiteRevision, ReportSiteBuildError> {\n return Effect.try({\n try: () => {\n const files = buildSiteFiles(input.site, input.theme ?? input.site.theme ?? basalt);\n assertFinalBuildBudgets(input.site.startedAtMs, input.site.baselineRssBytes);\n const defaultRoute = defaultRouteForSite(input.site);\n return signClosedSiteRevision({\n sampleIdentity: input.site.sampleIdentity,\n reportIdentity: input.site.reportIdentity,\n files,\n routes: input.site.pages.map(({ page }) => page.target.route),\n ...(defaultRoute === undefined ? {} : { defaultRoute }),\n });\n },\n catch: (cause): ReportSiteBuildError => isBudgetError(cause)\n ? cause\n : siteFailure(isSiteBuildFailure(cause) ? cause.operation : \"render\", isSiteBuildFailure(cause) ? cause.reason : boundedReason(cause)),\n });\n}\n/**\n * Host-only final signer for a byte-complete static site. It derives the\n * problem table from the closed `_niceeval/problems.json` resource, so callers\n * which retain only closed bytes never need to retain revision problem values.\n */\nexport function signClosedSiteRevision(input: {\n readonly sampleIdentity: string;\n readonly reportIdentity: string;\n readonly files: readonly ClosedSiteFile[];\n readonly routes: readonly string[];\n readonly defaultRoute?: string;\n}): ClosedSiteRevision {\n const files = Object.freeze([...input.files].sort((left, right) => compareUtf8(left.path, right.path)));\n const problems = closedProblemsFromFiles(files);\n return makeClosedSiteRevision({\n contentHash: siteRevisionIdentity({\n sampleIdentity: input.sampleIdentity,\n reportIdentity: input.reportIdentity,\n files,\n ...(input.defaultRoute === undefined ? {} : { defaultRoute: input.defaultRoute }),\n problems,\n }),\n files,\n routes: input.routes,\n ...(input.defaultRoute === undefined ? {} : { defaultRoute: input.defaultRoute }),\n problems,\n });\n}\n/**\n * Closes exactly the stylesheet bytes used by the static builder. Watch cache\n * code may request these bytes but must not reproduce Theme asset resolution.\n */\nexport function closeStaticThemeStylesheet(theme: ThemeDefinition): Uint8Array {\n return encoder.encode(`${themeStylesheet(theme)}\\n${inlineThemeStyles(theme)}\\n`);\n}\nfunction assertFinalBuildBudgets(startedAtMs: number, baselineRssBytes: number): void {\n const elapsed = Date.now() - startedAtMs;\n if (elapsed > REPORT_BUILD_TIME_MS_MAX) {\n throw reportBuildBudgetExceeded(\"build-time\", REPORT_BUILD_TIME_MS_MAX, elapsed);\n }\n const rssGrowth = Math.max(0, process.memoryUsage().rss - baselineRssBytes);\n if (rssGrowth > REPORT_BUILD_RSS_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"build-rss\", REPORT_BUILD_RSS_BYTES_MAX, rssGrowth);\n }\n}\n/** Writes only the immutable revision mapping, then publishes its marker last. */\nexport function exportStaticReport(input: {\n readonly revision: ClosedSiteRevision;\n readonly out: string;\n}): Effect.Effect<ReportStaticExportReceipt, ReportExportError, ReportFileSystem> {\n return Effect.gen(function* () {\n const files = closedSiteRevisionData(input.revision).files;\n const fileSystem = yield* ReportFileSystem;\n yield* fileSystem.prepareOutput(input.out);\n let written = 0;\n for (const file of files) {\n if (file.path === COMPLETE_PATH)\n continue;\n yield* fileSystem.writeFile({\n out: input.out,\n path: Object.freeze({ value: file.path }),\n bytes: file.bytes,\n });\n written += 1;\n }\n yield* fileSystem.writeCompleteMarker(input.out);\n yield* fileSystem.syncDirectory(input.out);\n return Object.freeze({ out: input.out, filesWritten: written });\n });\n}\nfunction buildSiteFiles(site: ClosedReportSite, theme: ThemeDefinition): readonly ClosedSiteFile[] {\n const files = new Map<string, ClosedSiteFile>();\n const paths: ReportStaticPath[] = [];\n const add = (file: ClosedSiteFile, owner: ReportStaticPath): void => {\n const prior = files.get(file.path);\n if (prior !== undefined) {\n if (prior.mediaType === file.mediaType && bytesEqual(prior.bytes, file.bytes))\n return;\n throw siteFailure(\"path\", `two site resources produce ${file.path}`);\n }\n files.set(file.path, file);\n paths.push(owner);\n };\n const stylesheet = textFile(REPORT_STYLESHEET_PATH, PRODUCT_STYLESHEET, \"text/css; charset=utf-8\");\n const themeFile = binaryFile(REPORT_THEME_STYLESHEET_PATH, \"text/css; charset=utf-8\", closeStaticThemeStylesheet(theme));\n const runtime = textFile(REPORT_REFRESH_RUNTIME_PATH, `${reportSiteRuntime(PRODUCT_ENHANCER).trimEnd()}\\n${PARAM_PAGE_DIALOG_RUNTIME}\\n`, \"text/javascript; charset=utf-8\");\n add(stylesheet, hostStaticPath(stylesheet.path));\n add(themeFile, hostStaticPath(themeFile.path));\n add(runtime, hostStaticPath(runtime.path));\n const pages = [...site.pages].sort(compareSitePages);\n const paramRoutes = parameterizedRoutePrefixes(site);\n let siteHtmlBytes = 0;\n for (const entry of pages) {\n assertFinalBuildBudgets(site.startedAtMs, site.baselineRssBytes);\n const routeIssue = validateReportRoute(entry.page.target.route);\n if (routeIssue !== undefined || entry.page.target.route === \"/_niceeval\" ||\n entry.page.target.route.startsWith(\"/_niceeval/\")) {\n throw siteFailure(\"path\", routeIssue?.reason ?? \"author routes cannot occupy /_niceeval\");\n }\n const output = staticPathForRoute(entry.page.target.route);\n const pageFile = textFile(output.posix, renderPage(site, entry, paramRoutes), \"text/html; charset=utf-8\");\n if (pageFile.bytes.byteLength > REPORT_PAGE_HTML_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"page-html-bytes\", REPORT_PAGE_HTML_BYTES_MAX, pageFile.bytes.byteLength, { pageId: entry.page.target.pageId, route: entry.page.target.route });\n }\n siteHtmlBytes += pageFile.bytes.byteLength;\n if (siteHtmlBytes > REPORT_SITE_HTML_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"site-html-bytes\", REPORT_SITE_HTML_BYTES_MAX, siteHtmlBytes);\n }\n add(pageFile, output);\n for (const asset of entry.page.assets)\n addPageAsset(add, asset);\n }\n const downloads = collectDownloads(site.pages);\n if (downloads.length > REPORT_DOWNLOAD_FILES_MAX) {\n throw reportBuildBudgetExceeded(\"download-files\", REPORT_DOWNLOAD_FILES_MAX, downloads.length);\n }\n for (const download of downloads) {\n if (download.bytes.byteLength > REPORT_DOWNLOAD_FILE_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"download-file-bytes\", REPORT_DOWNLOAD_FILE_BYTES_MAX, download.bytes.byteLength);\n }\n const invalid = validateDownloadPath(download.path);\n if (invalid !== undefined)\n throw siteFailure(\"download\", invalid.reason);\n const output = staticPathForDownload(download.path);\n add(binaryFile(output.posix, download.mediaType, download.bytes), output);\n }\n const problems = textFile(PROBLEMS_PATH, `${canonicalJson(site.problems)}\\n`, \"application/json; charset=utf-8\");\n add(problems, hostStaticPath(problems.path));\n // Every closed site revision carries its projections document: the same\n // canonical bytes view serves and static export writes, and the same file\n // that enters the revision content hash below.\n const projections = textFile(PROJECTIONS_PATH, `${canonicalJson(site.projections)}\\n`, \"application/json; charset=utf-8\");\n add(projections, hostStaticPath(projections.path));\n assertAssetBudgets(files, site.pages);\n const manifestValue = Object.freeze({\n format: \"niceeval.report-static/v1\",\n sampleIdentity: site.sampleIdentity,\n reportIdentity: site.reportIdentity,\n pages: pages.map((entry) => Object.freeze({\n pageId: entry.page.target.pageId,\n route: entry.page.target.route,\n path: staticPathForRoute(entry.page.target.route).posix,\n navigation: entry.navigation,\n })),\n files: [...files.keys(), MANIFEST_PATH, COMPLETE_PATH].sort(compareUtf8),\n stylesheet: REPORT_STYLESHEET_PATH,\n theme: REPORT_THEME_STYLESHEET_PATH,\n runtime: REPORT_REFRESH_RUNTIME_PATH,\n problems: PROBLEMS_PATH,\n projections: PROJECTIONS_PATH,\n });\n const manifest = textFile(MANIFEST_PATH, `${canonicalJson(manifestValue)}\\n`, \"application/json; charset=utf-8\");\n add(manifest, hostStaticPath(manifest.path));\n add(binaryFile(COMPLETE_PATH, \"application/octet-stream\", new Uint8Array()), hostStaticPath(COMPLETE_PATH));\n const conflicts = staticPathConflicts(paths);\n if (conflicts.length > 0) {\n const first = conflicts[0]!;\n throw siteFailure(\"path\", `${first.kind} collision between ${first.left.posix} and ${first.right.posix}`);\n }\n return Object.freeze([...files.values()].sort((left, right) => compareUtf8(left.path, right.path)));\n}\n/**\n * The closed parameterized Page route prefixes of this site (the instance\n * route minus its final key segment, without the leading slash). The shared\n * dialog runtime uses them to recognize same-site detail hrefs.\n */\nfunction parameterizedRoutePrefixes(site: ClosedReportSite): readonly string[] {\n const prefixes = new Set<string>();\n for (const entry of site.pages) {\n if (entry.role?.kind === \"experiment-group\")\n continue;\n if (entry.page.target.params === undefined)\n continue;\n const route = entry.page.target.route;\n const cut = route.lastIndexOf(\"/\");\n prefixes.add(route.slice(1, cut));\n }\n return Object.freeze([...prefixes].sort(compareUtf8));\n}\nfunction renderPage(site: ClosedReportSite, entry: ClosedSitePage, paramRoutes: readonly string[]): string {\n const page = entry.page;\n const output = staticPathForRoute(page.target.route).posix;\n const stylesheetHref = relativeHref(output, REPORT_STYLESHEET_PATH);\n const themeHref = relativeHref(output, REPORT_THEME_STYLESHEET_PATH);\n const runtimeHref = relativeHref(output, REPORT_REFRESH_RUNTIME_PATH);\n const titleEn = resolveLocalizedText(page.title, \"en\");\n const titleZh = resolveLocalizedText(page.title, \"zh-CN\");\n const authorHead = renderHead(page, output);\n const rendererAssets = page.assets.map((asset) => asset.kind === \"style\"\n ? `<link rel=\"stylesheet\" href=\"${escapeAttribute(relativeHref(output, asset.path))}\">`\n : asset.kind === \"script\"\n ? `<script src=\"${escapeAttribute(relativeHref(output, asset.path))}\" defer></script>`\n : \"\").join(\"\");\n const bodyEn = projection(page, \"en\");\n const bodyZh = projection(page, \"zh-CN\");\n const navigationEn = renderNavigation(site.pages, page.target.route, output, \"en\");\n const navigationZh = renderNavigation(site.pages, page.target.route, output, \"zh-CN\");\n const groupsEn = renderExperimentGroupNavigation(site.pages, page.target.route, output, \"en\");\n const groupsZh = renderExperimentGroupNavigation(site.pages, page.target.route, output, \"zh-CN\");\n const pageProblems = site.problems.filter((problem) => problem.path.length === 0 || (problem.path[0] === \"page\" && problem.path[1] === page.target.pageId));\n const problemsEn = renderProblems(pageProblems, \"en\");\n const problemsZh = renderProblems(pageProblems, \"zh-CN\");\n const paramRoutesAttr = paramRoutes.length === 0\n ? \"\"\n : ` data-niceeval-param-routes=\"${escapeAttribute(paramRoutes.join(\" \"))}\"`;\n const siteRootHref = relativeHref(output, \"index.html\");\n return `<!doctype html><html class=\"niceeval-view-document\" lang=\"en\" data-niceeval-title-en=\"${escapeAttribute(titleEn)}\" data-niceeval-title-zh-cn=\"${escapeAttribute(titleZh)}\" data-niceeval-site-root=\"${escapeAttribute(siteRootHref)}\"${paramRoutesAttr}><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><title>${escapeText(titleEn)}</title><link rel=\"stylesheet\" href=\"${escapeAttribute(stylesheetHref)}\"><link rel=\"stylesheet\" href=\"${escapeAttribute(themeHref)}\">${authorHead}${rendererAssets}<script src=\"${escapeAttribute(runtimeHref)}\" defer></script></head><body><header class=\"niceeval-view-shell\"><a class=\"niceeval-view-brand\" href=\"${escapeAttribute(NICEEVAL_BRAND_HREF)}\" target=\"_blank\" rel=\"noopener\"><span class=\"niceeval-view-mark\" aria-hidden=\"true\"></span><span>NiceEval</span></a><div class=\"niceeval-view-pages\"><nav class=\"niceeval-view-nav\" data-niceeval-locale=\"en\" aria-label=\"Report pages\">${navigationEn}</nav><nav class=\"niceeval-view-nav\" data-niceeval-locale=\"zh-CN\" aria-label=\"报告页面\" hidden>${navigationZh}</nav></div><div class=\"niceeval-view-controls\">${groupsEn}${groupsZh}<label class=\"niceeval-view-language\"><select aria-label=\"Language\" data-niceeval-locale-select><option value=\"en\">EN</option><option value=\"zh-CN\">中文</option></select></label></div></header><main class=\"niceeval-view-main\"><div class=\"niceeval-view-report-slot\" data-niceeval-locale=\"en\" data-page-id=\"${escapeAttribute(page.target.pageId)}\">${bodyEn}${problemsEn}</div><div class=\"niceeval-view-report-slot\" data-niceeval-locale=\"zh-CN\" data-page-id=\"${escapeAttribute(page.target.pageId)}\" hidden>${bodyZh}${problemsZh}</div><noscript><p class=\"niceeval-view-noscript\">This report remains readable without JavaScript; language selection is unavailable.</p></noscript></main></body></html>`;\n}\nfunction renderExperimentGroupNavigation(pages: readonly ClosedSitePage[], currentRoute: string, sourceFile: string, locale: string): string {\n const groups = pages.filter((entry) => entry.role?.kind === \"experiment-group\").sort(compareSitePages);\n if (groups.length < 2)\n return \"\";\n const options = groups.map(({ page }) => {\n const current = page.target.route === currentRoute ? \" selected\" : \"\";\n const href = relativeHref(sourceFile, staticPathForRoute(page.target.route).posix);\n const params = page.target.params as Record<string, unknown> | undefined;\n const label = typeof params?.groupId === \"string\" ? params.groupId\n : typeof params?.experimentId === \"string\" ? params.experimentId : page.target.route;\n return `<option value=\"${escapeAttribute(href)}\"${current}>${escapeText(label)}</option>`;\n });\n const links = groups.map(({ page }) => {\n const current = page.target.route === currentRoute ? \" aria-current=\\\"page\\\"\" : \"\";\n const href = relativeHref(sourceFile, staticPathForRoute(page.target.route).posix);\n const params = page.target.params as Record<string, unknown> | undefined;\n const label = typeof params?.groupId === \"string\" ? params.groupId\n : typeof params?.experimentId === \"string\" ? params.experimentId : page.target.route;\n return `<li><a href=\"${escapeAttribute(href)}\"${current}>${escapeText(label)}</a></li>`;\n });\n const hidden = locale === \"zh-CN\" ? \" hidden\" : \"\";\n const label = locale === \"zh-CN\" ? \"实验\" : \"Experiments\";\n return `<div class=\"niceeval-view-experiment\" data-niceeval-locale=\"${locale}\"${hidden}><label><span>${label}</span><select aria-label=\"${label}\" data-niceeval-experiment-select>${options.join(\"\")}</select></label><noscript><nav class=\"niceeval-view-nav\" aria-label=\"${label}\"><ul>${links.join(\"\")}</ul></nav></noscript></div>`;\n}\nfunction renderNavigation(pages: readonly ClosedSitePage[], currentRoute: string, sourceFile: string, locale: string): string {\n const groups = pages.filter((entry) => entry.role?.kind === \"experiment-group\").sort(compareSitePages);\n const groupRoutes = new Set(groups.map((entry) => entry.page.target.route));\n const selectedGroupRoute = groupRoutes.has(currentRoute) ? currentRoute : groups[0]?.page.target.route;\n const items = pages.filter((entry) => entry.navigation).sort(compareSitePages).map(({ page }) => {\n const targetRoute = page.target.route === \"/\" && selectedGroupRoute !== undefined\n ? selectedGroupRoute\n : page.target.route;\n const current = page.target.route === currentRoute || (page.target.route === \"/\" && groupRoutes.has(currentRoute))\n ? \" aria-current=\\\"page\\\"\"\n : \"\";\n const href = relativeHref(sourceFile, staticPathForRoute(targetRoute).posix);\n return `<li><a href=\"${escapeAttribute(href)}\"${current}>${escapeText(resolveLocalizedText(page.title, locale))}</a></li>`;\n });\n return `<ul>${items.join(\"\")}</ul>`;\n}\nfunction renderProblems(problems: readonly ReportProblem[], locale: string): string {\n const visible = problems.filter((problem) => !isGenericMissingSlotProblem(problem));\n if (visible.length === 0)\n return \"\";\n const title = locale === \"zh-CN\" ? \"数据说明\" : \"Data notes\";\n return `<aside class=\"niceeval-view-problems\"><h2>${title}</h2><ul>${visible.map((problem) => `<li><code>${escapeText(problem.code)}</code>${problem.summary === undefined ? \"\" : ` — ${escapeText(problem.summary)}`}</li>`).join(\"\")}</ul></aside>`;\n}\nfunction isGenericMissingSlotProblem(problem: ReportProblem): boolean {\n return problem.code === \"analysis-missing\" &&\n problem.refs.length === 0 &&\n problem.summary === \"the selected logical Slot has no input value\";\n}\nfunction projection(page: ResolvedPage, locale: string): string {\n const found = page.web.find((candidate) => candidate.locale === locale);\n if (found === undefined)\n throw siteFailure(\"render\", `Page ${page.target.pageId} lacks ${locale} web projection`);\n return found.html;\n}\nfunction renderHead(page: ResolvedPage, sourceFile: string): string {\n if (!Array.isArray(page.head))\n return \"\";\n return page.head.map((raw) => {\n if (!isRecord(raw) || typeof raw.tag !== \"string\")\n return \"\";\n const attrs = renderAttributes(raw.attrs, sourceFile, raw.tag);\n switch (raw.tag) {\n case \"meta\":\n case \"link\":\n return `<${raw.tag}${attrs}>`;\n case \"style\":\n return typeof raw.children === \"string\" ? `<style${attrs}>${raw.children}</style>` : \"\";\n case \"script\":\n return typeof raw.children === \"string\"\n ? `<script${attrs}>${raw.children}</script>`\n : `<script${attrs}></script>`;\n default:\n return \"\";\n }\n }).join(\"\");\n}\nfunction renderAttributes(value: unknown, sourceFile: string, tag: string): string {\n if (!isRecord(value))\n return \"\";\n return Object.entries(value).sort(([left], [right]) => compareUtf8(left, right)).map(([name, raw]) => {\n const normalized = (tag === \"link\" && name === \"href\") || (tag === \"script\" && name === \"src\")\n ? typeof raw === \"string\" && isLocalReference(raw) ? relativeHref(sourceFile, raw) : raw\n : raw;\n return normalized === true\n ? ` ${escapeAttribute(name)}`\n : typeof normalized === \"string\"\n ? ` ${escapeAttribute(name)}=\"${escapeAttribute(normalized)}\"`\n : \"\";\n }).join(\"\");\n}\nfunction isLocalReference(value: string): boolean {\n return !/^[a-z][a-z0-9+.-]*:/iu.test(value) && !value.startsWith(\"//\") && !value.startsWith(\"/\");\n}\nfunction addPageAsset(add: (file: ClosedSiteFile, owner: ReportStaticPath) => void, asset: ResolvedPageAsset): void {\n const path = asset.path;\n if (path.startsWith(\"/\") || path.includes(\"\\\\\") || path.split(\"/\").some((segment) => segment.length === 0 || segment === \".\" || segment === \"..\"))\n throw siteFailure(\"asset\", `invalid asset path ${path}`);\n add(binaryFile(path, asset.mediaType, asset.bytes), hostStaticPath(path));\n}\nfunction collectDownloads(pages: readonly ClosedSitePage[]): readonly ResolvedPage[\"downloads\"][number][] {\n const byPath = new Map<string, ResolvedPage[\"downloads\"][number]>();\n for (const { page } of pages) {\n for (const download of page.downloads) {\n const prior = byPath.get(download.path);\n if (prior !== undefined && (prior.mediaType !== download.mediaType || !bytesEqual(prior.bytes, download.bytes))) {\n throw siteFailure(\"download\", `two downloads produce ${download.path}`);\n }\n if (prior === undefined)\n byPath.set(download.path, download);\n }\n }\n return Object.freeze([...byPath.values()].sort((left, right) => compareUtf8(left.path, right.path)));\n}\nfunction assertAssetBudgets(files: ReadonlyMap<string, ClosedSiteFile>, pages: readonly ClosedSitePage[]): void {\n const assetsByPath = new Map<string, ResolvedPageAsset>();\n for (const { page } of pages)\n for (const asset of page.assets)\n assetsByPath.set(asset.path, asset);\n let sourceDiffBytes = 0;\n for (const asset of assetsByPath.values()) {\n if (asset.kind === \"source\" && asset.byteLength > REPORT_SOURCE_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"source-asset-bytes\", REPORT_SOURCE_ASSET_BYTES_MAX, asset.byteLength);\n }\n if (asset.kind === \"diff\" && asset.byteLength > REPORT_DIFF_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"diff-asset-bytes\", REPORT_DIFF_ASSET_BYTES_MAX, asset.byteLength);\n }\n if (asset.kind === \"source\" || asset.kind === \"diff\")\n sourceDiffBytes += asset.byteLength;\n }\n if (sourceDiffBytes > REPORT_SOURCE_DIFF_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"source-diff-asset-bytes\", REPORT_SOURCE_DIFF_ASSET_BYTES_MAX, sourceDiffBytes);\n }\n const assetBytes = [...files.values()]\n .filter((file) => !file.path.endsWith(\"index.html\") && !file.path.startsWith(\"downloads/\") &&\n file.path !== PROBLEMS_PATH)\n .reduce((total, file) => total + file.bytes.byteLength, 0);\n if (assetBytes > REPORT_STATIC_ASSET_BYTES_MAX) {\n throw reportBuildBudgetExceeded(\"static-asset-bytes\", REPORT_STATIC_ASSET_BYTES_MAX, assetBytes);\n }\n}\nfunction inlineThemeStyles(theme: ThemeDefinition): string {\n return (theme.styles ?? []).map((asset) => {\n if (\"inline\" in asset)\n return asset.inline;\n const base = themeSourceBase(theme);\n if (base === undefined) {\n throw siteFailure(\"asset\", `theme asset ${asset.src} has no trusted module base`);\n }\n try {\n return readFileSync(resolve(base, asset.src), \"utf8\");\n }\n catch (cause) {\n throw siteFailure(\"asset\", `theme asset ${asset.src} could not be read: ${boundedReason(cause)}`);\n }\n }).join(\"\\n\");\n}\n/** A grouped site always opens a concrete comparison; other sites use their first navigable Page. */\nfunction defaultRouteForSite(site: ClosedReportSite): string | undefined {\n return [...site.pages]\n .filter((entry) => entry.role?.kind === \"experiment-group\")\n .sort(compareSitePages)[0]?.page.target.route\n ?? site.pages.find((entry) => entry.navigation)?.page.target.route\n ?? site.pages[0]?.page.target.route;\n}\nfunction closedProblemsFromFiles(files: readonly ClosedSiteFile[]): readonly ReportProblem[] {\n const file = files.find((candidate) => candidate.path === PROBLEMS_PATH);\n if (file === undefined || file.mediaType !== \"application/json; charset=utf-8\") {\n throw siteFailure(\"identity\", \"closed site is missing its canonical problems resource\");\n }\n let raw: unknown;\n try {\n raw = JSON.parse(decoder.decode(file.bytes));\n }\n catch (cause) {\n throw siteFailure(\"identity\", `closed problems resource is invalid JSON: ${boundedReason(cause)}`);\n }\n if (!Array.isArray(raw)) {\n throw siteFailure(\"identity\", \"closed problems resource must be an array\");\n }\n const problems = raw.map((value, index): ReportProblem => {\n if (!isRecord(value) || typeof value.code !== \"string\" || !Array.isArray(value.path) ||\n !Array.isArray(value.refs) || !value.path.every((part) => typeof part === \"string\") ||\n !value.refs.every((ref) => typeof ref === \"string\") ||\n (value.summary !== undefined && typeof value.summary !== \"string\")) {\n throw siteFailure(\"identity\", `closed problems resource has an invalid entry at index ${index}`);\n }\n return Object.freeze({\n code: value.code,\n path: Object.freeze([...value.path]),\n refs: Object.freeze([...value.refs]),\n ...(value.summary === undefined ? {} : { summary: value.summary }),\n });\n });\n const canonical = encoder.encode(`${canonicalJson(problems)}\\n`);\n if (!bytesEqual(file.bytes, canonical)) {\n throw siteFailure(\"identity\", \"closed problems resource is not canonical\");\n }\n return Object.freeze(problems);\n}\nfunction siteRevisionIdentity(input: {\n readonly sampleIdentity: string;\n readonly reportIdentity: string;\n readonly files: readonly ClosedSiteFile[];\n readonly defaultRoute?: string;\n readonly problems: readonly ReportProblem[];\n}): string {\n const hash = createHash(\"sha256\");\n hash.update(canonicalJson({\n format: \"niceeval.report-site-revision/v1\",\n renderer: REPORT_STATIC_RENDERER,\n sampleIdentity: input.sampleIdentity,\n reportIdentity: input.reportIdentity,\n ...(input.defaultRoute === undefined ? {} : { defaultRoute: input.defaultRoute }),\n problems: input.problems,\n }));\n hash.update(\"\\0\");\n for (const file of input.files) {\n hash.update(file.path);\n hash.update(\"\\0\");\n hash.update(file.mediaType);\n hash.update(\"\\0\");\n hash.update(file.bytes);\n hash.update(\"\\0\");\n }\n return hash.digest(\"hex\");\n}\nfunction relativeHref(sourceFile: string, targetFile: string): string {\n const source = sourceFile.split(\"/\");\n source.pop();\n const target = targetFile.split(\"/\");\n let common = 0;\n while (common < source.length && common < target.length && source[common] === target[common])\n common += 1;\n const value = [...source.slice(common).map(() => \"..\"), ...target.slice(common)].join(\"/\");\n return value || \"./\";\n}\nfunction compareSitePages(left: ClosedSitePage, right: ClosedSitePage): number {\n return compareUtf8(left.page.target.route, right.page.target.route) ||\n compareUtf8(left.page.target.pageId, right.page.target.pageId);\n}\nfunction textFile(path: string, text: string, mediaType: string): ClosedSiteFile {\n return Object.freeze({ path, mediaType, bytes: encoder.encode(text) });\n}\nfunction binaryFile(path: string, mediaType: string, bytes: Uint8Array): ClosedSiteFile {\n return Object.freeze({ path, mediaType, bytes: new Uint8Array(bytes) });\n}\nfunction bytesEqual(left: Uint8Array, right: Uint8Array): boolean {\n return left.byteLength === right.byteLength && left.every((byte, index) => byte === right[index]);\n}\nfunction escapeText(value: string): string {\n return value.replaceAll(\"&\", \"&\").replaceAll(\"<\", \"<\").replaceAll(\">\", \">\");\n}\nfunction escapeAttribute(value: string): string {\n return escapeText(value).replaceAll('\"', \""\").replaceAll(\"'\", \"'\");\n}\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction canonicalJson(value: unknown): string {\n if (value === null)\n return \"null\";\n if (typeof value === \"string\" || typeof value === \"boolean\")\n return JSON.stringify(value);\n if (typeof value === \"number\") {\n if (!Number.isFinite(value))\n throw siteFailure(\"identity\", \"canonical JSON rejects non-finite numbers\");\n return JSON.stringify(Object.is(value, -0) ? 0 : value);\n }\n if (Array.isArray(value))\n return `[${value.map(canonicalJson).join(\",\")}]`;\n if (isRecord(value)) {\n return `{${Object.entries(value).filter(([, entry]) => entry !== undefined)\n .sort(([left], [right]) => compareUtf8(left, right))\n .map(([key, entry]) => `${JSON.stringify(key)}:${canonicalJson(entry)}`).join(\",\")}}`;\n }\n throw siteFailure(\"identity\", `canonical JSON rejects ${typeof value}`);\n}\nfunction siteFailure(operation: ReportSiteBuildFailure[\"operation\"], reason: string): ReportSiteBuildFailure {\n return Object.freeze({ code: \"report-site-build-failed\" as const, operation, reason });\n}\nfunction isSiteBuildFailure(value: unknown): value is ReportSiteBuildFailure {\n return isRecord(value) && value.code === \"report-site-build-failed\" && typeof value.operation === \"string\" &&\n typeof value.reason === \"string\";\n}\nfunction isBudgetError(value: unknown): value is ReportBuildBudgetExceeded {\n return isRecord(value) && value.code === \"report-build-budget-exceeded\";\n}\nfunction boundedReason(cause: unknown): string {\n const raw = cause instanceof Error ? cause.message : String(cause);\n return raw.replace(/[\\u0000-\\u001f\\u007f-\\u009f]/g, \" \").slice(0, 512).trim() || \"site build failed\";\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,oDAAsD;AAA7C,yGAAA,YAAY,OAAA;AAErB,gDAAuD;AAA9C,0GAAA,eAAe,OAAA;AAExB,qDAA2H;AAAlH,qGAAA,KAAK,OAAA;AAAE,yGAAA,SAAS,OAAA;AAAE,uGAAA,OAAO,OAAA;AAAE,sGAAA,MAAM,OAAA;AAAE,0GAAA,UAAU,OAAA;AAAE,oGAAA,IAAI,OAAA;AAAE,qGAAA,KAAK,OAAA;AAAE,qGAAA,KAAK,OAAA;AAAE,+GAAA,eAAe,OAAA;AAE3F,iDAAuG;AAA9F,qGAAA,OAAO,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,oGAAA,MAAM,OAAA;AAAE,0GAAA,YAAY,OAAA;AAGzE,iDAAmF;AAA1E,iHAAA,qBAAqB,OAAA;AAAE,gHAAA,oBAAoB,OAAA;AAEpD,yDAAiN;AAAxM,mHAAA,iBAAiB,OAAA;AAAE,wHAAA,sBAAsB,OAAA;AAAE,gHAAA,cAAc,OAAA;AAAE,+GAAA,aAAa,OAAA;AAAE,6GAAA,WAAW,OAAA;AAAE,6GAAA,WAAW,OAAA;AAAE,mHAAA,iBAAiB,OAAA;AAAE,kHAAA,gBAAgB,OAAA;AAAE,oHAAA,kBAAkB,OAAA;AAAE,2GAAA,SAAS,OAAA;AAG/K,uCAAyD;AAAhD,kGAAA,MAAM,OAAA;AAAE,iGAAA,KAAK,OAAA;AAAE,uGAAA,WAAW,OAAA;AAEnC,qDAA4E;AAAnE,mHAAA,gBAAgB,OAAA;AAAE,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I,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAAE,sGAAA,SAAS,OAAA;AAAE,uGAAA,UAAU,OAAA;AAAE,4GAAA,eAAe,OAAA;AAAE,0GAAA,aAAa,OAAA;AAE9E,6DAAwH;AAA/G,8GAAA,iBAAiB,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,0GAAA,aAAa,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AAE5E,gEAAiG;AAAxF,wGAAA,WAAW,OAAA;AAAE,4GAAA,eAAe,OAAA;AAAE,wGAAA,WAAW,OAAA;AAElD,kEAA2G;AAAlG,8GAAA,iBAAiB,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,2GAAA,cAAc,OAAA;AAE1D,qEAA6E;AAApE,8GAAA,iBAAiB,OAAA","sourcesContent":["/** The exact public author surface fixed in docs/feature/reports/library.md. */\nexport { defineReport } from \"./definition/report.ts\";\nexport type { HeadTag, Page, PageContext, PageEvidence, PageLoad, PageLoadContext, PageParams, ParameterizedPage, PlainPage, PricingProfile, ReportDefinition, ReportMeta, ReportMetaPage, ReportShell, Sample, } from \"./definition/report.ts\";\nexport { defineComponent } from \"./definition/tree.ts\";\nexport type { ComponentContext, ComponentFaces, ComposeContext, ReportComponent, ResolveContext, TextContext, WebContext, } from \"./definition/tree.ts\";\nexport { agent, aggregate, attempt, evalId, experiment, flag, label, model, reasoningEffort, } from \"./model/aggregate.ts\";\nexport type { AggregationSubject, GroupFunction, } from \"./model/aggregate.ts\";\nexport { costUSD, durationMs, evidenceRow, passRate, tokens, totalCostUSD, } from \"./model/metrics.ts\";\nexport type { EvidenceRow } from \"./model/metrics.ts\";\nexport type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from \"../analysis/index.ts\";\nexport { builtInPricingProfile, definePricingProfile } from \"../analysis/index.ts\";\nexport type { PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, UnpricedCoverage, UnpricedCoverageInput, } from \"../analysis/index.ts\";\nexport { toAttemptEvidence, toAttemptObservability, toEvidenceRows, toFileChanges, toIssueRows, toIssueText, toMetricDetailRow, toSandboxHistory, toSourceNavigation, toSources, } from \"./model/conversions.ts\";\nexport type { MetricDetailRow } from \"./model/conversions.ts\";\nexport type { AttemptEvidenceDomainView, AttemptObservabilityDomainView, FileChangesDomainView, SandboxHistoryDomainView, SourceNavigationDomainView, SourcesDomainView, } from \"../analysis/index.ts\";\nexport { basalt, chalk, defineTheme, } from \"./theme.ts\";\nexport type { ReportTheme, ThemeColor, ThemeDefinition, ThemeHex, ThemeSeries, } from \"./theme.ts\";\nexport { presentDimension, shortestUniqueLabels, } from \"./presentation.ts\";\nexport type { DimensionDeclaration, DimensionEncoding, PresentedDimension, } from \"./presentation.ts\";\nexport { formatAxisTick, formatInstant, formatMetricValue, formatTimeDistance, missingText, } from \"./model/format.ts\";\nexport type { MetricFormat } from \"./model/format.ts\";\nexport type { Cell, VerdictCounts } from \"./definition/cell.tsx\";\nexport { DEFAULT_REPORT_LOCALE, localizedTextEquals, resolveLocalizedText, resolveMetricLabel, } from \"./model/locale.ts\";\nexport type { LocalizedText, ReportLocale, } from \"./model/locale.ts\";\nexport { bar, columns, indent, padEnd, padStart, stringWidth, wrapText, } from \"./model/text-layout.ts\";\nexport type { ColumnAlign } from \"./model/text-layout.ts\";\nexport { Area, applyBarsSortLimit, Bars, Callouts, Chart, Col, CommandEvidence, Conversation, TurnTrace, CopyBlock, DiffView, Grid, Line, Link, Markdown, Row, Scatter, Section, Series, SourceView, Stat, Style, Tab, Table, Tabs, Text, Waterfall, } from \"./definition/primitives.tsx\";\nexport type { AreaProps, BarsProps, BarsSort, CalloutGroup, CalloutItem, CalloutLevel, CalloutsProps, ChartProps, ColProps, CommandEvidenceContent, CommandEvidenceItem, CommandEvidenceProps, ConversationContent, ConversationEntry, ConversationProps, TurnTraceProps, CopyBlockContent, CopyBlockProps, DiffChange, DiffContent, DiffFile, DiffViewProps, GridProps, LayoutProps, LineProps, MarkdownProps, RowProps, ScatterProps, SectionProps, SeriesProps, SourceContent, SourceViewProps, StatProps, StyleProps, TabProps, TableProps, TabsProps, TextProps, WaterfallContent, WaterfallNode, WaterfallProps, } from \"./definition/primitives.tsx\";\nexport { Hero, HeroCard, PoweredBy, RunNotices, SampleFixPrompt, SampleNotices, } from \"./components/site-components/index.tsx\";\nexport type { HeroCardProps, HeroLink, HeroLogo, HeroProps, RunNoticesProps, SampleFixPromptProps, SampleNoticesProps, } from \"./components/site-components/index.tsx\";\nexport { ExperimentScatter, SampleOverview, SampleSummary, StabilityOverview, } from \"./components/summaries/index.tsx\";\nexport type { ExperimentScatterProps, SampleOverviewProps, SampleSummaryProps, StabilityOverviewProps, } from \"./components/summaries/index.tsx\";\nexport { AttemptList, ExperimentTable, FailureList, } from \"./components/entity-lists/index.tsx\";\nexport type { AttemptListProps, ExperimentTableProps, FailureListProps, } from \"./components/entity-lists/index.tsx\";\nexport { AttemptAssessment, AttemptDetails, AttemptSummary, } from \"./components/attempt-detail/index.tsx\";\nexport type { AttemptDetailsProps } from \"./components/attempt-detail/index.tsx\";\nexport { ExperimentDetails } from \"./components/experiment-detail/index.tsx\";\nexport type { ExperimentDetailsProps } from \"./components/experiment-detail/index.tsx\";\nexport type { AttemptDetailTarget, ExperimentDetailTarget, LibraryDetailTarget, } from \"./library/details.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","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c,OAAA;AAAE,0GAAA,aAAa,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AAE5E,gEAAiG;AAAxF,wGAAA,WAAW,OAAA;AAAE,4GAAA,eAAe,OAAA;AAAE,wGAAA,WAAW,OAAA;AAElD,kEAA2G;AAAlG,8GAAA,iBAAiB,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,2GAAA,cAAc,OAAA;AAE1D,qEAA6E;AAApE,8GAAA,iBAAiB,OAAA","sourcesContent":["/** The exact public author surface fixed in docs/feature/reports/library.md. */\nexport { defineReport } from \"./definition/report.ts\";\nexport type { HeadTag, Page, PageContext, PageEvidence, PageLoad, PageLoadContext, PageParams, ParameterizedPage, PlainPage, PricingProfile, ReportDefinition, ReportMeta, ReportMetaPage, ReportShell, Sample, } from \"./definition/report.ts\";\nexport { defineComponent } from \"./definition/tree.ts\";\nexport type { ComponentContext, ComponentFaces, ComposeContext, ReportComponent, ResolveContext, TextContext, WebContext, } from \"./definition/tree.ts\";\nexport { agent, aggregate, attempt, evalId, experiment, flag, label, model, reasoningEffort, } from \"./model/aggregate.ts\";\nexport type { AggregationSubject, GroupFunction, } from \"./model/aggregate.ts\";\nexport { costUSD, durationMs, evidenceRow, passRate, tokens, totalCostUSD, } from \"./model/metrics.ts\";\nexport type { EvidenceRow } from \"./model/metrics.ts\";\nexport type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from \"../analysis/index.ts\";\nexport { builtInPricingProfile, definePricingProfile } from \"../analysis/index.ts\";\nexport type { PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, UnpricedCoverage, UnpricedCoverageInput, } from \"../analysis/index.ts\";\nexport { toAttemptEvidence, toAttemptObservability, toEvidenceRows, toFileChanges, toIssueRows, toIssueText, toMetricDetailRow, toSandboxHistory, toSourceNavigation, toSources, } from \"./model/conversions.ts\";\nexport type { MetricDetailRow } from \"./model/conversions.ts\";\nexport type { AttemptEvidenceDomainView, AttemptObservabilityDomainView, FileChangesDomainView, SandboxHistoryDomainView, SourceNavigationDomainView, SourcesDomainView, } from \"../analysis/index.ts\";\nexport { basalt, chalk, defineTheme, } from \"./theme.ts\";\nexport type { ReportTheme, ThemeColor, ThemeDefinition, ThemeHex, ThemeSeries, } from \"./theme.ts\";\nexport { presentDimension, shortestUniqueLabels, } from \"./presentation.ts\";\nexport type { DimensionDeclaration, DimensionEncoding, PresentedDimension, } from \"./presentation.ts\";\nexport { formatAxisTick, formatInstant, formatMetricValue, formatTimeDistance, missingText, } from \"./model/format.ts\";\nexport type { MetricFormat } from \"./model/format.ts\";\nexport type { Cell, VerdictCounts } from \"./definition/cell.tsx\";\nexport { DEFAULT_REPORT_LOCALE, localizedTextEquals, resolveLocalizedText, resolveMetricLabel, } from \"./model/locale.ts\";\nexport type { LocalizedText, ReportLocale, } from \"./model/locale.ts\";\nexport { bar, columns, indent, padEnd, padStart, stringWidth, wrapText, } from \"./model/text-layout.ts\";\nexport type { ColumnAlign } from \"./model/text-layout.ts\";\nexport { Area, applyBarsSortLimit, Bars, Callouts, Chart, Col, CommandEvidence, Conversation, TurnTrace, CopyBlock, DiffView, Grid, Line, Link, Markdown, Row, Scatter, Section, Series, SourceView, Stat, Style, Tab, Table, Tabs, Text, Waterfall, } from \"./definition/primitives.tsx\";\nexport type { AreaProps, BarsProps, BarsSort, CalloutGroup, CalloutItem, CalloutLevel, CalloutsProps, ChartProps, ColProps, CommandEvidenceContent, CommandEvidenceItem, CommandEvidenceProps, ConversationContent, ConversationEntry, ConversationProps, TurnTraceProps, CopyBlockContent, CopyBlockProps, DiffChange, DiffContent, DiffFile, DiffViewProps, GridProps, LayoutProps, LineProps, MarkdownProps, RowProps, ScatterProps, SectionProps, SeriesProps, SourceContent, SourceViewProps, StatProps, StyleProps, TabProps, TableProps, TabsProps, TextProps, WaterfallContent, WaterfallNode, WaterfallProps, } from \"./definition/primitives.tsx\";\nexport { Hero, HeroCard, PoweredBy, RunNotices, SampleFixPrompt, SampleNotices, } from \"./components/site-components/index.tsx\";\nexport type { HeroCardProps, HeroLink, HeroLogo, HeroProps, RunNoticesProps, SampleFixPromptProps, SampleNoticesProps, } from \"./components/site-components/index.tsx\";\nexport { ExperimentScatter, SampleOverview, SampleSummary, StabilityOverview, } from \"./components/summaries/index.tsx\";\nexport type { ExperimentScatterProps, SampleOverviewProps, SampleSummaryProps, StabilityOverviewProps, } from \"./components/summaries/index.tsx\";\nexport { AttemptList, ExperimentTable, FailureList, } from \"./components/entity-lists/index.tsx\";\nexport type { AttemptListProps, ExperimentTableProps, FailureListProps, } from \"./components/entity-lists/index.tsx\";\nexport { AttemptAssessment, AttemptDetails, AttemptSummary, } from \"./components/attempt-detail/index.tsx\";\nexport type { AttemptDetailsProps } from \"./components/attempt-detail/index.tsx\";\nexport { ExperimentDetails } from \"./components/experiment-detail/index.tsx\";\nexport type { ExperimentDetailsProps } from \"./components/experiment-detail/index.tsx\";\nexport type { AttemptDetailTarget, ExperimentDetailTarget, LibraryDetailTarget, } from \"./library/details.ts\";\n"]}
|
package/dist/report/index.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ export { agent, aggregate, attempt, evalId, experiment, flag, label, model, reas
|
|
|
7
7
|
export type { AggregationSubject, GroupFunction, } from "./model/aggregate.cjs";
|
|
8
8
|
export { costUSD, durationMs, evidenceRow, passRate, tokens, totalCostUSD, } from "./model/metrics.cjs";
|
|
9
9
|
export type { EvidenceRow } from "./model/metrics.cjs";
|
|
10
|
-
export type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from "../analysis/index.cjs";
|
|
10
|
+
export type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from "../analysis/index.cjs";
|
|
11
11
|
export { builtInPricingProfile, definePricingProfile } from "../analysis/index.cjs";
|
|
12
12
|
export type { PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, UnpricedCoverage, UnpricedCoverageInput, } from "../analysis/index.cjs";
|
|
13
13
|
export { toAttemptEvidence, toAttemptObservability, toEvidenceRows, toFileChanges, toIssueRows, toIssueText, toMetricDetailRow, toSandboxHistory, toSourceNavigation, toSources, } from "./model/conversions.cjs";
|
package/dist/report/index.d.mts
CHANGED
|
@@ -7,7 +7,7 @@ export { agent, aggregate, attempt, evalId, experiment, flag, label, model, reas
|
|
|
7
7
|
export type { AggregationSubject, GroupFunction, } from "./model/aggregate.mjs";
|
|
8
8
|
export { costUSD, durationMs, evidenceRow, passRate, tokens, totalCostUSD, } from "./model/metrics.mjs";
|
|
9
9
|
export type { EvidenceRow } from "./model/metrics.mjs";
|
|
10
|
-
export type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from "../analysis/index.mjs";
|
|
10
|
+
export type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from "../analysis/index.mjs";
|
|
11
11
|
export { builtInPricingProfile, definePricingProfile } from "../analysis/index.mjs";
|
|
12
12
|
export type { PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, UnpricedCoverage, UnpricedCoverageInput, } from "../analysis/index.mjs";
|
|
13
13
|
export { toAttemptEvidence, toAttemptObservability, toEvidenceRows, toFileChanges, toIssueRows, toIssueText, toMetricDetailRow, toSandboxHistory, toSourceNavigation, toSources, } from "./model/conversions.mjs";
|
package/dist/report/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { agent, aggregate, attempt, evalId, experiment, flag, label, model, reas
|
|
|
7
7
|
export type { AggregationSubject, GroupFunction, } from "./model/aggregate.js";
|
|
8
8
|
export { costUSD, durationMs, evidenceRow, passRate, tokens, totalCostUSD, } from "./model/metrics.js";
|
|
9
9
|
export type { EvidenceRow } from "./model/metrics.js";
|
|
10
|
-
export type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from "../analysis/index.js";
|
|
10
|
+
export type { AnalysisIssue, ClosedRows, CostBasis, CostCoverageReason, CostCoverageReasonCode, CostLedgerEntry, CostMeasure, CostMetricValue, CostProjectionAggregate, CostProjectionKnown, CostProjectionMigrationRequired, CostProjectionProfile, CostProjectionState, CostProjectionUnavailable, CostProjectionValue, EstimatedRequestCostComponent, EstimatedTokenCostComponent, EvidenceRef, MeasureFormat, MetricState, MetricValue, ObservedCostComponent, ObservedOtherCurrency, ProjectedMoney, } from "../analysis/index.js";
|
|
11
11
|
export { builtInPricingProfile, definePricingProfile } from "../analysis/index.js";
|
|
12
12
|
export type { PricedCoverage, PricedCoverageInput, PricingCharge, PricingChargeInput, PricingCoverage, PricingCoverageId, PricingCoverageInput, PricingDisplay, PricingDisplayInput, PricingEffectiveCondition, PricingEffectiveConditionInput, PricingProfileContentIdentity, PricingProfileInput, PricingProvenance, PricingProvenanceInput, PricingSelector, PricingSelectorInput, UnpricedCoverage, UnpricedCoverageInput, } from "../analysis/index.js";
|
|
13
13
|
export { toAttemptEvidence, toAttemptObservability, toEvidenceRows, toFileChanges, toIssueRows, toIssueText, toMetricDetailRow, toSandboxHistory, toSourceNavigation, toSources, } from "./model/conversions.js";
|
|
@@ -188,8 +188,13 @@ function isDatasetRow(value) {
|
|
|
188
188
|
return isPlainRecord(value) && typeof value.key === "string" && isPlainRecord(value.values);
|
|
189
189
|
}
|
|
190
190
|
function fieldValueMatches(field, value) {
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
// A neutral Dataset also backs explicit external/scalar charts. ClosedRows
|
|
192
|
+
// still pass through closeRow(), which requires an Analysis MetricValue;
|
|
193
|
+
// the general Dataset validator must additionally accept the finite scalar
|
|
194
|
+
// and null forms already supported by pointsToDataset() and chart-map.ts.
|
|
195
|
+
if (field.kind === "metric") {
|
|
196
|
+
return (0, metrics_ts_1.isMetricValue)(value) || value === null || (typeof value === "number" && Number.isFinite(value));
|
|
197
|
+
}
|
|
193
198
|
if (value === null)
|
|
194
199
|
return true;
|
|
195
200
|
switch (field.valueType) {
|