Skip to main content

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//! [`ApiServer`] is the process entry point; [`HealthChecker`] reports
7//! per-module readiness. Failures surface as the [`error`] types and are
8//! mapped to HTTP responses at the route boundary.
9
10pub mod error;
11pub mod models;
12pub mod routes;
13pub mod services;
14
15pub use models::ServerConfig;
16pub use services::health::{HealthChecker, HealthSummary, ModuleHealth, ProcessMonitor};
17pub use services::middleware::{
18    A2AContextMiddleware, ContextExtractor, McpContextMiddleware, PublicContextMiddleware,
19    UserOnlyContextMiddleware,
20};
21pub use services::server::ApiServer;