fix(types): restore task wire types removed with the task feature#2248
Merged
Conversation
The task feature removal stands as behavior-only: no handlers, methods, or stores return, and inbound tasks/* requests receive -32601. The wire surface defined by the 2025-11-25 protocol revision is restored so the SDK interoperates cleanly with peers on that revision: task schemas and inferred types, task members of the request/result/notification unions, the optional task augmentation on request params, the tasks capability key, the isTaskAugmentedRequestParams guard, and RELATED_TASK_META_KEY.
🦋 Changeset detectedLatest commit: 4991a7d The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
KKonstantinov
approved these changes
Jun 2, 2026
9 tasks
This was referenced Jun 2, 2026
mattzcarey
pushed a commit
that referenced
this pull request
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restores the 2025-11-25 task wire types removed in #2128: task schemas and inferred types, task members of the request/result/notification unions, the optional
taskaugmentation on request params, thetaskscapability key, type guards, andRELATED_TASK_META_KEY. The task feature removal stands as behavior-only — no handlers, methods, or stores return, and inboundtasks/*requests now receive-32601(method not found) instead of failing parse.Motivation and Context
Tasks are part of the released 2025-11-25 protocol revision. An SDK that supports 2025-11-25 must tolerate the task wire vocabulary from peers (
capabilities.tasks, toolexecution.taskSupport, task-augmented requests) even without implementing the feature. #2128 removed one layer too much; this restores the wire-contract layer only, byte-identical to the pre-#2128 sources except for exports of deleted behavior modules.How Has This Been Tested?
Full suite green: core/server/client unit tests, e2e matrix 1233 cells with 0 unexpected failures (identical to baseline). New interop assertions:
tasks/getparses through the request union, task-augmentedtools/callretainstask,execution.taskSupportandcapabilities.tasksaccepted by validation.Breaking Changes
None.
Types of changes
Checklist
Additional context
The restored code is a verbatim partial revert of #2128's type-surface hunks, so review can be done by provenance. One deliberate inclusion:
TaskCreationParamsreturns with the rest (it was an early-draft extra not in the released 2025-11-25 schema) — kept for byte-provenance; trivially trimmable if preferred.