import type { ChatMessage, Mode, ProviderId, SuccessfulRequestSnapshot } from "../../types.js"; import type { PreviousTurnSignal, RunTurnRequest } from "../ports/agent-port.js"; export interface TurnRequestInput { readonly prompt: string; readonly mode: Mode; readonly provider: ProviderId; readonly model: string; readonly history: readonly ChatMessage[]; readonly materializeImages: boolean; readonly displayPrompt?: string | null | undefined; readonly previousTurn?: PreviousTurnSignal | undefined; readonly previousSuccessfulRequest?: SuccessfulRequestSnapshot | undefined; readonly contextLimitTokens?: number | undefined; readonly getContextLimitTokens?: (provider: ProviderId | undefined, model: string | undefined) => number | undefined; } export interface BuiltTurnRequest { readonly request: RunTurnRequest; readonly fallbackReason?: string | undefined; readonly imageIssues: readonly string[]; } /** Resolve attachments/vision once and assemble the agent request. */ export declare function buildTurnRequest(input: TurnRequestInput): BuiltTurnRequest;