import { type WorkflowScriptRunner } from "@sema-agent/core"; import { type HardenedVmLimits } from "./hardened-vm-runner.js"; /** * Worker-isolated S8 hard runner ([ref] v2). Runs the hardened-vm membrane inside a `worker_thread`, adding * RESOURCE isolation on top of the in-process {@link import("./hardened-vm-runner.js").createHardenedVmRunner}'s * BOUNDARY isolation: * - HEAP cap (`resourceLimits.maxOldGenerationSizeMb`): a runaway-allocation script OOMs the WORKER (an `error` * event), never the shared main process — closes the in-process resource-exhaustion gap. * - `terminate()` on wall-clock timeout / abort: kills a MICROTASK-starvation loop (`while(true){await null}`) * the in-process wall-clock race cannot pre-empt (it starves its own event loop). * - credential isolation: the worker gets only the script + args; `agent`/`log` IPC to the main thread (which * holds the real Runner/DB/keys); a (validated-impossible) boundary crossing lands in a credential-free isolate. * * `safeForUntrustedScripts: true` — the membrane it runs is the conformance-validated + robustness-tested one. Use * this (over the in-process runner) for genuinely-untrusted multi-tenant scripts where resource isolation matters. */ export declare function createWorkerHardenedVmRunner(limits?: HardenedVmLimits): WorkflowScriptRunner; //# sourceMappingURL=hardened-vm-worker-runner.d.ts.map