armillae-tools 0.1.0-alpha.1

Type-safe Tool authoring, registration, and single-call execution for Armillae
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use armillae_core::{ToolCall, ToolDefinition, ToolResult};

use crate::{BoxFuture, ToolContext, ToolExecutionError};

/// Executes exactly one ToolCall without invoking an LLM Bridge.
pub trait ToolExecutor: Send + Sync {
    fn definitions(&self) -> Vec<ToolDefinition>;

    fn execute<'a>(
        &'a self,
        context: ToolContext,
        call: ToolCall,
    ) -> BoxFuture<'a, Result<ToolResult, ToolExecutionError>>;
}