diff --git a/src/hooks/traits.rs b/src/hooks/traits.rs index 96a6d8e7f..19e8a1adc 100644 --- a/src/hooks/traits.rs +++ b/src/hooks/traits.rs @@ -3,6 +3,7 @@ use serde_json::Value; use std::time::Duration; use crate::channels::traits::ChannelMessage; +use crate::plugins::traits::PluginCapability; use crate::providers::traits::{ChatMessage, ChatResponse}; use crate::tools::traits::ToolResult; @@ -27,6 +28,11 @@ pub trait HookHandler: Send + Sync { fn priority(&self) -> i32 { 0 } + /// Capabilities granted to this hook handler. + /// Handlers without `ModifyToolResults` cannot modify tool results. + fn capabilities(&self) -> &[PluginCapability] { + &[] + } // --- Void hooks (parallel, fire-and-forget) --- async fn on_gateway_start(&self, _host: &str, _port: u16) {}