import type { AckResult } from "./sessions.js"; export declare const RETRY_MS = 20000; export declare const GIVEUP_MS: number; export declare const HELD_REASON = "input line holds unsent text \u2014 not typed"; export declare const UNREADABLE_REASON = "could not read the target terminal \u2014 not typed"; export interface GuardDeps { /** Live pane text, or null when it cannot be read. */ read(sessionId: string): Promise; type(sessionId: string, text: string): Promise; mailboxSize(sessionId: string): number; now(): number; setTimer(fn: () => void, ms: number): { unref?: () => void; } | unknown; clearTimer(t: unknown): void; } export declare const realGuardDeps: GuardDeps; export type GuardResult = { typed: true; ack: AckResult; } | { typed: false; reason: string; }; /** Test hook: forget all pending retries. */ export declare function resetPointerGuard(deps?: GuardDeps): void; /** * Type `text` into the session only if its input line is empty. * * `multi` builds the single line typed instead when several messages have * piled up behind a held line ("N messages"); omit it for text that is not a * mailbox pointer (it is then retried as-is). */ export declare function typeWhenInputEmpty(sessionId: string, text: string, opts?: { multi?: (n: number) => string; }, deps?: GuardDeps): Promise; //# sourceMappingURL=pointer-guard.d.ts.map