niceeval 0.15.1-canary.76 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INDEX.md +45 -40
- package/dist/adapter-execution-trace.cjs.map +1 -1
- package/dist/adapter-execution-trace.d.cts +26 -0
- package/dist/adapter-execution-trace.d.mts +26 -0
- package/dist/adapter-execution-trace.d.ts +26 -0
- package/dist/adapter-usage.cjs.map +1 -1
- package/dist/adapter-usage.d.cts +9 -0
- package/dist/adapter-usage.d.mts +9 -0
- package/dist/adapter-usage.d.ts +9 -0
- package/dist/adapter.cjs +19 -4
- package/dist/adapter.cjs.map +1 -1
- package/dist/adapter.d.cts +37 -12
- package/dist/adapter.d.mts +37 -12
- package/dist/adapter.d.ts +37 -12
- package/dist/agents/ai-sdk.cjs +3 -0
- package/dist/agents/ai-sdk.cjs.map +1 -1
- package/dist/agents/bub.cjs +3 -0
- package/dist/agents/bub.cjs.map +1 -1
- package/dist/agents/claude-code-native.cjs +28 -2
- package/dist/agents/claude-code-native.cjs.map +1 -1
- package/dist/agents/claude-code.cjs +3 -0
- package/dist/agents/claude-code.cjs.map +1 -1
- package/dist/agents/codex.cjs +3 -0
- package/dist/agents/codex.cjs.map +1 -1
- package/dist/agents/coding-cli-versions.cjs +9 -10
- package/dist/agents/coding-cli-versions.cjs.map +1 -1
- package/dist/agents/coding-cli-versions.d.cts +1 -1
- package/dist/agents/coding-cli-versions.d.mts +1 -1
- package/dist/agents/coding-cli-versions.d.ts +1 -1
- package/dist/agents/deepseek-harness.cjs +3 -0
- package/dist/agents/deepseek-harness.cjs.map +1 -1
- package/dist/agents/hermes.cjs +3 -0
- package/dist/agents/hermes.cjs.map +1 -1
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +3 -2
- package/dist/agents/index.d.mts +3 -2
- package/dist/agents/index.d.ts +3 -2
- package/dist/agents/omp.cjs +3 -0
- package/dist/agents/omp.cjs.map +1 -1
- package/dist/agents/openai-compat.cjs +6 -0
- package/dist/agents/openai-compat.cjs.map +1 -1
- package/dist/agents/openclaw.cjs +3 -0
- package/dist/agents/openclaw.cjs.map +1 -1
- package/dist/agents/opencode.cjs +3 -0
- package/dist/agents/opencode.cjs.map +1 -1
- package/dist/agents/sdk-streams.cjs +9 -0
- package/dist/agents/sdk-streams.cjs.map +1 -1
- package/dist/agents/ui-message-stream.cjs +3 -0
- package/dist/agents/ui-message-stream.cjs.map +1 -1
- package/dist/assertions/api.cjs.map +1 -1
- package/dist/assertions/api.d.cts +27 -5
- package/dist/assertions/api.d.mts +27 -5
- package/dist/assertions/api.d.ts +27 -5
- package/dist/assertions/collection.cjs +6 -0
- package/dist/assertions/collection.cjs.map +1 -1
- package/dist/assertions/collection.d.cts +4 -2
- package/dist/assertions/collection.d.mts +4 -2
- package/dist/assertions/collection.d.ts +4 -2
- package/dist/assertions/collection.js +12 -8
- package/dist/assertions/context-match.cjs +70 -0
- package/dist/assertions/context-match.cjs.map +1 -0
- package/dist/assertions/context-match.d.cts +107 -0
- package/dist/assertions/context-match.d.mts +107 -0
- package/dist/assertions/context-match.d.ts +107 -0
- package/dist/assertions/context-match.js +12 -0
- package/dist/assertions/context-match.js.map +1 -0
- package/dist/assertions/full-content.cjs +109 -0
- package/dist/assertions/full-content.cjs.map +1 -0
- package/dist/assertions/full-content.d.cts +6 -0
- package/dist/assertions/full-content.d.mts +6 -0
- package/dist/assertions/full-content.d.ts +6 -0
- package/dist/assertions/full-content.js +12 -0
- package/dist/assertions/full-content.js.map +1 -0
- package/dist/assertions/judge-presets.cjs +2 -34
- package/dist/assertions/judge-presets.cjs.map +1 -1
- package/dist/assertions/judge-presets.d.cts +6 -9
- package/dist/assertions/judge-presets.d.mts +6 -9
- package/dist/assertions/judge-presets.d.ts +6 -9
- package/dist/assertions/judge-presets.js +8 -8
- package/dist/assertions/judge.cjs +107 -29
- package/dist/assertions/judge.cjs.map +1 -1
- package/dist/assertions/judge.d.cts +2 -0
- package/dist/assertions/judge.d.mts +2 -0
- package/dist/assertions/judge.d.ts +2 -0
- package/dist/assertions/match.cjs +244 -5
- package/dist/assertions/match.cjs.map +1 -1
- package/dist/assertions/match.d.cts +43 -3
- package/dist/assertions/match.d.mts +43 -3
- package/dist/assertions/match.d.ts +43 -3
- package/dist/assertions/match.js +88 -78
- package/dist/assertions/material.cjs +520 -0
- package/dist/assertions/material.cjs.map +1 -0
- package/dist/assertions/material.d.cts +56 -0
- package/dist/assertions/material.d.mts +56 -0
- package/dist/assertions/material.d.ts +56 -0
- package/dist/assertions/material.js +20 -0
- package/dist/assertions/material.js.map +1 -0
- package/dist/assertions/record/attachment.cjs +5 -2
- package/dist/assertions/record/attachment.cjs.map +1 -1
- package/dist/assertions/record/codec.cjs +2 -1
- package/dist/assertions/record/codec.cjs.map +1 -1
- package/dist/assertions/record/model.cjs.map +1 -1
- package/dist/assertions/record/model.d.cts +6 -1
- package/dist/assertions/record/model.d.mts +6 -1
- package/dist/assertions/record/model.d.ts +6 -1
- package/dist/assertions/runtime.cjs +207 -14
- package/dist/assertions/runtime.cjs.map +1 -1
- package/dist/assertions/runtime.d.cts +9 -0
- package/dist/assertions/runtime.d.mts +9 -0
- package/dist/assertions/runtime.d.ts +9 -0
- package/dist/assertions/runtime.js +14 -8
- package/dist/assertions/score-match-audit.cjs +18 -8
- package/dist/assertions/score-match-audit.cjs.map +1 -1
- package/dist/assertions/score-match-gateway.cjs +83 -25
- package/dist/assertions/score-match-gateway.cjs.map +1 -1
- package/dist/assertions/score-match-gateway.d.cts +2 -0
- package/dist/assertions/score-match-gateway.d.mts +2 -0
- package/dist/assertions/score-match-gateway.d.ts +2 -0
- package/dist/assertions/value-composition.test-d.cjs +77 -0
- package/dist/assertions/value-composition.test-d.cjs.map +1 -0
- package/dist/assertions/value-composition.test-d.d.cts +1 -0
- package/dist/assertions/value-composition.test-d.d.mts +1 -0
- package/dist/assertions/value-composition.test-d.d.ts +1 -0
- package/dist/assertions/value-composition.test-d.js +4 -0
- package/dist/assertions/value-composition.test-d.js.map +1 -0
- package/dist/context/assert-first.cjs +207 -213
- package/dist/context/assert-first.cjs.map +1 -1
- package/dist/context/assert-first.d.cts +49 -23
- package/dist/context/assert-first.d.mts +49 -23
- package/dist/context/assert-first.d.ts +49 -23
- package/dist/context/session.cjs +111 -9
- package/dist/context/session.cjs.map +1 -1
- package/dist/context/session.d.cts +18 -0
- package/dist/context/session.d.mts +18 -0
- package/dist/context/session.d.ts +18 -0
- package/dist/define.cjs +17 -1
- package/dist/define.cjs.map +1 -1
- package/dist/eval/cli/contribution.cjs +2 -0
- package/dist/eval/cli/contribution.cjs.map +1 -1
- package/dist/eval/host/index.cjs +2 -0
- package/dist/eval/host/index.cjs.map +1 -1
- package/dist/eval/record/evaluation.cjs +3 -0
- package/dist/eval/record/evaluation.cjs.map +1 -1
- package/dist/eval/record/membership-provenance.d.cts +15 -15
- package/dist/eval/record/membership-provenance.d.mts +15 -15
- package/dist/eval/record/membership-provenance.d.ts +15 -15
- package/dist/eval/record/score.cjs +7 -0
- package/dist/eval/record/score.cjs.map +1 -1
- package/dist/eval/record/sealed-assertion.cjs +3 -0
- package/dist/eval/record/sealed-assertion.cjs.map +1 -1
- package/dist/eval/record/verdict.cjs +7 -0
- package/dist/eval/record/verdict.cjs.map +1 -1
- package/dist/expect/index.cjs +8 -2
- package/dist/expect/index.cjs.map +1 -1
- package/dist/expect/index.d.cts +9 -4
- package/dist/expect/index.d.mts +9 -4
- package/dist/expect/index.d.ts +9 -4
- package/dist/expect/index.js +72 -62
- package/dist/expect/index.mjs +72 -62
- package/dist/experiment/host/cli/contribution.cjs +37 -23
- package/dist/experiment/host/cli/contribution.cjs.map +1 -1
- package/dist/experiment/host/cli/contribution.d.cts +9 -1
- package/dist/experiment/host/cli/contribution.d.mts +9 -1
- package/dist/experiment/host/cli/contribution.d.ts +9 -1
- package/dist/experiment/host/current.cjs +74 -0
- package/dist/experiment/host/current.cjs.map +1 -0
- package/dist/experiment/host/current.d.cts +33 -0
- package/dist/experiment/host/current.d.mts +33 -0
- package/dist/experiment/host/current.d.ts +33 -0
- package/dist/experiment/host/current.js +10 -0
- package/dist/experiment/host/current.js.map +1 -0
- package/dist/experiment/host/index.cjs +17 -174
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/experiment/host/index.d.cts +8 -54
- package/dist/experiment/host/index.d.mts +8 -54
- package/dist/experiment/host/index.d.ts +8 -54
- package/dist/experiment/host/operations.cjs +33 -10
- package/dist/experiment/host/operations.cjs.map +1 -1
- package/dist/experiment/host/operations.d.cts +29 -1
- package/dist/experiment/host/operations.d.mts +29 -1
- package/dist/experiment/host/operations.d.ts +29 -1
- package/dist/experiment/host/operations.js +6 -4
- package/dist/experiment/host/requirements.cjs +3 -0
- package/dist/experiment/host/requirements.cjs.map +1 -0
- package/dist/experiment/host/requirements.d.cts +3 -0
- package/dist/experiment/host/requirements.d.mts +3 -0
- package/dist/experiment/host/requirements.d.ts +3 -0
- package/dist/experiment/host/requirements.js +4 -0
- package/dist/experiment/host/requirements.js.map +1 -0
- package/dist/experiment/host/runtime.cjs +179 -0
- package/dist/experiment/host/runtime.cjs.map +1 -0
- package/dist/experiment/host/runtime.d.cts +79 -0
- package/dist/experiment/host/runtime.d.mts +79 -0
- package/dist/experiment/host/runtime.d.ts +79 -0
- package/dist/experiment/host/runtime.js +6 -0
- package/dist/experiment/host/runtime.js.map +1 -0
- package/dist/experiment/host/types.cjs.map +1 -1
- package/dist/experiment/host/types.d.cts +17 -16
- package/dist/experiment/host/types.d.mts +17 -16
- package/dist/experiment/host/types.d.ts +17 -16
- package/dist/fresh-import.cjs +2 -1
- package/dist/fresh-import.cjs.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -6
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +32 -30
- package/dist/index.mjs +32 -30
- package/dist/inspection/artifacts.cjs +83 -54
- package/dist/inspection/artifacts.cjs.map +1 -1
- package/dist/inspection/artifacts.d.cts +8 -0
- package/dist/inspection/artifacts.d.mts +8 -0
- package/dist/inspection/artifacts.d.ts +8 -0
- package/dist/inspection/artifacts.js +2 -0
- package/dist/inspection/assertions.cjs +4 -1
- package/dist/inspection/assertions.cjs.map +1 -1
- package/dist/inspection/cli/contribution.cjs +27 -4
- package/dist/inspection/cli/contribution.cjs.map +1 -1
- package/dist/inspection/cli/contribution.d.cts +2 -1
- package/dist/inspection/cli/contribution.d.mts +2 -1
- package/dist/inspection/cli/contribution.d.ts +2 -1
- package/dist/inspection/execution-traces.cjs +114 -8
- package/dist/inspection/execution-traces.cjs.map +1 -1
- package/dist/inspection/execution-traces.d.cts +38 -0
- package/dist/inspection/execution-traces.d.mts +38 -0
- package/dist/inspection/execution-traces.d.ts +38 -0
- package/dist/inspection/facts.cjs +12 -0
- package/dist/inspection/facts.cjs.map +1 -1
- package/dist/inspection/limits.cjs +5 -1
- package/dist/inspection/limits.cjs.map +1 -1
- package/dist/inspection/limits.d.cts +4 -0
- package/dist/inspection/limits.d.mts +4 -0
- package/dist/inspection/limits.d.ts +4 -0
- package/dist/inspection/limits.js +6 -2
- package/dist/inspection/overview.cjs +74 -33
- package/dist/inspection/overview.cjs.map +1 -1
- package/dist/inspection/overview.d.cts +19 -1
- package/dist/inspection/overview.d.mts +19 -1
- package/dist/inspection/overview.d.ts +19 -1
- package/dist/inspection/overview.js +4 -2
- package/dist/inspection/project-input.cjs +9 -0
- package/dist/inspection/project-input.cjs.map +1 -0
- package/dist/inspection/project-input.d.cts +20 -0
- package/dist/inspection/project-input.d.mts +20 -0
- package/dist/inspection/project-input.d.ts +20 -0
- package/dist/inspection/project-input.js +8 -0
- package/dist/inspection/project-input.js.map +1 -0
- package/dist/inspection/project-result.cjs +60 -0
- package/dist/inspection/project-result.cjs.map +1 -0
- package/dist/inspection/project-result.d.cts +1264 -0
- package/dist/inspection/project-result.d.mts +1264 -0
- package/dist/inspection/project-result.d.ts +1264 -0
- package/dist/inspection/project-result.js +10 -0
- package/dist/inspection/project-result.js.map +1 -0
- package/dist/inspection/project-source.cjs +109 -0
- package/dist/inspection/project-source.cjs.map +1 -0
- package/dist/inspection/project-source.d.cts +10 -0
- package/dist/inspection/project-source.d.mts +10 -0
- package/dist/inspection/project-source.d.ts +10 -0
- package/dist/inspection/project-source.js +6 -0
- package/dist/inspection/project-source.js.map +1 -0
- package/dist/inspection/project.cjs +100 -0
- package/dist/inspection/project.cjs.map +1 -0
- package/dist/inspection/project.d.cts +3 -0
- package/dist/inspection/project.d.mts +3 -0
- package/dist/inspection/project.d.ts +3 -0
- package/dist/inspection/project.js +6 -0
- package/dist/inspection/project.js.map +1 -0
- package/dist/inspection/protocol.cjs +19 -9
- package/dist/inspection/protocol.cjs.map +1 -1
- package/dist/inspection/protocol.d.cts +5506 -38189
- package/dist/inspection/protocol.d.mts +5506 -38189
- package/dist/inspection/protocol.d.ts +5506 -38189
- package/dist/inspection/public.mjs +896 -84
- package/dist/inspection/query.cjs +2 -0
- package/dist/inspection/query.cjs.map +1 -1
- package/dist/inspection/results.cjs +234 -29
- package/dist/inspection/results.cjs.map +1 -1
- package/dist/inspection/results.d.cts +870 -13
- package/dist/inspection/results.d.mts +870 -13
- package/dist/inspection/results.d.ts +870 -13
- package/dist/inspection/results.js +36 -34
- package/dist/inspection/select.cjs +126 -14
- package/dist/inspection/select.cjs.map +1 -1
- package/dist/inspection/select.d.cts +1 -1
- package/dist/inspection/select.d.mts +1 -1
- package/dist/inspection/select.d.ts +1 -1
- package/dist/inspection/source.cjs +4 -0
- package/dist/inspection/source.cjs.map +1 -1
- package/dist/inspection/sources.cjs +5 -0
- package/dist/inspection/sources.cjs.map +1 -1
- package/dist/inspection/trace.cjs +82 -84
- package/dist/inspection/trace.cjs.map +1 -1
- package/dist/inspection/trace.d.cts +7 -2
- package/dist/inspection/trace.d.mts +7 -2
- package/dist/inspection/trace.d.ts +7 -2
- package/dist/model-slots.cjs +35 -0
- package/dist/model-slots.cjs.map +1 -0
- package/dist/model-slots.d.cts +19 -0
- package/dist/model-slots.d.mts +19 -0
- package/dist/model-slots.d.ts +19 -0
- package/dist/model-slots.js +8 -0
- package/dist/model-slots.js.map +1 -0
- package/dist/o11y/adapter-call-price.cjs +4 -0
- package/dist/o11y/adapter-call-price.cjs.map +1 -1
- package/dist/o11y/adapter-call-price.d.cts +24 -0
- package/dist/o11y/adapter-call-price.d.mts +24 -0
- package/dist/o11y/adapter-call-price.d.ts +24 -0
- package/dist/o11y/adapter-call-price.js +6 -2
- package/dist/o11y/adapter-usage-projection.cjs +158 -0
- package/dist/o11y/adapter-usage-projection.cjs.map +1 -0
- package/dist/o11y/adapter-usage-projection.d.cts +141 -0
- package/dist/o11y/adapter-usage-projection.d.mts +141 -0
- package/dist/o11y/adapter-usage-projection.d.ts +141 -0
- package/dist/o11y/adapter-usage-projection.js +20 -0
- package/dist/o11y/adapter-usage-projection.js.map +1 -0
- package/dist/o11y/eval-usage.cjs +149 -0
- package/dist/o11y/eval-usage.cjs.map +1 -0
- package/dist/o11y/eval-usage.d.cts +46 -0
- package/dist/o11y/eval-usage.d.mts +46 -0
- package/dist/o11y/eval-usage.d.ts +46 -0
- package/dist/o11y/eval-usage.js +8 -0
- package/dist/o11y/eval-usage.js.map +1 -0
- package/dist/o11y/judge-call-price.cjs +62 -0
- package/dist/o11y/judge-call-price.cjs.map +1 -0
- package/dist/o11y/judge-call-price.d.cts +3 -0
- package/dist/o11y/judge-call-price.d.mts +3 -0
- package/dist/o11y/judge-call-price.d.ts +3 -0
- package/dist/o11y/judge-call-price.js +6 -0
- package/dist/o11y/judge-call-price.js.map +1 -0
- package/dist/o11y/judge-usage-projection.cjs +134 -0
- package/dist/o11y/judge-usage-projection.cjs.map +1 -0
- package/dist/o11y/judge-usage-projection.d.cts +18 -0
- package/dist/o11y/judge-usage-projection.d.mts +18 -0
- package/dist/o11y/judge-usage-projection.d.ts +18 -0
- package/dist/o11y/judge-usage-projection.js +20 -0
- package/dist/o11y/judge-usage-projection.js.map +1 -0
- package/dist/o11y/judge-usage-receipt.cjs +135 -0
- package/dist/o11y/judge-usage-receipt.cjs.map +1 -0
- package/dist/o11y/judge-usage-receipt.d.cts +5 -0
- package/dist/o11y/judge-usage-receipt.d.mts +5 -0
- package/dist/o11y/judge-usage-receipt.d.ts +5 -0
- package/dist/o11y/judge-usage-receipt.js +6 -0
- package/dist/o11y/judge-usage-receipt.js.map +1 -0
- package/dist/o11y/judge-usage.cjs +171 -0
- package/dist/o11y/judge-usage.cjs.map +1 -0
- package/dist/o11y/judge-usage.d.cts +35 -0
- package/dist/o11y/judge-usage.d.mts +35 -0
- package/dist/o11y/judge-usage.d.ts +35 -0
- package/dist/o11y/judge-usage.js +6 -0
- package/dist/o11y/judge-usage.js.map +1 -0
- package/dist/plugin/contracts.cjs +2 -0
- package/dist/plugin/contracts.cjs.map +1 -1
- package/dist/plugin/link.cjs +7 -0
- package/dist/plugin/link.cjs.map +1 -1
- package/dist/record/attachment/protocol.cjs +8 -6
- package/dist/record/attachment/protocol.cjs.map +1 -1
- package/dist/record/attachment/protocol.d.cts +10 -0
- package/dist/record/attachment/protocol.d.mts +10 -0
- package/dist/record/attachment/protocol.d.ts +10 -0
- package/dist/record/attachment/protocol.js +38 -36
- package/dist/record/codec/seal-manifest.d.cts +3 -3
- package/dist/record/codec/seal-manifest.d.mts +3 -3
- package/dist/record/codec/seal-manifest.d.ts +3 -3
- package/dist/record/family/adapter-usage/definition.d.cts +1 -0
- package/dist/record/family/adapter-usage/definition.d.mts +1 -0
- package/dist/record/family/adapter-usage/definition.d.ts +1 -0
- package/dist/record/family/adapter-usage/persistence.cjs +1 -1
- package/dist/record/family/adapter-usage/persistence.cjs.map +1 -1
- package/dist/record/family/adapter-usage/persistence.d.cts +2 -1
- package/dist/record/family/adapter-usage/persistence.d.mts +2 -1
- package/dist/record/family/adapter-usage/persistence.d.ts +2 -1
- package/dist/record/family/adapter-usage/schema.cjs +21 -2
- package/dist/record/family/adapter-usage/schema.cjs.map +1 -1
- package/dist/record/family/adapter-usage/schema.d.cts +85 -0
- package/dist/record/family/adapter-usage/schema.d.mts +85 -0
- package/dist/record/family/adapter-usage/schema.d.ts +85 -0
- package/dist/record/family/adapter-usage/schema.js +18 -12
- package/dist/record/family/catalog.cjs +31 -27
- package/dist/record/family/catalog.cjs.map +1 -1
- package/dist/record/family/catalog.d.cts +94 -3
- package/dist/record/family/catalog.d.mts +94 -3
- package/dist/record/family/catalog.d.ts +94 -3
- package/dist/record/family/current.cjs +45 -42
- package/dist/record/family/current.cjs.map +1 -1
- package/dist/record/family/current.d.cts +240 -1
- package/dist/record/family/current.d.mts +240 -1
- package/dist/record/family/current.d.ts +240 -1
- package/dist/record/family/execution-traces/definition.d.cts +26 -0
- package/dist/record/family/execution-traces/definition.d.mts +26 -0
- package/dist/record/family/execution-traces/definition.d.ts +26 -0
- package/dist/record/family/execution-traces/definition.js +20 -14
- package/dist/record/family/execution-traces/schema.cjs +57 -1
- package/dist/record/family/execution-traces/schema.cjs.map +1 -1
- package/dist/record/family/execution-traces/schema.d.cts +114 -0
- package/dist/record/family/execution-traces/schema.d.mts +114 -0
- package/dist/record/family/execution-traces/schema.d.ts +114 -0
- package/dist/record/family/execution-traces/schema.js +18 -12
- package/dist/record/family/judge-usage/definition.cjs +12 -0
- package/dist/record/family/judge-usage/definition.cjs.map +1 -0
- package/dist/record/family/judge-usage/definition.d.cts +91 -0
- package/dist/record/family/judge-usage/definition.d.mts +91 -0
- package/dist/record/family/judge-usage/definition.d.ts +91 -0
- package/dist/record/family/judge-usage/definition.js +6 -0
- package/dist/record/family/judge-usage/definition.js.map +1 -0
- package/dist/record/family/judge-usage/persistence.cjs +10 -0
- package/dist/record/family/judge-usage/persistence.cjs.map +1 -0
- package/dist/record/family/judge-usage/persistence.d.cts +91 -0
- package/dist/record/family/judge-usage/persistence.d.mts +91 -0
- package/dist/record/family/judge-usage/persistence.d.ts +91 -0
- package/dist/record/family/judge-usage/persistence.js +6 -0
- package/dist/record/family/judge-usage/persistence.js.map +1 -0
- package/dist/record/family/judge-usage/schema.cjs +307 -0
- package/dist/record/family/judge-usage/schema.cjs.map +1 -0
- package/dist/record/family/judge-usage/schema.d.cts +351 -0
- package/dist/record/family/judge-usage/schema.d.mts +351 -0
- package/dist/record/family/judge-usage/schema.d.ts +351 -0
- package/dist/record/family/judge-usage/schema.js +18 -0
- package/dist/record/family/judge-usage/schema.js.map +1 -0
- package/dist/record/host/sqlite-host.cjs +55 -9
- package/dist/record/host/sqlite-host.cjs.map +1 -1
- package/dist/record/host/types.cjs.map +1 -1
- package/dist/record/host/types.d.cts +7 -0
- package/dist/record/host/types.d.mts +7 -0
- package/dist/record/host/types.d.ts +7 -0
- package/dist/record/model/run-context.cjs +7 -1
- package/dist/record/model/run-context.cjs.map +1 -1
- package/dist/record/model/run-context.d.cts +4 -0
- package/dist/record/model/run-context.d.mts +4 -0
- package/dist/record/model/run-context.d.ts +4 -0
- package/dist/record/model/seal-manifest.d.cts +1 -1
- package/dist/record/model/seal-manifest.d.mts +1 -1
- package/dist/record/model/seal-manifest.d.ts +1 -1
- package/dist/record/sqlite/client.cjs +18 -5
- package/dist/record/sqlite/client.cjs.map +1 -1
- package/dist/record/sqlite/client.d.cts +1 -1
- package/dist/record/sqlite/client.d.mts +1 -1
- package/dist/record/sqlite/client.d.ts +1 -1
- package/dist/record/sqlite/project-state-database.cjs +29 -8
- package/dist/record/sqlite/project-state-database.cjs.map +1 -1
- package/dist/run/host/runtime.cjs +4 -0
- package/dist/run/host/runtime.cjs.map +1 -1
- package/dist/run/storage/sqlite.cjs +20 -0
- package/dist/run/storage/sqlite.cjs.map +1 -1
- package/dist/runner/adapter-execution-trace.cjs +125 -2
- package/dist/runner/adapter-execution-trace.cjs.map +1 -1
- package/dist/runner/adapter-execution-trace.d.cts +1 -1
- package/dist/runner/adapter-execution-trace.d.mts +1 -1
- package/dist/runner/adapter-execution-trace.d.ts +1 -1
- package/dist/runner/adapter-usage.cjs +55 -7
- package/dist/runner/adapter-usage.cjs.map +1 -1
- package/dist/runner/adapter-usage.d.cts +9 -2
- package/dist/runner/adapter-usage.d.mts +9 -2
- package/dist/runner/adapter-usage.d.ts +9 -2
- package/dist/runner/adoption.cjs +9 -0
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/attempt-cancellation.cjs +12 -0
- package/dist/runner/attempt-cancellation.cjs.map +1 -0
- package/dist/runner/attempt-cancellation.d.cts +6 -0
- package/dist/runner/attempt-cancellation.d.mts +6 -0
- package/dist/runner/attempt-cancellation.d.ts +6 -0
- package/dist/runner/attempt-cancellation.js +6 -0
- package/dist/runner/attempt-cancellation.js.map +1 -0
- package/dist/runner/attempt-resources.cjs +10 -4
- package/dist/runner/attempt-resources.cjs.map +1 -1
- package/dist/runner/attempt-resources.d.cts +2 -1
- package/dist/runner/attempt-resources.d.mts +2 -1
- package/dist/runner/attempt-resources.d.ts +2 -1
- package/dist/runner/attempt.cjs +1177 -1139
- package/dist/runner/attempt.cjs.map +1 -1
- package/dist/runner/config-identity.cjs +20 -1
- package/dist/runner/config-identity.cjs.map +1 -1
- package/dist/runner/config-identity.d.cts +5 -0
- package/dist/runner/config-identity.d.mts +5 -0
- package/dist/runner/config-identity.d.ts +5 -0
- package/dist/runner/discover.cjs +14 -0
- package/dist/runner/discover.cjs.map +1 -1
- package/dist/runner/discover.d.cts +3 -0
- package/dist/runner/discover.d.mts +3 -0
- package/dist/runner/discover.d.ts +3 -0
- package/dist/runner/feedback/human.cjs +9 -4
- package/dist/runner/feedback/human.cjs.map +1 -1
- package/dist/runner/fingerprint.cjs +1 -0
- package/dist/runner/fingerprint.cjs.map +1 -1
- package/dist/runner/judge-usage.cjs +18 -0
- package/dist/runner/judge-usage.cjs.map +1 -0
- package/dist/runner/judge-usage.d.cts +5 -0
- package/dist/runner/judge-usage.d.mts +5 -0
- package/dist/runner/judge-usage.d.ts +5 -0
- package/dist/runner/judge-usage.js +8 -0
- package/dist/runner/judge-usage.js.map +1 -0
- package/dist/runner/project-target.cjs.map +1 -1
- package/dist/runner/project-target.d.cts +2 -0
- package/dist/runner/project-target.d.mts +2 -0
- package/dist/runner/project-target.d.ts +2 -0
- package/dist/runner/record/planning.cjs +1 -0
- package/dist/runner/record/planning.cjs.map +1 -1
- package/dist/runner/record.cjs +4 -0
- package/dist/runner/record.cjs.map +1 -1
- package/dist/runner/reporters/braintrust.cjs +2 -0
- package/dist/runner/reporters/braintrust.cjs.map +1 -1
- package/dist/runner/reuse-diagnostics.cjs +9 -10
- package/dist/runner/reuse-diagnostics.cjs.map +1 -1
- package/dist/runner/reuse-diagnostics.d.cts +5 -6
- package/dist/runner/reuse-diagnostics.d.mts +5 -6
- package/dist/runner/reuse-diagnostics.d.ts +5 -6
- package/dist/runner/reuse-diagnostics.js +4 -4
- package/dist/runner/reuse-plan.cjs +100 -48
- package/dist/runner/reuse-plan.cjs.map +1 -1
- package/dist/runner/reuse-plan.d.cts +60 -3
- package/dist/runner/reuse-plan.d.mts +60 -3
- package/dist/runner/reuse-plan.d.ts +60 -3
- package/dist/runner/reuse-plan.js +14 -10
- package/dist/runner/run.cjs +8 -6
- package/dist/runner/run.cjs.map +1 -1
- package/dist/runner/session.cjs +1 -1
- package/dist/runner/session.cjs.map +1 -1
- package/dist/runner/session.d.cts +1 -1
- package/dist/runner/session.d.mts +1 -1
- package/dist/runner/session.d.ts +1 -1
- package/dist/runner/source-producer.cjs +3 -1
- package/dist/runner/source-producer.cjs.map +1 -1
- package/dist/runner/types.cjs.map +1 -1
- package/dist/runner/types.d.cts +26 -5
- package/dist/runner/types.d.mts +26 -5
- package/dist/runner/types.d.ts +26 -5
- package/dist/sandbox/action.cjs +3 -0
- package/dist/sandbox/action.cjs.map +1 -1
- package/dist/sandbox/commands.cjs +3 -0
- package/dist/sandbox/commands.cjs.map +1 -1
- package/dist/sandbox/compose.cjs +6 -0
- package/dist/sandbox/compose.cjs.map +1 -1
- package/dist/sandbox/docker-profile/registry.cjs +7 -0
- package/dist/sandbox/docker-profile/registry.cjs.map +1 -1
- package/dist/sandbox/docker-profile/runtime.cjs +3 -0
- package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
- package/dist/sandbox/docker-profile/schema.cjs +7 -0
- package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
- package/dist/sandbox/incus.cjs +7 -0
- package/dist/sandbox/incus.cjs.map +1 -1
- package/dist/sandbox/layer.cjs +12 -0
- package/dist/sandbox/layer.cjs.map +1 -1
- package/dist/shared/adapter-cleanup.cjs +18 -0
- package/dist/shared/adapter-cleanup.cjs.map +1 -0
- package/dist/shared/adapter-cleanup.d.cts +4 -0
- package/dist/shared/adapter-cleanup.d.mts +4 -0
- package/dist/shared/adapter-cleanup.d.ts +4 -0
- package/dist/shared/adapter-cleanup.js +10 -0
- package/dist/shared/adapter-cleanup.js.map +1 -0
- package/dist/shared/attempt-lifecycle.cjs +3 -0
- package/dist/shared/attempt-lifecycle.cjs.map +1 -0
- package/dist/shared/attempt-lifecycle.d.cts +13 -0
- package/dist/shared/attempt-lifecycle.d.mts +13 -0
- package/dist/shared/attempt-lifecycle.d.ts +13 -0
- package/dist/shared/attempt-lifecycle.js +4 -0
- package/dist/shared/attempt-lifecycle.js.map +1 -0
- package/dist/show/contribution.cjs +52 -14
- package/dist/show/contribution.cjs.map +1 -1
- package/dist/show/contribution.d.cts +23 -1
- package/dist/show/contribution.d.mts +23 -1
- package/dist/show/contribution.d.ts +23 -1
- package/dist/show/model.cjs +8 -1
- package/dist/show/model.cjs.map +1 -1
- package/dist/show/model.d.cts +10 -1
- package/dist/show/model.d.mts +10 -1
- package/dist/show/model.d.ts +10 -1
- package/dist/show/render.cjs +287 -49
- package/dist/show/render.cjs.map +1 -1
- package/dist/show/render.d.cts +3 -0
- package/dist/show/render.d.mts +3 -0
- package/dist/show/render.d.ts +3 -0
- package/dist/sources/projector.cjs +3 -0
- package/dist/sources/projector.cjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/view/app-dist/.vite/manifest.json +2 -2
- package/dist/view/app-dist/assets/index-CmVoXbwG.js +63 -0
- package/dist/view/app-dist/assets/{quality-cost-scatter-CFB3wnkN.js → quality-cost-scatter-BuLISaH4.js} +1 -1
- package/dist/view/app-dist/index.html +1 -1
- package/dist/view/cli/contribution.cjs +54 -21
- package/dist/view/cli/contribution.cjs.map +1 -1
- package/dist/view/cli/contribution.d.cts +2 -1
- package/dist/view/cli/contribution.d.mts +2 -1
- package/dist/view/cli/contribution.d.ts +2 -1
- package/dist/view/function-runtime.mjs +13231 -11647
- package/dist/view/http-protocol.cjs +3 -0
- package/dist/view/http-protocol.cjs.map +1 -1
- package/dist/view/http-protocol.d.cts +8 -0
- package/dist/view/http-protocol.d.mts +8 -0
- package/dist/view/http-protocol.d.ts +8 -0
- package/dist/view/inspection-host.cjs +17 -1
- package/dist/view/inspection-host.cjs.map +1 -1
- package/dist/view/render.cjs +1 -0
- package/dist/view/render.cjs.map +1 -1
- package/dist/view/render.d.cts +2 -1
- package/dist/view/render.d.mts +2 -1
- package/dist/view/render.d.ts +2 -1
- package/dist/view/revision.cjs.map +1 -1
- package/dist/view/revision.d.cts +12 -0
- package/dist/view/revision.d.mts +12 -0
- package/dist/view/revision.d.ts +12 -0
- package/dist/view/server.cjs +10 -9
- package/dist/view/server.cjs.map +1 -1
- package/docs-site/zh/examples/ai-agent-application.mdx +1 -1
- package/docs-site/zh/explanation/adapter.mdx +2 -2
- package/docs-site/zh/explanation/assert.mdx +60 -24
- package/docs-site/zh/explanation/drive.mdx +1 -1
- package/docs-site/zh/explanation/evals.mdx +31 -29
- package/docs-site/zh/explanation/experiment.mdx +15 -15
- package/docs-site/zh/explanation/judge.mdx +23 -15
- package/docs-site/zh/explanation/overview.mdx +44 -21
- package/docs-site/zh/explanation/record.mdx +28 -13
- package/docs-site/zh/explanation/results-flow.mdx +37 -0
- package/docs-site/zh/explanation/runner.mdx +27 -6
- package/docs-site/zh/index.mdx +22 -115
- package/docs-site/zh/introduction.mdx +89 -61
- package/docs-site/zh/reference/cli.mdx +50 -26
- package/docs-site/zh/reference/define-agent.mdx +37 -5
- package/docs-site/zh/reference/define-eval.mdx +130 -29
- package/docs-site/zh/reference/define-experiment.mdx +251 -0
- package/docs-site/zh/reference/events.mdx +34 -30
- package/docs-site/zh/reference/expect.mdx +77 -2
- package/docs-site/zh/reference/official-adapters.mdx +2 -2
- package/docs-site/zh/troubleshooting/debug-sandbox.mdx +43 -24
- package/docs-site/zh/troubleshooting/debugging.mdx +65 -42
- package/docs-site/zh/troubleshooting/recover-after-kill.mdx +35 -28
- package/docs-site/zh/tutorials/accept-results.mdx +34 -24
- package/docs-site/zh/tutorials/agent-feedback-loop.mdx +74 -43
- package/docs-site/zh/tutorials/agent-onboarding.mdx +27 -20
- package/docs-site/zh/tutorials/authoring.mdx +138 -121
- package/docs-site/zh/tutorials/ci-integration.mdx +46 -22
- package/docs-site/zh/tutorials/compare-runs.mdx +40 -13
- package/docs-site/zh/tutorials/concurrency.mdx +66 -62
- package/docs-site/zh/tutorials/configuration.mdx +17 -17
- package/docs-site/zh/tutorials/connect-otel.mdx +48 -37
- package/docs-site/zh/tutorials/connect-your-agent.mdx +80 -173
- package/docs-site/zh/tutorials/control-run-cost.mdx +63 -12
- package/docs-site/zh/tutorials/criteria-files.mdx +28 -21
- package/docs-site/zh/tutorials/custom-application.mdx +75 -55
- package/docs-site/zh/tutorials/dataset-fanout.mdx +32 -22
- package/docs-site/zh/tutorials/debug-lifecycle-plan.mdx +38 -31
- package/docs-site/zh/tutorials/docker-in-docker.mdx +83 -89
- package/docs-site/zh/tutorials/eval-groups.mdx +70 -89
- package/docs-site/zh/tutorials/evaluation-kinds.mdx +12 -5
- package/docs-site/zh/tutorials/experiment-services.mdx +243 -0
- package/docs-site/zh/tutorials/fixtures.mdx +42 -26
- package/docs-site/zh/tutorials/handle-execution-failures.mdx +41 -19
- package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +21 -16
- package/docs-site/zh/tutorials/niceeval-taste-application.mdx +394 -0
- package/docs-site/zh/tutorials/niceeval-taste.mdx +190 -0
- package/docs-site/zh/tutorials/nixos-managed-dind.mdx +51 -39
- package/docs-site/zh/tutorials/plugins.mdx +55 -31
- package/docs-site/zh/tutorials/prebuilt-sandbox.mdx +204 -0
- package/docs-site/zh/tutorials/quickstart.mdx +91 -47
- package/docs-site/zh/tutorials/reporters.mdx +45 -30
- package/docs-site/zh/tutorials/rerun-and-cache.mdx +39 -40
- package/docs-site/zh/tutorials/sandbox-agent.mdx +65 -40
- package/docs-site/zh/tutorials/sandbox-providers.mdx +104 -282
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +65 -97
- package/docs-site/zh/tutorials/select-and-preview.mdx +25 -20
- package/docs-site/zh/tutorials/verify-judge.mdx +49 -26
- package/docs-site/zh/tutorials/viewing-results.mdx +130 -80
- package/docs-site/zh/tutorials/write-experiment.mdx +116 -298
- package/docs-site/zh/tutorials/write-send.mdx +53 -52
- package/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +4 -3
- package/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/undici/lib/core/util.js +0 -39
- package/node_modules/undici/lib/dispatcher/client-h1.js +11 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +52 -8
- package/node_modules/undici/lib/dispatcher/client.js +1 -1
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -2
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +16 -3
- package/node_modules/undici/lib/handler/deduplication-handler.js +24 -11
- package/node_modules/undici/lib/handler/redirect-handler.js +5 -0
- package/node_modules/undici/lib/handler/retry-handler.js +72 -13
- package/node_modules/undici/lib/interceptor/cache.js +4 -1
- package/node_modules/undici/lib/interceptor/decompress.js +236 -69
- package/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -1
- package/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/undici/lib/web/fetch/index.js +38 -14
- package/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/undici/lib/web/websocket/receiver.js +5 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/diagnostics-channel.d.ts +2 -1
- package/node_modules/undici/types/interceptors.d.ts +1 -1
- package/node_modules/undici/types/webidl.d.ts +13 -7
- package/package.json +4 -4
- package/dist/view/app-dist/assets/index-DFzw1L97.js +0 -63
- package/docs-site/zh/tutorials/experiments.mdx +0 -101
|
@@ -236,7 +236,7 @@ export type AssertionCoverage = {
|
|
|
236
236
|
readonly state: "complete";
|
|
237
237
|
} | {
|
|
238
238
|
readonly state: "partial";
|
|
239
|
-
readonly reason: "sampled" | "truncated" | "redacted" | "provider-limited";
|
|
239
|
+
readonly reason: "sampled" | "truncated" | "redacted" | "provider-limited" | "capacity-limited";
|
|
240
240
|
} | {
|
|
241
241
|
readonly state: "unavailable";
|
|
242
242
|
readonly reason: "not-collected" | "source-unavailable" | "producer-failed";
|
|
@@ -256,6 +256,11 @@ export type AssertionLimitation = {
|
|
|
256
256
|
readonly omittedBytes: number;
|
|
257
257
|
} | {
|
|
258
258
|
readonly kind: "provider-limited";
|
|
259
|
+
} | {
|
|
260
|
+
readonly kind: "capacity-limited";
|
|
261
|
+
readonly capturedItems: number;
|
|
262
|
+
readonly knownTotalItems: number;
|
|
263
|
+
readonly omittedBytes: number | null;
|
|
259
264
|
};
|
|
260
265
|
export type GateDisposition = "not-gate" | "satisfied" | "failed" | "unavailable" | "not-applicable";
|
|
261
266
|
export interface NoScoreContribution {
|
|
@@ -236,7 +236,7 @@ export type AssertionCoverage = {
|
|
|
236
236
|
readonly state: "complete";
|
|
237
237
|
} | {
|
|
238
238
|
readonly state: "partial";
|
|
239
|
-
readonly reason: "sampled" | "truncated" | "redacted" | "provider-limited";
|
|
239
|
+
readonly reason: "sampled" | "truncated" | "redacted" | "provider-limited" | "capacity-limited";
|
|
240
240
|
} | {
|
|
241
241
|
readonly state: "unavailable";
|
|
242
242
|
readonly reason: "not-collected" | "source-unavailable" | "producer-failed";
|
|
@@ -256,6 +256,11 @@ export type AssertionLimitation = {
|
|
|
256
256
|
readonly omittedBytes: number;
|
|
257
257
|
} | {
|
|
258
258
|
readonly kind: "provider-limited";
|
|
259
|
+
} | {
|
|
260
|
+
readonly kind: "capacity-limited";
|
|
261
|
+
readonly capturedItems: number;
|
|
262
|
+
readonly knownTotalItems: number;
|
|
263
|
+
readonly omittedBytes: number | null;
|
|
259
264
|
};
|
|
260
265
|
export type GateDisposition = "not-gate" | "satisfied" | "failed" | "unavailable" | "not-applicable";
|
|
261
266
|
export interface NoScoreContribution {
|
|
@@ -236,7 +236,7 @@ export type AssertionCoverage = {
|
|
|
236
236
|
readonly state: "complete";
|
|
237
237
|
} | {
|
|
238
238
|
readonly state: "partial";
|
|
239
|
-
readonly reason: "sampled" | "truncated" | "redacted" | "provider-limited";
|
|
239
|
+
readonly reason: "sampled" | "truncated" | "redacted" | "provider-limited" | "capacity-limited";
|
|
240
240
|
} | {
|
|
241
241
|
readonly state: "unavailable";
|
|
242
242
|
readonly reason: "not-collected" | "source-unavailable" | "producer-failed";
|
|
@@ -256,6 +256,11 @@ export type AssertionLimitation = {
|
|
|
256
256
|
readonly omittedBytes: number;
|
|
257
257
|
} | {
|
|
258
258
|
readonly kind: "provider-limited";
|
|
259
|
+
} | {
|
|
260
|
+
readonly kind: "capacity-limited";
|
|
261
|
+
readonly capturedItems: number;
|
|
262
|
+
readonly knownTotalItems: number;
|
|
263
|
+
readonly omittedBytes: number | null;
|
|
259
264
|
};
|
|
260
265
|
export type GateDisposition = "not-gate" | "satisfied" | "failed" | "unavailable" | "not-applicable";
|
|
261
266
|
export interface NoScoreContribution {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bindAssertionContext = bindAssertionContext;
|
|
4
|
+
exports.createScopedAssertionCheck = createScopedAssertionCheck;
|
|
3
5
|
exports.assertAssertionSubject = assertAssertionSubject;
|
|
4
6
|
exports.captureAssertionSnapshot = captureAssertionSnapshot;
|
|
5
7
|
exports.postRunBooleanAssertionHandle = postRunBooleanAssertionHandle;
|
|
@@ -7,6 +9,16 @@ exports.attachAssertionsRuntimeSourceCapture = attachAssertionsRuntimeSourceCapt
|
|
|
7
9
|
exports.assertionsRuntimeSourceCaptureSnapshot = assertionsRuntimeSourceCaptureSnapshot;
|
|
8
10
|
exports.markAssertionsRuntimeSourceCaptureInterrupted = markAssertionsRuntimeSourceCaptureInterrupted;
|
|
9
11
|
exports.createAssertionsRuntime = createAssertionsRuntime;
|
|
12
|
+
exports.registerMaterialQA = registerMaterialQA;
|
|
13
|
+
// @concord-file ne-eval-assertions-runtime
|
|
14
|
+
// @concord-implements docs/feature/assertions/README.md
|
|
15
|
+
// @concord-implements docs/feature/assertions/library.md
|
|
16
|
+
// @concord-implements docs/feature/assertions/library/scoped-assertions.md
|
|
17
|
+
// @concord-implements docs/feature/assertions/library/score-points.md
|
|
18
|
+
// @concord-implements docs/feature/verdict/README.md
|
|
19
|
+
const material_ts_1 = require("./material.cjs");
|
|
20
|
+
const context_match_ts_1 = require("./context-match.cjs");
|
|
21
|
+
const judge_presets_ts_1 = require("./judge-presets.cjs");
|
|
10
22
|
const effect_1 = require("effect");
|
|
11
23
|
const image_ts_1 = require("../judge/image.cjs");
|
|
12
24
|
const api_ts_1 = require("./api.cjs");
|
|
@@ -15,7 +27,44 @@ const match_ts_1 = require("./match.cjs");
|
|
|
15
27
|
const score_match_gateway_ts_1 = require("./score-match-gateway.cjs");
|
|
16
28
|
const limits_ts_1 = require("./limits.cjs");
|
|
17
29
|
const numeric_ts_1 = require("./numeric.cjs");
|
|
30
|
+
const full_content_ts_1 = require("./full-content.cjs");
|
|
31
|
+
const unitRatio = effect_1.Schema.Finite.check(effect_1.Schema.isBetween({ minimum: 0, maximum: 1 }));
|
|
32
|
+
const weightedScoreInput = effect_1.Schema.Struct({
|
|
33
|
+
ratio: effect_1.Schema.Union([
|
|
34
|
+
unitRatio,
|
|
35
|
+
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("exact"), value: unitRatio }),
|
|
36
|
+
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("lower-bound"), value: effect_1.Schema.Finite }),
|
|
37
|
+
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable"), reason: effect_1.Schema.String }),
|
|
38
|
+
]),
|
|
39
|
+
weight: effect_1.Schema.Finite.check(effect_1.Schema.isGreaterThanOrEqualTo(0)),
|
|
40
|
+
});
|
|
18
41
|
const UTF8 = new TextEncoder();
|
|
42
|
+
const runtimeByCheck = new WeakMap();
|
|
43
|
+
const contextByCheck = new WeakMap();
|
|
44
|
+
/** @internal Binding is Attempt-local and happens only after app assembly. */
|
|
45
|
+
function bindAssertionContext(check, read, cut, release) {
|
|
46
|
+
runtimeByCheck.get(check)?.assertAuthoringOpen();
|
|
47
|
+
const receiver = contextByCheck.get(check);
|
|
48
|
+
if (receiver === undefined || receiver.read !== undefined)
|
|
49
|
+
throw new TypeError("Assertion context must bind exactly once to its owning receiver");
|
|
50
|
+
receiver.read = read;
|
|
51
|
+
receiver.cut = cut;
|
|
52
|
+
receiver.release = release;
|
|
53
|
+
}
|
|
54
|
+
/** @internal A scope owns its ctx and observation cut while sharing the Attempt runtime. */
|
|
55
|
+
function createScopedAssertionCheck(root, read, cut, release) {
|
|
56
|
+
const runtime = runtimeByCheck.get(root);
|
|
57
|
+
const receiver = contextByCheck.get(root);
|
|
58
|
+
if (runtime === undefined || receiver === undefined)
|
|
59
|
+
throw new TypeError("Scoped checks require an Assertion runtime");
|
|
60
|
+
runtime.assertAuthoringOpen();
|
|
61
|
+
const scoped = (...args) => runtime.checkFor(scoped, args);
|
|
62
|
+
const scopedReceiver = { owner: receiver.owner, read, cut, release };
|
|
63
|
+
runtimeByCheck.set(scoped, runtime);
|
|
64
|
+
contextByCheck.set(scoped, scopedReceiver);
|
|
65
|
+
runtime.trackContextReceiver(scopedReceiver);
|
|
66
|
+
return scoped;
|
|
67
|
+
}
|
|
19
68
|
const assertionHandleRegistry = new WeakSet();
|
|
20
69
|
/** @internal Shared author-boundary guard for check() and Judge dispatch. */
|
|
21
70
|
function assertAssertionSubject(value, operation) {
|
|
@@ -336,7 +385,9 @@ function captureMatchDiagnostic(value, depth = 0, seen = new WeakSet(), budget =
|
|
|
336
385
|
}
|
|
337
386
|
function freezeAssertionMaterial(material) {
|
|
338
387
|
if (material.kind === "snapshot") {
|
|
339
|
-
|
|
388
|
+
const frozen = Object.freeze({ kind: "snapshot", value: material.value });
|
|
389
|
+
(0, full_content_ts_1.transferFullAssertionContent)(material, frozen);
|
|
390
|
+
return frozen;
|
|
340
391
|
}
|
|
341
392
|
if (material.kind === "judge-image") {
|
|
342
393
|
if (!(0, image_ts_1.isJudgeImage)(material.image))
|
|
@@ -511,6 +562,9 @@ class AssertionsRuntimeImplementation {
|
|
|
511
562
|
executeStop;
|
|
512
563
|
judge;
|
|
513
564
|
signal;
|
|
565
|
+
judgeUsage;
|
|
566
|
+
contextReceivers = new Set();
|
|
567
|
+
readingContext = false;
|
|
514
568
|
t;
|
|
515
569
|
entries = [];
|
|
516
570
|
groupStack = [];
|
|
@@ -520,17 +574,24 @@ class AssertionsRuntimeImplementation {
|
|
|
520
574
|
sealStarted = false;
|
|
521
575
|
sealed;
|
|
522
576
|
retainedProducerBytes = 0;
|
|
577
|
+
retentionByEntry = new WeakMap();
|
|
523
578
|
retainedImageBytes = 0;
|
|
524
|
-
constructor(evaluationKind, executeStop, judge, signal) {
|
|
579
|
+
constructor(evaluationKind, executeStop, judge, signal, judgeUsage) {
|
|
525
580
|
this.evaluationKind = evaluationKind;
|
|
526
581
|
this.executeStop = executeStop;
|
|
527
582
|
this.judge = judge;
|
|
528
583
|
this.signal = signal;
|
|
584
|
+
this.judgeUsage = judgeUsage;
|
|
585
|
+
const check = (...args) => this.checkFor(check, args);
|
|
529
586
|
const base = {
|
|
530
587
|
evaluationKind,
|
|
531
|
-
check
|
|
588
|
+
check,
|
|
532
589
|
group: this.withGroup.bind(this),
|
|
533
590
|
};
|
|
591
|
+
runtimeByCheck.set(base.check, this);
|
|
592
|
+
const receiver = { owner: base.check };
|
|
593
|
+
contextByCheck.set(base.check, receiver);
|
|
594
|
+
this.trackContextReceiver(receiver);
|
|
534
595
|
this.t = Object.freeze(evaluationKind === "score"
|
|
535
596
|
? { ...base, score: this.directScore.bind(this) }
|
|
536
597
|
: base);
|
|
@@ -554,6 +615,64 @@ class AssertionsRuntimeImplementation {
|
|
|
554
615
|
capturedEntry.occurrences.push(occurrence);
|
|
555
616
|
return occurrence;
|
|
556
617
|
}
|
|
618
|
+
contextualRegistration(check, match, qa) {
|
|
619
|
+
this.assertCanRegister();
|
|
620
|
+
const receiver = contextByCheck.get(check);
|
|
621
|
+
if (receiver?.read === undefined)
|
|
622
|
+
throw new TypeError("Contextual Match requires an application-bound Assertion receiver");
|
|
623
|
+
const definition = (0, context_match_ts_1.contextMatchDefinitionOf)(match);
|
|
624
|
+
const managed = definition.kind === "context-score" ? (0, match_ts_1.managedScoreMatchOf)(definition.match) : undefined;
|
|
625
|
+
const auditBytes = qa === undefined ? managed?.llm.maxAuditBytes ?? 0 : (0, match_ts_1.exactLlmOptions)((0, judge_presets_ts_1.optionsFor)("close-qa", qa.options ?? {}).llm).maxAuditBytes;
|
|
626
|
+
const reservation = definition.capture.maxBytes + auditBytes + 64 * 1024;
|
|
627
|
+
const admitted = this.retainedProducerBytes + reservation <= 64 * 1024 * 1024;
|
|
628
|
+
if (admitted)
|
|
629
|
+
this.retainedProducerBytes += reservation;
|
|
630
|
+
let reserved = admitted ? reservation : 0;
|
|
631
|
+
try {
|
|
632
|
+
this.readingContext = true;
|
|
633
|
+
let prepared;
|
|
634
|
+
try {
|
|
635
|
+
const cut = admitted ? receiver.cut?.() : undefined;
|
|
636
|
+
prepared = admitted ? (0, material_ts_1.captureContextualMatch)(definition, receiver.read(), { owner: receiver.owner, ...(cut === undefined ? {} : { cut }) }) : (0, material_ts_1.captureUnavailableContextualMatch)(definition, "assertion-retention-budget");
|
|
637
|
+
}
|
|
638
|
+
finally {
|
|
639
|
+
this.readingContext = false;
|
|
640
|
+
}
|
|
641
|
+
const registration = qa !== undefined && prepared.kind === "material" ? (0, material_ts_1.materialQARegistration)(prepared, qa.question, qa.options, this.judge, this.signal, this.judgeUsage?.forEntry(this.entries.length))
|
|
642
|
+
: prepared.kind === "material" ? (0, material_ts_1.materialExistenceRegistration)(prepared)
|
|
643
|
+
: prepared.kind === "context-boolean" ? (0, material_ts_1.contextBooleanRegistration)(prepared)
|
|
644
|
+
: (0, material_ts_1.contextScoreRegistration)(prepared, this.judge, this.signal, this.judgeUsage?.forEntry(this.entries.length));
|
|
645
|
+
const actual = "actualRetainedBytes" in registration && typeof registration.actualRetainedBytes === "function" ? registration.actualRetainedBytes : () => prepared.sourceBytes;
|
|
646
|
+
const retainedBytes = (registration.retainedBytes ?? prepared.sourceBytes) + 64 * 1024;
|
|
647
|
+
this.retainedProducerBytes -= reserved;
|
|
648
|
+
reserved = 0;
|
|
649
|
+
const entryIndex = this.entries.length;
|
|
650
|
+
const handle = qa !== undefined || prepared.kind === "context-score" ? this.registerMeasurement({ ...registration, retainedBytes }) : this.registerBoolean({ ...registration, retainedBytes });
|
|
651
|
+
const entry = this.entries[entryIndex];
|
|
652
|
+
this.retentionByEntry.set(entry, { reserved: retainedBytes, actual, settled: false });
|
|
653
|
+
return handle;
|
|
654
|
+
}
|
|
655
|
+
catch (error) {
|
|
656
|
+
this.retainedProducerBytes -= reserved;
|
|
657
|
+
throw error;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
checkFor(receiver, args) {
|
|
661
|
+
this.assertCanRegister();
|
|
662
|
+
const value = args[0];
|
|
663
|
+
const qa = typeof value === "object" && value !== null ? compiledMaterialQA.get(value) : undefined;
|
|
664
|
+
if (qa !== undefined) {
|
|
665
|
+
if (args.length !== 1)
|
|
666
|
+
throw new TypeError("compiled closeQA Match accepts one argument");
|
|
667
|
+
return this.contextualRegistration(receiver, qa.selector, qa);
|
|
668
|
+
}
|
|
669
|
+
if ((0, context_match_ts_1.isContextualMatch)(value)) {
|
|
670
|
+
if (args.length !== 1)
|
|
671
|
+
throw new TypeError("check(contextualMatch) accepts one argument");
|
|
672
|
+
return this.contextualRegistration(receiver, value);
|
|
673
|
+
}
|
|
674
|
+
return Reflect.apply(this.check, this, args);
|
|
675
|
+
}
|
|
557
676
|
check(value, match, ...extra) {
|
|
558
677
|
if (extra.length > 0) {
|
|
559
678
|
throw new TypeError("t.check() accepts exactly (value, match)");
|
|
@@ -570,9 +689,11 @@ class AssertionsRuntimeImplementation {
|
|
|
570
689
|
const managed = (0, match_ts_1.assertManagedValueMatch)(match, "t.check() match");
|
|
571
690
|
if (managed.kind === "boolean") {
|
|
572
691
|
if ((0, match_ts_1.isNumericComparisonMatch)(managed)) {
|
|
573
|
-
const material = typeof value === "
|
|
574
|
-
?
|
|
575
|
-
:
|
|
692
|
+
const material = typeof value === "object" && value !== null && ["exact", "lower-bound", "unavailable"].includes(String(value.state))
|
|
693
|
+
? value
|
|
694
|
+
: typeof value === "number" && Number.isFinite(value)
|
|
695
|
+
? Object.freeze({ state: "exact", value })
|
|
696
|
+
: Object.freeze({ state: "unavailable", reason: "non-finite-number" });
|
|
576
697
|
const captured = captureAssertionSnapshot(Object.freeze({
|
|
577
698
|
...material,
|
|
578
699
|
cut: Object.freeze({ kind: "call-time" }),
|
|
@@ -606,6 +727,7 @@ class AssertionsRuntimeImplementation {
|
|
|
606
727
|
options: managedScore,
|
|
607
728
|
material: value,
|
|
608
729
|
judge: this.judge,
|
|
730
|
+
...(this.judgeUsage === undefined ? {} : { usage: this.judgeUsage.forEntry(this.entries.length) }),
|
|
609
731
|
...(this.signal === undefined ? {} : { signal: this.signal }),
|
|
610
732
|
}));
|
|
611
733
|
}
|
|
@@ -631,6 +753,9 @@ class AssertionsRuntimeImplementation {
|
|
|
631
753
|
evidence: Object.freeze((definition.evidence ?? []).map(freezeAssertionMaterial)),
|
|
632
754
|
coverage: cloneCoverage(definition.coverage ?? { state: "complete" }),
|
|
633
755
|
limitations: cloneLimitations(definition.limitations ?? []),
|
|
756
|
+
retainedBytes: definition.retainedBytes,
|
|
757
|
+
terminalReceipt: definition.terminalReceipt,
|
|
758
|
+
terminalCriterion: definition.terminalCriterion,
|
|
634
759
|
interruptedMatcherArtifact: definition.interruptedMatcherArtifact,
|
|
635
760
|
evaluate: () => effect_1.Effect.suspend(definition.evaluate).pipe(effect_1.Effect.map((evaluation) => this.booleanSettlement(evaluation)), this.captureEvaluationFailure(definition.interruptedMatcherArtifact)),
|
|
636
761
|
});
|
|
@@ -648,17 +773,45 @@ class AssertionsRuntimeImplementation {
|
|
|
648
773
|
limitations: cloneLimitations(definition.limitations ?? []),
|
|
649
774
|
retainedBytes: definition.retainedBytes,
|
|
650
775
|
retainedImageBytes: definition.retainedImageBytes,
|
|
776
|
+
terminalReceipt: definition.terminalReceipt,
|
|
777
|
+
terminalCriterion: definition.terminalCriterion,
|
|
651
778
|
terminalDetail: definition.terminalDetail,
|
|
652
779
|
terminalEvidence: definition.terminalEvidence,
|
|
653
780
|
evaluate: () => effect_1.Effect.suspend(definition.evaluate).pipe(effect_1.Effect.map((evaluation) => this.measurementSettlement(evaluation))),
|
|
654
781
|
});
|
|
655
782
|
return new MeasurementHandle(this, entry);
|
|
656
783
|
}
|
|
657
|
-
directScore(points) {
|
|
784
|
+
directScore(points, options, ...extra) {
|
|
658
785
|
this.assertCanRegister();
|
|
659
786
|
if (this.evaluationKind !== "score") {
|
|
660
787
|
throw new TypeError("t.score() is available only in a Score Eval");
|
|
661
788
|
}
|
|
789
|
+
if (extra.length > 0)
|
|
790
|
+
throw new TypeError("t.score() accepts points, or ratio and { weight }");
|
|
791
|
+
if (options !== undefined) {
|
|
792
|
+
let decoded;
|
|
793
|
+
try {
|
|
794
|
+
const weight = effect_1.Schema.decodeUnknownSync(effect_1.Schema.Struct({ weight: effect_1.Schema.Finite.check(effect_1.Schema.isGreaterThanOrEqualTo(0)) }), { onExcessProperty: "error" })(options).weight;
|
|
795
|
+
decoded = effect_1.Schema.decodeUnknownSync(weightedScoreInput)({ ratio: points, weight });
|
|
796
|
+
}
|
|
797
|
+
catch (cause) {
|
|
798
|
+
throw new TypeError("t.score() requires a finite ratio in [0, 1] and a finite non-negative weight", { cause });
|
|
799
|
+
}
|
|
800
|
+
const ratio = typeof decoded.ratio === "number" ? decoded.ratio
|
|
801
|
+
: decoded.ratio.state === "exact" ? decoded.ratio.value : undefined;
|
|
802
|
+
const captured = captureAssertionSnapshot({ ratio: points, weight: decoded.weight });
|
|
803
|
+
const handle = this.registerMeasurement({
|
|
804
|
+
criterion: Object.freeze({ kind: "value-match", subject: "explicit-value", matcher: Object.freeze({ state: "declared", name: "author-weighted-score" }) }),
|
|
805
|
+
subject: captured.material,
|
|
806
|
+
coverage: captured.coverage,
|
|
807
|
+
limitations: captured.limitations,
|
|
808
|
+
evaluate: () => effect_1.Effect.succeed(ratio === undefined
|
|
809
|
+
? { state: "unavailable", reason: "source-unavailable", detail: { reason: typeof decoded.ratio !== "number" && decoded.ratio.state === "unavailable" ? decoded.ratio.reason : "ratio-is-only-a-lower-bound" } }
|
|
810
|
+
: { state: "measured", value: ratio }),
|
|
811
|
+
});
|
|
812
|
+
handle.score(decoded.weight);
|
|
813
|
+
return handle;
|
|
814
|
+
}
|
|
662
815
|
assertFiniteNonNegative(points, "t.score() points");
|
|
663
816
|
const captured = captureAssertionSnapshot(points);
|
|
664
817
|
const entry = this.createEntry({
|
|
@@ -883,15 +1036,26 @@ class AssertionsRuntimeImplementation {
|
|
|
883
1036
|
})));
|
|
884
1037
|
});
|
|
885
1038
|
}
|
|
1039
|
+
trackContextReceiver(receiver) {
|
|
1040
|
+
this.contextReceivers.add(receiver);
|
|
1041
|
+
}
|
|
886
1042
|
closeAuthoring(reason) {
|
|
887
1043
|
if (this.sealed !== undefined)
|
|
888
1044
|
return;
|
|
889
1045
|
if (this.closingReason !== "attempt-interrupted")
|
|
890
1046
|
this.closingReason = reason;
|
|
891
1047
|
this.closing = true;
|
|
1048
|
+
for (const receiver of this.contextReceivers) {
|
|
1049
|
+
const release = receiver.release;
|
|
1050
|
+
receiver.read = undefined;
|
|
1051
|
+
receiver.cut = undefined;
|
|
1052
|
+
receiver.release = undefined;
|
|
1053
|
+
release?.();
|
|
1054
|
+
}
|
|
1055
|
+
this.contextReceivers.clear();
|
|
892
1056
|
}
|
|
893
1057
|
assertAuthoringOpen() {
|
|
894
|
-
this.assertCanRegister();
|
|
1058
|
+
this.assertCanRegister(false);
|
|
895
1059
|
}
|
|
896
1060
|
createEntry(input) {
|
|
897
1061
|
if (this.entries.length >= limits_ts_1.assertionRuntimeLimits.entries) {
|
|
@@ -902,8 +1066,8 @@ class AssertionsRuntimeImplementation {
|
|
|
902
1066
|
if (!Number.isSafeInteger(retainedBytes) || retainedBytes < 0) {
|
|
903
1067
|
throw new TypeError("Assertion retainedBytes must be a non-negative safe integer");
|
|
904
1068
|
}
|
|
905
|
-
if (this.retainedProducerBytes + retainedBytes >
|
|
906
|
-
throw new Error("Attempt
|
|
1069
|
+
if (this.retainedProducerBytes + retainedBytes > 64 * 1024 * 1024) {
|
|
1070
|
+
throw new Error("Attempt Assertion retention cannot exceed 64 MiB");
|
|
907
1071
|
}
|
|
908
1072
|
if (!Number.isSafeInteger(retainedImageBytes) || retainedImageBytes < 0 || this.retainedImageBytes + retainedImageBytes > 32 * 1024 * 1024) {
|
|
909
1073
|
throw new Error("Attempt managed image retention cannot exceed 32 MiB");
|
|
@@ -920,8 +1084,10 @@ class AssertionsRuntimeImplementation {
|
|
|
920
1084
|
display: { key: undefined, label: undefined, groupPath: [...this.groupStack] },
|
|
921
1085
|
directScorePoints: input.directScorePoints,
|
|
922
1086
|
interruptedMatcherArtifact: input.interruptedMatcherArtifact,
|
|
1087
|
+
terminalReceipt: input.terminalReceipt,
|
|
923
1088
|
terminalDetail: input.terminalDetail,
|
|
924
1089
|
terminalEvidence: input.terminalEvidence,
|
|
1090
|
+
terminalCriterion: input.terminalCriterion,
|
|
925
1091
|
optionalConfigured: false,
|
|
926
1092
|
gateConfigured: false,
|
|
927
1093
|
conditionMinimum: undefined,
|
|
@@ -1031,12 +1197,14 @@ class AssertionsRuntimeImplementation {
|
|
|
1031
1197
|
case "measured":
|
|
1032
1198
|
assertUnitInterval(evaluation.value, "measurement Assertion result");
|
|
1033
1199
|
return Object.freeze({
|
|
1200
|
+
...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),
|
|
1034
1201
|
state: "measured",
|
|
1035
1202
|
value: evaluation.value,
|
|
1036
1203
|
...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }),
|
|
1037
1204
|
});
|
|
1038
1205
|
case "unavailable":
|
|
1039
1206
|
return Object.freeze({
|
|
1207
|
+
...(evaluation.receipt === undefined ? {} : { receipt: evaluation.receipt }),
|
|
1040
1208
|
state: "unavailable",
|
|
1041
1209
|
reason: evaluation.reason,
|
|
1042
1210
|
...(evaluation.detail === undefined ? {} : { explanation: evaluation.detail }),
|
|
@@ -1144,7 +1312,7 @@ class AssertionsRuntimeImplementation {
|
|
|
1144
1312
|
const material = this.materialFor(entry, settlement);
|
|
1145
1313
|
return Object.freeze({
|
|
1146
1314
|
display,
|
|
1147
|
-
criterion: entry.criterion,
|
|
1315
|
+
criterion: entry.terminalCriterion?.() ?? entry.criterion,
|
|
1148
1316
|
subject: entry.subject,
|
|
1149
1317
|
evidence: this.evidenceFor(entry),
|
|
1150
1318
|
coverage: material.coverage,
|
|
@@ -1174,6 +1342,8 @@ class AssertionsRuntimeImplementation {
|
|
|
1174
1342
|
});
|
|
1175
1343
|
}
|
|
1176
1344
|
materialFor(entry, settlement) {
|
|
1345
|
+
if (settlement.state === "unavailable" && this.retentionByEntry.has(entry) && entry.initialCoverage.state === "partial")
|
|
1346
|
+
return Object.freeze({ coverage: entry.initialCoverage, limitations: entry.initialLimitations });
|
|
1177
1347
|
if (settlement.state === "unavailable") {
|
|
1178
1348
|
return Object.freeze({
|
|
1179
1349
|
coverage: Object.freeze({ state: "unavailable", reason: "source-unavailable" }),
|
|
@@ -1199,6 +1369,13 @@ class AssertionsRuntimeImplementation {
|
|
|
1199
1369
|
...entry.evidence,
|
|
1200
1370
|
...terminal.map(freezeAssertionMaterial),
|
|
1201
1371
|
]);
|
|
1372
|
+
const retention = this.retentionByEntry.get(entry);
|
|
1373
|
+
if (retention !== undefined && !retention.settled) {
|
|
1374
|
+
const diagnosticBytes = UTF8.encode(JSON.stringify(entry.settled === undefined ? {} : this.resultFor(entry, entry.settled))).byteLength;
|
|
1375
|
+
const actual = retention.actual() + diagnosticBytes;
|
|
1376
|
+
this.retainedProducerBytes += actual - retention.reserved;
|
|
1377
|
+
retention.settled = true;
|
|
1378
|
+
}
|
|
1202
1379
|
return entry.sealedEvidence;
|
|
1203
1380
|
}
|
|
1204
1381
|
resultFor(entry, settlement) {
|
|
@@ -1208,7 +1385,8 @@ class AssertionsRuntimeImplementation {
|
|
|
1208
1385
|
? baseDiagnostic
|
|
1209
1386
|
: Object.freeze({ ...(baseDiagnostic ?? {}), ...terminalDetail });
|
|
1210
1387
|
const diagnostic = capturedDiagnostic === undefined ? {} : { diagnostic: capturedDiagnostic };
|
|
1211
|
-
const
|
|
1388
|
+
const terminalReceipt = entry.terminalReceipt?.() ?? settlement.receipt;
|
|
1389
|
+
const receipt = terminalReceipt === undefined ? {} : { receipt: terminalReceipt };
|
|
1212
1390
|
switch (settlement.state) {
|
|
1213
1391
|
case "matched":
|
|
1214
1392
|
return Object.freeze({
|
|
@@ -1328,7 +1506,9 @@ class AssertionsRuntimeImplementation {
|
|
|
1328
1506
|
const points = entry.scorePoints;
|
|
1329
1507
|
return points === undefined ? noScore() : unavailableScore(points, reason);
|
|
1330
1508
|
}
|
|
1331
|
-
assertCanRegister() {
|
|
1509
|
+
assertCanRegister(reentry = true) {
|
|
1510
|
+
if (reentry && this.readingContext)
|
|
1511
|
+
throw new TypeError("Context Match readers cannot reenter Assertion authoring");
|
|
1332
1512
|
if (this.stopped !== undefined) {
|
|
1333
1513
|
throw new api_ts_1.AssertionAuthoringClosedError("stop-latched");
|
|
1334
1514
|
}
|
|
@@ -1402,7 +1582,20 @@ function createAssertionsRuntime(input) {
|
|
|
1402
1582
|
throw new TypeError("Assertions runtime evaluationKind must be \"pass\" or \"score\"");
|
|
1403
1583
|
}
|
|
1404
1584
|
const executeStop = input.executeStop ?? (() => Promise.reject(new api_ts_1.AssertionAuthoringClosedError("runtime-unattached")));
|
|
1405
|
-
const runtime = new AssertionsRuntimeImplementation(input.evaluationKind, executeStop, input.judge, input.signal);
|
|
1585
|
+
const runtime = new AssertionsRuntimeImplementation(input.evaluationKind, executeStop, input.judge, input.signal, input.judgeUsage);
|
|
1406
1586
|
return runtime;
|
|
1407
1587
|
}
|
|
1588
|
+
/** @internal Core preset dispatch shares the exact owning runtime. */
|
|
1589
|
+
const compiledMaterialQA = new WeakMap();
|
|
1590
|
+
function registerMaterialQA(check, selector, question, options) {
|
|
1591
|
+
const runtime = runtimeByCheck.get(check);
|
|
1592
|
+
if (runtime === undefined)
|
|
1593
|
+
throw new TypeError("closeQA requires an Assertion runtime");
|
|
1594
|
+
if (!(0, context_match_ts_1.isContextualMatch)(selector) || selector.kind !== "material")
|
|
1595
|
+
throw new TypeError("closeQA requires a MaterialMatch");
|
|
1596
|
+
(0, material_ts_1.validateMaterialQAInputs)(question, options);
|
|
1597
|
+
const compiled = Object.freeze({});
|
|
1598
|
+
compiledMaterialQA.set(compiled, Object.freeze({ selector, question, ...(options === undefined ? {} : { options }) }));
|
|
1599
|
+
return Reflect.apply(check, undefined, [compiled]);
|
|
1600
|
+
}
|
|
1408
1601
|
//# sourceMappingURL=runtime.cjs.map
|