export interface SmartSwitchState {
    /** true = cross-vendor degraded; all PRs route to fallbackVendor */
    active: boolean;
    degradedVendor: 'claude' | 'codex' | null;
    fallbackVendor: 'claude' | 'codex' | null;
    reason: string;
    since: Date | null;
    restoreAttemptCount: number;
    /**
     * Set after _attemptRestore fires. Tracks which vendor needs to succeed at
     * a real review before we announce confirmed restoration.
     */
    pendingRecoveryVendor: 'claude' | 'codex' | null;
}
export type SmartSwitchAnnounce = (line1: string, line2?: string) => void;
export declare function getSmartSwitch(): Readonly<SmartSwitchState>;
/**
 * Returns true when the error message pattern matches known subscription / rate-limit
 * errors from either the claude or codex CLIs.
 */
export declare function isSubscriptionLimitError(err: unknown): boolean;
/**
 * Inspects the error message prefix emitted by runClaudeReview / runCodexReview
 * to determine which vendor threw.
 */
export declare function detectFailedVendor(err: unknown): 'claude' | 'codex' | null;
/**
 * Activates smart-switch: demotes cross-vendor to single-vendor mode using the
 * healthy vendor, announces loudly, and arms the 30-minute restore timer.
 *
 * Idempotent — calling again for the same degraded vendor re-arms the timer without
 * double-announcing.
 */
export declare function triggerSwitch(degradedVendor: 'claude' | 'codex', reason: string, announce: SmartSwitchAnnounce): void;
/**
 * Call after every successful review. When a restore attempt is pending and this
 * reviewer matches the recovering vendor, announces confirmed restoration.
 */
export declare function notifyReviewSuccess(reviewer: 'claude' | 'codex', announce: SmartSwitchAnnounce): void;
/** Call on process exit to clear the restore timer without firing it. */
export declare function stopSmartSwitch(): void;
/** Resets all state — intended for testing only. */
export declare function _resetSmartSwitch(): void;
//# sourceMappingURL=smart-switch.d.ts.map