Add skills methods to registry Provider interface#4191
Closed
Conversation
PR #4173 added SkillsClient for querying the registry's skills extension API. This wires that client into the registry provider layer so callers can discover skills through the same Provider interface used for servers. - Extend Provider interface with GetSkill, ListSkills, SearchSkills - Add default empty implementations on BaseProvider (inherited by Local/Remote providers that don't serve skills) - Add real implementations on APIRegistryProvider that delegate to the SkillsClient with appropriate timeouts - CachedAPIRegistryProvider inherits skills methods via embedding (uncached pass-through for now) - Regenerate mock provider Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4191 +/- ##
==========================================
- Coverage 69.30% 69.28% -0.03%
==========================================
Files 466 466
Lines 46774 46798 +24
==========================================
+ Hits 32416 32422 +6
+ Misses 11871 11843 -28
- Partials 2487 2533 +46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
10 tasks
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
SkillsClientfor querying the registry's skills extension API, but it wasn't wired into the provider layer. Callers had no way to discover skills through the standardProviderinterface used for servers.Providerinterface withGetSkill,ListSkills, andSearchSkillsmethods. Add default empty implementations onBaseProvider(inherited by Local/Remote providers), real implementations onAPIRegistryProviderthat delegate to theSkillsClient, and letCachedAPIRegistryProviderinherit via embedding (uncached pass-through).Type of change
Test plan
task test)task lint-fix)task gen)Changes
pkg/registry/provider.goGetSkill,ListSkills,SearchSkillstoProviderinterfacepkg/registry/provider_base.gopkg/registry/provider_api.goskillsClientfield, create in constructor, implement skills methods with timeoutspkg/registry/provider_cached.gopkg/registry/mocks/mock_provider.gopkg/registry/skills_provider_test.goSpecial notes for reviewers
CachedAPIRegistryProviderinherits skills methods fromAPIRegistryProvidervia embedding — every call hits the API. Skills caching can be added in a follow-up.BaseProviderreturns(nil, nil)forGetSkilland emptySkillsListResultfor list/search. This means Local/Remote providers silently return "no skills" rather than erroring, so callers don't need special handling per provider type.GetSkill,SearchSkills), 60s for list operations (ListSkills).Generated with Claude Code