Interface: GuestRuntimeLike
Defined in: src/batteries/sandbox/js/ses_contracts.ts:81
Minimal runtime seam used by the tool and by browser/Node adapters.
Methods
spawn()
ts
spawn(o: {
globals: readonly {
kind: "async-fn";
name: string;
}[];
limits: GuestLimits;
modules: string[];
signal?: AbortSignal;
}): Promise<{
evaluate: Promise<GuestOutcome>;
kill: Promise<void>;
}>;Defined in: src/batteries/sandbox/js/ses_contracts.ts:89
Start an isolated guest with the declared modules, globals, limits, and lifecycle signal.
Parameters
| Parameter | Type | Description |
|---|---|---|
o | { globals: readonly { kind: "async-fn"; name: string; }[]; limits: GuestLimits; modules: string[]; signal?: AbortSignal; } | Fully resolved runtime inputs and the names/shapes of injected capabilities; functions themselves do not cross the boundary. |
o.globals | readonly { kind: "async-fn"; name: string; }[] | - |
o.limits | GuestLimits | - |
o.modules | string[] | - |
o.signal? | AbortSignal | - |
Returns
Promise<{ evaluate: Promise<GuestOutcome>; kill: Promise<void>; }>
A guest handle whose evaluation can be timed out and whose process can be killed.