You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(agent-service): extract WebSocket message types into types/ws
Move the inline WS message definitions out of server.ts into a dedicated
types/ws module, modeled as discriminated unions rather than one
all-optional interface:
- client.ts: WsClientRequest = WsClientRequestPrompt | WsClientRequestStopCommand
- server.ts: WsServerMessage union (init/step/state/complete/error/headChange) + OperatorResultSummaryWs
- index.ts: barrel, re-exported from the types barrel
The client->server wire discriminator changes from "message"/"stop" to
"prompt"/"command" (stop becomes commandType: "stop"); server->client `type`
values are unchanged. server.ts parses WsClientRequest and switches on the new
shapes, and the frontend WS sends are updated in lockstep.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012qFkyrpTd5PrkNBPcBeo4Q
0 commit comments