Repository navigation
Update module github.com/stacklok/toolhive to v0.41.0 - #230
Merged
Merged
Conversation
Migrate the vmcp provider to the v0.41.0 API: - Remove the deleted pkg/vmcp/discovery package; discovery.NewManager is gone and vmcpserver.New no longer takes a discovery manager arg. - Router: router.NewDefaultRouter() → vmcprouter.NewSessionRouter with an empty RoutingTable (the core resolves capabilities now). - Session factory: drop WithAggregator; the aggregator moves to the required Config.Aggregator field (the core is the single aggregator). - Authorization: build Config.Authz via authfactory.BuildAuthzConfig for the new core admission seam (AuthzMiddleware is vestigial on the New/Serve path). resolveAuthMiddleware now returns the authz.Config. The renovate PR was stale (downgraded toolhive-core and go-containerregistry that main has since bumped); this is a clean bump from the current main version.
1 task
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.
Supersedes #195 (stale renovate PR that downgraded toolhive-core and go-containerregistry that main has since bumped).
Summary
Bumps
github.com/stacklok/toolhivefrom v0.30.0 → v0.41.0 and migrates the vmcp provider to the v0.41.0 API.This spans 11 minor versions with breaking vmcp API changes; the provider migration is the only code change required.
API migration (
internal/infra/mcp/provider.go)pkg/vmcp/discovery:discovery.NewManager(agg)is gone;vmcpserver.Newno longer takes a discovery manager argument. Capability discovery is now the core's responsibility.router.NewDefaultRouter()→vmcprouter.NewSessionRouter(&vmcp.RoutingTable{})— the core resolves capabilities now, so an empty routing table suffices (matches upstreamcli/serve.go).vmcpsession.WithAggregator(agg); the aggregator moves to the requiredConfig.Aggregatorfield (the core is the single aggregator on the New/Serve path).Config.Authzviaauthfactory.BuildAuthzConfigfor the new core admission seam.AuthzMiddlewareis vestigial on the New/Serve path — the core enforces authz fromConfig.Authzinstead.resolveAuthMiddlewarenow returns the*authz.Configalongside the middleware.Verification
task fmt✅task lint✅ (0 issues)task test✅ (all packages, including the MCP integration tests against a live thv)go build ./...✅