Expand description
HTTP server wiring — composes the workflow API + dashboard + auth
routers into one axum Router. URL surface:
/auth/*OIDC spec (discovery, authorize, token, …)/api/v1/engine/core/*engine-core admin/api/v1/engine/workflow/*workflow API (auth-gated below)/api/v1/engine/auth/*engine-internal auth + admin/healthzredirect to/api/v1/engine/core/health
Functions§
- bind_
and_ serve - Bind a TCP listener on
bind_addrand serve a pre-builtaxum::Router. - build_
app - Compose the full
axum::Routerfor the engine. - build_
workflow_ ctx - Start a
WorkflowCtxaround the given store. Authentication + authorization are no longer the workflow’s concern — the engine wraps the workflow router with a gate middleware (build_app) that handles all of that. - build_
workflow_ ctx_ with_ bus - Like
build_workflow_ctxbut also wires the engine-wide event bus into the workflow context so SSE + the dispatch-wakeup loop see state transitions. - serve
- Bind a TCP listener on
bind_addrand serve the composed app.