import type { CodexNativeTaskRecord, PersistedNativeInteraction } from "./codex-native-state-store.js"; import type { CodexNativeIdentity, CodexNativeSnapshot, CodexNativeTurn, NativeInteractionResponse } from "./codex-native-types.js"; /** Keep native request projections separate from terminal screen-derived questionnaire contracts. */ export declare function validateNativeInteractionProjections(value: unknown, conversationId: unknown, watchId?: unknown): unknown[]; export declare function nativeInteractionProjection(interaction: PersistedNativeInteraction, conversationId: string, watchId?: string): { watch_id: string; conversation_id?: undefined; interaction_id: string; kind: "async_question" | "blocking_question" | "command_approval" | "file_approval"; status: string; native_thread_id: string; native_turn_id: string; command?: string | undefined; reason?: string | undefined; network?: { host: string; protocol: string; } | undefined; cwd?: string | undefined; file_changes?: { path: string; kind?: string; diff?: string; diffTruncated?: boolean; }[] | undefined; delivery_modes?: string[] | undefined; questions: { question_id: string; title: string; is_secret?: boolean | undefined; response_kind: string; allow_free_text: boolean; options: { option_id: string; label: string; }[]; }[]; available_actions: { approve: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; respond?: undefined; } | { approve?: undefined; respond: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; }; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; kind: "async_question" | "blocking_question" | "command_approval" | "file_approval"; status: string; native_thread_id: string; native_turn_id: string; command?: string | undefined; reason?: string | undefined; network?: { host: string; protocol: string; } | undefined; cwd?: string | undefined; file_changes?: { path: string; kind?: string; diff?: string; diffTruncated?: boolean; }[] | undefined; delivery_modes?: string[] | undefined; questions: { question_id: string; title: string; is_secret?: boolean | undefined; response_kind: string; allow_free_text: boolean; options: { option_id: string; label: string; }[]; }[]; available_actions: { approve: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; respond?: undefined; } | { approve?: undefined; respond: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; }; }; /** Resolve advertised opaque IDs against fresh native questions, never against labels supplied by a caller. */ export declare function nativeQuestionResponse(interaction: PersistedNativeInteraction, value: unknown): NativeInteractionResponse; export declare function nativeTurnProjection(turn: CodexNativeTurn | undefined): { id: string; status: "completed" | "failed" | "inProgress" | "interrupted"; items_complete: boolean; final_text: string; } | { id: string; status: "completed" | "failed" | "inProgress" | "interrupted"; items_complete: boolean; response_text: string; } | null; export declare function codexNativeSessionProjection(identity: CodexNativeIdentity, snapshot: CodexNativeSnapshot, backendVersion: string, interactionsScanned?: boolean): { id: string; conversation_id: string; source: string; agent: string; title: {}; cwd: string; native_thread_id: string; native_turn_id: string | null; backend_version: string; connection_state: string; history_state?: string | undefined; control_limitation?: string | undefined; activity_state: "active" | "idle" | "notLoaded" | "systemError"; active_flags: ("waitingOnApproval" | "waitingOnUserInput")[]; interaction_requests_scanned: boolean; pending_interaction_count: number | null; attention_required: boolean; capabilities: { status: boolean; send: boolean; watch: boolean; interaction_notify: boolean; interaction_respond: boolean; approve: boolean; set_permissions: boolean; }; interaction_state: ({ watch_id: string; conversation_id?: undefined; interaction_id: string; kind: "async_question" | "blocking_question" | "command_approval" | "file_approval"; status: string; native_thread_id: string; native_turn_id: string; command?: string | undefined; reason?: string | undefined; network?: { host: string; protocol: string; } | undefined; cwd?: string | undefined; file_changes?: { path: string; kind?: string; diff?: string; diffTruncated?: boolean; }[] | undefined; delivery_modes?: string[] | undefined; questions: { question_id: string; title: string; is_secret?: boolean | undefined; response_kind: string; allow_free_text: boolean; options: { option_id: string; label: string; }[]; }[]; available_actions: { approve: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; respond?: undefined; } | { approve?: undefined; respond: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; }; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; kind: "async_question" | "blocking_question" | "command_approval" | "file_approval"; status: string; native_thread_id: string; native_turn_id: string; command?: string | undefined; reason?: string | undefined; network?: { host: string; protocol: string; } | undefined; cwd?: string | undefined; file_changes?: { path: string; kind?: string; diff?: string; diffTruncated?: boolean; }[] | undefined; delivery_modes?: string[] | undefined; questions: { question_id: string; title: string; is_secret?: boolean | undefined; response_kind: string; allow_free_text: boolean; options: { option_id: string; label: string; }[]; }[]; available_actions: { approve: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; respond?: undefined; } | { approve?: undefined; respond: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; }; })[]; latest_turn: { id: string; status: "completed" | "failed" | "inProgress" | "interrupted"; items_complete: boolean; final_text: string; } | { id: string; status: "completed" | "failed" | "inProgress" | "interrupted"; items_complete: boolean; response_text: string; } | null; available_actions: { status: { tool: string; input: { conversation_id: string; }; }; send?: { tool: string; input: { conversation_id: string; }; } | undefined; watch?: { tool: string; input: { conversation_id: string; }; } | undefined; permission_options?: { tool: string; input: { conversation_id: string; }; } | undefined; }; }; export declare function codexNativeTaskProjection(task: CodexNativeTaskRecord): { task_kind: "send" | "watch"; turn_id?: string | undefined; management_state: string; observation_state: string; deadline_at: string; renewal_count: number; closed_at: string | undefined; close_reason: string | undefined; unwatched_at: string | undefined; renewed_at: string | undefined; recovered_at: string | undefined; callback_in_flight: boolean; retryable_callback_ids: string[]; watch_id: string; conversation_id: string; source: string; status: string; observation_status: import("./codex-native-state-store.js").CodexNativeTaskStatus; observation_active: boolean; available_actions: { recover?: { tool: string; input: { watch_id: string; }; } | undefined; renew?: { tool: string; input: { watch_id: string; }; } | undefined; unwatch?: { tool: string; input: { watch_id: string; }; } | undefined; close?: { tool: string; input: { turn_id: string; }; } | undefined; retry_callback?: { tool: string; input: { watch_id: string; notification_id: string; }; } | undefined; }; native_thread_id: string; native_turn_id: string | null; observation_mode: string; anchor_state: string; created_at: string; updated_at: string; observed_at: string | undefined; observation_error: string | undefined; final_text: string | undefined; pending_interaction_count: number; interaction_state: ({ watch_id: string; conversation_id?: undefined; interaction_id: string; kind: "async_question" | "blocking_question" | "command_approval" | "file_approval"; status: string; native_thread_id: string; native_turn_id: string; command?: string | undefined; reason?: string | undefined; network?: { host: string; protocol: string; } | undefined; cwd?: string | undefined; file_changes?: { path: string; kind?: string; diff?: string; diffTruncated?: boolean; }[] | undefined; delivery_modes?: string[] | undefined; questions: { question_id: string; title: string; is_secret?: boolean | undefined; response_kind: string; allow_free_text: boolean; options: { option_id: string; label: string; }[]; }[]; available_actions: { approve: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; respond?: undefined; } | { approve?: undefined; respond: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; }; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; kind: "async_question" | "blocking_question" | "command_approval" | "file_approval"; status: string; native_thread_id: string; native_turn_id: string; command?: string | undefined; reason?: string | undefined; network?: { host: string; protocol: string; } | undefined; cwd?: string | undefined; file_changes?: { path: string; kind?: string; diff?: string; diffTruncated?: boolean; }[] | undefined; delivery_modes?: string[] | undefined; questions: { question_id: string; title: string; is_secret?: boolean | undefined; response_kind: string; allow_free_text: boolean; options: { option_id: string; label: string; }[]; }[]; available_actions: { approve: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; respond?: undefined; } | { approve?: undefined; respond: { tool: string; input: { watch_id: string; conversation_id?: undefined; interaction_id: string; } | { watch_id?: undefined; conversation_id: string; interaction_id: string; }; }; }; })[]; callback_configured: boolean; callback_expected: boolean; callback_notifications: { id: string; notification_id: string; status: "accepted" | "failed" | "leased" | "ready" | "retry_wait" | "uncertain"; attempts: number; error_code?: string | undefined; }[]; capabilities: { close: boolean; renew: boolean; recover: boolean; retry_callback: boolean; callback: boolean; interaction_notify: boolean; interaction_respond: boolean; approve: boolean; }; message_id?: string | undefined; delivered?: boolean | undefined; send_state?: "accepted" | "not_sent" | "reserved" | "uncertain" | undefined; delivery_receipt?: string | undefined; agent_acceptance?: string | undefined; send_error?: string | undefined; resend_allowed?: boolean | undefined; };