import { z } from 'zod';
import type { SandboxId } from '../ids/index.js';
export type SandboxStatus = 'creating' | 'ready' | 'busy' | 'destroyed';
export declare function assertSandboxStatus(status: SandboxStatus): void;
export type SandboxEnvironment = 'linux-namespace' | 'macos-seatbelt' | 'basic';
export declare function assertSandboxEnvironment(env: SandboxEnvironment): void;
export interface SandboxExecResult {
    readonly exitCode: number;
    readonly stdout: string;
    readonly stderr: string;
    readonly signal?: string;
    readonly timedOut: boolean;
    readonly durationMs: number;
}
export interface SandboxExecOptions {
    readonly timeout?: number;
    readonly env?: Record<string, string>;
    readonly cwd?: string;
}
export interface Sandbox {
    readonly id: SandboxId;
    readonly status: SandboxStatus;
    readonly rootDir: string;
    readonly environment: SandboxEnvironment;
    exec(command: string, args?: string[], opts?: SandboxExecOptions): Promise<SandboxExecResult>;
    writeFile(path: string, content: string | Buffer): Promise<void>;
    readFile(path: string): Promise<Buffer>;
    destroy(): Promise<void>;
}
export interface SandboxCreateConfig {
    readonly workingDirectory?: string;
    readonly env?: Record<string, string>;
    readonly timeoutMs?: number;
    readonly memoryLimitMb?: number;
    readonly maxProcesses?: number;
}
export interface SandboxProvider {
    readonly id: string;
    readonly name: string;
    readonly environment: SandboxEnvironment;
    create(config?: SandboxCreateConfig): Promise<Sandbox>;
}
export declare const SandboxConfigSchema: z.ZodObject<{
    enabled: z.ZodDefault<z.ZodBoolean>;
    provider: z.ZodDefault<z.ZodEnum<["local"]>>;
    timeoutMs: z.ZodDefault<z.ZodNumber>;
    memoryLimitMb: z.ZodDefault<z.ZodNumber>;
    maxProcesses: z.ZodDefault<z.ZodNumber>;
    cleanupOnDestroy: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
    enabled: boolean;
    provider: "local";
    timeoutMs: number;
    memoryLimitMb: number;
    maxProcesses: number;
    cleanupOnDestroy: boolean;
}, {
    enabled?: boolean | undefined;
    provider?: "local" | undefined;
    timeoutMs?: number | undefined;
    memoryLimitMb?: number | undefined;
    maxProcesses?: number | undefined;
    cleanupOnDestroy?: boolean | undefined;
}>;
export type SandboxConfig = z.infer<typeof SandboxConfigSchema>;
//# sourceMappingURL=index.d.ts.map