export interface SandboxInput {
    code: string;
    input?: unknown;
    limits: {
        timeoutMs: number;
        memoryMb: number;
    };
    env?: Record<string, string>;
    fetchAllowlist?: string[];
    planfi?: {
        baseUrl: string;
        writeMode?: 'safe' | 'real';
    };
}
export interface SandboxResult {
    status: 'SUCCESS' | 'FAILED' | 'TIMED_OUT';
    output?: unknown;
    logs: string[];
    error?: {
        message: string;
        stack?: string;
    };
    durationMs: number;
}
interface SandboxFetchResponse {
    ok: boolean;
    status: number;
    statusText: string;
    headers: Record<string, string>;
    body: string;
}
export declare function planfiCallTimeoutMs(jobTimeoutMs: number): number;
export declare function computeWallClockMs(timeoutMs: number): number;
export declare function isPrivateOrReservedIp(ip: string): boolean;
export declare function hostFetch(rawUrl: string, rawInit: string, allowlist: string[], timeoutMs: number, fetchCounter: {
    count: number;
}, concurrencyCounter: {
    inFlight: number;
}, activeControllers?: Set<AbortController>): Promise<SandboxFetchResponse>;
export declare function hostPlanfiCall(rawInit: string, baseUrl: string, planfiKey: string, timeoutMs: number, fetchCounter: {
    count: number;
}, concurrencyCounter: {
    inFlight: number;
}, writeMode?: 'safe' | 'real', activeControllers?: Set<AbortController>): Promise<unknown>;
export declare class SandboxRunner {
    run(input: SandboxInput): Promise<SandboxResult>;
}
export {};
