import { type CodexOpenRootRolloutInventory } from "./agent-session-provider.js"; import { type CodexAsyncQuestionDurableEvidence } from "./codex-async-question-adapter.js"; import { type CodexRolloutAcceptanceIdentity, type CodexRolloutIdentity } from "./terminal-submission-facts.js"; export interface CodexQuestionnaireScreenEvidence { currentStep: number; totalSteps: number; prompt: string; responseKind: "single_select" | "multi_select" | "free_text" | "confirm"; options?: ReadonlyArray<{ label: string; description?: string; }>; /** Changed/unsupported frames may only use unique pending-call attribution. */ exactShape: boolean; } export type CodexBoundQuestionnaireAttributionResult = { status: "matched"; evidenceFingerprint: string; } | { status: "not_matched"; code: "accepted_root_missing" | "accepted_call_not_unique" | "screen_signature_not_unique"; } | { status: "unavailable"; code: "invalid_inventory" | "invalid_screen" | "rollout_scan_unavailable"; }; /** * Attributes a rendered questionnaire to one exact accepted Codex turn while * the process has multiple open root rollouts. No prompt or tool arguments are * returned: callers receive only a bounded fingerprint or a typed failure. */ export declare function detectCodexBoundQuestionnaireAttribution(options: { currentInventory: CodexOpenRootRolloutInventory; acceptedIdentity: CodexRolloutAcceptanceIdentity; acceptanceId: string; screen: CodexQuestionnaireScreenEvidence; maxBytesPerRollout?: number; }): CodexBoundQuestionnaireAttributionResult; /** * Read only the bounded, complete tail of one exact rollout and return async * questions belonging to its single currently active native turn. A missing * task boundary, a partial record, file drift, or an unsupported payload is a * hard absence rather than permission to infer from screen text alone. */ export declare function readCodexAsyncQuestionDurableEvidence(input: { rollout: CodexRolloutIdentity; nativeThreadId: string; maxBytes?: number; }): readonly CodexAsyncQuestionDurableEvidence[] | undefined;