feat!: drop Zod v3 support (#1460)

This commit is contained in:
Matt 2026-02-03 19:48:08 +00:00 • committed by GitHub
commit be5670f4fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 669 additions and 947 deletions

View file

@ -368,7 +368,6 @@ class InteractiveOAuthClient {
name: toolName,
arguments: toolArgs
},
CallToolResultSchema,
{
task: {
taskId: `task-${Date.now()}`,

View file

@ -882,7 +882,6 @@ async function callToolTask(name: string, args: Record<string, unknown>): Promis
name,
arguments: args
},
CallToolResultSchema,
{
task: {
ttl: 60_000 // Keep results for 60 seconds

View file

@ -10,13 +10,7 @@
import { createInterface } from 'node:readline';
import type { CreateMessageRequest, CreateMessageResult, TextContent } from '@modelcontextprotocol/client';
import {
CallToolResultSchema,
Client,
ProtocolError,
ProtocolErrorCode,
StreamableHTTPClientTransport
} from '@modelcontextprotocol/client';
import { Client, ProtocolError, ProtocolErrorCode, StreamableHTTPClientTransport } from '@modelcontextprotocol/client';
// Create readline interface for user input
const readline = createInterface({
@ -127,7 +121,6 @@ async function run(url: string): Promise<void> {
const confirmStream = client.experimental.tasks.callToolStream(
{ name: 'confirm_delete', arguments: { filename: 'important.txt' } },
CallToolResultSchema,
{ task: { ttl: 60_000 } }
);
@ -158,10 +151,7 @@ async function run(url: string): Promise<void> {
const haikuStream = client.experimental.tasks.callToolStream(
{ name: 'write_haiku', arguments: { topic: 'autumn leaves' } },
CallToolResultSchema,
{
task: { ttl: 60_000 }
}
{ task: { ttl: 60_000 } }
);
for await (const message of haikuStream) {