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
Tighten conformance gates with HasMatchingDraftWireVersion guard
The previous gates activated draft-only scenarios as soon as the conformance
package version reached 0.2.0. That works for conformance >= 0.2.0-alpha.3 (or a
local build of main) where the bundled DRAFT_PROTOCOL_VERSION constant matches
this SDK's value, but breaks under 0.2.0-alpha.2 because alpha.2 still ships the
placeholder 'DRAFT-2026-v1' wire string while this SDK only accepts the
ratified '2026-07-28'.
Add HasMatchingDraftWireVersion() that greps the bundled
node_modules/@modelcontextprotocol/conformance/dist/index.js for this SDK's
McpHttpHeaders.DraftProtocolVersion (the bundle is minified so we can't grep
the constant name, but the literal version string survives bundling and is
specific enough to be reliable). AND it into the three gates:
HasSep2243Scenarios(), HasCachingScenario(), HasMrtrScenarios().
Also unify HasMrtrScenarios() with HasSep2243Scenarios()/HasCachingScenario():
read the installed version from node_modules instead of the pinned version
from package.json. This lets a local 'npm install --no-save <path-to-conformance>'
activate MRTR scenarios the same way it already activates SEP-2243/caching.
Under 0.2.0-alpha.2 (this PR's pin), the 14 gated draft scenarios all SKIP
cleanly instead of failing on wire-string mismatch. Once 0.2.0-alpha.3 publishes
(or a local main build is installed), the gates auto-activate.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments