systemprompt_api/lib.rs
1//! systemprompt.io HTTP API server.
2//!
3//! Hosts the Axum application that fronts every protocol surface — A2A, MCP,
4//! OAuth, the marketplace, and the AI gateway — wiring [`routes`] and
5//! context-extraction [`services::middleware`] onto the shared `AppContext`.
6//! [`services::server::bind_and_serve`] binds the listener before bootstrap
7//! and [`services::server::run_server`] swaps in the full router;
8//! [`HealthChecker`] reports per-module readiness. Failures surface as the
9//! [`error`] types and are mapped to HTTP responses at the route boundary.
10
11pub mod error;
12pub mod routes;
13pub mod services;
14
15pub use services::health::{HealthChecker, HealthSummary, ModuleHealth, ProcessMonitor};
16pub use services::middleware::{
17 A2AContextMiddleware, ContextExtractor, McpContextMiddleware, PublicContextMiddleware,
18 UserOnlyContextMiddleware,
19};