/** * tmux command wrappers — async helpers for tmux operations. * * Uses child_process.execFile for safe command execution (no shell injection). */ /** Check if tmux server is running. */ export declare function isTmuxAvailable(): Promise; export interface TmuxSessionInfo { name: string; created: string; attached: boolean; windows: number; } /** List all tmux sessions. */ export declare function listSessions(): Promise; /** Check if a specific tmux session exists. */ export declare function hasSession(sessionName: string): Promise; export interface NewSessionOptions { /** Session name */ name: string; /** Working directory */ cwd: string; /** Initial command to run */ command?: string; /** Environment variables to set */ environment?: Record; /** Window width/height */ width?: number; height?: number; } /** Create a new tmux session (detached). */ export declare function newSession(opts: NewSessionOptions): Promise; /** * Send keys (text + Enter) to a tmux session. * For long/multiline messages, uses load-buffer + paste-buffer with * a named buffer to avoid racing on the global paste buffer. * Sends Escape first to clear any partial input in the agent. */ export declare function sendKeys(sessionName: string, text: string, pressEnter?: boolean): Promise; /** * Capture recent output from a tmux pane. * * @param sessionName - tmux session name * @param lines - Number of scrollback lines to capture (default 30) */ export declare function capturePane(sessionName: string, lines?: number): Promise; /** Kill a tmux session. */ export declare function killSession(sessionName: string): Promise; /** * Get the TTY device for a tmux session's first pane. * Useful for finding processes running in the session. */ export declare function getPaneTTY(sessionName: string): Promise; //# sourceMappingURL=tmux.d.ts.map