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
|
@@ -180,23 +180,23 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
180
180
|
readonly startedAt: import("../../record/model/identifiers.mjs").UtcMillis;
|
|
181
181
|
};
|
|
182
182
|
readonly comparisons: readonly {
|
|
183
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
183
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
184
184
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
185
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
185
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
186
186
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
187
187
|
readonly reason: string;
|
|
188
188
|
}[];
|
|
189
189
|
} | {
|
|
190
190
|
readonly action: "accepted";
|
|
191
|
+
readonly attemptId: import("../../record/model/identifiers.mjs").AttemptId;
|
|
192
|
+
readonly slotId: SlotId;
|
|
191
193
|
readonly comparisons: readonly {
|
|
192
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
194
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
193
195
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
194
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
196
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
195
197
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
196
198
|
readonly reason: string;
|
|
197
199
|
}[];
|
|
198
|
-
readonly attemptId: import("../../record/model/identifiers.mjs").AttemptId;
|
|
199
|
-
readonly slotId: SlotId;
|
|
200
200
|
readonly origin: {
|
|
201
201
|
readonly runId: import("../../record/model/identifiers.mjs").RunId;
|
|
202
202
|
readonly slotId: SlotId;
|
|
@@ -213,7 +213,7 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
213
213
|
readonly attemptId: import("../../record/model/identifiers.mjs").AttemptId;
|
|
214
214
|
readonly gap: {
|
|
215
215
|
readonly reason: string;
|
|
216
|
-
readonly scope: "
|
|
216
|
+
readonly scope: "experiment" | "target" | "slot";
|
|
217
217
|
readonly issues: readonly RecordIssue[];
|
|
218
218
|
readonly sourceBarrier?: {
|
|
219
219
|
readonly runId: import("../../record/model/identifiers.mjs").RunId;
|
|
@@ -221,9 +221,9 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
221
221
|
} | undefined;
|
|
222
222
|
};
|
|
223
223
|
readonly comparisons: readonly {
|
|
224
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
224
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
225
225
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
226
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
226
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
227
227
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
228
228
|
readonly reason: string;
|
|
229
229
|
}[];
|
|
@@ -232,7 +232,7 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
232
232
|
readonly slotId: SlotId;
|
|
233
233
|
readonly gap: {
|
|
234
234
|
readonly reason: string;
|
|
235
|
-
readonly scope: "
|
|
235
|
+
readonly scope: "experiment" | "target" | "slot";
|
|
236
236
|
readonly issues: readonly RecordIssue[];
|
|
237
237
|
readonly sourceBarrier?: {
|
|
238
238
|
readonly runId: import("../../record/model/identifiers.mjs").RunId;
|
|
@@ -240,9 +240,9 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
240
240
|
} | undefined;
|
|
241
241
|
};
|
|
242
242
|
readonly comparisons: readonly {
|
|
243
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
243
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
244
244
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
245
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
245
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
246
246
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
247
247
|
readonly reason: string;
|
|
248
248
|
}[];
|
|
@@ -251,7 +251,7 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
251
251
|
readonly slotId: SlotId;
|
|
252
252
|
readonly gap: {
|
|
253
253
|
readonly reason: string;
|
|
254
|
-
readonly scope: "
|
|
254
|
+
readonly scope: "experiment" | "target" | "slot";
|
|
255
255
|
readonly issues: readonly RecordIssue[];
|
|
256
256
|
readonly sourceBarrier?: {
|
|
257
257
|
readonly runId: import("../../record/model/identifiers.mjs").RunId;
|
|
@@ -259,9 +259,9 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
259
259
|
} | undefined;
|
|
260
260
|
};
|
|
261
261
|
readonly comparisons: readonly {
|
|
262
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
262
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
263
263
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
264
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
264
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
265
265
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
266
266
|
readonly reason: string;
|
|
267
267
|
}[];
|
|
@@ -180,23 +180,23 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
180
180
|
readonly startedAt: import("../../record/model/identifiers.js").UtcMillis;
|
|
181
181
|
};
|
|
182
182
|
readonly comparisons: readonly {
|
|
183
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
183
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
184
184
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
185
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
185
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
186
186
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
187
187
|
readonly reason: string;
|
|
188
188
|
}[];
|
|
189
189
|
} | {
|
|
190
190
|
readonly action: "accepted";
|
|
191
|
+
readonly attemptId: import("../../record/model/identifiers.js").AttemptId;
|
|
192
|
+
readonly slotId: SlotId;
|
|
191
193
|
readonly comparisons: readonly {
|
|
192
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
194
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
193
195
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
194
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
196
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
195
197
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
196
198
|
readonly reason: string;
|
|
197
199
|
}[];
|
|
198
|
-
readonly attemptId: import("../../record/model/identifiers.js").AttemptId;
|
|
199
|
-
readonly slotId: SlotId;
|
|
200
200
|
readonly origin: {
|
|
201
201
|
readonly runId: import("../../record/model/identifiers.js").RunId;
|
|
202
202
|
readonly slotId: SlotId;
|
|
@@ -213,7 +213,7 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
213
213
|
readonly attemptId: import("../../record/model/identifiers.js").AttemptId;
|
|
214
214
|
readonly gap: {
|
|
215
215
|
readonly reason: string;
|
|
216
|
-
readonly scope: "
|
|
216
|
+
readonly scope: "experiment" | "target" | "slot";
|
|
217
217
|
readonly issues: readonly RecordIssue[];
|
|
218
218
|
readonly sourceBarrier?: {
|
|
219
219
|
readonly runId: import("../../record/model/identifiers.js").RunId;
|
|
@@ -221,9 +221,9 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
221
221
|
} | undefined;
|
|
222
222
|
};
|
|
223
223
|
readonly comparisons: readonly {
|
|
224
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
224
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
225
225
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
226
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
226
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
227
227
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
228
228
|
readonly reason: string;
|
|
229
229
|
}[];
|
|
@@ -232,7 +232,7 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
232
232
|
readonly slotId: SlotId;
|
|
233
233
|
readonly gap: {
|
|
234
234
|
readonly reason: string;
|
|
235
|
-
readonly scope: "
|
|
235
|
+
readonly scope: "experiment" | "target" | "slot";
|
|
236
236
|
readonly issues: readonly RecordIssue[];
|
|
237
237
|
readonly sourceBarrier?: {
|
|
238
238
|
readonly runId: import("../../record/model/identifiers.js").RunId;
|
|
@@ -240,9 +240,9 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
240
240
|
} | undefined;
|
|
241
241
|
};
|
|
242
242
|
readonly comparisons: readonly {
|
|
243
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
243
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
244
244
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
245
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
245
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
246
246
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
247
247
|
readonly reason: string;
|
|
248
248
|
}[];
|
|
@@ -251,7 +251,7 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
251
251
|
readonly slotId: SlotId;
|
|
252
252
|
readonly gap: {
|
|
253
253
|
readonly reason: string;
|
|
254
|
-
readonly scope: "
|
|
254
|
+
readonly scope: "experiment" | "target" | "slot";
|
|
255
255
|
readonly issues: readonly RecordIssue[];
|
|
256
256
|
readonly sourceBarrier?: {
|
|
257
257
|
readonly runId: import("../../record/model/identifiers.js").RunId;
|
|
@@ -259,9 +259,9 @@ export declare const MembershipProvenancePayloadSchema: Schema.refine<{
|
|
|
259
259
|
} | undefined;
|
|
260
260
|
};
|
|
261
261
|
readonly comparisons: readonly {
|
|
262
|
-
readonly attachment: "niceeval.runner-activities" | "
|
|
262
|
+
readonly attachment: "core" | "niceeval.runner-activities" | "niceeval.assertions";
|
|
263
263
|
readonly recordedClaim: "execution-identity" | "attempt-outcome" | "assertion-verdict" | "execution-duration";
|
|
264
|
-
readonly sourceState: "available" | "unavailable" | "
|
|
264
|
+
readonly sourceState: "available" | "unavailable" | "unsupported" | "invalid";
|
|
265
265
|
readonly result: "match" | "mismatch" | "ineligible" | "not-comparable";
|
|
266
266
|
readonly reason: string;
|
|
267
267
|
}[];
|
|
@@ -6,6 +6,10 @@ exports.buildScorePayload = buildScorePayload;
|
|
|
6
6
|
exports.foldRecordedAttemptScore = foldRecordedAttemptScore;
|
|
7
7
|
exports.validateScoreCoherence = validateScoreCoherence;
|
|
8
8
|
exports.projectScorePayload = projectScorePayload;
|
|
9
|
+
// @concord-file ne-eval-record-score
|
|
10
|
+
// @concord-implements docs/feature/assertions/library/score-points.md
|
|
11
|
+
// @concord-implements docs/feature/verdict/README.md
|
|
12
|
+
// @concord-implements docs/feature/eval/use-case/rubric-points.md
|
|
9
13
|
const effect_1 = require("effect");
|
|
10
14
|
const attachment_ts_1 = require("./attachment.cjs");
|
|
11
15
|
const sealed_assertion_ts_1 = require("./sealed-assertion.cjs");
|
|
@@ -114,6 +118,9 @@ function buildScorePayload(input) {
|
|
|
114
118
|
: effect_1.Result.succeed(Object.freeze({ state: "unavailable", reasons: nonEmptyReasons }));
|
|
115
119
|
}
|
|
116
120
|
/** Folds Score from the same immutable Record/Core facts as Verdict. */
|
|
121
|
+
// @concord-code ne-eval-fold-score
|
|
122
|
+
// @concord-implements docs/feature/assertions/library/score-points.md
|
|
123
|
+
// @concord-implements docs/feature/eval/use-case/rubric-points.md
|
|
117
124
|
function foldRecordedAttemptScore(input) {
|
|
118
125
|
return buildScorePayload((0, sealed_assertion_ts_1.recordedAttemptFacts)(input));
|
|
119
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score.js","sourceRoot":"","sources":["score.ts"],"names":[],"mappings":";;;AAwDA,oDAgBC;AAsBD,8CAmCC;AAED,4DAKC;AAmBD,wDAWC;AAsBD,kDAMC;AAlMD,mCAAwC;AACxC,mDAA4H;AAC5H,+DAAyH;AAGzH,+EAA+E;AAClE,QAAA,gBAAgB,GAAG,eAAM,CAAC,QAAQ,CAAC;IAC5C,UAAU;IACV,SAAS;IACT,aAAa;CAChB,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,eAAM,CAAC,QAAQ,CAAC;IACvD,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,gBAAgB;CACnB,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,eAAM,CAAC,aAAa,CAAC,mCAA2B,CAAC,CAAC;AAEjF,QAAA,iBAAiB,GAAG,6CAA6B,CAAC;AAE/D,MAAM,4BAA4B,GAAG,eAAM,CAAC,KAAK,CAAC;IAC9C,eAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,eAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,yBAAiB,EAAE,CAAC;IAC/E,eAAM,CAAC,MAAM,CAAC;QACV,KAAK,EAAE,eAAM,CAAC,OAAO,CAAC,SAAS,CAAC;QAChC,MAAM,EAAE,yBAAiB;QACzB,OAAO,EAAE,oCAA4B;KACxC,CAAC;IACF,eAAM,CAAC,MAAM,CAAC;QACV,KAAK,EAAE,eAAM,CAAC,OAAO,CAAC,aAAa,CAAC;QACpC,OAAO,EAAE,oCAA4B;KACxC,CAAC;CACL,CA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C,MAAM,EAAE,UAAU,EAAE,IAAa,EAAE,CAAC,CAAC;QACzH,KAAK,SAAS,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAkB,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,KAAc,EAAE,CAAC,CAAC;QAC1K,KAAK,aAAa,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,aAAsB,EAAE,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,KAAc,EAAE,CAAC,CAAC;IAC9J,CAAC;AACL,CAAC","sourcesContent":["import { Result, Schema } from \"effect\";\nimport { ExactEvaluationParseOptions, FiniteNonNegativeNumberSchema, type FiniteNonNegativeNumber, } from \"./attachment.ts\";\nimport { EvaluationAttemptFactsSchema, recordedAttemptFacts, type EvaluationAttemptFacts, } from \"./sealed-assertion.ts\";\nimport type { AssertionsAttachment } from \"../../record/family/assertions/definition.ts\";\nimport type { AttemptOutcome } from \"../../record/model/core.ts\";\n/** Score is an Analysis calculation, not an independently persisted family. */\nexport const ScoreStateSchema = Schema.Literals([\n \"complete\",\n \"partial\",\n \"unavailable\",\n]);\nexport type ScoreState = Schema.toType<typeof ScoreStateSchema>[\"Type\"];\nexport const ScoreIncompleteReasonSchema = Schema.Literals([\n \"execution-errored\",\n \"source-unavailable\",\n \"evaluation-errored\",\n \"not-applicable\",\n]);\nexport type ScoreIncompleteReason = Schema.toType<typeof ScoreIncompleteReasonSchema>[\"Type\"];\nexport const ScoreIncompleteReasonsSchema = Schema.NonEmptyArray(ScoreIncompleteReasonSchema);\nexport type ScoreIncompleteReasons = Schema.toType<typeof ScoreIncompleteReasonsSchema>[\"Type\"];\nexport const EarnedScoreSchema = FiniteNonNegativeNumberSchema;\nexport type EarnedScore = FiniteNonNegativeNumber;\nconst ScorePayloadStructuralSchema = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"complete\"), earned: EarnedScoreSchema }),\n Schema.Struct({\n state: Schema.Literal(\"partial\"),\n earned: EarnedScoreSchema,\n reasons: ScoreIncompleteReasonsSchema,\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reasons: ScoreIncompleteReasonsSchema,\n }),\n]);\nexport type ScorePayload = Schema.toType<typeof ScorePayloadStructuralSchema>[\"Type\"];\nexport type ScorePayloadEncoded = Schema.Codec.Encoded<typeof ScorePayloadStructuralSchema>;\nexport type ScorePayloadIssue = {\n readonly code: \"score-incomplete-reason-duplicate\";\n readonly reason: ScoreIncompleteReason;\n} | {\n readonly code: \"score-incomplete-reason-order-invalid\";\n readonly index: number;\n readonly reason: ScoreIncompleteReason;\n};\nfunction scoreIncompleteReasonRank(reason: ScoreIncompleteReason): number {\n switch (reason) {\n case \"execution-errored\": return 0;\n case \"source-unavailable\": return 1;\n case \"evaluation-errored\": return 2;\n case \"not-applicable\": return 3;\n }\n}\nfunction incompleteReasonsOf(payload: ScorePayload): readonly ScoreIncompleteReason[] {\n return payload.state === \"complete\" ? [] : payload.reasons;\n}\nexport function validateScorePayload(payload: ScorePayload): readonly ScorePayloadIssue[] {\n const issues: ScorePayloadIssue[] = [];\n const seen = new Set<ScoreIncompleteReason>();\n let previousRank: number | undefined;\n for (const [index, reason] of incompleteReasonsOf(payload).entries()) {\n const rank = scoreIncompleteReasonRank(reason);\n if (seen.has(reason)) {\n issues.push(Object.freeze({ code: \"score-incomplete-reason-duplicate\" as const, reason }));\n }\n else if (previousRank !== undefined && previousRank >= rank) {\n issues.push(Object.freeze({ code: \"score-incomplete-reason-order-invalid\" as const, index, reason }));\n }\n seen.add(reason);\n previousRank = rank;\n }\n return Object.freeze(issues);\n}\nexport const ScorePayloadSchema = ScorePayloadStructuralSchema.pipe(Schema.refine((payload): payload is typeof payload => validateScorePayload(payload).length === 0, {\n identifier: \"ScoreCalculation\",\n description: \"a canonical transient score calculation\",\n}));\nexport type ScoreFoldInput = EvaluationAttemptFacts;\nexport const ScoreFoldInputSchema = EvaluationAttemptFactsSchema;\nexport type ScoreBuildInput = ScoreFoldInput;\nexport const ScoreBuildInputSchema = ScoreFoldInputSchema;\nexport type ScorePayloadBuildError = {\n readonly code: \"score-fold-input-invalid\";\n} | {\n readonly code: \"score-earned-overflow\";\n};\nfunction canonicalIncompleteReasons(reasons: readonly ScoreIncompleteReason[]): readonly ScoreIncompleteReason[] {\n return Object.freeze([...new Set(reasons)].sort((left, right) => scoreIncompleteReasonRank(left) - scoreIncompleteReasonRank(right)));\n}\nfunction asNonEmptyReasons(reasons: readonly ScoreIncompleteReason[]): ScoreIncompleteReasons | undefined {\n const [first, ...rest] = reasons;\n return first === undefined ? undefined : Object.freeze([first, ...rest]);\n}\n/** Folds sealed Assertion facts without producing a durable Record write. */\nexport function buildScorePayload(input: ScoreFoldInput): Result.Result<ScorePayload, ScorePayloadBuildError> {\n const decoded = Schema.decodeUnknownResult(Schema.toType(ScoreFoldInputSchema), ExactEvaluationParseOptions)(input);\n if (Result.isFailure(decoded)) {\n return Result.fail(Object.freeze({ code: \"score-fold-input-invalid\" as const }));\n }\n let earned = 0;\n let hasAuditableContribution = false;\n const incompleteReasons: ScoreIncompleteReason[] = [];\n for (const assertion of decoded.success.assertions) {\n switch (assertion.result.score.state) {\n case \"not-scored\": break;\n case \"earned\":\n hasAuditableContribution = true;\n earned += assertion.result.score.earned;\n if (!Number.isFinite(earned)) {\n return Result.fail(Object.freeze({ code: \"score-earned-overflow\" as const }));\n }\n break;\n case \"unavailable\":\n if (assertion.required)\n incompleteReasons.push(assertion.result.score.reason);\n break;\n }\n }\n if (decoded.success.execution === \"errored\")\n incompleteReasons.push(\"execution-errored\");\n const reasons = canonicalIncompleteReasons(incompleteReasons);\n if (reasons.length === 0)\n return Result.succeed(Object.freeze({ state: \"complete\" as const, earned }));\n const nonEmptyReasons = asNonEmptyReasons(reasons);\n if (nonEmptyReasons === undefined)\n throw new Error(\"Non-empty score reasons became empty\");\n return hasAuditableContribution\n ? Result.succeed(Object.freeze({ state: \"partial\" as const, earned, reasons: nonEmptyReasons }))\n : Result.succeed(Object.freeze({ state: \"unavailable\" as const, reasons: nonEmptyReasons }));\n}\n/** Folds Score from the same immutable Record/Core facts as Verdict. */\nexport function foldRecordedAttemptScore(input: {\n readonly outcome: AttemptOutcome;\n readonly assertions: AssertionsAttachment;\n}): Result.Result<ScorePayload, ScorePayloadBuildError> {\n return buildScorePayload(recordedAttemptFacts(input));\n}\nexport type ScoreCoherenceIssue = {\n readonly code: \"score-fold-input-invalid\";\n readonly reason: ScorePayloadBuildError[\"code\"];\n} | {\n readonly code: \"score-payload-mismatch\";\n};\nfunction sameReasons(left: readonly ScoreIncompleteReason[], right: readonly ScoreIncompleteReason[]): boolean {\n return left.length === right.length && left.every((reason, index) => reason === right[index]);\n}\nfunction sameScorePayload(left: ScorePayload, right: ScorePayload): boolean {\n if (left.state !== right.state)\n return false;\n if (left.state === \"complete\")\n return right.state === \"complete\" && left.earned === right.earned;\n if (left.state === \"partial\")\n return right.state === \"partial\" && left.earned === right.earned && sameReasons(left.reasons, right.reasons);\n return right.state === \"unavailable\" && sameReasons(left.reasons, right.reasons);\n}\nexport function validateScoreCoherence(input: {\n readonly payload: ScorePayload;\n readonly fold: ScoreFoldInput;\n}): readonly ScoreCoherenceIssue[] {\n const expected = buildScorePayload(input.fold);\n if (Result.isFailure(expected)) {\n return Object.freeze([Object.freeze({ code: \"score-fold-input-invalid\" as const, reason: expected.failure.code })]);\n }\n return sameScorePayload(input.payload, expected.success)\n ? Object.freeze([])\n : Object.freeze([Object.freeze({ code: \"score-payload-mismatch\" as const })]);\n}\nexport type Score = {\n readonly state: \"complete\";\n readonly earned: number;\n readonly comparable: true;\n} | {\n readonly state: \"partial\";\n readonly earned: number;\n readonly reasons: ScoreIncompleteReasons;\n readonly comparable: false;\n} | {\n readonly state: \"unavailable\";\n readonly reasons: ScoreIncompleteReasons;\n readonly comparable: false;\n};\nexport type ScoreProjection = Score;\nfunction scoreIncompleteReasons(reasons: readonly ScoreIncompleteReason[]): ScoreIncompleteReasons {\n const [first, ...rest] = reasons;\n if (first === undefined)\n throw new Error(\"An incomplete score needs a reason\");\n return Object.freeze([first, ...rest]);\n}\nexport function projectScorePayload(payload: ScorePayload): Score {\n switch (payload.state) {\n case \"complete\": return Object.freeze({ state: \"complete\" as const, earned: payload.earned, comparable: true as const });\n case \"partial\": return Object.freeze({ state: \"partial\" as const, earned: payload.earned, reasons: scoreIncompleteReasons(payload.reasons), comparable: false as const });\n case \"unavailable\": return Object.freeze({ state: \"unavailable\" as const, reasons: scoreIncompleteReasons(payload.reasons), comparable: false as const });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"score.js","sourceRoot":"","sources":["score.ts"],"names":[],"mappings":";;;AA4DA,oDAgBC;AAsBD,8CAmCC;AAKD,4DAKC;AAmBD,wDAWC;AAsBD,kDAMC;AAzMD,qCAAqC;AACrC,sEAAsE;AACtE,qDAAqD;AACrD,kEAAkE;AAClE,mCAAwC;AACxC,mDAA4H;AAC5H,+DAAyH;AAGzH,+EAA+E;AAClE,QAAA,gBAAgB,GAAG,eAAM,CAAC,QAAQ,CAAC;IAC5C,UAAU;IACV,SAAS;IACT,aAAa;CAChB,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,eAAM,CAAC,QAAQ,CAAC;IACvD,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;IACpB,gBAAgB;CACnB,CAAC,CAAC;AAEU,QAAA,4BAA4B,GAAG,eAAM,CAAC,aAAa,CAAC,mCAA2B,CAAC,CAAC;AAEjF,QAAA,iBAAiB,GAAG,6CAA6B,CAAC;AAE/D,MAAM,4BAA4B,GAAG,eAAM,CAAC,KAAK,CAAC;IAC9C,eAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,eAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,y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QACnB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IAC1D,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC;AACD,SAAgB,mBAAmB,CAAC,OAAqB;IACrD,QAAQ,OAAO,CAAC,KAAK,EAAE,CAAC;QACpB,KAAK,UAAU,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,UAAmB,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,IAAa,EAAE,CAAC,CAAC;QACzH,KAAK,SAAS,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAkB,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,KAAc,EAAE,CAAC,CAAC;QAC1K,KAAK,aAAa,CAAC,CAAC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,aAAsB,EAAE,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,KAAc,EAAE,CAAC,CAAC;IAC9J,CAAC;AACL,CAAC","sourcesContent":["// @concord-file ne-eval-record-score\n// @concord-implements docs/feature/assertions/library/score-points.md\n// @concord-implements docs/feature/verdict/README.md\n// @concord-implements docs/feature/eval/use-case/rubric-points.md\nimport { Result, Schema } from \"effect\";\nimport { ExactEvaluationParseOptions, FiniteNonNegativeNumberSchema, type FiniteNonNegativeNumber, } from \"./attachment.ts\";\nimport { EvaluationAttemptFactsSchema, recordedAttemptFacts, type EvaluationAttemptFacts, } from \"./sealed-assertion.ts\";\nimport type { AssertionsAttachment } from \"../../record/family/assertions/definition.ts\";\nimport type { AttemptOutcome } from \"../../record/model/core.ts\";\n/** Score is an Analysis calculation, not an independently persisted family. */\nexport const ScoreStateSchema = Schema.Literals([\n \"complete\",\n \"partial\",\n \"unavailable\",\n]);\nexport type ScoreState = Schema.toType<typeof ScoreStateSchema>[\"Type\"];\nexport const ScoreIncompleteReasonSchema = Schema.Literals([\n \"execution-errored\",\n \"source-unavailable\",\n \"evaluation-errored\",\n \"not-applicable\",\n]);\nexport type ScoreIncompleteReason = Schema.toType<typeof ScoreIncompleteReasonSchema>[\"Type\"];\nexport const ScoreIncompleteReasonsSchema = Schema.NonEmptyArray(ScoreIncompleteReasonSchema);\nexport type ScoreIncompleteReasons = Schema.toType<typeof ScoreIncompleteReasonsSchema>[\"Type\"];\nexport const EarnedScoreSchema = FiniteNonNegativeNumberSchema;\nexport type EarnedScore = FiniteNonNegativeNumber;\nconst ScorePayloadStructuralSchema = Schema.Union([\n Schema.Struct({ state: Schema.Literal(\"complete\"), earned: EarnedScoreSchema }),\n Schema.Struct({\n state: Schema.Literal(\"partial\"),\n earned: EarnedScoreSchema,\n reasons: ScoreIncompleteReasonsSchema,\n }),\n Schema.Struct({\n state: Schema.Literal(\"unavailable\"),\n reasons: ScoreIncompleteReasonsSchema,\n }),\n]);\nexport type ScorePayload = Schema.toType<typeof ScorePayloadStructuralSchema>[\"Type\"];\nexport type ScorePayloadEncoded = Schema.Codec.Encoded<typeof ScorePayloadStructuralSchema>;\nexport type ScorePayloadIssue = {\n readonly code: \"score-incomplete-reason-duplicate\";\n readonly reason: ScoreIncompleteReason;\n} | {\n readonly code: \"score-incomplete-reason-order-invalid\";\n readonly index: number;\n readonly reason: ScoreIncompleteReason;\n};\nfunction scoreIncompleteReasonRank(reason: ScoreIncompleteReason): number {\n switch (reason) {\n case \"execution-errored\": return 0;\n case \"source-unavailable\": return 1;\n case \"evaluation-errored\": return 2;\n case \"not-applicable\": return 3;\n }\n}\nfunction incompleteReasonsOf(payload: ScorePayload): readonly ScoreIncompleteReason[] {\n return payload.state === \"complete\" ? [] : payload.reasons;\n}\nexport function validateScorePayload(payload: ScorePayload): readonly ScorePayloadIssue[] {\n const issues: ScorePayloadIssue[] = [];\n const seen = new Set<ScoreIncompleteReason>();\n let previousRank: number | undefined;\n for (const [index, reason] of incompleteReasonsOf(payload).entries()) {\n const rank = scoreIncompleteReasonRank(reason);\n if (seen.has(reason)) {\n issues.push(Object.freeze({ code: \"score-incomplete-reason-duplicate\" as const, reason }));\n }\n else if (previousRank !== undefined && previousRank >= rank) {\n issues.push(Object.freeze({ code: \"score-incomplete-reason-order-invalid\" as const, index, reason }));\n }\n seen.add(reason);\n previousRank = rank;\n }\n return Object.freeze(issues);\n}\nexport const ScorePayloadSchema = ScorePayloadStructuralSchema.pipe(Schema.refine((payload): payload is typeof payload => validateScorePayload(payload).length === 0, {\n identifier: \"ScoreCalculation\",\n description: \"a canonical transient score calculation\",\n}));\nexport type ScoreFoldInput = EvaluationAttemptFacts;\nexport const ScoreFoldInputSchema = EvaluationAttemptFactsSchema;\nexport type ScoreBuildInput = ScoreFoldInput;\nexport const ScoreBuildInputSchema = ScoreFoldInputSchema;\nexport type ScorePayloadBuildError = {\n readonly code: \"score-fold-input-invalid\";\n} | {\n readonly code: \"score-earned-overflow\";\n};\nfunction canonicalIncompleteReasons(reasons: readonly ScoreIncompleteReason[]): readonly ScoreIncompleteReason[] {\n return Object.freeze([...new Set(reasons)].sort((left, right) => scoreIncompleteReasonRank(left) - scoreIncompleteReasonRank(right)));\n}\nfunction asNonEmptyReasons(reasons: readonly ScoreIncompleteReason[]): ScoreIncompleteReasons | undefined {\n const [first, ...rest] = reasons;\n return first === undefined ? undefined : Object.freeze([first, ...rest]);\n}\n/** Folds sealed Assertion facts without producing a durable Record write. */\nexport function buildScorePayload(input: ScoreFoldInput): Result.Result<ScorePayload, ScorePayloadBuildError> {\n const decoded = Schema.decodeUnknownResult(Schema.toType(ScoreFoldInputSchema), ExactEvaluationParseOptions)(input);\n if (Result.isFailure(decoded)) {\n return Result.fail(Object.freeze({ code: \"score-fold-input-invalid\" as const }));\n }\n let earned = 0;\n let hasAuditableContribution = false;\n const incompleteReasons: ScoreIncompleteReason[] = [];\n for (const assertion of decoded.success.assertions) {\n switch (assertion.result.score.state) {\n case \"not-scored\": break;\n case \"earned\":\n hasAuditableContribution = true;\n earned += assertion.result.score.earned;\n if (!Number.isFinite(earned)) {\n return Result.fail(Object.freeze({ code: \"score-earned-overflow\" as const }));\n }\n break;\n case \"unavailable\":\n if (assertion.required)\n incompleteReasons.push(assertion.result.score.reason);\n break;\n }\n }\n if (decoded.success.execution === \"errored\")\n incompleteReasons.push(\"execution-errored\");\n const reasons = canonicalIncompleteReasons(incompleteReasons);\n if (reasons.length === 0)\n return Result.succeed(Object.freeze({ state: \"complete\" as const, earned }));\n const nonEmptyReasons = asNonEmptyReasons(reasons);\n if (nonEmptyReasons === undefined)\n throw new Error(\"Non-empty score reasons became empty\");\n return hasAuditableContribution\n ? Result.succeed(Object.freeze({ state: \"partial\" as const, earned, reasons: nonEmptyReasons }))\n : Result.succeed(Object.freeze({ state: \"unavailable\" as const, reasons: nonEmptyReasons }));\n}\n/** Folds Score from the same immutable Record/Core facts as Verdict. */\n// @concord-code ne-eval-fold-score\n// @concord-implements docs/feature/assertions/library/score-points.md\n// @concord-implements docs/feature/eval/use-case/rubric-points.md\nexport function foldRecordedAttemptScore(input: {\n readonly outcome: AttemptOutcome;\n readonly assertions: AssertionsAttachment;\n}): Result.Result<ScorePayload, ScorePayloadBuildError> {\n return buildScorePayload(recordedAttemptFacts(input));\n}\nexport type ScoreCoherenceIssue = {\n readonly code: \"score-fold-input-invalid\";\n readonly reason: ScorePayloadBuildError[\"code\"];\n} | {\n readonly code: \"score-payload-mismatch\";\n};\nfunction sameReasons(left: readonly ScoreIncompleteReason[], right: readonly ScoreIncompleteReason[]): boolean {\n return left.length === right.length && left.every((reason, index) => reason === right[index]);\n}\nfunction sameScorePayload(left: ScorePayload, right: ScorePayload): boolean {\n if (left.state !== right.state)\n return false;\n if (left.state === \"complete\")\n return right.state === \"complete\" && left.earned === right.earned;\n if (left.state === \"partial\")\n return right.state === \"partial\" && left.earned === right.earned && sameReasons(left.reasons, right.reasons);\n return right.state === \"unavailable\" && sameReasons(left.reasons, right.reasons);\n}\nexport function validateScoreCoherence(input: {\n readonly payload: ScorePayload;\n readonly fold: ScoreFoldInput;\n}): readonly ScoreCoherenceIssue[] {\n const expected = buildScorePayload(input.fold);\n if (Result.isFailure(expected)) {\n return Object.freeze([Object.freeze({ code: \"score-fold-input-invalid\" as const, reason: expected.failure.code })]);\n }\n return sameScorePayload(input.payload, expected.success)\n ? Object.freeze([])\n : Object.freeze([Object.freeze({ code: \"score-payload-mismatch\" as const })]);\n}\nexport type Score = {\n readonly state: \"complete\";\n readonly earned: number;\n readonly comparable: true;\n} | {\n readonly state: \"partial\";\n readonly earned: number;\n readonly reasons: ScoreIncompleteReasons;\n readonly comparable: false;\n} | {\n readonly state: \"unavailable\";\n readonly reasons: ScoreIncompleteReasons;\n readonly comparable: false;\n};\nexport type ScoreProjection = Score;\nfunction scoreIncompleteReasons(reasons: readonly ScoreIncompleteReason[]): ScoreIncompleteReasons {\n const [first, ...rest] = reasons;\n if (first === undefined)\n throw new Error(\"An incomplete score needs a reason\");\n return Object.freeze([first, ...rest]);\n}\nexport function projectScorePayload(payload: ScorePayload): Score {\n switch (payload.state) {\n case \"complete\": return Object.freeze({ state: \"complete\" as const, earned: payload.earned, comparable: true as const });\n case \"partial\": return Object.freeze({ state: \"partial\" as const, earned: payload.earned, reasons: scoreIncompleteReasons(payload.reasons), comparable: false as const });\n case \"unavailable\": return Object.freeze({ state: \"unavailable\" as const, reasons: scoreIncompleteReasons(payload.reasons), comparable: false as const });\n }\n}\n"]}
|
|
@@ -4,6 +4,9 @@ exports.EvaluationAttemptFactsSchema = exports.SealedAssertionForEvaluationSchem
|
|
|
4
4
|
exports.recordedAttemptFacts = recordedAttemptFacts;
|
|
5
5
|
exports.isRequiredAssertionUnavailableOrErrored = isRequiredAssertionUnavailableOrErrored;
|
|
6
6
|
exports.isGateFailed = isGateFailed;
|
|
7
|
+
// @concord-file ne-eval-sealed-assertion-facts
|
|
8
|
+
// @concord-implements docs/feature/assertions/README.md
|
|
9
|
+
// @concord-implements docs/feature/verdict/README.md
|
|
7
10
|
const effect_1 = require("effect");
|
|
8
11
|
const codec_ts_1 = require("../../assertions/record/codec.cjs");
|
|
9
12
|
Object.defineProperty(exports, "SealedAssertionResultSchema", { enumerable: true, get: function () { return codec_ts_1.SealedAssertionResultSchema; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sealed-assertion.js","sourceRoot":"","sources":["sealed-assertion.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sealed-assertion.js","sourceRoot":"","sources":["sealed-assertion.ts"],"names":[],"mappings":";;;AAkCA,oDAcC;AACD,0FAGC;AACD,oCAEC;AAvDD,+CAA+C;AAC/C,wDAAwD;AACxD,qDAAqD;AACrD,mCAAgC;AAChC,+DAAwH;AAUtE,4GAVV,sCAAqC,OAUA;AAR7E,+DAAyE;AAUzE;;;;GAIG;AACU,QAAA,kCAAkC,GAAG,eAAM,CAAC,MAAM,CAAC;IAC5D,QAAQ,EAAE,eAAM,CAAC,OAAO;IACxB,MAAM,EAAE,sCAAqC;CAChD,CAAC,CAAC;AAEH,4EAA4E;AAC/D,QAAA,4BAA4B,GAAG,eAAM,CAAC,MAAM,CAAC;IACtD,SAAS,EAAE,eAAM,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACpD,iBAAiB,EAAE,eAAM,CAAC,OAAO;IACjC,UAAU,EAAE,eAAM,CAAC,KAAK,CAAC,0CAAkC,CAAC;CAC/D,CAAC,CAAC;AAEH,oFAAoF;AACpF,SAAgB,oBAAoB,CAAC,KAGpC;IACG,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,SAAS,EAAE,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,KAAK,aAAa;YACrE,CAAC,CAAC,SAAkB;YACpB,CAAC,CAAC,WAAoB;QAC1B,iBAAiB,EAAE,KAAK,CAAC,OAAO,KAAK,WAAW;QAChD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;YAC5E,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,KAAK,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,KAAK,UAAU;YACzG,MAAM,EAAE,IAAA,gCAAqB,EAAC,KAAK,CAAC;SACvC,CAAC,CAAC,CAAC;KACP,CAAC,CAAC;AACP,CAAC;AACD,SAAgB,uCAAuC,CAAC,SAAuC;IAC3F,OAAO,SAAS,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,KAAK,aAAa;WAC/D,SAAS,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;AACjD,CAAC;AACD,SAAgB,YAAY,CAAC,SAAuC;IAChE,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC9C,CAAC","sourcesContent":["// @concord-file ne-eval-sealed-assertion-facts\n// @concord-implements docs/feature/assertions/README.md\n// @concord-implements docs/feature/verdict/README.md\nimport { Schema } from \"effect\";\nimport { SealedAssertionResultSchema as AssertionsSealedAssertionResultSchema } from \"../../assertions/record/codec.ts\";\nimport type { EarnedScoreContribution, GateDisposition, NoScoreContribution, ScoreContribution, SealedAssertionResult, UnavailableScoreContribution, } from \"../../assertions/record/model.ts\";\nimport { sealedAssertionResult } from \"../../assertions/record/model.ts\";\nimport type { AssertionsAttachment } from \"../../record/family/assertions/definition.ts\";\nimport type { AttemptOutcome } from \"../../record/model/core.ts\";\n/**\n * Eval folds consume the Assertions owner's sealed-result contract directly.\n * They deliberately do not re-own the Assertions Attachment or its blob\n * closure; `required` below is Eval producer policy only.\n */\nexport { AssertionsSealedAssertionResultSchema as SealedAssertionResultSchema, };\nexport type { EarnedScoreContribution, GateDisposition, NoScoreContribution, ScoreContribution, SealedAssertionResult, UnavailableScoreContribution, };\n/**\n * `required` is producer policy, not a field added to the Assertions\n * Attachment. It determines whether an otherwise-local unavailable result\n * raises the Attempt Verdict to errored.\n */\nexport const SealedAssertionForEvaluationSchema = Schema.Struct({\n required: Schema.Boolean,\n result: AssertionsSealedAssertionResultSchema,\n});\nexport type SealedAssertionForEvaluation = Schema.toType<typeof SealedAssertionForEvaluationSchema>[\"Type\"];\n/** All producer facts shared by the independent Verdict and Score folds. */\nexport const EvaluationAttemptFactsSchema = Schema.Struct({\n execution: Schema.Literals([\"completed\", \"errored\"]),\n explicitlySkipped: Schema.Boolean,\n assertions: Schema.Array(SealedAssertionForEvaluationSchema),\n});\nexport type EvaluationAttemptFacts = Schema.toType<typeof EvaluationAttemptFactsSchema>[\"Type\"];\n/** The sole Record/Core adapter shared by the canonical Verdict and Score folds. */\nexport function recordedAttemptFacts(input: {\n readonly outcome: AttemptOutcome;\n readonly assertions: AssertionsAttachment;\n}): EvaluationAttemptFacts {\n return Object.freeze({\n execution: input.outcome === \"errored\" || input.outcome === \"interrupted\"\n ? \"errored\" as const\n : \"completed\" as const,\n explicitlySkipped: input.outcome === \"cancelled\",\n assertions: Object.freeze(input.assertions.entries.map((entry) => Object.freeze({\n required: entry.policy.requirement.state === \"available\" && entry.policy.requirement.value === \"required\",\n result: sealedAssertionResult(entry),\n }))),\n });\n}\nexport function isRequiredAssertionUnavailableOrErrored(assertion: SealedAssertionForEvaluation): boolean {\n return assertion.required && (assertion.result.state === \"unavailable\"\n || assertion.result.state === \"errored\");\n}\nexport function isGateFailed(assertion: SealedAssertionForEvaluation): boolean {\n return assertion.result.gate === \"failed\";\n}\n"]}
|
|
@@ -6,6 +6,10 @@ exports.foldRecordedAttemptVerdict = foldRecordedAttemptVerdict;
|
|
|
6
6
|
exports.buildVerdictPayload = buildVerdictPayload;
|
|
7
7
|
exports.validateVerdictCoherence = validateVerdictCoherence;
|
|
8
8
|
exports.projectVerdictPayload = projectVerdictPayload;
|
|
9
|
+
// @concord-file ne-eval-record-verdict
|
|
10
|
+
// @concord-implements docs/feature/verdict/README.md
|
|
11
|
+
// @concord-implements docs/feature/verdict/architecture.md
|
|
12
|
+
// @concord-implements docs/feature/verdict/use-case/strict-quality-gate.md
|
|
9
13
|
const effect_1 = require("effect");
|
|
10
14
|
const types_ts_1 = require("../../shared/types.cjs");
|
|
11
15
|
const sealed_assertion_ts_1 = require("./sealed-assertion.cjs");
|
|
@@ -18,6 +22,9 @@ exports.VerdictPayloadSchema = effect_1.Schema.Struct({
|
|
|
18
22
|
state: exports.VerdictStateSchema,
|
|
19
23
|
});
|
|
20
24
|
exports.VerdictFoldInputSchema = sealed_assertion_ts_1.EvaluationAttemptFactsSchema;
|
|
25
|
+
// @concord-code ne-eval-fold-verdict
|
|
26
|
+
// @concord-implements docs/feature/verdict/architecture.md
|
|
27
|
+
// @concord-implements docs/feature/verdict/use-case/strict-quality-gate.md
|
|
21
28
|
function foldVerdict(input) {
|
|
22
29
|
if (input.execution === "errored"
|
|
23
30
|
|| input.assertions.some(sealed_assertion_ts_1.isRequiredAssertionUnavailableOrErrored)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verdict.js","sourceRoot":"","sources":["verdict.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"verdict.js","sourceRoot":"","sources":["verdict.ts"],"names":[],"mappings":";;;AAyBA,kCAQC;AAMD,gEAKC;AACD,kDAEC;AAMD,4DAcC;AAED,sDAEC;AAvED,uCAAuC;AACvC,qDAAqD;AACrD,2DAA2D;AAC3D,2EAA2E;AAC3E,mCAAgC;AAGhC,oDAA+D;AAC/D,+DAAgL;AAChL;;;GAGG;AACU,QAAA,kBAAkB,GAAG,eAAM,CAAC,QAAQ,CAAC,mBAAQ,CAAC,CAAC;AAE/C,QAAA,oBAAoB,GAAG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AgB,qBAAqB,CAAC,OAAuB;IACzD,OAAO,OAAO,CAAC,KAAK,CAAC;AACzB,CAAC","sourcesContent":["// @concord-file ne-eval-record-verdict\n// @concord-implements docs/feature/verdict/README.md\n// @concord-implements docs/feature/verdict/architecture.md\n// @concord-implements docs/feature/verdict/use-case/strict-quality-gate.md\nimport { Schema } from \"effect\";\nimport type { AssertionsAttachment } from \"../../record/family/assertions/definition.ts\";\nimport type { AttemptOutcome } from \"../../record/model/core.ts\";\nimport { VERDICTS, type Verdict } from \"../../shared/types.ts\";\nimport { EvaluationAttemptFactsSchema, isGateFailed, isRequiredAssertionUnavailableOrErrored, recordedAttemptFacts, type EvaluationAttemptFacts, } from \"./sealed-assertion.ts\";\n/**\n * A transient fold result. Verdict is derived from sealed Assertion facts and\n * Attempt outcome; it is deliberately not a Record Attachment family.\n */\nexport const VerdictStateSchema = Schema.Literals(VERDICTS);\nexport type VerdictState = Schema.toType<typeof VerdictStateSchema>[\"Type\"];\nexport const VerdictPayloadSchema = Schema.Struct({\n state: VerdictStateSchema,\n});\nexport type VerdictPayload = Schema.toType<typeof VerdictPayloadSchema>[\"Type\"];\nexport type VerdictPayloadEncoded = Schema.Codec.Encoded<typeof VerdictPayloadSchema>;\nexport type VerdictFoldInput = EvaluationAttemptFacts;\nexport const VerdictFoldInputSchema = EvaluationAttemptFactsSchema;\n// @concord-code ne-eval-fold-verdict\n// @concord-implements docs/feature/verdict/architecture.md\n// @concord-implements docs/feature/verdict/use-case/strict-quality-gate.md\nexport function foldVerdict(input: VerdictFoldInput): VerdictState {\n if (input.execution === \"errored\"\n || input.assertions.some(isRequiredAssertionUnavailableOrErrored)) {\n return \"errored\";\n }\n if (input.assertions.some(isGateFailed))\n return \"failed\";\n return input.explicitlySkipped ? \"skipped\" : \"passed\";\n}\n/**\n * Folds the public Verdict from the immutable Attempt outcome and verified\n * Assertions payload. This is the one adapter from Record's terminal Core\n * state into the verdict fold; consumers must not reproduce these rules.\n */\nexport function foldRecordedAttemptVerdict(input: {\n readonly outcome: AttemptOutcome;\n readonly assertions: AssertionsAttachment;\n}): VerdictState {\n return foldVerdict(recordedAttemptFacts(input));\n}\nexport function buildVerdictPayload(input: VerdictFoldInput): VerdictPayload {\n return Object.freeze({ state: foldVerdict(input) });\n}\nexport type VerdictCoherenceIssue = {\n readonly code: \"verdict-fold-mismatch\";\n readonly expected: VerdictState;\n readonly actual: VerdictState;\n};\nexport function validateVerdictCoherence(input: {\n readonly payload: VerdictPayload;\n readonly fold: VerdictFoldInput;\n}): readonly VerdictCoherenceIssue[] {\n const expected = foldVerdict(input.fold);\n return input.payload.state === expected\n ? Object.freeze([])\n : Object.freeze([\n Object.freeze({\n code: \"verdict-fold-mismatch\" as const,\n expected,\n actual: input.payload.state,\n }),\n ]);\n}\n/** Plain domain projection for callers that need NiceEval's public verdict. */\nexport function projectVerdictPayload(payload: VerdictPayload): Verdict {\n return payload.state;\n}\n"]}
|
package/dist/expect/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.defineContextMatch = exports.defineMaterialMatch = exports.pairwisePreference = exports.instructionFollowing = exports.faithfulness = exports.factuality = exports.toolMatch = exports.similarity = exports.satisfies = exports.referencesAnyPath = exports.pattern = exports.or = exports.not = exports.mapValue = exports.mapEach = exports.matches = exports.lessThan = exports.hasSections = exports.jsonMatch = exports.isTrue = exports.isFalse = exports.isDefined = exports.inOrder = exports.includesUrl = exports.includes = exports.greaterThan = exports.filterWhere = exports.excludes = exports.eventMatch = exports.equals = exports.defineValueMatch = exports.defineScoreMatch = exports.countWhere = exports.commandSucceeded = exports.commandMatch = exports.atMost = exports.atLeast = exports.and = exports.defineJudge = void 0;
|
|
4
4
|
// niceeval/expect:只导出纯 Match factories。Fact、verdict 与 score use 由 context 负责。
|
|
5
5
|
var judge_ts_1 = require("../assertions/judge.cjs");
|
|
6
6
|
Object.defineProperty(exports, "defineJudge", { enumerable: true, get: function () { return judge_ts_1.defineJudge; } });
|
|
@@ -10,11 +10,13 @@ Object.defineProperty(exports, "atLeast", { enumerable: true, get: function () {
|
|
|
10
10
|
Object.defineProperty(exports, "atMost", { enumerable: true, get: function () { return match_ts_1.atMost; } });
|
|
11
11
|
Object.defineProperty(exports, "commandMatch", { enumerable: true, get: function () { return match_ts_1.commandMatch; } });
|
|
12
12
|
Object.defineProperty(exports, "commandSucceeded", { enumerable: true, get: function () { return match_ts_1.commandSucceeded; } });
|
|
13
|
+
Object.defineProperty(exports, "countWhere", { enumerable: true, get: function () { return match_ts_1.countWhere; } });
|
|
13
14
|
Object.defineProperty(exports, "defineScoreMatch", { enumerable: true, get: function () { return match_ts_1.defineScoreMatch; } });
|
|
14
15
|
Object.defineProperty(exports, "defineValueMatch", { enumerable: true, get: function () { return match_ts_1.defineValueMatch; } });
|
|
15
16
|
Object.defineProperty(exports, "equals", { enumerable: true, get: function () { return match_ts_1.equals; } });
|
|
16
17
|
Object.defineProperty(exports, "eventMatch", { enumerable: true, get: function () { return match_ts_1.eventMatch; } });
|
|
17
18
|
Object.defineProperty(exports, "excludes", { enumerable: true, get: function () { return match_ts_1.excludes; } });
|
|
19
|
+
Object.defineProperty(exports, "filterWhere", { enumerable: true, get: function () { return match_ts_1.filterWhere; } });
|
|
18
20
|
Object.defineProperty(exports, "greaterThan", { enumerable: true, get: function () { return match_ts_1.greaterThan; } });
|
|
19
21
|
Object.defineProperty(exports, "includes", { enumerable: true, get: function () { return match_ts_1.includes; } });
|
|
20
22
|
Object.defineProperty(exports, "includesUrl", { enumerable: true, get: function () { return match_ts_1.includesUrl; } });
|
|
@@ -26,6 +28,8 @@ Object.defineProperty(exports, "jsonMatch", { enumerable: true, get: function ()
|
|
|
26
28
|
Object.defineProperty(exports, "hasSections", { enumerable: true, get: function () { return match_ts_1.hasSections; } });
|
|
27
29
|
Object.defineProperty(exports, "lessThan", { enumerable: true, get: function () { return match_ts_1.lessThan; } });
|
|
28
30
|
Object.defineProperty(exports, "matches", { enumerable: true, get: function () { return match_ts_1.matches; } });
|
|
31
|
+
Object.defineProperty(exports, "mapEach", { enumerable: true, get: function () { return match_ts_1.mapEach; } });
|
|
32
|
+
Object.defineProperty(exports, "mapValue", { enumerable: true, get: function () { return match_ts_1.mapValue; } });
|
|
29
33
|
Object.defineProperty(exports, "not", { enumerable: true, get: function () { return match_ts_1.not; } });
|
|
30
34
|
Object.defineProperty(exports, "or", { enumerable: true, get: function () { return match_ts_1.or; } });
|
|
31
35
|
Object.defineProperty(exports, "pattern", { enumerable: true, get: function () { return match_ts_1.pattern; } });
|
|
@@ -34,9 +38,11 @@ Object.defineProperty(exports, "satisfies", { enumerable: true, get: function ()
|
|
|
34
38
|
Object.defineProperty(exports, "similarity", { enumerable: true, get: function () { return match_ts_1.similarity; } });
|
|
35
39
|
Object.defineProperty(exports, "toolMatch", { enumerable: true, get: function () { return match_ts_1.toolMatch; } });
|
|
36
40
|
var judge_presets_ts_1 = require("../assertions/judge-presets.cjs");
|
|
37
|
-
Object.defineProperty(exports, "closeQA", { enumerable: true, get: function () { return judge_presets_ts_1.closeQA; } });
|
|
38
41
|
Object.defineProperty(exports, "factuality", { enumerable: true, get: function () { return judge_presets_ts_1.factuality; } });
|
|
39
42
|
Object.defineProperty(exports, "faithfulness", { enumerable: true, get: function () { return judge_presets_ts_1.faithfulness; } });
|
|
40
43
|
Object.defineProperty(exports, "instructionFollowing", { enumerable: true, get: function () { return judge_presets_ts_1.instructionFollowing; } });
|
|
41
44
|
Object.defineProperty(exports, "pairwisePreference", { enumerable: true, get: function () { return judge_presets_ts_1.pairwisePreference; } });
|
|
45
|
+
var context_match_ts_1 = require("../assertions/context-match.cjs");
|
|
46
|
+
Object.defineProperty(exports, "defineMaterialMatch", { enumerable: true, get: function () { return context_match_ts_1.defineMaterialMatch; } });
|
|
47
|
+
Object.defineProperty(exports, "defineContextMatch", { enumerable: true, get: function () { return context_match_ts_1.defineContextMatch; } });
|
|
42
48
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AAC9E,mDAAqD;AAA5C,uGAAA,WAAW,OAAA;AAEpB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAAA,8EAA8E;AAC9E,mDAAqD;AAA5C,uGAAA,WAAW,OAAA;AAEpB,mDAAwY;AAA/X,+FAAA,GAAG,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,kGAAA,MAAM,OAAA;AAAE,wGAAA,YAAY,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,sGAAA,UAAU,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,4GAAA,gBAAgB,OAAA;AAAE,kGAAA,MAAM,OAAA;AAAE,sGAAA,UAAU,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,uGAAA,WAAW,OAAA;AAAE,uGAAA,WAAW,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,uGAAA,WAAW,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,kGAAA,MAAM,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,uGAAA,WAAW,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAAE,+FAAA,GAAG,OAAA;AAAE,8FAAA,EAAE,OAAA;AAAE,mGAAA,OAAO,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAAE,qGAAA,SAAS,OAAA;AAAE,sGAAA,UAAU,OAAA;AAAE,qGAAA,SAAS,OAAA;AAEtW,mEAAoH;AAA3G,8GAAA,UAAU,OAAA;AAAE,gHAAA,YAAY,OAAA;AAAE,wHAAA,oBAAoB,OAAA;AAAE,sHAAA,kBAAkB,OAAA;AAE3E,mEAAyF;AAAhF,uHAAA,mBAAmB,OAAA;AAAE,sHAAA,kBAAkB,OAAA","sourcesContent":["// niceeval/expect:只导出纯 Match factories。Fact、verdict 与 score use 由 context 负责。\nexport { defineJudge } from \"../assertions/judge.ts\";\nexport type { JudgeAnchor, JudgeDefinition, JudgeOptions } from \"../assertions/judge.ts\";\nexport { and, atLeast, atMost, commandMatch, commandSucceeded, countWhere, defineScoreMatch, defineValueMatch, equals, eventMatch, excludes, filterWhere, greaterThan, includes, includesUrl, inOrder, isDefined, isFalse, isTrue, jsonMatch, hasSections, lessThan, matches, mapEach, mapValue, not, or, pattern, referencesAnyPath, satisfies, similarity, toolMatch, } from \"../assertions/match.ts\";\nexport type { BooleanMatch, CollectionMatch, CollectionValue, CommandMatchOptions, EventMatch, EventOccurrenceMatch, EventOccurrenceQuantifiers, EventOccurrenceView, EventSequenceMatch, EventUpperBoundOccurrenceMatch, EventOptionsByType, LogicalCommandOccurrence, ManagedToolCalls, ManagedEventOccurrences, Match, MatchDomain, NumericComparisonMatch, TextMatchOptions, ToolMatch, ToolOccurrenceMatch, ToolSequenceMatch, ToolUpperBoundOccurrenceMatch, ToolMatchOptions, ToolOccurrenceQuantifiers, ToolOccurrenceView, ToolStatus, ValueMatch, ManagedScoreMatchOptions, ScoreMatch, ScoreMatchContext, ScoreMatchLlmFailure, ScoreMatchResult, ScoreMatchAnchor, } from \"../assertions/match.ts\";\nexport { factuality, faithfulness, instructionFollowing, pairwisePreference } from \"../assertions/judge-presets.ts\";\nexport type { JudgePresetOptions, FactualityMaterial, FaithfulnessMaterial, InstructionFollowingMaterial, PairwisePreferenceMaterial } from \"../assertions/judge-presets.ts\";\nexport { defineMaterialMatch, defineContextMatch } from \"../assertions/context-match.ts\";\nexport type { MaterialMatch, ContextBooleanMatch, ContextScoreMatch, MatchContext, ReadonlyMaterial, MatchFact, MaterialCollection, MaterialItem, MaterialCaptureBudget, FactCaptureBudget } from \"../assertions/context-match.ts\";\nexport type { NumericMaterial } from \"../assertions/match.ts\";\nexport type { EvalUsage } from \"../o11y/eval-usage.ts\";\nexport type { AgentMatchContext } from \"../context/assert-first.ts\";\n"]}
|
package/dist/expect/index.d.cts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export { defineJudge } from "../assertions/judge.cjs";
|
|
2
2
|
export type { JudgeAnchor, JudgeDefinition, JudgeOptions } from "../assertions/judge.cjs";
|
|
3
|
-
export { and, atLeast, atMost, commandMatch, commandSucceeded, defineScoreMatch, defineValueMatch, equals, eventMatch, excludes, greaterThan, includes, includesUrl, inOrder, isDefined, isFalse, isTrue, jsonMatch, hasSections, lessThan, matches, not, or, pattern, referencesAnyPath, satisfies, similarity, toolMatch, } from "../assertions/match.cjs";
|
|
4
|
-
export type { BooleanMatch, CollectionMatch, CommandMatchOptions, EventMatch, EventOccurrenceMatch, EventOccurrenceQuantifiers, EventOccurrenceView, EventSequenceMatch, EventUpperBoundOccurrenceMatch, EventOptionsByType, LogicalCommandOccurrence, ManagedToolCalls, ManagedEventOccurrences, Match, MatchDomain, NumericComparisonMatch, TextMatchOptions, ToolMatch, ToolOccurrenceMatch, ToolSequenceMatch, ToolUpperBoundOccurrenceMatch, ToolMatchOptions, ToolOccurrenceQuantifiers, ToolOccurrenceView, ToolStatus, ValueMatch, ManagedScoreMatchOptions, ScoreMatch, ScoreMatchContext, ScoreMatchLlmFailure, ScoreMatchResult, ScoreMatchAnchor, } from "../assertions/match.cjs";
|
|
5
|
-
export {
|
|
6
|
-
export type {
|
|
3
|
+
export { and, atLeast, atMost, commandMatch, commandSucceeded, countWhere, defineScoreMatch, defineValueMatch, equals, eventMatch, excludes, filterWhere, greaterThan, includes, includesUrl, inOrder, isDefined, isFalse, isTrue, jsonMatch, hasSections, lessThan, matches, mapEach, mapValue, not, or, pattern, referencesAnyPath, satisfies, similarity, toolMatch, } from "../assertions/match.cjs";
|
|
4
|
+
export type { BooleanMatch, CollectionMatch, CollectionValue, CommandMatchOptions, EventMatch, EventOccurrenceMatch, EventOccurrenceQuantifiers, EventOccurrenceView, EventSequenceMatch, EventUpperBoundOccurrenceMatch, EventOptionsByType, LogicalCommandOccurrence, ManagedToolCalls, ManagedEventOccurrences, Match, MatchDomain, NumericComparisonMatch, TextMatchOptions, ToolMatch, ToolOccurrenceMatch, ToolSequenceMatch, ToolUpperBoundOccurrenceMatch, ToolMatchOptions, ToolOccurrenceQuantifiers, ToolOccurrenceView, ToolStatus, ValueMatch, ManagedScoreMatchOptions, ScoreMatch, ScoreMatchContext, ScoreMatchLlmFailure, ScoreMatchResult, ScoreMatchAnchor, } from "../assertions/match.cjs";
|
|
5
|
+
export { factuality, faithfulness, instructionFollowing, pairwisePreference } from "../assertions/judge-presets.cjs";
|
|
6
|
+
export type { JudgePresetOptions, FactualityMaterial, FaithfulnessMaterial, InstructionFollowingMaterial, PairwisePreferenceMaterial } from "../assertions/judge-presets.cjs";
|
|
7
|
+
export { defineMaterialMatch, defineContextMatch } from "../assertions/context-match.cjs";
|
|
8
|
+
export type { MaterialMatch, ContextBooleanMatch, ContextScoreMatch, MatchContext, ReadonlyMaterial, MatchFact, MaterialCollection, MaterialItem, MaterialCaptureBudget, FactCaptureBudget } from "../assertions/context-match.cjs";
|
|
9
|
+
export type { NumericMaterial } from "../assertions/match.cjs";
|
|
10
|
+
export type { EvalUsage } from "../o11y/eval-usage.cjs";
|
|
11
|
+
export type { AgentMatchContext } from "../context/assert-first.cjs";
|
package/dist/expect/index.d.mts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export { defineJudge } from "../assertions/judge.mjs";
|
|
2
2
|
export type { JudgeAnchor, JudgeDefinition, JudgeOptions } from "../assertions/judge.mjs";
|
|
3
|
-
export { and, atLeast, atMost, commandMatch, commandSucceeded, defineScoreMatch, defineValueMatch, equals, eventMatch, excludes, greaterThan, includes, includesUrl, inOrder, isDefined, isFalse, isTrue, jsonMatch, hasSections, lessThan, matches, not, or, pattern, referencesAnyPath, satisfies, similarity, toolMatch, } from "../assertions/match.mjs";
|
|
4
|
-
export type { BooleanMatch, CollectionMatch, CommandMatchOptions, EventMatch, EventOccurrenceMatch, EventOccurrenceQuantifiers, EventOccurrenceView, EventSequenceMatch, EventUpperBoundOccurrenceMatch, EventOptionsByType, LogicalCommandOccurrence, ManagedToolCalls, ManagedEventOccurrences, Match, MatchDomain, NumericComparisonMatch, TextMatchOptions, ToolMatch, ToolOccurrenceMatch, ToolSequenceMatch, ToolUpperBoundOccurrenceMatch, ToolMatchOptions, ToolOccurrenceQuantifiers, ToolOccurrenceView, ToolStatus, ValueMatch, ManagedScoreMatchOptions, ScoreMatch, ScoreMatchContext, ScoreMatchLlmFailure, ScoreMatchResult, ScoreMatchAnchor, } from "../assertions/match.mjs";
|
|
5
|
-
export {
|
|
6
|
-
export type {
|
|
3
|
+
export { and, atLeast, atMost, commandMatch, commandSucceeded, countWhere, defineScoreMatch, defineValueMatch, equals, eventMatch, excludes, filterWhere, greaterThan, includes, includesUrl, inOrder, isDefined, isFalse, isTrue, jsonMatch, hasSections, lessThan, matches, mapEach, mapValue, not, or, pattern, referencesAnyPath, satisfies, similarity, toolMatch, } from "../assertions/match.mjs";
|
|
4
|
+
export type { BooleanMatch, CollectionMatch, CollectionValue, CommandMatchOptions, EventMatch, EventOccurrenceMatch, EventOccurrenceQuantifiers, EventOccurrenceView, EventSequenceMatch, EventUpperBoundOccurrenceMatch, EventOptionsByType, LogicalCommandOccurrence, ManagedToolCalls, ManagedEventOccurrences, Match, MatchDomain, NumericComparisonMatch, TextMatchOptions, ToolMatch, ToolOccurrenceMatch, ToolSequenceMatch, ToolUpperBoundOccurrenceMatch, ToolMatchOptions, ToolOccurrenceQuantifiers, ToolOccurrenceView, ToolStatus, ValueMatch, ManagedScoreMatchOptions, ScoreMatch, ScoreMatchContext, ScoreMatchLlmFailure, ScoreMatchResult, ScoreMatchAnchor, } from "../assertions/match.mjs";
|
|
5
|
+
export { factuality, faithfulness, instructionFollowing, pairwisePreference } from "../assertions/judge-presets.mjs";
|
|
6
|
+
export type { JudgePresetOptions, FactualityMaterial, FaithfulnessMaterial, InstructionFollowingMaterial, PairwisePreferenceMaterial } from "../assertions/judge-presets.mjs";
|
|
7
|
+
export { defineMaterialMatch, defineContextMatch } from "../assertions/context-match.mjs";
|
|
8
|
+
export type { MaterialMatch, ContextBooleanMatch, ContextScoreMatch, MatchContext, ReadonlyMaterial, MatchFact, MaterialCollection, MaterialItem, MaterialCaptureBudget, FactCaptureBudget } from "../assertions/context-match.mjs";
|
|
9
|
+
export type { NumericMaterial } from "../assertions/match.mjs";
|
|
10
|
+
export type { EvalUsage } from "../o11y/eval-usage.mjs";
|
|
11
|
+
export type { AgentMatchContext } from "../context/assert-first.mjs";
|
package/dist/expect/index.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export { defineJudge } from "../assertions/judge.js";
|
|
2
2
|
export type { JudgeAnchor, JudgeDefinition, JudgeOptions } from "../assertions/judge.js";
|
|
3
|
-
export { and, atLeast, atMost, commandMatch, commandSucceeded, defineScoreMatch, defineValueMatch, equals, eventMatch, excludes, greaterThan, includes, includesUrl, inOrder, isDefined, isFalse, isTrue, jsonMatch, hasSections, lessThan, matches, not, or, pattern, referencesAnyPath, satisfies, similarity, toolMatch, } from "../assertions/match.js";
|
|
4
|
-
export type { BooleanMatch, CollectionMatch, CommandMatchOptions, EventMatch, EventOccurrenceMatch, EventOccurrenceQuantifiers, EventOccurrenceView, EventSequenceMatch, EventUpperBoundOccurrenceMatch, EventOptionsByType, LogicalCommandOccurrence, ManagedToolCalls, ManagedEventOccurrences, Match, MatchDomain, NumericComparisonMatch, TextMatchOptions, ToolMatch, ToolOccurrenceMatch, ToolSequenceMatch, ToolUpperBoundOccurrenceMatch, ToolMatchOptions, ToolOccurrenceQuantifiers, ToolOccurrenceView, ToolStatus, ValueMatch, ManagedScoreMatchOptions, ScoreMatch, ScoreMatchContext, ScoreMatchLlmFailure, ScoreMatchResult, ScoreMatchAnchor, } from "../assertions/match.js";
|
|
5
|
-
export {
|
|
6
|
-
export type {
|
|
3
|
+
export { and, atLeast, atMost, commandMatch, commandSucceeded, countWhere, defineScoreMatch, defineValueMatch, equals, eventMatch, excludes, filterWhere, greaterThan, includes, includesUrl, inOrder, isDefined, isFalse, isTrue, jsonMatch, hasSections, lessThan, matches, mapEach, mapValue, not, or, pattern, referencesAnyPath, satisfies, similarity, toolMatch, } from "../assertions/match.js";
|
|
4
|
+
export type { BooleanMatch, CollectionMatch, CollectionValue, CommandMatchOptions, EventMatch, EventOccurrenceMatch, EventOccurrenceQuantifiers, EventOccurrenceView, EventSequenceMatch, EventUpperBoundOccurrenceMatch, EventOptionsByType, LogicalCommandOccurrence, ManagedToolCalls, ManagedEventOccurrences, Match, MatchDomain, NumericComparisonMatch, TextMatchOptions, ToolMatch, ToolOccurrenceMatch, ToolSequenceMatch, ToolUpperBoundOccurrenceMatch, ToolMatchOptions, ToolOccurrenceQuantifiers, ToolOccurrenceView, ToolStatus, ValueMatch, ManagedScoreMatchOptions, ScoreMatch, ScoreMatchContext, ScoreMatchLlmFailure, ScoreMatchResult, ScoreMatchAnchor, } from "../assertions/match.js";
|
|
5
|
+
export { factuality, faithfulness, instructionFollowing, pairwisePreference } from "../assertions/judge-presets.js";
|
|
6
|
+
export type { JudgePresetOptions, FactualityMaterial, FaithfulnessMaterial, InstructionFollowingMaterial, PairwisePreferenceMaterial } from "../assertions/judge-presets.js";
|
|
7
|
+
export { defineMaterialMatch, defineContextMatch } from "../assertions/context-match.js";
|
|
8
|
+
export type { MaterialMatch, ContextBooleanMatch, ContextScoreMatch, MatchContext, ReadonlyMaterial, MatchFact, MaterialCollection, MaterialItem, MaterialCaptureBudget, FactCaptureBudget } from "../assertions/context-match.js";
|
|
9
|
+
export type { NumericMaterial } from "../assertions/match.js";
|
|
10
|
+
export type { EvalUsage } from "../o11y/eval-usage.js";
|
|
11
|
+
export type { AgentMatchContext } from "../context/assert-first.js";
|