v0.49.0 — broadcasting
Push events to clients in real time over named channels, on a pluggable Broadcaster — the core owns no socket, so point it at Pusher/Ably (fetch), a Cloudflare Durable Object, or the built-in MemoryBroadcaster (in-process fan-out, for tests).
broadcast(channels, event, payload)publishes to one or more channels.channelAuth("orders.{id}", (user, params) => …)gates private and presence channels — returnfalse(deny),true(allow), or member data (presence) — resolved byauthorizeChannelat your socket-auth endpoint. Composes withauth()and the authorization layer.MemoryBroadcaster.subscribe()fans out in-process (inside a Durable Object that owns the WebSockets, or an SSE loop).
318 tests; type-checked doc examples. See docs/broadcasting.md.