niceeval 0.12.1 → 0.12.2-canary.31
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 +33 -27
- package/bin/niceeval.js +8 -6
- package/dist/agents/ai-sdk-otel.cjs +54 -0
- package/dist/agents/ai-sdk-otel.cjs.map +1 -0
- package/dist/agents/ai-sdk-otel.d.cts +27 -0
- package/dist/agents/ai-sdk-otel.d.mts +27 -0
- package/dist/agents/ai-sdk-otel.d.ts +27 -0
- package/dist/agents/ai-sdk-otel.js +6 -0
- package/dist/agents/ai-sdk-otel.js.map +1 -0
- package/dist/agents/ai-sdk-otel.mjs +6 -0
- package/dist/agents/ai-sdk-otel.mjs.map +1 -0
- package/dist/agents/ai-sdk.cjs +412 -0
- package/dist/agents/ai-sdk.cjs.map +1 -0
- package/dist/agents/ai-sdk.d.cts +214 -0
- package/dist/agents/ai-sdk.d.mts +214 -0
- package/dist/agents/ai-sdk.d.ts +214 -0
- package/dist/agents/ai-sdk.js +8 -0
- package/dist/agents/ai-sdk.js.map +1 -0
- package/dist/agents/bub-install-spec.cjs +42 -0
- package/dist/agents/bub-install-spec.cjs.map +1 -0
- package/dist/agents/bub-install-spec.d.cts +22 -0
- package/dist/agents/bub-install-spec.d.mts +22 -0
- package/dist/agents/bub-install-spec.d.ts +22 -0
- package/dist/agents/bub-install-spec.js +20 -0
- package/dist/agents/bub-install-spec.js.map +1 -0
- package/dist/agents/bub.cjs +204 -0
- package/dist/agents/bub.cjs.map +1 -0
- package/dist/agents/bub.d.cts +57 -0
- package/dist/agents/bub.d.mts +57 -0
- package/dist/agents/bub.d.ts +57 -0
- package/dist/agents/bub.js +7 -0
- package/dist/agents/bub.js.map +1 -0
- package/dist/agents/builtin.cjs +21 -0
- package/dist/agents/builtin.cjs.map +1 -0
- package/dist/agents/builtin.d.cts +2 -0
- package/dist/agents/builtin.d.mts +2 -0
- package/dist/agents/builtin.d.ts +2 -0
- package/dist/agents/builtin.js +6 -0
- package/dist/agents/builtin.js.map +1 -0
- package/dist/agents/cache-marker.cjs +6 -0
- package/dist/agents/cache-marker.cjs.map +1 -0
- package/dist/agents/cache-marker.d.cts +5 -0
- package/dist/agents/cache-marker.d.mts +5 -0
- package/dist/agents/cache-marker.js +6 -2
- package/dist/agents/cache-marker.js.map +1 -0
- package/dist/agents/claude-code.cjs +372 -0
- package/dist/agents/claude-code.cjs.map +1 -0
- package/dist/agents/claude-code.d.cts +91 -0
- package/dist/agents/claude-code.d.mts +91 -0
- package/dist/agents/claude-code.d.ts +91 -0
- package/dist/agents/claude-code.js +9 -0
- package/dist/agents/claude-code.js.map +1 -0
- package/dist/agents/codex.cjs +658 -0
- package/dist/agents/codex.cjs.map +1 -0
- package/dist/agents/codex.d.cts +96 -0
- package/dist/agents/codex.d.mts +96 -0
- package/dist/agents/codex.d.ts +96 -0
- package/dist/agents/codex.js +9 -0
- package/dist/agents/codex.js.map +1 -0
- package/dist/agents/coding-cli-versions.cjs +71 -0
- package/dist/agents/coding-cli-versions.cjs.map +1 -0
- package/dist/agents/coding-cli-versions.d.cts +40 -0
- package/dist/agents/coding-cli-versions.d.mts +40 -0
- package/dist/agents/coding-cli-versions.d.ts +40 -0
- package/dist/agents/coding-cli-versions.js +22 -0
- package/dist/agents/coding-cli-versions.js.map +1 -0
- package/dist/agents/hermes.cjs +237 -0
- package/dist/agents/hermes.cjs.map +1 -0
- package/dist/agents/hermes.d.cts +17 -0
- package/dist/agents/hermes.d.mts +17 -0
- package/dist/agents/hermes.d.ts +17 -0
- package/dist/agents/hermes.js +7 -0
- package/dist/agents/hermes.js.map +1 -0
- package/dist/agents/index.cjs +92 -0
- package/dist/agents/index.cjs.map +1 -0
- package/dist/agents/index.d.cts +44 -0
- package/dist/agents/index.d.mts +44 -0
- package/dist/agents/index.d.ts +44 -0
- package/dist/agents/index.js +86 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/index.mjs +86 -0
- package/dist/agents/index.mjs.map +1 -0
- package/dist/agents/langgraph.cjs +426 -0
- package/dist/agents/langgraph.cjs.map +1 -0
- package/dist/agents/langgraph.d.cts +43 -0
- package/dist/agents/langgraph.d.mts +43 -0
- package/dist/agents/langgraph.d.ts +43 -0
- package/dist/agents/langgraph.js +6 -0
- package/dist/agents/langgraph.js.map +1 -0
- package/dist/agents/marketplace.cjs +81 -0
- package/dist/agents/marketplace.cjs.map +1 -0
- package/dist/agents/marketplace.d.cts +27 -0
- package/dist/agents/marketplace.d.mts +27 -0
- package/dist/agents/marketplace.d.ts +27 -0
- package/dist/agents/marketplace.js +8 -0
- package/dist/agents/marketplace.js.map +1 -0
- package/dist/agents/mcp.cjs +28 -0
- package/dist/agents/mcp.cjs.map +1 -0
- package/dist/agents/mcp.d.cts +7 -0
- package/dist/agents/mcp.d.mts +7 -0
- package/dist/agents/mcp.d.ts +7 -0
- package/dist/agents/mcp.js +10 -0
- package/dist/agents/mcp.js.map +1 -0
- package/dist/agents/native-config.cjs +288 -0
- package/dist/agents/native-config.cjs.map +1 -0
- package/dist/agents/native-config.d.cts +71 -0
- package/dist/agents/native-config.d.mts +71 -0
- package/dist/agents/native-config.d.ts +71 -0
- package/dist/agents/native-config.js +18 -0
- package/dist/agents/native-config.js.map +1 -0
- package/dist/agents/npm-staged.cjs +378 -0
- package/dist/agents/npm-staged.cjs.map +1 -0
- package/dist/agents/npm-staged.d.cts +52 -0
- package/dist/agents/npm-staged.d.mts +52 -0
- package/dist/agents/npm-staged.d.ts +52 -0
- package/dist/agents/npm-staged.js +12 -0
- package/dist/agents/npm-staged.js.map +1 -0
- package/dist/agents/openai-compat.cjs +158 -0
- package/dist/agents/openai-compat.cjs.map +1 -0
- package/dist/agents/openai-compat.d.cts +88 -0
- package/dist/agents/openai-compat.d.mts +88 -0
- package/dist/agents/openai-compat.d.ts +88 -0
- package/dist/agents/openai-compat.js +12 -0
- package/dist/agents/openai-compat.js.map +1 -0
- package/dist/agents/openclaw.cjs +236 -0
- package/dist/agents/openclaw.cjs.map +1 -0
- package/dist/agents/openclaw.d.cts +26 -0
- package/dist/agents/openclaw.d.mts +26 -0
- package/dist/agents/openclaw.d.ts +26 -0
- package/dist/agents/openclaw.js +7 -0
- package/dist/agents/openclaw.js.map +1 -0
- package/dist/agents/opencode.cjs +228 -0
- package/dist/agents/opencode.cjs.map +1 -0
- package/dist/agents/opencode.d.cts +17 -0
- package/dist/agents/opencode.d.mts +17 -0
- package/dist/agents/opencode.d.ts +17 -0
- package/dist/agents/opencode.js +7 -0
- package/dist/agents/opencode.js.map +1 -0
- package/dist/agents/post-setup.cjs +119 -0
- package/dist/agents/post-setup.cjs.map +1 -0
- package/dist/agents/post-setup.d.cts +20 -0
- package/dist/agents/post-setup.d.mts +20 -0
- package/dist/agents/post-setup.d.ts +20 -0
- package/dist/agents/post-setup.js +12 -0
- package/dist/agents/post-setup.js.map +1 -0
- package/dist/agents/provisioner.cjs +446 -0
- package/dist/agents/provisioner.cjs.map +1 -0
- package/dist/agents/provisioner.d.cts +116 -0
- package/dist/agents/provisioner.d.mts +116 -0
- package/dist/agents/provisioner.d.ts +8 -6
- package/dist/agents/provisioner.js +32 -0
- package/dist/agents/provisioner.js.map +1 -0
- package/dist/agents/sdk-streams.cjs +447 -0
- package/dist/agents/sdk-streams.cjs.map +1 -0
- package/dist/agents/sdk-streams.d.cts +135 -0
- package/dist/agents/sdk-streams.d.mts +135 -0
- package/dist/agents/sdk-streams.d.ts +135 -0
- package/dist/agents/sdk-streams.js +12 -0
- package/dist/agents/sdk-streams.js.map +1 -0
- package/dist/agents/session-slot.cjs +8 -0
- package/dist/agents/session-slot.cjs.map +1 -0
- package/dist/agents/session-slot.d.cts +12 -0
- package/dist/agents/session-slot.d.mts +12 -0
- package/dist/agents/session-slot.js +6 -0
- package/dist/agents/session-slot.js.map +1 -0
- package/dist/agents/shared.cjs +202 -0
- package/dist/agents/shared.cjs.map +1 -0
- package/dist/agents/shared.d.cts +95 -0
- package/dist/agents/shared.d.mts +95 -0
- package/dist/agents/shared.d.ts +95 -0
- package/dist/agents/shared.js +6 -0
- package/dist/agents/shared.js.map +1 -0
- package/dist/agents/skills.cjs +262 -0
- package/dist/agents/skills.cjs.map +1 -0
- package/dist/agents/skills.d.cts +60 -0
- package/dist/agents/skills.d.mts +60 -0
- package/dist/agents/skills.d.ts +60 -0
- package/dist/agents/skills.js +22 -0
- package/dist/agents/skills.js.map +1 -0
- package/dist/agents/streaming.cjs +142 -0
- package/dist/agents/streaming.cjs.map +1 -0
- package/dist/agents/streaming.d.cts +82 -0
- package/dist/agents/streaming.d.mts +82 -0
- package/dist/agents/streaming.d.ts +82 -0
- package/dist/agents/streaming.js +8 -0
- package/dist/agents/streaming.js.map +1 -0
- package/dist/agents/types.cjs +5 -0
- package/dist/agents/types.cjs.map +1 -0
- package/dist/agents/types.d.cts +592 -0
- package/dist/agents/types.d.mts +592 -0
- package/dist/agents/types.d.ts +26 -20
- package/dist/agents/types.js +4 -2
- package/dist/agents/types.js.map +1 -0
- package/dist/agents/ui-message-stream.cjs +426 -0
- package/dist/agents/ui-message-stream.cjs.map +1 -0
- package/dist/agents/ui-message-stream.d.cts +68 -0
- package/dist/agents/ui-message-stream.d.mts +68 -0
- package/dist/agents/ui-message-stream.d.ts +68 -0
- package/dist/agents/ui-message-stream.js +6 -0
- package/dist/agents/ui-message-stream.js.map +1 -0
- package/dist/analysis/index.cjs +11 -0
- package/dist/analysis/index.cjs.map +1 -0
- package/dist/analysis/index.d.cts +2 -0
- package/dist/analysis/index.d.mts +2 -0
- package/dist/analysis/index.d.ts +2 -0
- package/dist/analysis/index.js +12 -0
- package/dist/analysis/index.js.map +1 -0
- package/dist/analysis/index.mjs +12 -0
- package/dist/analysis/index.mjs.map +1 -0
- package/dist/assertions/api.cjs +26 -0
- package/dist/assertions/api.cjs.map +1 -0
- package/dist/assertions/api.d.cts +395 -0
- package/dist/assertions/api.d.mts +395 -0
- package/dist/assertions/api.d.ts +395 -0
- package/dist/assertions/api.js +8 -0
- package/dist/assertions/api.js.map +1 -0
- package/dist/assertions/coverage.cjs +97 -0
- package/dist/assertions/coverage.cjs.map +1 -0
- package/dist/assertions/coverage.d.cts +23 -0
- package/dist/assertions/coverage.d.mts +23 -0
- package/dist/assertions/coverage.d.ts +1 -1
- package/dist/assertions/coverage.js +14 -94
- package/dist/assertions/coverage.js.map +1 -0
- package/dist/assertions/diff.cjs +249 -0
- package/dist/assertions/diff.cjs.map +1 -0
- package/dist/assertions/diff.d.cts +88 -0
- package/dist/assertions/diff.d.mts +88 -0
- package/dist/assertions/diff.d.ts +70 -2
- package/dist/assertions/diff.js +36 -116
- package/dist/assertions/diff.js.map +1 -0
- package/dist/assertions/display.cjs +79 -0
- package/dist/assertions/display.cjs.map +1 -0
- package/dist/assertions/display.d.cts +36 -0
- package/dist/assertions/display.d.mts +36 -0
- package/dist/assertions/display.d.ts +32 -32
- package/dist/assertions/display.js +14 -200
- package/dist/assertions/display.js.map +1 -0
- package/dist/assertions/identity.cjs +6 -0
- package/dist/assertions/identity.cjs.map +1 -0
- package/dist/assertions/identity.d.cts +4 -0
- package/dist/assertions/identity.d.mts +4 -0
- package/dist/assertions/identity.d.ts +4 -0
- package/dist/assertions/identity.js +6 -0
- package/dist/assertions/identity.js.map +1 -0
- package/dist/assertions/judge.cjs +342 -0
- package/dist/assertions/judge.cjs.map +1 -0
- package/dist/assertions/judge.d.cts +22 -0
- package/dist/assertions/judge.d.mts +22 -0
- package/dist/assertions/judge.d.ts +22 -0
- package/dist/assertions/judge.js +12 -0
- package/dist/assertions/judge.js.map +1 -0
- package/dist/assertions/limits.cjs +14 -0
- package/dist/assertions/limits.cjs.map +1 -0
- package/dist/assertions/limits.d.cts +10 -0
- package/dist/assertions/limits.d.mts +10 -0
- package/dist/assertions/limits.d.ts +10 -0
- package/dist/assertions/limits.js +6 -0
- package/dist/assertions/limits.js.map +1 -0
- package/dist/assertions/match.cjs +1314 -0
- package/dist/assertions/match.cjs.map +1 -0
- package/dist/assertions/match.d.cts +276 -0
- package/dist/assertions/match.d.mts +276 -0
- package/dist/assertions/match.d.ts +276 -0
- package/dist/assertions/match.js +82 -0
- package/dist/assertions/match.js.map +1 -0
- package/dist/assertions/record/attachment.cjs +448 -0
- package/dist/assertions/record/attachment.cjs.map +1 -0
- package/dist/assertions/record/attachment.d.cts +220 -0
- package/dist/assertions/record/attachment.d.mts +220 -0
- package/dist/assertions/record/attachment.d.ts +220 -0
- package/dist/assertions/record/attachment.js +20 -0
- package/dist/assertions/record/attachment.js.map +1 -0
- package/dist/assertions/record/codec.cjs +541 -0
- package/dist/assertions/record/codec.cjs.map +1 -0
- package/dist/assertions/record/codec.d.cts +146 -0
- package/dist/assertions/record/codec.d.mts +146 -0
- package/dist/assertions/record/codec.d.ts +146 -0
- package/dist/assertions/record/codec.js +42 -0
- package/dist/assertions/record/codec.js.map +1 -0
- package/dist/assertions/record/diff-model.cjs +120 -0
- package/dist/assertions/record/diff-model.cjs.map +1 -0
- package/dist/assertions/record/diff-model.d.cts +47 -0
- package/dist/assertions/record/diff-model.d.mts +47 -0
- package/dist/assertions/record/diff-model.d.ts +47 -0
- package/dist/assertions/record/diff-model.js +12 -0
- package/dist/assertions/record/diff-model.js.map +1 -0
- package/dist/assertions/record/diff.cjs +149 -0
- package/dist/assertions/record/diff.cjs.map +1 -0
- package/dist/assertions/record/diff.d.cts +27 -0
- package/dist/assertions/record/diff.d.mts +27 -0
- package/dist/assertions/record/diff.d.ts +27 -0
- package/dist/assertions/record/diff.js +18 -0
- package/dist/assertions/record/diff.js.map +1 -0
- package/dist/assertions/record/index.cjs +22 -0
- package/dist/assertions/record/index.cjs.map +1 -0
- package/dist/assertions/record/index.d.cts +5 -0
- package/dist/assertions/record/index.d.mts +5 -0
- package/dist/assertions/record/index.d.ts +5 -0
- package/dist/assertions/record/index.js +76 -0
- package/dist/assertions/record/index.js.map +1 -0
- package/dist/assertions/record/model.cjs +10 -0
- package/dist/assertions/record/model.cjs.map +1 -0
- package/dist/assertions/record/model.d.cts +257 -0
- package/dist/assertions/record/model.d.mts +257 -0
- package/dist/assertions/record/model.d.ts +257 -0
- package/dist/assertions/record/model.js +6 -0
- package/dist/assertions/record/model.js.map +1 -0
- package/dist/assertions/record/producer.cjs +55 -0
- package/dist/assertions/record/producer.cjs.map +1 -0
- package/dist/assertions/record/producer.d.cts +45 -0
- package/dist/assertions/record/producer.d.mts +45 -0
- package/dist/assertions/record/producer.d.ts +45 -0
- package/dist/assertions/record/producer.js +6 -0
- package/dist/assertions/record/producer.js.map +1 -0
- package/dist/assertions/runtime.cjs +1163 -0
- package/dist/assertions/runtime.cjs.map +1 -0
- package/dist/assertions/runtime.d.cts +45 -0
- package/dist/assertions/runtime.d.mts +45 -0
- package/dist/assertions/runtime.d.ts +45 -0
- package/dist/assertions/runtime.js +16 -0
- package/dist/assertions/runtime.js.map +1 -0
- package/dist/assertions/types.cjs +3 -0
- package/dist/assertions/types.cjs.map +1 -0
- package/dist/assertions/types.d.cts +238 -0
- package/dist/assertions/types.d.mts +238 -0
- package/dist/assertions/types.d.ts +166 -186
- package/dist/assertions/types.js +4 -2
- package/dist/assertions/types.js.map +1 -0
- package/dist/assertions/workspace-diff.cjs +237 -0
- package/dist/assertions/workspace-diff.cjs.map +1 -0
- package/dist/assertions/workspace-diff.d.cts +77 -0
- package/dist/assertions/workspace-diff.d.mts +77 -0
- package/dist/assertions/workspace-diff.d.ts +77 -0
- package/dist/assertions/workspace-diff.js +16 -0
- package/dist/assertions/workspace-diff.js.map +1 -0
- package/dist/attempt-locator-resolution.cjs +51 -0
- package/dist/attempt-locator-resolution.cjs.map +1 -0
- package/dist/attempt-locator-resolution.d.cts +18 -0
- package/dist/attempt-locator-resolution.d.mts +18 -0
- package/dist/attempt-locator-resolution.d.ts +18 -0
- package/dist/attempt-locator-resolution.js +6 -0
- package/dist/attempt-locator-resolution.js.map +1 -0
- package/dist/attempt-locator.cjs +122 -0
- package/dist/attempt-locator.cjs.map +1 -0
- package/dist/attempt-locator.d.cts +25 -0
- package/dist/attempt-locator.d.mts +25 -0
- package/dist/attempt-locator.d.ts +25 -0
- package/dist/attempt-locator.js +10 -0
- package/dist/attempt-locator.js.map +1 -0
- package/dist/cli/bootstrap.cjs +87 -0
- package/dist/cli/bootstrap.cjs.map +1 -0
- package/dist/cli/bootstrap.d.mts +1 -0
- package/dist/cli/bootstrap.d.ts +1 -0
- package/dist/cli/bootstrap.js +4 -0
- package/dist/cli/bootstrap.js.map +1 -0
- package/dist/cli/record.cjs +198 -0
- package/dist/cli/record.cjs.map +1 -0
- package/dist/cli/record.d.cts +28 -0
- package/dist/cli/record.d.mts +28 -0
- package/dist/cli/record.d.ts +28 -0
- package/dist/cli/record.js +12 -0
- package/dist/cli/record.js.map +1 -0
- package/dist/cli.cjs +2405 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +139 -0
- package/dist/cli.d.mts +139 -0
- package/dist/cli.d.ts +139 -0
- package/dist/cli.js +34 -0
- package/dist/cli.js.map +1 -0
- package/dist/context/assert-first.cjs +1766 -0
- package/dist/context/assert-first.cjs.map +1 -0
- package/dist/context/assert-first.d.cts +204 -0
- package/dist/context/assert-first.d.mts +204 -0
- package/dist/context/assert-first.d.ts +204 -0
- package/dist/context/assert-first.js +6 -0
- package/dist/context/assert-first.js.map +1 -0
- package/dist/context/control-flow.cjs +15 -0
- package/dist/context/control-flow.cjs.map +1 -0
- package/dist/context/control-flow.d.cts +5 -0
- package/dist/context/control-flow.d.mts +5 -0
- package/dist/context/control-flow.d.ts +5 -0
- package/dist/context/control-flow.js +6 -0
- package/dist/context/control-flow.js.map +1 -0
- package/dist/context/send-failures.cjs +119 -0
- package/dist/context/send-failures.cjs.map +1 -0
- package/dist/context/send-failures.d.cts +45 -0
- package/dist/context/send-failures.d.mts +45 -0
- package/dist/context/send-failures.d.ts +3 -3
- package/dist/context/send-failures.js +18 -0
- package/dist/context/send-failures.js.map +1 -0
- package/dist/context/send-retry.cjs +105 -0
- package/dist/context/send-retry.cjs.map +1 -0
- package/dist/context/send-retry.d.cts +41 -0
- package/dist/context/send-retry.d.mts +41 -0
- package/dist/context/send-retry.d.ts +41 -0
- package/dist/context/send-retry.js +12 -0
- package/dist/context/send-retry.js.map +1 -0
- package/dist/context/session.cjs +503 -0
- package/dist/context/session.cjs.map +1 -0
- package/dist/context/session.d.cts +179 -0
- package/dist/context/session.d.mts +179 -0
- package/dist/context/session.d.ts +179 -0
- package/dist/context/session.js +12 -0
- package/dist/context/session.js.map +1 -0
- package/dist/context/types.cjs +3 -0
- package/dist/context/types.cjs.map +1 -0
- package/dist/context/types.d.cts +37 -0
- package/dist/context/types.d.mts +37 -0
- package/dist/context/types.d.ts +30 -387
- package/dist/context/types.js +4 -3
- package/dist/context/types.js.map +1 -0
- package/dist/define.cjs +246 -0
- package/dist/define.cjs.map +1 -0
- package/dist/define.d.cts +26 -0
- package/dist/define.d.mts +26 -0
- package/dist/define.d.ts +26 -0
- package/dist/define.js +22 -0
- package/dist/define.js.map +1 -0
- package/dist/eval/experiment-id.cjs +18 -0
- package/dist/eval/experiment-id.cjs.map +1 -0
- package/dist/eval/experiment-id.d.cts +10 -0
- package/dist/eval/experiment-id.d.mts +10 -0
- package/dist/eval/experiment-id.d.ts +10 -0
- package/dist/eval/experiment-id.js +10 -0
- package/dist/eval/experiment-id.js.map +1 -0
- package/dist/eval/record/attachment.cjs +60 -0
- package/dist/eval/record/attachment.cjs.map +1 -0
- package/dist/eval/record/attachment.d.cts +30 -0
- package/dist/eval/record/attachment.d.mts +30 -0
- package/dist/eval/record/attachment.d.ts +30 -0
- package/dist/eval/record/attachment.js +16 -0
- package/dist/eval/record/attachment.js.map +1 -0
- package/dist/eval/record/coherence.cjs +118 -0
- package/dist/eval/record/coherence.cjs.map +1 -0
- package/dist/eval/record/coherence.d.cts +61 -0
- package/dist/eval/record/coherence.d.mts +61 -0
- package/dist/eval/record/coherence.d.ts +61 -0
- package/dist/eval/record/coherence.js +6 -0
- package/dist/eval/record/coherence.js.map +1 -0
- package/dist/eval/record/eligibility.cjs +157 -0
- package/dist/eval/record/eligibility.cjs.map +1 -0
- package/dist/eval/record/eligibility.d.cts +151 -0
- package/dist/eval/record/eligibility.d.mts +151 -0
- package/dist/eval/record/eligibility.d.ts +151 -0
- package/dist/eval/record/eligibility.js +42 -0
- package/dist/eval/record/eligibility.js.map +1 -0
- package/dist/eval/record/evaluation-plan.cjs +26 -0
- package/dist/eval/record/evaluation-plan.cjs.map +1 -0
- package/dist/eval/record/evaluation-plan.d.cts +16 -0
- package/dist/eval/record/evaluation-plan.d.mts +16 -0
- package/dist/eval/record/evaluation-plan.d.ts +16 -0
- package/dist/eval/record/evaluation-plan.js +6 -0
- package/dist/eval/record/evaluation-plan.js.map +1 -0
- package/dist/eval/record/evaluation-record.cjs +540 -0
- package/dist/eval/record/evaluation-record.cjs.map +1 -0
- package/dist/eval/record/evaluation-record.d.cts +168 -0
- package/dist/eval/record/evaluation-record.d.mts +168 -0
- package/dist/eval/record/evaluation-record.d.ts +168 -0
- package/dist/eval/record/evaluation-record.js +22 -0
- package/dist/eval/record/evaluation-record.js.map +1 -0
- package/dist/eval/record/evaluation.cjs +220 -0
- package/dist/eval/record/evaluation.cjs.map +1 -0
- package/dist/eval/record/evaluation.d.cts +175 -0
- package/dist/eval/record/evaluation.d.mts +175 -0
- package/dist/eval/record/evaluation.d.ts +175 -0
- package/dist/eval/record/evaluation.js +36 -0
- package/dist/eval/record/evaluation.js.map +1 -0
- package/dist/eval/record/index.cjs +26 -0
- package/dist/eval/record/index.cjs.map +1 -0
- package/dist/eval/record/index.d.cts +9 -0
- package/dist/eval/record/index.d.mts +9 -0
- package/dist/eval/record/index.d.ts +9 -0
- package/dist/eval/record/index.js +242 -0
- package/dist/eval/record/index.js.map +1 -0
- package/dist/eval/record/membership-provenance.cjs +213 -0
- package/dist/eval/record/membership-provenance.cjs.map +1 -0
- package/dist/eval/record/membership-provenance.d.cts +855 -0
- package/dist/eval/record/membership-provenance.d.mts +855 -0
- package/dist/eval/record/membership-provenance.d.ts +855 -0
- package/dist/eval/record/membership-provenance.js +58 -0
- package/dist/eval/record/membership-provenance.js.map +1 -0
- package/dist/eval/record/score.cjs +248 -0
- package/dist/eval/record/score.cjs.map +1 -0
- package/dist/eval/record/score.d.cts +165 -0
- package/dist/eval/record/score.d.mts +165 -0
- package/dist/eval/record/score.d.ts +165 -0
- package/dist/eval/record/score.js +44 -0
- package/dist/eval/record/score.js.map +1 -0
- package/dist/eval/record/sealed-assertion.cjs +31 -0
- package/dist/eval/record/sealed-assertion.cjs.map +1 -0
- package/dist/eval/record/sealed-assertion.d.cts +32 -0
- package/dist/eval/record/sealed-assertion.d.mts +32 -0
- package/dist/eval/record/sealed-assertion.d.ts +32 -0
- package/dist/eval/record/sealed-assertion.js +14 -0
- package/dist/eval/record/sealed-assertion.js.map +1 -0
- package/dist/eval/record/verdict.cjs +89 -0
- package/dist/eval/record/verdict.cjs.map +1 -0
- package/dist/eval/record/verdict.d.cts +60 -0
- package/dist/eval/record/verdict.d.mts +60 -0
- package/dist/eval/record/verdict.d.ts +60 -0
- package/dist/eval/record/verdict.js +36 -0
- package/dist/eval/record/verdict.js.map +1 -0
- package/dist/expect/index.cjs +29 -0
- package/dist/expect/index.cjs.map +1 -0
- package/dist/expect/index.d.cts +2 -0
- package/dist/expect/index.d.mts +2 -0
- package/dist/expect/index.d.ts +2 -0
- package/dist/expect/index.js +50 -0
- package/dist/expect/index.js.map +1 -0
- package/dist/expect/index.mjs +50 -0
- package/dist/expect/index.mjs.map +1 -0
- package/dist/fresh-import.cjs +288 -0
- package/dist/fresh-import.cjs.map +1 -0
- package/dist/fresh-import.d.cts +20 -0
- package/dist/fresh-import.d.mts +20 -0
- package/dist/fresh-import.d.ts +20 -0
- package/dist/fresh-import.js +8 -0
- package/dist/fresh-import.js.map +1 -0
- package/dist/i18n/core.cjs +21 -0
- package/dist/i18n/core.cjs.map +1 -0
- package/dist/i18n/core.d.cts +11 -0
- package/dist/i18n/core.d.mts +11 -0
- package/dist/i18n/core.js +8 -19
- package/dist/i18n/core.js.map +1 -0
- package/dist/i18n/en.cjs +474 -0
- package/dist/i18n/en.cjs.map +1 -0
- package/dist/i18n/en.d.cts +391 -0
- package/dist/i18n/en.d.mts +391 -0
- package/dist/i18n/en.d.ts +389 -363
- package/dist/i18n/en.js +6 -455
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/index.cjs +12 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +5 -0
- package/dist/i18n/index.d.mts +5 -0
- package/dist/i18n/index.d.ts +4 -9
- package/dist/i18n/index.js +6 -30
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.cjs +25 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +10 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +28 -0
- package/dist/index.mjs.map +1 -0
- package/dist/load-config.cjs +52 -0
- package/dist/load-config.cjs.map +1 -0
- package/dist/load-config.d.cts +4 -0
- package/dist/load-config.d.mts +4 -0
- package/dist/load-config.d.ts +4 -0
- package/dist/load-config.js +6 -0
- package/dist/load-config.js.map +1 -0
- package/dist/loaders/glob.cjs +150 -0
- package/dist/loaders/glob.cjs.map +1 -0
- package/dist/loaders/glob.d.cts +28 -0
- package/dist/loaders/glob.d.mts +28 -0
- package/dist/loaders/glob.d.ts +28 -0
- package/dist/loaders/glob.js +12 -0
- package/dist/loaders/glob.js.map +1 -0
- package/dist/loaders/index.cjs +281 -0
- package/dist/loaders/index.cjs.map +1 -0
- package/dist/loaders/index.d.cts +95 -0
- package/dist/loaders/index.d.mts +95 -0
- package/dist/loaders/index.d.ts +95 -0
- package/dist/loaders/index.js +16 -0
- package/dist/loaders/index.js.map +1 -0
- package/dist/loaders/index.mjs +16 -0
- package/dist/loaders/index.mjs.map +1 -0
- package/dist/o11y/command-projection.cjs +127 -0
- package/dist/o11y/command-projection.cjs.map +1 -0
- package/dist/o11y/command-projection.d.cts +29 -0
- package/dist/o11y/command-projection.d.mts +29 -0
- package/dist/o11y/command-projection.d.ts +29 -0
- package/dist/o11y/command-projection.js +18 -0
- package/dist/o11y/command-projection.js.map +1 -0
- package/dist/o11y/cost.cjs +76 -0
- package/dist/o11y/cost.cjs.map +1 -0
- package/dist/o11y/cost.d.cts +8 -0
- package/dist/o11y/cost.d.mts +8 -0
- package/dist/o11y/cost.d.ts +8 -0
- package/dist/o11y/cost.js +6 -0
- package/dist/o11y/cost.js.map +1 -0
- package/dist/o11y/derive.cjs +572 -0
- package/dist/o11y/derive.cjs.map +1 -0
- package/dist/o11y/derive.d.cts +24 -0
- package/dist/o11y/derive.d.mts +24 -0
- package/dist/o11y/derive.d.ts +16 -1
- package/dist/o11y/derive.js +14 -281
- package/dist/o11y/derive.js.map +1 -0
- package/dist/o11y/execution-tree.cjs +213 -0
- package/dist/o11y/execution-tree.cjs.map +1 -0
- package/dist/o11y/execution-tree.d.cts +113 -0
- package/dist/o11y/execution-tree.d.mts +113 -0
- package/dist/o11y/execution-tree.d.ts +1 -1
- package/dist/o11y/execution-tree.js +6 -254
- package/dist/o11y/execution-tree.js.map +1 -0
- package/dist/o11y/otlp/canonical.cjs +94 -0
- package/dist/o11y/otlp/canonical.cjs.map +1 -0
- package/dist/o11y/otlp/canonical.d.cts +34 -0
- package/dist/o11y/otlp/canonical.d.mts +34 -0
- package/dist/o11y/otlp/canonical.d.ts +34 -0
- package/dist/o11y/otlp/canonical.js +26 -0
- package/dist/o11y/otlp/canonical.js.map +1 -0
- package/dist/o11y/otlp/mappers/bub.cjs +24 -0
- package/dist/o11y/otlp/mappers/bub.cjs.map +1 -0
- package/dist/o11y/otlp/mappers/bub.d.cts +2 -0
- package/dist/o11y/otlp/mappers/bub.d.mts +2 -0
- package/dist/o11y/otlp/mappers/bub.d.ts +2 -0
- package/dist/o11y/otlp/mappers/bub.js +6 -0
- package/dist/o11y/otlp/mappers/bub.js.map +1 -0
- package/dist/o11y/otlp/mappers/claude-code.cjs +16 -0
- package/dist/o11y/otlp/mappers/claude-code.cjs.map +1 -0
- package/dist/o11y/otlp/mappers/claude-code.d.cts +2 -0
- package/dist/o11y/otlp/mappers/claude-code.d.mts +2 -0
- package/dist/o11y/otlp/mappers/claude-code.d.ts +2 -0
- package/dist/o11y/otlp/mappers/claude-code.js +6 -0
- package/dist/o11y/otlp/mappers/claude-code.js.map +1 -0
- package/dist/o11y/otlp/mappers/codex.cjs +31 -0
- package/dist/o11y/otlp/mappers/codex.cjs.map +1 -0
- package/dist/o11y/otlp/mappers/codex.d.cts +2 -0
- package/dist/o11y/otlp/mappers/codex.d.mts +2 -0
- package/dist/o11y/otlp/mappers/codex.d.ts +2 -0
- package/dist/o11y/otlp/mappers/codex.js +6 -0
- package/dist/o11y/otlp/mappers/codex.js.map +1 -0
- package/dist/o11y/otlp/mappers/index.cjs +21 -0
- package/dist/o11y/otlp/mappers/index.cjs.map +1 -0
- package/dist/o11y/otlp/mappers/index.d.cts +4 -0
- package/dist/o11y/otlp/mappers/index.d.mts +4 -0
- package/dist/o11y/otlp/mappers/index.d.ts +4 -0
- package/dist/o11y/otlp/mappers/index.js +12 -0
- package/dist/o11y/otlp/mappers/index.js.map +1 -0
- package/dist/o11y/otlp/parse.cjs +369 -0
- package/dist/o11y/otlp/parse.cjs.map +1 -0
- package/dist/o11y/otlp/parse.d.cts +3 -0
- package/dist/o11y/otlp/parse.d.mts +3 -0
- package/dist/o11y/otlp/parse.d.ts +1 -1
- package/dist/o11y/otlp/parse.js +6 -0
- package/dist/o11y/otlp/parse.js.map +1 -0
- package/dist/o11y/otlp/receiver.cjs +326 -0
- package/dist/o11y/otlp/receiver.cjs.map +1 -0
- package/dist/o11y/otlp/receiver.d.cts +27 -0
- package/dist/o11y/otlp/receiver.d.mts +27 -0
- package/dist/o11y/otlp/receiver.d.ts +16 -10
- package/dist/o11y/otlp/receiver.js +10 -0
- package/dist/o11y/otlp/receiver.js.map +1 -0
- package/dist/o11y/otlp/sandbox-receiver.cjs +226 -0
- package/dist/o11y/otlp/sandbox-receiver.cjs.map +1 -0
- package/dist/o11y/otlp/sandbox-receiver.d.cts +4 -0
- package/dist/o11y/otlp/sandbox-receiver.d.mts +4 -0
- package/dist/o11y/otlp/sandbox-receiver.d.ts +4 -0
- package/dist/o11y/otlp/sandbox-receiver.js +6 -0
- package/dist/o11y/otlp/sandbox-receiver.js.map +1 -0
- package/dist/o11y/otlp/select.cjs +82 -0
- package/dist/o11y/otlp/select.cjs.map +1 -0
- package/dist/o11y/otlp/select.d.cts +22 -0
- package/dist/o11y/otlp/select.d.mts +22 -0
- package/dist/o11y/otlp/select.d.ts +1 -1
- package/dist/o11y/otlp/select.js +12 -86
- package/dist/o11y/otlp/select.js.map +1 -0
- package/dist/o11y/otlp/turn-otel.cjs +180 -0
- package/dist/o11y/otlp/turn-otel.cjs.map +1 -0
- package/dist/o11y/otlp/turn-otel.d.cts +59 -0
- package/dist/o11y/otlp/turn-otel.d.mts +59 -0
- package/dist/o11y/otlp/turn-otel.d.ts +26 -10
- package/dist/o11y/otlp/turn-otel.js +8 -0
- package/dist/o11y/otlp/turn-otel.js.map +1 -0
- package/dist/o11y/parsers/bub.cjs +277 -0
- package/dist/o11y/parsers/bub.cjs.map +1 -0
- package/dist/o11y/parsers/bub.d.cts +7 -0
- package/dist/o11y/parsers/bub.d.mts +7 -0
- package/dist/o11y/parsers/bub.d.ts +7 -0
- package/dist/o11y/parsers/bub.js +10 -0
- package/dist/o11y/parsers/bub.js.map +1 -0
- package/dist/o11y/parsers/claude-code.cjs +309 -0
- package/dist/o11y/parsers/claude-code.cjs.map +1 -0
- package/dist/o11y/parsers/claude-code.d.cts +11 -0
- package/dist/o11y/parsers/claude-code.d.mts +11 -0
- package/dist/o11y/parsers/claude-code.d.ts +11 -0
- package/dist/o11y/parsers/claude-code.js +10 -0
- package/dist/o11y/parsers/claude-code.js.map +1 -0
- package/dist/o11y/parsers/codex.cjs +439 -0
- package/dist/o11y/parsers/codex.cjs.map +1 -0
- package/dist/o11y/parsers/codex.d.cts +7 -0
- package/dist/o11y/parsers/codex.d.mts +7 -0
- package/dist/o11y/parsers/codex.d.ts +7 -0
- package/dist/o11y/parsers/codex.js +10 -0
- package/dist/o11y/parsers/codex.js.map +1 -0
- package/dist/o11y/parsers/hermes.cjs +234 -0
- package/dist/o11y/parsers/hermes.cjs.map +1 -0
- package/dist/o11y/parsers/hermes.d.cts +9 -0
- package/dist/o11y/parsers/hermes.d.mts +9 -0
- package/dist/o11y/parsers/hermes.d.ts +9 -0
- package/dist/o11y/parsers/hermes.js +10 -0
- package/dist/o11y/parsers/hermes.js.map +1 -0
- package/dist/o11y/parsers/index.cjs +13 -0
- package/dist/o11y/parsers/index.cjs.map +1 -0
- package/dist/o11y/parsers/index.d.cts +12 -0
- package/dist/o11y/parsers/index.d.mts +12 -0
- package/dist/o11y/parsers/index.d.ts +12 -0
- package/dist/o11y/parsers/index.js +16 -0
- package/dist/o11y/parsers/index.js.map +1 -0
- package/dist/o11y/parsers/openclaw.cjs +320 -0
- package/dist/o11y/parsers/openclaw.cjs.map +1 -0
- package/dist/o11y/parsers/openclaw.d.cts +39 -0
- package/dist/o11y/parsers/openclaw.d.mts +39 -0
- package/dist/o11y/parsers/openclaw.d.ts +39 -0
- package/dist/o11y/parsers/openclaw.js +12 -0
- package/dist/o11y/parsers/openclaw.js.map +1 -0
- package/dist/o11y/parsers/opencode.cjs +337 -0
- package/dist/o11y/parsers/opencode.cjs.map +1 -0
- package/dist/o11y/parsers/opencode.d.cts +14 -0
- package/dist/o11y/parsers/opencode.d.mts +14 -0
- package/dist/o11y/parsers/opencode.d.ts +14 -0
- package/dist/o11y/parsers/opencode.js +12 -0
- package/dist/o11y/parsers/opencode.js.map +1 -0
- package/dist/o11y/prices.json +11649 -0
- package/dist/o11y/record/capture.cjs +232 -0
- package/dist/o11y/record/capture.cjs.map +1 -0
- package/dist/o11y/record/capture.d.cts +81 -0
- package/dist/o11y/record/capture.d.mts +81 -0
- package/dist/o11y/record/capture.d.ts +81 -0
- package/dist/o11y/record/capture.js +30 -0
- package/dist/o11y/record/capture.js.map +1 -0
- package/dist/o11y/record/codec.cjs +222 -0
- package/dist/o11y/record/codec.cjs.map +1 -0
- package/dist/o11y/record/codec.d.cts +661 -0
- package/dist/o11y/record/codec.d.mts +661 -0
- package/dist/o11y/record/codec.d.ts +661 -0
- package/dist/o11y/record/codec.js +66 -0
- package/dist/o11y/record/codec.js.map +1 -0
- package/dist/o11y/record/errors.cjs +71 -0
- package/dist/o11y/record/errors.cjs.map +1 -0
- package/dist/o11y/record/errors.d.cts +53 -0
- package/dist/o11y/record/errors.d.mts +53 -0
- package/dist/o11y/record/errors.d.ts +53 -0
- package/dist/o11y/record/errors.js +24 -0
- package/dist/o11y/record/errors.js.map +1 -0
- package/dist/o11y/record/families.cjs +699 -0
- package/dist/o11y/record/families.cjs.map +1 -0
- package/dist/o11y/record/families.d.cts +4298 -0
- package/dist/o11y/record/families.d.mts +4298 -0
- package/dist/o11y/record/families.d.ts +4298 -0
- package/dist/o11y/record/families.js +68 -0
- package/dist/o11y/record/families.js.map +1 -0
- package/dist/o11y/record/family-projectors.cjs +83 -0
- package/dist/o11y/record/family-projectors.cjs.map +1 -0
- package/dist/o11y/record/family-projectors.d.cts +46 -0
- package/dist/o11y/record/family-projectors.d.mts +46 -0
- package/dist/o11y/record/family-projectors.d.ts +46 -0
- package/dist/o11y/record/family-projectors.js +18 -0
- package/dist/o11y/record/family-projectors.js.map +1 -0
- package/dist/o11y/record/family-writers.cjs +371 -0
- package/dist/o11y/record/family-writers.cjs.map +1 -0
- package/dist/o11y/record/family-writers.d.cts +5293 -0
- package/dist/o11y/record/family-writers.d.mts +5293 -0
- package/dist/o11y/record/family-writers.d.ts +5293 -0
- package/dist/o11y/record/family-writers.js +60 -0
- package/dist/o11y/record/family-writers.js.map +1 -0
- package/dist/o11y/record/index.cjs +31 -0
- package/dist/o11y/record/index.cjs.map +1 -0
- package/dist/o11y/record/index.d.cts +14 -0
- package/dist/o11y/record/index.d.mts +14 -0
- package/dist/o11y/record/index.d.ts +14 -0
- package/dist/o11y/record/index.js +488 -0
- package/dist/o11y/record/index.js.map +1 -0
- package/dist/o11y/record/limits.cjs +69 -0
- package/dist/o11y/record/limits.cjs.map +1 -0
- package/dist/o11y/record/limits.d.cts +65 -0
- package/dist/o11y/record/limits.d.mts +65 -0
- package/dist/o11y/record/limits.d.ts +65 -0
- package/dist/o11y/record/limits.js +68 -0
- package/dist/o11y/record/limits.js.map +1 -0
- package/dist/o11y/record/model.cjs +590 -0
- package/dist/o11y/record/model.cjs.map +1 -0
- package/dist/o11y/record/model.d.cts +275 -0
- package/dist/o11y/record/model.d.mts +275 -0
- package/dist/o11y/record/model.d.ts +275 -0
- package/dist/o11y/record/model.js +158 -0
- package/dist/o11y/record/model.js.map +1 -0
- package/dist/o11y/record/runner-producer.cjs +1575 -0
- package/dist/o11y/record/runner-producer.cjs.map +1 -0
- package/dist/o11y/record/runner-producer.d.cts +103 -0
- package/dist/o11y/record/runner-producer.d.mts +103 -0
- package/dist/o11y/record/runner-producer.d.ts +103 -0
- package/dist/o11y/record/runner-producer.js +26 -0
- package/dist/o11y/record/runner-producer.js.map +1 -0
- package/dist/o11y/record/validation.cjs +323 -0
- package/dist/o11y/record/validation.cjs.map +1 -0
- package/dist/o11y/record/validation.d.cts +62 -0
- package/dist/o11y/record/validation.d.mts +62 -0
- package/dist/o11y/record/validation.d.ts +62 -0
- package/dist/o11y/record/validation.js +28 -0
- package/dist/o11y/record/validation.js.map +1 -0
- package/dist/o11y/tool-names.cjs +68 -0
- package/dist/o11y/tool-names.cjs.map +1 -0
- package/dist/o11y/tool-names.d.cts +11 -0
- package/dist/o11y/tool-names.d.mts +11 -0
- package/dist/o11y/tool-names.d.ts +11 -0
- package/dist/o11y/tool-names.js +8 -0
- package/dist/o11y/tool-names.js.map +1 -0
- package/dist/o11y/types.cjs +3 -0
- package/dist/o11y/types.cjs.map +1 -0
- package/dist/o11y/types.d.cts +387 -0
- package/dist/o11y/types.d.mts +387 -0
- package/dist/o11y/types.d.ts +142 -1
- package/dist/o11y/types.js +4 -3
- package/dist/o11y/types.js.map +1 -0
- package/dist/plugin/contracts.cjs +187 -0
- package/dist/plugin/contracts.cjs.map +1 -0
- package/dist/plugin/contracts.d.cts +109 -0
- package/dist/plugin/contracts.d.mts +109 -0
- package/dist/plugin/contracts.d.ts +109 -0
- package/dist/plugin/contracts.js +18 -0
- package/dist/plugin/contracts.js.map +1 -0
- package/dist/plugin/index.cjs +7 -0
- package/dist/plugin/index.cjs.map +1 -0
- package/dist/plugin/index.d.cts +2 -0
- package/dist/plugin/index.d.mts +2 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/index.js +6 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/index.mjs +6 -0
- package/dist/plugin/index.mjs.map +1 -0
- package/dist/plugin/link.cjs +204 -0
- package/dist/plugin/link.cjs.map +1 -0
- package/dist/plugin/link.d.cts +68 -0
- package/dist/plugin/link.d.mts +68 -0
- package/dist/plugin/link.d.ts +68 -0
- package/dist/plugin/link.js +14 -0
- package/dist/plugin/link.js.map +1 -0
- package/dist/plugins/record/attachment.cjs +62 -0
- package/dist/plugins/record/attachment.cjs.map +1 -0
- package/dist/plugins/record/attachment.d.cts +14 -0
- package/dist/plugins/record/attachment.d.mts +14 -0
- package/dist/plugins/record/attachment.d.ts +14 -0
- package/dist/plugins/record/attachment.js +20 -0
- package/dist/plugins/record/attachment.js.map +1 -0
- package/dist/plugins/record/capability.cjs +258 -0
- package/dist/plugins/record/capability.cjs.map +1 -0
- package/dist/plugins/record/capability.d.cts +94 -0
- package/dist/plugins/record/capability.d.mts +94 -0
- package/dist/plugins/record/capability.d.ts +94 -0
- package/dist/plugins/record/capability.js +26 -0
- package/dist/plugins/record/capability.js.map +1 -0
- package/dist/plugins/record/codec.cjs +244 -0
- package/dist/plugins/record/codec.cjs.map +1 -0
- package/dist/plugins/record/codec.d.cts +28 -0
- package/dist/plugins/record/codec.d.mts +28 -0
- package/dist/plugins/record/codec.d.ts +28 -0
- package/dist/plugins/record/codec.js +48 -0
- package/dist/plugins/record/codec.js.map +1 -0
- package/dist/plugins/record/index.cjs +54 -0
- package/dist/plugins/record/index.cjs.map +1 -0
- package/dist/plugins/record/index.d.cts +9 -0
- package/dist/plugins/record/index.d.mts +9 -0
- package/dist/plugins/record/index.d.ts +9 -0
- package/dist/plugins/record/index.js +94 -0
- package/dist/plugins/record/index.js.map +1 -0
- package/dist/plugins/record/migration.cjs +33 -0
- package/dist/plugins/record/migration.cjs.map +1 -0
- package/dist/plugins/record/migration.d.cts +22 -0
- package/dist/plugins/record/migration.d.mts +22 -0
- package/dist/plugins/record/migration.d.ts +22 -0
- package/dist/plugins/record/migration.js +6 -0
- package/dist/plugins/record/migration.js.map +1 -0
- package/dist/plugins/record/model.cjs +3 -0
- package/dist/plugins/record/model.cjs.map +1 -0
- package/dist/plugins/record/model.d.cts +93 -0
- package/dist/plugins/record/model.d.mts +93 -0
- package/dist/plugins/record/model.d.ts +93 -0
- package/dist/plugins/record/model.js +4 -0
- package/dist/plugins/record/model.js.map +1 -0
- package/dist/plugins/record/provenance.cjs +319 -0
- package/dist/plugins/record/provenance.cjs.map +1 -0
- package/dist/plugins/record/provenance.d.cts +79 -0
- package/dist/plugins/record/provenance.d.mts +79 -0
- package/dist/plugins/record/provenance.d.ts +79 -0
- package/dist/plugins/record/provenance.js +24 -0
- package/dist/plugins/record/provenance.js.map +1 -0
- package/dist/projection/attachment-result.cjs +50 -0
- package/dist/projection/attachment-result.cjs.map +1 -0
- package/dist/projection/attachment-result.d.cts +38 -0
- package/dist/projection/attachment-result.d.mts +38 -0
- package/dist/projection/attachment-result.d.ts +38 -0
- package/dist/projection/attachment-result.js +6 -0
- package/dist/projection/attachment-result.js.map +1 -0
- package/dist/projection/attempt-selection.cjs +87 -0
- package/dist/projection/attempt-selection.cjs.map +1 -0
- package/dist/projection/attempt-selection.d.cts +40 -0
- package/dist/projection/attempt-selection.d.mts +40 -0
- package/dist/projection/attempt-selection.d.ts +40 -0
- package/dist/projection/attempt-selection.js +8 -0
- package/dist/projection/attempt-selection.js.map +1 -0
- package/dist/projection/coverage.cjs +106 -0
- package/dist/projection/coverage.cjs.map +1 -0
- package/dist/projection/coverage.d.cts +43 -0
- package/dist/projection/coverage.d.mts +43 -0
- package/dist/projection/coverage.d.ts +43 -0
- package/dist/projection/coverage.js +6 -0
- package/dist/projection/coverage.js.map +1 -0
- package/dist/projection/index.cjs +36 -0
- package/dist/projection/index.cjs.map +1 -0
- package/dist/projection/index.d.cts +25 -0
- package/dist/projection/index.d.mts +25 -0
- package/dist/projection/index.d.ts +25 -0
- package/dist/projection/index.js +46 -0
- package/dist/projection/index.js.map +1 -0
- package/dist/projection/index.mjs +46 -0
- package/dist/projection/index.mjs.map +1 -0
- package/dist/projection/model.cjs +3 -0
- package/dist/projection/model.cjs.map +1 -0
- package/dist/projection/model.d.cts +49 -0
- package/dist/projection/model.d.mts +49 -0
- package/dist/projection/model.d.ts +49 -0
- package/dist/projection/model.js +4 -0
- package/dist/projection/model.js.map +1 -0
- package/dist/projection/projector.cjs +111 -0
- package/dist/projection/projector.cjs.map +1 -0
- package/dist/projection/projector.d.cts +51 -0
- package/dist/projection/projector.d.mts +51 -0
- package/dist/projection/projector.d.ts +51 -0
- package/dist/projection/projector.js +16 -0
- package/dist/projection/projector.js.map +1 -0
- package/dist/projection/runtime.cjs +246 -0
- package/dist/projection/runtime.cjs.map +1 -0
- package/dist/projection/runtime.d.cts +14 -0
- package/dist/projection/runtime.d.mts +14 -0
- package/dist/projection/runtime.d.ts +14 -0
- package/dist/projection/runtime.js +6 -0
- package/dist/projection/runtime.js.map +1 -0
- package/dist/record/attachment/errors.cjs +71 -0
- package/dist/record/attachment/errors.cjs.map +1 -0
- package/dist/record/attachment/errors.d.cts +57 -0
- package/dist/record/attachment/errors.d.mts +57 -0
- package/dist/record/attachment/errors.d.ts +57 -0
- package/dist/record/attachment/errors.js +22 -0
- package/dist/record/attachment/errors.js.map +1 -0
- package/dist/record/attachment/index.cjs +14 -0
- package/dist/record/attachment/index.cjs.map +1 -0
- package/dist/record/attachment/index.d.cts +3 -0
- package/dist/record/attachment/index.d.mts +3 -0
- package/dist/record/attachment/index.d.ts +3 -0
- package/dist/record/attachment/index.js +22 -0
- package/dist/record/attachment/index.js.map +1 -0
- package/dist/record/attachment/internal.cjs +24 -0
- package/dist/record/attachment/internal.cjs.map +1 -0
- package/dist/record/attachment/internal.d.cts +6 -0
- package/dist/record/attachment/internal.d.mts +6 -0
- package/dist/record/attachment/internal.d.ts +6 -0
- package/dist/record/attachment/internal.js +34 -0
- package/dist/record/attachment/internal.js.map +1 -0
- package/dist/record/attachment/runtime.cjs +1017 -0
- package/dist/record/attachment/runtime.cjs.map +1 -0
- package/dist/record/attachment/runtime.d.cts +86 -0
- package/dist/record/attachment/runtime.d.mts +86 -0
- package/dist/record/attachment/runtime.d.ts +86 -0
- package/dist/record/attachment/runtime.js +52 -0
- package/dist/record/attachment/runtime.js.map +1 -0
- package/dist/record/attachment/types.cjs +47 -0
- package/dist/record/attachment/types.cjs.map +1 -0
- package/dist/record/attachment/types.d.cts +194 -0
- package/dist/record/attachment/types.d.mts +194 -0
- package/dist/record/attachment/types.d.ts +194 -0
- package/dist/record/attachment/types.js +28 -0
- package/dist/record/attachment/types.js.map +1 -0
- package/dist/record/codec/core.cjs +134 -0
- package/dist/record/codec/core.cjs.map +1 -0
- package/dist/record/codec/core.d.cts +63 -0
- package/dist/record/codec/core.d.mts +63 -0
- package/dist/record/codec/core.d.ts +63 -0
- package/dist/record/codec/core.js +46 -0
- package/dist/record/codec/core.js.map +1 -0
- package/dist/record/codec/identifiers.cjs +31 -0
- package/dist/record/codec/identifiers.cjs.map +1 -0
- package/dist/record/codec/identifiers.d.cts +11 -0
- package/dist/record/codec/identifiers.d.mts +11 -0
- package/dist/record/codec/identifiers.d.ts +11 -0
- package/dist/record/codec/identifiers.js +22 -0
- package/dist/record/codec/identifiers.js.map +1 -0
- package/dist/record/codec/index.cjs +19 -0
- package/dist/record/codec/index.cjs.map +1 -0
- package/dist/record/codec/index.d.cts +2 -0
- package/dist/record/codec/index.d.mts +2 -0
- package/dist/record/codec/index.d.ts +2 -0
- package/dist/record/codec/index.js +64 -0
- package/dist/record/codec/index.js.map +1 -0
- package/dist/record/errors/index.cjs +18 -0
- package/dist/record/errors/index.cjs.map +1 -0
- package/dist/record/errors/index.d.cts +1 -0
- package/dist/record/errors/index.d.mts +1 -0
- package/dist/record/errors/index.d.ts +1 -0
- package/dist/record/errors/index.js +28 -0
- package/dist/record/errors/index.js.map +1 -0
- package/dist/record/errors/record-errors.cjs +58 -0
- package/dist/record/errors/record-errors.cjs.map +1 -0
- package/dist/record/errors/record-errors.d.cts +64 -0
- package/dist/record/errors/record-errors.d.mts +64 -0
- package/dist/record/errors/record-errors.d.ts +64 -0
- package/dist/record/errors/record-errors.js +28 -0
- package/dist/record/errors/record-errors.js.map +1 -0
- package/dist/record/fact-record.cjs +199 -0
- package/dist/record/fact-record.cjs.map +1 -0
- package/dist/record/fact-record.d.cts +22 -0
- package/dist/record/fact-record.d.mts +22 -0
- package/dist/record/fact-record.d.ts +22 -0
- package/dist/record/fact-record.js +18 -0
- package/dist/record/fact-record.js.map +1 -0
- package/dist/record/index.cjs +55 -0
- package/dist/record/index.cjs.map +1 -0
- package/dist/record/index.d.cts +11 -0
- package/dist/record/index.d.mts +11 -0
- package/dist/record/index.d.ts +11 -0
- package/dist/record/index.js +314 -0
- package/dist/record/index.js.map +1 -0
- package/dist/record/locator.cjs +146 -0
- package/dist/record/locator.cjs.map +1 -0
- package/dist/record/locator.d.cts +71 -0
- package/dist/record/locator.d.mts +71 -0
- package/dist/record/locator.js +20 -136
- package/dist/record/locator.js.map +1 -0
- package/dist/record/maintenance/index.cjs +19 -0
- package/dist/record/maintenance/index.cjs.map +1 -0
- package/dist/record/maintenance/index.d.cts +2 -0
- package/dist/record/maintenance/index.d.mts +2 -0
- package/dist/record/maintenance/index.d.ts +2 -0
- package/dist/record/maintenance/index.js +14 -0
- package/dist/record/maintenance/index.js.map +1 -0
- package/dist/record/maintenance/runtime.cjs +98 -0
- package/dist/record/maintenance/runtime.cjs.map +1 -0
- package/dist/record/maintenance/runtime.d.cts +24 -0
- package/dist/record/maintenance/runtime.d.mts +24 -0
- package/dist/record/maintenance/runtime.d.ts +24 -0
- package/dist/record/maintenance/runtime.js +12 -0
- package/dist/record/maintenance/runtime.js.map +1 -0
- package/dist/record/maintenance/types.cjs +9 -0
- package/dist/record/maintenance/types.cjs.map +1 -0
- package/dist/record/maintenance/types.d.cts +34 -0
- package/dist/record/maintenance/types.d.mts +34 -0
- package/dist/record/maintenance/types.d.ts +34 -0
- package/dist/record/maintenance/types.js +6 -0
- package/dist/record/maintenance/types.js.map +1 -0
- package/dist/record/manifest.cjs +44 -0
- package/dist/record/manifest.cjs.map +1 -0
- package/dist/record/manifest.d.cts +39 -0
- package/dist/record/manifest.d.mts +39 -0
- package/dist/record/manifest.d.ts +5 -3
- package/dist/record/manifest.js +14 -0
- package/dist/record/manifest.js.map +1 -0
- package/dist/record/migration/errors.cjs +68 -0
- package/dist/record/migration/errors.cjs.map +1 -0
- package/dist/record/migration/errors.d.cts +73 -0
- package/dist/record/migration/errors.d.mts +73 -0
- package/dist/record/migration/errors.d.ts +73 -0
- package/dist/record/migration/errors.js +22 -0
- package/dist/record/migration/errors.js.map +1 -0
- package/dist/record/migration/identity.cjs +27 -0
- package/dist/record/migration/identity.cjs.map +1 -0
- package/dist/record/migration/identity.d.cts +5 -0
- package/dist/record/migration/identity.d.mts +5 -0
- package/dist/record/migration/identity.d.ts +5 -0
- package/dist/record/migration/identity.js +8 -0
- package/dist/record/migration/identity.js.map +1 -0
- package/dist/record/migration/index.cjs +28 -0
- package/dist/record/migration/index.cjs.map +1 -0
- package/dist/record/migration/index.d.cts +8 -0
- package/dist/record/migration/index.d.mts +8 -0
- package/dist/record/migration/index.d.ts +8 -0
- package/dist/record/migration/index.js +48 -0
- package/dist/record/migration/index.js.map +1 -0
- package/dist/record/migration/internal.cjs +3 -0
- package/dist/record/migration/internal.cjs.map +1 -0
- package/dist/record/migration/internal.d.cts +111 -0
- package/dist/record/migration/internal.d.mts +111 -0
- package/dist/record/migration/internal.d.ts +111 -0
- package/dist/record/migration/internal.js +4 -0
- package/dist/record/migration/internal.js.map +1 -0
- package/dist/record/migration/orchestrate.cjs +368 -0
- package/dist/record/migration/orchestrate.cjs.map +1 -0
- package/dist/record/migration/orchestrate.d.cts +113 -0
- package/dist/record/migration/orchestrate.d.mts +113 -0
- package/dist/record/migration/orchestrate.d.ts +113 -0
- package/dist/record/migration/orchestrate.js +16 -0
- package/dist/record/migration/orchestrate.js.map +1 -0
- package/dist/record/migration/plan.cjs +63 -0
- package/dist/record/migration/plan.cjs.map +1 -0
- package/dist/record/migration/plan.d.cts +32 -0
- package/dist/record/migration/plan.d.mts +32 -0
- package/dist/record/migration/plan.d.ts +32 -0
- package/dist/record/migration/plan.js +10 -0
- package/dist/record/migration/plan.js.map +1 -0
- package/dist/record/migration/registry.cjs +150 -0
- package/dist/record/migration/registry.cjs.map +1 -0
- package/dist/record/migration/registry.d.cts +61 -0
- package/dist/record/migration/registry.d.mts +61 -0
- package/dist/record/migration/registry.d.ts +61 -0
- package/dist/record/migration/registry.js +14 -0
- package/dist/record/migration/registry.js.map +1 -0
- package/dist/record/migration/storage.cjs +382 -0
- package/dist/record/migration/storage.cjs.map +1 -0
- package/dist/record/migration/storage.d.cts +18 -0
- package/dist/record/migration/storage.d.mts +18 -0
- package/dist/record/migration/storage.d.ts +18 -0
- package/dist/record/migration/storage.js +6 -0
- package/dist/record/migration/storage.js.map +1 -0
- package/dist/record/migration/types.cjs +3 -0
- package/dist/record/migration/types.cjs.map +1 -0
- package/dist/record/migration/types.d.cts +16 -0
- package/dist/record/migration/types.d.mts +16 -0
- package/dist/record/migration/types.d.ts +16 -0
- package/dist/record/migration/types.js +4 -0
- package/dist/record/migration/types.js.map +1 -0
- package/dist/record/model/core.cjs +11 -0
- package/dist/record/model/core.cjs.map +1 -0
- package/dist/record/model/core.d.cts +53 -0
- package/dist/record/model/core.d.mts +53 -0
- package/dist/record/model/core.d.ts +53 -0
- package/dist/record/model/core.js +6 -0
- package/dist/record/model/core.js.map +1 -0
- package/dist/record/model/identifiers.cjs +78 -0
- package/dist/record/model/identifiers.cjs.map +1 -0
- package/dist/record/model/identifiers.d.cts +44 -0
- package/dist/record/model/identifiers.d.mts +44 -0
- package/dist/record/model/identifiers.d.ts +44 -0
- package/dist/record/model/identifiers.js +40 -0
- package/dist/record/model/identifiers.js.map +1 -0
- package/dist/record/model/index.cjs +21 -0
- package/dist/record/model/index.cjs.map +1 -0
- package/dist/record/model/index.d.cts +4 -0
- package/dist/record/model/index.d.mts +4 -0
- package/dist/record/model/index.d.ts +4 -0
- package/dist/record/model/index.js +52 -0
- package/dist/record/model/index.js.map +1 -0
- package/dist/record/model/read-state.cjs +3 -0
- package/dist/record/model/read-state.cjs.map +1 -0
- package/dist/record/model/read-state.d.cts +45 -0
- package/dist/record/model/read-state.d.mts +45 -0
- package/dist/record/model/read-state.d.ts +45 -0
- package/dist/record/model/read-state.js +4 -0
- package/dist/record/model/read-state.js.map +1 -0
- package/dist/record/model/validation.cjs +143 -0
- package/dist/record/model/validation.cjs.map +1 -0
- package/dist/record/model/validation.d.cts +16 -0
- package/dist/record/model/validation.d.mts +16 -0
- package/dist/record/model/validation.d.ts +16 -0
- package/dist/record/model/validation.js +14 -0
- package/dist/record/model/validation.js.map +1 -0
- package/dist/record/platform/errors.cjs +101 -0
- package/dist/record/platform/errors.cjs.map +1 -0
- package/dist/record/platform/errors.d.cts +123 -0
- package/dist/record/platform/errors.d.mts +123 -0
- package/dist/record/platform/errors.d.ts +123 -0
- package/dist/record/platform/errors.js +32 -0
- package/dist/record/platform/errors.js.map +1 -0
- package/dist/record/platform/index.cjs +21 -0
- package/dist/record/platform/index.cjs.map +1 -0
- package/dist/record/platform/index.d.cts +4 -0
- package/dist/record/platform/index.d.mts +4 -0
- package/dist/record/platform/index.d.ts +4 -0
- package/dist/record/platform/index.js +60 -0
- package/dist/record/platform/index.js.map +1 -0
- package/dist/record/platform/node.cjs +715 -0
- package/dist/record/platform/node.cjs.map +1 -0
- package/dist/record/platform/node.d.cts +12 -0
- package/dist/record/platform/node.d.mts +12 -0
- package/dist/record/platform/node.d.ts +12 -0
- package/dist/record/platform/node.js +16 -0
- package/dist/record/platform/node.js.map +1 -0
- package/dist/record/platform/root.cjs +79 -0
- package/dist/record/platform/root.cjs.map +1 -0
- package/dist/record/platform/root.d.cts +35 -0
- package/dist/record/platform/root.d.mts +35 -0
- package/dist/record/platform/root.d.ts +35 -0
- package/dist/record/platform/root.js +8 -0
- package/dist/record/platform/root.js.map +1 -0
- package/dist/record/platform/services.cjs +24 -0
- package/dist/record/platform/services.cjs.map +1 -0
- package/dist/record/platform/services.d.cts +139 -0
- package/dist/record/platform/services.d.mts +139 -0
- package/dist/record/platform/services.d.ts +139 -0
- package/dist/record/platform/services.js +16 -0
- package/dist/record/platform/services.js.map +1 -0
- package/dist/record/reader/errors.cjs +46 -0
- package/dist/record/reader/errors.cjs.map +1 -0
- package/dist/record/reader/errors.d.cts +58 -0
- package/dist/record/reader/errors.d.mts +58 -0
- package/dist/record/reader/errors.d.ts +58 -0
- package/dist/record/reader/errors.js +16 -0
- package/dist/record/reader/errors.js.map +1 -0
- package/dist/record/reader/format.cjs +95 -0
- package/dist/record/reader/format.cjs.map +1 -0
- package/dist/record/reader/format.d.cts +17 -0
- package/dist/record/reader/format.d.mts +17 -0
- package/dist/record/reader/format.d.ts +17 -0
- package/dist/record/reader/format.js +8 -0
- package/dist/record/reader/format.js.map +1 -0
- package/dist/record/reader/identity.cjs +47 -0
- package/dist/record/reader/identity.cjs.map +1 -0
- package/dist/record/reader/identity.d.cts +31 -0
- package/dist/record/reader/identity.d.mts +31 -0
- package/dist/record/reader/identity.d.ts +31 -0
- package/dist/record/reader/identity.js +8 -0
- package/dist/record/reader/identity.js.map +1 -0
- package/dist/record/reader/index.cjs +21 -0
- package/dist/record/reader/index.cjs.map +1 -0
- package/dist/record/reader/index.d.cts +4 -0
- package/dist/record/reader/index.d.mts +4 -0
- package/dist/record/reader/index.d.ts +4 -0
- package/dist/record/reader/index.js +42 -0
- package/dist/record/reader/index.js.map +1 -0
- package/dist/record/reader/internal.cjs +17 -0
- package/dist/record/reader/internal.cjs.map +1 -0
- package/dist/record/reader/internal.d.cts +26 -0
- package/dist/record/reader/internal.d.mts +26 -0
- package/dist/record/reader/internal.d.ts +26 -0
- package/dist/record/reader/internal.js +8 -0
- package/dist/record/reader/internal.js.map +1 -0
- package/dist/record/reader/runtime.cjs +728 -0
- package/dist/record/reader/runtime.cjs.map +1 -0
- package/dist/record/reader/runtime.d.cts +22 -0
- package/dist/record/reader/runtime.d.mts +22 -0
- package/dist/record/reader/runtime.d.ts +22 -0
- package/dist/record/reader/runtime.js +20 -0
- package/dist/record/reader/runtime.js.map +1 -0
- package/dist/record/reader/types.cjs +12 -0
- package/dist/record/reader/types.cjs.map +1 -0
- package/dist/record/reader/types.d.cts +50 -0
- package/dist/record/reader/types.d.mts +50 -0
- package/dist/record/reader/types.d.ts +50 -0
- package/dist/record/reader/types.js +10 -0
- package/dist/record/reader/types.js.map +1 -0
- package/dist/record/source-hash.cjs +30 -0
- package/dist/record/source-hash.cjs.map +1 -0
- package/dist/record/source-hash.d.cts +9 -0
- package/dist/record/source-hash.d.mts +9 -0
- package/dist/record/source-hash.js +8 -25
- package/dist/record/source-hash.js.map +1 -0
- package/dist/record/writer/attachment-payload.cjs +81 -0
- package/dist/record/writer/attachment-payload.cjs.map +1 -0
- package/dist/record/writer/attachment-payload.d.cts +19 -0
- package/dist/record/writer/attachment-payload.d.mts +19 -0
- package/dist/record/writer/attachment-payload.d.ts +19 -0
- package/dist/record/writer/attachment-payload.js +10 -0
- package/dist/record/writer/attachment-payload.js.map +1 -0
- package/dist/record/writer/errors.cjs +35 -0
- package/dist/record/writer/errors.cjs.map +1 -0
- package/dist/record/writer/errors.d.cts +35 -0
- package/dist/record/writer/errors.d.mts +35 -0
- package/dist/record/writer/errors.d.ts +35 -0
- package/dist/record/writer/errors.js +14 -0
- package/dist/record/writer/errors.js.map +1 -0
- package/dist/record/writer/index.cjs +20 -0
- package/dist/record/writer/index.cjs.map +1 -0
- package/dist/record/writer/index.d.cts +3 -0
- package/dist/record/writer/index.d.mts +3 -0
- package/dist/record/writer/index.d.ts +3 -0
- package/dist/record/writer/index.js +22 -0
- package/dist/record/writer/index.js.map +1 -0
- package/dist/record/writer/limits.cjs +16 -0
- package/dist/record/writer/limits.cjs.map +1 -0
- package/dist/record/writer/limits.d.cts +4 -0
- package/dist/record/writer/limits.d.mts +4 -0
- package/dist/record/writer/limits.d.ts +4 -0
- package/dist/record/writer/limits.js +8 -0
- package/dist/record/writer/limits.js.map +1 -0
- package/dist/record/writer/runtime.cjs +656 -0
- package/dist/record/writer/runtime.cjs.map +1 -0
- package/dist/record/writer/runtime.d.cts +7 -0
- package/dist/record/writer/runtime.d.mts +7 -0
- package/dist/record/writer/runtime.d.ts +7 -0
- package/dist/record/writer/runtime.js +6 -0
- package/dist/record/writer/runtime.js.map +1 -0
- package/dist/record/writer/types.cjs +7 -0
- package/dist/record/writer/types.cjs.map +1 -0
- package/dist/record/writer/types.d.cts +56 -0
- package/dist/record/writer/types.d.mts +56 -0
- package/dist/record/writer/types.d.ts +56 -0
- package/dist/record/writer/types.js +10 -0
- package/dist/record/writer/types.js.map +1 -0
- package/dist/report/author/identity.cjs +268 -0
- package/dist/report/author/identity.cjs.map +1 -0
- package/dist/report/author/identity.d.cts +75 -0
- package/dist/report/author/identity.d.mts +75 -0
- package/dist/report/author/identity.d.ts +75 -0
- package/dist/report/author/identity.js +34 -0
- package/dist/report/author/identity.js.map +1 -0
- package/dist/report/author/index.cjs +19 -0
- package/dist/report/author/index.cjs.map +1 -0
- package/dist/report/author/index.d.cts +4 -0
- package/dist/report/author/index.d.mts +4 -0
- package/dist/report/author/index.d.ts +4 -0
- package/dist/report/author/index.js +30 -0
- package/dist/report/author/index.js.map +1 -0
- package/dist/report/author/internal.cjs +98 -0
- package/dist/report/author/internal.cjs.map +1 -0
- package/dist/report/author/internal.d.cts +91 -0
- package/dist/report/author/internal.d.mts +91 -0
- package/dist/report/author/internal.d.ts +91 -0
- package/dist/report/author/internal.js +18 -0
- package/dist/report/author/internal.js.map +1 -0
- package/dist/report/author/model.cjs +467 -0
- package/dist/report/author/model.cjs.map +1 -0
- package/dist/report/author/model.d.cts +241 -0
- package/dist/report/author/model.d.mts +241 -0
- package/dist/report/author/model.d.ts +241 -0
- package/dist/report/author/model.js +32 -0
- package/dist/report/author/model.js.map +1 -0
- package/dist/report/built-in/attempt-overview.cjs +395 -0
- package/dist/report/built-in/attempt-overview.cjs.map +1 -0
- package/dist/report/built-in/attempt-overview.d.cts +10 -0
- package/dist/report/built-in/attempt-overview.d.mts +10 -0
- package/dist/report/built-in/attempt-overview.d.ts +10 -0
- package/dist/report/built-in/attempt-overview.js +9 -0
- package/dist/report/built-in/attempt-overview.js.map +1 -0
- package/dist/report/built-in/execution.cjs +766 -0
- package/dist/report/built-in/execution.cjs.map +1 -0
- package/dist/report/built-in/execution.d.cts +25 -0
- package/dist/report/built-in/execution.d.mts +25 -0
- package/dist/report/built-in/execution.d.ts +25 -0
- package/dist/report/built-in/execution.js +12 -0
- package/dist/report/built-in/execution.js.map +1 -0
- package/dist/report/built-in/index.cjs +31 -0
- package/dist/report/built-in/index.cjs.map +1 -0
- package/dist/report/built-in/index.d.cts +6 -0
- package/dist/report/built-in/index.d.mts +6 -0
- package/dist/report/built-in/index.d.ts +6 -8
- package/dist/report/built-in/index.js +35 -13
- package/dist/report/built-in/index.js.map +1 -0
- package/dist/report/built-in/index.mjs +35 -0
- package/dist/report/built-in/index.mjs.map +1 -0
- package/dist/report/built-in/overview.cjs +206 -0
- package/dist/report/built-in/overview.cjs.map +1 -0
- package/dist/report/built-in/overview.d.cts +6 -0
- package/dist/report/built-in/overview.d.mts +6 -0
- package/dist/report/built-in/overview.d.ts +6 -0
- package/dist/report/built-in/overview.js +11 -0
- package/dist/report/built-in/overview.js.map +1 -0
- package/dist/report/built-in/run-membership-overview.cjs +194 -0
- package/dist/report/built-in/run-membership-overview.cjs.map +1 -0
- package/dist/report/built-in/run-membership-overview.d.cts +6 -0
- package/dist/report/built-in/run-membership-overview.d.mts +6 -0
- package/dist/report/built-in/run-membership-overview.d.ts +6 -0
- package/dist/report/built-in/run-membership-overview.js +9 -0
- package/dist/report/built-in/run-membership-overview.js.map +1 -0
- package/dist/report/built-in/sandbox-history.cjs +384 -0
- package/dist/report/built-in/sandbox-history.cjs.map +1 -0
- package/dist/report/built-in/sandbox-history.d.cts +9 -0
- package/dist/report/built-in/sandbox-history.d.mts +9 -0
- package/dist/report/built-in/sandbox-history.d.ts +9 -0
- package/dist/report/built-in/sandbox-history.js +9 -0
- package/dist/report/built-in/sandbox-history.js.map +1 -0
- package/dist/report/built-in/source.cjs +162 -0
- package/dist/report/built-in/source.cjs.map +1 -0
- package/dist/report/built-in/source.d.cts +11 -0
- package/dist/report/built-in/source.d.mts +11 -0
- package/dist/report/built-in/source.d.ts +11 -0
- package/dist/report/built-in/source.js +8 -0
- package/dist/report/built-in/source.js.map +1 -0
- package/dist/report/execution/index.cjs +20 -0
- package/dist/report/execution/index.cjs.map +1 -0
- package/dist/report/execution/index.d.cts +3 -0
- package/dist/report/execution/index.d.mts +3 -0
- package/dist/report/execution/index.d.ts +3 -0
- package/dist/report/execution/index.js +30 -0
- package/dist/report/execution/index.js.map +1 -0
- package/dist/report/execution/model.cjs +483 -0
- package/dist/report/execution/model.cjs.map +1 -0
- package/dist/report/execution/model.d.cts +50 -0
- package/dist/report/execution/model.d.mts +50 -0
- package/dist/report/execution/model.d.ts +50 -0
- package/dist/report/execution/model.js +16 -0
- package/dist/report/execution/model.js.map +1 -0
- package/dist/report/execution/problems.cjs +210 -0
- package/dist/report/execution/problems.cjs.map +1 -0
- package/dist/report/execution/problems.d.cts +54 -0
- package/dist/report/execution/problems.d.mts +54 -0
- package/dist/report/execution/problems.d.ts +54 -0
- package/dist/report/execution/problems.js +14 -0
- package/dist/report/execution/problems.js.map +1 -0
- package/dist/report/execution/results.cjs +26 -0
- package/dist/report/execution/results.cjs.map +1 -0
- package/dist/report/execution/results.d.cts +102 -0
- package/dist/report/execution/results.d.mts +102 -0
- package/dist/report/execution/results.d.ts +102 -0
- package/dist/report/execution/results.js +8 -0
- package/dist/report/execution/results.js.map +1 -0
- package/dist/report/host/execute.cjs +1287 -0
- package/dist/report/host/execute.cjs.map +1 -0
- package/dist/report/host/execute.d.cts +23 -0
- package/dist/report/host/execute.d.mts +23 -0
- package/dist/report/host/execute.d.ts +23 -0
- package/dist/report/host/execute.js +6 -0
- package/dist/report/host/execute.js.map +1 -0
- package/dist/report/host/from-record.cjs +47 -0
- package/dist/report/host/from-record.cjs.map +1 -0
- package/dist/report/host/from-record.d.cts +36 -0
- package/dist/report/host/from-record.d.mts +36 -0
- package/dist/report/host/from-record.d.ts +36 -0
- package/dist/report/host/from-record.js +8 -0
- package/dist/report/host/from-record.js.map +1 -0
- package/dist/report/host/html.cjs +424 -0
- package/dist/report/host/html.cjs.map +1 -0
- package/dist/report/host/html.d.cts +28 -0
- package/dist/report/host/html.d.mts +28 -0
- package/dist/report/host/html.d.ts +28 -0
- package/dist/report/host/html.js +6 -0
- package/dist/report/host/html.js.map +1 -0
- package/dist/report/host/index.cjs +21 -0
- package/dist/report/host/index.cjs.map +1 -0
- package/dist/report/host/index.d.cts +11 -0
- package/dist/report/host/index.d.mts +11 -0
- package/dist/report/host/index.d.ts +11 -0
- package/dist/report/host/index.js +24 -0
- package/dist/report/host/index.js.map +1 -0
- package/dist/report/host/node/loader.cjs +210 -0
- package/dist/report/host/node/loader.cjs.map +1 -0
- package/dist/report/host/node/loader.d.cts +45 -0
- package/dist/report/host/node/loader.d.mts +45 -0
- package/dist/report/host/node/loader.d.ts +45 -0
- package/dist/report/host/node/loader.js +14 -0
- package/dist/report/host/node/loader.js.map +1 -0
- package/dist/report/host/node/theme.cjs +21 -0
- package/dist/report/host/node/theme.cjs.map +1 -0
- package/dist/report/host/node/theme.d.cts +1 -0
- package/dist/report/host/node/theme.d.mts +1 -0
- package/dist/report/host/node/theme.d.ts +1 -0
- package/dist/report/host/node/theme.js +14 -0
- package/dist/report/host/node/theme.js.map +1 -0
- package/dist/report/host/node.cjs +147 -0
- package/dist/report/host/node.cjs.map +1 -0
- package/dist/report/host/node.d.cts +36 -0
- package/dist/report/host/node.d.mts +36 -0
- package/dist/report/host/node.d.ts +36 -0
- package/dist/report/host/node.js +36 -0
- package/dist/report/host/node.js.map +1 -0
- package/dist/report/host/presentation.cjs +423 -0
- package/dist/report/host/presentation.cjs.map +1 -0
- package/dist/report/host/presentation.d.cts +42 -0
- package/dist/report/host/presentation.d.mts +42 -0
- package/dist/report/host/presentation.d.ts +42 -0
- package/dist/report/host/presentation.js +16 -0
- package/dist/report/host/presentation.js.map +1 -0
- package/dist/report/host/static.cjs +126 -0
- package/dist/report/host/static.cjs.map +1 -0
- package/dist/report/host/static.d.cts +55 -0
- package/dist/report/host/static.d.mts +55 -0
- package/dist/report/host/static.d.ts +55 -0
- package/dist/report/host/static.js +8 -0
- package/dist/report/host/static.js.map +1 -0
- package/dist/report/host/theme.cjs +223 -0
- package/dist/report/host/theme.cjs.map +1 -0
- package/dist/report/host/theme.d.cts +64 -0
- package/dist/report/host/theme.d.mts +64 -0
- package/dist/report/host/theme.d.ts +64 -0
- package/dist/report/host/theme.js +14 -0
- package/dist/report/host/theme.js.map +1 -0
- package/dist/report/host/view-session.cjs +82 -0
- package/dist/report/host/view-session.cjs.map +1 -0
- package/dist/report/host/view-session.d.cts +82 -0
- package/dist/report/host/view-session.d.mts +82 -0
- package/dist/report/host/view-session.d.ts +82 -0
- package/dist/report/host/view-session.js +6 -0
- package/dist/report/host/view-session.js.map +1 -0
- package/dist/report/index.cjs +58 -0
- package/dist/report/index.cjs.map +1 -0
- package/dist/report/index.d.cts +11 -0
- package/dist/report/index.d.mts +11 -0
- package/dist/report/index.d.ts +11 -43
- package/dist/report/index.js +120 -44
- package/dist/report/index.js.map +1 -0
- package/dist/report/index.mjs +120 -0
- package/dist/report/index.mjs.map +1 -0
- package/dist/report/model/panel.cjs +271 -0
- package/dist/report/model/panel.cjs.map +1 -0
- package/dist/report/model/panel.d.cts +109 -0
- package/dist/report/model/panel.d.mts +109 -0
- package/dist/report/model/panel.d.ts +2 -2
- package/dist/report/model/panel.js +22 -260
- package/dist/report/model/panel.js.map +1 -0
- package/dist/report/model/text-layout.cjs +185 -0
- package/dist/report/model/text-layout.cjs.map +1 -0
- package/dist/report/model/text-layout.d.cts +75 -0
- package/dist/report/model/text-layout.d.mts +75 -0
- package/dist/report/model/text-layout.js +22 -173
- package/dist/report/model/text-layout.js.map +1 -0
- package/dist/report/semantic/document.cjs +593 -0
- package/dist/report/semantic/document.cjs.map +1 -0
- package/dist/report/semantic/document.d.cts +162 -0
- package/dist/report/semantic/document.d.mts +162 -0
- package/dist/report/semantic/document.d.ts +162 -0
- package/dist/report/semantic/document.js +38 -0
- package/dist/report/semantic/document.js.map +1 -0
- package/dist/report/semantic/index.cjs +18 -0
- package/dist/report/semantic/index.cjs.map +1 -0
- package/dist/report/semantic/index.d.cts +1 -0
- package/dist/report/semantic/index.d.mts +1 -0
- package/dist/report/semantic/index.d.ts +1 -0
- package/dist/report/semantic/index.js +38 -0
- package/dist/report/semantic/index.js.map +1 -0
- package/dist/runner/accept-prompt.cjs +50 -0
- package/dist/runner/accept-prompt.cjs.map +1 -0
- package/dist/runner/accept-prompt.d.cts +27 -0
- package/dist/runner/accept-prompt.d.mts +27 -0
- package/dist/runner/accept-prompt.d.ts +27 -0
- package/dist/runner/accept-prompt.js +10 -0
- package/dist/runner/accept-prompt.js.map +1 -0
- package/dist/runner/accept.cjs +280 -0
- package/dist/runner/accept.cjs.map +1 -0
- package/dist/runner/accept.d.cts +75 -0
- package/dist/runner/accept.d.mts +75 -0
- package/dist/runner/accept.d.ts +75 -0
- package/dist/runner/accept.js +16 -0
- package/dist/runner/accept.js.map +1 -0
- package/dist/runner/adoption.cjs +859 -0
- package/dist/runner/adoption.cjs.map +1 -0
- package/dist/runner/adoption.d.cts +214 -0
- package/dist/runner/adoption.d.mts +214 -0
- package/dist/runner/adoption.d.ts +214 -0
- package/dist/runner/adoption.js +50 -0
- package/dist/runner/adoption.js.map +1 -0
- package/dist/runner/assert-first-bridge.cjs +203 -0
- package/dist/runner/assert-first-bridge.cjs.map +1 -0
- package/dist/runner/assert-first-bridge.d.cts +51 -0
- package/dist/runner/assert-first-bridge.d.mts +51 -0
- package/dist/runner/assert-first-bridge.d.ts +51 -0
- package/dist/runner/assert-first-bridge.js +6 -0
- package/dist/runner/assert-first-bridge.js.map +1 -0
- package/dist/runner/assertions.cjs +77 -0
- package/dist/runner/assertions.cjs.map +1 -0
- package/dist/runner/assertions.d.cts +8 -0
- package/dist/runner/assertions.d.mts +8 -0
- package/dist/runner/assertions.d.ts +8 -0
- package/dist/runner/assertions.js +6 -0
- package/dist/runner/assertions.js.map +1 -0
- package/dist/runner/attempt.cjs +2057 -0
- package/dist/runner/attempt.cjs.map +1 -0
- package/dist/runner/attempt.d.cts +90 -0
- package/dist/runner/attempt.d.mts +90 -0
- package/dist/runner/attempt.d.ts +90 -0
- package/dist/runner/attempt.js +14 -0
- package/dist/runner/attempt.js.map +1 -0
- package/dist/runner/build-preparation.cjs +87 -0
- package/dist/runner/build-preparation.cjs.map +1 -0
- package/dist/runner/build-preparation.d.cts +23 -0
- package/dist/runner/build-preparation.d.mts +23 -0
- package/dist/runner/build-preparation.d.ts +23 -0
- package/dist/runner/build-preparation.js +8 -0
- package/dist/runner/build-preparation.js.map +1 -0
- package/dist/runner/cleanup-timeout.cjs +40 -0
- package/dist/runner/cleanup-timeout.cjs.map +1 -0
- package/dist/runner/cleanup-timeout.d.cts +21 -0
- package/dist/runner/cleanup-timeout.d.mts +21 -0
- package/dist/runner/cleanup-timeout.d.ts +19 -1
- package/dist/runner/cleanup-timeout.js +12 -0
- package/dist/runner/cleanup-timeout.js.map +1 -0
- package/dist/runner/command-plan.cjs +475 -0
- package/dist/runner/command-plan.cjs.map +1 -0
- package/dist/runner/command-plan.d.cts +106 -0
- package/dist/runner/command-plan.d.mts +106 -0
- package/dist/runner/command-plan.d.ts +106 -0
- package/dist/runner/command-plan.js +6 -0
- package/dist/runner/command-plan.js.map +1 -0
- package/dist/runner/config-identity.cjs +259 -0
- package/dist/runner/config-identity.cjs.map +1 -0
- package/dist/runner/config-identity.d.cts +88 -0
- package/dist/runner/config-identity.d.mts +88 -0
- package/dist/runner/config-identity.d.ts +7 -5
- package/dist/runner/config-identity.js +22 -0
- package/dist/runner/config-identity.js.map +1 -0
- package/dist/runner/direct-agent-sandbox.cjs +64 -0
- package/dist/runner/direct-agent-sandbox.cjs.map +1 -0
- package/dist/runner/direct-agent-sandbox.d.cts +5 -0
- package/dist/runner/direct-agent-sandbox.d.mts +5 -0
- package/dist/runner/direct-agent-sandbox.d.ts +5 -0
- package/dist/runner/direct-agent-sandbox.js +8 -0
- package/dist/runner/direct-agent-sandbox.js.map +1 -0
- package/dist/runner/discover.cjs +628 -0
- package/dist/runner/discover.cjs.map +1 -0
- package/dist/runner/discover.d.cts +29 -0
- package/dist/runner/discover.d.mts +29 -0
- package/dist/runner/discover.d.ts +29 -0
- package/dist/runner/discover.js +12 -0
- package/dist/runner/discover.js.map +1 -0
- package/dist/runner/eval-selection.cjs +95 -0
- package/dist/runner/eval-selection.cjs.map +1 -0
- package/dist/runner/eval-selection.d.cts +37 -0
- package/dist/runner/eval-selection.d.mts +37 -0
- package/dist/runner/eval-selection.d.ts +2 -7
- package/dist/runner/eval-selection.js +12 -0
- package/dist/runner/eval-selection.js.map +1 -0
- package/dist/runner/eval-source.cjs +64 -0
- package/dist/runner/eval-source.cjs.map +1 -0
- package/dist/runner/eval-source.d.cts +28 -0
- package/dist/runner/eval-source.d.mts +28 -0
- package/dist/runner/eval-source.d.ts +1 -1
- package/dist/runner/eval-source.js +26 -0
- package/dist/runner/eval-source.js.map +1 -0
- package/dist/runner/experiment-cleanup-registry.cjs +70 -0
- package/dist/runner/experiment-cleanup-registry.cjs.map +1 -0
- package/dist/runner/experiment-cleanup-registry.d.cts +19 -0
- package/dist/runner/experiment-cleanup-registry.d.mts +19 -0
- package/dist/runner/experiment-cleanup-registry.d.ts +19 -0
- package/dist/runner/experiment-cleanup-registry.js +14 -0
- package/dist/runner/experiment-cleanup-registry.js.map +1 -0
- package/dist/runner/feedback/coordinator.cjs +404 -0
- package/dist/runner/feedback/coordinator.cjs.map +1 -0
- package/dist/runner/feedback/coordinator.d.cts +61 -0
- package/dist/runner/feedback/coordinator.d.mts +61 -0
- package/dist/runner/feedback/coordinator.d.ts +61 -0
- package/dist/runner/feedback/coordinator.js +6 -0
- package/dist/runner/feedback/coordinator.js.map +1 -0
- package/dist/runner/feedback/eval-conclusions.cjs +75 -0
- package/dist/runner/feedback/eval-conclusions.cjs.map +1 -0
- package/dist/runner/feedback/eval-conclusions.d.cts +30 -0
- package/dist/runner/feedback/eval-conclusions.d.mts +30 -0
- package/dist/runner/feedback/eval-conclusions.d.ts +30 -0
- package/dist/runner/feedback/eval-conclusions.js +8 -0
- package/dist/runner/feedback/eval-conclusions.js.map +1 -0
- package/dist/runner/feedback/failure.cjs +194 -0
- package/dist/runner/feedback/failure.cjs.map +1 -0
- package/dist/runner/feedback/failure.d.cts +13 -0
- package/dist/runner/feedback/failure.d.mts +13 -0
- package/dist/runner/feedback/failure.d.ts +13 -0
- package/dist/runner/feedback/failure.js +8 -0
- package/dist/runner/feedback/failure.js.map +1 -0
- package/dist/runner/feedback/human.cjs +1469 -0
- package/dist/runner/feedback/human.cjs.map +1 -0
- package/dist/runner/feedback/human.d.cts +139 -0
- package/dist/runner/feedback/human.d.mts +139 -0
- package/dist/runner/feedback/human.d.ts +139 -0
- package/dist/runner/feedback/human.js +18 -0
- package/dist/runner/feedback/human.js.map +1 -0
- package/dist/runner/feedback/index.cjs +51 -0
- package/dist/runner/feedback/index.cjs.map +1 -0
- package/dist/runner/feedback/index.d.cts +10 -0
- package/dist/runner/feedback/index.d.mts +10 -0
- package/dist/runner/feedback/index.d.ts +10 -0
- package/dist/runner/feedback/index.js +58 -0
- package/dist/runner/feedback/index.js.map +1 -0
- package/dist/runner/feedback/input-guard.cjs +106 -0
- package/dist/runner/feedback/input-guard.cjs.map +1 -0
- package/dist/runner/feedback/input-guard.d.cts +43 -0
- package/dist/runner/feedback/input-guard.d.mts +43 -0
- package/dist/runner/feedback/input-guard.d.ts +43 -0
- package/dist/runner/feedback/input-guard.js +8 -0
- package/dist/runner/feedback/input-guard.js.map +1 -0
- package/dist/runner/feedback/io.cjs +43 -0
- package/dist/runner/feedback/io.cjs.map +1 -0
- package/dist/runner/feedback/io.d.cts +38 -0
- package/dist/runner/feedback/io.d.mts +38 -0
- package/dist/runner/feedback/io.d.ts +38 -0
- package/dist/runner/feedback/io.js +6 -0
- package/dist/runner/feedback/io.js.map +1 -0
- package/dist/runner/feedback/json.cjs +371 -0
- package/dist/runner/feedback/json.cjs.map +1 -0
- package/dist/runner/feedback/json.d.cts +242 -0
- package/dist/runner/feedback/json.d.mts +242 -0
- package/dist/runner/feedback/json.d.ts +242 -0
- package/dist/runner/feedback/json.js +10 -0
- package/dist/runner/feedback/json.js.map +1 -0
- package/dist/runner/feedback/profile.cjs +8 -0
- package/dist/runner/feedback/profile.cjs.map +1 -0
- package/dist/runner/feedback/profile.d.cts +14 -0
- package/dist/runner/feedback/profile.d.mts +14 -0
- package/dist/runner/feedback/profile.d.ts +14 -0
- package/dist/runner/feedback/profile.js +6 -0
- package/dist/runner/feedback/profile.js.map +1 -0
- package/dist/runner/feedback/reducer.cjs +372 -0
- package/dist/runner/feedback/reducer.cjs.map +1 -0
- package/dist/runner/feedback/reducer.d.cts +4 -0
- package/dist/runner/feedback/reducer.d.mts +4 -0
- package/dist/runner/feedback/reducer.d.ts +4 -0
- package/dist/runner/feedback/reducer.js +8 -0
- package/dist/runner/feedback/reducer.js.map +1 -0
- package/dist/runner/feedback/renderer.cjs +3 -0
- package/dist/runner/feedback/renderer.cjs.map +1 -0
- package/dist/runner/feedback/renderer.d.cts +63 -0
- package/dist/runner/feedback/renderer.d.mts +63 -0
- package/dist/runner/feedback/renderer.d.ts +63 -0
- package/dist/runner/feedback/renderer.js +4 -0
- package/dist/runner/feedback/renderer.js.map +1 -0
- package/dist/runner/feedback/sink.cjs +194 -0
- package/dist/runner/feedback/sink.cjs.map +1 -0
- package/dist/runner/feedback/sink.d.cts +187 -0
- package/dist/runner/feedback/sink.d.mts +187 -0
- package/dist/runner/feedback/sink.d.ts +7 -7
- package/dist/runner/feedback/sink.js +34 -0
- package/dist/runner/feedback/sink.js.map +1 -0
- package/dist/runner/feedback/testing.cjs +69 -0
- package/dist/runner/feedback/testing.cjs.map +1 -0
- package/dist/runner/feedback/testing.d.cts +26 -0
- package/dist/runner/feedback/testing.d.mts +26 -0
- package/dist/runner/feedback/testing.d.ts +26 -0
- package/dist/runner/feedback/testing.js +6 -0
- package/dist/runner/feedback/testing.js.map +1 -0
- package/dist/runner/fingerprint.cjs +379 -0
- package/dist/runner/fingerprint.cjs.map +1 -0
- package/dist/runner/fingerprint.d.cts +71 -0
- package/dist/runner/fingerprint.d.mts +71 -0
- package/dist/runner/fingerprint.d.ts +49 -167
- package/dist/runner/fingerprint.js +22 -0
- package/dist/runner/fingerprint.js.map +1 -0
- package/dist/runner/gate-lease.cjs +271 -0
- package/dist/runner/gate-lease.cjs.map +1 -0
- package/dist/runner/gate-lease.d.cts +62 -0
- package/dist/runner/gate-lease.d.mts +62 -0
- package/dist/runner/gate-lease.d.ts +62 -0
- package/dist/runner/gate-lease.js +22 -0
- package/dist/runner/gate-lease.js.map +1 -0
- package/dist/runner/judge-config.cjs +26 -0
- package/dist/runner/judge-config.cjs.map +1 -0
- package/dist/runner/judge-config.d.cts +8 -0
- package/dist/runner/judge-config.d.mts +8 -0
- package/dist/runner/judge-config.d.ts +6 -4
- package/dist/runner/judge-config.js +6 -0
- package/dist/runner/judge-config.js.map +1 -0
- package/dist/runner/leak-gate.cjs +381 -0
- package/dist/runner/leak-gate.cjs.map +1 -0
- package/dist/runner/leak-gate.d.cts +124 -0
- package/dist/runner/leak-gate.d.mts +124 -0
- package/dist/runner/leak-gate.d.ts +36 -8
- package/dist/runner/leak-gate.js +32 -0
- package/dist/runner/leak-gate.js.map +1 -0
- package/dist/runner/ledger.cjs +470 -0
- package/dist/runner/ledger.cjs.map +1 -0
- package/dist/runner/ledger.d.cts +35 -0
- package/dist/runner/ledger.d.mts +35 -0
- package/dist/runner/ledger.d.ts +35 -0
- package/dist/runner/ledger.js +8 -0
- package/dist/runner/ledger.js.map +1 -0
- package/dist/runner/lock.cjs +236 -0
- package/dist/runner/lock.cjs.map +1 -0
- package/dist/runner/lock.d.cts +56 -0
- package/dist/runner/lock.d.mts +56 -0
- package/dist/runner/lock.d.ts +56 -0
- package/dist/runner/lock.js +22 -0
- package/dist/runner/lock.js.map +1 -0
- package/dist/runner/manifest.cjs +179 -0
- package/dist/runner/manifest.cjs.map +1 -0
- package/dist/runner/manifest.d.cts +61 -0
- package/dist/runner/manifest.d.mts +61 -0
- package/dist/runner/manifest.d.ts +4 -4
- package/dist/runner/manifest.js +22 -0
- package/dist/runner/manifest.js.map +1 -0
- package/dist/runner/project-current.cjs +117 -0
- package/dist/runner/project-current.cjs.map +1 -0
- package/dist/runner/project-current.d.cts +29 -0
- package/dist/runner/project-current.d.mts +29 -0
- package/dist/runner/project-current.d.ts +29 -0
- package/dist/runner/project-current.js +8 -0
- package/dist/runner/project-current.js.map +1 -0
- package/dist/runner/project-target.cjs +3 -0
- package/dist/runner/project-target.cjs.map +1 -0
- package/dist/runner/project-target.d.cts +30 -0
- package/dist/runner/project-target.d.mts +30 -0
- package/dist/runner/project-target.d.ts +30 -0
- package/dist/runner/project-target.js +4 -0
- package/dist/runner/project-target.js.map +1 -0
- package/dist/runner/record.cjs +883 -0
- package/dist/runner/record.cjs.map +1 -0
- package/dist/runner/record.d.cts +151 -0
- package/dist/runner/record.d.mts +151 -0
- package/dist/runner/record.d.ts +151 -0
- package/dist/runner/record.js +10 -0
- package/dist/runner/record.js.map +1 -0
- package/dist/runner/rename-experiment.cjs +273 -0
- package/dist/runner/rename-experiment.cjs.map +1 -0
- package/dist/runner/rename-experiment.d.cts +123 -0
- package/dist/runner/rename-experiment.d.mts +123 -0
- package/dist/runner/rename-experiment.d.ts +123 -0
- package/dist/runner/rename-experiment.js +14 -0
- package/dist/runner/rename-experiment.js.map +1 -0
- package/dist/runner/report.cjs +123 -0
- package/dist/runner/report.cjs.map +1 -0
- package/dist/runner/report.d.cts +27 -0
- package/dist/runner/report.d.mts +27 -0
- package/dist/runner/report.d.ts +27 -0
- package/dist/runner/report.js +14 -0
- package/dist/runner/report.js.map +1 -0
- package/dist/runner/reporters/braintrust.cjs +302 -0
- package/dist/runner/reporters/braintrust.cjs.map +1 -0
- package/dist/runner/reporters/braintrust.d.cts +59 -0
- package/dist/runner/reporters/braintrust.d.mts +59 -0
- package/dist/runner/reporters/braintrust.d.ts +59 -0
- package/dist/runner/reporters/braintrust.js +8 -0
- package/dist/runner/reporters/braintrust.js.map +1 -0
- package/dist/runner/reporters/index.cjs +12 -0
- package/dist/runner/reporters/index.cjs.map +1 -0
- package/dist/runner/reporters/index.d.cts +2 -0
- package/dist/runner/reporters/index.d.mts +2 -0
- package/dist/runner/reporters/index.d.ts +2 -0
- package/dist/runner/reporters/index.js +10 -0
- package/dist/runner/reporters/index.js.map +1 -0
- package/dist/runner/reporters/index.mjs +10 -0
- package/dist/runner/reporters/index.mjs.map +1 -0
- package/dist/runner/reporters/json.cjs +116 -0
- package/dist/runner/reporters/json.cjs.map +1 -0
- package/dist/runner/reporters/json.d.cts +3 -0
- package/dist/runner/reporters/json.d.mts +3 -0
- package/dist/runner/reporters/json.d.ts +3 -0
- package/dist/runner/reporters/json.js +8 -0
- package/dist/runner/reporters/json.js.map +1 -0
- package/dist/runner/reporters/shared.cjs +14 -0
- package/dist/runner/reporters/shared.cjs.map +1 -0
- package/dist/runner/reporters/shared.d.cts +3 -0
- package/dist/runner/reporters/shared.d.mts +3 -0
- package/dist/runner/reporters/shared.d.ts +3 -0
- package/dist/runner/reporters/shared.js +8 -0
- package/dist/runner/reporters/shared.js.map +1 -0
- package/dist/runner/reuse-diagnostics.cjs +71 -0
- package/dist/runner/reuse-diagnostics.cjs.map +1 -0
- package/dist/runner/reuse-diagnostics.d.cts +21 -0
- package/dist/runner/reuse-diagnostics.d.mts +21 -0
- package/dist/runner/reuse-diagnostics.d.ts +21 -0
- package/dist/runner/reuse-diagnostics.js +8 -0
- package/dist/runner/reuse-diagnostics.js.map +1 -0
- package/dist/runner/reuse-plan.cjs +739 -0
- package/dist/runner/reuse-plan.cjs.map +1 -0
- package/dist/runner/reuse-plan.d.cts +185 -0
- package/dist/runner/reuse-plan.d.mts +185 -0
- package/dist/runner/reuse-plan.d.ts +185 -0
- package/dist/runner/reuse-plan.js +26 -0
- package/dist/runner/reuse-plan.js.map +1 -0
- package/dist/runner/reuse-readback.cjs +275 -0
- package/dist/runner/reuse-readback.cjs.map +1 -0
- package/dist/runner/reuse-readback.d.cts +169 -0
- package/dist/runner/reuse-readback.d.mts +169 -0
- package/dist/runner/reuse-readback.d.ts +169 -0
- package/dist/runner/reuse-readback.js +20 -0
- package/dist/runner/reuse-readback.js.map +1 -0
- package/dist/runner/run.cjs +2362 -0
- package/dist/runner/run.cjs.map +1 -0
- package/dist/runner/run.d.cts +44 -0
- package/dist/runner/run.d.mts +44 -0
- package/dist/runner/run.d.ts +44 -0
- package/dist/runner/run.js +12 -0
- package/dist/runner/run.js.map +1 -0
- package/dist/runner/sandbox-pool.cjs +312 -0
- package/dist/runner/sandbox-pool.cjs.map +1 -0
- package/dist/runner/sandbox-pool.d.cts +70 -0
- package/dist/runner/sandbox-pool.d.mts +70 -0
- package/dist/runner/sandbox-pool.d.ts +70 -0
- package/dist/runner/sandbox-pool.js +6 -0
- package/dist/runner/sandbox-pool.js.map +1 -0
- package/dist/runner/sandbox-prep.cjs +57 -0
- package/dist/runner/sandbox-prep.cjs.map +1 -0
- package/dist/runner/sandbox-prep.d.cts +8 -0
- package/dist/runner/sandbox-prep.d.mts +8 -0
- package/dist/runner/sandbox-prep.d.ts +8 -0
- package/dist/runner/sandbox-prep.js +8 -0
- package/dist/runner/sandbox-prep.js.map +1 -0
- package/dist/runner/sandbox-record-producer.cjs +142 -0
- package/dist/runner/sandbox-record-producer.cjs.map +1 -0
- package/dist/runner/sandbox-record-producer.d.cts +30 -0
- package/dist/runner/sandbox-record-producer.d.mts +30 -0
- package/dist/runner/sandbox-record-producer.d.ts +30 -0
- package/dist/runner/sandbox-record-producer.js +6 -0
- package/dist/runner/sandbox-record-producer.js.map +1 -0
- package/dist/runner/sandbox-reuse.cjs +57 -0
- package/dist/runner/sandbox-reuse.cjs.map +1 -0
- package/dist/runner/sandbox-reuse.d.cts +43 -0
- package/dist/runner/sandbox-reuse.d.mts +43 -0
- package/dist/runner/sandbox-reuse.d.ts +43 -0
- package/dist/runner/sandbox-reuse.js +8 -0
- package/dist/runner/sandbox-reuse.js.map +1 -0
- package/dist/runner/sandbox-selection.cjs +362 -0
- package/dist/runner/sandbox-selection.cjs.map +1 -0
- package/dist/runner/sandbox-selection.d.cts +87 -0
- package/dist/runner/sandbox-selection.d.mts +87 -0
- package/dist/runner/sandbox-selection.d.ts +17 -6
- package/dist/runner/sandbox-selection.js +22 -0
- package/dist/runner/sandbox-selection.js.map +1 -0
- package/dist/runner/session.cjs +535 -0
- package/dist/runner/session.cjs.map +1 -0
- package/dist/runner/session.d.cts +116 -0
- package/dist/runner/session.d.mts +116 -0
- package/dist/runner/session.d.ts +44 -24
- package/dist/runner/session.js +28 -0
- package/dist/runner/session.js.map +1 -0
- package/dist/runner/source-closure.cjs +51 -0
- package/dist/runner/source-closure.cjs.map +1 -0
- package/dist/runner/source-closure.d.cts +6 -0
- package/dist/runner/source-closure.d.mts +6 -0
- package/dist/runner/source-closure.d.ts +6 -0
- package/dist/runner/source-closure.js +6 -0
- package/dist/runner/source-closure.js.map +1 -0
- package/dist/runner/source-producer.cjs +417 -0
- package/dist/runner/source-producer.cjs.map +1 -0
- package/dist/runner/source-producer.d.cts +70 -0
- package/dist/runner/source-producer.d.mts +70 -0
- package/dist/runner/source-producer.d.ts +70 -0
- package/dist/runner/source-producer.js +10 -0
- package/dist/runner/source-producer.js.map +1 -0
- package/dist/runner/teardown-registry.cjs +112 -0
- package/dist/runner/teardown-registry.cjs.map +1 -0
- package/dist/runner/teardown-registry.d.cts +35 -0
- package/dist/runner/teardown-registry.d.mts +35 -0
- package/dist/runner/teardown-registry.d.ts +35 -0
- package/dist/runner/teardown-registry.js +20 -0
- package/dist/runner/teardown-registry.js.map +1 -0
- package/dist/runner/timeout.cjs +31 -0
- package/dist/runner/timeout.cjs.map +1 -0
- package/dist/runner/timeout.d.cts +30 -0
- package/dist/runner/timeout.d.mts +30 -0
- package/dist/runner/timeout.d.ts +30 -0
- package/dist/runner/timeout.js +8 -0
- package/dist/runner/timeout.js.map +1 -0
- package/dist/runner/timing.cjs +279 -0
- package/dist/runner/timing.cjs.map +1 -0
- package/dist/runner/timing.d.cts +97 -0
- package/dist/runner/timing.d.mts +97 -0
- package/dist/runner/timing.d.ts +2 -2
- package/dist/runner/timing.js +26 -0
- package/dist/runner/timing.js.map +1 -0
- package/dist/runner/types.cjs +135 -0
- package/dist/runner/types.cjs.map +1 -0
- package/dist/runner/types.d.cts +1703 -0
- package/dist/runner/types.d.mts +1703 -0
- package/dist/runner/types.d.ts +214 -166
- package/dist/runner/types.js +32 -109
- package/dist/runner/types.js.map +1 -0
- package/dist/sample/analysis.cjs +1068 -0
- package/dist/sample/analysis.cjs.map +1 -0
- package/dist/sample/analysis.d.cts +153 -0
- package/dist/sample/analysis.d.mts +153 -0
- package/dist/sample/analysis.d.ts +153 -0
- package/dist/sample/analysis.js +30 -0
- package/dist/sample/analysis.js.map +1 -0
- package/dist/sample/index.cjs +16 -0
- package/dist/sample/index.cjs.map +1 -0
- package/dist/sample/index.d.cts +2 -0
- package/dist/sample/index.d.mts +2 -0
- package/dist/sample/index.d.ts +2 -102
- package/dist/sample/index.js +28 -386
- package/dist/sample/index.js.map +1 -0
- package/dist/sandbox/backend.cjs +116 -0
- package/dist/sandbox/backend.cjs.map +1 -0
- package/dist/sandbox/backend.d.cts +58 -0
- package/dist/sandbox/backend.d.mts +58 -0
- package/dist/sandbox/backend.d.ts +9 -3
- package/dist/sandbox/backend.js +26 -0
- package/dist/sandbox/backend.js.map +1 -0
- package/dist/sandbox/build-coordinator.cjs +309 -0
- package/dist/sandbox/build-coordinator.cjs.map +1 -0
- package/dist/sandbox/build-coordinator.d.cts +111 -0
- package/dist/sandbox/build-coordinator.d.mts +111 -0
- package/dist/sandbox/build-coordinator.d.ts +4 -4
- package/dist/sandbox/build-coordinator.js +12 -0
- package/dist/sandbox/build-coordinator.js.map +1 -0
- package/dist/sandbox/case-types.cjs +3 -0
- package/dist/sandbox/case-types.cjs.map +1 -0
- package/dist/sandbox/case-types.d.cts +55 -0
- package/dist/sandbox/case-types.d.mts +55 -0
- package/dist/sandbox/case-types.d.ts +3 -3
- package/dist/sandbox/case-types.js +4 -0
- package/dist/sandbox/case-types.js.map +1 -0
- package/dist/sandbox/checkpoint.cjs +65 -0
- package/dist/sandbox/checkpoint.cjs.map +1 -0
- package/dist/sandbox/checkpoint.d.cts +7 -0
- package/dist/sandbox/checkpoint.d.mts +7 -0
- package/dist/sandbox/checkpoint.d.ts +7 -0
- package/dist/sandbox/checkpoint.js +8 -0
- package/dist/sandbox/checkpoint.js.map +1 -0
- package/dist/sandbox/cli-commands.cjs +535 -0
- package/dist/sandbox/cli-commands.cjs.map +1 -0
- package/dist/sandbox/cli-commands.d.cts +41 -0
- package/dist/sandbox/cli-commands.d.mts +41 -0
- package/dist/sandbox/cli-commands.d.ts +41 -0
- package/dist/sandbox/cli-commands.js +14 -0
- package/dist/sandbox/cli-commands.js.map +1 -0
- package/dist/sandbox/commands.cjs +281 -0
- package/dist/sandbox/commands.cjs.map +1 -0
- package/dist/sandbox/commands.d.cts +141 -0
- package/dist/sandbox/commands.d.mts +141 -0
- package/dist/sandbox/commands.d.ts +64 -3
- package/dist/sandbox/commands.js +20 -0
- package/dist/sandbox/commands.js.map +1 -0
- package/dist/sandbox/compose.cjs +1293 -0
- package/dist/sandbox/compose.cjs.map +1 -0
- package/dist/sandbox/compose.d.cts +215 -0
- package/dist/sandbox/compose.d.mts +215 -0
- package/dist/sandbox/compose.d.ts +32 -16
- package/dist/sandbox/compose.js +38 -0
- package/dist/sandbox/compose.js.map +1 -0
- package/dist/sandbox/content.cjs +153 -0
- package/dist/sandbox/content.cjs.map +1 -0
- package/dist/sandbox/content.d.cts +35 -0
- package/dist/sandbox/content.d.mts +35 -0
- package/dist/sandbox/content.js +10 -0
- package/dist/sandbox/content.js.map +1 -0
- package/dist/sandbox/deadline.cjs +44 -0
- package/dist/sandbox/deadline.cjs.map +1 -0
- package/dist/sandbox/deadline.d.cts +45 -0
- package/dist/sandbox/deadline.d.mts +45 -0
- package/dist/sandbox/deadline.d.ts +2 -2
- package/dist/sandbox/deadline.js +10 -0
- package/dist/sandbox/deadline.js.map +1 -0
- package/dist/sandbox/dind-supervisor.cjs +124 -0
- package/dist/sandbox/dind-supervisor.cjs.map +1 -0
- package/dist/sandbox/dind-supervisor.d.cts +12 -0
- package/dist/sandbox/dind-supervisor.d.mts +12 -0
- package/dist/sandbox/dind-supervisor.d.ts +12 -0
- package/dist/sandbox/dind-supervisor.js +14 -0
- package/dist/sandbox/dind-supervisor.js.map +1 -0
- package/dist/sandbox/docker-agent-image.cjs +36 -0
- package/dist/sandbox/docker-agent-image.cjs.map +1 -0
- package/dist/sandbox/docker-agent-image.d.cts +22 -0
- package/dist/sandbox/docker-agent-image.d.mts +22 -0
- package/dist/sandbox/docker-agent-image.d.ts +22 -0
- package/dist/sandbox/docker-agent-image.js +20 -0
- package/dist/sandbox/docker-agent-image.js.map +1 -0
- package/dist/sandbox/docker-profile/cli.cjs +193 -0
- package/dist/sandbox/docker-profile/cli.cjs.map +1 -0
- package/dist/sandbox/docker-profile/cli.d.cts +12 -0
- package/dist/sandbox/docker-profile/cli.d.mts +12 -0
- package/dist/sandbox/docker-profile/cli.d.ts +12 -0
- package/dist/sandbox/docker-profile/cli.js +12 -0
- package/dist/sandbox/docker-profile/cli.js.map +1 -0
- package/dist/sandbox/docker-profile/errors.cjs +16 -0
- package/dist/sandbox/docker-profile/errors.cjs.map +1 -0
- package/dist/sandbox/docker-profile/errors.d.cts +25 -0
- package/dist/sandbox/docker-profile/errors.d.mts +25 -0
- package/dist/sandbox/docker-profile/errors.d.ts +25 -0
- package/dist/sandbox/docker-profile/errors.js +8 -0
- package/dist/sandbox/docker-profile/errors.js.map +1 -0
- package/dist/sandbox/docker-profile/registry.cjs +377 -0
- package/dist/sandbox/docker-profile/registry.cjs.map +1 -0
- package/dist/sandbox/docker-profile/registry.d.cts +43 -0
- package/dist/sandbox/docker-profile/registry.d.mts +43 -0
- package/dist/sandbox/docker-profile/registry.d.ts +43 -0
- package/dist/sandbox/docker-profile/registry.js +18 -0
- package/dist/sandbox/docker-profile/registry.js.map +1 -0
- package/dist/sandbox/docker-profile/runtime.cjs +198 -0
- package/dist/sandbox/docker-profile/runtime.cjs.map +1 -0
- package/dist/sandbox/docker-profile/runtime.d.cts +36 -0
- package/dist/sandbox/docker-profile/runtime.d.mts +36 -0
- package/dist/sandbox/docker-profile/runtime.d.ts +36 -0
- package/dist/sandbox/docker-profile/runtime.js +20 -0
- package/dist/sandbox/docker-profile/runtime.js.map +1 -0
- package/dist/sandbox/docker-profile/schema.cjs +650 -0
- package/dist/sandbox/docker-profile/schema.cjs.map +1 -0
- package/dist/sandbox/docker-profile/schema.d.cts +129 -0
- package/dist/sandbox/docker-profile/schema.d.mts +129 -0
- package/dist/sandbox/docker-profile/schema.d.ts +129 -0
- package/dist/sandbox/docker-profile/schema.js +38 -0
- package/dist/sandbox/docker-profile/schema.js.map +1 -0
- package/dist/sandbox/docker-stream.cjs +153 -0
- package/dist/sandbox/docker-stream.cjs.map +1 -0
- package/dist/sandbox/docker-stream.d.cts +33 -0
- package/dist/sandbox/docker-stream.d.mts +33 -0
- package/dist/sandbox/docker-stream.js +14 -0
- package/dist/sandbox/docker-stream.js.map +1 -0
- package/dist/sandbox/docker.cjs +1161 -0
- package/dist/sandbox/docker.cjs.map +1 -0
- package/dist/sandbox/docker.d.cts +288 -0
- package/dist/sandbox/docker.d.mts +288 -0
- package/dist/sandbox/docker.d.ts +84 -12
- package/dist/sandbox/docker.js +20 -0
- package/dist/sandbox/docker.js.map +1 -0
- package/dist/sandbox/dockerfile-agent-cache.cjs +104 -0
- package/dist/sandbox/dockerfile-agent-cache.cjs.map +1 -0
- package/dist/sandbox/dockerfile-agent-cache.d.cts +45 -0
- package/dist/sandbox/dockerfile-agent-cache.d.mts +45 -0
- package/dist/sandbox/dockerfile-agent-cache.d.ts +8 -7
- package/dist/sandbox/dockerfile-agent-cache.js +14 -0
- package/dist/sandbox/dockerfile-agent-cache.js.map +1 -0
- package/dist/sandbox/dockerfile-build.cjs +256 -0
- package/dist/sandbox/dockerfile-build.cjs.map +1 -0
- package/dist/sandbox/dockerfile-build.d.cts +59 -0
- package/dist/sandbox/dockerfile-build.d.mts +59 -0
- package/dist/sandbox/dockerfile-build.d.ts +21 -8
- package/dist/sandbox/dockerfile-build.js +16 -0
- package/dist/sandbox/dockerfile-build.js.map +1 -0
- package/dist/sandbox/dockerfile-identity.cjs +124 -0
- package/dist/sandbox/dockerfile-identity.cjs.map +1 -0
- package/dist/sandbox/dockerfile-identity.d.cts +37 -0
- package/dist/sandbox/dockerfile-identity.d.mts +37 -0
- package/dist/sandbox/dockerfile-identity.d.ts +13 -3
- package/dist/sandbox/dockerfile-identity.js +12 -0
- package/dist/sandbox/dockerfile-identity.js.map +1 -0
- package/dist/sandbox/download-directory.cjs +26 -0
- package/dist/sandbox/download-directory.cjs.map +1 -0
- package/dist/sandbox/download-directory.d.cts +9 -0
- package/dist/sandbox/download-directory.d.mts +9 -0
- package/dist/sandbox/download-directory.d.ts +1 -1
- package/dist/sandbox/download-directory.js +6 -0
- package/dist/sandbox/download-directory.js.map +1 -0
- package/dist/sandbox/e2b-agent-template.cjs +140 -0
- package/dist/sandbox/e2b-agent-template.cjs.map +1 -0
- package/dist/sandbox/e2b-agent-template.d.cts +65 -0
- package/dist/sandbox/e2b-agent-template.d.mts +65 -0
- package/dist/sandbox/e2b-agent-template.d.ts +65 -0
- package/dist/sandbox/e2b-agent-template.js +24 -0
- package/dist/sandbox/e2b-agent-template.js.map +1 -0
- package/dist/sandbox/e2b-agent-template.mjs +24 -0
- package/dist/sandbox/e2b-agent-template.mjs.map +1 -0
- package/dist/sandbox/e2b.cjs +664 -0
- package/dist/sandbox/e2b.cjs.map +1 -0
- package/dist/sandbox/e2b.d.cts +124 -0
- package/dist/sandbox/e2b.d.mts +124 -0
- package/dist/sandbox/e2b.d.ts +9 -9
- package/dist/sandbox/e2b.js +10 -0
- package/dist/sandbox/e2b.js.map +1 -0
- package/dist/sandbox/errors.cjs +191 -0
- package/dist/sandbox/errors.cjs.map +1 -0
- package/dist/sandbox/errors.d.cts +60 -0
- package/dist/sandbox/errors.d.mts +60 -0
- package/dist/sandbox/errors.d.ts +1 -1
- package/dist/sandbox/errors.js +20 -0
- package/dist/sandbox/errors.js.map +1 -0
- package/dist/sandbox/identity.cjs +140 -0
- package/dist/sandbox/identity.cjs.map +1 -0
- package/dist/sandbox/identity.d.cts +97 -0
- package/dist/sandbox/identity.d.mts +97 -0
- package/dist/sandbox/identity.d.ts +1 -1
- package/dist/sandbox/identity.js +26 -0
- package/dist/sandbox/identity.js.map +1 -0
- package/dist/sandbox/index.cjs +93 -0
- package/dist/sandbox/index.cjs.map +1 -0
- package/dist/sandbox/index.d.cts +28 -0
- package/dist/sandbox/index.d.mts +28 -0
- package/dist/sandbox/index.d.ts +28 -0
- package/dist/sandbox/index.js +144 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/index.mjs +144 -0
- package/dist/sandbox/index.mjs.map +1 -0
- package/dist/sandbox/io-retry.cjs +29 -0
- package/dist/sandbox/io-retry.cjs.map +1 -0
- package/dist/sandbox/io-retry.d.cts +17 -0
- package/dist/sandbox/io-retry.d.mts +17 -0
- package/dist/sandbox/io-retry.d.ts +1 -1
- package/dist/sandbox/io-retry.js +6 -0
- package/dist/sandbox/io-retry.js.map +1 -0
- package/dist/sandbox/keep-registry.cjs +269 -0
- package/dist/sandbox/keep-registry.cjs.map +1 -0
- package/dist/sandbox/keep-registry.d.cts +78 -0
- package/dist/sandbox/keep-registry.d.mts +78 -0
- package/dist/sandbox/keep-registry.d.ts +78 -0
- package/dist/sandbox/keep-registry.js +26 -0
- package/dist/sandbox/keep-registry.js.map +1 -0
- package/dist/sandbox/keep.cjs +448 -0
- package/dist/sandbox/keep.cjs.map +1 -0
- package/dist/sandbox/keep.d.cts +64 -0
- package/dist/sandbox/keep.d.mts +64 -0
- package/dist/sandbox/keep.d.ts +64 -0
- package/dist/sandbox/keep.js +28 -0
- package/dist/sandbox/keep.js.map +1 -0
- package/dist/sandbox/layer.cjs +1639 -0
- package/dist/sandbox/layer.cjs.map +1 -0
- package/dist/sandbox/layer.d.cts +565 -0
- package/dist/sandbox/layer.d.mts +565 -0
- package/dist/sandbox/layer.d.ts +179 -32
- package/dist/sandbox/layer.js +42 -0
- package/dist/sandbox/layer.js.map +1 -0
- package/dist/sandbox/ledger-paths.cjs +22 -0
- package/dist/sandbox/ledger-paths.cjs.map +1 -0
- package/dist/sandbox/ledger-paths.d.cts +14 -0
- package/dist/sandbox/ledger-paths.d.mts +14 -0
- package/dist/sandbox/ledger-paths.js +12 -0
- package/dist/sandbox/ledger-paths.js.map +1 -0
- package/dist/sandbox/link.cjs +395 -0
- package/dist/sandbox/link.cjs.map +1 -0
- package/dist/sandbox/link.d.cts +160 -0
- package/dist/sandbox/link.d.mts +160 -0
- package/dist/sandbox/link.d.ts +25 -8
- package/dist/sandbox/link.js +18 -0
- package/dist/sandbox/link.js.map +1 -0
- package/dist/sandbox/local-files.cjs +31 -0
- package/dist/sandbox/local-files.cjs.map +1 -0
- package/dist/sandbox/local-files.d.cts +6 -0
- package/dist/sandbox/local-files.d.mts +6 -0
- package/dist/sandbox/local-files.js +6 -0
- package/dist/sandbox/local-files.js.map +1 -0
- package/dist/sandbox/local.cjs +297 -0
- package/dist/sandbox/local.cjs.map +1 -0
- package/dist/sandbox/local.d.cts +78 -0
- package/dist/sandbox/local.d.mts +78 -0
- package/dist/sandbox/local.d.ts +7 -7
- package/dist/sandbox/local.js +6 -0
- package/dist/sandbox/local.js.map +1 -0
- package/dist/sandbox/operations.cjs +160 -0
- package/dist/sandbox/operations.cjs.map +1 -0
- package/dist/sandbox/operations.d.cts +10 -0
- package/dist/sandbox/operations.d.mts +10 -0
- package/dist/sandbox/operations.d.ts +2 -2
- package/dist/sandbox/operations.js +10 -0
- package/dist/sandbox/operations.js.map +1 -0
- package/dist/sandbox/orphans.cjs +199 -0
- package/dist/sandbox/orphans.cjs.map +1 -0
- package/dist/sandbox/orphans.d.cts +45 -0
- package/dist/sandbox/orphans.d.mts +45 -0
- package/dist/sandbox/orphans.d.ts +45 -0
- package/dist/sandbox/orphans.js +10 -0
- package/dist/sandbox/orphans.js.map +1 -0
- package/dist/sandbox/paths.cjs +102 -0
- package/dist/sandbox/paths.cjs.map +1 -0
- package/dist/sandbox/paths.d.cts +11 -0
- package/dist/sandbox/paths.d.mts +11 -0
- package/dist/sandbox/paths.d.ts +2 -2
- package/dist/sandbox/paths.js +12 -0
- package/dist/sandbox/paths.js.map +1 -0
- package/dist/sandbox/plan.cjs +223 -0
- package/dist/sandbox/plan.cjs.map +1 -0
- package/dist/sandbox/plan.d.cts +88 -0
- package/dist/sandbox/plan.d.mts +88 -0
- package/dist/sandbox/plan.d.ts +4 -3
- package/dist/sandbox/plan.js +20 -0
- package/dist/sandbox/plan.js.map +1 -0
- package/dist/sandbox/prepare-commands.cjs +280 -0
- package/dist/sandbox/prepare-commands.cjs.map +1 -0
- package/dist/sandbox/prepare-commands.d.cts +29 -0
- package/dist/sandbox/prepare-commands.d.mts +29 -0
- package/dist/sandbox/prepare-commands.d.ts +29 -0
- package/dist/sandbox/prepare-commands.js +8 -0
- package/dist/sandbox/prepare-commands.js.map +1 -0
- package/dist/sandbox/record/attachment.cjs +72 -0
- package/dist/sandbox/record/attachment.cjs.map +1 -0
- package/dist/sandbox/record/attachment.d.cts +30 -0
- package/dist/sandbox/record/attachment.d.mts +30 -0
- package/dist/sandbox/record/attachment.d.ts +30 -0
- package/dist/sandbox/record/attachment.js +10 -0
- package/dist/sandbox/record/attachment.js.map +1 -0
- package/dist/sandbox/record/codec.cjs +36 -0
- package/dist/sandbox/record/codec.cjs.map +1 -0
- package/dist/sandbox/record/codec.d.cts +30 -0
- package/dist/sandbox/record/codec.d.mts +30 -0
- package/dist/sandbox/record/codec.d.ts +30 -0
- package/dist/sandbox/record/codec.js +10 -0
- package/dist/sandbox/record/codec.js.map +1 -0
- package/dist/sandbox/record/model.cjs +20 -0
- package/dist/sandbox/record/model.cjs.map +1 -0
- package/dist/sandbox/record/model.d.cts +33 -0
- package/dist/sandbox/record/model.d.mts +33 -0
- package/dist/sandbox/record/model.d.ts +33 -0
- package/dist/sandbox/record/model.js +10 -0
- package/dist/sandbox/record/model.js.map +1 -0
- package/dist/sandbox/record/projector.cjs +29 -0
- package/dist/sandbox/record/projector.cjs.map +1 -0
- package/dist/sandbox/record/projector.d.cts +18 -0
- package/dist/sandbox/record/projector.d.mts +18 -0
- package/dist/sandbox/record/projector.d.ts +18 -0
- package/dist/sandbox/record/projector.js +6 -0
- package/dist/sandbox/record/projector.js.map +1 -0
- package/dist/sandbox/redaction.cjs +59 -0
- package/dist/sandbox/redaction.cjs.map +1 -0
- package/dist/sandbox/redaction.d.cts +19 -0
- package/dist/sandbox/redaction.d.mts +19 -0
- package/dist/sandbox/redaction.js +14 -0
- package/dist/sandbox/redaction.js.map +1 -0
- package/dist/sandbox/registry.cjs +76 -0
- package/dist/sandbox/registry.cjs.map +1 -0
- package/dist/sandbox/registry.d.cts +16 -0
- package/dist/sandbox/registry.d.mts +16 -0
- package/dist/sandbox/registry.d.ts +4 -3
- package/dist/sandbox/registry.js +14 -0
- package/dist/sandbox/registry.js.map +1 -0
- package/dist/sandbox/retry.cjs +82 -0
- package/dist/sandbox/retry.cjs.map +1 -0
- package/dist/sandbox/retry.d.cts +20 -0
- package/dist/sandbox/retry.d.mts +20 -0
- package/dist/sandbox/retry.d.ts +2 -2
- package/dist/sandbox/retry.js +6 -0
- package/dist/sandbox/retry.js.map +1 -0
- package/dist/sandbox/run-identity.cjs +109 -0
- package/dist/sandbox/run-identity.cjs.map +1 -0
- package/dist/sandbox/run-identity.d.cts +38 -0
- package/dist/sandbox/run-identity.d.mts +38 -0
- package/dist/sandbox/run-identity.js +36 -0
- package/dist/sandbox/run-identity.js.map +1 -0
- package/dist/sandbox/runtime.cjs +873 -0
- package/dist/sandbox/runtime.cjs.map +1 -0
- package/dist/sandbox/runtime.d.cts +116 -0
- package/dist/sandbox/runtime.d.mts +116 -0
- package/dist/sandbox/runtime.d.ts +16 -16
- package/dist/sandbox/runtime.js +40 -0
- package/dist/sandbox/runtime.js.map +1 -0
- package/dist/sandbox/shell.cjs +22 -0
- package/dist/sandbox/shell.cjs.map +1 -0
- package/dist/sandbox/shell.d.cts +11 -0
- package/dist/sandbox/shell.d.mts +11 -0
- package/dist/sandbox/shell.js +8 -0
- package/dist/sandbox/shell.js.map +1 -0
- package/dist/sandbox/transfer-errors.cjs +116 -0
- package/dist/sandbox/transfer-errors.cjs.map +1 -0
- package/dist/sandbox/transfer-errors.d.cts +25 -0
- package/dist/sandbox/transfer-errors.d.mts +25 -0
- package/dist/sandbox/transfer-errors.js +14 -0
- package/dist/sandbox/transfer-errors.js.map +1 -0
- package/dist/sandbox/types.cjs +3 -0
- package/dist/sandbox/types.cjs.map +1 -0
- package/dist/sandbox/types.d.cts +177 -0
- package/dist/sandbox/types.d.mts +177 -0
- package/dist/sandbox/types.d.ts +15 -10
- package/dist/sandbox/types.js +4 -3
- package/dist/sandbox/types.js.map +1 -0
- package/dist/sandbox/vercel.cjs +335 -0
- package/dist/sandbox/vercel.cjs.map +1 -0
- package/dist/sandbox/vercel.d.cts +97 -0
- package/dist/sandbox/vercel.d.mts +97 -0
- package/dist/sandbox/vercel.d.ts +9 -9
- package/dist/sandbox/vercel.js +8 -0
- package/dist/sandbox/vercel.js.map +1 -0
- package/dist/shared/aggregate.cjs +97 -0
- package/dist/shared/aggregate.cjs.map +1 -0
- package/dist/shared/aggregate.d.cts +45 -0
- package/dist/shared/aggregate.d.mts +45 -0
- package/dist/shared/aggregate.d.ts +4 -4
- package/dist/shared/aggregate.js +24 -87
- package/dist/shared/aggregate.js.map +1 -0
- package/dist/shared/entry-file-store.cjs +126 -0
- package/dist/shared/entry-file-store.cjs.map +1 -0
- package/dist/shared/entry-file-store.d.cts +46 -0
- package/dist/shared/entry-file-store.d.mts +46 -0
- package/dist/shared/entry-file-store.d.ts +9 -6
- package/dist/shared/entry-file-store.js +18 -0
- package/dist/shared/entry-file-store.js.map +1 -0
- package/dist/shared/external-cause.cjs +278 -0
- package/dist/shared/external-cause.cjs.map +1 -0
- package/dist/shared/external-cause.d.cts +51 -0
- package/dist/shared/external-cause.d.mts +51 -0
- package/dist/shared/external-cause.d.ts +1 -1
- package/dist/shared/external-cause.js +12 -0
- package/dist/shared/external-cause.js.map +1 -0
- package/dist/shared/facts.cjs +24 -0
- package/dist/shared/facts.cjs.map +1 -0
- package/dist/shared/facts.d.cts +7 -0
- package/dist/shared/facts.d.mts +7 -0
- package/dist/shared/facts.d.ts +7 -0
- package/dist/shared/facts.js +6 -0
- package/dist/shared/facts.js.map +1 -0
- package/dist/shared/failure-class.cjs +166 -0
- package/dist/shared/failure-class.cjs.map +1 -0
- package/dist/shared/failure-class.d.cts +92 -0
- package/dist/shared/failure-class.d.mts +92 -0
- package/dist/shared/failure-class.d.ts +2 -2
- package/dist/shared/failure-class.js +20 -0
- package/dist/shared/failure-class.js.map +1 -0
- package/dist/shared/format.cjs +36 -0
- package/dist/shared/format.cjs.map +1 -0
- package/dist/shared/format.d.cts +3 -0
- package/dist/shared/format.d.mts +3 -0
- package/dist/shared/format.d.ts +3 -0
- package/dist/shared/format.js +10 -0
- package/dist/shared/format.js.map +1 -0
- package/dist/shared/json-match.cjs +44 -0
- package/dist/shared/json-match.cjs.map +1 -0
- package/dist/shared/json-match.d.cts +3 -0
- package/dist/shared/json-match.d.mts +3 -0
- package/dist/shared/json-match.d.ts +3 -0
- package/dist/shared/json-match.js +6 -0
- package/dist/shared/json-match.js.map +1 -0
- package/dist/shared/json-value.cjs +45 -0
- package/dist/shared/json-value.cjs.map +1 -0
- package/dist/shared/json-value.d.cts +11 -0
- package/dist/shared/json-value.d.mts +11 -0
- package/dist/shared/json-value.d.ts +11 -0
- package/dist/shared/json-value.js +8 -0
- package/dist/shared/json-value.js.map +1 -0
- package/dist/shared/turn-label.cjs +19 -0
- package/dist/shared/turn-label.cjs.map +1 -0
- package/dist/shared/turn-label.d.cts +9 -0
- package/dist/shared/turn-label.d.mts +9 -0
- package/dist/shared/turn-label.js +8 -14
- package/dist/shared/turn-label.js.map +1 -0
- package/dist/shared/types.cjs +3 -0
- package/dist/shared/types.cjs.map +1 -0
- package/dist/shared/types.d.cts +80 -0
- package/dist/shared/types.d.mts +80 -0
- package/dist/shared/types.d.ts +0 -2
- package/dist/shared/types.js +4 -4
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/verdict.cjs +70 -0
- package/dist/shared/verdict.cjs.map +1 -0
- package/dist/shared/verdict.d.cts +36 -0
- package/dist/shared/verdict.d.mts +36 -0
- package/dist/shared/verdict.d.ts +21 -32
- package/dist/shared/verdict.js +14 -53
- package/dist/shared/verdict.js.map +1 -0
- package/dist/show/command.cjs +20 -0
- package/dist/show/command.cjs.map +1 -0
- package/dist/show/command.d.cts +13 -0
- package/dist/show/command.d.mts +13 -0
- package/dist/show/command.d.ts +13 -0
- package/dist/show/command.js +6 -0
- package/dist/show/command.js.map +1 -0
- package/dist/show/json.cjs +8 -0
- package/dist/show/json.cjs.map +1 -0
- package/dist/show/json.d.cts +2 -0
- package/dist/show/json.d.mts +2 -0
- package/dist/show/json.d.ts +2 -0
- package/dist/show/json.js +8 -0
- package/dist/show/json.js.map +1 -0
- package/dist/show/render.cjs +7 -0
- package/dist/show/render.cjs.map +1 -0
- package/dist/show/render.d.cts +2 -0
- package/dist/show/render.d.mts +2 -0
- package/dist/show/render.d.ts +2 -0
- package/dist/show/render.js +6 -0
- package/dist/show/render.js.map +1 -0
- package/dist/source-loc.cjs +137 -0
- package/dist/source-loc.cjs.map +1 -0
- package/dist/source-loc.d.cts +22 -0
- package/dist/source-loc.d.mts +22 -0
- package/dist/source-loc.d.ts +22 -0
- package/dist/source-loc.js +10 -0
- package/dist/source-loc.js.map +1 -0
- package/dist/sources/assemble.cjs +634 -0
- package/dist/sources/assemble.cjs.map +1 -0
- package/dist/sources/assemble.d.cts +6 -0
- package/dist/sources/assemble.d.mts +6 -0
- package/dist/sources/assemble.d.ts +6 -0
- package/dist/sources/assemble.js +6 -0
- package/dist/sources/assemble.js.map +1 -0
- package/dist/sources/attachment.cjs +272 -0
- package/dist/sources/attachment.cjs.map +1 -0
- package/dist/sources/attachment.d.cts +331 -0
- package/dist/sources/attachment.d.mts +331 -0
- package/dist/sources/attachment.d.ts +331 -0
- package/dist/sources/attachment.js +22 -0
- package/dist/sources/attachment.js.map +1 -0
- package/dist/sources/codec.cjs +220 -0
- package/dist/sources/codec.cjs.map +1 -0
- package/dist/sources/codec.d.cts +408 -0
- package/dist/sources/codec.d.mts +408 -0
- package/dist/sources/codec.d.ts +408 -0
- package/dist/sources/codec.js +56 -0
- package/dist/sources/codec.js.map +1 -0
- package/dist/sources/identity.cjs +10 -0
- package/dist/sources/identity.cjs.map +1 -0
- package/dist/sources/identity.d.cts +10 -0
- package/dist/sources/identity.d.mts +10 -0
- package/dist/sources/identity.d.ts +10 -0
- package/dist/sources/identity.js +10 -0
- package/dist/sources/identity.js.map +1 -0
- package/dist/sources/index.cjs +24 -0
- package/dist/sources/index.cjs.map +1 -0
- package/dist/sources/index.d.cts +7 -0
- package/dist/sources/index.d.mts +7 -0
- package/dist/sources/index.d.ts +7 -0
- package/dist/sources/index.js +90 -0
- package/dist/sources/index.js.map +1 -0
- package/dist/sources/model.cjs +6 -0
- package/dist/sources/model.cjs.map +1 -0
- package/dist/sources/model.d.cts +92 -0
- package/dist/sources/model.d.mts +92 -0
- package/dist/sources/model.d.ts +92 -0
- package/dist/sources/model.js +6 -0
- package/dist/sources/model.js.map +1 -0
- package/dist/sources/projection-model.cjs +3 -0
- package/dist/sources/projection-model.cjs.map +1 -0
- package/dist/sources/projection-model.d.cts +327 -0
- package/dist/sources/projection-model.d.mts +327 -0
- package/dist/sources/projection-model.d.ts +327 -0
- package/dist/sources/projection-model.js +4 -0
- package/dist/sources/projection-model.js.map +1 -0
- package/dist/sources/projector.cjs +282 -0
- package/dist/sources/projector.cjs.map +1 -0
- package/dist/sources/projector.d.cts +8 -0
- package/dist/sources/projector.d.mts +8 -0
- package/dist/sources/projector.d.ts +8 -0
- package/dist/sources/projector.js +10 -0
- package/dist/sources/projector.js.map +1 -0
- package/dist/tty-line.cjs +17 -0
- package/dist/tty-line.cjs.map +1 -0
- package/dist/tty-line.d.cts +2 -0
- package/dist/tty-line.d.mts +2 -0
- package/dist/tty-line.js +6 -0
- package/dist/tty-line.js.map +1 -0
- package/dist/types.cjs +38 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +9 -0
- package/dist/types.d.mts +9 -0
- package/dist/types.d.ts +9 -9
- package/dist/types.js +32 -21
- package/dist/types.js.map +1 -0
- package/dist/util.cjs +193 -0
- package/dist/util.cjs.map +1 -0
- package/dist/util.d.cts +46 -0
- package/dist/util.d.mts +46 -0
- package/dist/util.js +22 -132
- package/dist/util.js.map +1 -0
- package/dist/vendor/remark/remark-gfm.cjs +3484 -0
- package/dist/vendor/remark/remark-gfm.cjs.map +7 -0
- package/dist/vendor/remark/remark-parse.cjs +6975 -0
- package/dist/vendor/remark/remark-parse.cjs.map +7 -0
- package/dist/vendor/remark/remark.cjs +10151 -0
- package/dist/vendor/remark/remark.cjs.map +7 -0
- package/dist/view/data.cjs +3 -0
- package/dist/view/data.cjs.map +1 -0
- package/dist/view/data.d.cts +8 -0
- package/dist/view/data.d.mts +8 -0
- package/dist/view/data.d.ts +8 -0
- package/dist/view/data.js +4 -0
- package/dist/view/data.js.map +1 -0
- package/dist/view/index.cjs +25 -0
- package/dist/view/index.cjs.map +1 -0
- package/dist/view/index.d.cts +9 -0
- package/dist/view/index.d.mts +9 -0
- package/dist/view/index.d.ts +9 -0
- package/dist/view/index.js +30 -0
- package/dist/view/index.js.map +1 -0
- package/dist/view/server.cjs +658 -0
- package/dist/view/server.cjs.map +1 -0
- package/dist/view/server.d.cts +49 -0
- package/dist/view/server.d.mts +49 -0
- package/dist/view/server.d.ts +49 -0
- package/dist/view/server.js +6 -0
- package/dist/view/server.js.map +1 -0
- package/dist/view/shared/types.cjs +3 -0
- package/dist/view/shared/types.cjs.map +1 -0
- package/dist/view/shared/types.d.cts +51 -0
- package/dist/view/shared/types.d.mts +51 -0
- package/dist/view/shared/types.d.ts +51 -0
- package/dist/view/shared/types.js +4 -0
- package/dist/view/shared/types.js.map +1 -0
- package/dist/view/site.cjs +40 -0
- package/dist/view/site.cjs.map +1 -0
- package/dist/view/site.d.cts +26 -0
- package/dist/view/site.d.mts +26 -0
- package/dist/view/site.d.ts +26 -0
- package/dist/view/site.js +10 -0
- package/dist/view/site.js.map +1 -0
- package/dist/view/styles.css +170 -0
- package/docs-site/zh/README.md +6 -6
- package/docs-site/zh/examples/ai-agent-application.mdx +3 -3
- package/docs-site/zh/examples/coding-agent-extensions.mdx +3 -3
- package/docs-site/zh/examples/index.mdx +10 -3
- package/docs-site/zh/examples/integrations/ai-sdk-v7.mdx +10 -9
- package/docs-site/zh/examples/integrations/claude-sdk.mdx +11 -9
- package/docs-site/zh/examples/integrations/codex-sdk.mdx +14 -13
- package/docs-site/zh/examples/integrations/langgraph.mdx +13 -11
- package/docs-site/zh/examples/integrations/pi-sdk.mdx +11 -9
- package/docs-site/zh/explanation/adapter.mdx +27 -27
- package/docs-site/zh/explanation/assert.mdx +51 -198
- package/docs-site/zh/explanation/drive.mdx +14 -12
- package/docs-site/zh/explanation/evals.mdx +16 -12
- package/docs-site/zh/explanation/experiment.mdx +7 -3
- package/docs-site/zh/explanation/hitl.mdx +7 -7
- package/docs-site/zh/explanation/judge.mdx +67 -96
- package/docs-site/zh/explanation/overview.mdx +59 -100
- package/docs-site/zh/explanation/record.mdx +60 -0
- package/docs-site/zh/explanation/runner.mdx +47 -123
- package/docs-site/zh/explanation/tier.mdx +2 -2
- package/docs-site/zh/index.mdx +15 -13
- package/docs-site/zh/introduction.mdx +15 -13
- package/docs-site/zh/reference/builtin-agents.mdx +60 -37
- package/docs-site/zh/reference/capabilities.mdx +7 -7
- package/docs-site/zh/reference/cli.mdx +146 -80
- package/docs-site/zh/reference/define-agent.mdx +29 -20
- package/docs-site/zh/reference/define-config.mdx +6 -15
- package/docs-site/zh/reference/define-eval.mdx +78 -326
- package/docs-site/zh/reference/events.mdx +70 -21
- package/docs-site/zh/reference/expect.mdx +148 -117
- package/docs-site/zh/reference/official-adapters.mdx +33 -22
- package/docs-site/zh/reference/report-components.mdx +78 -362
- package/docs-site/zh/reference/results-data.mdx +53 -270
- package/docs-site/zh/troubleshooting/debug-sandbox.mdx +8 -6
- package/docs-site/zh/troubleshooting/debugging.mdx +48 -218
- package/docs-site/zh/troubleshooting/recover-after-kill.mdx +3 -3
- package/docs-site/zh/tutorials/agent-feedback-loop.mdx +48 -290
- package/docs-site/zh/tutorials/agent-onboarding.mdx +22 -20
- package/docs-site/zh/tutorials/authoring.mdx +9 -9
- package/docs-site/zh/tutorials/ci-integration.mdx +40 -117
- package/docs-site/zh/tutorials/concurrency.mdx +44 -56
- package/docs-site/zh/tutorials/configuration.mdx +10 -14
- package/docs-site/zh/tutorials/connect-otel.mdx +21 -21
- package/docs-site/zh/tutorials/connect-your-agent.mdx +29 -24
- package/docs-site/zh/tutorials/criteria-files.mdx +2 -2
- package/docs-site/zh/tutorials/custom-reports.mdx +69 -343
- package/docs-site/zh/tutorials/dataset-fanout.mdx +1 -1
- package/docs-site/zh/tutorials/deploy-report-site.mdx +34 -136
- package/docs-site/zh/tutorials/docker-in-docker.mdx +295 -0
- package/docs-site/zh/tutorials/eval-groups.mdx +207 -0
- package/docs-site/zh/tutorials/evaluation-kinds.mdx +67 -103
- package/docs-site/zh/tutorials/experiments.mdx +4 -4
- package/docs-site/zh/tutorials/fixtures.mdx +3 -3
- package/docs-site/zh/tutorials/handle-execution-failures.mdx +114 -0
- package/docs-site/zh/tutorials/install-custom-sandbox-agent.mdx +102 -0
- package/docs-site/zh/tutorials/plugins.mdx +110 -0
- package/docs-site/zh/tutorials/publish-report.mdx +40 -121
- package/docs-site/zh/tutorials/quickstart.mdx +15 -9
- package/docs-site/zh/tutorials/reporters.mdx +40 -90
- package/docs-site/zh/tutorials/rerun-and-cache.mdx +44 -225
- package/docs-site/zh/tutorials/sandbox-agent.mdx +47 -40
- package/docs-site/zh/tutorials/sandbox-providers.mdx +49 -39
- package/docs-site/zh/tutorials/sandbox-reuse.mdx +37 -15
- package/docs-site/zh/tutorials/theming.mdx +21 -156
- package/docs-site/zh/tutorials/viewing-results.mdx +73 -666
- package/docs-site/zh/tutorials/write-experiment.mdx +22 -21
- package/docs-site/zh/tutorials/write-send.mdx +38 -35
- package/package.json +127 -65
- package/dist/context/deferred-file-content.d.ts +0 -15
- package/dist/i18n/zh-CN.d.ts +0 -367
- package/dist/i18n/zh-CN.js +0 -458
- package/dist/record/annotated-source.d.ts +0 -126
- package/dist/record/annotated-source.js +0 -511
- package/dist/record/attempt-evidence.d.ts +0 -84
- package/dist/record/attempt-evidence.js +0 -108
- package/dist/record/attempt-source.d.ts +0 -4
- package/dist/record/attempt-source.js +0 -28
- package/dist/record/format.d.ts +0 -39
- package/dist/record/format.js +0 -75
- package/dist/record/open.d.ts +0 -62
- package/dist/record/open.js +0 -683
- package/dist/record/types.d.ts +0 -297
- package/dist/record/types.js +0 -9
- package/dist/report/assets/colors.d.ts +0 -22
- package/dist/report/assets/colors.js +0 -61
- package/dist/report/assets/series-encoding.d.ts +0 -36
- package/dist/report/assets/series-encoding.js +0 -104
- package/dist/report/built-in/failures.d.ts +0 -1
- package/dist/report/built-in/failures.js +0 -18
- package/dist/report/built-in/result-components.d.ts +0 -10
- package/dist/report/built-in/result-components.js +0 -199
- package/dist/report/built-in/stability.d.ts +0 -1
- package/dist/report/built-in/stability.js +0 -20
- package/dist/report/built-in/standard.d.ts +0 -50
- package/dist/report/built-in/standard.js +0 -93
- package/dist/report/components/attempt-detail/compute.d.ts +0 -51
- package/dist/report/components/attempt-detail/compute.js +0 -512
- package/dist/report/components/attempt-detail/content.d.ts +0 -28
- package/dist/report/components/attempt-detail/content.js +0 -575
- package/dist/report/components/attempt-detail/index.d.ts +0 -15
- package/dist/report/components/attempt-detail/index.js +0 -154
- package/dist/report/components/attempt-detail/validate.d.ts +0 -11
- package/dist/report/components/attempt-detail/validate.js +0 -417
- package/dist/report/components/cell.d.ts +0 -12
- package/dist/report/components/cell.js +0 -10
- package/dist/report/components/entity-lists/compute.d.ts +0 -35
- package/dist/report/components/entity-lists/compute.js +0 -333
- package/dist/report/components/entity-lists/content.d.ts +0 -7
- package/dist/report/components/entity-lists/content.js +0 -483
- package/dist/report/components/entity-lists/index.d.ts +0 -48
- package/dist/report/components/entity-lists/index.js +0 -81
- package/dist/report/components/entity-lists/validate.d.ts +0 -4
- package/dist/report/components/entity-lists/validate.js +0 -155
- package/dist/report/components/experiment-detail/compute.d.ts +0 -7
- package/dist/report/components/experiment-detail/compute.js +0 -32
- package/dist/report/components/experiment-detail/index.d.ts +0 -9
- package/dist/report/components/experiment-detail/index.js +0 -41
- package/dist/report/components/fixtures.d.ts +0 -10
- package/dist/report/components/fixtures.js +0 -341
- package/dist/report/components/shared-compute.d.ts +0 -23
- package/dist/report/components/shared-compute.js +0 -48
- package/dist/report/components/shared-faces.d.ts +0 -8
- package/dist/report/components/shared-faces.js +0 -21
- package/dist/report/components/shared.d.ts +0 -52
- package/dist/report/components/shared.js +0 -95
- package/dist/report/components/site-components/HeroCard.d.ts +0 -14
- package/dist/report/components/site-components/HeroCard.js +0 -35
- package/dist/report/components/site-components/PoweredBy.d.ts +0 -5
- package/dist/report/components/site-components/PoweredBy.js +0 -7
- package/dist/report/components/site-components/compute.d.ts +0 -34
- package/dist/report/components/site-components/compute.js +0 -144
- package/dist/report/components/site-components/content.d.ts +0 -1
- package/dist/report/components/site-components/content.js +0 -2
- package/dist/report/components/site-components/faces.d.ts +0 -9
- package/dist/report/components/site-components/faces.js +0 -34
- package/dist/report/components/site-components/hero-types.d.ts +0 -17
- package/dist/report/components/site-components/index.d.ts +0 -34
- package/dist/report/components/site-components/index.js +0 -55
- package/dist/report/components/site-components/projections.d.ts +0 -12
- package/dist/report/components/site-components/projections.js +0 -67
- package/dist/report/components/site-components/scope-warnings.d.ts +0 -44
- package/dist/report/components/site-components/scope-warnings.js +0 -115
- package/dist/report/components/site-components/snapshot-diagnostics.d.ts +0 -18
- package/dist/report/components/site-components/snapshot-diagnostics.js +0 -42
- package/dist/report/components/site-components/validators.d.ts +0 -6
- package/dist/report/components/site-components/validators.js +0 -115
- package/dist/report/components/summaries/compute.d.ts +0 -7
- package/dist/report/components/summaries/compute.js +0 -60
- package/dist/report/components/summaries/index.d.ts +0 -29
- package/dist/report/components/summaries/index.js +0 -122
- package/dist/report/components/summaries/stability-overview.d.ts +0 -13
- package/dist/report/components/summaries/stability-overview.js +0 -73
- package/dist/report/components/summaries/validate.d.ts +0 -2
- package/dist/report/components/summaries/validate.js +0 -29
- package/dist/report/definition/cell.d.ts +0 -118
- package/dist/report/definition/cell.js +0 -96
- package/dist/report/definition/grid-layout.d.ts +0 -77
- package/dist/report/definition/grid-layout.js +0 -147
- package/dist/report/definition/primitives/callouts-logic.d.ts +0 -26
- package/dist/report/definition/primitives/callouts-logic.js +0 -102
- package/dist/report/definition/primitives/callouts.d.ts +0 -9
- package/dist/report/definition/primitives/callouts.js +0 -101
- package/dist/report/definition/primitives/chart-map.d.ts +0 -74
- package/dist/report/definition/primitives/chart-map.js +0 -124
- package/dist/report/definition/primitives/chart.d.ts +0 -43
- package/dist/report/definition/primitives/chart.js +0 -619
- package/dist/report/definition/primitives/conversation.d.ts +0 -55
- package/dist/report/definition/primitives/conversation.js +0 -216
- package/dist/report/definition/primitives/copy-block.d.ts +0 -19
- package/dist/report/definition/primitives/copy-block.js +0 -51
- package/dist/report/definition/primitives/diff-lines.d.ts +0 -68
- package/dist/report/definition/primitives/diff-lines.js +0 -149
- package/dist/report/definition/primitives/diff-view.d.ts +0 -14
- package/dist/report/definition/primitives/diff-view.js +0 -156
- package/dist/report/definition/primitives/markdown.d.ts +0 -29
- package/dist/report/definition/primitives/markdown.js +0 -278
- package/dist/report/definition/primitives/marks.d.ts +0 -124
- package/dist/report/definition/primitives/marks.js +0 -91
- package/dist/report/definition/primitives/points-dataset.d.ts +0 -17
- package/dist/report/definition/primitives/points-dataset.js +0 -121
- package/dist/report/definition/primitives/source-view.d.ts +0 -43
- package/dist/report/definition/primitives/source-view.js +0 -179
- package/dist/report/definition/primitives/waterfall.d.ts +0 -34
- package/dist/report/definition/primitives/waterfall.js +0 -201
- package/dist/report/definition/primitives.d.ts +0 -154
- package/dist/report/definition/primitives.js +0 -691
- package/dist/report/definition/report.d.ts +0 -200
- package/dist/report/definition/report.js +0 -275
- package/dist/report/definition/table-text.d.ts +0 -14
- package/dist/report/definition/table-text.js +0 -187
- package/dist/report/definition/tree.d.ts +0 -233
- package/dist/report/definition/tree.js +0 -566
- package/dist/report/extension/assets.d.ts +0 -16
- package/dist/report/extension/assets.js +0 -124
- package/dist/report/extension/define.d.ts +0 -9
- package/dist/report/extension/define.js +0 -137
- package/dist/report/extension/index.d.ts +0 -6
- package/dist/report/extension/index.js +0 -5
- package/dist/report/extension/meta.d.ts +0 -9
- package/dist/report/extension/meta.js +0 -11
- package/dist/report/extension/types.d.ts +0 -52
- package/dist/report/extension/types.js +0 -3
- package/dist/report/model/aggregate.d.ts +0 -111
- package/dist/report/model/aggregate.js +0 -396
- package/dist/report/model/calculation.d.ts +0 -139
- package/dist/report/model/calculation.js +0 -447
- package/dist/report/model/chart/math.d.ts +0 -73
- package/dist/report/model/chart/math.js +0 -198
- package/dist/report/model/chart/plot.d.ts +0 -52
- package/dist/report/model/chart/plot.js +0 -89
- package/dist/report/model/conversions.d.ts +0 -40
- package/dist/report/model/conversions.js +0 -88
- package/dist/report/model/dataset.d.ts +0 -18
- package/dist/report/model/dataset.js +0 -74
- package/dist/report/model/evaluation-kind.d.ts +0 -19
- package/dist/report/model/evaluation-kind.js +0 -32
- package/dist/report/model/flag.d.ts +0 -52
- package/dist/report/model/flag.js +0 -157
- package/dist/report/model/format.d.ts +0 -96
- package/dist/report/model/format.js +0 -339
- package/dist/report/model/locale.d.ts +0 -219
- package/dist/report/model/locale.js +0 -426
- package/dist/report/model/metrics.d.ts +0 -44
- package/dist/report/model/metrics.js +0 -255
- package/dist/report/model/types.d.ts +0 -784
- package/dist/report/model/types.js +0 -5
- package/dist/report/presentation.d.ts +0 -114
- package/dist/report/presentation.js +0 -210
- package/dist/report/react/index.d.ts +0 -13
- package/dist/report/react/index.js +0 -18
- package/dist/report/runtime/load.d.ts +0 -17
- package/dist/report/runtime/load.js +0 -146
- package/dist/report/runtime/page-render.d.ts +0 -47
- package/dist/report/runtime/page-render.js +0 -95
- package/dist/report/runtime/resolved-page.d.ts +0 -35
- package/dist/report/runtime/resolved-page.js +0 -122
- package/dist/report/runtime/target.d.ts +0 -19
- package/dist/report/runtime/target.js +0 -42
- package/dist/report/runtime/text.d.ts +0 -76
- package/dist/report/runtime/text.js +0 -78
- package/dist/report/runtime/web.d.ts +0 -37
- package/dist/report/runtime/web.js +0 -34
- package/dist/report/slices/compute.d.ts +0 -83
- package/dist/report/slices/compute.js +0 -808
- package/dist/report/slices/content.d.ts +0 -17
- package/dist/report/slices/content.js +0 -132
- package/dist/report/slices/validate.d.ts +0 -6
- package/dist/report/slices/validate.js +0 -296
- package/dist/report/tasks.d.ts +0 -144
- package/dist/report/tasks.js +0 -313
- package/dist/report/theme.d.ts +0 -51
- package/dist/report/theme.js +0 -112
- package/src/agents/ai-sdk-otel.ts +0 -62
- package/src/agents/ai-sdk.test.ts +0 -35
- package/src/agents/ai-sdk.ts +0 -603
- package/src/agents/bub-install-spec.ts +0 -50
- package/src/agents/bub.ts +0 -293
- package/src/agents/builtin.ts +0 -16
- package/src/agents/cache-marker.ts +0 -6
- package/src/agents/claude-code.ts +0 -439
- package/src/agents/codex-env.test.ts +0 -153
- package/src/agents/codex.ts +0 -727
- package/src/agents/coding-cli-versions.ts +0 -87
- package/src/agents/command-redaction.test.ts +0 -96
- package/src/agents/hermes.ts +0 -269
- package/src/agents/index.ts +0 -149
- package/src/agents/langgraph.test.ts +0 -30
- package/src/agents/langgraph.ts +0 -508
- package/src/agents/marketplace.ts +0 -96
- package/src/agents/mcp.test.ts +0 -41
- package/src/agents/mcp.ts +0 -31
- package/src/agents/native-config.ts +0 -267
- package/src/agents/npm-staged.ts +0 -370
- package/src/agents/openai-compat.test.ts +0 -69
- package/src/agents/openai-compat.ts +0 -205
- package/src/agents/openclaw.ts +0 -275
- package/src/agents/opencode.ts +0 -198
- package/src/agents/post-setup.test.ts +0 -118
- package/src/agents/post-setup.ts +0 -116
- package/src/agents/provisioner.test.ts +0 -291
- package/src/agents/provisioner.ts +0 -593
- package/src/agents/sdk-streams.test.ts +0 -66
- package/src/agents/sdk-streams.ts +0 -542
- package/src/agents/session-slot.ts +0 -15
- package/src/agents/shared.ts +0 -250
- package/src/agents/skills.ts +0 -309
- package/src/agents/streaming.ts +0 -203
- package/src/agents/types.ts +0 -612
- package/src/agents/ui-message-stream.ts +0 -398
- package/src/assertions/collector.test.ts +0 -457
- package/src/assertions/collector.ts +0 -452
- package/src/assertions/coverage.ts +0 -118
- package/src/assertions/diff.ts +0 -120
- package/src/assertions/display.test.ts +0 -175
- package/src/assertions/display.ts +0 -213
- package/src/assertions/evidence.test.ts +0 -194
- package/src/assertions/judge.test.ts +0 -623
- package/src/assertions/judge.ts +0 -448
- package/src/assertions/match.ts +0 -79
- package/src/assertions/scoped.test.ts +0 -359
- package/src/assertions/scoped.ts +0 -551
- package/src/assertions/types.ts +0 -286
- package/src/cli.ts +0 -1762
- package/src/context/context.test.ts +0 -759
- package/src/context/context.ts +0 -816
- package/src/context/control-flow.ts +0 -17
- package/src/context/deferred-file-content.ts +0 -16
- package/src/context/send-failures.test.ts +0 -122
- package/src/context/send-failures.ts +0 -164
- package/src/context/send-retry.test.ts +0 -112
- package/src/context/send-retry.ts +0 -145
- package/src/context/session.test.ts +0 -477
- package/src/context/session.ts +0 -516
- package/src/context/types.ts +0 -409
- package/src/define-agent.test.ts +0 -99
- package/src/define-eval.test.ts +0 -213
- package/src/define-experiment.test.ts +0 -44
- package/src/define.test.ts +0 -25
- package/src/define.ts +0 -238
- package/src/expect/index.test.ts +0 -39
- package/src/expect/index.ts +0 -252
- package/src/fresh-import.ts +0 -34
- package/src/i18n/core.ts +0 -28
- package/src/i18n/en.ts +0 -532
- package/src/i18n/index.ts +0 -40
- package/src/i18n/locale.test.ts +0 -41
- package/src/i18n/zh-CN.ts +0 -533
- package/src/index.ts +0 -91
- package/src/load-config.ts +0 -39
- package/src/loaders/criteria.test.ts +0 -305
- package/src/loaders/glob.ts +0 -149
- package/src/loaders/index.test.ts +0 -166
- package/src/loaders/index.ts +0 -256
- package/src/loaders/private.test.ts +0 -110
- package/src/o11y/cost.test.ts +0 -41
- package/src/o11y/cost.ts +0 -81
- package/src/o11y/derive.test.ts +0 -161
- package/src/o11y/derive.ts +0 -301
- package/src/o11y/execution-tree.test.ts +0 -390
- package/src/o11y/execution-tree.ts +0 -391
- package/src/o11y/otlp/canonical.ts +0 -113
- package/src/o11y/otlp/mappers/bub.ts +0 -30
- package/src/o11y/otlp/mappers/claude-code.ts +0 -24
- package/src/o11y/otlp/mappers/codex.ts +0 -40
- package/src/o11y/otlp/mappers/index.ts +0 -14
- package/src/o11y/otlp/parse.ts +0 -334
- package/src/o11y/otlp/receiver.ts +0 -118
- package/src/o11y/otlp/sandbox-receiver.test.ts +0 -301
- package/src/o11y/otlp/sandbox-receiver.ts +0 -255
- package/src/o11y/otlp/select.ts +0 -86
- package/src/o11y/otlp/turn-otel.ts +0 -132
- package/src/o11y/parsers/bub.test.ts +0 -30
- package/src/o11y/parsers/bub.ts +0 -264
- package/src/o11y/parsers/claude-code.ts +0 -302
- package/src/o11y/parsers/codex.test.ts +0 -19
- package/src/o11y/parsers/codex.ts +0 -476
- package/src/o11y/parsers/hermes.ts +0 -199
- package/src/o11y/parsers/index.ts +0 -28
- package/src/o11y/parsers/openclaw.ts +0 -340
- package/src/o11y/parsers/opencode.ts +0 -300
- package/src/o11y/prices.json +0 -10812
- package/src/o11y/tool-names.ts +0 -74
- package/src/o11y/types.ts +0 -221
- package/src/record/annotated-source.test.ts +0 -329
- package/src/record/annotated-source.ts +0 -643
- package/src/record/attempt-evidence.test.ts +0 -208
- package/src/record/attempt-evidence.ts +0 -184
- package/src/record/attempt-source.ts +0 -37
- package/src/record/copy.ts +0 -303
- package/src/record/evidence-schema.test.ts +0 -85
- package/src/record/format.ts +0 -91
- package/src/record/host-equivalence.test.ts +0 -539
- package/src/record/index.ts +0 -119
- package/src/record/locator.test.ts +0 -125
- package/src/record/locator.ts +0 -178
- package/src/record/manifest.ts +0 -72
- package/src/record/open.ts +0 -758
- package/src/record/publish.ts +0 -7
- package/src/record/results.test.ts +0 -1563
- package/src/record/skipped-notice.ts +0 -44
- package/src/record/source-hash.ts +0 -28
- package/src/record/timing-activity.test.ts +0 -395
- package/src/record/truncate.ts +0 -116
- package/src/record/types.ts +0 -319
- package/src/record/writer.ts +0 -549
- package/src/report/assets/colors.ts +0 -69
- package/src/report/assets/enhance.js +0 -214
- package/src/report/assets/series-encoding.tsx +0 -177
- package/src/report/assets/styles.css +0 -1780
- package/src/report/built-in/failures.tsx +0 -29
- package/src/report/built-in/index.tsx +0 -66
- package/src/report/built-in/result-components.tsx +0 -404
- package/src/report/built-in/stability.tsx +0 -30
- package/src/report/built-in/standard.tsx +0 -132
- package/src/report/components/attempt-detail/attempt-components.test.tsx +0 -706
- package/src/report/components/attempt-detail/compute.ts +0 -544
- package/src/report/components/attempt-detail/content.tsx +0 -633
- package/src/report/components/attempt-detail/index.tsx +0 -285
- package/src/report/components/attempt-detail/validate.test.ts +0 -253
- package/src/report/components/attempt-detail/validate.tsx +0 -361
- package/src/report/components/cell.tsx +0 -79
- package/src/report/components/compute.test.ts +0 -1540
- package/src/report/components/entity-lists/compute.test.ts +0 -38
- package/src/report/components/entity-lists/compute.ts +0 -383
- package/src/report/components/entity-lists/content.test.ts +0 -611
- package/src/report/components/entity-lists/content.ts +0 -591
- package/src/report/components/entity-lists/index.tsx +0 -169
- package/src/report/components/entity-lists/validate.test.ts +0 -161
- package/src/report/components/entity-lists/validate.ts +0 -121
- package/src/report/components/experiment-detail/compute.ts +0 -40
- package/src/report/components/experiment-detail/experiment-detail.test.tsx +0 -181
- package/src/report/components/experiment-detail/index.tsx +0 -89
- package/src/report/components/fixtures.ts +0 -366
- package/src/report/components/scope.harness.ts +0 -83
- package/src/report/components/shared-compute.ts +0 -60
- package/src/report/components/shared-faces.ts +0 -25
- package/src/report/components/shared.test.ts +0 -62
- package/src/report/components/shared.ts +0 -127
- package/src/report/components/site-components/HeroCard.tsx +0 -87
- package/src/report/components/site-components/PoweredBy.tsx +0 -20
- package/src/report/components/site-components/compute.ts +0 -165
- package/src/report/components/site-components/content.ts +0 -8
- package/src/report/components/site-components/faces.ts +0 -46
- package/src/report/components/site-components/hero-types.ts +0 -20
- package/src/report/components/site-components/index.tsx +0 -109
- package/src/report/components/site-components/projections.ts +0 -74
- package/src/report/components/site-components/scope-warnings.ts +0 -160
- package/src/report/components/site-components/site-components.test.tsx +0 -460
- package/src/report/components/site-components/snapshot-diagnostics.ts +0 -69
- package/src/report/components/site-components/validate.test.ts +0 -121
- package/src/report/components/site-components/validators.ts +0 -97
- package/src/report/components/summaries/compute.ts +0 -66
- package/src/report/components/summaries/index.tsx +0 -255
- package/src/report/components/summaries/stability-overview.test.tsx +0 -141
- package/src/report/components/summaries/stability-overview.tsx +0 -105
- package/src/report/components/summaries/validate.test.ts +0 -49
- package/src/report/components/summaries/validate.ts +0 -21
- package/src/report/definition/callouts.test.tsx +0 -146
- package/src/report/definition/cell.ts +0 -203
- package/src/report/definition/chart.test.tsx +0 -285
- package/src/report/definition/conversation.test.tsx +0 -150
- package/src/report/definition/copy-block.test.tsx +0 -71
- package/src/report/definition/diff-view.test.tsx +0 -209
- package/src/report/definition/grid-layout.test.tsx +0 -262
- package/src/report/definition/grid-layout.ts +0 -203
- package/src/report/definition/markdown.test.tsx +0 -179
- package/src/report/definition/primitives/callouts-logic.ts +0 -117
- package/src/report/definition/primitives/callouts.tsx +0 -185
- package/src/report/definition/primitives/chart-map.ts +0 -214
- package/src/report/definition/primitives/chart.tsx +0 -1012
- package/src/report/definition/primitives/conversation.tsx +0 -345
- package/src/report/definition/primitives/copy-block.tsx +0 -87
- package/src/report/definition/primitives/diff-lines.ts +0 -212
- package/src/report/definition/primitives/diff-view.tsx +0 -332
- package/src/report/definition/primitives/markdown.tsx +0 -365
- package/src/report/definition/primitives/marks-contract.test.tsx +0 -45
- package/src/report/definition/primitives/marks.tsx +0 -254
- package/src/report/definition/primitives/points-dataset.test.ts +0 -117
- package/src/report/definition/primitives/points-dataset.ts +0 -168
- package/src/report/definition/primitives/source-view.tsx +0 -359
- package/src/report/definition/primitives/waterfall.tsx +0 -386
- package/src/report/definition/primitives.test.tsx +0 -186
- package/src/report/definition/primitives.tsx +0 -1150
- package/src/report/definition/report-contract.test.ts +0 -119
- package/src/report/definition/report.ts +0 -562
- package/src/report/definition/shell-head.test.ts +0 -100
- package/src/report/definition/source-view.test.tsx +0 -119
- package/src/report/definition/stat.test.tsx +0 -45
- package/src/report/definition/table-text.ts +0 -228
- package/src/report/definition/table.test.tsx +0 -633
- package/src/report/definition/tree.ts +0 -852
- package/src/report/definition/waterfall.test.tsx +0 -581
- package/src/report/extension/assets.ts +0 -154
- package/src/report/extension/define.test.tsx +0 -228
- package/src/report/extension/define.ts +0 -182
- package/src/report/extension/index.ts +0 -23
- package/src/report/extension/meta.ts +0 -21
- package/src/report/extension/types.ts +0 -64
- package/src/report/index.ts +0 -410
- package/src/report/model/aggregate.ts +0 -463
- package/src/report/model/calculation.test.ts +0 -354
- package/src/report/model/calculation.ts +0 -659
- package/src/report/model/chart/math.test.ts +0 -189
- package/src/report/model/chart/math.ts +0 -245
- package/src/report/model/chart/plot.ts +0 -144
- package/src/report/model/conversions.ts +0 -150
- package/src/report/model/dataset.ts +0 -80
- package/src/report/model/evaluation-kind.ts +0 -35
- package/src/report/model/flag.ts +0 -174
- package/src/report/model/format.ts +0 -375
- package/src/report/model/locale.ts +0 -510
- package/src/report/model/metrics.ts +0 -256
- package/src/report/model/panel.test.ts +0 -272
- package/src/report/model/panel.ts +0 -340
- package/src/report/model/presentation.test.ts +0 -141
- package/src/report/model/text-layout.ts +0 -190
- package/src/report/model/types.ts +0 -824
- package/src/report/presentation.test.tsx +0 -474
- package/src/report/presentation.ts +0 -354
- package/src/report/react/index.tsx +0 -96
- package/src/report/runtime/dual-render.test.tsx +0 -1088
- package/src/report/runtime/host.test.ts +0 -86
- package/src/report/runtime/host.ts +0 -317
- package/src/report/runtime/load.test.ts +0 -34
- package/src/report/runtime/load.ts +0 -159
- package/src/report/runtime/page-render.test.tsx +0 -247
- package/src/report/runtime/page-render.ts +0 -147
- package/src/report/runtime/resolved-page.test.tsx +0 -81
- package/src/report/runtime/resolved-page.ts +0 -169
- package/src/report/runtime/target.ts +0 -50
- package/src/report/runtime/text.ts +0 -155
- package/src/report/runtime/web.ts +0 -65
- package/src/report/slices/compute.ts +0 -979
- package/src/report/slices/content.ts +0 -157
- package/src/report/slices/delta-table.test.ts +0 -423
- package/src/report/slices/stability-matrix.test.ts +0 -169
- package/src/report/slices/validate.test.ts +0 -236
- package/src/report/slices/validate.ts +0 -216
- package/src/report/tasks.test.ts +0 -82
- package/src/report/tasks.ts +0 -553
- package/src/report/theme.test.ts +0 -32
- package/src/report/theme.ts +0 -141
- package/src/runner/accept-prompt.test.ts +0 -51
- package/src/runner/accept-prompt.ts +0 -67
- package/src/runner/accept.test.ts +0 -592
- package/src/runner/accept.ts +0 -705
- package/src/runner/attempt.test.ts +0 -1989
- package/src/runner/attempt.ts +0 -1912
- package/src/runner/build-preparation-plan.test.ts +0 -119
- package/src/runner/build-preparation.ts +0 -104
- package/src/runner/cleanup-timeout.test.ts +0 -16
- package/src/runner/cleanup-timeout.ts +0 -23
- package/src/runner/config-identity.test.ts +0 -277
- package/src/runner/config-identity.ts +0 -318
- package/src/runner/direct-agent-sandbox.test.ts +0 -48
- package/src/runner/direct-agent-sandbox.ts +0 -68
- package/src/runner/discover.test.ts +0 -262
- package/src/runner/discover.ts +0 -469
- package/src/runner/eval-selection.test.ts +0 -241
- package/src/runner/eval-selection.ts +0 -139
- package/src/runner/eval-source.test.ts +0 -108
- package/src/runner/eval-source.ts +0 -82
- package/src/runner/experiment-cleanup-registry.test.ts +0 -89
- package/src/runner/experiment-cleanup-registry.ts +0 -39
- package/src/runner/experiment-labels.test.ts +0 -100
- package/src/runner/feedback/coordinator.test.ts +0 -367
- package/src/runner/feedback/coordinator.ts +0 -511
- package/src/runner/feedback/eval-conclusions.test.ts +0 -135
- package/src/runner/feedback/eval-conclusions.ts +0 -115
- package/src/runner/feedback/failure.test.ts +0 -104
- package/src/runner/feedback/failure.ts +0 -60
- package/src/runner/feedback/human.test.ts +0 -1722
- package/src/runner/feedback/human.ts +0 -1499
- package/src/runner/feedback/index.ts +0 -94
- package/src/runner/feedback/input-guard.test.ts +0 -251
- package/src/runner/feedback/input-guard.ts +0 -171
- package/src/runner/feedback/io.ts +0 -82
- package/src/runner/feedback/json.test.ts +0 -617
- package/src/runner/feedback/json.ts +0 -708
- package/src/runner/feedback/profile.test.ts +0 -28
- package/src/runner/feedback/profile.ts +0 -23
- package/src/runner/feedback/reducer.test.ts +0 -908
- package/src/runner/feedback/reducer.ts +0 -411
- package/src/runner/feedback/renderer.ts +0 -83
- package/src/runner/feedback/sink.ts +0 -332
- package/src/runner/feedback/testing.ts +0 -109
- package/src/runner/fingerprint.test.ts +0 -1406
- package/src/runner/fingerprint.ts +0 -924
- package/src/runner/gate-lease.test.ts +0 -555
- package/src/runner/gate-lease.ts +0 -398
- package/src/runner/judge-config.test.ts +0 -32
- package/src/runner/judge-config.ts +0 -26
- package/src/runner/leak-gate.test.ts +0 -195
- package/src/runner/leak-gate.ts +0 -364
- package/src/runner/ledger.test.ts +0 -577
- package/src/runner/ledger.ts +0 -533
- package/src/runner/lock.test.ts +0 -498
- package/src/runner/lock.ts +0 -334
- package/src/runner/manifest.ts +0 -282
- package/src/runner/report.test.ts +0 -238
- package/src/runner/report.ts +0 -127
- package/src/runner/reporters/artifacts.ts +0 -120
- package/src/runner/reporters/braintrust.test.ts +0 -109
- package/src/runner/reporters/braintrust.ts +0 -211
- package/src/runner/reporters/index.ts +0 -7
- package/src/runner/reporters/json.test.ts +0 -163
- package/src/runner/reporters/json.ts +0 -79
- package/src/runner/reporters/shared.ts +0 -14
- package/src/runner/reuse-diagnostics.test.ts +0 -114
- package/src/runner/reuse-diagnostics.ts +0 -92
- package/src/runner/reuse-pool-key.test.ts +0 -22
- package/src/runner/run.test.ts +0 -5319
- package/src/runner/run.ts +0 -2656
- package/src/runner/sandbox-pool-plan.test.ts +0 -180
- package/src/runner/sandbox-pool.test.ts +0 -278
- package/src/runner/sandbox-pool.ts +0 -337
- package/src/runner/sandbox-prep.ts +0 -55
- package/src/runner/sandbox-selection.test.ts +0 -288
- package/src/runner/sandbox-selection.ts +0 -351
- package/src/runner/session.test.ts +0 -112
- package/src/runner/session.ts +0 -466
- package/src/runner/teardown-registry.test.ts +0 -156
- package/src/runner/teardown-registry.ts +0 -146
- package/src/runner/timeout-attribution.test.ts +0 -34
- package/src/runner/timeout.ts +0 -54
- package/src/runner/timing.ts +0 -379
- package/src/runner/types.ts +0 -1733
- package/src/sample/index.ts +0 -483
- package/src/sample/sample.test.ts +0 -622
- package/src/sandbox/backend.ts +0 -140
- package/src/sandbox/build-coordinator.test.ts +0 -333
- package/src/sandbox/build-coordinator.ts +0 -444
- package/src/sandbox/case-types.ts +0 -67
- package/src/sandbox/checkpoint.test.ts +0 -55
- package/src/sandbox/checkpoint.ts +0 -64
- package/src/sandbox/cli-commands.test.ts +0 -524
- package/src/sandbox/cli-commands.ts +0 -593
- package/src/sandbox/commands.ts +0 -287
- package/src/sandbox/compose.test.ts +0 -625
- package/src/sandbox/compose.ts +0 -1291
- package/src/sandbox/content.ts +0 -202
- package/src/sandbox/deadline.ts +0 -73
- package/src/sandbox/docker-agent-image.ts +0 -36
- package/src/sandbox/docker-stream.ts +0 -116
- package/src/sandbox/docker.test.ts +0 -263
- package/src/sandbox/docker.ts +0 -836
- package/src/sandbox/dockerfile-agent-cache.test.ts +0 -157
- package/src/sandbox/dockerfile-agent-cache.ts +0 -155
- package/src/sandbox/dockerfile-agent-runtime.test.ts +0 -166
- package/src/sandbox/dockerfile-build.test.ts +0 -27
- package/src/sandbox/dockerfile-build.ts +0 -269
- package/src/sandbox/dockerfile-identity.ts +0 -129
- package/src/sandbox/download-directory.test.ts +0 -68
- package/src/sandbox/download-directory.ts +0 -36
- package/src/sandbox/e2b-agent-template.test.ts +0 -107
- package/src/sandbox/e2b-agent-template.ts +0 -194
- package/src/sandbox/e2b-reconcile.test.ts +0 -126
- package/src/sandbox/e2b.test.ts +0 -629
- package/src/sandbox/e2b.ts +0 -781
- package/src/sandbox/errors.test.ts +0 -72
- package/src/sandbox/errors.ts +0 -203
- package/src/sandbox/identity.ts +0 -203
- package/src/sandbox/index.ts +0 -138
- package/src/sandbox/io-retry.test.ts +0 -58
- package/src/sandbox/io-retry.ts +0 -45
- package/src/sandbox/keep-registry.test.ts +0 -141
- package/src/sandbox/keep-registry.ts +0 -271
- package/src/sandbox/keep.test.ts +0 -538
- package/src/sandbox/keep.ts +0 -405
- package/src/sandbox/layer.test.ts +0 -343
- package/src/sandbox/layer.ts +0 -1641
- package/src/sandbox/ledger-paths.ts +0 -37
- package/src/sandbox/link.test.ts +0 -321
- package/src/sandbox/link.ts +0 -484
- package/src/sandbox/local-files.ts +0 -31
- package/src/sandbox/local.test.ts +0 -216
- package/src/sandbox/local.ts +0 -364
- package/src/sandbox/official-baselines.test.ts +0 -175
- package/src/sandbox/operations.test.ts +0 -391
- package/src/sandbox/operations.ts +0 -187
- package/src/sandbox/orphans.test.ts +0 -470
- package/src/sandbox/orphans.ts +0 -261
- package/src/sandbox/paths.test.ts +0 -141
- package/src/sandbox/paths.ts +0 -132
- package/src/sandbox/plan.test.ts +0 -487
- package/src/sandbox/plan.ts +0 -353
- package/src/sandbox/prepare-commands.test.ts +0 -168
- package/src/sandbox/prepare-commands.ts +0 -342
- package/src/sandbox/redaction.test.ts +0 -48
- package/src/sandbox/redaction.ts +0 -50
- package/src/sandbox/registry.ts +0 -78
- package/src/sandbox/retry.test.ts +0 -138
- package/src/sandbox/retry.ts +0 -86
- package/src/sandbox/run-identity.ts +0 -120
- package/src/sandbox/runtime.test.ts +0 -551
- package/src/sandbox/runtime.ts +0 -984
- package/src/sandbox/shell.test.ts +0 -23
- package/src/sandbox/shell.ts +0 -18
- package/src/sandbox/transfer-errors.test.ts +0 -116
- package/src/sandbox/transfer-errors.ts +0 -118
- package/src/sandbox/types.ts +0 -196
- package/src/sandbox/vercel.test.ts +0 -180
- package/src/sandbox/vercel.ts +0 -400
- package/src/shared/aggregate.test.ts +0 -52
- package/src/shared/aggregate.ts +0 -99
- package/src/shared/entry-file-store.test.ts +0 -193
- package/src/shared/entry-file-store.ts +0 -145
- package/src/shared/external-cause.ts +0 -322
- package/src/shared/facts.ts +0 -36
- package/src/shared/failure-class.test.ts +0 -195
- package/src/shared/failure-class.ts +0 -206
- package/src/shared/format.ts +0 -26
- package/src/shared/json-match.ts +0 -42
- package/src/shared/json-value.test.ts +0 -24
- package/src/shared/json-value.ts +0 -36
- package/src/shared/turn-label.test.ts +0 -20
- package/src/shared/turn-label.ts +0 -15
- package/src/shared/types.ts +0 -101
- package/src/shared/verdict.ts +0 -82
- package/src/show/command.test.ts +0 -36
- package/src/show/command.ts +0 -18
- package/src/show/compose.ts +0 -89
- package/src/show/index.test.ts +0 -95
- package/src/show/index.ts +0 -1226
- package/src/show/json.test.ts +0 -412
- package/src/show/json.ts +0 -106
- package/src/show/render.test.ts +0 -857
- package/src/show/render.ts +0 -1510
- package/src/source-loc.ts +0 -134
- package/src/tty-line.ts +0 -14
- package/src/types.ts +0 -37
- package/src/util.test.ts +0 -77
- package/src/util.ts +0 -138
- package/src/view/app/App.tsx +0 -351
- package/src/view/app/components/ui/dialog.tsx +0 -36
- package/src/view/app/components/ui/tabs.tsx +0 -30
- package/src/view/app/css.d.ts +0 -3
- package/src/view/app/i18n.ts +0 -65
- package/src/view/app/index.html +0 -13
- package/src/view/app/lib/cn.ts +0 -7
- package/src/view/app/lib/target-dialog.test.ts +0 -105
- package/src/view/app/lib/target-dialog.ts +0 -110
- package/src/view/app/main.tsx +0 -109
- package/src/view/app/types.ts +0 -15
- package/src/view/app/vite.config.ts +0 -26
- package/src/view/data.test.ts +0 -541
- package/src/view/data.ts +0 -950
- package/src/view/index.ts +0 -91
- package/src/view/server-rebuild.test.ts +0 -323
- package/src/view/server-watch.test.ts +0 -106
- package/src/view/server.ts +0 -484
- package/src/view/shared/types.ts +0 -93
- package/src/view/site-base.test.ts +0 -51
- package/src/view/site-head.test.ts +0 -142
- package/src/view/site-param-pages.test.ts +0 -186
- package/src/view/site-renderer-assets.test.ts +0 -68
- package/src/view/site.ts +0 -484
- package/src/view/styles.css +0 -170
- /package/dist/{report/components/site-components/hero-types.js → cli/bootstrap.d.cts} +0 -0
- /package/{src → dist}/view/client-dist/app.css +0 -0
- /package/{src → dist}/view/client-dist/app.js +0 -0
- /package/{src → dist}/view/template.html +0 -0
package/src/runner/attempt.ts
DELETED
|
@@ -1,1912 +0,0 @@
|
|
|
1
|
-
// 单个 attempt 的完整生命周期:资源(沙箱 / OTLP 接收器)经 Effect.Sample 的
|
|
2
|
-
// acquireRelease 接管,无论 body 成功 / 抛错 / 被中断,stop() / close() 都保证执行。
|
|
3
|
-
// 沙箱编排的固定段在 runAttemptBody(基线→setup→驱动 test→采 diff→评分→判定→收 trace),
|
|
4
|
-
// adapter 只填「把 agent 跑起来」一段。
|
|
5
|
-
|
|
6
|
-
import { resolve as resolvePath } from "node:path";
|
|
7
|
-
import { readFile as readSourceFile } from "node:fs/promises";
|
|
8
|
-
import { Effect, Cause, Duration, Either, Option } from "effect";
|
|
9
|
-
import {
|
|
10
|
-
materializeSandboxRunPlan,
|
|
11
|
-
liveSandboxRuntimeServices,
|
|
12
|
-
sandboxRuntimeCapabilities,
|
|
13
|
-
type SandboxRuntimeDeadline,
|
|
14
|
-
} from "../sandbox/runtime.ts";
|
|
15
|
-
import type { ConcurrencySlot } from "../context/send-retry.ts";
|
|
16
|
-
import { unregisterSandbox } from "../sandbox/registry.ts";
|
|
17
|
-
import { CLEANUP_TIMEOUT_MS, withCleanupTimeout } from "./cleanup-timeout.ts";
|
|
18
|
-
import { resolveAttemptTimeout, type TimeoutSource } from "./timeout.ts";
|
|
19
|
-
import { resolveJudge } from "./judge-config.ts";
|
|
20
|
-
import { SandboxCommandTimeoutError } from "../sandbox/deadline.ts";
|
|
21
|
-
import { ExperimentFatalError } from "../shared/failure-class.ts";
|
|
22
|
-
import type { ExternalCause } from "../shared/external-cause.ts";
|
|
23
|
-
import { computeExpiresAt, nativeEnterCommand, suspendSandbox } from "../sandbox/keep.ts";
|
|
24
|
-
import { keptEntryId, updateKeptEntry, writeKeptEntry } from "../sandbox/keep-registry.ts";
|
|
25
|
-
import { runAgentEnsure, verifySandboxTargetPlatform } from "../agents/provisioner.ts";
|
|
26
|
-
import { createTraceReceiver, type TraceReceiver } from "../o11y/otlp/receiver.ts";
|
|
27
|
-
import { createInSandboxTraceReceiver } from "../o11y/otlp/sandbox-receiver.ts";
|
|
28
|
-
import { AgentOtelChannel } from "../o11y/otlp/turn-otel.ts";
|
|
29
|
-
import { selectTraceSpans, enrichTraceWithIO } from "../o11y/otlp/select.ts";
|
|
30
|
-
import { mapGenericSpans } from "../o11y/otlp/mappers/index.ts";
|
|
31
|
-
import { createEvalContext } from "../context/context.ts";
|
|
32
|
-
import { createAgentSession } from "../context/session.ts";
|
|
33
|
-
import { EvalRequirementFailed, EvalSkipped } from "../context/control-flow.ts";
|
|
34
|
-
import { isSendFailure, sendFailureText } from "../context/send-failures.ts";
|
|
35
|
-
import { computeVerdict } from "../shared/verdict.ts";
|
|
36
|
-
import { deriveRunFacts, buildO11ySummary } from "../o11y/derive.ts";
|
|
37
|
-
import { estimateCost } from "../o11y/cost.ts";
|
|
38
|
-
import { t } from "../i18n/index.ts";
|
|
39
|
-
import { describeError, firstLine, formatThrown } from "../util.ts";
|
|
40
|
-
import { createChangeLedger, type ChangeLedger } from "./ledger.ts";
|
|
41
|
-
import { deriveDiffData, emptyDiffData } from "../assertions/diff.ts";
|
|
42
|
-
import { createDirectAgentSandbox } from "./direct-agent-sandbox.ts";
|
|
43
|
-
import { createSandboxCommandTarget, SandboxCommandExitError } from "../sandbox/operations.ts";
|
|
44
|
-
import { inheritSandboxCapabilities } from "../sandbox/backend.ts";
|
|
45
|
-
import {
|
|
46
|
-
commandSensitiveValues,
|
|
47
|
-
redactSensitiveEvidence,
|
|
48
|
-
redactSensitiveText,
|
|
49
|
-
rememberSensitiveValues,
|
|
50
|
-
} from "../sandbox/redaction.ts";
|
|
51
|
-
import type { SandboxCleanupCommand, SandboxCommandContext } from "../sandbox/commands.ts";
|
|
52
|
-
import { sandboxLayerIdentityFor } from "../sandbox/link.ts";
|
|
53
|
-
import { agentInstallPlansForRun } from "./config-identity.ts";
|
|
54
|
-
import { recordFact, type FactValue } from "../shared/facts.ts";
|
|
55
|
-
import { formatTurnLabel } from "../shared/turn-label.ts";
|
|
56
|
-
import { createSourceRegistry, withSourceRegistry, type SourceRegistry } from "../source-loc.ts";
|
|
57
|
-
import {
|
|
58
|
-
attemptFailureInfo,
|
|
59
|
-
resolveAttemptFailureClass,
|
|
60
|
-
type AttemptFailureClassifier,
|
|
61
|
-
type FailureClass,
|
|
62
|
-
} from "../shared/failure-class.ts";
|
|
63
|
-
import type { CapturedEvalSource } from "./eval-source.ts";
|
|
64
|
-
import type {
|
|
65
|
-
AgentContext,
|
|
66
|
-
SandboxAgentContext,
|
|
67
|
-
AgentSetupManifest,
|
|
68
|
-
Config,
|
|
69
|
-
DiagnosticInput,
|
|
70
|
-
DiffArtifact,
|
|
71
|
-
EvalResult,
|
|
72
|
-
CommandExitEvidence,
|
|
73
|
-
JudgeConfig,
|
|
74
|
-
JsonValue,
|
|
75
|
-
Sandbox,
|
|
76
|
-
ScopedFeedback,
|
|
77
|
-
AssertionEvaluationContext,
|
|
78
|
-
ScriptResult,
|
|
79
|
-
SourceArtifact,
|
|
80
|
-
StreamEvent,
|
|
81
|
-
Telemetry,
|
|
82
|
-
TimingActivity,
|
|
83
|
-
TraceSpan,
|
|
84
|
-
Usage,
|
|
85
|
-
RetryAttemptRecord,
|
|
86
|
-
ScoreTestContext,
|
|
87
|
-
} from "../types.ts";
|
|
88
|
-
import { reportAttemptLifecycle, reportDiagnostic, reportKept } from "./feedback/sink.ts";
|
|
89
|
-
import { encodeAttemptKey, runWho } from "./types.ts";
|
|
90
|
-
import { attemptOrigin, commandDisplay, commandLimitAttribution, commandNode, createTimingRecorder, sandboxPrepareActivity, turnActivity, workspaceDiffExportActivity, type TimingRecorder } from "./timing.ts";
|
|
91
|
-
import type {
|
|
92
|
-
AgentRun,
|
|
93
|
-
Attempt,
|
|
94
|
-
AttemptError,
|
|
95
|
-
TimeoutAttribution,
|
|
96
|
-
AttemptRef,
|
|
97
|
-
DiagnosticRecord,
|
|
98
|
-
LifecyclePhase,
|
|
99
|
-
RunOptions,
|
|
100
|
-
} from "./types.ts";
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* 一次终局失败的空间轴回执:止损闸的消费点(见 docs/feature/error-classification/architecture.md
|
|
104
|
-
* 「止损执行体」)。`class` 是分类链决议出的 `FailureClass`,`text` 与报错文案同源(作者的修复
|
|
105
|
-
* 提示),`phase` 是失败所在的生命周期阶段。回执是旁路:不改 verdict、不改 `AttemptError` 形状,
|
|
106
|
-
* 也不走错误通道传播(attempt fiber 的 `E` 仍恒为 `never`)。
|
|
107
|
-
*/
|
|
108
|
-
export interface AttemptFailureDeclaration {
|
|
109
|
-
readonly class: FailureClass;
|
|
110
|
-
readonly phase: LifecyclePhase;
|
|
111
|
-
readonly text: string;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* 一次终局失败的空间轴决议:走三道链(抛出点声明 → 实验分类器 → 缺省不可重试,见
|
|
116
|
-
* src/shared/failure-class.ts 的 `resolveAttemptFailureClass`),缺省档(`scope` 省略或
|
|
117
|
-
* `"attempt"`)返回 undefined —— 死因只属于本次执行,没有闸可落。
|
|
118
|
-
*
|
|
119
|
-
* **必须在把错误折成纯数据 `AttemptError` 之前调**:折完之后原错误对象(连同它携带的
|
|
120
|
-
* `_tag`/`class` 与 cause 链)就不再是任何人的引用,空间轴声明再也读不出来。
|
|
121
|
-
* attempt 内的失败(本文件的 `declareFailure`)与 attempt 开跑前的资源获取失败
|
|
122
|
-
* (run.ts 的复用池租借)共用这一份决议,两处不各写一遍链。
|
|
123
|
-
*/
|
|
124
|
-
export function attemptFailureDeclaration(
|
|
125
|
-
classify: AttemptFailureClassifier | undefined,
|
|
126
|
-
phase: LifecyclePhase,
|
|
127
|
-
e: unknown,
|
|
128
|
-
): AttemptFailureDeclaration | undefined {
|
|
129
|
-
const info = attemptFailureInfo(phase, e);
|
|
130
|
-
const cls = resolveAttemptFailureClass(info, classify);
|
|
131
|
-
if (cls.scope !== "eval" && cls.scope !== "experiment") return undefined;
|
|
132
|
-
return { class: cls, phase, text: info.text };
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export interface RunAttemptEffectOptions {
|
|
136
|
-
/** Run 级构建执行产出的 locator;key 集合必须与 Attempt.plan 的完成态物理计划完全一致。 */
|
|
137
|
-
readonly buildLocators: ReadonlyMap<string, JsonValue>;
|
|
138
|
-
/** Invocation 级 Run timing,供 Dockerfile Agent 派生镜像 lookup/build 观测。 */
|
|
139
|
-
readonly runTiming?: import("./timing.ts").RunTimingRecorder;
|
|
140
|
-
/** 父级调度器的中断信号;测试直调时省略。 */
|
|
141
|
-
parentSignal?: AbortSignal;
|
|
142
|
-
/** 每次跨入一个新 `LifecyclePhase` 边界时同步回调一次(与下面的 `enterPhase` 同一调用点,见
|
|
143
|
-
* 该函数)。run.ts 用它在本地跟踪「这个 attempt 目前所在的阶段」,好在 attempt 失败/errored
|
|
144
|
-
* 时把 phase 塞进 `reportFailure()`(见 sink.ts 的 `FailureInput.phase`)—— 到那时
|
|
145
|
-
* attempt:complete 已经让 coordinator 把 active map 里的条目删掉,没有别的地方能事后查到。 */
|
|
146
|
-
onPhase?: (phase: LifecyclePhase) => void;
|
|
147
|
-
/**
|
|
148
|
-
* turn 级重试退避期间释放/收回的全局并发槽位(globalSem / 实验级 runSem,见 run.ts 的调用点)。
|
|
149
|
-
* 省略时(如测试直调)退避不释放槽位。
|
|
150
|
-
*/
|
|
151
|
-
concurrencySlot?: ConcurrencySlot;
|
|
152
|
-
/**
|
|
153
|
-
* 终局失败的空间轴回执(每条终局失败各回调一次,含 per-attempt teardown 的失败——teardown
|
|
154
|
-
* 声明照常落闸、不改 verdict,见 architecture.md「生命周期边界」)。省略(如测试直调)时
|
|
155
|
-
* 分类照常决议、只是无人消费。回调必须不抛错:它跑在 attempt 的失败路径上,不得掩盖原始失败。
|
|
156
|
-
*/
|
|
157
|
-
onFailureClass?: (declaration: AttemptFailureDeclaration) => void;
|
|
158
|
-
/** 由复用池独占借出的实例;池负责物理 Sandbox 生命周期与最终 stop。 */
|
|
159
|
-
reusedSandbox?: {
|
|
160
|
-
sandbox: Sandbox;
|
|
161
|
-
reuseSandbox: number;
|
|
162
|
-
reuseOrdinal: number;
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export function runAttemptEffect(
|
|
167
|
-
a: Attempt,
|
|
168
|
-
opts: RunOptions,
|
|
169
|
-
sandboxSem: Effect.Semaphore,
|
|
170
|
-
{ buildLocators, runTiming, parentSignal, onPhase, concurrencySlot, onFailureClass, reusedSandbox }: RunAttemptEffectOptions,
|
|
171
|
-
): Effect.Effect<EvalResult> {
|
|
172
|
-
const config = opts.config;
|
|
173
|
-
const { evalDef, run, attempt } = a;
|
|
174
|
-
const niceevalRoot = opts.niceevalRoot ?? `${process.cwd()}/.niceeval`;
|
|
175
|
-
const t0 = Date.now();
|
|
176
|
-
|
|
177
|
-
const base: EvalResult = {
|
|
178
|
-
id: evalDef.id,
|
|
179
|
-
description: evalDef.description,
|
|
180
|
-
experimentId: run.experimentId,
|
|
181
|
-
experiment: experimentRunInfo(run, a.plan, a.sandboxPlansByEval, config, evalDef.judge),
|
|
182
|
-
agent: run.agent.name,
|
|
183
|
-
model: run.model,
|
|
184
|
-
verdict: "errored",
|
|
185
|
-
fingerprint: a.fingerprint,
|
|
186
|
-
configHash: a.configHash,
|
|
187
|
-
attempt,
|
|
188
|
-
startedAt: new Date(t0).toISOString(),
|
|
189
|
-
durationMs: 0,
|
|
190
|
-
assertions: [],
|
|
191
|
-
evidenceCoverage: run.agent.evidenceCoverage,
|
|
192
|
-
evaluationKind: evalDef.evaluationKind ?? "pass",
|
|
193
|
-
// 资源获取/硬超时等在 collector 尚不可用前就可能收束;计分制的异常骨架也保持该字段的
|
|
194
|
-
// 读取面(空数组而非缺失),与正常路径一致。
|
|
195
|
-
...(evalDef.evaluationKind === "points" ? { scoreEntries: [] } : {}),
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* 调度事实:Sandbox 租借给这条 Attempt 的那一刻定死(复用池借出的实例在进入本函数时就已经
|
|
200
|
-
* 借定,一次性沙箱在 create 返回那一刻借定)。Attempt 在任何阶段终结——Eval `setup` 失败、
|
|
201
|
-
* 超时、资源获取失败——记录里都要带全 provider / sandboxId / reused / 编号与承接序号,
|
|
202
|
-
* 只有 `kept` 在收尾时点决定(见 docs/feature/record/architecture.md 的 `sandbox` 字段)。
|
|
203
|
-
* 所以它挂在唯一出口(下方 Effect.map)上,而不是分散在各条返回路径里。
|
|
204
|
-
*/
|
|
205
|
-
let sandboxFacts: NonNullable<EvalResult["sandbox"]> | undefined;
|
|
206
|
-
/** 留存提交成功(`--keep-sandbox`)——唯一一个在收尾时点才知道的 sandbox 记录键。 */
|
|
207
|
-
let kept = false;
|
|
208
|
-
if (reusedSandbox && run.agent.kind === "sandbox") {
|
|
209
|
-
if (a.plan._tag !== "Sandbox") {
|
|
210
|
-
throw new Error(`sandbox agent ${JSON.stringify(run.agent.name)} received a Direct plan`);
|
|
211
|
-
}
|
|
212
|
-
sandboxFacts = {
|
|
213
|
-
provider: a.plan.providerPlan.provider,
|
|
214
|
-
sandboxId: reusedSandbox.sandbox.sandboxId,
|
|
215
|
-
reused: true,
|
|
216
|
-
reuseSandbox: reusedSandbox.reuseSandbox,
|
|
217
|
-
reuseOrdinal: reusedSandbox.reuseOrdinal,
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// 四层解析链的最后两层(eval → config)在这里接上,并把赢家那一层带出来:超时消息要说得出
|
|
222
|
-
// 「这个上限是哪一层给的」,否则撞线时得回头逐层对照四个声明点(契约见
|
|
223
|
-
// docs/feature/experiments/cli.md「timeout、budget 与基础设施错误」)。
|
|
224
|
-
// 四层都没声明 = 无上限:不挂 deadline、不发软截止信号,也不给 provider 递命令超时,
|
|
225
|
-
// 链末端不发明一条隐藏的线。
|
|
226
|
-
const attemptTimeout = resolveAttemptTimeout(run, evalDef, config);
|
|
227
|
-
// deadline 的截止**时刻**:沙箱内一切时限从它派生(单条命令未显式传 timeout 时上限 =
|
|
228
|
-
// 剩余量,见 sandbox/deadline.ts)。与下面那条软截止信号同一个锚点,不各取各的 now()。
|
|
229
|
-
const deadlineAt = attemptTimeout ? Date.now() + attemptTimeout.timeoutMs : undefined;
|
|
230
|
-
// timeoutSignal:给协作式 adapter / docker 命令的「软」截止信号(到点 abort,让能看 signal 的
|
|
231
|
-
// 提前优雅停)。但它【不是】attempt 总超时的硬保证 —— 真正的硬边界是下面的 Effect.timeoutTo:
|
|
232
|
-
// 它中断整段 body,触发 Sample release(停容器),从而即便 adapter 完全无视 signal 也能停掉(P1)。
|
|
233
|
-
const timeoutSignal = attemptTimeout ? AbortSignal.timeout(attemptTimeout.timeoutMs) : undefined;
|
|
234
|
-
// 无上限时 signal 仍必须存在(下游 ctx / adapter 一律读它):用一个永不 abort 的信号,
|
|
235
|
-
// 不用 timeoutSignal 冒充。
|
|
236
|
-
const signal =
|
|
237
|
-
parentSignal && timeoutSignal
|
|
238
|
-
? AbortSignal.any([parentSignal, timeoutSignal])
|
|
239
|
-
: (parentSignal ?? timeoutSignal ?? new AbortController().signal);
|
|
240
|
-
|
|
241
|
-
// Attempt 阶段的正式生命周期投影(见 docs/feature/experiments/cli.md「Attempt 阶段」)。
|
|
242
|
-
// run.ts 在这个 attempt 的 body Effect 真正开始跑之前,已经先发出过一次 attempt:start(占位
|
|
243
|
-
// phase,见 run.ts 的 attempt:start emission,和这里的 eval:start 是同一个调用点),所以这里
|
|
244
|
-
// 只需要在每个「实际执行到的」边界调 enterPhase() 覆盖上一个 phase(attempt:phase),不需要
|
|
245
|
-
// 自己区分「第一次」。没有对应 hook/配置的步骤直接不调用,不产生空阶段(如没有 setup 的 agent
|
|
246
|
-
// 跳过 agent-setup)。没有活跃 feedback coordinator 时 reportAttemptLifecycle 静默 no-op,
|
|
247
|
-
// 不产生任何终端输出。
|
|
248
|
-
const identity: AttemptRef = { experimentId: run.experimentId, evalId: evalDef.id, attempt };
|
|
249
|
-
// 最近跨入的正式 phase:errored 结果的 `error.phase` 从它取(见下方 timeout / scope
|
|
250
|
-
// 兜底与 runAttemptBody 的 body catch)。body 与本函数共用同一个 enterPhase 闭包(经 res 传下去),
|
|
251
|
-
// 所以 body 内部的阶段推进也会更新它,不需要 body 再单独维护一份。
|
|
252
|
-
// 阶段计时:live 展示、error.phase、落盘 phases[].name 用同一套 LifecyclePhase 闭集,
|
|
253
|
-
// 一次 enterPhase 同时推进三者(词表全仓只有一套,见 runner/types.ts 的 LifecyclePhase)。
|
|
254
|
-
let lastPhase: LifecyclePhase | undefined;
|
|
255
|
-
const recorder = createTimingRecorder();
|
|
256
|
-
// adapter send 在飞时,错误/诊断归因到嵌套的 `agent.run`(eval.run 内打开,不单列计时条目)。
|
|
257
|
-
let sendActive = false;
|
|
258
|
-
// 超时证据保全的外层句柄:与 recorder 同一模式,runAttemptBody 内部一建好 SessionManager /
|
|
259
|
-
// ChangeLedger 就经 AttemptResources.registerEvidence/registerLedger 登记回这里——中断后由
|
|
260
|
-
// Sample 外层直接读它们组装结果,不随被 Effect 中断放弃的 body fiber 一起消失(见
|
|
261
|
-
// docs/runner.md「超时:双层保护」超时不丢证据)。
|
|
262
|
-
let liveEvents: (() => readonly StreamEvent[]) | undefined;
|
|
263
|
-
let liveUsage: (() => Usage) | undefined;
|
|
264
|
-
let liveRetryAttempts: (() => readonly RetryAttemptRecord[]) | undefined;
|
|
265
|
-
let liveLedger: ChangeLedger | undefined;
|
|
266
|
-
// Effect.timeoutTo 的 onTimeout 是同步回调,在中断真正下发给 body fiber(从而触发下面的
|
|
267
|
-
// finalizer 链)之前就已经跑完并同步置位这个标记——下面新增的 finalizer 靠它判断本次 Sample
|
|
268
|
-
// release 是不是超时触发的,只在超时路径补折叠证据,正常收尾路径不重复做(见文件顶部
|
|
269
|
-
// Effect.timeoutTo 调用点的注释)。
|
|
270
|
-
let timedOut = false;
|
|
271
|
-
let timeoutDiff: DiffArtifact | undefined;
|
|
272
|
-
let timeoutSources: SourceArtifact[] | undefined;
|
|
273
|
-
const enterPhase = (phase: LifecyclePhase) => {
|
|
274
|
-
lastPhase = phase;
|
|
275
|
-
recorder.enter(phase);
|
|
276
|
-
onPhase?.(phase);
|
|
277
|
-
reportAttemptLifecycle({ type: "attempt:phase", at: Date.now(), identity, phase });
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* 终局失败的分类与回执 —— **必须在把错误折成纯数据 `AttemptError` 之前调**:折完之后原错误
|
|
281
|
-
* 对象(连同它携带的 `_tag`/`class` 与 cause 链)就不再是任何人的引用,空间轴声明再也读不出来。
|
|
282
|
-
* 走生命周期链的三道决议(抛出点声明 → 实验分类器 → 缺省不可重试,见
|
|
283
|
-
* src/shared/failure-class.ts 的 `resolveAttemptFailureClass`);send 失败的时间轴已由 send 重试
|
|
284
|
-
* 执行体在 context 层消费完,浮出到这里的一定是终局失败,这里只读空间轴。
|
|
285
|
-
* 缺省档(`scope` 省略或 `"attempt"`)不回执:那是「死因只属于本次执行」,没有闸可落。
|
|
286
|
-
*/
|
|
287
|
-
const declareFailure = (phase: LifecyclePhase, e: unknown): void => {
|
|
288
|
-
if (!onFailureClass) return;
|
|
289
|
-
const declaration = attemptFailureDeclaration(run.classifyFailure, phase, e);
|
|
290
|
-
if (declaration) {
|
|
291
|
-
// 空间轴回执会先于 Attempt 结果封口进入 run.ts,并立即生成运行期反馈与 run.json 的
|
|
292
|
-
// dispatch-halted 诊断。它不能依赖下面的 EvalResult 最终扫描补救,否则同一条错误在
|
|
293
|
-
// result.json 已脱敏、Run 级诊断却仍保留原值。分类决策只消费原始错误;对外回执单独
|
|
294
|
-
// 复制并脱敏正文,scope / phase 等路由事实保持原样。
|
|
295
|
-
onFailureClass({
|
|
296
|
-
...declaration,
|
|
297
|
-
text: redactSensitiveText(declaration.text, sensitiveValues),
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
// 本 attempt 累计的运行事实(与 verdict/diagnostics 独立):layer prepare/cleanup 与
|
|
302
|
-
// agent setup·send·teardown 经 ctx.fact() 上报的都落这里(同一 attempt 内后写覆盖先写),
|
|
303
|
-
// 收尾时并入结果的 facts 字段(见 finally 末尾,与 diagnostics 同一种「累加器 + finally 并入」模式)。
|
|
304
|
-
const facts: globalThis.Record<string, FactValue> = {};
|
|
305
|
-
// 本 attempt 累计的诊断(与 verdict 独立):ScopedFeedback.diagnostic 与 teardown 失败都落这里,
|
|
306
|
-
// 收尾时并入结果;dedupeKey 相同的并发诊断折叠成一条并累计 count。
|
|
307
|
-
const diagnostics: DiagnosticRecord[] = [];
|
|
308
|
-
const dedupeIndex = new Map<string, DiagnosticRecord>();
|
|
309
|
-
// Sandbox 命令证据的累加器(与 diagnostics/facts 同一种「共享容器」模式):
|
|
310
|
-
// withCommandTiming 在 CommandResult 交还调用方之前把每条命令(成功与非零退出都算)push 进来,
|
|
311
|
-
// runAttemptBody 的 finally 与本函数的超时/中断兜底分支都读同一个数组引用
|
|
312
|
-
// (见 docs/feature/record/architecture.md「commandsjson」「证据在 CommandResult 返回
|
|
313
|
-
// 调用方之前写入内存」)。
|
|
314
|
-
const commands: CommandExitEvidence[] = [];
|
|
315
|
-
// CommandOptions.sensitiveValues 的 Attempt 级内存集合。值只供记录边界精确替换;最终
|
|
316
|
-
// result 封口后集合随本次调用释放,不进入任何 artifact、指纹或 provider identity。
|
|
317
|
-
const sensitiveValues = new Set<string>();
|
|
318
|
-
const recordDiagnostic = (input: DiagnosticInput) => {
|
|
319
|
-
const phase = (sendActive ? "agent.run" : lastPhase) ?? "eval.run";
|
|
320
|
-
if (input.dedupeKey !== undefined) {
|
|
321
|
-
const existing = dedupeIndex.get(input.dedupeKey);
|
|
322
|
-
if (existing) {
|
|
323
|
-
existing.count = (existing.count ?? 1) + 1;
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
const message = redactSensitiveText(input.message, sensitiveValues);
|
|
328
|
-
const context = input.data === undefined
|
|
329
|
-
? undefined
|
|
330
|
-
: redactSensitiveEvidence(input.data, sensitiveValues);
|
|
331
|
-
const record: DiagnosticRecord = {
|
|
332
|
-
code: input.code,
|
|
333
|
-
level: input.level,
|
|
334
|
-
detail: message,
|
|
335
|
-
origin: attemptOrigin(phase),
|
|
336
|
-
...(context !== undefined ? { context } : {}),
|
|
337
|
-
};
|
|
338
|
-
if (input.dedupeKey !== undefined) dedupeIndex.set(input.dedupeKey, record);
|
|
339
|
-
diagnostics.push(record);
|
|
340
|
-
// 同时进运行级永久事件流(human 撤下 dashboard 后追加、JSON stdout 追加 warning,去重按 key)。
|
|
341
|
-
// `key` 只管折叠到多细(作者没给 dedupeKey 时折到「这一条 attempt 的这种诊断」,身份因此
|
|
342
|
-
// 编进去);对外稳定词法始终单独给 `code`,不让消费方从 key 反推(见 sink.ts 的
|
|
343
|
-
// DiagnosticInput.code、docs/feature/experiments/cli.md 的 WarningEvent)。
|
|
344
|
-
const { origin: _authorOrigin, phase: _authorPhase, ...diagnosticData } = context ?? {};
|
|
345
|
-
reportDiagnostic({
|
|
346
|
-
key: input.dedupeKey ?? `${input.code}:${encodeAttemptKey(identity)}`,
|
|
347
|
-
code: input.code,
|
|
348
|
-
severity: input.level,
|
|
349
|
-
message,
|
|
350
|
-
identity,
|
|
351
|
-
// phase 由运行器给,且**压过**作者 `data` 里的同名字段:`WarningEvent.phase` 是
|
|
352
|
-
// `LifecyclePhase` 闭集,取值只能由「这条诊断报上来时运行器正处在哪一步」决定。
|
|
353
|
-
// 作者的 `data` 是开放词表,让它盖住这个字段等于允许从 eval / adapter 代码里冒充一个
|
|
354
|
-
// 别的(甚至不在闭集里的)阶段,消费方按 phase 分支就此失效——与 ScopedFeedback
|
|
355
|
-
// 「两个方法都不接受 phase」是同一条纪律(见 src/shared/types.ts 的接口注释)。
|
|
356
|
-
data: { ...diagnosticData, phase, origin: attemptOrigin(phase) },
|
|
357
|
-
});
|
|
358
|
-
};
|
|
359
|
-
// 作用域反馈:progress 走 attempt:progress(短命状态,归因由 runner 的当前阶段决定),
|
|
360
|
-
// diagnostic 落 attempt diagnostics + 运行级永久事件。绑定见 docs/feature/experiments/library.md。
|
|
361
|
-
const scopedFeedback: ScopedFeedback = {
|
|
362
|
-
progress: (u) => {
|
|
363
|
-
const suffix = u.current !== undefined && u.total !== undefined ? ` (${u.current}/${u.total})` : "";
|
|
364
|
-
log(`${u.message}${suffix}`);
|
|
365
|
-
},
|
|
366
|
-
diagnostic: recordDiagnostic,
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
// 同时保留最近 20 条进度消息,timeout 时嵌入 error 字段方便定位卡在哪一步。
|
|
370
|
-
const recentLogs: string[] = [];
|
|
371
|
-
const log = (m: string) => {
|
|
372
|
-
const detail = redactSensitiveText(m, sensitiveValues);
|
|
373
|
-
recentLogs.push(detail);
|
|
374
|
-
if (recentLogs.length > 20) recentLogs.shift();
|
|
375
|
-
// 附着在「当前阶段」上的次要文本(见 ActiveAttempt.detail);attempt:start 早于本函数任何
|
|
376
|
-
// 调用点发出(见上),active map 里一定已经有这个 identity 的条目。这是 log() 唯一的出口 ——
|
|
377
|
-
// 没有裸写 stderr 的兜底分支(那是给已删除的 Live reporter 用的旧接线,见
|
|
378
|
-
// docs/feature/experiments/cli.md「一个 run 内只有一个终端协调者」);由当前 renderer 决定
|
|
379
|
-
// 是否消费这条 detail(human 展示,JSON 不消费 lifecycle detail)。
|
|
380
|
-
reportAttemptLifecycle({ type: "attempt:progress", at: Date.now(), identity, detail });
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* ── attempt 总超时的硬边界(P1)──
|
|
385
|
-
* 上限是「整个 attempt(setup+agent+脚本+评分)」的,不是 docker 单条命令的。
|
|
386
|
-
* 到点 → 中断整段 body → Sample 跑 release(停容器、关接收器)→ 产出一条 errored 结果。
|
|
387
|
-
* 即便 adapter / test 完全无视 signal 挂死,这一层也能把它停下来并回收资源。
|
|
388
|
-
*
|
|
389
|
-
* 四层解析链都没声明上限时**这个算子整个不挂**——不是挂一条无穷大的 timer:没有线就没有
|
|
390
|
-
* deadline,attempt 跑到自己结束为止(与携带判据的 `Infinity` 同一个语义)。
|
|
391
|
-
*/
|
|
392
|
-
const applyAttemptDeadline = <E, R>(self: Effect.Effect<EvalResult, E, R>): Effect.Effect<EvalResult, E, R> => {
|
|
393
|
-
if (attemptTimeout === undefined) return self;
|
|
394
|
-
const { timeoutMs, source: timeoutSource } = attemptTimeout;
|
|
395
|
-
return self.pipe(
|
|
396
|
-
Effect.timeoutTo({
|
|
397
|
-
duration: Duration.millis(timeoutMs),
|
|
398
|
-
onSuccess: (r: EvalResult) => r,
|
|
399
|
-
onTimeout: (): EvalResult => {
|
|
400
|
-
// 超时:message 是一层原因(首行),recentLogs 明细放进 stack 供 show 展开「卡在哪一步」;
|
|
401
|
-
// operation 取超时那一刻打开的 lifecycle operation。code 稳定为 "timeout"。
|
|
402
|
-
const text = t("runner.timeout", {
|
|
403
|
-
timeoutMs,
|
|
404
|
-
source: timeoutSource,
|
|
405
|
-
recentLogs: recentLogs.map((l) => ` · ${l}`).join("\n"),
|
|
406
|
-
});
|
|
407
|
-
const message = firstLine(text);
|
|
408
|
-
const rest = text.length > message.length ? text.slice(message.length + 1).replace(/\n+$/, "") : "";
|
|
409
|
-
const error: AttemptError = {
|
|
410
|
-
code: "timeout",
|
|
411
|
-
message,
|
|
412
|
-
origin: attemptOrigin((sendActive ? "agent.run" : lastPhase) ?? "eval.run"),
|
|
413
|
-
// 归属三样一起落盘:撞的是哪层时限、值多少、值从四层解析链的哪层来。
|
|
414
|
-
// 不打一个没有归属说明的 ✗(见 docs/feature/sandbox/architecture.md「时限归属」)。
|
|
415
|
-
timeout: { trigger: "attempt-deadline", limitMs: timeoutMs, source: timeoutSource },
|
|
416
|
-
...(rest.trim() !== "" ? { stack: rest } : {}),
|
|
417
|
-
};
|
|
418
|
-
recorder.failCurrent();
|
|
419
|
-
// 置位给下面的 finalizer 用(它在 Sample release 里跑,LIFO 早于 sandbox stop,
|
|
420
|
-
// 补折叠 workspace.diff / sources——见该 finalizer 的注释)。events/usage 不必等它:
|
|
421
|
-
// SessionManager 是外层已经登记过的活引用(见 liveEvents/liveUsage),截至这一刻已经
|
|
422
|
-
// 归一化的事件与已累计的用量此刻就能直接读出,不随放弃的 body fiber 一起消失。
|
|
423
|
-
timedOut = true;
|
|
424
|
-
const events = liveEvents?.();
|
|
425
|
-
const usage = liveUsage?.();
|
|
426
|
-
const retryAttempts = liveRetryAttempts?.();
|
|
427
|
-
return {
|
|
428
|
-
...base,
|
|
429
|
-
durationMs: recorder.offsetNow(),
|
|
430
|
-
error,
|
|
431
|
-
...(events !== undefined ? { events: [...events], o11y: buildO11ySummary(events) } : {}),
|
|
432
|
-
...(usage !== undefined ? { usage: { ...usage } } : {}),
|
|
433
|
-
...(retryAttempts !== undefined && retryAttempts.length > 0
|
|
434
|
-
? { retryAttempts: retryAttempts.map((attempt) => ({ ...attempt })) }
|
|
435
|
-
: {}),
|
|
436
|
-
// 超时前已经登记的命令证据(见 withCommandTiming)不因中断而丢失——它们在
|
|
437
|
-
// CommandResult 返回调用方那一刻就已经写进了这个共享数组。
|
|
438
|
-
...(commands.length > 0 ? { commands: [...commands] } : {}),
|
|
439
|
-
};
|
|
440
|
-
},
|
|
441
|
-
}),
|
|
442
|
-
);
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
const layerCleanups: LayerCleanupEntry[] = [];
|
|
446
|
-
return Effect.scoped(
|
|
447
|
-
Effect.gen(function* () {
|
|
448
|
-
const sandboxPlan = a.plan._tag === "Sandbox" ? a.plan : undefined;
|
|
449
|
-
if (run.agent.kind === "sandbox" && sandboxPlan === undefined) {
|
|
450
|
-
throw new Error(`sandbox agent ${JSON.stringify(run.agent.name)} received a Direct plan`);
|
|
451
|
-
}
|
|
452
|
-
const runtimeCapabilities = sandboxPlan === undefined ? undefined : sandboxRuntimeCapabilities(sandboxPlan);
|
|
453
|
-
// 留存 disposition:只在本 attempt 内可变,初始 stop;只有留存提交成功才改成 keep
|
|
454
|
-
// (Ctrl+C 中断外层 Sample 时仍是 stop,照常清理)。是否可留存只读 physical plan
|
|
455
|
-
// 的中性 retention 能力;不在 runner 里按 provider 名或旧声明结构分支。
|
|
456
|
-
let disposition: "stop" | "keep" = "stop";
|
|
457
|
-
// 退避重试(runtime.ts → retry.ts)期间临时归还这个名额:被限流的 provider 只是在
|
|
458
|
-
// setTimeout 里睡觉,不该攥着 sandboxSem 的槽位陪跑,不然一批 429 能把整体并发拖成个位数。
|
|
459
|
-
const provisionSlot = {
|
|
460
|
-
release: () => Effect.runPromise(sandboxSem.release(1)).then(() => {}),
|
|
461
|
-
reacquire: () => Effect.runPromise(sandboxSem.take(1)).then(() => {}),
|
|
462
|
-
};
|
|
463
|
-
// Sample release(receiver close + provider stop)整段计成 sandbox.stop:先加的 finalizer
|
|
464
|
-
// 后跑(LIFO),所以「先加的」在 release 链末尾打终点戳、「后加的」在 release 开始前打起点戳;
|
|
465
|
-
// 结果封口(附 phases)发生在 Sample release 完成之后(见下方 Effect.map)。
|
|
466
|
-
let releaseStartedAt: number | undefined;
|
|
467
|
-
if (run.agent.kind === "sandbox" && !reusedSandbox) {
|
|
468
|
-
yield* Effect.addFinalizer(() =>
|
|
469
|
-
Effect.sync(() => {
|
|
470
|
-
// 留存路径的 phases 以 sandbox.suspend 结尾,没有 sandbox.stop 条目(见 release)。
|
|
471
|
-
if (releaseStartedAt !== undefined && disposition !== "keep") {
|
|
472
|
-
recorder.record("sandbox.stop", recorder.offsetNow() - releaseStartedAt);
|
|
473
|
-
}
|
|
474
|
-
}),
|
|
475
|
-
);
|
|
476
|
-
}
|
|
477
|
-
const sandbox =
|
|
478
|
-
reusedSandbox?.sandbox ??
|
|
479
|
-
(run.agent.kind === "sandbox"
|
|
480
|
-
? yield* Effect.gen(function* () {
|
|
481
|
-
// ── 沙箱:acquire=起,release=整组 stop(成功 / 失败 / 中断都跑)──
|
|
482
|
-
// sandboxSem 只覆盖「容器创建」阶段;容器起好后立即释放,后续 npm install / agent 不占位。
|
|
483
|
-
enterPhase("sandbox.queue");
|
|
484
|
-
return yield* sandboxSem.withPermits(1)(
|
|
485
|
-
Effect.gen(function* () {
|
|
486
|
-
enterPhase("sandbox.create");
|
|
487
|
-
log(t("runner.startSandbox"));
|
|
488
|
-
// provider 固有的会话上限不能静默充当默认值:deadline 超出它时,attempt
|
|
489
|
-
// 会跑到一半被平台截断。在派发前就报环境约束,点名 provider 与上限值。
|
|
490
|
-
if (sandboxPlan === undefined || runtimeCapabilities === undefined) {
|
|
491
|
-
throw new Error("sandbox plan invariant violated before materialization");
|
|
492
|
-
}
|
|
493
|
-
assertDeadlineFitsPlan(runtimeCapabilities, attemptTimeout?.timeoutMs);
|
|
494
|
-
if (opts.keepSandbox !== undefined && runtimeCapabilities.retention._tag !== "Suspendable") {
|
|
495
|
-
throw new Error(
|
|
496
|
-
`--keep-sandbox is unsupported by provider ${JSON.stringify(runtimeCapabilities.provider)}`,
|
|
497
|
-
);
|
|
498
|
-
}
|
|
499
|
-
const runtimeDeadline: SandboxRuntimeDeadline = attemptTimeout === undefined || deadlineAt === undefined
|
|
500
|
-
? { _tag: "Unlimited" }
|
|
501
|
-
: { _tag: "Bounded", timeoutMs: attemptTimeout.timeoutMs, deadlineAt };
|
|
502
|
-
const materialized = yield* materializeSandboxRunPlan({
|
|
503
|
-
plan: sandboxPlan,
|
|
504
|
-
evalId: evalDef.id,
|
|
505
|
-
deadline: runtimeDeadline,
|
|
506
|
-
feedback: scopedFeedback,
|
|
507
|
-
signal,
|
|
508
|
-
hookContext: {
|
|
509
|
-
experimentId: sandboxPlan.pair.experimentId,
|
|
510
|
-
signal,
|
|
511
|
-
progress: scopedFeedback.progress,
|
|
512
|
-
diagnostic: scopedFeedback.diagnostic,
|
|
513
|
-
fact: (key, value) => recordFact(facts, key, value),
|
|
514
|
-
},
|
|
515
|
-
buildLocators,
|
|
516
|
-
agent: run.agent.kind === "sandbox" ? run.agent : undefined,
|
|
517
|
-
...(runTiming !== undefined ? { runTiming } : {}),
|
|
518
|
-
provisionSlot: { _tag: "Bound", value: provisionSlot },
|
|
519
|
-
services: liveSandboxRuntimeServices,
|
|
520
|
-
// Provider runtime 自己用 acquireRelease 持有 Case;Attempt 只提交显式
|
|
521
|
-
// Managed disposition,避免外层再包一层 acquireRelease 造成 double-stop。
|
|
522
|
-
release: {
|
|
523
|
-
_tag: "Managed",
|
|
524
|
-
run: (owned) => Effect.promise(async () => {
|
|
525
|
-
const sb = owned.sandbox;
|
|
526
|
-
if (disposition !== "keep") {
|
|
527
|
-
await owned.group.stop();
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
530
|
-
unregisterSandbox(sb);
|
|
531
|
-
const providerName = runtimeCapabilities.provider;
|
|
532
|
-
const suspendStart = recorder.offsetNow();
|
|
533
|
-
try {
|
|
534
|
-
await suspendSandbox(sb);
|
|
535
|
-
recorder.record("sandbox.suspend", recorder.offsetNow() - suspendStart);
|
|
536
|
-
await updateKeptEntry(niceevalRoot, keptEntryId(providerName, sb.sandboxId), {
|
|
537
|
-
state: "dormant",
|
|
538
|
-
}).catch(() => false);
|
|
539
|
-
} catch (e) {
|
|
540
|
-
recorder.record("sandbox.suspend", recorder.offsetNow() - suspendStart, true);
|
|
541
|
-
recordDiagnostic({
|
|
542
|
-
code: "sandbox-suspend-failed",
|
|
543
|
-
level: "warning",
|
|
544
|
-
message: `sandbox ${sb.sandboxId} kept but suspend failed; the instance is still running: ${e instanceof Error ? e.message : String(e)}`,
|
|
545
|
-
dedupeKey: `sandbox-suspend-failed:${sb.sandboxId}`,
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
}),
|
|
549
|
-
},
|
|
550
|
-
});
|
|
551
|
-
return materialized.sandbox;
|
|
552
|
-
}),
|
|
553
|
-
);
|
|
554
|
-
})
|
|
555
|
-
: createDirectAgentSandbox());
|
|
556
|
-
// 一次性沙箱的租借时刻:实例到手就定归属,后面无论走到哪一步终结都带着它。
|
|
557
|
-
if (run.agent.kind === "sandbox" && !sandboxFacts) {
|
|
558
|
-
sandboxFacts = { provider: runtimeCapabilities!.provider, sandboxId: sandbox.sandboxId };
|
|
559
|
-
}
|
|
560
|
-
if (run.agent.kind !== "sandbox") log(t("runner.useDirectAgent"));
|
|
561
|
-
|
|
562
|
-
const commandTarget = createSandboxCommandTarget(sandbox);
|
|
563
|
-
|
|
564
|
-
// ── tracing ──────────────────────────────────────────────────────────────────
|
|
565
|
-
// sandbox.otlpHost:
|
|
566
|
-
// string → docker 类沙箱,宿主开本地接收器,container 经 host.docker.internal 回连
|
|
567
|
-
// null → 远程云端沙箱(e2b / vercel),宿主端口不可达 → 改在沙箱内起 collector
|
|
568
|
-
// defineConfig({ telemetry: { host } }) 可强制覆盖(如配好 tunnel 时)。
|
|
569
|
-
//
|
|
570
|
-
// 非沙箱 agent(远程 / 进程内)不走 per-attempt receiver:被测应用是长驻进程,只有一条
|
|
571
|
-
// 全局 OTel 管线(OTEL_* env 进程启动时读一次)—— per-attempt 端口会在第一个 attempt
|
|
572
|
-
// 结束时关掉,后续 span 全丢。改走 run 级共享池,span 逐轮归属(traceparent / 窗口)。
|
|
573
|
-
let receiver: TraceReceiver | undefined;
|
|
574
|
-
let telemetry: Telemetry | undefined;
|
|
575
|
-
let otelChannel: AgentOtelChannel | undefined;
|
|
576
|
-
// 共享池仅限:config 配了 telemetry(固定端口,无侵入接入的长驻服务)或显式 tracing.scope === "run"。
|
|
577
|
-
// 只声明 tracing 的进程内 adapter(如 aiSdkAgent)保持 per-attempt receiver,attempt 全并发。
|
|
578
|
-
const wantsSharedOtel =
|
|
579
|
-
config.telemetry !== undefined || run.agent.tracing?.scope === "run";
|
|
580
|
-
if (run.agent.kind !== "sandbox" && wantsSharedOtel && opts.otelPool) {
|
|
581
|
-
enterPhase("telemetry.configure");
|
|
582
|
-
try {
|
|
583
|
-
otelChannel = yield* Effect.promise(() => opts.otelPool!.channel(run.agent.name));
|
|
584
|
-
const endpoint = otelChannel.receiver.endpoint(config.telemetry?.host ?? "127.0.0.1");
|
|
585
|
-
const env = run.agent.tracing?.env?.(endpoint);
|
|
586
|
-
telemetry = env ? { endpoint, env } : { endpoint };
|
|
587
|
-
log(t("runner.otlpShared", { endpoint }));
|
|
588
|
-
} catch (e) {
|
|
589
|
-
if (isAttemptAborted(signal)) throw e;
|
|
590
|
-
recordDiagnostic({
|
|
591
|
-
code: "telemetry-configure-failed",
|
|
592
|
-
level: "warning",
|
|
593
|
-
message: `telemetry configure failed; continuing without OTLP trace: ${firstLine(formatThrown(e))}`,
|
|
594
|
-
data: evidenceDiagnosticData("configure", e),
|
|
595
|
-
});
|
|
596
|
-
otelChannel = undefined;
|
|
597
|
-
telemetry = undefined;
|
|
598
|
-
}
|
|
599
|
-
} else if (run.agent.tracing !== undefined) {
|
|
600
|
-
enterPhase("telemetry.configure");
|
|
601
|
-
try {
|
|
602
|
-
const forcedHost = config.telemetry?.host;
|
|
603
|
-
if (forcedHost) {
|
|
604
|
-
// 显式覆盖:走本地接收器,把指定 host 交给 agent
|
|
605
|
-
receiver = yield* createTraceReceiver();
|
|
606
|
-
const endpoint = receiver.endpoint(forcedHost);
|
|
607
|
-
const env = run.agent.tracing?.env?.(endpoint);
|
|
608
|
-
telemetry = env ? { endpoint, env } : { endpoint };
|
|
609
|
-
log(t("runner.otlpOverride", { endpoint }));
|
|
610
|
-
} else if (sandbox.otlpHost !== null) {
|
|
611
|
-
// 本地/docker 沙箱:宿主开接收器
|
|
612
|
-
receiver = yield* createTraceReceiver();
|
|
613
|
-
const endpoint = receiver.endpoint(sandbox.otlpHost);
|
|
614
|
-
const env = run.agent.tracing?.env?.(endpoint);
|
|
615
|
-
telemetry = env ? { endpoint, env } : { endpoint };
|
|
616
|
-
const proto = run.agent.tracing?.protocol;
|
|
617
|
-
log(t("runner.otlpReceiver", { endpoint, proto: proto ? ` (${proto})` : "" }));
|
|
618
|
-
} else {
|
|
619
|
-
// 远程沙箱(e2b / vercel):在沙箱内起 collector,agent 往 localhost 端口发。
|
|
620
|
-
receiver = yield* createInSandboxTraceReceiver(sandbox);
|
|
621
|
-
const endpoint = receiver.endpoint("");
|
|
622
|
-
const env = run.agent.tracing?.env?.(endpoint);
|
|
623
|
-
telemetry = env ? { endpoint, env } : { endpoint };
|
|
624
|
-
const proto = run.agent.tracing?.protocol;
|
|
625
|
-
log(t("runner.otlpInSandbox", { endpoint, proto: proto ? ` (${proto})` : "" }));
|
|
626
|
-
}
|
|
627
|
-
} catch (e) {
|
|
628
|
-
if (isAttemptAborted(signal)) throw e;
|
|
629
|
-
recordDiagnostic({
|
|
630
|
-
code: "telemetry-configure-failed",
|
|
631
|
-
level: "warning",
|
|
632
|
-
message: `telemetry configure failed; continuing without OTLP trace: ${firstLine(formatThrown(e))}`,
|
|
633
|
-
data: evidenceDiagnosticData("configure", e, runtimeCapabilities?.provider),
|
|
634
|
-
});
|
|
635
|
-
receiver = undefined;
|
|
636
|
-
telemetry = undefined;
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
// attempt-scope 的进程内 adapter(如 aiSdkAgent + aiSdkOtel)虽然拥有独立 receiver,
|
|
641
|
-
// 仍需要逐轮窗口归属来给 TimingActivity 写入真实 traceId。独立 receiver 不会与其它
|
|
642
|
-
// attempt 混流,因此直接复用同一个 AgentOtelChannel 算法,不必升级成 run 级共享池。
|
|
643
|
-
if (run.agent.kind !== "sandbox" && receiver !== undefined && otelChannel === undefined) {
|
|
644
|
-
otelChannel = new AgentOtelChannel(receiver);
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
if (run.agent.kind === "sandbox" && !reusedSandbox) {
|
|
648
|
-
// 后加先跑:release 链开始时打起点戳(与上面的终点戳配对,测出整段 sandbox.stop)。
|
|
649
|
-
yield* Effect.addFinalizer(() =>
|
|
650
|
-
Effect.sync(() => {
|
|
651
|
-
releaseStartedAt = recorder.offsetNow();
|
|
652
|
-
}),
|
|
653
|
-
);
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
// 超时收尾段的证据保全(docs/runner.md「超时:双层保护」超时不丢证据)。注册在这里,
|
|
657
|
-
// LIFO 意味着 release 时它先于上面已注册的 sandbox stop/suspend finalizer 跑——此刻沙箱
|
|
658
|
-
// (若有)仍然存活,赶在停之前抢一次 workspace.diff 折叠;`timedOut` 由 Effect.timeoutTo
|
|
659
|
-
// 的 onTimeout 同步置位,正常收尾(body 走完)时这里直接跳过,不重复采一次已经采过的证据。
|
|
660
|
-
// 沙箱此刻可能已经被 agent 搞挂——withCleanupTimeout 有界执行,导出挂起也不能拖住收尾,
|
|
661
|
-
// 到点如实缺失。计时单独记一条 phases 条目,不入 durationMs(durationMs 已在 onTimeout
|
|
662
|
-
// 按中断时刻定格)。sources 折叠是本地文件读取,与沙箱是否存活无关,一并在这里补。
|
|
663
|
-
yield* Effect.addFinalizer(() =>
|
|
664
|
-
Effect.promise(async () => {
|
|
665
|
-
if (!timedOut) return;
|
|
666
|
-
const events = liveEvents?.() ?? [];
|
|
667
|
-
if (run.agent.kind === "sandbox" && liveLedger) {
|
|
668
|
-
const startedAt = recorder.offsetNow();
|
|
669
|
-
try {
|
|
670
|
-
timeoutDiff = await withCleanupTimeout(() => liveLedger!.exportWindows());
|
|
671
|
-
} catch {
|
|
672
|
-
// 沙箱不可用 / 导出挂起到点:如实缺失,不阻塞收尾。
|
|
673
|
-
} finally {
|
|
674
|
-
recorder.record("workspace.diff", recorder.offsetNow() - startedAt);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
try {
|
|
678
|
-
timeoutSources = await withCleanupTimeout(() => collectSources(events, [], evalDef.source));
|
|
679
|
-
} catch {
|
|
680
|
-
// 源码读不到:如实缺失,不阻塞收尾。
|
|
681
|
-
}
|
|
682
|
-
}),
|
|
683
|
-
);
|
|
684
|
-
|
|
685
|
-
// Scope 的 LIFO 让作者 cleanup 在 agent teardown 后、Provider Case finalizer 前执行。
|
|
686
|
-
// cleanup 使用新的有界 signal,不复用已经超时/取消的 Attempt signal。
|
|
687
|
-
if (run.agent.kind === "sandbox") {
|
|
688
|
-
yield* Effect.addFinalizer(() =>
|
|
689
|
-
Effect.promise(async () => {
|
|
690
|
-
if (layerCleanups.length === 0) return;
|
|
691
|
-
enterPhase("sandbox.cleanup");
|
|
692
|
-
await recorder
|
|
693
|
-
.measureClosing("sandbox.cleanup", async () => {
|
|
694
|
-
const before = diagnostics.length;
|
|
695
|
-
for (let i = layerCleanups.length - 1; i >= 0; i--) {
|
|
696
|
-
const cleanup = layerCleanups[i]!;
|
|
697
|
-
const startedAt = recorder.offsetNow();
|
|
698
|
-
const node = recorder.child(sandboxPrepareActivity({
|
|
699
|
-
label: `${cleanup.label} cleanup`,
|
|
700
|
-
startOffsetMs: startedAt,
|
|
701
|
-
}));
|
|
702
|
-
if (node) recorder.pushParent(node);
|
|
703
|
-
try {
|
|
704
|
-
const cleanupSignal = AbortSignal.timeout(CLEANUP_TIMEOUT_MS);
|
|
705
|
-
await withCleanupTimeout(() => cleanup.command(commandTarget, {
|
|
706
|
-
...cleanup.context,
|
|
707
|
-
signal: cleanupSignal,
|
|
708
|
-
}));
|
|
709
|
-
} catch (error) {
|
|
710
|
-
if (node) node.failed = true;
|
|
711
|
-
declareFailure("sandbox.cleanup", error);
|
|
712
|
-
diagnostics.push(teardownDiagnostic("sandbox.cleanup", error));
|
|
713
|
-
} finally {
|
|
714
|
-
if (node) {
|
|
715
|
-
node.durationMs = Math.max(0, recorder.offsetNow() - startedAt);
|
|
716
|
-
recorder.popParent();
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
if (diagnostics.length > before) throw new Error("sandbox cleanup diagnostics");
|
|
721
|
-
})
|
|
722
|
-
.catch(() => {});
|
|
723
|
-
}),
|
|
724
|
-
);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
// body 是 Promise(adapter 边界)。Effect.promise 给的 AbortSignal 在本 fiber 被中断
|
|
728
|
-
//(用户 Ctrl+C / 下面 timeoutTo 到点)时 abort —— 并进 signal,让真正观察 signal 的
|
|
729
|
-
// adapter / docker 命令随中断一起停,而不只靠 Sample release 兜底。
|
|
730
|
-
const bodyResult = yield* Effect.promise((interruptSignal) =>
|
|
731
|
-
runAttemptBody(a, config, t0, base, {
|
|
732
|
-
sandbox,
|
|
733
|
-
receiver,
|
|
734
|
-
telemetry,
|
|
735
|
-
otel: otelChannel,
|
|
736
|
-
signal: AbortSignal.any([signal, interruptSignal]),
|
|
737
|
-
log,
|
|
738
|
-
enterPhase,
|
|
739
|
-
// send 在飞时归因到嵌套的 agent.run(不切换顶层阶段,见 LifecyclePhase 注释)。
|
|
740
|
-
getPhase: () => (sendActive ? "agent.run" : lastPhase),
|
|
741
|
-
setSendActive: (active) => {
|
|
742
|
-
sendActive = active;
|
|
743
|
-
},
|
|
744
|
-
recorder,
|
|
745
|
-
...(attemptTimeout ? { attemptTimeout } : {}),
|
|
746
|
-
...(deadlineAt !== undefined ? { deadlineAt } : {}),
|
|
747
|
-
feedback: scopedFeedback,
|
|
748
|
-
diagnostics,
|
|
749
|
-
facts,
|
|
750
|
-
commands,
|
|
751
|
-
sensitiveValues,
|
|
752
|
-
concurrencySlot,
|
|
753
|
-
declareFailure,
|
|
754
|
-
layerCleanups,
|
|
755
|
-
registerEvidence: (getEvents, getUsage, getRetryAttempts) => {
|
|
756
|
-
liveEvents = getEvents;
|
|
757
|
-
liveUsage = getUsage;
|
|
758
|
-
liveRetryAttempts = getRetryAttempts;
|
|
759
|
-
},
|
|
760
|
-
registerLedger: (ledger) => {
|
|
761
|
-
liveLedger = ledger;
|
|
762
|
-
},
|
|
763
|
-
...(opts.artifactPrepare !== undefined ? { prepareCoordinator: opts.artifactPrepare } : {}),
|
|
764
|
-
}),
|
|
765
|
-
);
|
|
766
|
-
|
|
767
|
-
// 留存提交:verdict 定稿、其余收尾(teardown 链、diff 采集)已在 body 内完成后,按档位
|
|
768
|
-
// 提交——failed 档留 failed/errored,all 档全部;顺序不可调换:先原子写登记项,写入成功
|
|
769
|
-
// 才把 disposition 改成 keep;写入失败保持 stop、记 diagnostic,`sandbox.kept` 不得为 true。
|
|
770
|
-
const keepMode = opts.keepSandbox;
|
|
771
|
-
if (
|
|
772
|
-
run.agent.kind === "sandbox" &&
|
|
773
|
-
keepMode !== undefined &&
|
|
774
|
-
a.locator !== undefined &&
|
|
775
|
-
(keepMode === "all" || bodyResult.verdict === "failed" || bodyResult.verdict === "errored")
|
|
776
|
-
) {
|
|
777
|
-
const providerName = runtimeCapabilities!.provider;
|
|
778
|
-
if (runtimeCapabilities!.retention._tag === "Suspendable") {
|
|
779
|
-
try {
|
|
780
|
-
const enter = nativeEnterCommand(providerName, sandbox.sandboxId);
|
|
781
|
-
const keptAt = new Date().toISOString();
|
|
782
|
-
const expiresAt = computeExpiresAt(providerName, keptAt);
|
|
783
|
-
yield* Effect.promise(() =>
|
|
784
|
-
writeKeptEntry(niceevalRoot, {
|
|
785
|
-
sandboxId: sandbox.sandboxId,
|
|
786
|
-
provider: providerName,
|
|
787
|
-
evalId: evalDef.id,
|
|
788
|
-
attempt,
|
|
789
|
-
...(run.experimentId !== undefined ? { experimentId: run.experimentId } : {}),
|
|
790
|
-
locator: String(a.locator),
|
|
791
|
-
verdict: bodyResult.verdict,
|
|
792
|
-
keptAt,
|
|
793
|
-
workdir: sandbox.workdir,
|
|
794
|
-
...(enter !== undefined ? { enter } : {}),
|
|
795
|
-
...(expiresAt !== undefined ? { expiresAt } : {}),
|
|
796
|
-
state: "alive",
|
|
797
|
-
}),
|
|
798
|
-
);
|
|
799
|
-
disposition = "keep";
|
|
800
|
-
reportKept({
|
|
801
|
-
locator: a.locator,
|
|
802
|
-
identity,
|
|
803
|
-
who: runWho({ agentName: run.agent.name, model: run.model, experimentId: run.experimentId }),
|
|
804
|
-
verdict: bodyResult.verdict,
|
|
805
|
-
provider: providerName,
|
|
806
|
-
sandboxId: sandbox.sandboxId,
|
|
807
|
-
...(enter !== undefined ? { enter } : {}),
|
|
808
|
-
});
|
|
809
|
-
// 只有 `kept` 在收尾时点决定;provider / sandboxId 等归属键仍由租借时刻的
|
|
810
|
-
// sandboxFacts 统一挂上(见下方 Effect.map)。
|
|
811
|
-
kept = true;
|
|
812
|
-
return bodyResult;
|
|
813
|
-
} catch (e) {
|
|
814
|
-
recordDiagnostic({
|
|
815
|
-
code: "sandbox-keep-failed",
|
|
816
|
-
level: "warning",
|
|
817
|
-
message: `failed to register kept sandbox ${sandbox.sandboxId}; it will be destroyed normally: ${e instanceof Error ? e.message : String(e)}`,
|
|
818
|
-
dedupeKey: `sandbox-keep-failed:${sandbox.sandboxId}`,
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
return bodyResult;
|
|
824
|
-
}),
|
|
825
|
-
).pipe(
|
|
826
|
-
// attempt 总超时的硬边界(无上限时这一层不挂,见 applyAttemptDeadline)。
|
|
827
|
-
applyAttemptDeadline,
|
|
828
|
-
// body 自己已兜了 agent 执行错;这里兜的是资源获取 / Sample 层的意外(起沙箱失败等)。
|
|
829
|
-
// 中断【不】吞:此时 Sample 已跑完 release(容器已停),把中断继续上抛,让 forEach 整体停掉,
|
|
830
|
-
// 否则会把中断「恢复」成一条 errored 结果、并让后续 attempt 继续起 —— 那就停不下来了。
|
|
831
|
-
Effect.catchAllCause((cause) =>
|
|
832
|
-
Cause.isInterrupted(cause) || isAttemptAborted(signal)
|
|
833
|
-
? Effect.interrupt
|
|
834
|
-
: Effect.suspend(() => {
|
|
835
|
-
// 资源获取 / Sample 层的意外(起沙箱失败、provisioning 的确定性配置死因)同样是终局
|
|
836
|
-
// 失败:先读空间轴回执,再折成纯数据 AttemptError(顺序不可换,见 declareFailure)。
|
|
837
|
-
const raw = Cause.squash(cause);
|
|
838
|
-
const phase = (sendActive ? "agent.run" : lastPhase) ?? "eval.run";
|
|
839
|
-
declareFailure(phase, raw);
|
|
840
|
-
return Effect.succeed({
|
|
841
|
-
...base,
|
|
842
|
-
durationMs: recorder.offsetNow(),
|
|
843
|
-
error: errorFromThrown(raw, sendActive ? "agent.run" : lastPhase, attemptTimeout),
|
|
844
|
-
...(commands.length > 0 ? { commands: [...commands] } : {}),
|
|
845
|
-
});
|
|
846
|
-
}),
|
|
847
|
-
),
|
|
848
|
-
// 结果封口在 Sample release 完成之后:sandbox.stop 已由 finalizer 写进 recorder,
|
|
849
|
-
// 这里把完整的阶段计时挂到即将交还的结果上(timeout / scope 兜底分支同样带上)。超时路径
|
|
850
|
-
// 额外把上面那个 finalizer 折叠出的 workspace.diff / sources 并进来——它俩是异步产出,
|
|
851
|
-
// 必须等 Sample release(本 map 之前的所有 finalizer)跑完才有值,不能在 onTimeout 的同步
|
|
852
|
-
// 回调里就地给,原理与 phases 完全一致(见该 finalizer 与 onTimeout 的注释)。
|
|
853
|
-
Effect.map((r: EvalResult): EvalResult => {
|
|
854
|
-
const withEvidence: EvalResult = {
|
|
855
|
-
...r,
|
|
856
|
-
...(diagnostics.length > 0 ? { diagnostics: [...diagnostics] } : {}),
|
|
857
|
-
...(Object.keys(facts).length > 0 ? { facts: { ...facts } } : {}),
|
|
858
|
-
...(commands.length > 0 ? { commands: [...commands] } : {}),
|
|
859
|
-
};
|
|
860
|
-
const phases = recorder.finalize();
|
|
861
|
-
// 现有阶段计时尚未把 sandbox.create 起点单独持久化;在它可用前落同口径的保守值,
|
|
862
|
-
// 读取旧记录也按 durationMs 回退,绝不因缺值错误携带。
|
|
863
|
-
const withPhases = {
|
|
864
|
-
...(phases ? { ...withEvidence, phases } : withEvidence),
|
|
865
|
-
executionMs: withEvidence.executionMs ?? withEvidence.durationMs,
|
|
866
|
-
};
|
|
867
|
-
// 调度事实统一在这里挂:每条出口(正常、body 抛错、超时、Sample 层失败)都经过本 map,
|
|
868
|
-
// 归属因此不随「走到了哪一步」丢失(见 sandboxFacts 的声明)。
|
|
869
|
-
const withSandbox: EvalResult = sandboxFacts
|
|
870
|
-
? { ...withPhases, sandbox: { ...sandboxFacts, ...(kept ? { kept: true as const } : {}) } }
|
|
871
|
-
: withPhases;
|
|
872
|
-
const completed: EvalResult = timedOut
|
|
873
|
-
? {
|
|
874
|
-
...withSandbox,
|
|
875
|
-
...(timeoutDiff !== undefined ? { diff: timeoutDiff } : {}),
|
|
876
|
-
sources: timeoutSources ?? [],
|
|
877
|
-
}
|
|
878
|
-
: withSandbox;
|
|
879
|
-
return redactEvalResultEvidence(completed, sensitiveValues);
|
|
880
|
-
}),
|
|
881
|
-
);
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
/** 把 catch 到的 e(body 里 test()/setup 抛错,或 Sample 层 squash 出来的原始错误)折成
|
|
885
|
-
* `AttemptError`。message/stack/cause 由 `describeError` 拆分;phase 取失败那一刻打开的
|
|
886
|
-
* 生命周期阶段(极早期就挂、还没跨进任何阶段时兜底 `eval.run`——phase 是必填字段,不留空);
|
|
887
|
-
* code 目前只对确定已知的类别赋稳定码,其余走 `"unexpected-error"`——provider 专属的限流码
|
|
888
|
-
* 分类留在各 provider 的 `classifyProvisionError`,没有中性入口能在这里复算,不猜一个可能错的码。 */
|
|
889
|
-
export function errorFromThrown(
|
|
890
|
-
e: unknown,
|
|
891
|
-
phase: LifecyclePhase | undefined,
|
|
892
|
-
deadline?: { timeoutMs: number; source: TimeoutSource },
|
|
893
|
-
): AttemptError {
|
|
894
|
-
if (isSendFailure(e)) {
|
|
895
|
-
const detail = e.cause === undefined ? undefined : describeExternalCause(e.cause);
|
|
896
|
-
return {
|
|
897
|
-
code: "agent-send-failed",
|
|
898
|
-
message: sendFailureText(e),
|
|
899
|
-
origin: attemptOrigin(phase ?? "eval.run"),
|
|
900
|
-
...(detail?.stack ? { stack: detail.stack } : {}),
|
|
901
|
-
...(detail ? { cause: detail.cause } : {}),
|
|
902
|
-
};
|
|
903
|
-
}
|
|
904
|
-
const { message, stack, cause } = describeError(e);
|
|
905
|
-
// 沙箱命令撞线抛的是带归属的错(见 sandbox/deadline.ts):显式传 timeout 的那条命令归
|
|
906
|
-
// `command-timeout`,没显式传的那条上限本来就是 attempt deadline 派生的,归属如实指回
|
|
907
|
-
// deadline —— 两者都不是「不明原因的 unexpected-error」。
|
|
908
|
-
const timeout = timeoutAttributionOf(e, deadline);
|
|
909
|
-
return {
|
|
910
|
-
code: timeout ? "timeout" : "unexpected-error",
|
|
911
|
-
message,
|
|
912
|
-
origin: attemptOrigin(phase ?? "eval.run"),
|
|
913
|
-
...(timeout ? { timeout } : {}),
|
|
914
|
-
...(stack ? { stack } : {}),
|
|
915
|
-
...(cause ? { cause } : {}),
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
function describeExternalCause(cause: ExternalCause): {
|
|
920
|
-
stack?: string;
|
|
921
|
-
cause: { name?: string; code?: string; message: string };
|
|
922
|
-
} {
|
|
923
|
-
if (cause._tag === "ThrownValue") return { cause: { message: cause.message } };
|
|
924
|
-
return {
|
|
925
|
-
...(cause.stack._tag === "Present" ? { stack: cause.stack.value } : {}),
|
|
926
|
-
cause: {
|
|
927
|
-
name: cause.name,
|
|
928
|
-
...(cause.code._tag === "Present" ? { code: String(cause.code.value) } : {}),
|
|
929
|
-
message: cause.message,
|
|
930
|
-
},
|
|
931
|
-
};
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
/**
|
|
935
|
-
* 命令撞线错误 → 归属三元组;不是这类错误返回 undefined。
|
|
936
|
-
*
|
|
937
|
-
* 命令没显式传 `timeout` 时,它撞的那条线本来就是 attempt deadline 派生出来的剩余量:
|
|
938
|
-
* 归属如实指回 deadline 那一层(值与来源都取解析链的赢家),而不是编造一个「命令自己的上限」。
|
|
939
|
-
*/
|
|
940
|
-
function timeoutAttributionOf(
|
|
941
|
-
e: unknown,
|
|
942
|
-
deadline?: { timeoutMs: number; source: TimeoutSource },
|
|
943
|
-
): TimeoutAttribution | undefined {
|
|
944
|
-
if (!(e instanceof SandboxCommandTimeoutError)) return undefined;
|
|
945
|
-
if (e.explicit) return { trigger: "command-timeout", limitMs: e.limitMs, source: "command" };
|
|
946
|
-
return deadline === undefined
|
|
947
|
-
? { trigger: "command-timeout", limitMs: e.limitMs, source: "command" }
|
|
948
|
-
: { trigger: "attempt-deadline", limitMs: deadline.timeoutMs, source: deadline.source };
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* provider 固有会话上限的派发前预检:deadline 超出它时 attempt 会跑到一半被平台截断,
|
|
953
|
-
* 与其让它跑一半赔钱,不如在这里报环境约束——点名 provider 与上限值,并给出两条出路。
|
|
954
|
-
* 全实验同因必死(同一个 provider、同一条 deadline),因此按 experiment 域止损。
|
|
955
|
-
*/
|
|
956
|
-
function assertDeadlineFitsPlan(
|
|
957
|
-
capabilities: ReturnType<typeof sandboxRuntimeCapabilities>,
|
|
958
|
-
deadlineMs: number | undefined,
|
|
959
|
-
): void {
|
|
960
|
-
if (deadlineMs === undefined) return;
|
|
961
|
-
if (capabilities.sessionLimit._tag !== "Bounded") return;
|
|
962
|
-
const limit = capabilities.sessionLimit.milliseconds;
|
|
963
|
-
if (deadlineMs <= limit) return;
|
|
964
|
-
throw new ExperimentFatalError(
|
|
965
|
-
t("sandbox.deadlineExceedsSession", {
|
|
966
|
-
provider: capabilities.provider,
|
|
967
|
-
limitMs: limit,
|
|
968
|
-
timeoutMs: deadlineMs,
|
|
969
|
-
}),
|
|
970
|
-
);
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
interface AttemptResources {
|
|
974
|
-
sandbox: Sandbox;
|
|
975
|
-
/** 本 attempt 解析出的超时上限与它的出处;超时归属(`error.timeout`)照它落盘。 */
|
|
976
|
-
attemptTimeout?: { timeoutMs: number; source: TimeoutSource };
|
|
977
|
-
/** attempt deadline 的截止**时刻**;命令节点的时限归属按它算剩余量。四层都没声明上限时缺席。 */
|
|
978
|
-
deadlineAt?: number;
|
|
979
|
-
receiver?: TraceReceiver;
|
|
980
|
-
telemetry?: Telemetry;
|
|
981
|
-
/** 非沙箱 tracing agent 的共享 OTLP 通道(run 级池持有,不随 attempt 关)。 */
|
|
982
|
-
otel?: AgentOtelChannel;
|
|
983
|
-
signal: AbortSignal;
|
|
984
|
-
log: (m: string) => void;
|
|
985
|
-
/** 进入一个正式 LifecyclePhase 边界(见 runAttemptEffect 顶部的定义)。 */
|
|
986
|
-
enterPhase: (phase: LifecyclePhase) => void;
|
|
987
|
-
/** 读当前最近跨入的 phase(send 在飞时返回嵌套的 `agent.run`):error/diagnostic 归因用。 */
|
|
988
|
-
getPhase: () => LifecyclePhase | undefined;
|
|
989
|
-
/** SessionManager 的 send 在飞通知落点(agent.run 归因)。 */
|
|
990
|
-
setSendActive: (active: boolean) => void;
|
|
991
|
-
/** 阶段计时 recorder(turn/command 时间树挂载点)。 */
|
|
992
|
-
recorder: TimingRecorder;
|
|
993
|
-
/** 作用域反馈句柄(归因随 runner 当前阶段);各生命周期入口共享同一实现。 */
|
|
994
|
-
feedback: ScopedFeedback;
|
|
995
|
-
/** attempt 级诊断累计(runAttemptEffect 持有,含 sandbox.create 期间的诊断)。 */
|
|
996
|
-
diagnostics: DiagnosticRecord[];
|
|
997
|
-
/**
|
|
998
|
-
* attempt 级运行事实累计(runAttemptEffect 持有的同一个 Record 引用,与 diagnostics 同一种
|
|
999
|
-
* 「共享可变容器」模式):runAttemptBody 用它构造 ctx.fact() 闭包,并在 finally 里原样
|
|
1000
|
-
* 挂到即将返回的结果上(见 diagnostics 的并入点)。
|
|
1001
|
-
*/
|
|
1002
|
-
facts: globalThis.Record<string, FactValue>;
|
|
1003
|
-
/**
|
|
1004
|
-
* attempt 级 Sandbox 命令证据累加(runAttemptEffect 持有的同一个数组引用,与
|
|
1005
|
-
* diagnostics/facts 同一种「共享容器」模式):`withCommandTiming` 往这里 push,
|
|
1006
|
-
* finally 挂到即将返回的结果上(见 diagnostics 的并入点)。
|
|
1007
|
-
*/
|
|
1008
|
-
commands: CommandExitEvidence[];
|
|
1009
|
-
/** `CommandOptions.sensitiveValues` 的 Attempt 级内存集合;只由命令包装写、结果封口读。 */
|
|
1010
|
-
sensitiveValues: Set<string>;
|
|
1011
|
-
/** turn 级重试退避期间释放/收回的全局并发槽位;透传给 createEvalContext。 */
|
|
1012
|
-
concurrencySlot?: ConcurrencySlot;
|
|
1013
|
-
/** 终局失败的空间轴回执(runAttemptEffect 持有的同一个闭包):body 的失败路径与 finally 里的
|
|
1014
|
-
* per-attempt teardown 失败都经它上报,止损闸据此落闸(见 runAttemptEffect 的 declareFailure)。 */
|
|
1015
|
-
declareFailure: (phase: LifecyclePhase, e: unknown) => void;
|
|
1016
|
-
/** 作者 prepare 成功后登记的 cleanup;由外层 Scope 全局 LIFO 执行。 */
|
|
1017
|
-
layerCleanups: LayerCleanupEntry[];
|
|
1018
|
-
/** SessionManager 一建好就登记事件/用量的读取句柄回外层(超时证据保全用,见
|
|
1019
|
-
* runAttemptEffect 顶部 liveEvents/liveUsage 的注释与 docs/runner.md「超时:双层保护」)。 */
|
|
1020
|
-
registerEvidence: (
|
|
1021
|
-
getEvents: () => readonly StreamEvent[],
|
|
1022
|
-
getUsage: () => Usage,
|
|
1023
|
-
getRetryAttempts: () => readonly RetryAttemptRecord[],
|
|
1024
|
-
) => void;
|
|
1025
|
-
/** 变更分类账一建好(workspace.baseline 阶段)就登记回外层(超时收尾段折叠 workspace.diff 用)。 */
|
|
1026
|
-
registerLedger: (ledger: ChangeLedger) => void;
|
|
1027
|
-
/** Run 级 Agent artifact prepare 协调器;仅 Runner 的 agent.ensure 使用。 */
|
|
1028
|
-
prepareCoordinator?: import("../agents/provisioner.ts").ArtifactPrepareCoordinator;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
interface LayerCleanupEntry {
|
|
1032
|
-
readonly command: SandboxCleanupCommand;
|
|
1033
|
-
readonly context: Omit<SandboxCommandContext, "onCleanup">;
|
|
1034
|
-
readonly label: string;
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
// attempt 的固定段(上传→基线→setup→驱动 agent→采 diff→脚本→评分→判定)。
|
|
1038
|
-
// 资源已由 runAttemptEffect 的 Sample 持有;这里只在 finally 跑 agent 自己的 cleanup/teardown。
|
|
1039
|
-
async function runAttemptBody(
|
|
1040
|
-
a: Attempt,
|
|
1041
|
-
config: Config,
|
|
1042
|
-
t0: number,
|
|
1043
|
-
base: EvalResult,
|
|
1044
|
-
res: AttemptResources,
|
|
1045
|
-
): Promise<EvalResult> {
|
|
1046
|
-
const { evalDef, run, attempt } = a;
|
|
1047
|
-
const {
|
|
1048
|
-
sandbox: rawSandbox,
|
|
1049
|
-
receiver,
|
|
1050
|
-
telemetry,
|
|
1051
|
-
otel,
|
|
1052
|
-
signal,
|
|
1053
|
-
log,
|
|
1054
|
-
enterPhase,
|
|
1055
|
-
getPhase,
|
|
1056
|
-
setSendActive,
|
|
1057
|
-
recorder,
|
|
1058
|
-
feedback,
|
|
1059
|
-
diagnostics,
|
|
1060
|
-
facts,
|
|
1061
|
-
commands,
|
|
1062
|
-
sensitiveValues,
|
|
1063
|
-
concurrencySlot,
|
|
1064
|
-
declareFailure,
|
|
1065
|
-
layerCleanups,
|
|
1066
|
-
registerEvidence,
|
|
1067
|
-
registerLedger,
|
|
1068
|
-
prepareCoordinator,
|
|
1069
|
-
} = res;
|
|
1070
|
-
// ctx.fact() 闭包:校验后写进 res.facts(与 runAttemptEffect 共享的同一个 Record 引用),
|
|
1071
|
-
// finally 把它原样挂到即将返回的结果上(与 diagnostics 同一种「共享容器 + finally 并入」模式)。
|
|
1072
|
-
const fact = (key: string, value: FactValue) => recordFact(facts, key, value);
|
|
1073
|
-
const usesSandbox = run.agent.kind === "sandbox";
|
|
1074
|
-
// 命令时间树:所有经这个包装 sandbox 发出的 runCommand/runShell 都挂成当前阶段(或当前 hook
|
|
1075
|
-
// 节点)下的 command 子节点。包装只在最外层公开调用记录一次——provider 内部转调不经过它。
|
|
1076
|
-
const sandbox = usesSandbox
|
|
1077
|
-
? withCommandTiming(rawSandbox, recorder, getPhase, commands, sensitiveValues, res.deadlineAt)
|
|
1078
|
-
: rawSandbox;
|
|
1079
|
-
// Direct Agent 只拿基础 ctx;Sandbox Agent 才拿带真实 Sandbox 的扩展 ctx。
|
|
1080
|
-
const attemptCtx: AgentContext = {
|
|
1081
|
-
signal,
|
|
1082
|
-
evalId: evalDef.id,
|
|
1083
|
-
attempt: { id: evalDef.id, index: attempt },
|
|
1084
|
-
model: run.model,
|
|
1085
|
-
reasoningEffort: run.reasoningEffort,
|
|
1086
|
-
flags: run.flags,
|
|
1087
|
-
experimentId: run.experimentId,
|
|
1088
|
-
session: createAgentSession(),
|
|
1089
|
-
telemetry,
|
|
1090
|
-
progress: feedback.progress,
|
|
1091
|
-
diagnostic: feedback.diagnostic,
|
|
1092
|
-
fact,
|
|
1093
|
-
// log 是 progress({ message }) 的别名,不是第二条通道(见 AgentContext.log 注释)。
|
|
1094
|
-
log,
|
|
1095
|
-
};
|
|
1096
|
-
const sandboxAttemptCtx: SandboxAgentContext = { ...attemptCtx, sandbox };
|
|
1097
|
-
const commandTarget = createSandboxCommandTarget(sandbox);
|
|
1098
|
-
/** agent.setup 时点已走到(未声明 setup 也置位)——agent.teardown 的触发条件(成对触发规则)。 */
|
|
1099
|
-
let agentSetupReached = false;
|
|
1100
|
-
/** adapter 在 agent.setup 里经 `ctx.reportSetup()` 交回的安装清单(宿主侧内存对象,不经沙箱磁盘;
|
|
1101
|
-
* 装了 Skill / plugin / MCP 的沙箱型 adapter 才有)。运行器只把它抬成 attempt artifact,
|
|
1102
|
-
* 不解释内容、不按 agent 名字分支;什么都没装的 adapter 不调用 → undefined,不生成空 artifact。 */
|
|
1103
|
-
let agentSetup: AgentSetupManifest | undefined;
|
|
1104
|
-
// 变更分类账(仅沙箱型;workspace.baseline 阶段建立)。
|
|
1105
|
-
let ledger: ChangeLedger | undefined;
|
|
1106
|
-
// discovery 的 entry 快照加上调用发生时首次读取的 helper 快照;不在 attempt 收尾重读。
|
|
1107
|
-
const sourceRegistry = createSourceRegistry(process.cwd());
|
|
1108
|
-
try {
|
|
1109
|
-
if (usesSandbox) {
|
|
1110
|
-
// Linker 已按「template owner 在前,另一作者在后」排好命令;fresh/reuse 每条 Attempt
|
|
1111
|
-
// 都完整重放。owner 子 phase 只做错误与诊断归因,计时仍聚合在 sandbox.prepare。
|
|
1112
|
-
const linked = a.plan._tag === "Sandbox" ? a.plan.pair : undefined;
|
|
1113
|
-
if (linked !== undefined && linked.commands.length > 0) {
|
|
1114
|
-
enterPhase("sandbox.prepare");
|
|
1115
|
-
for (const entry of linked.commands) {
|
|
1116
|
-
const ownerPhase = entry.owner.kind === "eval"
|
|
1117
|
-
? "sandbox.prepare.eval"
|
|
1118
|
-
: "sandbox.prepare.experiment";
|
|
1119
|
-
enterPhase(ownerPhase);
|
|
1120
|
-
const label = `${entry.owner.kind}#${entry.index}`;
|
|
1121
|
-
const startedAt = recorder.offsetNow();
|
|
1122
|
-
const node = recorder.child(sandboxPrepareActivity({
|
|
1123
|
-
label,
|
|
1124
|
-
startOffsetMs: startedAt,
|
|
1125
|
-
}));
|
|
1126
|
-
if (node) recorder.pushParent(node);
|
|
1127
|
-
const cleanupContext: Omit<SandboxCommandContext, "onCleanup"> = {
|
|
1128
|
-
phase: "prepare",
|
|
1129
|
-
owner: entry.owner,
|
|
1130
|
-
attempt: { id: `${run.experimentId}/${evalDef.id}`, index: attempt },
|
|
1131
|
-
signal,
|
|
1132
|
-
progress: feedback.progress,
|
|
1133
|
-
diagnostic: feedback.diagnostic,
|
|
1134
|
-
facts: fact,
|
|
1135
|
-
};
|
|
1136
|
-
const context: SandboxCommandContext = {
|
|
1137
|
-
...cleanupContext,
|
|
1138
|
-
onCleanup(command) {
|
|
1139
|
-
if (typeof command !== "function") throw new TypeError("sandbox cleanup must be a function");
|
|
1140
|
-
layerCleanups.push({ command, context: cleanupContext, label });
|
|
1141
|
-
},
|
|
1142
|
-
};
|
|
1143
|
-
try {
|
|
1144
|
-
await entry.command(commandTarget, context);
|
|
1145
|
-
} catch (error) {
|
|
1146
|
-
if (node) node.failed = true;
|
|
1147
|
-
throw error;
|
|
1148
|
-
} finally {
|
|
1149
|
-
if (node) {
|
|
1150
|
-
node.durationMs = Math.max(0, recorder.offsetNow() - startedAt);
|
|
1151
|
-
recorder.popParent();
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
// 两侧作者的环境准备完成后,Runner 统一执行 Agent ensure;adapter setup 只能写运行时
|
|
1158
|
-
// 配置/凭据,不能自行安装或跳过 probe → install → recheck 循环。
|
|
1159
|
-
if (run.agent.kind === "sandbox") {
|
|
1160
|
-
if (a.plan._tag !== "Sandbox") {
|
|
1161
|
-
throw new Error(`sandbox agent ${JSON.stringify(run.agent.name)} received a Direct plan`);
|
|
1162
|
-
}
|
|
1163
|
-
enterPhase("agent.ensure");
|
|
1164
|
-
log(t("runner.startAgentEnsure"));
|
|
1165
|
-
const verified = await Effect.runPromise(Effect.either(
|
|
1166
|
-
verifySandboxTargetPlatform(sandbox, a.plan.providerPlan.target.platform),
|
|
1167
|
-
));
|
|
1168
|
-
if (Either.isLeft(verified)) throw verified.left;
|
|
1169
|
-
const ensureEffect = runAgentEnsure(run.agent.ensure, run.agent.installers, sandbox, {
|
|
1170
|
-
fact,
|
|
1171
|
-
coordinator: Option.fromNullable(prepareCoordinator),
|
|
1172
|
-
targetPlatform: a.plan.providerPlan.target.platform,
|
|
1173
|
-
signal,
|
|
1174
|
-
progress: feedback.progress,
|
|
1175
|
-
});
|
|
1176
|
-
const ensured = await Effect.runPromise(Effect.either(ensureEffect));
|
|
1177
|
-
if (Either.isLeft(ensured)) throw ensured.left;
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
// 作者准备与 Agent ensure 都不属于 Agent diff;Runner 在这些
|
|
1181
|
-
// 基础设施活动完成后建立统一的 Agent 可归因起点。
|
|
1182
|
-
enterPhase("workspace.baseline");
|
|
1183
|
-
ledger = await createChangeLedger(sandbox, evalDef.diff === undefined
|
|
1184
|
-
? undefined
|
|
1185
|
-
: { include: [...evalDef.diff.include], ignore: [...evalDef.diff.ignore] });
|
|
1186
|
-
registerLedger(ledger);
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
// agent 自己的 lifecycle:装 CLI、写 config(每个沙箱一次,不在每轮 send 里)。
|
|
1190
|
-
// 时点在此走到(未声明 setup 也算)——agent.teardown 据此触发。
|
|
1191
|
-
agentSetupReached = true;
|
|
1192
|
-
if (run.agent.setup) {
|
|
1193
|
-
enterPhase("agent.setup");
|
|
1194
|
-
log(t("runner.startAgentSetup"));
|
|
1195
|
-
const returned = (await (run.agent.kind === "sandbox"
|
|
1196
|
-
? run.agent.setup(sandbox, {
|
|
1197
|
-
...sandboxAttemptCtx,
|
|
1198
|
-
reportSetup: (manifest) => (agentSetup = manifest),
|
|
1199
|
-
})
|
|
1200
|
-
: run.agent.setup(attemptCtx))) as unknown;
|
|
1201
|
-
if (typeof returned === "function") {
|
|
1202
|
-
throw new Error(
|
|
1203
|
-
t("runner.setupReturnedCleanup", {
|
|
1204
|
-
layer: `Agent.setup (${run.agent.name})`,
|
|
1205
|
-
hint: "Agent.teardown",
|
|
1206
|
-
}).trimEnd(),
|
|
1207
|
-
);
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
// OTLP 导出配置(file-based,如 codex 的 config.toml [otel] 块):与 setup 分开,
|
|
1212
|
-
// 在主配置写完后追加。仅当 tracing 开 + 有 endpoint 时调一次(env-based 的不实现 configure)。
|
|
1213
|
-
if (telemetry && run.agent.kind === "sandbox" && run.agent.tracing?.configure) {
|
|
1214
|
-
enterPhase("telemetry.configure");
|
|
1215
|
-
log(t("runner.startAgentTracing"));
|
|
1216
|
-
try {
|
|
1217
|
-
await run.agent.tracing.configure(sandbox, sandboxAttemptCtx);
|
|
1218
|
-
} catch (configureError) {
|
|
1219
|
-
if (isAttemptAborted(signal)) throw configureError;
|
|
1220
|
-
feedback.diagnostic({
|
|
1221
|
-
code: "telemetry-configure-failed",
|
|
1222
|
-
level: "warning",
|
|
1223
|
-
message: `telemetry configure failed; continuing without OTLP trace: ${firstLine(formatThrown(configureError))}`,
|
|
1224
|
-
data: evidenceDiagnosticData(
|
|
1225
|
-
"configure",
|
|
1226
|
-
configureError,
|
|
1227
|
-
a.plan._tag === "Sandbox" ? a.plan.providerPlan.provider : undefined,
|
|
1228
|
-
),
|
|
1229
|
-
});
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
// 构造 t,跑 test
|
|
1234
|
-
enterPhase("eval.run");
|
|
1235
|
-
log(t("runner.driveAgent"));
|
|
1236
|
-
const judge = resolveJudge(run.judge, evalDef.judge, config.judge);
|
|
1237
|
-
const { context, state } = createEvalContext({
|
|
1238
|
-
agent: run.agent,
|
|
1239
|
-
sandbox,
|
|
1240
|
-
evalId: evalDef.id,
|
|
1241
|
-
attempt: { id: evalDef.id, index: attempt },
|
|
1242
|
-
model: run.model,
|
|
1243
|
-
reasoningEffort: run.reasoningEffort,
|
|
1244
|
-
flags: run.flags,
|
|
1245
|
-
experimentId: run.experimentId,
|
|
1246
|
-
signal,
|
|
1247
|
-
log,
|
|
1248
|
-
judge,
|
|
1249
|
-
telemetry,
|
|
1250
|
-
otel,
|
|
1251
|
-
evalBaseDir: evalDef.baseDir,
|
|
1252
|
-
feedback,
|
|
1253
|
-
fact,
|
|
1254
|
-
concurrencySlot,
|
|
1255
|
-
// 实验分类器:send 链上排在 adapter 的 classifySendFailure 之前(见
|
|
1256
|
-
// docs/feature/error-classification/architecture.md「分类链」)。与本文件 declareFailure
|
|
1257
|
-
// 走的生命周期链是同一个函数,两条链的决议序各自单源在 send-failures.ts / failure-class.ts。
|
|
1258
|
-
experimentClassifier: run.classifyFailure,
|
|
1259
|
-
// 题型:计分制下句柄上的 .gate() 是前置(就地求值 + 挂了中止 test()),见 collector。
|
|
1260
|
-
evaluationKind: evalDef.evaluationKind ?? "pass",
|
|
1261
|
-
// 前置断言就地求值要看当前已提交窗口的 agent diff(非沙箱型没有分类账,省略)。
|
|
1262
|
-
...(ledger ? { liveDiff: async () => deriveDiffData(await ledger!.exportWindows()) } : {}),
|
|
1263
|
-
// send 窗口钩子:进入前落 eval 归因、返回后落 agent 归因(见 ledger.ts)。
|
|
1264
|
-
ledgerHooks: ledger
|
|
1265
|
-
? {
|
|
1266
|
-
beforeSend: (label) => ledger!.commitEvalWindow(label),
|
|
1267
|
-
afterSend: (label) => ledger!.commitAgentWindow(label),
|
|
1268
|
-
}
|
|
1269
|
-
: undefined,
|
|
1270
|
-
onSendActive: setSendActive,
|
|
1271
|
-
timingNow: recorder.offsetNow,
|
|
1272
|
-
// 每次 send 一个 turn 节点:本地单调时钟测得的端到端包络 + 与 diff/source 共用的
|
|
1273
|
-
// session/turn 身份 token;
|
|
1274
|
-
// OTel 接入时再带 traceId,trace.json 的 spans 由消费方按它临时挂到 turn 下。usage 有记录
|
|
1275
|
-
// 才带(show `--execution`/`--timing` 的 turn 头行读 TimingNode.usage,见 docs/feature/
|
|
1276
|
-
// results/architecture.md「result.json」TimingNode.usage)。
|
|
1277
|
-
onTurn: (info) =>
|
|
1278
|
-
recorder.child(turnActivity({
|
|
1279
|
-
label: formatTurnLabel(info.sessionIndex, info.turnIndex),
|
|
1280
|
-
startOffsetMs: info.startOffsetMs,
|
|
1281
|
-
durationMs: info.durationMs,
|
|
1282
|
-
...(info.failed ? { failed: true as const } : {}),
|
|
1283
|
-
sessionIndex: info.sessionIndex,
|
|
1284
|
-
turnIndex: info.turnIndex,
|
|
1285
|
-
...(info.traceId !== undefined ? { traceId: info.traceId } : {}),
|
|
1286
|
-
...(info.traceAttribution !== undefined ? { traceAttribution: info.traceAttribution } : {}),
|
|
1287
|
-
...(info.usage !== undefined ? { usage: info.usage } : {}),
|
|
1288
|
-
})),
|
|
1289
|
-
});
|
|
1290
|
-
// 登记回外层:超时中断后由 onTimeout 直接读这两个句柄组装 events/usage(见
|
|
1291
|
-
// registerEvidence 注释、docs/runner.md「超时:双层保护」超时不丢证据)。
|
|
1292
|
-
registerEvidence(
|
|
1293
|
-
() => state.manager.allEvents,
|
|
1294
|
-
() => state.manager.usage,
|
|
1295
|
-
() => state.manager.retryAttempts,
|
|
1296
|
-
);
|
|
1297
|
-
|
|
1298
|
-
let error: AttemptError | undefined;
|
|
1299
|
-
let skipReason: string | undefined;
|
|
1300
|
-
try {
|
|
1301
|
-
await withSourceRegistry(sourceRegistry, () => evalDef.test(context as ScoreTestContext));
|
|
1302
|
-
// test() 正常返回也要结算待决前置:最后一条前置挂了而后面没有 t.* 调用时,
|
|
1303
|
-
// 中止信号在这里抛出(判定与写了 await 完全一致)。
|
|
1304
|
-
const aborted = await state.collector.settlePrerequisites();
|
|
1305
|
-
if (aborted !== undefined) throw new EvalRequirementFailed(aborted);
|
|
1306
|
-
} catch (e) {
|
|
1307
|
-
if (e instanceof EvalSkipped) skipReason = e.reason;
|
|
1308
|
-
else if (e instanceof EvalRequirementFailed) {
|
|
1309
|
-
/* 断言已记录,非执行错误 */
|
|
1310
|
-
} else {
|
|
1311
|
-
// eval 脚本(比如引用了已改名/删掉的 API)抛出的 TypeError:message 是一层原因,完整 stack
|
|
1312
|
-
// 单独进 `error.stack`,niceeval show 展开时才看得到 eval 文件的 file:line。
|
|
1313
|
-
// 作者从 test(t) 体内抛的 ExperimentFatalError / EvalFatalError 也走这条分支。
|
|
1314
|
-
declareFailure(getPhase() ?? "eval.run", e);
|
|
1315
|
-
error = errorFromThrown(e, getPhase(), res.attemptTimeout);
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
if (skipReason) log(t("runner.skip", { reason: skipReason }));
|
|
1320
|
-
|
|
1321
|
-
// 采 agent 归因增量(workspace.diff 阶段:从分类账折叠逐窗口 delta)。Direct Agent 没有 workspace。
|
|
1322
|
-
if (!skipReason && usesSandbox) enterPhase("workspace.diff");
|
|
1323
|
-
let diffWindows: DiffArtifact = [];
|
|
1324
|
-
let diffArtifactAvailable = true;
|
|
1325
|
-
if (!skipReason && usesSandbox && ledger) {
|
|
1326
|
-
// 快照必须在导出前读取:导出失败时是否致命只由已登记消费者决定,
|
|
1327
|
-
// 不能按“发生在评分前”一刀切。optional 断言仍需要 unavailable 记录,
|
|
1328
|
-
// 因此所有失败都会先冻结 collector 的通道状态。
|
|
1329
|
-
const diffRequirements = state.collector.evidenceRequirementSnapshot();
|
|
1330
|
-
const startedAt = recorder.offsetNow();
|
|
1331
|
-
const operation = recorder.child(workspaceDiffExportActivity({
|
|
1332
|
-
label: "export workspace diff",
|
|
1333
|
-
startOffsetMs: startedAt,
|
|
1334
|
-
durationMs: 0,
|
|
1335
|
-
}));
|
|
1336
|
-
if (operation) recorder.pushParent(operation);
|
|
1337
|
-
try {
|
|
1338
|
-
diffWindows = await ledger.exportWindows();
|
|
1339
|
-
if (operation) {
|
|
1340
|
-
const files = new Set(diffWindows.flatMap((window) => Object.keys(window.changes))).size;
|
|
1341
|
-
operation.label = `export workspace diff · ${diffWindows.length} ${diffWindows.length === 1 ? "window" : "windows"} · ${files} ${files === 1 ? "file" : "files"}`;
|
|
1342
|
-
}
|
|
1343
|
-
} catch (diffError) {
|
|
1344
|
-
if (operation) operation.failed = true;
|
|
1345
|
-
if (isAttemptAborted(signal)) throw diffError;
|
|
1346
|
-
diffArtifactAvailable = false;
|
|
1347
|
-
const reason = `workspace diff export unavailable: ${firstLine(formatThrown(diffError))}`;
|
|
1348
|
-
state.collector.markEvidenceUnavailable("diff", reason);
|
|
1349
|
-
if (diffRequirements.diff.required) {
|
|
1350
|
-
// 显式 diff 断言会在 finalize 中得到 unavailable;若只是无法绑定到某条
|
|
1351
|
-
// Spec 的直接读取,则补一条 AttemptError,至少不能把空 diff 当成 passed/failed。
|
|
1352
|
-
if (diffRequirements.diff.requiredConsumers === 0 && error === undefined) {
|
|
1353
|
-
error = errorFromThrown(diffError, "workspace.diff", res.attemptTimeout);
|
|
1354
|
-
}
|
|
1355
|
-
} else {
|
|
1356
|
-
feedback.diagnostic({
|
|
1357
|
-
code: "workspace-diff-unavailable",
|
|
1358
|
-
level: "warning",
|
|
1359
|
-
message: `workspace diff export failed; continuing with command/event evidence: ${firstLine(formatThrown(diffError))}`,
|
|
1360
|
-
data: evidenceDiagnosticData(
|
|
1361
|
-
"exportWindows",
|
|
1362
|
-
diffError,
|
|
1363
|
-
a.plan._tag === "Sandbox" ? a.plan.providerPlan.provider : undefined,
|
|
1364
|
-
),
|
|
1365
|
-
});
|
|
1366
|
-
}
|
|
1367
|
-
} finally {
|
|
1368
|
-
if (operation) {
|
|
1369
|
-
operation.durationMs = Math.max(0, recorder.offsetNow() - startedAt);
|
|
1370
|
-
recorder.popParent();
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
const diff = deriveDiffData(diffWindows);
|
|
1375
|
-
state.late.diff = diff;
|
|
1376
|
-
if (!skipReason && usesSandbox && diffArtifactAvailable) {
|
|
1377
|
-
const files = Object.values(diff.files);
|
|
1378
|
-
log(t("runner.diffProgress", {
|
|
1379
|
-
changed: files.filter((f) => f.net !== "deleted").length,
|
|
1380
|
-
deleted: files.filter((f) => f.net === "deleted").length,
|
|
1381
|
-
}));
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
const scripts: globalThis.Record<string, ScriptResult> = {};
|
|
1385
|
-
state.late.scripts = scripts;
|
|
1386
|
-
|
|
1387
|
-
// 评分
|
|
1388
|
-
const events = state.manager.allEvents;
|
|
1389
|
-
const usage = state.manager.usage;
|
|
1390
|
-
const facts = deriveRunFacts(events);
|
|
1391
|
-
const assertionEvaluationContext: AssertionEvaluationContext = {
|
|
1392
|
-
events,
|
|
1393
|
-
facts,
|
|
1394
|
-
diff,
|
|
1395
|
-
scripts,
|
|
1396
|
-
usage,
|
|
1397
|
-
status: state.manager.lastStatus,
|
|
1398
|
-
// attempt 级聚合覆盖(各轮最差值);t.* 作用域断言按它折叠,turn/session 作用域在
|
|
1399
|
-
// record 时已换成各自的覆盖(见 context.ts 的 recordScoped / makeTurnHandle)。
|
|
1400
|
-
evidenceCoverage: state.manager.evidenceCoverage,
|
|
1401
|
-
readFile: async (path) => {
|
|
1402
|
-
try {
|
|
1403
|
-
return await sandbox!.readText(path);
|
|
1404
|
-
} catch {
|
|
1405
|
-
return undefined;
|
|
1406
|
-
}
|
|
1407
|
-
},
|
|
1408
|
-
};
|
|
1409
|
-
if (!skipReason) enterPhase("assertions.evaluate");
|
|
1410
|
-
// 类型面挡住通过制 t.points()/t.score(),但 tsx 与 JS 可绕过;持久化边界必须再门控一次。
|
|
1411
|
-
const assertions = skipReason
|
|
1412
|
-
? []
|
|
1413
|
-
: await state.collector.finalize(assertionEvaluationContext, {
|
|
1414
|
-
includePoints: evalDef.evaluationKind === "points",
|
|
1415
|
-
// assertions.evaluate 阶段唯一值得解释的等待是「在等裁判模型」:有判分断言时逐条推进 detail,
|
|
1416
|
-
// 没有则整段不发 detail(见 docs/feature/experiments/cli.md「Attempt 阶段」)。
|
|
1417
|
-
// 文本是契约字面量,中英一致,不进 i18n。
|
|
1418
|
-
onJudgeProgress: ({ index, total, check }) => log(`judge ${index}/${total} · ${check}`),
|
|
1419
|
-
});
|
|
1420
|
-
const verdict = computeVerdict({ error, assertions, skipReason, strict: run.strict });
|
|
1421
|
-
|
|
1422
|
-
// 收 OTLP trace:给最后一批导出留点落地时间,再 collect(空则不挂)。
|
|
1423
|
-
// codex 的 OTLP 把内部 Rust tracing 全导出来(handle_responses / append_items … 上万条);
|
|
1424
|
-
// 先经【每-agent mapper】把原生 span 归一到 canonical GenAI semconv(定 SpanKind),
|
|
1425
|
-
// 再 selectTraceSpans 按 kind 挑出回合/模型/工具,丢掉 "other" 噪声(干净小 trace 整段保留)。
|
|
1426
|
-
let trace: TraceSpan[] | undefined;
|
|
1427
|
-
if (receiver) {
|
|
1428
|
-
enterPhase("telemetry.collect");
|
|
1429
|
-
try {
|
|
1430
|
-
await receiver.settle(250, 1500);
|
|
1431
|
-
const spans = receiver.collect();
|
|
1432
|
-
if (spans.length) {
|
|
1433
|
-
// 归一 → 选语义 span → 按 call_id 把 transcript 的工具入参/出参 join 上去(span 自身不带命令文本)。
|
|
1434
|
-
// 对接口分发,不按名字分支:mapper 由 Agent 自己声明,缺省走通用 heuristic。
|
|
1435
|
-
const canonical = (run.agent.spanMapper ?? mapGenericSpans)(spans);
|
|
1436
|
-
trace = enrichTraceWithIO(selectTraceSpans(canonical), facts.toolCalls);
|
|
1437
|
-
const note = spans.length > trace.length ? t("runner.traceSelected", { count: trace.length }) : "";
|
|
1438
|
-
log(`trace:${spans.length} span${note}`);
|
|
1439
|
-
}
|
|
1440
|
-
} catch (collectError) {
|
|
1441
|
-
if (isAttemptAborted(signal)) throw collectError;
|
|
1442
|
-
feedback.diagnostic({
|
|
1443
|
-
code: "telemetry-collect-failed",
|
|
1444
|
-
level: "warning",
|
|
1445
|
-
message: `telemetry collect failed; retaining the existing verdict: ${firstLine(formatThrown(collectError))}`,
|
|
1446
|
-
data: evidenceDiagnosticData(
|
|
1447
|
-
"collect",
|
|
1448
|
-
collectError,
|
|
1449
|
-
a.plan._tag === "Sandbox" ? a.plan.providerPlan.provider : undefined,
|
|
1450
|
-
),
|
|
1451
|
-
});
|
|
1452
|
-
}
|
|
1453
|
-
} else if (otel) {
|
|
1454
|
-
// 共享通道:receiver 不归本 attempt 关,trace 只取归属到本 attempt 的 span
|
|
1455
|
-
//(逐轮攒的 + 按本 attempt traceId sweep 回的迟到批)。
|
|
1456
|
-
enterPhase("telemetry.collect");
|
|
1457
|
-
try {
|
|
1458
|
-
const late = await otel.sweep(state.manager.otelTraceIds);
|
|
1459
|
-
const spans = [...state.manager.otelSpans, ...late];
|
|
1460
|
-
if (spans.length) {
|
|
1461
|
-
const canonical = (run.agent.spanMapper ?? mapGenericSpans)(spans);
|
|
1462
|
-
trace = enrichTraceWithIO(selectTraceSpans(canonical), facts.toolCalls);
|
|
1463
|
-
const note = spans.length > trace.length ? t("runner.traceSelected", { count: trace.length }) : "";
|
|
1464
|
-
log(`trace:${spans.length} span${note}`);
|
|
1465
|
-
}
|
|
1466
|
-
} catch (collectError) {
|
|
1467
|
-
if (isAttemptAborted(signal)) throw collectError;
|
|
1468
|
-
feedback.diagnostic({
|
|
1469
|
-
code: "telemetry-collect-failed",
|
|
1470
|
-
level: "warning",
|
|
1471
|
-
message: `telemetry collect failed; retaining the existing verdict: ${firstLine(formatThrown(collectError))}`,
|
|
1472
|
-
data: evidenceDiagnosticData("collect", collectError),
|
|
1473
|
-
});
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
// 主链到 telemetry.collect 为止。必须在 Effect Sample release 之前显式封口;否则最后一个
|
|
1478
|
-
// 主链 phase 会一直开到 sandbox.stop 完成,既把收尾时间重复算进主链,也会让 phases
|
|
1479
|
-
// 主链合计大于 durationMs。Sample finalizer 只负责另记 sandbox.stop / sandbox.suspend。
|
|
1480
|
-
recorder.closeCurrent();
|
|
1481
|
-
const durationMs = recorder.offsetNow();
|
|
1482
|
-
const o11y = buildO11ySummary(events);
|
|
1483
|
-
// 实测成本(网关带回)优先,缺则按 model + 用量查价格表估算(见 o11y/cost.ts)。
|
|
1484
|
-
// 权威唯一在 result.json 的 estimatedCostUSD;o11y.json 只留行为计数(见 docs/feature/record/architecture.md「o11y.json」)。
|
|
1485
|
-
const cost = usage.costUSD ?? estimateCost(run.model, usage, config.pricing);
|
|
1486
|
-
|
|
1487
|
-
// 收 test 引用到的 eval 源码(按 send / 断言的 loc 去重),供 view 渲染代码视图。
|
|
1488
|
-
const sources = await collectSources(events, assertions, evalDef.source, sourceRegistry);
|
|
1489
|
-
|
|
1490
|
-
const value: EvalResult = {
|
|
1491
|
-
id: evalDef.id,
|
|
1492
|
-
description: evalDef.description,
|
|
1493
|
-
experimentId: run.experimentId,
|
|
1494
|
-
experiment: experimentRunInfo(run, a.plan, a.sandboxPlansByEval, config, evalDef.judge),
|
|
1495
|
-
agent: run.agent.name,
|
|
1496
|
-
model: run.model,
|
|
1497
|
-
verdict,
|
|
1498
|
-
fingerprint: a.fingerprint,
|
|
1499
|
-
configHash: a.configHash,
|
|
1500
|
-
attempt,
|
|
1501
|
-
startedAt: new Date(t0).toISOString(),
|
|
1502
|
-
durationMs,
|
|
1503
|
-
assertions,
|
|
1504
|
-
evaluationKind: evalDef.evaluationKind ?? "pass",
|
|
1505
|
-
// 只在计分制 eval 上落 scoreEntries(t.score 直接给分记录);通过制 eval 的 t 上没有
|
|
1506
|
-
// t.score,collector.scoreEntries 恒为空数组,省略即等价于空数组
|
|
1507
|
-
// (见 docs/feature/record/architecture.md「result.json」)。
|
|
1508
|
-
...(evalDef.evaluationKind === "points" ? { scoreEntries: state.collector.scoreEntries } : {}),
|
|
1509
|
-
...(state.manager.retryAttempts.length > 0 ? { retryAttempts: state.manager.retryAttempts } : {}),
|
|
1510
|
-
usage,
|
|
1511
|
-
estimatedCostUSD: cost,
|
|
1512
|
-
error,
|
|
1513
|
-
skipReason,
|
|
1514
|
-
events,
|
|
1515
|
-
sources,
|
|
1516
|
-
o11y,
|
|
1517
|
-
trace,
|
|
1518
|
-
agentSetup,
|
|
1519
|
-
...(diffArtifactAvailable ? { diff: diffWindows } : {}),
|
|
1520
|
-
evidenceCoverage: state.manager.evidenceCoverage,
|
|
1521
|
-
// sandbox 归属不在这里拼:它是租借时刻就定死的调度事实,由 runAttemptEffect 统一挂到
|
|
1522
|
-
// 每一条出口结果上(含 setup 失败与超时),见那边的 `sandboxFacts`。
|
|
1523
|
-
};
|
|
1524
|
-
return value;
|
|
1525
|
-
} catch (e) {
|
|
1526
|
-
// telemetry / diff 等 supplemental 路径显式保留 AbortSignal 语义;不要把用户中断
|
|
1527
|
-
// 降成 AttemptError 或 warning。外层 Effect 会负责中止并运行 release/finalizer。
|
|
1528
|
-
if (isAttemptAborted(signal)) throw e;
|
|
1529
|
-
recorder.failCurrent();
|
|
1530
|
-
// SandboxLayer command / agent.setup / 评分链路抛出的终局失败:同样先读空间轴回执,
|
|
1531
|
-
// 再折成纯数据 AttemptError(顺序不可换,见 declareFailure)。
|
|
1532
|
-
declareFailure(getPhase() ?? "eval.run", e);
|
|
1533
|
-
const value: EvalResult = {
|
|
1534
|
-
...base,
|
|
1535
|
-
durationMs: recorder.offsetNow(),
|
|
1536
|
-
error: errorFromThrown(e, getPhase(), res.attemptTimeout),
|
|
1537
|
-
...(agentSetup !== undefined ? { agentSetup } : {}),
|
|
1538
|
-
};
|
|
1539
|
-
return value;
|
|
1540
|
-
} finally {
|
|
1541
|
-
// 收尾段一律在 finally 跑(主链成败都执行),不改判定,各自兜错(diagnostic)、各自计时
|
|
1542
|
-
// (不计入 durationMs 口径,见 docs/feature/record/architecture.md)。执行序与 LifecyclePhase
|
|
1543
|
-
// 闭集声明一致:agent.teardown → sandbox.cleanup;各段可独立标 failed。
|
|
1544
|
-
// 沙箱 stop / 接收器 close 不在这里 —— 由 runAttemptEffect 的 Sample 在本函数返回后回收,
|
|
1545
|
-
// 并经 finalizer 计成 sandbox.stop。没有对应 teardown/cleanup 的段直接跳过,不产生空阶段。
|
|
1546
|
-
if (agentSetupReached && run.agent.teardown) {
|
|
1547
|
-
enterPhase("agent.teardown");
|
|
1548
|
-
await recorder
|
|
1549
|
-
.measureClosing("agent.teardown", async () => {
|
|
1550
|
-
try {
|
|
1551
|
-
// 先按 kind 收窄 Agent 联合,再取 teardown —— 否则可选属性访问会把
|
|
1552
|
-
// AgentTeardown | DirectAgentTeardown 混成无法调用的签名。
|
|
1553
|
-
if (run.agent.kind === "sandbox") {
|
|
1554
|
-
const teardown = run.agent.teardown;
|
|
1555
|
-
if (teardown) await withCleanupTimeout(() => teardown(sandbox, sandboxAttemptCtx));
|
|
1556
|
-
} else {
|
|
1557
|
-
const teardown = run.agent.teardown;
|
|
1558
|
-
if (teardown) await withCleanupTimeout(() => teardown(attemptCtx));
|
|
1559
|
-
}
|
|
1560
|
-
} catch (e) {
|
|
1561
|
-
declareFailure("agent.teardown", e);
|
|
1562
|
-
diagnostics.push(teardownDiagnostic("agent.teardown", e));
|
|
1563
|
-
throw e;
|
|
1564
|
-
}
|
|
1565
|
-
})
|
|
1566
|
-
.catch(() => {});
|
|
1567
|
-
}
|
|
1568
|
-
// Agent teardown 是 Promise author 边界内最后一步;作者 cleanup / Provider Case
|
|
1569
|
-
// 都由外层 Effect Scope finalizer 接管。
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
|
|
1573
|
-
/** 把一次 teardown / cleanup 失败折成一条 `DiagnosticRecord`(warning,不改判定)。message 取一层
|
|
1574
|
-
* 摘要(`firstLine(formatThrown)`),完整 stack 不塞进单 attempt 诊断 —— 诊断是「顺带发生的清理
|
|
1575
|
-
* 问题」,不是 attempt 的主因(主因在 verdict / error)。稳定 code `teardown-failed`。 */
|
|
1576
|
-
function teardownDiagnostic(phase: LifecyclePhase, e: unknown): DiagnosticRecord {
|
|
1577
|
-
return {
|
|
1578
|
-
code: "teardown-failed",
|
|
1579
|
-
level: "warning",
|
|
1580
|
-
detail: firstLine(formatThrown(e)),
|
|
1581
|
-
origin: attemptOrigin(phase),
|
|
1582
|
-
};
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
/** telemetry / diff 等 supplemental 采集失败不能吞掉 Attempt 自己的中断。 */
|
|
1586
|
-
function isAttemptAborted(signal: AbortSignal): boolean {
|
|
1587
|
-
return signal.aborted;
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
/** 诊断只保存有界结构化 cause,不把完整 SDK response 或 stack 灌进结果。 */
|
|
1591
|
-
function evidenceDiagnosticData(
|
|
1592
|
-
operation: string,
|
|
1593
|
-
e: unknown,
|
|
1594
|
-
provider?: string,
|
|
1595
|
-
): Readonly<globalThis.Record<string, JsonValue>> {
|
|
1596
|
-
const described = describeError(e);
|
|
1597
|
-
const bounded = (value: string): string => firstLine(value).slice(0, 500);
|
|
1598
|
-
const cause = described.cause === undefined
|
|
1599
|
-
? undefined
|
|
1600
|
-
: {
|
|
1601
|
-
...(described.cause.name !== undefined ? { name: described.cause.name } : {}),
|
|
1602
|
-
...(described.cause.code !== undefined ? { code: described.cause.code } : {}),
|
|
1603
|
-
message: bounded(described.cause.message),
|
|
1604
|
-
};
|
|
1605
|
-
return {
|
|
1606
|
-
operation,
|
|
1607
|
-
...(provider !== undefined ? { provider } : {}),
|
|
1608
|
-
error: bounded(described.message),
|
|
1609
|
-
...(cause !== undefined ? { cause } : {}),
|
|
1610
|
-
};
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
/**
|
|
1614
|
-
* 不参加敏感值替换的 Attempt 元数据。它们是调度、缓存与引用身份,或作者源码的原样快照;
|
|
1615
|
-
* 改写会让 result 与 run/manifests 身份分叉。其余 EvalResult 字段一律视为运行期证据并在
|
|
1616
|
-
* Attempt 交给 reporter 前递归封口。新增 EvalResult 字段默认不能悄悄落进豁免表:下面的
|
|
1617
|
-
* `EvalResultRedactionUnclassifiedKey` 会迫使作者明确裁决它属于哪一侧。
|
|
1618
|
-
*/
|
|
1619
|
-
const EVAL_RESULT_REDACTION_EXEMPT_KEYS = [
|
|
1620
|
-
"id",
|
|
1621
|
-
"description",
|
|
1622
|
-
"experimentId",
|
|
1623
|
-
"experiment",
|
|
1624
|
-
"agent",
|
|
1625
|
-
"model",
|
|
1626
|
-
"verdict",
|
|
1627
|
-
"fingerprint",
|
|
1628
|
-
"configHash",
|
|
1629
|
-
"attempt",
|
|
1630
|
-
"startedAt",
|
|
1631
|
-
"locator",
|
|
1632
|
-
"locatorRunId",
|
|
1633
|
-
"durationMs",
|
|
1634
|
-
"executionMs",
|
|
1635
|
-
"evaluationKind",
|
|
1636
|
-
"usage",
|
|
1637
|
-
"estimatedCostUSD",
|
|
1638
|
-
"sources",
|
|
1639
|
-
"sandbox",
|
|
1640
|
-
"artifactBase",
|
|
1641
|
-
"carriedAccepting",
|
|
1642
|
-
"migratedFrom",
|
|
1643
|
-
"acceptedFrom",
|
|
1644
|
-
"artifacts",
|
|
1645
|
-
] as const satisfies readonly (keyof EvalResult)[];
|
|
1646
|
-
|
|
1647
|
-
const EVAL_RESULT_REDACTED_EVIDENCE_KEYS = [
|
|
1648
|
-
"assertions",
|
|
1649
|
-
"scoreEntries",
|
|
1650
|
-
"retryAttempts",
|
|
1651
|
-
"error",
|
|
1652
|
-
"diagnostics",
|
|
1653
|
-
"facts",
|
|
1654
|
-
"phases",
|
|
1655
|
-
"skipReason",
|
|
1656
|
-
"events",
|
|
1657
|
-
"o11y",
|
|
1658
|
-
"trace",
|
|
1659
|
-
"agentSetup",
|
|
1660
|
-
"evidenceCoverage",
|
|
1661
|
-
"diff",
|
|
1662
|
-
"commands",
|
|
1663
|
-
"rawTranscript",
|
|
1664
|
-
] as const satisfies readonly (keyof EvalResult)[];
|
|
1665
|
-
|
|
1666
|
-
type EvalResultRedactionUnclassifiedKey = Exclude<
|
|
1667
|
-
keyof EvalResult,
|
|
1668
|
-
(typeof EVAL_RESULT_REDACTION_EXEMPT_KEYS)[number] | (typeof EVAL_RESULT_REDACTED_EVIDENCE_KEYS)[number]
|
|
1669
|
-
>;
|
|
1670
|
-
|
|
1671
|
-
/**
|
|
1672
|
-
* Attempt 的持久化证据封口。命令级元数据可能在较晚的 send/teardown 才登记,因此这里对
|
|
1673
|
-
* result.json、聚合 JSON/JUnit 与独立 artifact 会消费的全部运行期结构再做一次最终扫描,
|
|
1674
|
-
* 堵住“较早证据已写进内存、较晚才得知同一敏感值”的时序洞。源码与身份不是命令证据;
|
|
1675
|
-
* 任意自由文本里的未知 secret 仍必须由产生它的命令显式登记。
|
|
1676
|
-
*/
|
|
1677
|
-
function redactEvalResultEvidence(result: EvalResult, sensitiveValues: ReadonlySet<string>): EvalResult {
|
|
1678
|
-
if (sensitiveValues.size === 0) return result;
|
|
1679
|
-
// 编译期穷尽守卫:EvalResult 新增字段却没在上面两侧明确归类时,这里不再能赋值。
|
|
1680
|
-
const allFieldsClassified: EvalResultRedactionUnclassifiedKey extends never ? true : never = true;
|
|
1681
|
-
void allFieldsClassified;
|
|
1682
|
-
const redact = <Value>(value: Value): Value => redactSensitiveEvidence(value, sensitiveValues);
|
|
1683
|
-
const redactedEvidence = Object.fromEntries(
|
|
1684
|
-
EVAL_RESULT_REDACTED_EVIDENCE_KEYS.flatMap((key) => {
|
|
1685
|
-
const value = result[key];
|
|
1686
|
-
return value === undefined ? [] : [[key, redact(value)] as const];
|
|
1687
|
-
}),
|
|
1688
|
-
);
|
|
1689
|
-
return {
|
|
1690
|
-
...result,
|
|
1691
|
-
...redactedEvidence,
|
|
1692
|
-
};
|
|
1693
|
-
}
|
|
1694
|
-
|
|
1695
|
-
/**
|
|
1696
|
-
* 命令时间树包装:四个公开 run* 方法的最外层调用各记一个 command 子节点
|
|
1697
|
-
* (有界脱敏摘要 + exitCode;env 值不进入时间树)。Proxy 拦截 checked 与 unchecked 两组方法,
|
|
1698
|
-
* provider 内部 `this.runCommand(...)` 转调不经过它——不形成重复节点。每条命令(成功与非零
|
|
1699
|
-
* 退出都算)额外把已按已知敏感值脱敏的 `CommandResult` 登记进 `commands` 累加器,登记发生在
|
|
1700
|
-
* 把结果交还调用方**之前**
|
|
1701
|
-
* (docs/feature/record/architecture.md「commandsjson」);登记不改变 `runCommand` 的
|
|
1702
|
-
* 返回/抛错语义,调用方可以处理非零退出并继续,证据仍保留。checked 方法抛出的
|
|
1703
|
-
* `SandboxCommandExitError` 自带 `CommandResult`,同样登记;没有结果的 transport 错误只落
|
|
1704
|
-
* 时间树 `failed` 标记。
|
|
1705
|
-
*/
|
|
1706
|
-
function withCommandTiming(
|
|
1707
|
-
sandbox: Sandbox,
|
|
1708
|
-
recorder: TimingRecorder,
|
|
1709
|
-
getPhase: () => LifecyclePhase | undefined,
|
|
1710
|
-
commands: CommandExitEvidence[],
|
|
1711
|
-
sensitiveValues: Set<string>,
|
|
1712
|
-
deadlineAt: number | undefined,
|
|
1713
|
-
): Sandbox {
|
|
1714
|
-
const recordCommandExit = (
|
|
1715
|
-
node: TimingActivity | undefined,
|
|
1716
|
-
display: string,
|
|
1717
|
-
result: { exitCode: number; stdout?: unknown; stderr?: unknown },
|
|
1718
|
-
checked: boolean,
|
|
1719
|
-
): void => {
|
|
1720
|
-
if (!node) return;
|
|
1721
|
-
commands.push({
|
|
1722
|
-
timingNodeId: node.id,
|
|
1723
|
-
phase: getPhase() ?? "eval.run",
|
|
1724
|
-
display,
|
|
1725
|
-
exitCode: result.exitCode,
|
|
1726
|
-
checked,
|
|
1727
|
-
stdout: redactSensitiveText(typeof result.stdout === "string" ? result.stdout : "", sensitiveValues),
|
|
1728
|
-
stderr: redactSensitiveText(typeof result.stderr === "string" ? result.stderr : "", sensitiveValues),
|
|
1729
|
-
});
|
|
1730
|
-
};
|
|
1731
|
-
|
|
1732
|
-
const wrap = async <T>(
|
|
1733
|
-
cmd: string,
|
|
1734
|
-
args: readonly string[] | undefined,
|
|
1735
|
-
opts: unknown,
|
|
1736
|
-
checked: boolean,
|
|
1737
|
-
fn: () => Promise<T>,
|
|
1738
|
-
): Promise<T> => {
|
|
1739
|
-
rememberSensitiveValues(sensitiveValues, commandSensitiveValues(opts));
|
|
1740
|
-
const display = commandDisplay(cmd, args, sensitiveValues);
|
|
1741
|
-
const startOffsetMs = recorder.offsetNow();
|
|
1742
|
-
const wallStartedAt = Date.now();
|
|
1743
|
-
// 这条命令这次生效的线:显式 timeout 归命令自己那层,否则是 attempt deadline 在**命令开始
|
|
1744
|
-
// 这一刻**的剩余量——同一台沙箱上的第二条命令拿到的不是一整份上限。
|
|
1745
|
-
const limit = commandLimitAttribution(opts as { timeoutMs?: number } | undefined, { deadlineAt }, wallStartedAt);
|
|
1746
|
-
try {
|
|
1747
|
-
const result = await fn();
|
|
1748
|
-
const exitCode = (result as { exitCode?: unknown })?.exitCode;
|
|
1749
|
-
const nonZero = typeof exitCode === "number" && exitCode !== 0;
|
|
1750
|
-
const node = recorder.child(
|
|
1751
|
-
commandNode({
|
|
1752
|
-
display,
|
|
1753
|
-
startOffsetMs,
|
|
1754
|
-
durationMs: Math.max(0, recorder.offsetNow() - startOffsetMs),
|
|
1755
|
-
checked,
|
|
1756
|
-
...(limit !== undefined ? { limit } : {}),
|
|
1757
|
-
...(typeof exitCode === "number"
|
|
1758
|
-
? {
|
|
1759
|
-
exitCode,
|
|
1760
|
-
...(nonZero
|
|
1761
|
-
? {
|
|
1762
|
-
...(checked ? { failed: true } : {}),
|
|
1763
|
-
}
|
|
1764
|
-
: {}),
|
|
1765
|
-
}
|
|
1766
|
-
: {}),
|
|
1767
|
-
}),
|
|
1768
|
-
);
|
|
1769
|
-
if (typeof exitCode === "number") {
|
|
1770
|
-
recordCommandExit(node, display, {
|
|
1771
|
-
exitCode,
|
|
1772
|
-
...(result as { stdout?: unknown; stderr?: unknown }),
|
|
1773
|
-
}, checked);
|
|
1774
|
-
}
|
|
1775
|
-
// CommandResult.command:最外层公开调用恰好是「eval 实际跑了什么」的定义点,摘要
|
|
1776
|
-
// 与时间树节点同一份。记录边界是权威来源,provider 即使给过原始 command 也必须覆盖,
|
|
1777
|
-
// 不能让它从 CommandResult → assertion/error 旁路带出未脱敏文本。
|
|
1778
|
-
if (result !== null && typeof result === "object") {
|
|
1779
|
-
return { ...result, command: display } as T;
|
|
1780
|
-
}
|
|
1781
|
-
return result;
|
|
1782
|
-
} catch (e) {
|
|
1783
|
-
const commandResult = e instanceof SandboxCommandExitError ? e.result : undefined;
|
|
1784
|
-
const exitCode = commandResult?.exitCode;
|
|
1785
|
-
// 撞线失败的节点带 provider 实际执行的那条线(`SandboxCommandTimeoutError` 自带上限与
|
|
1786
|
-
// 「是不是显式声明」),不是这里事前算的那份——两者同源,但 provider 那份是真正掐断它的值。
|
|
1787
|
-
const hit =
|
|
1788
|
-
e instanceof SandboxCommandTimeoutError
|
|
1789
|
-
? {
|
|
1790
|
-
source: e.explicit ? ("command-timeout" as const) : ("attempt-deadline" as const),
|
|
1791
|
-
limitMs: e.limitMs,
|
|
1792
|
-
timedOut: true as const,
|
|
1793
|
-
}
|
|
1794
|
-
: limit;
|
|
1795
|
-
const node = recorder.child(
|
|
1796
|
-
commandNode({
|
|
1797
|
-
display,
|
|
1798
|
-
startOffsetMs,
|
|
1799
|
-
durationMs: Math.max(0, recorder.offsetNow() - startOffsetMs),
|
|
1800
|
-
checked,
|
|
1801
|
-
...(typeof exitCode === "number"
|
|
1802
|
-
? {
|
|
1803
|
-
exitCode,
|
|
1804
|
-
...(checked && exitCode !== 0 ? { failed: true } : {}),
|
|
1805
|
-
}
|
|
1806
|
-
: { failed: true }),
|
|
1807
|
-
...(hit !== undefined ? { limit: hit } : {}),
|
|
1808
|
-
}),
|
|
1809
|
-
);
|
|
1810
|
-
if (commandResult !== undefined) recordCommandExit(node, display, commandResult, checked);
|
|
1811
|
-
throw e;
|
|
1812
|
-
}
|
|
1813
|
-
};
|
|
1814
|
-
const timed = new Proxy(sandbox, {
|
|
1815
|
-
get(target, prop, receiver) {
|
|
1816
|
-
if (prop === "runCommand") {
|
|
1817
|
-
return (cmd: string, args?: readonly string[], opts?: unknown) =>
|
|
1818
|
-
wrap(cmd, args, opts, false, () => (target.runCommand as (...a: unknown[]) => Promise<unknown>)(cmd, args, opts));
|
|
1819
|
-
}
|
|
1820
|
-
if (prop === "runShell") {
|
|
1821
|
-
return (script: string, opts?: unknown) =>
|
|
1822
|
-
wrap(script, undefined, opts, false, () => (target.runShell as (...a: unknown[]) => Promise<unknown>)(script, opts));
|
|
1823
|
-
}
|
|
1824
|
-
if (prop === "runCommandOrThrow") {
|
|
1825
|
-
return (cmd: string, args?: readonly string[], opts?: unknown) =>
|
|
1826
|
-
wrap(cmd, args, opts, true, () => (target.runCommandOrThrow as (...a: unknown[]) => Promise<unknown>)(cmd, args, opts));
|
|
1827
|
-
}
|
|
1828
|
-
if (prop === "runShellOrThrow") {
|
|
1829
|
-
return (script: string, opts?: unknown) =>
|
|
1830
|
-
wrap(script, undefined, opts, true, () => (target.runShellOrThrow as (...a: unknown[]) => Promise<unknown>)(script, opts));
|
|
1831
|
-
}
|
|
1832
|
-
const value = Reflect.get(target, prop, receiver);
|
|
1833
|
-
return typeof value === "function" ? (value as (...a: unknown[]) => unknown).bind(target) : value;
|
|
1834
|
-
},
|
|
1835
|
-
});
|
|
1836
|
-
inheritSandboxCapabilities(sandbox, timed);
|
|
1837
|
-
return timed;
|
|
1838
|
-
}
|
|
1839
|
-
|
|
1840
|
-
/**
|
|
1841
|
-
* 收集 test 引用到的 eval 源码:从 send(user message)与断言的 loc 去重出文件集。
|
|
1842
|
-
* 命中 eval 自己的定义文件(绝大多数情况——send / 断言几乎总在 eval 主体里直接调用)时,
|
|
1843
|
-
* 直接用 discovery 时已经读好、归一化、算过哈希的 `evalSource`,不重新读盘;loc 指向
|
|
1844
|
-
* 其它文件(包括 callers 链中的 helper)在首次引用后由 registry 冻结;这里仅把已知路径
|
|
1845
|
-
* 补成 artifact。读取失败不能删掉 loc,投影会将该路径表示为 unavailable。
|
|
1846
|
-
*/
|
|
1847
|
-
async function collectSources(
|
|
1848
|
-
events: readonly StreamEvent[],
|
|
1849
|
-
assertions: readonly EvalResult["assertions"][number][],
|
|
1850
|
-
evalSource: CapturedEvalSource,
|
|
1851
|
-
registry?: SourceRegistry,
|
|
1852
|
-
): Promise<SourceArtifact[]> {
|
|
1853
|
-
if (registry) return registry.artifacts({ path: evalSource.path, content: evalSource.content, role: "entry" });
|
|
1854
|
-
const paths = new Set<string>();
|
|
1855
|
-
const add = (loc: import("../types.ts").SourceLoc | undefined) => {
|
|
1856
|
-
if (!loc) return;
|
|
1857
|
-
paths.add(loc.file);
|
|
1858
|
-
for (const frame of loc.callers ?? []) if (frame.kind === "project") paths.add(frame.file);
|
|
1859
|
-
};
|
|
1860
|
-
for (const e of events) if (e.type === "message") add(e.loc);
|
|
1861
|
-
for (const a of assertions) add(a.loc);
|
|
1862
|
-
const out: SourceArtifact[] = [{ path: evalSource.path, content: evalSource.content, role: "entry" }];
|
|
1863
|
-
for (const path of paths) {
|
|
1864
|
-
if (path === evalSource.path) {
|
|
1865
|
-
continue;
|
|
1866
|
-
}
|
|
1867
|
-
try {
|
|
1868
|
-
out.push({ path, content: await readSourceFile(resolvePath(process.cwd(), path), "utf-8"), role: "referenced" });
|
|
1869
|
-
} catch {
|
|
1870
|
-
// 缺内容仍保留在 callers 内,assembleSourceTree 会输出 unavailable 段。
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1873
|
-
return out;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
/** 解析后运行配置的穷尽投影(ExperimentRunInfo,见 docs/feature/record/architecture.md):
|
|
1877
|
-
* agent/model 只在快照顶层,这里不复制;sandbox 只经 provider 的公开参数投影落盘。
|
|
1878
|
-
* 第二个参数收整份项目配置(而不是只收 sandbox):`sandbox` 与 `timeoutMs` 记录真正生效的
|
|
1879
|
-
* run 级值;Judge 则连同 Eval 层逐字段解析并按 pair 落盘,使同一 Eval 的裁判 A/B 可回放。 */
|
|
1880
|
-
export function experimentRunInfo(
|
|
1881
|
-
run: AgentRun,
|
|
1882
|
-
plan: Attempt["plan"],
|
|
1883
|
-
sandboxPlansByEval: globalThis.Record<string, import("../types.ts").JsonValue>,
|
|
1884
|
-
config?: Pick<Config, "timeoutMs" | "judge">,
|
|
1885
|
-
evalJudge?: JudgeConfig,
|
|
1886
|
-
): EvalResult["experiment"] {
|
|
1887
|
-
const runLevelTimeoutMs = run.timeoutMs ?? config?.timeoutMs;
|
|
1888
|
-
const judge = resolveJudge(run.judge, evalJudge, config?.judge);
|
|
1889
|
-
return {
|
|
1890
|
-
...(run.description !== undefined ? { description: run.description } : {}),
|
|
1891
|
-
...(run.reasoningEffort !== undefined ? { reasoningEffort: run.reasoningEffort } : {}),
|
|
1892
|
-
...(Object.keys(run.flags).length > 0 ? { flags: run.flags } : {}),
|
|
1893
|
-
...(run.labels !== undefined && Object.keys(run.labels).length > 0 ? { labels: run.labels } : {}),
|
|
1894
|
-
attempts: run.attempts,
|
|
1895
|
-
earlyExit: run.earlyExit,
|
|
1896
|
-
...(runLevelTimeoutMs !== undefined ? { timeoutMs: runLevelTimeoutMs } : {}),
|
|
1897
|
-
...(run.budget !== undefined ? { budget: run.budget } : {}),
|
|
1898
|
-
...(run.maxConcurrency !== undefined ? { maxConcurrency: run.maxConcurrency } : {}),
|
|
1899
|
-
selectedEvalIds: [...run.selectedEvalIds],
|
|
1900
|
-
...(run.evalFilterFingerprint !== undefined ? { evalFilterFingerprint: run.evalFilterFingerprint } : {}),
|
|
1901
|
-
sandboxLayer: sandboxLayerIdentityFor(plan.pair, "experiment"),
|
|
1902
|
-
sandboxPlansByEval: { ...sandboxPlansByEval },
|
|
1903
|
-
...(run.sandboxReuse ? { sandboxReuse: true } : {}),
|
|
1904
|
-
...(run.strict ? { strict: true } : {}),
|
|
1905
|
-
...(judge
|
|
1906
|
-
? { judge: { model: judge.model, baseUrl: judge.baseUrl, timeoutMs: judge.timeoutMs } }
|
|
1907
|
-
: {}),
|
|
1908
|
-
agentInstalls: [...agentInstallPlansForRun(run)],
|
|
1909
|
-
};
|
|
1910
|
-
}
|
|
1911
|
-
|
|
1912
|
-
export { resolveJudge } from "./judge-config.ts";
|