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

stacklok / toolhive / 19304282141 / 1
51%
main: 51%

Build:
DEFAULT BRANCH: main
Ran 12 Nov 2025 04:27PM UTC
Files 380
Run time 15s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Nov 2025 04:21PM UTC coverage: 48.907% (+0.3%) from 48.61%
19304282141.1

push

github

web-flow
Implement lazy per-session capability discovery (#2539)

* Create vMCP-specific VMCPSession type to track routing tables for sessions

Create VMCPSession type that extends StreamableSession with per-session
routing table storage. This enables capability caching per-session.

The VMCPSession type embeds StreamableSession to keep compatibility and
inherit the same session behaviour, but adds a routingTable field
protected by a mutex.

The new type adds GetRoutingTable/SetRoutingTable to access and set the
routing table in a thread-safe way.

When capabilities will be later discovered when the SDK registers a new
session, the routing table will be stored in the vMCPSession and later
retrieved by the vMCP middleware.

* Add context helpers and capability discovery manager

Adds helpers to retrieve capabilities from context and add them to ctx
as well as a discovery manager. The discovery manager is now a simple
passthrough to the aggregator, but will be extended in the future to add
a caching layer.

* Add discovery middleware

Adds a new middleware for capability discovery. The middleware has two branches:

1. Initialize request (no session ID):
    1. Auth middleware extracts user identity
    2. Discovery middleware performs capability aggregation with user context
    3. Discovered capabilities injected into request context
    4. Later: SDK's OnRegisterSession hook stores routing table in VMCPSession to be readable by subsequent requests not sharing ctx

2. Subsequent requests (has session ID):
    1. Discovery middleware retrieves session from session manager
    2. Extracts routing table from VMCPSession
    3. Reconstructs AggregatedCapabilities from cached routing table
    4. Injects into request context for router/handlers to use

This eliminates expensive discovery operations on every request while
maintaining per-user capability isolation. Each session gets its own
routing table based on the user's discovered capabilities at
initialization ti... (continued)

24153 of 49386 relevant lines covered (48.91%)

35.67 hits per line

Source Files on job 19304282141.1
  • Tree
  • List 380
  • Changed 6
  • Source Changed 4
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 19304282141
  • 18fa987b on github
  • Prev Job for on main (#19302792233.1)
  • Next Job for on main (#19304811885.1)
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