Skip to content

Update module github.com/stacklok/toolhive to v0.41.0 - #230

Merged
JAORMX merged 1 commit into
mainfrom
fix/toolhive-v0.41
Aug 1, 2026
Merged

JAORMX merged 1 commit into
mainfrom
fix/toolhive-v0.41

Conversation

@JAORMX

@JAORMX JAORMX commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Supersedes #195 (stale renovate PR that downgraded toolhive-core and go-containerregistry that main has since bumped).

Summary

Bumps github.com/stacklok/toolhive from 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)

  • Removed pkg/vmcp/discovery: discovery.NewManager(agg) is gone; vmcpserver.New no longer takes a discovery manager argument. Capability discovery is now the core's responsibility.
  • Router: router.NewDefaultRouter() → vmcprouter.NewSessionRouter(&vmcp.RoutingTable{}) — the core resolves capabilities now, so an empty routing table suffices (matches upstream cli/serve.go).
  • Session factory: dropped vmcpsession.WithAggregator(agg); the aggregator moves to the required Config.Aggregator field (the core is the single aggregator on the New/Serve path).
  • Authorization: build Config.Authz via authfactory.BuildAuthzConfig for the new core admission seam. AuthzMiddleware is vestigial on the New/Serve path — the core enforces authz from Config.Authz instead. resolveAuthMiddleware now returns the *authz.Config alongside the middleware.

Verification

  • task fmt ✅
  • task lint ✅ (0 issues)
  • task test ✅ (all packages, including the MCP integration tests against a live thv)
  • go build ./... ✅

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.
@JAORMX
JAORMX merged commit 16da04e into main Aug 1, 2026
8 checks passed
@JAORMX
JAORMX deleted the fix/toolhive-v0.41 branch August 1, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant