Skip to main content
Receives one session’s activity in delivery order. Calls are synchronous and errors thrown from them are swallowed, so an observer cannot break the session it watches.

Methods

close()

The session was released or its connection closed; nothing more arrives.

Parameters

null | Error
required

extension()

A session-scoped _cognition.ai/* notification.

Parameters

prompt()

A prompt is about to be sent.

Parameters

promptRejected()

The agent rejected the turn’s prompt (not a postMessage() injection).

Parameters

unknown
required

replayed()

The transcript replayed while the session was loaded or attached.

Parameters

readonly SessionUpdate[]
required

update()

A live session/update (replayed history arrives via replayed).

Parameters