feat(core): implement Tool trait and registry system
Add tool.rs with complete tool abstraction: - Tool trait with async_trait for tool definitions - ToolRegistry for managing and executing tools - ParameterDef for declarative parameter schemas - Automatic JSON schema generation - Input validation before execution - Integration with Anthropic tool format - ToolOutput for structured results - Comprehensive error types (NotFound, ValidationError, etc.) - 12 unit tests covering registration, lookup, execution Dependencies added: async-trait Closes #24 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8d7a7a6099
commit
4440302e3b
4 changed files with 570 additions and 1 deletions
|
|
@ -22,6 +22,7 @@ categories = ["command-line-utilities", "development-tools"]
|
|||
# Async Runtime
|
||||
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std", "sync", "process", "signal"] }
|
||||
futures = "0.3"
|
||||
async-trait = "0.1"
|
||||
|
||||
# TUI Framework
|
||||
ratatui = { version = "0.29.0", features = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue