Follow a thread (AG-UI, our connect extension)
Our documented extension of the AG-UI transport (agui.md): replay the thread's events as AG-UI runs, then follow it live across runs, with keepalive comments at least every 15 s. Last-Event-ID (the id: of the last frame the client holds, a log seq) resumes after that point on any replica; absent or empty replays the whole thread. A cursor beyond the last seq waits for new events. mode=run closes the stream after the active run's terminal event, or right after the replay when no run is open. Closing the stream never cancels a run.
The stream ends after the deployment's lifetime (60 s by default, ADR 0082), whatever credential it was opened with: the shortest of the token's expiry plus its leeway, an hour, and the lifetime. Ending is the ordinary path, not an error: nothing leaves the log, and a client that reopens the stream with the last id: it saw is shown every later event exactly once.
Where the log ends. A frame carries an id: (a resume point) and some events have no frame, so a log can end in events (thread_shared, thread_unshared, ui_catalog) that no id: names. When the replay has reached the thread's last event and the last id: written is below it, and after any later event that has no frame, the stream writes the seq of the last event it has read as an id: with no data:: a block the SSE parsing rules dispatch no event for, so a client that does not know of it reads the stream as before, and one that does knows it holds the thread's lastSeq. It is a valid Last-Event-ID, never written while a text message of the log is open, and never to a client that holds the head already.
Authorizations
A JWT signed by the configured issuer (RS256, RS384, ES256 or EdDSA), with the configured audience. Read when auth.mode is jwt or jwt_or_proxy_header. A missing or refused token gets 401 with WWW-Authenticate: Bearer; an issuer whose keys cannot be fetched gets 503.
A JWT as bearerToken, bound to the key of the client (cnf.jkt, RFC 7638), sent as Authorization: DPoP <token> with one DPoP header holding a proof signed by that key (RFC 9449, ADR 0054). Read only when auth.dpop is configured. A bad proof gets 401 with WWW-Authenticate: DPoP error="invalid_dpop_proof", algs="ES256 EdDSA", a bad or unbound token error="invalid_token".
Set by oauth2-proxy after OIDC login; requests without it get 401. Read when auth.mode is proxy_header (the default) or jwt_or_proxy_header without a bearer token.
Parameters
Header Parameters
Resume after this seq: the id of the last frame the client holds
"^[0-9]*$"Query Parameters
run: close after the active run; absent: follow across runs until the lifetime ends the stream
"run"Responses
The thread's events (text/event-stream); frames carry id: on resume points