import { z } from 'zod';
import { SANDBOX_DEFAULT_MAX_PROCESSES, SANDBOX_DEFAULT_MEMORY_LIMIT_MB, SANDBOX_DEFAULT_TIMEOUT_MS, } from '../../constants/sandbox/index.js';
export function assertSandboxStatus(status) {
    switch (status) {
        case 'creating':
        case 'ready':
        case 'busy':
        case 'destroyed':
            return;
        default: {
            const _exhaustive = status;
            throw new Error(`Unknown SandboxStatus: ${_exhaustive}`);
        }
    }
}
export function assertSandboxEnvironment(env) {
    switch (env) {
        case 'linux-namespace':
        case 'macos-seatbelt':
        case 'basic':
            return;
        default: {
            const _exhaustive = env;
            throw new Error(`Unknown SandboxEnvironment: ${_exhaustive}`);
        }
    }
}
// ---------------------------------------------------------------------------
// Runtime config schema
// ---------------------------------------------------------------------------
export const SandboxConfigSchema = z.object({
    enabled: z.boolean().default(false),
    provider: z.enum(['local']).default('local'),
    timeoutMs: z.number().positive().default(SANDBOX_DEFAULT_TIMEOUT_MS),
    memoryLimitMb: z.number().positive().default(SANDBOX_DEFAULT_MEMORY_LIMIT_MB),
    maxProcesses: z.number().positive().default(SANDBOX_DEFAULT_MAX_PROCESSES),
    cleanupOnDestroy: z.boolean().default(true),
});
//# sourceMappingURL=index.js.map