@convex-dev/agent 0.2.11-alpha.0 → 0.2.11-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.
@@ -15,6 +15,7 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
15
15
  apiKey: string;
16
16
  }, Promise<boolean>>;
17
17
  listUsers: import("convex/server").RegisteredQuery<"public", {
18
+ apiKey: string;
18
19
  paginationOpts: {
19
20
  id?: number | undefined;
20
21
  endCursor?: string | null | undefined;
@@ -23,7 +24,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
23
24
  numItems: number;
24
25
  cursor: string | null;
25
26
  };
26
- apiKey: string;
27
27
  }, Promise<{
28
28
  page: {
29
29
  _id: string;
@@ -36,6 +36,7 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
36
36
  }>>;
37
37
  listThreads: import("convex/server").RegisteredQuery<"public", {
38
38
  userId?: string | undefined;
39
+ apiKey: string;
39
40
  paginationOpts: {
40
41
  id?: number | undefined;
41
42
  endCursor?: string | null | undefined;
@@ -44,7 +45,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
44
45
  numItems: number;
45
46
  cursor: string | null;
46
47
  };
47
- apiKey: string;
48
48
  }, Promise<{
49
49
  page: {
50
50
  lastAgentName: string | undefined;
@@ -74,6 +74,7 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
74
74
  }[];
75
75
  } | undefined;
76
76
  threadId: string;
77
+ apiKey: string;
77
78
  paginationOpts: {
78
79
  id?: number | undefined;
79
80
  endCursor?: string | null | undefined;
@@ -82,12 +83,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
82
83
  numItems: number;
83
84
  cursor: string | null;
84
85
  };
85
- apiKey: string;
86
86
  }, Promise<{
87
87
  streams: import("./types.js").SyncStreamsReturnValue;
88
88
  page: {
89
- userId?: string | undefined;
90
89
  id?: string | undefined;
90
+ userId?: string | undefined;
91
91
  embeddingId?: string | undefined;
92
92
  fileIds?: string[] | undefined;
93
93
  error?: string | undefined;
@@ -192,22 +192,22 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
192
192
  toolCallId: string;
193
193
  toolName: string;
194
194
  } | {
195
+ title?: string | undefined;
195
196
  providerOptions?: Record<string, Record<string, any>> | undefined;
196
197
  providerMetadata?: Record<string, Record<string, any>> | undefined;
197
- title?: string | undefined;
198
- type: "source";
199
198
  id: string;
199
+ type: "source";
200
200
  sourceType: "url";
201
201
  url: string;
202
202
  } | {
203
203
  providerOptions?: Record<string, Record<string, any>> | undefined;
204
204
  providerMetadata?: Record<string, Record<string, any>> | undefined;
205
205
  filename?: string | undefined;
206
- type: "source";
207
206
  id: string;
207
+ title: string;
208
+ type: "source";
208
209
  mediaType: string;
209
210
  sourceType: "document";
210
- title: string;
211
211
  })[];
212
212
  } | {
213
213
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -270,10 +270,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
270
270
  totalTokens: number;
271
271
  } | undefined;
272
272
  sources?: ({
273
+ title?: string | undefined;
273
274
  type?: "source" | undefined;
274
275
  providerOptions?: Record<string, Record<string, any>> | undefined;
275
276
  providerMetadata?: Record<string, Record<string, any>> | undefined;
276
- title?: string | undefined;
277
277
  id: string;
278
278
  sourceType: "url";
279
279
  url: string;
@@ -281,11 +281,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
281
281
  providerOptions?: Record<string, Record<string, any>> | undefined;
282
282
  providerMetadata?: Record<string, Record<string, any>> | undefined;
283
283
  filename?: string | undefined;
284
- type: "source";
285
284
  id: string;
285
+ title: string;
286
+ type: "source";
286
287
  mediaType: string;
287
288
  sourceType: "document";
288
- title: string;
289
289
  })[] | undefined;
290
290
  warnings?: ({
291
291
  details?: string | undefined;
@@ -316,10 +316,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
316
316
  })[] | undefined;
