#![forbid(unsafe_code)]
#![warn(missing_docs)]

//! HTTP service client wrappers for provisioning platform.
//!
//! This crate provides HTTP clients for interacting with distributed services:
//! - **MachinesClient** - SSH machine operations and configuration
//! - **InitClient** - Service initialization and startup
//! - **AiClient** - AI/MCP integration and RAG framework
//!
//! Services can run locally or remotely, making the platform flexible for:
//! - Solo development (local services)
//! - Multi-service deployment (distributed services)
//! - Cloud deployment (services as microservices)
//!
//! # Example
//!
//! ```ignore
//! use service_clients::MachinesClient;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     let client = MachinesClient::new("http://localhost:8081".parse()?);
//!
//!     // Execute SSH command
//!     let result = client.execute_command("prod-server", "ls -la").await?;
//!     println!("Output: {}", result.output);
//!
//!     Ok(())
//! }
//! ```

pub mod ai;
pub mod error;
pub mod init;
pub mod machines;

pub use ai::AiClient;
pub use error::{ServiceError, ServiceResult};
pub use init::InitClient;
pub use machines::MachinesClient;

/// Base configuration for all service clients
#[derive(Debug, Clone)]
pub struct ServiceConfig {
    /// Base URL for the service (e.g., "http://localhost:8081")
    pub base_url: reqwest::Client,
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_service_clients_available() {
        // Just verify all client types are accessible
        let _ = std::any::type_name::<MachinesClient>();
        let _ = std::any::type_name::<InitClient>();
        let _ = std::any::type_name::<AiClient>();
    }
}
