ai 5.0.0-beta.1 → 5.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,8 +6,9 @@ import * as z3 from 'zod/v3';
6
6
  import * as z4 from 'zod/v4/core';
7
7
  import { ServerResponse } from 'node:http';
8
8
  import { AttributeValue, Tracer } from '@opentelemetry/api';
9
+ import * as z4$1 from 'zod/v4';
10
+ import { z } from 'zod/v4';
9
11
  import { ServerResponse as ServerResponse$1 } from 'http';
10
- import { z } from 'zod';
11
12
 
12
13
  declare const symbol$e: unique symbol;
13
14
  declare class InvalidArgumentError extends AISDKError {
@@ -401,7 +402,7 @@ declare const systemModelMessageSchema: z.ZodType<SystemModelMessage>;
401
402
  /**
402
403
  @deprecated Use `systemModelMessageSchema` instead.
403
404
  */
404
- declare const coreSystemMessageSchema: z.ZodType<SystemModelMessage, z.ZodTypeDef, SystemModelMessage>;
405
+ declare const coreSystemMessageSchema: z.ZodType<SystemModelMessage, unknown>;
405
406
  /**
406
407
  @deprecated Use `UserModelMessage` instead.
407
408
  */
@@ -410,7 +411,7 @@ declare const userModelMessageSchema: z.ZodType<UserModelMessage>;
410
411
  /**
411
412
  @deprecated Use `userModelMessageSchema` instead.
412
413
  */
413
- declare const coreUserMessageSchema: z.ZodType<UserModelMessage, z.ZodTypeDef, UserModelMessage>;
414
+ declare const coreUserMessageSchema: z.ZodType<UserModelMessage, unknown>;
414
415
  /**
415
416
  @deprecated Use `AssistantModelMessage` instead.
416
417
  */
@@ -419,7 +420,7 @@ declare const assistantModelMessageSchema: z.ZodType<AssistantModelMessage>;
419
420
  /**
420
421
  @deprecated Use `assistantModelMessageSchema` instead.
421
422
  */
422
- declare const coreAssistantMessageSchema: z.ZodType<AssistantModelMessage, z.ZodTypeDef, AssistantModelMessage>;
423
+ declare const coreAssistantMessageSchema: z.ZodType<AssistantModelMessage, unknown>;
423
424
  /**
424
425
  @deprecated Use `ToolModelMessage` instead.
425
426
  */
@@ -428,7 +429,7 @@ declare const toolModelMessageSchema: z.ZodType<ToolModelMessage>;
428
429
  /**
429
430
  @deprecated Use `toolModelMessageSchema` instead.
430
431
  */
431
- declare const coreToolMessageSchema: z.ZodType<ToolModelMessage, z.ZodTypeDef, ToolModelMessage>;
432
+ declare const coreToolMessageSchema: z.ZodType<ToolModelMessage, unknown>;
432
433
  /**
433
434
  @deprecated Use `ModelMessage` instead.
434
435
  */
@@ -1109,6 +1110,8 @@ type UIMessageStreamPart<METADATA = unknown, DATA_TYPES extends UIDataTypes = UI
1109
1110
  };
1110
1111
  type InferUIMessageStreamPart<T extends UIMessage> = UIMessageStreamPart<InferUIMessageMetadata<T>, InferUIMessageData<T>>;
1111
1112
 
1113
+ type ErrorHandler = (error: unknown) => void;
1114
+
1112
1115
  interface UIMessageStreamWriter<UI_MESSAGE extends UIMessage = UIMessage> {
1113
1116
  /**
1114
1117
  * Appends a data stream part to the stream.
@@ -1123,7 +1126,7 @@ interface UIMessageStreamWriter<UI_MESSAGE extends UIMessage = UIMessage> {
1123
1126
  * This is intended for forwarding when merging streams
1124
1127
  * to prevent duplicated error masking.
1125
1128
  */
1126
- onError: ((error: unknown) => string) | undefined;
1129
+ onError: ErrorHandler | undefined;
1127
1130
  }
1128
1131
 
1129
1132
  declare function createUIMessageStream<UI_MESSAGE extends UIMessage>({ execute, onError, originalMessages, onFinish, generateId, }: {
@@ -1374,7 +1377,12 @@ type PrepareSendMessagesRequest<UI_MESSAGE extends UIMessage> = (options: {
1374
1377
  headers?: HeadersInit;
1375
1378
  credentials?: RequestCredentials;
1376
1379
  api?: string;
1377
- };
1380
+ } | PromiseLike<{
1381
+ body: object;
1382
+ headers?: HeadersInit;
1383
+ credentials?: RequestCredentials;
1384
+ api?: string;
1385
+ }>;
1378
1386
  type PrepareReconnectToStreamRequest = (options: {
1379
1387
  id: string;
1380
1388
  requestMetadata: unknown;
@@ -1386,7 +1394,11 @@ type PrepareReconnectToStreamRequest = (options: {
1386
1394
  headers?: HeadersInit;
1387
1395
  credentials?: RequestCredentials;
1388
1396
  api?: string;
1389
- };
1397
+ } | PromiseLike<{
1398
+ headers?: HeadersInit;
1399
+ credentials?: RequestCredentials;
1400
+ api?: string;
1401
+ }>;
1390
1402
  type HttpChatTransportInitOptions<UI_MESSAGE extends UIMessage> = {
1391
1403
  api?: string;
1392
1404
  /**
@@ -1970,7 +1982,7 @@ interface Output<OUTPUT, PARTIAL> {
1970
1982
  }
1971
1983
  declare const text: () => Output<string, string>;
1972
1984
  declare const object: <OUTPUT>({ schema: inputSchema, }: {
1973
- schema: z4.$ZodType<OUTPUT, any> | z3.Schema<OUTPUT, z3.ZodTypeDef, any> | Schema<OUTPUT>;
1985
+ schema: z4$1.ZodType<OUTPUT, any> | z3.Schema<OUTPUT, z3.ZodTypeDef, any> | Schema<OUTPUT>;
1974
1986
  }) => Output<OUTPUT, DeepPartial<OUTPUT>>;
1975
1987
 
1976
1988
  type output_Output<OUTPUT, PARTIAL> = Output<OUTPUT, PARTIAL>;
@@ -2202,7 +2214,7 @@ type UIMessageStreamOptions<UI_MESSAGE extends UIMessage> = {
2202
2214
  onError?: (error: unknown) => string;
2203
2215
  };
2204
2216
  type ConsumeStreamOptions = {
2205
- onError?: (error: unknown) => void;
2217
+ onError?: ErrorHandler;
2206
2218
  };
2207
2219
  /**
2208
2220
  A result object for accessing different stream types and additional information.
@@ -2919,7 +2931,7 @@ functionality that can be fully encapsulated in the provider.
2919
2931
  @returns
2920
2932
  A result object that contains the generated object, the finish reason, the token usage, and additional information.
2921
2933
  */
2922
- declare function generateObject<SCHEMA extends z3.Schema | z4.$ZodType | Schema = z4.$ZodType<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
2934
+ declare function generateObject<SCHEMA extends z3.Schema | z4$1.ZodType | Schema = z4$1.ZodType<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
2923
2935
  /**
2924
2936
  The enum values that the model should use.
2925
2937
  */
@@ -3176,7 +3188,7 @@ functionality that can be fully encapsulated in the provider.
3176
3188
  @returns
3177
3189
  A result object for accessing the partial object stream and additional information.
3178
3190
  */
3179
- declare function streamObject<SCHEMA extends z3.Schema | z4.$ZodType | Schema = z4.$ZodType<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
3191
+ declare function streamObject<SCHEMA extends z3.Schema | z4$1.ZodType | Schema = z4$1.ZodType<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
3180
3192
  /**
3181
3193
  The enum values that the model should use.
3182
3194
  */
@@ -3494,227 +3506,67 @@ declare const experimental_createProviderRegistry: typeof createProviderRegistry
3494
3506
 
3495
3507
  declare const JSONRPCRequestSchema: z.ZodObject<{
3496
3508
  jsonrpc: z.ZodLiteral<"2.0">;
3497
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
3498
- } & {
3509
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
3499
3510
  method: z.ZodString;
3500
3511
  params: z.ZodOptional<z.ZodObject<{
3501
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3502
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3503
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3504
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3505
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3506
- }, z.ZodTypeAny, "passthrough">>>;
3507
- }, "strict", z.ZodTypeAny, {
3508
- id: string | number;
3509
- method: string;
3510
- jsonrpc: "2.0";
3511
- params?: z.objectOutputType<{
3512
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3513
- }, z.ZodTypeAny, "passthrough"> | undefined;
3514
- }, {
3515
- id: string | number;
3516
- method: string;
3517
- jsonrpc: "2.0";
3518
- params?: z.objectInputType<{
3519
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3520
- }, z.ZodTypeAny, "passthrough"> | undefined;
3521
- }>;
3512
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
3513
+ }, z.core.$loose>>;
3514
+ }, z.core.$strict>;
3522
3515
  type JSONRPCRequest = z.infer<typeof JSONRPCRequestSchema>;
3523
3516
  declare const JSONRPCResponseSchema: z.ZodObject<{
3524
3517
  jsonrpc: z.ZodLiteral<"2.0">;
3525
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
3518
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
3526
3519
  result: z.ZodObject<{
3527
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3528
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3529
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3530
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3531
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3532
- }, z.ZodTypeAny, "passthrough">>;
3533
- }, "strict", z.ZodTypeAny, {
3534
- id: string | number;
3535
- result: {
3536
- _meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
3537
- } & {
3538
- [k: string]: unknown;
3539
- };
3540
- jsonrpc: "2.0";
3541
- }, {
3542
- id: string | number;
3543
- result: {
3544
- _meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
3545
- } & {
3546
- [k: string]: unknown;
3547
- };
3548
- jsonrpc: "2.0";
3549
- }>;
3520
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
3521
+ }, z.core.$loose>;
3522
+ }, z.core.$strict>;
3550
3523
  type JSONRPCResponse = z.infer<typeof JSONRPCResponseSchema>;
3551
3524
  declare const JSONRPCErrorSchema: z.ZodObject<{
3552
3525
  jsonrpc: z.ZodLiteral<"2.0">;
3553
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
3526
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
3554
3527
  error: z.ZodObject<{
3555
3528
  code: z.ZodNumber;
3556
3529
  message: z.ZodString;
3557
3530
  data: z.ZodOptional<z.ZodUnknown>;
3558
- }, "strip", z.ZodTypeAny, {
3559
- message: string;
3560
- code: number;
3561
- data?: unknown;
3562
- }, {
3563
- message: string;
3564
- code: number;
3565
- data?: unknown;
3566
- }>;
3567
- }, "strict", z.ZodTypeAny, {
3568
- error: {
3569
- message: string;
3570
- code: number;
3571
- data?: unknown;
3572
- };
3573
- id: string | number;
3574
- jsonrpc: "2.0";
3575
- }, {
3576
- error: {
3577
- message: string;
3578
- code: number;
3579
- data?: unknown;
3580
- };
3581
- id: string | number;
3582
- jsonrpc: "2.0";
3583
- }>;
3531
+ }, z.core.$strip>;
3532
+ }, z.core.$strict>;
3584
3533
  type JSONRPCError = z.infer<typeof JSONRPCErrorSchema>;
