From fd81987fcec0178ae2c466800b428e1b1dfc4ab0 Mon Sep 17 00:00:00 2001 From: Adam Malczewski Date: Sun, 21 Jun 2026 21:47:24 +0900 Subject: feat(ws): handle conversation.open broadcast — open/focus tab from CLI --open MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consume the conversation.open handoff (wire@0.9.0, transport-contract@0.13.0). Re-pinned file: deps + re-mirrored .dispatch/*.reference.md. - WS adapter (logic.ts + index.ts): parse + route the new top-level "conversation.open" WsServerMessage to an onConversationOpen handler - app store: openConversation(id) opens (or focuses) a tab — creates a chat store, loads history, subscribes to live turns, creates+selects the tab - conformance guard + WS adapter tests cover the new type - backend also shipped conversation metadata endpoints (GET /conversations, GET /conversations/:id/last, GET/PUT /conversations/:id/title) — mirrored but not yet consumed by the FE 682 tests green. --- .dispatch/wire.reference.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to '.dispatch/wire.reference.md') diff --git a/.dispatch/wire.reference.md b/.dispatch/wire.reference.md index c2c4d43..e96c353 100644 --- a/.dispatch/wire.reference.md +++ b/.dispatch/wire.reference.md @@ -4,9 +4,13 @@ > types WITHOUT following the `file:` dep symlink out of this repo (which hangs on a permission > prompt). Your CODE still imports `@dispatch/wire` normally — this file is for READING only. > -> **Orchestrator:** SNAPSHOT of `wire@0.8.0` (message queue + steering). Regenerate +> **Orchestrator:** SNAPSHOT of `wire@0.9.0` (conversation metadata). Regenerate > whenever `@dispatch/wire` changes. > +> **2026-06-21 delta (conversation.open handoff — package bumped `0.8.0` → `0.9.0`, ADDITIVE):** +> adds `ConversationMeta` — metadata for a conversation (id, title, createdAt, lastActivityAt), +> returned by `GET /conversations` (the list endpoint, see `transport-contract@0.13.0`). +> > **2026-06-21 delta (message-queue + steering handoff — package bumped `0.7.0` → `0.8.0`, ADDITIVE):** > adds the per-conversation **message queue** + **steering** feature. While a turn is GENERATING, > a client enqueues a user message (via the `chat.queue` WS op or `POST /conversations/:id/queue`, @@ -577,4 +581,19 @@ export interface TurnSteeringEvent { readonly turnId: string; readonly text: string; } + +// ─── Conversation metadata ─────────────────────────────────────────────────── + +/** + * Metadata for a conversation, returned by `GET /conversations` (the list + * endpoint). The title defaults to the first user message (truncated) and can + * be set via `PUT /conversations/:id/title`. `createdAt` is set on first write; + * `lastActivityAt` is updated on every append. + */ +export interface ConversationMeta { + readonly id: string; + readonly createdAt: number; + readonly lastActivityAt: number; + readonly title: string; +} ``` -- cgit v1.2.3