use anyhow::Result; use std::future::Future; use zesdex_domain::agent::AgentTurnParams; /// Interface for dispatching tool calls to their concrete implementations. pub trait ToolExecutor: Send + Sync { /// Execute a tool call asynchronously. fn execute( &self, tool_name: &str, args: &serde_json::Value, ) -> impl Future> + Send; } /// Service for running agent turns asynchronously. pub trait AgentTurnService: Send + Sync { /// Run a full agent turn loop asynchronously. fn run_turn(&self, params: AgentTurnParams) -> impl Future> + Send; } pub mod turn_service; pub use turn_service::{compact_messages_with_ai, AgentTurnServiceImpl};