mod admin;
mod app;
mod auth;
mod cli;
mod compose;
mod config;
mod formats;
mod history;
mod init;
mod logging;
mod mcp;
mod mcp_login;
mod mcp_oauth;
mod mcp_tools;
mod models;
mod network;
mod redact;
mod report;
mod requests;
mod rules;
mod tool_loop;
mod vendors;
pub use app::{App, DEFAULT_LISTEN, ReloadError, Reloaded, shutdown_signal};
pub use auth::Trusted;
pub use cli::{execute, run};
pub use config::{
Auth, Commit, Config, DEFAULT_FILE, Pick, PluginsConfig, Price, ProviderConfig, ProxyVendor,
RequestLogConfig, RouteConfig, RouteTarget, RouteWhen, RoutingConfig, Source, no_keys_message,
};
pub use init::starter_config;
pub use logging::LogFormat;
pub use mcp::McpConfig;
pub use mcp_oauth::OAuthConfig;
pub use network::{NetworkConfig, Proxy};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Error {
message: String,
}
impl Error {
pub fn new(message: impl Into<String>) -> Self {
Self {
message: message.into(),
}
}
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str(&self.message)
}
}
impl std::error::Error for Error {}
impl From<respan_gateway_core::Fault> for Error {
fn from(fault: respan_gateway_core::Fault) -> Self {
Self::new(fault.message())
}
}