docs: add client-federation.md and cross-reference with federation.md
The client-side federation model (instanceStore, federated accounts, multi-instance connections, origin-aware routing) was completely undocumented. An agent reading only federation.md would understand S2S relay but have no knowledge of how the client connects to multiple instances, creates federated accounts with real credentials, or routes API/WS calls to the correct instance. New spec covers: instanceStore architecture, federated account creation (username@instance format), Connections UI, auto-connect lifecycle, channelOriginMap routing, WebSocket multiplexing, cross-instance identity resolution, and the relationship between client-side and S2S federation. CLAUDE.md subsystem table updated. Both federation docs cross-reference each other.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
# Federation System
|
||||
# Federation System (Server-to-Server)
|
||||
|
||||
> **Companion spec:** This document covers **S2S (server-to-server)** federation — the relay protocol, HMAC auth, identity resolution, and background workers. For the **client-side** multi-instance architecture (how the web/desktop app connects to multiple instances, federated account creation, origin-aware routing), see [`client-federation.md`](client-federation.md). Both systems work together.
|
||||
|
||||
Source files:
|
||||
- `packages/server/src/routes/federation.ts` -- API endpoints (peer handshake, relay, sync) + all inbound event processors + identity resolution functions
|
||||
|
||||
Reference in New Issue
Block a user