Interface: SpawnIsolatedOptions
Defined in: src/batteries/isolation/browser.ts:104
Options accepted by spawnIsolated/createWorkerTransport, layered on top of IsolatedServiceOptions.
Extends
Properties
| Property | Type | Description | Inherited from | Defined in | | -------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | autoRespawn? | { policy: CrashPolicy; } | Opt-in automatic recovery: on a transport-reported crash, consult policy.record() and recycle() automatically when it returns 'respawn'. Default: not set (crashes are surfaced, never auto-healed). | IsolatedServiceOptions.autoRespawn | src/batteries/isolation/host.ts:54 | | autoRespawn.policy | CrashPolicy | - | - | src/batteries/isolation/host.ts:54 | | debugPayloads? | boolean | Include payload bodies on call:*/wire:* reports (see IsolationReport.payload). Default false — payloads may be large/sensitive, so this is opt-in even when hooks are wired. | IsolatedServiceOptions.debugPayloads | src/batteries/isolation/observability.ts:135 | | disposeGraceMs? | number | Grace period dispose() gives the guest to exit cleanly after shutdown before forcing transport.terminate(). Default 2000. | IsolatedServiceOptions.disposeGraceMs | src/batteries/isolation/host.ts:51 | | encodables? | readonly { name: string; }[] | Classes to register with @nhtio/encoder's custom-encodable round-trip on this side. | IsolatedServiceOptions.encodables | src/batteries/isolation/host.ts:56 | | onAbort? | IsolationReportCallback | abort:sent — the host sent an abort envelope for an in-flight call. | IsolatedServiceOptions.onAbort | src/batteries/isolation/observability.ts:128 | | onCall? | IsolationReportCallback | call:start / call:settle — a single request/response method call. | IsolatedServiceOptions.onCall | src/batteries/isolation/observability.ts:124 | | onCodecEscalate? | IsolationReportCallback | codec:escalate — the codec escalated an argument past the 'raw' tier. | IsolatedServiceOptions.onCodecEscalate | src/batteries/isolation/observability.ts:132 | | onCrashReport? | IsolationReportCallback | crash — the transport reported an unexpected guest exit/termination. | IsolatedServiceOptions.onCrashReport | src/batteries/isolation/observability.ts:120 | | onDispose? | IsolationReportCallback | dispose:start / dispose:done — graceful-then-forced teardown. | IsolatedServiceOptions.onDispose | src/batteries/isolation/observability.ts:116 | | onIsolation? | IsolationReportCallback | Fires on EVERY report (the firehose). | IsolatedServiceOptions.onIsolation | src/batteries/isolation/observability.ts:112 | | onRecycle? | IsolationReportCallback | recycle:start / recycle:done — terminate + reconnect through the same transport. | IsolatedServiceOptions.onRecycle | src/batteries/isolation/observability.ts:118 | | onRespawnAuto? | IsolationReportCallback | respawn:auto — an autoRespawn crash-policy verdict was consulted and acted on. | IsolatedServiceOptions.onRespawnAuto | src/batteries/isolation/observability.ts:122 | | onSpawn? | IsolationReportCallback | spawn:start / spawn:ready / spawn:error — guest connect lifecycle. | IsolatedServiceOptions.onSpawn | src/batteries/isolation/observability.ts:114 | | onStream? | IsolationReportCallback | stream:start / stream:end / stream:error / stream:cancel — a streaming method call. | IsolatedServiceOptions.onStream | src/batteries/isolation/observability.ts:126 | | onWire? | IsolationReportCallback | wire:out / wire:in — every envelope crossing the wire (verbose; opt in deliberately). | IsolatedServiceOptions.onWire | src/batteries/isolation/observability.ts:130 | | readyTimeoutMs? | number | Max time to wait for the guest's ready envelope after transport.connect() resolves. Default 30_000. Rejects the pending connect/first call with E_ISOLATION_READY_TIMEOUT. | IsolatedServiceOptions.readyTimeoutMs | src/batteries/isolation/host.ts:48 | | worker | string | URL | WorkerResolver | How to obtain the guest Worker: - A string | URL— the guest script's URL;createWorkerTransportconstructsnew Worker(url, workerOptions)itself on everyconnect(). - A WorkerResolver — full control: bring a Workerfrom any bundler pattern or pool. Invoked with{ spec }and may return aWorkersynchronously or via aPromise. | - | src/batteries/isolation/browser.ts:113 | | workerOptions? | BrowserWorkerOptions | Forwarded verbatim to new Worker(url, workerOptions) — used ONLY for the string | URLspawn form (ignored whenworkeris a WorkerResolver, which constructs its ownWorker). Default: classic script (no type) — see BrowserWorkerOptions's doc for why. | - | src/batteries/isolation/browser.ts:117 |