import type { TerminalAgentAdapter, TerminalRuntimeIdentity } from "./terminal-agent-adapter.js"; import type { ExecutorKind } from "./executors.js"; import type { TerminalControlRef } from "./terminal-control-ref.js"; import { type TerminalModelControlPlan } from "./terminal-model-control.js"; /** Current styled readiness; animated emptiness never overrides input owners. */ export declare function codexAutomatedInputComposerReady(input: { screen: string; terminalControl: TerminalControlRef; runtime?: TerminalRuntimeIdentity; adapter(): TerminalAgentAdapter; }): boolean; declare function exactClaudeModelControlComposerCapture(screen: string, plan: TerminalModelControlPlan, expectedText: string): { digest: string; } | undefined; declare function codexBlockingModalVisible(screen: string): boolean; /** * Detect only a positively identified surface that owns terminal input. * Ordinary Composer visibility, emptiness, and draft contents deliberately do * not participate: a human-explicit Send replaces those contents. Unknown or * clipped captures therefore remain advisory, while a known modal/editor/ * viewer/history-search surface suppresses the advertised Send action. */ declare function terminalUserExplicitInputOwnerBlocked(screen: string | undefined): boolean; /** Reject a foreground editor/viewer process even when its TUI is unfamiliar. */ declare function terminalUserExplicitTerminalInputOwnerBlocked(terminalControl: TerminalControlRef): boolean; declare function terminalUserExplicitInputSafetyFailure(input: { readonly agent: ExecutorKind; readonly displayName: string; readonly screen: string; readonly terminalControl: TerminalControlRef; readonly approvalBlocked: boolean; readonly awaitingApproval: boolean; readonly interactionActive: boolean; readonly modelControlSurface: boolean; readonly requireExactEmptyClaudeComposer: boolean; }): string | undefined; declare function codexActiveWriterViewerVisible(styledScreen: string): boolean; export type CodexAsyncQuestionInputMode = "absent" | "collapsed" | "expanded" | "ambiguous"; /** * Classify Codex 0.154's non-blocking inline-question surface by current input * ownership. The shared `Queued follow-up inputs` heading is not sufficient: * ordinary queued messages use it too. An exact collapsed summary, after any * ordinary queue preview is removed, proves Send-safe ownership even when the * Composer is outside the viewport. Positive editor evidence without a * complete shape remains fail-closed because paste plus Enter would otherwise * submit the user's task as an answer. */ export declare function inspectCodexAsyncQuestionInputMode(styledScreen: string): CodexAsyncQuestionInputMode; /** * Classify only the bottom live Codex composer region. A matching transcript * prompt elsewhere in scrollback is deliberately ignored. */ declare function currentCodexComposerCapture(styledScreen: string, expectedText: string, allowOpaqueLargePastePlaceholder?: boolean, classifyOpaqueLargePasteAsDifferent?: boolean, exactSlashPopupRows?: readonly string[], allowStyledSlashPopupWithoutViewportPaint?: boolean, agentVersion?: string): { state: "exact_draft" | "exact_empty" | "different_draft"; digest: string; profiledSlashPopup?: true; bareCommand?: true; } | undefined; /** * Terminal UIs paint wrapped composer content as independent screen rows, so * a provider capture cannot distinguish a visual wrap from an authored * newline. Align the rows against the exact text AKK injected instead of * joining every row with `\n`. * * Only row boundaries are ambiguous: they may consume an authored newline, an * omitted run of ASCII spaces at a word wrap, or no character at a CJK/token * wrap. Every visible character remains character-for-character exact, and an * empty row can only advance through an authored newline (plus terminal-trimmed * spaces before it), so blank-line structure is preserved. */ declare function terminalComposerRowsMatchExpected(rows: readonly string[], expectedText: string): boolean; declare function exactTerminalComposerCapture(agent: ExecutorKind, screen: string, expectedText: string): { digest: string; } | undefined; declare function exactClaudeComposerCapture(screen: string, expectedText: string): { digest: string; } | undefined; declare function exactClaudeInjectedPastePlaceholderCapture(screen: string, expectedText: string): { state: "exact_injected_paste_placeholder"; digest: string; pasteId: number; newlineCount: number; frameProfile: string; } | undefined; export { codexActiveWriterViewerVisible, codexBlockingModalVisible, currentCodexComposerCapture, exactClaudeComposerCapture, exactClaudeInjectedPastePlaceholderCapture, exactClaudeModelControlComposerCapture, exactTerminalComposerCapture, terminalUserExplicitInputSafetyFailure, terminalUserExplicitTerminalInputOwnerBlocked, terminalUserExplicitInputOwnerBlocked, terminalComposerRowsMatchExpected };