export interface RunCommandOptions { cwd?: string; env?: NodeJS.ProcessEnv; timeoutMs?: number; maxOutputBytes?: number; /** 写入子进程 stdin 后关闭(用于把密钥等敏感参数从命令行挪开的 CLI 约定)。 */ input?: string; onOutput?: (stream: "stdout" | "stderr", text: string) => void; /** 用平台 shell 执行整条命令字符串(Unix: /bin/sh -c;Windows: cmd.exe /d /s /c)。默认直接执行命令。 */ shell?: boolean; /** 非零退出码不抛错,通过 result.exitCode 返回(默认 true 抛错)。 */ throwOnNonZero?: boolean; } export interface CommandResult { command: string; args: string[]; stdout: string; stderr: string; exitCode: number; } export declare function runCommand(command: string, args: string[], options?: RunCommandOptions): Promise; export declare function runCommandSync(command: string, args: string[], options?: Omit): CommandResult;