klieo-tools 0.41.2

Tool dispatch + JSON-schema arg validation + timeout enforcement for klieo-core.
Documentation

klieo-tools

Tool dispatch + JSON-schema arg validation + timeout enforcement for klieo-core.

Part of the klieo Rust agent framework.

Features

  • ToolInvoker implementation that dispatches to registered Arc<dyn Tool>
  • JSON-schema validation on tool arguments before invoke
  • Per-tool configurable timeouts with ToolError::Timeout on expiry
  • Duplicate-name detection: add_tool / with_tool return Err(InvokerError::DuplicateTool) instead of panicking

Usage

[dependencies]
klieo-tools = "0.38"
use klieo_tools::ChainedInvoker;
use std::sync::Arc;

// Fluent builder (0.38+: with_tool returns Result)
let invoker = ChainedInvoker::new()
    .with_tool(Arc::new(my_tool_a))?
    .with_tool(Arc::new(my_tool_b))?;

// Or mutably push:
let mut invoker = ChainedInvoker::new();
invoker.add_tool(Arc::new(my_tool))?;

add_tool and with_tool return Err(InvokerError::DuplicateTool) if a tool with the same name is already registered.

Status

0.38.x — pre-1.0; patch releases are backward-compatible. See docs/SEMVER.md.

License

MIT — see LICENSE.