niceeval 0.17.1 → 0.19.0
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 +5 -2
- package/dist/adapter-usage.cjs.map +1 -1
- package/dist/adapter-usage.d.cts +1 -1
- package/dist/adapter-usage.d.mts +1 -1
- package/dist/adapter-usage.d.ts +1 -1
- package/dist/adapter.cjs +8 -3
- package/dist/adapter.cjs.map +1 -1
- package/dist/adapter.d.cts +26 -15
- package/dist/adapter.d.mts +26 -15
- package/dist/adapter.d.ts +26 -15
- package/dist/agents/{effect-runtime.cjs → agent-effects.cjs} +12 -18
- package/dist/agents/agent-effects.cjs.map +1 -0
- package/dist/agents/agent-effects.d.cts +23 -0
- package/dist/agents/agent-effects.d.mts +23 -0
- package/dist/agents/agent-effects.d.ts +23 -0
- package/dist/agents/agent-effects.js +16 -0
- package/dist/agents/agent-effects.js.map +1 -0
- package/dist/agents/ai-sdk.cjs +1 -1
- package/dist/agents/ai-sdk.cjs.map +1 -1
- package/dist/agents/bub.cjs +31 -18
- package/dist/agents/bub.cjs.map +1 -1
- package/dist/agents/bub.d.cts +9 -12
- package/dist/agents/bub.d.mts +9 -12
- package/dist/agents/bub.d.ts +9 -12
- package/dist/agents/claude-code-native.cjs +2 -2
- package/dist/agents/claude-code-native.cjs.map +1 -1
- package/dist/agents/claude-code.cjs +17 -11
- package/dist/agents/claude-code.cjs.map +1 -1
- package/dist/agents/claude-code.d.cts +11 -11
- package/dist/agents/claude-code.d.mts +11 -11
- package/dist/agents/claude-code.d.ts +11 -11
- package/dist/agents/codex-app-server.cjs +2 -2
- package/dist/agents/codex-app-server.cjs.map +1 -1
- package/dist/agents/codex.cjs +18 -12
- package/dist/agents/codex.cjs.map +1 -1
- package/dist/agents/codex.d.cts +12 -12
- package/dist/agents/codex.d.mts +12 -12
- package/dist/agents/codex.d.ts +12 -12
- package/dist/agents/deepseek-harness.cjs +2 -2
- package/dist/agents/deepseek-harness.cjs.map +1 -1
- package/dist/agents/hermes.cjs +3 -3
- package/dist/agents/hermes.cjs.map +1 -1
- package/dist/agents/index.cjs +3 -3
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +3 -3
- package/dist/agents/index.d.mts +3 -3
- package/dist/agents/index.d.ts +3 -3
- package/dist/agents/index.js +2 -2
- package/dist/agents/index.mjs +2 -2
- package/dist/agents/mcp.cjs.map +1 -1
- package/dist/agents/mcp.d.cts +2 -2
- package/dist/agents/mcp.d.mts +2 -2
- package/dist/agents/mcp.d.ts +2 -2
- package/dist/agents/omp.cjs +2 -2
- package/dist/agents/omp.cjs.map +1 -1
- package/dist/agents/openai-compat.cjs +2 -2
- package/dist/agents/openai-compat.cjs.map +1 -1
- package/dist/agents/openclaw.cjs +3 -3
- package/dist/agents/openclaw.cjs.map +1 -1
- package/dist/agents/opencode.cjs +16 -4
- package/dist/agents/opencode.cjs.map +1 -1
- package/dist/agents/plugin-extensions.cjs +71 -0
- package/dist/agents/plugin-extensions.cjs.map +1 -0
- package/dist/agents/plugin-extensions.d.cts +26 -0
- package/dist/agents/plugin-extensions.d.mts +26 -0
- package/dist/agents/plugin-extensions.d.ts +26 -0
- package/dist/agents/plugin-extensions.js +8 -0
- package/dist/agents/plugin-extensions.js.map +1 -0
- package/dist/agents/post-setup.cjs +14 -3
- package/dist/agents/post-setup.cjs.map +1 -1
- package/dist/agents/post-setup.d.cts +4 -2
- package/dist/agents/post-setup.d.mts +4 -2
- package/dist/agents/post-setup.d.ts +4 -2
- package/dist/agents/post-setup.js +8 -6
- package/dist/agents/sdk-streams.cjs +3 -3
- package/dist/agents/sdk-streams.cjs.map +1 -1
- package/dist/agents/{session-slot.cjs → session-key.cjs} +4 -4
- package/dist/agents/session-key.cjs.map +1 -0
- package/dist/agents/session-key.d.cts +12 -0
- package/dist/agents/session-key.d.mts +12 -0
- package/dist/agents/session-key.d.ts +12 -0
- package/dist/agents/session-key.js +6 -0
- package/dist/agents/session-key.js.map +1 -0
- package/dist/agents/shared.cjs +2 -2
- package/dist/agents/shared.cjs.map +1 -1
- package/dist/agents/shared.d.cts +4 -4
- package/dist/agents/shared.d.mts +4 -4
- package/dist/agents/shared.d.ts +4 -4
- package/dist/agents/skills.cjs.map +1 -1
- package/dist/agents/skills.d.cts +3 -3
- package/dist/agents/skills.d.mts +3 -3
- package/dist/agents/skills.d.ts +3 -3
- package/dist/agents/types.cjs.map +1 -1
- package/dist/agents/types.d.cts +55 -54
- package/dist/agents/types.d.mts +55 -54
- package/dist/agents/types.d.ts +55 -54
- package/dist/agents/ui-message-stream.cjs +4 -4
- package/dist/agents/ui-message-stream.cjs.map +1 -1
- package/dist/agents/unrecognized-events.cjs +32 -0
- package/dist/agents/unrecognized-events.cjs.map +1 -0
- package/dist/agents/unrecognized-events.d.cts +8 -0
- package/dist/agents/unrecognized-events.d.mts +8 -0
- package/dist/agents/unrecognized-events.d.ts +8 -0
- package/dist/agents/unrecognized-events.js +6 -0
- package/dist/agents/unrecognized-events.js.map +1 -0
- package/dist/assertions/api.cjs.map +1 -1
- package/dist/assertions/api.d.cts +3 -0
- package/dist/assertions/api.d.mts +3 -0
- package/dist/assertions/api.d.ts +3 -0
- package/dist/assertions/collection.cjs +1 -1
- package/dist/assertions/collection.cjs.map +1 -1
- package/dist/assertions/judge.cjs +1 -1
- package/dist/assertions/judge.cjs.map +1 -1
- package/dist/assertions/match.cjs +52 -21
- package/dist/assertions/match.cjs.map +1 -1
- package/dist/assertions/match.d.cts +16 -5
- package/dist/assertions/match.d.mts +16 -5
- package/dist/assertions/match.d.ts +16 -5
- package/dist/assertions/match.js +96 -94
- package/dist/assertions/measurements.cjs +61 -0
- package/dist/assertions/measurements.cjs.map +1 -0
- package/dist/assertions/measurements.d.cts +24 -0
- package/dist/assertions/measurements.d.mts +24 -0
- package/dist/assertions/measurements.d.ts +24 -0
- package/dist/assertions/measurements.js +8 -0
- package/dist/assertions/measurements.js.map +1 -0
- package/dist/assertions/numeric.cjs +2 -0
- package/dist/assertions/numeric.cjs.map +1 -1
- package/dist/assertions/numeric.d.cts +1 -1
- package/dist/assertions/numeric.d.mts +1 -1
- package/dist/assertions/numeric.d.ts +1 -1
- package/dist/assertions/quantity.cjs +42 -0
- package/dist/assertions/quantity.cjs.map +1 -0
- package/dist/assertions/quantity.d.cts +18 -0
- package/dist/assertions/quantity.d.mts +18 -0
- package/dist/assertions/quantity.d.ts +18 -0
- package/dist/assertions/quantity.js +22 -0
- package/dist/assertions/quantity.js.map +1 -0
- package/dist/assertions/record/attachment.cjs +2 -0
- package/dist/assertions/record/attachment.cjs.map +1 -1
- package/dist/assertions/record/codec.cjs +5 -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 +3 -1
- package/dist/assertions/record/model.d.mts +3 -1
- package/dist/assertions/record/model.d.ts +3 -1
- package/dist/assertions/runtime.cjs +11 -6
- package/dist/assertions/runtime.cjs.map +1 -1
- package/dist/cli/program.cjs +3 -0
- package/dist/cli/program.cjs.map +1 -1
- package/dist/context/assert-first.cjs +6 -4
- package/dist/context/assert-first.cjs.map +1 -1
- package/dist/context/assert-first.d.cts +9 -3
- package/dist/context/assert-first.d.mts +9 -3
- package/dist/context/assert-first.d.ts +9 -3
- package/dist/context/notes.cjs +47 -0
- package/dist/context/notes.cjs.map +1 -0
- package/dist/context/notes.d.cts +10 -0
- package/dist/context/notes.d.mts +10 -0
- package/dist/context/notes.d.ts +10 -0
- package/dist/context/notes.js +6 -0
- package/dist/context/notes.js.map +1 -0
- package/dist/context/send-failures.cjs +1 -7
- package/dist/context/send-failures.cjs.map +1 -1
- package/dist/context/send-failures.d.cts +2 -3
- package/dist/context/send-failures.d.mts +2 -3
- package/dist/context/send-failures.d.ts +2 -3
- package/dist/context/send-retry.cjs +0 -1
- package/dist/context/send-retry.cjs.map +1 -1
- package/dist/context/send-retry.d.cts +1 -2
- package/dist/context/send-retry.d.mts +1 -2
- package/dist/context/send-retry.d.ts +1 -2
- package/dist/context/session.cjs +10 -17
- package/dist/context/session.cjs.map +1 -1
- package/dist/context/session.d.cts +4 -10
- package/dist/context/session.d.mts +4 -10
- package/dist/context/session.d.ts +4 -10
- package/dist/define.cjs +89 -64
- package/dist/define.cjs.map +1 -1
- package/dist/define.d.cts +3 -3
- package/dist/define.d.mts +3 -3
- package/dist/define.d.ts +3 -3
- package/dist/eval/cli/contribution.cjs +1 -1
- package/dist/eval/cli/contribution.cjs.map +1 -1
- package/dist/eval/host/index.cjs +1 -1
- package/dist/eval/host/index.cjs.map +1 -1
- package/dist/eval/record/evaluation.cjs +1 -1
- package/dist/eval/record/evaluation.cjs.map +1 -1
- package/dist/eval/record/membership-provenance.d.cts +3 -3
- package/dist/eval/record/membership-provenance.d.mts +3 -3
- package/dist/eval/record/membership-provenance.d.ts +3 -3
- package/dist/eval/record/score.cjs +2 -2
- package/dist/eval/record/score.cjs.map +1 -1
- package/dist/eval/record/sealed-assertion.cjs +1 -1
- package/dist/eval/record/sealed-assertion.cjs.map +1 -1
- package/dist/eval/record/verdict.cjs +2 -2
- package/dist/eval/record/verdict.cjs.map +1 -1
- package/dist/expect/index.cjs +13 -1
- package/dist/expect/index.cjs.map +1 -1
- package/dist/expect/index.d.cts +5 -1
- package/dist/expect/index.d.mts +5 -1
- package/dist/expect/index.d.ts +5 -1
- package/dist/expect/index.js +92 -72
- package/dist/expect/index.mjs +92 -72
- package/dist/experiment/host/cli/contribution.cjs +52 -39
- package/dist/experiment/host/cli/contribution.cjs.map +1 -1
- package/dist/experiment/host/cli/contribution.d.cts +18 -4
- package/dist/experiment/host/cli/contribution.d.mts +18 -4
- package/dist/experiment/host/cli/contribution.d.ts +18 -4
- package/dist/experiment/host/cli/contribution.js +2 -2
- package/dist/experiment/host/cli/debug-protocol.cjs +2 -2
- package/dist/experiment/host/cli/debug-protocol.cjs.map +1 -1
- package/dist/experiment/host/cli/debug-protocol.d.cts +2 -2
- package/dist/experiment/host/cli/debug-protocol.d.mts +2 -2
- package/dist/experiment/host/cli/debug-protocol.d.ts +2 -2
- package/dist/experiment/host/cli/output-protocol.cjs +1 -1
- package/dist/experiment/host/cli/output-protocol.cjs.map +1 -1
- package/dist/experiment/host/cli/output-protocol.d.cts +2 -2
- package/dist/experiment/host/cli/output-protocol.d.mts +2 -2
- package/dist/experiment/host/cli/output-protocol.d.ts +2 -2
- package/dist/experiment/host/current.cjs +2 -2
- package/dist/experiment/host/current.cjs.map +1 -1
- package/dist/experiment/host/index.cjs +1 -1
- package/dist/experiment/host/index.cjs.map +1 -1
- package/dist/experiment/host/operations.cjs +24 -23
- package/dist/experiment/host/operations.cjs.map +1 -1
- package/dist/experiment/host/runtime.cjs +11 -10
- package/dist/experiment/host/runtime.cjs.map +1 -1
- package/dist/experiment/host/runtime.d.cts +3 -3
- package/dist/experiment/host/runtime.d.mts +3 -3
- package/dist/experiment/host/runtime.d.ts +3 -3
- package/dist/experiment/host/teardown.cjs +4 -3
- package/dist/experiment/host/teardown.cjs.map +1 -1
- package/dist/experiment/host/teardown.d.cts +3 -3
- package/dist/experiment/host/teardown.d.mts +3 -3
- package/dist/experiment/host/teardown.d.ts +3 -3
- package/dist/experiment/host/types.cjs.map +1 -1
- package/dist/experiment/host/types.d.cts +19 -19
- package/dist/experiment/host/types.d.mts +19 -19
- package/dist/experiment/host/types.d.ts +19 -19
- package/dist/index.cjs +3 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -8
- package/dist/index.d.mts +4 -8
- package/dist/index.d.ts +4 -8
- package/dist/index.js +12 -34
- package/dist/index.mjs +12 -34
- package/dist/inspection/assertions.cjs +1 -1
- package/dist/inspection/assertions.cjs.map +1 -1
- package/dist/inspection/cli/contribution.cjs +8 -7
- package/dist/inspection/cli/contribution.cjs.map +1 -1
- package/dist/inspection/facts.cjs +4 -4
- package/dist/inspection/facts.cjs.map +1 -1
- package/dist/inspection/index.cjs +1 -5
- package/dist/inspection/index.cjs.map +1 -1
- package/dist/inspection/index.d.cts +1 -2
- package/dist/inspection/index.d.mts +1 -2
- package/dist/inspection/index.d.ts +1 -2
- package/dist/inspection/index.js +20 -26
- package/dist/inspection/lifecycle.cjs +7 -0
- package/dist/inspection/lifecycle.cjs.map +1 -0
- package/dist/inspection/lifecycle.d.cts +4 -0
- package/dist/inspection/lifecycle.d.mts +4 -0
- package/dist/inspection/lifecycle.d.ts +4 -0
- package/dist/inspection/lifecycle.js +6 -0
- package/dist/inspection/lifecycle.js.map +1 -0
- package/dist/inspection/notes.cjs +40 -0
- package/dist/inspection/notes.cjs.map +1 -0
- package/dist/inspection/notes.d.cts +12 -0
- package/dist/inspection/notes.d.mts +12 -0
- package/dist/inspection/notes.d.ts +12 -0
- package/dist/inspection/notes.js +8 -0
- package/dist/inspection/notes.js.map +1 -0
- package/dist/inspection/overview.cjs +12 -15
- package/dist/inspection/overview.cjs.map +1 -1
- package/dist/inspection/overview.d.cts +8 -6
- package/dist/inspection/overview.d.mts +8 -6
- package/dist/inspection/overview.d.ts +8 -6
- package/dist/inspection/planned-attempt.cjs +45 -0
- package/dist/inspection/planned-attempt.cjs.map +1 -0
- package/dist/inspection/planned-attempt.d.cts +109 -0
- package/dist/inspection/planned-attempt.d.mts +109 -0
- package/dist/inspection/planned-attempt.d.ts +109 -0
- package/dist/inspection/planned-attempt.js +24 -0
- package/dist/inspection/planned-attempt.js.map +1 -0
- package/dist/inspection/project-result.cjs +5 -5
- package/dist/inspection/project-result.cjs.map +1 -1
- package/dist/inspection/project-result.d.cts +58 -57
- package/dist/inspection/project-result.d.mts +58 -57
- package/dist/inspection/project-result.d.ts +58 -57
- package/dist/inspection/project-result.js +4 -4
- package/dist/inspection/project.cjs +3 -3
- package/dist/inspection/project.cjs.map +1 -1
- package/dist/inspection/protocol-values.cjs +1 -1
- package/dist/inspection/protocol-values.cjs.map +1 -1
- package/dist/inspection/protocol-values.d.cts +1 -1
- package/dist/inspection/protocol-values.d.mts +1 -1
- package/dist/inspection/protocol-values.d.ts +1 -1
- package/dist/inspection/protocol.cjs +8 -8
- package/dist/inspection/protocol.cjs.map +1 -1
- package/dist/inspection/protocol.d.cts +237 -219
- package/dist/inspection/protocol.d.mts +237 -219
- package/dist/inspection/protocol.d.ts +237 -219
- package/dist/inspection/public.cjs +1 -5
- package/dist/inspection/public.cjs.map +1 -1
- package/dist/inspection/public.d.cts +1 -2
- package/dist/inspection/public.d.mts +1 -2
- package/dist/inspection/public.d.ts +1 -2
- package/dist/inspection/public.js +14 -20
- package/dist/inspection/public.mjs +166 -129
- package/dist/inspection/query.cjs +1 -1
- package/dist/inspection/query.cjs.map +1 -1
- package/dist/inspection/results.cjs +61 -52
- package/dist/inspection/results.cjs.map +1 -1
- package/dist/inspection/results.d.cts +157 -140
- package/dist/inspection/results.d.mts +157 -140
- package/dist/inspection/results.d.ts +157 -140
- package/dist/inspection/select.cjs +33 -28
- package/dist/inspection/select.cjs.map +1 -1
- package/dist/inspection/source.cjs +1 -1
- package/dist/inspection/source.cjs.map +1 -1
- package/dist/inspection/sources.cjs +2 -2
- package/dist/inspection/sources.cjs.map +1 -1
- package/dist/inspection/trace.cjs +9 -8
- package/dist/inspection/trace.cjs.map +1 -1
- package/dist/inspection/trace.d.cts +4 -4
- package/dist/inspection/trace.d.mts +4 -4
- package/dist/inspection/trace.d.ts +4 -4
- package/dist/loaders/index.cjs +7 -279
- package/dist/loaders/index.cjs.map +1 -1
- package/dist/loaders/index.d.cts +2 -95
- package/dist/loaders/index.d.mts +2 -95
- package/dist/loaders/index.d.ts +2 -95
- package/dist/loaders/index.js +10 -12
- package/dist/loaders/index.mjs +10 -12
- package/dist/loaders/runtime.cjs +283 -0
- package/dist/loaders/runtime.cjs.map +1 -0
- package/dist/loaders/runtime.d.cts +95 -0
- package/dist/loaders/runtime.d.mts +95 -0
- package/dist/loaders/runtime.d.ts +95 -0
- package/dist/loaders/runtime.js +16 -0
- package/dist/loaders/runtime.js.map +1 -0
- package/dist/migrations/judge-provider.md +6 -6
- package/dist/{model-slots.cjs → model-roles.cjs} +26 -7
- package/dist/model-roles.cjs.map +1 -0
- package/dist/model-roles.d.cts +26 -0
- package/dist/model-roles.d.mts +26 -0
- package/dist/model-roles.d.ts +26 -0
- package/dist/model-roles.js +14 -0
- package/dist/model-roles.js.map +1 -0
- package/dist/o11y/adapter-usage-projection.cjs +9 -8
- package/dist/o11y/adapter-usage-projection.cjs.map +1 -1
- package/dist/o11y/adapter-usage-projection.d.cts +23 -15
- package/dist/o11y/adapter-usage-projection.d.mts +23 -15
- package/dist/o11y/adapter-usage-projection.d.ts +23 -15
- package/dist/o11y/cache-read.cjs +14 -14
- package/dist/o11y/cache-read.cjs.map +1 -1
- package/dist/o11y/cache-read.d.cts +5 -5
- package/dist/o11y/cache-read.d.mts +5 -5
- package/dist/o11y/cache-read.d.ts +5 -5
- package/dist/o11y/derive.cjs.map +1 -1
- package/dist/o11y/derive.d.cts +2 -2
- package/dist/o11y/derive.d.mts +2 -2
- package/dist/o11y/derive.d.ts +2 -2
- package/dist/o11y/eval-usage.cjs +9 -9
- package/dist/o11y/eval-usage.cjs.map +1 -1
- package/dist/o11y/eval-usage.d.cts +7 -7
- package/dist/o11y/eval-usage.d.mts +7 -7
- package/dist/o11y/eval-usage.d.ts +7 -7
- package/dist/o11y/parsers/bub.cjs +57 -81
- package/dist/o11y/parsers/bub.cjs.map +1 -1
- package/dist/o11y/parsers/index.cjs.map +1 -1
- package/dist/o11y/parsers/index.d.cts +2 -0
- package/dist/o11y/parsers/index.d.mts +2 -0
- package/dist/o11y/parsers/index.d.ts +2 -0
- package/dist/o11y/parsers/opencode.cjs +129 -217
- package/dist/o11y/parsers/opencode.cjs.map +1 -1
- package/dist/o11y/parsers/opencode.d.cts +2 -5
- package/dist/o11y/parsers/opencode.d.mts +2 -5
- package/dist/o11y/parsers/opencode.d.ts +2 -5
- package/dist/o11y/types.cjs.map +1 -1
- package/dist/o11y/types.d.cts +1 -1
- package/dist/o11y/types.d.mts +1 -1
- package/dist/o11y/types.d.ts +1 -1
- package/dist/plugin/contracts.cjs +170 -120
- package/dist/plugin/contracts.cjs.map +1 -1
- package/dist/plugin/contracts.d.cts +102 -90
- package/dist/plugin/contracts.d.mts +102 -90
- package/dist/plugin/contracts.d.ts +102 -90
- package/dist/plugin/contracts.js +16 -12
- package/dist/plugin/index.cjs.map +1 -1
- package/dist/plugin/index.d.cts +1 -1
- package/dist/plugin/index.d.mts +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/link.cjs +69 -64
- package/dist/plugin/link.cjs.map +1 -1
- package/dist/plugin/link.d.cts +5 -3
- package/dist/plugin/link.d.mts +5 -3
- package/dist/plugin/link.d.ts +5 -3
- package/dist/plugin/link.js +12 -8
- 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/attempt-note/definition.cjs +12 -0
- package/dist/record/family/attempt-note/definition.cjs.map +1 -0
- package/dist/record/family/attempt-note/definition.d.cts +6 -0
- package/dist/record/family/attempt-note/definition.d.mts +6 -0
- package/dist/record/family/attempt-note/definition.d.ts +6 -0
- package/dist/record/family/attempt-note/definition.js +6 -0
- package/dist/record/family/attempt-note/definition.js.map +1 -0
- package/dist/record/family/attempt-note/persistence.cjs +10 -0
- package/dist/record/family/attempt-note/persistence.cjs.map +1 -0
- package/dist/record/family/attempt-note/persistence.d.cts +6 -0
- package/dist/record/family/attempt-note/persistence.d.mts +6 -0
- package/dist/record/family/attempt-note/persistence.d.ts +6 -0
- package/dist/record/family/attempt-note/persistence.js +6 -0
- package/dist/record/family/attempt-note/persistence.js.map +1 -0
- package/dist/record/family/attempt-note/schema.cjs +20 -0
- package/dist/record/family/attempt-note/schema.cjs.map +1 -0
- package/dist/record/family/attempt-note/schema.d.cts +21 -0
- package/dist/record/family/attempt-note/schema.d.mts +21 -0
- package/dist/record/family/attempt-note/schema.d.ts +21 -0
- package/dist/record/family/attempt-note/schema.js +10 -0
- package/dist/record/family/attempt-note/schema.js.map +1 -0
- package/dist/record/family/catalog.cjs +32 -29
- package/dist/record/family/catalog.cjs.map +1 -1
- package/dist/record/family/catalog.d.cts +7 -2
- package/dist/record/family/catalog.d.mts +7 -2
- package/dist/record/family/catalog.d.ts +7 -2
- package/dist/record/family/current.cjs +48 -45
- package/dist/record/family/current.cjs.map +1 -1
- package/dist/record/family/current.d.cts +15 -0
- package/dist/record/family/current.d.mts +15 -0
- package/dist/record/family/current.d.ts +15 -0
- package/dist/record/model/index.js +66 -64
- package/dist/record/model/run-context.cjs +9 -3
- package/dist/record/model/run-context.cjs.map +1 -1
- package/dist/record/model/run-context.d.cts +9 -2
- package/dist/record/model/run-context.d.mts +9 -2
- package/dist/record/model/run-context.d.ts +9 -2
- package/dist/record/model/run-context.js +8 -6
- 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/run/cli/contribution.cjs +6 -32
- package/dist/run/cli/contribution.cjs.map +1 -1
- package/dist/run/host/runtime.cjs +1 -1
- package/dist/run/host/runtime.cjs.map +1 -1
- package/dist/run/storage/sqlite.cjs +7 -7
- package/dist/run/storage/sqlite.cjs.map +1 -1
- package/dist/runner/adapter-usage.cjs +5 -3
- package/dist/runner/adapter-usage.cjs.map +1 -1
- package/dist/runner/adapter-usage.d.cts +2 -2
- package/dist/runner/adapter-usage.d.mts +2 -2
- package/dist/runner/adapter-usage.d.ts +2 -2
- package/dist/runner/adoption.cjs +10 -12
- package/dist/runner/adoption.cjs.map +1 -1
- package/dist/runner/attempt-notes.cjs +8 -0
- package/dist/runner/attempt-notes.cjs.map +1 -0
- package/dist/runner/attempt-notes.d.cts +4 -0
- package/dist/runner/attempt-notes.d.mts +4 -0
- package/dist/runner/attempt-notes.d.ts +4 -0
- package/dist/runner/attempt-notes.js +8 -0
- package/dist/runner/attempt-notes.js.map +1 -0
- package/dist/runner/attempt.cjs +61 -73
- package/dist/runner/attempt.cjs.map +1 -1
- package/dist/runner/attempt.d.cts +3 -3
- package/dist/runner/attempt.d.mts +3 -3
- package/dist/runner/attempt.d.ts +3 -3
- package/dist/runner/command-plan.cjs +21 -26
- package/dist/runner/command-plan.cjs.map +1 -1
- package/dist/runner/command-plan.d.cts +4 -4
- package/dist/runner/command-plan.d.mts +4 -4
- package/dist/runner/command-plan.d.ts +4 -4
- package/dist/runner/command-plan.js +4 -4
- package/dist/runner/config-identity.cjs.map +1 -1
- package/dist/runner/config-identity.d.cts +2 -2
- package/dist/runner/config-identity.d.mts +2 -2
- package/dist/runner/config-identity.d.ts +2 -2
- package/dist/runner/discover.cjs +6 -6
- package/dist/runner/discover.cjs.map +1 -1
- package/dist/runner/eval-selection.cjs +15 -1
- package/dist/runner/eval-selection.cjs.map +1 -1
- package/dist/runner/eval-selection.d.cts +4 -0
- package/dist/runner/eval-selection.d.mts +4 -0
- package/dist/runner/eval-selection.d.ts +4 -0
- package/dist/runner/feedback/human.cjs +1 -1
- package/dist/runner/feedback/human.cjs.map +1 -1
- package/dist/runner/feedback/json.cjs +4 -2
- package/dist/runner/feedback/json.cjs.map +1 -1
- package/dist/runner/feedback/json.d.cts +1 -1
- package/dist/runner/feedback/json.d.mts +1 -1
- package/dist/runner/feedback/json.d.ts +1 -1
- package/dist/runner/feedback/sink.cjs +1 -1
- package/dist/runner/feedback/sink.cjs.map +1 -1
- package/dist/runner/feedback/sink.d.cts +1 -1
- package/dist/runner/feedback/sink.d.mts +1 -1
- package/dist/runner/feedback/sink.d.ts +1 -1
- package/dist/runner/fingerprint.cjs +1 -1
- package/dist/runner/fingerprint.cjs.map +1 -1
- package/dist/runner/lock.cjs +1 -3
- package/dist/runner/lock.cjs.map +1 -1
- package/dist/runner/lock.d.cts +0 -2
- package/dist/runner/lock.d.mts +0 -2
- package/dist/runner/lock.d.ts +0 -2
- package/dist/runner/lock.js +14 -16
- package/dist/runner/project-target.cjs.map +1 -1
- package/dist/runner/project-target.d.cts +2 -2
- package/dist/runner/project-target.d.mts +2 -2
- package/dist/runner/project-target.d.ts +2 -2
- package/dist/runner/record/attachments.cjs +2 -2
- package/dist/runner/record/attachments.cjs.map +1 -1
- package/dist/runner/record/planning.cjs +8 -2
- package/dist/runner/record/planning.cjs.map +1 -1
- package/dist/runner/record.cjs +2 -0
- package/dist/runner/record.cjs.map +1 -1
- package/dist/runner/report.cjs +3 -3
- package/dist/runner/report.cjs.map +1 -1
- package/dist/runner/report.d.cts +1 -1
- package/dist/runner/report.d.mts +1 -1
- package/dist/runner/report.d.ts +1 -1
- package/dist/runner/reuse-plan.cjs +2 -2
- package/dist/runner/reuse-plan.cjs.map +1 -1
- package/dist/runner/run.cjs +10 -45
- package/dist/runner/run.cjs.map +1 -1
- package/dist/runner/sandbox-pool.cjs +1 -2
- package/dist/runner/sandbox-pool.cjs.map +1 -1
- package/dist/runner/setup-prefix-preparation.cjs +1 -1
- package/dist/runner/setup-prefix-preparation.cjs.map +1 -1
- package/dist/runner/teardown-registry.cjs +2 -2
- package/dist/runner/teardown-registry.cjs.map +1 -1
- package/dist/runner/teardown-registry.d.cts +1 -1
- package/dist/runner/teardown-registry.d.mts +1 -1
- package/dist/runner/teardown-registry.d.ts +1 -1
- package/dist/runner/types.cjs +4 -4
- package/dist/runner/types.cjs.map +1 -1
- package/dist/runner/types.d.cts +64 -92
- package/dist/runner/types.d.mts +64 -92
- package/dist/runner/types.d.ts +64 -92
- package/dist/runner/types.js +2 -2
- package/dist/sandbox/action.cjs +1 -1
- package/dist/sandbox/action.cjs.map +1 -1
- package/dist/sandbox/cli/contribution.cjs +17 -14
- package/dist/sandbox/cli/contribution.cjs.map +1 -1
- package/dist/sandbox/cli/contribution.d.cts +1 -1
- package/dist/sandbox/cli/contribution.d.mts +1 -1
- package/dist/sandbox/cli/contribution.d.ts +1 -1
- package/dist/sandbox/commands.cjs +1 -1
- package/dist/sandbox/commands.cjs.map +1 -1
- package/dist/sandbox/commands.d.cts +1 -1
- package/dist/sandbox/commands.d.mts +1 -1
- package/dist/sandbox/commands.d.ts +1 -1
- package/dist/sandbox/compose.cjs +2 -2
- package/dist/sandbox/compose.cjs.map +1 -1
- package/dist/sandbox/docker-profile/registry.cjs +5 -10
- package/dist/sandbox/docker-profile/registry.cjs.map +1 -1
- package/dist/sandbox/docker-profile/registry.d.cts +0 -4
- package/dist/sandbox/docker-profile/registry.d.mts +0 -4
- package/dist/sandbox/docker-profile/registry.d.ts +0 -4
- package/dist/sandbox/docker-profile/registry.js +6 -14
- package/dist/sandbox/docker-profile/runtime.cjs +1 -1
- package/dist/sandbox/docker-profile/runtime.cjs.map +1 -1
- package/dist/sandbox/docker-profile/schema.cjs +12 -16
- package/dist/sandbox/docker-profile/schema.cjs.map +1 -1
- package/dist/sandbox/docker-profile/schema.d.cts +2 -6
- package/dist/sandbox/docker-profile/schema.d.mts +2 -6
- package/dist/sandbox/docker-profile/schema.d.ts +2 -6
- package/dist/sandbox/docker-profile/schema.js +24 -32
- package/dist/sandbox/incus.cjs +2 -2
- package/dist/sandbox/incus.cjs.map +1 -1
- package/dist/sandbox/index.cjs +4 -36
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.d.cts +4 -8
- package/dist/sandbox/index.d.mts +4 -8
- package/dist/sandbox/index.d.ts +4 -8
- package/dist/sandbox/index.js +116 -174
- package/dist/sandbox/index.mjs +116 -174
- package/dist/sandbox/layer.cjs +3 -3
- package/dist/sandbox/layer.cjs.map +1 -1
- package/dist/sandbox/link.cjs +5 -0
- package/dist/sandbox/link.cjs.map +1 -1
- package/dist/sandbox/link.d.cts +3 -0
- package/dist/sandbox/link.d.mts +3 -0
- package/dist/sandbox/link.d.ts +3 -0
- package/dist/sandbox/runtime.cjs +9 -4
- package/dist/sandbox/runtime.cjs.map +1 -1
- package/dist/shared/failure-class.cjs +5 -5
- package/dist/shared/failure-class.cjs.map +1 -1
- package/dist/shared/failure-class.d.cts +4 -10
- package/dist/shared/failure-class.d.mts +4 -10
- package/dist/shared/failure-class.d.ts +4 -10
- package/dist/shared/types.cjs.map +1 -1
- package/dist/shared/types.d.cts +1 -1
- package/dist/shared/types.d.mts +1 -1
- package/dist/shared/types.d.ts +1 -1
- package/dist/show/contribution.cjs +17 -2
- package/dist/show/contribution.cjs.map +1 -1
- package/dist/show/contribution.d.cts +14 -0
- package/dist/show/contribution.d.mts +14 -0
- package/dist/show/contribution.d.ts +14 -0
- package/dist/show/model.cjs +8 -5
- package/dist/show/model.cjs.map +1 -1
- package/dist/show/model.d.cts +11 -8
- package/dist/show/model.d.mts +11 -8
- package/dist/show/model.d.ts +11 -8
- package/dist/show/render.cjs +34 -22
- package/dist/show/render.cjs.map +1 -1
- package/dist/sources/projector.cjs +1 -1
- package/dist/sources/projector.cjs.map +1 -1
- package/dist/types.cjs +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/types.js +2 -2
- package/dist/view/app-dist/.vite/manifest.json +2 -2
- package/dist/view/app-dist/assets/{index-B3ijZRph.js → index-CxrOUvHC.js} +17 -17
- package/dist/view/app-dist/assets/{quality-cost-scatter-B--DfJ9s.js → quality-cost-scatter-B6Aiss7x.js} +1 -1
- package/dist/view/app-dist/index.html +1 -1
- package/dist/view/cli/contribution.cjs +1 -1
- package/dist/view/cli/contribution.cjs.map +1 -1
- package/dist/view/function-runtime.mjs +318 -121
- package/dist/view/http-protocol.d.cts +1 -1
- package/dist/view/http-protocol.d.mts +1 -1
- package/dist/view/http-protocol.d.ts +1 -1
- package/dist/view/inspection-host.cjs +2 -2
- package/dist/view/inspection-host.cjs.map +1 -1
- package/dist/view/inspection-host.d.cts +349 -331
- package/dist/view/inspection-host.d.mts +349 -331
- package/dist/view/inspection-host.d.ts +349 -331
- package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +9 -9
- package/docs-site/zh/examples/integrations/claude-sdk.mdx +8 -8
- package/docs-site/zh/examples/integrations/codex-sdk.mdx +4 -4
- package/docs-site/zh/examples/integrations/langgraph.mdx +6 -6
- package/docs-site/zh/examples/integrations/pi-sdk.mdx +8 -8
- package/docs-site/zh/explanation/adapter.mdx +6 -6
- package/docs-site/zh/explanation/assert.mdx +7 -7
- package/docs-site/zh/explanation/drive.mdx +4 -4
- package/docs-site/zh/explanation/hitl.mdx +2 -2
- package/docs-site/zh/explanation/judge.mdx +3 -3
- package/docs-site/zh/index.mdx +18 -0
- package/docs-site/zh/introduction.mdx +4 -3
- package/docs-site/zh/reference/builtin-agents.mdx +46 -49
- package/docs-site/zh/reference/cli.mdx +16 -14
- package/docs-site/zh/reference/define-agent.mdx +19 -19
- package/docs-site/zh/reference/define-config.mdx +7 -15
- package/docs-site/zh/reference/define-eval.mdx +20 -14
- package/docs-site/zh/reference/define-experiment.mdx +18 -39
- package/docs-site/zh/reference/events.mdx +1 -1
- package/docs-site/zh/reference/expect.mdx +21 -0
- package/docs-site/zh/reference/official-adapters.mdx +12 -5
- package/docs-site/zh/troubleshooting/debugging.mdx +2 -2
- package/docs-site/zh/troubleshooting/recover-after-kill.mdx +1 -1
- package/docs-site/zh/tutorials/agent-onboarding.mdx +2 -2
- package/docs-site/zh/tutorials/authoring.mdx +4 -3
- package/docs-site/zh/tutorials/compare-runs.mdx +1 -1
- package/docs-site/zh/tutorials/concurrency.mdx +8 -8
- package/docs-site/zh/tutorials/configuration.mdx +5 -5
- package/docs-site/zh/tutorials/control-run-cost.mdx +49 -9
- package/docs-site/zh/tutorials/eval-groups.mdx +1 -1
- package/docs-site/zh/tutorials/evaluation-kinds.mdx +5 -5
- package/docs-site/zh/tutorials/experiment-services.mdx +32 -32
- package/docs-site/zh/tutorials/handle-execution-failures.mdx +2 -28
- package/docs-site/zh/tutorials/plugins.mdx +49 -143
- package/docs-site/zh/tutorials/sandbox-agent.mdx +1 -1
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +7 -7
- package/docs-site/zh/tutorials/upgrade-0-18.mdx +64 -0
- package/docs-site/zh/tutorials/upgrade-0-19.mdx +121 -0
- package/docs-site/zh/tutorials/upgrade-0-20.mdx +12 -0
- package/docs-site/zh/tutorials/verify-judge.mdx +4 -3
- package/docs-site/zh/tutorials/viewing-results.mdx +2 -2
- package/docs-site/zh/tutorials/write-experiment.mdx +1 -1
- package/docs-site/zh/tutorials/write-send.mdx +13 -13
- package/package.json +1 -1
- package/dist/agents/effect-runtime.cjs.map +0 -1
- package/dist/agents/effect-runtime.d.cts +0 -29
- package/dist/agents/effect-runtime.d.mts +0 -29
- package/dist/agents/effect-runtime.d.ts +0 -29
- package/dist/agents/effect-runtime.js +0 -16
- package/dist/agents/effect-runtime.js.map +0 -1
- package/dist/agents/session-slot.cjs.map +0 -1
- package/dist/agents/session-slot.d.cts +0 -12
- package/dist/agents/session-slot.d.mts +0 -12
- package/dist/agents/session-slot.d.ts +0 -12
- package/dist/agents/session-slot.js +0 -6
- package/dist/agents/session-slot.js.map +0 -1
- package/dist/model-slots.cjs.map +0 -1
- package/dist/model-slots.d.cts +0 -19
- package/dist/model-slots.d.mts +0 -19
- package/dist/model-slots.d.ts +0 -19
- package/dist/model-slots.js +0 -8
- package/dist/model-slots.js.map +0 -1
|
@@ -98,7 +98,8 @@ var NUMERIC_COMPARATORS = [
|
|
|
98
98
|
"less-than",
|
|
99
99
|
"at-most",
|
|
100
100
|
"greater-than",
|
|
101
|
-
"at-least"
|
|
101
|
+
"at-least",
|
|
102
|
+
"between"
|
|
102
103
|
];
|
|
103
104
|
//#endregion
|
|
104
105
|
//#region src/assertions/identity.ts
|
|
@@ -349,6 +350,16 @@ var NumericComparisonCriterionSchema = Schema.Struct({
|
|
|
349
350
|
data: Schema.Struct({
|
|
350
351
|
comparator: Schema.Literals(NUMERIC_COMPARATORS),
|
|
351
352
|
threshold: Schema.Finite,
|
|
353
|
+
upperThreshold: Schema.optional(Schema.Finite),
|
|
354
|
+
unit: Schema.optional(Schema.Literals([
|
|
355
|
+
"ms",
|
|
356
|
+
"seconds",
|
|
357
|
+
"tokens",
|
|
358
|
+
"usd",
|
|
359
|
+
"ratio",
|
|
360
|
+
"count",
|
|
361
|
+
"bytes"
|
|
362
|
+
])),
|
|
352
363
|
subject: Schema.Union([
|
|
353
364
|
Schema.Struct({ kind: Schema.Literal("explicit-value") }),
|
|
354
365
|
Schema.Struct({
|
|
@@ -381,7 +392,7 @@ var NumericComparisonCriterionSchema = Schema.Struct({
|
|
|
381
392
|
])
|
|
382
393
|
})
|
|
383
394
|
])
|
|
384
|
-
})
|
|
395
|
+
}).check(Schema.makeFilter((data) => data.comparator === "between" ? data.upperThreshold !== void 0 && data.upperThreshold >= data.threshold : data.upperThreshold === void 0, { message: "Only between comparisons have an ordered upper threshold." }))
|
|
385
396
|
});
|
|
386
397
|
var ScopeStatusCriterionSchema = Schema.Struct({
|
|
387
398
|
kind: Schema.Literal("builtin"),
|
|
@@ -2481,14 +2492,14 @@ var RunGetDocumentSchema = Schema.Struct({
|
|
|
2481
2492
|
});
|
|
2482
2493
|
Schema.Union([RunListDocumentSchema, RunGetDocumentSchema]);
|
|
2483
2494
|
//#endregion
|
|
2484
|
-
//#region src/model-
|
|
2495
|
+
//#region src/model-roles.ts
|
|
2485
2496
|
var modelText = Schema.String.check(Schema.isPattern(/\S/u));
|
|
2486
|
-
var
|
|
2487
|
-
Schema.Record(
|
|
2497
|
+
var roleKey = Schema.String.check(Schema.isPattern(/^[A-Za-z][A-Za-z0-9_-]{0,63}$(?![\s\S])/u));
|
|
2498
|
+
Schema.Record(roleKey, Schema.Struct({
|
|
2488
2499
|
model: modelText,
|
|
2489
2500
|
reasoningEffort: Schema.optionalKey(modelText)
|
|
2490
2501
|
})).check(Schema.makeFilter((value) => Object.keys(value).length > 0 && Object.keys(value).length <= 64));
|
|
2491
|
-
var
|
|
2502
|
+
var ResolvedModelRolesSchema = Schema.Record(roleKey, Schema.Struct({
|
|
2492
2503
|
model: Schema.NullOr(modelText),
|
|
2493
2504
|
reasoningEffort: Schema.NullOr(modelText)
|
|
2494
2505
|
})).check(Schema.makeFilter((value) => Object.keys(value).length <= 64));
|
|
@@ -2530,8 +2541,14 @@ var AdapterIdentitySchema = Schema.Struct({
|
|
|
2530
2541
|
behaviorRevision: Schema.NullOr(NonEmptyStringSchema),
|
|
2531
2542
|
cleanupTimeoutMs: Schema.optionalKey(AdapterCleanupTimeoutMsSchema)
|
|
2532
2543
|
});
|
|
2544
|
+
var RunPluginIdentitySchema = Schema.Struct({
|
|
2545
|
+
name: NonEmptyStringSchema,
|
|
2546
|
+
key: NonEmptyStringSchema,
|
|
2547
|
+
identity: RunContextJsonObjectSchema
|
|
2548
|
+
});
|
|
2533
2549
|
var RunExecutionContextSchema = Schema.Struct({
|
|
2534
|
-
|
|
2550
|
+
plugins: Schema.optionalKey(Schema.Array(RunPluginIdentitySchema)),
|
|
2551
|
+
models: Schema.optionalKey(ResolvedModelRolesSchema),
|
|
2535
2552
|
adapter: AdapterIdentitySchema,
|
|
2536
2553
|
model: Schema.NullOr(Schema.String),
|
|
2537
2554
|
reasoningEffort: Schema.NullOr(Schema.String),
|
|
@@ -3506,6 +3523,76 @@ function readVerifiedRange(source, metadata, offset, limit) {
|
|
|
3506
3523
|
return output;
|
|
3507
3524
|
}
|
|
3508
3525
|
//#endregion
|
|
3526
|
+
//#region src/inspection/planned-attempt.ts
|
|
3527
|
+
var { slotId: plannedAttemptId, ...positionFields } = RecordSlotIdentitySchema.fields;
|
|
3528
|
+
var PlannedAttemptSchema = Schema.Struct({
|
|
3529
|
+
plannedAttemptId,
|
|
3530
|
+
...positionFields
|
|
3531
|
+
});
|
|
3532
|
+
var { slotId: attemptPosition, ...attemptFields } = AttemptDocumentSchema.fields;
|
|
3533
|
+
var InspectionAttemptCoreSchema = Schema.Struct({
|
|
3534
|
+
plannedAttemptId: attemptPosition,
|
|
3535
|
+
...attemptFields
|
|
3536
|
+
}).check(Schema.makeFilter(({ plannedAttemptId, ...attempt }) => Schema.is(AttemptDocumentSchema)({
|
|
3537
|
+
...attempt,
|
|
3538
|
+
slotId: plannedAttemptId
|
|
3539
|
+
})));
|
|
3540
|
+
var { expectedSlots: _expectedSlots, ...runFields } = RunDocumentSchema.fields;
|
|
3541
|
+
var InspectionRunCoreSchema = Schema.Struct({
|
|
3542
|
+
...runFields,
|
|
3543
|
+
plannedAttempts: Schema.Array(PlannedAttemptSchema)
|
|
3544
|
+
}).check(Schema.makeFilter(({ plannedAttempts, ...run }) => Schema.is(RunDocumentSchema)({
|
|
3545
|
+
...run,
|
|
3546
|
+
expectedSlots: plannedAttempts.map(({ plannedAttemptId, ...position }) => ({
|
|
3547
|
+
...position,
|
|
3548
|
+
slotId: plannedAttemptId
|
|
3549
|
+
}))
|
|
3550
|
+
})));
|
|
3551
|
+
var InspectionMemberSchema = Schema.Union(MemberDocumentSchema.members.map((member) => {
|
|
3552
|
+
const { slotId, ...fields } = member.fields;
|
|
3553
|
+
return Schema.Struct({
|
|
3554
|
+
plannedAttemptId: slotId,
|
|
3555
|
+
...fields
|
|
3556
|
+
});
|
|
3557
|
+
})).check(Schema.makeFilter(({ plannedAttemptId, ...member }) => Schema.is(MemberDocumentSchema)({
|
|
3558
|
+
...member,
|
|
3559
|
+
slotId: plannedAttemptId
|
|
3560
|
+
})));
|
|
3561
|
+
var { originSlotId, ...publicationFields } = RunPublishedPublicationSchema.fields;
|
|
3562
|
+
var InspectionPublishedPublicationSchema = Schema.Struct({
|
|
3563
|
+
...publicationFields,
|
|
3564
|
+
originPlannedAttemptId: originSlotId
|
|
3565
|
+
});
|
|
3566
|
+
var PlannedAttemptPublicationSchema = Schema.Union([
|
|
3567
|
+
RunPendingPublicationSchema,
|
|
3568
|
+
InspectionPublishedPublicationSchema,
|
|
3569
|
+
RunAbsentPublicationSchema
|
|
3570
|
+
]);
|
|
3571
|
+
function projectPlannedAttempt({ slotId, ...position }) {
|
|
3572
|
+
return Object.freeze(Schema.decodeUnknownSync(PlannedAttemptSchema)({
|
|
3573
|
+
...position,
|
|
3574
|
+
plannedAttemptId: slotId
|
|
3575
|
+
}));
|
|
3576
|
+
}
|
|
3577
|
+
function projectAttemptCore({ slotId, ...attempt }) {
|
|
3578
|
+
return Object.freeze({
|
|
3579
|
+
...attempt,
|
|
3580
|
+
plannedAttemptId: slotId
|
|
3581
|
+
});
|
|
3582
|
+
}
|
|
3583
|
+
function projectRunCore({ expectedSlots, ...run }) {
|
|
3584
|
+
return Object.freeze({
|
|
3585
|
+
...run,
|
|
3586
|
+
plannedAttempts: Object.freeze(expectedSlots.map(projectPlannedAttempt))
|
|
3587
|
+
});
|
|
3588
|
+
}
|
|
3589
|
+
function projectMember({ slotId, ...member }) {
|
|
3590
|
+
return Object.freeze({
|
|
3591
|
+
...member,
|
|
3592
|
+
plannedAttemptId: slotId
|
|
3593
|
+
});
|
|
3594
|
+
}
|
|
3595
|
+
//#endregion
|
|
3509
3596
|
//#region src/inspection/artifact-list.ts
|
|
3510
3597
|
var { content: _content, ...metadataFields } = ArtifactSchema.fields;
|
|
3511
3598
|
var InspectionArtifactsPageLimitSchema = NonNegativeSafeIntegerSchema$2.pipe(Schema.check(Schema.makeFilter((value) => value > 0 && value <= 128)));
|
|
@@ -3936,7 +4023,7 @@ function validateObservabilityCollection(collection) {
|
|
|
3936
4023
|
}
|
|
3937
4024
|
//#endregion
|
|
3938
4025
|
//#region src/inspection/protocol-values.ts
|
|
3939
|
-
var QUERY_PROTOCOL = "niceeval.query/
|
|
4026
|
+
var QUERY_PROTOCOL = "niceeval.query/v2";
|
|
3940
4027
|
/** Selector semantics revision; independent from the wire protocol major. */
|
|
3941
4028
|
var INSPECTION_BEHAVIOR_VERSION = "2.0.0";
|
|
3942
4029
|
//#endregion
|
|
@@ -4505,6 +4592,40 @@ var AssertionDetailResultSchema = Schema.toType(Schema.Union([Schema.Struct({
|
|
|
4505
4592
|
matcher: MatcherProjectionSchema
|
|
4506
4593
|
})]));
|
|
4507
4594
|
//#endregion
|
|
4595
|
+
//#region src/inspection/lifecycle.ts
|
|
4596
|
+
function projectLifecyclePhase(phase) {
|
|
4597
|
+
return phase.replace(/\.setup$/, ".before").replace(/\.teardown$/, ".after");
|
|
4598
|
+
}
|
|
4599
|
+
//#endregion
|
|
4600
|
+
//#region src/record/family/attempt-note/schema.ts
|
|
4601
|
+
var AttemptNoteLimits = Object.freeze({
|
|
4602
|
+
maximumEntries: 64,
|
|
4603
|
+
maximumJsonBytes: 65536
|
|
4604
|
+
});
|
|
4605
|
+
var NoteJsonSchema = Schema.suspend(() => Schema.Union([
|
|
4606
|
+
Schema.Null,
|
|
4607
|
+
Schema.Boolean,
|
|
4608
|
+
Schema.Finite,
|
|
4609
|
+
Schema.String,
|
|
4610
|
+
Schema.Array(NoteJsonSchema),
|
|
4611
|
+
Schema.Record(Schema.String, NoteJsonSchema)
|
|
4612
|
+
]));
|
|
4613
|
+
var AttemptNoteSchema = Schema.Struct({
|
|
4614
|
+
label: Schema.String,
|
|
4615
|
+
sequence: NonNegativeSafeIntegerSchema$2,
|
|
4616
|
+
value: NoteJsonSchema,
|
|
4617
|
+
unit: Schema.optional(Schema.Literals([
|
|
4618
|
+
"ms",
|
|
4619
|
+
"seconds",
|
|
4620
|
+
"tokens",
|
|
4621
|
+
"usd",
|
|
4622
|
+
"ratio",
|
|
4623
|
+
"count",
|
|
4624
|
+
"bytes"
|
|
4625
|
+
]))
|
|
4626
|
+
});
|
|
4627
|
+
var AttemptNotesSchema = Schema.Array(AttemptNoteSchema).check(Schema.makeFilter((notes) => notes.length <= AttemptNoteLimits.maximumEntries && new Set(notes.map((note) => note.label)).size === notes.length && notes.every((note, index) => note.sequence === index && (note.unit === void 0 || typeof note.value === "number") && new TextEncoder().encode(JSON.stringify(note)).byteLength <= AttemptNoteLimits.maximumJsonBytes)));
|
|
4628
|
+
//#endregion
|
|
4508
4629
|
//#region src/o11y/cache-read.ts
|
|
4509
4630
|
var Reason = Schema.Literals([
|
|
4510
4631
|
"usage-not-recorded",
|
|
@@ -4541,17 +4662,17 @@ var consistent = (value) => {
|
|
|
4541
4662
|
var Summary = Schema.Struct(fields).check(Schema.makeFilter(consistent));
|
|
4542
4663
|
var CacheReadReportSchema = Schema.Struct({
|
|
4543
4664
|
total: Summary,
|
|
4544
|
-
|
|
4545
|
-
|
|
4665
|
+
roles: Schema.Array(Schema.Struct({
|
|
4666
|
+
modelRole: Schema.NullOr(Schema.String),
|
|
4546
4667
|
...fields
|
|
4547
4668
|
}).check(Schema.makeFilter(consistent))),
|
|
4548
4669
|
models: Schema.Array(Schema.Struct({
|
|
4549
|
-
|
|
4670
|
+
modelRole: Schema.NullOr(Schema.String),
|
|
4550
4671
|
provider: Schema.NullOr(Schema.String),
|
|
4551
4672
|
model: Schema.NullOr(Schema.String),
|
|
4552
4673
|
...fields
|
|
4553
4674
|
}).check(Schema.makeFilter(consistent)))
|
|
4554
|
-
}).check(Schema.makeFilter((value) => value.
|
|
4675
|
+
}).check(Schema.makeFilter((value) => value.roles.length <= 65 && value.models.length <= 4e3));
|
|
4555
4676
|
function summary(calls, collectionComplete, absent) {
|
|
4556
4677
|
let numerator = 0;
|
|
4557
4678
|
let denominator = 0;
|
|
@@ -4599,19 +4720,19 @@ function summary(calls, collectionComplete, absent) {
|
|
|
4599
4720
|
}
|
|
4600
4721
|
var compare$1 = (a, b) => a === b ? 0 : a === null ? -1 : b === null ? 1 : a < b ? -1 : 1;
|
|
4601
4722
|
/** A historical collection marked complete is not proof of an explicit producer seal. */
|
|
4602
|
-
function projectCacheRead(usage,
|
|
4723
|
+
function projectCacheRead(usage, roles, producerCompletenessKnown, absent = "usage-not-recorded") {
|
|
4603
4724
|
if (usage === null) return Object.freeze({
|
|
4604
4725
|
total: summary([], false, absent),
|
|
4605
|
-
|
|
4726
|
+
roles: Object.freeze([]),
|
|
4606
4727
|
models: Object.freeze([])
|
|
4607
4728
|
});
|
|
4608
4729
|
const complete = producerCompletenessKnown && usage.collection.state === "complete";
|
|
4609
|
-
const
|
|
4730
|
+
const byRole = new Map(Object.keys(roles ?? {}).map((role) => [role, []]));
|
|
4610
4731
|
const byModel = /* @__PURE__ */ new Map();
|
|
4611
4732
|
for (const call of usage.calls) {
|
|
4612
|
-
const
|
|
4613
|
-
if (
|
|
4614
|
-
else
|
|
4733
|
+
const role = byRole.get(call.modelSlot);
|
|
4734
|
+
if (role === void 0) byRole.set(call.modelSlot, [call]);
|
|
4735
|
+
else role.push(call);
|
|
4615
4736
|
const key = JSON.stringify([
|
|
4616
4737
|
call.modelSlot,
|
|
4617
4738
|
call.provider,
|
|
@@ -4622,18 +4743,18 @@ function projectCacheRead(usage, slots, producerCompletenessKnown, absent = "usa
|
|
|
4622
4743
|
else model.push(call);
|
|
4623
4744
|
}
|
|
4624
4745
|
const models = [...byModel.values()].map((calls) => {
|
|
4625
|
-
const { modelSlot, provider, model } = calls[0];
|
|
4746
|
+
const { modelSlot: modelRole, provider, model } = calls[0];
|
|
4626
4747
|
return Object.freeze({
|
|
4627
|
-
|
|
4748
|
+
modelRole,
|
|
4628
4749
|
provider,
|
|
4629
4750
|
model,
|
|
4630
4751
|
...summary(calls, complete)
|
|
4631
4752
|
});
|
|
4632
|
-
}).sort((a, b) => compare$1(a.
|
|
4753
|
+
}).sort((a, b) => compare$1(a.modelRole, b.modelRole) || compare$1(a.provider, b.provider) || compare$1(a.model, b.model));
|
|
4633
4754
|
return Object.freeze({
|
|
4634
4755
|
total: summary(usage.calls, complete),
|
|
4635
|
-
|
|
4636
|
-
|
|
4756
|
+
roles: Object.freeze([...byRole].sort(([a], [b]) => compare$1(a, b)).map(([modelRole, calls]) => Object.freeze({
|
|
4757
|
+
modelRole,
|
|
4637
4758
|
...summary(calls, complete)
|
|
4638
4759
|
}))),
|
|
4639
4760
|
models: Object.freeze(models)
|
|
@@ -5473,8 +5594,10 @@ function effectiveUsageCalls(usage) {
|
|
|
5473
5594
|
const receipts = new Map((usage.priceReceipts ?? []).map((receipt) => [receipt.callId, receipt]));
|
|
5474
5595
|
return Object.freeze(usage.calls.map((call) => {
|
|
5475
5596
|
const receipt = receipts.get(call.callId);
|
|
5597
|
+
const { modelSlot, ...fields } = call;
|
|
5476
5598
|
return Object.freeze({
|
|
5477
|
-
...
|
|
5599
|
+
...fields,
|
|
5600
|
+
modelRole: modelSlot,
|
|
5478
5601
|
effectiveCost: call.cost !== null ? Object.freeze({
|
|
5479
5602
|
...call.cost,
|
|
5480
5603
|
state: "complete"
|
|
@@ -5577,7 +5700,7 @@ function adapterInspectionTokenTotal(usage, metric) {
|
|
|
5577
5700
|
/** Tuple order is stable across hosts, with missing identities before strings. */
|
|
5578
5701
|
function compareAdapterModelGroups(left, right) {
|
|
5579
5702
|
for (const key of [
|
|
5580
|
-
"
|
|
5703
|
+
"modelRole",
|
|
5581
5704
|
"provider",
|
|
5582
5705
|
"model"
|
|
5583
5706
|
]) {
|
|
@@ -5600,10 +5723,10 @@ function projectAdapterModelUsage(usage, models, unavailable = {
|
|
|
5600
5723
|
for (const call of usage?.calls ?? []) if (call.modelSlot !== null) counts.set(call.modelSlot, (counts.get(call.modelSlot) ?? 0) + 1);
|
|
5601
5724
|
const configuredModels = models === void 0 ? Object.freeze({ state: "not-recorded" }) : Object.freeze({
|
|
5602
5725
|
state: "available",
|
|
5603
|
-
bindings: Object.freeze(Object.keys(models).sort().map((
|
|
5604
|
-
|
|
5605
|
-
...models[
|
|
5606
|
-
recordedCalls: usage === null ? null : counts.get(
|
|
5726
|
+
bindings: Object.freeze(Object.keys(models).sort().map((modelRole) => Object.freeze({
|
|
5727
|
+
modelRole,
|
|
5728
|
+
...models[modelRole],
|
|
5729
|
+
recordedCalls: usage === null ? null : counts.get(modelRole) ?? 0
|
|
5607
5730
|
})))
|
|
5608
5731
|
});
|
|
5609
5732
|
if (usage === null) return Object.freeze({
|
|
@@ -5621,7 +5744,7 @@ function projectAdapterModelUsage(usage, models, unavailable = {
|
|
|
5621
5744
|
const grouped = /* @__PURE__ */ new Map();
|
|
5622
5745
|
for (const call of effectiveUsageCalls(usage)) {
|
|
5623
5746
|
const identity = JSON.stringify([
|
|
5624
|
-
call.
|
|
5747
|
+
call.modelRole,
|
|
5625
5748
|
call.provider,
|
|
5626
5749
|
call.model
|
|
5627
5750
|
]);
|
|
@@ -5631,13 +5754,13 @@ function projectAdapterModelUsage(usage, models, unavailable = {
|
|
|
5631
5754
|
}
|
|
5632
5755
|
const allGroups = [...grouped.values()].sort((left, right) => compareAdapterModelGroups(left[0], right[0]));
|
|
5633
5756
|
const groups = allGroups.slice(0, 64).map((calls) => {
|
|
5634
|
-
const {
|
|
5757
|
+
const { modelRole, provider, model } = calls[0];
|
|
5635
5758
|
const groupUsage = {
|
|
5636
5759
|
...usage,
|
|
5637
5760
|
calls
|
|
5638
5761
|
};
|
|
5639
5762
|
return Object.freeze({
|
|
5640
|
-
|
|
5763
|
+
modelRole,
|
|
5641
5764
|
provider,
|
|
5642
5765
|
model,
|
|
5643
5766
|
recordedCalls: calls.length,
|
|
@@ -6980,7 +7103,7 @@ var OverviewIssueSchema = Schema.Union([
|
|
|
6980
7103
|
Schema.Struct({
|
|
6981
7104
|
code: Schema.Literals(["attempt-origin-missing", "attempt-not-observed"]),
|
|
6982
7105
|
runId: Schema.String,
|
|
6983
|
-
|
|
7106
|
+
plannedAttemptId: Schema.String,
|
|
6984
7107
|
evalId: Schema.String,
|
|
6985
7108
|
attemptOrdinal: Schema.Number
|
|
6986
7109
|
}),
|
|
@@ -7008,7 +7131,7 @@ var MetricSchema = Schema.Struct({
|
|
|
7008
7131
|
value: Schema.NullOr(Schema.Number),
|
|
7009
7132
|
samples: Schema.Number,
|
|
7010
7133
|
total: Schema.Number,
|
|
7011
|
-
basis: Schema.Literals(["
|
|
7134
|
+
basis: Schema.Literals(["planned-attempt", "eval"]),
|
|
7012
7135
|
issues: Schema.Array(OverviewIssueSchema),
|
|
7013
7136
|
refs: Schema.Array(AttemptRefSchema),
|
|
7014
7137
|
unit: Schema.optional(Schema.Literals([
|
|
@@ -7096,7 +7219,7 @@ var AggregateFields = {
|
|
|
7096
7219
|
issues: Schema.Array(OverviewIssueSchema)
|
|
7097
7220
|
};
|
|
7098
7221
|
var OverviewPublishedMemberSchema = Schema.Struct({
|
|
7099
|
-
...
|
|
7222
|
+
...InspectionPublishedPublicationSchema.fields,
|
|
7100
7223
|
verdict: Schema.NullOr(Schema.Literals([
|
|
7101
7224
|
"passed",
|
|
7102
7225
|
"failed",
|
|
@@ -7119,7 +7242,7 @@ var InspectionExecutionValueSchema = Schema.Union([
|
|
|
7119
7242
|
var InspectionLabelsSchema = Schema.Record(Schema.String, InspectionExecutionValueSchema);
|
|
7120
7243
|
var OverviewMemberSchema = Schema.Struct({
|
|
7121
7244
|
runId: Schema.String,
|
|
7122
|
-
|
|
7245
|
+
plannedAttemptId: Schema.String,
|
|
7123
7246
|
evalId: Schema.String,
|
|
7124
7247
|
attemptOrdinal: Schema.Number,
|
|
7125
7248
|
labels: InspectionLabelsSchema,
|
|
@@ -7134,6 +7257,7 @@ var OverviewGroupSchema = Schema.Struct({
|
|
|
7134
7257
|
...AggregateFields
|
|
7135
7258
|
});
|
|
7136
7259
|
var OverviewExperimentSchema = Schema.Struct({
|
|
7260
|
+
plugins: Schema.suspend(() => Schema.Array(RunPluginIdentitySchema)),
|
|
7137
7261
|
experimentId: Schema.String,
|
|
7138
7262
|
adapter: Schema.Union([Schema.Struct({
|
|
7139
7263
|
state: Schema.Literal("available"),
|
|
@@ -7157,6 +7281,15 @@ var InspectionOverviewResultSchema = Schema.Struct({
|
|
|
7157
7281
|
cells: Schema.Array(OverviewCellSchema)
|
|
7158
7282
|
});
|
|
7159
7283
|
var InspectionExperimentResultSchema = Schema.Struct({
|
|
7284
|
+
notes: Schema.Array(Schema.Struct({
|
|
7285
|
+
label: Schema.String,
|
|
7286
|
+
unit: AttemptNoteSchema.fields.unit,
|
|
7287
|
+
count: NonNegativeSafeIntegerSchema$2,
|
|
7288
|
+
min: Schema.Finite,
|
|
7289
|
+
median: Schema.Finite,
|
|
7290
|
+
p90: Schema.Finite,
|
|
7291
|
+
max: Schema.Finite
|
|
7292
|
+
})),
|
|
7160
7293
|
costSummary: Schema.suspend(() => ExperimentCostSummarySchema),
|
|
7161
7294
|
modelUsage: Schema.Struct({
|
|
7162
7295
|
attempts: Schema.Array(Schema.Struct({
|
|
@@ -7186,7 +7319,7 @@ var InspectionRunValueSchema = Schema.Struct({
|
|
|
7186
7319
|
context: Schema.optional(RunContextSchema),
|
|
7187
7320
|
startedAt: UtcMillisSchema,
|
|
7188
7321
|
completedAt: Schema.optional(UtcMillisSchema),
|
|
7189
|
-
|
|
7322
|
+
plannedAttempts: Schema.Array(PlannedAttemptSchema)
|
|
7190
7323
|
});
|
|
7191
7324
|
var InspectionRunListResultSchema = Schema.Array(RunSummarySchema);
|
|
7192
7325
|
var InspectionScoredValueSchema = Schema.Union([
|
|
@@ -7309,12 +7442,13 @@ var AssertionEvidenceSchema = Schema.Union([
|
|
|
7309
7442
|
})
|
|
7310
7443
|
]);
|
|
7311
7444
|
var InspectionAttemptResultSchema = Schema.Struct({
|
|
7312
|
-
|
|
7445
|
+
notes: AttemptNotesSchema,
|
|
7446
|
+
core: InspectionAttemptCoreSchema,
|
|
7313
7447
|
locator: Schema.String,
|
|
7314
|
-
originRun:
|
|
7448
|
+
originRun: InspectionRunCoreSchema,
|
|
7315
7449
|
targets: Schema.Array(Schema.Struct({
|
|
7316
7450
|
runId: Schema.String,
|
|
7317
|
-
member:
|
|
7451
|
+
member: InspectionMemberSchema
|
|
7318
7452
|
})),
|
|
7319
7453
|
evidence: AssertionEvidenceSchema,
|
|
7320
7454
|
assertions: AssertionIndexSchema,
|
|
@@ -7503,7 +7637,7 @@ var TraceDiagnosticsSchema = Schema.Struct({
|
|
|
7503
7637
|
sequence: Schema.Number,
|
|
7504
7638
|
turnId: Schema.NullOr(Schema.String),
|
|
7505
7639
|
phase: Schema.Literals([
|
|
7506
|
-
"attempt.
|
|
7640
|
+
"attempt.before",
|
|
7507
7641
|
"sandbox.prepare",
|
|
7508
7642
|
"agent.ensure",
|
|
7509
7643
|
"eval.run",
|
|
@@ -7511,7 +7645,7 @@ var TraceDiagnosticsSchema = Schema.Struct({
|
|
|
7511
7645
|
"sandbox.command",
|
|
7512
7646
|
"assertion.evaluate",
|
|
7513
7647
|
"verdict.fold",
|
|
7514
|
-
"attempt.
|
|
7648
|
+
"attempt.after"
|
|
7515
7649
|
]),
|
|
7516
7650
|
kind: Schema.Literals(["advisory", "execution-error"]),
|
|
7517
7651
|
code: Schema.String,
|
|
@@ -7760,7 +7894,7 @@ var InspectionTraceResultSchema = Schema.Struct({
|
|
|
7760
7894
|
omittedLimitationCount: Schema.Number,
|
|
7761
7895
|
items: Schema.Array(Schema.Struct({
|
|
7762
7896
|
commandId: CommandIdSchema$1,
|
|
7763
|
-
phase: Schema.Literals(SANDBOX_COMMAND_PHASES),
|
|
7897
|
+
phase: Schema.Literals(SANDBOX_COMMAND_PHASES.map(projectLifecyclePhase)),
|
|
7764
7898
|
outcome: CommandOutcomeSchema
|
|
7765
7899
|
})),
|
|
7766
7900
|
hasMore: Schema.Boolean,
|
|
@@ -7939,12 +8073,12 @@ var InspectionTraceDetailResultSchema = Schema.Union([
|
|
|
7939
8073
|
outcome: CommandOutcomeSchema,
|
|
7940
8074
|
turnId: Schema.NullOr(Schema.String),
|
|
7941
8075
|
phase: Schema.Literals([
|
|
7942
|
-
"attempt.
|
|
8076
|
+
"attempt.before",
|
|
7943
8077
|
"sandbox.prepare",
|
|
7944
8078
|
"agent.ensure",
|
|
7945
8079
|
"eval.run",
|
|
7946
8080
|
"sandbox.command",
|
|
7947
|
-
"attempt.
|
|
8081
|
+
"attempt.after"
|
|
7948
8082
|
]),
|
|
7949
8083
|
sequence: Schema.Number,
|
|
7950
8084
|
stdout: CommandStreamSchema,
|
|
@@ -8005,8 +8139,10 @@ var EffectiveCostSchema = Schema.Struct({
|
|
|
8005
8139
|
}),
|
|
8006
8140
|
state: Schema.Literals(["complete", "partial"])
|
|
8007
8141
|
});
|
|
8142
|
+
var { modelSlot: persistedModelSlot, ...publicAdapterCallFields } = AdapterUsageCallSchema.fields;
|
|
8008
8143
|
var AdapterUsageInspectionCallSchema = Schema.Struct({
|
|
8009
|
-
...
|
|
8144
|
+
...publicAdapterCallFields,
|
|
8145
|
+
modelRole: persistedModelSlot,
|
|
8010
8146
|
effectiveCost: Schema.NullOr(EffectiveCostSchema)
|
|
8011
8147
|
});
|
|
8012
8148
|
var EffectiveCostTotalSchema = Schema.Struct({
|
|
@@ -8047,14 +8183,14 @@ var ModelGroupTokenTotalSchema = Schema.Struct({
|
|
|
8047
8183
|
var ConfiguredModelsSchema = Schema.Union([Schema.Struct({ state: Schema.Literal("not-recorded") }), Schema.Struct({
|
|
8048
8184
|
state: Schema.Literal("available"),
|
|
8049
8185
|
bindings: Schema.Array(Schema.Struct({
|
|
8050
|
-
|
|
8186
|
+
modelRole: AdapterUsageModelSlotSchema,
|
|
8051
8187
|
model: Schema.NullOr(Schema.String.check(Schema.isPattern(/\S/u))),
|
|
8052
8188
|
reasoningEffort: Schema.NullOr(Schema.String.check(Schema.isPattern(/\S/u))),
|
|
8053
8189
|
recordedCalls: Schema.NullOr(RecordedCallCountSchema)
|
|
8054
|
-
})).check(Schema.makeFilter((bindings) => bindings.length <= 64 && bindings.every((entry, index) => index === 0 || bindings[index - 1].
|
|
8190
|
+
})).check(Schema.makeFilter((bindings) => bindings.length <= 64 && bindings.every((entry, index) => index === 0 || bindings[index - 1].modelRole < entry.modelRole)))
|
|
8055
8191
|
})]);
|
|
8056
8192
|
var ModelGroupSchema = Schema.Struct({
|
|
8057
|
-
|
|
8193
|
+
modelRole: Schema.NullOr(AdapterUsageModelSlotSchema),
|
|
8058
8194
|
provider: AdapterUsageCallSchema.fields.provider,
|
|
8059
8195
|
model: AdapterUsageCallSchema.fields.model,
|
|
8060
8196
|
recordedCalls: RecordedCallCountSchema.check(Schema.isGreaterThan(0)),
|
|
@@ -8107,17 +8243,17 @@ var TotalUsageCostsSchema = Schema.Struct({
|
|
|
8107
8243
|
missingSources: Schema.Array(Schema.Literals(["application", "judge"])).check(Schema.makeFilter((sources) => sources.length <= 2 && sources.every((source, index) => index === 0 || sources[index - 1] === "application" && source === "judge")))
|
|
8108
8244
|
}).check(Schema.makeFilter((value) => value.state === (value.missingSources.length === 0 ? "complete" : value.values.length === 0 ? "unavailable" : "partial") && value.values.every((entry, index) => index === 0 || value.values[index - 1].currency < entry.currency)));
|
|
8109
8245
|
var ExperimentCostSummarySchema = Schema.Struct({
|
|
8110
|
-
scope: Schema.Literal("latest-recorded-
|
|
8246
|
+
scope: Schema.Literal("latest-recorded-attempts"),
|
|
8111
8247
|
totalCosts: TotalUsageCostsSchema,
|
|
8112
8248
|
coverage: Schema.Struct({
|
|
8113
|
-
|
|
8114
|
-
|
|
8249
|
+
plannedAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
8250
|
+
recordedAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
8115
8251
|
originAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
8116
8252
|
completeAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
8117
8253
|
partialAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
8118
8254
|
unavailableAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
8119
|
-
|
|
8120
|
-
}).check(Schema.makeFilter((value) => value.
|
|
8255
|
+
missingAttemptCount: NonNegativeSafeIntegerSchema$2
|
|
8256
|
+
}).check(Schema.makeFilter((value) => value.plannedAttemptCount === value.recordedAttemptCount + value.missingAttemptCount && value.originAttemptCount <= value.recordedAttemptCount && value.originAttemptCount === value.completeAttemptCount + value.partialAttemptCount + value.unavailableAttemptCount))
|
|
8121
8257
|
});
|
|
8122
8258
|
var JudgeCostTotalsSchema = EffectiveCostTotalSchema.check(Schema.makeFilter((costs) => costs.totalCalls <= 4e3 && costs.source === null === (costs.values.length === 0) && costs.values.every((entry, index) => entry.coveredCalls <= entry.reportedCalls + entry.estimatedCalls && entry.reportedCalls + entry.estimatedCalls <= costs.totalCalls && entry.source === (entry.reportedCalls === 0 ? "estimated" : entry.estimatedCalls === 0 ? "reported" : "mixed") && (index === 0 || costs.values[index - 1].currency < entry.currency)) && costs.values.reduce((count, entry) => count + entry.reportedCalls + entry.estimatedCalls, 0) <= costs.totalCalls && (costs.state !== "unavailable" || costs.values.length === 0) && (costs.state !== "complete" || costs.values.reduce((count, entry) => count + entry.coveredCalls, 0) === costs.totalCalls)));
|
|
8123
8259
|
var JudgeUsageUnavailableSchema = Schema.Union([Schema.Struct({
|
|
@@ -8261,8 +8397,8 @@ var RunOverviewMemberLimitationSchema = Schema.Union([
|
|
|
8261
8397
|
})
|
|
8262
8398
|
]);
|
|
8263
8399
|
var RunOverviewMemberSchema = Schema.Struct({
|
|
8264
|
-
...
|
|
8265
|
-
publication:
|
|
8400
|
+
...PlannedAttemptSchema.fields,
|
|
8401
|
+
publication: PlannedAttemptPublicationSchema,
|
|
8266
8402
|
state: Schema.Literals([
|
|
8267
8403
|
"executed",
|
|
8268
8404
|
"carried",
|
|
@@ -8286,20 +8422,20 @@ var RunOverviewMemberSchema = Schema.Struct({
|
|
|
8286
8422
|
limitations: Schema.Array(RunOverviewMemberLimitationSchema)
|
|
8287
8423
|
});
|
|
8288
8424
|
var RunOverviewLocatedLimitationSchema = Schema.Struct({
|
|
8289
|
-
|
|
8425
|
+
plannedAttemptId: Schema.String,
|
|
8290
8426
|
locator: Schema.NullOr(Schema.String),
|
|
8291
8427
|
limitation: RunOverviewMemberLimitationSchema
|
|
8292
8428
|
});
|
|
8293
8429
|
var InspectionRunResultSchema = Schema.Struct({
|
|
8294
8430
|
value: InspectionRunValueSchema,
|
|
8295
|
-
members: Schema.Array(
|
|
8296
|
-
attempts: Schema.Array(
|
|
8431
|
+
members: Schema.Array(InspectionMemberSchema),
|
|
8432
|
+
attempts: Schema.Array(InspectionAttemptCoreSchema),
|
|
8297
8433
|
denominator: Schema.Struct({
|
|
8298
8434
|
expected: Schema.Number,
|
|
8299
8435
|
published: Schema.Number,
|
|
8300
8436
|
missing: Schema.Number
|
|
8301
8437
|
}),
|
|
8302
|
-
|
|
8438
|
+
plannedAttempts: Schema.Array(RunOverviewMemberSchema),
|
|
8303
8439
|
coverage: Schema.Struct({
|
|
8304
8440
|
state: RunOverviewStateSchema,
|
|
8305
8441
|
expectedMemberCount: Schema.Number,
|
|
@@ -8424,7 +8560,7 @@ var InspectionProjectGapReasonSchema = Schema.Literals([
|
|
|
8424
8560
|
"timeout-exceeded",
|
|
8425
8561
|
"adoption-unproven"
|
|
8426
8562
|
]);
|
|
8427
|
-
var
|
|
8563
|
+
var InspectionProjectPlannedAttemptSchema = Schema.Union([Schema.Struct({
|
|
8428
8564
|
...PositionFields,
|
|
8429
8565
|
state: Schema.Literal("reuse"),
|
|
8430
8566
|
sourceRunId: RunIdSchema,
|
|
@@ -8451,14 +8587,14 @@ var InspectionProjectResultSchema = Schema.Struct({
|
|
|
8451
8587
|
covered: NonNegativeSafeIntegerSchema$2,
|
|
8452
8588
|
gaps: NonNegativeSafeIntegerSchema$2
|
|
8453
8589
|
}),
|
|
8454
|
-
|
|
8590
|
+
plannedAttempts: Schema.Array(InspectionProjectPlannedAttemptSchema),
|
|
8455
8591
|
...InspectionOverviewResultSchema.fields,
|
|
8456
8592
|
history: Schema.Array(Schema.Struct({
|
|
8457
8593
|
...PositionFields,
|
|
8458
8594
|
sourceRunId: RunIdSchema,
|
|
8459
8595
|
locator: Schema.NullOr(LocatorSchema)
|
|
8460
8596
|
}))
|
|
8461
|
-
}).check(Schema.makeFilter((value) => value.coverage.covered + value.coverage.gaps === value.coverage.expected && value.
|
|
8597
|
+
}).check(Schema.makeFilter((value) => value.coverage.covered + value.coverage.gaps === value.coverage.expected && value.plannedAttempts.length === value.coverage.expected && value.plannedAttempts.filter((slot) => slot.state === "reuse").length === value.coverage.covered));
|
|
8462
8598
|
//#endregion
|
|
8463
8599
|
//#region src/inspection/protocol.ts
|
|
8464
8600
|
var AttemptLocatorSchema = Schema.String.pipe(Schema.refine((value) => ATTEMPT_LOCATOR_PATTERN.test(value), {
|
|
@@ -8539,7 +8675,7 @@ var ArtifactsResultSchema = Schema.Union([Schema.Struct({ state: Schema.Literal(
|
|
|
8539
8675
|
var ComparisonMemberSchema = Schema.Struct({
|
|
8540
8676
|
key: Schema.String,
|
|
8541
8677
|
runId: Schema.String,
|
|
8542
|
-
|
|
8678
|
+
plannedAttemptId: Schema.String,
|
|
8543
8679
|
evalId: Schema.String,
|
|
8544
8680
|
attemptOrdinal: Schema.Number,
|
|
8545
8681
|
locator: Schema.String
|
|
@@ -8551,11 +8687,11 @@ var RunsCompareResultSchema = Schema.Struct({
|
|
|
8551
8687
|
"paired"
|
|
8552
8688
|
]),
|
|
8553
8689
|
left: Schema.Struct({
|
|
8554
|
-
runs: Schema.Array(
|
|
8690
|
+
runs: Schema.Array(InspectionRunCoreSchema),
|
|
8555
8691
|
members: Schema.Array(ComparisonMemberSchema)
|
|
8556
8692
|
}),
|
|
8557
8693
|
right: Schema.Struct({
|
|
8558
|
-
runs: Schema.Array(
|
|
8694
|
+
runs: Schema.Array(InspectionRunCoreSchema),
|
|
8559
8695
|
members: Schema.Array(ComparisonMemberSchema)
|
|
8560
8696
|
}),
|
|
8561
8697
|
exactMemberSet: Schema.Boolean,
|
|
@@ -8592,6 +8728,7 @@ var inspectionProtocolRegistry = Object.freeze({
|
|
|
8592
8728
|
result: { experiment: InspectionExperimentResultSchema },
|
|
8593
8729
|
factKinds: [
|
|
8594
8730
|
"core",
|
|
8731
|
+
"attempt-note",
|
|
8595
8732
|
"assertions",
|
|
8596
8733
|
"attempt-cost",
|
|
8597
8734
|
"agent-turns",
|
|
@@ -8621,7 +8758,11 @@ var inspectionProtocolRegistry = Object.freeze({
|
|
|
8621
8758
|
"attempt.get": spec({
|
|
8622
8759
|
request: operation("attempt.get", { locator: AttemptLocatorSchema }),
|
|
8623
8760
|
result: { attempt: InspectionAttemptResultSchema },
|
|
8624
|
-
factKinds: [
|
|
8761
|
+
factKinds: [
|
|
8762
|
+
"core",
|
|
8763
|
+
"assertions",
|
|
8764
|
+
"attempt-note"
|
|
8765
|
+
]
|
|
8625
8766
|
}),
|
|
8626
8767
|
"attempt.assertion.detail": spec({
|
|
8627
8768
|
request: operation("attempt.assertion.detail", {
|
|
@@ -13110,14 +13251,13 @@ function sourceError(cause) {
|
|
|
13110
13251
|
});
|
|
13111
13252
|
}
|
|
13112
13253
|
//#endregion
|
|
13113
|
-
//#region src/
|
|
13114
|
-
var
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
|
|
13119
|
-
|
|
13120
|
-
}
|
|
13254
|
+
//#region src/record/family/attempt-note/definition.ts
|
|
13255
|
+
var attemptNotesRecordAttachment = defineRecordAttachment({
|
|
13256
|
+
owner: RecordOwner.attempt,
|
|
13257
|
+
family: "niceeval.attempt-note",
|
|
13258
|
+
schema: AttemptNotesSchema,
|
|
13259
|
+
validate: () => []
|
|
13260
|
+
});
|
|
13121
13261
|
//#endregion
|
|
13122
13262
|
//#region src/record/family/judge-usage/definition.ts
|
|
13123
13263
|
var judgeUsageRecordAttachment = defineRecordAttachment({
|
|
@@ -13958,6 +14098,7 @@ var turnContextsRecordAttachment = defineRecordAttachment({
|
|
|
13958
14098
|
//#region src/record/family/current.ts
|
|
13959
14099
|
/** Browser-neutral logical definitions, grouped only for direct current-reader use. */
|
|
13960
14100
|
var NiceEvalRecordAttachments = Object.freeze({
|
|
14101
|
+
attemptNotes: attemptNotesRecordAttachment,
|
|
13961
14102
|
adapterUsage: adapterUsageRecordAttachment,
|
|
13962
14103
|
judgeUsage: judgeUsageRecordAttachment,
|
|
13963
14104
|
assertions: assertionsRecordAttachment,
|
|
@@ -13987,6 +14128,7 @@ var current = (attachment, revision) => Object.freeze({
|
|
|
13987
14128
|
});
|
|
13988
14129
|
/** Current revisions without importing historical Node-only migration code. */
|
|
13989
14130
|
var NiceEvalCurrentRecordAttachments = Object.freeze({
|
|
14131
|
+
attemptNotes: current(attemptNotesRecordAttachment, 1),
|
|
13990
14132
|
adapterUsage: current(adapterUsageRecordAttachment, 4),
|
|
13991
14133
|
judgeUsage: current(judgeUsageRecordAttachment, 1),
|
|
13992
14134
|
assertions: current(assertionsRecordAttachment, 4),
|
|
@@ -14418,6 +14560,57 @@ function parseVerifiedJson(bytes, digest, label) {
|
|
|
14418
14560
|
return parseJson$1(bytes, label);
|
|
14419
14561
|
}
|
|
14420
14562
|
//#endregion
|
|
14563
|
+
//#region src/inspection/notes.ts
|
|
14564
|
+
function readAttemptNotes(resolved) {
|
|
14565
|
+
const attachment = attemptAttachment(resolved, NiceEvalRecordAttachments.attemptNotes.family);
|
|
14566
|
+
return attachment === void 0 ? [] : Schema.decodeUnknownSync(AttemptNotesSchema)(attachment.value);
|
|
14567
|
+
}
|
|
14568
|
+
function aggregateAttemptNotes(attempts) {
|
|
14569
|
+
const groups = /* @__PURE__ */ new Map();
|
|
14570
|
+
for (const attempt of attempts) for (const note of readAttemptNotes(attempt)) {
|
|
14571
|
+
if (typeof note.value !== "number") continue;
|
|
14572
|
+
const key = JSON.stringify([note.label, note.unit ?? null]);
|
|
14573
|
+
let group = groups.get(key);
|
|
14574
|
+
if (group === void 0) {
|
|
14575
|
+
group = {
|
|
14576
|
+
label: note.label,
|
|
14577
|
+
...note.unit === void 0 ? {} : { unit: note.unit },
|
|
14578
|
+
values: []
|
|
14579
|
+
};
|
|
14580
|
+
groups.set(key, group);
|
|
14581
|
+
}
|
|
14582
|
+
group.values.push(note.value);
|
|
14583
|
+
}
|
|
14584
|
+
return [...groups.values()].map(({ label, unit, values }) => {
|
|
14585
|
+
values.sort((a, b) => a - b);
|
|
14586
|
+
const quantile = (p) => {
|
|
14587
|
+
const position = (values.length - 1) * p;
|
|
14588
|
+
const lower = values[Math.floor(position)];
|
|
14589
|
+
const upper = values[Math.ceil(position)];
|
|
14590
|
+
const fraction = position - Math.floor(position);
|
|
14591
|
+
return lower * (1 - fraction) + upper * fraction;
|
|
14592
|
+
};
|
|
14593
|
+
return Object.freeze({
|
|
14594
|
+
label,
|
|
14595
|
+
...unit === void 0 ? {} : { unit },
|
|
14596
|
+
count: values.length,
|
|
14597
|
+
min: values[0],
|
|
14598
|
+
median: quantile(.5),
|
|
14599
|
+
p90: quantile(.9),
|
|
14600
|
+
max: values[values.length - 1]
|
|
14601
|
+
});
|
|
14602
|
+
});
|
|
14603
|
+
}
|
|
14604
|
+
//#endregion
|
|
14605
|
+
//#region src/inspection/project-input.ts
|
|
14606
|
+
var preparedInputs = /* @__PURE__ */ new WeakMap();
|
|
14607
|
+
function bindProjectInput(source, input) {
|
|
14608
|
+
preparedInputs.set(source, Object.freeze(input));
|
|
14609
|
+
}
|
|
14610
|
+
function projectInput(source) {
|
|
14611
|
+
return preparedInputs.get(source);
|
|
14612
|
+
}
|
|
14613
|
+
//#endregion
|
|
14421
14614
|
//#region src/shared/types.ts
|
|
14422
14615
|
/** 一次 Attempt 的互斥终态;跳过是已结束但不构成可执行结论的结果。 */
|
|
14423
14616
|
var VERDICTS = [
|
|
@@ -15204,7 +15397,7 @@ function projectAttemptTrace(source, attachments, execution, executionFilters =
|
|
|
15204
15397
|
const items = retainedTurns.length > 0 ? retainedTurns.flatMap((turn) => turn.items.map((item) => projectTypedConversationItem(item, turn.turnId))).slice(0, MAX_CONVERSATION_ITEMS) : [];
|
|
15205
15398
|
const commandItems = sandboxCommands.state === "available" ? sandboxCommands.value.segments.slice(0, MAX_COMMANDS).map((command) => Object.freeze({
|
|
15206
15399
|
commandId: command.commandId,
|
|
15207
|
-
phase: command.phase,
|
|
15400
|
+
phase: projectLifecyclePhase(command.phase),
|
|
15208
15401
|
outcome: command.outcome
|
|
15209
15402
|
})) : [];
|
|
15210
15403
|
const identityIndex = projectTypedTraceIdentityIndex(agentTurns, sandboxCommands);
|
|
@@ -15697,7 +15890,7 @@ function projectTraceCommandDetail(source, commands, commandId) {
|
|
|
15697
15890
|
workingDirectory: command.workingDirectory,
|
|
15698
15891
|
outcome: command.outcome,
|
|
15699
15892
|
turnId: command.turnId,
|
|
15700
|
-
phase: command.phase,
|
|
15893
|
+
phase: projectLifecyclePhase(command.phase),
|
|
15701
15894
|
sequence: command.sequence,
|
|
15702
15895
|
stdout: stream(command.stdout),
|
|
15703
15896
|
stderr: stream(command.stderr)
|
|
@@ -16330,8 +16523,8 @@ function projectTiming(activities) {
|
|
|
16330
16523
|
sequence: activity.sequence,
|
|
16331
16524
|
parentActivityId: activity.parentActivityId,
|
|
16332
16525
|
turnId: activity.turnId,
|
|
16333
|
-
phase: activity.phase,
|
|
16334
|
-
label: activity.label,
|
|
16526
|
+
phase: projectLifecyclePhase(activity.phase),
|
|
16527
|
+
label: projectLifecyclePhase(activity.label),
|
|
16335
16528
|
startOffsetMs: activity.startOffsetMs,
|
|
16336
16529
|
durationMs: activity.durationMs,
|
|
16337
16530
|
outcome: activity.outcome
|
|
@@ -16376,7 +16569,7 @@ function projectDiagnostics(diagnostics) {
|
|
|
16376
16569
|
diagnosticId: diagnostic.diagnosticId,
|
|
16377
16570
|
sequence: diagnostic.sequence,
|
|
16378
16571
|
turnId: diagnostic.turnId,
|
|
16379
|
-
phase: diagnostic.phase,
|
|
16572
|
+
phase: projectLifecyclePhase(diagnostic.phase),
|
|
16380
16573
|
kind: diagnostic.kind,
|
|
16381
16574
|
code: diagnostic.code,
|
|
16382
16575
|
summary: summary.value,
|
|
@@ -16636,7 +16829,7 @@ function makeCell(slots, labelKeys) {
|
|
|
16636
16829
|
selected.resolved;
|
|
16637
16830
|
return [Object.freeze({
|
|
16638
16831
|
runId: selected.target.run.runId,
|
|
16639
|
-
|
|
16832
|
+
plannedAttemptId: selected.slot.slotId,
|
|
16640
16833
|
evalId: selected.slot.evalId,
|
|
16641
16834
|
attemptOrdinal: selected.slot.attemptOrdinal,
|
|
16642
16835
|
labels: inspectionLabels([selected], labelKeys),
|
|
@@ -16664,6 +16857,7 @@ function makeExperiment(slots, cells, labelKeys) {
|
|
|
16664
16857
|
}));
|
|
16665
16858
|
return Object.freeze({
|
|
16666
16859
|
experimentId: first.experimentId,
|
|
16860
|
+
plugins: Object.freeze([...new Map(slots.flatMap(({ target }) => target?.run.context.execution.plugins ?? []).map((plugin) => [JSON.stringify(plugin), plugin])).values()]),
|
|
16667
16861
|
adapter: adapterValue(slots.map(({ adapter }) => adapter)),
|
|
16668
16862
|
model: executionValue(slots.map(({ model }) => model)),
|
|
16669
16863
|
labels: inspectionLabels(slots, labelKeys),
|
|
@@ -16740,7 +16934,7 @@ function metricForSlots(slots, key, unit, fold) {
|
|
|
16740
16934
|
state: failed ? "failed" : valued.length === 0 ? "unavailable" : partial ? "partial" : "available",
|
|
16741
16935
|
samples: valued.length,
|
|
16742
16936
|
total: slots.length,
|
|
16743
|
-
basis: "
|
|
16937
|
+
basis: "planned-attempt",
|
|
16744
16938
|
issues: Object.freeze([]),
|
|
16745
16939
|
refs: refsOf(valued),
|
|
16746
16940
|
unit,
|
|
@@ -16764,7 +16958,7 @@ function overviewPublication(selected) {
|
|
|
16764
16958
|
attemptId: member.attempt.attemptId,
|
|
16765
16959
|
attemptLocator: resolved.locator,
|
|
16766
16960
|
originRunId: member.attempt.originRunId,
|
|
16767
|
-
|
|
16961
|
+
originPlannedAttemptId: resolved.attempt.slotId,
|
|
16768
16962
|
verdict: selected.analysis.verdict,
|
|
16769
16963
|
score: scoreForMember(selected),
|
|
16770
16964
|
costUSD: costForSlots([selected]),
|
|
@@ -16855,7 +17049,7 @@ function costForSlots(slots) {
|
|
|
16855
17049
|
state: source === null ? "unavailable" : valued.length < subjects.length || valued.some(({ analysis }) => analysis.costUSD.state !== "available") ? "partial" : "available",
|
|
16856
17050
|
samples: valued.length,
|
|
16857
17051
|
total: subjects.length,
|
|
16858
|
-
basis: "
|
|
17052
|
+
basis: "planned-attempt",
|
|
16859
17053
|
issues: Object.freeze([]),
|
|
16860
17054
|
refs: refsOf(valued),
|
|
16861
17055
|
unit: "USD",
|
|
@@ -16912,7 +17106,7 @@ function passRateOf(slots, denominator, tally) {
|
|
|
16912
17106
|
}),
|
|
16913
17107
|
samples: denominator.classified,
|
|
16914
17108
|
total: denominator.expected,
|
|
16915
|
-
basis: "
|
|
17109
|
+
basis: "planned-attempt",
|
|
16916
17110
|
issues,
|
|
16917
17111
|
refs: refsOf(classified)
|
|
16918
17112
|
});
|
|
@@ -16924,7 +17118,7 @@ function scoreForMember(selected) {
|
|
|
16924
17118
|
state: "unsupported",
|
|
16925
17119
|
samples: 0,
|
|
16926
17120
|
total: 0,
|
|
16927
|
-
basis: "
|
|
17121
|
+
basis: "planned-attempt",
|
|
16928
17122
|
issues: Object.freeze([]),
|
|
16929
17123
|
refs: analysis.ref === null ? Object.freeze([]) : Object.freeze([analysis.ref]),
|
|
16930
17124
|
unit: "points",
|
|
@@ -16945,7 +17139,7 @@ function scoreForMember(selected) {
|
|
|
16945
17139
|
}),
|
|
16946
17140
|
samples: complete ? 1 : 0,
|
|
16947
17141
|
total: 1,
|
|
16948
|
-
basis: "
|
|
17142
|
+
basis: "planned-attempt",
|
|
16949
17143
|
issues: uniqueJson([...analysis.issues, ...analysis.score.hasPoints && !analysis.score.complete ? [scorePartialIssue(analysis)] : []]),
|
|
16950
17144
|
refs: analysis.ref === null ? Object.freeze([]) : Object.freeze([analysis.ref]),
|
|
16951
17145
|
unit: "points",
|
|
@@ -16965,7 +17159,7 @@ function scoreForCell(slots) {
|
|
|
16965
17159
|
state: slots.length === 0 ? "empty" : "unsupported",
|
|
16966
17160
|
samples: 0,
|
|
16967
17161
|
total: 0,
|
|
16968
|
-
basis: "
|
|
17162
|
+
basis: "planned-attempt",
|
|
16969
17163
|
issues: Object.freeze([]),
|
|
16970
17164
|
refs: Object.freeze([]),
|
|
16971
17165
|
unit: "points",
|
|
@@ -16989,7 +17183,7 @@ function scoreForCell(slots) {
|
|
|
16989
17183
|
}),
|
|
16990
17184
|
samples: complete.length,
|
|
16991
17185
|
total: eligible.length,
|
|
16992
|
-
basis: "
|
|
17186
|
+
basis: "planned-attempt",
|
|
16993
17187
|
issues,
|
|
16994
17188
|
refs: refsOf(eligible),
|
|
16995
17189
|
unit: "points",
|
|
@@ -17118,7 +17312,7 @@ function overviewIssue(code, runId, slot) {
|
|
|
17118
17312
|
return Object.freeze({
|
|
17119
17313
|
code,
|
|
17120
17314
|
runId,
|
|
17121
|
-
|
|
17315
|
+
plannedAttemptId: slot.slotId,
|
|
17122
17316
|
evalId: slot.evalId,
|
|
17123
17317
|
attemptOrdinal: slot.attemptOrdinal
|
|
17124
17318
|
});
|
|
@@ -17174,7 +17368,7 @@ function selectInspectionProject(input, experimentIds) {
|
|
|
17174
17368
|
}));
|
|
17175
17369
|
}
|
|
17176
17370
|
const currentPositions = new Set(input.target.slots.map((slot) => logicalKey(slot.experimentId, slot.evalId, slot.attempt)));
|
|
17177
|
-
const
|
|
17371
|
+
const plannedAttempts = assessments.map((slot) => {
|
|
17178
17372
|
const position = {
|
|
17179
17373
|
experimentId: slot.experimentId,
|
|
17180
17374
|
evalId: slot.evalId,
|
|
@@ -17255,16 +17449,16 @@ function selectInspectionProject(input, experimentIds) {
|
|
|
17255
17449
|
labels: {},
|
|
17256
17450
|
groups: []
|
|
17257
17451
|
});
|
|
17258
|
-
const covered =
|
|
17452
|
+
const covered = plannedAttempts.filter((slot) => slot.state === "reuse").length;
|
|
17259
17453
|
const history = [...previous.values()].filter((slot) => !currentPositions.has(logicalKey(slot.experimentId, slot.evalId, slot.attemptOrdinal)) && (experimentIds === void 0 || selectedIds.has(slot.experimentId))).sort((left, right) => compare(left.experimentId, right.experimentId) || compare(left.evalId, right.evalId) || left.attemptOrdinal - right.attemptOrdinal);
|
|
17260
17454
|
return Schema.decodeUnknownSync(InspectionProjectResultSchema)({
|
|
17261
17455
|
targetIdentity: input.target.identity,
|
|
17262
17456
|
coverage: {
|
|
17263
|
-
expected:
|
|
17457
|
+
expected: plannedAttempts.length,
|
|
17264
17458
|
covered,
|
|
17265
|
-
gaps:
|
|
17459
|
+
gaps: plannedAttempts.length - covered
|
|
17266
17460
|
},
|
|
17267
|
-
|
|
17461
|
+
plannedAttempts,
|
|
17268
17462
|
totals: overview.totals,
|
|
17269
17463
|
experiments,
|
|
17270
17464
|
cells: overview.cells,
|
|
@@ -19467,14 +19661,14 @@ function selectOperation(source, operation) {
|
|
|
19467
19661
|
const experimentCells = Object.freeze(overview.cells.filter(({ experimentId }) => experimentId === operation.experimentId));
|
|
19468
19662
|
const usageAttempts = /* @__PURE__ */ new Map();
|
|
19469
19663
|
let unresolvedAttemptCount = 0;
|
|
19470
|
-
let
|
|
19471
|
-
let
|
|
19664
|
+
let plannedAttemptCount = 0;
|
|
19665
|
+
let recordedAttemptCount = 0;
|
|
19472
19666
|
const origins = new Map(selected.map((origin) => [origin.run.runId, {
|
|
19473
19667
|
origin,
|
|
19474
19668
|
attempts: new Map(origin.attempts.map((attempt) => [attempt.attemptId, attempt]))
|
|
19475
19669
|
}]));
|
|
19476
19670
|
for (const cell of experimentCells) for (const member of cell.members) {
|
|
19477
|
-
|
|
19671
|
+
plannedAttemptCount++;
|
|
19478
19672
|
if (member.publication.state !== "published") {
|
|
19479
19673
|
unresolvedAttemptCount++;
|
|
19480
19674
|
continue;
|
|
@@ -19493,7 +19687,7 @@ function selectOperation(source, operation) {
|
|
|
19493
19687
|
locator: encodeAttemptLocator(attempt.attemptId),
|
|
19494
19688
|
targets: Object.freeze([])
|
|
19495
19689
|
});
|
|
19496
|
-
|
|
19690
|
+
recordedAttemptCount++;
|
|
19497
19691
|
usageAttempts.set(`${resolved.attempt.originRunId}\u0000${resolved.attempt.attemptId}`, resolved);
|
|
19498
19692
|
}
|
|
19499
19693
|
const orderedUsageAttempts = [...usageAttempts.values()].sort((left, right) => left.attempt.originRunId.localeCompare(right.attempt.originRunId) || left.locator.localeCompare(right.locator));
|
|
@@ -19514,23 +19708,25 @@ function selectOperation(source, operation) {
|
|
|
19514
19708
|
});
|
|
19515
19709
|
}));
|
|
19516
19710
|
const costSummary = Object.freeze({
|
|
19517
|
-
scope: "latest-recorded-
|
|
19711
|
+
scope: "latest-recorded-attempts",
|
|
19518
19712
|
totalCosts: combineTotalUsageCosts(allAttempts.map(({ usage }) => usage.totalCosts), unresolvedAttemptCount > 0),
|
|
19519
19713
|
coverage: Object.freeze({
|
|
19520
|
-
|
|
19521
|
-
|
|
19714
|
+
plannedAttemptCount,
|
|
19715
|
+
recordedAttemptCount,
|
|
19522
19716
|
originAttemptCount: allAttempts.length,
|
|
19523
19717
|
completeAttemptCount: allAttempts.filter(({ usage }) => usage.totalCosts.state === "complete").length,
|
|
19524
19718
|
partialAttemptCount: allAttempts.filter(({ usage }) => usage.totalCosts.state === "partial").length,
|
|
19525
19719
|
unavailableAttemptCount: allAttempts.filter(({ usage }) => usage.totalCosts.state === "unavailable").length,
|
|
19526
|
-
|
|
19720
|
+
missingAttemptCount: unresolvedAttemptCount
|
|
19527
19721
|
})
|
|
19528
19722
|
});
|
|
19529
19723
|
let attempts = Object.freeze(allAttempts.slice(0, 64));
|
|
19724
|
+
const notes = aggregateAttemptNotes(orderedUsageAttempts);
|
|
19530
19725
|
const experimentResult = () => Object.freeze({
|
|
19531
19726
|
experiment,
|
|
19532
19727
|
cells: experimentCells,
|
|
19533
19728
|
costSummary,
|
|
19729
|
+
notes,
|
|
19534
19730
|
modelUsage: Object.freeze({
|
|
19535
19731
|
attempts,
|
|
19536
19732
|
totalAttemptCount: orderedUsageAttempts.length,
|
|
@@ -19837,12 +20033,12 @@ function inspectionRunValue(run) {
|
|
|
19837
20033
|
...resource.published > 0 && published !== void 0 ? { context: published.run.context } : {},
|
|
19838
20034
|
startedAt: Date.parse(resource.startedAt),
|
|
19839
20035
|
...resource.completedAt === void 0 ? {} : { completedAt: Date.parse(resource.completedAt) },
|
|
19840
|
-
|
|
20036
|
+
plannedAttempts: (published?.run.expectedSlots ?? resource.slots.map((slot) => Object.freeze({
|
|
19841
20037
|
slotId: slot.slotId,
|
|
19842
20038
|
evalId: slot.evalId,
|
|
19843
20039
|
attemptOrdinal: slot.attemptOrdinal,
|
|
19844
20040
|
executionIdentityDigest: slot.executionIdentityDigest
|
|
19845
|
-
}))
|
|
20041
|
+
}))).map(projectPlannedAttempt)
|
|
19846
20042
|
}));
|
|
19847
20043
|
}
|
|
19848
20044
|
function supportingRunFacts(_source, run) {
|
|
@@ -19897,12 +20093,12 @@ function traceAttachments(resolved) {
|
|
|
19897
20093
|
function attemptDetail(resolved) {
|
|
19898
20094
|
const assertions = readInspectionAssertions(resolved);
|
|
19899
20095
|
return Object.freeze({
|
|
19900
|
-
core: resolved.attempt,
|
|
20096
|
+
core: projectAttemptCore(resolved.attempt),
|
|
19901
20097
|
locator: resolved.locator,
|
|
19902
|
-
originRun: resolved.origin.run,
|
|
20098
|
+
originRun: projectRunCore(resolved.origin.run),
|
|
19903
20099
|
targets: resolved.targets.map(({ run, member }) => Object.freeze({
|
|
19904
20100
|
runId: run.run.runId,
|
|
19905
|
-
member
|
|
20101
|
+
member: projectMember(member)
|
|
19906
20102
|
})),
|
|
19907
20103
|
evidence: assertions.state === "available" ? Object.freeze({
|
|
19908
20104
|
state: "available",
|
|
@@ -19912,6 +20108,7 @@ function attemptDetail(resolved) {
|
|
|
19912
20108
|
state: assertions.state,
|
|
19913
20109
|
entryCount: 0
|
|
19914
20110
|
}),
|
|
20111
|
+
notes: readAttemptNotes(resolved),
|
|
19915
20112
|
assertions: assertionIndex(assertions),
|
|
19916
20113
|
sections: attemptSections(resolved),
|
|
19917
20114
|
verdict: attemptVerdict(resolved, assertions),
|
|
@@ -20001,23 +20198,23 @@ function runDetail(_all, selectedResource) {
|
|
|
20001
20198
|
facts: Object.freeze([]),
|
|
20002
20199
|
limitations: Object.freeze([])
|
|
20003
20200
|
});
|
|
20004
|
-
const projected = value.
|
|
20005
|
-
const binding = publications.get(slot.
|
|
20006
|
-
if (binding === void 0) throw new Error(`Run ${value.runId} has no
|
|
20201
|
+
const projected = value.plannedAttempts.map((slot) => {
|
|
20202
|
+
const binding = publications.get(slot.plannedAttemptId);
|
|
20203
|
+
if (binding === void 0) throw new Error(`Run ${value.runId} has no Planned attempt ${slot.plannedAttemptId}`);
|
|
20007
20204
|
const publication = binding.state === "published" ? Object.freeze({
|
|
20008
20205
|
state: "published",
|
|
20009
20206
|
action: binding.action,
|
|
20010
20207
|
attemptId: binding.attemptId,
|
|
20011
20208
|
attemptLocator: binding.attemptLocator,
|
|
20012
20209
|
originRunId: binding.originRunId,
|
|
20013
|
-
|
|
20210
|
+
originPlannedAttemptId: binding.originSlotId
|
|
20014
20211
|
}) : binding.state === "absent" ? Object.freeze({
|
|
20015
20212
|
state: "absent",
|
|
20016
20213
|
reason: binding.reason
|
|
20017
20214
|
}) : Object.freeze({ state: "pending" });
|
|
20018
|
-
const targetMember = bindings.get(slot.
|
|
20215
|
+
const targetMember = bindings.get(slot.plannedAttemptId);
|
|
20019
20216
|
if (targetMember === void 0) {
|
|
20020
|
-
if (publication.state !== "pending" && publication.state !== "absent") throw new Error(`Terminal Run ${value.runId} has no binding or absence for
|
|
20217
|
+
if (publication.state !== "pending" && publication.state !== "absent") throw new Error(`Terminal Run ${value.runId} has no binding or absence for Planned attempt ${slot.plannedAttemptId}`);
|
|
20021
20218
|
const limitation = Object.freeze({
|
|
20022
20219
|
kind: "member-not-observed",
|
|
20023
20220
|
state: publication.state === "absent" ? publication.reason === "interrupted-before-publication" ? "interrupted" : "not-dispatched" : "pending"
|
|
@@ -20121,7 +20318,7 @@ function runDetail(_all, selectedResource) {
|
|
|
20121
20318
|
});
|
|
20122
20319
|
const members = Object.freeze(projected.map(({ member }) => member));
|
|
20123
20320
|
const locatedLimitations = Object.freeze(members.flatMap((member) => member.limitations.map((limitation) => Object.freeze({
|
|
20124
|
-
|
|
20321
|
+
plannedAttemptId: member.plannedAttemptId,
|
|
20125
20322
|
locator: member.locator,
|
|
20126
20323
|
limitation
|
|
20127
20324
|
}))));
|
|
@@ -20132,14 +20329,14 @@ function runDetail(_all, selectedResource) {
|
|
|
20132
20329
|
const usageLimitations = Object.freeze(locatedLimitations.filter(({ limitation }) => limitation.kind !== "coverage"));
|
|
20133
20330
|
return Object.freeze({
|
|
20134
20331
|
value,
|
|
20135
|
-
members: selectedResource.members,
|
|
20136
|
-
attempts: selected?.attempts ?? Object.freeze([]),
|
|
20332
|
+
members: selectedResource.members.map(projectMember),
|
|
20333
|
+
attempts: selected?.attempts.map(projectAttemptCore) ?? Object.freeze([]),
|
|
20137
20334
|
denominator: Object.freeze({
|
|
20138
20335
|
expected: selectedResource.resource.expected,
|
|
20139
20336
|
published: selectedResource.resource.published,
|
|
20140
20337
|
missing: selectedResource.resource.missing
|
|
20141
20338
|
}),
|
|
20142
|
-
|
|
20339
|
+
plannedAttempts: members,
|
|
20143
20340
|
coverage: Object.freeze({
|
|
20144
20341
|
state: aggregateRunOverviewState(members.map(({ coverage }) => coverage.state)),
|
|
20145
20342
|
expectedMemberCount: members.length,
|
|
@@ -20332,11 +20529,11 @@ function comparisonDocument(source, all, operation) {
|
|
|
20332
20529
|
comparison: boundedJson(Object.freeze({
|
|
20333
20530
|
mode: operation.mode,
|
|
20334
20531
|
left: Object.freeze({
|
|
20335
|
-
runs: left.selected.map(({ run }) => run),
|
|
20532
|
+
runs: left.selected.map(({ run }) => projectRunCore(run)),
|
|
20336
20533
|
members: leftMembers
|
|
20337
20534
|
}),
|
|
20338
20535
|
right: Object.freeze({
|
|
20339
|
-
runs: right.selected.map(({ run }) => run),
|
|
20536
|
+
runs: right.selected.map(({ run }) => projectRunCore(run)),
|
|
20340
20537
|
members: rightMembers
|
|
20341
20538
|
}),
|
|
20342
20539
|
exactMemberSet: exact,
|
|
@@ -20353,7 +20550,7 @@ function comparisonMembers(all, runs) {
|
|
|
20353
20550
|
return [Object.freeze({
|
|
20354
20551
|
key: `${run.run.experimentId}\u0000${slot.evalId}\u0000${slot.attemptOrdinal}`,
|
|
20355
20552
|
runId: run.run.runId,
|
|
20356
|
-
|
|
20553
|
+
plannedAttemptId: slot.slotId,
|
|
20357
20554
|
evalId: slot.evalId,
|
|
20358
20555
|
attemptOrdinal: slot.attemptOrdinal,
|
|
20359
20556
|
locator: resolved.locator
|