import type { ShellProvider, ShellType } from "./shell-provider.js";
import { type ShellCommand } from "./shell-command.js";
import { type ProgressCallback } from "./task-output.js";
import type { SandboxConfig } from "./sandbox/sandbox-types.js";
export type { ExecResult } from "./shell-command.js";
export declare function getCwd(): string;
export declare function setCwd(path: string, relativeTo?: string): void;
export declare function getOriginalCwd(): string;
export declare function initCwd(cwd: string): void;
export interface ExecOptions {
    timeout?: number;
    onProgress?: ProgressCallback;
    /** When true, `cd` in the command does NOT update the session CWD. */
    preventCwdChanges?: boolean;
    shouldAutoBackground?: boolean;
    /** When provided, stdout is piped and this callback fires per chunk. */
    onStdout?: (data: string) => void;
    /** Per-call CWD override. When set, spawn uses this instead of the session CWD. */
    cwd?: string;
    /** Sandbox context injected by the host; absent = no OS sandbox (degrade). */
    sandbox?: SandboxConfig;
}
/**
 * Set the shell provider for this session.
 * Must be called once at startup by the host.
 */
export declare function setShellProvider(provider: ShellProvider): void;
/**
 * Get the current shell provider, or throw if not configured.
 */
export declare function getShellProvider(): ShellProvider;
/**
 * Execute a shell command using the configured provider.
 * Creates a new child process for each invocation.
 *
 * Ported from cc's Shell.ts — the tool owns process lifecycle.
 */
export declare function exec(command: string, abortSignal: AbortSignal, shellType?: ShellType, options?: ExecOptions): Promise<ShellCommand>;
