Skip to content

middleware/pubsub

@providerprotocol/ai


@providerprotocol/ai / middleware/pubsub

Pub-sub middleware for stream resumption.

Enables reconnecting clients to catch up on missed events during active generation. The middleware buffers events and publishes them to subscribers. Server routes handle reconnection logic using the exported createSubscriberStream utility.