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
refactor(core)!: remove experimental tasks interception from Protocol
Removes the 2025-11 task side-channel from Protocol (no compatibility owed; surface was experimental). SEP-2663's server-directed model has no equivalent to processInbound*/processOutbound* interception: a handler returns a CreateTaskResult and the client polls tasks/* methods.
Test handling:
- DELETED (~121, protocol.test.ts): mechanism tests for processInbound*/processOutbound*/relatedTask/NullTaskManager. Mechanism removed; no SEP-2663 equivalent. Per-suite reasons in the comment block at the deletion site.
- SKIPPED (~85, integration): behavior tests (create/poll/result). TODO(F3) markers; rewritten via tasksPlugin in F3.
- KEPT: storage-layer tests (InMemoryTaskStore etc.). Interfaces unchanged.
Tasks comes back as tasksPlugin() in F3.
|`extra.taskStore` / `taskId` / `taskRequestedTtl`|_removed; see §12_|
426
424
427
425
`ServerContext` convenience methods (new in v2, no v1 equivalent):
428
426
@@ -473,24 +471,22 @@ If a `*Schema` constant was used for **runtime validation** (not just as a `requ
473
471
474
472
`isCallToolResult(value)` still works, but `isSpecType` covers every spec type by name.
475
473
476
-
## 12. Experimental: `TaskCreationParams.ttl` no longer accepts `null`
474
+
## 12. Experimental tasks interception removed
477
475
478
-
`TaskCreationParams.ttl` changed from `z.union([z.number(), z.null()]).optional()` to `z.number().optional()`. Per the MCP spec, `null` TTL (unlimited lifetime) is only valid in server responses (`Task.ttl`), not in client requests. Omit `ttl` to let the server decide.
476
+
The 2025-11 task side-channel through `Protocol` is removed (was always `@experimental`; SEP-2663 reattaches via `tasksPlugin()`in a follow-up). No mechanical migration; remove usages.
|`RequestOptions.task` / `.relatedTask`, `NotificationOptions.relatedTask`| drop the option |
483
+
|`BaseContext.task` (`ctx.task?.*`) | gone; future: `ctx.ext.task` via `tasksPlugin()`|
484
+
|`assertTaskCapability` / `assertTaskHandlerCapability` overrides | delete the override |
485
+
|`*.experimental.tasks.{requestStream,callToolStream,createMessageStream,elicitInputStream}`| still defined; throw `CapabilityNotSupported` until `tasksPlugin()`|
### Experimental: `TaskCreationParams.ttl` no longer accepts `null`
854
+
### Experimental tasks interception removed
855
+
856
+
The 2025-11 experimental tasks side-channel woven through `Protocol` has been removed in preparation for the SEP-2663 Tasks Extension. The following are gone with no in-place replacement:
857
+
858
+
-`ProtocolOptions.tasks` (the `{ taskStore, taskMessageQueue }` constructor option)
The `*.experimental.tasks.*` accessor methods (`requestStream`, `callToolStream`, `createMessageStream`, `elicitInputStream`) are still defined but now throw `SdkError(CapabilityNotSupported)` until `tasksPlugin()` lands.
865
+
866
+
**Unchanged:** the storage interfaces in `experimental/tasks/` (`TaskStore`, `InMemoryTaskStore`, `TaskMetadata`, `TaskMessageQueue`). These will be consumed by `tasksPlugin()` in a follow-up.
867
+
868
+
There is no migration path for the removed surface; it was always `@experimental`. Under SEP-2663, tasks reattach via a `DispatchMiddleware` (`mcp.use(tasksPlugin({ store }))`) and handlers read task context from `ctx.ext.task` instead of `ctx.task`.
869
+
870
+
#### `TaskCreationParams.ttl` no longer accepts `null`
857
871
858
872
The `ttl` field in `TaskCreationParams` (used when requesting the server to create a task) no longer accepts `null`. Per the MCP spec, `null` TTL (meaning unlimited lifetime) is only valid in server responses (`Task.ttl`), not in client requests. Clients should omit `ttl` to let
0 commit comments