/** * postgres-mcp - Worker Sandbox (worker_threads) * * Production-grade sandboxed execution using `node:worker_threads`. * Provides true V8 isolate boundary with resource limits, * hard timeouts, and MessagePort RPC bridge. */ import { type SandboxOptions, type PoolOptions, type SandboxResult } from "./types.js"; /** * Worker-thread sandbox for secure code execution. * Each execution spawns a fresh worker for clean state. */ export declare class WorkerSandbox { private readonly options; constructor(options?: SandboxOptions); /** * Execute code in a worker thread with RPC bridge. * * @param code - JavaScript code to execute * @param apiBindings - Map of group → method record for RPC dispatch */ execute(code: string, apiBindings: Record, timeoutMs?: number): Promise; } /** * Pool of worker-thread sandboxes for concurrent execution. * Creates a fresh worker for every execution to guarantee clean state. */ export declare class WorkerSandboxPool { private readonly options; private readonly sandboxOptions; private activeCount; constructor(sandboxOptions?: SandboxOptions, poolOptions?: PoolOptions); /** * Execute code in a pooled worker sandbox. */ execute(code: string, apiBindings: Record, timeoutMs?: number): Promise; /** Get the current active execution count */ getActiveCount(): number; /** Unique pool identifier */ readonly poolId: `${string}-${string}-${string}-${string}-${string}`; } //# sourceMappingURL=worker-sandbox.d.ts.map