fix(auto-updater): align with actual claude plugin list output format - #9
Conversation
Changes: - Update update-checker.sh to use 'claude plugin list --json' instead of '/plugin list' - Fix plugin matching to use .id field (format: "name@marketplace") instead of .name - Update mock test binaries to generate realistic JSON output matching actual CLI - Update README.md to replace deprecated '/plugin' commands with 'claude plugin' - Add 2 new tests validating real-world plugin ID format handling This fixes the auto-updater to work correctly with the actual claude CLI plugin list output format, which uses ID-based matching instead of name-based. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe auto-updater plugin is refactored to integrate with the new Changes
Sequence DiagramsequenceDiagram
participant UC as Update Checker
participant CM as Claude CLI
participant GH as GitHub Marketplace
participant LC as Local Cache
participant IP as Installed Plugins
UC->>LC: Check for cached marketplace
alt Cached marketplace exists
LC-->>UC: Return cached marketplace.json
else Cache miss or stale
UC->>GH: Fetch marketplace.json
alt Fetch successful
GH-->>UC: marketplace.json
UC->>LC: Update local cache
else Fetch failed
UC->>LC: Fall back to cached file
LC-->>UC: marketplace.json (fallback)
end
end
UC->>CM: claude plugin list --json
CM->>IP: Query installed plugins
IP-->>CM: JSON plugin data
CM-->>UC: JSON output with id, version
UC->>UC: Parse marketplace & installed plugins
UC->>UC: Identify plugins needing updates
loop For each plugin requiring update
UC->>CM: claude plugin install <id>
CM->>IP: Install/update plugin
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🎉 This PR is included in version 1.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
claude plugin list --json의 실제 출력 형식에 맞춰 auto-updater 수정.id필드 사용, 형식:"name@marketplace")/plugin명령어를claude plugin으로 교체Changes
1. update-checker.sh
claude plugin list --json추가 (JSON 출력 활성화).[] | select(.id | startswith($name + "@"))(ID 기반 매칭)2. auto-updater.bats
plugin바이너리 →claude바이너리로 변경id,scope,enabled,installPath등name필드 제거 (실제 출력에는 없음)3. README.md
/plugin명령어를claude plugin으로 교체Test Plan
✅ 8개 테스트 모두 통과
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
--silentand--check-onlycommand-line flags to the auto-updater for improved control over update behavior.Documentation
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.