use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
pub struct UsageSource {
pub agent_id: String,
pub parent_agent_id: Option<String>,
pub sub_agent_session_id: Option<String>,
pub agent_name: String,
}
impl UsageSource {
pub fn new(agent_name: impl Into<String>) -> Self {
Self {
agent_id: Uuid::new_v4().to_string(),
parent_agent_id: None,
sub_agent_session_id: None,
agent_name: agent_name.into(),
}
}
}