feat: agent-native repo/tag mutation fixes#197
Merged
Conversation
Adds --json (with deprecated --format alias) to the mutating commands that previously only emitted human-readable success text: vers repo create vers repo tag create vers repo tag update vers tag create vers tag update This unblocks agents that need to grab the created/updated identifiers (repo_id, tag_id, commit_id, reference) without parsing prose. Mirrors the existing F1 `--json` pattern used on the list/get commands in the same files. Long help on each command now mentions `--json` and the fields it returns.
`vers repo visibility <name>` previously took `--public` as a single
bool, with `--public=false` to mean private. That form is hard for an
agent to discover from --help and easy to typo as `--public false`
(positional arg, not flag value). Replace with two explicit booleans:
--public Make the repository public
--private Make the repository private
The flags are marked mutually exclusive and one-required, so:
vers repo visibility my-app # errors: one required
vers repo visibility my-app --public --private # errors: mutex
The Long help now documents that `--public=false` is no longer
accepted and points at `--private` instead.
Also adds --json (with deprecated --format alias) to this command,
emitting `{"name": ..., "is_public": ...}` so agents can confirm
the new state without parsing prose.
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.
Two related agent-native fixes for the repo/tag mutation surface. Driven by principles 2 (structured, parseable output) and 6 (cross-CLI vocabulary consistency) of the agent-native-cli skill.
Fix 1: `--json` on mutating repo/tag commands
These commands previously printed only human-readable success text. An agent that wanted the freshly-created `repo_id`, `tag_id`, `commit_id`, or `reference` had to parse prose. Added `--json` (and a deprecated `--format` alias, matching the existing F1 pattern used on the corresponding `list`/`get` commands) to:
JSON payloads expose the identifiers/references the agent needs next:
Each command's `Long` help now mentions `--json` and the fields it returns.
Fix 2: `vers repo visibility` — `--public` / `--private` mutex
Replaces the awkward `--public=false` form with two explicit booleans:
```
vers repo visibility my-app --public # make public
vers repo visibility my-app --private # make private
```
Verification
Breaking change
`vers repo visibility --public=false` no longer works. Use `--private` instead. The bool-value parsing for `--public` is gone because `--public` is now part of a mutually exclusive group.