web: live chat transcript over chat_event (C5)

This commit is contained in:
2026-10-19 07:01:00 +01:00
parent 7df4891f14
commit 7b578498ae
12 changed files with 1252 additions and 23 deletions
+11
View File
@@ -43,6 +43,13 @@ export const Protocol = Object.freeze({
CHAT_MESSAGES: "chat_messages",
CHAT_CLOSE: "chat_close",
CHAT_REOPEN: "chat_reopen",
// The shared live stream (C5). `chat_subscribe` attaches this connection to one
// session's stream (body: the session id); the server then pushes `chat_event`
// frames without a matching request id, so every client watching a session sees
// the same turn. There is no `chat_unsubscribe` on the wire — the server
// detaches a subscription when the connection closes.
CHAT_SUBSCRIBE: "chat_subscribe",
CHAT_EVENT: "chat_event",
SUCCESS_END: "#success",
FAILURE_END: "#failure",
@@ -60,6 +67,10 @@ export const ChatKeys = Object.freeze({
HISTORY: "chat_history",
MESSAGES: "chat_messages",
CLOSE: "chat_close",
// `chat_subscribe` (the request body naming the session) and `chat_event` (the
// unsolicited pushed frame on the shared stream).
SUBSCRIBE: "chat_subscribe",
EVENT: "chat_event",
});
/**