//! Error types for multi-agent coordination.

#[derive(Debug, thiserror::Error)]
pub enum MultiError {
    #[error("agent '{0}' failed: {1}")]
    AgentFailed(String, String),

    #[error("advisor exhausted: used {used} of {max_uses} allowed consultations")]
    AdvisorExhausted { used: u32, max_uses: u32 },

    #[error("mailbox send error: {0}")]
    MailboxSend(String),

    #[error("mailbox recv timeout for agent '{0}'")]
    MailboxTimeout(String),

    #[error("unknown specialist: '{0}'")]
    UnknownSpecialist(String),

    #[error("no agents produced output")]
    NoOutput,

    #[error("max rounds exceeded: {0}")]
    MaxRoundsExceeded(u32),

    #[error("coordination budget exhausted: {0}")]
    BudgetExhausted(String),
}
