Merge branch 'main' into web-chat-composer

# Conflicts:
#	web/src/app.js
#	web/src/client.js
#	web/src/protocol.js
#	web/test/chat.test.mjs
#	web/test/repository.test.mjs
#	web/test/ui-smoke.mjs
This commit is contained in:
2026-10-19 07:33:49 +01:00
14 changed files with 1840 additions and 39 deletions
+17
View File
@@ -16,6 +16,12 @@ export const Protocol = Object.freeze({
VALIDATE: "validate",
VALIDATED: "validated",
// Publishing a new create-only draft from a source (internal/protocol/message.go
// Submit/Submitted; mirrors PipelinesRepository.createPipeline). The reply
// carries the new pipeline `detail`.
SUBMIT: "submit",
SUBMITTED: "submitted",
LIST_RUNS: "list_runs",
RUNS: "runs",
GET_RUN: "get_run",
@@ -43,6 +49,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",
// The composer's own commands (C8/C9). `chat_prompt` carries its body in
// `chat_prompt` (`{session_id,text,files?,operation_id}`) and its reply echoes
// `chat_queued` when the prompt waits behind an in-flight turn; `chat_interrupt`
@@ -68,6 +81,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",
// The composer's payloads (C8/C9). `chat_interrupt` deliberately has no key of
// its own: its body is the same `chat_query` the other session-scoped commands
// carry (internal/protocol/chat.go ChatQuery, Chat.kt interruptRequest), so a