use serde_json::Value;

#[derive(Debug, Clone)]
pub struct SkillOutcome {
    pub skill_id: String,
    pub result: Value,
    pub tokens_used: usize,
    pub duration_ms: u64,
    pub facts_extracted: Vec<String>,
}

impl SkillOutcome {
    pub fn success(skill_id: impl Into<String>, result: Value) -> Self {
        Self {
            skill_id: skill_id.into(),
            result,
            tokens_used: 0,
            duration_ms: 0,
            facts_extracted: Vec::new(),
        }
    }

    pub fn with_tokens(mut self, tokens: usize) -> Self {
        self.tokens_used = tokens;
        self
    }
}
