export interface ExecInteractiveOptions { idleTimeout?: number; } export interface ExecCommandResult { stdout: string; stderr: string; } /** * 执行短命令并强制约束总耗时。使用独立进程组,超时时尽量杀掉 shell * 及其子进程,避免工具检测命令异常时拖住 install/update。 */ export declare function execCommand(command: string, timeout?: number): Promise; /** * 执行可能需要交互式输入的命令(如 sudo 密码、brew 确认等) * 有 TTY 时使用 stdio: 'inherit' 让子进程直接访问终端 * 无 TTY 时(AI agent 环境)捕获输出,供错误摘要使用 * 传入 idleTimeout 时,有输出就续期,只在长时间无输出时终止命令 */ export declare function execInteractive(command: string, timeout?: number, options?: ExecInteractiveOptions): Promise; /** * 检测当前环境是否支持交互式输入(有 TTY) */ export declare function isInteractive(): boolean; //# sourceMappingURL=shell.d.ts.map