TaskBridgeStreamTransport
class TaskBridgeStreamTransport<Ctx>(baseUrl: String, context: Ctx, deps: TaskBridgeStreamTransportDeps<Ctx>, checkpoint: TaskBridgeCheckpointBinding<Ctx>, options: TaskBridgeStreamTransportOptions<Ctx> = TaskBridgeStreamTransportOptions())
Transport orchestrator for one observed task stream.
Lifecycle:
Resolve the initial watermark from the explicit
afterEventId, then persistent checkpoint storage.Observe via the configured fallback strategy: WebSocket first, then SSE, then long-polling.
Deduplicate by
eventIdacross transport failover and replay suffixes.Persist the latest delivered
eventIdafter each successful emission.Clear the checkpoint after a terminal task event.
The collector helpers for WebSocket and SSE intentionally live in separate files so this type can focus on orchestration rules: sequencing, retry boundaries, deduplication, and checkpoint ownership.
Constructors
Link copied to clipboard
constructor(baseUrl: String, context: Ctx, deps: TaskBridgeStreamTransportDeps<Ctx>, checkpoint: TaskBridgeCheckpointBinding<Ctx>, options: TaskBridgeStreamTransportOptions<Ctx> = TaskBridgeStreamTransportOptions())