Co-authored-by: Matt <77928207+mattzcarey@users.noreply.github.com> Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1.7 KiB
1.7 KiB
| @modelcontextprotocol/core-internal | @modelcontextprotocol/client | @modelcontextprotocol/server |
|---|---|---|
| major | major | major |
Split the wire layer into per-era codecs and make protocol-revision deletions physical. Deliberate wire/schema behavior changes (see docs/migration/support-2026-07-28.md "Per-era wire codecs"):
resultTypeis no longer modeled by any neutral wire schema:EmptyResultSchema(strict) now rejects{resultType}bodies; on 2025-era connections a foreignresultTypeis stripped before validation instead of rejected; the member exists only inside the 2026-era codec, which requires it.CallToolResult.content/ToolResultContent.contentare required at the wire boundary (content.default([])removed): handler results withoutcontentare rejected with-32602instead of silently defaulted, and content-less wire results fail the client parse loudly.- Custom (3-arg) handlers now receive
_metaminus the reserved envelope keys instead of having it deleted before params validation. specTypeSchemasre-scoped to the neutral model: result validators no longer acceptresultType; task message-type validators andRequestMetaEnvelopeleft the public set (SpecTypeNamenarrowed).- Role aggregate types/schemas (
ClientRequest,ServerResult, …) no longer carry task vocabulary; the deprecatedTask*types remain importable unchanged. - Era-mismatched spec methods fail physically: inbound era-deleted methods get
-32601even with a handler registered; outbound sends throwSdkErrorCode.MethodNotSupportedByProtocolVersionlocally. - Value guards (
isCallToolResult, …) are documented as neutral-shape consumer checks, not wire validators.