use std::sync::Arc;
use thiserror::Error;
#[derive(Debug, Error, PartialEq, Eq)]
pub enum AgentCardError {
#[error("AgentCard.name must be non-empty")]
EmptyName,
#[error("AgentCard.description must be non-empty")]
EmptyDescription,
#[error("AgentCard.version must be non-empty")]
EmptyVersion,
#[error("AgentCard.supported_interfaces must contain at least one interface")]
NoSupportedInterfaces,
#[error("AgentCard.default_input_modes must contain at least one mode")]
NoInputModes,
#[error("AgentCard.default_output_modes must contain at least one mode")]
NoOutputModes,
#[error("AgentCard.skills[{index}].{field} must be non-empty")]
EmptySkillField {
index: usize,
field: &'static str,
},
#[error("AgentCard.provider.organization must be non-empty")]
EmptyProviderOrganization,
#[error("AgentCard.capabilities.extensions[{index}].{field} must be non-empty")]
EmptyExtensionField {
index: usize,
field: &'static str,
},
#[error("AgentCard.security_schemes key must be non-empty")]
EmptySecuritySchemeName,
#[error("AgentCard.security_schemes[{name}].name must be non-empty")]
EmptyAPIKeyParameterName {
name: Arc<str>,
},
#[error("AgentCard.security_schemes[{name}].scheme must be non-empty")]
EmptyHTTPAuthScheme {
name: Arc<str>,
},
#[error("AgentCard.security_schemes[{name}].flows must declare at least one flow")]
EmptyOAuthFlows {
name: Arc<str>,
},
}