Expand description
Tool system for AI Agents framework
Re-exports§
pub use builtin::HttpTool;pub use builtin::AskUserTool;pub use builtin::CalculatorTool;pub use builtin::CommandTool;pub use builtin::CopyPathTool;pub use builtin::DateTimeTool;pub use builtin::DeletePathTool;pub use builtin::DiagnosticsTool;pub use builtin::EchoTool;pub use builtin::FileEditTool;pub use builtin::FileInfoTool;pub use builtin::FileListTool;pub use builtin::FileReadTool;pub use builtin::FileTool;pub use builtin::FileWriteTool;pub use builtin::GitDiffTool;pub use builtin::GitStatusTool;pub use builtin::GlobTool;pub use builtin::GrepTool;pub use builtin::JsonTool;pub use builtin::MathTool;pub use builtin::MovePathTool;pub use builtin::PatchTool;pub use builtin::RandomTool;pub use builtin::SleepTool;pub use builtin::TemplateTool;pub use builtin::TextTool;pub use builtin::TodoTool;pub use builtin::WebFetchResolver;pub use builtin::WebFetchTool;pub use builtin::WebFetchTransport;pub use builtin::WebFetchTransportRequest;pub use builtin::WebFetchTransportResponse;pub use builtin::WebSearchTool;pub use security::CommandPolicyConfig;pub use security::CommandRuleConfig;pub use security::CommandTemplateConfig;pub use security::DomainPolicyConfig;pub use security::NoWritePolicyBehavior;pub use security::OperationPolicyConfig;pub use security::PathPolicyConfig;pub use security::SecurityCheckResult;pub use security::ToolPolicyConfig;pub use security::ToolSecurityConfig;pub use security::ToolSecurityEngine;
Modules§
Structs§
- Command
Policy Binding - Declarative mapping from an input field to command policy checks.
- Command
Request - Request sent to a host command runner.
- Command
Response - Result returned by a host command runner.
- Condition
Evaluator - Diagnostic
Item - One diagnostic item returned by a host provider.
- Diagnostics
Request - Query sent to a diagnostics provider.
- Diagnostics
Response - Diagnostics returned by a host provider.
- Domain
Policy Binding - Declarative mapping from an input field to URL or domain policy checks.
- Evaluation
Context - File
Version Evidence - Version evidence captured when file contents are read.
- File
Version Store - Session-local file version store used for read-before-write checks.
- Path
Policy Binding - Declarative mapping from an input field to path policy checks.
- Process
Command Runner - Process-backed command runner for CLI and trusted hosts.
- Question
Request - Structured question sent from a tool call to the host UI.
- Question
Response - Answer returned by an interactive or fallback question handler.
- Resolved
Tool - Resolved tool handle plus canonical identity evidence.
- Result
Limit Binding - Declarative mapping from an input field to a common limit cap.
- SimpleLLM
Getter - Static
Command Runner - Static command runner used by tests and eval fixtures.
- Static
Diagnostics Provider - Static diagnostics provider used by tests and eval fixtures.
- Static
WebSearch Provider - Static web-search provider used by tests and eval fixtures.
- Todo
Item - One structured task tracked by the session-local todo tool.
- Todo
Store - Session-local todo storage shared by the registry and runtime accessor.
- Tool
Actor Context - Turn actor and sender identity forwarded into tool execution.
- Tool
Aliases - Tool
Approval Record - Human approval evidence for a tool call.
- Tool
Call Classification - Call-level safety classification after arguments are known.
- Tool
Call Record - Tool
Cancellation Token - Cooperative cancellation observer shared with a tool call.
- Tool
Context - Tool
Descriptor - Tool
Execution Context - Context passed from the shared executor into one tool invocation attempt.
- Tool
Execution Limits - Effective tool limits derived from runtime defaults, policy, safety metadata, and call classification.
- Tool
Execution Record - Structured internal result for one logical shared-executor request.
- Tool
Execution Request - Request passed into the shared tool execution boundary.
- Tool
Identity - Canonical identity produced by registry resolution.
- Tool
Info - Public descriptor for a registered tool.
- Tool
Metadata - Tool
Policy Bindings - Tool-declared policy bindings used by the shared executor.
- Tool
Policy Decision Record - Policy decision stored with every tool execution record.
- Tool
Registry - Registry for built-in, provider, alias, and localized tool lookup.
- Tool
Result - Tool
Safety Metadata - Static safety metadata attached to a tool registration.
- Unavailable
Command Runner - Command runner used when no host installed process execution.
- Unavailable
Diagnostics Provider - Diagnostics provider used when the host has not installed one.
- Unavailable
WebSearch Provider - Web-search provider used when no host installed search.
- WebSearch
Request - Search request sent to a host web-search provider.
- WebSearch
Response - Normalized response returned by a web-search provider.
- WebSearch
Result Item - One normalized search result returned by a provider.
Enums§
- Command
Binding Kind - Command argument role declared by a tool policy binding.
- Diagnostic
Severity - Severity assigned to a compiler, linter, or editor diagnostic.
- Path
Access Mode - Path access mode declared by a tool policy binding.
- Path
Binding Kind - Path argument role declared by a tool policy binding.
- Permission
Outcome - Permission decision returned before tool execution.
- Provider
Health - Result
Limit Kind - Limit kind declared by a result-limit policy binding.
- Todo
Status - Status value for one session-local todo item.
- Tool
Approval Status - Approval status attached to a tool execution record.
- Tool
Call Source - Runtime source that requested a tool call.
- Tool
Error - Tool
Operation Kind - High-level operation category used for tool policy and scheduling.
- Tool
Provider Error - Tool
Provider Type - Tool
Schema Prompt Mode - Schema rendering mode for tool prompt generation.
- Tool
Side Effect Level - Side-effect level used to decide approval and concurrency behavior.
- Trust
Level - WebSearch
Safe Search - Safe-search preference for provider-neutral web search.
Constants§
- MAX_
TOOL_ TIMEOUT_ MS - Maximum accepted framework tool-execution timeout in milliseconds.
Traits§
- Command
Runner - Host bridge for controlled command execution.
- Diagnostics
Provider - Provider hook for compiler, linter, or editor diagnostics.
- LLMGetter
- Question
Handler - Host bridge for asking preference or clarification questions.
- Tool
- Core tool trait for external capabilities.
- Tool
Invoker - Runtime boundary for invoking tools through shared policy and evidence handling.
- Tool
Provider - WebSearch
Provider - Host bridge for provider-neutral public web search.
Functions§
- create_
builtin_ registry - file_
version_ evidence - Build file version evidence from observed bytes and metadata.
- generate_
schema
Type Aliases§
- Command
Runner Slot - Shared slot used by
commandto find the active host runner. - Diagnostics
Provider Slot - Shared slot used by
diagnosticsto find the active provider. - Question
Handler Slot - Shared slot used by
ask_userto find the active host handler. - WebSearch
Provider Slot - Shared slot used by
web_searchto find the active host provider.