3585
3534
  declare const JSONRPCNotificationSchema: z.ZodObject<{
3586
3535
  jsonrpc: z.ZodLiteral<"2.0">;
3587
- } & {
3588
3536
  method: z.ZodString;
3589
3537
  params: z.ZodOptional<z.ZodObject<{
3590
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3591
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3592
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3593
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3594
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3595
- }, z.ZodTypeAny, "passthrough">>>;
3596
- }, "strict", z.ZodTypeAny, {
3597
- method: string;
3598
- jsonrpc: "2.0";
3599
- params?: z.objectOutputType<{
3600
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3601
- }, z.ZodTypeAny, "passthrough"> | undefined;
3602
- }, {
3603
- method: string;
3604
- jsonrpc: "2.0";
3605
- params?: z.objectInputType<{
3606
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3607
- }, z.ZodTypeAny, "passthrough"> | undefined;
3608
- }>;
3538
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
3539
+ }, z.core.$loose>>;
3540
+ }, z.core.$strict>;
3609
3541
  type JSONRPCNotification = z.infer<typeof JSONRPCNotificationSchema>;
3610
- declare const JSONRPCMessageSchema: z.ZodUnion<[z.ZodObject<{
3542
+ declare const JSONRPCMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
3611
3543
  jsonrpc: z.ZodLiteral<"2.0">;
3612
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
3613
- } & {
3544
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
3614
3545
  method: z.ZodString;
3615
3546
  params: z.ZodOptional<z.ZodObject<{
3616
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3617
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3618
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3619
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3620
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3621
- }, z.ZodTypeAny, "passthrough">>>;
3622
- }, "strict", z.ZodTypeAny, {
3623
- id: string | number;
3624
- method: string;
3625
- jsonrpc: "2.0";
3626
- params?: z.objectOutputType<{
3627
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3628
- }, z.ZodTypeAny, "passthrough"> | undefined;
3629
- }, {
3630
- id: string | number;
3631
- method: string;
3632
- jsonrpc: "2.0";
3633
- params?: z.objectInputType<{
3634
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3635
- }, z.ZodTypeAny, "passthrough"> | undefined;
3636
- }>, z.ZodObject<{
3547
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
3548
+ }, z.core.$loose>>;
3549
+ }, z.core.$strict>, z.ZodObject<{
3637
3550
  jsonrpc: z.ZodLiteral<"2.0">;
3638
- } & {
3639
3551
  method: z.ZodString;
3640
3552
  params: z.ZodOptional<z.ZodObject<{
3641
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3642
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3643
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3644
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3645
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3646
- }, z.ZodTypeAny, "passthrough">>>;
3647
- }, "strict", z.ZodTypeAny, {
3648
- method: string;
3649
- jsonrpc: "2.0";
3650
- params?: z.objectOutputType<{
3651
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3652
- }, z.ZodTypeAny, "passthrough"> | undefined;
3653
- }, {
3654
- method: string;
3655
- jsonrpc: "2.0";
3656
- params?: z.objectInputType<{
3657
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3658
- }, z.ZodTypeAny, "passthrough"> | undefined;
3659
- }>, z.ZodObject<{
3553
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
3554
+ }, z.core.$loose>>;
3555
+ }, z.core.$strict>, z.ZodObject<{
3660
3556
  jsonrpc: z.ZodLiteral<"2.0">;
3661
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
3557
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
3662
3558
  result: z.ZodObject<{
3663
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3664
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3665
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3666
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3667
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3668
- }, z.ZodTypeAny, "passthrough">>;
3669
- }, "strict", z.ZodTypeAny, {
3670
- id: string | number;
3671
- result: {
3672
- _meta?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
3673
- } & {
3674
- [k: string]: unknown;
3675
- };
3676
- jsonrpc: "2.0";
3677
- }, {
3678
- id: string | number;
3679
- result: {
3680
- _meta?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
3681
- } & {
3682
- [k: string]: unknown;
3683
- };
3684
- jsonrpc: "2.0";
3685
- }>, z.ZodObject<{
3559
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
3560
+ }, z.core.$loose>;
3561
+ }, z.core.$strict>, z.ZodObject<{
3686
3562
  jsonrpc: z.ZodLiteral<"2.0">;
3687
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
3563
+ id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
3688
3564
  error: z.ZodObject<{
3689
3565
  code: z.ZodNumber;
3690
3566
  message: z.ZodString;
3691
3567
  data: z.ZodOptional<z.ZodUnknown>;
3692
- }, "strip", z.ZodTypeAny, {
3693
- message: string;
3694
- code: number;
3695
- data?: unknown;
3696
- }, {
3697
- message: string;
3698
- code: number;
3699
- data?: unknown;
3700
- }>;
3701
- }, "strict", z.ZodTypeAny, {
3702
- error: {
3703
- message: string;
3704
- code: number;
3705
- data?: unknown;
3706
- };
3707
- id: string | number;
3708
- jsonrpc: "2.0";
3709
- }, {
3710
- error: {
3711
- message: string;
3712
- code: number;
3713
- data?: unknown;
3714
- };
3715
- id: string | number;
3716
- jsonrpc: "2.0";
3717
- }>]>;
3568
+ }, z.core.$strip>;
3569
+ }, z.core.$strict>]>;
3718
3570
  type JSONRPCMessage = z.infer<typeof JSONRPCMessageSchema>;
