/**
 * Shell Executor Utilities
 *
 * Cross-platform shell execution utilities for CCS.
 */
/// <reference types="node" />
/// <reference types="bun-types" />
/// <reference types="node" />
import { type SpawnOptions } from 'child_process';
/**
 * Strip ANTHROPIC_* env vars from an environment object.
 * Used for account/default profiles to prevent stale proxy config from
 * interfering with native Claude API routing.
 */
export declare function stripAnthropicEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
/**
 * Strip inherited Anthropic routing/auth env while preserving model intent.
 * Used for nested settings-profile Claude launches where `--settings` already
 * defines the provider transport and the parent process should only lend model
 * defaults or effort hints.
 *
 * `preserveFrom`: if provided, routing keys present in this source survive the
 * strip (with their values from `preserveFrom`). Settings-type profiles use
 * this to keep routing/auth supplied by their own `settings.env` while
 * dropping any routing leaked from the parent shell or `global.env`.
 */
export declare function stripAnthropicRoutingEnv(env: NodeJS.ProcessEnv, preserveFrom?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
/**
 * Strip inherited browser attach/runtime env vars from a process environment.
 *
 * Browser capability is opt-in and launch-scoped. Stale CCS_BROWSER_* values
 * from the parent process must never bleed into a browser-off child launch.
 */
export declare function stripBrowserEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
/**
 * Strip Claude Code nested-session guard env var from a process environment.
 *
 * Note: Windows env keys are case-insensitive, so remove case-insensitively
 * to avoid missing variants like `claudecode`.
 */
export declare function stripClaudeCodeEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
/**
 * Strip Codex session-scoped env vars before launching a nested Codex process.
 *
 * Keep real user config such as CODEX_HOME intact. Only remove the known
 * session/runtime metadata exported by the current Codex host process.
 */
export declare function stripCodexSessionEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
/**
 * Resolve CCS-managed environment overrides for Claude launch.
 * - preferences.auto_update: false -> DISABLE_AUTOUPDATER=1
 */
export declare function getClaudeLaunchEnvOverrides(): NodeJS.ProcessEnv;
/**
 * Escape arguments for shell execution (cross-platform)
 *
 * IMPORTANT: On Windows, spawn({ shell: true }) uses cmd.exe by default,
 * NOT PowerShell. cmd.exe does NOT recognize single quotes as string delimiters.
 * We must use double quotes for cmd.exe compatibility.
 */
export declare function escapeShellArg(arg: string): string;
/**
 * Return the shell that matches escapeShellArg() quoting semantics.
 *
 * On Windows, use an absolute, trusted system cmd.exe path instead of a bare
 * executable name so wrapper launches cannot be hijacked through the current
 * directory or PATH. ComSpec is accepted only when it resolves to that same
 * system shell.
 */
export declare function getWindowsEscapedCommandShell(): SpawnOptions['shell'];
/**
 * Execute Claude CLI with unified spawn logic
 */
export declare function execClaude(claudeCli: string, args: string[], envVars?: NodeJS.ProcessEnv | null, onExitCleanup?: () => void): void;
//# sourceMappingURL=shell-executor.d.ts.map