Skip to content

StartStreamOptions

Bridge-local correlation id for one streaming run.

Not a contract field, and never placed inside the TaskRequest: runId stays the engine’s to mint. startStream resolves only after the engine has minted one, so keying the JS-side event sink on runId would leave a window in which native can emit events for a run JS has not yet heard of. The streamId is generated before the call instead, which lets the sink be bound first and makes cancel() well-defined even before a handle exists.

request: TaskRequest


streamId: string