1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
//! Core capability definitions use anyhow::Result; use serde_json::Value; /// Metadata for a capability #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct CapabilityMetadata { pub name: String, pub description: String, pub parameters: Value, // JSON Schema } /// A capability that can be executed pub trait Capability: Send + Sync { /// Get capability metadata fn metadata(&self) -> CapabilityMetadata; /// Execute the capability with arguments fn execute(&self, args: Value) -> Result<Value>; }