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
|
@@ -5,9 +5,12 @@ import type { Sha256Digest } from "../../record/model/identifiers.js";
|
|
|
5
5
|
import type { AssertionResult, SealedAssertionEntry } from "../api.js";
|
|
6
6
|
import { type ThirdPartyCriterionRegistry } from "./codec.js";
|
|
7
7
|
import { type AssertionEntryInput, type AssertionsEntryIdSource, type AssertionsProducerError } from "./producer.js";
|
|
8
|
-
import type { AssertionEntryId, AssertionCoverage as RecordAssertionCoverage, AssertionLimitation as RecordAssertionLimitation, AssertionsDocumentOuter, AssertionsProjection, BoundedJsonObject, BoundedJsonValue, SealedAssertionResult, WritableCriterionEnvelope } from "./model.js";
|
|
8
|
+
import type { AssertionEntryId, AssertionFactValue, AssertionCoverage as RecordAssertionCoverage, AssertionLimitation as RecordAssertionLimitation, AssertionsDocumentOuter, AssertionsProjection, BoundedJsonObject, BoundedJsonValue, SealedAssertionResult, WritableCriterionEnvelope } from "./model.js";
|
|
9
9
|
export declare const assertionsRecordSchemas: Readonly<{
|
|
10
10
|
material: Schema.Union<[Schema.Struct<{
|
|
11
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
12
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
13
|
+
}>, Schema.Struct<{
|
|
11
14
|
kind: Schema.Literal<["snapshot"]>;
|
|
12
15
|
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
13
16
|
}>, Schema.Struct<{
|
|
@@ -18,11 +21,107 @@ export declare const assertionsRecordSchemas: Readonly<{
|
|
|
18
21
|
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
19
22
|
preview: Schema.filter<typeof Schema.String>;
|
|
20
23
|
}>]>;
|
|
21
|
-
entries: Schema.filter<Schema.Array$<Schema.
|
|
24
|
+
entries: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
25
|
+
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
26
|
+
display: Schema.Schema<import("./model.js").AssertionDisplay, import("./model.js").AssertionDisplay, never>;
|
|
27
|
+
criterion: Schema.Union<[Schema.Struct<{
|
|
28
|
+
state: Schema.Literal<["available"]>;
|
|
29
|
+
value: Schema.Schema<BoundedJsonObject, BoundedJsonObject, never>;
|
|
30
|
+
}>, Schema.Struct<{
|
|
31
|
+
state: Schema.Literal<["unavailable"]>;
|
|
32
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
33
|
+
}>]>;
|
|
34
|
+
materials: Schema.filter<Schema.Struct<{
|
|
35
|
+
source: Schema.Union<[Schema.Struct<{
|
|
36
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
37
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
38
|
+
}>, Schema.Struct<{
|
|
39
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
40
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
41
|
+
}>, Schema.Struct<{
|
|
42
|
+
kind: Schema.Literal<["blob"]>;
|
|
43
|
+
ref: Schema.Schema<RecordBlobRef, RecordBlobRef, never>;
|
|
44
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
45
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
46
|
+
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
47
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
48
|
+
}>]>;
|
|
49
|
+
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
50
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
51
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
52
|
+
}>, Schema.Struct<{
|
|
53
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
54
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
55
|
+
}>, Schema.Struct<{
|
|
56
|
+
kind: Schema.Literal<["blob"]>;
|
|
57
|
+
ref: Schema.Schema<RecordBlobRef, RecordBlobRef, never>;
|
|
58
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
59
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
60
|
+
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
61
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
62
|
+
}>]>>;
|
|
63
|
+
coverage: Schema.Schema<RecordAssertionCoverage, RecordAssertionCoverage, never>;
|
|
64
|
+
limitations: Schema.Array$<Schema.Schema<RecordAssertionLimitation, RecordAssertionLimitation, never>>;
|
|
65
|
+
}>>;
|
|
66
|
+
evaluation: Schema.Struct<{
|
|
67
|
+
observed: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
68
|
+
receipt: Schema.optional<Schema.Struct<{
|
|
69
|
+
examined: Schema.filter<typeof Schema.JsonNumber>;
|
|
70
|
+
matched: Schema.filter<typeof Schema.JsonNumber>;
|
|
71
|
+
mismatched: Schema.filter<typeof Schema.JsonNumber>;
|
|
72
|
+
unavailable: Schema.filter<typeof Schema.JsonNumber>;
|
|
73
|
+
knownTotal: Schema.NullOr<Schema.filter<typeof Schema.JsonNumber>>;
|
|
74
|
+
complete: typeof Schema.Boolean;
|
|
75
|
+
exhaustive: typeof Schema.Boolean;
|
|
76
|
+
decisive: typeof Schema.Boolean;
|
|
77
|
+
}>>;
|
|
78
|
+
}>;
|
|
79
|
+
decision: Schema.Struct<{
|
|
80
|
+
result: Schema.Literal<["matched", "mismatched", "unavailable", "errored", "not-applicable"]>;
|
|
81
|
+
reason: Schema.NullOr<Schema.Literal<["condition-not-met", "evidence-unavailable", "source-unavailable", "redacted", "evaluator-failed", "producer-interrupted", "invalid-subject", "coverage-not-applicable"]>>;
|
|
82
|
+
gate: Schema.Literal<["not-gate", "satisfied", "failed", "unavailable", "not-applicable"]>;
|
|
83
|
+
}>;
|
|
84
|
+
policy: Schema.Struct<{
|
|
85
|
+
requirement: Schema.Union<[Schema.Struct<{
|
|
86
|
+
state: Schema.Literal<["available"]>;
|
|
87
|
+
value: Schema.Literal<["required", "optional"]>;
|
|
88
|
+
}>, Schema.Struct<{
|
|
89
|
+
state: Schema.Literal<["unavailable"]>;
|
|
90
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
91
|
+
}>]>;
|
|
92
|
+
condition: Schema.Union<[Schema.Struct<{
|
|
93
|
+
state: Schema.Literal<["available"]>;
|
|
94
|
+
value: Schema.Union<[Schema.Struct<{
|
|
95
|
+
kind: Schema.Literal<["boolean"]>;
|
|
96
|
+
expected: Schema.Literal<[true]>;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
kind: Schema.Literal<["at-least"]>;
|
|
99
|
+
threshold: Schema.filter<typeof Schema.JsonNumber>;
|
|
100
|
+
}>, Schema.Struct<{
|
|
101
|
+
kind: Schema.Literal<["record-only"]>;
|
|
102
|
+
}>]>;
|
|
103
|
+
}>, Schema.Struct<{
|
|
104
|
+
state: Schema.Literal<["unavailable"]>;
|
|
105
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
106
|
+
}>]>;
|
|
107
|
+
}>;
|
|
108
|
+
contribution: Schema.Union<[Schema.Schema<import("./model.js").NoScoreContribution, import("./model.js").NoScoreContribution, never>, Schema.Schema<import("./model.js").EarnedScoreContribution, import("./model.js").EarnedScoreContribution, never>, Schema.Schema<import("./model.js").UnavailableScoreContribution, import("./model.js").UnavailableScoreContribution, never>]>;
|
|
109
|
+
explanationRetention: Schema.Union<[Schema.Struct<{
|
|
110
|
+
state: Schema.Literal<["retained"]>;
|
|
111
|
+
value: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
112
|
+
}>, Schema.Struct<{
|
|
113
|
+
state: Schema.Literal<["unavailable"]>;
|
|
114
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
115
|
+
}>]>;
|
|
116
|
+
}>>>;
|
|
117
|
+
historicalEntries: Schema.filter<Schema.Array$<Schema.filter<Schema.Struct<{
|
|
22
118
|
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
23
119
|
display: Schema.Schema<import("./model.js").AssertionDisplay, import("./model.js").AssertionDisplay, never>;
|
|
24
120
|
criterion: Schema.Schema<BoundedJsonObject, BoundedJsonObject, never>;
|
|
25
121
|
subject: Schema.Union<[Schema.Struct<{
|
|
122
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
123
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
124
|
+
}>, Schema.Struct<{
|
|
26
125
|
kind: Schema.Literal<["snapshot"]>;
|
|
27
126
|
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
28
127
|
}>, Schema.Struct<{
|
|
@@ -34,6 +133,9 @@ export declare const assertionsRecordSchemas: Readonly<{
|
|
|
34
133
|
preview: Schema.filter<typeof Schema.String>;
|
|
35
134
|
}>]>;
|
|
36
135
|
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
136
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
137
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
138
|
+
}>, Schema.Struct<{
|
|
37
139
|
kind: Schema.Literal<["snapshot"]>;
|
|
38
140
|
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
39
141
|
}>, Schema.Struct<{
|
|
@@ -49,73 +151,202 @@ export declare const assertionsRecordSchemas: Readonly<{
|
|
|
49
151
|
result: Schema.Schema<SealedAssertionResult, SealedAssertionResult, never>;
|
|
50
152
|
}>>>>;
|
|
51
153
|
outerDocument: Schema.filter<Schema.filter<Schema.Struct<{
|
|
52
|
-
entries: Schema.filter<Schema.Array$<Schema.
|
|
154
|
+
entries: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
53
155
|
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
54
156
|
display: Schema.Schema<import("./model.js").AssertionDisplay, import("./model.js").AssertionDisplay, never>;
|
|
55
|
-
criterion: Schema.Schema<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
157
|
+
criterion: Schema.Union<[Schema.Struct<{
|
|
158
|
+
state: Schema.Literal<["available"]>;
|
|
159
|
+
value: Schema.Schema<BoundedJsonObject, BoundedJsonObject, never>;
|
|
59
160
|
}>, Schema.Struct<{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
63
|
-
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
64
|
-
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
65
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
161
|
+
state: Schema.Literal<["unavailable"]>;
|
|
162
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
66
163
|
}>]>;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
164
|
+
materials: Schema.filter<Schema.Struct<{
|
|
165
|
+
source: Schema.Union<[Schema.Struct<{
|
|
166
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
167
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
168
|
+
}>, Schema.Struct<{
|
|
169
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
170
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
171
|
+
}>, Schema.Struct<{
|
|
172
|
+
kind: Schema.Literal<["blob"]>;
|
|
173
|
+
ref: Schema.Schema<RecordBlobRef, RecordBlobRef, never>;
|
|
174
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
175
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
176
|
+
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
177
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
178
|
+
}>]>;
|
|
179
|
+
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
180
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
181
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
182
|
+
}>, Schema.Struct<{
|
|
183
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
184
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
185
|
+
}>, Schema.Struct<{
|
|
186
|
+
kind: Schema.Literal<["blob"]>;
|
|
187
|
+
ref: Schema.Schema<RecordBlobRef, RecordBlobRef, never>;
|
|
188
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
189
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
190
|
+
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
191
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
192
|
+
}>]>>;
|
|
193
|
+
coverage: Schema.Schema<RecordAssertionCoverage, RecordAssertionCoverage, never>;
|
|
194
|
+
limitations: Schema.Array$<Schema.Schema<RecordAssertionLimitation, RecordAssertionLimitation, never>>;
|
|
195
|
+
}>>;
|
|
196
|
+
evaluation: Schema.Struct<{
|
|
197
|
+
observed: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
198
|
+
receipt: Schema.optional<Schema.Struct<{
|
|
199
|
+
examined: Schema.filter<typeof Schema.JsonNumber>;
|
|
200
|
+
matched: Schema.filter<typeof Schema.JsonNumber>;
|
|
201
|
+
mismatched: Schema.filter<typeof Schema.JsonNumber>;
|
|
202
|
+
unavailable: Schema.filter<typeof Schema.JsonNumber>;
|
|
203
|
+
knownTotal: Schema.NullOr<Schema.filter<typeof Schema.JsonNumber>>;
|
|
204
|
+
complete: typeof Schema.Boolean;
|
|
205
|
+
exhaustive: typeof Schema.Boolean;
|
|
206
|
+
decisive: typeof Schema.Boolean;
|
|
207
|
+
}>>;
|
|
208
|
+
}>;
|
|
209
|
+
decision: Schema.Struct<{
|
|
210
|
+
result: Schema.Literal<["matched", "mismatched", "unavailable", "errored", "not-applicable"]>;
|
|
211
|
+
reason: Schema.NullOr<Schema.Literal<["condition-not-met", "evidence-unavailable", "source-unavailable", "redacted", "evaluator-failed", "producer-interrupted", "invalid-subject", "coverage-not-applicable"]>>;
|
|
212
|
+
gate: Schema.Literal<["not-gate", "satisfied", "failed", "unavailable", "not-applicable"]>;
|
|
213
|
+
}>;
|
|
214
|
+
policy: Schema.Struct<{
|
|
215
|
+
requirement: Schema.Union<[Schema.Struct<{
|
|
216
|
+
state: Schema.Literal<["available"]>;
|
|
217
|
+
value: Schema.Literal<["required", "optional"]>;
|
|
218
|
+
}>, Schema.Struct<{
|
|
219
|
+
state: Schema.Literal<["unavailable"]>;
|
|
220
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
221
|
+
}>]>;
|
|
222
|
+
condition: Schema.Union<[Schema.Struct<{
|
|
223
|
+
state: Schema.Literal<["available"]>;
|
|
224
|
+
value: Schema.Union<[Schema.Struct<{
|
|
225
|
+
kind: Schema.Literal<["boolean"]>;
|
|
226
|
+
expected: Schema.Literal<[true]>;
|
|
227
|
+
}>, Schema.Struct<{
|
|
228
|
+
kind: Schema.Literal<["at-least"]>;
|
|
229
|
+
threshold: Schema.filter<typeof Schema.JsonNumber>;
|
|
230
|
+
}>, Schema.Struct<{
|
|
231
|
+
kind: Schema.Literal<["record-only"]>;
|
|
232
|
+
}>]>;
|
|
233
|
+
}>, Schema.Struct<{
|
|
234
|
+
state: Schema.Literal<["unavailable"]>;
|
|
235
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
236
|
+
}>]>;
|
|
237
|
+
}>;
|
|
238
|
+
contribution: Schema.Union<[Schema.Schema<import("./model.js").NoScoreContribution, import("./model.js").NoScoreContribution, never>, Schema.Schema<import("./model.js").EarnedScoreContribution, import("./model.js").EarnedScoreContribution, never>, Schema.Schema<import("./model.js").UnavailableScoreContribution, import("./model.js").UnavailableScoreContribution, never>]>;
|
|
239
|
+
explanationRetention: Schema.Union<[Schema.Struct<{
|
|
240
|
+
state: Schema.Literal<["retained"]>;
|
|
241
|
+
value: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
70
242
|
}>, Schema.Struct<{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
76
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
77
|
-
}>]>>;
|
|
78
|
-
coverage: Schema.Schema<RecordAssertionCoverage, RecordAssertionCoverage, never>;
|
|
79
|
-
limitations: Schema.Array$<Schema.Schema<RecordAssertionLimitation, RecordAssertionLimitation, never>>;
|
|
80
|
-
result: Schema.Schema<SealedAssertionResult, SealedAssertionResult, never>;
|
|
81
|
-
}>>>>;
|
|
243
|
+
state: Schema.Literal<["unavailable"]>;
|
|
244
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
245
|
+
}>]>;
|
|
246
|
+
}>>>;
|
|
82
247
|
}>>>;
|
|
83
248
|
document: Schema.filter<Schema.filter<Schema.Struct<{
|
|
84
|
-
entries: Schema.filter<Schema.Array$<Schema.
|
|
249
|
+
entries: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
85
250
|
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
86
251
|
display: Schema.Schema<import("./model.js").AssertionDisplay, import("./model.js").AssertionDisplay, never>;
|
|
87
|
-
criterion: Schema.Schema<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
252
|
+
criterion: Schema.Union<[Schema.Struct<{
|
|
253
|
+
state: Schema.Literal<["available"]>;
|
|
254
|
+
value: Schema.Schema<WritableCriterionEnvelope, WritableCriterionEnvelope, never>;
|
|
91
255
|
}>, Schema.Struct<{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
95
|
-
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
96
|
-
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
97
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
256
|
+
state: Schema.Literal<["unavailable"]>;
|
|
257
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
98
258
|
}>]>;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
259
|
+
materials: Schema.filter<Schema.Struct<{
|
|
260
|
+
source: Schema.Union<[Schema.Struct<{
|
|
261
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
262
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
263
|
+
}>, Schema.Struct<{
|
|
264
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
265
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
266
|
+
}>, Schema.Struct<{
|
|
267
|
+
kind: Schema.Literal<["blob"]>;
|
|
268
|
+
ref: Schema.Schema<RecordBlobRef, RecordBlobRef, never>;
|
|
269
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
270
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
271
|
+
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
272
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
273
|
+
}>]>;
|
|
274
|
+
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
275
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
276
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
277
|
+
}>, Schema.Struct<{
|
|
278
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
279
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
280
|
+
}>, Schema.Struct<{
|
|
281
|
+
kind: Schema.Literal<["blob"]>;
|
|
282
|
+
ref: Schema.Schema<RecordBlobRef, RecordBlobRef, never>;
|
|
283
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
284
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
285
|
+
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
286
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
287
|
+
}>]>>;
|
|
288
|
+
coverage: Schema.Schema<RecordAssertionCoverage, RecordAssertionCoverage, never>;
|
|
289
|
+
limitations: Schema.Array$<Schema.Schema<RecordAssertionLimitation, RecordAssertionLimitation, never>>;
|
|
290
|
+
}>>;
|
|
291
|
+
evaluation: Schema.Struct<{
|
|
292
|
+
observed: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
293
|
+
receipt: Schema.optional<Schema.Struct<{
|
|
294
|
+
examined: Schema.filter<typeof Schema.JsonNumber>;
|
|
295
|
+
matched: Schema.filter<typeof Schema.JsonNumber>;
|
|
296
|
+
mismatched: Schema.filter<typeof Schema.JsonNumber>;
|
|
297
|
+
unavailable: Schema.filter<typeof Schema.JsonNumber>;
|
|
298
|
+
knownTotal: Schema.NullOr<Schema.filter<typeof Schema.JsonNumber>>;
|
|
299
|
+
complete: typeof Schema.Boolean;
|
|
300
|
+
exhaustive: typeof Schema.Boolean;
|
|
301
|
+
decisive: typeof Schema.Boolean;
|
|
302
|
+
}>>;
|
|
303
|
+
}>;
|
|
304
|
+
decision: Schema.Struct<{
|
|
305
|
+
result: Schema.Literal<["matched", "mismatched", "unavailable", "errored", "not-applicable"]>;
|
|
306
|
+
reason: Schema.NullOr<Schema.Literal<["condition-not-met", "evidence-unavailable", "source-unavailable", "redacted", "evaluator-failed", "producer-interrupted", "invalid-subject", "coverage-not-applicable"]>>;
|
|
307
|
+
gate: Schema.Literal<["not-gate", "satisfied", "failed", "unavailable", "not-applicable"]>;
|
|
308
|
+
}>;
|
|
309
|
+
policy: Schema.Struct<{
|
|
310
|
+
requirement: Schema.Union<[Schema.Struct<{
|
|
311
|
+
state: Schema.Literal<["available"]>;
|
|
312
|
+
value: Schema.Literal<["required", "optional"]>;
|
|
313
|
+
}>, Schema.Struct<{
|
|
314
|
+
state: Schema.Literal<["unavailable"]>;
|
|
315
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
316
|
+
}>]>;
|
|
317
|
+
condition: Schema.Union<[Schema.Struct<{
|
|
318
|
+
state: Schema.Literal<["available"]>;
|
|
319
|
+
value: Schema.Union<[Schema.Struct<{
|
|
320
|
+
kind: Schema.Literal<["boolean"]>;
|
|
321
|
+
expected: Schema.Literal<[true]>;
|
|
322
|
+
}>, Schema.Struct<{
|
|
323
|
+
kind: Schema.Literal<["at-least"]>;
|
|
324
|
+
threshold: Schema.filter<typeof Schema.JsonNumber>;
|
|
325
|
+
}>, Schema.Struct<{
|
|
326
|
+
kind: Schema.Literal<["record-only"]>;
|
|
327
|
+
}>]>;
|
|
328
|
+
}>, Schema.Struct<{
|
|
329
|
+
state: Schema.Literal<["unavailable"]>;
|
|
330
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
331
|
+
}>]>;
|
|
332
|
+
}>;
|
|
333
|
+
contribution: Schema.Union<[Schema.Schema<import("./model.js").NoScoreContribution, import("./model.js").NoScoreContribution, never>, Schema.Schema<import("./model.js").EarnedScoreContribution, import("./model.js").EarnedScoreContribution, never>, Schema.Schema<import("./model.js").UnavailableScoreContribution, import("./model.js").UnavailableScoreContribution, never>]>;
|
|
334
|
+
explanationRetention: Schema.Union<[Schema.Struct<{
|
|
335
|
+
state: Schema.Literal<["retained"]>;
|
|
336
|
+
value: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
102
337
|
}>, Schema.Struct<{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
sha256: Schema.Schema<Sha256Digest, string, never>;
|
|
108
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
109
|
-
}>]>>;
|
|
110
|
-
coverage: Schema.Schema<RecordAssertionCoverage, RecordAssertionCoverage, never>;
|
|
111
|
-
limitations: Schema.Array$<Schema.Schema<RecordAssertionLimitation, RecordAssertionLimitation, never>>;
|
|
112
|
-
result: Schema.Schema<SealedAssertionResult, SealedAssertionResult, never>;
|
|
113
|
-
}>>>>;
|
|
338
|
+
state: Schema.Literal<["unavailable"]>;
|
|
339
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
340
|
+
}>]>;
|
|
341
|
+
}>>>;
|
|
114
342
|
}>>>;
|
|
115
343
|
}>;
|
|
116
344
|
/** Complete payload-order projection required by Record's closure validator. */
|
|
117
345
|
export declare function assertionBlobRefs(document: AssertionsDocumentOuter<RecordBlobRef>): readonly RecordBlobRef[];
|
|
118
346
|
export type AssertionMaterialInput<E, R> = {
|
|
347
|
+
readonly kind: "unavailable";
|
|
348
|
+
readonly reason: "not-recorded";
|
|
349
|
+
} | {
|
|
119
350
|
readonly kind: "snapshot";
|
|
120
351
|
readonly value: BoundedJsonValue;
|
|
121
352
|
} | {
|
|
@@ -130,11 +361,17 @@ export type AssertionMaterialInput<E, R> = {
|
|
|
130
361
|
export interface AssertionsAttachmentEntryInput<E, R> {
|
|
131
362
|
readonly display: AssertionEntryInput<RecordBlobRef>["display"];
|
|
132
363
|
readonly criterion: AssertionEntryInput<RecordBlobRef>["criterion"];
|
|
133
|
-
readonly
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
364
|
+
readonly materials: {
|
|
365
|
+
readonly source: AssertionMaterialInput<E, R>;
|
|
366
|
+
readonly evidence: readonly AssertionMaterialInput<E, R>[];
|
|
367
|
+
readonly coverage: AssertionEntryInput<RecordBlobRef>["materials"]["coverage"];
|
|
368
|
+
readonly limitations: AssertionEntryInput<RecordBlobRef>["materials"]["limitations"];
|
|
369
|
+
};
|
|
370
|
+
readonly evaluation: AssertionEntryInput<RecordBlobRef>["evaluation"];
|
|
371
|
+
readonly decision: AssertionEntryInput<RecordBlobRef>["decision"];
|
|
372
|
+
readonly policy: AssertionEntryInput<RecordBlobRef>["policy"];
|
|
373
|
+
readonly contribution: AssertionEntryInput<RecordBlobRef>["contribution"];
|
|
374
|
+
readonly explanationRetention: AssertionEntryInput<RecordBlobRef>["explanationRetention"];
|
|
138
375
|
}
|
|
139
376
|
export declare function encodeAssertionResult(result: AssertionResult): SealedAssertionResult;
|
|
140
377
|
/** Private Runtime → durable Assertions codec bridge. */
|
|
@@ -286,7 +286,10 @@ exports.CriterionOuterEnvelopeSchema = effect_1.Schema.Union(exports.BuiltInCrit
|
|
|
286
286
|
const ValueMatchCriterionSchema = effect_1.Schema.Struct({
|
|
287
287
|
kind: effect_1.Schema.Literal("builtin"),
|
|
288
288
|
id: effect_1.Schema.Literal("value-match/v1"),
|
|
289
|
-
data: effect_1.Schema.Struct({
|
|
289
|
+
data: effect_1.Schema.Struct({
|
|
290
|
+
subject: effect_1.Schema.Literal("explicit-value"),
|
|
291
|
+
matcher: effect_1.Schema.Union(effect_1.Schema.Struct({ state: effect_1.Schema.Literal("declared"), name: BoundedJsonStringSchema }), effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable") })),
|
|
292
|
+
}),
|
|
290
293
|
});
|
|
291
294
|
const ScopeStatusCriterionSchema = effect_1.Schema.Struct({
|
|
292
295
|
kind: effect_1.Schema.Literal("builtin"),
|
|
@@ -398,35 +401,67 @@ const UnavailableScoreContributionSchema = effect_1.Schema.Struct({
|
|
|
398
401
|
points: NonNegativeNumberSchema,
|
|
399
402
|
reason: effect_1.Schema.Literal("source-unavailable", "evaluation-errored", "not-applicable"),
|
|
400
403
|
});
|
|
404
|
+
const AssertionCollectionReceiptSchema = effect_1.Schema.Struct({
|
|
405
|
+
examined: NonNegativeIntegerSchema,
|
|
406
|
+
matched: NonNegativeIntegerSchema,
|
|
407
|
+
mismatched: NonNegativeIntegerSchema,
|
|
408
|
+
unavailable: NonNegativeIntegerSchema,
|
|
409
|
+
knownTotal: effect_1.Schema.NullOr(NonNegativeIntegerSchema),
|
|
410
|
+
complete: effect_1.Schema.Boolean,
|
|
411
|
+
exhaustive: effect_1.Schema.Boolean,
|
|
412
|
+
decisive: effect_1.Schema.Boolean,
|
|
413
|
+
});
|
|
414
|
+
const AssertionFactValueSchema = effect_1.Schema.suspend(() => effect_1.Schema.Union(effect_1.Schema.Struct({
|
|
415
|
+
kind: effect_1.Schema.Literal("unavailable"),
|
|
416
|
+
reason: effect_1.Schema.Literal("not-recorded", "not-declared", "source-unavailable"),
|
|
417
|
+
}), effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("value"), value: effect_1.Schema.Union(effect_1.Schema.Null, effect_1.Schema.Boolean, effect_1.Schema.JsonNumber, BoundedJsonStringSchema) }), effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("text"), text: BoundedJsonStringSchema }), effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("list"), items: effect_1.Schema.Array(AssertionFactValueSchema) }), effect_1.Schema.Struct({
|
|
418
|
+
kind: effect_1.Schema.Literal("fields"),
|
|
419
|
+
fields: effect_1.Schema.Array(effect_1.Schema.Struct({ label: BoundedJsonStringSchema, value: AssertionFactValueSchema })),
|
|
420
|
+
})));
|
|
421
|
+
const AssertionDecisionPolicySchema = effect_1.Schema.Struct({
|
|
422
|
+
requirement: effect_1.Schema.Union(effect_1.Schema.Struct({
|
|
423
|
+
state: effect_1.Schema.Literal("available"),
|
|
424
|
+
value: effect_1.Schema.Literal("required", "optional"),
|
|
425
|
+
}), effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable"), reason: effect_1.Schema.Literal("not-recorded") })),
|
|
426
|
+
condition: effect_1.Schema.Union(effect_1.Schema.Struct({
|
|
427
|
+
state: effect_1.Schema.Literal("available"),
|
|
428
|
+
value: effect_1.Schema.Union(effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("boolean"), expected: effect_1.Schema.Literal(true) }), effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("at-least"), threshold: NonNegativeNumberSchema }), effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("record-only") })),
|
|
429
|
+
}), effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable"), reason: effect_1.Schema.Literal("not-recorded") })),
|
|
430
|
+
});
|
|
401
431
|
exports.SealedAssertionResultSchema = effect_1.Schema.Union(effect_1.Schema.Struct({
|
|
402
432
|
state: effect_1.Schema.Literal("matched"),
|
|
403
433
|
gate: effect_1.Schema.Literal("not-gate", "satisfied"),
|
|
404
434
|
score: effect_1.Schema.Union(NoScoreContributionSchema, EarnedScoreContributionSchema),
|
|
405
435
|
diagnostic: effect_1.Schema.optional(exports.BoundedJsonObjectSchema),
|
|
436
|
+
receipt: effect_1.Schema.optional(AssertionCollectionReceiptSchema),
|
|
406
437
|
}), effect_1.Schema.Struct({
|
|
407
438
|
state: effect_1.Schema.Literal("mismatched"),
|
|
408
439
|
reason: effect_1.Schema.Literal("condition-not-met"),
|
|
409
440
|
gate: effect_1.Schema.Literal("not-gate", "failed"),
|
|
410
441
|
score: effect_1.Schema.Union(NoScoreContributionSchema, EarnedScoreContributionSchema),
|
|
411
442
|
diagnostic: effect_1.Schema.optional(exports.BoundedJsonObjectSchema),
|
|
443
|
+
receipt: effect_1.Schema.optional(AssertionCollectionReceiptSchema),
|
|
412
444
|
}), effect_1.Schema.Struct({
|
|
413
445
|
state: effect_1.Schema.Literal("unavailable"),
|
|
414
446
|
reason: effect_1.Schema.Literal("evidence-unavailable", "source-unavailable", "redacted"),
|
|
415
447
|
gate: effect_1.Schema.Literal("not-gate", "unavailable"),
|
|
416
448
|
score: effect_1.Schema.Union(NoScoreContributionSchema, UnavailableScoreContributionSchema),
|
|
417
449
|
diagnostic: effect_1.Schema.optional(exports.BoundedJsonObjectSchema),
|
|
450
|
+
receipt: effect_1.Schema.optional(AssertionCollectionReceiptSchema),
|
|
418
451
|
}), effect_1.Schema.Struct({
|
|
419
452
|
state: effect_1.Schema.Literal("errored"),
|
|
420
453
|
reason: effect_1.Schema.Literal("evaluator-failed", "producer-interrupted", "invalid-subject"),
|
|
421
454
|
gate: effect_1.Schema.Literal("not-gate", "unavailable"),
|
|
422
455
|
score: effect_1.Schema.Union(NoScoreContributionSchema, UnavailableScoreContributionSchema),
|
|
423
456
|
diagnostic: effect_1.Schema.optional(exports.BoundedJsonObjectSchema),
|
|
457
|
+
receipt: effect_1.Schema.optional(AssertionCollectionReceiptSchema),
|
|
424
458
|
}), effect_1.Schema.Struct({
|
|
425
459
|
state: effect_1.Schema.Literal("not-applicable"),
|
|
426
460
|
reason: effect_1.Schema.Literal("coverage-not-applicable"),
|
|
427
461
|
gate: effect_1.Schema.Literal("not-gate", "not-applicable"),
|
|
428
462
|
score: effect_1.Schema.Union(NoScoreContributionSchema, UnavailableScoreContributionSchema),
|
|
429
463
|
diagnostic: effect_1.Schema.optional(exports.BoundedJsonObjectSchema),
|
|
464
|
+
receipt: effect_1.Schema.optional(AssertionCollectionReceiptSchema),
|
|
430
465
|
}));
|
|
431
466
|
/**
|
|
432
467
|
* Record owns the opaque blob-ref codec. Assertions owns only its shape and
|
|
@@ -435,6 +470,9 @@ exports.SealedAssertionResultSchema = effect_1.Schema.Union(effect_1.Schema.Stru
|
|
|
435
470
|
*/
|
|
436
471
|
function createAssertionsRecordSchemas(blobRefSchema) {
|
|
437
472
|
const material = effect_1.Schema.Union(effect_1.Schema.Struct({
|
|
473
|
+
kind: effect_1.Schema.Literal("unavailable"),
|
|
474
|
+
reason: effect_1.Schema.Literal("not-recorded"),
|
|
475
|
+
}), effect_1.Schema.Struct({
|
|
438
476
|
kind: effect_1.Schema.Literal("snapshot"),
|
|
439
477
|
value: exports.BoundedJsonValueSchema,
|
|
440
478
|
}), effect_1.Schema.Struct({
|
|
@@ -447,7 +485,7 @@ function createAssertionsRecordSchemas(blobRefSchema) {
|
|
|
447
485
|
}));
|
|
448
486
|
const evidence = effect_1.Schema.Array(material);
|
|
449
487
|
const limitations = effect_1.Schema.Array(exports.AssertionLimitationSchema);
|
|
450
|
-
const
|
|
488
|
+
const historicalOuterEntry = effect_1.Schema.Struct({
|
|
451
489
|
entryId: exports.AssertionEntryIdSchema,
|
|
452
490
|
display: exports.AssertionDisplaySchema,
|
|
453
491
|
criterion: exports.BoundedJsonObjectSchema,
|
|
@@ -460,6 +498,40 @@ function createAssertionsRecordSchemas(blobRefSchema) {
|
|
|
460
498
|
identifier: "AssertionCoverageLimitations",
|
|
461
499
|
description: "coverage and limitations with a consistent sealed relationship",
|
|
462
500
|
}));
|
|
501
|
+
const materials = effect_1.Schema.Struct({
|
|
502
|
+
source: material,
|
|
503
|
+
evidence,
|
|
504
|
+
coverage: exports.AssertionCoverageSchema,
|
|
505
|
+
limitations,
|
|
506
|
+
}).pipe(effect_1.Schema.filter((value) => hasCoverageConsistentLimitations(value), {
|
|
507
|
+
identifier: "AssertionCoverageLimitations",
|
|
508
|
+
description: "coverage and limitations with a consistent sealed relationship",
|
|
509
|
+
}));
|
|
510
|
+
const evaluation = effect_1.Schema.Struct({
|
|
511
|
+
observed: AssertionFactValueSchema,
|
|
512
|
+
receipt: effect_1.Schema.optional(AssertionCollectionReceiptSchema),
|
|
513
|
+
});
|
|
514
|
+
const decision = effect_1.Schema.Struct({
|
|
515
|
+
result: effect_1.Schema.Literal("matched", "mismatched", "unavailable", "errored", "not-applicable"),
|
|
516
|
+
reason: effect_1.Schema.NullOr(effect_1.Schema.Literal("condition-not-met", "evidence-unavailable", "source-unavailable", "redacted", "evaluator-failed", "producer-interrupted", "invalid-subject", "coverage-not-applicable")),
|
|
517
|
+
gate: effect_1.Schema.Literal("not-gate", "satisfied", "failed", "unavailable", "not-applicable"),
|
|
518
|
+
});
|
|
519
|
+
const explanationRetention = effect_1.Schema.Union(effect_1.Schema.Struct({ state: effect_1.Schema.Literal("retained"), value: AssertionFactValueSchema }), effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable"), reason: effect_1.Schema.Literal("not-recorded") }));
|
|
520
|
+
const outerEntry = effect_1.Schema.Struct({
|
|
521
|
+
entryId: exports.AssertionEntryIdSchema,
|
|
522
|
+
display: exports.AssertionDisplaySchema,
|
|
523
|
+
criterion: effect_1.Schema.Union(effect_1.Schema.Struct({ state: effect_1.Schema.Literal("available"), value: exports.BoundedJsonObjectSchema }), effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable"), reason: effect_1.Schema.Literal("not-recorded") })),
|
|
524
|
+
materials,
|
|
525
|
+
evaluation,
|
|
526
|
+
decision,
|
|
527
|
+
policy: AssertionDecisionPolicySchema,
|
|
528
|
+
contribution: effect_1.Schema.Union(NoScoreContributionSchema, EarnedScoreContributionSchema, UnavailableScoreContributionSchema),
|
|
529
|
+
explanationRetention,
|
|
530
|
+
});
|
|
531
|
+
const historicalEntries = effect_1.Schema.Array(historicalOuterEntry).pipe(effect_1.Schema.filter((values) => values.length <= limits_ts_1.assertionRuntimeLimits.entries, {
|
|
532
|
+
identifier: "AssertionsEntryCount",
|
|
533
|
+
description: "at most 4,096 assertion entries",
|
|
534
|
+
}));
|
|
463
535
|
const entries = effect_1.Schema.Array(outerEntry).pipe(effect_1.Schema.filter((values) => values.length <= limits_ts_1.assertionRuntimeLimits.entries, {
|
|
464
536
|
identifier: "AssertionsEntryCount",
|
|
465
537
|
description: "at most 4,096 assertion entries",
|
|
@@ -474,16 +546,14 @@ function createAssertionsRecordSchemas(blobRefSchema) {
|
|
|
474
546
|
const entry = effect_1.Schema.Struct({
|
|
475
547
|
entryId: exports.AssertionEntryIdSchema,
|
|
476
548
|
display: exports.AssertionDisplaySchema,
|
|
477
|
-
criterion: exports.CriterionEnvelopeSchema,
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
description: "coverage and limitations with a consistent sealed relationship",
|
|
486
|
-
}));
|
|
549
|
+
criterion: effect_1.Schema.Union(effect_1.Schema.Struct({ state: effect_1.Schema.Literal("available"), value: exports.CriterionEnvelopeSchema }), effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable"), reason: effect_1.Schema.Literal("not-recorded") })),
|
|
550
|
+
materials,
|
|
551
|
+
evaluation,
|
|
552
|
+
decision,
|
|
553
|
+
policy: AssertionDecisionPolicySchema,
|
|
554
|
+
contribution: effect_1.Schema.Union(NoScoreContributionSchema, EarnedScoreContributionSchema, UnavailableScoreContributionSchema),
|
|
555
|
+
explanationRetention,
|
|
556
|
+
});
|
|
487
557
|
const document = effect_1.Schema.Struct({
|
|
488
558
|
entries: effect_1.Schema.Array(entry).pipe(effect_1.Schema.filter((entries) => entries.length <= limits_ts_1.assertionRuntimeLimits.entries, {
|
|
489
559
|
identifier: "AssertionsEntryCount",
|
|
@@ -496,7 +566,7 @@ function createAssertionsRecordSchemas(blobRefSchema) {
|
|
|
496
566
|
identifier: "AssertionsDocumentSize",
|
|
497
567
|
description: "a JSON document no larger than 4 MiB",
|
|
498
568
|
}));
|
|
499
|
-
return Object.freeze({ material, entries, outerDocument, document });
|
|
569
|
+
return Object.freeze({ material, entries, historicalEntries, outerDocument, document });
|
|
500
570
|
}
|
|
501
571
|
const assertionsDocumentInvalid = Object.freeze({
|
|
502
572
|
code: "assertions-document-invalid",
|
|
@@ -557,14 +627,18 @@ const KNOWN_BUILTIN_CRITERION_IDS = new Set([
|
|
|
557
627
|
function availableEntry(entry, criterion) {
|
|
558
628
|
const available = {
|
|
559
629
|
...entry,
|
|
560
|
-
criterion,
|
|
630
|
+
criterion: Object.freeze({ state: "available", value: criterion }),
|
|
561
631
|
};
|
|
562
632
|
return Object.freeze({ state: "available", entry: Object.freeze(available) });
|
|
563
633
|
}
|
|
564
634
|
function projectAssertionEntry(entry, registry) {
|
|
565
|
-
|
|
635
|
+
if (entry.criterion.state === "unavailable") {
|
|
636
|
+
return Object.freeze({ state: "available", entry: entry });
|
|
637
|
+
}
|
|
638
|
+
const criterionValue = entry.criterion.value;
|
|
639
|
+
const builtinEnvelope = effect_1.Schema.decodeUnknownEither(exports.BuiltInCriterionEnvelopeSchema, exports.AssertionsExactParseOptions)(criterionValue);
|
|
566
640
|
if (effect_1.Either.isRight(builtinEnvelope)) {
|
|
567
|
-
const builtin = effect_1.Schema.decodeUnknownEither(exports.BuiltInCriterionSchema, exports.AssertionsExactParseOptions)(
|
|
641
|
+
const builtin = effect_1.Schema.decodeUnknownEither(exports.BuiltInCriterionSchema, exports.AssertionsExactParseOptions)(criterionValue);
|
|
568
642
|
if (effect_1.Either.isRight(builtin)) {
|
|
569
643
|
return availableEntry(entry, builtin.right);
|
|
570
644
|
}
|
|
@@ -581,7 +655,7 @@ function projectAssertionEntry(entry, registry) {
|
|
|
581
655
|
reason: "builtin-unknown",
|
|
582
656
|
});
|
|
583
657
|
}
|
|
584
|
-
const thirdParty = effect_1.Schema.decodeUnknownEither(exports.ThirdPartyCriterionSchema, exports.AssertionsExactParseOptions)(
|
|
658
|
+
const thirdParty = effect_1.Schema.decodeUnknownEither(exports.ThirdPartyCriterionSchema, exports.AssertionsExactParseOptions)(criterionValue);
|
|
585
659
|
if (effect_1.Either.isLeft(thirdParty)) {
|
|
586
660
|
return Object.freeze({
|
|
587
661
|
state: "invalid",
|