/** * Safe command execution utilities. * * SECURITY: Never uses shell interpolation. All commands are executed * via execFileSync/spawn with explicit argument arrays, preventing * shell injection attacks. */ import { type ChildProcess, type SpawnOptions } from 'node:child_process'; export interface ExecResult { success: boolean; stdout: string; stderr: string; exitCode: number; } /** * Execute a command synchronously without shell interpolation. * Returns a result object instead of throwing on failure. */ export declare function execSafe(cmd: string, args?: string[], options?: { timeout?: number; }): ExecResult; /** * Execute a command with live output streaming. * Returns a promise that resolves with the combined output. */ export declare function execLive(cmd: string, args?: string[], options?: SpawnOptions & { silent?: boolean; }): Promise; /** * Spawn a detached background process. * Returns the child process handle. */ export declare function execDetached(cmd: string, args?: string[], options?: { env?: NodeJS.ProcessEnv; }): ChildProcess; /** * Check if a command exists on the system PATH. */ export declare function commandExists(cmd: string): boolean; /** * Find the absolute path of a command. */ export declare function findCommand(cmd: string): string | null; export declare function getIpfsPath(): string | null; /** Clear the ipfs path cache (e.g. after installation). */ export declare function clearIpfsCache(): void; //# sourceMappingURL=exec.d.ts.map