317
317
  _id: string;
318
318
  _creationTime: number;
319
- threadId: string;
319
+ status: "pending" | "success" | "failed";
320
320
  order: number;
321
+ threadId: string;
321
322
  stepOrder: number;
322
- status: "pending" | "success" | "failed";
323
323
  tool: boolean;
324
324
  }[];
325
325
  isDone: boolean;
@@ -340,15 +340,16 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
340
340
  tools: string[];
341
341
  }[]>>;
342
342
  createThread: import("convex/server").RegisteredMutation<"public", {
343
- agentName?: string | undefined;
344
343
  title?: string | undefined;
345
344
  summary?: string | undefined;
345
+ agentName?: string | undefined;
346
346
  userId: string;
347
347
  apiKey: string;
348
348
  }, Promise<{
349
349
  threadId: string;
350
350
  }>>;
351
351
  generateText: import("convex/server").RegisteredAction<"public", {
352
+ system?: string | undefined;
352
353
  messages?: ({
353
354
  providerOptions?: Record<string, Record<string, any>> | undefined;
354
355
  role: "user";
@@ -446,22 +447,22 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
446
447
  toolCallId: string;
447
448
  toolName: string;
448
449
  } | {
450
+ title?: string | undefined;
449
451
  providerOptions?: Record<string, Record<string, any>> | undefined;
450
452
  providerMetadata?: Record<string, Record<string, any>> | undefined;
451
- title?: string | undefined;
452
- type: "source";
453
453
  id: string;
454
+ type: "source";
454
455
  sourceType: "url";
455
456
  url: string;
456
457
  } | {
457
458
  providerOptions?: Record<string, Record<string, any>> | undefined;
458
459
  providerMetadata?: Record<string, Record<string, any>> | undefined;
459
460
  filename?: string | undefined;
460
- type: "source";
461
461
  id: string;
462
+ title: string;
463
+ type: "source";
462
464
  mediaType: string;
463
465
  sourceType: "document";
464
- title: string;
465
466
  })[];
466
467
  } | {
467
468
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -513,7 +514,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
513
514
  role: "system";
514
515
  content: string;
515
516
  })[] | undefined;
516
- system?: string | undefined;
517
517
  prompt?: string | undefined;
518
518
  contextOptions?: {
519
519
  excludeToolMessages?: boolean | undefined;
@@ -562,10 +562,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
562
562
  totalTokens: number;
563
563
  } | undefined;
564
564
  sources?: ({
565
+ title?: string | undefined;
565
566
  type?: "source" | undefined;
566
567
  providerOptions?: Record<string, Record<string, any>> | undefined;
567
568
  providerMetadata?: Record<string, Record<string, any>> | undefined;
568
- title?: string | undefined;
569
569
  id: string;
570
570
  sourceType: "url";
571
571
  url: string;
@@ -573,11 +573,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
573
573
  providerOptions?: Record<string, Record<string, any>> | undefined;
574
574
  providerMetadata?: Record<string, Record<string, any>> | undefined;
575
575
  filename?: string | undefined;
576
- type: "source";
577
576
  id: string;
577
+ title: string;
578
+ type: "source";
578
579
  mediaType: string;
579
580
  sourceType: "document";
580
- title: string;
581
581
  })[] | undefined;
582
582
  warnings?: ({
583
583
  details?: string | undefined;
@@ -703,22 +703,22 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
703
703
  toolCallId: string;
704
704
  toolName: string;
705
705
  } | {
706
+ title?: string | undefined;
706
707
  providerOptions?: Record<string, Record<string, any>> | undefined;
707
708
  providerMetadata?: Record<string, Record<string, any>> | undefined;
708
- title?: string | undefined;
709
- type: "source";
710
709
  id: string;
710
+ type: "source";
711
711
  sourceType: "url";
712
712
  url: string;
713
713
  } | {
714
714
  providerOptions?: Record<string, Record<string, any>> | undefined;
715
715
  providerMetadata?: Record<string, Record<string, any>> | undefined;
716
716
  filename?: string | undefined;
717
- type: "source";
718
717
  id: string;
718
+ title: string;
719
+ type: "source";
719
720
  mediaType: string;
720
721
  sourceType: "document";
721
- title: string;
722
722
  })[];
