Repository navigation
[Tools > Definition API]: Simplify tool definitions and add migration guidance - #6
Merged
Merged
Conversation
rendotdev
marked this pull request as ready for review
July 15, 2026 13:48
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.
Summary
At the moment, Rig tool definitions repeat their folder name, command inference depends on the verbose
rig.defineCommandform, generated runtime types have drifted from the source SDK, and Rig updates do not provide agents with an exact migration prompt when the tool API changes.This PR introduces a compatibility-safe tool API v2 with folder-derived names and a bound command builder that infers command input, output, environment, and collection types. Existing v1 tool definitions remain supported so tools can migrate incrementally.
Implementation
commands: (command) => ({ ... })as the concise v2 definition shape.// rig:tool-api-version 2source markers.rig migrateandrig migrate --jsoncompatibility reports.rig init,rig doctor, and generated agent instructions.rig.defineCommanddefinitions through SDK normalization.Local migration validation
web.fetchconnectivity failure under installed Rig 0.0.40 and directcurl; the machine could not resolveexample.com, so this is environmental.hue,cleanshots, andvideoto cover inline commands, reusable command helpers, and predeclared commands.ready: true, and execute representative Hue and CleanShot commands.Validation
vp run ci