3719
3571
 
3720
3572
  /**
@@ -3772,717 +3624,31 @@ type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS e
3772
3624
  inputSchema: FlexibleSchema<unknown>;
3773
3625
  }>>;
3774
3626
  declare const CallToolResultSchema: z.ZodUnion<[z.ZodObject<{
3775
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
3776
- } & {
3777
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
3778
- type: z.ZodLiteral<"text">;
3779
- text: z.ZodString;
3780
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3781
- type: z.ZodLiteral<"text">;
3782
- text: z.ZodString;
3783
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3784
- type: z.ZodLiteral<"text">;
3785
- text: z.ZodString;
3786
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3787
- type: z.ZodLiteral<"image">;
3788
- data: z.ZodString;
3789
- mimeType: z.ZodString;
3790
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3791
- type: z.ZodLiteral<"image">;
3792
- data: z.ZodString;
3793
- mimeType: z.ZodString;
3794
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3795
- type: z.ZodLiteral<"image">;
3796
- data: z.ZodString;
3797
- mimeType: z.ZodString;
3798
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3799
- type: z.ZodLiteral<"resource">;
3800
- resource: z.ZodUnion<[z.ZodObject<{
3801
- /**
3802
- * The URI of this resource.
3803
- */
3804
- uri: z.ZodString;
3805
- /**
3806
- * The MIME type of this resource, if known.
3807
- */
3808
- mimeType: z.ZodOptional<z.ZodString>;
3809
- } & {
3810
- text: z.ZodString;
3811
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3812
- /**
3813
- * The URI of this resource.
3814
- */
3815
- uri: z.ZodString;
3816
- /**
3817
- * The MIME type of this resource, if known.
3818
- */
3819
- mimeType: z.ZodOptional<z.ZodString>;
3820
- } & {
3821
- text: z.ZodString;
3822
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3823
- /**
3824
- * The URI of this resource.
3825
- */
3826
- uri: z.ZodString;
3827
- /**
3828
- * The MIME type of this resource, if known.
3829
- */
3830
- mimeType: z.ZodOptional<z.ZodString>;
3831
- } & {
3832
- text: z.ZodString;
3833
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3834
- /**
3835
- * The URI of this resource.
3836
- */
3837
- uri: z.ZodString;
3838
- /**
3839
- * The MIME type of this resource, if known.
3840
- */
3841
- mimeType: z.ZodOptional<z.ZodString>;
3842
- } & {
3843
- blob: z.ZodString;
3844
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3845
- /**
3846
- * The URI of this resource.
3847
- */
3848
- uri: z.ZodString;
3849
- /**
3850
- * The MIME type of this resource, if known.
3851
- */
3852
- mimeType: z.ZodOptional<z.ZodString>;
3853
- } & {
3854
- blob: z.ZodString;
3855
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3856
- /**
3857
- * The URI of this resource.
3858
- */
3859
- uri: z.ZodString;
3860
- /**
3861
- * The MIME type of this resource, if known.
3862
- */
3863
- mimeType: z.ZodOptional<z.ZodString>;
3864
- } & {
3865
- blob: z.ZodString;
3866
- }, z.ZodTypeAny, "passthrough">>]>;
3867
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3868
- type: z.ZodLiteral<"resource">;
3869
- resource: z.ZodUnion<[z.ZodObject<{
3870
- /**
3871
- * The URI of this resource.
3872
- */
3873
- uri: z.ZodString;
3874
- /**
3875
- * The MIME type of this resource, if known.
3876
- */
3877
- mimeType: z.ZodOptional<z.ZodString>;
3878
- } & {
3879
- text: z.ZodString;
3880
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3881
- /**
3882
- * The URI of this resource.
3883
- */
3884
- uri: z.ZodString;
3885
- /**
3886
- * The MIME type of this resource, if known.
3887
- */
3888
- mimeType: z.ZodOptional<z.ZodString>;
3889
- } & {
3890
- text: z.ZodString;
3891
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3892
- /**
3893
- * The URI of this resource.
3894
- */
3895
- uri: z.ZodString;
3896
- /**
3897
- * The MIME type of this resource, if known.
3898
- */
3899
- mimeType: z.ZodOptional<z.ZodString>;
3900
- } & {
3901
- text: z.ZodString;
3902
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3903
- /**
3904
- * The URI of this resource.
3905
- */
3906
- uri: z.ZodString;
3907
- /**
3908
- * The MIME type of this resource, if known.
3909
- */
3910
- mimeType: z.ZodOptional<z.ZodString>;
3911
- } & {
3912
- blob: z.ZodString;
3913
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3914
- /**
3915
- * The URI of this resource.
3916
- */
3917
- uri: z.ZodString;
3918
- /**
3919
- * The MIME type of this resource, if known.
3920
- */
3921
- mimeType: z.ZodOptional<z.ZodString>;
3922
- } & {
3923
- blob: z.ZodString;
3924
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3925
- /**
3926
- * The URI of this resource.
3927
- */
3928
- uri: z.ZodString;
3929
- /**
3930
- * The MIME type of this resource, if known.
3931
- */
3932
- mimeType: z.ZodOptional<z.ZodString>;
3933
- } & {
3934
- blob: z.ZodString;
3935
- }, z.ZodTypeAny, "passthrough">>]>;
3936
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3937
- type: z.ZodLiteral<"resource">;
3938
- resource: z.ZodUnion<[z.ZodObject<{
3939
- /**
3940
- * The URI of this resource.
3941
- */
3942
- uri: z.ZodString;
3943
- /**
3944
- * The MIME type of this resource, if known.
3945
- */
3946
- mimeType: z.ZodOptional<z.ZodString>;
3947
- } & {
3948
- text: z.ZodString;
3949
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3950
- /**
3951
- * The URI of this resource.
3952
- */
3953
- uri: z.ZodString;
3954
- /**
3955
- * The MIME type of this resource, if known.
3956
- */
3957
- mimeType: z.ZodOptional<z.ZodString>;
3958
- } & {
3959
- text: z.ZodString;
3960
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3961
- /**
3962
- * The URI of this resource.
3963
- */
3964
- uri: z.ZodString;
3965
- /**
3966
- * The MIME type of this resource, if known.
3967
- */
3968
- mimeType: z.ZodOptional<z.ZodString>;
3969
- } & {
3970
- text: z.ZodString;
3971
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
3972
- /**
3973
- * The URI of this resource.
3974
- */
3975
- uri: z.ZodString;
3976
- /**
3977
- * The MIME type of this resource, if known.
3978
- */
3979
- mimeType: z.ZodOptional<z.ZodString>;
3980
- } & {
3981
- blob: z.ZodString;
3982
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
3983
- /**
3984
- * The URI of this resource.
3985
- */
3986
- uri: z.ZodString;
3987
- /**
3988
- * The MIME type of this resource, if known.
3989
- */
3990
- mimeType: z.ZodOptional<z.ZodString>;
3991
- } & {
3992
- blob: z.ZodString;
3993
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3994
- /**
3995
- * The URI of this resource.
3996
- */
3997
- uri: z.ZodString;
3998
- /**
3999
- * The MIME type of this resource, if known.
4000
- */
4001
- mimeType: z.ZodOptional<z.ZodString>;
4002
- } & {
4003
- blob: z.ZodString;
4004
- }, z.ZodTypeAny, "passthrough">>]>;
4005
- }, z.ZodTypeAny, "passthrough">>]>, "many">;
4006
- isError: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4007
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4008
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
4009
- } & {
4010
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
4011
- type: z.ZodLiteral<"text">;
4012
- text: z.ZodString;
4013
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4014
- type: z.ZodLiteral<"text">;
4015
- text: z.ZodString;
4016
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4017
- type: z.ZodLiteral<"text">;
4018
- text: z.ZodString;
4019
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4020
- type: z.ZodLiteral<"image">;
4021
- data: z.ZodString;
4022
- mimeType: z.ZodString;
4023
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4024
- type: z.ZodLiteral<"image">;
4025
- data: z.ZodString;
4026
- mimeType: z.ZodString;
4027
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4028
- type: z.ZodLiteral<"image">;
4029
- data: z.ZodString;
4030
- mimeType: z.ZodString;
4031
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4032
- type: z.ZodLiteral<"resource">;
4033
- resource: z.ZodUnion<[z.ZodObject<{
4034
- /**
4035
- * The URI of this resource.
4036
- */
4037
- uri: z.ZodString;
4038
- /**
4039
- * The MIME type of this resource, if known.
4040
- */
4041
- mimeType: z.ZodOptional<z.ZodString>;
4042
- } & {
4043
- text: z.ZodString;
4044
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4045
- /**
4046
- * The URI of this resource.
4047
- */
4048
- uri: z.ZodString;
4049
- /**
4050
- * The MIME type of this resource, if known.
4051
- */
4052
- mimeType: z.ZodOptional<z.ZodString>;
4053
- } & {
4054
- text: z.ZodString;
4055
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4056
- /**
4057
- * The URI of this resource.
4058
- */
4059
- uri: z.ZodString;
4060
- /**
4061
- * The MIME type of this resource, if known.
4062
- */
4063
- mimeType: z.ZodOptional<z.ZodString>;
4064
- } & {
4065
- text: z.ZodString;
4066
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4067
- /**
4068
- * The URI of this resource.
4069
- */
4070
- uri: z.ZodString;
4071
- /**
4072
- * The MIME type of this resource, if known.
4073
- */
4074
- mimeType: z.ZodOptional<z.ZodString>;
4075
- } & {
4076
- blob: z.ZodString;
4077
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4078
- /**
4079
- * The URI of this resource.
4080
- */
4081
- uri: z.ZodString;
4082
- /**
4083
- * The MIME type of this resource, if known.
4084
- */
4085
- mimeType: z.ZodOptional<z.ZodString>;
4086
- } & {
4087
- blob: z.ZodString;
4088
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4089
- /**
4090
- * The URI of this resource.
4091
- */
4092
- uri: z.ZodString;
4093
- /**
4094
- * The MIME type of this resource, if known.
4095
- */
4096
- mimeType: z.ZodOptional<z.ZodString>;
4097
- } & {
4098
- blob: z.ZodString;
4099
- }, z.ZodTypeAny, "passthrough">>]>;
4100
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4101
- type: z.ZodLiteral<"resource">;
4102
- resource: z.ZodUnion<[z.ZodObject<{
4103
- /**
4104
- * The URI of this resource.
4105
- */
4106
- uri: z.ZodString;
4107
- /**
4108
- * The MIME type of this resource, if known.
4109
- */
4110
- mimeType: z.ZodOptional<z.ZodString>;
4111
- } & {
4112
- text: z.ZodString;
4113
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4114
- /**
4115
- * The URI of this resource.
4116
- */
4117
- uri: z.ZodString;
4118
- /**
4119
- * The MIME type of this resource, if known.
4120
- */
4121
- mimeType: z.ZodOptional<z.ZodString>;
4122
- } & {
4123
- text: z.ZodString;
4124
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4125
- /**
4126
- * The URI of this resource.
4127
- */
4128
- uri: z.ZodString;
4129
- /**
4130
- * The MIME type of this resource, if known.
4131
- */
4132
- mimeType: z.ZodOptional<z.ZodString>;
4133
- } & {
4134
- text: z.ZodString;
4135
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4136
- /**
4137
- * The URI of this resource.
4138
- */
4139
- uri: z.ZodString;
4140
- /**
4141
- * The MIME type of this resource, if known.
4142
- */
4143
- mimeType: z.ZodOptional<z.ZodString>;
4144
- } & {
4145
- blob: z.ZodString;
4146
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4147
- /**
4148
- * The URI of this resource.
4149
- */
4150
- uri: z.ZodString;
4151
- /**
4152
- * The MIME type of this resource, if known.
4153
- */
4154
- mimeType: z.ZodOptional<z.ZodString>;
4155
- } & {
4156
- blob: z.ZodString;
4157
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4158
- /**
4159
- * The URI of this resource.
4160
- */
4161
- uri: z.ZodString;
4162
- /**
4163
- * The MIME type of this resource, if known.
4164
- */
4165
- mimeType: z.ZodOptional<z.ZodString>;
4166
- } & {
4167
- blob: z.ZodString;
4168
- }, z.ZodTypeAny, "passthrough">>]>;
4169
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4170
- type: z.ZodLiteral<"resource">;
4171
- resource: z.ZodUnion<[z.ZodObject<{
4172
- /**
4173
- * The URI of this resource.
4174
- */
4175
- uri: z.ZodString;
4176
- /**
4177
- * The MIME type of this resource, if known.
4178
- */
4179
- mimeType: z.ZodOptional<z.ZodString>;
4180
- } & {
4181
- text: z.ZodString;
4182
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4183
- /**
4184
- * The URI of this resource.
4185
- */
4186
- uri: z.ZodString;
4187
- /**
4188
- * The MIME type of this resource, if known.
4189
- */
4190
- mimeType: z.ZodOptional<z.ZodString>;
4191
- } & {
4192
- text: z.ZodString;
4193
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4194
- /**
4195
- * The URI of this resource.
4196
- */
4197
- uri: z.ZodString;
4198
- /**
4199
- * The MIME type of this resource, if known.
4200
- */
4201
- mimeType: z.ZodOptional<z.ZodString>;
4202
- } & {
4203
- text: z.ZodString;
4204
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4205
- /**
4206
- * The URI of this resource.
4207
- */
4208
- uri: z.ZodString;
4209
- /**
4210
- * The MIME type of this resource, if known.
4211
- */
4212
- mimeType: z.ZodOptional<z.ZodString>;
4213
- } & {
4214
- blob: z.ZodString;
4215
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4216
- /**
4217
- * The URI of this resource.
4218
- */
4219
- uri: z.ZodString;
4220
- /**
4221
- * The MIME type of this resource, if known.
4222
- */
4223
- mimeType: z.ZodOptional<z.ZodString>;
4224
- } & {
4225
- blob: z.ZodString;
4226
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4227
- /**
4228
- * The URI of this resource.
4229
- */
4230
- uri: z.ZodString;
4231
- /**
4232
- * The MIME type of this resource, if known.
4233
- */
4234
- mimeType: z.ZodOptional<z.ZodString>;
4235
- } & {
4236
- blob: z.ZodString;
4237
- }, z.ZodTypeAny, "passthrough">>]>;
4238
- }, z.ZodTypeAny, "passthrough">>]>, "many">;
4239
- isError: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4240
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4241
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
4242
- } & {
4243
- content: z.ZodArray<z.ZodUnion<[z.ZodObject<{
4244
- type: z.ZodLiteral<"text">;
4245
- text: z.ZodString;
4246
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4247
- type: z.ZodLiteral<"text">;
4248
- text: z.ZodString;
4249
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3627
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
3628
+ content: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
4250
3629
  type: z.ZodLiteral<"text">;
4251
3630
  text: z.ZodString;
4252
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4253
- type: z.ZodLiteral<"image">;
4254
- data: z.ZodString;
4255
- mimeType: z.ZodString;
4256
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4257
- type: z.ZodLiteral<"image">;
4258
- data: z.ZodString;
4259
- mimeType: z.ZodString;
4260
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3631
+ }, z.core.$loose>, z.ZodObject<{
4261
3632
  type: z.ZodLiteral<"image">;
4262
3633
  data: z.ZodString;
4263
3634
  mimeType: z.ZodString;
4264
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4265
- type: z.ZodLiteral<"resource">;
4266
- resource: z.ZodUnion<[z.ZodObject<{
4267
- /**
4268
- * The URI of this resource.
4269
- */
4270
- uri: z.ZodString;
4271
- /**
4272
- * The MIME type of this resource, if known.
4273
- */
4274
- mimeType: z.ZodOptional<z.ZodString>;
4275
- } & {
4276
- text: z.ZodString;
4277
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4278
- /**
4279
- * The URI of this resource.
4280
- */
4281
- uri: z.ZodString;
4282
- /**
4283
- * The MIME type of this resource, if known.
4284
- */
4285
- mimeType: z.ZodOptional<z.ZodString>;
4286
- } & {
4287
- text: z.ZodString;
4288
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4289
- /**
4290
- * The URI of this resource.
4291
- */
4292
- uri: z.ZodString;
4293
- /**
4294
- * The MIME type of this resource, if known.
4295
- */
4296
- mimeType: z.ZodOptional<z.ZodString>;
4297
- } & {
4298
- text: z.ZodString;
4299
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4300
- /**
4301
- * The URI of this resource.
4302
- */
4303
- uri: z.ZodString;
4304
- /**
4305
- * The MIME type of this resource, if known.
4306
- */
4307
- mimeType: z.ZodOptional<z.ZodString>;
4308
- } & {
4309
- blob: z.ZodString;
4310
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4311
- /**
4312
- * The URI of this resource.
4313
- */
4314
- uri: z.ZodString;
4315
- /**
4316
- * The MIME type of this resource, if known.
4317
- */
4318
- mimeType: z.ZodOptional<z.ZodString>;
4319
- } & {
4320
- blob: z.ZodString;
4321
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4322
- /**
4323
- * The URI of this resource.
4324
- */
4325
- uri: z.ZodString;
4326
- /**
4327
- * The MIME type of this resource, if known.
4328
- */
4329
- mimeType: z.ZodOptional<z.ZodString>;
4330
- } & {
4331
- blob: z.ZodString;
4332
- }, z.ZodTypeAny, "passthrough">>]>;
4333
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4334
- type: z.ZodLiteral<"resource">;
4335
- resource: z.ZodUnion<[z.ZodObject<{
4336
- /**
4337
- * The URI of this resource.
4338
- */
4339
- uri: z.ZodString;
4340
- /**
4341
- * The MIME type of this resource, if known.
4342
- */
4343
- mimeType: z.ZodOptional<z.ZodString>;
4344
- } & {
4345
- text: z.ZodString;
4346
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4347
- /**
4348
- * The URI of this resource.
4349
- */
4350
- uri: z.ZodString;
4351
- /**
4352
- * The MIME type of this resource, if known.
4353
- */
4354
- mimeType: z.ZodOptional<z.ZodString>;
4355
- } & {
4356
- text: z.ZodString;
4357
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4358
- /**
4359
- * The URI of this resource.
4360
- */
4361
- uri: z.ZodString;
4362
- /**
4363
- * The MIME type of this resource, if known.
4364
- */
4365
- mimeType: z.ZodOptional<z.ZodString>;
4366
- } & {
4367
- text: z.ZodString;
4368
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4369
- /**
4370
- * The URI of this resource.
4371
- */
4372
- uri: z.ZodString;
4373
- /**
4374
- * The MIME type of this resource, if known.
4375
- */
4376
- mimeType: z.ZodOptional<z.ZodString>;
4377
- } & {
4378
- blob: z.ZodString;
4379
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4380
- /**
4381
- * The URI of this resource.
4382
- */
4383
- uri: z.ZodString;
4384
- /**
4385
- * The MIME type of this resource, if known.
4386
- */
4387
- mimeType: z.ZodOptional<z.ZodString>;
4388
- } & {
4389
- blob: z.ZodString;
4390
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4391
- /**
4392
- * The URI of this resource.
4393
- */
4394
- uri: z.ZodString;
4395
- /**
4396
- * The MIME type of this resource, if known.
4397
- */
4398
- mimeType: z.ZodOptional<z.ZodString>;
4399
- } & {
4400
- blob: z.ZodString;
4401
- }, z.ZodTypeAny, "passthrough">>]>;
4402
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3635
+ }, z.core.$loose>, z.ZodObject<{
4403
3636
  type: z.ZodLiteral<"resource">;
4404
- resource: z.ZodUnion<[z.ZodObject<{
4405
- /**
4406
- * The URI of this resource.
4407
- */
4408
- uri: z.ZodString;
4409
- /**
4410
- * The MIME type of this resource, if known.
4411
- */
4412
- mimeType: z.ZodOptional<z.ZodString>;
4413
- } & {
4414
- text: z.ZodString;
4415
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4416
- /**
4417
- * The URI of this resource.
4418
- */
4419
- uri: z.ZodString;
4420
- /**
4421
- * The MIME type of this resource, if known.
4422
- */
4423
- mimeType: z.ZodOptional<z.ZodString>;
4424
- } & {
4425
- text: z.ZodString;
4426
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4427
- /**
4428
- * The URI of this resource.
4429
- */
3637
+ resource: z.ZodUnion<readonly [z.ZodObject<{
4430
3638
  uri: z.ZodString;
4431
- /**
4432
- * The MIME type of this resource, if known.
4433
- */
4434
3639
  mimeType: z.ZodOptional<z.ZodString>;
4435
- } & {
4436
3640
  text: z.ZodString;
4437
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4438
- /**
4439
- * The URI of this resource.
4440
- */
4441
- uri: z.ZodString;
4442
- /**
4443
- * The MIME type of this resource, if known.
4444
- */
4445
- mimeType: z.ZodOptional<z.ZodString>;
4446
- } & {
4447
- blob: z.ZodString;
4448
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4449
- /**
4450
- * The URI of this resource.
4451
- */
3641
+ }, z.core.$loose>, z.ZodObject<{
4452
3642
  uri: z.ZodString;
4453
- /**
4454
- * The MIME type of this resource, if known.
4455
- */
4456
3643
  mimeType: z.ZodOptional<z.ZodString>;
4457
- } & {
4458
3644
  blob: z.ZodString;
4459
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4460
- /**
4461
- * The URI of this resource.
4462
- */
4463
- uri: z.ZodString;
4464
- /**
4465
- * The MIME type of this resource, if known.
4466
- */
4467
- mimeType: z.ZodOptional<z.ZodString>;
4468
- } & {
4469
- blob: z.ZodString;
4470
- }, z.ZodTypeAny, "passthrough">>]>;
4471
- }, z.ZodTypeAny, "passthrough">>]>, "many">;
3645
+ }, z.core.$loose>]>;
3646
+ }, z.core.$loose>]>>;
4472
3647
  isError: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4473
