@convex-dev/agent 0.3.2 → 0.6.0-alpha.0
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/UIMessages.d.ts +3 -2
- package/dist/UIMessages.d.ts.map +1 -1
- package/dist/UIMessages.js +100 -19
- package/dist/UIMessages.js.map +1 -1
- package/dist/client/createTool.d.ts +129 -25
- package/dist/client/createTool.d.ts.map +1 -1
- package/dist/client/createTool.js +65 -8
- package/dist/client/createTool.js.map +1 -1
- package/dist/client/definePlaygroundAPI.d.ts +560 -35
- package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
- package/dist/client/files.d.ts.map +1 -1
- package/dist/client/files.js +4 -2
- package/dist/client/files.js.map +1 -1
- package/dist/client/index.d.ts +462 -37
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +26 -7
- package/dist/client/index.js.map +1 -1
- package/dist/client/messages.d.ts +114 -9
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/mockModel.d.ts +17 -17
- package/dist/client/mockModel.d.ts.map +1 -1
- package/dist/client/mockModel.js +8 -6
- package/dist/client/mockModel.js.map +1 -1
- package/dist/client/saveInputMessages.d.ts +1 -1
- package/dist/client/saveInputMessages.d.ts.map +1 -1
- package/dist/client/saveInputMessages.js +1 -1
- package/dist/client/saveInputMessages.js.map +1 -1
- package/dist/client/search.d.ts +132 -14
- package/dist/client/search.d.ts.map +1 -1
- package/dist/client/search.js +66 -19
- package/dist/client/search.js.map +1 -1
- package/dist/client/streamText.d.ts +4 -4
- package/dist/client/streamText.d.ts.map +1 -1
- package/dist/client/streamText.js.map +1 -1
- package/dist/client/streaming.d.ts +1491 -87
- package/dist/client/streaming.d.ts.map +1 -1
- package/dist/client/types.d.ts +26 -6
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/component.d.ts +862 -19
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/files.d.ts +12 -6
- package/dist/component/files.d.ts.map +1 -1
- package/dist/component/files.js +10 -2
- package/dist/component/files.js.map +1 -1
- package/dist/component/messages.d.ts +1247 -92
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/schema.d.ts +2823 -217
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +3 -1
- package/dist/component/schema.js.map +1 -1
- package/dist/component/streams.js +1 -1
- package/dist/component/streams.js.map +1 -1
- package/dist/component/threads.d.ts +10 -10
- package/dist/component/vector/index.d.ts +1 -1
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js +40 -5
- package/dist/deltas.js.map +1 -1
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +117 -25
- package/dist/mapping.js.map +1 -1
- package/dist/react/useThreadMessages.d.ts.map +1 -1
- package/dist/react/useThreadMessages.js +17 -9
- package/dist/react/useThreadMessages.js.map +1 -1
- package/dist/shared.d.ts +2 -2
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js.map +1 -1
- package/dist/validators.d.ts +12196 -624
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +152 -9
- package/dist/validators.js.map +1 -1
- package/package.json +24 -22
- package/src/UIMessages.combineUIMessages.test.ts +239 -0
- package/src/UIMessages.ts +184 -66
- package/src/client/createTool.ts +291 -67
- package/src/client/files.ts +4 -2
- package/src/client/index.test.ts +1 -0
- package/src/client/index.ts +46 -25
- package/src/client/mockModel.ts +36 -34
- package/src/client/saveInputMessages.ts +2 -2
- package/src/client/search.test.ts +166 -0
- package/src/client/search.ts +121 -38
- package/src/client/streamText.ts +5 -5
- package/src/client/types.ts +31 -18
- package/src/component/_generated/component.ts +2329 -338
- package/src/component/files.ts +11 -2
- package/src/component/messages.test.ts +7 -7
- package/src/component/schema.ts +3 -1
- package/src/component/setup.test.ts +7 -0
- package/src/component/streams.ts +1 -1
- package/src/deltas.test.ts +90 -0
- package/src/deltas.ts +47 -8
- package/src/fromUIMessages.test.ts +32 -27
- package/src/mapping.test.ts +48 -0
- package/src/mapping.ts +234 -142
- package/src/react/useThreadMessages.ts +21 -9
- package/src/shared.ts +2 -0
- package/src/toUIMessages.test.ts +539 -1
- package/src/validators.ts +179 -20
- package/src/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
|
@@ -56,7 +56,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
56
56
|
{
|
|
57
57
|
filename?: string;
|
|
58
58
|
hash: string;
|
|
59
|
-
|
|
59
|
+
mediaType?: string;
|
|
60
|
+
mimeType?: string;
|
|
60
61
|
storageId: string;
|
|
61
62
|
},
|
|
62
63
|
{ fileId: string; storageId: string },
|
|
@@ -86,7 +87,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
86
87
|
filename?: string;
|
|
87
88
|
hash: string;
|
|
88
89
|
lastTouchedAt: number;
|
|
89
|
-
|
|
90
|
+
mediaType?: string;
|
|
91
|
+
mimeType?: string;
|
|
90
92
|
refcount: number;
|
|
91
93
|
storageId: string;
|
|
92
94
|
},
|
|
@@ -114,7 +116,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
114
116
|
filename?: string;
|
|
115
117
|
hash: string;
|
|
116
118
|
lastTouchedAt: number;
|
|
117
|
-
|
|
119
|
+
mediaType?: string;
|
|
120
|
+
mimeType?: string;
|
|
118
121
|
refcount: number;
|
|
119
122
|
storageId: string;
|
|
120
123
|
}>;
|
|
@@ -182,6 +185,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
182
185
|
}
|
|
183
186
|
| {
|
|
184
187
|
image: string | ArrayBuffer;
|
|
188
|
+
mediaType?: string;
|
|
185
189
|
mimeType?: string;
|
|
186
190
|
providerOptions?: Record<
|
|
187
191
|
string,
|
|
@@ -192,7 +196,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
192
196
|
| {
|
|
193
197
|
data: string | ArrayBuffer;
|
|
194
198
|
filename?: string;
|
|
195
|
-
|
|
199
|
+
mediaType?: string;
|
|
200
|
+
mimeType?: string;
|
|
196
201
|
providerMetadata?: Record<
|
|
197
202
|
string,
|
|
198
203
|
Record<string, any>
|
|
@@ -226,7 +231,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
226
231
|
| {
|
|
227
232
|
data: string | ArrayBuffer;
|
|
228
233
|
filename?: string;
|
|
229
|
-
|
|
234
|
+
mediaType?: string;
|
|
235
|
+
mimeType?: string;
|
|
230
236
|
providerMetadata?: Record<
|
|
231
237
|
string,
|
|
232
238
|
Record<string, any>
|
|
@@ -262,8 +268,25 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
262
268
|
>;
|
|
263
269
|
type: "redacted-reasoning";
|
|
264
270
|
}
|
|
271
|
+
| {
|
|
272
|
+
args?: any;
|
|
273
|
+
input: any;
|
|
274
|
+
providerExecuted?: boolean;
|
|
275
|
+
providerMetadata?: Record<
|
|
276
|
+
string,
|
|
277
|
+
Record<string, any>
|
|
278
|
+
>;
|
|
279
|
+
providerOptions?: Record<
|
|
280
|
+
string,
|
|
281
|
+
Record<string, any>
|
|
282
|
+
>;
|
|
283
|
+
toolCallId: string;
|
|
284
|
+
toolName: string;
|
|
285
|
+
type: "tool-call";
|
|
286
|
+
}
|
|
265
287
|
| {
|
|
266
288
|
args: any;
|
|
289
|
+
input?: any;
|
|
267
290
|
providerExecuted?: boolean;
|
|
268
291
|
providerMetadata?: Record<
|
|
269
292
|
string,
|
|
@@ -289,19 +312,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
289
312
|
>;
|
|
290
313
|
isError?: boolean;
|
|
291
314
|
output?:
|
|
292
|
-
| {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
315
|
+
| {
|
|
316
|
+
providerOptions?: Record<
|
|
317
|
+
string,
|
|
318
|
+
Record<string, any>
|
|
319
|
+
>;
|
|
320
|
+
type: "text";
|
|
321
|
+
value: string;
|
|
322
|
+
}
|
|
323
|
+
| {
|
|
324
|
+
providerOptions?: Record<
|
|
325
|
+
string,
|
|
326
|
+
Record<string, any>
|
|
327
|
+
>;
|
|
328
|
+
type: "json";
|
|
329
|
+
value: any;
|
|
330
|
+
}
|
|
331
|
+
| {
|
|
332
|
+
providerOptions?: Record<
|
|
333
|
+
string,
|
|
334
|
+
Record<string, any>
|
|
335
|
+
>;
|
|
336
|
+
type: "error-text";
|
|
337
|
+
value: string;
|
|
338
|
+
}
|
|
339
|
+
| {
|
|
340
|
+
providerOptions?: Record<
|
|
341
|
+
string,
|
|
342
|
+
Record<string, any>
|
|
343
|
+
>;
|
|
344
|
+
type: "error-json";
|
|
345
|
+
value: any;
|
|
346
|
+
}
|
|
347
|
+
| {
|
|
348
|
+
providerOptions?: Record<
|
|
349
|
+
string,
|
|
350
|
+
Record<string, any>
|
|
351
|
+
>;
|
|
352
|
+
reason?: string;
|
|
353
|
+
type: "execution-denied";
|
|
354
|
+
}
|
|
296
355
|
| {
|
|
297
356
|
type: "content";
|
|
298
357
|
value: Array<
|
|
299
|
-
| {
|
|
358
|
+
| {
|
|
359
|
+
providerOptions?: Record<
|
|
360
|
+
string,
|
|
361
|
+
Record<string, any>
|
|
362
|
+
>;
|
|
363
|
+
text: string;
|
|
364
|
+
type: "text";
|
|
365
|
+
}
|
|
300
366
|
| {
|
|
301
367
|
data: string;
|
|
302
368
|
mediaType: string;
|
|
303
369
|
type: "media";
|
|
304
370
|
}
|
|
371
|
+
| {
|
|
372
|
+
data: string;
|
|
373
|
+
filename?: string;
|
|
374
|
+
mediaType: string;
|
|
375
|
+
providerOptions?: Record<
|
|
376
|
+
string,
|
|
377
|
+
Record<string, any>
|
|
378
|
+
>;
|
|
379
|
+
type: "file-data";
|
|
380
|
+
}
|
|
381
|
+
| {
|
|
382
|
+
providerOptions?: Record<
|
|
383
|
+
string,
|
|
384
|
+
Record<string, any>
|
|
385
|
+
>;
|
|
386
|
+
type: "file-url";
|
|
387
|
+
url: string;
|
|
388
|
+
}
|
|
389
|
+
| {
|
|
390
|
+
fileId: string | Record<string, string>;
|
|
391
|
+
providerOptions?: Record<
|
|
392
|
+
string,
|
|
393
|
+
Record<string, any>
|
|
394
|
+
>;
|
|
395
|
+
type: "file-id";
|
|
396
|
+
}
|
|
397
|
+
| {
|
|
398
|
+
data: string;
|
|
399
|
+
mediaType: string;
|
|
400
|
+
providerOptions?: Record<
|
|
401
|
+
string,
|
|
402
|
+
Record<string, any>
|
|
403
|
+
>;
|
|
404
|
+
type: "image-data";
|
|
405
|
+
}
|
|
406
|
+
| {
|
|
407
|
+
providerOptions?: Record<
|
|
408
|
+
string,
|
|
409
|
+
Record<string, any>
|
|
410
|
+
>;
|
|
411
|
+
type: "image-url";
|
|
412
|
+
url: string;
|
|
413
|
+
}
|
|
414
|
+
| {
|
|
415
|
+
fileId: string | Record<string, string>;
|
|
416
|
+
providerOptions?: Record<
|
|
417
|
+
string,
|
|
418
|
+
Record<string, any>
|
|
419
|
+
>;
|
|
420
|
+
type: "image-file-id";
|
|
421
|
+
}
|
|
422
|
+
| {
|
|
423
|
+
providerOptions?: Record<
|
|
424
|
+
string,
|
|
425
|
+
Record<string, any>
|
|
426
|
+
>;
|
|
427
|
+
type: "custom";
|
|
428
|
+
}
|
|
305
429
|
>;
|
|
306
430
|
};
|
|
307
431
|
providerExecuted?: boolean;
|
|
@@ -349,38 +473,167 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
349
473
|
title: string;
|
|
350
474
|
type: "source";
|
|
351
475
|
}
|
|
476
|
+
| {
|
|
477
|
+
approvalId: string;
|
|
478
|
+
providerMetadata?: Record<
|
|
479
|
+
string,
|
|
480
|
+
Record<string, any>
|
|
481
|
+
>;
|
|
482
|
+
providerOptions?: Record<
|
|
483
|
+
string,
|
|
484
|
+
Record<string, any>
|
|
485
|
+
>;
|
|
486
|
+
toolCallId: string;
|
|
487
|
+
type: "tool-approval-request";
|
|
488
|
+
}
|
|
352
489
|
>;
|
|
353
490
|
providerOptions?: Record<string, Record<string, any>>;
|
|
354
491
|
role: "assistant";
|
|
355
492
|
}
|
|
356
493
|
| {
|
|
357
|
-
content: Array<
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
494
|
+
content: Array<
|
|
495
|
+
| {
|
|
496
|
+
args?: any;
|
|
497
|
+
experimental_content?: Array<
|
|
498
|
+
| { text: string; type: "text" }
|
|
499
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
500
|
+
>;
|
|
501
|
+
isError?: boolean;
|
|
502
|
+
output?:
|
|
503
|
+
| {
|
|
504
|
+
providerOptions?: Record<
|
|
505
|
+
string,
|
|
506
|
+
Record<string, any>
|
|
507
|
+
>;
|
|
508
|
+
type: "text";
|
|
509
|
+
value: string;
|
|
510
|
+
}
|
|
511
|
+
| {
|
|
512
|
+
providerOptions?: Record<
|
|
513
|
+
string,
|
|
514
|
+
Record<string, any>
|
|
515
|
+
>;
|
|
516
|
+
type: "json";
|
|
517
|
+
value: any;
|
|
518
|
+
}
|
|
519
|
+
| {
|
|
520
|
+
providerOptions?: Record<
|
|
521
|
+
string,
|
|
522
|
+
Record<string, any>
|
|
523
|
+
>;
|
|
524
|
+
type: "error-text";
|
|
525
|
+
value: string;
|
|
526
|
+
}
|
|
527
|
+
| {
|
|
528
|
+
providerOptions?: Record<
|
|
529
|
+
string,
|
|
530
|
+
Record<string, any>
|
|
531
|
+
>;
|
|
532
|
+
type: "error-json";
|
|
533
|
+
value: any;
|
|
534
|
+
}
|
|
535
|
+
| {
|
|
536
|
+
providerOptions?: Record<
|
|
537
|
+
string,
|
|
538
|
+
Record<string, any>
|
|
539
|
+
>;
|
|
540
|
+
reason?: string;
|
|
541
|
+
type: "execution-denied";
|
|
542
|
+
}
|
|
543
|
+
| {
|
|
544
|
+
type: "content";
|
|
545
|
+
value: Array<
|
|
546
|
+
| {
|
|
547
|
+
providerOptions?: Record<
|
|
548
|
+
string,
|
|
549
|
+
Record<string, any>
|
|
550
|
+
>;
|
|
551
|
+
text: string;
|
|
552
|
+
type: "text";
|
|
553
|
+
}
|
|
554
|
+
| {
|
|
555
|
+
data: string;
|
|
556
|
+
mediaType: string;
|
|
557
|
+
type: "media";
|
|
558
|
+
}
|
|
559
|
+
| {
|
|
560
|
+
data: string;
|
|
561
|
+
filename?: string;
|
|
562
|
+
mediaType: string;
|
|
563
|
+
providerOptions?: Record<
|
|
564
|
+
string,
|
|
565
|
+
Record<string, any>
|
|
566
|
+
>;
|
|
567
|
+
type: "file-data";
|
|
568
|
+
}
|
|
569
|
+
| {
|
|
570
|
+
providerOptions?: Record<
|
|
571
|
+
string,
|
|
572
|
+
Record<string, any>
|
|
573
|
+
>;
|
|
574
|
+
type: "file-url";
|
|
575
|
+
url: string;
|
|
576
|
+
}
|
|
577
|
+
| {
|
|
578
|
+
fileId: string | Record<string, string>;
|
|
579
|
+
providerOptions?: Record<
|
|
580
|
+
string,
|
|
581
|
+
Record<string, any>
|
|
582
|
+
>;
|
|
583
|
+
type: "file-id";
|
|
584
|
+
}
|
|
585
|
+
| {
|
|
586
|
+
data: string;
|
|
587
|
+
mediaType: string;
|
|
588
|
+
providerOptions?: Record<
|
|
589
|
+
string,
|
|
590
|
+
Record<string, any>
|
|
591
|
+
>;
|
|
592
|
+
type: "image-data";
|
|
593
|
+
}
|
|
594
|
+
| {
|
|
595
|
+
providerOptions?: Record<
|
|
596
|
+
string,
|
|
597
|
+
Record<string, any>
|
|
598
|
+
>;
|
|
599
|
+
type: "image-url";
|
|
600
|
+
url: string;
|
|
601
|
+
}
|
|
602
|
+
| {
|
|
603
|
+
fileId: string | Record<string, string>;
|
|
604
|
+
providerOptions?: Record<
|
|
605
|
+
string,
|
|
606
|
+
Record<string, any>
|
|
607
|
+
>;
|
|
608
|
+
type: "image-file-id";
|
|
609
|
+
}
|
|
610
|
+
| {
|
|
611
|
+
providerOptions?: Record<
|
|
612
|
+
string,
|
|
613
|
+
Record<string, any>
|
|
614
|
+
>;
|
|
615
|
+
type: "custom";
|
|
616
|
+
}
|
|
617
|
+
>;
|
|
618
|
+
};
|
|
619
|
+
providerExecuted?: boolean;
|
|
620
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
621
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
622
|
+
result?: any;
|
|
623
|
+
toolCallId: string;
|
|
624
|
+
toolName: string;
|
|
625
|
+
type: "tool-result";
|
|
626
|
+
}
|
|
627
|
+
| {
|
|
628
|
+
approvalId: string;
|
|
629
|
+
approved: boolean;
|
|
630
|
+
providerExecuted?: boolean;
|
|
631
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
632
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
633
|
+
reason?: string;
|
|
634
|
+
type: "tool-approval-response";
|
|
635
|
+
}
|
|
636
|
+
>;
|
|
384
637
|
providerOptions?: Record<string, Record<string, any>>;
|
|
385
638
|
role: "tool";
|
|
386
639
|
}
|
|
@@ -485,6 +738,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
485
738
|
}
|
|
486
739
|
| {
|
|
487
740
|
image: string | ArrayBuffer;
|
|
741
|
+
mediaType?: string;
|
|
488
742
|
mimeType?: string;
|
|
489
743
|
providerOptions?: Record<
|
|
490
744
|
string,
|
|
@@ -495,7 +749,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
495
749
|
| {
|
|
496
750
|
data: string | ArrayBuffer;
|
|
497
751
|
filename?: string;
|
|
498
|
-
|
|
752
|
+
mediaType?: string;
|
|
753
|
+
mimeType?: string;
|
|
499
754
|
providerMetadata?: Record<
|
|
500
755
|
string,
|
|
501
756
|
Record<string, any>
|
|
@@ -529,7 +784,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
529
784
|
| {
|
|
530
785
|
data: string | ArrayBuffer;
|
|
531
786
|
filename?: string;
|
|
532
|
-
|
|
787
|
+
mediaType?: string;
|
|
788
|
+
mimeType?: string;
|
|
533
789
|
providerMetadata?: Record<
|
|
534
790
|
string,
|
|
535
791
|
Record<string, any>
|
|
@@ -565,8 +821,25 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
565
821
|
>;
|
|
566
822
|
type: "redacted-reasoning";
|
|
567
823
|
}
|
|
824
|
+
| {
|
|
825
|
+
args?: any;
|
|
826
|
+
input: any;
|
|
827
|
+
providerExecuted?: boolean;
|
|
828
|
+
providerMetadata?: Record<
|
|
829
|
+
string,
|
|
830
|
+
Record<string, any>
|
|
831
|
+
>;
|
|
832
|
+
providerOptions?: Record<
|
|
833
|
+
string,
|
|
834
|
+
Record<string, any>
|
|
835
|
+
>;
|
|
836
|
+
toolCallId: string;
|
|
837
|
+
toolName: string;
|
|
838
|
+
type: "tool-call";
|
|
839
|
+
}
|
|
568
840
|
| {
|
|
569
841
|
args: any;
|
|
842
|
+
input?: any;
|
|
570
843
|
providerExecuted?: boolean;
|
|
571
844
|
providerMetadata?: Record<
|
|
572
845
|
string,
|
|
@@ -592,19 +865,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
592
865
|
>;
|
|
593
866
|
isError?: boolean;
|
|
594
867
|
output?:
|
|
595
|
-
| {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
868
|
+
| {
|
|
869
|
+
providerOptions?: Record<
|
|
870
|
+
string,
|
|
871
|
+
Record<string, any>
|
|
872
|
+
>;
|
|
873
|
+
type: "text";
|
|
874
|
+
value: string;
|
|
875
|
+
}
|
|
876
|
+
| {
|
|
877
|
+
providerOptions?: Record<
|
|
878
|
+
string,
|
|
879
|
+
Record<string, any>
|
|
880
|
+
>;
|
|
881
|
+
type: "json";
|
|
882
|
+
value: any;
|
|
883
|
+
}
|
|
884
|
+
| {
|
|
885
|
+
providerOptions?: Record<
|
|
886
|
+
string,
|
|
887
|
+
Record<string, any>
|
|
888
|
+
>;
|
|
889
|
+
type: "error-text";
|
|
890
|
+
value: string;
|
|
891
|
+
}
|
|
892
|
+
| {
|
|
893
|
+
providerOptions?: Record<
|
|
894
|
+
string,
|
|
895
|
+
Record<string, any>
|
|
896
|
+
>;
|
|
897
|
+
type: "error-json";
|
|
898
|
+
value: any;
|
|
899
|
+
}
|
|
900
|
+
| {
|
|
901
|
+
providerOptions?: Record<
|
|
902
|
+
string,
|
|
903
|
+
Record<string, any>
|
|
904
|
+
>;
|
|
905
|
+
reason?: string;
|
|
906
|
+
type: "execution-denied";
|
|
907
|
+
}
|
|
599
908
|
| {
|
|
600
909
|
type: "content";
|
|
601
910
|
value: Array<
|
|
602
|
-
| {
|
|
911
|
+
| {
|
|
912
|
+
providerOptions?: Record<
|
|
913
|
+
string,
|
|
914
|
+
Record<string, any>
|
|
915
|
+
>;
|
|
916
|
+
text: string;
|
|
917
|
+
type: "text";
|
|
918
|
+
}
|
|
603
919
|
| {
|
|
604
920
|
data: string;
|
|
605
921
|
mediaType: string;
|
|
606
922
|
type: "media";
|
|
607
923
|
}
|
|
924
|
+
| {
|
|
925
|
+
data: string;
|
|
926
|
+
filename?: string;
|
|
927
|
+
mediaType: string;
|
|
928
|
+
providerOptions?: Record<
|
|
929
|
+
string,
|
|
930
|
+
Record<string, any>
|
|
931
|
+
>;
|
|
932
|
+
type: "file-data";
|
|
933
|
+
}
|
|
934
|
+
| {
|
|
935
|
+
providerOptions?: Record<
|
|
936
|
+
string,
|
|
937
|
+
Record<string, any>
|
|
938
|
+
>;
|
|
939
|
+
type: "file-url";
|
|
940
|
+
url: string;
|
|
941
|
+
}
|
|
942
|
+
| {
|
|
943
|
+
fileId: string | Record<string, string>;
|
|
944
|
+
providerOptions?: Record<
|
|
945
|
+
string,
|
|
946
|
+
Record<string, any>
|
|
947
|
+
>;
|
|
948
|
+
type: "file-id";
|
|
949
|
+
}
|
|
950
|
+
| {
|
|
951
|
+
data: string;
|
|
952
|
+
mediaType: string;
|
|
953
|
+
providerOptions?: Record<
|
|
954
|
+
string,
|
|
955
|
+
Record<string, any>
|
|
956
|
+
>;
|
|
957
|
+
type: "image-data";
|
|
958
|
+
}
|
|
959
|
+
| {
|
|
960
|
+
providerOptions?: Record<
|
|
961
|
+
string,
|
|
962
|
+
Record<string, any>
|
|
963
|
+
>;
|
|
964
|
+
type: "image-url";
|
|
965
|
+
url: string;
|
|
966
|
+
}
|
|
967
|
+
| {
|
|
968
|
+
fileId: string | Record<string, string>;
|
|
969
|
+
providerOptions?: Record<
|
|
970
|
+
string,
|
|
971
|
+
Record<string, any>
|
|
972
|
+
>;
|
|
973
|
+
type: "image-file-id";
|
|
974
|
+
}
|
|
975
|
+
| {
|
|
976
|
+
providerOptions?: Record<
|
|
977
|
+
string,
|
|
978
|
+
Record<string, any>
|
|
979
|
+
>;
|
|
980
|
+
type: "custom";
|
|
981
|
+
}
|
|
608
982
|
>;
|
|
609
983
|
};
|
|
610
984
|
providerExecuted?: boolean;
|
|
@@ -652,38 +1026,167 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
652
1026
|
title: string;
|
|
653
1027
|
type: "source";
|
|
654
1028
|
}
|
|
1029
|
+
| {
|
|
1030
|
+
approvalId: string;
|
|
1031
|
+
providerMetadata?: Record<
|
|
1032
|
+
string,
|
|
1033
|
+
Record<string, any>
|
|
1034
|
+
>;
|
|
1035
|
+
providerOptions?: Record<
|
|
1036
|
+
string,
|
|
1037
|
+
Record<string, any>
|
|
1038
|
+
>;
|
|
1039
|
+
toolCallId: string;
|
|
1040
|
+
type: "tool-approval-request";
|
|
1041
|
+
}
|
|
655
1042
|
>;
|
|
656
1043
|
providerOptions?: Record<string, Record<string, any>>;
|
|
657
1044
|
role: "assistant";
|
|
658
1045
|
}
|
|
659
1046
|
| {
|
|
660
|
-
content: Array<
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
1047
|
+
content: Array<
|
|
1048
|
+
| {
|
|
1049
|
+
args?: any;
|
|
1050
|
+
experimental_content?: Array<
|
|
1051
|
+
| { text: string; type: "text" }
|
|
1052
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
1053
|
+
>;
|
|
1054
|
+
isError?: boolean;
|
|
1055
|
+
output?:
|
|
1056
|
+
| {
|
|
1057
|
+
providerOptions?: Record<
|
|
1058
|
+
string,
|
|
1059
|
+
Record<string, any>
|
|
1060
|
+
>;
|
|
1061
|
+
type: "text";
|
|
1062
|
+
value: string;
|
|
1063
|
+
}
|
|
1064
|
+
| {
|
|
1065
|
+
providerOptions?: Record<
|
|
1066
|
+
string,
|
|
1067
|
+
Record<string, any>
|
|
1068
|
+
>;
|
|
1069
|
+
type: "json";
|
|
1070
|
+
value: any;
|
|
1071
|
+
}
|
|
1072
|
+
| {
|
|
1073
|
+
providerOptions?: Record<
|
|
1074
|
+
string,
|
|
1075
|
+
Record<string, any>
|
|
1076
|
+
>;
|
|
1077
|
+
type: "error-text";
|
|
1078
|
+
value: string;
|
|
1079
|
+
}
|
|
1080
|
+
| {
|
|
1081
|
+
providerOptions?: Record<
|
|
1082
|
+
string,
|
|
1083
|
+
Record<string, any>
|
|
1084
|
+
>;
|
|
1085
|
+
type: "error-json";
|
|
1086
|
+
value: any;
|
|
1087
|
+
}
|
|
1088
|
+
| {
|
|
1089
|
+
providerOptions?: Record<
|
|
1090
|
+
string,
|
|
1091
|
+
Record<string, any>
|
|
1092
|
+
>;
|
|
1093
|
+
reason?: string;
|
|
1094
|
+
type: "execution-denied";
|
|
1095
|
+
}
|
|
1096
|
+
| {
|
|
1097
|
+
type: "content";
|
|
1098
|
+
value: Array<
|
|
1099
|
+
| {
|
|
1100
|
+
providerOptions?: Record<
|
|
1101
|
+
string,
|
|
1102
|
+
Record<string, any>
|
|
1103
|
+
>;
|
|
1104
|
+
text: string;
|
|
1105
|
+
type: "text";
|
|
1106
|
+
}
|
|
1107
|
+
| {
|
|
1108
|
+
data: string;
|
|
1109
|
+
mediaType: string;
|
|
1110
|
+
type: "media";
|
|
1111
|
+
}
|
|
1112
|
+
| {
|
|
1113
|
+
data: string;
|
|
1114
|
+
filename?: string;
|
|
1115
|
+
mediaType: string;
|
|
1116
|
+
providerOptions?: Record<
|
|
1117
|
+
string,
|
|
1118
|
+
Record<string, any>
|
|
1119
|
+
>;
|
|
1120
|
+
type: "file-data";
|
|
1121
|
+
}
|
|
1122
|
+
| {
|
|
1123
|
+
providerOptions?: Record<
|
|
1124
|
+
string,
|
|
1125
|
+
Record<string, any>
|
|
1126
|
+
>;
|
|
1127
|
+
type: "file-url";
|
|
1128
|
+
url: string;
|
|
1129
|
+
}
|
|
1130
|
+
| {
|
|
1131
|
+
fileId: string | Record<string, string>;
|
|
1132
|
+
providerOptions?: Record<
|
|
1133
|
+
string,
|
|
1134
|
+
Record<string, any>
|
|
1135
|
+
>;
|
|
1136
|
+
type: "file-id";
|
|
1137
|
+
}
|
|
1138
|
+
| {
|
|
1139
|
+
data: string;
|
|
1140
|
+
mediaType: string;
|
|
1141
|
+
providerOptions?: Record<
|
|
1142
|
+
string,
|
|
1143
|
+
Record<string, any>
|
|
1144
|
+
>;
|
|
1145
|
+
type: "image-data";
|
|
1146
|
+
}
|
|
1147
|
+
| {
|
|
1148
|
+
providerOptions?: Record<
|
|
1149
|
+
string,
|
|
1150
|
+
Record<string, any>
|
|
1151
|
+
>;
|
|
1152
|
+
type: "image-url";
|
|
1153
|
+
url: string;
|
|
1154
|
+
}
|
|
1155
|
+
| {
|
|
1156
|
+
fileId: string | Record<string, string>;
|
|
1157
|
+
providerOptions?: Record<
|
|
1158
|
+
string,
|
|
1159
|
+
Record<string, any>
|
|
1160
|
+
>;
|
|
1161
|
+
type: "image-file-id";
|
|
1162
|
+
}
|
|
1163
|
+
| {
|
|
1164
|
+
providerOptions?: Record<
|
|
1165
|
+
string,
|
|
1166
|
+
Record<string, any>
|
|
1167
|
+
>;
|
|
1168
|
+
type: "custom";
|
|
1169
|
+
}
|
|
1170
|
+
>;
|
|
1171
|
+
};
|
|
1172
|
+
providerExecuted?: boolean;
|
|
1173
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1174
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1175
|
+
result?: any;
|
|
1176
|
+
toolCallId: string;
|
|
1177
|
+
toolName: string;
|
|
1178
|
+
type: "tool-result";
|
|
1179
|
+
}
|
|
1180
|
+
| {
|
|
1181
|
+
approvalId: string;
|
|
1182
|
+
approved: boolean;
|
|
1183
|
+
providerExecuted?: boolean;
|
|
1184
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1185
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1186
|
+
reason?: string;
|
|
1187
|
+
type: "tool-approval-response";
|
|
1188
|
+
}
|
|
1189
|
+
>;
|
|
687
1190
|
providerOptions?: Record<string, Record<string, any>>;
|
|
688
1191
|
role: "tool";
|
|
689
1192
|
}
|
|
@@ -839,6 +1342,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
839
1342
|
}
|
|
840
1343
|
| {
|
|
841
1344
|
image: string | ArrayBuffer;
|
|
1345
|
+
mediaType?: string;
|
|
842
1346
|
mimeType?: string;
|
|
843
1347
|
providerOptions?: Record<string, Record<string, any>>;
|
|
844
1348
|
type: "image";
|
|
@@ -846,7 +1350,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
846
1350
|
| {
|
|
847
1351
|
data: string | ArrayBuffer;
|
|
848
1352
|
filename?: string;
|
|
849
|
-
|
|
1353
|
+
mediaType?: string;
|
|
1354
|
+
mimeType?: string;
|
|
850
1355
|
providerMetadata?: Record<
|
|
851
1356
|
string,
|
|
852
1357
|
Record<string, any>
|
|
@@ -874,7 +1379,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
874
1379
|
| {
|
|
875
1380
|
data: string | ArrayBuffer;
|
|
876
1381
|
filename?: string;
|
|
877
|
-
|
|
1382
|
+
mediaType?: string;
|
|
1383
|
+
mimeType?: string;
|
|
878
1384
|
providerMetadata?: Record<
|
|
879
1385
|
string,
|
|
880
1386
|
Record<string, any>
|
|
@@ -902,7 +1408,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
902
1408
|
type: "redacted-reasoning";
|
|
903
1409
|
}
|
|
904
1410
|
| {
|
|
905
|
-
args
|
|
1411
|
+
args?: any;
|
|
1412
|
+
input: any;
|
|
906
1413
|
providerExecuted?: boolean;
|
|
907
1414
|
providerMetadata?: Record<
|
|
908
1415
|
string,
|
|
@@ -913,6 +1420,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
913
1420
|
toolName: string;
|
|
914
1421
|
type: "tool-call";
|
|
915
1422
|
}
|
|
1423
|
+
| {
|
|
1424
|
+
args: any;
|
|
1425
|
+
input?: any;
|
|
1426
|
+
providerExecuted?: boolean;
|
|
1427
|
+
providerMetadata?: Record<
|
|
1428
|
+
string,
|
|
1429
|
+
Record<string, any>
|
|
1430
|
+
>;
|
|
1431
|
+
providerOptions?: Record<
|
|
1432
|
+
string,
|
|
1433
|
+
Record<string, any>
|
|
1434
|
+
>;
|
|
1435
|
+
toolCallId: string;
|
|
1436
|
+
toolName: string;
|
|
1437
|
+
type: "tool-call";
|
|
1438
|
+
}
|
|
916
1439
|
| {
|
|
917
1440
|
args?: any;
|
|
918
1441
|
experimental_content?: Array<
|
|
@@ -921,19 +1444,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
921
1444
|
>;
|
|
922
1445
|
isError?: boolean;
|
|
923
1446
|
output?:
|
|
924
|
-
| {
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1447
|
+
| {
|
|
1448
|
+
providerOptions?: Record<
|
|
1449
|
+
string,
|
|
1450
|
+
Record<string, any>
|
|
1451
|
+
>;
|
|
1452
|
+
type: "text";
|
|
1453
|
+
value: string;
|
|
1454
|
+
}
|
|
1455
|
+
| {
|
|
1456
|
+
providerOptions?: Record<
|
|
1457
|
+
string,
|
|
1458
|
+
Record<string, any>
|
|
1459
|
+
>;
|
|
1460
|
+
type: "json";
|
|
1461
|
+
value: any;
|
|
1462
|
+
}
|
|
1463
|
+
| {
|
|
1464
|
+
providerOptions?: Record<
|
|
1465
|
+
string,
|
|
1466
|
+
Record<string, any>
|
|
1467
|
+
>;
|
|
1468
|
+
type: "error-text";
|
|
1469
|
+
value: string;
|
|
1470
|
+
}
|
|
1471
|
+
| {
|
|
1472
|
+
providerOptions?: Record<
|
|
1473
|
+
string,
|
|
1474
|
+
Record<string, any>
|
|
1475
|
+
>;
|
|
1476
|
+
type: "error-json";
|
|
1477
|
+
value: any;
|
|
1478
|
+
}
|
|
1479
|
+
| {
|
|
1480
|
+
providerOptions?: Record<
|
|
1481
|
+
string,
|
|
1482
|
+
Record<string, any>
|
|
1483
|
+
>;
|
|
1484
|
+
reason?: string;
|
|
1485
|
+
type: "execution-denied";
|
|
1486
|
+
}
|
|
928
1487
|
| {
|
|
929
1488
|
type: "content";
|
|
930
1489
|
value: Array<
|
|
931
|
-
| {
|
|
1490
|
+
| {
|
|
1491
|
+
providerOptions?: Record<
|
|
1492
|
+
string,
|
|
1493
|
+
Record<string, any>
|
|
1494
|
+
>;
|
|
1495
|
+
text: string;
|
|
1496
|
+
type: "text";
|
|
1497
|
+
}
|
|
932
1498
|
| {
|
|
933
1499
|
data: string;
|
|
934
1500
|
mediaType: string;
|
|
935
1501
|
type: "media";
|
|
936
1502
|
}
|
|
1503
|
+
| {
|
|
1504
|
+
data: string;
|
|
1505
|
+
filename?: string;
|
|
1506
|
+
mediaType: string;
|
|
1507
|
+
providerOptions?: Record<
|
|
1508
|
+
string,
|
|
1509
|
+
Record<string, any>
|
|
1510
|
+
>;
|
|
1511
|
+
type: "file-data";
|
|
1512
|
+
}
|
|
1513
|
+
| {
|
|
1514
|
+
providerOptions?: Record<
|
|
1515
|
+
string,
|
|
1516
|
+
Record<string, any>
|
|
1517
|
+
>;
|
|
1518
|
+
type: "file-url";
|
|
1519
|
+
url: string;
|
|
1520
|
+
}
|
|
1521
|
+
| {
|
|
1522
|
+
fileId: string | Record<string, string>;
|
|
1523
|
+
providerOptions?: Record<
|
|
1524
|
+
string,
|
|
1525
|
+
Record<string, any>
|
|
1526
|
+
>;
|
|
1527
|
+
type: "file-id";
|
|
1528
|
+
}
|
|
1529
|
+
| {
|
|
1530
|
+
data: string;
|
|
1531
|
+
mediaType: string;
|
|
1532
|
+
providerOptions?: Record<
|
|
1533
|
+
string,
|
|
1534
|
+
Record<string, any>
|
|
1535
|
+
>;
|
|
1536
|
+
type: "image-data";
|
|
1537
|
+
}
|
|
1538
|
+
| {
|
|
1539
|
+
providerOptions?: Record<
|
|
1540
|
+
string,
|
|
1541
|
+
Record<string, any>
|
|
1542
|
+
>;
|
|
1543
|
+
type: "image-url";
|
|
1544
|
+
url: string;
|
|
1545
|
+
}
|
|
1546
|
+
| {
|
|
1547
|
+
fileId: string | Record<string, string>;
|
|
1548
|
+
providerOptions?: Record<
|
|
1549
|
+
string,
|
|
1550
|
+
Record<string, any>
|
|
1551
|
+
>;
|
|
1552
|
+
type: "image-file-id";
|
|
1553
|
+
}
|
|
1554
|
+
| {
|
|
1555
|
+
providerOptions?: Record<
|
|
1556
|
+
string,
|
|
1557
|
+
Record<string, any>
|
|
1558
|
+
>;
|
|
1559
|
+
type: "custom";
|
|
1560
|
+
}
|
|
937
1561
|
>;
|
|
938
1562
|
};
|
|
939
1563
|
providerExecuted?: boolean;
|
|
@@ -972,88 +1596,214 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
972
1596
|
title: string;
|
|
973
1597
|
type: "source";
|
|
974
1598
|
}
|
|
1599
|
+
| {
|
|
1600
|
+
approvalId: string;
|
|
1601
|
+
providerMetadata?: Record<
|
|
1602
|
+
string,
|
|
1603
|
+
Record<string, any>
|
|
1604
|
+
>;
|
|
1605
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1606
|
+
toolCallId: string;
|
|
1607
|
+
type: "tool-approval-request";
|
|
1608
|
+
}
|
|
975
1609
|
>;
|
|
976
1610
|
providerOptions?: Record<string, Record<string, any>>;
|
|
977
1611
|
role: "assistant";
|
|
978
1612
|
}
|
|
979
1613
|
| {
|
|
980
|
-
content: Array<
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1614
|
+
content: Array<
|
|
1615
|
+
| {
|
|
1616
|
+
args?: any;
|
|
1617
|
+
experimental_content?: Array<
|
|
1618
|
+
| { text: string; type: "text" }
|
|
1619
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
1620
|
+
>;
|
|
1621
|
+
isError?: boolean;
|
|
1622
|
+
output?:
|
|
1623
|
+
| {
|
|
1624
|
+
providerOptions?: Record<
|
|
1625
|
+
string,
|
|
1626
|
+
Record<string, any>
|
|
1627
|
+
>;
|
|
1628
|
+
type: "text";
|
|
1629
|
+
value: string;
|
|
1630
|
+
}
|
|
1631
|
+
| {
|
|
1632
|
+
providerOptions?: Record<
|
|
1633
|
+
string,
|
|
1634
|
+
Record<string, any>
|
|
1635
|
+
>;
|
|
1636
|
+
type: "json";
|
|
1637
|
+
value: any;
|
|
1638
|
+
}
|
|
1639
|
+
| {
|
|
1640
|
+
providerOptions?: Record<
|
|
1641
|
+
string,
|
|
1642
|
+
Record<string, any>
|
|
1643
|
+
>;
|
|
1644
|
+
type: "error-text";
|
|
1645
|
+
value: string;
|
|
1646
|
+
}
|
|
1647
|
+
| {
|
|
1648
|
+
providerOptions?: Record<
|
|
1649
|
+
string,
|
|
1650
|
+
Record<string, any>
|
|
1651
|
+
>;
|
|
1652
|
+
type: "error-json";
|
|
1653
|
+
value: any;
|
|
1654
|
+
}
|
|
1655
|
+
| {
|
|
1656
|
+
providerOptions?: Record<
|
|
1657
|
+
string,
|
|
1658
|
+
Record<string, any>
|
|
1659
|
+
>;
|
|
1660
|
+
reason?: string;
|
|
1661
|
+
type: "execution-denied";
|
|
1662
|
+
}
|
|
1663
|
+
| {
|
|
1664
|
+
type: "content";
|
|
1665
|
+
value: Array<
|
|
1666
|
+
| {
|
|
1667
|
+
providerOptions?: Record<
|
|
1668
|
+
string,
|
|
1669
|
+
Record<string, any>
|
|
1670
|
+
>;
|
|
1671
|
+
text: string;
|
|
1672
|
+
type: "text";
|
|
1673
|
+
}
|
|
1674
|
+
| {
|
|
1675
|
+
data: string;
|
|
1676
|
+
mediaType: string;
|
|
1677
|
+
type: "media";
|
|
1678
|
+
}
|
|
1679
|
+
| {
|
|
1680
|
+
data: string;
|
|
1681
|
+
filename?: string;
|
|
1682
|
+
mediaType: string;
|
|
1683
|
+
providerOptions?: Record<
|
|
1684
|
+
string,
|
|
1685
|
+
Record<string, any>
|
|
1686
|
+
>;
|
|
1687
|
+
type: "file-data";
|
|
1688
|
+
}
|
|
1689
|
+
| {
|
|
1690
|
+
providerOptions?: Record<
|
|
1691
|
+
string,
|
|
1692
|
+
Record<string, any>
|
|
1693
|
+
>;
|
|
1694
|
+
type: "file-url";
|
|
1695
|
+
url: string;
|
|
1696
|
+
}
|
|
1697
|
+
| {
|
|
1698
|
+
fileId: string | Record<string, string>;
|
|
1699
|
+
providerOptions?: Record<
|
|
1700
|
+
string,
|
|
1701
|
+
Record<string, any>
|
|
1702
|
+
>;
|
|
1703
|
+
type: "file-id";
|
|
1704
|
+
}
|
|
1705
|
+
| {
|
|
1706
|
+
data: string;
|
|
1707
|
+
mediaType: string;
|
|
1708
|
+
providerOptions?: Record<
|
|
1709
|
+
string,
|
|
1710
|
+
Record<string, any>
|
|
1711
|
+
>;
|
|
1712
|
+
type: "image-data";
|
|
1713
|
+
}
|
|
1714
|
+
| {
|
|
1715
|
+
providerOptions?: Record<
|
|
1716
|
+
string,
|
|
1717
|
+
Record<string, any>
|
|
1718
|
+
>;
|
|
1719
|
+
type: "image-url";
|
|
1720
|
+
url: string;
|
|
1721
|
+
}
|
|
1722
|
+
| {
|
|
1723
|
+
fileId: string | Record<string, string>;
|
|
1724
|
+
providerOptions?: Record<
|
|
1725
|
+
string,
|
|
1726
|
+
Record<string, any>
|
|
1727
|
+
>;
|
|
1728
|
+
type: "image-file-id";
|
|
1729
|
+
}
|
|
1730
|
+
| {
|
|
1731
|
+
providerOptions?: Record<
|
|
1732
|
+
string,
|
|
1733
|
+
Record<string, any>
|
|
1734
|
+
>;
|
|
1735
|
+
type: "custom";
|
|
1736
|
+
}
|
|
1737
|
+
>;
|
|
1738
|
+
};
|
|
1739
|
+
providerExecuted?: boolean;
|
|
1740
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1741
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1742
|
+
result?: any;
|
|
1743
|
+
toolCallId: string;
|
|
1744
|
+
toolName: string;
|
|
1745
|
+
type: "tool-result";
|
|
1746
|
+
}
|
|
1747
|
+
| {
|
|
1748
|
+
approvalId: string;
|
|
1749
|
+
approved: boolean;
|
|
1750
|
+
providerExecuted?: boolean;
|
|
1751
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1752
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1753
|
+
reason?: string;
|
|
1754
|
+
type: "tool-approval-response";
|
|
1755
|
+
}
|
|
1756
|
+
>;
|
|
1757
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1758
|
+
role: "tool";
|
|
1759
|
+
}
|
|
1760
|
+
| {
|
|
1761
|
+
content: string;
|
|
1762
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1763
|
+
role: "system";
|
|
1764
|
+
};
|
|
1765
|
+
model?: string;
|
|
1766
|
+
order: number;
|
|
1767
|
+
provider?: string;
|
|
1768
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1769
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1770
|
+
reasoning?: string;
|
|
1771
|
+
reasoningDetails?: Array<
|
|
1772
|
+
| {
|
|
1773
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1774
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1775
|
+
signature?: string;
|
|
1776
|
+
text: string;
|
|
1777
|
+
type: "reasoning";
|
|
1778
|
+
}
|
|
1779
|
+
| { signature?: string; text: string; type: "text" }
|
|
1780
|
+
| { data: string; type: "redacted" }
|
|
1781
|
+
>;
|
|
1782
|
+
sources?: Array<
|
|
1783
|
+
| {
|
|
1784
|
+
id: string;
|
|
1785
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1786
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1787
|
+
sourceType: "url";
|
|
1788
|
+
title?: string;
|
|
1789
|
+
type?: "source";
|
|
1790
|
+
url: string;
|
|
1791
|
+
}
|
|
1792
|
+
| {
|
|
1793
|
+
filename?: string;
|
|
1794
|
+
id: string;
|
|
1795
|
+
mediaType: string;
|
|
1796
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1797
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1798
|
+
sourceType: "document";
|
|
1799
|
+
title: string;
|
|
1800
|
+
type: "source";
|
|
1801
|
+
}
|
|
1802
|
+
>;
|
|
1803
|
+
status: "pending" | "success" | "failed";
|
|
1804
|
+
stepOrder: number;
|
|
1805
|
+
text?: string;
|
|
1806
|
+
threadId: string;
|
|
1057
1807
|
tool: boolean;
|
|
1058
1808
|
usage?: {
|
|
1059
1809
|
cachedInputTokens?: number;
|
|
@@ -1134,6 +1884,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1134
1884
|
}
|
|
1135
1885
|
| {
|
|
1136
1886
|
image: string | ArrayBuffer;
|
|
1887
|
+
mediaType?: string;
|
|
1137
1888
|
mimeType?: string;
|
|
1138
1889
|
providerOptions?: Record<
|
|
1139
1890
|
string,
|
|
@@ -1144,7 +1895,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1144
1895
|
| {
|
|
1145
1896
|
data: string | ArrayBuffer;
|
|
1146
1897
|
filename?: string;
|
|
1147
|
-
|
|
1898
|
+
mediaType?: string;
|
|
1899
|
+
mimeType?: string;
|
|
1148
1900
|
providerMetadata?: Record<
|
|
1149
1901
|
string,
|
|
1150
1902
|
Record<string, any>
|
|
@@ -1178,7 +1930,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1178
1930
|
| {
|
|
1179
1931
|
data: string | ArrayBuffer;
|
|
1180
1932
|
filename?: string;
|
|
1181
|
-
|
|
1933
|
+
mediaType?: string;
|
|
1934
|
+
mimeType?: string;
|
|
1182
1935
|
providerMetadata?: Record<
|
|
1183
1936
|
string,
|
|
1184
1937
|
Record<string, any>
|
|
@@ -1214,8 +1967,25 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1214
1967
|
>;
|
|
1215
1968
|
type: "redacted-reasoning";
|
|
1216
1969
|
}
|
|
1970
|
+
| {
|
|
1971
|
+
args?: any;
|
|
1972
|
+
input: any;
|
|
1973
|
+
providerExecuted?: boolean;
|
|
1974
|
+
providerMetadata?: Record<
|
|
1975
|
+
string,
|
|
1976
|
+
Record<string, any>
|
|
1977
|
+
>;
|
|
1978
|
+
providerOptions?: Record<
|
|
1979
|
+
string,
|
|
1980
|
+
Record<string, any>
|
|
1981
|
+
>;
|
|
1982
|
+
toolCallId: string;
|
|
1983
|
+
toolName: string;
|
|
1984
|
+
type: "tool-call";
|
|
1985
|
+
}
|
|
1217
1986
|
| {
|
|
1218
1987
|
args: any;
|
|
1988
|
+
input?: any;
|
|
1219
1989
|
providerExecuted?: boolean;
|
|
1220
1990
|
providerMetadata?: Record<
|
|
1221
1991
|
string,
|
|
@@ -1241,19 +2011,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1241
2011
|
>;
|
|
1242
2012
|
isError?: boolean;
|
|
1243
2013
|
output?:
|
|
1244
|
-
| {
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
2014
|
+
| {
|
|
2015
|
+
providerOptions?: Record<
|
|
2016
|
+
string,
|
|
2017
|
+
Record<string, any>
|
|
2018
|
+
>;
|
|
2019
|
+
type: "text";
|
|
2020
|
+
value: string;
|
|
2021
|
+
}
|
|
2022
|
+
| {
|
|
2023
|
+
providerOptions?: Record<
|
|
2024
|
+
string,
|
|
2025
|
+
Record<string, any>
|
|
2026
|
+
>;
|
|
2027
|
+
type: "json";
|
|
2028
|
+
value: any;
|
|
2029
|
+
}
|
|
2030
|
+
| {
|
|
2031
|
+
providerOptions?: Record<
|
|
2032
|
+
string,
|
|
2033
|
+
Record<string, any>
|
|
2034
|
+
>;
|
|
2035
|
+
type: "error-text";
|
|
2036
|
+
value: string;
|
|
2037
|
+
}
|
|
2038
|
+
| {
|
|
2039
|
+
providerOptions?: Record<
|
|
2040
|
+
string,
|
|
2041
|
+
Record<string, any>
|
|
2042
|
+
>;
|
|
2043
|
+
type: "error-json";
|
|
2044
|
+
value: any;
|
|
2045
|
+
}
|
|
2046
|
+
| {
|
|
2047
|
+
providerOptions?: Record<
|
|
2048
|
+
string,
|
|
2049
|
+
Record<string, any>
|
|
2050
|
+
>;
|
|
2051
|
+
reason?: string;
|
|
2052
|
+
type: "execution-denied";
|
|
2053
|
+
}
|
|
1248
2054
|
| {
|
|
1249
2055
|
type: "content";
|
|
1250
2056
|
value: Array<
|
|
1251
|
-
| {
|
|
2057
|
+
| {
|
|
2058
|
+
providerOptions?: Record<
|
|
2059
|
+
string,
|
|
2060
|
+
Record<string, any>
|
|
2061
|
+
>;
|
|
2062
|
+
text: string;
|
|
2063
|
+
type: "text";
|
|
2064
|
+
}
|
|
1252
2065
|
| {
|
|
1253
2066
|
data: string;
|
|
1254
2067
|
mediaType: string;
|
|
1255
2068
|
type: "media";
|
|
1256
2069
|
}
|
|
2070
|
+
| {
|
|
2071
|
+
data: string;
|
|
2072
|
+
filename?: string;
|
|
2073
|
+
mediaType: string;
|
|
2074
|
+
providerOptions?: Record<
|
|
2075
|
+
string,
|
|
2076
|
+
Record<string, any>
|
|
2077
|
+
>;
|
|
2078
|
+
type: "file-data";
|
|
2079
|
+
}
|
|
2080
|
+
| {
|
|
2081
|
+
providerOptions?: Record<
|
|
2082
|
+
string,
|
|
2083
|
+
Record<string, any>
|
|
2084
|
+
>;
|
|
2085
|
+
type: "file-url";
|
|
2086
|
+
url: string;
|
|
2087
|
+
}
|
|
2088
|
+
| {
|
|
2089
|
+
fileId: string | Record<string, string>;
|
|
2090
|
+
providerOptions?: Record<
|
|
2091
|
+
string,
|
|
2092
|
+
Record<string, any>
|
|
2093
|
+
>;
|
|
2094
|
+
type: "file-id";
|
|
2095
|
+
}
|
|
2096
|
+
| {
|
|
2097
|
+
data: string;
|
|
2098
|
+
mediaType: string;
|
|
2099
|
+
providerOptions?: Record<
|
|
2100
|
+
string,
|
|
2101
|
+
Record<string, any>
|
|
2102
|
+
>;
|
|
2103
|
+
type: "image-data";
|
|
2104
|
+
}
|
|
2105
|
+
| {
|
|
2106
|
+
providerOptions?: Record<
|
|
2107
|
+
string,
|
|
2108
|
+
Record<string, any>
|
|
2109
|
+
>;
|
|
2110
|
+
type: "image-url";
|
|
2111
|
+
url: string;
|
|
2112
|
+
}
|
|
2113
|
+
| {
|
|
2114
|
+
fileId: string | Record<string, string>;
|
|
2115
|
+
providerOptions?: Record<
|
|
2116
|
+
string,
|
|
2117
|
+
Record<string, any>
|
|
2118
|
+
>;
|
|
2119
|
+
type: "image-file-id";
|
|
2120
|
+
}
|
|
2121
|
+
| {
|
|
2122
|
+
providerOptions?: Record<
|
|
2123
|
+
string,
|
|
2124
|
+
Record<string, any>
|
|
2125
|
+
>;
|
|
2126
|
+
type: "custom";
|
|
2127
|
+
}
|
|
1257
2128
|
>;
|
|
1258
2129
|
};
|
|
1259
2130
|
providerExecuted?: boolean;
|
|
@@ -1301,38 +2172,167 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1301
2172
|
title: string;
|
|
1302
2173
|
type: "source";
|
|
1303
2174
|
}
|
|
2175
|
+
| {
|
|
2176
|
+
approvalId: string;
|
|
2177
|
+
providerMetadata?: Record<
|
|
2178
|
+
string,
|
|
2179
|
+
Record<string, any>
|
|
2180
|
+
>;
|
|
2181
|
+
providerOptions?: Record<
|
|
2182
|
+
string,
|
|
2183
|
+
Record<string, any>
|
|
2184
|
+
>;
|
|
2185
|
+
toolCallId: string;
|
|
2186
|
+
type: "tool-approval-request";
|
|
2187
|
+
}
|
|
1304
2188
|
>;
|
|
1305
2189
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1306
2190
|
role: "assistant";
|
|
1307
2191
|
}
|
|
1308
2192
|
| {
|
|
1309
|
-
content: Array<
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
2193
|
+
content: Array<
|
|
2194
|
+
| {
|
|
2195
|
+
args?: any;
|
|
2196
|
+
experimental_content?: Array<
|
|
2197
|
+
| { text: string; type: "text" }
|
|
2198
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
2199
|
+
>;
|
|
2200
|
+
isError?: boolean;
|
|
2201
|
+
output?:
|
|
2202
|
+
| {
|
|
2203
|
+
providerOptions?: Record<
|
|
2204
|
+
string,
|
|
2205
|
+
Record<string, any>
|
|
2206
|
+
>;
|
|
2207
|
+
type: "text";
|
|
2208
|
+
value: string;
|
|
2209
|
+
}
|
|
2210
|
+
| {
|
|
2211
|
+
providerOptions?: Record<
|
|
2212
|
+
string,
|
|
2213
|
+
Record<string, any>
|
|
2214
|
+
>;
|
|
2215
|
+
type: "json";
|
|
2216
|
+
value: any;
|
|
2217
|
+
}
|
|
2218
|
+
| {
|
|
2219
|
+
providerOptions?: Record<
|
|
2220
|
+
string,
|
|
2221
|
+
Record<string, any>
|
|
2222
|
+
>;
|
|
2223
|
+
type: "error-text";
|
|
2224
|
+
value: string;
|
|
2225
|
+
}
|
|
2226
|
+
| {
|
|
2227
|
+
providerOptions?: Record<
|
|
2228
|
+
string,
|
|
2229
|
+
Record<string, any>
|
|
2230
|
+
>;
|
|
2231
|
+
type: "error-json";
|
|
2232
|
+
value: any;
|
|
2233
|
+
}
|
|
2234
|
+
| {
|
|
2235
|
+
providerOptions?: Record<
|
|
2236
|
+
string,
|
|
2237
|
+
Record<string, any>
|
|
2238
|
+
>;
|
|
2239
|
+
reason?: string;
|
|
2240
|
+
type: "execution-denied";
|
|
2241
|
+
}
|
|
2242
|
+
| {
|
|
2243
|
+
type: "content";
|
|
2244
|
+
value: Array<
|
|
2245
|
+
| {
|
|
2246
|
+
providerOptions?: Record<
|
|
2247
|
+
string,
|
|
2248
|
+
Record<string, any>
|
|
2249
|
+
>;
|
|
2250
|
+
text: string;
|
|
2251
|
+
type: "text";
|
|
2252
|
+
}
|
|
2253
|
+
| {
|
|
2254
|
+
data: string;
|
|
2255
|
+
mediaType: string;
|
|
2256
|
+
type: "media";
|
|
2257
|
+
}
|
|
2258
|
+
| {
|
|
2259
|
+
data: string;
|
|
2260
|
+
filename?: string;
|
|
2261
|
+
mediaType: string;
|
|
2262
|
+
providerOptions?: Record<
|
|
2263
|
+
string,
|
|
2264
|
+
Record<string, any>
|
|
2265
|
+
>;
|
|
2266
|
+
type: "file-data";
|
|
2267
|
+
}
|
|
2268
|
+
| {
|
|
2269
|
+
providerOptions?: Record<
|
|
2270
|
+
string,
|
|
2271
|
+
Record<string, any>
|
|
2272
|
+
>;
|
|
2273
|
+
type: "file-url";
|
|
2274
|
+
url: string;
|
|
2275
|
+
}
|
|
2276
|
+
| {
|
|
2277
|
+
fileId: string | Record<string, string>;
|
|
2278
|
+
providerOptions?: Record<
|
|
2279
|
+
string,
|
|
2280
|
+
Record<string, any>
|
|
2281
|
+
>;
|
|
2282
|
+
type: "file-id";
|
|
2283
|
+
}
|
|
2284
|
+
| {
|
|
2285
|
+
data: string;
|
|
2286
|
+
mediaType: string;
|
|
2287
|
+
providerOptions?: Record<
|
|
2288
|
+
string,
|
|
2289
|
+
Record<string, any>
|
|
2290
|
+
>;
|
|
2291
|
+
type: "image-data";
|
|
2292
|
+
}
|
|
2293
|
+
| {
|
|
2294
|
+
providerOptions?: Record<
|
|
2295
|
+
string,
|
|
2296
|
+
Record<string, any>
|
|
2297
|
+
>;
|
|
2298
|
+
type: "image-url";
|
|
2299
|
+
url: string;
|
|
2300
|
+
}
|
|
2301
|
+
| {
|
|
2302
|
+
fileId: string | Record<string, string>;
|
|
2303
|
+
providerOptions?: Record<
|
|
2304
|
+
string,
|
|
2305
|
+
Record<string, any>
|
|
2306
|
+
>;
|
|
2307
|
+
type: "image-file-id";
|
|
2308
|
+
}
|
|
2309
|
+
| {
|
|
2310
|
+
providerOptions?: Record<
|
|
2311
|
+
string,
|
|
2312
|
+
Record<string, any>
|
|
2313
|
+
>;
|
|
2314
|
+
type: "custom";
|
|
2315
|
+
}
|
|
2316
|
+
>;
|
|
2317
|
+
};
|
|
2318
|
+
providerExecuted?: boolean;
|
|
2319
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
2320
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
2321
|
+
result?: any;
|
|
2322
|
+
toolCallId: string;
|
|
2323
|
+
toolName: string;
|
|
2324
|
+
type: "tool-result";
|
|
2325
|
+
}
|
|
2326
|
+
| {
|
|
2327
|
+
approvalId: string;
|
|
2328
|
+
approved: boolean;
|
|
2329
|
+
providerExecuted?: boolean;
|
|
2330
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
2331
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
2332
|
+
reason?: string;
|
|
2333
|
+
type: "tool-approval-response";
|
|
2334
|
+
}
|
|
2335
|
+
>;
|
|
1336
2336
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1337
2337
|
role: "tool";
|
|
1338
2338
|
}
|
|
@@ -1455,6 +2455,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1455
2455
|
}
|
|
1456
2456
|
| {
|
|
1457
2457
|
image: string | ArrayBuffer;
|
|
2458
|
+
mediaType?: string;
|
|
1458
2459
|
mimeType?: string;
|
|
1459
2460
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1460
2461
|
type: "image";
|
|
@@ -1462,7 +2463,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1462
2463
|
| {
|
|
1463
2464
|
data: string | ArrayBuffer;
|
|
1464
2465
|
filename?: string;
|
|
1465
|
-
|
|
2466
|
+
mediaType?: string;
|
|
2467
|
+
mimeType?: string;
|
|
1466
2468
|
providerMetadata?: Record<
|
|
1467
2469
|
string,
|
|
1468
2470
|
Record<string, any>
|
|
@@ -1490,7 +2492,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1490
2492
|
| {
|
|
1491
2493
|
data: string | ArrayBuffer;
|
|
1492
2494
|
filename?: string;
|
|
1493
|
-
|
|
2495
|
+
mediaType?: string;
|
|
2496
|
+
mimeType?: string;
|
|
1494
2497
|
providerMetadata?: Record<
|
|
1495
2498
|
string,
|
|
1496
2499
|
Record<string, any>
|
|
@@ -1518,7 +2521,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1518
2521
|
type: "redacted-reasoning";
|
|
1519
2522
|
}
|
|
1520
2523
|
| {
|
|
1521
|
-
args
|
|
2524
|
+
args?: any;
|
|
2525
|
+
input: any;
|
|
1522
2526
|
providerExecuted?: boolean;
|
|
1523
2527
|
providerMetadata?: Record<
|
|
1524
2528
|
string,
|
|
@@ -1529,6 +2533,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1529
2533
|
toolName: string;
|
|
1530
2534
|
type: "tool-call";
|
|
1531
2535
|
}
|
|
2536
|
+
| {
|
|
2537
|
+
args: any;
|
|
2538
|
+
input?: any;
|
|
2539
|
+
providerExecuted?: boolean;
|
|
2540
|
+
providerMetadata?: Record<
|
|
2541
|
+
string,
|
|
2542
|
+
Record<string, any>
|
|
2543
|
+
>;
|
|
2544
|
+
providerOptions?: Record<
|
|
2545
|
+
string,
|
|
2546
|
+
Record<string, any>
|
|
2547
|
+
>;
|
|
2548
|
+
toolCallId: string;
|
|
2549
|
+
toolName: string;
|
|
2550
|
+
type: "tool-call";
|
|
2551
|
+
}
|
|
1532
2552
|
| {
|
|
1533
2553
|
args?: any;
|
|
1534
2554
|
experimental_content?: Array<
|
|
@@ -1537,19 +2557,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1537
2557
|
>;
|
|
1538
2558
|
isError?: boolean;
|
|
1539
2559
|
output?:
|
|
1540
|
-
| {
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
2560
|
+
| {
|
|
2561
|
+
providerOptions?: Record<
|
|
2562
|
+
string,
|
|
2563
|
+
Record<string, any>
|
|
2564
|
+
>;
|
|
2565
|
+
type: "text";
|
|
2566
|
+
value: string;
|
|
2567
|
+
}
|
|
2568
|
+
| {
|
|
2569
|
+
providerOptions?: Record<
|
|
2570
|
+
string,
|
|
2571
|
+
Record<string, any>
|
|
2572
|
+
>;
|
|
2573
|
+
type: "json";
|
|
2574
|
+
value: any;
|
|
2575
|
+
}
|
|
2576
|
+
| {
|
|
2577
|
+
providerOptions?: Record<
|
|
2578
|
+
string,
|
|
2579
|
+
Record<string, any>
|
|
2580
|
+
>;
|
|
2581
|
+
type: "error-text";
|
|
2582
|
+
value: string;
|
|
2583
|
+
}
|
|
2584
|
+
| {
|
|
2585
|
+
providerOptions?: Record<
|
|
2586
|
+
string,
|
|
2587
|
+
Record<string, any>
|
|
2588
|
+
>;
|
|
2589
|
+
type: "error-json";
|
|
2590
|
+
value: any;
|
|
2591
|
+
}
|
|
2592
|
+
| {
|
|
2593
|
+
providerOptions?: Record<
|
|
2594
|
+
string,
|
|
2595
|
+
Record<string, any>
|
|
2596
|
+
>;
|
|
2597
|
+
reason?: string;
|
|
2598
|
+
type: "execution-denied";
|
|
2599
|
+
}
|
|
1544
2600
|
| {
|
|
1545
2601
|
type: "content";
|
|
1546
2602
|
value: Array<
|
|
1547
|
-
| {
|
|
2603
|
+
| {
|
|
2604
|
+
providerOptions?: Record<
|
|
2605
|
+
string,
|
|
2606
|
+
Record<string, any>
|
|
2607
|
+
>;
|
|
2608
|
+
text: string;
|
|
2609
|
+
type: "text";
|
|
2610
|
+
}
|
|
1548
2611
|
| {
|
|
1549
2612
|
data: string;
|
|
1550
2613
|
mediaType: string;
|
|
1551
2614
|
type: "media";
|
|
1552
2615
|
}
|
|
2616
|
+
| {
|
|
2617
|
+
data: string;
|
|
2618
|
+
filename?: string;
|
|
2619
|
+
mediaType: string;
|
|
2620
|
+
providerOptions?: Record<
|
|
2621
|
+
string,
|
|
2622
|
+
Record<string, any>
|
|
2623
|
+
>;
|
|
2624
|
+
type: "file-data";
|
|
2625
|
+
}
|
|
2626
|
+
| {
|
|
2627
|
+
providerOptions?: Record<
|
|
2628
|
+
string,
|
|
2629
|
+
Record<string, any>
|
|
2630
|
+
>;
|
|
2631
|
+
type: "file-url";
|
|
2632
|
+
url: string;
|
|
2633
|
+
}
|
|
2634
|
+
| {
|
|
2635
|
+
fileId: string | Record<string, string>;
|
|
2636
|
+
providerOptions?: Record<
|
|
2637
|
+
string,
|
|
2638
|
+
Record<string, any>
|
|
2639
|
+
>;
|
|
2640
|
+
type: "file-id";
|
|
2641
|
+
}
|
|
2642
|
+
| {
|
|
2643
|
+
data: string;
|
|
2644
|
+
mediaType: string;
|
|
2645
|
+
providerOptions?: Record<
|
|
2646
|
+
string,
|
|
2647
|
+
Record<string, any>
|
|
2648
|
+
>;
|
|
2649
|
+
type: "image-data";
|
|
2650
|
+
}
|
|
2651
|
+
| {
|
|
2652
|
+
providerOptions?: Record<
|
|
2653
|
+
string,
|
|
2654
|
+
Record<string, any>
|
|
2655
|
+
>;
|
|
2656
|
+
type: "image-url";
|
|
2657
|
+
url: string;
|
|
2658
|
+
}
|
|
2659
|
+
| {
|
|
2660
|
+
fileId: string | Record<string, string>;
|
|
2661
|
+
providerOptions?: Record<
|
|
2662
|
+
string,
|
|
2663
|
+
Record<string, any>
|
|
2664
|
+
>;
|
|
2665
|
+
type: "image-file-id";
|
|
2666
|
+
}
|
|
2667
|
+
| {
|
|
2668
|
+
providerOptions?: Record<
|
|
2669
|
+
string,
|
|
2670
|
+
Record<string, any>
|
|
2671
|
+
>;
|
|
2672
|
+
type: "custom";
|
|
2673
|
+
}
|
|
1553
2674
|
>;
|
|
1554
2675
|
};
|
|
1555
2676
|
providerExecuted?: boolean;
|
|
@@ -1588,47 +2709,173 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1588
2709
|
title: string;
|
|
1589
2710
|
type: "source";
|
|
1590
2711
|
}
|
|
2712
|
+
| {
|
|
2713
|
+
approvalId: string;
|
|
2714
|
+
providerMetadata?: Record<
|
|
2715
|
+
string,
|
|
2716
|
+
Record<string, any>
|
|
2717
|
+
>;
|
|
2718
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
2719
|
+
toolCallId: string;
|
|
2720
|
+
type: "tool-approval-request";
|
|
2721
|
+
}
|
|
1591
2722
|
>;
|
|
1592
2723
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1593
2724
|
role: "assistant";
|
|
1594
2725
|
}
|
|
1595
2726
|
| {
|
|
1596
|
-
content: Array<
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
2727
|
+
content: Array<
|
|
2728
|
+
| {
|
|
2729
|
+
args?: any;
|
|
2730
|
+
experimental_content?: Array<
|
|
2731
|
+
| { text: string; type: "text" }
|
|
2732
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
2733
|
+
>;
|
|
2734
|
+
isError?: boolean;
|
|
2735
|
+
output?:
|
|
2736
|
+
| {
|
|
2737
|
+
providerOptions?: Record<
|
|
2738
|
+
string,
|
|
2739
|
+
Record<string, any>
|
|
2740
|
+
>;
|
|
2741
|
+
type: "text";
|
|
2742
|
+
value: string;
|
|
2743
|
+
}
|
|
2744
|
+
| {
|
|
2745
|
+
providerOptions?: Record<
|
|
2746
|
+
string,
|
|
2747
|
+
Record<string, any>
|
|
2748
|
+
>;
|
|
2749
|
+
type: "json";
|
|
2750
|
+
value: any;
|
|
2751
|
+
}
|
|
2752
|
+
| {
|
|
2753
|
+
providerOptions?: Record<
|
|
2754
|
+
string,
|
|
2755
|
+
Record<string, any>
|
|
2756
|
+
>;
|
|
2757
|
+
type: "error-text";
|
|
2758
|
+
value: string;
|
|
2759
|
+
}
|
|
2760
|
+
| {
|
|
2761
|
+
providerOptions?: Record<
|
|
2762
|
+
string,
|
|
2763
|
+
Record<string, any>
|
|
2764
|
+
>;
|
|
2765
|
+
type: "error-json";
|
|
2766
|
+
value: any;
|
|
2767
|
+
}
|
|
2768
|
+
| {
|
|
2769
|
+
providerOptions?: Record<
|
|
2770
|
+
string,
|
|
2771
|
+
Record<string, any>
|
|
2772
|
+
>;
|
|
2773
|
+
reason?: string;
|
|
2774
|
+
type: "execution-denied";
|
|
2775
|
+
}
|
|
2776
|
+
| {
|
|
2777
|
+
type: "content";
|
|
2778
|
+
value: Array<
|
|
2779
|
+
| {
|
|
2780
|
+
providerOptions?: Record<
|
|
2781
|
+
string,
|
|
2782
|
+
Record<string, any>
|
|
2783
|
+
>;
|
|
2784
|
+
text: string;
|
|
2785
|
+
type: "text";
|
|
2786
|
+
}
|
|
2787
|
+
| {
|
|
2788
|
+
data: string;
|
|
2789
|
+
mediaType: string;
|
|
2790
|
+
type: "media";
|
|
2791
|
+
}
|
|
2792
|
+
| {
|
|
2793
|
+
data: string;
|
|
2794
|
+
filename?: string;
|
|
2795
|
+
mediaType: string;
|
|
2796
|
+
providerOptions?: Record<
|
|
2797
|
+
string,
|
|
2798
|
+
Record<string, any>
|
|
2799
|
+
>;
|
|
2800
|
+
type: "file-data";
|
|
2801
|
+
}
|
|
2802
|
+
| {
|
|
2803
|
+
providerOptions?: Record<
|
|
2804
|
+
string,
|
|
2805
|
+
Record<string, any>
|
|
2806
|
+
>;
|
|
2807
|
+
type: "file-url";
|
|
2808
|
+
url: string;
|
|
2809
|
+
}
|
|
2810
|
+
| {
|
|
2811
|
+
fileId: string | Record<string, string>;
|
|
2812
|
+
providerOptions?: Record<
|
|
2813
|
+
string,
|
|
2814
|
+
Record<string, any>
|
|
2815
|
+
>;
|
|
2816
|
+
type: "file-id";
|
|
2817
|
+
}
|
|
2818
|
+
| {
|
|
2819
|
+
data: string;
|
|
2820
|
+
mediaType: string;
|
|
2821
|
+
providerOptions?: Record<
|
|
2822
|
+
string,
|
|
2823
|
+
Record<string, any>
|
|
2824
|
+
>;
|
|
2825
|
+
type: "image-data";
|
|
2826
|
+
}
|
|
2827
|
+
| {
|
|
2828
|
+
providerOptions?: Record<
|
|
2829
|
+
string,
|
|
2830
|
+
Record<string, any>
|
|
2831
|
+
>;
|
|
2832
|
+
type: "image-url";
|
|
2833
|
+
url: string;
|
|
2834
|
+
}
|
|
2835
|
+
| {
|
|
2836
|
+
fileId: string | Record<string, string>;
|
|
2837
|
+
providerOptions?: Record<
|
|
2838
|
+
string,
|
|
2839
|
+
Record<string, any>
|
|
2840
|
+
>;
|
|
2841
|
+
type: "image-file-id";
|
|
2842
|
+
}
|
|
2843
|
+
| {
|
|
2844
|
+
providerOptions?: Record<
|
|
2845
|
+
string,
|
|
2846
|
+
Record<string, any>
|
|
2847
|
+
>;
|
|
2848
|
+
type: "custom";
|
|
2849
|
+
}
|
|
2850
|
+
>;
|
|
2851
|
+
};
|
|
2852
|
+
providerExecuted?: boolean;
|
|
2853
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
2854
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
2855
|
+
result?: any;
|
|
2856
|
+
toolCallId: string;
|
|
2857
|
+
toolName: string;
|
|
2858
|
+
type: "tool-result";
|
|
2859
|
+
}
|
|
2860
|
+
| {
|
|
2861
|
+
approvalId: string;
|
|
2862
|
+
approved: boolean;
|
|
2863
|
+
providerExecuted?: boolean;
|
|
2864
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
2865
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
2866
|
+
reason?: string;
|
|
2867
|
+
type: "tool-approval-response";
|
|
2868
|
+
}
|
|
2869
|
+
>;
|
|
2870
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
2871
|
+
role: "tool";
|
|
2872
|
+
}
|
|
2873
|
+
| {
|
|
2874
|
+
content: string;
|
|
2875
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
2876
|
+
role: "system";
|
|
2877
|
+
};
|
|
2878
|
+
model?: string;
|
|
1632
2879
|
order: number;
|
|
1633
2880
|
provider?: string;
|
|
1634
2881
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
@@ -1729,6 +2976,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1729
2976
|
}
|
|
1730
2977
|
| {
|
|
1731
2978
|
image: string | ArrayBuffer;
|
|
2979
|
+
mediaType?: string;
|
|
1732
2980
|
mimeType?: string;
|
|
1733
2981
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1734
2982
|
type: "image";
|
|
@@ -1736,7 +2984,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1736
2984
|
| {
|
|
1737
2985
|
data: string | ArrayBuffer;
|
|
1738
2986
|
filename?: string;
|
|
1739
|
-
|
|
2987
|
+
mediaType?: string;
|
|
2988
|
+
mimeType?: string;
|
|
1740
2989
|
providerMetadata?: Record<
|
|
1741
2990
|
string,
|
|
1742
2991
|
Record<string, any>
|
|
@@ -1764,7 +3013,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1764
3013
|
| {
|
|
1765
3014
|
data: string | ArrayBuffer;
|
|
1766
3015
|
filename?: string;
|
|
1767
|
-
|
|
3016
|
+
mediaType?: string;
|
|
3017
|
+
mimeType?: string;
|
|
1768
3018
|
providerMetadata?: Record<
|
|
1769
3019
|
string,
|
|
1770
3020
|
Record<string, any>
|
|
@@ -1792,7 +3042,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1792
3042
|
type: "redacted-reasoning";
|
|
1793
3043
|
}
|
|
1794
3044
|
| {
|
|
1795
|
-
args
|
|
3045
|
+
args?: any;
|
|
3046
|
+
input: any;
|
|
1796
3047
|
providerExecuted?: boolean;
|
|
1797
3048
|
providerMetadata?: Record<
|
|
1798
3049
|
string,
|
|
@@ -1803,6 +3054,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1803
3054
|
toolName: string;
|
|
1804
3055
|
type: "tool-call";
|
|
1805
3056
|
}
|
|
3057
|
+
| {
|
|
3058
|
+
args: any;
|
|
3059
|
+
input?: any;
|
|
3060
|
+
providerExecuted?: boolean;
|
|
3061
|
+
providerMetadata?: Record<
|
|
3062
|
+
string,
|
|
3063
|
+
Record<string, any>
|
|
3064
|
+
>;
|
|
3065
|
+
providerOptions?: Record<
|
|
3066
|
+
string,
|
|
3067
|
+
Record<string, any>
|
|
3068
|
+
>;
|
|
3069
|
+
toolCallId: string;
|
|
3070
|
+
toolName: string;
|
|
3071
|
+
type: "tool-call";
|
|
3072
|
+
}
|
|
1806
3073
|
| {
|
|
1807
3074
|
args?: any;
|
|
1808
3075
|
experimental_content?: Array<
|
|
@@ -1811,19 +3078,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1811
3078
|
>;
|
|
1812
3079
|
isError?: boolean;
|
|
1813
3080
|
output?:
|
|
1814
|
-
| {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
3081
|
+
| {
|
|
3082
|
+
providerOptions?: Record<
|
|
3083
|
+
string,
|
|
3084
|
+
Record<string, any>
|
|
3085
|
+
>;
|
|
3086
|
+
type: "text";
|
|
3087
|
+
value: string;
|
|
3088
|
+
}
|
|
3089
|
+
| {
|
|
3090
|
+
providerOptions?: Record<
|
|
3091
|
+
string,
|
|
3092
|
+
Record<string, any>
|
|
3093
|
+
>;
|
|
3094
|
+
type: "json";
|
|
3095
|
+
value: any;
|
|
3096
|
+
}
|
|
3097
|
+
| {
|
|
3098
|
+
providerOptions?: Record<
|
|
3099
|
+
string,
|
|
3100
|
+
Record<string, any>
|
|
3101
|
+
>;
|
|
3102
|
+
type: "error-text";
|
|
3103
|
+
value: string;
|
|
3104
|
+
}
|
|
3105
|
+
| {
|
|
3106
|
+
providerOptions?: Record<
|
|
3107
|
+
string,
|
|
3108
|
+
Record<string, any>
|
|
3109
|
+
>;
|
|
3110
|
+
type: "error-json";
|
|
3111
|
+
value: any;
|
|
3112
|
+
}
|
|
3113
|
+
| {
|
|
3114
|
+
providerOptions?: Record<
|
|
3115
|
+
string,
|
|
3116
|
+
Record<string, any>
|
|
3117
|
+
>;
|
|
3118
|
+
reason?: string;
|
|
3119
|
+
type: "execution-denied";
|
|
3120
|
+
}
|
|
1818
3121
|
| {
|
|
1819
3122
|
type: "content";
|
|
1820
3123
|
value: Array<
|
|
1821
|
-
| {
|
|
3124
|
+
| {
|
|
3125
|
+
providerOptions?: Record<
|
|
3126
|
+
string,
|
|
3127
|
+
Record<string, any>
|
|
3128
|
+
>;
|
|
3129
|
+
text: string;
|
|
3130
|
+
type: "text";
|
|
3131
|
+
}
|
|
1822
3132
|
| {
|
|
1823
3133
|
data: string;
|
|
1824
3134
|
mediaType: string;
|
|
1825
3135
|
type: "media";
|
|
1826
3136
|
}
|
|
3137
|
+
| {
|
|
3138
|
+
data: string;
|
|
3139
|
+
filename?: string;
|
|
3140
|
+
mediaType: string;
|
|
3141
|
+
providerOptions?: Record<
|
|
3142
|
+
string,
|
|
3143
|
+
Record<string, any>
|
|
3144
|
+
>;
|
|
3145
|
+
type: "file-data";
|
|
3146
|
+
}
|
|
3147
|
+
| {
|
|
3148
|
+
providerOptions?: Record<
|
|
3149
|
+
string,
|
|
3150
|
+
Record<string, any>
|
|
3151
|
+
>;
|
|
3152
|
+
type: "file-url";
|
|
3153
|
+
url: string;
|
|
3154
|
+
}
|
|
3155
|
+
| {
|
|
3156
|
+
fileId: string | Record<string, string>;
|
|
3157
|
+
providerOptions?: Record<
|
|
3158
|
+
string,
|
|
3159
|
+
Record<string, any>
|
|
3160
|
+
>;
|
|
3161
|
+
type: "file-id";
|
|
3162
|
+
}
|
|
3163
|
+
| {
|
|
3164
|
+
data: string;
|
|
3165
|
+
mediaType: string;
|
|
3166
|
+
providerOptions?: Record<
|
|
3167
|
+
string,
|
|
3168
|
+
Record<string, any>
|
|
3169
|
+
>;
|
|
3170
|
+
type: "image-data";
|
|
3171
|
+
}
|
|
3172
|
+
| {
|
|
3173
|
+
providerOptions?: Record<
|
|
3174
|
+
string,
|
|
3175
|
+
Record<string, any>
|
|
3176
|
+
>;
|
|
3177
|
+
type: "image-url";
|
|
3178
|
+
url: string;
|
|
3179
|
+
}
|
|
3180
|
+
| {
|
|
3181
|
+
fileId: string | Record<string, string>;
|
|
3182
|
+
providerOptions?: Record<
|
|
3183
|
+
string,
|
|
3184
|
+
Record<string, any>
|
|
3185
|
+
>;
|
|
3186
|
+
type: "image-file-id";
|
|
3187
|
+
}
|
|
3188
|
+
| {
|
|
3189
|
+
providerOptions?: Record<
|
|
3190
|
+
string,
|
|
3191
|
+
Record<string, any>
|
|
3192
|
+
>;
|
|
3193
|
+
type: "custom";
|
|
3194
|
+
}
|
|
1827
3195
|
>;
|
|
1828
3196
|
};
|
|
1829
3197
|
providerExecuted?: boolean;
|
|
@@ -1862,38 +3230,164 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1862
3230
|
title: string;
|
|
1863
3231
|
type: "source";
|
|
1864
3232
|
}
|
|
3233
|
+
| {
|
|
3234
|
+
approvalId: string;
|
|
3235
|
+
providerMetadata?: Record<
|
|
3236
|
+
string,
|
|
3237
|
+
Record<string, any>
|
|
3238
|
+
>;
|
|
3239
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3240
|
+
toolCallId: string;
|
|
3241
|
+
type: "tool-approval-request";
|
|
3242
|
+
}
|
|
1865
3243
|
>;
|
|
1866
3244
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1867
3245
|
role: "assistant";
|
|
1868
3246
|
}
|
|
1869
3247
|
| {
|
|
1870
|
-
content: Array<
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
3248
|
+
content: Array<
|
|
3249
|
+
| {
|
|
3250
|
+
args?: any;
|
|
3251
|
+
experimental_content?: Array<
|
|
3252
|
+
| { text: string; type: "text" }
|
|
3253
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
3254
|
+
>;
|
|
3255
|
+
isError?: boolean;
|
|
3256
|
+
output?:
|
|
3257
|
+
| {
|
|
3258
|
+
providerOptions?: Record<
|
|
3259
|
+
string,
|
|
3260
|
+
Record<string, any>
|
|
3261
|
+
>;
|
|
3262
|
+
type: "text";
|
|
3263
|
+
value: string;
|
|
3264
|
+
}
|
|
3265
|
+
| {
|
|
3266
|
+
providerOptions?: Record<
|
|
3267
|
+
string,
|
|
3268
|
+
Record<string, any>
|
|
3269
|
+
>;
|
|
3270
|
+
type: "json";
|
|
3271
|
+
value: any;
|
|
3272
|
+
}
|
|
3273
|
+
| {
|
|
3274
|
+
providerOptions?: Record<
|
|
3275
|
+
string,
|
|
3276
|
+
Record<string, any>
|
|
3277
|
+
>;
|
|
3278
|
+
type: "error-text";
|
|
3279
|
+
value: string;
|
|
3280
|
+
}
|
|
3281
|
+
| {
|
|
3282
|
+
providerOptions?: Record<
|
|
3283
|
+
string,
|
|
3284
|
+
Record<string, any>
|
|
3285
|
+
>;
|
|
3286
|
+
type: "error-json";
|
|
3287
|
+
value: any;
|
|
3288
|
+
}
|
|
3289
|
+
| {
|
|
3290
|
+
providerOptions?: Record<
|
|
3291
|
+
string,
|
|
3292
|
+
Record<string, any>
|
|
3293
|
+
>;
|
|
3294
|
+
reason?: string;
|
|
3295
|
+
type: "execution-denied";
|
|
3296
|
+
}
|
|
3297
|
+
| {
|
|
3298
|
+
type: "content";
|
|
3299
|
+
value: Array<
|
|
3300
|
+
| {
|
|
3301
|
+
providerOptions?: Record<
|
|
3302
|
+
string,
|
|
3303
|
+
Record<string, any>
|
|
3304
|
+
>;
|
|
3305
|
+
text: string;
|
|
3306
|
+
type: "text";
|
|
3307
|
+
}
|
|
3308
|
+
| {
|
|
3309
|
+
data: string;
|
|
3310
|
+
mediaType: string;
|
|
3311
|
+
type: "media";
|
|
3312
|
+
}
|
|
3313
|
+
| {
|
|
3314
|
+
data: string;
|
|
3315
|
+
filename?: string;
|
|
3316
|
+
mediaType: string;
|
|
3317
|
+
providerOptions?: Record<
|
|
3318
|
+
string,
|
|
3319
|
+
Record<string, any>
|
|
3320
|
+
>;
|
|
3321
|
+
type: "file-data";
|
|
3322
|
+
}
|
|
3323
|
+
| {
|
|
3324
|
+
providerOptions?: Record<
|
|
3325
|
+
string,
|
|
3326
|
+
Record<string, any>
|
|
3327
|
+
>;
|
|
3328
|
+
type: "file-url";
|
|
3329
|
+
url: string;
|
|
3330
|
+
}
|
|
3331
|
+
| {
|
|
3332
|
+
fileId: string | Record<string, string>;
|
|
3333
|
+
providerOptions?: Record<
|
|
3334
|
+
string,
|
|
3335
|
+
Record<string, any>
|
|
3336
|
+
>;
|
|
3337
|
+
type: "file-id";
|
|
3338
|
+
}
|
|
3339
|
+
| {
|
|
3340
|
+
data: string;
|
|
3341
|
+
mediaType: string;
|
|
3342
|
+
providerOptions?: Record<
|
|
3343
|
+
string,
|
|
3344
|
+
Record<string, any>
|
|
3345
|
+
>;
|
|
3346
|
+
type: "image-data";
|
|
3347
|
+
}
|
|
3348
|
+
| {
|
|
3349
|
+
providerOptions?: Record<
|
|
3350
|
+
string,
|
|
3351
|
+
Record<string, any>
|
|
3352
|
+
>;
|
|
3353
|
+
type: "image-url";
|
|
3354
|
+
url: string;
|
|
3355
|
+
}
|
|
3356
|
+
| {
|
|
3357
|
+
fileId: string | Record<string, string>;
|
|
3358
|
+
providerOptions?: Record<
|
|
3359
|
+
string,
|
|
3360
|
+
Record<string, any>
|
|
3361
|
+
>;
|
|
3362
|
+
type: "image-file-id";
|
|
3363
|
+
}
|
|
3364
|
+
| {
|
|
3365
|
+
providerOptions?: Record<
|
|
3366
|
+
string,
|
|
3367
|
+
Record<string, any>
|
|
3368
|
+
>;
|
|
3369
|
+
type: "custom";
|
|
3370
|
+
}
|
|
3371
|
+
>;
|
|
3372
|
+
};
|
|
3373
|
+
providerExecuted?: boolean;
|
|
3374
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
3375
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3376
|
+
result?: any;
|
|
3377
|
+
toolCallId: string;
|
|
3378
|
+
toolName: string;
|
|
3379
|
+
type: "tool-result";
|
|
3380
|
+
}
|
|
3381
|
+
| {
|
|
3382
|
+
approvalId: string;
|
|
3383
|
+
approved: boolean;
|
|
3384
|
+
providerExecuted?: boolean;
|
|
3385
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
3386
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3387
|
+
reason?: string;
|
|
3388
|
+
type: "tool-approval-response";
|
|
3389
|
+
}
|
|
3390
|
+
>;
|
|
1897
3391
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1898
3392
|
role: "tool";
|
|
1899
3393
|
}
|
|
@@ -1996,6 +3490,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
1996
3490
|
}
|
|
1997
3491
|
| {
|
|
1998
3492
|
image: string | ArrayBuffer;
|
|
3493
|
+
mediaType?: string;
|
|
1999
3494
|
mimeType?: string;
|
|
2000
3495
|
providerOptions?: Record<
|
|
2001
3496
|
string,
|
|
@@ -2006,7 +3501,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2006
3501
|
| {
|
|
2007
3502
|
data: string | ArrayBuffer;
|
|
2008
3503
|
filename?: string;
|
|
2009
|
-
|
|
3504
|
+
mediaType?: string;
|
|
3505
|
+
mimeType?: string;
|
|
2010
3506
|
providerMetadata?: Record<
|
|
2011
3507
|
string,
|
|
2012
3508
|
Record<string, any>
|
|
@@ -2040,7 +3536,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2040
3536
|
| {
|
|
2041
3537
|
data: string | ArrayBuffer;
|
|
2042
3538
|
filename?: string;
|
|
2043
|
-
|
|
3539
|
+
mediaType?: string;
|
|
3540
|
+
mimeType?: string;
|
|
2044
3541
|
providerMetadata?: Record<
|
|
2045
3542
|
string,
|
|
2046
3543
|
Record<string, any>
|
|
@@ -2076,8 +3573,25 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2076
3573
|
>;
|
|
2077
3574
|
type: "redacted-reasoning";
|
|
2078
3575
|
}
|
|
3576
|
+
| {
|
|
3577
|
+
args?: any;
|
|
3578
|
+
input: any;
|
|
3579
|
+
providerExecuted?: boolean;
|
|
3580
|
+
providerMetadata?: Record<
|
|
3581
|
+
string,
|
|
3582
|
+
Record<string, any>
|
|
3583
|
+
>;
|
|
3584
|
+
providerOptions?: Record<
|
|
3585
|
+
string,
|
|
3586
|
+
Record<string, any>
|
|
3587
|
+
>;
|
|
3588
|
+
toolCallId: string;
|
|
3589
|
+
toolName: string;
|
|
3590
|
+
type: "tool-call";
|
|
3591
|
+
}
|
|
2079
3592
|
| {
|
|
2080
3593
|
args: any;
|
|
3594
|
+
input?: any;
|
|
2081
3595
|
providerExecuted?: boolean;
|
|
2082
3596
|
providerMetadata?: Record<
|
|
2083
3597
|
string,
|
|
@@ -2103,19 +3617,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2103
3617
|
>;
|
|
2104
3618
|
isError?: boolean;
|
|
2105
3619
|
output?:
|
|
2106
|
-
| {
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
3620
|
+
| {
|
|
3621
|
+
providerOptions?: Record<
|
|
3622
|
+
string,
|
|
3623
|
+
Record<string, any>
|
|
3624
|
+
>;
|
|
3625
|
+
type: "text";
|
|
3626
|
+
value: string;
|
|
3627
|
+
}
|
|
3628
|
+
| {
|
|
3629
|
+
providerOptions?: Record<
|
|
3630
|
+
string,
|
|
3631
|
+
Record<string, any>
|
|
3632
|
+
>;
|
|
3633
|
+
type: "json";
|
|
3634
|
+
value: any;
|
|
3635
|
+
}
|
|
3636
|
+
| {
|
|
3637
|
+
providerOptions?: Record<
|
|
3638
|
+
string,
|
|
3639
|
+
Record<string, any>
|
|
3640
|
+
>;
|
|
3641
|
+
type: "error-text";
|
|
3642
|
+
value: string;
|
|
3643
|
+
}
|
|
3644
|
+
| {
|
|
3645
|
+
providerOptions?: Record<
|
|
3646
|
+
string,
|
|
3647
|
+
Record<string, any>
|
|
3648
|
+
>;
|
|
3649
|
+
type: "error-json";
|
|
3650
|
+
value: any;
|
|
3651
|
+
}
|
|
3652
|
+
| {
|
|
3653
|
+
providerOptions?: Record<
|
|
3654
|
+
string,
|
|
3655
|
+
Record<string, any>
|
|
3656
|
+
>;
|
|
3657
|
+
reason?: string;
|
|
3658
|
+
type: "execution-denied";
|
|
3659
|
+
}
|
|
2110
3660
|
| {
|
|
2111
3661
|
type: "content";
|
|
2112
3662
|
value: Array<
|
|
2113
|
-
| {
|
|
3663
|
+
| {
|
|
3664
|
+
providerOptions?: Record<
|
|
3665
|
+
string,
|
|
3666
|
+
Record<string, any>
|
|
3667
|
+
>;
|
|
3668
|
+
text: string;
|
|
3669
|
+
type: "text";
|
|
3670
|
+
}
|
|
2114
3671
|
| {
|
|
2115
3672
|
data: string;
|
|
2116
3673
|
mediaType: string;
|
|
2117
3674
|
type: "media";
|
|
2118
3675
|
}
|
|
3676
|
+
| {
|
|
3677
|
+
data: string;
|
|
3678
|
+
filename?: string;
|
|
3679
|
+
mediaType: string;
|
|
3680
|
+
providerOptions?: Record<
|
|
3681
|
+
string,
|
|
3682
|
+
Record<string, any>
|
|
3683
|
+
>;
|
|
3684
|
+
type: "file-data";
|
|
3685
|
+
}
|
|
3686
|
+
| {
|
|
3687
|
+
providerOptions?: Record<
|
|
3688
|
+
string,
|
|
3689
|
+
Record<string, any>
|
|
3690
|
+
>;
|
|
3691
|
+
type: "file-url";
|
|
3692
|
+
url: string;
|
|
3693
|
+
}
|
|
3694
|
+
| {
|
|
3695
|
+
fileId: string | Record<string, string>;
|
|
3696
|
+
providerOptions?: Record<
|
|
3697
|
+
string,
|
|
3698
|
+
Record<string, any>
|
|
3699
|
+
>;
|
|
3700
|
+
type: "file-id";
|
|
3701
|
+
}
|
|
3702
|
+
| {
|
|
3703
|
+
data: string;
|
|
3704
|
+
mediaType: string;
|
|
3705
|
+
providerOptions?: Record<
|
|
3706
|
+
string,
|
|
3707
|
+
Record<string, any>
|
|
3708
|
+
>;
|
|
3709
|
+
type: "image-data";
|
|
3710
|
+
}
|
|
3711
|
+
| {
|
|
3712
|
+
providerOptions?: Record<
|
|
3713
|
+
string,
|
|
3714
|
+
Record<string, any>
|
|
3715
|
+
>;
|
|
3716
|
+
type: "image-url";
|
|
3717
|
+
url: string;
|
|
3718
|
+
}
|
|
3719
|
+
| {
|
|
3720
|
+
fileId: string | Record<string, string>;
|
|
3721
|
+
providerOptions?: Record<
|
|
3722
|
+
string,
|
|
3723
|
+
Record<string, any>
|
|
3724
|
+
>;
|
|
3725
|
+
type: "image-file-id";
|
|
3726
|
+
}
|
|
3727
|
+
| {
|
|
3728
|
+
providerOptions?: Record<
|
|
3729
|
+
string,
|
|
3730
|
+
Record<string, any>
|
|
3731
|
+
>;
|
|
3732
|
+
type: "custom";
|
|
3733
|
+
}
|
|
2119
3734
|
>;
|
|
2120
3735
|
};
|
|
2121
3736
|
providerExecuted?: boolean;
|
|
@@ -2163,38 +3778,167 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2163
3778
|
title: string;
|
|
2164
3779
|
type: "source";
|
|
2165
3780
|
}
|
|
3781
|
+
| {
|
|
3782
|
+
approvalId: string;
|
|
3783
|
+
providerMetadata?: Record<
|
|
3784
|
+
string,
|
|
3785
|
+
Record<string, any>
|
|
3786
|
+
>;
|
|
3787
|
+
providerOptions?: Record<
|
|
3788
|
+
string,
|
|
3789
|
+
Record<string, any>
|
|
3790
|
+
>;
|
|
3791
|
+
toolCallId: string;
|
|
3792
|
+
type: "tool-approval-request";
|
|
3793
|
+
}
|
|
2166
3794
|
>;
|
|
2167
3795
|
providerOptions?: Record<string, Record<string, any>>;
|
|
2168
3796
|
role: "assistant";
|
|
2169
3797
|
}
|
|
2170
3798
|
| {
|
|
2171
|
-
content: Array<
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
3799
|
+
content: Array<
|
|
3800
|
+
| {
|
|
3801
|
+
args?: any;
|
|
3802
|
+
experimental_content?: Array<
|
|
3803
|
+
| { text: string; type: "text" }
|
|
3804
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
3805
|
+
>;
|
|
3806
|
+
isError?: boolean;
|
|
3807
|
+
output?:
|
|
3808
|
+
| {
|
|
3809
|
+
providerOptions?: Record<
|
|
3810
|
+
string,
|
|
3811
|
+
Record<string, any>
|
|
3812
|
+
>;
|
|
3813
|
+
type: "text";
|
|
3814
|
+
value: string;
|
|
3815
|
+
}
|
|
3816
|
+
| {
|
|
3817
|
+
providerOptions?: Record<
|
|
3818
|
+
string,
|
|
3819
|
+
Record<string, any>
|
|
3820
|
+
>;
|
|
3821
|
+
type: "json";
|
|
3822
|
+
value: any;
|
|
3823
|
+
}
|
|
3824
|
+
| {
|
|
3825
|
+
providerOptions?: Record<
|
|
3826
|
+
string,
|
|
3827
|
+
Record<string, any>
|
|
3828
|
+
>;
|
|
3829
|
+
type: "error-text";
|
|
3830
|
+
value: string;
|
|
3831
|
+
}
|
|
3832
|
+
| {
|
|
3833
|
+
providerOptions?: Record<
|
|
3834
|
+
string,
|
|
3835
|
+
Record<string, any>
|
|
3836
|
+
>;
|
|
3837
|
+
type: "error-json";
|
|
3838
|
+
value: any;
|
|
3839
|
+
}
|
|
3840
|
+
| {
|
|
3841
|
+
providerOptions?: Record<
|
|
3842
|
+
string,
|
|
3843
|
+
Record<string, any>
|
|
3844
|
+
>;
|
|
3845
|
+
reason?: string;
|
|
3846
|
+
type: "execution-denied";
|
|
3847
|
+
}
|
|
3848
|
+
| {
|
|
3849
|
+
type: "content";
|
|
3850
|
+
value: Array<
|
|
3851
|
+
| {
|
|
3852
|
+
providerOptions?: Record<
|
|
3853
|
+
string,
|
|
3854
|
+
Record<string, any>
|
|
3855
|
+
>;
|
|
3856
|
+
text: string;
|
|
3857
|
+
type: "text";
|
|
3858
|
+
}
|
|
3859
|
+
| {
|
|
3860
|
+
data: string;
|
|
3861
|
+
mediaType: string;
|
|
3862
|
+
type: "media";
|
|
3863
|
+
}
|
|
3864
|
+
| {
|
|
3865
|
+
data: string;
|
|
3866
|
+
filename?: string;
|
|
3867
|
+
mediaType: string;
|
|
3868
|
+
providerOptions?: Record<
|
|
3869
|
+
string,
|
|
3870
|
+
Record<string, any>
|
|
3871
|
+
>;
|
|
3872
|
+
type: "file-data";
|
|
3873
|
+
}
|
|
3874
|
+
| {
|
|
3875
|
+
providerOptions?: Record<
|
|
3876
|
+
string,
|
|
3877
|
+
Record<string, any>
|
|
3878
|
+
>;
|
|
3879
|
+
type: "file-url";
|
|
3880
|
+
url: string;
|
|
3881
|
+
}
|
|
3882
|
+
| {
|
|
3883
|
+
fileId: string | Record<string, string>;
|
|
3884
|
+
providerOptions?: Record<
|
|
3885
|
+
string,
|
|
3886
|
+
Record<string, any>
|
|
3887
|
+
>;
|
|
3888
|
+
type: "file-id";
|
|
3889
|
+
}
|
|
3890
|
+
| {
|
|
3891
|
+
data: string;
|
|
3892
|
+
mediaType: string;
|
|
3893
|
+
providerOptions?: Record<
|
|
3894
|
+
string,
|
|
3895
|
+
Record<string, any>
|
|
3896
|
+
>;
|
|
3897
|
+
type: "image-data";
|
|
3898
|
+
}
|
|
3899
|
+
| {
|
|
3900
|
+
providerOptions?: Record<
|
|
3901
|
+
string,
|
|
3902
|
+
Record<string, any>
|
|
3903
|
+
>;
|
|
3904
|
+
type: "image-url";
|
|
3905
|
+
url: string;
|
|
3906
|
+
}
|
|
3907
|
+
| {
|
|
3908
|
+
fileId: string | Record<string, string>;
|
|
3909
|
+
providerOptions?: Record<
|
|
3910
|
+
string,
|
|
3911
|
+
Record<string, any>
|
|
3912
|
+
>;
|
|
3913
|
+
type: "image-file-id";
|
|
3914
|
+
}
|
|
3915
|
+
| {
|
|
3916
|
+
providerOptions?: Record<
|
|
3917
|
+
string,
|
|
3918
|
+
Record<string, any>
|
|
3919
|
+
>;
|
|
3920
|
+
type: "custom";
|
|
3921
|
+
}
|
|
3922
|
+
>;
|
|
3923
|
+
};
|
|
3924
|
+
providerExecuted?: boolean;
|
|
3925
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
3926
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3927
|
+
result?: any;
|
|
3928
|
+
toolCallId: string;
|
|
3929
|
+
toolName: string;
|
|
3930
|
+
type: "tool-result";
|
|
3931
|
+
}
|
|
3932
|
+
| {
|
|
3933
|
+
approvalId: string;
|
|
3934
|
+
approved: boolean;
|
|
3935
|
+
providerExecuted?: boolean;
|
|
3936
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
3937
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
3938
|
+
reason?: string;
|
|
3939
|
+
type: "tool-approval-response";
|
|
3940
|
+
}
|
|
3941
|
+
>;
|
|
2198
3942
|
providerOptions?: Record<string, Record<string, any>>;
|
|
2199
3943
|
role: "tool";
|
|
2200
3944
|
}
|
|
@@ -2241,6 +3985,7 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2241
3985
|
}
|
|
2242
3986
|
| {
|
|
2243
3987
|
image: string | ArrayBuffer;
|
|
3988
|
+
mediaType?: string;
|
|
2244
3989
|
mimeType?: string;
|
|
2245
3990
|
providerOptions?: Record<string, Record<string, any>>;
|
|
2246
3991
|
type: "image";
|
|
@@ -2248,7 +3993,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2248
3993
|
| {
|
|
2249
3994
|
data: string | ArrayBuffer;
|
|
2250
3995
|
filename?: string;
|
|
2251
|
-
|
|
3996
|
+
mediaType?: string;
|
|
3997
|
+
mimeType?: string;
|
|
2252
3998
|
providerMetadata?: Record<
|
|
2253
3999
|
string,
|
|
2254
4000
|
Record<string, any>
|
|
@@ -2276,7 +4022,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2276
4022
|
| {
|
|
2277
4023
|
data: string | ArrayBuffer;
|
|
2278
4024
|
filename?: string;
|
|
2279
|
-
|
|
4025
|
+
mediaType?: string;
|
|
4026
|
+
mimeType?: string;
|
|
2280
4027
|
providerMetadata?: Record<
|
|
2281
4028
|
string,
|
|
2282
4029
|
Record<string, any>
|
|
@@ -2304,7 +4051,8 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2304
4051
|
type: "redacted-reasoning";
|
|
2305
4052
|
}
|
|
2306
4053
|
| {
|
|
2307
|
-
args
|
|
4054
|
+
args?: any;
|
|
4055
|
+
input: any;
|
|
2308
4056
|
providerExecuted?: boolean;
|
|
2309
4057
|
providerMetadata?: Record<
|
|
2310
4058
|
string,
|
|
@@ -2315,6 +4063,22 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2315
4063
|
toolName: string;
|
|
2316
4064
|
type: "tool-call";
|
|
2317
4065
|
}
|
|
4066
|
+
| {
|
|
4067
|
+
args: any;
|
|
4068
|
+
input?: any;
|
|
4069
|
+
providerExecuted?: boolean;
|
|
4070
|
+
providerMetadata?: Record<
|
|
4071
|
+
string,
|
|
4072
|
+
Record<string, any>
|
|
4073
|
+
>;
|
|
4074
|
+
providerOptions?: Record<
|
|
4075
|
+
string,
|
|
4076
|
+
Record<string, any>
|
|
4077
|
+
>;
|
|
4078
|
+
toolCallId: string;
|
|
4079
|
+
toolName: string;
|
|
4080
|
+
type: "tool-call";
|
|
4081
|
+
}
|
|
2318
4082
|
| {
|
|
2319
4083
|
args?: any;
|
|
2320
4084
|
experimental_content?: Array<
|
|
@@ -2323,19 +4087,120 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2323
4087
|
>;
|
|
2324
4088
|
isError?: boolean;
|
|
2325
4089
|
output?:
|
|
2326
|
-
| {
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
4090
|
+
| {
|
|
4091
|
+
providerOptions?: Record<
|
|
4092
|
+
string,
|
|
4093
|
+
Record<string, any>
|
|
4094
|
+
>;
|
|
4095
|
+
type: "text";
|
|
4096
|
+
value: string;
|
|
4097
|
+
}
|
|
4098
|
+
| {
|
|
4099
|
+
providerOptions?: Record<
|
|
4100
|
+
string,
|
|
4101
|
+
Record<string, any>
|
|
4102
|
+
>;
|
|
4103
|
+
type: "json";
|
|
4104
|
+
value: any;
|
|
4105
|
+
}
|
|
4106
|
+
| {
|
|
4107
|
+
providerOptions?: Record<
|
|
4108
|
+
string,
|
|
4109
|
+
Record<string, any>
|
|
4110
|
+
>;
|
|
4111
|
+
type: "error-text";
|
|
4112
|
+
value: string;
|
|
4113
|
+
}
|
|
4114
|
+
| {
|
|
4115
|
+
providerOptions?: Record<
|
|
4116
|
+
string,
|
|
4117
|
+
Record<string, any>
|
|
4118
|
+
>;
|
|
4119
|
+
type: "error-json";
|
|
4120
|
+
value: any;
|
|
4121
|
+
}
|
|
4122
|
+
| {
|
|
4123
|
+
providerOptions?: Record<
|
|
4124
|
+
string,
|
|
4125
|
+
Record<string, any>
|
|
4126
|
+
>;
|
|
4127
|
+
reason?: string;
|
|
4128
|
+
type: "execution-denied";
|
|
4129
|
+
}
|
|
2330
4130
|
| {
|
|
2331
4131
|
type: "content";
|
|
2332
4132
|
value: Array<
|
|
2333
|
-
| {
|
|
4133
|
+
| {
|
|
4134
|
+
providerOptions?: Record<
|
|
4135
|
+
string,
|
|
4136
|
+
Record<string, any>
|
|
4137
|
+
>;
|
|
4138
|
+
text: string;
|
|
4139
|
+
type: "text";
|
|
4140
|
+
}
|
|
2334
4141
|
| {
|
|
2335
4142
|
data: string;
|
|
2336
4143
|
mediaType: string;
|
|
2337
4144
|
type: "media";
|
|
2338
4145
|
}
|
|
4146
|
+
| {
|
|
4147
|
+
data: string;
|
|
4148
|
+
filename?: string;
|
|
4149
|
+
mediaType: string;
|
|
4150
|
+
providerOptions?: Record<
|
|
4151
|
+
string,
|
|
4152
|
+
Record<string, any>
|
|
4153
|
+
>;
|
|
4154
|
+
type: "file-data";
|
|
4155
|
+
}
|
|
4156
|
+
| {
|
|
4157
|
+
providerOptions?: Record<
|
|
4158
|
+
string,
|
|
4159
|
+
Record<string, any>
|
|
4160
|
+
>;
|
|
4161
|
+
type: "file-url";
|
|
4162
|
+
url: string;
|
|
4163
|
+
}
|
|
4164
|
+
| {
|
|
4165
|
+
fileId: string | Record<string, string>;
|
|
4166
|
+
providerOptions?: Record<
|
|
4167
|
+
string,
|
|
4168
|
+
Record<string, any>
|
|
4169
|
+
>;
|
|
4170
|
+
type: "file-id";
|
|
4171
|
+
}
|
|
4172
|
+
| {
|
|
4173
|
+
data: string;
|
|
4174
|
+
mediaType: string;
|
|
4175
|
+
providerOptions?: Record<
|
|
4176
|
+
string,
|
|
4177
|
+
Record<string, any>
|
|
4178
|
+
>;
|
|
4179
|
+
type: "image-data";
|
|
4180
|
+
}
|
|
4181
|
+
| {
|
|
4182
|
+
providerOptions?: Record<
|
|
4183
|
+
string,
|
|
4184
|
+
Record<string, any>
|
|
4185
|
+
>;
|
|
4186
|
+
type: "image-url";
|
|
4187
|
+
url: string;
|
|
4188
|
+
}
|
|
4189
|
+
| {
|
|
4190
|
+
fileId: string | Record<string, string>;
|
|
4191
|
+
providerOptions?: Record<
|
|
4192
|
+
string,
|
|
4193
|
+
Record<string, any>
|
|
4194
|
+
>;
|
|
4195
|
+
type: "image-file-id";
|
|
4196
|
+
}
|
|
4197
|
+
| {
|
|
4198
|
+
providerOptions?: Record<
|
|
4199
|
+
string,
|
|
4200
|
+
Record<string, any>
|
|
4201
|
+
>;
|
|
4202
|
+
type: "custom";
|
|
4203
|
+
}
|
|
2339
4204
|
>;
|
|
2340
4205
|
};
|
|
2341
4206
|
providerExecuted?: boolean;
|
|
@@ -2374,38 +4239,164 @@ export type ComponentApi<Name extends string | undefined = string | undefined> =
|
|
|
2374
4239
|
title: string;
|
|
2375
4240
|
type: "source";
|
|
2376
4241
|
}
|
|
4242
|
+
| {
|
|
4243
|
+
approvalId: string;
|
|
4244
|
+
providerMetadata?: Record<
|
|
4245
|
+
string,
|
|
4246
|
+
Record<string, any>
|
|
4247
|
+
>;
|
|
4248
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
4249
|
+
toolCallId: string;
|
|
4250
|
+
type: "tool-approval-request";
|
|
4251
|
+
}
|
|
2377
4252
|
>;
|
|
2378
4253
|
providerOptions?: Record<string, Record<string, any>>;
|
|
2379
4254
|
role: "assistant";
|
|
2380
4255
|
}
|
|
2381
4256
|
| {
|
|
2382
|
-
content: Array<
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
4257
|
+
content: Array<
|
|
4258
|
+
| {
|
|
4259
|
+
args?: any;
|
|
4260
|
+
experimental_content?: Array<
|
|
4261
|
+
| { text: string; type: "text" }
|
|
4262
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
4263
|
+
>;
|
|
4264
|
+
isError?: boolean;
|
|
4265
|
+
output?:
|
|
4266
|
+
| {
|
|
4267
|
+
providerOptions?: Record<
|
|
4268
|
+
string,
|
|
4269
|
+
Record<string, any>
|
|
4270
|
+
>;
|
|
4271
|
+
type: "text";
|
|
4272
|
+
value: string;
|
|
4273
|
+
}
|
|
4274
|
+
| {
|
|
4275
|
+
providerOptions?: Record<
|
|
4276
|
+
string,
|
|
4277
|
+
Record<string, any>
|
|
4278
|
+
>;
|
|
4279
|
+
type: "json";
|
|
4280
|
+
value: any;
|
|
4281
|
+
}
|
|
4282
|
+
| {
|
|
4283
|
+
providerOptions?: Record<
|
|
4284
|
+
string,
|
|
4285
|
+
Record<string, any>
|
|
4286
|
+
>;
|
|
4287
|
+
type: "error-text";
|
|
4288
|
+
value: string;
|
|
4289
|
+
}
|
|
4290
|
+
| {
|
|
4291
|
+
providerOptions?: Record<
|
|
4292
|
+
string,
|
|
4293
|
+
Record<string, any>
|
|
4294
|
+
>;
|
|
4295
|
+
type: "error-json";
|
|
4296
|
+
value: any;
|
|
4297
|
+
}
|
|
4298
|
+
| {
|
|
4299
|
+
providerOptions?: Record<
|
|
4300
|
+
string,
|
|
4301
|
+
Record<string, any>
|
|
4302
|
+
>;
|
|
4303
|
+
reason?: string;
|
|
4304
|
+
type: "execution-denied";
|
|
4305
|
+
}
|
|
4306
|
+
| {
|
|
4307
|
+
type: "content";
|
|
4308
|
+
value: Array<
|
|
4309
|
+
| {
|
|
4310
|
+
providerOptions?: Record<
|
|
4311
|
+
string,
|
|
4312
|
+
Record<string, any>
|
|
4313
|
+
>;
|
|
4314
|
+
text: string;
|
|
4315
|
+
type: "text";
|
|
4316
|
+
}
|
|
4317
|
+
| {
|
|
4318
|
+
data: string;
|
|
4319
|
+
mediaType: string;
|
|
4320
|
+
type: "media";
|
|
4321
|
+
}
|
|
4322
|
+
| {
|
|
4323
|
+
data: string;
|
|
4324
|
+
filename?: string;
|
|
4325
|
+
mediaType: string;
|
|
4326
|
+
providerOptions?: Record<
|
|
4327
|
+
string,
|
|
4328
|
+
Record<string, any>
|
|
4329
|
+
>;
|
|
4330
|
+
type: "file-data";
|
|
4331
|
+
}
|
|
4332
|
+
| {
|
|
4333
|
+
providerOptions?: Record<
|
|
4334
|
+
string,
|
|
4335
|
+
Record<string, any>
|
|
4336
|
+
>;
|
|
4337
|
+
type: "file-url";
|
|
4338
|
+
url: string;
|
|
4339
|
+
}
|
|
4340
|
+
| {
|
|
4341
|
+
fileId: string | Record<string, string>;
|
|
4342
|
+
providerOptions?: Record<
|
|
4343
|
+
string,
|
|
4344
|
+
Record<string, any>
|
|
4345
|
+
>;
|
|
4346
|
+
type: "file-id";
|
|
4347
|
+
}
|
|
4348
|
+
| {
|
|
4349
|
+
data: string;
|
|
4350
|
+
mediaType: string;
|
|
4351
|
+
providerOptions?: Record<
|
|
4352
|
+
string,
|
|
4353
|
+
Record<string, any>
|
|
4354
|
+
>;
|
|
4355
|
+
type: "image-data";
|
|
4356
|
+
}
|
|
4357
|
+
| {
|
|
4358
|
+
providerOptions?: Record<
|
|
4359
|
+
string,
|
|
4360
|
+
Record<string, any>
|
|
4361
|
+
>;
|
|
4362
|
+
type: "image-url";
|
|
4363
|
+
url: string;
|
|
4364
|
+
}
|
|
4365
|
+
| {
|
|
4366
|
+
fileId: string | Record<string, string>;
|
|
4367
|
+
providerOptions?: Record<
|
|
4368
|
+
string,
|
|
4369
|
+
Record<string, any>
|
|
4370
|
+
>;
|
|
4371
|
+
type: "image-file-id";
|
|
4372
|
+
}
|
|
4373
|
+
| {
|
|
4374
|
+
providerOptions?: Record<
|
|
4375
|
+
string,
|
|
4376
|
+
Record<string, any>
|
|
4377
|
+
>;
|
|
4378
|
+
type: "custom";
|
|
4379
|
+
}
|
|
4380
|
+
>;
|
|
4381
|
+
};
|
|
4382
|
+
providerExecuted?: boolean;
|
|
4383
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
4384
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
4385
|
+
result?: any;
|
|
4386
|
+
toolCallId: string;
|
|
4387
|
+
toolName: string;
|
|
4388
|
+
type: "tool-result";
|
|
4389
|
+
}
|
|
4390
|
+
| {
|
|
4391
|
+
approvalId: string;
|
|
4392
|
+
approved: boolean;
|
|
4393
|
+
providerExecuted?: boolean;
|
|
4394
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
4395
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
4396
|
+
reason?: string;
|
|
4397
|
+
type: "tool-approval-response";
|
|
4398
|
+
}
|
|
4399
|
+
>;
|
|
2409
4400
|
providerOptions?: Record<string, Record<string, any>>;
|
|
2410
4401
|
role: "tool";
|
|
2411
4402
|
}
|