/**
 * Resolve the Git Bash executable path on Windows.
 * Returns null on non-Windows platforms or if Git Bash is not found.
 * Result is computed once and cached.
 */
export declare function findGitBash(): string | null;
/** Cached Git Bash path — computed once at module load. */
export declare const GIT_BASH: string | null;
export interface ShellConfig {
    shell: string;
    args: string[];
}
/**
 * Returns the shell binary and args to use for `spawn(shell, [...args, command])`.
 * On Windows: Git Bash preferred, cmd.exe fallback.
 * On Linux/macOS: /bin/sh -c.
 */
export declare function getShellConfig(): ShellConfig;
/**
 * Like getShellConfig but uses `--login` for Git Bash so that
 * the full environment (PATH, etc.) is sourced. Needed by the
 * verification harness for running project build/test commands.
 * Falls back to plain getShellConfig on non-Windows or when Git Bash
 * is unavailable.
 */
export declare function getLoginShellConfig(): ShellConfig;
/**
 * Choose shell for a verification command.
 *
 * Always returns plain bash — 25× faster than `--login` on Windows Git Bash
 * (~150ms vs ~3700ms per spawn). Most commands (echo, node, npm, git, gh,
 * docker, python, etc.) work fine in plain bash because their executables
 * are on the system PATH that Node.js inherits.
 *
 * `--login` is only needed for tools installed via version managers like
 * nvm, asdf, rbenv that modify PATH in `~/.bash_profile`. Projects using
 * those should configure an explicit shell wrapper in their commands, e.g.:
 *     "bash --login -c 'nvm use 20 && npm test'"
 *
 * Trade-off: verification commands that rely on .bash_profile-set PATH will
 * fail, but those were rare and now surface as clear "command not found"
 * errors instead of silently wasting ~3.5s per command step.
 */
export declare function getVerificationShell(_command: string): ShellConfig;
/**
 * Resolve the `sh` executable path. On Windows returns Git Bash path
 * (or falls back to just "sh" which may be on PATH if Git for Windows is
 * installed). On Linux/macOS returns "sh".
 *
 * Use this instead of hardcoded "sh" for `execFile("sh", ["-c", cmd])` calls.
 *
 * Prefer `execShellCommand()` for new code — it handles cmd.exe's `/d /s /c`
 * arg form when neither Git Bash nor `sh` is on PATH.
 */
export declare function resolveShell(): string;
/**
 * Run a shell command via `execFile`, picking the right shell binary + args
 * for the current platform via `getShellConfig()`. Use this in place of
 * hardcoded `execFile("sh", ["-c", cmd], …)` calls — on Windows machines
 * without Git Bash on PATH the literal "sh" binary doesn't exist and spawn
 * fails with ENOENT (errno -4058), silently breaking pool / goal / staff /
 * session worktree setup.
 */
export declare function execShellCommand(command: string, opts: {
    cwd: string;
    env?: NodeJS.ProcessEnv;
    timeout?: number;
}): Promise<{
    stdout: string;
    stderr: string;
}>;
//# sourceMappingURL=shell-util.d.ts.map