Expand description
Runtime HTTP/SSE API types and OpenAPI export (D16 E1-c, D17 frozen).
Route handlers remain in zagens-cli by design (D17
Architecture Freeze). The engine→tools→route-handler closure forms an
internally co-located unit; further extraction would force artificial
trait hierarchies with a single implementation each. This crate is the
stable boundary for OpenAPI schema export, auth/cors middleware, wire
response types, and router composition helpers.
Re-exports§
pub use auth::require_runtime_token;pub use cors::cors_layer;pub use error::ApiError;pub use openapi::ResumeSessionKernelReplay;pub use openapi::ResumeSessionResponse;pub use openapi::SessionDetailResponse;pub use openapi::SessionsListResponse;pub use openapi::StartTurnResponse;pub use openapi::StreamTurnRequest;pub use openapi::ThreadSummary;pub use router::compose_router;pub use state::RuntimeApiAuthState;pub use state::RuntimeApiHostState;pub use state::RuntimeApiProbeState;
Modules§
- auth
- Runtime API bearer-token authentication middleware.
- cors
- Default CORS layer for the runtime HTTP API.
- error
- Shared HTTP error envelope for runtime API handlers (D16 E1-c phase 3).
- health
- Health and internal probe routes (R-003 A4.5).
- openapi
- OpenAPI 3.1 export for Zagens runtime HTTP API (D16 E1-c phase 1).
- router
- Router composition — public routes and CORS (D16 E1-c phase 2).
- state
- Shared state ports for auth, probe, and router composition (D16 E1-c phase 2).
- task
- Background task HTTP wire types (
/v1/tasks/*) and OpenAPI schemas (D16 E1-c6).