pub mod approval;
pub mod registry;
use async_trait::async_trait;
use serde_json::Value;
use crate::error::KovaError;
use crate::models::ToolResult;
#[async_trait]
pub trait Tool: Send + Sync {
fn name(&self) -> &str;
fn description(&self) -> &str;
fn parameters_schema(&self) -> Value;
async fn execute(&self, args: Value) -> Result<ToolResult, KovaError>;
}
#[async_trait]
pub trait ToolLifecycleHook: Send + Sync {
async fn on_tool_start(&self, tool_name: &str, args: &Value);
async fn on_tool_end(&self, tool_name: &str, result: &str, is_error: bool);
}