createRunObserver
Purpose and behavior
Section titled “Purpose and behavior”Create a transport-backed receiver for one dispatch or workflow under a caller-selected ID. Conditional writes reject duplicate IDs and fence stale writers. Periodic heartbeats stop on settlement, storage failure or close. Resume appends only to settled workflow projections with a fresh hub; unsettled records require a new ID after explicit execution recovery. Observation failures remain isolated from execution.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredRunObserverOptionsTransport, execution ID, projection kind, heartbeat policy and optional settled-workflow resume.options.transporterRequiredTransportTransport owning run snapshots and immutable event segments; caller owns its credentials and lifecycle.options.idRequiredstringUnique ID of at most 128 characters in one safe transport key segment.options.kindRequired"workflow" | "dispatch"Choose dispatch for one request or workflow for one task graph.options.heartbeatMsOptionalnumber | undefinedHeartbeat period in milliseconds, default 5000; positive and less than abandonAfterMs.options.abandonAfterMsOptionalnumber | undefinedSuspected abandonment delay in milliseconds, default 30000, strictly greater than heartbeatMs.options.resumeOptionalboolean | undefinedExplicitly append to a settled workflow record with a fresh hub; duplicate creation and unsettled takeover remain refused.

