import type { Tool } from '../types';
/**
 * Quote a single argv element per Microsoft's CommandLineToArgvW parsing
 * rules so the spawned program (the .cmd shim's downstream executable)
 * receives the argument intact.
 *
 * Rules implemented:
 *   - Empty arg → `""` (so it remains a distinct token).
 *   - Arg with no whitespace, quote, or cmd.exe metachar → unchanged.
 *   - Otherwise enclose in `"..."`. Inside the quotes, escape each `"` as
 *     `\"`, and any run of backslashes immediately preceding a `"` (or
 *     the closing quote) is doubled.
 *
 * Reference: https://learn.microsoft.com/en-us/cpp/c-runtime-library/parsing-cpp-command-line-arguments
 *
 * Known residual exposure: `%FOO%` inside double quotes still triggers
 * cmd.exe env-var expansion (cmd.exe processes `%` even inside quoted
 * strings). The agent's `isSafeCommand` gate runs before this code, so a
 * deliberate `$()` or `` ` `` is already blocked; literal `%X%` is not
 * blocked but is rare in agent-issued commands. Documented and accepted.
 */
export declare function quoteWindowsArgv(arg: string): string;
/**
 * Build the command string that `cmd.exe /d /s /c` will execute when
 * routing a .cmd shim invocation. The result must be passed to spawn as
 * a single array element with `windowsVerbatimArguments: true` so Node
 * does not re-quote it.
 */
export declare function buildWindowsCmdInvocation(executable: string, args: string[]): string;
export declare const BashTool: Tool;
//# sourceMappingURL=bashTool.d.ts.map