723
723
  } | {
724
724
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -773,6 +773,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
773
773
  }[];
774
774
  }>>;
775
775
  fetchPromptContext: import("convex/server").RegisteredAction<"public", {
776
+ userId?: string | undefined;
777
+ threadId?: string | undefined;
776
778
  messages?: ({
777
779
  providerOptions?: Record<string, Record<string, any>> | undefined;
778
780
  role: "user";
@@ -870,22 +872,22 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
870
872
  toolCallId: string;
871
873
  toolName: string;
872
874
  } | {
875
+ title?: string | undefined;
873
876
  providerOptions?: Record<string, Record<string, any>> | undefined;
874
877
  providerMetadata?: Record<string, Record<string, any>> | undefined;
875
- title?: string | undefined;
876
- type: "source";
877
878
  id: string;
879
+ type: "source";
878
880
  sourceType: "url";
879
881
  url: string;
880
882
  } | {
881
883
  providerOptions?: Record<string, Record<string, any>> | undefined;
882
884
  providerMetadata?: Record<string, Record<string, any>> | undefined;
883
885
  filename?: string | undefined;
884
- type: "source";
885
886
  id: string;
887
+ title: string;
888
+ type: "source";
886
889
  mediaType: string;
887
890
  sourceType: "document";
888
- title: string;
889
891
  })[];
890
892
  } | {
891
893
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -937,8 +939,6 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
937
939
  role: "system";
938
940
  content: string;
939
941
  })[] | undefined;
940
- userId?: string | undefined;
941
- threadId?: string | undefined;
942
942
  targetMessageId?: string | undefined;
943
943
  beforeMessageId?: string | undefined;
944
944
  searchText?: string | undefined;
@@ -960,8 +960,8 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
960
960
  };
961
961
  apiKey: string;
962
962
  }, Promise<{
963
- userId?: string | undefined;
964
963
  id?: string | undefined;
964
+ userId?: string | undefined;
965
965
  embeddingId?: string | undefined;
966
966
  fileIds?: string[] | undefined;
967
967
  error?: string | undefined;
@@ -1066,22 +1066,22 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
1066
1066
  toolCallId: string;
1067
1067
  toolName: string;
1068
1068
  } | {
1069
+ title?: string | undefined;
1069
1070
  providerOptions?: Record<string, Record<string, any>> | undefined;
1070
1071
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1071
- title?: string | undefined;
1072
- type: "source";
1073
1072
  id: string;
1073
+ type: "source";
1074
1074
  sourceType: "url";
1075
1075
  url: string;
1076
1076
  } | {
1077
1077
  providerOptions?: Record<string, Record<string, any>> | undefined;
1078
1078
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1079
1079
  filename?: string | undefined;
1080
- type: "source";
1081
1080
  id: string;
1081
+ title: string;
1082
+ type: "source";
1082
1083
  mediaType: string;
1083
1084
  sourceType: "document";
1084
- title: string;
1085
1085
  })[];
1086
1086
  } | {
1087
1087
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1144,10 +1144,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
1144
1144
  totalTokens: number;
1145
1145
  } | undefined;
1146
1146
  sources?: ({
1147
+ title?: string | undefined;
1147
1148
  type?: "source" | undefined;
1148
1149
  providerOptions?: Record<string, Record<string, any>> | undefined;
1149
1150
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1150
- title?: string | undefined;
1151
1151
  id: string;
1152
1152
  sourceType: "url";
1153
1153
  url: string;
@@ -1155,11 +1155,11 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
1155
1155
  providerOptions?: Record<string, Record<string, any>> | undefined;
1156
1156
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1157
1157
  filename?: string | undefined;
1158
- type: "source";
1159
1158
  id: string;
1159
+ title: string;
1160
+ type: "source";
1160
1161
  mediaType: string;
1161
1162
  sourceType: "document";
1162
- title: string;
1163
1163
  })[] | undefined;
