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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Quantity, type Unit } from "./quantity.cjs";
|
|
1
2
|
import type { StandardSchemaV1 as StandardSchema } from "@standard-schema/spec";
|
|
2
3
|
import { Effect } from "effect";
|
|
3
4
|
import type { CommandProjection, LogicalToolOccurrence } from "../o11y/types.cjs";
|
|
@@ -72,13 +73,16 @@ declare const numericComparisonMatchBrand: unique symbol;
|
|
|
72
73
|
declare const assertionEventIdentityBrand: unique symbol;
|
|
73
74
|
declare const assertionEventPositionBrand: unique symbol;
|
|
74
75
|
declare const toolOccurrenceIdentityBrand: unique symbol;
|
|
75
|
-
export declare const NUMERIC_COMPARATORS: readonly ["less-than", "at-most", "greater-than", "at-least"];
|
|
76
|
+
export declare const NUMERIC_COMPARATORS: readonly ["less-than", "at-most", "greater-than", "at-least", "between"];
|
|
76
77
|
export type NumericComparator = (typeof NUMERIC_COMPARATORS)[number];
|
|
77
78
|
export interface NumericComparison {
|
|
78
79
|
readonly comparator: NumericComparator;
|
|
79
80
|
readonly threshold: number;
|
|
81
|
+
readonly upperThreshold?: number;
|
|
82
|
+
readonly unit?: Unit;
|
|
80
83
|
}
|
|
81
|
-
export type NumericMaterial = {
|
|
84
|
+
export type NumericMaterial<U extends Unit | undefined = undefined> = {
|
|
85
|
+
readonly unit?: U;
|
|
82
86
|
readonly provenance?: {
|
|
83
87
|
readonly source: string;
|
|
84
88
|
readonly scope: string;
|
|
@@ -105,8 +109,8 @@ export interface BooleanMatch<in T, out R extends T, D extends MatchDomain = "va
|
|
|
105
109
|
readonly kind: "boolean";
|
|
106
110
|
readonly [matchRefinementBrand]: () => R;
|
|
107
111
|
}
|
|
108
|
-
export interface NumericComparisonMatch extends BooleanMatch<number, number, "value"> {
|
|
109
|
-
readonly [numericComparisonMatchBrand]:
|
|
112
|
+
export interface NumericComparisonMatch<U extends Unit | undefined = undefined> extends BooleanMatch<U extends Unit ? Quantity<U> : number, U extends Unit ? Quantity<U> : number, "value"> {
|
|
113
|
+
readonly [numericComparisonMatchBrand]: (unit: U) => U;
|
|
110
114
|
}
|
|
111
115
|
export interface ScoreMatch<in T> extends Match<T, "value"> {
|
|
112
116
|
readonly kind: "score";
|
|
@@ -300,11 +304,18 @@ export declare function assertManagedValueMatch(value: unknown, label?: string):
|
|
|
300
304
|
* The sole numeric comparison evaluator. A lower bound can only decide a
|
|
301
305
|
* monotone result; all other partial observations remain unavailable.
|
|
302
306
|
*/
|
|
303
|
-
export declare function evaluateNumericComparison(material: NumericMaterial
|
|
307
|
+
export declare function evaluateNumericComparison(material: NumericMaterial<Unit | undefined>, comparison: NumericComparison): BooleanMatchEvaluation<number>;
|
|
308
|
+
export declare function lessThan<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
304
309
|
export declare function lessThan(threshold: number): NumericComparisonMatch;
|
|
310
|
+
export declare function atMost<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
305
311
|
export declare function atMost(threshold: number): NumericComparisonMatch;
|
|
312
|
+
export declare function greaterThan<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
306
313
|
export declare function greaterThan(threshold: number): NumericComparisonMatch;
|
|
314
|
+
export declare function atLeast<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
307
315
|
export declare function atLeast(threshold: number): NumericComparisonMatch;
|
|
316
|
+
/** Match a value inside inclusive bounds with the same unit. */
|
|
317
|
+
export declare function between<U extends Unit>(minimum: Quantity<U>, maximum: Quantity<NoInfer<U>>): NumericComparisonMatch<U>;
|
|
318
|
+
export declare function between(minimum: number, maximum: number): NumericComparisonMatch;
|
|
308
319
|
/** @internal Project a raw message into the closed assertion-event surface. */
|
|
309
320
|
export declare function makeAssertionMessageEvent(input: {
|
|
310
321
|
readonly eventId?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Quantity, type Unit } from "./quantity.mjs";
|
|
1
2
|
import type { StandardSchemaV1 as StandardSchema } from "@standard-schema/spec";
|
|
2
3
|
import { Effect } from "effect";
|
|
3
4
|
import type { CommandProjection, LogicalToolOccurrence } from "../o11y/types.mjs";
|
|
@@ -72,13 +73,16 @@ declare const numericComparisonMatchBrand: unique symbol;
|
|
|
72
73
|
declare const assertionEventIdentityBrand: unique symbol;
|
|
73
74
|
declare const assertionEventPositionBrand: unique symbol;
|
|
74
75
|
declare const toolOccurrenceIdentityBrand: unique symbol;
|
|
75
|
-
export declare const NUMERIC_COMPARATORS: readonly ["less-than", "at-most", "greater-than", "at-least"];
|
|
76
|
+
export declare const NUMERIC_COMPARATORS: readonly ["less-than", "at-most", "greater-than", "at-least", "between"];
|
|
76
77
|
export type NumericComparator = (typeof NUMERIC_COMPARATORS)[number];
|
|
77
78
|
export interface NumericComparison {
|
|
78
79
|
readonly comparator: NumericComparator;
|
|
79
80
|
readonly threshold: number;
|
|
81
|
+
readonly upperThreshold?: number;
|
|
82
|
+
readonly unit?: Unit;
|
|
80
83
|
}
|
|
81
|
-
export type NumericMaterial = {
|
|
84
|
+
export type NumericMaterial<U extends Unit | undefined = undefined> = {
|
|
85
|
+
readonly unit?: U;
|
|
82
86
|
readonly provenance?: {
|
|
83
87
|
readonly source: string;
|
|
84
88
|
readonly scope: string;
|
|
@@ -105,8 +109,8 @@ export interface BooleanMatch<in T, out R extends T, D extends MatchDomain = "va
|
|
|
105
109
|
readonly kind: "boolean";
|
|
106
110
|
readonly [matchRefinementBrand]: () => R;
|
|
107
111
|
}
|
|
108
|
-
export interface NumericComparisonMatch extends BooleanMatch<number, number, "value"> {
|
|
109
|
-
readonly [numericComparisonMatchBrand]:
|
|
112
|
+
export interface NumericComparisonMatch<U extends Unit | undefined = undefined> extends BooleanMatch<U extends Unit ? Quantity<U> : number, U extends Unit ? Quantity<U> : number, "value"> {
|
|
113
|
+
readonly [numericComparisonMatchBrand]: (unit: U) => U;
|
|
110
114
|
}
|
|
111
115
|
export interface ScoreMatch<in T> extends Match<T, "value"> {
|
|
112
116
|
readonly kind: "score";
|
|
@@ -300,11 +304,18 @@ export declare function assertManagedValueMatch(value: unknown, label?: string):
|
|
|
300
304
|
* The sole numeric comparison evaluator. A lower bound can only decide a
|
|
301
305
|
* monotone result; all other partial observations remain unavailable.
|
|
302
306
|
*/
|
|
303
|
-
export declare function evaluateNumericComparison(material: NumericMaterial
|
|
307
|
+
export declare function evaluateNumericComparison(material: NumericMaterial<Unit | undefined>, comparison: NumericComparison): BooleanMatchEvaluation<number>;
|
|
308
|
+
export declare function lessThan<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
304
309
|
export declare function lessThan(threshold: number): NumericComparisonMatch;
|
|
310
|
+
export declare function atMost<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
305
311
|
export declare function atMost(threshold: number): NumericComparisonMatch;
|
|
312
|
+
export declare function greaterThan<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
306
313
|
export declare function greaterThan(threshold: number): NumericComparisonMatch;
|
|
314
|
+
export declare function atLeast<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
307
315
|
export declare function atLeast(threshold: number): NumericComparisonMatch;
|
|
316
|
+
/** Match a value inside inclusive bounds with the same unit. */
|
|
317
|
+
export declare function between<U extends Unit>(minimum: Quantity<U>, maximum: Quantity<NoInfer<U>>): NumericComparisonMatch<U>;
|
|
318
|
+
export declare function between(minimum: number, maximum: number): NumericComparisonMatch;
|
|
308
319
|
/** @internal Project a raw message into the closed assertion-event surface. */
|
|
309
320
|
export declare function makeAssertionMessageEvent(input: {
|
|
310
321
|
readonly eventId?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Quantity, type Unit } from "./quantity.js";
|
|
1
2
|
import type { StandardSchemaV1 as StandardSchema } from "@standard-schema/spec";
|
|
2
3
|
import { Effect } from "effect";
|
|
3
4
|
import type { CommandProjection, LogicalToolOccurrence } from "../o11y/types.js";
|
|
@@ -72,13 +73,16 @@ declare const numericComparisonMatchBrand: unique symbol;
|
|
|
72
73
|
declare const assertionEventIdentityBrand: unique symbol;
|
|
73
74
|
declare const assertionEventPositionBrand: unique symbol;
|
|
74
75
|
declare const toolOccurrenceIdentityBrand: unique symbol;
|
|
75
|
-
export declare const NUMERIC_COMPARATORS: readonly ["less-than", "at-most", "greater-than", "at-least"];
|
|
76
|
+
export declare const NUMERIC_COMPARATORS: readonly ["less-than", "at-most", "greater-than", "at-least", "between"];
|
|
76
77
|
export type NumericComparator = (typeof NUMERIC_COMPARATORS)[number];
|
|
77
78
|
export interface NumericComparison {
|
|
78
79
|
readonly comparator: NumericComparator;
|
|
79
80
|
readonly threshold: number;
|
|
81
|
+
readonly upperThreshold?: number;
|
|
82
|
+
readonly unit?: Unit;
|
|
80
83
|
}
|
|
81
|
-
export type NumericMaterial = {
|
|
84
|
+
export type NumericMaterial<U extends Unit | undefined = undefined> = {
|
|
85
|
+
readonly unit?: U;
|
|
82
86
|
readonly provenance?: {
|
|
83
87
|
readonly source: string;
|
|
84
88
|
readonly scope: string;
|
|
@@ -105,8 +109,8 @@ export interface BooleanMatch<in T, out R extends T, D extends MatchDomain = "va
|
|
|
105
109
|
readonly kind: "boolean";
|
|
106
110
|
readonly [matchRefinementBrand]: () => R;
|
|
107
111
|
}
|
|
108
|
-
export interface NumericComparisonMatch extends BooleanMatch<number, number, "value"> {
|
|
109
|
-
readonly [numericComparisonMatchBrand]:
|
|
112
|
+
export interface NumericComparisonMatch<U extends Unit | undefined = undefined> extends BooleanMatch<U extends Unit ? Quantity<U> : number, U extends Unit ? Quantity<U> : number, "value"> {
|
|
113
|
+
readonly [numericComparisonMatchBrand]: (unit: U) => U;
|
|
110
114
|
}
|
|
111
115
|
export interface ScoreMatch<in T> extends Match<T, "value"> {
|
|
112
116
|
readonly kind: "score";
|
|
@@ -300,11 +304,18 @@ export declare function assertManagedValueMatch(value: unknown, label?: string):
|
|
|
300
304
|
* The sole numeric comparison evaluator. A lower bound can only decide a
|
|
301
305
|
* monotone result; all other partial observations remain unavailable.
|
|
302
306
|
*/
|
|
303
|
-
export declare function evaluateNumericComparison(material: NumericMaterial
|
|
307
|
+
export declare function evaluateNumericComparison(material: NumericMaterial<Unit | undefined>, comparison: NumericComparison): BooleanMatchEvaluation<number>;
|
|
308
|
+
export declare function lessThan<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
304
309
|
export declare function lessThan(threshold: number): NumericComparisonMatch;
|
|
310
|
+
export declare function atMost<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
305
311
|
export declare function atMost(threshold: number): NumericComparisonMatch;
|
|
312
|
+
export declare function greaterThan<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
306
313
|
export declare function greaterThan(threshold: number): NumericComparisonMatch;
|
|
314
|
+
export declare function atLeast<U extends Unit>(threshold: Quantity<U>): NumericComparisonMatch<U>;
|
|
307
315
|
export declare function atLeast(threshold: number): NumericComparisonMatch;
|
|
316
|
+
/** Match a value inside inclusive bounds with the same unit. */
|
|
317
|
+
export declare function between<U extends Unit>(minimum: Quantity<U>, maximum: Quantity<NoInfer<U>>): NumericComparisonMatch<U>;
|
|
318
|
+
export declare function between(minimum: number, maximum: number): NumericComparisonMatch;
|
|
308
319
|
/** @internal Project a raw message into the closed assertion-event surface. */
|
|
309
320
|
export declare function makeAssertionMessageEvent(input: {
|
|
310
321
|
readonly eventId?: string;
|
package/dist/assertions/match.js
CHANGED
|
@@ -17,98 +17,100 @@ const __niceevalExport6 = __niceevalCanonical["atLeast"];
|
|
|
17
17
|
export { __niceevalExport6 as atLeast };
|
|
18
18
|
const __niceevalExport7 = __niceevalCanonical["atMost"];
|
|
19
19
|
export { __niceevalExport7 as atMost };
|
|
20
|
-
const __niceevalExport8 = __niceevalCanonical["
|
|
21
|
-
export { __niceevalExport8 as
|
|
22
|
-
const __niceevalExport9 = __niceevalCanonical["
|
|
23
|
-
export { __niceevalExport9 as
|
|
24
|
-
const __niceevalExport10 = __niceevalCanonical["
|
|
25
|
-
export { __niceevalExport10 as
|
|
26
|
-
const __niceevalExport11 = __niceevalCanonical["
|
|
27
|
-
export { __niceevalExport11 as
|
|
28
|
-
const __niceevalExport12 = __niceevalCanonical["
|
|
29
|
-
export { __niceevalExport12 as
|
|
30
|
-
const __niceevalExport13 = __niceevalCanonical["
|
|
31
|
-
export { __niceevalExport13 as
|
|
32
|
-
const __niceevalExport14 = __niceevalCanonical["
|
|
33
|
-
export { __niceevalExport14 as
|
|
34
|
-
const __niceevalExport15 = __niceevalCanonical["
|
|
35
|
-
export { __niceevalExport15 as
|
|
36
|
-
const __niceevalExport16 = __niceevalCanonical["
|
|
37
|
-
export { __niceevalExport16 as
|
|
38
|
-
const __niceevalExport17 = __niceevalCanonical["
|
|
39
|
-
export { __niceevalExport17 as
|
|
40
|
-
const __niceevalExport18 = __niceevalCanonical["
|
|
41
|
-
export { __niceevalExport18 as
|
|
42
|
-
const __niceevalExport19 = __niceevalCanonical["
|
|
43
|
-
export { __niceevalExport19 as
|
|
44
|
-
const __niceevalExport20 = __niceevalCanonical["
|
|
45
|
-
export { __niceevalExport20 as
|
|
46
|
-
const __niceevalExport21 = __niceevalCanonical["
|
|
47
|
-
export { __niceevalExport21 as
|
|
48
|
-
const __niceevalExport22 = __niceevalCanonical["
|
|
49
|
-
export { __niceevalExport22 as
|
|
50
|
-
const __niceevalExport23 = __niceevalCanonical["
|
|
51
|
-
export { __niceevalExport23 as
|
|
52
|
-
const __niceevalExport24 = __niceevalCanonical["
|
|
53
|
-
export { __niceevalExport24 as
|
|
54
|
-
const __niceevalExport25 = __niceevalCanonical["
|
|
55
|
-
export { __niceevalExport25 as
|
|
56
|
-
const __niceevalExport26 = __niceevalCanonical["
|
|
57
|
-
export { __niceevalExport26 as
|
|
58
|
-
const __niceevalExport27 = __niceevalCanonical["
|
|
59
|
-
export { __niceevalExport27 as
|
|
60
|
-
const __niceevalExport28 = __niceevalCanonical["
|
|
61
|
-
export { __niceevalExport28 as
|
|
62
|
-
const __niceevalExport29 = __niceevalCanonical["
|
|
63
|
-
export { __niceevalExport29 as
|
|
64
|
-
const __niceevalExport30 = __niceevalCanonical["
|
|
65
|
-
export { __niceevalExport30 as
|
|
66
|
-
const __niceevalExport31 = __niceevalCanonical["
|
|
67
|
-
export { __niceevalExport31 as
|
|
68
|
-
const __niceevalExport32 = __niceevalCanonical["
|
|
69
|
-
export { __niceevalExport32 as
|
|
70
|
-
const __niceevalExport33 = __niceevalCanonical["
|
|
71
|
-
export { __niceevalExport33 as
|
|
72
|
-
const __niceevalExport34 = __niceevalCanonical["
|
|
73
|
-
export { __niceevalExport34 as
|
|
74
|
-
const __niceevalExport35 = __niceevalCanonical["
|
|
75
|
-
export { __niceevalExport35 as
|
|
76
|
-
const __niceevalExport36 = __niceevalCanonical["
|
|
77
|
-
export { __niceevalExport36 as
|
|
78
|
-
const __niceevalExport37 = __niceevalCanonical["
|
|
79
|
-
export { __niceevalExport37 as
|
|
80
|
-
const __niceevalExport38 = __niceevalCanonical["
|
|
81
|
-
export { __niceevalExport38 as
|
|
82
|
-
const __niceevalExport39 = __niceevalCanonical["
|
|
83
|
-
export { __niceevalExport39 as
|
|
84
|
-
const __niceevalExport40 = __niceevalCanonical["
|
|
85
|
-
export { __niceevalExport40 as
|
|
86
|
-
const __niceevalExport41 = __niceevalCanonical["
|
|
87
|
-
export { __niceevalExport41 as
|
|
88
|
-
const __niceevalExport42 = __niceevalCanonical["
|
|
89
|
-
export { __niceevalExport42 as
|
|
90
|
-
const __niceevalExport43 = __niceevalCanonical["
|
|
91
|
-
export { __niceevalExport43 as
|
|
92
|
-
const __niceevalExport44 = __niceevalCanonical["
|
|
93
|
-
export { __niceevalExport44 as
|
|
94
|
-
const __niceevalExport45 = __niceevalCanonical["
|
|
95
|
-
export { __niceevalExport45 as
|
|
96
|
-
const __niceevalExport46 = __niceevalCanonical["
|
|
97
|
-
export { __niceevalExport46 as
|
|
98
|
-
const __niceevalExport47 = __niceevalCanonical["
|
|
99
|
-
export { __niceevalExport47 as
|
|
100
|
-
const __niceevalExport48 = __niceevalCanonical["
|
|
101
|
-
export { __niceevalExport48 as
|
|
102
|
-
const __niceevalExport49 = __niceevalCanonical["
|
|
103
|
-
export { __niceevalExport49 as
|
|
104
|
-
const __niceevalExport50 = __niceevalCanonical["
|
|
105
|
-
export { __niceevalExport50 as
|
|
106
|
-
const __niceevalExport51 = __niceevalCanonical["
|
|
107
|
-
export { __niceevalExport51 as
|
|
108
|
-
const __niceevalExport52 = __niceevalCanonical["
|
|
109
|
-
export { __niceevalExport52 as
|
|
110
|
-
const __niceevalExport53 = __niceevalCanonical["
|
|
111
|
-
export { __niceevalExport53 as
|
|
112
|
-
const __niceevalExport54 = __niceevalCanonical["
|
|
113
|
-
export { __niceevalExport54 as
|
|
20
|
+
const __niceevalExport8 = __niceevalCanonical["between"];
|
|
21
|
+
export { __niceevalExport8 as between };
|
|
22
|
+
const __niceevalExport9 = __niceevalCanonical["collectionMatchSpecOf"];
|
|
23
|
+
export { __niceevalExport9 as collectionMatchSpecOf };
|
|
24
|
+
const __niceevalExport10 = __niceevalCanonical["commandMatch"];
|
|
25
|
+
export { __niceevalExport10 as commandMatch };
|
|
26
|
+
const __niceevalExport11 = __niceevalCanonical["commandSucceeded"];
|
|
27
|
+
export { __niceevalExport11 as commandSucceeded };
|
|
28
|
+
const __niceevalExport12 = __niceevalCanonical["countWhere"];
|
|
29
|
+
export { __niceevalExport12 as countWhere };
|
|
30
|
+
const __niceevalExport13 = __niceevalCanonical["deepEqual"];
|
|
31
|
+
export { __niceevalExport13 as deepEqual };
|
|
32
|
+
const __niceevalExport14 = __niceevalCanonical["defineScoreMatch"];
|
|
33
|
+
export { __niceevalExport14 as defineScoreMatch };
|
|
34
|
+
const __niceevalExport15 = __niceevalCanonical["defineValueMatch"];
|
|
35
|
+
export { __niceevalExport15 as defineValueMatch };
|
|
36
|
+
const __niceevalExport16 = __niceevalCanonical["equals"];
|
|
37
|
+
export { __niceevalExport16 as equals };
|
|
38
|
+
const __niceevalExport17 = __niceevalCanonical["evaluateBooleanMatch"];
|
|
39
|
+
export { __niceevalExport17 as evaluateBooleanMatch };
|
|
40
|
+
const __niceevalExport18 = __niceevalCanonical["evaluateNumericComparison"];
|
|
41
|
+
export { __niceevalExport18 as evaluateNumericComparison };
|
|
42
|
+
const __niceevalExport19 = __niceevalCanonical["evaluateScoreMatch"];
|
|
43
|
+
export { __niceevalExport19 as evaluateScoreMatch };
|
|
44
|
+
const __niceevalExport20 = __niceevalCanonical["eventMatch"];
|
|
45
|
+
export { __niceevalExport20 as eventMatch };
|
|
46
|
+
const __niceevalExport21 = __niceevalCanonical["exactLlmOptions"];
|
|
47
|
+
export { __niceevalExport21 as exactLlmOptions };
|
|
48
|
+
const __niceevalExport22 = __niceevalCanonical["excludes"];
|
|
49
|
+
export { __niceevalExport22 as excludes };
|
|
50
|
+
const __niceevalExport23 = __niceevalCanonical["filterWhere"];
|
|
51
|
+
export { __niceevalExport23 as filterWhere };
|
|
52
|
+
const __niceevalExport24 = __niceevalCanonical["greaterThan"];
|
|
53
|
+
export { __niceevalExport24 as greaterThan };
|
|
54
|
+
const __niceevalExport25 = __niceevalCanonical["hasSections"];
|
|
55
|
+
export { __niceevalExport25 as hasSections };
|
|
56
|
+
const __niceevalExport26 = __niceevalCanonical["inOrder"];
|
|
57
|
+
export { __niceevalExport26 as inOrder };
|
|
58
|
+
const __niceevalExport27 = __niceevalCanonical["includes"];
|
|
59
|
+
export { __niceevalExport27 as includes };
|
|
60
|
+
const __niceevalExport28 = __niceevalCanonical["includesUrl"];
|
|
61
|
+
export { __niceevalExport28 as includesUrl };
|
|
62
|
+
const __niceevalExport29 = __niceevalCanonical["isDefined"];
|
|
63
|
+
export { __niceevalExport29 as isDefined };
|
|
64
|
+
const __niceevalExport30 = __niceevalCanonical["isFalse"];
|
|
65
|
+
export { __niceevalExport30 as isFalse };
|
|
66
|
+
const __niceevalExport31 = __niceevalCanonical["isManagedCollectionMatch"];
|
|
67
|
+
export { __niceevalExport31 as isManagedCollectionMatch };
|
|
68
|
+
const __niceevalExport32 = __niceevalCanonical["isManagedEventMatch"];
|
|
69
|
+
export { __niceevalExport32 as isManagedEventMatch };
|
|
70
|
+
const __niceevalExport33 = __niceevalCanonical["isManagedMatch"];
|
|
71
|
+
export { __niceevalExport33 as isManagedMatch };
|
|
72
|
+
const __niceevalExport34 = __niceevalCanonical["isManagedToolMatch"];
|
|
73
|
+
export { __niceevalExport34 as isManagedToolMatch };
|
|
74
|
+
const __niceevalExport35 = __niceevalCanonical["isNumericComparisonMatch"];
|
|
75
|
+
export { __niceevalExport35 as isNumericComparisonMatch };
|
|
76
|
+
const __niceevalExport36 = __niceevalCanonical["isTrue"];
|
|
77
|
+
export { __niceevalExport36 as isTrue };
|
|
78
|
+
const __niceevalExport37 = __niceevalCanonical["jsonMatch"];
|
|
79
|
+
export { __niceevalExport37 as jsonMatch };
|
|
80
|
+
const __niceevalExport38 = __niceevalCanonical["lessThan"];
|
|
81
|
+
export { __niceevalExport38 as lessThan };
|
|
82
|
+
const __niceevalExport39 = __niceevalCanonical["looksLikeCollectionMatch"];
|
|
83
|
+
export { __niceevalExport39 as looksLikeCollectionMatch };
|
|
84
|
+
const __niceevalExport40 = __niceevalCanonical["looksLikeMatch"];
|
|
85
|
+
export { __niceevalExport40 as looksLikeMatch };
|
|
86
|
+
const __niceevalExport41 = __niceevalCanonical["makeAssertionMessageEvent"];
|
|
87
|
+
export { __niceevalExport41 as makeAssertionMessageEvent };
|
|
88
|
+
const __niceevalExport42 = __niceevalCanonical["makeAssertionToolEvent"];
|
|
89
|
+
export { __niceevalExport42 as makeAssertionToolEvent };
|
|
90
|
+
const __niceevalExport43 = __niceevalCanonical["managedScoreMatchOf"];
|
|
91
|
+
export { __niceevalExport43 as managedScoreMatchOf };
|
|
92
|
+
const __niceevalExport44 = __niceevalCanonical["mapEach"];
|
|
93
|
+
export { __niceevalExport44 as mapEach };
|
|
94
|
+
const __niceevalExport45 = __niceevalCanonical["mapValue"];
|
|
95
|
+
export { __niceevalExport45 as mapValue };
|
|
96
|
+
const __niceevalExport46 = __niceevalCanonical["matches"];
|
|
97
|
+
export { __niceevalExport46 as matches };
|
|
98
|
+
const __niceevalExport47 = __niceevalCanonical["not"];
|
|
99
|
+
export { __niceevalExport47 as not };
|
|
100
|
+
const __niceevalExport48 = __niceevalCanonical["numericComparisonOf"];
|
|
101
|
+
export { __niceevalExport48 as numericComparisonOf };
|
|
102
|
+
const __niceevalExport49 = __niceevalCanonical["or"];
|
|
103
|
+
export { __niceevalExport49 as or };
|
|
104
|
+
const __niceevalExport50 = __niceevalCanonical["pattern"];
|
|
105
|
+
export { __niceevalExport50 as pattern };
|
|
106
|
+
const __niceevalExport51 = __niceevalCanonical["referencesAnyPath"];
|
|
107
|
+
export { __niceevalExport51 as referencesAnyPath };
|
|
108
|
+
const __niceevalExport52 = __niceevalCanonical["satisfies"];
|
|
109
|
+
export { __niceevalExport52 as satisfies };
|
|
110
|
+
const __niceevalExport53 = __niceevalCanonical["similarity"];
|
|
111
|
+
export { __niceevalExport53 as similarity };
|
|
112
|
+
const __niceevalExport54 = __niceevalCanonical["toolMatch"];
|
|
113
|
+
export { __niceevalExport54 as toolMatch };
|
|
114
|
+
const __niceevalExport55 = __niceevalCanonical["validateSchema"];
|
|
115
|
+
export { __niceevalExport55 as validateSchema };
|
|
114
116
|
//# sourceMappingURL=match.js.map
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.measured = measured;
|
|
4
4
|
exports.quantile = quantile;
|
|
5
|
-
|
|
5
|
+
const quantity_ts_1 = require("./quantity.cjs");
|
|
6
6
|
function measured(value, options) {
|
|
7
7
|
if (typeof options?.unavailable !== "string" || options.unavailable.trim().length === 0) {
|
|
8
8
|
throw new TypeError("measured() requires a non-empty unavailable reason.");
|
|
9
9
|
}
|
|
10
10
|
if (value === null)
|
|
11
11
|
return Object.freeze({ state: "unavailable", reason: options.unavailable });
|
|
12
|
+
if ((0, quantity_ts_1.isQuantity)(value))
|
|
13
|
+
return Object.freeze({ state: "exact", value: value.value, unit: value.unit });
|
|
12
14
|
if (typeof value !== "number")
|
|
13
15
|
throw new TypeError("measured() requires a number or null.");
|
|
14
16
|
return Number.isFinite(value)
|
|
15
17
|
? Object.freeze({ state: "exact", value })
|
|
16
18
|
: Object.freeze({ state: "unavailable", reason: "non-finite-number" });
|
|
17
19
|
}
|
|
18
|
-
/** Compute a quantile without changing or retaining the samples. Empty or invalid samples remain unavailable. */
|
|
19
20
|
function quantile(samples, p, options = {}) {
|
|
20
21
|
if (!Array.isArray(samples))
|
|
21
22
|
throw new TypeError("quantile() requires an array of samples.");
|
|
@@ -27,11 +28,26 @@ function quantile(samples, p, options = {}) {
|
|
|
27
28
|
const statistics = Object.freeze({ sampleCount: samples.length, probability: p, method });
|
|
28
29
|
if (samples.length === 0)
|
|
29
30
|
return Object.freeze({ state: "unavailable", reason: "no-samples", statistics });
|
|
31
|
+
const sampleUnits = new Set();
|
|
32
|
+
const values = [];
|
|
33
|
+
let invalidSample = false;
|
|
30
34
|
for (const sample of samples) {
|
|
31
|
-
if (!
|
|
32
|
-
|
|
35
|
+
if (typeof sample !== "number" && !(0, quantity_ts_1.isQuantity)(sample)) {
|
|
36
|
+
invalidSample = true;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
sampleUnits.add(typeof sample === "number" ? undefined : sample.unit);
|
|
40
|
+
const value = typeof sample === "number" ? sample : sample.value;
|
|
41
|
+
if (!Number.isFinite(value))
|
|
42
|
+
invalidSample = true;
|
|
43
|
+
values.push(value);
|
|
33
44
|
}
|
|
34
|
-
|
|
45
|
+
if (sampleUnits.size > 1)
|
|
46
|
+
throw new TypeError("quantile() samples must use one unit, or all be numbers.");
|
|
47
|
+
const unit = sampleUnits.values().next().value;
|
|
48
|
+
if (invalidSample)
|
|
49
|
+
return Object.freeze({ state: "unavailable", reason: "non-finite-sample", statistics, ...(unit === undefined ? {} : { unit }) });
|
|
50
|
+
const sorted = values.sort((a, b) => a - b);
|
|
35
51
|
const position = (sorted.length - 1) * p;
|
|
36
52
|
const lower = sorted[Math.floor(position)];
|
|
37
53
|
const upper = sorted[Math.ceil(position)];
|
|
@@ -40,6 +56,6 @@ function quantile(samples, p, options = {}) {
|
|
|
40
56
|
const value = method === "nearest-rank"
|
|
41
57
|
? sorted[Math.max(0, Math.ceil(sorted.length * p) - 1)]
|
|
42
58
|
: Number.isFinite(delta) ? lower + delta * fraction : lower * (1 - fraction) + upper * fraction;
|
|
43
|
-
return Object.freeze({ state: "exact", value, statistics });
|
|
59
|
+
return Object.freeze({ state: "exact", value, statistics, ...(unit === undefined ? {} : { unit }) });
|
|
44
60
|
}
|
|
45
61
|
//# sourceMappingURL=measurements.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"measurements.js","sourceRoot":"","sources":["measurements.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"measurements.js","sourceRoot":"","sources":["measurements.ts"],"names":[],"mappings":"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","sourcesContent":["import { isQuantity, type Quantity, type Unit } from \"./quantity.ts\";\nimport type { NumericMaterial } from \"./match.ts\";\n/** Preserve a missing observation instead of coercing null to zero. */\nexport function measured(value: number | null, options: {\n readonly unavailable: string;\n}): NumericMaterial;\nexport function measured<U extends Unit>(value: Quantity<U> | null, options: {\n readonly unavailable: string;\n}): NumericMaterial<U>;\nexport function measured(value: number | Quantity | null, options: {\n readonly unavailable: string;\n}): NumericMaterial<Unit | undefined> {\n if (typeof options?.unavailable !== \"string\" || options.unavailable.trim().length === 0) {\n throw new TypeError(\"measured() requires a non-empty unavailable reason.\");\n }\n if (value === null)\n return Object.freeze({ state: \"unavailable\", reason: options.unavailable });\n if (isQuantity(value))\n return Object.freeze({ state: \"exact\", value: value.value, unit: value.unit });\n if (typeof value !== \"number\")\n throw new TypeError(\"measured() requires a number or null.\");\n return Number.isFinite(value)\n ? Object.freeze({ state: \"exact\", value })\n : Object.freeze({ state: \"unavailable\", reason: \"non-finite-number\" });\n}\nexport type QuantileMethod = \"linear\" | \"nearest-rank\";\nexport type QuantileMaterial<U extends Unit | undefined = undefined> = NumericMaterial<U> & {\n readonly statistics: {\n readonly sampleCount: number;\n readonly probability: number;\n readonly method: QuantileMethod;\n };\n};\n/** Compute a quantile without changing or retaining the samples. Empty or invalid samples remain unavailable. */\nexport function quantile(samples: readonly number[], p: number, options?: {\n readonly method?: QuantileMethod;\n}): QuantileMaterial;\nexport function quantile<U extends Unit>(samples: readonly Quantity<U>[], p: number, options?: {\n readonly method?: QuantileMethod;\n}): QuantileMaterial<U>;\nexport function quantile(samples: readonly (number | Quantity)[], p: number, options: {\n readonly method?: QuantileMethod;\n} = {}): QuantileMaterial<Unit | undefined> {\n if (!Array.isArray(samples))\n throw new TypeError(\"quantile() requires an array of samples.\");\n if (!Number.isFinite(p) || p < 0 || p > 1)\n throw new TypeError(\"quantile() probability must be a finite number in [0, 1].\");\n const method = options.method ?? \"linear\";\n if (method !== \"linear\" && method !== \"nearest-rank\")\n throw new TypeError(\"quantile() method must be linear or nearest-rank.\");\n const statistics = Object.freeze({ sampleCount: samples.length, probability: p, method });\n if (samples.length === 0)\n return Object.freeze({ state: \"unavailable\", reason: \"no-samples\", statistics });\n const sampleUnits = new Set<Unit | undefined>();\n const values: number[] = [];\n let invalidSample = false;\n for (const sample of samples) {\n if (typeof sample !== \"number\" && !isQuantity(sample)) {\n invalidSample = true;\n continue;\n }\n sampleUnits.add(typeof sample === \"number\" ? undefined : sample.unit);\n const value = typeof sample === \"number\" ? sample : sample.value;\n if (!Number.isFinite(value))\n invalidSample = true;\n values.push(value);\n }\n if (sampleUnits.size > 1)\n throw new TypeError(\"quantile() samples must use one unit, or all be numbers.\");\n const unit = sampleUnits.values().next().value;\n if (invalidSample)\n return Object.freeze({ state: \"unavailable\", reason: \"non-finite-sample\", statistics, ...(unit === undefined ? {} : { unit }) });\n const sorted = values.sort((a, b) => a - b);\n const position = (sorted.length - 1) * p;\n const lower = sorted[Math.floor(position)]!;\n const upper = sorted[Math.ceil(position)]!;\n const fraction = position - Math.floor(position);\n const delta = upper - lower;\n const value = method === \"nearest-rank\"\n ? sorted[Math.max(0, Math.ceil(sorted.length * p) - 1)]!\n : Number.isFinite(delta) ? lower + delta * fraction : lower * (1 - fraction) + upper * fraction;\n return Object.freeze({ state: \"exact\", value, statistics, ...(unit === undefined ? {} : { unit }) });\n}\n"]}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { type Quantity, type Unit } from "./quantity.cjs";
|
|
1
2
|
import type { NumericMaterial } from "./match.cjs";
|
|
2
3
|
/** Preserve a missing observation instead of coercing null to zero. */
|
|
3
4
|
export declare function measured(value: number | null, options: {
|
|
4
5
|
readonly unavailable: string;
|
|
5
6
|
}): NumericMaterial;
|
|
7
|
+
export declare function measured<U extends Unit>(value: Quantity<U> | null, options: {
|
|
8
|
+
readonly unavailable: string;
|
|
9
|
+
}): NumericMaterial<U>;
|
|
6
10
|
export type QuantileMethod = "linear" | "nearest-rank";
|
|
7
|
-
export type QuantileMaterial = NumericMaterial & {
|
|
11
|
+
export type QuantileMaterial<U extends Unit | undefined = undefined> = NumericMaterial<U> & {
|
|
8
12
|
readonly statistics: {
|
|
9
13
|
readonly sampleCount: number;
|
|
10
14
|
readonly probability: number;
|
|
@@ -15,3 +19,6 @@ export type QuantileMaterial = NumericMaterial & {
|
|
|
15
19
|
export declare function quantile(samples: readonly number[], p: number, options?: {
|
|
16
20
|
readonly method?: QuantileMethod;
|
|
17
21
|
}): QuantileMaterial;
|
|
22
|
+
export declare function quantile<U extends Unit>(samples: readonly Quantity<U>[], p: number, options?: {
|
|
23
|
+
readonly method?: QuantileMethod;
|
|
24
|
+
}): QuantileMaterial<U>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { type Quantity, type Unit } from "./quantity.mjs";
|
|
1
2
|
import type { NumericMaterial } from "./match.mjs";
|
|
2
3
|
/** Preserve a missing observation instead of coercing null to zero. */
|
|
3
4
|
export declare function measured(value: number | null, options: {
|
|
4
5
|
readonly unavailable: string;
|
|
5
6
|
}): NumericMaterial;
|
|
7
|
+
export declare function measured<U extends Unit>(value: Quantity<U> | null, options: {
|
|
8
|
+
readonly unavailable: string;
|
|
9
|
+
}): NumericMaterial<U>;
|
|
6
10
|
export type QuantileMethod = "linear" | "nearest-rank";
|
|
7
|
-
export type QuantileMaterial = NumericMaterial & {
|
|
11
|
+
export type QuantileMaterial<U extends Unit | undefined = undefined> = NumericMaterial<U> & {
|
|
8
12
|
readonly statistics: {
|
|
9
13
|
readonly sampleCount: number;
|
|
10
14
|
readonly probability: number;
|
|
@@ -15,3 +19,6 @@ export type QuantileMaterial = NumericMaterial & {
|
|
|
15
19
|
export declare function quantile(samples: readonly number[], p: number, options?: {
|
|
16
20
|
readonly method?: QuantileMethod;
|
|
17
21
|
}): QuantileMaterial;
|
|
22
|
+
export declare function quantile<U extends Unit>(samples: readonly Quantity<U>[], p: number, options?: {
|
|
23
|
+
readonly method?: QuantileMethod;
|
|
24
|
+
}): QuantileMaterial<U>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { type Quantity, type Unit } from "./quantity.js";
|
|
1
2
|
import type { NumericMaterial } from "./match.js";
|
|
2
3
|
/** Preserve a missing observation instead of coercing null to zero. */
|
|
3
4
|
export declare function measured(value: number | null, options: {
|
|
4
5
|
readonly unavailable: string;
|
|
5
6
|
}): NumericMaterial;
|
|
7
|
+
export declare function measured<U extends Unit>(value: Quantity<U> | null, options: {
|
|
8
|
+
readonly unavailable: string;
|
|
9
|
+
}): NumericMaterial<U>;
|
|
6
10
|
export type QuantileMethod = "linear" | "nearest-rank";
|
|
7
|
-
export type QuantileMaterial = NumericMaterial & {
|
|
11
|
+
export type QuantileMaterial<U extends Unit | undefined = undefined> = NumericMaterial<U> & {
|
|
8
12
|
readonly statistics: {
|
|
9
13
|
readonly sampleCount: number;
|
|
10
14
|
readonly probability: number;
|
|
@@ -15,3 +19,6 @@ export type QuantileMaterial = NumericMaterial & {
|
|
|
15
19
|
export declare function quantile(samples: readonly number[], p: number, options?: {
|
|
16
20
|
readonly method?: QuantileMethod;
|
|
17
21
|
}): QuantileMaterial;
|
|
22
|
+
export declare function quantile<U extends Unit>(samples: readonly Quantity<U>[], p: number, options?: {
|
|
23
|
+
readonly method?: QuantileMethod;
|
|
24
|
+
}): QuantileMaterial<U>;
|
|
@@ -13,6 +13,8 @@ function numericCriterion(match, subject) {
|
|
|
13
13
|
numeric: Object.freeze({
|
|
14
14
|
comparator: comparison.comparator,
|
|
15
15
|
threshold: comparison.threshold,
|
|
16
|
+
...(comparison.upperThreshold === undefined ? {} : { upperThreshold: comparison.upperThreshold }),
|
|
17
|
+
...(comparison.unit === undefined ? {} : { unit: comparison.unit }),
|
|
16
18
|
subject: Object.freeze({ ...subject }),
|
|
17
19
|
}),
|
|
18
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeric.js","sourceRoot":"","sources":["numeric.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"numeric.js","sourceRoot":"","sources":["numeric.ts"],"names":[],"mappings":";;AAwCA,gEA+BC;AAvED,mCAAgC;AAEhC,yCAAsH;AAkBtH,SAAS,gBAAgB,CAAC,KAA4C,EAAE,OAAgC;IACpG,MAAM,UAAU,GAAG,IAAA,8BAAmB,EAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,SAAS,CAAC,mEAAmE,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,aAAsB;QAC5B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;YACnB,UAAU,EAAE,UAAU,CAAC,UAAU;YACjC,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,GAAG,CAAC,UAAU,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,CAAC,cAAc,EAAE,CAAC;YACjG,GAAG,CAAC,UAAU,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,CAAC;YACnE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;SACzC,CAAC;KACL,CAAC,CAAC;AACP,CAAC;AACD;;;GAGG;AACH,SAAgB,0BAA0B,CAAU,KAMnD;IACG,MAAM,UAAU,GAAG,IAAA,8BAAmB,EAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACpD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,SAAS,CAAC,mEAAmE,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACjB,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC;QAChE,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ;QAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ;QACjC,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,WAAW;QACvC,QAAQ,EAAE,GAAG,EAAE,CAAC,eAAM,CAAC,IAAI,CAAC,GAAwC,EAAE;YAClE,MAAM,MAAM,GAAG,IAAA,oCAAyB,EAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;YACrE,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAC7B,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAkB,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YACjG,CAAC;YACD,IAAI,MAAM,CAAC,KAAK,KAAK,YAAY,EAAE,CAAC;gBAChC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,YAAqB,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;YAC1F,CAAC;YACD,OAAO,MAAM,CAAC,MAAM,CAAC;gBACjB,KAAK,EAAE,aAAsB;gBAC7B,MAAM,EAAE,oBAA6B;gBACrC,UAAU,EAAE,MAAM,CAAC,UAAU;aAChC,CAAC,CAAC;QACP,CAAC,CAAC;KACL,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { Effect } from \"effect\";\nimport type { AssertionCriterion, BooleanAssertionEvaluation, BooleanAssertionRegistration, CapturedAssertionSnapshot, } from \"./api.ts\";\nimport { evaluateNumericComparison, numericComparisonOf, type BooleanMatch, type NumericMaterial, } from \"./match.ts\";\nexport type NumericCriterionSubject = {\n readonly kind: \"explicit-value\";\n} | {\n readonly kind: \"scope-metric\";\n readonly metric: \"tokens\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly unit: \"tokens\";\n} | {\n readonly kind: \"scope-metric\";\n readonly metric: \"cost\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n readonly unit: \"usd\";\n} | {\n readonly kind: \"collection-cardinality\";\n readonly collection: \"tool-calls\";\n readonly scope: \"turn\" | \"session\" | \"attempt\";\n};\nfunction numericCriterion(match: BooleanMatch<number, number, \"value\">, subject: NumericCriterionSubject): AssertionCriterion {\n const comparison = numericComparisonOf(match);\n if (comparison === undefined) {\n throw new TypeError(\"numeric assertion registration requires a managed numeric matcher\");\n }\n return Object.freeze({\n kind: \"value-match\" as const,\n numeric: Object.freeze({\n comparator: comparison.comparator,\n threshold: comparison.threshold,\n ...(comparison.upperThreshold === undefined ? {} : { upperThreshold: comparison.upperThreshold }),\n ...(comparison.unit === undefined ? {} : { unit: comparison.unit }),\n subject: Object.freeze({ ...subject }),\n }),\n });\n}\n/**\n * Private registration primitive shared by explicit values and scope metrics.\n * It owns criterion encoding input and the sole numeric material evaluator.\n */\nexport function numericBooleanRegistration<Refined>(input: {\n readonly match: BooleanMatch<number, number, \"value\">;\n readonly criterionSubject: NumericCriterionSubject;\n readonly material: NumericMaterial<import(\"./quantity.ts\").Unit | undefined>;\n readonly captured: CapturedAssertionSnapshot;\n readonly matchedValue: (value: number) => Refined;\n}): BooleanAssertionRegistration<Refined> {\n const comparison = numericComparisonOf(input.match);\n if (comparison === undefined) {\n throw new TypeError(\"numeric assertion registration requires a managed numeric matcher\");\n }\n return Object.freeze({\n criterion: numericCriterion(input.match, input.criterionSubject),\n subject: input.captured.material,\n coverage: input.captured.coverage,\n limitations: input.captured.limitations,\n evaluate: () => Effect.sync((): BooleanAssertionEvaluation<Refined> => {\n const result = evaluateNumericComparison(input.material, comparison);\n if (result.state === \"matched\") {\n return Object.freeze({ state: \"matched\" as const, value: input.matchedValue(result.value) });\n }\n if (result.state === \"mismatched\") {\n return Object.freeze({ state: \"mismatched\" as const, diagnostic: result.diagnostic });\n }\n return Object.freeze({\n state: \"unavailable\" as const,\n reason: \"source-unavailable\" as const,\n diagnostic: result.diagnostic,\n });\n }),\n });\n}\n"]}
|
|
@@ -24,7 +24,7 @@ export type NumericCriterionSubject = {
|
|
|
24
24
|
export declare function numericBooleanRegistration<Refined>(input: {
|
|
25
25
|
readonly match: BooleanMatch<number, number, "value">;
|
|
26
26
|
readonly criterionSubject: NumericCriterionSubject;
|
|
27
|
-
readonly material: NumericMaterial
|
|
27
|
+
readonly material: NumericMaterial<import("./quantity.cjs").Unit | undefined>;
|
|
28
28
|
readonly captured: CapturedAssertionSnapshot;
|
|
29
29
|
readonly matchedValue: (value: number) => Refined;
|
|
30
30
|
}): BooleanAssertionRegistration<Refined>;
|
|
@@ -24,7 +24,7 @@ export type NumericCriterionSubject = {
|
|
|
24
24
|
export declare function numericBooleanRegistration<Refined>(input: {
|
|
25
25
|
readonly match: BooleanMatch<number, number, "value">;
|
|
26
26
|
readonly criterionSubject: NumericCriterionSubject;
|
|
27
|
-
readonly material: NumericMaterial
|
|
27
|
+
readonly material: NumericMaterial<import("./quantity.mjs").Unit | undefined>;
|
|
28
28
|
readonly captured: CapturedAssertionSnapshot;
|
|
29
29
|
readonly matchedValue: (value: number) => Refined;
|
|
30
30
|
}): BooleanAssertionRegistration<Refined>;
|
|
@@ -24,7 +24,7 @@ export type NumericCriterionSubject = {
|
|
|
24
24
|
export declare function numericBooleanRegistration<Refined>(input: {
|
|
25
25
|
readonly match: BooleanMatch<number, number, "value">;
|
|
26
26
|
readonly criterionSubject: NumericCriterionSubject;
|
|
27
|
-
readonly material: NumericMaterial
|
|
27
|
+
readonly material: NumericMaterial<import("./quantity.js").Unit | undefined>;
|
|
28
28
|
readonly captured: CapturedAssertionSnapshot;
|
|
29
29
|
readonly matchedValue: (value: number) => Refined;
|
|
30
30
|
}): BooleanAssertionRegistration<Refined>;
|