Multi-workspace support spec#71
Conversation
| ## Current single-workspace flow | ||
|
|
||
| ### Top-level system view | ||
| ```text | ||
| Agent Process -> Broker -> 1 WebSocket -> 1 Relaycast Workspace | ||
| ``` | ||
|
|
||
| ### Through this repo today | ||
| ```text | ||
| Inbound | ||
| ------- | ||
| Relaycast Workspace | ||
| -> Relaycast Server | ||
| -> wsTransform strips/normalizes event payload | ||
| -> 1 SDK client instance (TS or Rust) | ||
| -> Broker runtime receives event with one implicit workspace | ||
| -> Agent process / local handlers | ||
|
|
||
| Outbound | ||
| -------- | ||
| Agent process command | ||
| -> Broker runtime send call | ||
| -> 1 SDK client instance | ||
| -> Relaycast HTTP/WebSocket API | ||
| -> 1 Relaycast Workspace | ||
| ``` | ||
|
|
||
| ### Current repo-internal shape | ||
| ```text | ||
| TS SDK / Rust SDK | ||
| Single workspace config | ||
| -> 1 AgentClient | ||
| -> 1 WsClient | ||
| -> callbacks/events assume one implicit workspace | ||
|
|
||
| Server | ||
| worker.ts | ||
| -> websocket session keyed by workspaceId:agentId | ||
| wsTransform.ts | ||
| -> known websocket payloads omit workspace_id | ||
| ``` |
There was a problem hiding this comment.
🟡 SPEC.md violates "Keep docs concise and avoid duplicated guidance" rule
AGENTS.md mandates "Keep docs concise and avoid duplicated guidance." The SPEC.md "Current single-workspace flow" section (lines 14–54) restates architecture already documented by the source files themselves (packages/server/src/engine/wsTransform.ts, packages/sdk-typescript/src/agent.ts, etc.) and the README. This section duplicates existing guidance rather than simply referencing the source of truth files listed in AGENTS.md.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Fair point but the SPEC.md is a one-time reference doc for the PR — it won't live in the codebase after merge. The duplication is intentional for reviewer context.
|
Preview deployed!
This preview shares the staging database and will be cleaned up when the PR is merged or closed. Run E2E testsnpm run e2e -- https://pr71-api.relaycast.dev --ciOpen observer dashboard |
Adds SPEC.md with the implementation plan for multi-workspace support (Phase 1: client-side multiplexing).
Includes:
See SPEC.md for full details.