use crate::{AgentConfig, AgentEvent, agent::tool::ToolRegistry, model::HistoryEntry};
use std::future::Future;
pub trait Hook: Send + Sync {
fn on_build_agent(&self, config: AgentConfig) -> AgentConfig {
config
}
fn on_event(&self, _agent: &str, _conversation_id: u64, _event: &AgentEvent) {}
fn on_register_tools(&self, _tools: &mut ToolRegistry) -> impl Future<Output = ()> + Send {
async {}
}
fn preprocess(&self, _agent: &str, content: &str) -> String {
content.to_owned()
}
fn on_before_run(
&self,
_agent: &str,
_conversation_id: u64,
_history: &[HistoryEntry],
) -> Vec<HistoryEntry> {
Vec::new()
}
}
impl Hook for () {}