import type { Logger } from '../../logger.ts';
import type { Readable, Writable } from 'node:stream';
import { z } from 'zod';
import { APIClient } from '../api.ts';
import { type SandboxRunResult } from './types.ts';
export declare const SandboxRunParamsSchema: z.ZodObject<{
    options: z.ZodObject<{
        name: z.ZodOptional<z.ZodString>;
        env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        stream: z.ZodOptional<z.ZodObject<{
            stdout: z.ZodOptional<z.ZodString>;
            stderr: z.ZodOptional<z.ZodString>;
            stdin: z.ZodOptional<z.ZodString>;
            timestamps: z.ZodOptional<z.ZodBoolean>;
        }, z.core.$strip>>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        description: z.ZodOptional<z.ZodString>;
        projectId: z.ZodOptional<z.ZodString>;
        dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
        snapshot: z.ZodOptional<z.ZodString>;
        runtime: z.ZodOptional<z.ZodString>;
        resources: z.ZodOptional<z.ZodObject<{
            memory: z.ZodOptional<z.ZodString>;
            cpu: z.ZodOptional<z.ZodString>;
            disk: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
        timeout: z.ZodOptional<z.ZodObject<{
            idle: z.ZodOptional<z.ZodString>;
            execution: z.ZodOptional<z.ZodString>;
            paused: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        files: z.ZodOptional<z.ZodArray<z.ZodObject<{
            path: z.ZodString;
            content: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
        }, z.core.$strip>>>;
        runtimeId: z.ZodOptional<z.ZodString>;
        network: z.ZodOptional<z.ZodObject<{
            enabled: z.ZodOptional<z.ZodBoolean>;
            port: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>>;
        packages: z.ZodOptional<z.ZodArray<z.ZodString>>;
        command: z.ZodObject<{
            exec: z.ZodArray<z.ZodString>;
            files: z.ZodOptional<z.ZodArray<z.ZodObject<{
                path: z.ZodString;
                content: z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>;
            }, z.core.$strip>>>;
        }, z.core.$strip>;
    }, z.core.$strip>;
    orgId: z.ZodOptional<z.ZodString>;
    region: z.ZodOptional<z.ZodString>;
    apiKey: z.ZodOptional<z.ZodString>;
    signal: z.ZodOptional<z.ZodCustom<AbortSignal, AbortSignal>>;
    stdin: z.ZodOptional<z.ZodCustom<Readable, Readable>>;
    stdout: z.ZodOptional<z.ZodCustom<Writable, Writable>>;
    stderr: z.ZodOptional<z.ZodCustom<Writable, Writable>>;
    logger: z.ZodOptional<z.ZodCustom<Logger, Logger>>;
}, z.core.$strip>;
export type SandboxRunParams = z.infer<typeof SandboxRunParamsSchema>;
/**
 * Creates a sandbox, executes a command, and waits for completion.
 *
 * This is a high-level convenience function that handles the full lifecycle:
 * creating a sandbox, streaming I/O, polling for completion, and cleanup.
 *
 * @param client - The API client to use for the request
 * @param params - Parameters including command options, I/O streams, and timeout settings
 * @returns The run result including exit code and duration
 * @throws {SandboxResponseError} If sandbox creation fails, execution times out, or is cancelled
 */
export declare function sandboxRun(client: APIClient, params: SandboxRunParams): Promise<SandboxRunResult>;
//# sourceMappingURL=run.d.ts.map