use anyhow::Result;
use serde_json::Value;
use std::collections::HashMap;
use std::fmt::Debug;
#[async_trait::async_trait]
pub trait Skill: Send + Sync + Debug {
fn name(&self) -> &str;
fn description(&self) -> &str {
"No description provided"
}
async fn execute(&self, parameters: &HashMap<String, Value>) -> Result<String>;
fn validate(&self, parameters: &HashMap<String, Value>) -> Result<()> {
Ok(())
}
}
#[derive(Debug, Clone, serde::Deserialize)]
pub struct SkillCall {
pub action: String,
#[serde(default)]
pub parameters: HashMap<String, Value>,
}