/** * Kill a child and everything it spawned. * * The direct child is often only a shell: `cmd.exe /c npm …` on Windows, and on * POSIX anything that forks. Signalling it alone leaves the real work running. * Best-effort by design — a tree we cannot kill must not throw, because the * caller settles either way. */ export declare function killProcessTree(child: { pid?: number; kill?: (signal?: NodeJS.Signals | number) => boolean; }): void; export declare function runExec(command: string, args: string[], opts?: number | { timeoutMs?: number; maxBuffer?: number; }): Promise<{ stdout: string; stderr: string; }>; export type SpawnResult = { stdout: string; stderr: string; code: number | null; signal: NodeJS.Signals | null; killed: boolean; }; export type CommandOptions = { timeoutMs: number; cwd?: string; input?: string; env?: NodeJS.ProcessEnv; windowsVerbatimArguments?: boolean; }; export declare function runCommandWithTimeout(argv: string[], optionsOrTimeout: number | CommandOptions): Promise;