@@ -23,9 +23,7 @@ import (
2323
2424 "github.com/stacklok/toolhive-core/httperr"
2525 ociskills "github.com/stacklok/toolhive-core/oci/skills"
26- types "github.com/stacklok/toolhive-core/registry/types"
2726 "github.com/stacklok/toolhive/pkg/groups"
28- "github.com/stacklok/toolhive/pkg/registry"
2927 "github.com/stacklok/toolhive/pkg/skills"
3028 "github.com/stacklok/toolhive/pkg/storage"
3129)
@@ -75,13 +73,6 @@ func WithGroupManager(mgr groups.Manager) Option {
7573 }
7674}
7775
78- // WithRegistryProvider sets the registry provider for discovering available skills.
79- func WithRegistryProvider (p registry.Provider ) Option {
80- return func (s * service ) {
81- s .registryProvider = p
82- }
83- }
84-
8576// skillLock provides per-skill mutual exclusion keyed by scope/name/projectRoot.
8677// Entries are never evicted. This is acceptable because the number of distinct
8778// skills on a single machine is expected to remain small (< 1000).
@@ -110,15 +101,14 @@ func (sl *skillLock) lock(name string, scope skills.Scope, projectRoot string) f
110101
111102// service is the default implementation of skills.SkillService.
112103type service struct {
113- locks skillLock
114- store storage.SkillStore
115- groupManager groups.Manager
116- pathResolver skills.PathResolver
117- installer skills.Installer
118- ociStore * ociskills.Store
119- packager ociskills.SkillPackager
120- registry ociskills.RegistryClient
121- registryProvider registry.Provider
104+ locks skillLock
105+ store storage.SkillStore
106+ groupManager groups.Manager
107+ pathResolver skills.PathResolver
108+ installer skills.Installer
109+ ociStore * ociskills.Store
110+ packager ociskills.SkillPackager
111+ registry ociskills.RegistryClient
122112}
123113
124114// New creates a new SkillService backed by the given store.
@@ -183,14 +173,6 @@ func (s *service) List(ctx context.Context, opts skills.ListOptions) ([]skills.I
183173 return filtered , nil
184174}
185175
186- // ListAvailable returns skills available from the registry provider.
187- func (s * service ) ListAvailable (_ context.Context ) ([]types.Skill , error ) {
188- if s .registryProvider == nil {
189- return nil , nil
190- }
191- return s .registryProvider .ListAvailableSkills ()
192- }
193-
194176// Install installs a skill. When the Name field contains an OCI reference
195177// (detected by the presence of '/', ':', or '@'), the artifact is pulled from
196178// the registry and extracted. When LayerData is provided, the skill is extracted
0 commit comments