• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 26915584011

03 Jun 2026 09:58PM UTC coverage: 65.86% (+0.01%) from 65.848%
26915584011

push

github

web-flow
Define VMCP core interface and Config contract (#5450)

* Define VMCP core interface and Config contract

Establish the contract-only first step of the vMCP New/Serve split: the
identity-parameterized VMCP domain interface and the core Config struct
of collaborators. This is the domain boundary that New(cfg) -> VMCP and
the decorators will consume; no implementation yet.

Implements issue #5434:
- Add pkg/vmcp/core with the VMCP interface (ListTools/CallTool/List+
  Read/List+GetPrompt/Lookup{Tool,Resource,Prompt}/Close), identity an
  explicit *auth.Identity on every data method, never read from context.
- Encode the full behavioral contract in the interface doc comment
  (anonymous nil identity, decorators subtract-only, read-only args/meta,
  nil ResourceReadResult.Meta).
- Declare Config with typed collaborator fields; no construction logic.
- No mcp-go types cross the boundary (anti-pattern #5).

The core lives in pkg/vmcp/core rather than root pkg/vmcp because Config
references aggregator/router/composer/health/authz, all of which import
pkg/vmcp; a root-package Config would create an import cycle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix VMCP doc-comment godoc link and line citation

Addresses stacklok/toolhive#5450 review comments:
- LOW pkg/vmcp/core/core.go (3351574912): replace the unresolvable
  [pkg/vmcp/session/types.ShouldAllowAnonymous] godoc link (package not
  imported) with plain prose so it no longer renders as literal brackets.
- LOW pkg/vmcp/core/core.go (3351574935): drop the rot-prone types.go:556-561
  line citation in favor of the self-maintaining [vmcp.ResourceReadResult].Meta
  doc link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

66410 of 100835 relevant lines covered (65.86%)

62.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

78.17
/pkg/transport/proxy/httpsse/http_proxy.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc