[INFRA-011] WebSocket gateway for job events #173

Closed
opened 2026-02-01 07:25:24 +00:00 by jason.woltje · 0 comments
Owner

Summary

Extend existing WebSocket gateway to support real-time job event streaming.

Events

  • job:created - New job created
  • job:status - Job status change
  • job:progress - Progress update (0-100%)
  • step:started - Step started
  • step:completed - Step completed
  • step:output - Step output chunk

Subscription Model

  • Subscribe to specific job: job:{jobId}
  • Subscribe to all workspace jobs: workspace:{workspaceId}:jobs

Tasks

  • Extend apps/api/src/websocket/websocket.gateway.ts
  • Add job event handlers
  • Implement subscription management
  • Add authentication for WebSocket connections
  • Handle reconnection and message replay

Files to Modify

  • apps/api/src/websocket/websocket.gateway.ts

Files to Create

  • apps/api/src/websocket/handlers/job-events.handler.ts

Acceptance Criteria

  • Clients can subscribe to job events
  • Events are pushed in real-time
  • Authentication is enforced
  • Reconnection replays missed events
## Summary Extend existing WebSocket gateway to support real-time job event streaming. ## Events - job:created - New job created - job:status - Job status change - job:progress - Progress update (0-100%) - step:started - Step started - step:completed - Step completed - step:output - Step output chunk ## Subscription Model - Subscribe to specific job: job:{jobId} - Subscribe to all workspace jobs: workspace:{workspaceId}:jobs ## Tasks - [ ] Extend apps/api/src/websocket/websocket.gateway.ts - [ ] Add job event handlers - [ ] Implement subscription management - [ ] Add authentication for WebSocket connections - [ ] Handle reconnection and message replay ## Files to Modify - apps/api/src/websocket/websocket.gateway.ts ## Files to Create - apps/api/src/websocket/handlers/job-events.handler.ts ## Acceptance Criteria - Clients can subscribe to job events - Events are pushed in real-time - Authentication is enforced - Reconnection replays missed events ## Related - Epic: #162 - Depends on: #169 (job events)
jason.woltje added this to the M4.2-Infrastructure (0.0.4) milestone 2026-02-01 07:25:24 +00:00
jason.woltje added the apiapiphase-4p1 labels 2026-02-01 07:25:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#173