Download src/plugin-sdk/test-helpers/agents/outcome-fallback-runtime-contract.ts from SaylorTwift/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/plugin-sdk/test-helpers/agents/outcome-fallback-runtime-contract.ts
- Command line
-
hf download hf://SaylorTwift/openclaw/src/plugin-sdk/test-helpers/agents/outcome-fallback-runtime-contract.ts
-
curl -L -o outcome-fallback-runtime-contract.ts https://huggingface.co/SaylorTwift/openclaw/resolve/main/src/plugin-sdk/test-helpers/agents/outcome-fallback-runtime-contract.ts
1.51 kB
| /** | |
| * Shared contract fixture for agent outcome fallback behavior. | |
| */ | |
| import type { EmbeddedAgentRunResult } from "../../../agents/embedded-agent-runner/types.js"; | |
| export const OUTCOME_FALLBACK_RUNTIME_CONTRACT = { | |
| primaryProvider: "openai", | |
| primaryModel: "gpt-5.4", | |
| fallbackProvider: "anthropic", | |
| fallbackModel: "claude-haiku-3-5", | |
| sessionId: "session-outcome-contract", | |
| sessionKey: "agent:main:outcome-contract", | |
| runId: "run-outcome-contract", | |
| prompt: "finish the contract turn", | |
| reasoningOnlyText: "I need to reason about this before answering.", | |
| planningOnlyText: "Inspect state, then decide the next step.", | |
| } as const; | |
| export function createContractRunResult( | |
| overrides: Partial<EmbeddedAgentRunResult> = {}, | |
| ): EmbeddedAgentRunResult { | |
| const { meta, ...rest } = overrides; | |
| return { | |
| payloads: [], | |
| didSendViaMessagingTool: false, | |
| messagingToolSentTexts: [], | |
| messagingToolSentMediaUrls: [], | |
| messagingToolSentTargets: [], | |
| successfulCronAdds: 0, | |
| ...rest, | |
| meta: { | |
| durationMs: 1, | |
| ...meta, | |
| }, | |
| }; | |
| } | |
| export function createContractFallbackConfig() { | |
| return { | |
| agents: { | |
| defaults: { | |
| model: { | |
| primary: `${OUTCOME_FALLBACK_RUNTIME_CONTRACT.primaryProvider}/${OUTCOME_FALLBACK_RUNTIME_CONTRACT.primaryModel}`, | |
| fallbacks: [ | |
| `${OUTCOME_FALLBACK_RUNTIME_CONTRACT.fallbackProvider}/${OUTCOME_FALLBACK_RUNTIME_CONTRACT.fallbackModel}`, | |
| ], | |
| }, | |
| }, | |
| }, | |
| } as const; | |
| } | |