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