import { type HostedSession } from './sessions.js'; export declare const MAX_OPEN = 12; export declare const GHOSTTY_APP = "/Applications/Ghostty.app"; export declare const GHOSTTY_TERM = "xterm-ghostty"; export type OpenStatus = 'opened' | 'already_open' | 'failed'; export type OpenCode = 'NOT_LIVE' | 'NOT_OWNED' | 'GHOSTTY_NOT_INSTALLED' | 'AUTOMATION_DENIED' | 'OSASCRIPT_FAILED' | 'BAD_PATH'; export interface OpenRow { session_key: string; status: OpenStatus; code?: OpenCode; error?: string; } export interface RunResult { code: number; stderr: string; } export interface OpenDeps { sessions?: () => Promise; /** Session names that already have a Ghostty client on the owned server. */ ghosttyAttached?: () => Promise>; ghosttyInstalled?: () => boolean; /** Runs an AppleScript (tabs). */ osascript?: (script: string) => Promise; /** Runs `open` with these args (windows). */ open?: (args: string[]) => Promise; ensureTitles?: () => Promise; sleep?: (ms: number) => Promise; } /** Global on the owned server, so sessions spawned before this also get titles. */ export declare function ensureTitles(): Promise; /** One shell word. Ghostty runs `command` through a shell. */ export declare function shellWord(s: string): string; /** * An AppleScript string literal. AppleScript has no \u escape, so JSON-style * quoting breaks on anything it would escape that way; only backslash and the * double quote are escaped, and control characters are refused outright. */ export declare function appleString(s: string): string; export declare function tabScript(command: string, cwd: string): string; export declare function windowArgs(argv: string[], cwd: string): string[]; export declare function validateOpen(body: unknown): { keys: string[]; layout: 'tabs' | 'windows'; }; export declare function openTerminal(body: unknown, deps?: OpenDeps): Promise<{ results: OpenRow[]; }>; //# sourceMappingURL=openTerminal.d.ts.map