[WIP] Migrate to Tasks extension SDK - #2308
Draft
LucaButBoring wants to merge 3 commits into
Draft
Conversation
9 tasks
There was a problem hiding this comment.
🟡 Changes recommended
Connection lifecycle, degraded-mode tool calls, legacy timeouts, and bounded task-input handling have unresolved regressions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Migrates Inspector task handling to the extracted ext-tasks SDK while retaining generation-neutral task APIs.
Changes:
- Adds and externalizes the new Tasks SDK dependency.
- Replaces custom requester/receiver task orchestration with SDK sessions.
- Updates task types and refactors related test coverage.
File summaries
| File | Description |
|---|---|
package.json |
Adds the local Tasks SDK dependency. |
package-lock.json |
Locks the local package. |
core/mcp/types.ts |
Defines neutral Inspector task types. |
core/mcp/modernTaskSchemas.ts |
Re-exports SDK schemas and identifiers. |
core/mcp/messageTrackingTransport.ts |
Simplifies raw-response consumption. |
core/mcp/inspectorClientProtocol.ts |
Updates task API types and capabilities. |
core/mcp/inspectorClientEventTarget.ts |
Migrates task event payload types. |
core/mcp/inspectorClient.ts |
Integrates requester and receiver task sessions. |
clients/web/tsup.runner.config.ts |
Externalizes the Tasks SDK. |
clients/web/src/test/integration/mcp/inspectorClient.test.ts |
Removes superseded task tests. |
clients/web/src/test/integration/mcp/inspectorClient-tasks-era.test.ts |
Removes the task input-round limit test. |
clients/web/src/test/integration/mcp/inspectorClient-modern-era.test.ts |
Accepts the SDK’s revised error wording. |
clients/web/src/test/integration/mcp/inspectorClient-coverage-backfill.test.ts |
Removes tests for deleted internals. |
clients/web/src/test/core/mcp/modernTaskSchemas.test.ts |
Removes tests for replaced schemas. |
clients/web/src/test/core/mcp/inspectorClient-raw-wire.test.ts |
Adds SDK-boundary and raw-dispatch tests. |
clients/web/src/test/core/mcp/inspectorClient-peer-handler-timing.test.ts |
Updates session lifecycle tests. |
clients/tui/tsup.config.ts |
Externalizes the Tasks SDK. |
clients/cli/tsup.config.ts |
Externalizes the Tasks SDK. |
Review details
- Files reviewed: 16/18 changed files
- Comments generated: 4
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Modern task calls currently regress progress delivery, timeout behavior, and protocol-error preservation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 16/18 changed files
- Comments generated: 3
- Review effort level: Balanced
Comment on lines
+1049
to
+1051
| const taskId = this.taskProgressIds.get(progressToken); | ||
| if (!taskId) return; | ||
| if (this.progress) this.dispatchTypedEvent("progressNotification", params); |
| const timeoutMs = this.requestTimeout ?? 30_000; | ||
| const raw = await new Promise<unknown>((resolve, reject) => { | ||
| const timer = setTimeout(() => { | ||
| const timeoutMs = timeoutOverride ?? this.requestTimeout ?? 30_000; |
Comment on lines
+3918
to
+3923
| } catch (error) { | ||
| const operationError = unwrapTaskDispatchError(error); | ||
| if (!(operationError instanceof ToolCallCancelledError)) { | ||
| this.emitTaskError(lastTask, operationError); | ||
| } | ||
| throw operationError; |
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.
Following discussion on Discord, this uses the extracted Tasks implementation (see modelcontextprotocol/ext-tasks#21) to replace the implementation here.
Publishing as a draft for reference and comments; this is unmergable until the actual extension SDK is merged and published to NPM (after which point I'll swap the new dependency to not be a local path).