@convex-dev/agent 0.1.18-alpha.1 → 0.5.0-alpha.1
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/client/createTool.d.ts +30 -9
- package/dist/client/createTool.d.ts.map +1 -1
- package/dist/client/createTool.js +24 -9
- package/dist/client/createTool.js.map +1 -1
- package/dist/client/definePlaygroundAPI.d.ts +174 -199
- package/dist/client/definePlaygroundAPI.d.ts.map +1 -1
- package/dist/client/definePlaygroundAPI.js +12 -19
- package/dist/client/definePlaygroundAPI.js.map +1 -1
- package/dist/client/files.js +4 -4
- package/dist/client/files.js.map +1 -1
- package/dist/client/index.d.ts +166 -63
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +75 -45
- package/dist/client/index.js.map +1 -1
- package/dist/client/search.d.ts +27 -6
- package/dist/client/search.d.ts.map +1 -1
- package/dist/client/search.js.map +1 -1
- package/dist/client/streaming.d.ts +3 -2
- package/dist/client/streaming.d.ts.map +1 -1
- package/dist/client/streaming.js.map +1 -1
- package/dist/client/types.d.ts +27 -41
- package/dist/client/types.d.ts.map +1 -1
- package/dist/component/_generated/api.d.ts +436 -73
- package/dist/component/messages.d.ts +246 -43
- package/dist/component/messages.d.ts.map +1 -1
- package/dist/component/messages.js +2 -2
- package/dist/component/messages.js.map +1 -1
- package/dist/component/schema.d.ts +1453 -152
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +2 -2
- package/dist/component/schema.js.map +1 -1
- package/dist/component/streams.d.ts +180 -6
- package/dist/component/streams.d.ts.map +1 -1
- package/dist/mapping.d.ts +12 -14
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +187 -47
- package/dist/mapping.js.map +1 -1
- package/dist/react/deltas.d.ts +0 -3
- package/dist/react/deltas.d.ts.map +1 -1
- package/dist/react/deltas.js +140 -44
- package/dist/react/deltas.js.map +1 -1
- package/dist/react/optimisticallySendMessage.d.ts.map +1 -1
- package/dist/react/optimisticallySendMessage.js +2 -1
- package/dist/react/optimisticallySendMessage.js.map +1 -1
- package/dist/react/toUIMessages.d.ts +5 -4
- package/dist/react/toUIMessages.d.ts.map +1 -1
- package/dist/react/toUIMessages.js +103 -40
- package/dist/react/toUIMessages.js.map +1 -1
- package/dist/validators.d.ts +1798 -259
- package/dist/validators.d.ts.map +1 -1
- package/dist/validators.js +79 -15
- package/dist/validators.js.map +1 -1
- package/package.json +2 -2
- package/src/client/createTool.ts +68 -37
- package/src/client/definePlaygroundAPI.ts +24 -25
- package/src/client/files.ts +4 -4
- package/src/client/index.test.ts +14 -12
- package/src/client/index.ts +134 -94
- package/src/client/search.ts +3 -2
- package/src/client/streaming.ts +4 -3
- package/src/client/types.ts +34 -70
- package/src/component/_generated/api.d.ts +436 -73
- package/src/component/messages.ts +2 -2
- package/src/component/schema.ts +2 -2
- package/src/mapping.ts +228 -75
- package/src/react/deltas.ts +165 -52
- package/src/react/optimisticallySendMessage.ts +4 -1
- package/src/react/toUIMessages.test.ts +154 -36
- package/src/react/toUIMessages.ts +136 -57
- package/src/validators.test.ts +2 -99
- package/src/validators.ts +95 -17
|
@@ -199,6 +199,7 @@ export type Mounts = {
|
|
|
199
199
|
| {
|
|
200
200
|
providerOptions?: Record<string, Record<string, any>>;
|
|
201
201
|
signature?: string;
|
|
202
|
+
state?: "streaming" | "done";
|
|
202
203
|
text: string;
|
|
203
204
|
type: "reasoning";
|
|
204
205
|
}
|
|
@@ -209,6 +210,7 @@ export type Mounts = {
|
|
|
209
210
|
}
|
|
210
211
|
| {
|
|
211
212
|
args: any;
|
|
213
|
+
providerExecuted?: boolean;
|
|
212
214
|
providerOptions?: Record<string, Record<string, any>>;
|
|
213
215
|
toolCallId: string;
|
|
214
216
|
toolName: string;
|
|
@@ -226,6 +228,7 @@ export type Mounts = {
|
|
|
226
228
|
| { data: string; mimeType?: string; type: "image" }
|
|
227
229
|
>;
|
|
228
230
|
isError?: boolean;
|
|
231
|
+
providerExecuted?: boolean;
|
|
229
232
|
providerOptions?: Record<string, Record<string, any>>;
|
|
230
233
|
result: any;
|
|
231
234
|
toolCallId: string;
|
|
@@ -245,20 +248,41 @@ export type Mounts = {
|
|
|
245
248
|
providerMetadata?: Record<string, Record<string, any>>;
|
|
246
249
|
reasoning?: string;
|
|
247
250
|
reasoningDetails?: Array<
|
|
251
|
+
| {
|
|
252
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
253
|
+
signature?: string;
|
|
254
|
+
state?: "streaming" | "done";
|
|
255
|
+
text: string;
|
|
256
|
+
type: "reasoning";
|
|
257
|
+
}
|
|
248
258
|
| { signature?: string; text: string; type: "text" }
|
|
249
259
|
| { data: string; type: "redacted" }
|
|
250
260
|
>;
|
|
251
|
-
sources?: Array<
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
261
|
+
sources?: Array<
|
|
262
|
+
| {
|
|
263
|
+
id: string;
|
|
264
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
265
|
+
sourceType: "url";
|
|
266
|
+
title?: string;
|
|
267
|
+
type?: "source";
|
|
268
|
+
url?: string;
|
|
269
|
+
}
|
|
270
|
+
| {
|
|
271
|
+
filename?: string;
|
|
272
|
+
id: string;
|
|
273
|
+
mediaType: string;
|
|
274
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
275
|
+
sourceType: "document";
|
|
276
|
+
title: string;
|
|
277
|
+
type: "source";
|
|
278
|
+
}
|
|
279
|
+
>;
|
|
258
280
|
text?: string;
|
|
259
281
|
usage?: {
|
|
282
|
+
cachedInputTokens?: number;
|
|
260
283
|
completionTokens: number;
|
|
261
284
|
promptTokens: number;
|
|
285
|
+
reasoningTokens?: number;
|
|
262
286
|
totalTokens: number;
|
|
263
287
|
};
|
|
264
288
|
warnings?: Array<
|
|
@@ -335,6 +359,7 @@ export type Mounts = {
|
|
|
335
359
|
| {
|
|
336
360
|
providerOptions?: Record<string, Record<string, any>>;
|
|
337
361
|
signature?: string;
|
|
362
|
+
state?: "streaming" | "done";
|
|
338
363
|
text: string;
|
|
339
364
|
type: "reasoning";
|
|
340
365
|
}
|
|
@@ -345,6 +370,7 @@ export type Mounts = {
|
|
|
345
370
|
}
|
|
346
371
|
| {
|
|
347
372
|
args: any;
|
|
373
|
+
providerExecuted?: boolean;
|
|
348
374
|
providerOptions?: Record<string, Record<string, any>>;
|
|
349
375
|
toolCallId: string;
|
|
350
376
|
toolName: string;
|
|
@@ -362,6 +388,7 @@ export type Mounts = {
|
|
|
362
388
|
| { data: string; mimeType?: string; type: "image" }
|
|
363
389
|
>;
|
|
364
390
|
isError?: boolean;
|
|
391
|
+
providerExecuted?: boolean;
|
|
365
392
|
providerOptions?: Record<string, Record<string, any>>;
|
|
366
393
|
result: any;
|
|
367
394
|
toolCallId: string;
|
|
@@ -383,24 +410,45 @@ export type Mounts = {
|
|
|
383
410
|
providerOptions?: Record<string, Record<string, any>>;
|
|
384
411
|
reasoning?: string;
|
|
385
412
|
reasoningDetails?: Array<
|
|
413
|
+
| {
|
|
414
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
415
|
+
signature?: string;
|
|
416
|
+
state?: "streaming" | "done";
|
|
417
|
+
text: string;
|
|
418
|
+
type: "reasoning";
|
|
419
|
+
}
|
|
386
420
|
| { signature?: string; text: string; type: "text" }
|
|
387
421
|
| { data: string; type: "redacted" }
|
|
388
422
|
>;
|
|
389
|
-
sources?: Array<
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
423
|
+
sources?: Array<
|
|
424
|
+
| {
|
|
425
|
+
id: string;
|
|
426
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
427
|
+
sourceType: "url";
|
|
428
|
+
title?: string;
|
|
429
|
+
type?: "source";
|
|
430
|
+
url?: string;
|
|
431
|
+
}
|
|
432
|
+
| {
|
|
433
|
+
filename?: string;
|
|
434
|
+
id: string;
|
|
435
|
+
mediaType: string;
|
|
436
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
437
|
+
sourceType: "document";
|
|
438
|
+
title: string;
|
|
439
|
+
type: "source";
|
|
440
|
+
}
|
|
441
|
+
>;
|
|
396
442
|
status: "pending" | "success" | "failed";
|
|
397
443
|
stepOrder: number;
|
|
398
444
|
text?: string;
|
|
399
445
|
threadId: string;
|
|
400
446
|
tool: boolean;
|
|
401
447
|
usage?: {
|
|
448
|
+
cachedInputTokens?: number;
|
|
402
449
|
completionTokens: number;
|
|
403
450
|
promptTokens: number;
|
|
451
|
+
reasoningTokens?: number;
|
|
404
452
|
totalTokens: number;
|
|
405
453
|
};
|
|
406
454
|
userId?: string;
|
|
@@ -502,6 +550,7 @@ export type Mounts = {
|
|
|
502
550
|
| {
|
|
503
551
|
providerOptions?: Record<string, Record<string, any>>;
|
|
504
552
|
signature?: string;
|
|
553
|
+
state?: "streaming" | "done";
|
|
505
554
|
text: string;
|
|
506
555
|
type: "reasoning";
|
|
507
556
|
}
|
|
@@ -512,6 +561,7 @@ export type Mounts = {
|
|
|
512
561
|
}
|
|
513
562
|
| {
|
|
514
563
|
args: any;
|
|
564
|
+
providerExecuted?: boolean;
|
|
515
565
|
providerOptions?: Record<string, Record<string, any>>;
|
|
516
566
|
toolCallId: string;
|
|
517
567
|
toolName: string;
|
|
@@ -529,6 +579,7 @@ export type Mounts = {
|
|
|
529
579
|
| { data: string; mimeType?: string; type: "image" }
|
|
530
580
|
>;
|
|
531
581
|
isError?: boolean;
|
|
582
|
+
providerExecuted?: boolean;
|
|
532
583
|
providerOptions?: Record<string, Record<string, any>>;
|
|
533
584
|
result: any;
|
|
534
585
|
toolCallId: string;
|
|
@@ -550,24 +601,45 @@ export type Mounts = {
|
|
|
550
601
|
providerOptions?: Record<string, Record<string, any>>;
|
|
551
602
|
reasoning?: string;
|
|
552
603
|
reasoningDetails?: Array<
|
|
604
|
+
| {
|
|
605
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
606
|
+
signature?: string;
|
|
607
|
+
state?: "streaming" | "done";
|
|
608
|
+
text: string;
|
|
609
|
+
type: "reasoning";
|
|
610
|
+
}
|
|
553
611
|
| { signature?: string; text: string; type: "text" }
|
|
554
612
|
| { data: string; type: "redacted" }
|
|
555
613
|
>;
|
|
556
|
-
sources?: Array<
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
614
|
+
sources?: Array<
|
|
615
|
+
| {
|
|
616
|
+
id: string;
|
|
617
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
618
|
+
sourceType: "url";
|
|
619
|
+
title?: string;
|
|
620
|
+
type?: "source";
|
|
621
|
+
url?: string;
|
|
622
|
+
}
|
|
623
|
+
| {
|
|
624
|
+
filename?: string;
|
|
625
|
+
id: string;
|
|
626
|
+
mediaType: string;
|
|
627
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
628
|
+
sourceType: "document";
|
|
629
|
+
title: string;
|
|
630
|
+
type: "source";
|
|
631
|
+
}
|
|
632
|
+
>;
|
|
563
633
|
status: "pending" | "success" | "failed";
|
|
564
634
|
stepOrder: number;
|
|
565
635
|
text?: string;
|
|
566
636
|
threadId: string;
|
|
567
637
|
tool: boolean;
|
|
568
638
|
usage?: {
|
|
639
|
+
cachedInputTokens?: number;
|
|
569
640
|
completionTokens: number;
|
|
570
641
|
promptTokens: number;
|
|
642
|
+
reasoningTokens?: number;
|
|
571
643
|
totalTokens: number;
|
|
572
644
|
};
|
|
573
645
|
userId?: string;
|
|
@@ -661,6 +733,7 @@ export type Mounts = {
|
|
|
661
733
|
| {
|
|
662
734
|
providerOptions?: Record<string, Record<string, any>>;
|
|
663
735
|
signature?: string;
|
|
736
|
+
state?: "streaming" | "done";
|
|
664
737
|
text: string;
|
|
665
738
|
type: "reasoning";
|
|
666
739
|
}
|
|
@@ -671,6 +744,7 @@ export type Mounts = {
|
|
|
671
744
|
}
|
|
672
745
|
| {
|
|
673
746
|
args: any;
|
|
747
|
+
providerExecuted?: boolean;
|
|
674
748
|
providerOptions?: Record<string, Record<string, any>>;
|
|
675
749
|
toolCallId: string;
|
|
676
750
|
toolName: string;
|
|
@@ -688,6 +762,7 @@ export type Mounts = {
|
|
|
688
762
|
| { data: string; mimeType?: string; type: "image" }
|
|
689
763
|
>;
|
|
690
764
|
isError?: boolean;
|
|
765
|
+
providerExecuted?: boolean;
|
|
691
766
|
providerOptions?: Record<string, Record<string, any>>;
|
|
692
767
|
result: any;
|
|
693
768
|
toolCallId: string;
|
|
@@ -709,24 +784,45 @@ export type Mounts = {
|
|
|
709
784
|
providerOptions?: Record<string, Record<string, any>>;
|
|
710
785
|
reasoning?: string;
|
|
711
786
|
reasoningDetails?: Array<
|
|
787
|
+
| {
|
|
788
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
789
|
+
signature?: string;
|
|
790
|
+
state?: "streaming" | "done";
|
|
791
|
+
text: string;
|
|
792
|
+
type: "reasoning";
|
|
793
|
+
}
|
|
712
794
|
| { signature?: string; text: string; type: "text" }
|
|
713
795
|
| { data: string; type: "redacted" }
|
|
714
796
|
>;
|
|
715
|
-
sources?: Array<
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
797
|
+
sources?: Array<
|
|
798
|
+
| {
|
|
799
|
+
id: string;
|
|
800
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
801
|
+
sourceType: "url";
|
|
802
|
+
title?: string;
|
|
803
|
+
type?: "source";
|
|
804
|
+
url?: string;
|
|
805
|
+
}
|
|
806
|
+
| {
|
|
807
|
+
filename?: string;
|
|
808
|
+
id: string;
|
|
809
|
+
mediaType: string;
|
|
810
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
811
|
+
sourceType: "document";
|
|
812
|
+
title: string;
|
|
813
|
+
type: "source";
|
|
814
|
+
}
|
|
815
|
+
>;
|
|
722
816
|
status: "pending" | "success" | "failed";
|
|
723
817
|
stepOrder: number;
|
|
724
818
|
text?: string;
|
|
725
819
|
threadId: string;
|
|
726
820
|
tool: boolean;
|
|
727
821
|
usage?: {
|
|
822
|
+
cachedInputTokens?: number;
|
|
728
823
|
completionTokens: number;
|
|
729
824
|
promptTokens: number;
|
|
825
|
+
reasoningTokens?: number;
|
|
730
826
|
totalTokens: number;
|
|
731
827
|
};
|
|
732
828
|
userId?: string;
|
|
@@ -822,6 +918,7 @@ export type Mounts = {
|
|
|
822
918
|
| {
|
|
823
919
|
providerOptions?: Record<string, Record<string, any>>;
|
|
824
920
|
signature?: string;
|
|
921
|
+
state?: "streaming" | "done";
|
|
825
922
|
text: string;
|
|
826
923
|
type: "reasoning";
|
|
827
924
|
}
|
|
@@ -832,6 +929,7 @@ export type Mounts = {
|
|
|
832
929
|
}
|
|
833
930
|
| {
|
|
834
931
|
args: any;
|
|
932
|
+
providerExecuted?: boolean;
|
|
835
933
|
providerOptions?: Record<string, Record<string, any>>;
|
|
836
934
|
toolCallId: string;
|
|
837
935
|
toolName: string;
|
|
@@ -849,6 +947,7 @@ export type Mounts = {
|
|
|
849
947
|
| { data: string; mimeType?: string; type: "image" }
|
|
850
948
|
>;
|
|
851
949
|
isError?: boolean;
|
|
950
|
+
providerExecuted?: boolean;
|
|
852
951
|
providerOptions?: Record<string, Record<string, any>>;
|
|
853
952
|
result: any;
|
|
854
953
|
toolCallId: string;
|
|
@@ -870,24 +969,45 @@ export type Mounts = {
|
|
|
870
969
|
providerOptions?: Record<string, Record<string, any>>;
|
|
871
970
|
reasoning?: string;
|
|
872
971
|
reasoningDetails?: Array<
|
|
972
|
+
| {
|
|
973
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
974
|
+
signature?: string;
|
|
975
|
+
state?: "streaming" | "done";
|
|
976
|
+
text: string;
|
|
977
|
+
type: "reasoning";
|
|
978
|
+
}
|
|
873
979
|
| { signature?: string; text: string; type: "text" }
|
|
874
980
|
| { data: string; type: "redacted" }
|
|
875
981
|
>;
|
|
876
|
-
sources?: Array<
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
982
|
+
sources?: Array<
|
|
983
|
+
| {
|
|
984
|
+
id: string;
|
|
985
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
986
|
+
sourceType: "url";
|
|
987
|
+
title?: string;
|
|
988
|
+
type?: "source";
|
|
989
|
+
url?: string;
|
|
990
|
+
}
|
|
991
|
+
| {
|
|
992
|
+
filename?: string;
|
|
993
|
+
id: string;
|
|
994
|
+
mediaType: string;
|
|
995
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
996
|
+
sourceType: "document";
|
|
997
|
+
title: string;
|
|
998
|
+
type: "source";
|
|
999
|
+
}
|
|
1000
|
+
>;
|
|
883
1001
|
status: "pending" | "success" | "failed";
|
|
884
1002
|
stepOrder: number;
|
|
885
1003
|
text?: string;
|
|
886
1004
|
threadId: string;
|
|
887
1005
|
tool: boolean;
|
|
888
1006
|
usage?: {
|
|
1007
|
+
cachedInputTokens?: number;
|
|
889
1008
|
completionTokens: number;
|
|
890
1009
|
promptTokens: number;
|
|
1010
|
+
reasoningTokens?: number;
|
|
891
1011
|
totalTokens: number;
|
|
892
1012
|
};
|
|
893
1013
|
userId?: string;
|
|
@@ -970,6 +1090,7 @@ export type Mounts = {
|
|
|
970
1090
|
| {
|
|
971
1091
|
providerOptions?: Record<string, Record<string, any>>;
|
|
972
1092
|
signature?: string;
|
|
1093
|
+
state?: "streaming" | "done";
|
|
973
1094
|
text: string;
|
|
974
1095
|
type: "reasoning";
|
|
975
1096
|
}
|
|
@@ -980,6 +1101,7 @@ export type Mounts = {
|
|
|
980
1101
|
}
|
|
981
1102
|
| {
|
|
982
1103
|
args: any;
|
|
1104
|
+
providerExecuted?: boolean;
|
|
983
1105
|
providerOptions?: Record<string, Record<string, any>>;
|
|
984
1106
|
toolCallId: string;
|
|
985
1107
|
toolName: string;
|
|
@@ -997,6 +1119,7 @@ export type Mounts = {
|
|
|
997
1119
|
| { data: string; mimeType?: string; type: "image" }
|
|
998
1120
|
>;
|
|
999
1121
|
isError?: boolean;
|
|
1122
|
+
providerExecuted?: boolean;
|
|
1000
1123
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1001
1124
|
result: any;
|
|
1002
1125
|
toolCallId: string;
|
|
@@ -1018,24 +1141,45 @@ export type Mounts = {
|
|
|
1018
1141
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1019
1142
|
reasoning?: string;
|
|
1020
1143
|
reasoningDetails?: Array<
|
|
1144
|
+
| {
|
|
1145
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1146
|
+
signature?: string;
|
|
1147
|
+
state?: "streaming" | "done";
|
|
1148
|
+
text: string;
|
|
1149
|
+
type: "reasoning";
|
|
1150
|
+
}
|
|
1021
1151
|
| { signature?: string; text: string; type: "text" }
|
|
1022
1152
|
| { data: string; type: "redacted" }
|
|
1023
1153
|
>;
|
|
1024
|
-
sources?: Array<
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1154
|
+
sources?: Array<
|
|
1155
|
+
| {
|
|
1156
|
+
id: string;
|
|
1157
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1158
|
+
sourceType: "url";
|
|
1159
|
+
title?: string;
|
|
1160
|
+
type?: "source";
|
|
1161
|
+
url?: string;
|
|
1162
|
+
}
|
|
1163
|
+
| {
|
|
1164
|
+
filename?: string;
|
|
1165
|
+
id: string;
|
|
1166
|
+
mediaType: string;
|
|
1167
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1168
|
+
sourceType: "document";
|
|
1169
|
+
title: string;
|
|
1170
|
+
type: "source";
|
|
1171
|
+
}
|
|
1172
|
+
>;
|
|
1031
1173
|
status: "pending" | "success" | "failed";
|
|
1032
1174
|
stepOrder: number;
|
|
1033
1175
|
text?: string;
|
|
1034
1176
|
threadId: string;
|
|
1035
1177
|
tool: boolean;
|
|
1036
1178
|
usage?: {
|
|
1179
|
+
cachedInputTokens?: number;
|
|
1037
1180
|
completionTokens: number;
|
|
1038
1181
|
promptTokens: number;
|
|
1182
|
+
reasoningTokens?: number;
|
|
1039
1183
|
totalTokens: number;
|
|
1040
1184
|
};
|
|
1041
1185
|
userId?: string;
|
|
@@ -1100,6 +1244,7 @@ export type Mounts = {
|
|
|
1100
1244
|
| {
|
|
1101
1245
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1102
1246
|
signature?: string;
|
|
1247
|
+
state?: "streaming" | "done";
|
|
1103
1248
|
text: string;
|
|
1104
1249
|
type: "reasoning";
|
|
1105
1250
|
}
|
|
@@ -1110,6 +1255,7 @@ export type Mounts = {
|
|
|
1110
1255
|
}
|
|
1111
1256
|
| {
|
|
1112
1257
|
args: any;
|
|
1258
|
+
providerExecuted?: boolean;
|
|
1113
1259
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1114
1260
|
toolCallId: string;
|
|
1115
1261
|
toolName: string;
|
|
@@ -1127,6 +1273,7 @@ export type Mounts = {
|
|
|
1127
1273
|
| { data: string; mimeType?: string; type: "image" }
|
|
1128
1274
|
>;
|
|
1129
1275
|
isError?: boolean;
|
|
1276
|
+
providerExecuted?: boolean;
|
|
1130
1277
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1131
1278
|
result: any;
|
|
1132
1279
|
toolCallId: string;
|
|
@@ -1206,6 +1353,7 @@ export type Mounts = {
|
|
|
1206
1353
|
| {
|
|
1207
1354
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1208
1355
|
signature?: string;
|
|
1356
|
+
state?: "streaming" | "done";
|
|
1209
1357
|
text: string;
|
|
1210
1358
|
type: "reasoning";
|
|
1211
1359
|
}
|
|
@@ -1216,6 +1364,7 @@ export type Mounts = {
|
|
|
1216
1364
|
}
|
|
1217
1365
|
| {
|
|
1218
1366
|
args: any;
|
|
1367
|
+
providerExecuted?: boolean;
|
|
1219
1368
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1220
1369
|
toolCallId: string;
|
|
1221
1370
|
toolName: string;
|
|
@@ -1233,6 +1382,7 @@ export type Mounts = {
|
|
|
1233
1382
|
| { data: string; mimeType?: string; type: "image" }
|
|
1234
1383
|
>;
|
|
1235
1384
|
isError?: boolean;
|
|
1385
|
+
providerExecuted?: boolean;
|
|
1236
1386
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1237
1387
|
result: any;
|
|
1238
1388
|
toolCallId: string;
|
|
@@ -1254,24 +1404,45 @@ export type Mounts = {
|
|
|
1254
1404
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1255
1405
|
reasoning?: string;
|
|
1256
1406
|
reasoningDetails?: Array<
|
|
1407
|
+
| {
|
|
1408
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1409
|
+
signature?: string;
|
|
1410
|
+
state?: "streaming" | "done";
|
|
1411
|
+
text: string;
|
|
1412
|
+
type: "reasoning";
|
|
1413
|
+
}
|
|
1257
1414
|
| { signature?: string; text: string; type: "text" }
|
|
1258
1415
|
| { data: string; type: "redacted" }
|
|
1259
1416
|
>;
|
|
1260
|
-
sources?: Array<
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1417
|
+
sources?: Array<
|
|
1418
|
+
| {
|
|
1419
|
+
id: string;
|
|
1420
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1421
|
+
sourceType: "url";
|
|
1422
|
+
title?: string;
|
|
1423
|
+
type?: "source";
|
|
1424
|
+
url?: string;
|
|
1425
|
+
}
|
|
1426
|
+
| {
|
|
1427
|
+
filename?: string;
|
|
1428
|
+
id: string;
|
|
1429
|
+
mediaType: string;
|
|
1430
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1431
|
+
sourceType: "document";
|
|
1432
|
+
title: string;
|
|
1433
|
+
type: "source";
|
|
1434
|
+
}
|
|
1435
|
+
>;
|
|
1267
1436
|
status: "pending" | "success" | "failed";
|
|
1268
1437
|
stepOrder: number;
|
|
1269
1438
|
text?: string;
|
|
1270
1439
|
threadId: string;
|
|
1271
1440
|
tool: boolean;
|
|
1272
1441
|
usage?: {
|
|
1442
|
+
cachedInputTokens?: number;
|
|
1273
1443
|
completionTokens: number;
|
|
1274
1444
|
promptTokens: number;
|
|
1445
|
+
reasoningTokens?: number;
|
|
1275
1446
|
totalTokens: number;
|
|
1276
1447
|
};
|
|
1277
1448
|
userId?: string;
|
|
@@ -1310,17 +1481,32 @@ export type Mounts = {
|
|
|
1310
1481
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1311
1482
|
sourceType: "url";
|
|
1312
1483
|
title?: string;
|
|
1313
|
-
url
|
|
1484
|
+
url?: string;
|
|
1314
1485
|
};
|
|
1315
1486
|
type: "source";
|
|
1316
1487
|
}
|
|
1317
1488
|
| {
|
|
1318
1489
|
args: any;
|
|
1490
|
+
providerExecuted?: boolean;
|
|
1319
1491
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1320
1492
|
toolCallId: string;
|
|
1321
1493
|
toolName: string;
|
|
1322
1494
|
type: "tool-call";
|
|
1323
1495
|
}
|
|
1496
|
+
| {
|
|
1497
|
+
args?: any;
|
|
1498
|
+
experimental_content?: Array<
|
|
1499
|
+
| { text: string; type: "text" }
|
|
1500
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
1501
|
+
>;
|
|
1502
|
+
isError?: boolean;
|
|
1503
|
+
providerExecuted?: boolean;
|
|
1504
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1505
|
+
result: any;
|
|
1506
|
+
toolCallId: string;
|
|
1507
|
+
toolName: string;
|
|
1508
|
+
type: "tool-result";
|
|
1509
|
+
}
|
|
1324
1510
|
| {
|
|
1325
1511
|
toolCallId: string;
|
|
1326
1512
|
toolName: string;
|
|
@@ -1333,18 +1519,67 @@ export type Mounts = {
|
|
|
1333
1519
|
type: "tool-call-delta";
|
|
1334
1520
|
}
|
|
1335
1521
|
| {
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1522
|
+
id: string;
|
|
1523
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1524
|
+
text: string;
|
|
1525
|
+
type: "text-delta";
|
|
1526
|
+
}
|
|
1527
|
+
| {
|
|
1528
|
+
id: string;
|
|
1529
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1530
|
+
text: string;
|
|
1531
|
+
type: "reasoning-delta";
|
|
1532
|
+
}
|
|
1533
|
+
| {
|
|
1534
|
+
id: string;
|
|
1342
1535
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1343
|
-
|
|
1536
|
+
sourceType: "url";
|
|
1537
|
+
title?: string;
|
|
1538
|
+
type?: "source";
|
|
1539
|
+
url?: string;
|
|
1540
|
+
}
|
|
1541
|
+
| {
|
|
1542
|
+
filename?: string;
|
|
1543
|
+
id: string;
|
|
1544
|
+
mediaType: string;
|
|
1545
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1546
|
+
sourceType: "document";
|
|
1547
|
+
title: string;
|
|
1548
|
+
type: "source";
|
|
1549
|
+
}
|
|
1550
|
+
| {
|
|
1551
|
+
dynamic?: boolean;
|
|
1552
|
+
input: any;
|
|
1553
|
+
providerExecuted?: boolean;
|
|
1554
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1555
|
+
toolCallId: string;
|
|
1556
|
+
toolName: string;
|
|
1557
|
+
type: "tool-call";
|
|
1558
|
+
}
|
|
1559
|
+
| {
|
|
1560
|
+
dynamic?: boolean;
|
|
1561
|
+
id: string;
|
|
1562
|
+
providerExecuted?: boolean;
|
|
1563
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1564
|
+
toolName: string;
|
|
1565
|
+
type: "tool-input-start";
|
|
1566
|
+
}
|
|
1567
|
+
| {
|
|
1568
|
+
delta: string;
|
|
1569
|
+
id: string;
|
|
1570
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1571
|
+
type: "tool-input-delta";
|
|
1572
|
+
}
|
|
1573
|
+
| {
|
|
1574
|
+
dynamic?: boolean;
|
|
1575
|
+
input?: any;
|
|
1576
|
+
output?: any;
|
|
1577
|
+
providerExecuted?: boolean;
|
|
1344
1578
|
toolCallId: string;
|
|
1345
1579
|
toolName: string;
|
|
1346
1580
|
type: "tool-result";
|
|
1347
1581
|
}
|
|
1582
|
+
| { rawValue: any; type: "raw" }
|
|
1348
1583
|
>;
|
|
1349
1584
|
start: number;
|
|
1350
1585
|
streamId: string;
|
|
@@ -1405,17 +1640,32 @@ export type Mounts = {
|
|
|
1405
1640
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1406
1641
|
sourceType: "url";
|
|
1407
1642
|
title?: string;
|
|
1408
|
-
url
|
|
1643
|
+
url?: string;
|
|
1409
1644
|
};
|
|
1410
1645
|
type: "source";
|
|
1411
1646
|
}
|
|
1412
1647
|
| {
|
|
1413
1648
|
args: any;
|
|
1649
|
+
providerExecuted?: boolean;
|
|
1414
1650
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1415
1651
|
toolCallId: string;
|
|
1416
1652
|
toolName: string;
|
|
1417
1653
|
type: "tool-call";
|
|
1418
1654
|
}
|
|
1655
|
+
| {
|
|
1656
|
+
args?: any;
|
|
1657
|
+
experimental_content?: Array<
|
|
1658
|
+
| { text: string; type: "text" }
|
|
1659
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
1660
|
+
>;
|
|
1661
|
+
isError?: boolean;
|
|
1662
|
+
providerExecuted?: boolean;
|
|
1663
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1664
|
+
result: any;
|
|
1665
|
+
toolCallId: string;
|
|
1666
|
+
toolName: string;
|
|
1667
|
+
type: "tool-result";
|
|
1668
|
+
}
|
|
1419
1669
|
| {
|
|
1420
1670
|
toolCallId: string;
|
|
1421
1671
|
toolName: string;
|
|
@@ -1428,18 +1678,67 @@ export type Mounts = {
|
|
|
1428
1678
|
type: "tool-call-delta";
|
|
1429
1679
|
}
|
|
1430
1680
|
| {
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1681
|
+
id: string;
|
|
1682
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1683
|
+
text: string;
|
|
1684
|
+
type: "text-delta";
|
|
1685
|
+
}
|
|
1686
|
+
| {
|
|
1687
|
+
id: string;
|
|
1688
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1689
|
+
text: string;
|
|
1690
|
+
type: "reasoning-delta";
|
|
1691
|
+
}
|
|
1692
|
+
| {
|
|
1693
|
+
id: string;
|
|
1437
1694
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1438
|
-
|
|
1695
|
+
sourceType: "url";
|
|
1696
|
+
title?: string;
|
|
1697
|
+
type?: "source";
|
|
1698
|
+
url?: string;
|
|
1699
|
+
}
|
|
1700
|
+
| {
|
|
1701
|
+
filename?: string;
|
|
1702
|
+
id: string;
|
|
1703
|
+
mediaType: string;
|
|
1704
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1705
|
+
sourceType: "document";
|
|
1706
|
+
title: string;
|
|
1707
|
+
type: "source";
|
|
1708
|
+
}
|
|
1709
|
+
| {
|
|
1710
|
+
dynamic?: boolean;
|
|
1711
|
+
input: any;
|
|
1712
|
+
providerExecuted?: boolean;
|
|
1713
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1714
|
+
toolCallId: string;
|
|
1715
|
+
toolName: string;
|
|
1716
|
+
type: "tool-call";
|
|
1717
|
+
}
|
|
1718
|
+
| {
|
|
1719
|
+
dynamic?: boolean;
|
|
1720
|
+
id: string;
|
|
1721
|
+
providerExecuted?: boolean;
|
|
1722
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1723
|
+
toolName: string;
|
|
1724
|
+
type: "tool-input-start";
|
|
1725
|
+
}
|
|
1726
|
+
| {
|
|
1727
|
+
delta: string;
|
|
1728
|
+
id: string;
|
|
1729
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1730
|
+
type: "tool-input-delta";
|
|
1731
|
+
}
|
|
1732
|
+
| {
|
|
1733
|
+
dynamic?: boolean;
|
|
1734
|
+
input?: any;
|
|
1735
|
+
output?: any;
|
|
1736
|
+
providerExecuted?: boolean;
|
|
1439
1737
|
toolCallId: string;
|
|
1440
1738
|
toolName: string;
|
|
1441
1739
|
type: "tool-result";
|
|
1442
1740
|
}
|
|
1741
|
+
| { rawValue: any; type: "raw" }
|
|
1443
1742
|
>;
|
|
1444
1743
|
start: number;
|
|
1445
1744
|
streamId: string;
|
|
@@ -1486,17 +1785,32 @@ export type Mounts = {
|
|
|
1486
1785
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1487
1786
|
sourceType: "url";
|
|
1488
1787
|
title?: string;
|
|
1489
|
-
url
|
|
1788
|
+
url?: string;
|
|
1490
1789
|
};
|
|
1491
1790
|
type: "source";
|
|
1492
1791
|
}
|
|
1493
1792
|
| {
|
|
1494
1793
|
args: any;
|
|
1794
|
+
providerExecuted?: boolean;
|
|
1495
1795
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1496
1796
|
toolCallId: string;
|
|
1497
1797
|
toolName: string;
|
|
1498
1798
|
type: "tool-call";
|
|
1499
1799
|
}
|
|
1800
|
+
| {
|
|
1801
|
+
args?: any;
|
|
1802
|
+
experimental_content?: Array<
|
|
1803
|
+
| { text: string; type: "text" }
|
|
1804
|
+
| { data: string; mimeType?: string; type: "image" }
|
|
1805
|
+
>;
|
|
1806
|
+
isError?: boolean;
|
|
1807
|
+
providerExecuted?: boolean;
|
|
1808
|
+
providerOptions?: Record<string, Record<string, any>>;
|
|
1809
|
+
result: any;
|
|
1810
|
+
toolCallId: string;
|
|
1811
|
+
toolName: string;
|
|
1812
|
+
type: "tool-result";
|
|
1813
|
+
}
|
|
1500
1814
|
| {
|
|
1501
1815
|
toolCallId: string;
|
|
1502
1816
|
toolName: string;
|
|
@@ -1509,18 +1823,67 @@ export type Mounts = {
|
|
|
1509
1823
|
type: "tool-call-delta";
|
|
1510
1824
|
}
|
|
1511
1825
|
| {
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1826
|
+
id: string;
|
|
1827
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1828
|
+
text: string;
|
|
1829
|
+
type: "text-delta";
|
|
1830
|
+
}
|
|
1831
|
+
| {
|
|
1832
|
+
id: string;
|
|
1833
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1834
|
+
text: string;
|
|
1835
|
+
type: "reasoning-delta";
|
|
1836
|
+
}
|
|
1837
|
+
| {
|
|
1838
|
+
id: string;
|
|
1518
1839
|
providerOptions?: Record<string, Record<string, any>>;
|
|
1519
|
-
|
|
1840
|
+
sourceType: "url";
|
|
1841
|
+
title?: string;
|
|
1842
|
+
type?: "source";
|
|
1843
|
+
url?: string;
|
|
1844
|
+
}
|
|
1845
|
+
| {
|
|
1846
|
+
filename?: string;
|
|
1847
|
+
id: string;
|
|
1848
|
+
mediaType: string;
|
|
1849
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1850
|
+
sourceType: "document";
|
|
1851
|
+
title: string;
|
|
1852
|
+
type: "source";
|
|
1853
|
+
}
|
|
1854
|
+
| {
|
|
1855
|
+
dynamic?: boolean;
|
|
1856
|
+
input: any;
|
|
1857
|
+
providerExecuted?: boolean;
|
|
1858
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1859
|
+
toolCallId: string;
|
|
1860
|
+
toolName: string;
|
|
1861
|
+
type: "tool-call";
|
|
1862
|
+
}
|
|
1863
|
+
| {
|
|
1864
|
+
dynamic?: boolean;
|
|
1865
|
+
id: string;
|
|
1866
|
+
providerExecuted?: boolean;
|
|
1867
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1868
|
+
toolName: string;
|
|
1869
|
+
type: "tool-input-start";
|
|
1870
|
+
}
|
|
1871
|
+
| {
|
|
1872
|
+
delta: string;
|
|
1873
|
+
id: string;
|
|
1874
|
+
providerMetadata?: Record<string, Record<string, any>>;
|
|
1875
|
+
type: "tool-input-delta";
|
|
1876
|
+
}
|
|
1877
|
+
| {
|
|
1878
|
+
dynamic?: boolean;
|
|
1879
|
+
input?: any;
|
|
1880
|
+
output?: any;
|
|
1881
|
+
providerExecuted?: boolean;
|
|
1520
1882
|
toolCallId: string;
|
|
1521
1883
|
toolName: string;
|
|
1522
1884
|
type: "tool-result";
|
|
1523
1885
|
}
|
|
1886
|
+
| { rawValue: any; type: "raw" }
|
|
1524
1887
|
>;
|
|
1525
1888
|
start: number;
|
|
1526
1889
|
streamId: string;
|