- }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
4474
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
4475
- } & {
4476
- toolResult: z.ZodUnknown;
4477
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4478
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
4479
- } & {
4480
- toolResult: z.ZodUnknown;
4481
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4482
- _meta: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
4483
- } & {
3648
+ }, z.core.$loose>, z.ZodObject<{
3649
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
4484
3650
  toolResult: z.ZodUnknown;
4485
- }, z.ZodTypeAny, "passthrough">>]>;
3651
+ }, z.core.$loose>]>;
4486
3652
  type CallToolResult = z.infer<typeof CallToolResultSchema>;
4487
3653
 
4488
3654
  interface MCPClientConfig {
@@ -4648,4 +3814,4 @@ declare global {
4648
3814
  var AI_SDK_DEFAULT_PROVIDER: ProviderV2 | undefined;
4649
3815
  }
4650
3816
 
4651
- export { AbstractChat, CallSettings, CallWarning, ChatInit, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferUIDataParts, InferUITool, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningUIPart, RepairTextFunction, RetryError, SerialJobExecutor, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolCallRepairError, ToolCallRepairFunction, ToolCallUnion, ToolChoice, ToolErrorUnion, ToolResultUnion, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessagePart, UIMessageStreamOptions, UIMessageStreamPart, UIMessageStreamWriter, UITool, UITools, UI_MESSAGE_STREAM_HEADERS, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, hasToolCall, isDeepEqualData, isToolUIPart, modelMessageSchema, parsePartialJson, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, userModelMessageSchema, wrapLanguageModel };
3817
+ export { AbstractChat, CallSettings, CallWarning, ChatInit, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferUIDataParts, InferUITool, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningUIPart, RepairTextFunction, RetryError, SerialJobExecutor, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolCallRepairError, ToolCallRepairFunction, ToolCallUnion, ToolChoice, ToolErrorUnion, ToolResultUnion, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessagePart, UIMessageStreamOptions, UIMessageStreamPart, UIMessageStreamWriter, UITool, UITools, UI_MESSAGE_STREAM_HEADERS, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, hasToolCall, isDeepEqualData, isToolUIPart, modelMessageSchema, parsePartialJson, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, userModelMessageSchema, wrapLanguageModel };