feat!: drop Zod v3 support (#1460)
This commit is contained in:
parent
bc883afe3c
commit
be5670f4fa
3 changed files with 669 additions and 947 deletions
|
|
@ -368,7 +368,6 @@ class InteractiveOAuthClient {
|
|||
name: toolName,
|
||||
arguments: toolArgs
|
||||
},
|
||||
CallToolResultSchema,
|
||||
{
|
||||
task: {
|
||||
taskId: `task-${Date.now()}`,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue