You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Goal: Add the registry provider seam and catalog routes for plugins, plus the PluginsClient.
Deliverables:
pkg/registry/provider.go — ListAvailablePlugins/GetPlugin/SearchPlugins (template skill methods) with no-op defaults on BaseProvider.
pkg/api/v1/registry_v01_plugins.go — /registry/{name}/v0.1/x/dev.toolhive/plugins[/{namespace}/{pluginName}] (template registry_v01_skills.go; register in pkg/api/v1/registry_v01.go).
PluginsClient in pkg/registry/api (template pkg/registry/api/skills_client.go).
Missed piece 1 — wire PluginLookup (currently dead code).pluginsvc.WithPluginLookup (pkg/plugins/pluginsvc/service.go) is never passed by createDefaultPluginManager in pkg/api/server.go, so thv ai-plugin install <plain-name> always 404s with "not found in local store or registry". Add a lazyPluginLookup mirroring lazySkillLookup (pkg/api/server.go ~line 836) that resolves the default provider per call and delegates to Provider.SearchPlugins, and pass it via pluginsvc.WithPluginLookup(...) when building the plugin manager. This is what makes registry-name install actually work end-to-end.
Missed piece 2 — types.Registry has no Plugins field (decision needed before implementing the remote provider). toolhive-core registry/types.Registry carries servers/remote servers/skills only. The remote provider's side-effect discovery (provider_remote.go checks len(upstream.Data.Servers) == 0 && len(upstream.Data.Skills) == 0) cannot see plugins. Two options:
(a) extend UpstreamRegistry/Registry in toolhive-core with a Plugins field — a mini GATE-C4 (merge → tag → bump both repos); or
(b) have the remote/cached providers fetch plugins purely through the new PluginsClient, the way CachedAPIRegistryProvider.ListAvailableSkills already goes through SkillsClient (pkg/registry/provider_cached.go ~line 394).
Option (b) avoids a new core gate and matches the cached-provider precedent; decide in the PR.
Dependency/gate: depends on GATE-C3 (toolhive-coreregistry/types.Plugin tagged + go.mod bumped in both toolhive and toolhive-registry-server). ✅ Satisfied — types.Plugin is in every core tag ≥ v0.0.28; toolhive is on v0.0.35. Parallel with Phase 5d.
Testing/exit gate: catalog list/get via provider; thv ai-plugin install <plain-name> resolves through the registry lookup against a mock registry.
Activity
Add unit tests for plugin lookup adapter and API provider
Address samuv's review on plugin catalog resolution
Add plugin registry catalog surface and name-based install (#6135)