feat(plugin): auto-update marketplace clone in session-start#1107
Merged
Conversation
Workaround for Claude Code /plugin update not pulling the marketplace shallow clone (anthropics/claude-code#40214). Session-start now auto-fetches the marketplace repo and resets if a newer version exists. - Add hooks/lib/updater.py with auto_update_marketplace() - 24h throttle via timestamp file to minimize network overhead - 5s timeout on all git operations with TimeoutExpired handling - Handle shallow clones (git fetch --unshallow before reset) - Show update notification in session greeting when new version found - 11 tests for updater module (find/throttle/update scenarios) Closes #1101
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
/plugin updatenot pulling marketplace shallow clone (Plugin update doesn't pull marketplace repo — shallow clone stays stale anthropics/claude-code#40214)session-start.pyStep 0.5: auto-fetch marketplace repo and reset if newer version existshooks/lib/updater.pymodule withauto_update_marketplace()TimeoutExpiredgraceful handlinggit fetch --unshallowbeforereset --hard)Test plan
test_finds_jeremydev87_marketplace— finds marketplace clone pathtest_returns_none_when_no_marketplace— graceful when no clonetest_should_check_when_no_timestamp_file— first run triggers checktest_should_not_check_within_throttle— skips within 24htest_returns_none_when_up_to_date— no update when HEAD == origintest_returns_version_when_updated— returns version after resetCloses #1101