niceeval 0.18.0 → 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 +4 -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 -7
- package/dist/adapter.cjs.map +1 -1
- package/dist/adapter.d.cts +21 -21
- package/dist/adapter.d.mts +21 -21
- package/dist/adapter.d.ts +21 -21
- 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 +22 -6
- package/dist/assertions/measurements.cjs.map +1 -1
- package/dist/assertions/measurements.d.cts +8 -1
- package/dist/assertions/measurements.d.mts +8 -1
- package/dist/assertions/measurements.d.ts +8 -1
- 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 +88 -65
- 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 +10 -1
- package/dist/expect/index.cjs.map +1 -1
- package/dist/expect/index.d.cts +3 -1
- package/dist/expect/index.d.mts +3 -1
- package/dist/expect/index.d.ts +3 -1
- package/dist/expect/index.js +92 -76
- package/dist/expect/index.mjs +92 -76
- 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 +21 -22
- package/dist/experiment/host/operations.cjs.map +1 -1
- package/dist/experiment/host/runtime.cjs +8 -9
- 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 +3 -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 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- 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} +12 -12
- package/dist/{model-slots.cjs.map → model-roles.cjs.map} +1 -1
- package/dist/{model-slots.d.cts → model-roles.d.cts} +10 -10
- package/dist/{model-slots.d.mts → model-roles.d.mts} +10 -10
- package/dist/{model-slots.d.ts → model-roles.d.ts} +10 -10
- 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 +9 -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 +2 -2
- package/dist/runner/eval-selection.cjs.map +1 -1
- package/dist/runner/eval-selection.d.cts +2 -2
- package/dist/runner/eval-selection.d.mts +2 -2
- package/dist/runner/eval-selection.d.ts +2 -2
- 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/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 -93
- package/dist/runner/types.d.mts +64 -93
- package/dist/runner/types.d.ts +64 -93
- 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 -9
- package/dist/sandbox/docker-profile/registry.cjs.map +1 -1
- package/dist/sandbox/docker-profile/registry.d.cts +0 -3
- package/dist/sandbox/docker-profile/registry.d.mts +0 -3
- package/dist/sandbox/docker-profile/registry.d.ts +0 -3
- package/dist/sandbox/docker-profile/registry.js +6 -12
- 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 -35
- 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 -172
- package/dist/sandbox/index.mjs +116 -172
- 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 +6 -6
- package/docs-site/zh/examples/integrations/claude-sdk.mdx +5 -5
- package/docs-site/zh/examples/integrations/codex-sdk.mdx +4 -4
- package/docs-site/zh/examples/integrations/langgraph.mdx +4 -4
- package/docs-site/zh/examples/integrations/pi-sdk.mdx +5 -5
- 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 +2 -2
- package/docs-site/zh/introduction.mdx +2 -2
- 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 +2 -2
- 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 +19 -19
- 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 +1 -1
- 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 +2 -2
- 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.js +0 -14
- package/dist/model-slots.js.map +0 -1
|
@@ -78,7 +78,8 @@ var NUMERIC_COMPARATORS = [
|
|
|
78
78
|
"less-than",
|
|
79
79
|
"at-most",
|
|
80
80
|
"greater-than",
|
|
81
|
-
"at-least"
|
|
81
|
+
"at-least",
|
|
82
|
+
"between"
|
|
82
83
|
];
|
|
83
84
|
//#endregion
|
|
84
85
|
//#region src/assertions/identity.ts
|
|
@@ -287,6 +288,16 @@ var NumericComparisonCriterionSchema = Schema.Struct({
|
|
|
287
288
|
data: Schema.Struct({
|
|
288
289
|
comparator: Schema.Literals(NUMERIC_COMPARATORS),
|
|
289
290
|
threshold: Schema.Finite,
|
|
291
|
+
upperThreshold: Schema.optional(Schema.Finite),
|
|
292
|
+
unit: Schema.optional(Schema.Literals([
|
|
293
|
+
"ms",
|
|
294
|
+
"seconds",
|
|
295
|
+
"tokens",
|
|
296
|
+
"usd",
|
|
297
|
+
"ratio",
|
|
298
|
+
"count",
|
|
299
|
+
"bytes"
|
|
300
|
+
])),
|
|
290
301
|
subject: Schema.Union([
|
|
291
302
|
Schema.Struct({ kind: Schema.Literal("explicit-value") }),
|
|
292
303
|
Schema.Struct({
|
|
@@ -319,7 +330,7 @@ var NumericComparisonCriterionSchema = Schema.Struct({
|
|
|
319
330
|
])
|
|
320
331
|
})
|
|
321
332
|
])
|
|
322
|
-
})
|
|
333
|
+
}).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." }))
|
|
323
334
|
});
|
|
324
335
|
var ScopeStatusCriterionSchema = Schema.Struct({
|
|
325
336
|
kind: Schema.Literal("builtin"),
|
|
@@ -2211,14 +2222,14 @@ var RunGetDocumentSchema = Schema.Struct({
|
|
|
2211
2222
|
});
|
|
2212
2223
|
Schema.Union([RunListDocumentSchema, RunGetDocumentSchema]);
|
|
2213
2224
|
//#endregion
|
|
2214
|
-
//#region src/model-
|
|
2225
|
+
//#region src/model-roles.ts
|
|
2215
2226
|
var modelText = Schema.String.check(Schema.isPattern(/\S/u));
|
|
2216
|
-
var
|
|
2217
|
-
Schema.Record(
|
|
2227
|
+
var roleKey = Schema.String.check(Schema.isPattern(/^[A-Za-z][A-Za-z0-9_-]{0,63}$(?![\s\S])/u));
|
|
2228
|
+
Schema.Record(roleKey, Schema.Struct({
|
|
2218
2229
|
model: modelText,
|
|
2219
2230
|
reasoningEffort: Schema.optionalKey(modelText)
|
|
2220
2231
|
})).check(Schema.makeFilter((value) => Object.keys(value).length > 0 && Object.keys(value).length <= 64));
|
|
2221
|
-
var
|
|
2232
|
+
var ResolvedModelRolesSchema = Schema.Record(roleKey, Schema.Struct({
|
|
2222
2233
|
model: Schema.NullOr(modelText),
|
|
2223
2234
|
reasoningEffort: Schema.NullOr(modelText)
|
|
2224
2235
|
})).check(Schema.makeFilter((value) => Object.keys(value).length <= 64));
|
|
@@ -2260,8 +2271,14 @@ var AdapterIdentitySchema = Schema.Struct({
|
|
|
2260
2271
|
behaviorRevision: Schema.NullOr(NonEmptyStringSchema),
|
|
2261
2272
|
cleanupTimeoutMs: Schema.optionalKey(AdapterCleanupTimeoutMsSchema)
|
|
2262
2273
|
});
|
|
2274
|
+
var RunPluginIdentitySchema = Schema.Struct({
|
|
2275
|
+
name: NonEmptyStringSchema,
|
|
2276
|
+
key: NonEmptyStringSchema,
|
|
2277
|
+
identity: RunContextJsonObjectSchema
|
|
2278
|
+
});
|
|
2263
2279
|
var RunExecutionContextSchema = Schema.Struct({
|
|
2264
|
-
|
|
2280
|
+
plugins: Schema.optionalKey(Schema.Array(RunPluginIdentitySchema)),
|
|
2281
|
+
models: Schema.optionalKey(ResolvedModelRolesSchema),
|
|
2265
2282
|
adapter: AdapterIdentitySchema,
|
|
2266
2283
|
model: Schema.NullOr(Schema.String),
|
|
2267
2284
|
reasoningEffort: Schema.NullOr(Schema.String),
|
|
@@ -2983,6 +3000,52 @@ Data.TaggedError("InspectionArtifactError");
|
|
|
2983
3000
|
Schema.decodeUnknownResult(ReadRequestSchema, RecordExactParseOptions);
|
|
2984
3001
|
Schema.decodeUnknownResult(Schema.Struct({ "$niceeval.record.content": Schema.String }), RecordExactParseOptions);
|
|
2985
3002
|
//#endregion
|
|
3003
|
+
//#region src/inspection/planned-attempt.ts
|
|
3004
|
+
var { slotId: plannedAttemptId, ...positionFields } = RecordSlotIdentitySchema.fields;
|
|
3005
|
+
var PlannedAttemptSchema = Schema.Struct({
|
|
3006
|
+
plannedAttemptId,
|
|
3007
|
+
...positionFields
|
|
3008
|
+
});
|
|
3009
|
+
var { slotId: attemptPosition, ...attemptFields } = AttemptDocumentSchema.fields;
|
|
3010
|
+
var InspectionAttemptCoreSchema = Schema.Struct({
|
|
3011
|
+
plannedAttemptId: attemptPosition,
|
|
3012
|
+
...attemptFields
|
|
3013
|
+
}).check(Schema.makeFilter(({ plannedAttemptId, ...attempt }) => Schema.is(AttemptDocumentSchema)({
|
|
3014
|
+
...attempt,
|
|
3015
|
+
slotId: plannedAttemptId
|
|
3016
|
+
})));
|
|
3017
|
+
var { expectedSlots: _expectedSlots, ...runFields } = RunDocumentSchema.fields;
|
|
3018
|
+
var InspectionRunCoreSchema = Schema.Struct({
|
|
3019
|
+
...runFields,
|
|
3020
|
+
plannedAttempts: Schema.Array(PlannedAttemptSchema)
|
|
3021
|
+
}).check(Schema.makeFilter(({ plannedAttempts, ...run }) => Schema.is(RunDocumentSchema)({
|
|
3022
|
+
...run,
|
|
3023
|
+
expectedSlots: plannedAttempts.map(({ plannedAttemptId, ...position }) => ({
|
|
3024
|
+
...position,
|
|
3025
|
+
slotId: plannedAttemptId
|
|
3026
|
+
}))
|
|
3027
|
+
})));
|
|
3028
|
+
var InspectionMemberSchema = Schema.Union(MemberDocumentSchema.members.map((member) => {
|
|
3029
|
+
const { slotId, ...fields } = member.fields;
|
|
3030
|
+
return Schema.Struct({
|
|
3031
|
+
plannedAttemptId: slotId,
|
|
3032
|
+
...fields
|
|
3033
|
+
});
|
|
3034
|
+
})).check(Schema.makeFilter(({ plannedAttemptId, ...member }) => Schema.is(MemberDocumentSchema)({
|
|
3035
|
+
...member,
|
|
3036
|
+
slotId: plannedAttemptId
|
|
3037
|
+
})));
|
|
3038
|
+
var { originSlotId, ...publicationFields } = RunPublishedPublicationSchema.fields;
|
|
3039
|
+
var InspectionPublishedPublicationSchema = Schema.Struct({
|
|
3040
|
+
...publicationFields,
|
|
3041
|
+
originPlannedAttemptId: originSlotId
|
|
3042
|
+
});
|
|
3043
|
+
var PlannedAttemptPublicationSchema = Schema.Union([
|
|
3044
|
+
RunPendingPublicationSchema,
|
|
3045
|
+
InspectionPublishedPublicationSchema,
|
|
3046
|
+
RunAbsentPublicationSchema
|
|
3047
|
+
]);
|
|
3048
|
+
//#endregion
|
|
2986
3049
|
//#region src/inspection/artifact-list.ts
|
|
2987
3050
|
var { content: _content, ...metadataFields } = ArtifactSchema.fields;
|
|
2988
3051
|
var InspectionArtifactsPageLimitSchema = NonNegativeSafeIntegerSchema$2.pipe(Schema.check(Schema.makeFilter((value) => value > 0 && value <= 128)));
|
|
@@ -3181,7 +3244,7 @@ Object.freeze([
|
|
|
3181
3244
|
"niceeval.runner-diagnostics"
|
|
3182
3245
|
]);
|
|
3183
3246
|
Object.freeze(["niceeval.runner-activities", "niceeval.runner-diagnostics"]);
|
|
3184
|
-
function isObject
|
|
3247
|
+
function isObject(value) {
|
|
3185
3248
|
return typeof value === "object" && value !== null;
|
|
3186
3249
|
}
|
|
3187
3250
|
function ownDataProperty(value, key) {
|
|
@@ -3189,7 +3252,7 @@ function ownDataProperty(value, key) {
|
|
|
3189
3252
|
return descriptor !== void 0 && "value" in descriptor ? descriptor.value : void 0;
|
|
3190
3253
|
}
|
|
3191
3254
|
function isReferenceFields(value) {
|
|
3192
|
-
if (!isObject
|
|
3255
|
+
if (!isObject(value)) return false;
|
|
3193
3256
|
const family = ownDataProperty(value, "family");
|
|
3194
3257
|
const kind = ownDataProperty(value, "kind");
|
|
3195
3258
|
const id = ownDataProperty(value, "id");
|
|
@@ -3369,7 +3432,7 @@ function validateObservabilityCollection(collection) {
|
|
|
3369
3432
|
}
|
|
3370
3433
|
//#endregion
|
|
3371
3434
|
//#region src/inspection/protocol-values.ts
|
|
3372
|
-
var QUERY_PROTOCOL = "niceeval.query/
|
|
3435
|
+
var QUERY_PROTOCOL = "niceeval.query/v2";
|
|
3373
3436
|
/** Selector semantics revision; independent from the wire protocol major. */
|
|
3374
3437
|
var INSPECTION_BEHAVIOR_VERSION = "2.0.0";
|
|
3375
3438
|
//#endregion
|
|
@@ -3938,6 +4001,40 @@ var AssertionDetailResultSchema = Schema.toType(Schema.Union([Schema.Struct({
|
|
|
3938
4001
|
matcher: MatcherProjectionSchema
|
|
3939
4002
|
})]));
|
|
3940
4003
|
//#endregion
|
|
4004
|
+
//#region src/inspection/lifecycle.ts
|
|
4005
|
+
function projectLifecyclePhase(phase) {
|
|
4006
|
+
return phase.replace(/\.setup$/, ".before").replace(/\.teardown$/, ".after");
|
|
4007
|
+
}
|
|
4008
|
+
//#endregion
|
|
4009
|
+
//#region src/record/family/attempt-note/schema.ts
|
|
4010
|
+
var AttemptNoteLimits = Object.freeze({
|
|
4011
|
+
maximumEntries: 64,
|
|
4012
|
+
maximumJsonBytes: 65536
|
|
4013
|
+
});
|
|
4014
|
+
var NoteJsonSchema = Schema.suspend(() => Schema.Union([
|
|
4015
|
+
Schema.Null,
|
|
4016
|
+
Schema.Boolean,
|
|
4017
|
+
Schema.Finite,
|
|
4018
|
+
Schema.String,
|
|
4019
|
+
Schema.Array(NoteJsonSchema),
|
|
4020
|
+
Schema.Record(Schema.String, NoteJsonSchema)
|
|
4021
|
+
]));
|
|
4022
|
+
var AttemptNoteSchema = Schema.Struct({
|
|
4023
|
+
label: Schema.String,
|
|
4024
|
+
sequence: NonNegativeSafeIntegerSchema$2,
|
|
4025
|
+
value: NoteJsonSchema,
|
|
4026
|
+
unit: Schema.optional(Schema.Literals([
|
|
4027
|
+
"ms",
|
|
4028
|
+
"seconds",
|
|
4029
|
+
"tokens",
|
|
4030
|
+
"usd",
|
|
4031
|
+
"ratio",
|
|
4032
|
+
"count",
|
|
4033
|
+
"bytes"
|
|
4034
|
+
]))
|
|
4035
|
+
});
|
|
4036
|
+
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)));
|
|
4037
|
+
//#endregion
|
|
3941
4038
|
//#region src/o11y/cache-read.ts
|
|
3942
4039
|
var Reason = Schema.Literals([
|
|
3943
4040
|
"usage-not-recorded",
|
|
@@ -3974,17 +4071,17 @@ var consistent = (value) => {
|
|
|
3974
4071
|
var Summary = Schema.Struct(fields).check(Schema.makeFilter(consistent));
|
|
3975
4072
|
var CacheReadReportSchema = Schema.Struct({
|
|
3976
4073
|
total: Summary,
|
|
3977
|
-
|
|
3978
|
-
|
|
4074
|
+
roles: Schema.Array(Schema.Struct({
|
|
4075
|
+
modelRole: Schema.NullOr(Schema.String),
|
|
3979
4076
|
...fields
|
|
3980
4077
|
}).check(Schema.makeFilter(consistent))),
|
|
3981
4078
|
models: Schema.Array(Schema.Struct({
|
|
3982
|
-
|
|
4079
|
+
modelRole: Schema.NullOr(Schema.String),
|
|
3983
4080
|
provider: Schema.NullOr(Schema.String),
|
|
3984
4081
|
model: Schema.NullOr(Schema.String),
|
|
3985
4082
|
...fields
|
|
3986
4083
|
}).check(Schema.makeFilter(consistent)))
|
|
3987
|
-
}).check(Schema.makeFilter((value) => value.
|
|
4084
|
+
}).check(Schema.makeFilter((value) => value.roles.length <= 65 && value.models.length <= 4e3));
|
|
3988
4085
|
Object.freeze({
|
|
3989
4086
|
errors: "all",
|
|
3990
4087
|
onExcessProperty: "error"
|
|
@@ -4713,7 +4810,7 @@ function validateJudgeUsageAttachment(value) {
|
|
|
4713
4810
|
/** Tuple order is stable across hosts, with missing identities before strings. */
|
|
4714
4811
|
function compareAdapterModelGroups(left, right) {
|
|
4715
4812
|
for (const key of [
|
|
4716
|
-
"
|
|
4813
|
+
"modelRole",
|
|
4717
4814
|
"provider",
|
|
4718
4815
|
"model"
|
|
4719
4816
|
]) {
|
|
@@ -5686,7 +5783,7 @@ var OverviewIssueSchema = Schema.Union([
|
|
|
5686
5783
|
Schema.Struct({
|
|
5687
5784
|
code: Schema.Literals(["attempt-origin-missing", "attempt-not-observed"]),
|
|
5688
5785
|
runId: Schema.String,
|
|
5689
|
-
|
|
5786
|
+
plannedAttemptId: Schema.String,
|
|
5690
5787
|
evalId: Schema.String,
|
|
5691
5788
|
attemptOrdinal: Schema.Number
|
|
5692
5789
|
}),
|
|
@@ -5714,7 +5811,7 @@ var MetricSchema = Schema.Struct({
|
|
|
5714
5811
|
value: Schema.NullOr(Schema.Number),
|
|
5715
5812
|
samples: Schema.Number,
|
|
5716
5813
|
total: Schema.Number,
|
|
5717
|
-
basis: Schema.Literals(["
|
|
5814
|
+
basis: Schema.Literals(["planned-attempt", "eval"]),
|
|
5718
5815
|
issues: Schema.Array(OverviewIssueSchema),
|
|
5719
5816
|
refs: Schema.Array(AttemptRefSchema),
|
|
5720
5817
|
unit: Schema.optional(Schema.Literals([
|
|
@@ -5802,7 +5899,7 @@ var AggregateFields = {
|
|
|
5802
5899
|
issues: Schema.Array(OverviewIssueSchema)
|
|
5803
5900
|
};
|
|
5804
5901
|
var OverviewPublishedMemberSchema = Schema.Struct({
|
|
5805
|
-
...
|
|
5902
|
+
...InspectionPublishedPublicationSchema.fields,
|
|
5806
5903
|
verdict: Schema.NullOr(Schema.Literals([
|
|
5807
5904
|
"passed",
|
|
5808
5905
|
"failed",
|
|
@@ -5825,7 +5922,7 @@ var InspectionExecutionValueSchema = Schema.Union([
|
|
|
5825
5922
|
var InspectionLabelsSchema = Schema.Record(Schema.String, InspectionExecutionValueSchema);
|
|
5826
5923
|
var OverviewMemberSchema = Schema.Struct({
|
|
5827
5924
|
runId: Schema.String,
|
|
5828
|
-
|
|
5925
|
+
plannedAttemptId: Schema.String,
|
|
5829
5926
|
evalId: Schema.String,
|
|
5830
5927
|
attemptOrdinal: Schema.Number,
|
|
5831
5928
|
labels: InspectionLabelsSchema,
|
|
@@ -5840,6 +5937,7 @@ var OverviewGroupSchema = Schema.Struct({
|
|
|
5840
5937
|
...AggregateFields
|
|
5841
5938
|
});
|
|
5842
5939
|
var OverviewExperimentSchema = Schema.Struct({
|
|
5940
|
+
plugins: Schema.suspend(() => Schema.Array(RunPluginIdentitySchema)),
|
|
5843
5941
|
experimentId: Schema.String,
|
|
5844
5942
|
adapter: Schema.Union([Schema.Struct({
|
|
5845
5943
|
state: Schema.Literal("available"),
|
|
@@ -5863,6 +5961,15 @@ var InspectionOverviewResultSchema = Schema.Struct({
|
|
|
5863
5961
|
cells: Schema.Array(OverviewCellSchema)
|
|
5864
5962
|
});
|
|
5865
5963
|
var InspectionExperimentResultSchema = Schema.Struct({
|
|
5964
|
+
notes: Schema.Array(Schema.Struct({
|
|
5965
|
+
label: Schema.String,
|
|
5966
|
+
unit: AttemptNoteSchema.fields.unit,
|
|
5967
|
+
count: NonNegativeSafeIntegerSchema$2,
|
|
5968
|
+
min: Schema.Finite,
|
|
5969
|
+
median: Schema.Finite,
|
|
5970
|
+
p90: Schema.Finite,
|
|
5971
|
+
max: Schema.Finite
|
|
5972
|
+
})),
|
|
5866
5973
|
costSummary: Schema.suspend(() => ExperimentCostSummarySchema),
|
|
5867
5974
|
modelUsage: Schema.Struct({
|
|
5868
5975
|
attempts: Schema.Array(Schema.Struct({
|
|
@@ -5892,7 +5999,7 @@ var InspectionRunValueSchema = Schema.Struct({
|
|
|
5892
5999
|
context: Schema.optional(RunContextSchema),
|
|
5893
6000
|
startedAt: UtcMillisSchema,
|
|
5894
6001
|
completedAt: Schema.optional(UtcMillisSchema),
|
|
5895
|
-
|
|
6002
|
+
plannedAttempts: Schema.Array(PlannedAttemptSchema)
|
|
5896
6003
|
});
|
|
5897
6004
|
var InspectionRunListResultSchema = Schema.Array(RunSummarySchema);
|
|
5898
6005
|
var InspectionScoredValueSchema = Schema.Union([
|
|
@@ -6015,12 +6122,13 @@ var AssertionEvidenceSchema = Schema.Union([
|
|
|
6015
6122
|
})
|
|
6016
6123
|
]);
|
|
6017
6124
|
var InspectionAttemptResultSchema = Schema.Struct({
|
|
6018
|
-
|
|
6125
|
+
notes: AttemptNotesSchema,
|
|
6126
|
+
core: InspectionAttemptCoreSchema,
|
|
6019
6127
|
locator: Schema.String,
|
|
6020
|
-
originRun:
|
|
6128
|
+
originRun: InspectionRunCoreSchema,
|
|
6021
6129
|
targets: Schema.Array(Schema.Struct({
|
|
6022
6130
|
runId: Schema.String,
|
|
6023
|
-
member:
|
|
6131
|
+
member: InspectionMemberSchema
|
|
6024
6132
|
})),
|
|
6025
6133
|
evidence: AssertionEvidenceSchema,
|
|
6026
6134
|
assertions: AssertionIndexSchema,
|
|
@@ -6209,7 +6317,7 @@ var TraceDiagnosticsSchema = Schema.Struct({
|
|
|
6209
6317
|
sequence: Schema.Number,
|
|
6210
6318
|
turnId: Schema.NullOr(Schema.String),
|
|
6211
6319
|
phase: Schema.Literals([
|
|
6212
|
-
"attempt.
|
|
6320
|
+
"attempt.before",
|
|
6213
6321
|
"sandbox.prepare",
|
|
6214
6322
|
"agent.ensure",
|
|
6215
6323
|
"eval.run",
|
|
@@ -6217,7 +6325,7 @@ var TraceDiagnosticsSchema = Schema.Struct({
|
|
|
6217
6325
|
"sandbox.command",
|
|
6218
6326
|
"assertion.evaluate",
|
|
6219
6327
|
"verdict.fold",
|
|
6220
|
-
"attempt.
|
|
6328
|
+
"attempt.after"
|
|
6221
6329
|
]),
|
|
6222
6330
|
kind: Schema.Literals(["advisory", "execution-error"]),
|
|
6223
6331
|
code: Schema.String,
|
|
@@ -6466,7 +6574,7 @@ var InspectionTraceResultSchema = Schema.Struct({
|
|
|
6466
6574
|
omittedLimitationCount: Schema.Number,
|
|
6467
6575
|
items: Schema.Array(Schema.Struct({
|
|
6468
6576
|
commandId: CommandIdSchema$1,
|
|
6469
|
-
phase: Schema.Literals(SANDBOX_COMMAND_PHASES),
|
|
6577
|
+
phase: Schema.Literals(SANDBOX_COMMAND_PHASES.map(projectLifecyclePhase)),
|
|
6470
6578
|
outcome: CommandOutcomeSchema
|
|
6471
6579
|
})),
|
|
6472
6580
|
hasMore: Schema.Boolean,
|
|
@@ -6645,12 +6753,12 @@ var InspectionTraceDetailResultSchema = Schema.Union([
|
|
|
6645
6753
|
outcome: CommandOutcomeSchema,
|
|
6646
6754
|
turnId: Schema.NullOr(Schema.String),
|
|
6647
6755
|
phase: Schema.Literals([
|
|
6648
|
-
"attempt.
|
|
6756
|
+
"attempt.before",
|
|
6649
6757
|
"sandbox.prepare",
|
|
6650
6758
|
"agent.ensure",
|
|
6651
6759
|
"eval.run",
|
|
6652
6760
|
"sandbox.command",
|
|
6653
|
-
"attempt.
|
|
6761
|
+
"attempt.after"
|
|
6654
6762
|
]),
|
|
6655
6763
|
sequence: Schema.Number,
|
|
6656
6764
|
stdout: CommandStreamSchema,
|
|
@@ -6711,8 +6819,10 @@ var EffectiveCostSchema = Schema.Struct({
|
|
|
6711
6819
|
}),
|
|
6712
6820
|
state: Schema.Literals(["complete", "partial"])
|
|
6713
6821
|
});
|
|
6822
|
+
var { modelSlot: persistedModelSlot, ...publicAdapterCallFields } = AdapterUsageCallSchema.fields;
|
|
6714
6823
|
var AdapterUsageInspectionCallSchema = Schema.Struct({
|
|
6715
|
-
...
|
|
6824
|
+
...publicAdapterCallFields,
|
|
6825
|
+
modelRole: persistedModelSlot,
|
|
6716
6826
|
effectiveCost: Schema.NullOr(EffectiveCostSchema)
|
|
6717
6827
|
});
|
|
6718
6828
|
var EffectiveCostTotalSchema = Schema.Struct({
|
|
@@ -6753,14 +6863,14 @@ var ModelGroupTokenTotalSchema = Schema.Struct({
|
|
|
6753
6863
|
var ConfiguredModelsSchema = Schema.Union([Schema.Struct({ state: Schema.Literal("not-recorded") }), Schema.Struct({
|
|
6754
6864
|
state: Schema.Literal("available"),
|
|
6755
6865
|
bindings: Schema.Array(Schema.Struct({
|
|
6756
|
-
|
|
6866
|
+
modelRole: AdapterUsageModelSlotSchema,
|
|
6757
6867
|
model: Schema.NullOr(Schema.String.check(Schema.isPattern(/\S/u))),
|
|
6758
6868
|
reasoningEffort: Schema.NullOr(Schema.String.check(Schema.isPattern(/\S/u))),
|
|
6759
6869
|
recordedCalls: Schema.NullOr(RecordedCallCountSchema)
|
|
6760
|
-
})).check(Schema.makeFilter((bindings) => bindings.length <= 64 && bindings.every((entry, index) => index === 0 || bindings[index - 1].
|
|
6870
|
+
})).check(Schema.makeFilter((bindings) => bindings.length <= 64 && bindings.every((entry, index) => index === 0 || bindings[index - 1].modelRole < entry.modelRole)))
|
|
6761
6871
|
})]);
|
|
6762
6872
|
var ModelGroupSchema = Schema.Struct({
|
|
6763
|
-
|
|
6873
|
+
modelRole: Schema.NullOr(AdapterUsageModelSlotSchema),
|
|
6764
6874
|
provider: AdapterUsageCallSchema.fields.provider,
|
|
6765
6875
|
model: AdapterUsageCallSchema.fields.model,
|
|
6766
6876
|
recordedCalls: RecordedCallCountSchema.check(Schema.isGreaterThan(0)),
|
|
@@ -6813,17 +6923,17 @@ var TotalUsageCostsSchema = Schema.Struct({
|
|
|
6813
6923
|
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")))
|
|
6814
6924
|
}).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)));
|
|
6815
6925
|
var ExperimentCostSummarySchema = Schema.Struct({
|
|
6816
|
-
scope: Schema.Literal("latest-recorded-
|
|
6926
|
+
scope: Schema.Literal("latest-recorded-attempts"),
|
|
6817
6927
|
totalCosts: TotalUsageCostsSchema,
|
|
6818
6928
|
coverage: Schema.Struct({
|
|
6819
|
-
|
|
6820
|
-
|
|
6929
|
+
plannedAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
6930
|
+
recordedAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
6821
6931
|
originAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
6822
6932
|
completeAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
6823
6933
|
partialAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
6824
6934
|
unavailableAttemptCount: NonNegativeSafeIntegerSchema$2,
|
|
6825
|
-
|
|
6826
|
-
}).check(Schema.makeFilter((value) => value.
|
|
6935
|
+
missingAttemptCount: NonNegativeSafeIntegerSchema$2
|
|
6936
|
+
}).check(Schema.makeFilter((value) => value.plannedAttemptCount === value.recordedAttemptCount + value.missingAttemptCount && value.originAttemptCount <= value.recordedAttemptCount && value.originAttemptCount === value.completeAttemptCount + value.partialAttemptCount + value.unavailableAttemptCount))
|
|
6827
6937
|
});
|
|
6828
6938
|
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)));
|
|
6829
6939
|
var JudgeUsageUnavailableSchema = Schema.Union([Schema.Struct({
|
|
@@ -6967,8 +7077,8 @@ var RunOverviewMemberLimitationSchema = Schema.Union([
|
|
|
6967
7077
|
})
|
|
6968
7078
|
]);
|
|
6969
7079
|
var RunOverviewMemberSchema = Schema.Struct({
|
|
6970
|
-
...
|
|
6971
|
-
publication:
|
|
7080
|
+
...PlannedAttemptSchema.fields,
|
|
7081
|
+
publication: PlannedAttemptPublicationSchema,
|
|
6972
7082
|
state: Schema.Literals([
|
|
6973
7083
|
"executed",
|
|
6974
7084
|
"carried",
|
|
@@ -6992,20 +7102,20 @@ var RunOverviewMemberSchema = Schema.Struct({
|
|
|
6992
7102
|
limitations: Schema.Array(RunOverviewMemberLimitationSchema)
|
|
6993
7103
|
});
|
|
6994
7104
|
var RunOverviewLocatedLimitationSchema = Schema.Struct({
|
|
6995
|
-
|
|
7105
|
+
plannedAttemptId: Schema.String,
|
|
6996
7106
|
locator: Schema.NullOr(Schema.String),
|
|
6997
7107
|
limitation: RunOverviewMemberLimitationSchema
|
|
6998
7108
|
});
|
|
6999
7109
|
var InspectionRunResultSchema = Schema.Struct({
|
|
7000
7110
|
value: InspectionRunValueSchema,
|
|
7001
|
-
members: Schema.Array(
|
|
7002
|
-
attempts: Schema.Array(
|
|
7111
|
+
members: Schema.Array(InspectionMemberSchema),
|
|
7112
|
+
attempts: Schema.Array(InspectionAttemptCoreSchema),
|
|
7003
7113
|
denominator: Schema.Struct({
|
|
7004
7114
|
expected: Schema.Number,
|
|
7005
7115
|
published: Schema.Number,
|
|
7006
7116
|
missing: Schema.Number
|
|
7007
7117
|
}),
|
|
7008
|
-
|
|
7118
|
+
plannedAttempts: Schema.Array(RunOverviewMemberSchema),
|
|
7009
7119
|
coverage: Schema.Struct({
|
|
7010
7120
|
state: RunOverviewStateSchema,
|
|
7011
7121
|
expectedMemberCount: Schema.Number,
|
|
@@ -7130,7 +7240,7 @@ var InspectionProjectGapReasonSchema = Schema.Literals([
|
|
|
7130
7240
|
"timeout-exceeded",
|
|
7131
7241
|
"adoption-unproven"
|
|
7132
7242
|
]);
|
|
7133
|
-
var
|
|
7243
|
+
var InspectionProjectPlannedAttemptSchema = Schema.Union([Schema.Struct({
|
|
7134
7244
|
...PositionFields,
|
|
7135
7245
|
state: Schema.Literal("reuse"),
|
|
7136
7246
|
sourceRunId: RunIdSchema,
|
|
@@ -7157,14 +7267,14 @@ var InspectionProjectResultSchema = Schema.Struct({
|
|
|
7157
7267
|
covered: NonNegativeSafeIntegerSchema$2,
|
|
7158
7268
|
gaps: NonNegativeSafeIntegerSchema$2
|
|
7159
7269
|
}),
|
|
7160
|
-
|
|
7270
|
+
plannedAttempts: Schema.Array(InspectionProjectPlannedAttemptSchema),
|
|
7161
7271
|
...InspectionOverviewResultSchema.fields,
|
|
7162
7272
|
history: Schema.Array(Schema.Struct({
|
|
7163
7273
|
...PositionFields,
|
|
7164
7274
|
sourceRunId: RunIdSchema,
|
|
7165
7275
|
locator: Schema.NullOr(LocatorSchema)
|
|
7166
7276
|
}))
|
|
7167
|
-
}).check(Schema.makeFilter((value) => value.coverage.covered + value.coverage.gaps === value.coverage.expected && value.
|
|
7277
|
+
}).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));
|
|
7168
7278
|
//#endregion
|
|
7169
7279
|
//#region src/inspection/protocol.ts
|
|
7170
7280
|
var AttemptLocatorSchema = Schema.String.pipe(Schema.refine((value) => ATTEMPT_LOCATOR_PATTERN.test(value), {
|
|
@@ -7245,7 +7355,7 @@ var ArtifactsResultSchema = Schema.Union([Schema.Struct({ state: Schema.Literal(
|
|
|
7245
7355
|
var ComparisonMemberSchema = Schema.Struct({
|
|
7246
7356
|
key: Schema.String,
|
|
7247
7357
|
runId: Schema.String,
|
|
7248
|
-
|
|
7358
|
+
plannedAttemptId: Schema.String,
|
|
7249
7359
|
evalId: Schema.String,
|
|
7250
7360
|
attemptOrdinal: Schema.Number,
|
|
7251
7361
|
locator: Schema.String
|
|
@@ -7257,11 +7367,11 @@ var RunsCompareResultSchema = Schema.Struct({
|
|
|
7257
7367
|
"paired"
|
|
7258
7368
|
]),
|
|
7259
7369
|
left: Schema.Struct({
|
|
7260
|
-
runs: Schema.Array(
|
|
7370
|
+
runs: Schema.Array(InspectionRunCoreSchema),
|
|
7261
7371
|
members: Schema.Array(ComparisonMemberSchema)
|
|
7262
7372
|
}),
|
|
7263
7373
|
right: Schema.Struct({
|
|
7264
|
-
runs: Schema.Array(
|
|
7374
|
+
runs: Schema.Array(InspectionRunCoreSchema),
|
|
7265
7375
|
members: Schema.Array(ComparisonMemberSchema)
|
|
7266
7376
|
}),
|
|
7267
7377
|
exactMemberSet: Schema.Boolean,
|
|
@@ -7298,6 +7408,7 @@ var inspectionProtocolRegistry = Object.freeze({
|
|
|
7298
7408
|
result: { experiment: InspectionExperimentResultSchema },
|
|
7299
7409
|
factKinds: [
|
|
7300
7410
|
"core",
|
|
7411
|
+
"attempt-note",
|
|
7301
7412
|
"assertions",
|
|
7302
7413
|
"attempt-cost",
|
|
7303
7414
|
"agent-turns",
|
|
@@ -7327,7 +7438,11 @@ var inspectionProtocolRegistry = Object.freeze({
|
|
|
7327
7438
|
"attempt.get": spec({
|
|
7328
7439
|
request: operation("attempt.get", { locator: AttemptLocatorSchema }),
|
|
7329
7440
|
result: { attempt: InspectionAttemptResultSchema },
|
|
7330
|
-
factKinds: [
|
|
7441
|
+
factKinds: [
|
|
7442
|
+
"core",
|
|
7443
|
+
"assertions",
|
|
7444
|
+
"attempt-note"
|
|
7445
|
+
]
|
|
7331
7446
|
}),
|
|
7332
7447
|
"attempt.assertion.detail": spec({
|
|
7333
7448
|
request: operation("attempt.assertion.detail", {
|
|
@@ -7577,7 +7692,6 @@ function decodeInspectionOperation(input) {
|
|
|
7577
7692
|
}
|
|
7578
7693
|
//#endregion
|
|
7579
7694
|
//#region src/inspection/codec.ts
|
|
7580
|
-
var inspectionCodecErrors = /* @__PURE__ */ new WeakSet();
|
|
7581
7695
|
var strictDecodeRequest = Schema.decodeUnknownResult(InspectionRequestSchema, { onExcessProperty: "error" });
|
|
7582
7696
|
function decodeInspectionRequest(input) {
|
|
7583
7697
|
const decoded = strictDecodeRequest(input);
|
|
@@ -7586,83 +7700,6 @@ function decodeInspectionRequest(input) {
|
|
|
7586
7700
|
reason: String(decoded.failure)
|
|
7587
7701
|
})) : Result.succeed(decoded.success);
|
|
7588
7702
|
}
|
|
7589
|
-
function closeInspectionJson(value) {
|
|
7590
|
-
const seen = /* @__PURE__ */ new Set();
|
|
7591
|
-
const close = (current, path) => {
|
|
7592
|
-
if (current === null || typeof current === "string" || typeof current === "boolean") return current;
|
|
7593
|
-
if (typeof current === "number") return Number.isFinite(current) ? current : invalidResult(path, "numbers must be finite");
|
|
7594
|
-
if (Array.isArray(current)) {
|
|
7595
|
-
if (seen.has(current)) return invalidResult(path, "cyclic arrays are not encodable");
|
|
7596
|
-
seen.add(current);
|
|
7597
|
-
const output = [];
|
|
7598
|
-
for (const [index, entry] of current.entries()) {
|
|
7599
|
-
const closed = close(entry, [...path, String(index)]);
|
|
7600
|
-
if (isCodecError(closed)) return closed;
|
|
7601
|
-
output.push(closed);
|
|
7602
|
-
}
|
|
7603
|
-
seen.delete(current);
|
|
7604
|
-
return Object.freeze(output);
|
|
7605
|
-
}
|
|
7606
|
-
if (typeof current !== "object" || current === null) return invalidResult(path, `unsupported ${typeof current} value`);
|
|
7607
|
-
if (seen.has(current)) return invalidResult(path, "cyclic objects are not encodable");
|
|
7608
|
-
const prototype = Object.getPrototypeOf(current);
|
|
7609
|
-
if (prototype !== Object.prototype && prototype !== null) return invalidResult(path, "only plain objects may cross Inspection delivery");
|
|
7610
|
-
seen.add(current);
|
|
7611
|
-
const output = Object.create(null);
|
|
7612
|
-
for (const key of Object.keys(current).sort(compareCodeUnits$1)) {
|
|
7613
|
-
const closed = close(Reflect.get(current, key), [...path, key]);
|
|
7614
|
-
if (isCodecError(closed)) return closed;
|
|
7615
|
-
output[key] = closed;
|
|
7616
|
-
}
|
|
7617
|
-
seen.delete(current);
|
|
7618
|
-
return Object.freeze(output);
|
|
7619
|
-
};
|
|
7620
|
-
return close(value, []);
|
|
7621
|
-
}
|
|
7622
|
-
function invalidResult(path, reason) {
|
|
7623
|
-
const error = Object.freeze({
|
|
7624
|
-
code: "inspection-result-invalid",
|
|
7625
|
-
reason: `${path.length === 0 ? "$" : path.join(".")}: ${reason}`
|
|
7626
|
-
});
|
|
7627
|
-
inspectionCodecErrors.add(error);
|
|
7628
|
-
return error;
|
|
7629
|
-
}
|
|
7630
|
-
function isInspectionCodecError(value) {
|
|
7631
|
-
return isObject(value) && inspectionCodecErrors.has(value);
|
|
7632
|
-
}
|
|
7633
|
-
var isCodecError = isInspectionCodecError;
|
|
7634
|
-
function isObject(value) {
|
|
7635
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7636
|
-
}
|
|
7637
|
-
function compareCodeUnits$1(left, right) {
|
|
7638
|
-
return left < right ? -1 : left > right ? 1 : 0;
|
|
7639
|
-
}
|
|
7640
|
-
//#endregion
|
|
7641
|
-
//#region src/inspection/canonical.ts
|
|
7642
|
-
function canonicalInspectionJson(value) {
|
|
7643
|
-
const decoded = decodeInspectionDocument(value);
|
|
7644
|
-
if (!decoded.success) return Result.fail({
|
|
7645
|
-
code: "inspection-result-invalid",
|
|
7646
|
-
reason: decoded.reason
|
|
7647
|
-
});
|
|
7648
|
-
const closed = closeInspectionJson(decoded.value);
|
|
7649
|
-
if (isInspectionCodecError(closed)) return Result.fail(closed);
|
|
7650
|
-
return Result.succeed(`${encode(closed)}\n`);
|
|
7651
|
-
}
|
|
7652
|
-
function canonicalJsonValue(value) {
|
|
7653
|
-
const closed = closeInspectionJson(value);
|
|
7654
|
-
if (isInspectionCodecError(closed)) return Result.fail(closed);
|
|
7655
|
-
return Result.succeed(`${encode(closed)}\n`);
|
|
7656
|
-
}
|
|
7657
|
-
function encode(value) {
|
|
7658
|
-
if (value === null || typeof value === "boolean" || typeof value === "number" || typeof value === "string") return JSON.stringify(value);
|
|
7659
|
-
if (Array.isArray(value)) return `[${value.map(encode).join(",")}]`;
|
|
7660
|
-
const record = value;
|
|
7661
|
-
return `{${Object.keys(record).sort(compareCodeUnits).map((key) => `${JSON.stringify(key)}:${encode(record[key])}`).join(",")}}`;
|
|
7662
|
-
}
|
|
7663
|
-
function compareCodeUnits(left, right) {
|
|
7664
|
-
return left < right ? -1 : left > right ? 1 : 0;
|
|
7665
|
-
}
|
|
7666
7703
|
//#endregion
|
|
7667
7704
|
//#region src/assertions/score-match-audit.ts
|
|
7668
7705
|
var protocol = "niceeval.score-match-audit/v1";
|
|
@@ -8416,4 +8453,4 @@ function validEvidenceIds(value, empty = false) {
|
|
|
8416
8453
|
return Array.isArray(value) && value.length <= 16384 && (empty || value.length > 0) && value.every((id) => text(id) && id.trim() !== "" && new TextEncoder().encode(id).length <= 128 && !/[\u0000-\u001f\u007f]/u.test(id)) && new Set(value).size === value.length;
|
|
8417
8454
|
}
|
|
8418
8455
|
//#endregion
|
|
8419
|
-
export { INSPECTION_BEHAVIOR_VERSION, INSPECTION_OPERATION_IDS, InspectionDiscoveryDocumentSchema, InspectionDocumentSchema, InspectionExplanationDocumentSchema, InspectionFailureDocumentSchema, InspectionOperationIdSchema, InspectionRequestSchema, InspectionSuccessDocumentSchema, QUERY_PROTOCOL,
|
|
8456
|
+
export { INSPECTION_BEHAVIOR_VERSION, INSPECTION_OPERATION_IDS, InspectionDiscoveryDocumentSchema, InspectionDocumentSchema, InspectionExplanationDocumentSchema, InspectionFailureDocumentSchema, InspectionOperationIdSchema, InspectionRequestSchema, InspectionSuccessDocumentSchema, QUERY_PROTOCOL, decodeInspectionDocument, decodeInspectionOperation, decodeInspectionRequest, inspectionProtocolRegistry, narrowInspectionExplanation, narrowInspectionSuccess, readScoreMatchAudit };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decodeInspectionOperation = decodeInspectionOperation;
|
|
4
|
-
// @concord-file
|
|
4
|
+
// @concord-file
|
|
5
5
|
// @concord-implements docs/feature/inspection/README.md
|
|
6
6
|
const effect_1 = require("effect");
|
|
7
7
|
const protocol_ts_1 = require("./protocol.cjs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["query.ts"],"names":[],"mappings":";;AAgCA,8DASC;AAzCD,
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["query.ts"],"names":[],"mappings":";;AAgCA,8DASC;AAzCD,gBAAgB;AAChB,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\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"]}
|