Async iterable handle for raw event subscriptions.
An optional transform maps each incoming event before it is queued
or delivered to a waiting consumer. This is used by named custom
channel subscriptions (e.g. "custom:a2a") to unwrap the payload
so callers receive the raw emitted data instead of the protocol
event envelope.
class SubscriptionHandleShuts down the transport and releases any underlying resources.
Pause the subscription: resolve all waiting iterators with done: true
so for await loops exit, but keep the subscription alive. New events
arriving while paused are still buffered. Call resume() to allow
iterators to consume again.
Resume a paused subscription so new for await loops can consume
buffered and future events.
Returns a promise that resolves when resume() is called. Resolves
immediately if not currently paused.