(rawValue: unknown)
| 3000 | } |
| 3001 | |
| 3002 | function parseWorkflowAgentThinkingLevel(rawValue: unknown): ParsedThinkingInput | undefined { |
| 3003 | if (rawValue === undefined) { |
| 3004 | return undefined; |
| 3005 | } |
| 3006 | const value = typeof rawValue === "number" ? String(rawValue) : rawValue; |
| 3007 | assert( |
| 3008 | typeof value === "string" && value.trim().length > 0, |
| 3009 | "agent thinking must be a non-empty string or numeric index" |
| 3010 | ); |
| 3011 | const parsed = parseThinkingInput(value); |
| 3012 | assert( |
| 3013 | parsed !== undefined, |
| 3014 | "agent thinking must be one of off, low, medium, high, xhigh, max, or a numeric index" |
| 3015 | ); |
| 3016 | return parsed; |
| 3017 | } |
| 3018 | |
| 3019 | const WORKFLOW_AGENT_TIMEOUT_MIN_MS = 1_000; |
| 3020 | const WORKFLOW_AGENT_SOFT_TIMEOUT_MAX_MS = 24 * 60 * 60 * 1000; |
no test coverage detected