Skip to content

feat: tools command group (add/delete/push/pull) - #109

Merged
PaulAsjes merged 1 commit into
nextfrom
feat/tools
Jul 28, 2026
Merged

feat: tools command group (add/delete/push/pull)#109
PaulAsjes merged 1 commit into
nextfrom
feat/tools

Conversation

@PaulAsjes

Copy link
Copy Markdown
Collaborator

What

Ports v0's src/tools/ as the tools command group (follows #108), mirroring agents and reusing the same api.rs/project.rs/verify.rs foundation.

  • tools add <name> [--type webhook|client] [--config-path] — build a default tool config, create it in ElevenLabs, write tool_configs/<name>.json, register in tools.json.
  • tools push [--tool <id>] [--dry-run] — force-override create/update via the raw-JSON API, with push-time verify against the tool_config echoed 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's tool_config verbatim.
  • tools delete <id> / --all.

Refactor

Extracted downcast_ctx/dry_run_flag/opt_string from agents.rs into a shared util.rs (push/pull use the non-typed command API to read the framework's global(true) --dry-run).

Verified

cargo build green; 14 unit tests pass. Offline: tools push --dry-run prints the plan; bad --type errors; all subcommands + flags present. (Live create/update/pull needs an API key.)

Not yet included (follow-ups)

The tests command group (incl. push-time auto-discovery of untracked test configs), residency, and components add.

🤖 Generated with Claude Code

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>
@PaulAsjes
PaulAsjes merged commit 357a649 into next Jul 28, 2026
5 checks passed
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