Skip to main content

rskit_tool/
lib.rs

1//! Tool definition, auto-wiring, registry and middleware for agentic systems.
2//!
3//! Provides a type-safe framework for defining tools that can be used in agentic systems,
4//! LLM function calling, or MCP servers.
5
6mod callable;
7pub mod context;
8mod definition;
9pub mod envelope;
10#[cfg(feature = "validation")]
11mod from_fn;
12pub mod hitl;
13pub mod io;
14pub mod registry;
15pub mod result;
16
17pub use callable::Callable;
18pub use context::Context;
19pub use definition::{Annotations, Definition, ExecutionHint};
20pub use envelope::{
21    DataClassification, Envelope, FilesystemMode, FilesystemRule, NetworkPolicy, NetworkRule,
22    Safety, SensitiveMatcher, SensitivePredicate, SubprocessRule,
23};
24#[cfg(feature = "validation")]
25pub use from_fn::{from_fn, from_fn_simple};
26pub use hitl::{
27    Decision, DenyHumanApproval, DenyOnSensitive, HumanApproval, SensitivityEvaluator, ToolCall,
28    denied_error,
29};
30pub use io::{ToolInput, ToolMetadata, ToolOutput, ToolSchema};
31pub use registry::{BatchOptions, Registry};
32pub use result::{ToolResult, error_result, json_result, text_result};
33
34#[cfg(test)]
35mod tests;