feat: add SSE streaming endpoint for workflow events (#36)
CI / CI (push) Canceled after 4m19s

New SSE endpoint: GET /workflow/stream?workflow_id=X&namespace=default

- Polls Temporal GetWorkflowExecutionHistory every 2s
- Maps event types to semantic SSE events (activity_started/completed/failed, workflow_completed, etc.)
- Heartbeat every 15s
- Clean close on workflow completion or client disconnect
- Added stream resource to workflow ServiceAdapter spec

Closes #33

---------

Co-authored-by: Poimen <[email protected]>
Reviewed-on: #36
This commit was merged in pull request #36.
This commit is contained in:
2026-09-26 10:50:16 +00:00
co-authored by Poimen
parent f2cff13629
commit 6b089ff223
3 changed files with 239 additions and 0 deletions
@@ -359,6 +359,19 @@ func GetWorkflowSpec() *Spec {
},
},
},
{
Name: "stream",
Methods: []Method{
{
Verb: "GET",
UpstreamPath: "/workflow/stream",
Auth: &Auth{
Required: true,
Capability: "workflow:read",
},
},
},
},
},
}
}