/** * Terminal Recorder * * Spawns a child process and captures stdout/stderr chunks with timestamps, * emitting an asciicast v2 file (https://docs.asciinema.org/manual/asciicast/v2/). * * Notes on PTY-vs-pipe: we don't ship a native node-pty dep, so we set * `FORCE_COLOR`, `TERM=xterm-256color`, `CI=` env vars to coax most CLIs * into emitting ANSI colour. Programs that strictly require a TTY (less, * top, vim) won't render correctly — that's a documented limitation. */ export interface TerminalCaptureOptions { command: string; /** Output path for the .cast file. The .html player is written next to it. */ output: string; /** Shell to run the command in. Defaults to /bin/sh. */ shell?: string; cols?: number; rows?: number; cwd?: string; env?: Record; /** Optional human-readable label embedded in the .cast title field. */ label?: string; /** * When true, the spawned child sees the full process.env (which may include * secrets like AWS_SECRET_ACCESS_KEY, ANTHROPIC_API_KEY, NPM_TOKEN). When * false (default), only a minimal allowlist is forwarded. Recorded stdout * is shareable, so leaking env values into a .cast on disk is a real risk. */ inheritEnv?: boolean; } export interface TerminalCaptureResult { durationSec: number; bytes: number; exitCode: number; events: number; castPath: string; } export declare function captureTerminal(options: TerminalCaptureOptions): Promise; //# sourceMappingURL=recorder.d.ts.map