typescript-sdk/.changeset/codemod-task-handler-methods.md
Konstantin Konstantinov 0fb8406d83
v2: codemod iterations, canonical zod schema exports from sdk-shared (#2354)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
2026-06-25 19:42:44 +01:00

534 B

@modelcontextprotocol/codemod
patch

Map the task request/notification schemas to their v2 method strings in the handler-registration transform. setRequestHandler(GetTaskRequestSchema, …), setNotificationHandler(TaskStatusNotificationSchema, …), and the other task handlers (tasks/get, tasks/result, tasks/list, tasks/cancel, notifications/tasks/status) now rewrite to the v2 two-argument method-string form instead of falling through to the generic "use the 3-argument form" manual-migration diagnostic.