feat: tools command group (add/delete/push/pull) - #109
Merged
Conversation
Port v0's src/tools/ as the `tools` command group, mirroring `agents`.
- api.rs: create_tool/update_tool/get_tool/list_tools/delete_tool via the
raw-JSON layer. Create/update wrap the config as {"tool_config": ...};
get/list read tool_config from the response.
- verify.rs: verify_tool_push() compares the pushed config against the
tool_config echoed in the create/update response (no extra API call).
- tools.rs: add (webhook/client templates, create + register), delete
(single + --all), push (force-override + verify), pull (create/update/
skip planning). Tool configs stored as raw wire JSON.
- util.rs: extract downcast_ctx/dry_run_flag/opt_string (shared by agents
and tools) so push/pull can read the framework's global --dry-run.
- README: document the tools commands.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ports v0's
src/tools/as thetoolscommand group (follows #108), mirroringagentsand reusing the sameapi.rs/project.rs/verify.rsfoundation.tools add <name> [--type webhook|client] [--config-path]— build a default tool config, create it in ElevenLabs, writetool_configs/<name>.json, register intools.json.tools push [--tool <id>] [--dry-run]— force-override create/update via the raw-JSON API, with push-time verify against thetool_configechoed in the response (no extra call). Guards against a missing id in the create response (won't corrupt the registry).tools pull [--tool <id>] [--output-dir] [--update] [--all] [--dry-run]— create/update/skip planning; writes the response'stool_configverbatim.tools delete <id>/--all.Refactor
Extracted
downcast_ctx/dry_run_flag/opt_stringfromagents.rsinto a sharedutil.rs(push/pull use the non-typed command API to read the framework'sglobal(true)--dry-run).Verified
cargo buildgreen; 14 unit tests pass. Offline:tools push --dry-runprints the plan; bad--typeerrors; all subcommands + flags present. (Live create/update/pull needs an API key.)Not yet included (follow-ups)
The
testscommand group (incl. push-time auto-discovery of untracked test configs),residency, andcomponents add.🤖 Generated with Claude Code