//! # gemini-live
//!
//! High-performance, idiomatic Rust client for the
//! [Gemini Multimodal Live API](https://ai.google.dev/api/live).
//!
//! Designed for real-time audio/video streaming where every allocation
//! counts.  See [`audio::AudioEncoder`] for the zero-allocation hot path,
//! `docs/design.md` for performance goals, and `docs/roadmap.md` for
//! known gaps and planned work.
//!
//! ## Architecture
//!
//! The crate is organised in layers — each builds on the one below:
//!
//! | Layer         | Module        | Responsibility                                                  |
//! |---------------|---------------|-----------------------------------------------------------------|
//! | **Session**   | [`session`]   | Connection lifecycle, reconnection, typed send/receive          |
//! | **Transport** | [`transport`] | WebSocket connection, TLS, frame I/O                            |
//! | **Codec**     | [`codec`]     | JSON ↔ Rust; [`ServerMessage`] → [`ServerEvent`] decomposition  |
//! | **Audio**     | [`audio`]     | PCM encoding utilities and format constants                     |
//! | **Types**     | [`types`]     | Strongly-typed wire-format structs                              |
//! | **Errors**    | [`error`]     | Layered error enums                                             |
//!
//! ## Quick start
//!
//! ```rust,no_run
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! use gemini_live::session::{Session, SessionConfig, ReconnectPolicy};
//! use gemini_live::transport::{Auth, TransportConfig};
//! use gemini_live::types::*;
//!
//! let mut session = Session::connect(SessionConfig {
//!     transport: TransportConfig {
//!         auth: Auth::ApiKey(std::env::var("GEMINI_API_KEY")?),
//!         ..Default::default()
//!     },
//!     setup: SetupConfig {
//!         model: "models/gemini-3.1-flash-live-preview".into(),
//!         generation_config: Some(GenerationConfig {
//!             response_modalities: Some(vec![Modality::Text]),
//!             ..Default::default()
//!         }),
//!         ..Default::default()
//!     },
//!     reconnect: ReconnectPolicy::default(),
//! }).await?;
//!
//! session.send_text("Hello!").await?;
//!
//! while let Some(event) = session.next_event().await {
//!     match event {
//!         ServerEvent::ModelText(text) => print!("{text}"),
//!         ServerEvent::TurnComplete => println!("\n--- turn done ---"),
//!         _ => {}
//!     }
//! }
//! # Ok(())
//! # }
//! ```

pub mod audio;
pub mod codec;
pub mod error;
pub mod session;
pub mod transport;
pub mod types;

// Re-export the most commonly used items at the crate root for convenience.
pub use error::*;
pub use session::{ReconnectPolicy, Session, SessionConfig, SessionStatus};
pub use transport::{Auth, Connection, RawFrame, TransportConfig};
pub use types::*;
