import type { CodexAppFinalMarker, CodexAppLifecycleCategory, CodexAppLifecycleEvent, CodexAppRunnerInput } from './codex-app-runner-protocol.js'; import type { CodexAppTurnInput } from '../types.js'; export declare class CodexAppRpcResponseError extends Error { readonly method: string; readonly code?: number; readonly data?: unknown; constructor(method: string, error: unknown); } export declare class CodexAppTransportError extends Error { constructor(message: string); } export interface CodexAppPreparedInput { input: Array>; additionalContext?: CodexAppTurnInput['additionalContext']; clientUserMessageId?: string; visibleText: string; structured: boolean; skippedImages?: string[]; } export interface CodexAppTurnControllerDeps { cwd: string; ensureThread(): Promise; request(method: string, params: unknown): Promise; prepareInput(input: CodexAppRunnerInput, structuredDisabled: boolean): CodexAppPreparedInput; isStartCapabilityError?(error: unknown): boolean; onTurnInput?(input: CodexAppRunnerInput, prepared: CodexAppPreparedInput): void; onOutput?(text: string): void; onDiagnostic?(message: string): void; onLifecycle?(event: CodexAppLifecycleEvent): void; onFinal(marker: CodexAppFinalMarker & { appTurnId: string; }): void; onPrompt?(): void; now?(): number; } export declare function isDefiniteSteerRejection(error: CodexAppRpcResponseError): boolean; export declare class CodexAppTurnController { private readonly deps; private readonly queue; private readonly closedTurnIds; private active; private fatal; private structuredDisabled; private failureSequence; private driving; private driveAgain; constructor(deps: CodexAppTurnControllerDeps); enqueue(input: CodexAppRunnerInput): void; handleNotification(message: unknown): void; handleFatal(error: unknown, category?: Extract): void; private drive; private startTurn; private beginTurnStart; private steerQueueHead; private performSteer; private turnStartParams; private reportPreparedInput; private adoptAppTurnId; private emitTurnStarted; private emitUnknownOutcome; private finalizeTurn; private emitFailure; private emitStandaloneFailure; private afterTurn; private rememberClosedTurn; private nextFailureId; private now; private emitLifecycle; private activeOperation; private errorCategory; } //# sourceMappingURL=codex-app-turn-controller.d.ts.map