Skip to content

Add skills methods to registry Provider interface#4191

Closed
JAORMX wants to merge 1 commit intomainfrom
feat/registry-skills-provider
Closed

Add skills methods to registry Provider interface#4191
JAORMX wants to merge 1 commit intomainfrom
feat/registry-skills-provider

Conversation

@JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Mar 17, 2026

Summary

  • PR Add Skills API client for registry extension #4173 added SkillsClient for 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 standard Provider interface used for servers.
  • Extend the Provider interface with GetSkill, ListSkills, and SearchSkills methods. Add default empty implementations on BaseProvider (inherited by Local/Remote providers), real implementations on APIRegistryProvider that delegate to the SkillsClient, and let CachedAPIRegistryProvider inherit via embedding (uncached pass-through).

Type of change

  • New feature

Test plan

  • Unit tests (task test)
  • Linting (task lint-fix)
  • Mock regeneration (task gen)

Changes

File Change
pkg/registry/provider.go Add GetSkill, ListSkills, SearchSkills to Provider interface
pkg/registry/provider_base.go Default no-op implementations returning nil/empty results
pkg/registry/provider_api.go Add skillsClient field, create in constructor, implement skills methods with timeouts
pkg/registry/provider_cached.go Document that skills methods are uncached pass-through
pkg/registry/mocks/mock_provider.go Regenerated with new methods
pkg/registry/skills_provider_test.go Tests for BaseProvider, LocalRegistryProvider, and APIRegistryProvider skills methods

Special notes for reviewers

  • No caching for skills in this PR: CachedAPIRegistryProvider inherits skills methods from APIRegistryProvider via embedding — every call hits the API. Skills caching can be added in a follow-up.
  • Empty results, not errors, for unsupported providers: BaseProvider returns (nil, nil) for GetSkill and empty SkillsListResult for list/search. This means Local/Remote providers silently return "no skills" rather than erroring, so callers don't need special handling per provider type.
  • Timeouts match existing patterns: 10s for single lookups (GetSkill, SearchSkills), 60s for list operations (ListSkills).

Generated with Claude Code

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>
@github-actions github-actions bot added the size/M Medium PR: 300-599 lines changed label Mar 17, 2026
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.28%. Comparing base (ca7f127) to head (7d191e6).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pkg/registry/provider_api.go 75.00% 1 Missing and 3 partials ⚠️
pkg/registry/provider_base.go 83.33% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Medium PR: 300-599 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant