/** Whether a pseudo-terminal can be allocated on this machine. */ export declare function ptyAvailable(): boolean; export interface PtyRunOpts { /** Resolved executable (see resolveBin) run WITHOUT a shell. */ file: string; args?: string[]; cwd?: string; env?: NodeJS.ProcessEnv; /** Kill after this many minutes WITH NO output (idle timeout); resolves exit code 124. The timer is armed when the child spawns, so a process that never prints at all is still bounded; once output starts it resets on every chunk - active sessions never get killed. */ timeoutMin?: number; /** Called per output line. A pty has no separate stderr - level is always 'stdout'. */ onLine?: (line: string, level: 'stdout' | 'stderr') => void; } export interface PtyRunResult { /** Process exit code, or 124 when killed by the idle timeout (no output). */ code: number; /** Full transcript, ANSI stripped, newlines normalized. */ output: string; } /** * Run a resolved binary through a fresh pseudo-terminal, tee every line to * `onLine`, and resolve with the exit code + full cleaned transcript. * A pty multiplexes stdout/stderr into one stream, hence the single level. */ export declare function runAgyPty(opts: PtyRunOpts): Promise;