/** * tmux utility functions for omc native shell launch * Adapted from oh-my-codex patterns for omc */ export type ClaudeLaunchPolicy = 'inside-tmux' | 'outside-tmux' | 'direct'; export interface TmuxPaneSnapshot { paneId: string; currentCommand: string; startCommand: string; } /** * Check if tmux is available on the system */ export declare function isTmuxAvailable(): boolean; /** * Check if claude CLI is available on the system */ export declare function isClaudeAvailable(): boolean; /** * Resolve launch policy based on environment and args * - inside-tmux: Already in tmux session, split pane for HUD * - outside-tmux: Not in tmux, create new session * - direct: tmux not available, run directly * - direct: print mode requested so stdout can flow to parent process */ export declare function resolveLaunchPolicy(env?: NodeJS.ProcessEnv, args?: string[]): ClaudeLaunchPolicy; /** * Build tmux session name from directory, git branch, and UTC timestamp * Format: omc-{dir}-{branch}-{utctimestamp} * e.g. omc-myproject-dev-20260221143052 */ export declare function buildTmuxSessionName(cwd: string): string; /** * Sanitize string for use in tmux session/window names * Lowercase, alphanumeric + hyphens only */ export declare function sanitizeTmuxToken(value: string): string; /** * Build shell command string for tmux with proper quoting */ export declare function buildTmuxShellCommand(command: string, args: string[]): string; /** * Wrap a command string in the user's login shell with RC file sourcing. * Ensures PATH and other environment setup from .bashrc/.zshrc is available * when tmux spawns new sessions or panes with a command argument. * * tmux new-session / split-window run commands via a non-login, non-interactive * shell, so tools installed via nvm, pyenv, conda, etc. are invisible. * This wrapper starts a login shell (`-lc`) and explicitly sources the RC file. */ export declare function wrapWithLoginShell(command: string): string; /** * Quote shell argument for safe shell execution * Uses single quotes with proper escaping */ export declare function quoteShellArg(value: string): string; /** * Parse tmux pane list output into structured data */ export declare function parseTmuxPaneSnapshot(output: string): TmuxPaneSnapshot[]; /** * Check if pane is running a HUD watch command */ export declare function isHudWatchPane(pane: TmuxPaneSnapshot): boolean; /** * Find HUD watch pane IDs in current window */ export declare function findHudWatchPaneIds(panes: TmuxPaneSnapshot[], currentPaneId?: string): string[]; /** * List HUD watch panes in current tmux window */ export declare function listHudWatchPaneIdsInCurrentWindow(currentPaneId?: string): string[]; /** * Create HUD watch pane in current window * Returns pane ID or null on failure */ export declare function createHudWatchPane(cwd: string, hudCmd: string): string | null; /** * Kill tmux pane by ID */ export declare function killTmuxPane(paneId: string): void; //# sourceMappingURL=tmux-utils.d.ts.map