Skip to content

extract tool definitions and dispatch into sheesh-tools crate#5

Merged
Cicolas merged 1 commit intorelease/v1.0.5from
worktree-refactor-mcp-calls
Mar 10, 2026
Merged

extract tool definitions and dispatch into sheesh-tools crate#5
Cicolas merged 1 commit intorelease/v1.0.5from
worktree-refactor-mcp-calls

Conversation

@Cicolas
Copy link
Owner

@Cicolas Cicolas commented Mar 10, 2026

Summary

  • Moved all_tools(), shell_quote(), and tool dispatch logic out of anthropic.rs into a new sheesh-tools workspace crate (crates/sheesh-tools/)
  • Introduced ToolResult enum (Local / Command) as a provider-agnostic dispatch result
  • anthropic.rs now calls sheesh_tools::dispatch() and maps the result to LLMEvent — reducing the dispatch block from ~40 lines to 3
  • Any future LLM provider (OpenAI tool-use, Ollama function calling) can reuse sheesh_tools::all_tools() and sheesh_tools::dispatch() without duplicating logic
  • Converted Cargo.toml to a Cargo workspace with resolver = "2"

Notes

Part of a batch of worktree changes targeting release/v1.0.5.

Tests

  • Build passes (cargo build)
  • Clippy clean (cargo clippy -- -D warnings)
  • LLM tool calls (run_command, read_file, list_dir, make_dir, touch_file) still work end-to-end
  • Local tools (system_information, read_terminal) still resolved locally without PTY

🤖 Generated with Claude Code

Move all_tools(), shell_quote(), and tool dispatch logic out of
anthropic.rs into a new workspace crate (crates/sheesh-tools).
Providers now call sheesh_tools::dispatch() and map the returned
ToolResult to their own LLMEvent, making tool support reusable
across all LLM backends.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@Cicolas Cicolas merged commit 624e495 into release/v1.0.5 Mar 10, 2026
1 check passed
@Cicolas Cicolas mentioned this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant