Skip to main content
run() and stream() cover the turn you sent. session.events() covers everything that happens in the session — turns started from the web app, Slack or another process included — as the same typed events, until the connection closes. Attach to sessions you did not start and the cloud pushes each status change the moment it happens:
Every session exposes two views of its updates. run(), stream() and streamUpdates() are scoped to a turn this client sent. events() and updates() are scoped to the session: every live update for it, whoever started the turn, until the connection closes. Both typed flavours use the same SessionEventReducer, so a SessionEvent means the same thing wherever it came from.
The cloud pushes status transitions live but replays only the latest one, so a client that was offline cannot reconstruct what it missed. Seed from listSessions() (each entry’s _meta carries statusEnum, userActionRequired, pendingRequest, sessionPRs, …) and stay attached for transitions. session.meta holds the latest session snapshot stamped on any update.
Observers should leave onPermission unset: an answer from an observer is a real decision, and the protocol has no “abstain”. See the session-board example for a dashboard built this way.