Skip to content

Add plugin version checking and auto-update awareness#357

Merged
jeremy merged 4 commits intomainfrom
plugin-update-awareness
Mar 24, 2026
Merged

Add plugin version checking and auto-update awareness#357
jeremy merged 4 commits intomainfrom
plugin-update-awareness

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 23, 2026

Summary

  • Adds CheckClaudePluginVersion() doctor check that compares the installed plugin version against the CLI version
  • Adds InstalledPluginVersion() to read the plugin version from Claude Code's installed_plugins.json (handles v2, v1 flat map, and array formats)
  • Setup wizard now recommends enabling auto-update after plugin installation
  • One-time post-upgrade hint on stderr when the installed plugin version is stale

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 formats
  • TestCheckClaudePluginVersion_* — up-to-date, outdated, dev build, and no-file scenarios
  • basecamp doctor shows "Claude Code Plugin Version" check
  • basecamp setup claude prints auto-update recommendation (interactive path; verified code present)

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.
Copilot AI review requested due to automatic review settings March 23, 2026 20:52
@github-actions github-actions bot added commands CLI command implementations tests Tests (unit and e2e) labels Mar 23, 2026
@github-actions github-actions bot added the enhancement New feature or request label Mar 23, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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’s installed_plugins.json (v2 envelope and array formats).
  • Add a new doctor check CheckClaudePluginVersion() and wire it into Claude agent checks when ~/.claude exists.
  • 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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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`.
Copilot AI review requested due to automatic review settings March 23, 2026 23:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@jeremy jeremy merged commit e295a94 into main Mar 24, 2026
27 checks passed
@jeremy jeremy deleted the plugin-update-awareness branch March 24, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations enhancement New feature or request tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants