zagens-core 0.8.2

Core runtime boundaries for Zagens agent architecture
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Tool dispatch boundary for the agent engine (P2 PR4).
//!
//! The live `ToolRegistry` builder stays in `deepseek-runtime`; the engine in core
//! depends on [`EngineToolDispatch`] instead of `crate::tools::*`.

use async_trait::async_trait;
use zagens_protocol::ToolOutput;
use zagens_tools::{FunctionCallError, ToolCall};

/// Minimal tool surface required by `Engine` / `turn_loop`.
#[async_trait]
pub trait EngineToolDispatch: Send + Sync {
    async fn dispatch_tool(
        &self,
        call: ToolCall,
        allow_mutating: bool,
    ) -> Result<ToolOutput, FunctionCallError>;
}