import { type CodexAppServerReadTransport } from "./codex-app-server-read-client.js"; import { codexProcessIncarnationForPid } from "./codex-process-incarnation.js"; import { readCodexPaginatedTaskSnapshot } from "./codex-paginated-observation.js"; import type { CodexPaginatedThreadBinding } from "./codex-paginated-thread-facts.js"; import type { CodexAsyncQuestionDurableQuestion } from "./codex-async-question-adapter.js"; export interface CodexPaginatedAsyncAnswerInput { binding: CodexPaginatedThreadBinding; nativeTurnId: string; itemId: string; questionIndex: number; expectedQuestion: CodexAsyncQuestionDurableQuestion; answer: string; timeoutMs?: number; /** Reserve the durable interaction exactly once, after preflight and before native input. */ beforeDispatch?: () => Promise; } export interface CodexPaginatedAsyncAnswerResult { status: "confirmed" | "response_uncertain"; clientUserMessageId: string; nativeTurnId: string; nativeQuestionId: string; reason?: string; } export interface CodexPaginatedAsyncAnswerPorts { readSnapshot?: typeof readCodexPaginatedTaskSnapshot; transportFactory?: (options: { socketPath: string; timeoutMs: number; }) => Promise; incarnation?: typeof codexProcessIncarnationForPid; randomId?: () => string; sleep?: (milliseconds: number) => Promise; now?: () => number; } /** One exact native async answer. This API cannot create, resume, or start a task. */ export declare function deliverCodexPaginatedAsyncAnswer(request: CodexPaginatedAsyncAnswerInput, ports?: CodexPaginatedAsyncAnswerPorts): Promise;