export interface TmuxInstall { cmd: string; args: string[]; /** Linux package managers need root; brew must NOT run as root. */ needsRoot: boolean; } /** * Pure: the package-manager command to install tmux on this platform, given * which manager binaries exist (`has`). null when none is available or the * platform isn't covered — the caller then stays on node-pty. */ export declare function tmuxInstallCommand(platform: NodeJS.Platform, has: (bin: string) => boolean): TmuxInstall | null; export interface EnsureTmuxDeps { /** Find tmux now (resolveBin("tmux")). Called again after an install. */ resolve: () => string | null; /** The install command for this host, or null (tmuxInstallCommand(...)). */ plan: () => TmuxInstall | null; /** Run the install command. */ install: (c: TmuxInstall) => Promise; /** Progress / fallback guidance. */ notify: (line: string) => void; } export interface EnsureTmuxResult { /** tmux got installed by us this run. */ installed: boolean; /** tmux is available now (already there, or installed). */ present: boolean; note?: "no-manager" | "install-failed"; } /** * Best-effort: make tmux available so agents survive a server restart (with * node-pty they die on every auto-update). NEVER blocks — if tmux can't be * installed (no package manager, or it needs a password we don't have) we say * so and stay on node-pty. Pure orchestration over injected deps, so it is * tested without touching the system. */ export declare function ensureTmux(deps: EnsureTmuxDeps): Promise;