/** 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; /** Hard kill after this many minutes; resolves exit code 124 (session cap). */ 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 timeout cap. */ 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;