use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize, Default)]
pub struct ListAgentsInput {}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct AgentSummary {
pub name: String,
pub description: String,
pub agent_type: String,
pub active: bool,
pub deployed_at: String,
}
#[derive(Debug, Serialize)]
pub struct ListAgentsOutput {
pub agents: Vec<AgentSummary>,
pub total: usize,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct RunAgentInput {
pub agent_name: String,
pub message: String,
#[serde(default)]
pub context_id: Option<String>,
}
#[derive(Debug, Serialize)]
pub struct RunAgentOutput {
pub response: String,
pub agent: String,
pub context_id: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<SourceRef>>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct SourceRef {
pub title: String,
pub url: Option<String>,
pub snippet: Option<String>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct GetStatusInput {
pub context_id: String,
}
#[derive(Debug, Serialize)]
pub struct GetStatusOutput {
pub context_id: String,
pub status: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub partial_response: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub error: Option<String>,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct DeployAgentInput {
pub toon_config: String,
#[serde(default)]
pub name_override: Option<String>,
}
#[derive(Debug, Serialize)]
pub struct DeployAgentOutput {
pub agent_name: String,
pub action: String,
pub active: bool,
pub deployed_at: String,
}
#[derive(Debug, Deserialize, Serialize, Default)]
pub struct GetUsageInput {
#[serde(default)]
pub from_date: Option<String>,
#[serde(default)]
pub to_date: Option<String>,
}
#[derive(Debug, Serialize)]
pub struct GetUsageOutput {
pub tenant_id: String,
pub tier: String,
pub period: UsagePeriod,
pub current_usage: UsageStats,
pub quota: UsageQuota,
}
#[derive(Debug, Serialize)]
pub struct UsagePeriod {
pub from: String,
pub to: String,
}
#[derive(Debug, Serialize)]
pub struct UsageStats {
pub total_requests: u64,
pub chat_requests: u64,
pub mcp_requests: u64,
pub tokens_used: u64,
pub agents_deployed: u32,
}
#[derive(Debug, Serialize)]
pub struct UsageQuota {
pub max_requests_per_month: u64,
pub max_agents: u32,
pub max_tokens_per_month: u64,
pub utilization: f64,
}