Add plugin version checking and auto-update awareness#357
Conversation
Detect outdated Claude Code plugin installations by comparing the installed plugin version against the CLI version. Show a warning in `basecamp doctor` and a one-time post-upgrade hint pointing users to enable auto-update in Claude Code. The setup wizard now recommends enabling auto-update after plugin installation.
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="internal/harness/claude.go">
<violation number="1" location="internal/harness/claude.go:216">
P2: Plugin version extraction skips the supported flat-map schema, so stale plugins in that format are silently treated as "Version not tracked."</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c57f460fef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR adds Claude Code plugin version-awareness to the CLI so users can detect when their installed Basecamp plugin falls behind the CLI and get nudged toward enabling marketplace auto-update.
Changes:
- Add
InstalledPluginVersion()+ parsing for Claude’sinstalled_plugins.json(v2 envelope and array formats). - Add a new doctor check
CheckClaudePluginVersion()and wire it into Claude agent checks when~/.claudeexists. - Add user-facing nudges: setup wizard recommends enabling auto-update; CLI prints a one-time post-upgrade stderr hint when the plugin version appears stale.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| internal/harness/claude.go | Adds plugin version extraction and a doctor check that compares plugin vs CLI versions, plus an auto-update hint constant. |
| internal/harness/claude_test.go | Adds unit tests covering version extraction and doctor check outcomes (up-to-date/outdated/dev/no-file). |
| internal/commands/wizard_agents.go | Prints an auto-update recommendation at the end of Claude setup. |
| internal/cli/root.go | Emits a one-time stderr hint after skill refresh if plugin version doesn’t match the CLI version. |
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e825fa1f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The version mismatch check was in the generic agent Checks list, causing the setup wizard and other callers to treat a version difference as 'plugin not installed'. The version check now only appears in `basecamp doctor`.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6963be5f3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
CheckClaudePluginVersion()doctor check that compares the installed plugin version against the CLI versionInstalledPluginVersion()to read the plugin version from Claude Code'sinstalled_plugins.json(handles v2, v1 flat map, and array formats)Claude Code disables auto-update for third-party marketplace plugins by default. These changes make staleness visible and point users toward enabling auto-update.
Test plan
TestInstalledPluginVersion_*— version extraction from v2, v1 flat map, array, bare key, and empty formatsTestCheckClaudePluginVersion_*— up-to-date, outdated, dev build, and no-file scenariosbasecamp doctorshows "Claude Code Plugin Version" checkbasecamp setup claudeprints auto-update recommendation (interactive path; verified code present)