Add Server-Sent Events endpoint to stream Temporal workflow execution events to the frontend in real-time.
GET /v1/poimen/executions/:id/stream Authorization: Bearer <JWT> Accept: text/event-stream
event: activity_started data: {"node_id": "clone", "activity": "CloneRepoActivity", "timestamp": "..."} event: activity_completed data: {"node_id": "clone", "activity": "CloneRepoActivity", "output": {}, "duration_ms": 2500} event: activity_failed data: {"node_id": "scan", "activity": "SecurityScan", "error": "timeout", "attempt": 2} event: workflow_completed data: {"status": "COMPLETED", "final_output": {}} event: heartbeat data: {"timestamp": "..."}
Content-Type: text/event-stream
GetWorkflowExecutionHistory
event_id
heartbeat
ActivityTaskStarted
activity_started
ActivityTaskCompleted
activity_completed
ActivityTaskFailed
activity_failed
WorkflowExecutionCompleted
workflow_completed
No dependencies set.
The note is not visible to the blocked user.
Description
Add Server-Sent Events endpoint to stream Temporal workflow execution events to the frontend in real-time.
Endpoint
SSE Event Format
Implementation
Content-Type: text/event-streamGetWorkflowExecutionHistoryevery 2sevent_id, only send new eventsheartbeatevery 15s to keep connection aliveActivityTaskStarted→activity_startedActivityTaskCompleted→activity_completedActivityTaskFailed→activity_failedWorkflowExecutionCompleted→workflow_completedAcceptance Criteria