export interface SubprocessSandboxOptions {
    /** Inline script to execute via `node -e`. Mutually exclusive with {@link bootstrapFile}. */
    bootstrapScript?: string;
    /** Path to a JavaScript file to execute via `node <file>`. Mutually exclusive with {@link bootstrapScript}. */
    bootstrapFile?: string;
    name?: string;
    onEvent?: (event: {
        name: string;
        payload?: unknown;
    }) => void;
}
export interface SandboxCallOptions {
    timeoutMs?: number;
}
export declare class SubprocessSandbox {
    private readonly options;
    private process;
    private requestCounter;
    private readonly pending;
    constructor(options: SubprocessSandboxOptions);
    start(): void;
    call<TResult = unknown>(method: string, args: unknown, options?: SandboxCallOptions): Promise<TResult>;
    shutdown(): Promise<void>;
    private onMessage;
    private failPending;
}
