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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Either, Schema } from "effect";
|
|
2
|
-
import { type AssertionCoverage, type AssertionDisplay, type AssertionEntryId, type AssertionLimitation, type AssertionsDocumentOuter, type AssertionsDocument, type AssertionsProjection, type BoundedJsonObject, type BoundedJsonValue, type BuiltInCriterionEnvelope, type BuiltInCriterion, type CriterionOuterEnvelope, type SealedAssertionResult, type ThirdPartyCriterion, type WritableCriterionEnvelope } from "./model.js";
|
|
2
|
+
import { type AssertionCoverage, type AssertionDisplay, type AssertionFactValue, type AssertionEntryId, type AssertionLimitation, type AssertionsDocumentOuter, type AssertionsDocument, type AssertionsProjection, type BoundedJsonObject, type BoundedJsonValue, type BuiltInCriterionEnvelope, type BuiltInCriterion, type CriterionOuterEnvelope, type EarnedScoreContribution, type NoScoreContribution, type SealedAssertionResult, type ThirdPartyCriterion, type UnavailableScoreContribution, type WritableCriterionEnvelope } from "./model.js";
|
|
3
3
|
/** Durable document-size limit; unlike runtime capture limits it belongs to this codec. */
|
|
4
4
|
export declare const MAX_ASSERTION_DOCUMENT_BYTES: number;
|
|
5
5
|
/** All contract-owned objects use aggregate failures and exact object fields. */
|
|
@@ -30,6 +30,9 @@ export declare const SealedAssertionResultSchema: Schema.Schema<SealedAssertionR
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function createAssertionsRecordSchemas<BlobRef, BlobRefEncoded>(blobRefSchema: Schema.Schema<BlobRef, BlobRefEncoded>): Readonly<{
|
|
32
32
|
material: Schema.Union<[Schema.Struct<{
|
|
33
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
34
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
35
|
+
}>, Schema.Struct<{
|
|
33
36
|
kind: Schema.Literal<["snapshot"]>;
|
|
34
37
|
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
35
38
|
}>, Schema.Struct<{
|
|
@@ -40,11 +43,107 @@ export declare function createAssertionsRecordSchemas<BlobRef, BlobRefEncoded>(b
|
|
|
40
43
|
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
41
44
|
preview: Schema.filter<typeof Schema.String>;
|
|
42
45
|
}>]>;
|
|
43
|
-
entries: Schema.filter<Schema.Array$<Schema.
|
|
46
|
+
entries: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
47
|
+
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
48
|
+
display: Schema.Schema<AssertionDisplay, AssertionDisplay, never>;
|
|
49
|
+
criterion: Schema.Union<[Schema.Struct<{
|
|
50
|
+
state: Schema.Literal<["available"]>;
|
|
51
|
+
value: Schema.Schema<BoundedJsonObject, BoundedJsonObject, never>;
|
|
52
|
+
}>, Schema.Struct<{
|
|
53
|
+
state: Schema.Literal<["unavailable"]>;
|
|
54
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
55
|
+
}>]>;
|
|
56
|
+
materials: Schema.filter<Schema.Struct<{
|
|
57
|
+
source: Schema.Union<[Schema.Struct<{
|
|
58
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
59
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
60
|
+
}>, Schema.Struct<{
|
|
61
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
62
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
63
|
+
}>, Schema.Struct<{
|
|
64
|
+
kind: Schema.Literal<["blob"]>;
|
|
65
|
+
ref: Schema.Schema<BlobRef, BlobRefEncoded, never>;
|
|
66
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
67
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
68
|
+
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
69
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
70
|
+
}>]>;
|
|
71
|
+
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
72
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
73
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
74
|
+
}>, Schema.Struct<{
|
|
75
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
76
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
77
|
+
}>, Schema.Struct<{
|
|
78
|
+
kind: Schema.Literal<["blob"]>;
|
|
79
|
+
ref: Schema.Schema<BlobRef, BlobRefEncoded, never>;
|
|
80
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
81
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
82
|
+
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
83
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
84
|
+
}>]>>;
|
|
85
|
+
coverage: Schema.Schema<AssertionCoverage, AssertionCoverage, never>;
|
|
86
|
+
limitations: Schema.Array$<Schema.Schema<AssertionLimitation, AssertionLimitation, never>>;
|
|
87
|
+
}>>;
|
|
88
|
+
evaluation: Schema.Struct<{
|
|
89
|
+
observed: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
90
|
+
receipt: Schema.optional<Schema.Struct<{
|
|
91
|
+
examined: Schema.filter<typeof Schema.JsonNumber>;
|
|
92
|
+
matched: Schema.filter<typeof Schema.JsonNumber>;
|
|
93
|
+
mismatched: Schema.filter<typeof Schema.JsonNumber>;
|
|
94
|
+
unavailable: Schema.filter<typeof Schema.JsonNumber>;
|
|
95
|
+
knownTotal: Schema.NullOr<Schema.filter<typeof Schema.JsonNumber>>;
|
|
96
|
+
complete: typeof Schema.Boolean;
|
|
97
|
+
exhaustive: typeof Schema.Boolean;
|
|
98
|
+
decisive: typeof Schema.Boolean;
|
|
99
|
+
}>>;
|
|
100
|
+
}>;
|
|
101
|
+
decision: Schema.Struct<{
|
|
102
|
+
result: Schema.Literal<["matched", "mismatched", "unavailable", "errored", "not-applicable"]>;
|
|
103
|
+
reason: Schema.NullOr<Schema.Literal<["condition-not-met", "evidence-unavailable", "source-unavailable", "redacted", "evaluator-failed", "producer-interrupted", "invalid-subject", "coverage-not-applicable"]>>;
|
|
104
|
+
gate: Schema.Literal<["not-gate", "satisfied", "failed", "unavailable", "not-applicable"]>;
|
|
105
|
+
}>;
|
|
106
|
+
policy: Schema.Struct<{
|
|
107
|
+
requirement: Schema.Union<[Schema.Struct<{
|
|
108
|
+
state: Schema.Literal<["available"]>;
|
|
109
|
+
value: Schema.Literal<["required", "optional"]>;
|
|
110
|
+
}>, Schema.Struct<{
|
|
111
|
+
state: Schema.Literal<["unavailable"]>;
|
|
112
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
113
|
+
}>]>;
|
|
114
|
+
condition: Schema.Union<[Schema.Struct<{
|
|
115
|
+
state: Schema.Literal<["available"]>;
|
|
116
|
+
value: Schema.Union<[Schema.Struct<{
|
|
117
|
+
kind: Schema.Literal<["boolean"]>;
|
|
118
|
+
expected: Schema.Literal<[true]>;
|
|
119
|
+
}>, Schema.Struct<{
|
|
120
|
+
kind: Schema.Literal<["at-least"]>;
|
|
121
|
+
threshold: Schema.filter<typeof Schema.JsonNumber>;
|
|
122
|
+
}>, Schema.Struct<{
|
|
123
|
+
kind: Schema.Literal<["record-only"]>;
|
|
124
|
+
}>]>;
|
|
125
|
+
}>, Schema.Struct<{
|
|
126
|
+
state: Schema.Literal<["unavailable"]>;
|
|
127
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
128
|
+
}>]>;
|
|
129
|
+
}>;
|
|
130
|
+
contribution: Schema.Union<[Schema.Schema<NoScoreContribution, NoScoreContribution, never>, Schema.Schema<EarnedScoreContribution, EarnedScoreContribution, never>, Schema.Schema<UnavailableScoreContribution, UnavailableScoreContribution, never>]>;
|
|
131
|
+
explanationRetention: Schema.Union<[Schema.Struct<{
|
|
132
|
+
state: Schema.Literal<["retained"]>;
|
|
133
|
+
value: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
134
|
+
}>, Schema.Struct<{
|
|
135
|
+
state: Schema.Literal<["unavailable"]>;
|
|
136
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
137
|
+
}>]>;
|
|
138
|
+
}>>>;
|
|
139
|
+
historicalEntries: Schema.filter<Schema.Array$<Schema.filter<Schema.Struct<{
|
|
44
140
|
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
45
141
|
display: Schema.Schema<AssertionDisplay, AssertionDisplay, never>;
|
|
46
142
|
criterion: Schema.Schema<BoundedJsonObject, BoundedJsonObject, never>;
|
|
47
143
|
subject: Schema.Union<[Schema.Struct<{
|
|
144
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
145
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
146
|
+
}>, Schema.Struct<{
|
|
48
147
|
kind: Schema.Literal<["snapshot"]>;
|
|
49
148
|
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
50
149
|
}>, Schema.Struct<{
|
|
@@ -56,6 +155,9 @@ export declare function createAssertionsRecordSchemas<BlobRef, BlobRefEncoded>(b
|
|
|
56
155
|
preview: Schema.filter<typeof Schema.String>;
|
|
57
156
|
}>]>;
|
|
58
157
|
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
158
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
159
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
160
|
+
}>, Schema.Struct<{
|
|
59
161
|
kind: Schema.Literal<["snapshot"]>;
|
|
60
162
|
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
61
163
|
}>, Schema.Struct<{
|
|
@@ -71,68 +173,194 @@ export declare function createAssertionsRecordSchemas<BlobRef, BlobRefEncoded>(b
|
|
|
71
173
|
result: Schema.Schema<SealedAssertionResult, SealedAssertionResult, never>;
|
|
72
174
|
}>>>>;
|
|
73
175
|
outerDocument: Schema.filter<Schema.filter<Schema.Struct<{
|
|
74
|
-
entries: Schema.filter<Schema.Array$<Schema.
|
|
176
|
+
entries: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
75
177
|
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
76
178
|
display: Schema.Schema<AssertionDisplay, AssertionDisplay, never>;
|
|
77
|
-
criterion: Schema.Schema<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
179
|
+
criterion: Schema.Union<[Schema.Struct<{
|
|
180
|
+
state: Schema.Literal<["available"]>;
|
|
181
|
+
value: Schema.Schema<BoundedJsonObject, BoundedJsonObject, never>;
|
|
81
182
|
}>, Schema.Struct<{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
85
|
-
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
86
|
-
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
87
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
183
|
+
state: Schema.Literal<["unavailable"]>;
|
|
184
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
88
185
|
}>]>;
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
186
|
+
materials: Schema.filter<Schema.Struct<{
|
|
187
|
+
source: Schema.Union<[Schema.Struct<{
|
|
188
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
189
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
190
|
+
}>, Schema.Struct<{
|
|
191
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
192
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
193
|
+
}>, Schema.Struct<{
|
|
194
|
+
kind: Schema.Literal<["blob"]>;
|
|
195
|
+
ref: Schema.Schema<BlobRef, BlobRefEncoded, never>;
|
|
196
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
197
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
198
|
+
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
199
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
200
|
+
}>]>;
|
|
201
|
+
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
202
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
203
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
204
|
+
}>, Schema.Struct<{
|
|
205
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
206
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
207
|
+
}>, Schema.Struct<{
|
|
208
|
+
kind: Schema.Literal<["blob"]>;
|
|
209
|
+
ref: Schema.Schema<BlobRef, BlobRefEncoded, never>;
|
|
210
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
211
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
212
|
+
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
213
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
214
|
+
}>]>>;
|
|
215
|
+
coverage: Schema.Schema<AssertionCoverage, AssertionCoverage, never>;
|
|
216
|
+
limitations: Schema.Array$<Schema.Schema<AssertionLimitation, AssertionLimitation, never>>;
|
|
217
|
+
}>>;
|
|
218
|
+
evaluation: Schema.Struct<{
|
|
219
|
+
observed: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
220
|
+
receipt: Schema.optional<Schema.Struct<{
|
|
221
|
+
examined: Schema.filter<typeof Schema.JsonNumber>;
|
|
222
|
+
matched: Schema.filter<typeof Schema.JsonNumber>;
|
|
223
|
+
mismatched: Schema.filter<typeof Schema.JsonNumber>;
|
|
224
|
+
unavailable: Schema.filter<typeof Schema.JsonNumber>;
|
|
225
|
+
knownTotal: Schema.NullOr<Schema.filter<typeof Schema.JsonNumber>>;
|
|
226
|
+
complete: typeof Schema.Boolean;
|
|
227
|
+
exhaustive: typeof Schema.Boolean;
|
|
228
|
+
decisive: typeof Schema.Boolean;
|
|
229
|
+
}>>;
|
|
230
|
+
}>;
|
|
231
|
+
decision: Schema.Struct<{
|
|
232
|
+
result: Schema.Literal<["matched", "mismatched", "unavailable", "errored", "not-applicable"]>;
|
|
233
|
+
reason: Schema.NullOr<Schema.Literal<["condition-not-met", "evidence-unavailable", "source-unavailable", "redacted", "evaluator-failed", "producer-interrupted", "invalid-subject", "coverage-not-applicable"]>>;
|
|
234
|
+
gate: Schema.Literal<["not-gate", "satisfied", "failed", "unavailable", "not-applicable"]>;
|
|
235
|
+
}>;
|
|
236
|
+
policy: Schema.Struct<{
|
|
237
|
+
requirement: Schema.Union<[Schema.Struct<{
|
|
238
|
+
state: Schema.Literal<["available"]>;
|
|
239
|
+
value: Schema.Literal<["required", "optional"]>;
|
|
240
|
+
}>, Schema.Struct<{
|
|
241
|
+
state: Schema.Literal<["unavailable"]>;
|
|
242
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
243
|
+
}>]>;
|
|
244
|
+
condition: Schema.Union<[Schema.Struct<{
|
|
245
|
+
state: Schema.Literal<["available"]>;
|
|
246
|
+
value: Schema.Union<[Schema.Struct<{
|
|
247
|
+
kind: Schema.Literal<["boolean"]>;
|
|
248
|
+
expected: Schema.Literal<[true]>;
|
|
249
|
+
}>, Schema.Struct<{
|
|
250
|
+
kind: Schema.Literal<["at-least"]>;
|
|
251
|
+
threshold: Schema.filter<typeof Schema.JsonNumber>;
|
|
252
|
+
}>, Schema.Struct<{
|
|
253
|
+
kind: Schema.Literal<["record-only"]>;
|
|
254
|
+
}>]>;
|
|
255
|
+
}>, Schema.Struct<{
|
|
256
|
+
state: Schema.Literal<["unavailable"]>;
|
|
257
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
258
|
+
}>]>;
|
|
259
|
+
}>;
|
|
260
|
+
contribution: Schema.Union<[Schema.Schema<NoScoreContribution, NoScoreContribution, never>, Schema.Schema<EarnedScoreContribution, EarnedScoreContribution, never>, Schema.Schema<UnavailableScoreContribution, UnavailableScoreContribution, never>]>;
|
|
261
|
+
explanationRetention: Schema.Union<[Schema.Struct<{
|
|
262
|
+
state: Schema.Literal<["retained"]>;
|
|
263
|
+
value: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
92
264
|
}>, Schema.Struct<{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
98
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
99
|
-
}>]>>;
|
|
100
|
-
coverage: Schema.Schema<AssertionCoverage, AssertionCoverage, never>;
|
|
101
|
-
limitations: Schema.Array$<Schema.Schema<AssertionLimitation, AssertionLimitation, never>>;
|
|
102
|
-
result: Schema.Schema<SealedAssertionResult, SealedAssertionResult, never>;
|
|
103
|
-
}>>>>;
|
|
265
|
+
state: Schema.Literal<["unavailable"]>;
|
|
266
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
267
|
+
}>]>;
|
|
268
|
+
}>>>;
|
|
104
269
|
}>>>;
|
|
105
270
|
document: Schema.filter<Schema.filter<Schema.Struct<{
|
|
106
|
-
entries: Schema.filter<Schema.Array$<Schema.
|
|
271
|
+
entries: Schema.filter<Schema.Array$<Schema.Struct<{
|
|
107
272
|
entryId: Schema.Schema<AssertionEntryId, string, never>;
|
|
108
273
|
display: Schema.Schema<AssertionDisplay, AssertionDisplay, never>;
|
|
109
|
-
criterion: Schema.Schema<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
274
|
+
criterion: Schema.Union<[Schema.Struct<{
|
|
275
|
+
state: Schema.Literal<["available"]>;
|
|
276
|
+
value: Schema.Schema<WritableCriterionEnvelope, WritableCriterionEnvelope, never>;
|
|
113
277
|
}>, Schema.Struct<{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
117
|
-
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
118
|
-
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
119
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
278
|
+
state: Schema.Literal<["unavailable"]>;
|
|
279
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
120
280
|
}>]>;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
281
|
+
materials: Schema.filter<Schema.Struct<{
|
|
282
|
+
source: Schema.Union<[Schema.Struct<{
|
|
283
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
284
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
285
|
+
}>, Schema.Struct<{
|
|
286
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
287
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
288
|
+
}>, Schema.Struct<{
|
|
289
|
+
kind: Schema.Literal<["blob"]>;
|
|
290
|
+
ref: Schema.Schema<BlobRef, BlobRefEncoded, never>;
|
|
291
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
292
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
293
|
+
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
294
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
295
|
+
}>]>;
|
|
296
|
+
evidence: Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
297
|
+
kind: Schema.Literal<["unavailable"]>;
|
|
298
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
299
|
+
}>, Schema.Struct<{
|
|
300
|
+
kind: Schema.Literal<["snapshot"]>;
|
|
301
|
+
value: Schema.Schema<BoundedJsonValue, BoundedJsonValue, never>;
|
|
302
|
+
}>, Schema.Struct<{
|
|
303
|
+
kind: Schema.Literal<["blob"]>;
|
|
304
|
+
ref: Schema.Schema<BlobRef, BlobRefEncoded, never>;
|
|
305
|
+
encoding: Schema.Literal<["utf-8", "binary"]>;
|
|
306
|
+
byteLength: Schema.filter<typeof Schema.JsonNumber>;
|
|
307
|
+
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
308
|
+
preview: Schema.filter<typeof Schema.String>;
|
|
309
|
+
}>]>>;
|
|
310
|
+
coverage: Schema.Schema<AssertionCoverage, AssertionCoverage, never>;
|
|
311
|
+
limitations: Schema.Array$<Schema.Schema<AssertionLimitation, AssertionLimitation, never>>;
|
|
312
|
+
}>>;
|
|
313
|
+
evaluation: Schema.Struct<{
|
|
314
|
+
observed: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
315
|
+
receipt: Schema.optional<Schema.Struct<{
|
|
316
|
+
examined: Schema.filter<typeof Schema.JsonNumber>;
|
|
317
|
+
matched: Schema.filter<typeof Schema.JsonNumber>;
|
|
318
|
+
mismatched: Schema.filter<typeof Schema.JsonNumber>;
|
|
319
|
+
unavailable: Schema.filter<typeof Schema.JsonNumber>;
|
|
320
|
+
knownTotal: Schema.NullOr<Schema.filter<typeof Schema.JsonNumber>>;
|
|
321
|
+
complete: typeof Schema.Boolean;
|
|
322
|
+
exhaustive: typeof Schema.Boolean;
|
|
323
|
+
decisive: typeof Schema.Boolean;
|
|
324
|
+
}>>;
|
|
325
|
+
}>;
|
|
326
|
+
decision: Schema.Struct<{
|
|
327
|
+
result: Schema.Literal<["matched", "mismatched", "unavailable", "errored", "not-applicable"]>;
|
|
328
|
+
reason: Schema.NullOr<Schema.Literal<["condition-not-met", "evidence-unavailable", "source-unavailable", "redacted", "evaluator-failed", "producer-interrupted", "invalid-subject", "coverage-not-applicable"]>>;
|
|
329
|
+
gate: Schema.Literal<["not-gate", "satisfied", "failed", "unavailable", "not-applicable"]>;
|
|
330
|
+
}>;
|
|
331
|
+
policy: Schema.Struct<{
|
|
332
|
+
requirement: Schema.Union<[Schema.Struct<{
|
|
333
|
+
state: Schema.Literal<["available"]>;
|
|
334
|
+
value: Schema.Literal<["required", "optional"]>;
|
|
335
|
+
}>, Schema.Struct<{
|
|
336
|
+
state: Schema.Literal<["unavailable"]>;
|
|
337
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
338
|
+
}>]>;
|
|
339
|
+
condition: Schema.Union<[Schema.Struct<{
|
|
340
|
+
state: Schema.Literal<["available"]>;
|
|
341
|
+
value: Schema.Union<[Schema.Struct<{
|
|
342
|
+
kind: Schema.Literal<["boolean"]>;
|
|
343
|
+
expected: Schema.Literal<[true]>;
|
|
344
|
+
}>, Schema.Struct<{
|
|
345
|
+
kind: Schema.Literal<["at-least"]>;
|
|
346
|
+
threshold: Schema.filter<typeof Schema.JsonNumber>;
|
|
347
|
+
}>, Schema.Struct<{
|
|
348
|
+
kind: Schema.Literal<["record-only"]>;
|
|
349
|
+
}>]>;
|
|
350
|
+
}>, Schema.Struct<{
|
|
351
|
+
state: Schema.Literal<["unavailable"]>;
|
|
352
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
353
|
+
}>]>;
|
|
354
|
+
}>;
|
|
355
|
+
contribution: Schema.Union<[Schema.Schema<NoScoreContribution, NoScoreContribution, never>, Schema.Schema<EarnedScoreContribution, EarnedScoreContribution, never>, Schema.Schema<UnavailableScoreContribution, UnavailableScoreContribution, never>]>;
|
|
356
|
+
explanationRetention: Schema.Union<[Schema.Struct<{
|
|
357
|
+
state: Schema.Literal<["retained"]>;
|
|
358
|
+
value: Schema.Schema<AssertionFactValue, AssertionFactValue, never>;
|
|
124
359
|
}>, Schema.Struct<{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
sha256: Schema.Schema<import("../../record/model/identifiers.js").Sha256Digest, string, never>;
|
|
130
|
-
preview: Schema.filter<typeof Schema.String>;
|
|
131
|
-
}>]>>;
|
|
132
|
-
coverage: Schema.Schema<AssertionCoverage, AssertionCoverage, never>;
|
|
133
|
-
limitations: Schema.Array$<Schema.Schema<AssertionLimitation, AssertionLimitation, never>>;
|
|
134
|
-
result: Schema.Schema<SealedAssertionResult, SealedAssertionResult, never>;
|
|
135
|
-
}>>>>;
|
|
360
|
+
state: Schema.Literal<["unavailable"]>;
|
|
361
|
+
reason: Schema.Literal<["not-recorded"]>;
|
|
362
|
+
}>]>;
|
|
363
|
+
}>>>;
|
|
136
364
|
}>>>;
|
|
137
365
|
}>;
|
|
138
366
|
export interface AssertionsRecordCodecError {
|
|
@@ -71,4 +71,6 @@ const __niceevalExport33 = __niceevalCanonical["projectAssertionsDocument"];
|
|
|
71
71
|
export { __niceevalExport33 as projectAssertionsDocument };
|
|
72
72
|
const __niceevalExport34 = __niceevalCanonical["projectFileChangesAttachment"];
|
|
73
73
|
export { __niceevalExport34 as projectFileChangesAttachment };
|
|
74
|
+
const __niceevalExport35 = __niceevalCanonical["sealedAssertionResult"];
|
|
75
|
+
export { __niceevalExport35 as sealedAssertionResult };
|
|
74
76
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ASSERTION_ENTRY_ID_BRAND = void 0;
|
|
4
|
+
exports.sealedAssertionResult = sealedAssertionResult;
|
|
4
5
|
/**
|
|
5
6
|
* `entryId` is only stable inside one Assertions Attachment. It is not an
|
|
6
7
|
* authoring key and deliberately has no cross-Attempt meaning.
|
|
7
8
|
*/
|
|
8
9
|
var identity_ts_1 = require("../identity.cjs");
|
|
9
10
|
Object.defineProperty(exports, "ASSERTION_ENTRY_ID_BRAND", { enumerable: true, get: function () { return identity_ts_1.ASSERTION_ENTRY_ID_BRAND; } });
|
|
11
|
+
function sealedAssertionResult(entry) {
|
|
12
|
+
const receipt = entry.evaluation.receipt === undefined ? {} : { receipt: entry.evaluation.receipt };
|
|
13
|
+
switch (entry.decision.result) {
|
|
14
|
+
case "matched":
|
|
15
|
+
return Object.freeze({ state: "matched", gate: entry.decision.gate, score: entry.contribution, ...receipt });
|
|
16
|
+
case "mismatched":
|
|
17
|
+
return Object.freeze({ state: "mismatched", reason: "condition-not-met", gate: entry.decision.gate, score: entry.contribution, ...receipt });
|
|
18
|
+
case "unavailable":
|
|
19
|
+
return Object.freeze({ state: "unavailable", reason: entry.decision.reason, gate: entry.decision.gate, score: entry.contribution, ...receipt });
|
|
20
|
+
case "errored":
|
|
21
|
+
return Object.freeze({ state: "errored", reason: entry.decision.reason, gate: entry.decision.gate, score: entry.contribution, ...receipt });
|
|
22
|
+
case "not-applicable":
|
|
23
|
+
return Object.freeze({ state: "not-applicable", reason: "coverage-not-applicable", gate: entry.decision.gate, score: entry.contribution, ...receipt });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
10
26
|
//# sourceMappingURL=model.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,8CAA2D;AAAlD,uHAAA,wBAAwB,OAAA","sourcesContent":["import type { AssertionEntryId } from \"../identity.ts\";\nimport type { Sha256Digest } from \"../../record/model/identifiers.ts\";\n/**\n * `entryId` is only stable inside one Assertions Attachment. It is not an\n * authoring key and deliberately has no cross-Attempt meaning.\n */\nexport { ASSERTION_ENTRY_ID_BRAND, } from \"../identity.ts\";\nexport type { AssertionEntryId } from \"../identity.ts\";\nexport type BoundedJsonPrimitive = null | boolean | number | string;\nexport interface BoundedJsonObject {\n readonly [key: string]: BoundedJsonValue;\n}\n/** JSON-only material that is bounded by the Assertions v1 decoder. */\nexport type BoundedJsonValue = BoundedJsonPrimitive | readonly BoundedJsonValue[] | BoundedJsonObject;\nexport interface AssertionDisplay {\n readonly key?: string;\n readonly label?: string;\n readonly groupPath: readonly string[];\n}\n/** The outer builtin shape deliberately preserves an unknown future id. */\nexport interface BuiltInCriterionEnvelope {\n readonly kind: \"builtin\";\n readonly id: string;\n readonly data: BoundedJsonValue;\n}\n/** Third-party data is exact JSON owned by the named third-party schema. */\nexport interface ThirdPartyCriterion {\n readonly name: string;\n readonly schemaId: string;\n readonly data: BoundedJsonValue;\n}\n/** Raw identity envelope used by the reader's second decode phase. */\nexport type CriterionEnvelope = BuiltInCriterionEnvelope | ThirdPartyCriterion;\nexport type CriterionOuterEnvelope = CriterionEnvelope;\nexport type BuiltInCriterion = {\n readonly kind: \"builtin\";\n readonly id: \"value-match/v1\";\n readonly data: {\n readonly subject: \"explicit-value\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"scope-status/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly assertion: \"succeeded\" | \"no-failed-actions\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"occurrence/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly occurrence: \"tool\" | \"skill\" | \"event\";\n readonly assertion: \"present\" | \"absent\" | \"count\";\n /** Tool assertions retain the single managed matcher identity. */\n readonly matcher?: string;\n readonly quantifier?: {\n readonly kind: \"absent\";\n } | {\n readonly kind: \"at-least\" | \"exact\";\n readonly count: number;\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"judge-measurement/v1\";\n readonly data: {\n readonly recipe: \"closed-qa\" | \"factuality\" | \"summarizes\";\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"changed-paths\";\n readonly paths: readonly string[];\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"no-changes\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-changed\";\n readonly path: string;\n readonly status?: \"added\" | \"modified\" | \"deleted\";\n /** Persisted display identity only; evaluators retain the managed Match. */\n readonly before?: string;\n readonly after?: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-deleted\";\n readonly path: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"not-in-diff\";\n readonly pattern: string;\n readonly flags: string;\n readonly content: \"added\" | \"removed\" | \"both\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"direct-score/v1\";\n readonly data: {\n readonly source: \"author\";\n };\n};\n/** A v1 writer may only emit a known builtin or a versioned third-party schema. */\nexport type WritableCriterionEnvelope = BuiltInCriterion | ThirdPartyCriterion;\nexport type AssertionMaterial<BlobRef> = {\n readonly kind: \"snapshot\";\n readonly value: BoundedJsonValue;\n} | {\n readonly kind: \"blob\";\n readonly ref: BlobRef;\n readonly encoding: \"utf-8\" | \"binary\";\n readonly byteLength: number;\n /** SHA-256 of the exact retained blob bytes. */\n readonly sha256: Sha256Digest;\n readonly preview: string;\n};\nexport type AssertionCoverage = {\n readonly state: \"complete\";\n} | {\n readonly state: \"partial\";\n readonly reason: \"sampled\" | \"truncated\" | \"redacted\" | \"provider-limited\";\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-collected\" | \"source-unavailable\" | \"producer-failed\";\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"optional-material\" | \"unsupported-subject\";\n};\nexport type AssertionLimitation = {\n readonly kind: \"redacted\";\n readonly fieldCount: number;\n} | {\n readonly kind: \"sampled\";\n readonly captured: number;\n readonly knownTotal?: number;\n} | {\n readonly kind: \"truncated\";\n readonly omittedBytes: number;\n} | {\n readonly kind: \"provider-limited\";\n};\nexport type GateDisposition = \"not-gate\" | \"satisfied\" | \"failed\" | \"unavailable\" | \"not-applicable\";\nexport interface NoScoreContribution {\n readonly state: \"not-scored\";\n}\nexport interface EarnedScoreContribution {\n readonly state: \"earned\";\n readonly points: number;\n readonly earned: number;\n}\nexport interface UnavailableScoreContribution {\n readonly state: \"unavailable\";\n readonly points: number;\n readonly reason: \"source-unavailable\" | \"evaluation-errored\" | \"not-applicable\";\n}\nexport type ScoreContribution = NoScoreContribution | EarnedScoreContribution | UnavailableScoreContribution;\nexport type SealedAssertionResult = {\n readonly state: \"matched\";\n readonly gate: \"not-gate\" | \"satisfied\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n /** Bounded evaluator diagnostics, including ToolMatch evidence paths. */\n readonly diagnostic?: BoundedJsonObject;\n} | {\n readonly state: \"mismatched\";\n readonly reason: \"condition-not-met\";\n readonly gate: \"not-gate\" | \"failed\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n} | {\n readonly state: \"errored\";\n readonly reason: \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"coverage-not-applicable\";\n readonly gate: \"not-gate\" | \"not-applicable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n};\n/** The exact v1 value that a producer is allowed to seal. */\nexport interface AssertionEntry<BlobRef> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: WritableCriterionEnvelope;\n readonly subject: AssertionMaterial<BlobRef>;\n readonly evidence: readonly AssertionMaterial<BlobRef>[];\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n readonly result: SealedAssertionResult;\n}\n/**\n * Reader framing intentionally leaves `criterion` as bounded JSON. This\n * lets a bad plugin or future criterion affect its entry only after every\n * other entry boundary has already been verified.\n */\nexport interface AssertionEntryOuter<BlobRef> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: BoundedJsonObject;\n readonly subject: AssertionMaterial<BlobRef>;\n readonly evidence: readonly AssertionMaterial<BlobRef>[];\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n readonly result: SealedAssertionResult;\n}\nexport interface AssertionsDocument<BlobRef> {\n readonly entries: readonly AssertionEntry<BlobRef>[];\n}\nexport interface AssertionsDocumentOuter<BlobRef> {\n readonly entries: readonly AssertionEntryOuter<BlobRef>[];\n}\nexport type AssertionEntryRead<BlobRef> = {\n readonly state: \"available\";\n readonly entry: AssertionEntry<BlobRef>;\n} | {\n readonly state: \"unsupported\";\n readonly entry: AssertionEntryOuter<BlobRef>;\n readonly reason: \"builtin-unknown\" | \"third-party-schema-unavailable\";\n} | {\n readonly state: \"invalid\";\n readonly entry: AssertionEntryOuter<BlobRef>;\n readonly reason: \"criterion-envelope-invalid\" | \"criterion-data-invalid\";\n};\nexport interface AssertionsProjection<BlobRef> {\n readonly entries: readonly AssertionEntryRead<BlobRef>[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["model.ts"],"names":[],"mappings":";;;AA2SA,sDAcC;AAvTD;;;GAGG;AACH,8CAA2D;AAAlD,uHAAA,wBAAwB,OAAA;AAqSjC,SAAgB,qBAAqB,CAAC,KAAgF;IAClH,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IACpG,QAAQ,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QAC5B,KAAK,SAAS;YACV,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAgC,EAAE,KAAK,EAAE,KAAK,CAAC,YAA6D,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAC9L,KAAK,YAAY;YACb,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAA6B,EAAE,KAAK,EAAE,KAAK,CAAC,YAA6D,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAC3N,KAAK,aAAa;YACd,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAoE,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAkC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAkE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACtS,KAAK,SAAS;YACV,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAyE,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAkC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAkE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QACvS,KAAK,gBAAgB;YACjB,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,yBAAyB,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,IAAqC,EAAE,KAAK,EAAE,KAAK,CAAC,YAAkE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtP,CAAC;AACL,CAAC","sourcesContent":["import type { AssertionEntryId } from \"../identity.ts\";\nimport type { Sha256Digest } from \"../../record/model/identifiers.ts\";\n/**\n * `entryId` is only stable inside one Assertions Attachment. It is not an\n * authoring key and deliberately has no cross-Attempt meaning.\n */\nexport { ASSERTION_ENTRY_ID_BRAND, } from \"../identity.ts\";\nexport type { AssertionEntryId } from \"../identity.ts\";\nexport type BoundedJsonPrimitive = null | boolean | number | string;\nexport interface BoundedJsonObject {\n readonly [key: string]: BoundedJsonValue;\n}\n/** JSON-only material that is bounded by the Assertions v1 decoder. */\nexport type BoundedJsonValue = BoundedJsonPrimitive | readonly BoundedJsonValue[] | BoundedJsonObject;\nexport interface AssertionDisplay {\n readonly key?: string;\n readonly label?: string;\n readonly groupPath: readonly string[];\n}\nexport type AssertionFactValue = {\n readonly kind: \"unavailable\";\n readonly reason: \"not-recorded\" | \"not-declared\" | \"source-unavailable\";\n} | {\n readonly kind: \"value\";\n readonly value: BoundedJsonPrimitive;\n} | {\n readonly kind: \"text\";\n readonly text: string;\n} | {\n readonly kind: \"list\";\n readonly items: readonly AssertionFactValue[];\n} | {\n readonly kind: \"fields\";\n readonly fields: readonly AssertionFactField[];\n};\nexport interface AssertionFactField {\n readonly label: string;\n readonly value: AssertionFactValue;\n}\nexport interface AssertionDecisionPolicy {\n readonly requirement: {\n readonly state: \"available\";\n readonly value: \"required\" | \"optional\";\n } | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n };\n readonly condition: {\n readonly state: \"available\";\n readonly value: {\n readonly kind: \"boolean\";\n readonly expected: true;\n } | {\n readonly kind: \"at-least\";\n readonly threshold: number;\n } | {\n readonly kind: \"record-only\";\n };\n } | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n };\n}\n/** The outer builtin shape deliberately preserves an unknown future id. */\nexport interface BuiltInCriterionEnvelope {\n readonly kind: \"builtin\";\n readonly id: string;\n readonly data: BoundedJsonValue;\n}\n/** Third-party data is exact JSON owned by the named third-party schema. */\nexport interface ThirdPartyCriterion {\n readonly name: string;\n readonly schemaId: string;\n readonly data: BoundedJsonValue;\n}\n/** Raw identity envelope used by the reader's second decode phase. */\nexport type CriterionEnvelope = BuiltInCriterionEnvelope | ThirdPartyCriterion;\nexport type CriterionOuterEnvelope = CriterionEnvelope;\nexport type BuiltInCriterion = {\n readonly kind: \"builtin\";\n readonly id: \"value-match/v1\";\n readonly data: {\n readonly subject: \"explicit-value\";\n readonly matcher: {\n readonly state: \"declared\";\n readonly name: string;\n } | {\n readonly state: \"unavailable\";\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"scope-status/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly assertion: \"succeeded\" | \"no-failed-actions\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"occurrence/v1\";\n readonly data: {\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly occurrence: \"tool\" | \"skill\" | \"event\";\n readonly assertion: \"present\" | \"absent\" | \"count\";\n /** Tool assertions retain the single managed matcher identity. */\n readonly matcher?: string;\n readonly quantifier?: {\n readonly kind: \"absent\";\n } | {\n readonly kind: \"at-least\" | \"exact\";\n readonly count: number;\n };\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"judge-measurement/v1\";\n readonly data: {\n readonly recipe: \"closed-qa\" | \"factuality\" | \"summarizes\";\n readonly scale: \"unit-interval\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"changed-paths\";\n readonly paths: readonly string[];\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"no-changes\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-changed\";\n readonly path: string;\n readonly status?: \"added\" | \"modified\" | \"deleted\";\n /** Persisted display identity only; evaluators retain the managed Match. */\n readonly before?: string;\n readonly after?: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"file-deleted\";\n readonly path: string;\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"sandbox-result/v1\";\n readonly data: {\n readonly operation: \"not-in-diff\";\n readonly pattern: string;\n readonly flags: string;\n readonly content: \"added\" | \"removed\" | \"both\";\n };\n} | {\n readonly kind: \"builtin\";\n readonly id: \"direct-score/v1\";\n readonly data: {\n readonly source: \"author\";\n };\n};\n/** A v1 writer may only emit a known builtin or a versioned third-party schema. */\nexport type WritableCriterionEnvelope = BuiltInCriterion | ThirdPartyCriterion;\nexport type AssertionMaterial<BlobRef> = {\n readonly kind: \"unavailable\";\n readonly reason: \"not-recorded\";\n} | {\n readonly kind: \"snapshot\";\n readonly value: BoundedJsonValue;\n} | {\n readonly kind: \"blob\";\n readonly ref: BlobRef;\n readonly encoding: \"utf-8\" | \"binary\";\n readonly byteLength: number;\n /** SHA-256 of the exact retained blob bytes. */\n readonly sha256: Sha256Digest;\n readonly preview: string;\n};\nexport type AssertionCoverage = {\n readonly state: \"complete\";\n} | {\n readonly state: \"partial\";\n readonly reason: \"sampled\" | \"truncated\" | \"redacted\" | \"provider-limited\";\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-collected\" | \"source-unavailable\" | \"producer-failed\";\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"optional-material\" | \"unsupported-subject\";\n};\nexport type AssertionLimitation = {\n readonly kind: \"redacted\";\n readonly fieldCount: number;\n} | {\n readonly kind: \"sampled\";\n readonly captured: number;\n readonly knownTotal?: number;\n} | {\n readonly kind: \"truncated\";\n readonly omittedBytes: number;\n} | {\n readonly kind: \"provider-limited\";\n};\nexport type GateDisposition = \"not-gate\" | \"satisfied\" | \"failed\" | \"unavailable\" | \"not-applicable\";\nexport interface NoScoreContribution {\n readonly state: \"not-scored\";\n}\nexport interface EarnedScoreContribution {\n readonly state: \"earned\";\n readonly points: number;\n readonly earned: number;\n}\nexport interface UnavailableScoreContribution {\n readonly state: \"unavailable\";\n readonly points: number;\n readonly reason: \"source-unavailable\" | \"evaluation-errored\" | \"not-applicable\";\n}\nexport type ScoreContribution = NoScoreContribution | EarnedScoreContribution | UnavailableScoreContribution;\nexport interface AssertionCollectionReceipt {\n readonly examined: number;\n readonly matched: number;\n readonly mismatched: number;\n readonly unavailable: number;\n readonly knownTotal: number | null;\n readonly complete: boolean;\n readonly exhaustive: boolean;\n readonly decisive: boolean;\n}\nexport type SealedAssertionResult = {\n readonly state: \"matched\";\n readonly gate: \"not-gate\" | \"satisfied\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n /** Bounded evaluator diagnostics, including ToolMatch evidence paths. */\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"mismatched\";\n readonly reason: \"condition-not-met\";\n readonly gate: \"not-gate\" | \"failed\";\n readonly score: NoScoreContribution | EarnedScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"errored\";\n readonly reason: \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\";\n readonly gate: \"not-gate\" | \"unavailable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n} | {\n readonly state: \"not-applicable\";\n readonly reason: \"coverage-not-applicable\";\n readonly gate: \"not-gate\" | \"not-applicable\";\n readonly score: NoScoreContribution | UnavailableScoreContribution;\n readonly diagnostic?: BoundedJsonObject;\n readonly receipt?: AssertionCollectionReceipt;\n};\nexport type AssertionCriterionRecord = {\n readonly state: \"available\";\n readonly value: WritableCriterionEnvelope;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\nexport type AssertionCriterionRecordOuter = {\n readonly state: \"available\";\n readonly value: BoundedJsonObject;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\nexport interface AssertionMaterials<BlobRef> {\n readonly source: AssertionMaterial<BlobRef>;\n readonly evidence: readonly AssertionMaterial<BlobRef>[];\n readonly coverage: AssertionCoverage;\n readonly limitations: readonly AssertionLimitation[];\n}\nexport interface AssertionEvaluation {\n readonly observed: AssertionFactValue;\n readonly receipt?: AssertionCollectionReceipt;\n}\nexport interface AssertionDecision {\n readonly result: \"matched\" | \"mismatched\" | \"unavailable\" | \"errored\" | \"not-applicable\";\n readonly reason: \"condition-not-met\" | \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\" | \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\" | \"coverage-not-applicable\" | null;\n readonly gate: GateDisposition;\n}\nexport function sealedAssertionResult(entry: Pick<AssertionEntry<unknown>, \"decision\" | \"contribution\" | \"evaluation\">): SealedAssertionResult {\n const receipt = entry.evaluation.receipt === undefined ? {} : { receipt: entry.evaluation.receipt };\n switch (entry.decision.result) {\n case \"matched\":\n return Object.freeze({ state: \"matched\", gate: entry.decision.gate as \"not-gate\" | \"satisfied\", score: entry.contribution as NoScoreContribution | EarnedScoreContribution, ...receipt });\n case \"mismatched\":\n return Object.freeze({ state: \"mismatched\", reason: \"condition-not-met\", gate: entry.decision.gate as \"not-gate\" | \"failed\", score: entry.contribution as NoScoreContribution | EarnedScoreContribution, ...receipt });\n case \"unavailable\":\n return Object.freeze({ state: \"unavailable\", reason: entry.decision.reason as \"evidence-unavailable\" | \"source-unavailable\" | \"redacted\", gate: entry.decision.gate as \"not-gate\" | \"unavailable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n case \"errored\":\n return Object.freeze({ state: \"errored\", reason: entry.decision.reason as \"evaluator-failed\" | \"producer-interrupted\" | \"invalid-subject\", gate: entry.decision.gate as \"not-gate\" | \"unavailable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n case \"not-applicable\":\n return Object.freeze({ state: \"not-applicable\", reason: \"coverage-not-applicable\", gate: entry.decision.gate as \"not-gate\" | \"not-applicable\", score: entry.contribution as NoScoreContribution | UnavailableScoreContribution, ...receipt });\n }\n}\nexport type ExplanationRetention = {\n readonly state: \"retained\";\n readonly value: AssertionFactValue;\n} | {\n readonly state: \"unavailable\";\n readonly reason: \"not-recorded\";\n};\n/** The sole current semantic entry. Each fact has exactly one durable owner. */\nexport interface AssertionEntry<BlobRef> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: AssertionCriterionRecord;\n readonly materials: AssertionMaterials<BlobRef>;\n readonly evaluation: AssertionEvaluation;\n readonly decision: AssertionDecision;\n readonly policy: AssertionDecisionPolicy;\n readonly contribution: ScoreContribution;\n readonly explanationRetention: ExplanationRetention;\n}\n/**\n * Reader framing intentionally leaves `criterion` as bounded JSON. This\n * lets a bad plugin or future criterion affect its entry only after every\n * other entry boundary has already been verified.\n */\nexport interface AssertionEntryOuter<BlobRef> {\n readonly entryId: AssertionEntryId;\n readonly display: AssertionDisplay;\n readonly criterion: AssertionCriterionRecordOuter;\n readonly materials: AssertionMaterials<BlobRef>;\n readonly evaluation: AssertionEvaluation;\n readonly decision: AssertionDecision;\n readonly policy: AssertionDecisionPolicy;\n readonly contribution: ScoreContribution;\n readonly explanationRetention: ExplanationRetention;\n}\nexport interface AssertionsDocument<BlobRef> {\n readonly entries: readonly AssertionEntry<BlobRef>[];\n}\nexport interface AssertionsDocumentOuter<BlobRef> {\n readonly entries: readonly AssertionEntryOuter<BlobRef>[];\n}\nexport type AssertionEntryRead<BlobRef> = {\n readonly state: \"available\";\n readonly entry: AssertionEntry<BlobRef>;\n} | {\n readonly state: \"unsupported\";\n readonly entry: AssertionEntryOuter<BlobRef>;\n readonly reason: \"builtin-unknown\" | \"third-party-schema-unavailable\";\n} | {\n readonly state: \"invalid\";\n readonly entry: AssertionEntryOuter<BlobRef>;\n readonly reason: \"criterion-envelope-invalid\" | \"criterion-data-invalid\";\n};\nexport interface AssertionsProjection<BlobRef> {\n readonly entries: readonly AssertionEntryRead<BlobRef>[];\n}\n"]}
|