export interface TempTmuxSessionFixture { sessionName: string; serverName: string; windowTarget: string; leaderPaneId: string; socketPath: string; serverKind: 'ambient' | 'synthetic'; env: { TMUX: string; TMUX_PANE: string; }; sessionExists: (targetSessionName?: string) => boolean; run: (args: string[]) => string; runResult: (args: string[]) => { status: number | null; stdout: string; stderr: string; error: string; }; runPtyResult: (command: string, options?: { pollLimit?: number; }) => { status: number | null; stdout: string; stderr: string; error: string; }; createPathShim: (directory: string, commandLogPath?: string) => Promise; triggerClientResize: (targetSession: string, geometry?: { rows?: number; cols?: number; }) => void; serverLogPath: string | null; readServerLog: () => Promise; } export interface TempTmuxSessionOptions { useAmbientServer?: boolean; serverLog?: boolean; } export declare function isRealTmuxAvailable(): boolean; /** * Test-only PTY invocation for GNU/util-linux `script(1)` vs. BSD/macOS `script(1)`. * * util-linux (Linux) accepts `-c command` and always requires a trailing log-file * argument: `script -q -e -c /dev/null`. * * BSD/macOS `script(1)` (shell_cmds) has no `-c` flag; the command is a trailing * positional argument vector after the log file: `script [file [command ...]]`. * Verified against Apple's shell_cmds script.1 source (apple-oss-distributions/shell_cmds): * "-e: Accepted for compatibility with util-linux script. The child command exit * status is always the exit status of script." — i.e. on BSD/macOS, `script` * unconditionally propagates the child's exit status even without `-e`, so `-e` * is redundant there and intentionally omitted. The command is passed as a single * `/bin/sh -c ` argv triple (not a shell string) to keep the wrapped * command as exactly one argument, matching the util-linux `-c` contract. */ export interface PtyScriptCommand { executable: string; args: string[]; } export declare function buildPtyScriptCommand(command: string, platform?: NodeJS.Platform): PtyScriptCommand; export declare function isRealScriptAvailable(): boolean; export declare function tmuxSessionExists(sessionName: string, serverName?: string): boolean; export interface PtyCommandResult { status: number | null; stdout: string; stderr: string; error: string; } interface PtyCommandRunner { run: (args: string[]) => string; runResult: (args: string[]) => { status: number | null; stdout: string; stderr: string; error: string; }; sleep?: () => void; } export declare function runPtyResult(command: string, options: PtyCommandRunner & { platform?: NodeJS.Platform; syntheticServer?: boolean; sessionName: string; pollLimit?: number; statusMarker?: string; }): PtyCommandResult; export declare function withTempTmuxSession(optionsOrFn: TempTmuxSessionOptions | ((fixture: TempTmuxSessionFixture) => Promise | T), maybeFn?: (fixture: TempTmuxSessionFixture) => Promise | T): Promise; export {}; //# sourceMappingURL=tmux-test-fixture.d.ts.map