import { type CodexAppServerMetadata, type CodexAppServerReadTransport } from "./codex-app-server-read-client.js"; import type { CodexPaginatedThreadBinding } from "./codex-paginated-thread-facts.js"; import { captureCodexPaginatedAnswerProof, readCodexPaginatedAnswerProof } from "./codex-paginated-answer-proof.js"; export interface CodexAppServerInputQuestion { id: string; header: string; question: string; isOther: boolean; isSecret: boolean; options: { label: string; description: string; }[] | null; } export interface CodexAppServerPendingQuestion { requestId: string | number; threadId: string; turnId: string; itemId: string; questions: CodexAppServerInputQuestion[]; isBlocking: boolean; } export type CodexAppServerQuestionAnswers = Record; export interface CodexAppServerAnswerResult { status: "confirmed" | "response_uncertain"; requestId: string | number; itemId: string; reason?: string; } export interface CodexAppServerInteractionOptions { binding: CodexPaginatedThreadBinding; nativeTurnId: string; timeoutMs?: number; transportFactory?: (options: { socketPath: string; timeoutMs: number; }) => Promise; sleep?: (milliseconds: number) => Promise; captureAnswerProof?: typeof captureCodexPaginatedAnswerProof; readAnswerProof?: typeof readCodexPaginatedAnswerProof; } /** Scoped question handling. This client cannot start, steer, stop, or configure turns. */ export declare class CodexAppServerInteractionClient { private readonly transport; private readonly options; private readonly timeoutMs; readonly metadata: CodexAppServerMetadata; private readonly requests; private readonly questions; private readonly sentAnswers; private readonly resolvedRequests; private readonly unsubscribe; private nextId; private closed; private attached; private rolloutPath?; private constructor(); static connect(options: CodexAppServerInteractionOptions): Promise; listPendingQuestions(): readonly CodexAppServerPendingQuestion[]; answer(requestId: string | number, answers: CodexAppServerQuestionAnswers): Promise; close(): Promise; private verifyActiveQuestionTurn; private assertNativeThread; private confirmAnswer; private request; private receive; private captureQuestion; private finish; } export declare const connectCodexAppServerInteractionClient: typeof CodexAppServerInteractionClient.connect;