Skip to content

refactor(agent-service): consolidate the WebSocket message-type framework #5749

Description

@bobbai00

Task Summary

Settle the agent-service ↔ frontend WebSocket protocol. Extract the message types into a dedicated types/ws module (client.ts / server.ts / index.ts), normalize the wire discriminators (client message/stopprompt/command; server→client renamed to payload nouns initsnapshot, statestatus), and make the socket carry only conversation + lifecycle: drop the completion frame and the operatorResults payload from snapshot/step (run-end becomes a status frame, which also unsticks the client from GENERATING after an error), and pull operator results on demand via GET /operator-results. Bring server.ts to 100% test coverage.

Part of #5747. Implemented by #5751.

Task Type

  • Refactor / Cleanup
  • DevOps / Deployment / CI
  • Testing / QA
  • Documentation
  • Performance
  • Other

Metadata

Metadata

Assignees

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions