/** Suppress duplicate backspace bursts from some terminals (openclaw-aligned). */
export declare function createBackspaceDeduper(params?: {
    dedupeWindowMs?: number;
    now?: () => number;
}): (data: string) => string;
export declare function isIgnorableTuiStopError(error: unknown): boolean;
export declare function stopTuiSafely(stop: () => void): void;
export type DrainableTui = {
    stop: () => void;
    terminal?: {
        drainInput?: (maxMs?: number, idleMs?: number) => Promise<void>;
    };
};
export declare function drainAndStopTuiSafely(tui: DrainableTui): Promise<void>;
type CtrlCAction = 'clear' | 'warn' | 'exit';
/** Double Ctrl+C within `exitWindowMs` to exit when the input line is empty (openclaw semantics). */
export declare function resolveCtrlCAction(params: {
    hasInput: boolean;
    now: number;
    lastCtrlCAt: number;
    exitWindowMs?: number;
}): {
    action: CtrlCAction;
    nextLastCtrlCAt: number;
};
export {};
