MCPcopy Create free account
hub / github.com/coder/mux / parseWorkflowAgentThinkingLevel

Function parseWorkflowAgentThinkingLevel

src/node/services/workflows/WorkflowRunner.ts:3002–3017  ·  view source on GitHub ↗
(rawValue: unknown)

Source from the content-addressed store, hash-verified

3000}
3001
3002function 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
3019const WORKFLOW_AGENT_TIMEOUT_MIN_MS = 1_000;
3020const WORKFLOW_AGENT_SOFT_TIMEOUT_MAX_MS = 24 * 60 * 60 * 1000;

Callers 1

parseWorkflowAgentSpecFunction · 0.85

Calls 2

parseThinkingInputFunction · 0.90
assertFunction · 0.50

Tested by

no test coverage detected