/** * Browser Web Worker entry for browser-target player WASM (player compute * P3/P5). This is the ONLY platform code that shares an execution context * with an untrusted player module. It is intentionally thin: the auditable * runtime + ABI marshalling live in [glue-runtime.ts] and the synchronous * host-call transport in [glue-sab.ts]; this file only wires them to the * worker message loop. * * - it instantiates the gas-injected player artifact with an import table * that exposes ONLY `ck.*` + inert wasi stubs (nothing else importable), * - it never has the DOM, `window`, auth tokens, `fetch`, or third-party * `importScripts`, * - `ck.host_call` blocks the worker on a SharedArrayBuffer while the * page-side broker services the (async) server-authorized call and writes * the reply back, so the guest sees a synchronous gateway, * - it announces each dispatch before entering WASM; the page-side broker * owns the hard watchdog and can terminate this worker if WASM never * returns. The local elapsed-time helper only classifies completed calls. * * Re-exports the pure helpers + the runtime so tests and bundlers can use * them without touching worker globals. */ import { GlueRuntime, GLUE_HOST_FUNCTIONS, parseFuelBudget, runWithWatchdog, type GlueInitMessage, type GlueDispatchResult } from './glue-runtime.js'; export { GlueRuntime, GLUE_HOST_FUNCTIONS, parseFuelBudget, runWithWatchdog, type GlueInitMessage, type GlueDispatchResult, }; /** * Wire the glue runtime to a worker-like message port. Exported (not just * run at import) so the Node integration test can drive the identical wiring * over a `worker_threads` port. */ export declare function startGlueWorker(port: { addEventListener?: (t: string, l: (e: MessageEvent) => void) => void; on?: (t: string, l: (data: unknown) => void) => void; postMessage: (message: unknown) => void; }): void; //# sourceMappingURL=player-glue-worker.d.ts.map