import type { ProviderModule } from './contracts.js';
export declare function normalizeApprovalLabel(value: string): string;
export declare function isNegativeApprovalLabel(value: string): boolean;
/**
 * True when any of the given button labels reads as a decline/negative option
 * (No / Deny / Cancel / Skip / …). Used as the second half of an approval-modal
 * structural anchor: a real approval modal offers BOTH an affirmative and a
 * decline, which distinguishes it from a generic numbered menu or prose list.
 */
export declare function hasNegativeApprovalOption(buttons: string[] | null | undefined): boolean;
/**
 * True when a button reliably identifies a tool-CONSENT modal on its own — a
 * scoped permission-grant affirmative such as:
 *   - "Yes, allow all edits in tmp/ during this session"
 *   - "Yes, and don't ask again for example.com"
 *   - "Yes, allow reading from etc/ from this project"
 *   - "Always allow"
 *
 * These options only ever appear in a genuine approval/permission prompt; a
 * /model or /mode picker ("1. Default  2. Opus  3. Sonnet") never offers a
 * "grant this scope" choice. They therefore serve as a SECOND reliable
 * structural anchor alongside {@link hasNegativeApprovalOption}.
 *
 * Why this exists (tall-diff fallback, #137): when a Write/Edit diff is tall,
 * the trailing decline option ("3. No") can scroll off the bottom of the
 * captured PTY frame, leaving only "1. Yes" + "2. Yes, allow … this session".
 * hasNegativeApprovalOption then reads false and the auto-approve gate bails —
 * a delegated worker sits forever on a modal it could safely have approved. The
 * grant-scope affirmative lets the gate recognize the consent modal WITHOUT
 * seeing the off-frame decline. The gate still selects the plain "Yes"
 * (allow-once) via pickApprovalButton, never the broader grant, and the settle
 * gate still requires a stable modal — so a half-rendered frame never fires.
 * Kept deliberately narrow so no picker/confirm modal can trip it.
 */
export declare function hasReliableApprovalAffirmative(buttons: string[] | null | undefined): boolean;
export declare function getApprovalPositiveHints(provider?: Pick<ProviderModule, 'approvalPositiveHints'> | null): string[];
export declare function pickApprovalButton(buttons: string[] | null | undefined, provider?: Pick<ProviderModule, 'approvalPositiveHints'> | null): {
    index: number;
    label: string;
};
export declare function pickAutoApprovalButton(buttons: string[] | null | undefined): {
    index: number;
    label: string;
};
export declare function formatAutoApprovalMessage(modalMessage?: string, buttonLabel?: string): string;
/**
 * Returns true when the given text (e.g. last assistant message content, or
 * the tail of the PTY screen) looks like an active approval/input prompt
 * rather than a completed assistant response. Used to prevent false
 * idle/completion events when Claude Code surfaces a "Do you want to proceed?"
 * style prompt that the PTY parser captures as an assistant turn while the
 * session is still awaiting user input.
 */
export declare function looksLikeActiveApprovalPromptText(content: string): boolean;
