Expand description
Tool contract for LLM integration Tool trait and BashTool implementation
§Public Library Contract
The Tool trait is a public contract - breaking changes require a major version bump.
See specs/009-tool-contract.md for the full specification.
§Architecture
Tooltrait: Contract that all tools must implementBashTool: Sandboxed bash interpreter implementing ToolBashToolBuilder: Builder pattern for configuring BashTool
§Example
use bashkit::{BashTool, Tool, ToolRequest};
let mut tool = BashTool::default();
// Introspection
assert_eq!(tool.name(), "bashkit");
assert!(!tool.help().is_empty());
// Execution
let resp = tool.execute(ToolRequest {
commands: "echo hello".to_string(),
}).await;
assert_eq!(resp.stdout, "hello\n");Structs§
- Bash
Tool - Sandboxed bash interpreter implementing the Tool trait
- Bash
Tool Builder - Builder for configuring BashTool
- Tool
Request - Request to execute bash commands
- Tool
Response - Response from executing a bash script
- Tool
Status - Status update during tool execution
Constants§
- VERSION
- Library version from Cargo.toml
Traits§
- Tool
- Tool contract for LLM integration.