Skip to content

Support multiple active clients per session#261

Draft
connor4312 wants to merge 3 commits into
mainfrom
active-clients-multi
Draft

Support multiple active clients per session#261
connor4312 wants to merge 3 commits into
mainfrom
active-clients-multi

Conversation

@connor4312

Copy link
Copy Markdown
Member

Moves session active-client tracking from a single client to multiple, per #141.

Protocol changes

  • SessionState.activeClients (required array, keyed by clientId) replaces the single optional SessionState.activeClient.
  • session/activeClientChangedsession/activeClientSet (upsert semantics).
  • New session/activeClientRemoved to release one client by clientId.
  • session/activeClientToolsChanged now carries a clientId.

Also in this PR

  • Hand-ported session reducers across all five clients (TS/Rust/Kotlin/Swift/Go); regenerated wire types, schema, and reference docs; refreshed fixtures and every CHANGELOG.
  • Documented the multi-active-client lifecycle + host-side removal/cancellation flow in the customizations guide.
  • Swept stale session/toolCall* doc references to chat/toolCall*.

Verification

TS (269 tests, reducers 100% branch), Rust, Go, and Swift suites pass; generator drift check clean. Kotlin verified by inspection (no local JDK) — CI runs its gradle check.

Refs #141

connor4312 and others added 3 commits June 23, 2026 15:56
Replace the single optional `SessionState.activeClient` with a required
`activeClients` array keyed by `clientId`: rename
`session/activeClientChanged` to `session/activeClientSet` (upsert), add
`session/activeClientRemoved`, and key `session/activeClientToolsChanged`
by `clientId`.

Port the session reducer across all five clients (TS/Rust/Kotlin/Swift/Go),
regenerate wire types, schema, and reference docs, refresh reducer
fixtures, and update every CHANGELOG. Document the multi-active-client
lifecycle and host-side removal/cancellation flow in the customizations
guide, and sweep stale `session/toolCall*` references to `chat/toolCall*`.

Refs #141

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The required activeClients field was missing from the test-only
SessionState constructor, breaking compileTestKotlin. Verified with
`./gradlew test` under a JDK 17 container.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
With activeClientSet now an upsert keyed by clientId, a client updates its
published tools by re-dispatching its full SessionActiveClient entry. The
tools-only patch action was redundant — and asymmetric, since customizations
on the same entry had no equivalent. Drop it, leaving the clean Set/Removed
pair for the activeClients collection.

Update all five client reducers, generators, version registry, fixtures,
CHANGELOGs, and the customizations/actions guides. Verified TS, Rust, Go,
Swift, and Kotlin (container) suites.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant