solo_api/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2
3//! Solo transports: MCP server (rmcp) and HTTP/JSON (axum).
4//!
5//! - MCP stdio: [`mcp::SoloMcpServer`] + [`mcp::serve_stdio`].
6//! - HTTP/JSON: [`http::SoloHttpState`] + [`http::serve_http`].
7//! - Auth (v0.8.0 P3): [`auth::AuthConfig`] + [`auth::AuthenticatedPrincipal`].
8//! - LLM (v0.9.0 P2): [`llm::SamplingLlmClient`] backed by the connected
9//! MCP client's `sampling/createMessage` capability.
10
11pub mod auth;
12pub mod http;
13pub mod llm;
14pub mod mcp;
15
16#[cfg(any(test, feature = "test-support"))]
17pub mod test_support;
18
19pub use auth::{AuthConfig, AuthError, AuthenticatedPrincipal};
20pub use http::{SoloHttpState, openapi_spec, serve_http};
21pub use llm::{SamplingClient, SamplingError, SamplingLlmClient, build_sampling_steward};
22pub use mcp::{
23 ENV_MCP_PRINCIPAL_TOKEN, SoloMcpServer, resolve_mcp_principal, serve_stdio, tool_names,
24};