1164
1164
  warnings?: ({
1165
1165
  details?: string | undefined;
@@ -1190,10 +1190,10 @@ export declare function definePlaygroundAPI<DataModel extends GenericDataModel>(
1190
1190
  })[] | undefined;
1191
1191
  _id: string;
1192
1192
  _creationTime: number;
1193
- threadId: string;
1193
+ status: "pending" | "success" | "failed";
1194
1194
  order: number;
1195
+ threadId: string;
1195
1196
  stepOrder: number;
1196
- status: "pending" | "success" | "failed";
1197
1197
  tool: boolean;
1198
1198
  }[]>>;
1199
1199
  };
@@ -412,8 +412,8 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
412
412
  }): Promise<{
413
413
  messageId: string;
414
414
  message: {
415
- userId?: string | undefined;
416
415
  id?: string | undefined;
416
+ userId?: string | undefined;
417
417
  embeddingId?: string | undefined;
418
418
  fileIds?: string[] | undefined;
419
419
  error?: string | undefined;
@@ -518,22 +518,22 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
518
518
  toolCallId: string;
519
519
  toolName: string;
520
520
  } | {
521
+ title?: string | undefined;
521
522
  providerOptions?: Record<string, Record<string, any>> | undefined;
522
523
  providerMetadata?: Record<string, Record<string, any>> | undefined;
523
- title?: string | undefined;
524
- type: "source";
525
524
  id: string;
525
+ type: "source";
526
526
  sourceType: "url";
527
527
  url: string;
528
528
  } | {
529
529
  providerOptions?: Record<string, Record<string, any>> | undefined;
530
530
  providerMetadata?: Record<string, Record<string, any>> | undefined;
531
531
  filename?: string | undefined;
532
- type: "source";
533
532
  id: string;
533
+ title: string;
534
+ type: "source";
534
535
  mediaType: string;
535
536
  sourceType: "document";
536
- title: string;
537
537
  })[];
538
538
  } | {
539
539
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -596,10 +596,10 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
596
596
  totalTokens: number;
597
597
  } | undefined;
598
598
  sources?: ({
599
+ title?: string | undefined;
599
600
  type?: "source" | undefined;
600
601
  providerOptions?: Record<string, Record<string, any>> | undefined;
601
602
  providerMetadata?: Record<string, Record<string, any>> | undefined;
602
- title?: string | undefined;
603
603
  id: string;
604
604
  sourceType: "url";
605
605
  url: string;
@@ -607,11 +607,11 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
607
607
  providerOptions?: Record<string, Record<string, any>> | undefined;
608
608
  providerMetadata?: Record<string, Record<string, any>> | undefined;
609
609
  filename?: string | undefined;
610
- type: "source";
611
610
  id: string;
611
+ title: string;
612
+ type: "source";
612
613
  mediaType: string;
613
614
  sourceType: "document";
614
- title: string;
615
615
  })[] | undefined;
616
616
  warnings?: ({
617
617
  details?: string | undefined;
@@ -642,10 +642,10 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
642
642
  })[] | undefined;
643
643
  _id: string;
644
644
  _creationTime: number;
645
- threadId: string;
645
+ status: "pending" | "success" | "failed";
646
646
  order: number;
647
+ threadId: string;
647
648
  stepOrder: number;
648
- status: "pending" | "success" | "failed";
649
649
  tool: boolean;
650
650
  };
651
651
  }>;
@@ -1000,6 +1000,10 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1000
1000
  */
1001
1001
  stopWhen?: StopCondition<AgentTools> | Array<StopCondition<AgentTools>>;
