import type { MessageSender } from "../message-sender.js"; import type { PromptAttachmentRef } from "../types.js"; import type { TurnResult } from "../types.js"; import { type DurableSessionRuntime } from "./state.js"; /** * Scan a finished turn's captured events for a failed `set_session_model` tool * call. The inline control tool returns its outcome as a plain string (see * session-proxy `setSessionModel`), so `tool.execution_complete.data.result` * is usually a string; some transports wrap it as `{ content }`. We match the * `set_session_model failed` marker across both shapes. Exported for unit tests. */ export declare function detectFailedModelSwitch(events: Array<{ eventType?: string; data?: any; }> | undefined): string | null; /** @internal Project a non-retryable credential failure without terminating the orchestration. */ export declare function projectAuthFailure(runtime: DurableSessionRuntime, errorMessage: string): Generator; export declare function processPrompt(runtime: DurableSessionRuntime, promptText: string, isBootstrap: boolean, requiredTool?: string, clientMessageIds?: string[], cycleOrigin?: "cron" | "cron_at", sender?: MessageSender, attachments?: PromptAttachmentRef[]): Generator; /** * Normalize a raced runTurn branch value. The duroxide-node select bridge * flattens activity failures into their raw error string (make_select_future: * `Ok(v) => v, Err(e) => e`) instead of throwing into the generator, so the * caller must distinguish a TurnResult payload from an error message. */ export declare function normalizeRacedTurnValue(value: any): { kind: "result"; result: any; } | { kind: "error"; message: string; }; export declare function handleTurnResult(runtime: DurableSessionRuntime, result: TurnResult, sourcePrompt: string, cycleOrigin?: "cron" | "cron_at", clientMessageIds?: string[], isBootstrap?: boolean, requiredTool?: string): Generator; export declare function processTimer(runtime: DurableSessionRuntime, timerItem: any): Generator; //# sourceMappingURL=turn.d.ts.map