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
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decodeInspectionOperation = decodeInspectionOperation;
|
|
4
|
+
// @concord-file ne-eval-inspection-query
|
|
5
|
+
// @concord-implements docs/feature/inspection/README.md
|
|
4
6
|
const effect_1 = require("effect");
|
|
5
7
|
const protocol_ts_1 = require("./protocol.cjs");
|
|
6
8
|
const protocol_values_ts_1 = require("./protocol-values.cjs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["query.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["query.ts"],"names":[],"mappings":";;AAgCA,8DASC;AAzCD,yCAAyC;AACzC,wDAAwD;AACxD,mCAAwC;AACxC,+CAA+K;AAC/K,6DAAsD;AAwBtD,MAAM,aAAa,GAAG,eAAM,CAAC,mBAAmB,CAAC,qCAAuB,EAAE;IACtE,gBAAgB,EAAE,OAAO;CAC5B,CAAC,CAAC;AACH,mEAAmE;AACnE,SAAgB,yBAAyB,CAAC,KAAc;IACpD,MAAM,OAAO,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,mCAAc,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9E,OAAO,eAAM,CAAC,SAAS,CAAC,OAAO,CAAC;QAC5B,CAAC,CAAC,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;YACxB,cAAc,EAAE,gBAAyB;YACzC,IAAI,EAAE,4BAAqC;YAC3C,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;SAClC,CAAC,CAAC;QACH,CAAC,CAAC,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpD,CAAC","sourcesContent":["// @concord-file ne-eval-inspection-query\n// @concord-implements docs/feature/inspection/README.md\nimport { Result, Schema } from \"effect\";\nimport { InspectionRequestSchema, type InspectionOperation, type InspectionOperationFor, type InspectionOperationId, type InspectionSuccessDocumentFor, } from \"./protocol.ts\";\nimport { QUERY_PROTOCOL } from \"./protocol-values.ts\";\n/** Presentation-neutral query boundary implemented by local or remote Inspection adapters. */\nexport interface InspectionQuery {\n inspect<Kind extends InspectionOperationId>(operation: InspectionOperationFor<Kind>): Promise<InspectionSuccessDocumentFor<Kind>>;\n}\nexport interface InspectionQueryProtocolError {\n readonly classification: \"protocol/query\";\n readonly code: \"inspection-request-invalid\" | \"inspection-source-invalid\" | \"inspection-record-integrity-failure\" | \"inspection-operation-failed\" | \"inspection-result-invalid\" | \"evidence-budget-exceeded\" | \"restart-required\";\n readonly reason: string;\n readonly identity?: {\n readonly runId: string;\n };\n readonly cause?: unknown;\n}\nexport interface InspectionQuerySelectionError {\n readonly classification: \"selection\";\n readonly code: \"inspection-selection-missing\";\n readonly reason: string;\n readonly cause?: unknown;\n}\nexport type InspectionQueryError = InspectionQueryProtocolError | InspectionQuerySelectionError;\nexport interface InspectionOperationDecodeError extends InspectionQueryProtocolError {\n readonly code: \"inspection-request-invalid\";\n}\nconst decodeRequest = Schema.decodeUnknownResult(InspectionRequestSchema, {\n onExcessProperty: \"error\",\n});\n/** Runtime-safe operation builder for route and adapter inputs. */\nexport function decodeInspectionOperation(input: unknown): Result.Result<InspectionOperation, InspectionOperationDecodeError> {\n const decoded = decodeRequest({ protocol: QUERY_PROTOCOL, operation: input });\n return Result.isFailure(decoded)\n ? Result.fail(Object.freeze({\n classification: \"protocol/query\" as const,\n code: \"inspection-request-invalid\" as const,\n reason: String(decoded.failure),\n }))\n : Result.succeed(decoded.success.operation);\n}\n"]}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InspectionAttemptDiffResultSchema = exports.InspectionAttemptTimingResultSchema = exports.InspectionRunOverviewResultSchema = exports.InspectionAttemptUsageResultSchema = exports.InspectionTraceDetailResultSchema = exports.InspectionTraceDetailItemSchema = exports.InspectionTraceResultSchema = exports.InspectionTraceItemSchema = exports.InspectionSourcesResultSchema = exports.InspectionAttemptResultSchema = exports.InspectionRunSummaryResultSchema = exports.InspectionScoredValueSchema = exports.InspectionRunListResultSchema = exports.InspectionRunResultSchema = exports.InspectionRunValueSchema = exports.InspectionExperimentResultSchema = exports.InspectionOverviewResultSchema = void 0;
|
|
3
|
+
exports.InspectionAttemptDiffResultSchema = exports.InspectionAttemptTimingResultSchema = exports.InspectionRunOverviewResultSchema = exports.InspectionAttemptUsageResultSchema = exports.InspectionTraceDetailResultSchema = exports.InspectionTraceDetailItemSchema = exports.InspectionTraceResultSchema = exports.InspectionTraceItemSchema = exports.ExecutionDisplayPreviewSchema = exports.InspectionSourcesResultSchema = exports.InspectionAttemptResultSchema = exports.InspectionRunSummaryResultSchema = exports.InspectionScoredValueSchema = exports.InspectionRunListResultSchema = exports.InspectionRunResultSchema = exports.InspectionRunValueSchema = exports.InspectionExperimentResultSchema = exports.InspectionOverviewResultSchema = void 0;
|
|
4
4
|
const effect_1 = require("effect");
|
|
5
5
|
const schema_ts_1 = require("../record/family/adapter-usage/schema.cjs");
|
|
6
|
+
const common_ts_1 = require("../record/family/common.cjs");
|
|
7
|
+
const schema_ts_2 = require("../record/family/judge-usage/schema.cjs");
|
|
8
|
+
const judge_usage_projection_ts_1 = require("../o11y/judge-usage-projection.cjs");
|
|
9
|
+
const bytes_ts_1 = require("./bytes.cjs");
|
|
10
|
+
const codec_ts_1 = require("../record/family/source-receipt/codec.cjs");
|
|
11
|
+
const adapter_usage_projection_ts_1 = require("../o11y/adapter-usage-projection.cjs");
|
|
6
12
|
const core_ts_1 = require("../record/codec/core.cjs");
|
|
7
13
|
const identifiers_ts_1 = require("../record/codec/identifiers.cjs");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
14
|
+
const schema_ts_3 = require("../record/family/agent-turns/schema.cjs");
|
|
15
|
+
const schema_ts_4 = require("../record/family/execution-traces/schema.cjs");
|
|
16
|
+
const schema_ts_5 = require("../record/family/file-changes/schema.cjs");
|
|
11
17
|
const index_ts_1 = require("../record/family/source-receipt/index.cjs");
|
|
12
18
|
const protocol_values_ts_1 = require("../record/family/protocol-values.cjs");
|
|
13
|
-
const
|
|
19
|
+
const codec_ts_2 = require("../record/family/source-receipt/codec.cjs");
|
|
14
20
|
const model_ts_1 = require("../record/family/source-receipt/model.cjs");
|
|
15
21
|
const index_ts_2 = require("../run/index.cjs");
|
|
16
22
|
const run_context_ts_1 = require("../record/model/run-context.cjs");
|
|
@@ -25,6 +31,7 @@ const AssertionLimitationSchema = effect_1.Schema.Union([
|
|
|
25
31
|
effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("sampled"), captured: effect_1.Schema.Number, knownTotal: effect_1.Schema.optional(effect_1.Schema.Number) }),
|
|
26
32
|
effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("truncated"), omittedBytes: effect_1.Schema.Number }),
|
|
27
33
|
effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("provider-limited") }),
|
|
34
|
+
effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("capacity-limited"), capturedItems: effect_1.Schema.Number, knownTotalItems: effect_1.Schema.Number, omittedBytes: effect_1.Schema.NullOr(effect_1.Schema.Number) }),
|
|
28
35
|
]);
|
|
29
36
|
const OverviewIssueSchema = effect_1.Schema.Union([
|
|
30
37
|
effect_1.Schema.Struct({
|
|
@@ -74,7 +81,7 @@ const OverviewCoverageSchema = effect_1.Schema.Union([
|
|
|
74
81
|
entryId: effect_1.Schema.String,
|
|
75
82
|
groupPath: effect_1.Schema.Array(effect_1.Schema.String),
|
|
76
83
|
state: effect_1.Schema.Literals(["complete", "partial", "unavailable", "not-applicable"]),
|
|
77
|
-
reason: effect_1.Schema.optional(effect_1.Schema.Literals(["sampled", "truncated", "redacted", "provider-limited", "not-collected", "source-unavailable", "producer-failed", "optional-material", "unsupported-subject"])),
|
|
84
|
+
reason: effect_1.Schema.optional(effect_1.Schema.Literals(["sampled", "truncated", "redacted", "provider-limited", "capacity-limited", "not-collected", "source-unavailable", "producer-failed", "optional-material", "unsupported-subject"])),
|
|
78
85
|
limitations: effect_1.Schema.Array(AssertionLimitationSchema),
|
|
79
86
|
}),
|
|
80
87
|
]);
|
|
@@ -156,6 +163,28 @@ exports.InspectionOverviewResultSchema = effect_1.Schema.Struct({
|
|
|
156
163
|
cells: effect_1.Schema.Array(OverviewCellSchema),
|
|
157
164
|
});
|
|
158
165
|
exports.InspectionExperimentResultSchema = effect_1.Schema.Struct({
|
|
166
|
+
costSummary: effect_1.Schema.suspend(() => ExperimentCostSummarySchema),
|
|
167
|
+
modelUsage: effect_1.Schema.Struct({
|
|
168
|
+
attempts: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
169
|
+
locator: effect_1.Schema.String,
|
|
170
|
+
originRunId: effect_1.Schema.String,
|
|
171
|
+
usage: effect_1.Schema.suspend(() => effect_1.Schema.Struct({
|
|
172
|
+
state: exports.InspectionAttemptUsageResultSchema.fields.state,
|
|
173
|
+
configuredModels: exports.InspectionAttemptUsageResultSchema.fields.configuredModels,
|
|
174
|
+
modelGroups: exports.InspectionAttemptUsageResultSchema.fields.modelGroups,
|
|
175
|
+
judgeUsage: JudgeUsageSummarySchema,
|
|
176
|
+
totalCosts: exports.InspectionAttemptUsageResultSchema.fields.totalCosts,
|
|
177
|
+
totals: exports.InspectionAttemptUsageResultSchema.fields.totals,
|
|
178
|
+
})),
|
|
179
|
+
})),
|
|
180
|
+
totalAttemptCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
181
|
+
omittedAttemptCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
182
|
+
unresolvedAttemptCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
183
|
+
}).check(effect_1.Schema.makeFilter((usage) => usage.attempts.length <= 64 &&
|
|
184
|
+
usage.totalAttemptCount === usage.attempts.length + usage.omittedAttemptCount &&
|
|
185
|
+
usage.attempts.every((entry, index) => index === 0 ||
|
|
186
|
+
usage.attempts[index - 1].originRunId < entry.originRunId ||
|
|
187
|
+
usage.attempts[index - 1].originRunId === entry.originRunId && usage.attempts[index - 1].locator < entry.locator))),
|
|
159
188
|
experiment: OverviewExperimentSchema,
|
|
160
189
|
cells: effect_1.Schema.Array(OverviewCellSchema),
|
|
161
190
|
});
|
|
@@ -225,7 +254,7 @@ const AttemptLimitationSchema = effect_1.Schema.Union([
|
|
|
225
254
|
effect_1.Schema.Struct({
|
|
226
255
|
owner: effect_1.Schema.Literal("assertion-material"),
|
|
227
256
|
state: effect_1.Schema.Literal("partial"),
|
|
228
|
-
reason: effect_1.Schema.Literals(["sampled", "truncated", "redacted", "provider-limited"]),
|
|
257
|
+
reason: effect_1.Schema.Literals(["sampled", "truncated", "redacted", "provider-limited", "capacity-limited"]),
|
|
229
258
|
limitations: effect_1.Schema.Array(AssertionLimitationSchema),
|
|
230
259
|
}),
|
|
231
260
|
effect_1.Schema.Struct({
|
|
@@ -349,7 +378,7 @@ const TraceProjectionLimitationSchema = effect_1.Schema.Union([
|
|
|
349
378
|
effect_1.Schema.Struct({ issue: effect_1.Schema.String }),
|
|
350
379
|
effect_1.Schema.Struct({
|
|
351
380
|
source: effect_1.Schema.Literal("agent-turns"),
|
|
352
|
-
turnId:
|
|
381
|
+
turnId: codec_ts_2.TurnIdSchema,
|
|
353
382
|
channel: effect_1.Schema.Literals(["conversation", "events", "actions", "messages", "status", "data"]),
|
|
354
383
|
state: effect_1.Schema.Literals(["partial", "unavailable"]),
|
|
355
384
|
reason: effect_1.Schema.String,
|
|
@@ -466,6 +495,39 @@ const TraceDiagnosticsSchema = effect_1.Schema.Struct({
|
|
|
466
495
|
hasMore: effect_1.Schema.Boolean,
|
|
467
496
|
omittedDiagnosticCount: effect_1.Schema.Number,
|
|
468
497
|
});
|
|
498
|
+
const ExecutionDisplayPreviewTextSchema = effect_1.Schema.Struct({ preview: effect_1.Schema.String, omittedBytes: effect_1.Schema.Number });
|
|
499
|
+
const ExecutionDisplayRoleSchema = effect_1.Schema.Literals(["user", "assistant", "system", "other"]);
|
|
500
|
+
exports.ExecutionDisplayPreviewSchema = effect_1.Schema.Union([
|
|
501
|
+
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("absent") }),
|
|
502
|
+
effect_1.Schema.Struct({
|
|
503
|
+
state: effect_1.Schema.Literal("present"),
|
|
504
|
+
blocks: effect_1.Schema.Array(effect_1.Schema.Union([
|
|
505
|
+
effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("text"), text: ExecutionDisplayPreviewTextSchema }),
|
|
506
|
+
effect_1.Schema.Struct({
|
|
507
|
+
kind: effect_1.Schema.Literal("message"),
|
|
508
|
+
role: ExecutionDisplayRoleSchema,
|
|
509
|
+
speaker: effect_1.Schema.optional(effect_1.Schema.String),
|
|
510
|
+
text: ExecutionDisplayPreviewTextSchema,
|
|
511
|
+
}),
|
|
512
|
+
effect_1.Schema.Struct({
|
|
513
|
+
kind: effect_1.Schema.Literal("fields"),
|
|
514
|
+
fields: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
515
|
+
label: effect_1.Schema.String,
|
|
516
|
+
value: effect_1.Schema.Union([ExecutionDisplayPreviewTextSchema, effect_1.Schema.Number, effect_1.Schema.Boolean, effect_1.Schema.Null]),
|
|
517
|
+
})),
|
|
518
|
+
}),
|
|
519
|
+
effect_1.Schema.Struct({ kind: effect_1.Schema.Literal("code"), language: effect_1.Schema.optional(effect_1.Schema.String), text: ExecutionDisplayPreviewTextSchema }),
|
|
520
|
+
effect_1.Schema.Struct({
|
|
521
|
+
kind: effect_1.Schema.Literal("image"),
|
|
522
|
+
artifactId: effect_1.Schema.String,
|
|
523
|
+
alt: effect_1.Schema.String,
|
|
524
|
+
mediaType: effect_1.Schema.String,
|
|
525
|
+
byteLength: effect_1.Schema.Number,
|
|
526
|
+
sha256: effect_1.Schema.String,
|
|
527
|
+
}),
|
|
528
|
+
])),
|
|
529
|
+
}),
|
|
530
|
+
]);
|
|
469
531
|
const TraceItemBase = { itemId: ItemIdSchema, turnId: effect_1.Schema.String, sequence: effect_1.Schema.Number };
|
|
470
532
|
exports.InspectionTraceItemSchema = effect_1.Schema.Union([
|
|
471
533
|
effect_1.Schema.Struct({ ...TraceItemBase, kind: effect_1.Schema.Literal("message"), role: effect_1.Schema.Literals(["user", "assistant"]), text: effect_1.Schema.String, textTruncated: effect_1.Schema.Boolean }),
|
|
@@ -494,7 +556,7 @@ exports.InspectionTraceResultSchema = effect_1.Schema.Struct({
|
|
|
494
556
|
message: effect_1.Schema.String,
|
|
495
557
|
}),
|
|
496
558
|
])),
|
|
497
|
-
traces: effect_1.Schema.Array(
|
|
559
|
+
traces: effect_1.Schema.Array(schema_ts_4.ExecutionTraceHeaderRecordSchema.pipe(effect_1.Schema.fieldsAssign({ eventCount: effect_1.Schema.Number }))),
|
|
498
560
|
events: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
499
561
|
traceId: effect_1.Schema.String,
|
|
500
562
|
eventId: effect_1.Schema.String,
|
|
@@ -504,13 +566,14 @@ exports.InspectionTraceResultSchema = effect_1.Schema.Struct({
|
|
|
504
566
|
]),
|
|
505
567
|
ordinal: effect_1.Schema.Number,
|
|
506
568
|
type: effect_1.Schema.String,
|
|
507
|
-
source:
|
|
508
|
-
actor:
|
|
509
|
-
time:
|
|
569
|
+
source: schema_ts_4.ExecutionTraceEventRecordSchema.fields.source,
|
|
570
|
+
actor: schema_ts_4.ExecutionTraceEventRecordSchema.fields.actor,
|
|
571
|
+
time: schema_ts_4.ExecutionTraceEventRecordSchema.fields.time,
|
|
510
572
|
summary: effect_1.Schema.String,
|
|
511
|
-
links:
|
|
573
|
+
links: schema_ts_4.ExecutionTraceEventRecordSchema.fields.links,
|
|
512
574
|
evidence: effect_1.Schema.Array(effect_1.Schema.Struct({ evidenceId: effect_1.Schema.String, key: effect_1.Schema.String, label: effect_1.Schema.String })),
|
|
513
|
-
scopeMemberships:
|
|
575
|
+
scopeMemberships: schema_ts_4.ExecutionTraceEventRecordSchema.fields.scopeMemberships,
|
|
576
|
+
display: exports.ExecutionDisplayPreviewSchema,
|
|
514
577
|
})),
|
|
515
578
|
identityIndex: effect_1.Schema.Struct({
|
|
516
579
|
traceIds: effect_1.Schema.Array(effect_1.Schema.String),
|
|
@@ -532,7 +595,7 @@ exports.InspectionTraceResultSchema = effect_1.Schema.Struct({
|
|
|
532
595
|
turns: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
533
596
|
turnId: effect_1.Schema.String,
|
|
534
597
|
sequence: effect_1.Schema.Number,
|
|
535
|
-
sessionId: effect_1.Schema.optional(
|
|
598
|
+
sessionId: effect_1.Schema.optional(codec_ts_2.SessionScopeIdSchema),
|
|
536
599
|
outcome: TurnOutcomeSchema,
|
|
537
600
|
terminal: TraceTurnTerminalSchema,
|
|
538
601
|
context: TraceTurnContextSchema,
|
|
@@ -603,7 +666,7 @@ const CommandStreamSchema = effect_1.Schema.Struct({
|
|
|
603
666
|
exports.InspectionTraceDetailResultSchema = effect_1.Schema.Union([
|
|
604
667
|
effect_1.Schema.Struct({
|
|
605
668
|
kind: effect_1.Schema.Literal("execution-event"),
|
|
606
|
-
event:
|
|
669
|
+
event: schema_ts_4.ExecutionTraceEventRecordSchema,
|
|
607
670
|
evidence: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
608
671
|
evidenceId: effect_1.Schema.String,
|
|
609
672
|
key: effect_1.Schema.String,
|
|
@@ -671,11 +734,11 @@ const UsageLimitationSchema = effect_1.Schema.Union([
|
|
|
671
734
|
reason: effect_1.Schema.String,
|
|
672
735
|
}),
|
|
673
736
|
]);
|
|
674
|
-
const [TokenBucketUsageObservationSchema, RequestUsageObservationSchema, ProviderCostUsageObservationSchema] =
|
|
737
|
+
const [TokenBucketUsageObservationSchema, RequestUsageObservationSchema, ProviderCostUsageObservationSchema] = schema_ts_3.AgentTurnUsageObservationSchema.members;
|
|
675
738
|
const UsageObservationSchema = effect_1.Schema.Union([
|
|
676
|
-
effect_1.Schema.Struct({ turnId:
|
|
677
|
-
effect_1.Schema.Struct({ turnId:
|
|
678
|
-
effect_1.Schema.Struct({ turnId:
|
|
739
|
+
effect_1.Schema.Struct({ turnId: codec_ts_2.TurnIdSchema, ...TokenBucketUsageObservationSchema.fields }),
|
|
740
|
+
effect_1.Schema.Struct({ turnId: codec_ts_2.TurnIdSchema, ...RequestUsageObservationSchema.fields }),
|
|
741
|
+
effect_1.Schema.Struct({ turnId: codec_ts_2.TurnIdSchema, ...ProviderCostUsageObservationSchema.fields }),
|
|
679
742
|
]);
|
|
680
743
|
const UsageNumericTotalSchema = effect_1.Schema.Struct({
|
|
681
744
|
state: effect_1.Schema.Literals(["available", "partial", "unavailable"]),
|
|
@@ -687,9 +750,13 @@ const UsageCostTotalSchema = effect_1.Schema.Struct({
|
|
|
687
750
|
value: effect_1.Schema.String,
|
|
688
751
|
observationCount: effect_1.Schema.Number,
|
|
689
752
|
});
|
|
753
|
+
const validUsageCurrency = effect_1.Schema.is(codec_ts_1.CurrencyCodeSchema);
|
|
754
|
+
// Summed amounts may be longer than one call's bounded receipt; Query owns the output byte budget.
|
|
755
|
+
const UsageDecimalSchema = effect_1.Schema.String.check(effect_1.Schema.isPattern(/^(?:0|[1-9][0-9]*)(?:\.[0-9]*[1-9])?$(?![\s\S])/u));
|
|
756
|
+
const UsageCurrencySchema = effect_1.Schema.String.check(effect_1.Schema.makeFilter((value) => validUsageCurrency(value)));
|
|
690
757
|
const EffectiveCostSchema = effect_1.Schema.Struct({
|
|
691
|
-
amount:
|
|
692
|
-
currency:
|
|
758
|
+
amount: UsageDecimalSchema,
|
|
759
|
+
currency: UsageCurrencySchema,
|
|
693
760
|
source: effect_1.Schema.Struct({
|
|
694
761
|
kind: effect_1.Schema.Literals(["reported", "estimated"]),
|
|
695
762
|
id: effect_1.Schema.String,
|
|
@@ -704,15 +771,149 @@ const EffectiveCostTotalSchema = effect_1.Schema.Struct({
|
|
|
704
771
|
state: effect_1.Schema.Literals(["complete", "partial", "unavailable"]),
|
|
705
772
|
source: effect_1.Schema.NullOr(effect_1.Schema.Literals(["reported", "estimated", "mixed"])),
|
|
706
773
|
values: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
707
|
-
currency:
|
|
708
|
-
value:
|
|
774
|
+
currency: UsageCurrencySchema,
|
|
775
|
+
value: UsageDecimalSchema,
|
|
709
776
|
source: effect_1.Schema.Literals(["reported", "estimated", "mixed"]),
|
|
710
|
-
coveredCalls:
|
|
711
|
-
reportedCalls:
|
|
712
|
-
estimatedCalls:
|
|
777
|
+
coveredCalls: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
778
|
+
reportedCalls: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
779
|
+
estimatedCalls: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
713
780
|
})),
|
|
714
|
-
totalCalls:
|
|
781
|
+
totalCalls: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
715
782
|
});
|
|
783
|
+
const RecordedCallCountSchema = common_ts_1.NonNegativeSafeIntegerSchema.check(effect_1.Schema.isLessThanOrEqualTo(4000));
|
|
784
|
+
const ModelGroupTokenTotalSchema = effect_1.Schema.Struct({
|
|
785
|
+
state: effect_1.Schema.Literals(["available", "partial", "unavailable"]),
|
|
786
|
+
value: effect_1.Schema.NullOr(common_ts_1.NonNegativeSafeIntegerSchema),
|
|
787
|
+
observationCount: RecordedCallCountSchema,
|
|
788
|
+
}).check(effect_1.Schema.makeFilter((value) => (value.state === "unavailable") === (value.value === null)));
|
|
789
|
+
const ConfiguredModelsSchema = effect_1.Schema.Union([
|
|
790
|
+
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("not-recorded") }),
|
|
791
|
+
effect_1.Schema.Struct({
|
|
792
|
+
state: effect_1.Schema.Literal("available"),
|
|
793
|
+
bindings: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
794
|
+
modelSlot: schema_ts_1.AdapterUsageModelSlotSchema,
|
|
795
|
+
model: effect_1.Schema.NullOr(effect_1.Schema.String.check(effect_1.Schema.isPattern(/\S/u))),
|
|
796
|
+
reasoningEffort: effect_1.Schema.NullOr(effect_1.Schema.String.check(effect_1.Schema.isPattern(/\S/u))),
|
|
797
|
+
recordedCalls: effect_1.Schema.NullOr(RecordedCallCountSchema),
|
|
798
|
+
})).check(effect_1.Schema.makeFilter((bindings) => bindings.length <= 64 &&
|
|
799
|
+
bindings.every((entry, index) => index === 0 || bindings[index - 1].modelSlot < entry.modelSlot))),
|
|
800
|
+
}),
|
|
801
|
+
]);
|
|
802
|
+
const ModelGroupSchema = effect_1.Schema.Struct({
|
|
803
|
+
modelSlot: effect_1.Schema.NullOr(schema_ts_1.AdapterUsageModelSlotSchema),
|
|
804
|
+
provider: schema_ts_1.AdapterUsageCallSchema.fields.provider,
|
|
805
|
+
model: schema_ts_1.AdapterUsageCallSchema.fields.model,
|
|
806
|
+
recordedCalls: RecordedCallCountSchema.check(effect_1.Schema.isGreaterThan(0)),
|
|
807
|
+
tokens: effect_1.Schema.Struct({
|
|
808
|
+
inputTotalTokens: ModelGroupTokenTotalSchema,
|
|
809
|
+
outputTokens: ModelGroupTokenTotalSchema,
|
|
810
|
+
totalTokens: ModelGroupTokenTotalSchema,
|
|
811
|
+
}),
|
|
812
|
+
costs: EffectiveCostTotalSchema,
|
|
813
|
+
}).check(effect_1.Schema.makeFilter((group) => group.costs.totalCalls === group.recordedCalls &&
|
|
814
|
+
Object.values(group.tokens).every((total) => total.observationCount <= group.recordedCalls)));
|
|
815
|
+
const ModelGroupsSchema = effect_1.Schema.Union([
|
|
816
|
+
effect_1.Schema.Struct({
|
|
817
|
+
state: effect_1.Schema.Literal("available"),
|
|
818
|
+
basis: effect_1.Schema.Literal("recorded-calls"),
|
|
819
|
+
groups: effect_1.Schema.Array(ModelGroupSchema).check(effect_1.Schema.makeFilter((groups) => groups.length <= 64 &&
|
|
820
|
+
groups.every((entry, index) => index === 0 || (0, adapter_usage_projection_ts_1.compareAdapterModelGroups)(groups[index - 1], entry) < 0))),
|
|
821
|
+
totalGroupCount: RecordedCallCountSchema,
|
|
822
|
+
groupsTruncated: effect_1.Schema.Boolean,
|
|
823
|
+
omittedGroupCount: RecordedCallCountSchema,
|
|
824
|
+
}).check(effect_1.Schema.makeFilter((value) => value.totalGroupCount === value.groups.length + value.omittedGroupCount &&
|
|
825
|
+
value.groups.length === Math.min(value.totalGroupCount, 64) &&
|
|
826
|
+
value.groupsTruncated === (value.omittedGroupCount > 0))),
|
|
827
|
+
effect_1.Schema.Struct({
|
|
828
|
+
state: effect_1.Schema.Literal("unavailable"),
|
|
829
|
+
basis: effect_1.Schema.Literals(["recorded-calls", "reported-sends", "unavailable"]),
|
|
830
|
+
reason: effect_1.Schema.Literals(["source-invalid", "usage-not-recorded", "physical-call-identity-not-recorded"]),
|
|
831
|
+
groups: effect_1.Schema.Tuple([]),
|
|
832
|
+
totalGroupCount: effect_1.Schema.Null,
|
|
833
|
+
groupsTruncated: effect_1.Schema.Literal(false),
|
|
834
|
+
omittedGroupCount: effect_1.Schema.Literal(0),
|
|
835
|
+
}),
|
|
836
|
+
]);
|
|
837
|
+
const TotalUsageCostsSchema = effect_1.Schema.Struct({
|
|
838
|
+
state: effect_1.Schema.Literals(["complete", "partial", "unavailable"]),
|
|
839
|
+
values: effect_1.Schema.Array(effect_1.Schema.Struct({
|
|
840
|
+
currency: UsageCurrencySchema,
|
|
841
|
+
value: UsageDecimalSchema,
|
|
842
|
+
source: effect_1.Schema.Literals(["reported", "estimated", "mixed"]),
|
|
843
|
+
})),
|
|
844
|
+
missingSources: effect_1.Schema.Array(effect_1.Schema.Literals(["application", "judge"])).check(effect_1.Schema.makeFilter((sources) => sources.length <= 2 && sources.every((source, index) => index === 0 || sources[index - 1] === "application" && source === "judge"))),
|
|
845
|
+
}).check(effect_1.Schema.makeFilter((value) => value.state === (value.missingSources.length === 0
|
|
846
|
+
? "complete" : value.values.length === 0 ? "unavailable" : "partial") &&
|
|
847
|
+
value.values.every((entry, index) => index === 0 || value.values[index - 1].currency < entry.currency)));
|
|
848
|
+
const ExperimentCostSummarySchema = effect_1.Schema.Struct({
|
|
849
|
+
scope: effect_1.Schema.Literal("latest-recorded-slots"),
|
|
850
|
+
totalCosts: TotalUsageCostsSchema,
|
|
851
|
+
coverage: effect_1.Schema.Struct({
|
|
852
|
+
selectedSlotCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
853
|
+
resolvedSlotCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
854
|
+
originAttemptCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
855
|
+
completeAttemptCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
856
|
+
partialAttemptCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
857
|
+
unavailableAttemptCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
858
|
+
unresolvedSlotCount: common_ts_1.NonNegativeSafeIntegerSchema,
|
|
859
|
+
}).check(effect_1.Schema.makeFilter((value) => value.selectedSlotCount === value.resolvedSlotCount + value.unresolvedSlotCount &&
|
|
860
|
+
value.originAttemptCount <= value.resolvedSlotCount &&
|
|
861
|
+
value.originAttemptCount === value.completeAttemptCount + value.partialAttemptCount + value.unavailableAttemptCount)),
|
|
862
|
+
});
|
|
863
|
+
const JudgeCostTotalsSchema = EffectiveCostTotalSchema.check(effect_1.Schema.makeFilter((costs) => costs.totalCalls <= 4000 &&
|
|
864
|
+
(costs.source === null) === (costs.values.length === 0) &&
|
|
865
|
+
costs.values.every((entry, index) => entry.coveredCalls <= entry.reportedCalls + entry.estimatedCalls &&
|
|
866
|
+
entry.reportedCalls + entry.estimatedCalls <= costs.totalCalls &&
|
|
867
|
+
entry.source === (entry.reportedCalls === 0 ? "estimated" : entry.estimatedCalls === 0 ? "reported" : "mixed") &&
|
|
868
|
+
(index === 0 || costs.values[index - 1].currency < entry.currency)) &&
|
|
869
|
+
costs.values.reduce((count, entry) => count + entry.reportedCalls + entry.estimatedCalls, 0) <= costs.totalCalls &&
|
|
870
|
+
(costs.state !== "unavailable" || costs.values.length === 0) &&
|
|
871
|
+
(costs.state !== "complete" || costs.values.reduce((count, entry) => count + entry.coveredCalls, 0) === costs.totalCalls)));
|
|
872
|
+
const JudgeUsageUnavailableSchema = effect_1.Schema.Union([
|
|
873
|
+
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("unavailable"), reason: effect_1.Schema.Literal("judge-usage-not-recorded") }),
|
|
874
|
+
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("invalid"), reason: effect_1.Schema.Literal("judge-usage-source-invalid") }),
|
|
875
|
+
]);
|
|
876
|
+
const JudgeUsageSummaryFields = {
|
|
877
|
+
state: effect_1.Schema.Literals(["complete", "partial"]),
|
|
878
|
+
coverage: effect_1.Schema.Literal("physical-transmissions"),
|
|
879
|
+
collection: common_ts_1.CollectionStateSchema,
|
|
880
|
+
totals: effect_1.Schema.Struct({
|
|
881
|
+
requests: ModelGroupTokenTotalSchema,
|
|
882
|
+
inputTotalTokens: ModelGroupTokenTotalSchema,
|
|
883
|
+
outputTokens: ModelGroupTokenTotalSchema,
|
|
884
|
+
totalTokens: ModelGroupTokenTotalSchema,
|
|
885
|
+
costs: JudgeCostTotalsSchema,
|
|
886
|
+
}),
|
|
887
|
+
};
|
|
888
|
+
const JudgeUsageAvailableSummarySchema = effect_1.Schema.Struct(JudgeUsageSummaryFields).check(effect_1.Schema.makeFilter((usage) => {
|
|
889
|
+
const requests = usage.totals.requests;
|
|
890
|
+
return usage.state === usage.collection.state && requests.value === requests.observationCount &&
|
|
891
|
+
requests.state === (usage.state === "complete" ? "available" : "partial") &&
|
|
892
|
+
usage.totals.costs.totalCalls === requests.value &&
|
|
893
|
+
(usage.state === "complete" || usage.totals.costs.state !== "complete") &&
|
|
894
|
+
[usage.totals.inputTotalTokens, usage.totals.outputTokens, usage.totals.totalTokens].every((total) => total.observationCount <= requests.observationCount && (total.state !== "available" ||
|
|
895
|
+
usage.state === "complete" && total.observationCount === requests.observationCount)) &&
|
|
896
|
+
(requests.value !== 0 || usage.state !== "complete" ||
|
|
897
|
+
[usage.totals.inputTotalTokens, usage.totals.outputTokens, usage.totals.totalTokens].every((total) => total.state === "available" && total.value === 0) && usage.totals.costs.state === "complete");
|
|
898
|
+
}));
|
|
899
|
+
const JudgeUsageSummarySchema = effect_1.Schema.Union([JudgeUsageUnavailableSchema, JudgeUsageAvailableSummarySchema]);
|
|
900
|
+
const JudgeUsageSchema = effect_1.Schema.Union([
|
|
901
|
+
JudgeUsageUnavailableSchema,
|
|
902
|
+
effect_1.Schema.Struct({
|
|
903
|
+
...JudgeUsageSummaryFields,
|
|
904
|
+
calls: effect_1.Schema.Array(schema_ts_2.JudgeUsageCallSchema),
|
|
905
|
+
callsTruncated: effect_1.Schema.Boolean,
|
|
906
|
+
omittedCallCount: RecordedCallCountSchema,
|
|
907
|
+
priceReceipts: effect_1.Schema.Array(schema_ts_2.JudgePriceReceiptSchema),
|
|
908
|
+
}).check(effect_1.Schema.makeFilter((usage) => effect_1.Schema.is(JudgeUsageAvailableSummarySchema)({
|
|
909
|
+
state: usage.state, coverage: usage.coverage, collection: usage.collection, totals: usage.totals,
|
|
910
|
+
}) && usage.calls.length <= judge_usage_projection_ts_1.JUDGE_USAGE_PREVIEW_CALL_LIMIT &&
|
|
911
|
+
usage.calls.length + usage.omittedCallCount === usage.totals.requests.value &&
|
|
912
|
+
usage.callsTruncated === (usage.omittedCallCount > 0) &&
|
|
913
|
+
usage.calls.every((call, index) => index === 0 || (0, judge_usage_projection_ts_1.compareJudgeUsageCalls)(usage.calls[index - 1], call) < 0) &&
|
|
914
|
+
(0, bytes_ts_1.utf8ByteLength)(JSON.stringify({ calls: usage.calls, priceReceipts: usage.priceReceipts })) <= judge_usage_projection_ts_1.JUDGE_USAGE_PREVIEW_BYTE_LIMIT &&
|
|
915
|
+
(0, schema_ts_2.validateJudgeUsageAttachment)({ collection: usage.collection, calls: usage.calls, priceReceipts: usage.priceReceipts }).length === 0)),
|
|
916
|
+
]);
|
|
716
917
|
const UsageTotalsSchema = effect_1.Schema.Struct({
|
|
717
918
|
inputTotalTokens: effect_1.Schema.optional(UsageNumericTotalSchema),
|
|
718
919
|
inputTokens: UsageNumericTotalSchema,
|
|
@@ -726,6 +927,10 @@ const UsageTotalsSchema = effect_1.Schema.Struct({
|
|
|
726
927
|
costs: effect_1.Schema.optional(EffectiveCostTotalSchema),
|
|
727
928
|
});
|
|
728
929
|
exports.InspectionAttemptUsageResultSchema = effect_1.Schema.Struct({
|
|
930
|
+
configuredModels: ConfiguredModelsSchema,
|
|
931
|
+
modelGroups: ModelGroupsSchema,
|
|
932
|
+
judgeUsage: JudgeUsageSchema,
|
|
933
|
+
totalCosts: TotalUsageCostsSchema,
|
|
729
934
|
source: effect_1.Schema.optional(effect_1.Schema.Literal("adapter")),
|
|
730
935
|
coverage: effect_1.Schema.optional(effect_1.Schema.Literal("recorded-calls")),
|
|
731
936
|
calls: effect_1.Schema.optional(effect_1.Schema.Array(AdapterUsageInspectionCallSchema)),
|
|
@@ -868,7 +1073,7 @@ exports.InspectionAttemptDiffResultSchema = effect_1.Schema.Union([
|
|
|
868
1073
|
effect_1.Schema.Struct({ state: effect_1.Schema.Literal("invalid"), issues: effect_1.Schema.Array(effect_1.Schema.String), windows: effect_1.Schema.Tuple([]) }),
|
|
869
1074
|
effect_1.Schema.Struct({
|
|
870
1075
|
state: effect_1.Schema.Literals(["complete", "partial"]),
|
|
871
|
-
limitations: effect_1.Schema.Array(
|
|
1076
|
+
limitations: effect_1.Schema.Array(schema_ts_5.FileChangesCollectionLimitationSchema),
|
|
872
1077
|
windows: effect_1.Schema.Array(DiffWindowSchema),
|
|
873
1078
|
}),
|
|
874
1079
|
]);
|