1002
1002
  } & Options, overrides?: CallSettings): import("convex/server").RegisteredAction<"internal", {
1003
+ userId?: string | undefined;
1004
+ threadId?: string | undefined;
1005
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1006
+ system?: string | undefined;
1003
1007
  messages?: ({
1004
1008
  providerOptions?: Record<string, Record<string, any>> | undefined;
1005
1009
  role: "user";
@@ -1097,22 +1101,22 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1097
1101
  toolCallId: string;
1098
1102
  toolName: string;
1099
1103
  } | {
1104
+ title?: string | undefined;
1100
1105
  providerOptions?: Record<string, Record<string, any>> | undefined;
1101
1106
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1102
- title?: string | undefined;
1103
- type: "source";
1104
1107
  id: string;
1108
+ type: "source";
1105
1109
  sourceType: "url";
1106
1110
  url: string;
1107
1111
  } | {
1108
1112
  providerOptions?: Record<string, Record<string, any>> | undefined;
1109
1113
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1110
1114
  filename?: string | undefined;
1111
- type: "source";
1112
1115
  id: string;
1116
+ title: string;
1117
+ type: "source";
1113
1118
  mediaType: string;
1114
1119
  sourceType: "document";
1115
- title: string;
1116
1120
  })[];
1117
1121
  } | {
1118
1122
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1164,10 +1168,6 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1164
1168
  role: "system";
1165
1169
  content: string;
1166
1170
  })[] | undefined;
1167
- userId?: string | undefined;
1168
- threadId?: string | undefined;
1169
- providerOptions?: Record<string, Record<string, any>> | undefined;
1170
- system?: string | undefined;
1171
1171
  stream?: boolean | undefined;
1172
1172
  toolChoice?: "required" | "none" | "auto" | {
1173
1173
  type: "tool";
@@ -1196,6 +1196,7 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1196
1196
  saveMessages?: "all" | "none" | "promptAndOutput" | undefined;
1197
1197
  } | undefined;
1198
1198
  callSettings?: {
1199
+ headers?: Record<string, string> | undefined;
1199
1200
  maxOutputTokens?: number | undefined;
1200
1201
  temperature?: number | undefined;
1201
1202
  topP?: number | undefined;
@@ -1205,7 +1206,6 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1205
1206
  stopSequences?: string[] | undefined;
1206
1207
  seed?: number | undefined;
1207
1208
  maxRetries?: number | undefined;
1208
- headers?: Record<string, string> | undefined;
1209
1209
  } | undefined;
1210
1210
  }, Promise<{
1211
1211
  text: string;
@@ -1223,6 +1223,10 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1223
1223
  * and stopWhen.
1224
1224
  */
1225
1225
  asObjectAction<T, DataModel extends GenericDataModel>(objectArgs: GenerateObjectArgs<FlexibleSchema<T>>, options?: Options & MaybeCustomCtx<CustomCtx, DataModel, AgentTools>): import("convex/server").RegisteredAction<"internal", {
1226
+ userId?: string | undefined;
1227
+ threadId?: string | undefined;
1228
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1229
+ system?: string | undefined;
1226
1230
  messages?: ({
1227
1231
  providerOptions?: Record<string, Record<string, any>> | undefined;
1228
1232
  role: "user";
@@ -1320,22 +1324,22 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1320
1324
  toolCallId: string;
1321
1325
  toolName: string;
1322
1326
  } | {
1327
+ title?: string | undefined;
1323
1328
  providerOptions?: Record<string, Record<string, any>> | undefined;
1324
1329
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1325
- title?: string | undefined;
1326
- type: "source";
1327
1330
  id: string;
1331
+ type: "source";
1328
1332
  sourceType: "url";
1329
1333
  url: string;
1330
1334
  } | {
1331
1335
  providerOptions?: Record<string, Record<string, any>> | undefined;
1332
1336
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1333
1337
  filename?: string | undefined;
1334
- type: "source";
1335
1338
  id: string;
1339
+ title: string;
1340
+ type: "source";
1336
1341
  mediaType: string;
1337
1342
  sourceType: "document";
1338
- title: string;
1339
1343
  })[];
1340
1344
  } | {
1341
1345
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1387,10 +1391,6 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1387
1391
  role: "system";
1388
1392
  content: string;
1389
1393
  })[] | undefined;
1390
- userId?: string | undefined;
1391
- threadId?: string | undefined;
1392
- providerOptions?: Record<string, Record<string, any>> | undefined;
1393
- system?: string | undefined;
1394
1394
  prompt?: string | undefined;
