export type ParsedBounds = { x: number; y: number; width: number; height: number; }; export declare function assertIterm2(): void; export declare const itermAppleEventsUnreachableReason = "iterm-apple-events-unreachable"; export declare const itermAppleEventsUnreachableExplanation = "osascript cannot reach iTerm from this provider's process context \u2014 this typically happens when the provider outlived the terminal app it was launched from (a terminal kill/restart while the provider kept running). The state is unrecoverable in-process: relaunch the provider from a shell inside a live GUI terminal session."; export type ItermReachability = { reachable: true; } | { message: string; reachable: false; reason: typeof itermAppleEventsUnreachableReason; sinceMs: number; }; export declare function getItermReachability(): ItermReachability; export declare function assertItermReachable(): void; export declare function isItermAppleEventsUnreachableError(message: string): boolean; export declare function recordItermScriptFailure(error: unknown, nowMs?: number): Error; export declare function recordItermScriptSuccess(): void; export declare function resetItermReachability(): void; export declare function runItermScript(script: string, options?: { timeoutMs?: number; }): string; export declare function runItermScriptAsync(script: string, options?: { timeoutMs?: number; }): Promise; export declare function parseBounds(value?: string): ParsedBounds | undefined; export declare function buildAttachScript({ bounds, sessionName }: { sessionName: string; bounds?: ParsedBounds; }): string; export declare function openItermForSession({ bounds, sessionName }: { sessionName: string; bounds?: ParsedBounds; }): void; export declare function findItermWindowIdByTty(ttys: string[]): number | undefined; export declare function shellQuote(value: string): string; export declare function appleString(value: string): string;