niceeval 0.13.2 → 0.13.3
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/dist/agents/bub.cjs +4 -4
- 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-native.cjs +213 -0
- package/dist/agents/claude-code-native.cjs.map +1 -0
- package/dist/agents/claude-code-native.d.cts +5 -0
- package/dist/agents/claude-code-native.d.mts +5 -0
- package/dist/agents/claude-code-native.d.ts +5 -0
- package/dist/agents/claude-code-native.js +6 -0
- package/dist/agents/claude-code-native.js.map +1 -0
- package/dist/agents/claude-code.cjs +26 -80
- package/dist/agents/claude-code.cjs.map +1 -1
- package/dist/agents/codex-app-server.cjs +314 -0
- package/dist/agents/codex-app-server.cjs.map +1 -0
- package/dist/agents/codex-app-server.d.cts +9 -0
- package/dist/agents/codex-app-server.d.mts +9 -0
- package/dist/agents/codex-app-server.d.ts +9 -0
- package/dist/agents/codex-app-server.js +6 -0
- package/dist/agents/codex-app-server.js.map +1 -0
- package/dist/agents/codex.cjs +19 -68
- 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/index.cjs +3 -1
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +1 -0
- package/dist/agents/index.d.mts +1 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.js +84 -82
- package/dist/agents/index.mjs +84 -82
- package/dist/agents/managed-jsonl.cjs +207 -0
- package/dist/agents/managed-jsonl.cjs.map +1 -0
- package/dist/agents/managed-jsonl.d.cts +39 -0
- package/dist/agents/managed-jsonl.d.mts +39 -0
- package/dist/agents/managed-jsonl.d.ts +39 -0
- package/dist/agents/managed-jsonl.js +6 -0
- package/dist/agents/managed-jsonl.js.map +1 -0
- package/dist/agents/managed-process.cjs +31 -0
- package/dist/agents/managed-process.cjs.map +1 -0
- package/dist/agents/managed-process.d.cts +3 -0
- package/dist/agents/managed-process.d.mts +3 -0
- package/dist/agents/managed-process.d.ts +3 -0
- package/dist/agents/managed-process.js +6 -0
- package/dist/agents/managed-process.js.map +1 -0
- package/dist/agents/omp.cjs +18 -1
- package/dist/agents/omp.cjs.map +1 -1
- package/dist/agents/sdk-streams.cjs +11 -4
- package/dist/agents/sdk-streams.cjs.map +1 -1
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +8 -0
- package/dist/agents/types.d.mts +8 -0
- package/dist/agents/types.d.ts +8 -0
- package/dist/analysis/bindings.cjs +74 -19
- package/dist/analysis/bindings.cjs.map +1 -1
- package/dist/analysis/bindings.d.cts +534 -156
- package/dist/analysis/bindings.d.mts +534 -156
- package/dist/analysis/bindings.d.ts +534 -156
- package/dist/analysis/domain-view.cjs.map +1 -1
- package/dist/analysis/domain-view.d.cts +137 -8
- package/dist/analysis/domain-view.d.mts +137 -8
- package/dist/analysis/domain-view.d.ts +137 -8
- package/dist/analysis/index.cjs.map +1 -1
- package/dist/analysis/index.d.cts +1 -1
- package/dist/analysis/index.d.mts +1 -1
- package/dist/analysis/index.d.ts +1 -1
- package/dist/assertions/api.cjs.map +1 -1
- package/dist/assertions/api.d.cts +62 -0
- package/dist/assertions/api.d.mts +62 -0
- package/dist/assertions/api.d.ts +62 -0
- package/dist/assertions/judge.cjs +56 -5
- package/dist/assertions/judge.cjs.map +1 -1
- package/dist/assertions/match.cjs +66 -42
- package/dist/assertions/match.cjs.map +1 -1
- package/dist/assertions/match.d.cts +13 -0
- package/dist/assertions/match.d.mts +13 -0
- package/dist/assertions/match.d.ts +13 -0
- package/dist/assertions/record/attachment.cjs +104 -33
- package/dist/assertions/record/attachment.cjs.map +1 -1
- package/dist/assertions/record/attachment.d.cts +294 -57
- package/dist/assertions/record/attachment.d.mts +294 -57
- package/dist/assertions/record/attachment.d.ts +294 -57
- package/dist/assertions/record/codec.cjs +91 -17
- package/dist/assertions/record/codec.cjs.map +1 -1
- package/dist/assertions/record/codec.d.cts +280 -52
- package/dist/assertions/record/codec.d.mts +280 -52
- package/dist/assertions/record/codec.d.ts +280 -52
- package/dist/assertions/record/index.js +2 -0
- package/dist/assertions/record/model.cjs +16 -0
- package/dist/assertions/record/model.cjs.map +1 -1
- package/dist/assertions/record/model.d.cts +120 -13
- package/dist/assertions/record/model.d.mts +120 -13
- package/dist/assertions/record/model.d.ts +120 -13
- package/dist/assertions/record/model.js +2 -0
- package/dist/assertions/record/producer.cjs +70 -50
- package/dist/assertions/record/producer.cjs.map +1 -1
- package/dist/assertions/record/producer.d.cts +8 -7
- package/dist/assertions/record/producer.d.mts +8 -7
- package/dist/assertions/record/producer.d.ts +8 -7
- package/dist/assertions/runtime.cjs +49 -7
- package/dist/assertions/runtime.cjs.map +1 -1
- package/dist/cli/application.cjs +40 -0
- package/dist/cli/application.cjs.map +1 -0
- package/dist/cli/application.d.cts +129 -0
- package/dist/cli/application.d.mts +129 -0
- package/dist/cli/application.d.ts +129 -0
- package/dist/cli/application.js +24 -0
- package/dist/cli/application.js.map +1 -0
- package/dist/cli/bootstrap.cjs +10 -4
- package/dist/cli/bootstrap.cjs.map +1 -1
- package/dist/cli/node-application.cjs +123 -0
- package/dist/cli/node-application.cjs.map +1 -0
- package/dist/cli/node-application.d.cts +14 -0
- package/dist/cli/node-application.d.mts +14 -0
- package/dist/cli/node-application.d.ts +14 -0
- package/dist/cli/node-application.js +26 -0
- package/dist/cli/node-application.js.map +1 -0
- package/dist/cli/program.cjs +2807 -0
- package/dist/cli/program.cjs.map +1 -0
- package/dist/cli/program.d.cts +352 -0
- package/dist/cli/program.d.mts +352 -0
- package/dist/cli/program.d.ts +352 -0
- package/dist/cli/program.js +36 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/project-configuration.cjs +134 -0
- package/dist/cli/project-configuration.cjs.map +1 -0
- package/dist/cli/project-configuration.d.cts +64 -0
- package/dist/cli/project-configuration.d.mts +64 -0
- package/dist/cli/project-configuration.d.ts +64 -0
- package/dist/cli/project-configuration.js +22 -0
- package/dist/cli/project-configuration.js.map +1 -0
- package/dist/cli/record.cjs +20 -4
- package/dist/cli/record.cjs.map +1 -1
- package/dist/cli/record.d.cts +3 -3
- package/dist/cli/record.d.mts +3 -3
- package/dist/cli/record.d.ts +3 -3
- package/dist/cli.cjs +19 -3130
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.d.cts +2 -148
- package/dist/cli.d.mts +2 -148
- package/dist/cli.d.ts +2 -148
- package/dist/cli.js +22 -30
- package/dist/context/assert-first.cjs +21 -15
- package/dist/context/assert-first.cjs.map +1 -1
- package/dist/context/assert-first.d.cts +1 -0
- package/dist/context/assert-first.d.mts +1 -0
- package/dist/context/assert-first.d.ts +1 -0
- package/dist/context/attempt-resources.cjs +13 -0
- package/dist/context/attempt-resources.cjs.map +1 -0
- package/dist/context/attempt-resources.d.cts +3 -0
- package/dist/context/attempt-resources.d.mts +3 -0
- package/dist/context/attempt-resources.d.ts +3 -0
- package/dist/context/attempt-resources.js +8 -0
- package/dist/context/attempt-resources.js.map +1 -0
- package/dist/context/session.cjs +4 -3
- package/dist/context/session.cjs.map +1 -1
- package/dist/context/session.d.cts +1 -0
- package/dist/context/session.d.mts +1 -0
- package/dist/context/session.d.ts +1 -0
- package/dist/eval/record/verdict.cjs +3 -2
- package/dist/eval/record/verdict.cjs.map +1 -1
- package/dist/experiment/host/index.cjs +1 -6
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/experiment/host/index.d.cts +1 -0
- package/dist/experiment/host/index.d.mts +1 -0
- package/dist/experiment/host/index.d.ts +1 -0
- package/dist/load-config.cjs +13 -4
- package/dist/load-config.cjs.map +1 -1
- package/dist/load-config.d.cts +4 -3
- package/dist/load-config.d.mts +4 -3
- package/dist/load-config.d.ts +4 -3
- package/dist/load-config.js +4 -2
- package/dist/o11y/parsers/codex.cjs +29 -7
- package/dist/o11y/parsers/codex.cjs.map +1 -1
- package/dist/record/codec/core.d.cts +0 -2
- package/dist/record/codec/core.d.mts +0 -2
- package/dist/record/codec/core.d.ts +0 -2
- package/dist/record/codec/identifiers.cjs +2 -3
- package/dist/record/codec/identifiers.cjs.map +1 -1
- package/dist/record/codec/identifiers.d.cts +1 -2
- package/dist/record/codec/identifiers.d.mts +1 -2
- package/dist/record/codec/identifiers.d.ts +1 -2
- package/dist/record/codec/identifiers.js +10 -12
- package/dist/record/codec/index.js +42 -44
- package/dist/record/definition/attachment.cjs +1 -0
- package/dist/record/definition/attachment.cjs.map +1 -1
- package/dist/record/definition/attachment.d.cts +14 -0
- package/dist/record/definition/attachment.d.mts +14 -0
- package/dist/record/definition/attachment.d.ts +14 -0
- package/dist/record/family/assertions-v1.cjs +104 -0
- package/dist/record/family/assertions-v1.cjs.map +1 -0
- package/dist/record/family/assertions-v1.d.cts +2 -0
- package/dist/record/family/assertions-v1.d.mts +2 -0
- package/dist/record/family/assertions-v1.d.ts +2 -0
- package/dist/record/family/assertions-v1.js +6 -0
- package/dist/record/family/assertions-v1.js.map +1 -0
- package/dist/record/family/assertions.cjs +16 -5
- package/dist/record/family/assertions.cjs.map +1 -1
- package/dist/record/family/assertions.d.cts +510 -56
- package/dist/record/family/assertions.d.mts +510 -56
- package/dist/record/family/assertions.d.ts +510 -56
- package/dist/record/family/assertions.js +14 -10
- package/dist/record/family/catalog.cjs +17 -1
- package/dist/record/family/catalog.cjs.map +1 -1
- package/dist/record/family/catalog.d.cts +1292 -104
- package/dist/record/family/catalog.d.mts +1292 -104
- package/dist/record/family/catalog.d.ts +1292 -104
- package/dist/record/family/catalog.js +22 -20
- package/dist/record/family/index.js +144 -138
- package/dist/record/family/observability-v1.cjs +5 -0
- package/dist/record/family/observability-v1.cjs.map +1 -1
- package/dist/record/family/observability.cjs +1 -1
- package/dist/record/family/observability.cjs.map +1 -1
- package/dist/record/host/runtime.cjs +323 -173
- 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 +9 -7
- package/dist/record/host/types.d.mts +9 -7
- package/dist/record/host/types.d.ts +9 -7
- package/dist/record/model/core.cjs.map +1 -1
- package/dist/record/model/core.d.cts +1 -2
- package/dist/record/model/core.d.mts +1 -2
- package/dist/record/model/core.d.ts +1 -2
- package/dist/record/model/definition.cjs +1 -2
- package/dist/record/model/definition.cjs.map +1 -1
- package/dist/record/model/definition.d.cts +1 -7
- package/dist/record/model/definition.d.mts +1 -7
- package/dist/record/model/definition.d.ts +1 -7
- package/dist/record/model/identifiers.cjs +2 -3
- package/dist/record/model/identifiers.cjs.map +1 -1
- package/dist/record/model/identifiers.d.cts +1 -3
- package/dist/record/model/identifiers.d.mts +1 -3
- package/dist/record/model/identifiers.d.ts +1 -3
- package/dist/record/model/identifiers.js +36 -38
- package/dist/record/model/index.js +60 -62
- package/dist/record/platform/node.cjs +17 -7
- 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 +8 -3
- package/dist/record/platform/services.d.mts +8 -3
- package/dist/record/platform/services.d.ts +8 -3
- package/dist/record/reader/format.cjs +16 -65
- package/dist/record/reader/format.cjs.map +1 -1
- package/dist/record/reader/format.d.cts +5 -9
- package/dist/record/reader/format.d.mts +5 -9
- package/dist/record/reader/format.d.ts +5 -9
- package/dist/record/reader/index.js +10 -8
- package/dist/record/reader/runtime.cjs +63 -32
- package/dist/record/reader/runtime.cjs.map +1 -1
- package/dist/record/reader/runtime.d.cts +40 -4
- package/dist/record/reader/runtime.d.mts +40 -4
- package/dist/record/reader/runtime.d.ts +40 -4
- package/dist/record/reader/runtime.js +6 -4
- package/dist/report/assets/enhance.js +5 -5
- package/dist/report/assets/styles.css +190 -24
- package/dist/report/built-in/result-components.cjs +8 -5
- package/dist/report/built-in/result-components.cjs.map +1 -1
- package/dist/report/built-in/standard.cjs +3 -0
- package/dist/report/built-in/standard.cjs.map +1 -1
- package/dist/report/built-in/standard.d.cts +2 -0
- package/dist/report/built-in/standard.d.mts +2 -0
- package/dist/report/built-in/standard.d.ts +2 -0
- package/dist/report/client-dist/app.js +53 -0
- package/dist/report/components/attempt-detail/compute.cjs +108 -231
- package/dist/report/components/attempt-detail/compute.cjs.map +1 -1
- package/dist/report/components/attempt-detail/compute.d.cts +11 -45
- package/dist/report/components/attempt-detail/compute.d.mts +11 -45
- package/dist/report/components/attempt-detail/compute.d.ts +11 -45
- package/dist/report/components/attempt-detail/compute.js +2 -4
- package/dist/report/components/attempt-detail/content.cjs +4 -4
- package/dist/report/components/attempt-detail/content.cjs.map +1 -1
- package/dist/report/components/attempt-detail/validate.cjs +47 -4
- package/dist/report/components/attempt-detail/validate.cjs.map +1 -1
- package/dist/report/components/entity-lists/compute.cjs +9 -15
- package/dist/report/components/entity-lists/compute.cjs.map +1 -1
- package/dist/report/components/entity-lists/content.cjs +53 -40
- package/dist/report/components/entity-lists/content.cjs.map +1 -1
- package/dist/report/components/entity-lists/index.cjs +1 -3
- package/dist/report/components/entity-lists/index.cjs.map +1 -1
- package/dist/report/components/experiment-detail/compute.cjs +4 -6
- package/dist/report/components/experiment-detail/compute.cjs.map +1 -1
- package/dist/report/components/summaries/index.cjs +5 -1
- package/dist/report/components/summaries/index.cjs.map +1 -1
- package/dist/report/definition/cell.cjs +14 -7
- package/dist/report/definition/cell.cjs.map +1 -1
- package/dist/report/definition/cell.d.cts +4 -0
- package/dist/report/definition/cell.d.mts +4 -0
- package/dist/report/definition/cell.d.ts +4 -0
- package/dist/report/definition/primitives/assertion-evidence.cjs +96 -0
- package/dist/report/definition/primitives/assertion-evidence.cjs.map +1 -0
- package/dist/report/definition/primitives/assertion-evidence.d.cts +11 -0
- package/dist/report/definition/primitives/assertion-evidence.d.mts +11 -0
- package/dist/report/definition/primitives/assertion-evidence.d.ts +11 -0
- package/dist/report/definition/primitives/assertion-evidence.js +6 -0
- package/dist/report/definition/primitives/assertion-evidence.js.map +1 -0
- package/dist/report/definition/primitives/conversation.cjs +7 -0
- package/dist/report/definition/primitives/conversation.cjs.map +1 -1
- package/dist/report/definition/primitives/conversation.d.cts +2 -0
- package/dist/report/definition/primitives/conversation.d.mts +2 -0
- package/dist/report/definition/primitives/conversation.d.ts +2 -0
- package/dist/report/definition/primitives/turn-trace.cjs +53 -3
- package/dist/report/definition/primitives/turn-trace.cjs.map +1 -1
- package/dist/report/definition/primitives.cjs +14 -1
- package/dist/report/definition/primitives.cjs.map +1 -1
- package/dist/report/definition/report.cjs +16 -8
- package/dist/report/definition/report.cjs.map +1 -1
- package/dist/report/definition/report.d.cts +6 -0
- package/dist/report/definition/report.d.mts +6 -0
- package/dist/report/definition/report.d.ts +6 -0
- package/dist/report/definition/table-text.cjs +12 -3
- package/dist/report/definition/table-text.cjs.map +1 -1
- package/dist/report/definition/table-text.d.cts +6 -1
- package/dist/report/definition/table-text.d.mts +6 -1
- package/dist/report/definition/table-text.d.ts +6 -1
- package/dist/report/execution/model.cjs +6 -14
- package/dist/report/execution/model.cjs.map +1 -1
- package/dist/report/execution/model.d.cts +5 -10
- package/dist/report/execution/model.d.mts +5 -10
- package/dist/report/execution/model.d.ts +5 -10
- package/dist/report/execution/model.js +6 -6
- package/dist/report/execution/paths.cjs +0 -11
- package/dist/report/execution/paths.cjs.map +1 -1
- package/dist/report/execution/paths.d.cts +0 -1
- package/dist/report/execution/paths.d.mts +0 -1
- package/dist/report/execution/paths.d.ts +0 -1
- package/dist/report/execution/paths.js +6 -8
- package/dist/report/host/execute.cjs +13 -22
- package/dist/report/host/execute.cjs.map +1 -1
- package/dist/report/host/execute.d.cts +1 -4
- package/dist/report/host/execute.d.mts +1 -4
- package/dist/report/host/execute.d.ts +1 -4
- package/dist/report/host/from-record.cjs +3 -0
- package/dist/report/host/from-record.cjs.map +1 -1
- package/dist/report/host/from-record.d.cts +4 -1
- package/dist/report/host/from-record.d.mts +4 -1
- package/dist/report/host/from-record.d.ts +4 -1
- package/dist/report/host/site-assets.cjs +1 -2
- package/dist/report/host/site-assets.cjs.map +1 -1
- package/dist/report/host/site-assets.d.cts +0 -1
- package/dist/report/host/site-assets.d.mts +0 -1
- package/dist/report/host/site-assets.d.ts +0 -1
- package/dist/report/host/site-assets.js +2 -4
- package/dist/report/host/static.cjs +71 -346
- package/dist/report/host/static.cjs.map +1 -1
- package/dist/report/host/static.d.cts +1 -3
- package/dist/report/host/static.d.mts +1 -3
- package/dist/report/host/static.d.ts +1 -3
- package/dist/report/host/static.js +2 -2
- package/dist/report/host/view-session.cjs.map +1 -1
- package/dist/report/host/view-session.d.cts +1 -1
- package/dist/report/host/view-session.d.mts +1 -1
- package/dist/report/host/view-session.d.ts +1 -1
- package/dist/report/model/locale.cjs +1 -1
- package/dist/report/model/locale.cjs.map +1 -1
- package/dist/report/model/locale.d.cts +1 -1
- package/dist/report/model/locale.d.mts +1 -1
- package/dist/report/model/locale.d.ts +1 -1
- package/dist/report/model/pricing.cjs +2 -2
- package/dist/report/model/pricing.cjs.map +1 -1
- package/dist/report/react/enhance.js +5 -5
- package/dist/report/react/styles.css +190 -24
- package/dist/runner/adoption.cjs +4 -7
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/attempt-resources.cjs +60 -0
- package/dist/runner/attempt-resources.cjs.map +1 -0
- package/dist/runner/attempt-resources.d.cts +13 -0
- package/dist/runner/attempt-resources.d.mts +13 -0
- package/dist/runner/attempt-resources.d.ts +13 -0
- package/dist/runner/attempt-resources.js +6 -0
- package/dist/runner/attempt-resources.js.map +1 -0
- package/dist/runner/attempt.cjs +37 -3
- package/dist/runner/attempt.cjs.map +1 -1
- package/dist/runner/feedback/failure.cjs +77 -2
- package/dist/runner/feedback/failure.cjs.map +1 -1
- package/dist/runner/feedback/failure.d.cts +2 -1
- package/dist/runner/feedback/failure.d.mts +2 -1
- package/dist/runner/feedback/failure.d.ts +2 -1
- package/dist/runner/project-current.cjs +2 -13
- package/dist/runner/project-current.cjs.map +1 -1
- package/dist/runner/project-current.d.cts +4 -2
- package/dist/runner/project-current.d.mts +4 -2
- package/dist/runner/project-current.d.ts +4 -2
- package/dist/runner/reporters/braintrust.cjs +7 -7
- package/dist/runner/reporters/braintrust.cjs.map +1 -1
- package/dist/runner/reuse-readback.cjs +3 -4
- package/dist/runner/reuse-readback.cjs.map +1 -1
- package/dist/runner/run.cjs +5 -2
- package/dist/runner/run.cjs.map +1 -1
- package/dist/sandbox/backend.cjs +32 -2
- package/dist/sandbox/backend.cjs.map +1 -1
- package/dist/sandbox/backend.d.cts +12 -1
- package/dist/sandbox/backend.d.mts +12 -1
- package/dist/sandbox/backend.d.ts +12 -1
- package/dist/sandbox/backend.js +28 -22
- package/dist/sandbox/docker.cjs +140 -0
- package/dist/sandbox/docker.cjs.map +1 -1
- package/dist/sandbox/docker.d.cts +3 -1
- package/dist/sandbox/docker.d.mts +3 -1
- package/dist/sandbox/docker.d.ts +3 -1
- package/dist/sandbox/e2b.cjs +42 -0
- package/dist/sandbox/e2b.cjs.map +1 -1
- package/dist/sandbox/e2b.d.cts +2 -0
- package/dist/sandbox/e2b.d.mts +2 -0
- package/dist/sandbox/e2b.d.ts +2 -0
- package/dist/sandbox/local.cjs +64 -0
- package/dist/sandbox/local.cjs.map +1 -1
- package/dist/sandbox/local.d.cts +3 -1
- package/dist/sandbox/local.d.mts +3 -1
- package/dist/sandbox/local.d.ts +3 -1
- package/dist/sandbox/managed-process.cjs +49 -0
- package/dist/sandbox/managed-process.cjs.map +1 -0
- package/dist/sandbox/managed-process.d.cts +11 -0
- package/dist/sandbox/managed-process.d.mts +11 -0
- package/dist/sandbox/managed-process.d.ts +11 -0
- package/dist/sandbox/managed-process.js +6 -0
- package/dist/sandbox/managed-process.js.map +1 -0
- package/dist/sandbox/types.cjs.map +1 -1
- package/dist/sandbox/types.d.cts +24 -0
- package/dist/sandbox/types.d.mts +24 -0
- package/dist/sandbox/types.d.ts +24 -0
- package/dist/sandbox/vercel.cjs +1 -0
- package/dist/sandbox/vercel.cjs.map +1 -1
- package/dist/sandbox/vercel.d.cts +1 -0
- package/dist/sandbox/vercel.d.mts +1 -0
- package/dist/sandbox/vercel.d.ts +1 -0
- package/dist/view/server.cjs +2 -37
- package/dist/view/server.cjs.map +1 -1
- package/dist/view/server.d.cts +0 -3
- package/dist/view/server.d.mts +0 -3
- package/dist/view/server.d.ts +0 -3
- package/docs-site/zh/reference/builtin-agents.mdx +7 -7
- package/docs-site/zh/reference/official-adapters.mdx +4 -4
- package/docs-site/zh/reference/report-components.mdx +2 -2
- package/docs-site/zh/tutorials/configuration.mdx +2 -2
- package/docs-site/zh/tutorials/deploy-report-site.mdx +24 -2
- package/docs-site/zh/tutorials/publish-report.mdx +4 -4
- package/docs-site/zh/tutorials/sandbox-agent.mdx +5 -5
- package/docs-site/zh/tutorials/theming.mdx +2 -2
- package/package.json +4 -6
- package/dist/record/migration/index.cjs +0 -5
- package/dist/record/migration/index.cjs.map +0 -1
- package/dist/record/migration/index.d.cts +0 -11
- package/dist/record/migration/index.d.mts +0 -11
- package/dist/record/migration/index.d.ts +0 -11
- package/dist/record/migration/index.js +0 -6
- package/dist/record/migration/index.js.map +0 -1
- package/dist/report/host/site-runtime.cjs +0 -92
- package/dist/report/host/site-runtime.cjs.map +0 -1
- package/dist/report/host/site-runtime.d.cts +0 -9
- package/dist/report/host/site-runtime.d.mts +0 -9
- package/dist/report/host/site-runtime.d.ts +0 -9
- package/dist/report/host/site-runtime.js +0 -10
- package/dist/report/host/site-runtime.js.map +0 -1
- package/dist/view/client-dist/app.css +0 -2
- package/dist/view/client-dist/app.js +0 -49
- package/dist/view/data.cjs +0 -3
- package/dist/view/data.cjs.map +0 -1
- package/dist/view/data.d.cts +0 -9
- package/dist/view/data.d.mts +0 -9
- package/dist/view/data.d.ts +0 -9
- package/dist/view/data.js +0 -4
- package/dist/view/data.js.map +0 -1
- package/dist/view/index.cjs +0 -24
- package/dist/view/index.cjs.map +0 -1
- package/dist/view/index.d.cts +0 -9
- package/dist/view/index.d.mts +0 -9
- package/dist/view/index.d.ts +0 -9
- package/dist/view/index.js +0 -28
- package/dist/view/index.js.map +0 -1
- package/dist/view/report-view-cache.cjs +0 -200
- package/dist/view/report-view-cache.cjs.map +0 -1
- package/dist/view/report-view-cache.d.cts +0 -67
- package/dist/view/report-view-cache.d.mts +0 -67
- package/dist/view/report-view-cache.d.ts +0 -67
- package/dist/view/report-view-cache.js +0 -8
- package/dist/view/report-view-cache.js.map +0 -1
- package/dist/view/shared/types.cjs +0 -3
- package/dist/view/shared/types.cjs.map +0 -1
- package/dist/view/shared/types.d.cts +0 -51
- package/dist/view/shared/types.d.mts +0 -51
- package/dist/view/shared/types.d.ts +0 -51
- package/dist/view/shared/types.js +0 -4
- package/dist/view/shared/types.js.map +0 -1
- package/dist/view/site.cjs +0 -32
- package/dist/view/site.cjs.map +0 -1
- package/dist/view/site.d.cts +0 -24
- package/dist/view/site.d.mts +0 -24
- package/dist/view/site.d.ts +0 -24
- package/dist/view/site.js +0 -8
- package/dist/view/site.js.map +0 -1
- package/dist/view/styles.css +0 -170
- package/dist/view/template.html +0 -17
package/dist/view/data.cjs
DELETED
package/dist/view/data.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["data.ts"],"names":[],"mappings":"","sourcesContent":["import type { ClosedSiteRevision } from \"../report/execution/model.ts\";\n/**\n * A View host receives a byte-complete immutable SiteRevision. It does not\n * discover historical evaluation data or render from an execution at request\n * time.\n */\nexport interface ViewScanOptions {\n readonly revision?: ClosedSiteRevision;\n}\n"]}
|
package/dist/view/data.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ClosedSiteRevision } from "../report/execution/model.cjs";
|
|
2
|
-
/**
|
|
3
|
-
* A View host receives a byte-complete immutable SiteRevision. It does not
|
|
4
|
-
* discover historical evaluation data or render from an execution at request
|
|
5
|
-
* time.
|
|
6
|
-
*/
|
|
7
|
-
export interface ViewScanOptions {
|
|
8
|
-
readonly revision?: ClosedSiteRevision;
|
|
9
|
-
}
|
package/dist/view/data.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ClosedSiteRevision } from "../report/execution/model.mjs";
|
|
2
|
-
/**
|
|
3
|
-
* A View host receives a byte-complete immutable SiteRevision. It does not
|
|
4
|
-
* discover historical evaluation data or render from an execution at request
|
|
5
|
-
* time.
|
|
6
|
-
*/
|
|
7
|
-
export interface ViewScanOptions {
|
|
8
|
-
readonly revision?: ClosedSiteRevision;
|
|
9
|
-
}
|
package/dist/view/data.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ClosedSiteRevision } from "../report/execution/model.js";
|
|
2
|
-
/**
|
|
3
|
-
* A View host receives a byte-complete immutable SiteRevision. It does not
|
|
4
|
-
* discover historical evaluation data or render from an execution at request
|
|
5
|
-
* time.
|
|
6
|
-
*/
|
|
7
|
-
export interface ViewScanOptions {
|
|
8
|
-
readonly revision?: ClosedSiteRevision;
|
|
9
|
-
}
|
package/dist/view/data.js
DELETED
package/dist/view/data.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sources":[],"names":[],"mappings":""}
|
package/dist/view/index.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.writeSite = exports.planSite = exports.openViewServer = exports.openReportViewSession = exports.ReportFileSystem = exports.exportStaticReport = exports.openNodeReportViewServer = exports.openNodeReportView = exports.makeNodeReportFileSystem = exports.NodeReportViewHostLive = exports.NodeReportFileSystemLive = exports.NodeReportViewHost = void 0;
|
|
4
|
-
// View is a thin Node host over an already closed site revision. Record
|
|
5
|
-
// opening, Sample selection, Analysis, and revision construction belong
|
|
6
|
-
// to the application composition boundary in `cli.ts`.
|
|
7
|
-
var node_ts_1 = require("../report/host/node.cjs");
|
|
8
|
-
Object.defineProperty(exports, "NodeReportViewHost", { enumerable: true, get: function () { return node_ts_1.NodeReportViewHost; } });
|
|
9
|
-
Object.defineProperty(exports, "NodeReportFileSystemLive", { enumerable: true, get: function () { return node_ts_1.NodeReportFileSystemLive; } });
|
|
10
|
-
Object.defineProperty(exports, "NodeReportViewHostLive", { enumerable: true, get: function () { return node_ts_1.NodeReportViewHostLive; } });
|
|
11
|
-
Object.defineProperty(exports, "makeNodeReportFileSystem", { enumerable: true, get: function () { return node_ts_1.makeNodeReportFileSystem; } });
|
|
12
|
-
Object.defineProperty(exports, "openNodeReportView", { enumerable: true, get: function () { return node_ts_1.openNodeReportView; } });
|
|
13
|
-
Object.defineProperty(exports, "openNodeReportViewServer", { enumerable: true, get: function () { return node_ts_1.openNodeReportViewServer; } });
|
|
14
|
-
var static_ts_1 = require("../report/host/static.cjs");
|
|
15
|
-
Object.defineProperty(exports, "exportStaticReport", { enumerable: true, get: function () { return static_ts_1.exportStaticReport; } });
|
|
16
|
-
Object.defineProperty(exports, "ReportFileSystem", { enumerable: true, get: function () { return static_ts_1.ReportFileSystem; } });
|
|
17
|
-
var view_session_ts_1 = require("../report/host/view-session.cjs");
|
|
18
|
-
Object.defineProperty(exports, "openReportViewSession", { enumerable: true, get: function () { return view_session_ts_1.openReportViewSession; } });
|
|
19
|
-
var server_ts_1 = require("./server.cjs");
|
|
20
|
-
Object.defineProperty(exports, "openViewServer", { enumerable: true, get: function () { return server_ts_1.openViewServer; } });
|
|
21
|
-
var site_ts_1 = require("./site.cjs");
|
|
22
|
-
Object.defineProperty(exports, "planSite", { enumerable: true, get: function () { return site_ts_1.planSite; } });
|
|
23
|
-
Object.defineProperty(exports, "writeSite", { enumerable: true, get: function () { return site_ts_1.writeSite; } });
|
|
24
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/view/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,wEAAwE;AACxE,wEAAwE;AACxE,uDAAuD;AACvD,kDAAuL;AAA9K,6GAAA,kBAAkB,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAAE,iHAAA,sBAAsB,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAAE,6GAAA,kBAAkB,OAAA;AAAE,mHAAA,wBAAwB,OAAA;AAErJ,sDAAgF;AAAvE,+GAAA,kBAAkB,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAE7C,kEAAuE;AAA9D,wHAAA,qBAAqB,OAAA;AAE9B,yCAAiH;AAAxG,2GAAA,cAAc,OAAA;AACvB,qCAA8E;AAArE,mGAAA,QAAQ,OAAA;AAAE,oGAAA,SAAS,OAAA","sourcesContent":["// View is a thin Node host over an already closed site revision. Record\n// opening, Sample selection, Analysis, and revision construction belong\n// to the application composition boundary in `cli.ts`.\nexport { NodeReportViewHost, NodeReportFileSystemLive, NodeReportViewHostLive, makeNodeReportFileSystem, openNodeReportView, openNodeReportViewServer, } from \"../report/host/node.ts\";\nexport type { NodeReportViewHostService, ReportViewRequest, } from \"../report/host/node.ts\";\nexport { exportStaticReport, ReportFileSystem } from \"../report/host/static.ts\";\nexport type { ReportExportError, ReportExportTargetExists, ReportFileSystemError, ReportFileSystemFailure, ReportFileSystemService, ReportHostOutputPath, ReportStaticExportReceipt, } from \"../report/host/static.ts\";\nexport { openReportViewSession } from \"../report/host/view-session.ts\";\nexport type { OpenReportViewSessionInput, ReportViewOpenError, ReportViewProblem, ReportViewRebuildFailure, ReportViewRevision, ReportViewSession, ReportViewSessionClosed, ReportViewState, } from \"../report/host/view-session.ts\";\nexport { openViewServer, type NodeViewServerError, type ReportViewServer, type ViewOptions, } from \"./server.ts\";\nexport { planSite, writeSite, type SiteFile, type SitePlan } from \"./site.ts\";\nexport type { ViewScanOptions } from \"./data.ts\";\n"]}
|
package/dist/view/index.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { NodeReportViewHost, NodeReportFileSystemLive, NodeReportViewHostLive, makeNodeReportFileSystem, openNodeReportView, openNodeReportViewServer, } from "../report/host/node.cjs";
|
|
2
|
-
export type { NodeReportViewHostService, ReportViewRequest, } from "../report/host/node.cjs";
|
|
3
|
-
export { exportStaticReport, ReportFileSystem } from "../report/host/static.cjs";
|
|
4
|
-
export type { ReportExportError, ReportExportTargetExists, ReportFileSystemError, ReportFileSystemFailure, ReportFileSystemService, ReportHostOutputPath, ReportStaticExportReceipt, } from "../report/host/static.cjs";
|
|
5
|
-
export { openReportViewSession } from "../report/host/view-session.cjs";
|
|
6
|
-
export type { OpenReportViewSessionInput, ReportViewOpenError, ReportViewProblem, ReportViewRebuildFailure, ReportViewRevision, ReportViewSession, ReportViewSessionClosed, ReportViewState, } from "../report/host/view-session.cjs";
|
|
7
|
-
export { openViewServer, type NodeViewServerError, type ReportViewServer, type ViewOptions, } from "./server.cjs";
|
|
8
|
-
export { planSite, writeSite, type SiteFile, type SitePlan } from "./site.cjs";
|
|
9
|
-
export type { ViewScanOptions } from "./data.cjs";
|
package/dist/view/index.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { NodeReportViewHost, NodeReportFileSystemLive, NodeReportViewHostLive, makeNodeReportFileSystem, openNodeReportView, openNodeReportViewServer, } from "../report/host/node.mjs";
|
|
2
|
-
export type { NodeReportViewHostService, ReportViewRequest, } from "../report/host/node.mjs";
|
|
3
|
-
export { exportStaticReport, ReportFileSystem } from "../report/host/static.mjs";
|
|
4
|
-
export type { ReportExportError, ReportExportTargetExists, ReportFileSystemError, ReportFileSystemFailure, ReportFileSystemService, ReportHostOutputPath, ReportStaticExportReceipt, } from "../report/host/static.mjs";
|
|
5
|
-
export { openReportViewSession } from "../report/host/view-session.mjs";
|
|
6
|
-
export type { OpenReportViewSessionInput, ReportViewOpenError, ReportViewProblem, ReportViewRebuildFailure, ReportViewRevision, ReportViewSession, ReportViewSessionClosed, ReportViewState, } from "../report/host/view-session.mjs";
|
|
7
|
-
export { openViewServer, type NodeViewServerError, type ReportViewServer, type ViewOptions, } from "./server.mjs";
|
|
8
|
-
export { planSite, writeSite, type SiteFile, type SitePlan } from "./site.mjs";
|
|
9
|
-
export type { ViewScanOptions } from "./data.mjs";
|
package/dist/view/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { NodeReportViewHost, NodeReportFileSystemLive, NodeReportViewHostLive, makeNodeReportFileSystem, openNodeReportView, openNodeReportViewServer, } from "../report/host/node.js";
|
|
2
|
-
export type { NodeReportViewHostService, ReportViewRequest, } from "../report/host/node.js";
|
|
3
|
-
export { exportStaticReport, ReportFileSystem } from "../report/host/static.js";
|
|
4
|
-
export type { ReportExportError, ReportExportTargetExists, ReportFileSystemError, ReportFileSystemFailure, ReportFileSystemService, ReportHostOutputPath, ReportStaticExportReceipt, } from "../report/host/static.js";
|
|
5
|
-
export { openReportViewSession } from "../report/host/view-session.js";
|
|
6
|
-
export type { OpenReportViewSessionInput, ReportViewOpenError, ReportViewProblem, ReportViewRebuildFailure, ReportViewRevision, ReportViewSession, ReportViewSessionClosed, ReportViewState, } from "../report/host/view-session.js";
|
|
7
|
-
export { openViewServer, type NodeViewServerError, type ReportViewServer, type ViewOptions, } from "./server.js";
|
|
8
|
-
export { planSite, writeSite, type SiteFile, type SitePlan } from "./site.js";
|
|
9
|
-
export type { ViewScanOptions } from "./data.js";
|
package/dist/view/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { createRequire as __niceevalCreateRequire } from "node:module";
|
|
2
|
-
const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
|
|
3
|
-
const __niceevalCanonical = __niceevalRequire("./index.cjs");
|
|
4
|
-
const __niceevalExport0 = __niceevalCanonical["NodeReportFileSystemLive"];
|
|
5
|
-
export { __niceevalExport0 as NodeReportFileSystemLive };
|
|
6
|
-
const __niceevalExport1 = __niceevalCanonical["NodeReportViewHost"];
|
|
7
|
-
export { __niceevalExport1 as NodeReportViewHost };
|
|
8
|
-
const __niceevalExport2 = __niceevalCanonical["NodeReportViewHostLive"];
|
|
9
|
-
export { __niceevalExport2 as NodeReportViewHostLive };
|
|
10
|
-
const __niceevalExport3 = __niceevalCanonical["ReportFileSystem"];
|
|
11
|
-
export { __niceevalExport3 as ReportFileSystem };
|
|
12
|
-
const __niceevalExport4 = __niceevalCanonical["exportStaticReport"];
|
|
13
|
-
export { __niceevalExport4 as exportStaticReport };
|
|
14
|
-
const __niceevalExport5 = __niceevalCanonical["makeNodeReportFileSystem"];
|
|
15
|
-
export { __niceevalExport5 as makeNodeReportFileSystem };
|
|
16
|
-
const __niceevalExport6 = __niceevalCanonical["openNodeReportView"];
|
|
17
|
-
export { __niceevalExport6 as openNodeReportView };
|
|
18
|
-
const __niceevalExport7 = __niceevalCanonical["openNodeReportViewServer"];
|
|
19
|
-
export { __niceevalExport7 as openNodeReportViewServer };
|
|
20
|
-
const __niceevalExport8 = __niceevalCanonical["openReportViewSession"];
|
|
21
|
-
export { __niceevalExport8 as openReportViewSession };
|
|
22
|
-
const __niceevalExport9 = __niceevalCanonical["openViewServer"];
|
|
23
|
-
export { __niceevalExport9 as openViewServer };
|
|
24
|
-
const __niceevalExport10 = __niceevalCanonical["planSite"];
|
|
25
|
-
export { __niceevalExport10 as planSite };
|
|
26
|
-
const __niceevalExport11 = __niceevalCanonical["writeSite"];
|
|
27
|
-
export { __niceevalExport11 as writeSite };
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
package/dist/view/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"names":[],"mappings":""}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.closeReportPageBytes = closeReportPageBytes;
|
|
4
|
-
exports.rethemeClosedReportPageBytes = rethemeClosedReportPageBytes;
|
|
5
|
-
const model_ts_1 = require("../report/execution/model.cjs");
|
|
6
|
-
const static_ts_1 = require("../report/host/static.cjs");
|
|
7
|
-
const MANIFEST_PATH = "_niceeval/manifest.json";
|
|
8
|
-
const STATIC_RENDERER = static_ts_1.REPORT_STATIC_RENDERER;
|
|
9
|
-
const VIEW_LOCALES = "en,zh-CN";
|
|
10
|
-
const decoder = new TextDecoder();
|
|
11
|
-
/**
|
|
12
|
-
* Extracts one immutable byte-only cache entry from a Host-issued revision.
|
|
13
|
-
* Invalid or unrecognized static output simply opts out of page reuse.
|
|
14
|
-
*/
|
|
15
|
-
function closeReportPageBytes(revision, input) {
|
|
16
|
-
try {
|
|
17
|
-
if (input.selectionIdentity.length === 0 || input.themeIdentity.length === 0)
|
|
18
|
-
return undefined;
|
|
19
|
-
const data = (0, model_ts_1.closedSiteRevisionData)(revision);
|
|
20
|
-
if (data.identity.format !== "niceeval.report-site-revision/v1" || data.identity.renderer !== STATIC_RENDERER) {
|
|
21
|
-
return undefined;
|
|
22
|
-
}
|
|
23
|
-
const manifest = manifestIdentity(data.files);
|
|
24
|
-
if (manifest === undefined || !sameFileSet(manifest.files, data.files))
|
|
25
|
-
return undefined;
|
|
26
|
-
const filesByPath = new Map(data.files.map((file) => [file.path, file]));
|
|
27
|
-
const pagePaths = new Set();
|
|
28
|
-
const pageEntries = new Set();
|
|
29
|
-
const routes = new Set();
|
|
30
|
-
const pages = [];
|
|
31
|
-
for (const page of manifest.pages) {
|
|
32
|
-
const entryIdentity = `${page.pageId}\0${page.route}`;
|
|
33
|
-
if (pagePaths.has(page.path) || pageEntries.has(entryIdentity) || routes.has(page.route))
|
|
34
|
-
return undefined;
|
|
35
|
-
const file = filesByPath.get(page.path);
|
|
36
|
-
if (file === undefined || !file.mediaType.startsWith("text/html"))
|
|
37
|
-
return undefined;
|
|
38
|
-
pagePaths.add(page.path);
|
|
39
|
-
pageEntries.add(entryIdentity);
|
|
40
|
-
routes.add(page.route);
|
|
41
|
-
pages.push(Object.freeze({
|
|
42
|
-
key: Object.freeze({
|
|
43
|
-
format: "niceeval.report-page-bytes/v1",
|
|
44
|
-
sampleIdentity: manifest.sampleIdentity,
|
|
45
|
-
selectionIdentity: input.selectionIdentity,
|
|
46
|
-
reportIdentity: manifest.reportIdentity,
|
|
47
|
-
renderer: STATIC_RENDERER,
|
|
48
|
-
pageId: page.pageId,
|
|
49
|
-
route: page.route,
|
|
50
|
-
paramsIdentity: page.route,
|
|
51
|
-
locales: VIEW_LOCALES,
|
|
52
|
-
themeIdentity: input.themeIdentity,
|
|
53
|
-
}),
|
|
54
|
-
path: file.path,
|
|
55
|
-
mediaType: file.mediaType,
|
|
56
|
-
bytes: new Uint8Array(file.bytes),
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
if (pages.length === 0)
|
|
60
|
-
return undefined;
|
|
61
|
-
const sharedFiles = data.files.filter((file) => !pagePaths.has(file.path)).map(cloneFile);
|
|
62
|
-
return Object.freeze({
|
|
63
|
-
sampleIdentity: manifest.sampleIdentity,
|
|
64
|
-
selectionIdentity: input.selectionIdentity,
|
|
65
|
-
reportIdentity: manifest.reportIdentity,
|
|
66
|
-
renderer: STATIC_RENDERER,
|
|
67
|
-
themeIdentity: input.themeIdentity,
|
|
68
|
-
pages: Object.freeze(pages),
|
|
69
|
-
sharedFiles: Object.freeze(sharedFiles),
|
|
70
|
-
...(data.defaultRoute === undefined ? {} : { defaultRoute: data.defaultRoute }),
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
catch {
|
|
74
|
-
return undefined;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Reuses only completed route/shared bytes for a new Theme stylesheet. The
|
|
79
|
-
* caller supplies the Host signer so cache code never owns static revision
|
|
80
|
-
* hashing or its canonical JSON contract.
|
|
81
|
-
*/
|
|
82
|
-
function rethemeClosedReportPageBytes(cached, themeCss, resign) {
|
|
83
|
-
try {
|
|
84
|
-
if (!validPageCache(cached))
|
|
85
|
-
return undefined;
|
|
86
|
-
let foundTheme = false;
|
|
87
|
-
const files = [
|
|
88
|
-
...cached.pages.map((page) => Object.freeze({
|
|
89
|
-
path: page.path,
|
|
90
|
-
mediaType: page.mediaType,
|
|
91
|
-
bytes: new Uint8Array(page.bytes),
|
|
92
|
-
})),
|
|
93
|
-
...cached.sharedFiles.map((file) => {
|
|
94
|
-
if (file.path !== static_ts_1.REPORT_THEME_STYLESHEET_PATH)
|
|
95
|
-
return cloneFile(file);
|
|
96
|
-
foundTheme = true;
|
|
97
|
-
return Object.freeze({
|
|
98
|
-
path: file.path,
|
|
99
|
-
mediaType: file.mediaType,
|
|
100
|
-
bytes: new Uint8Array(themeCss),
|
|
101
|
-
});
|
|
102
|
-
}),
|
|
103
|
-
];
|
|
104
|
-
if (!foundTheme)
|
|
105
|
-
return undefined;
|
|
106
|
-
const manifest = manifestIdentity(files);
|
|
107
|
-
if (manifest === undefined ||
|
|
108
|
-
manifest.sampleIdentity !== cached.sampleIdentity ||
|
|
109
|
-
manifest.reportIdentity !== cached.reportIdentity ||
|
|
110
|
-
!sameFileSet(manifest.files, files))
|
|
111
|
-
return undefined;
|
|
112
|
-
return resign({
|
|
113
|
-
sampleIdentity: cached.sampleIdentity,
|
|
114
|
-
reportIdentity: cached.reportIdentity,
|
|
115
|
-
files,
|
|
116
|
-
routes: cached.pages.map((page) => page.key.route),
|
|
117
|
-
...(cached.defaultRoute === undefined ? {} : { defaultRoute: cached.defaultRoute }),
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
catch {
|
|
121
|
-
return undefined;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function manifestIdentity(files) {
|
|
125
|
-
const manifest = files.find((file) => file.path === MANIFEST_PATH);
|
|
126
|
-
if (manifest === undefined)
|
|
127
|
-
return undefined;
|
|
128
|
-
const value = JSON.parse(decoder.decode(manifest.bytes));
|
|
129
|
-
if (!isRecord(value) ||
|
|
130
|
-
value.format !== "niceeval.report-static/v1" ||
|
|
131
|
-
typeof value.sampleIdentity !== "string" ||
|
|
132
|
-
value.sampleIdentity.length === 0 ||
|
|
133
|
-
typeof value.reportIdentity !== "string" ||
|
|
134
|
-
value.reportIdentity.length === 0 ||
|
|
135
|
-
!Array.isArray(value.pages) ||
|
|
136
|
-
!Array.isArray(value.files))
|
|
137
|
-
return undefined;
|
|
138
|
-
const pages = value.pages.map((entry) => {
|
|
139
|
-
if (!isRecord(entry) || typeof entry.pageId !== "string" || entry.pageId.length === 0 ||
|
|
140
|
-
typeof entry.route !== "string" || entry.route.length === 0 ||
|
|
141
|
-
typeof entry.path !== "string" || entry.path.length === 0)
|
|
142
|
-
return undefined;
|
|
143
|
-
return Object.freeze({ pageId: entry.pageId, route: entry.route, path: entry.path });
|
|
144
|
-
});
|
|
145
|
-
if (pages.some((page) => page === undefined) || value.files.some((path) => typeof path !== "string")) {
|
|
146
|
-
return undefined;
|
|
147
|
-
}
|
|
148
|
-
return Object.freeze({
|
|
149
|
-
sampleIdentity: value.sampleIdentity,
|
|
150
|
-
reportIdentity: value.reportIdentity,
|
|
151
|
-
pages: Object.freeze(pages),
|
|
152
|
-
files: Object.freeze([...value.files]),
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
function validPageCache(cached) {
|
|
156
|
-
if (cached.renderer !== STATIC_RENDERER ||
|
|
157
|
-
cached.sampleIdentity.length === 0 ||
|
|
158
|
-
cached.selectionIdentity.length === 0 ||
|
|
159
|
-
cached.reportIdentity.length === 0 ||
|
|
160
|
-
cached.themeIdentity.length === 0 ||
|
|
161
|
-
cached.pages.length === 0)
|
|
162
|
-
return false;
|
|
163
|
-
const pagePaths = new Set();
|
|
164
|
-
const pageEntries = new Set();
|
|
165
|
-
const routes = new Set();
|
|
166
|
-
for (const page of cached.pages) {
|
|
167
|
-
const key = page.key;
|
|
168
|
-
const entryIdentity = `${key.pageId}\0${key.route}`;
|
|
169
|
-
if (pagePaths.has(page.path) || pageEntries.has(entryIdentity) || routes.has(key.route) ||
|
|
170
|
-
key.format !== "niceeval.report-page-bytes/v1" ||
|
|
171
|
-
key.sampleIdentity !== cached.sampleIdentity ||
|
|
172
|
-
key.selectionIdentity !== cached.selectionIdentity ||
|
|
173
|
-
key.reportIdentity !== cached.reportIdentity ||
|
|
174
|
-
key.renderer !== cached.renderer || key.paramsIdentity !== key.route ||
|
|
175
|
-
key.locales !== VIEW_LOCALES || key.themeIdentity !== cached.themeIdentity ||
|
|
176
|
-
!page.mediaType.startsWith("text/html") || !(page.bytes instanceof Uint8Array))
|
|
177
|
-
return false;
|
|
178
|
-
pagePaths.add(page.path);
|
|
179
|
-
pageEntries.add(entryIdentity);
|
|
180
|
-
routes.add(key.route);
|
|
181
|
-
}
|
|
182
|
-
const filePaths = new Set(pagePaths);
|
|
183
|
-
for (const file of cached.sharedFiles) {
|
|
184
|
-
if (filePaths.has(file.path) || !(file.bytes instanceof Uint8Array))
|
|
185
|
-
return false;
|
|
186
|
-
filePaths.add(file.path);
|
|
187
|
-
}
|
|
188
|
-
return cached.defaultRoute === undefined || routes.has(cached.defaultRoute);
|
|
189
|
-
}
|
|
190
|
-
function sameFileSet(paths, files) {
|
|
191
|
-
return paths.length === files.length && new Set(paths).size === paths.length &&
|
|
192
|
-
paths.every((path) => files.some((file) => file.path === path));
|
|
193
|
-
}
|
|
194
|
-
function cloneFile(file) {
|
|
195
|
-
return Object.freeze({ path: file.path, mediaType: file.mediaType, bytes: new Uint8Array(file.bytes) });
|
|
196
|
-
}
|
|
197
|
-
function isRecord(value) {
|
|
198
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=report-view-cache.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"report-view-cache.js","sourceRoot":"","sources":["report-view-cache.ts"],"names":[],"mappings":";;AA2DA,oDAgEC;AAMD,oEAyCC;AA1KD,2DAAqH;AACrH,wDAAiG;AACjG,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,eAAe,GAAG,kCAAsB,CAAC;A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CAAC,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;AAChF,CAAC;AACD,SAAS,WAAW,CAAC,KAAwB,EAAE,KAAgC;IAC3E,OAAO,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,MAAM;QACxE,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;AACxE,CAAC;AACD,SAAS,SAAS,CAAC,IAAoB;IACnC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAC5G,CAAC;AACD,SAAS,QAAQ,CAAC,KAAc;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChF,CAAC","sourcesContent":["import { closedSiteRevisionData, type ClosedSiteFile, type ClosedSiteRevision, } from \"../report/execution/model.ts\";\nimport { REPORT_STATIC_RENDERER, REPORT_THEME_STYLESHEET_PATH, } from \"../report/host/static.ts\";\nconst MANIFEST_PATH = \"_niceeval/manifest.json\";\nconst STATIC_RENDERER = REPORT_STATIC_RENDERER;\nconst VIEW_LOCALES = \"en,zh-CN\";\nconst decoder = new TextDecoder();\n/**\n * The identity of one fully closed route. `paramsIdentity` is the canonical\n * route: parameter Pages have already encode/decode-validated it before any\n * bytes enter this cache. The completed static document always holds both\n * browser locales.\n */\nexport interface ClosedReportPageByteKey {\n readonly format: \"niceeval.report-page-bytes/v1\";\n readonly sampleIdentity: string;\n readonly selectionIdentity: string;\n readonly reportIdentity: string;\n readonly renderer: typeof STATIC_RENDERER;\n readonly pageId: string;\n readonly route: string;\n readonly paramsIdentity: string;\n readonly locales: typeof VIEW_LOCALES;\n readonly themeIdentity: string;\n}\n/** One route document after every callback, query, and renderer step closed. */\nexport interface ClosedReportPageBytesEntry {\n readonly key: ClosedReportPageByteKey;\n readonly path: string;\n readonly mediaType: string;\n readonly bytes: Uint8Array;\n}\n/**\n * Page-level cache data. It deliberately stores byte copies instead of a\n * ClosedSiteRevision, ResolvedPage, Sample, Scope, callback, or capability.\n * `sharedFiles` are the already-closed site assets/downloads/metadata needed\n * to publish the page documents as one consistent immutable revision.\n */\nexport interface ClosedReportPageBytes {\n readonly sampleIdentity: string;\n readonly selectionIdentity: string;\n readonly reportIdentity: string;\n readonly renderer: typeof STATIC_RENDERER;\n readonly themeIdentity: string;\n readonly pages: readonly ClosedReportPageBytesEntry[];\n readonly sharedFiles: readonly ClosedSiteFile[];\n readonly defaultRoute?: string;\n}\n/** The static Host remains the sole owner of revision identity signing. */\nexport type ResignClosedReportPageBytes = (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/**\n * Extracts one immutable byte-only cache entry from a Host-issued revision.\n * Invalid or unrecognized static output simply opts out of page reuse.\n */\nexport function closeReportPageBytes(revision: ClosedSiteRevision, input: {\n readonly selectionIdentity: string;\n readonly themeIdentity: string;\n}): ClosedReportPageBytes | undefined {\n try {\n if (input.selectionIdentity.length === 0 || input.themeIdentity.length === 0)\n return undefined;\n const data = closedSiteRevisionData(revision);\n if (data.identity.format !== \"niceeval.report-site-revision/v1\" || data.identity.renderer !== STATIC_RENDERER) {\n return undefined;\n }\n const manifest = manifestIdentity(data.files);\n if (manifest === undefined || !sameFileSet(manifest.files, data.files))\n return undefined;\n const filesByPath = new Map(data.files.map((file) => [file.path, file] as const));\n const pagePaths = new Set<string>();\n const pageEntries = new Set<string>();\n const routes = new Set<string>();\n const pages: ClosedReportPageBytesEntry[] = [];\n for (const page of manifest.pages) {\n const entryIdentity = `${page.pageId}\\0${page.route}`;\n if (pagePaths.has(page.path) || pageEntries.has(entryIdentity) || routes.has(page.route))\n return undefined;\n const file = filesByPath.get(page.path);\n if (file === undefined || !file.mediaType.startsWith(\"text/html\"))\n return undefined;\n pagePaths.add(page.path);\n pageEntries.add(entryIdentity);\n routes.add(page.route);\n pages.push(Object.freeze({\n key: Object.freeze({\n format: \"niceeval.report-page-bytes/v1\" as const,\n sampleIdentity: manifest.sampleIdentity,\n selectionIdentity: input.selectionIdentity,\n reportIdentity: manifest.reportIdentity,\n renderer: STATIC_RENDERER,\n pageId: page.pageId,\n route: page.route,\n paramsIdentity: page.route,\n locales: VIEW_LOCALES,\n themeIdentity: input.themeIdentity,\n }),\n path: file.path,\n mediaType: file.mediaType,\n bytes: new Uint8Array(file.bytes),\n }));\n }\n if (pages.length === 0)\n return undefined;\n const sharedFiles = data.files.filter((file) => !pagePaths.has(file.path)).map(cloneFile);\n return Object.freeze({\n sampleIdentity: manifest.sampleIdentity,\n selectionIdentity: input.selectionIdentity,\n reportIdentity: manifest.reportIdentity,\n renderer: STATIC_RENDERER,\n themeIdentity: input.themeIdentity,\n pages: Object.freeze(pages),\n sharedFiles: Object.freeze(sharedFiles),\n ...(data.defaultRoute === undefined ? {} : { defaultRoute: data.defaultRoute }),\n });\n }\n catch {\n return undefined;\n }\n}\n/**\n * Reuses only completed route/shared bytes for a new Theme stylesheet. The\n * caller supplies the Host signer so cache code never owns static revision\n * hashing or its canonical JSON contract.\n */\nexport function rethemeClosedReportPageBytes(cached: ClosedReportPageBytes, themeCss: Uint8Array, resign: ResignClosedReportPageBytes): ClosedSiteRevision | undefined {\n try {\n if (!validPageCache(cached))\n return undefined;\n let foundTheme = false;\n const files = [\n ...cached.pages.map((page): ClosedSiteFile => Object.freeze({\n path: page.path,\n mediaType: page.mediaType,\n bytes: new Uint8Array(page.bytes),\n })),\n ...cached.sharedFiles.map((file): ClosedSiteFile => {\n if (file.path !== REPORT_THEME_STYLESHEET_PATH)\n return cloneFile(file);\n foundTheme = true;\n return Object.freeze({\n path: file.path,\n mediaType: file.mediaType,\n bytes: new Uint8Array(themeCss),\n });\n }),\n ];\n if (!foundTheme)\n return undefined;\n const manifest = manifestIdentity(files);\n if (manifest === undefined ||\n manifest.sampleIdentity !== cached.sampleIdentity ||\n manifest.reportIdentity !== cached.reportIdentity ||\n !sameFileSet(manifest.files, files))\n return undefined;\n return resign({\n sampleIdentity: cached.sampleIdentity,\n reportIdentity: cached.reportIdentity,\n files,\n routes: cached.pages.map((page) => page.key.route),\n ...(cached.defaultRoute === undefined ? {} : { defaultRoute: cached.defaultRoute }),\n });\n }\n catch {\n return undefined;\n }\n}\ninterface StaticManifest {\n readonly sampleIdentity: string;\n readonly reportIdentity: string;\n readonly pages: readonly {\n readonly pageId: string;\n readonly route: string;\n readonly path: string;\n }[];\n readonly files: readonly string[];\n}\nfunction manifestIdentity(files: readonly ClosedSiteFile[]): StaticManifest | undefined {\n const manifest = files.find((file) => file.path === MANIFEST_PATH);\n if (manifest === undefined)\n return undefined;\n const value: unknown = JSON.parse(decoder.decode(manifest.bytes));\n if (!isRecord(value) ||\n value.format !== \"niceeval.report-static/v1\" ||\n typeof value.sampleIdentity !== \"string\" ||\n value.sampleIdentity.length === 0 ||\n typeof value.reportIdentity !== \"string\" ||\n value.reportIdentity.length === 0 ||\n !Array.isArray(value.pages) ||\n !Array.isArray(value.files))\n return undefined;\n const pages = value.pages.map((entry) => {\n if (!isRecord(entry) || typeof entry.pageId !== \"string\" || entry.pageId.length === 0 ||\n typeof entry.route !== \"string\" || entry.route.length === 0 ||\n typeof entry.path !== \"string\" || entry.path.length === 0)\n return undefined;\n return Object.freeze({ pageId: entry.pageId, route: entry.route, path: entry.path });\n });\n if (pages.some((page) => page === undefined) || value.files.some((path) => typeof path !== \"string\")) {\n return undefined;\n }\n return Object.freeze({\n sampleIdentity: value.sampleIdentity,\n reportIdentity: value.reportIdentity,\n pages: Object.freeze(pages as {\n readonly pageId: string;\n readonly route: string;\n readonly path: string;\n }[]),\n files: Object.freeze([...value.files] as string[]),\n });\n}\nfunction validPageCache(cached: ClosedReportPageBytes): boolean {\n if (cached.renderer !== STATIC_RENDERER ||\n cached.sampleIdentity.length === 0 ||\n cached.selectionIdentity.length === 0 ||\n cached.reportIdentity.length === 0 ||\n cached.themeIdentity.length === 0 ||\n cached.pages.length === 0)\n return false;\n const pagePaths = new Set<string>();\n const pageEntries = new Set<string>();\n const routes = new Set<string>();\n for (const page of cached.pages) {\n const key = page.key;\n const entryIdentity = `${key.pageId}\\0${key.route}`;\n if (pagePaths.has(page.path) || pageEntries.has(entryIdentity) || routes.has(key.route) ||\n key.format !== \"niceeval.report-page-bytes/v1\" ||\n key.sampleIdentity !== cached.sampleIdentity ||\n key.selectionIdentity !== cached.selectionIdentity ||\n key.reportIdentity !== cached.reportIdentity ||\n key.renderer !== cached.renderer || key.paramsIdentity !== key.route ||\n key.locales !== VIEW_LOCALES || key.themeIdentity !== cached.themeIdentity ||\n !page.mediaType.startsWith(\"text/html\") || !(page.bytes instanceof Uint8Array))\n return false;\n pagePaths.add(page.path);\n pageEntries.add(entryIdentity);\n routes.add(key.route);\n }\n const filePaths = new Set<string>(pagePaths);\n for (const file of cached.sharedFiles) {\n if (filePaths.has(file.path) || !(file.bytes instanceof Uint8Array))\n return false;\n filePaths.add(file.path);\n }\n return cached.defaultRoute === undefined || routes.has(cached.defaultRoute);\n}\nfunction sameFileSet(paths: readonly string[], files: readonly ClosedSiteFile[]): boolean {\n return paths.length === files.length && new Set(paths).size === paths.length &&\n paths.every((path) => files.some((file) => file.path === path));\n}\nfunction cloneFile(file: ClosedSiteFile): ClosedSiteFile {\n return Object.freeze({ path: file.path, mediaType: file.mediaType, bytes: new Uint8Array(file.bytes) });\n}\nfunction isRecord(value: unknown): value is Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n"]}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type ClosedSiteFile, type ClosedSiteRevision } from "../report/execution/model.cjs";
|
|
2
|
-
declare const STATIC_RENDERER: "niceeval.report-ssg/v1";
|
|
3
|
-
declare const VIEW_LOCALES = "en,zh-CN";
|
|
4
|
-
/**
|
|
5
|
-
* The identity of one fully closed route. `paramsIdentity` is the canonical
|
|
6
|
-
* route: parameter Pages have already encode/decode-validated it before any
|
|
7
|
-
* bytes enter this cache. The completed static document always holds both
|
|
8
|
-
* browser locales.
|
|
9
|
-
*/
|
|
10
|
-
export interface ClosedReportPageByteKey {
|
|
11
|
-
readonly format: "niceeval.report-page-bytes/v1";
|
|
12
|
-
readonly sampleIdentity: string;
|
|
13
|
-
readonly selectionIdentity: string;
|
|
14
|
-
readonly reportIdentity: string;
|
|
15
|
-
readonly renderer: typeof STATIC_RENDERER;
|
|
16
|
-
readonly pageId: string;
|
|
17
|
-
readonly route: string;
|
|
18
|
-
readonly paramsIdentity: string;
|
|
19
|
-
readonly locales: typeof VIEW_LOCALES;
|
|
20
|
-
readonly themeIdentity: string;
|
|
21
|
-
}
|
|
22
|
-
/** One route document after every callback, query, and renderer step closed. */
|
|
23
|
-
export interface ClosedReportPageBytesEntry {
|
|
24
|
-
readonly key: ClosedReportPageByteKey;
|
|
25
|
-
readonly path: string;
|
|
26
|
-
readonly mediaType: string;
|
|
27
|
-
readonly bytes: Uint8Array;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Page-level cache data. It deliberately stores byte copies instead of a
|
|
31
|
-
* ClosedSiteRevision, ResolvedPage, Sample, Scope, callback, or capability.
|
|
32
|
-
* `sharedFiles` are the already-closed site assets/downloads/metadata needed
|
|
33
|
-
* to publish the page documents as one consistent immutable revision.
|
|
34
|
-
*/
|
|
35
|
-
export interface ClosedReportPageBytes {
|
|
36
|
-
readonly sampleIdentity: string;
|
|
37
|
-
readonly selectionIdentity: string;
|
|
38
|
-
readonly reportIdentity: string;
|
|
39
|
-
readonly renderer: typeof STATIC_RENDERER;
|
|
40
|
-
readonly themeIdentity: string;
|
|
41
|
-
readonly pages: readonly ClosedReportPageBytesEntry[];
|
|
42
|
-
readonly sharedFiles: readonly ClosedSiteFile[];
|
|
43
|
-
readonly defaultRoute?: string;
|
|
44
|
-
}
|
|
45
|
-
/** The static Host remains the sole owner of revision identity signing. */
|
|
46
|
-
export type ResignClosedReportPageBytes = (input: {
|
|
47
|
-
readonly sampleIdentity: string;
|
|
48
|
-
readonly reportIdentity: string;
|
|
49
|
-
readonly files: readonly ClosedSiteFile[];
|
|
50
|
-
readonly routes: readonly string[];
|
|
51
|
-
readonly defaultRoute?: string;
|
|
52
|
-
}) => ClosedSiteRevision;
|
|
53
|
-
/**
|
|
54
|
-
* Extracts one immutable byte-only cache entry from a Host-issued revision.
|
|
55
|
-
* Invalid or unrecognized static output simply opts out of page reuse.
|
|
56
|
-
*/
|
|
57
|
-
export declare function closeReportPageBytes(revision: ClosedSiteRevision, input: {
|
|
58
|
-
readonly selectionIdentity: string;
|
|
59
|
-
readonly themeIdentity: string;
|
|
60
|
-
}): ClosedReportPageBytes | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Reuses only completed route/shared bytes for a new Theme stylesheet. The
|
|
63
|
-
* caller supplies the Host signer so cache code never owns static revision
|
|
64
|
-
* hashing or its canonical JSON contract.
|
|
65
|
-
*/
|
|
66
|
-
export declare function rethemeClosedReportPageBytes(cached: ClosedReportPageBytes, themeCss: Uint8Array, resign: ResignClosedReportPageBytes): ClosedSiteRevision | undefined;
|
|
67
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type ClosedSiteFile, type ClosedSiteRevision } from "../report/execution/model.mjs";
|
|
2
|
-
declare const STATIC_RENDERER: "niceeval.report-ssg/v1";
|
|
3
|
-
declare const VIEW_LOCALES = "en,zh-CN";
|
|
4
|
-
/**
|
|
5
|
-
* The identity of one fully closed route. `paramsIdentity` is the canonical
|
|
6
|
-
* route: parameter Pages have already encode/decode-validated it before any
|
|
7
|
-
* bytes enter this cache. The completed static document always holds both
|
|
8
|
-
* browser locales.
|
|
9
|
-
*/
|
|
10
|
-
export interface ClosedReportPageByteKey {
|
|
11
|
-
readonly format: "niceeval.report-page-bytes/v1";
|
|
12
|
-
readonly sampleIdentity: string;
|
|
13
|
-
readonly selectionIdentity: string;
|
|
14
|
-
readonly reportIdentity: string;
|
|
15
|
-
readonly renderer: typeof STATIC_RENDERER;
|
|
16
|
-
readonly pageId: string;
|
|
17
|
-
readonly route: string;
|
|
18
|
-
readonly paramsIdentity: string;
|
|
19
|
-
readonly locales: typeof VIEW_LOCALES;
|
|
20
|
-
readonly themeIdentity: string;
|
|
21
|
-
}
|
|
22
|
-
/** One route document after every callback, query, and renderer step closed. */
|
|
23
|
-
export interface ClosedReportPageBytesEntry {
|
|
24
|
-
readonly key: ClosedReportPageByteKey;
|
|
25
|
-
readonly path: string;
|
|
26
|
-
readonly mediaType: string;
|
|
27
|
-
readonly bytes: Uint8Array;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Page-level cache data. It deliberately stores byte copies instead of a
|
|
31
|
-
* ClosedSiteRevision, ResolvedPage, Sample, Scope, callback, or capability.
|
|
32
|
-
* `sharedFiles` are the already-closed site assets/downloads/metadata needed
|
|
33
|
-
* to publish the page documents as one consistent immutable revision.
|
|
34
|
-
*/
|
|
35
|
-
export interface ClosedReportPageBytes {
|
|
36
|
-
readonly sampleIdentity: string;
|
|
37
|
-
readonly selectionIdentity: string;
|
|
38
|
-
readonly reportIdentity: string;
|
|
39
|
-
readonly renderer: typeof STATIC_RENDERER;
|
|
40
|
-
readonly themeIdentity: string;
|
|
41
|
-
readonly pages: readonly ClosedReportPageBytesEntry[];
|
|
42
|
-
readonly sharedFiles: readonly ClosedSiteFile[];
|
|
43
|
-
readonly defaultRoute?: string;
|
|
44
|
-
}
|
|
45
|
-
/** The static Host remains the sole owner of revision identity signing. */
|
|
46
|
-
export type ResignClosedReportPageBytes = (input: {
|
|
47
|
-
readonly sampleIdentity: string;
|
|
48
|
-
readonly reportIdentity: string;
|
|
49
|
-
readonly files: readonly ClosedSiteFile[];
|
|
50
|
-
readonly routes: readonly string[];
|
|
51
|
-
readonly defaultRoute?: string;
|
|
52
|
-
}) => ClosedSiteRevision;
|
|
53
|
-
/**
|
|
54
|
-
* Extracts one immutable byte-only cache entry from a Host-issued revision.
|
|
55
|
-
* Invalid or unrecognized static output simply opts out of page reuse.
|
|
56
|
-
*/
|
|
57
|
-
export declare function closeReportPageBytes(revision: ClosedSiteRevision, input: {
|
|
58
|
-
readonly selectionIdentity: string;
|
|
59
|
-
readonly themeIdentity: string;
|
|
60
|
-
}): ClosedReportPageBytes | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Reuses only completed route/shared bytes for a new Theme stylesheet. The
|
|
63
|
-
* caller supplies the Host signer so cache code never owns static revision
|
|
64
|
-
* hashing or its canonical JSON contract.
|
|
65
|
-
*/
|
|
66
|
-
export declare function rethemeClosedReportPageBytes(cached: ClosedReportPageBytes, themeCss: Uint8Array, resign: ResignClosedReportPageBytes): ClosedSiteRevision | undefined;
|
|
67
|
-
export {};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type ClosedSiteFile, type ClosedSiteRevision } from "../report/execution/model.js";
|
|
2
|
-
declare const STATIC_RENDERER: "niceeval.report-ssg/v1";
|
|
3
|
-
declare const VIEW_LOCALES = "en,zh-CN";
|
|
4
|
-
/**
|
|
5
|
-
* The identity of one fully closed route. `paramsIdentity` is the canonical
|
|
6
|
-
* route: parameter Pages have already encode/decode-validated it before any
|
|
7
|
-
* bytes enter this cache. The completed static document always holds both
|
|
8
|
-
* browser locales.
|
|
9
|
-
*/
|
|
10
|
-
export interface ClosedReportPageByteKey {
|
|
11
|
-
readonly format: "niceeval.report-page-bytes/v1";
|
|
12
|
-
readonly sampleIdentity: string;
|
|
13
|
-
readonly selectionIdentity: string;
|
|
14
|
-
readonly reportIdentity: string;
|
|
15
|
-
readonly renderer: typeof STATIC_RENDERER;
|
|
16
|
-
readonly pageId: string;
|
|
17
|
-
readonly route: string;
|
|
18
|
-
readonly paramsIdentity: string;
|
|
19
|
-
readonly locales: typeof VIEW_LOCALES;
|
|
20
|
-
readonly themeIdentity: string;
|
|
21
|
-
}
|
|
22
|
-
/** One route document after every callback, query, and renderer step closed. */
|
|
23
|
-
export interface ClosedReportPageBytesEntry {
|
|
24
|
-
readonly key: ClosedReportPageByteKey;
|
|
25
|
-
readonly path: string;
|
|
26
|
-
readonly mediaType: string;
|
|
27
|
-
readonly bytes: Uint8Array;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Page-level cache data. It deliberately stores byte copies instead of a
|
|
31
|
-
* ClosedSiteRevision, ResolvedPage, Sample, Scope, callback, or capability.
|
|
32
|
-
* `sharedFiles` are the already-closed site assets/downloads/metadata needed
|
|
33
|
-
* to publish the page documents as one consistent immutable revision.
|
|
34
|
-
*/
|
|
35
|
-
export interface ClosedReportPageBytes {
|
|
36
|
-
readonly sampleIdentity: string;
|
|
37
|
-
readonly selectionIdentity: string;
|
|
38
|
-
readonly reportIdentity: string;
|
|
39
|
-
readonly renderer: typeof STATIC_RENDERER;
|
|
40
|
-
readonly themeIdentity: string;
|
|
41
|
-
readonly pages: readonly ClosedReportPageBytesEntry[];
|
|
42
|
-
readonly sharedFiles: readonly ClosedSiteFile[];
|
|
43
|
-
readonly defaultRoute?: string;
|
|
44
|
-
}
|
|
45
|
-
/** The static Host remains the sole owner of revision identity signing. */
|
|
46
|
-
export type ResignClosedReportPageBytes = (input: {
|
|
47
|
-
readonly sampleIdentity: string;
|
|
48
|
-
readonly reportIdentity: string;
|
|
49
|
-
readonly files: readonly ClosedSiteFile[];
|
|
50
|
-
readonly routes: readonly string[];
|
|
51
|
-
readonly defaultRoute?: string;
|
|
52
|
-
}) => ClosedSiteRevision;
|
|
53
|
-
/**
|
|
54
|
-
* Extracts one immutable byte-only cache entry from a Host-issued revision.
|
|
55
|
-
* Invalid or unrecognized static output simply opts out of page reuse.
|
|
56
|
-
*/
|
|
57
|
-
export declare function closeReportPageBytes(revision: ClosedSiteRevision, input: {
|
|
58
|
-
readonly selectionIdentity: string;
|
|
59
|
-
readonly themeIdentity: string;
|
|
60
|
-
}): ClosedReportPageBytes | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Reuses only completed route/shared bytes for a new Theme stylesheet. The
|
|
63
|
-
* caller supplies the Host signer so cache code never owns static revision
|
|
64
|
-
* hashing or its canonical JSON contract.
|
|
65
|
-
*/
|
|
66
|
-
export declare function rethemeClosedReportPageBytes(cached: ClosedReportPageBytes, themeCss: Uint8Array, resign: ResignClosedReportPageBytes): ClosedSiteRevision | undefined;
|
|
67
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __niceevalCreateRequire } from "node:module";
|
|
2
|
-
const __niceevalRequire = __niceevalCreateRequire(import.meta.url);
|
|
3
|
-
const __niceevalCanonical = __niceevalRequire("./report-view-cache.cjs");
|
|
4
|
-
const __niceevalExport0 = __niceevalCanonical["closeReportPageBytes"];
|
|
5
|
-
export { __niceevalExport0 as closeReportPageBytes };
|
|
6
|
-
const __niceevalExport1 = __niceevalCanonical["rethemeClosedReportPageBytes"];
|
|
7
|
-
export { __niceevalExport1 as rethemeClosedReportPageBytes };
|
|
8
|
-
//# sourceMappingURL=report-view-cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"report-view-cache.js","sources":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["// The browser shell's type-only data shape. Report content and Record facts\n// stay inside the closed site revision; this shape carries\n// only report-shell metadata and baked HTML blocks.\nexport type LocalizedText = string | Readonly<Record<string, string>>;\nexport type ReportLocale = \"en\" | \"zh-CN\";\n/**\n * 一页报告的双语静态 HTML:同一棵页树按 locale 渲染两遍(en / zh-CN),server 烘成\n * <template id=\"niceeval-report-<pageId>-<locale>\"> 静态块,前端按当前页与界面语言摆放\n * 对应块,切语言 / 切页不重算数据。\n */\nexport type ReportSlotHtml = Partial<globalThis.Record<ReportLocale, string>>;\n/** 外壳认识的一页(id = `#/page/<id>` 路由、`--page` 的取值与 <template> 静态块的键)。 */\nexport interface ViewReportPageMeta {\n id: string;\n title: LocalizedText;\n /**\n * 报告声明的 `navigation: false`(docs/feature/reports/README.md「导航的组成只有一条\n * 规则」):该页退出导航,外壳不为它渲染 tab。这份列表本身不是导航列表——它同时是页内容块与\n * `#/page/<id>` 路由的键,所以退出导航的页仍如实在列,只带上这个标记;缺省即在导航里。\n */\n navigation?: false;\n}\n/**\n * 规范化后的报告外壳声明(docs/feature/reports/README.md):壳(导航)由前端\n * 渲染,页内容消费 <template> 静态块。title 已走完回退链(def.title → 唯一且相同的快照 name →\n * 内置文案「Eval 运行结果 / Eval Record」),宿主落点只有浏览器 <title>(文档单例);\n * 页内 hero 标题由 Hero 组件消费同一取值链,品牌是组件、宿主页头不渲染任何品牌位。\n * 页脚与页头链接是页内 ReportNode,不进 viewData。\n */\nexport interface ViewReportMeta {\n title: LocalizedText;\n pages: ViewReportPageMeta[];\n /** 初始页(--page 或声明序第一页);`#/page/<id>` 路由覆盖它。 */\n initialPageId: string;\n /**\n * 参数化页(声明了 `params` 的页,如 `attempt`、`experiment`)的 id 全集,声明或补位后的\n * 最终形态——外壳按这份清单判定同源链接 `<pageId>/<key>.html` 与 hash 路由 `#/<pageId>/<key>`\n * 该不该被 dialog 拦截(view.md「参数化页的 dialog 摆放」:「拦截按报告清单里的参数化页 id\n * 判定,宿主不认识具体实体」)。不进 `pages`——参数化页不出现在导航,也不是 `#/page/<id>` 路由。\n */\n paramPageIds: string[];\n}\n/**\n * Baked browser-shell metadata. The report itself owns all current Record\n * state, including unavailable and invalid projection states.\n */\nexport interface ViewData {\n /** 最近一次 run 的 startedAt(ISO);没有历史 run 时缺省。 */\n lastRunAt?: string;\n /** 报告槽 Selection 合成自几个物理 run。 */\n composedRuns: number;\n /** 报告外壳与页导航的声明(规范化后);缺省时前端按单页 `report` 兜底。 */\n report?: ViewReportMeta;\n}\n"]}
|