1395
1395
  promptMessageId?: string | undefined;
1396
1396
  contextOptions?: {
@@ -1412,6 +1412,7 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1412
1412
  saveMessages?: "all" | "none" | "promptAndOutput" | undefined;
1413
1413
  } | undefined;
1414
1414
  callSettings?: {
1415
+ headers?: Record<string, string> | undefined;
1415
1416
  maxOutputTokens?: number | undefined;
1416
1417
  temperature?: number | undefined;
1417
1418
  topP?: number | undefined;
@@ -1421,7 +1422,6 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1421
1422
  stopSequences?: string[] | undefined;
1422
1423
  seed?: number | undefined;
1423
1424
  maxRetries?: number | undefined;
1424
- headers?: Record<string, string> | undefined;
1425
1425
  } | undefined;
1426
1426
  }, Promise<{
1427
1427
  object: T;
@@ -1454,15 +1454,16 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1454
1454
  asSaveMessagesMutation(): import("convex/server").RegisteredMutation<"internal", {
1455
1455
  userId?: string | undefined;
1456
1456
  promptMessageId?: string | undefined;
1457
- failPendingSteps?: boolean | undefined;
1458
1457
  embeddings?: {
1459
1458
  model: string;
1460
1459
  vectors: (number[] | null)[];
1461
1460
  } | undefined;
1461
+ failPendingSteps?: boolean | undefined;
1462
+ threadId: string;
1462
1463
  messages: {
1464
+ status?: "pending" | "success" | "failed" | undefined;
1463
1465
  fileIds?: string[] | undefined;
1464
1466
  error?: string | undefined;
1465
- status?: "pending" | "success" | "failed" | undefined;
1466
1467
  model?: string | undefined;
1467
1468
  provider?: string | undefined;
1468
1469
  text?: string | undefined;
@@ -1476,10 +1477,10 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1476
1477
  totalTokens: number;
1477
1478
  } | undefined;
1478
1479
  sources?: ({
1480
+ title?: string | undefined;
1479
1481
  type?: "source" | undefined;
1480
1482
  providerOptions?: Record<string, Record<string, any>> | undefined;
1481
1483
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1482
- title?: string | undefined;
1483
1484
  id: string;
1484
1485
  sourceType: "url";
1485
1486
  url: string;
@@ -1487,11 +1488,11 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1487
1488
  providerOptions?: Record<string, Record<string, any>> | undefined;
1488
1489
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1489
1490
  filename?: string | undefined;
1490
- type: "source";
1491
1491
  id: string;
1492
+ title: string;
1493
+ type: "source";
1492
1494
  mediaType: string;
1493
1495
  sourceType: "document";
1494
- title: string;
1495
1496
  })[] | undefined;
1496
1497
  warnings?: ({
1497
1498
  details?: string | undefined;
@@ -1617,22 +1618,22 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1617
1618
  toolCallId: string;
1618
1619
  toolName: string;
1619
1620
  } | {
1621
+ title?: string | undefined;
1620
1622
  providerOptions?: Record<string, Record<string, any>> | undefined;
1621
1623
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1622
- title?: string | undefined;
1623
- type: "source";
1624
1624
  id: string;
1625
+ type: "source";
1625
1626
  sourceType: "url";
1626
1627
  url: string;
1627
1628
  } | {
1628
1629
  providerOptions?: Record<string, Record<string, any>> | undefined;
1629
1630
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1630
1631
  filename?: string | undefined;
1631
- type: "source";
1632
1632
  id: string;
1633
+ title: string;
1634
+ type: "source";
1633
1635
  mediaType: string;
1634
1636
  sourceType: "document";
1635
- title: string;
1636
1637
  })[];
1637
1638
  } | {
1638
1639
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1685,7 +1686,6 @@ CustomCtx extends object = object, AgentTools extends ToolSet = any> {
1685
1686
  content: string;
1686
1687
  };
1687
1688
  }[];
1688
- threadId: string;
1689
1689
  }, Promise<{
1690
1690
  lastMessageId: string;
1691
1691
  messages: {