//! SSH operations module.
//!
//! Provides comprehensive SSH functionality including:
//! - **SSH Connections**: Builder pattern for configuring and establishing SSH connections
//! - **Command Execution**: Execute remote commands over SSH
//! - **File Transfer**: rsync-based file transfer with push/pull operations
//! - **SSH Keys**: Read, validate, and generate SSH keys
//! - **Authorized Keys**: Manage authorized_keys on remote systems
//! - **Pod Connections**: Kubernetes pod SSH support with Redis caching
//!
//! # Examples
//!
//! ## SSH Connection and Command Execution
//!
//! ```no_run
//! use herolib_os::ssh::{SshConnection, SshConnectionBuilder};
//!
//! let conn = SshConnectionBuilder::new()
//!     .host("server.example.com")
//!     .user("admin")
//!     .build();
//!
//! let (code, output) = conn.execute("hostname")?;
//! println!("Output: {}", output);
//! # Ok::<(), anyhow::Error>(())
//! ```
//!
//! ## File Transfer
//!
//! ```no_run
//! use herolib_os::ssh::SshConnectionBuilder;
//!
//! let conn = SshConnectionBuilder::new()
//!     .host("server.example.com")
//!     .user("deploy")
//!     .build();
//!
//! // Upload files
//! conn.file_transfer()
//!     .archive(true)
//!     .compress(true)
//!     .push("/local/app", "/remote/app")?;
//! # Ok::<(), anyhow::Error>(())
//! ```
//!
//! ## SSH Key Operations
//!
//! ```no_run
//! use herolib_os::ssh::{ssh_key_read, ssh_key_validate};
//!
//! let key_content = ssh_key_read("/home/user/.ssh/id_rsa.pub")?;
//! if ssh_key_validate(&key_content)? {
//!     println!("Key is valid");
//! }
//! # Ok::<(), herolib_os::ssh::SshError>(())
//! ```
//!
//! ## Generate SSH Keys
//!
//! ```no_run
//! use herolib_os::ssh::keys::{SshKeyGenerator, SshKeyType};
//!
//! let path = SshKeyGenerator::new("/tmp/my_key")
//!     .key_type(SshKeyType::Ed25519)
//!     .generate()?;
//! # Ok::<(), anyhow::Error>(())
//! ```
//!
//! ## Manage Authorized Keys
//!
//! ```no_run
//! use herolib_os::ssh::{SshConnection, AuthorizedKeysManager};
//!
//! let conn = SshConnection::builder()
//!     .host("example.com")
//!     .user("ubuntu")
//!     .build();
//!
//! let manager = AuthorizedKeysManager::new(conn);
//! manager.add_key("/path/to/id_rsa.pub")?;
//! let keys = manager.list_keys()?;
//! # Ok::<(), anyhow::Error>(())
//! ```

pub mod auth_keys;
pub mod file_transfer;
pub mod keys;
pub mod pod_connection;
pub mod rhai;
mod ssh;
mod ssh_key;

// Re-export main types from ssh module
pub use ssh::{FileTransferBuilder, SshConnection, SshConnectionBuilder};

// Re-export SSH key functions
pub use ssh_key::{SshError, ssh_key_read, ssh_key_validate};

// Re-export key generation types
pub use keys::{SshKeyGenerator, SshKeyType};

// Re-export authorized keys manager
pub use auth_keys::AuthorizedKeysManager;

// Re-export file transfer operations
pub use file_transfer::FileTransferOps;

// Re-export pod connection types
pub use pod_connection::{PodConnectionConfig, PodSshAddress};
