/** * Shell execution utilities for CLI commands. * Wraps child_process.execSync and spawn with structured logging. */ import { type ChildProcess, type SpawnOptions } from 'node:child_process'; /** * Options for synchronous command execution. */ export interface ExecOptions { /** Working directory for the command */ cwd?: string; /** Environment variables merged with process.env */ env?: Record; /** Execution timeout in milliseconds */ timeout?: number; /** stdout/stderr handling: 'pipe' captures output, 'inherit' streams to parent */ stdio?: 'pipe' | 'inherit'; } /** * Result of a safe (non-throwing) command execution. */ export interface ExecResult { ok: boolean; stdout: string; stderr: string; } /** * Run a command synchronously, return stdout. Throws on non-zero exit. */ export declare function exec(cmd: string, options?: ExecOptions): string; /** * Run a command synchronously, return success boolean. Does not throw. */ export declare function execSafe(cmd: string, options?: ExecOptions): ExecResult; /** * Spawn a long-running background process. Returns ChildProcess. */ export declare function spawnBackground(cmd: string, args: string[], options?: SpawnOptions): ChildProcess; //# sourceMappingURL=exec.d.ts.map