/** * Executes gws CLI commands and returns results. * * Argument values are passed directly to the child process on every platform. */ import type { ToolDef } from "./services.js"; /** * Validate and sanitize a file upload path. * Rejects paths containing shell metacharacters or path traversal sequences. */ export declare function sanitizeUploadPath(rawPath: string): string; export interface ExecResult { success: boolean; output: string; error?: string; } /** * Build gws CLI arguments from a tool definition and the provided arguments. */ export declare function buildArgs(tool: ToolDef, args: Record): string[]; /** * Spawn gws and collect output, enforcing output size limits during * accumulation to prevent unbounded memory consumption. */ export declare function spawnGwsRaw(gwsBinary: string, args: string[], timeoutMs?: number): Promise<{ stdout: string; stderr: string; }>; /** * Execute a gws CLI command. */ export declare function executeGws(tool: ToolDef, args: Record, gwsBinary: string): Promise;