feat(cli): auto-update when version mismatch detected#1126
Merged
Conversation
Replace "Continue anyway?" prompt with "Update now? (Y/n)" when required_version doesn't satisfy the installed version. Selecting Y runs self-update inline using the config's version range (respecting major-version constraints), then exits with a re-run message. N continues the command without interruption. Extract shared update logic into self-update.ts so both the version check and `agentv self update` command reuse the same code. Closes #1125 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Intersect the config's required_version range with <(major+1).0.0 so auto-update never pulls in a new major version with potential breaking changes. E.g., if current is 4.14.2 and range is ">=4.1.0", installs ">=4.1.0 <5.0.0" instead of ">=4.1.0". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying agentv with
|
| Latest commit: |
4885ef0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://881f85ad.agentv.pages.dev |
| Branch Preview URL: | https://feat-1125-auto-update.agentv.pages.dev |
Remove shell: true from spawn() to avoid shell interpretation of semver operators (>, <, |) in version ranges. Also restore upgrade hint in strict mode output and unexport runCommand. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make it explicit that agents must execute each test plan item from the issue/PR checklist, mark them [x], and include CLI output as evidence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Step 4: push + draft PR after FIRST commit (not after implementation) - Step 5: implement incrementally, push at each checkpoint - Step 6: E2E verification is BLOCKING before marking ready; includes checking off test plan items with CLI output evidence Co-Authored-By: Claude Opus 4.6 <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.
Summary
required_versiondoesn't satisfy the installed versionagentv@">=4.1.0 <5.0.0"instead of@latest), preventing unintended major-version jumps, then exits with a re-run message--strictbehavior unchangedself-update.tsso both the version check andagentv self updatereuse the same codeTest plan
>=4.21.0 <5.0.0)agentv self updatemanually")--strictbehavior unchanged (warn + abort with upgrade hint)agentv self updatestill works independently (uses@latest)E2E evidence
Interactive — decline update (N)
Interactive — accept update (Y) with major-version cap
Confirms: version range
>=4.21.0 <5.0.0is correctly capped at current major (4.x).Strict mode
Non-interactive
Self update command
Closes #1125
🤖 Generated with Claude Code