Skip to main content

zagens_core/engine/
tool_dispatch.rs

1//! Tool dispatch boundary for the agent engine (P2 PR4).
2//!
3//! The live `ToolRegistry` builder stays in `deepseek-runtime`; the engine in core
4//! depends on [`EngineToolDispatch`] instead of `crate::tools::*`.
5
6use async_trait::async_trait;
7use zagens_protocol::ToolOutput;
8use zagens_tools::{FunctionCallError, ToolCall};
9
10/// Minimal tool surface required by `Engine` / `turn_loop`.
11#[async_trait]
12pub trait EngineToolDispatch: Send + Sync {
13    async fn dispatch_tool(
14        &self,
15        call: ToolCall,
16        allow_mutating: bool,
17    ) -> Result<ToolOutput, FunctionCallError>;
18}