@convex-dev/agent 0.2.0-alpha.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/client/createTool.d.ts +3 -5
  2. package/dist/client/createTool.d.ts.map +1 -1
  3. package/dist/client/createTool.js +0 -1
  4. package/dist/client/createTool.js.map +1 -1
  5. package/dist/client/definePlaygroundAPI.d.ts +28 -28
  6. package/dist/client/files.d.ts +8 -1
  7. package/dist/client/files.d.ts.map +1 -1
  8. package/dist/client/files.js +60 -5
  9. package/dist/client/files.js.map +1 -1
  10. package/dist/client/index.d.ts +223 -239
  11. package/dist/client/index.d.ts.map +1 -1
  12. package/dist/client/index.js +368 -382
  13. package/dist/client/index.js.map +1 -1
  14. package/dist/client/messages.d.ts +91 -373
  15. package/dist/client/messages.d.ts.map +1 -1
  16. package/dist/client/messages.js +7 -1
  17. package/dist/client/messages.js.map +1 -1
  18. package/dist/client/search.d.ts +15 -15
  19. package/dist/client/search.d.ts.map +1 -1
  20. package/dist/client/search.js +3 -3
  21. package/dist/client/search.js.map +1 -1
  22. package/dist/client/streaming.d.ts +21 -22
  23. package/dist/client/streaming.d.ts.map +1 -1
  24. package/dist/client/streaming.js +35 -40
  25. package/dist/client/streaming.js.map +1 -1
  26. package/dist/client/types.d.ts +148 -61
  27. package/dist/client/types.d.ts.map +1 -1
  28. package/dist/component/_generated/api.d.ts +47 -357
  29. package/dist/component/messages.d.ts +157 -150
  30. package/dist/component/messages.d.ts.map +1 -1
  31. package/dist/component/messages.js +124 -70
  32. package/dist/component/messages.js.map +1 -1
  33. package/dist/component/schema.d.ts +1147 -2687
  34. package/dist/component/schema.d.ts.map +1 -1
  35. package/dist/component/schema.js +5 -4
  36. package/dist/component/schema.js.map +1 -1
  37. package/dist/component/streams.d.ts +29 -323
  38. package/dist/component/streams.d.ts.map +1 -1
  39. package/dist/component/streams.js +104 -60
  40. package/dist/component/streams.js.map +1 -1
  41. package/dist/component/threads.d.ts +4 -4
  42. package/dist/component/users.d.ts +3 -3
  43. package/dist/mapping.d.ts +4 -1
  44. package/dist/mapping.d.ts.map +1 -1
  45. package/dist/mapping.js +17 -1
  46. package/dist/mapping.js.map +1 -1
  47. package/dist/parts.d.ts +3 -0
  48. package/dist/parts.d.ts.map +1 -0
  49. package/dist/parts.js +34 -0
  50. package/dist/parts.js.map +1 -0
  51. package/dist/react/SmoothText.d.ts +5 -0
  52. package/dist/react/SmoothText.d.ts.map +1 -0
  53. package/dist/react/SmoothText.js +6 -0
  54. package/dist/react/SmoothText.js.map +1 -0
  55. package/dist/react/deltas.d.ts +3 -2
  56. package/dist/react/deltas.d.ts.map +1 -1
  57. package/dist/react/deltas.js +19 -79
  58. package/dist/react/deltas.js.map +1 -1
  59. package/dist/react/index.d.ts +1 -0
  60. package/dist/react/index.d.ts.map +1 -1
  61. package/dist/react/index.js +31 -11
  62. package/dist/react/index.js.map +1 -1
  63. package/dist/react/optimisticallySendMessage.d.ts.map +1 -1
  64. package/dist/react/optimisticallySendMessage.js +2 -8
  65. package/dist/react/optimisticallySendMessage.js.map +1 -1
  66. package/dist/react/useSmoothText.d.ts +13 -12
  67. package/dist/react/useSmoothText.d.ts.map +1 -1
  68. package/dist/react/useSmoothText.js +1 -1
  69. package/dist/react/useSmoothText.js.map +1 -1
  70. package/dist/validators.d.ts +109 -1590
  71. package/dist/validators.d.ts.map +1 -1
  72. package/dist/validators.js +4 -81
  73. package/dist/validators.js.map +1 -1
  74. package/package.json +3 -3
  75. package/src/client/createTool.ts +4 -9
  76. package/src/client/files.ts +88 -10
  77. package/src/client/index.test.ts +9 -21
  78. package/src/client/index.ts +664 -650
  79. package/src/client/messages.ts +16 -2
  80. package/src/client/search.ts +10 -7
  81. package/src/client/streaming.ts +53 -57
  82. package/src/client/types.ts +227 -97
  83. package/src/component/_generated/api.d.ts +47 -357
  84. package/src/component/messages.ts +157 -96
  85. package/src/component/schema.ts +4 -4
  86. package/src/component/streams.ts +180 -69
  87. package/src/mapping.ts +23 -2
  88. package/src/parts.ts +39 -0
  89. package/src/react/SmoothText.tsx +9 -0
  90. package/src/react/deltas.test.ts +38 -42
  91. package/src/react/deltas.ts +24 -86
  92. package/src/react/index.ts +35 -13
  93. package/src/react/optimisticallySendMessage.ts +2 -8
  94. package/src/react/useSmoothText.ts +14 -15
  95. package/src/validators.test.ts +0 -17
  96. package/src/validators.ts +8 -101
@@ -382,9 +382,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
382
382
  title?: string | undefined;
383
383
  type?: "source" | undefined;
384
384
  providerOptions?: Record<string, Record<string, any>> | undefined;
385
- url?: string | undefined;
386
385
  id: string;
387
386
  sourceType: "url";
387
+ url: string;
388
388
  } | {
389
389
  filename?: string | undefined;
390
390
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -394,6 +394,19 @@ export declare const schema: import("convex/server").SchemaDefinition<{
394
394
  sourceType: "document";
395
395
  mediaType: string;
396
396
  })[] | undefined;
397
+ warnings?: ({
398
+ details?: string | undefined;
399
+ type: "unsupported-setting";
400
+ setting: string;
401
+ } | {
402
+ details?: string | undefined;
403
+ type: "unsupported-tool";
404
+ tool: any;
405
+ } | {
406
+ type: "other";
407
+ message: string;
408
+ })[] | undefined;
409
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
397
410
  reasoningDetails?: ({
398
411
  providerOptions?: Record<string, Record<string, any>> | undefined;
399
412
  signature?: string | undefined;
@@ -408,19 +421,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
408
421
  type: "redacted";
409
422
  data: string;
410
423
  })[] | undefined;
411
- warnings?: ({
412
- details?: string | undefined;
413
- type: "unsupported-setting";
414
- setting: string;
415
- } | {
416
- details?: string | undefined;
417
- type: "unsupported-tool";
418
- tool: any;
419
- } | {
420
- type: "other";
421
- message: string;
422
- })[] | undefined;
423
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
424
424
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
425
425
  stepId?: string | undefined;
426
426
  status: "pending" | "success" | "failed";
@@ -910,9 +910,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
910
910
  title?: string | undefined;
911
911
  type?: "source" | undefined;
912
912
  providerOptions?: Record<string, Record<string, any>> | undefined;
913
- url?: string | undefined;
914
913
  id: string;
915
914
  sourceType: "url";
915
+ url: string;
916
916
  } | {
917
917
  filename?: string | undefined;
918
918
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -925,9 +925,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
925
925
  title?: string | undefined;
926
926
  type?: "source" | undefined;
927
927
  providerOptions?: Record<string, Record<string, any>> | undefined;
928
- url?: string | undefined;
929
928
  id: string;
930
929
  sourceType: "url";
930
+ url: string;
931
931
  } | {
932
932
  filename?: string | undefined;
933
933
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -940,14 +940,14 @@ export declare const schema: import("convex/server").SchemaDefinition<{
940
940
  title?: string | undefined;
941
941
  type?: "source" | undefined;
942
942
  providerOptions?: Record<string, Record<string, any>> | undefined;
943
- url?: string | undefined;
944
943
  id: string;
945
944
  sourceType: "url";
945
+ url: string;
946
946
  }, {
947
947
  type: import("convex/values").VLiteral<"source" | undefined, "optional">;
948
948
  sourceType: import("convex/values").VLiteral<"url", "required">;
949
949
  id: import("convex/values").VString<string, "required">;
950
- url: import("convex/values").VString<string | undefined, "optional">;
950
+ url: import("convex/values").VString<string, "required">;
951
951
  title: import("convex/values").VString<string | undefined, "optional">;
952
952
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
953
953
  }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
@@ -967,6 +967,52 @@ export declare const schema: import("convex/server").SchemaDefinition<{
967
967
  filename: import("convex/values").VString<string | undefined, "optional">;
968
968
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
969
969
  }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, "optional">;
970
+ warnings: import("convex/values").VArray<({
971
+ details?: string | undefined;
972
+ type: "unsupported-setting";
973
+ setting: string;
974
+ } | {
975
+ details?: string | undefined;
976
+ type: "unsupported-tool";
977
+ tool: any;
978
+ } | {
979
+ type: "other";
980
+ message: string;
981
+ })[] | undefined, import("convex/values").VUnion<{
982
+ details?: string | undefined;
983
+ type: "unsupported-setting";
984
+ setting: string;
985
+ } | {
986
+ details?: string | undefined;
987
+ type: "unsupported-tool";
988
+ tool: any;
989
+ } | {
990
+ type: "other";
991
+ message: string;
992
+ }, [import("convex/values").VObject<{
993
+ details?: string | undefined;
994
+ type: "unsupported-setting";
995
+ setting: string;
996
+ }, {
997
+ type: import("convex/values").VLiteral<"unsupported-setting", "required">;
998
+ setting: import("convex/values").VString<string, "required">;
999
+ details: import("convex/values").VString<string | undefined, "optional">;
1000
+ }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
1001
+ details?: string | undefined;
1002
+ type: "unsupported-tool";
1003
+ tool: any;
1004
+ }, {
1005
+ type: import("convex/values").VLiteral<"unsupported-tool", "required">;
1006
+ tool: import("convex/values").VAny<any, "required", string>;
1007
+ details: import("convex/values").VString<string | undefined, "optional">;
1008
+ }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
1009
+ type: "other";
1010
+ message: string;
1011
+ }, {
1012
+ type: import("convex/values").VLiteral<"other", "required">;
1013
+ message: import("convex/values").VString<string, "required">;
1014
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
1015
+ finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
970
1016
  reasoning: import("convex/values").VString<string | undefined, "optional">;
971
1017
  reasoningDetails: import("convex/values").VArray<({
972
1018
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -1021,57 +1067,11 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1021
1067
  type: import("convex/values").VLiteral<"redacted", "required">;
1022
1068
  data: import("convex/values").VString<string, "required">;
1023
1069
  }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
1024
- warnings: import("convex/values").VArray<({
1025
- details?: string | undefined;
1026
- type: "unsupported-setting";
1027
- setting: string;
1028
- } | {
1029
- details?: string | undefined;
1030
- type: "unsupported-tool";
1031
- tool: any;
1032
- } | {
1033
- type: "other";
1034
- message: string;
1035
- })[] | undefined, import("convex/values").VUnion<{
1036
- details?: string | undefined;
1037
- type: "unsupported-setting";
1038
- setting: string;
1039
- } | {
1040
- details?: string | undefined;
1041
- type: "unsupported-tool";
1042
- tool: any;
1043
- } | {
1044
- type: "other";
1045
- message: string;
1046
- }, [import("convex/values").VObject<{
1047
- details?: string | undefined;
1048
- type: "unsupported-setting";
1049
- setting: string;
1050
- }, {
1051
- type: import("convex/values").VLiteral<"unsupported-setting", "required">;
1052
- setting: import("convex/values").VString<string, "required">;
1053
- details: import("convex/values").VString<string | undefined, "optional">;
1054
- }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
1055
- details?: string | undefined;
1056
- type: "unsupported-tool";
1057
- tool: any;
1058
- }, {
1059
- type: import("convex/values").VLiteral<"unsupported-tool", "required">;
1060
- tool: import("convex/values").VAny<any, "required", string>;
1061
- details: import("convex/values").VString<string | undefined, "optional">;
1062
- }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
1063
- type: "other";
1064
- message: string;
1065
- }, {
1066
- type: import("convex/values").VLiteral<"other", "required">;
1067
- message: import("convex/values").VString<string, "required">;
1068
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
1069
- finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
1070
1070
  id: import("convex/values").VString<string | undefined, "optional">;
1071
1071
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
1072
1072
  stepId: import("convex/values").VString<string | undefined, "optional">;
1073
1073
  files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
1074
- }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">, {
1074
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "warnings" | "finishReason" | "reasoningDetails" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">, {
1075
1075
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
1076
1076
  embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
1077
1077
  }, {
@@ -1156,740 +1156,74 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1156
1156
  streamId: import("convex/values").GenericId<"streamingMessages">;
1157
1157
  start: number;
1158
1158
  end: number;
1159
- parts: ({
1160
- providerOptions?: Record<string, Record<string, any>> | undefined;
1161
- providerExecuted?: boolean | undefined;
1162
- type: "tool-call";
1163
- toolCallId: string;
1164
- toolName: string;
1165
- args: any;
1166
- } | {
1167
- providerOptions?: Record<string, Record<string, any>> | undefined;
1168
- args?: any;
1169
- providerExecuted?: boolean | undefined;
1170
- isError?: boolean | undefined;
1171
- experimental_content?: ({
1172
- type: "text";
1173
- text: string;
1174
- } | {
1175
- mimeType?: string | undefined;
1176
- type: "image";
1177
- data: string;
1178
- })[] | undefined;
1179
- type: "tool-result";
1180
- toolCallId: string;
1181
- toolName: string;
1182
- result: any;
1183
- } | {
1184
- title?: string | undefined;
1185
- type?: "source" | undefined;
1186
- providerOptions?: Record<string, Record<string, any>> | undefined;
1187
- url?: string | undefined;
1188
- id: string;
1189
- sourceType: "url";
1190
- } | {
1191
- filename?: string | undefined;
1192
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1193
- id: string;
1194
- title: string;
1195
- type: "source";
1196
- sourceType: "document";
1197
- mediaType: string;
1198
- } | {
1199
- type: "text-delta";
1200
- textDelta: string;
1201
- } | {
1202
- type: "reasoning";
1203
- textDelta: string;
1204
- } | {
1205
- type: "source";
1206
- source: {
1207
- title?: string | undefined;
1208
- providerOptions?: Record<string, Record<string, any>> | undefined;
1209
- url?: string | undefined;
1210
- id: string;
1211
- sourceType: "url";
1212
- };
1213
- } | {
1214
- type: "tool-call-streaming-start";
1215
- toolCallId: string;
1216
- toolName: string;
1217
- } | {
1218
- type: "tool-call-delta";
1219
- toolCallId: string;
1220
- toolName: string;
1221
- argsTextDelta: string;
1222
- } | {
1223
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1224
- id: string;
1225
- type: "text-delta";
1226
- text: string;
1227
- } | {
1228
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1229
- id: string;
1230
- type: "reasoning-delta";
1231
- text: string;
1232
- } | {
1233
- providerExecuted?: boolean | undefined;
1234
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1235
- dynamic?: boolean | undefined;
1236
- type: "tool-call";
1237
- toolCallId: string;
1238
- toolName: string;
1239
- input: any;
1240
- } | {
1241
- providerExecuted?: boolean | undefined;
1242
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1243
- dynamic?: boolean | undefined;
1244
- id: string;
1245
- type: "tool-input-start";
1246
- toolName: string;
1247
- } | {
1248
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1249
- id: string;
1250
- type: "tool-input-delta";
1251
- delta: string;
1252
- } | {
1253
- providerExecuted?: boolean | undefined;
1254
- input?: any;
1255
- dynamic?: boolean | undefined;
1256
- output?: any;
1257
- type: "tool-result";
1258
- toolCallId: string;
1259
- toolName: string;
1260
- } | {
1261
- type: "raw";
1262
- rawValue: any;
1263
- })[];
1159
+ parts: any[];
1264
1160
  }, {
1265
1161
  streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
1266
1162
  start: import("convex/values").VFloat64<number, "required">;
1267
1163
  end: import("convex/values").VFloat64<number, "required">;
1268
- parts: import("convex/values").VArray<({
1269
- providerOptions?: Record<string, Record<string, any>> | undefined;
1270
- providerExecuted?: boolean | undefined;
1271
- type: "tool-call";
1272
- toolCallId: string;
1273
- toolName: string;
1274
- args: any;
1275
- } | {
1276
- providerOptions?: Record<string, Record<string, any>> | undefined;
1277
- args?: any;
1278
- providerExecuted?: boolean | undefined;
1279
- isError?: boolean | undefined;
1280
- experimental_content?: ({
1281
- type: "text";
1282
- text: string;
1283
- } | {
1284
- mimeType?: string | undefined;
1285
- type: "image";
1286
- data: string;
1287
- })[] | undefined;
1288
- type: "tool-result";
1289
- toolCallId: string;
1290
- toolName: string;
1291
- result: any;
1292
- } | {
1293
- title?: string | undefined;
1294
- type?: "source" | undefined;
1295
- providerOptions?: Record<string, Record<string, any>> | undefined;
1296
- url?: string | undefined;
1297
- id: string;
1298
- sourceType: "url";
1299
- } | {
1300
- filename?: string | undefined;
1301
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1302
- id: string;
1303
- title: string;
1304
- type: "source";
1305
- sourceType: "document";
1306
- mediaType: string;
1307
- } | {
1308
- type: "text-delta";
1309
- textDelta: string;
1310
- } | {
1311
- type: "reasoning";
1312
- textDelta: string;
1313
- } | {
1314
- type: "source";
1315
- source: {
1316
- title?: string | undefined;
1317
- providerOptions?: Record<string, Record<string, any>> | undefined;
1318
- url?: string | undefined;
1319
- id: string;
1320
- sourceType: "url";
1321
- };
1322
- } | {
1323
- type: "tool-call-streaming-start";
1324
- toolCallId: string;
1325
- toolName: string;
1326
- } | {
1327
- type: "tool-call-delta";
1328
- toolCallId: string;
1329
- toolName: string;
1330
- argsTextDelta: string;
1331
- } | {
1332
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1333
- id: string;
1334
- type: "text-delta";
1335
- text: string;
1336
- } | {
1337
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1338
- id: string;
1339
- type: "reasoning-delta";
1340
- text: string;
1341
- } | {
1342
- providerExecuted?: boolean | undefined;
1343
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1344
- dynamic?: boolean | undefined;
1345
- type: "tool-call";
1346
- toolCallId: string;
1347
- toolName: string;
1348
- input: any;
1349
- } | {
1350
- providerExecuted?: boolean | undefined;
1351
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1352
- dynamic?: boolean | undefined;
1353
- id: string;
1354
- type: "tool-input-start";
1355
- toolName: string;
1356
- } | {
1357
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1358
- id: string;
1359
- type: "tool-input-delta";
1360
- delta: string;
1361
- } | {
1362
- providerExecuted?: boolean | undefined;
1363
- input?: any;
1364
- dynamic?: boolean | undefined;
1365
- output?: any;
1366
- type: "tool-result";
1367
- toolCallId: string;
1368
- toolName: string;
1369
- } | {
1370
- type: "raw";
1371
- rawValue: any;
1372
- })[], import("convex/values").VUnion<{
1373
- providerOptions?: Record<string, Record<string, any>> | undefined;
1374
- providerExecuted?: boolean | undefined;
1375
- type: "tool-call";
1376
- toolCallId: string;
1377
- toolName: string;
1378
- args: any;
1379
- } | {
1380
- providerOptions?: Record<string, Record<string, any>> | undefined;
1381
- args?: any;
1382
- providerExecuted?: boolean | undefined;
1383
- isError?: boolean | undefined;
1384
- experimental_content?: ({
1385
- type: "text";
1386
- text: string;
1387
- } | {
1388
- mimeType?: string | undefined;
1389
- type: "image";
1390
- data: string;
1391
- })[] | undefined;
1392
- type: "tool-result";
1393
- toolCallId: string;
1394
- toolName: string;
1395
- result: any;
1396
- } | {
1397
- title?: string | undefined;
1398
- type?: "source" | undefined;
1399
- providerOptions?: Record<string, Record<string, any>> | undefined;
1400
- url?: string | undefined;
1401
- id: string;
1402
- sourceType: "url";
1403
- } | {
1404
- filename?: string | undefined;
1405
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1406
- id: string;
1407
- title: string;
1408
- type: "source";
1409
- sourceType: "document";
1410
- mediaType: string;
1411
- } | {
1412
- type: "text-delta";
1413
- textDelta: string;
1414
- } | {
1415
- type: "reasoning";
1416
- textDelta: string;
1417
- } | {
1418
- type: "source";
1419
- source: {
1164
+ parts: import("convex/values").VArray<any[], import("convex/values").VAny<any, "required", string>, "required">;
1165
+ }, "required", "streamId" | "start" | "end" | "parts">, {
1166
+ streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1167
+ }, {}, {}>;
1168
+ memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
1169
+ userId?: string | undefined;
1170
+ threadId?: import("convex/values").GenericId<"threads"> | undefined;
1171
+ embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
1172
+ memory: string;
1173
+ }, {
1174
+ threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
1175
+ userId: import("convex/values").VString<string | undefined, "optional">;
1176
+ memory: import("convex/values").VString<string, "required">;
1177
+ embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
1178
+ }, "required", "userId" | "threadId" | "embeddingId" | "memory">, {
1179
+ threadId: ["threadId", "_creationTime"];
1180
+ userId: ["userId", "_creationTime"];
1181
+ embeddingId: ["embeddingId", "_creationTime"];
1182
+ }, {}, {}>;
1183
+ files: import("convex/server").TableDefinition<import("convex/values").VObject<{
1184
+ filename?: string | undefined;
1185
+ mimeType: string;
1186
+ storageId: string;
1187
+ hash: string;
1188
+ refcount: number;
1189
+ lastTouchedAt: number;
1190
+ }, {
1191
+ storageId: import("convex/values").VString<string, "required">;
1192
+ mimeType: import("convex/values").VString<string, "required">;
1193
+ filename: import("convex/values").VString<string | undefined, "optional">;
1194
+ hash: import("convex/values").VString<string, "required">;
1195
+ refcount: import("convex/values").VFloat64<number, "required">;
1196
+ lastTouchedAt: import("convex/values").VFloat64<number, "required">;
1197
+ }, "required", "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt">, {
1198
+ hash: ["hash", "_creationTime"];
1199
+ refcount: ["refcount", "_creationTime"];
1200
+ }, {}, {}>;
1201
+ }, true>;
1202
+ export declare const vv: {
1203
+ id: <TableName extends import("convex/server").TableNamesInDataModel<{
1204
+ threads: {
1205
+ document: {
1206
+ _id: import("convex/values").GenericId<"threads">;
1207
+ _creationTime: number;
1208
+ userId?: string | undefined;
1420
1209
  title?: string | undefined;
1421
- providerOptions?: Record<string, Record<string, any>> | undefined;
1422
- url?: string | undefined;
1423
- id: string;
1424
- sourceType: "url";
1210
+ summary?: string | undefined;
1211
+ defaultSystemPrompt?: string | undefined;
1212
+ parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1213
+ order?: number | undefined;
1214
+ status: "active" | "archived";
1425
1215
  };
1426
- } | {
1427
- type: "tool-call-streaming-start";
1428
- toolCallId: string;
1429
- toolName: string;
1430
- } | {
1431
- type: "tool-call-delta";
1432
- toolCallId: string;
1433
- toolName: string;
1434
- argsTextDelta: string;
1435
- } | {
1436
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1437
- id: string;
1438
- type: "text-delta";
1439
- text: string;
1440
- } | {
1441
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1442
- id: string;
1443
- type: "reasoning-delta";
1444
- text: string;
1445
- } | {
1446
- providerExecuted?: boolean | undefined;
1447
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1448
- dynamic?: boolean | undefined;
1449
- type: "tool-call";
1450
- toolCallId: string;
1451
- toolName: string;
1452
- input: any;
1453
- } | {
1454
- providerExecuted?: boolean | undefined;
1455
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1456
- dynamic?: boolean | undefined;
1457
- id: string;
1458
- type: "tool-input-start";
1459
- toolName: string;
1460
- } | {
1461
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1462
- id: string;
1463
- type: "tool-input-delta";
1464
- delta: string;
1465
- } | {
1466
- providerExecuted?: boolean | undefined;
1467
- input?: any;
1468
- dynamic?: boolean | undefined;
1469
- output?: any;
1470
- type: "tool-result";
1471
- toolCallId: string;
1472
- toolName: string;
1473
- } | {
1474
- type: "raw";
1475
- rawValue: any;
1476
- }, [import("convex/values").VUnion<{
1477
- providerOptions?: Record<string, Record<string, any>> | undefined;
1478
- providerExecuted?: boolean | undefined;
1479
- type: "tool-call";
1480
- toolCallId: string;
1481
- toolName: string;
1482
- args: any;
1483
- } | {
1484
- providerOptions?: Record<string, Record<string, any>> | undefined;
1485
- args?: any;
1486
- providerExecuted?: boolean | undefined;
1487
- isError?: boolean | undefined;
1488
- experimental_content?: ({
1489
- type: "text";
1490
- text: string;
1491
- } | {
1492
- mimeType?: string | undefined;
1493
- type: "image";
1494
- data: string;
1495
- })[] | undefined;
1496
- type: "tool-result";
1497
- toolCallId: string;
1498
- toolName: string;
1499
- result: any;
1500
- } | {
1501
- type: "text-delta";
1502
- textDelta: string;
1503
- } | {
1504
- type: "reasoning";
1505
- textDelta: string;
1506
- } | {
1507
- type: "source";
1508
- source: {
1509
- title?: string | undefined;
1510
- providerOptions?: Record<string, Record<string, any>> | undefined;
1511
- url?: string | undefined;
1512
- id: string;
1513
- sourceType: "url";
1216
+ fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
1217
+ indexes: {
1218
+ userId: ["userId", "_creationTime"];
1219
+ by_id: ["_id"];
1220
+ by_creation_time: ["_creationTime"];
1514
1221
  };
1515
- } | {
1516
- type: "tool-call-streaming-start";
1517
- toolCallId: string;
1518
- toolName: string;
1519
- } | {
1520
- type: "tool-call-delta";
1521
- toolCallId: string;
1522
- toolName: string;
1523
- argsTextDelta: string;
1524
- }, [import("convex/values").VObject<{
1525
- type: "text-delta";
1526
- textDelta: string;
1527
- }, {
1528
- type: import("convex/values").VLiteral<"text-delta", "required">;
1529
- textDelta: import("convex/values").VString<string, "required">;
1530
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
1531
- type: "reasoning";
1532
- textDelta: string;
1533
- }, {
1534
- type: import("convex/values").VLiteral<"reasoning", "required">;
1535
- textDelta: import("convex/values").VString<string, "required">;
1536
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
1537
- type: "source";
1538
- source: {
1539
- title?: string | undefined;
1540
- providerOptions?: Record<string, Record<string, any>> | undefined;
1541
- url?: string | undefined;
1542
- id: string;
1543
- sourceType: "url";
1544
- };
1545
- }, {
1546
- type: import("convex/values").VLiteral<"source", "required">;
1547
- source: import("convex/values").VObject<{
1548
- title?: string | undefined;
1549
- providerOptions?: Record<string, Record<string, any>> | undefined;
1550
- url?: string | undefined;
1551
- id: string;
1552
- sourceType: "url";
1553
- }, {
1554
- sourceType: import("convex/values").VLiteral<"url", "required">;
1555
- id: import("convex/values").VString<string, "required">;
1556
- url: import("convex/values").VString<string | undefined, "optional">;
1557
- title: import("convex/values").VString<string | undefined, "optional">;
1558
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1559
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
1560
- }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
1561
- providerOptions?: Record<string, Record<string, any>> | undefined;
1562
- providerExecuted?: boolean | undefined;
1563
- type: "tool-call";
1564
- toolCallId: string;
1565
- toolName: string;
1566
- args: any;
1567
- }, {
1568
- type: import("convex/values").VLiteral<"tool-call", "required">;
1569
- toolCallId: import("convex/values").VString<string, "required">;
1570
- toolName: import("convex/values").VString<string, "required">;
1571
- args: import("convex/values").VAny<any, "required", string>;
1572
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1573
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1574
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
1575
- providerOptions?: Record<string, Record<string, any>> | undefined;
1576
- args?: any;
1577
- providerExecuted?: boolean | undefined;
1578
- isError?: boolean | undefined;
1579
- experimental_content?: ({
1580
- type: "text";
1581
- text: string;
1582
- } | {
1583
- mimeType?: string | undefined;
1584
- type: "image";
1585
- data: string;
1586
- })[] | undefined;
1587
- type: "tool-result";
1588
- toolCallId: string;
1589
- toolName: string;
1590
- result: any;
1591
- }, {
1592
- type: import("convex/values").VLiteral<"tool-result", "required">;
1593
- toolCallId: import("convex/values").VString<string, "required">;
1594
- toolName: import("convex/values").VString<string, "required">;
1595
- result: import("convex/values").VAny<any, "required", string>;
1596
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1597
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1598
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1599
- args: import("convex/values").VAny<any, "optional", string>;
1600
- experimental_content: import("convex/values").VArray<({
1601
- type: "text";
1602
- text: string;
1603
- } | {
1604
- mimeType?: string | undefined;
1605
- type: "image";
1606
- data: string;
1607
- })[] | undefined, import("convex/values").VUnion<{
1608
- type: "text";
1609
- text: string;
1610
- } | {
1611
- mimeType?: string | undefined;
1612
- type: "image";
1613
- data: string;
1614
- }, [import("convex/values").VObject<{
1615
- type: "text";
1616
- text: string;
1617
- }, {
1618
- type: import("convex/values").VLiteral<"text", "required">;
1619
- text: import("convex/values").VString<string, "required">;
1620
- }, "required", "type" | "text">, import("convex/values").VObject<{
1621
- mimeType?: string | undefined;
1622
- type: "image";
1623
- data: string;
1624
- }, {
1625
- type: import("convex/values").VLiteral<"image", "required">;
1626
- data: import("convex/values").VString<string, "required">;
1627
- mimeType: import("convex/values").VString<string | undefined, "optional">;
1628
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1629
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, import("convex/values").VObject<{
1630
- type: "tool-call-streaming-start";
1631
- toolCallId: string;
1632
- toolName: string;
1633
- }, {
1634
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
1635
- toolCallId: import("convex/values").VString<string, "required">;
1636
- toolName: import("convex/values").VString<string, "required">;
1637
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
1638
- type: "tool-call-delta";
1639
- toolCallId: string;
1640
- toolName: string;
1641
- argsTextDelta: string;
1642
- }, {
1643
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
1644
- toolCallId: import("convex/values").VString<string, "required">;
1645
- toolName: import("convex/values").VString<string, "required">;
1646
- argsTextDelta: import("convex/values").VString<string, "required">;
1647
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "source" | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, import("convex/values").VUnion<{
1648
- title?: string | undefined;
1649
- type?: "source" | undefined;
1650
- providerOptions?: Record<string, Record<string, any>> | undefined;
1651
- url?: string | undefined;
1652
- id: string;
1653
- sourceType: "url";
1654
- } | {
1655
- filename?: string | undefined;
1656
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1657
- id: string;
1658
- title: string;
1659
- type: "source";
1660
- sourceType: "document";
1661
- mediaType: string;
1662
- } | {
1663
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1664
- id: string;
1665
- type: "text-delta";
1666
- text: string;
1667
- } | {
1668
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1669
- id: string;
1670
- type: "reasoning-delta";
1671
- text: string;
1672
- } | {
1673
- providerExecuted?: boolean | undefined;
1674
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1675
- dynamic?: boolean | undefined;
1676
- type: "tool-call";
1677
- toolCallId: string;
1678
- toolName: string;
1679
- input: any;
1680
- } | {
1681
- providerExecuted?: boolean | undefined;
1682
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1683
- dynamic?: boolean | undefined;
1684
- id: string;
1685
- type: "tool-input-start";
1686
- toolName: string;
1687
- } | {
1688
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1689
- id: string;
1690
- type: "tool-input-delta";
1691
- delta: string;
1692
- } | {
1693
- providerExecuted?: boolean | undefined;
1694
- input?: any;
1695
- dynamic?: boolean | undefined;
1696
- output?: any;
1697
- type: "tool-result";
1698
- toolCallId: string;
1699
- toolName: string;
1700
- } | {
1701
- type: "raw";
1702
- rawValue: any;
1703
- }, [import("convex/values").VObject<{
1704
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1705
- id: string;
1706
- type: "text-delta";
1707
- text: string;
1708
- }, {
1709
- type: import("convex/values").VLiteral<"text-delta", "required">;
1710
- id: import("convex/values").VString<string, "required">;
1711
- text: import("convex/values").VString<string, "required">;
1712
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1713
- }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VObject<{
1714
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1715
- id: string;
1716
- type: "reasoning-delta";
1717
- text: string;
1718
- }, {
1719
- type: import("convex/values").VLiteral<"reasoning-delta", "required">;
1720
- id: import("convex/values").VString<string, "required">;
1721
- text: import("convex/values").VString<string, "required">;
1722
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1723
- }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VUnion<{
1724
- title?: string | undefined;
1725
- type?: "source" | undefined;
1726
- providerOptions?: Record<string, Record<string, any>> | undefined;
1727
- url?: string | undefined;
1728
- id: string;
1729
- sourceType: "url";
1730
- } | {
1731
- filename?: string | undefined;
1732
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1733
- id: string;
1734
- title: string;
1735
- type: "source";
1736
- sourceType: "document";
1737
- mediaType: string;
1738
- }, [import("convex/values").VObject<{
1739
- title?: string | undefined;
1740
- type?: "source" | undefined;
1741
- providerOptions?: Record<string, Record<string, any>> | undefined;
1742
- url?: string | undefined;
1743
- id: string;
1744
- sourceType: "url";
1745
- }, {
1746
- type: import("convex/values").VLiteral<"source" | undefined, "optional">;
1747
- sourceType: import("convex/values").VLiteral<"url", "required">;
1748
- id: import("convex/values").VString<string, "required">;
1749
- url: import("convex/values").VString<string | undefined, "optional">;
1750
- title: import("convex/values").VString<string | undefined, "optional">;
1751
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1752
- }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
1753
- filename?: string | undefined;
1754
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1755
- id: string;
1756
- title: string;
1757
- type: "source";
1758
- sourceType: "document";
1759
- mediaType: string;
1760
- }, {
1761
- type: import("convex/values").VLiteral<"source", "required">;
1762
- sourceType: import("convex/values").VLiteral<"document", "required">;
1763
- id: import("convex/values").VString<string, "required">;
1764
- mediaType: import("convex/values").VString<string, "required">;
1765
- title: import("convex/values").VString<string, "required">;
1766
- filename: import("convex/values").VString<string | undefined, "optional">;
1767
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1768
- }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, import("convex/values").VObject<{
1769
- providerExecuted?: boolean | undefined;
1770
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1771
- dynamic?: boolean | undefined;
1772
- type: "tool-call";
1773
- toolCallId: string;
1774
- toolName: string;
1775
- input: any;
1776
- }, {
1777
- type: import("convex/values").VLiteral<"tool-call", "required">;
1778
- toolCallId: import("convex/values").VString<string, "required">;
1779
- toolName: import("convex/values").VString<string, "required">;
1780
- input: import("convex/values").VAny<any, "required", string>;
1781
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1782
- dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
1783
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1784
- }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}`>, import("convex/values").VObject<{
1785
- providerExecuted?: boolean | undefined;
1786
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1787
- dynamic?: boolean | undefined;
1788
- id: string;
1789
- type: "tool-input-start";
1790
- toolName: string;
1791
- }, {
1792
- type: import("convex/values").VLiteral<"tool-input-start", "required">;
1793
- id: import("convex/values").VString<string, "required">;
1794
- toolName: import("convex/values").VString<string, "required">;
1795
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1796
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1797
- dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
1798
- }, "required", "id" | "type" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "dynamic">, import("convex/values").VObject<{
1799
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1800
- id: string;
1801
- type: "tool-input-delta";
1802
- delta: string;
1803
- }, {
1804
- type: import("convex/values").VLiteral<"tool-input-delta", "required">;
1805
- id: import("convex/values").VString<string, "required">;
1806
- delta: import("convex/values").VString<string, "required">;
1807
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1808
- }, "required", "id" | "type" | "providerMetadata" | `providerMetadata.${string}` | "delta">, import("convex/values").VObject<{
1809
- providerExecuted?: boolean | undefined;
1810
- input?: any;
1811
- dynamic?: boolean | undefined;
1812
- output?: any;
1813
- type: "tool-result";
1814
- toolCallId: string;
1815
- toolName: string;
1816
- }, {
1817
- type: import("convex/values").VLiteral<"tool-result", "required">;
1818
- toolCallId: import("convex/values").VString<string, "required">;
1819
- toolName: import("convex/values").VString<string, "required">;
1820
- input: import("convex/values").VAny<any, "optional", string>;
1821
- output: import("convex/values").VAny<any, "optional", string>;
1822
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
1823
- dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
1824
- }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "input" | "dynamic" | `input.${string}` | "output" | `output.${string}`>, import("convex/values").VObject<{
1825
- type: "raw";
1826
- rawValue: any;
1827
- }, {
1828
- type: import("convex/values").VLiteral<"raw", "required">;
1829
- rawValue: import("convex/values").VAny<any, "required", string>;
1830
- }, "required", "type" | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "providerMetadata" | "source" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta" | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>, "required">;
1831
- }, "required", "streamId" | "start" | "end" | "parts">, {
1832
- streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1833
- }, {}, {}>;
1834
- memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
1835
- userId?: string | undefined;
1836
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
1837
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
1838
- memory: string;
1839
- }, {
1840
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
1841
- userId: import("convex/values").VString<string | undefined, "optional">;
1842
- memory: import("convex/values").VString<string, "required">;
1843
- embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
1844
- }, "required", "userId" | "threadId" | "embeddingId" | "memory">, {
1845
- threadId: ["threadId", "_creationTime"];
1846
- userId: ["userId", "_creationTime"];
1847
- embeddingId: ["embeddingId", "_creationTime"];
1848
- }, {}, {}>;
1849
- files: import("convex/server").TableDefinition<import("convex/values").VObject<{
1850
- filename?: string | undefined;
1851
- mimeType: string;
1852
- storageId: string;
1853
- hash: string;
1854
- refcount: number;
1855
- lastTouchedAt: number;
1856
- }, {
1857
- storageId: import("convex/values").VString<string, "required">;
1858
- mimeType: import("convex/values").VString<string, "required">;
1859
- filename: import("convex/values").VString<string | undefined, "optional">;
1860
- hash: import("convex/values").VString<string, "required">;
1861
- refcount: import("convex/values").VFloat64<number, "required">;
1862
- lastTouchedAt: import("convex/values").VFloat64<number, "required">;
1863
- }, "required", "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt">, {
1864
- hash: ["hash", "_creationTime"];
1865
- refcount: ["refcount", "_creationTime"];
1866
- }, {}, {}>;
1867
- }, true>;
1868
- export declare const vv: {
1869
- id: <TableName extends import("convex/server").TableNamesInDataModel<{
1870
- threads: {
1871
- document: {
1872
- _id: import("convex/values").GenericId<"threads">;
1873
- _creationTime: number;
1874
- userId?: string | undefined;
1875
- title?: string | undefined;
1876
- summary?: string | undefined;
1877
- defaultSystemPrompt?: string | undefined;
1878
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1879
- order?: number | undefined;
1880
- status: "active" | "archived";
1881
- };
1882
- fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
1883
- indexes: {
1884
- userId: ["userId", "_creationTime"];
1885
- by_id: ["_id"];
1886
- by_creation_time: ["_creationTime"];
1887
- };
1888
- searchIndexes: {
1889
- title: {
1890
- searchField: "title";
1891
- filterFields: "userId";
1892
- };
1222
+ searchIndexes: {
1223
+ title: {
1224
+ searchField: "title";
1225
+ filterFields: "userId";
1226
+ };
1893
1227
  };
1894
1228
  vectorIndexes: {};
1895
1229
  };
@@ -2288,9 +1622,9 @@ export declare const vv: {
2288
1622
  title?: string | undefined;
2289
1623
  type?: "source" | undefined;
2290
1624
  providerOptions?: Record<string, Record<string, any>> | undefined;
2291
- url?: string | undefined;
2292
1625
  id: string;
2293
1626
  sourceType: "url";
1627
+ url: string;
2294
1628
  } | {
2295
1629
  filename?: string | undefined;
2296
1630
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -2300,6 +1634,19 @@ export declare const vv: {
2300
1634
  sourceType: "document";
2301
1635
  mediaType: string;
2302
1636
  })[] | undefined;
1637
+ warnings?: ({
1638
+ details?: string | undefined;
1639
+ type: "unsupported-setting";
1640
+ setting: string;
1641
+ } | {
1642
+ details?: string | undefined;
1643
+ type: "unsupported-tool";
1644
+ tool: any;
1645
+ } | {
1646
+ type: "other";
1647
+ message: string;
1648
+ })[] | undefined;
1649
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2303
1650
  reasoningDetails?: ({
2304
1651
  providerOptions?: Record<string, Record<string, any>> | undefined;
2305
1652
  signature?: string | undefined;
@@ -2314,19 +1661,6 @@ export declare const vv: {
2314
1661
  type: "redacted";
2315
1662
  data: string;
2316
1663
  })[] | undefined;
2317
- warnings?: ({
2318
- details?: string | undefined;
2319
- type: "unsupported-setting";
2320
- setting: string;
2321
- } | {
2322
- details?: string | undefined;
2323
- type: "unsupported-tool";
2324
- tool: any;
2325
- } | {
2326
- type: "other";
2327
- message: string;
2328
- })[] | undefined;
2329
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2330
1664
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2331
1665
  stepId?: string | undefined;
2332
1666
  status: "pending" | "success" | "failed";
@@ -2335,7 +1669,7 @@ export declare const vv: {
2335
1669
  stepOrder: number;
2336
1670
  tool: boolean;
2337
1671
  };
2338
- fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens");
1672
+ fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "warnings" | "finishReason" | "reasoningDetails" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens");
2339
1673
  indexes: {
2340
1674
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2341
1675
  embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
@@ -2391,111 +1725,7 @@ export declare const vv: {
2391
1725
  streamId: import("convex/values").GenericId<"streamingMessages">;
2392
1726
  start: number;
2393
1727
  end: number;
2394
- parts: ({
2395
- providerOptions?: Record<string, Record<string, any>> | undefined;
2396
- providerExecuted?: boolean | undefined;
2397
- type: "tool-call";
2398
- toolCallId: string;
2399
- toolName: string;
2400
- args: any;
2401
- } | {
2402
- providerOptions?: Record<string, Record<string, any>> | undefined;
2403
- args?: any;
2404
- providerExecuted?: boolean | undefined;
2405
- isError?: boolean | undefined;
2406
- experimental_content?: ({
2407
- type: "text";
2408
- text: string;
2409
- } | {
2410
- mimeType?: string | undefined;
2411
- type: "image";
2412
- data: string;
2413
- })[] | undefined;
2414
- type: "tool-result";
2415
- toolCallId: string;
2416
- toolName: string;
2417
- result: any;
2418
- } | {
2419
- title?: string | undefined;
2420
- type?: "source" | undefined;
2421
- providerOptions?: Record<string, Record<string, any>> | undefined;
2422
- url?: string | undefined;
2423
- id: string;
2424
- sourceType: "url";
2425
- } | {
2426
- filename?: string | undefined;
2427
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2428
- id: string;
2429
- title: string;
2430
- type: "source";
2431
- sourceType: "document";
2432
- mediaType: string;
2433
- } | {
2434
- type: "text-delta";
2435
- textDelta: string;
2436
- } | {
2437
- type: "reasoning";
2438
- textDelta: string;
2439
- } | {
2440
- type: "source";
2441
- source: {
2442
- title?: string | undefined;
2443
- providerOptions?: Record<string, Record<string, any>> | undefined;
2444
- url?: string | undefined;
2445
- id: string;
2446
- sourceType: "url";
2447
- };
2448
- } | {
2449
- type: "tool-call-streaming-start";
2450
- toolCallId: string;
2451
- toolName: string;
2452
- } | {
2453
- type: "tool-call-delta";
2454
- toolCallId: string;
2455
- toolName: string;
2456
- argsTextDelta: string;
2457
- } | {
2458
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2459
- id: string;
2460
- type: "text-delta";
2461
- text: string;
2462
- } | {
2463
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2464
- id: string;
2465
- type: "reasoning-delta";
2466
- text: string;
2467
- } | {
2468
- providerExecuted?: boolean | undefined;
2469
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2470
- dynamic?: boolean | undefined;
2471
- type: "tool-call";
2472
- toolCallId: string;
2473
- toolName: string;
2474
- input: any;
2475
- } | {
2476
- providerExecuted?: boolean | undefined;
2477
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2478
- dynamic?: boolean | undefined;
2479
- id: string;
2480
- type: "tool-input-start";
2481
- toolName: string;
2482
- } | {
2483
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2484
- id: string;
2485
- type: "tool-input-delta";
2486
- delta: string;
2487
- } | {
2488
- providerExecuted?: boolean | undefined;
2489
- input?: any;
2490
- dynamic?: boolean | undefined;
2491
- output?: any;
2492
- type: "tool-result";
2493
- toolCallId: string;
2494
- toolName: string;
2495
- } | {
2496
- type: "raw";
2497
- rawValue: any;
2498
- })[];
1728
+ parts: any[];
2499
1729
  };
2500
1730
  fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
2501
1731
  indexes: {
@@ -2964,9 +2194,9 @@ export declare const vv: {
2964
2194
  title?: string | undefined;
2965
2195
  type?: "source" | undefined;
2966
2196
  providerOptions?: Record<string, Record<string, any>> | undefined;
2967
- url?: string | undefined;
2968
2197
  id: string;
2969
2198
  sourceType: "url";
2199
+ url: string;
2970
2200
  } | {
2971
2201
  filename?: string | undefined;
2972
2202
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -2976,6 +2206,19 @@ export declare const vv: {
2976
2206
  sourceType: "document";
2977
2207
  mediaType: string;
2978
2208
  })[] | undefined;
2209
+ warnings?: ({
2210
+ details?: string | undefined;
2211
+ type: "unsupported-setting";
2212
+ setting: string;
2213
+ } | {
2214
+ details?: string | undefined;
2215
+ type: "unsupported-tool";
2216
+ tool: any;
2217
+ } | {
2218
+ type: "other";
2219
+ message: string;
2220
+ })[] | undefined;
2221
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2979
2222
  reasoningDetails?: ({
2980
2223
  providerOptions?: Record<string, Record<string, any>> | undefined;
2981
2224
  signature?: string | undefined;
@@ -2990,19 +2233,6 @@ export declare const vv: {
2990
2233
  type: "redacted";
2991
2234
  data: string;
2992
2235
  })[] | undefined;
2993
- warnings?: ({
2994
- details?: string | undefined;
2995
- type: "unsupported-setting";
2996
- setting: string;
2997
- } | {
2998
- details?: string | undefined;
2999
- type: "unsupported-tool";
3000
- tool: any;
3001
- } | {
3002
- type: "other";
3003
- message: string;
3004
- })[] | undefined;
3005
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
3006
2236
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
3007
2237
  stepId?: string | undefined;
3008
2238
  status: "pending" | "success" | "failed";
@@ -3011,7 +2241,7 @@ export declare const vv: {
3011
2241
  stepOrder: number;
3012
2242
  tool: boolean;
3013
2243
  };
3014
- fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens");
2244
+ fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "warnings" | "finishReason" | "reasoningDetails" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens");
3015
2245
  indexes: {
3016
2246
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
3017
2247
  embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
@@ -3067,111 +2297,7 @@ export declare const vv: {
3067
2297
  streamId: import("convex/values").GenericId<"streamingMessages">;
3068
2298
  start: number;
3069
2299
  end: number;
3070
- parts: ({
3071
- providerOptions?: Record<string, Record<string, any>> | undefined;
3072
- providerExecuted?: boolean | undefined;
3073
- type: "tool-call";
3074
- toolCallId: string;
3075
- toolName: string;
3076
- args: any;
3077
- } | {
3078
- providerOptions?: Record<string, Record<string, any>> | undefined;
3079
- args?: any;
3080
- providerExecuted?: boolean | undefined;
3081
- isError?: boolean | undefined;
3082
- experimental_content?: ({
3083
- type: "text";
3084
- text: string;
3085
- } | {
3086
- mimeType?: string | undefined;
3087
- type: "image";
3088
- data: string;
3089
- })[] | undefined;
3090
- type: "tool-result";
3091
- toolCallId: string;
3092
- toolName: string;
3093
- result: any;
3094
- } | {
3095
- title?: string | undefined;
3096
- type?: "source" | undefined;
3097
- providerOptions?: Record<string, Record<string, any>> | undefined;
3098
- url?: string | undefined;
3099
- id: string;
3100
- sourceType: "url";
3101
- } | {
3102
- filename?: string | undefined;
3103
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3104
- id: string;
3105
- title: string;
3106
- type: "source";
3107
- sourceType: "document";
3108
- mediaType: string;
3109
- } | {
3110
- type: "text-delta";
3111
- textDelta: string;
3112
- } | {
3113
- type: "reasoning";
3114
- textDelta: string;
3115
- } | {
3116
- type: "source";
3117
- source: {
3118
- title?: string | undefined;
3119
- providerOptions?: Record<string, Record<string, any>> | undefined;
3120
- url?: string | undefined;
3121
- id: string;
3122
- sourceType: "url";
3123
- };
3124
- } | {
3125
- type: "tool-call-streaming-start";
3126
- toolCallId: string;
3127
- toolName: string;
3128
- } | {
3129
- type: "tool-call-delta";
3130
- toolCallId: string;
3131
- toolName: string;
3132
- argsTextDelta: string;
3133
- } | {
3134
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3135
- id: string;
3136
- type: "text-delta";
3137
- text: string;
3138
- } | {
3139
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3140
- id: string;
3141
- type: "reasoning-delta";
3142
- text: string;
3143
- } | {
3144
- providerExecuted?: boolean | undefined;
3145
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3146
- dynamic?: boolean | undefined;
3147
- type: "tool-call";
3148
- toolCallId: string;
3149
- toolName: string;
3150
- input: any;
3151
- } | {
3152
- providerExecuted?: boolean | undefined;
3153
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3154
- dynamic?: boolean | undefined;
3155
- id: string;
3156
- type: "tool-input-start";
3157
- toolName: string;
3158
- } | {
3159
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3160
- id: string;
3161
- type: "tool-input-delta";
3162
- delta: string;
3163
- } | {
3164
- providerExecuted?: boolean | undefined;
3165
- input?: any;
3166
- dynamic?: boolean | undefined;
3167
- output?: any;
3168
- type: "tool-result";
3169
- toolCallId: string;
3170
- toolName: string;
3171
- } | {
3172
- type: "raw";
3173
- rawValue: any;
3174
- })[];
2300
+ parts: any[];
3175
2301
  };
3176
2302
  fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
3177
2303
  indexes: {
@@ -3360,1051 +2486,249 @@ export declare const vv: {
3360
2486
  vector: number[];
3361
2487
  }, {
3362
2488
  model: import("convex/values").VString<string, "required">;
3363
- table: import("convex/values").VString<string, "required">;
3364
- userId: import("convex/values").VString<string | undefined, "optional">;
3365
- threadId: import("convex/values").VString<string | undefined, "optional">;
3366
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3367
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3368
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3369
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3370
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
3371
- }, import("convex/server").GenericTableSearchIndexes, {
3372
- vector: {
3373
- vectorField: "vector";
3374
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
3375
- filterFields: "model_table_userId" | "model_table_threadId";
3376
- };
3377
- }>;
3378
- embeddings_1536: import("convex/server").TableDefinition<import("convex/values").VObject<{
3379
- userId?: string | undefined;
3380
- threadId?: string | undefined;
3381
- model_table_userId?: string[] | undefined;
3382
- model_table_threadId?: string[] | undefined;
3383
- model: string;
3384
- table: string;
3385
- vector: number[];
3386
- }, {
3387
- model: import("convex/values").VString<string, "required">;
3388
- table: import("convex/values").VString<string, "required">;
3389
- userId: import("convex/values").VString<string | undefined, "optional">;
3390
- threadId: import("convex/values").VString<string | undefined, "optional">;
3391
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3392
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3393
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3394
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3395
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
3396
- }, import("convex/server").GenericTableSearchIndexes, {
3397
- vector: {
3398
- vectorField: "vector";
3399
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
3400
- filterFields: "model_table_userId" | "model_table_threadId";
3401
- };
3402
- }>;
3403
- embeddings_2048: import("convex/server").TableDefinition<import("convex/values").VObject<{
3404
- userId?: string | undefined;
3405
- threadId?: string | undefined;
3406
- model_table_userId?: string[] | undefined;
3407
- model_table_threadId?: string[] | undefined;
3408
- model: string;
3409
- table: string;
3410
- vector: number[];
3411
- }, {
3412
- model: import("convex/values").VString<string, "required">;
3413
- table: import("convex/values").VString<string, "required">;
3414
- userId: import("convex/values").VString<string | undefined, "optional">;
3415
- threadId: import("convex/values").VString<string | undefined, "optional">;
3416
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3417
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3418
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3419
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3420
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
3421
- }, import("convex/server").GenericTableSearchIndexes, {
3422
- vector: {
3423
- vectorField: "vector";
3424
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
3425
- filterFields: "model_table_userId" | "model_table_threadId";
3426
- };
3427
- }>;
3428
- embeddings_3072: import("convex/server").TableDefinition<import("convex/values").VObject<{
3429
- userId?: string | undefined;
3430
- threadId?: string | undefined;
3431
- model_table_userId?: string[] | undefined;
3432
- model_table_threadId?: string[] | undefined;
3433
- model: string;
3434
- table: string;
3435
- vector: number[];
3436
- }, {
3437
- model: import("convex/values").VString<string, "required">;
3438
- table: import("convex/values").VString<string, "required">;
3439
- userId: import("convex/values").VString<string | undefined, "optional">;
3440
- threadId: import("convex/values").VString<string | undefined, "optional">;
3441
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3442
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3443
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3444
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3445
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
3446
- }, import("convex/server").GenericTableSearchIndexes, {
3447
- vector: {
3448
- vectorField: "vector";
3449
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
3450
- filterFields: "model_table_userId" | "model_table_threadId";
3451
- };
3452
- }>;
3453
- embeddings_4096: import("convex/server").TableDefinition<import("convex/values").VObject<{
3454
- userId?: string | undefined;
3455
- threadId?: string | undefined;
3456
- model_table_userId?: string[] | undefined;
3457
- model_table_threadId?: string[] | undefined;
3458
- model: string;
3459
- table: string;
3460
- vector: number[];
3461
- }, {
3462
- model: import("convex/values").VString<string, "required">;
3463
- table: import("convex/values").VString<string, "required">;
3464
- userId: import("convex/values").VString<string | undefined, "optional">;
3465
- threadId: import("convex/values").VString<string | undefined, "optional">;
3466
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3467
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3468
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3469
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3470
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
3471
- }, import("convex/server").GenericTableSearchIndexes, {
3472
- vector: {
3473
- vectorField: "vector";
3474
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
3475
- filterFields: "model_table_userId" | "model_table_threadId";
3476
- };
3477
- }>;
3478
- threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
3479
- userId?: string | undefined;
3480
- title?: string | undefined;
3481
- summary?: string | undefined;
3482
- defaultSystemPrompt?: string | undefined;
3483
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
3484
- order?: number | undefined;
3485
- status: "active" | "archived";
3486
- }, {
3487
- userId: import("convex/values").VString<string | undefined, "optional">;
3488
- title: import("convex/values").VString<string | undefined, "optional">;
3489
- summary: import("convex/values").VString<string | undefined, "optional">;
3490
- status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
3491
- defaultSystemPrompt: import("convex/values").VString<string | undefined, "optional">;
3492
- parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
3493
- order: import("convex/values").VFloat64<number | undefined, "optional">;
3494
- }, "required", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
3495
- userId: ["userId", "_creationTime"];
3496
- }, {
3497
- title: {
3498
- searchField: "title";
3499
- filterFields: "userId";
3500
- };
3501
- }, {}>;
3502
- messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
3503
- id?: string | undefined;
3504
- userId?: string | undefined;
3505
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
3506
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
3507
- files?: any[] | undefined;
3508
- error?: string | undefined;
3509
- agentName?: string | undefined;
3510
- model?: string | undefined;
3511
- provider?: string | undefined;
3512
- providerOptions?: Record<string, Record<string, any>> | undefined;
3513
- message?: {
3514
- providerOptions?: Record<string, Record<string, any>> | undefined;
3515
- role: "user";
3516
- content: string | ({
3517
- providerOptions?: Record<string, Record<string, any>> | undefined;
3518
- type: "text";
3519
- text: string;
3520
- } | {
3521
- providerOptions?: Record<string, Record<string, any>> | undefined;
3522
- mimeType?: string | undefined;
3523
- type: "image";
3524
- image: string | ArrayBuffer;
3525
- } | {
3526
- providerOptions?: Record<string, Record<string, any>> | undefined;
3527
- filename?: string | undefined;
3528
- type: "file";
3529
- mimeType: string;
3530
- data: string | ArrayBuffer;
3531
- })[];
3532
- } | {
3533
- providerOptions?: Record<string, Record<string, any>> | undefined;
3534
- role: "assistant";
3535
- content: string | ({
3536
- providerOptions?: Record<string, Record<string, any>> | undefined;
3537
- type: "text";
3538
- text: string;
3539
- } | {
3540
- providerOptions?: Record<string, Record<string, any>> | undefined;
3541
- filename?: string | undefined;
3542
- type: "file";
3543
- mimeType: string;
3544
- data: string | ArrayBuffer;
3545
- } | {
3546
- providerOptions?: Record<string, Record<string, any>> | undefined;
3547
- signature?: string | undefined;
3548
- state?: "streaming" | "done" | undefined;
3549
- type: "reasoning";
3550
- text: string;
3551
- } | {
3552
- providerOptions?: Record<string, Record<string, any>> | undefined;
3553
- type: "redacted-reasoning";
3554
- data: string;
3555
- } | {
3556
- providerOptions?: Record<string, Record<string, any>> | undefined;
3557
- providerExecuted?: boolean | undefined;
3558
- type: "tool-call";
3559
- toolCallId: string;
3560
- toolName: string;
3561
- args: any;
3562
- })[];
3563
- } | {
3564
- providerOptions?: Record<string, Record<string, any>> | undefined;
3565
- role: "tool";
3566
- content: {
3567
- providerOptions?: Record<string, Record<string, any>> | undefined;
3568
- args?: any;
3569
- providerExecuted?: boolean | undefined;
3570
- isError?: boolean | undefined;
3571
- experimental_content?: ({
3572
- type: "text";
3573
- text: string;
3574
- } | {
3575
- mimeType?: string | undefined;
3576
- type: "image";
3577
- data: string;
3578
- })[] | undefined;
3579
- type: "tool-result";
3580
- toolCallId: string;
3581
- toolName: string;
3582
- result: any;
3583
- }[];
3584
- } | {
3585
- providerOptions?: Record<string, Record<string, any>> | undefined;
3586
- role: "system";
3587
- content: string;
3588
- } | undefined;
3589
- text?: string | undefined;
3590
- reasoning?: string | undefined;
3591
- usage?: {
3592
- reasoningTokens?: number | undefined;
3593
- cachedInputTokens?: number | undefined;
3594
- promptTokens: number;
3595
- completionTokens: number;
3596
- totalTokens: number;
3597
- } | undefined;
3598
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3599
- sources?: ({
3600
- title?: string | undefined;
3601
- type?: "source" | undefined;
3602
- providerOptions?: Record<string, Record<string, any>> | undefined;
3603
- url?: string | undefined;
3604
- id: string;
3605
- sourceType: "url";
3606
- } | {
3607
- filename?: string | undefined;
3608
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3609
- id: string;
3610
- title: string;
3611
- type: "source";
3612
- sourceType: "document";
3613
- mediaType: string;
3614
- })[] | undefined;
3615
- reasoningDetails?: ({
3616
- providerOptions?: Record<string, Record<string, any>> | undefined;
3617
- signature?: string | undefined;
3618
- state?: "streaming" | "done" | undefined;
3619
- type: "reasoning";
3620
- text: string;
3621
- } | {
3622
- signature?: string | undefined;
3623
- type: "text";
3624
- text: string;
3625
- } | {
3626
- type: "redacted";
3627
- data: string;
3628
- })[] | undefined;
3629
- warnings?: ({
3630
- details?: string | undefined;
3631
- type: "unsupported-setting";
3632
- setting: string;
3633
- } | {
3634
- details?: string | undefined;
3635
- type: "unsupported-tool";
3636
- tool: any;
3637
- } | {
3638
- type: "other";
3639
- message: string;
3640
- })[] | undefined;
3641
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
3642
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
3643
- stepId?: string | undefined;
3644
- status: "pending" | "success" | "failed";
3645
- order: number;
3646
- threadId: import("convex/values").GenericId<"threads">;
3647
- stepOrder: number;
3648
- tool: boolean;
3649
- }, {
3650
- userId: import("convex/values").VString<string | undefined, "optional">;
3651
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
3652
- order: import("convex/values").VFloat64<number, "required">;
3653
- stepOrder: import("convex/values").VFloat64<number, "required">;
3654
- embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
3655
- fileIds: import("convex/values").VArray<import("convex/values").GenericId<"files">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"files">, "required">, "optional">;
3656
- error: import("convex/values").VString<string | undefined, "optional">;
3657
- status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
3658
- agentName: import("convex/values").VString<string | undefined, "optional">;
3659
- model: import("convex/values").VString<string | undefined, "optional">;
3660
- provider: import("convex/values").VString<string | undefined, "optional">;
3661
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3662
- message: import("convex/values").VUnion<{
3663
- providerOptions?: Record<string, Record<string, any>> | undefined;
3664
- role: "user";
3665
- content: string | ({
3666
- providerOptions?: Record<string, Record<string, any>> | undefined;
3667
- type: "text";
3668
- text: string;
3669
- } | {
3670
- providerOptions?: Record<string, Record<string, any>> | undefined;
3671
- mimeType?: string | undefined;
3672
- type: "image";
3673
- image: string | ArrayBuffer;
3674
- } | {
3675
- providerOptions?: Record<string, Record<string, any>> | undefined;
3676
- filename?: string | undefined;
3677
- type: "file";
3678
- mimeType: string;
3679
- data: string | ArrayBuffer;
3680
- })[];
3681
- } | {
3682
- providerOptions?: Record<string, Record<string, any>> | undefined;
3683
- role: "assistant";
3684
- content: string | ({
3685
- providerOptions?: Record<string, Record<string, any>> | undefined;
3686
- type: "text";
3687
- text: string;
3688
- } | {
3689
- providerOptions?: Record<string, Record<string, any>> | undefined;
3690
- filename?: string | undefined;
3691
- type: "file";
3692
- mimeType: string;
3693
- data: string | ArrayBuffer;
3694
- } | {
3695
- providerOptions?: Record<string, Record<string, any>> | undefined;
3696
- signature?: string | undefined;
3697
- state?: "streaming" | "done" | undefined;
3698
- type: "reasoning";
3699
- text: string;
3700
- } | {
3701
- providerOptions?: Record<string, Record<string, any>> | undefined;
3702
- type: "redacted-reasoning";
3703
- data: string;
3704
- } | {
3705
- providerOptions?: Record<string, Record<string, any>> | undefined;
3706
- providerExecuted?: boolean | undefined;
3707
- type: "tool-call";
3708
- toolCallId: string;
3709
- toolName: string;
3710
- args: any;
3711
- })[];
3712
- } | {
3713
- providerOptions?: Record<string, Record<string, any>> | undefined;
3714
- role: "tool";
3715
- content: {
3716
- providerOptions?: Record<string, Record<string, any>> | undefined;
3717
- args?: any;
3718
- providerExecuted?: boolean | undefined;
3719
- isError?: boolean | undefined;
3720
- experimental_content?: ({
3721
- type: "text";
3722
- text: string;
3723
- } | {
3724
- mimeType?: string | undefined;
3725
- type: "image";
3726
- data: string;
3727
- })[] | undefined;
3728
- type: "tool-result";
3729
- toolCallId: string;
3730
- toolName: string;
3731
- result: any;
3732
- }[];
3733
- } | {
3734
- providerOptions?: Record<string, Record<string, any>> | undefined;
3735
- role: "system";
3736
- content: string;
3737
- } | undefined, [import("convex/values").VObject<{
3738
- providerOptions?: Record<string, Record<string, any>> | undefined;
3739
- role: "user";
3740
- content: string | ({
3741
- providerOptions?: Record<string, Record<string, any>> | undefined;
3742
- type: "text";
3743
- text: string;
3744
- } | {
3745
- providerOptions?: Record<string, Record<string, any>> | undefined;
3746
- mimeType?: string | undefined;
3747
- type: "image";
3748
- image: string | ArrayBuffer;
3749
- } | {
3750
- providerOptions?: Record<string, Record<string, any>> | undefined;
3751
- filename?: string | undefined;
3752
- type: "file";
3753
- mimeType: string;
3754
- data: string | ArrayBuffer;
3755
- })[];
3756
- }, {
3757
- role: import("convex/values").VLiteral<"user", "required">;
3758
- content: import("convex/values").VUnion<string | ({
3759
- providerOptions?: Record<string, Record<string, any>> | undefined;
3760
- type: "text";
3761
- text: string;
3762
- } | {
3763
- providerOptions?: Record<string, Record<string, any>> | undefined;
3764
- mimeType?: string | undefined;
3765
- type: "image";
3766
- image: string | ArrayBuffer;
3767
- } | {
3768
- providerOptions?: Record<string, Record<string, any>> | undefined;
3769
- filename?: string | undefined;
3770
- type: "file";
3771
- mimeType: string;
3772
- data: string | ArrayBuffer;
3773
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
3774
- providerOptions?: Record<string, Record<string, any>> | undefined;
3775
- type: "text";
3776
- text: string;
3777
- } | {
3778
- providerOptions?: Record<string, Record<string, any>> | undefined;
3779
- mimeType?: string | undefined;
3780
- type: "image";
3781
- image: string | ArrayBuffer;
3782
- } | {
3783
- providerOptions?: Record<string, Record<string, any>> | undefined;
3784
- filename?: string | undefined;
3785
- type: "file";
3786
- mimeType: string;
3787
- data: string | ArrayBuffer;
3788
- })[], import("convex/values").VUnion<{
3789
- providerOptions?: Record<string, Record<string, any>> | undefined;
3790
- type: "text";
3791
- text: string;
3792
- } | {
3793
- providerOptions?: Record<string, Record<string, any>> | undefined;
3794
- mimeType?: string | undefined;
3795
- type: "image";
3796
- image: string | ArrayBuffer;
3797
- } | {
3798
- providerOptions?: Record<string, Record<string, any>> | undefined;
3799
- filename?: string | undefined;
3800
- type: "file";
3801
- mimeType: string;
3802
- data: string | ArrayBuffer;
3803
- }, [import("convex/values").VObject<{
3804
- providerOptions?: Record<string, Record<string, any>> | undefined;
3805
- type: "text";
3806
- text: string;
3807
- }, {
3808
- type: import("convex/values").VLiteral<"text", "required">;
3809
- text: import("convex/values").VString<string, "required">;
3810
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3811
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3812
- providerOptions?: Record<string, Record<string, any>> | undefined;
3813
- mimeType?: string | undefined;
3814
- type: "image";
3815
- image: string | ArrayBuffer;
3816
- }, {
3817
- type: import("convex/values").VLiteral<"image", "required">;
3818
- image: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
3819
- mimeType: import("convex/values").VString<string | undefined, "optional">;
3820
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3821
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType">, import("convex/values").VObject<{
3822
- providerOptions?: Record<string, Record<string, any>> | undefined;
3823
- filename?: string | undefined;
3824
- type: "file";
3825
- mimeType: string;
3826
- data: string | ArrayBuffer;
3827
- }, {
3828
- type: import("convex/values").VLiteral<"file", "required">;
3829
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
3830
- filename: import("convex/values").VString<string | undefined, "optional">;
3831
- mimeType: import("convex/values").VString<string, "required">;
3832
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3833
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
3834
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3835
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3836
- providerOptions?: Record<string, Record<string, any>> | undefined;
3837
- role: "assistant";
3838
- content: string | ({
3839
- providerOptions?: Record<string, Record<string, any>> | undefined;
3840
- type: "text";
3841
- text: string;
3842
- } | {
3843
- providerOptions?: Record<string, Record<string, any>> | undefined;
3844
- filename?: string | undefined;
3845
- type: "file";
3846
- mimeType: string;
3847
- data: string | ArrayBuffer;
3848
- } | {
3849
- providerOptions?: Record<string, Record<string, any>> | undefined;
3850
- signature?: string | undefined;
3851
- state?: "streaming" | "done" | undefined;
3852
- type: "reasoning";
3853
- text: string;
3854
- } | {
3855
- providerOptions?: Record<string, Record<string, any>> | undefined;
3856
- type: "redacted-reasoning";
3857
- data: string;
3858
- } | {
3859
- providerOptions?: Record<string, Record<string, any>> | undefined;
3860
- providerExecuted?: boolean | undefined;
3861
- type: "tool-call";
3862
- toolCallId: string;
3863
- toolName: string;
3864
- args: any;
3865
- })[];
3866
- }, {
3867
- role: import("convex/values").VLiteral<"assistant", "required">;
3868
- content: import("convex/values").VUnion<string | ({
3869
- providerOptions?: Record<string, Record<string, any>> | undefined;
3870
- type: "text";
3871
- text: string;
3872
- } | {
3873
- providerOptions?: Record<string, Record<string, any>> | undefined;
3874
- filename?: string | undefined;
3875
- type: "file";
3876
- mimeType: string;
3877
- data: string | ArrayBuffer;
3878
- } | {
3879
- providerOptions?: Record<string, Record<string, any>> | undefined;
3880
- signature?: string | undefined;
3881
- state?: "streaming" | "done" | undefined;
3882
- type: "reasoning";
3883
- text: string;
3884
- } | {
3885
- providerOptions?: Record<string, Record<string, any>> | undefined;
3886
- type: "redacted-reasoning";
3887
- data: string;
3888
- } | {
3889
- providerOptions?: Record<string, Record<string, any>> | undefined;
3890
- providerExecuted?: boolean | undefined;
3891
- type: "tool-call";
3892
- toolCallId: string;
3893
- toolName: string;
3894
- args: any;
3895
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
3896
- providerOptions?: Record<string, Record<string, any>> | undefined;
3897
- type: "text";
3898
- text: string;
3899
- } | {
3900
- providerOptions?: Record<string, Record<string, any>> | undefined;
3901
- filename?: string | undefined;
3902
- type: "file";
3903
- mimeType: string;
3904
- data: string | ArrayBuffer;
3905
- } | {
3906
- providerOptions?: Record<string, Record<string, any>> | undefined;
3907
- signature?: string | undefined;
3908
- state?: "streaming" | "done" | undefined;
3909
- type: "reasoning";
3910
- text: string;
3911
- } | {
3912
- providerOptions?: Record<string, Record<string, any>> | undefined;
3913
- type: "redacted-reasoning";
3914
- data: string;
3915
- } | {
3916
- providerOptions?: Record<string, Record<string, any>> | undefined;
3917
- providerExecuted?: boolean | undefined;
3918
- type: "tool-call";
3919
- toolCallId: string;
3920
- toolName: string;
3921
- args: any;
3922
- })[], import("convex/values").VUnion<{
3923
- providerOptions?: Record<string, Record<string, any>> | undefined;
3924
- type: "text";
3925
- text: string;
3926
- } | {
3927
- providerOptions?: Record<string, Record<string, any>> | undefined;
3928
- filename?: string | undefined;
3929
- type: "file";
3930
- mimeType: string;
3931
- data: string | ArrayBuffer;
3932
- } | {
3933
- providerOptions?: Record<string, Record<string, any>> | undefined;
3934
- signature?: string | undefined;
3935
- state?: "streaming" | "done" | undefined;
3936
- type: "reasoning";
3937
- text: string;
3938
- } | {
3939
- providerOptions?: Record<string, Record<string, any>> | undefined;
3940
- type: "redacted-reasoning";
3941
- data: string;
3942
- } | {
3943
- providerOptions?: Record<string, Record<string, any>> | undefined;
3944
- providerExecuted?: boolean | undefined;
3945
- type: "tool-call";
3946
- toolCallId: string;
3947
- toolName: string;
3948
- args: any;
3949
- }, [import("convex/values").VObject<{
3950
- providerOptions?: Record<string, Record<string, any>> | undefined;
3951
- type: "text";
3952
- text: string;
3953
- }, {
3954
- type: import("convex/values").VLiteral<"text", "required">;
3955
- text: import("convex/values").VString<string, "required">;
3956
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3957
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3958
- providerOptions?: Record<string, Record<string, any>> | undefined;
3959
- filename?: string | undefined;
3960
- type: "file";
3961
- mimeType: string;
3962
- data: string | ArrayBuffer;
3963
- }, {
3964
- type: import("convex/values").VLiteral<"file", "required">;
3965
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
3966
- filename: import("convex/values").VString<string | undefined, "optional">;
3967
- mimeType: import("convex/values").VString<string, "required">;
3968
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3969
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
3970
- providerOptions?: Record<string, Record<string, any>> | undefined;
3971
- signature?: string | undefined;
3972
- state?: "streaming" | "done" | undefined;
3973
- type: "reasoning";
3974
- text: string;
3975
- }, {
3976
- type: import("convex/values").VLiteral<"reasoning", "required">;
3977
- text: import("convex/values").VString<string, "required">;
3978
- signature: import("convex/values").VString<string | undefined, "optional">;
3979
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3980
- state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
3981
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
3982
- providerOptions?: Record<string, Record<string, any>> | undefined;
3983
- type: "redacted-reasoning";
3984
- data: string;
3985
- }, {
3986
- type: import("convex/values").VLiteral<"redacted-reasoning", "required">;
3987
- data: import("convex/values").VString<string, "required">;
3988
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3989
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
3990
- providerOptions?: Record<string, Record<string, any>> | undefined;
3991
- providerExecuted?: boolean | undefined;
3992
- type: "tool-call";
3993
- toolCallId: string;
3994
- toolName: string;
3995
- args: any;
3996
- }, {
3997
- type: import("convex/values").VLiteral<"tool-call", "required">;
3998
- toolCallId: import("convex/values").VString<string, "required">;
3999
- toolName: import("convex/values").VString<string, "required">;
4000
- args: import("convex/values").VAny<any, "required", string>;
4001
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4002
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4003
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
4004
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4005
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4006
- providerOptions?: Record<string, Record<string, any>> | undefined;
4007
- role: "tool";
4008
- content: {
4009
- providerOptions?: Record<string, Record<string, any>> | undefined;
4010
- args?: any;
4011
- providerExecuted?: boolean | undefined;
4012
- isError?: boolean | undefined;
4013
- experimental_content?: ({
4014
- type: "text";
4015
- text: string;
4016
- } | {
4017
- mimeType?: string | undefined;
4018
- type: "image";
4019
- data: string;
4020
- })[] | undefined;
4021
- type: "tool-result";
4022
- toolCallId: string;
4023
- toolName: string;
4024
- result: any;
4025
- }[];
4026
- }, {
4027
- role: import("convex/values").VLiteral<"tool", "required">;
4028
- content: import("convex/values").VArray<{
4029
- providerOptions?: Record<string, Record<string, any>> | undefined;
4030
- args?: any;
4031
- providerExecuted?: boolean | undefined;
4032
- isError?: boolean | undefined;
4033
- experimental_content?: ({
4034
- type: "text";
4035
- text: string;
4036
- } | {
4037
- mimeType?: string | undefined;
4038
- type: "image";
4039
- data: string;
4040
- })[] | undefined;
4041
- type: "tool-result";
4042
- toolCallId: string;
4043
- toolName: string;
4044
- result: any;
4045
- }[], import("convex/values").VObject<{
4046
- providerOptions?: Record<string, Record<string, any>> | undefined;
4047
- args?: any;
4048
- providerExecuted?: boolean | undefined;
4049
- isError?: boolean | undefined;
4050
- experimental_content?: ({
4051
- type: "text";
4052
- text: string;
4053
- } | {
4054
- mimeType?: string | undefined;
4055
- type: "image";
4056
- data: string;
4057
- })[] | undefined;
4058
- type: "tool-result";
4059
- toolCallId: string;
4060
- toolName: string;
4061
- result: any;
4062
- }, {
4063
- type: import("convex/values").VLiteral<"tool-result", "required">;
4064
- toolCallId: import("convex/values").VString<string, "required">;
4065
- toolName: import("convex/values").VString<string, "required">;
4066
- result: import("convex/values").VAny<any, "required", string>;
4067
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4068
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4069
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4070
- args: import("convex/values").VAny<any, "optional", string>;
4071
- experimental_content: import("convex/values").VArray<({
4072
- type: "text";
4073
- text: string;
4074
- } | {
4075
- mimeType?: string | undefined;
4076
- type: "image";
4077
- data: string;
4078
- })[] | undefined, import("convex/values").VUnion<{
4079
- type: "text";
4080
- text: string;
4081
- } | {
4082
- mimeType?: string | undefined;
4083
- type: "image";
4084
- data: string;
4085
- }, [import("convex/values").VObject<{
4086
- type: "text";
4087
- text: string;
4088
- }, {
4089
- type: import("convex/values").VLiteral<"text", "required">;
4090
- text: import("convex/values").VString<string, "required">;
4091
- }, "required", "type" | "text">, import("convex/values").VObject<{
4092
- mimeType?: string | undefined;
4093
- type: "image";
4094
- data: string;
4095
- }, {
4096
- type: import("convex/values").VLiteral<"image", "required">;
4097
- data: import("convex/values").VString<string, "required">;
4098
- mimeType: import("convex/values").VString<string | undefined, "optional">;
4099
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
4100
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
4101
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4102
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4103
- providerOptions?: Record<string, Record<string, any>> | undefined;
4104
- role: "system";
4105
- content: string;
4106
- }, {
4107
- role: import("convex/values").VLiteral<"system", "required">;
4108
- content: import("convex/values").VString<string, "required">;
4109
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4110
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
4111
- tool: import("convex/values").VBoolean<boolean, "required">;
4112
- text: import("convex/values").VString<string | undefined, "optional">;
4113
- usage: import("convex/values").VObject<{
4114
- reasoningTokens?: number | undefined;
4115
- cachedInputTokens?: number | undefined;
4116
- promptTokens: number;
4117
- completionTokens: number;
4118
- totalTokens: number;
4119
- } | undefined, {
4120
- promptTokens: import("convex/values").VFloat64<number, "required">;
4121
- completionTokens: import("convex/values").VFloat64<number, "required">;
4122
- totalTokens: import("convex/values").VFloat64<number, "required">;
4123
- reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
4124
- cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
4125
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
4126
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4127
- sources: import("convex/values").VArray<({
4128
- title?: string | undefined;
4129
- type?: "source" | undefined;
4130
- providerOptions?: Record<string, Record<string, any>> | undefined;
4131
- url?: string | undefined;
4132
- id: string;
4133
- sourceType: "url";
4134
- } | {
4135
- filename?: string | undefined;
4136
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4137
- id: string;
4138
- title: string;
4139
- type: "source";
4140
- sourceType: "document";
4141
- mediaType: string;
4142
- })[] | undefined, import("convex/values").VUnion<{
4143
- title?: string | undefined;
4144
- type?: "source" | undefined;
4145
- providerOptions?: Record<string, Record<string, any>> | undefined;
4146
- url?: string | undefined;
4147
- id: string;
4148
- sourceType: "url";
4149
- } | {
4150
- filename?: string | undefined;
4151
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4152
- id: string;
4153
- title: string;
4154
- type: "source";
4155
- sourceType: "document";
4156
- mediaType: string;
4157
- }, [import("convex/values").VObject<{
4158
- title?: string | undefined;
4159
- type?: "source" | undefined;
4160
- providerOptions?: Record<string, Record<string, any>> | undefined;
4161
- url?: string | undefined;
4162
- id: string;
4163
- sourceType: "url";
4164
- }, {
4165
- type: import("convex/values").VLiteral<"source" | undefined, "optional">;
4166
- sourceType: import("convex/values").VLiteral<"url", "required">;
4167
- id: import("convex/values").VString<string, "required">;
4168
- url: import("convex/values").VString<string | undefined, "optional">;
4169
- title: import("convex/values").VString<string | undefined, "optional">;
4170
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4171
- }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
4172
- filename?: string | undefined;
4173
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4174
- id: string;
4175
- title: string;
4176
- type: "source";
4177
- sourceType: "document";
4178
- mediaType: string;
4179
- }, {
4180
- type: import("convex/values").VLiteral<"source", "required">;
4181
- sourceType: import("convex/values").VLiteral<"document", "required">;
4182
- id: import("convex/values").VString<string, "required">;
4183
- mediaType: import("convex/values").VString<string, "required">;
4184
- title: import("convex/values").VString<string, "required">;
4185
- filename: import("convex/values").VString<string | undefined, "optional">;
4186
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4187
- }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, "optional">;
4188
- reasoning: import("convex/values").VString<string | undefined, "optional">;
4189
- reasoningDetails: import("convex/values").VArray<({
4190
- providerOptions?: Record<string, Record<string, any>> | undefined;
4191
- signature?: string | undefined;
4192
- state?: "streaming" | "done" | undefined;
4193
- type: "reasoning";
4194
- text: string;
4195
- } | {
4196
- signature?: string | undefined;
4197
- type: "text";
4198
- text: string;
4199
- } | {
4200
- type: "redacted";
4201
- data: string;
4202
- })[] | undefined, import("convex/values").VUnion<{
4203
- providerOptions?: Record<string, Record<string, any>> | undefined;
4204
- signature?: string | undefined;
4205
- state?: "streaming" | "done" | undefined;
4206
- type: "reasoning";
4207
- text: string;
4208
- } | {
4209
- signature?: string | undefined;
4210
- type: "text";
4211
- text: string;
4212
- } | {
4213
- type: "redacted";
4214
- data: string;
4215
- }, [import("convex/values").VObject<{
4216
- providerOptions?: Record<string, Record<string, any>> | undefined;
4217
- signature?: string | undefined;
4218
- state?: "streaming" | "done" | undefined;
4219
- type: "reasoning";
4220
- text: string;
4221
- }, {
4222
- type: import("convex/values").VLiteral<"reasoning", "required">;
4223
- text: import("convex/values").VString<string, "required">;
4224
- signature: import("convex/values").VString<string | undefined, "optional">;
4225
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4226
- state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
4227
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
4228
- signature?: string | undefined;
4229
- type: "text";
4230
- text: string;
4231
- }, {
4232
- type: import("convex/values").VLiteral<"text", "required">;
4233
- text: import("convex/values").VString<string, "required">;
4234
- signature: import("convex/values").VString<string | undefined, "optional">;
4235
- }, "required", "type" | "text" | "signature">, import("convex/values").VObject<{
4236
- type: "redacted";
4237
- data: string;
4238
- }, {
4239
- type: import("convex/values").VLiteral<"redacted", "required">;
4240
- data: import("convex/values").VString<string, "required">;
4241
- }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
4242
- warnings: import("convex/values").VArray<({
4243
- details?: string | undefined;
4244
- type: "unsupported-setting";
4245
- setting: string;
4246
- } | {
4247
- details?: string | undefined;
4248
- type: "unsupported-tool";
4249
- tool: any;
4250
- } | {
4251
- type: "other";
4252
- message: string;
4253
- })[] | undefined, import("convex/values").VUnion<{
4254
- details?: string | undefined;
4255
- type: "unsupported-setting";
4256
- setting: string;
4257
- } | {
4258
- details?: string | undefined;
4259
- type: "unsupported-tool";
4260
- tool: any;
4261
- } | {
4262
- type: "other";
4263
- message: string;
4264
- }, [import("convex/values").VObject<{
4265
- details?: string | undefined;
4266
- type: "unsupported-setting";
4267
- setting: string;
4268
- }, {
4269
- type: import("convex/values").VLiteral<"unsupported-setting", "required">;
4270
- setting: import("convex/values").VString<string, "required">;
4271
- details: import("convex/values").VString<string | undefined, "optional">;
4272
- }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
4273
- details?: string | undefined;
4274
- type: "unsupported-tool";
4275
- tool: any;
4276
- }, {
4277
- type: import("convex/values").VLiteral<"unsupported-tool", "required">;
4278
- tool: import("convex/values").VAny<any, "required", string>;
4279
- details: import("convex/values").VString<string | undefined, "optional">;
4280
- }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
4281
- type: "other";
4282
- message: string;
4283
- }, {
4284
- type: import("convex/values").VLiteral<"other", "required">;
4285
- message: import("convex/values").VString<string, "required">;
4286
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
4287
- finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
4288
- id: import("convex/values").VString<string | undefined, "optional">;
4289
- parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
4290
- stepId: import("convex/values").VString<string | undefined, "optional">;
4291
- files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
4292
- }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">, {
4293
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
4294
- embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
2489
+ table: import("convex/values").VString<string, "required">;
2490
+ userId: import("convex/values").VString<string | undefined, "optional">;
2491
+ threadId: import("convex/values").VString<string | undefined, "optional">;
2492
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2493
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2494
+ vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2495
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2496
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2497
+ }, import("convex/server").GenericTableSearchIndexes, {
2498
+ vector: {
2499
+ vectorField: "vector";
2500
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2501
+ filterFields: "model_table_userId" | "model_table_threadId";
2502
+ };
2503
+ }>;
2504
+ embeddings_1536: import("convex/server").TableDefinition<import("convex/values").VObject<{
2505
+ userId?: string | undefined;
2506
+ threadId?: string | undefined;
2507
+ model_table_userId?: string[] | undefined;
2508
+ model_table_threadId?: string[] | undefined;
2509
+ model: string;
2510
+ table: string;
2511
+ vector: number[];
4295
2512
  }, {
4296
- text_search: {
4297
- searchField: "text";
4298
- filterFields: "userId" | "threadId";
2513
+ model: import("convex/values").VString<string, "required">;
2514
+ table: import("convex/values").VString<string, "required">;
2515
+ userId: import("convex/values").VString<string | undefined, "optional">;
2516
+ threadId: import("convex/values").VString<string | undefined, "optional">;
2517
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2518
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2519
+ vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2520
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2521
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2522
+ }, import("convex/server").GenericTableSearchIndexes, {
2523
+ vector: {
2524
+ vectorField: "vector";
2525
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2526
+ filterFields: "model_table_userId" | "model_table_threadId";
2527
+ };
2528
+ }>;
2529
+ embeddings_2048: import("convex/server").TableDefinition<import("convex/values").VObject<{
2530
+ userId?: string | undefined;
2531
+ threadId?: string | undefined;
2532
+ model_table_userId?: string[] | undefined;
2533
+ model_table_threadId?: string[] | undefined;
2534
+ model: string;
2535
+ table: string;
2536
+ vector: number[];
2537
+ }, {
2538
+ model: import("convex/values").VString<string, "required">;
2539
+ table: import("convex/values").VString<string, "required">;
2540
+ userId: import("convex/values").VString<string | undefined, "optional">;
2541
+ threadId: import("convex/values").VString<string | undefined, "optional">;
2542
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2543
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2544
+ vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2545
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2546
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2547
+ }, import("convex/server").GenericTableSearchIndexes, {
2548
+ vector: {
2549
+ vectorField: "vector";
2550
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2551
+ filterFields: "model_table_userId" | "model_table_threadId";
2552
+ };
2553
+ }>;
2554
+ embeddings_3072: import("convex/server").TableDefinition<import("convex/values").VObject<{
2555
+ userId?: string | undefined;
2556
+ threadId?: string | undefined;
2557
+ model_table_userId?: string[] | undefined;
2558
+ model_table_threadId?: string[] | undefined;
2559
+ model: string;
2560
+ table: string;
2561
+ vector: number[];
2562
+ }, {
2563
+ model: import("convex/values").VString<string, "required">;
2564
+ table: import("convex/values").VString<string, "required">;
2565
+ userId: import("convex/values").VString<string | undefined, "optional">;
2566
+ threadId: import("convex/values").VString<string | undefined, "optional">;
2567
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2568
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2569
+ vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2570
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2571
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2572
+ }, import("convex/server").GenericTableSearchIndexes, {
2573
+ vector: {
2574
+ vectorField: "vector";
2575
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2576
+ filterFields: "model_table_userId" | "model_table_threadId";
2577
+ };
2578
+ }>;
2579
+ embeddings_4096: import("convex/server").TableDefinition<import("convex/values").VObject<{
2580
+ userId?: string | undefined;
2581
+ threadId?: string | undefined;
2582
+ model_table_userId?: string[] | undefined;
2583
+ model_table_threadId?: string[] | undefined;
2584
+ model: string;
2585
+ table: string;
2586
+ vector: number[];
2587
+ }, {
2588
+ model: import("convex/values").VString<string, "required">;
2589
+ table: import("convex/values").VString<string, "required">;
2590
+ userId: import("convex/values").VString<string | undefined, "optional">;
2591
+ threadId: import("convex/values").VString<string | undefined, "optional">;
2592
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2593
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2594
+ vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2595
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2596
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2597
+ }, import("convex/server").GenericTableSearchIndexes, {
2598
+ vector: {
2599
+ vectorField: "vector";
2600
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2601
+ filterFields: "model_table_userId" | "model_table_threadId";
2602
+ };
2603
+ }>;
2604
+ threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
2605
+ userId?: string | undefined;
2606
+ title?: string | undefined;
2607
+ summary?: string | undefined;
2608
+ defaultSystemPrompt?: string | undefined;
2609
+ parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
2610
+ order?: number | undefined;
2611
+ status: "active" | "archived";
2612
+ }, {
2613
+ userId: import("convex/values").VString<string | undefined, "optional">;
2614
+ title: import("convex/values").VString<string | undefined, "optional">;
2615
+ summary: import("convex/values").VString<string | undefined, "optional">;
2616
+ status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
2617
+ defaultSystemPrompt: import("convex/values").VString<string | undefined, "optional">;
2618
+ parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
2619
+ order: import("convex/values").VFloat64<number | undefined, "optional">;
2620
+ }, "required", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
2621
+ userId: ["userId", "_creationTime"];
2622
+ }, {
2623
+ title: {
2624
+ searchField: "title";
2625
+ filterFields: "userId";
4299
2626
  };
4300
2627
  }, {}>;
4301
- streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
2628
+ messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
2629
+ id?: string | undefined;
4302
2630
  userId?: string | undefined;
2631
+ embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2632
+ fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2633
+ files?: any[] | undefined;
2634
+ error?: string | undefined;
4303
2635
  agentName?: string | undefined;
4304
2636
  model?: string | undefined;
4305
2637
  provider?: string | undefined;
4306
2638
  providerOptions?: Record<string, Record<string, any>> | undefined;
4307
- order: number;
4308
- threadId: import("convex/values").GenericId<"threads">;
4309
- stepOrder: number;
4310
- state: {
4311
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
4312
- kind: "streaming";
4313
- lastHeartbeat: number;
4314
- } | {
4315
- cleanupFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
4316
- kind: "finished";
4317
- endedAt: number;
4318
- } | {
4319
- kind: "aborted";
4320
- reason: string;
4321
- };
4322
- }, {
4323
- userId: import("convex/values").VString<string | undefined, "optional">;
4324
- agentName: import("convex/values").VString<string | undefined, "optional">;
4325
- model: import("convex/values").VString<string | undefined, "optional">;
4326
- provider: import("convex/values").VString<string | undefined, "optional">;
4327
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4328
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
4329
- order: import("convex/values").VFloat64<number, "required">;
4330
- /**
4331
- * The step order of the first message in the stream.
4332
- * If the stream ends up with both a tool call and a tool result,
4333
- * the stepOrder of the result will be +1 of the tool call.
4334
- */
4335
- stepOrder: import("convex/values").VFloat64<number, "required">;
4336
- state: import("convex/values").VUnion<{
4337
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
4338
- kind: "streaming";
4339
- lastHeartbeat: number;
4340
- } | {
4341
- cleanupFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
4342
- kind: "finished";
4343
- endedAt: number;
4344
- } | {
4345
- kind: "aborted";
4346
- reason: string;
4347
- }, [import("convex/values").VObject<{
4348
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
4349
- kind: "streaming";
4350
- lastHeartbeat: number;
4351
- }, {
4352
- kind: import("convex/values").VLiteral<"streaming", "required">;
4353
- lastHeartbeat: import("convex/values").VFloat64<number, "required">;
4354
- timeoutFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
4355
- }, "required", "kind" | "lastHeartbeat" | "timeoutFnId">, import("convex/values").VObject<{
4356
- cleanupFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
4357
- kind: "finished";
4358
- endedAt: number;
4359
- }, {
4360
- kind: import("convex/values").VLiteral<"finished", "required">;
4361
- endedAt: import("convex/values").VFloat64<number, "required">;
4362
- cleanupFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
4363
- }, "required", "kind" | "endedAt" | "cleanupFnId">, import("convex/values").VObject<{
4364
- kind: "aborted";
4365
- reason: string;
4366
- }, {
4367
- kind: import("convex/values").VLiteral<"aborted", "required">;
4368
- reason: import("convex/values").VString<string, "required">;
4369
- }, "required", "kind" | "reason">], "required", "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt" | "cleanupFnId" | "reason">;
4370
- }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.cleanupFnId" | "state.reason">, {
4371
- threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
4372
- }, {}, {}>;
4373
- streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
4374
- streamId: import("convex/values").GenericId<"streamingMessages">;
4375
- start: number;
4376
- end: number;
4377
- parts: ({
2639
+ message?: {
4378
2640
  providerOptions?: Record<string, Record<string, any>> | undefined;
4379
- providerExecuted?: boolean | undefined;
4380
- type: "tool-call";
4381
- toolCallId: string;
4382
- toolName: string;
4383
- args: any;
2641
+ role: "user";
2642
+ content: string | ({
2643
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2644
+ type: "text";
2645
+ text: string;
2646
+ } | {
2647
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2648
+ mimeType?: string | undefined;
2649
+ type: "image";
2650
+ image: string | ArrayBuffer;
2651
+ } | {
2652
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2653
+ filename?: string | undefined;
2654
+ type: "file";
2655
+ mimeType: string;
2656
+ data: string | ArrayBuffer;
2657
+ })[];
4384
2658
  } | {
4385
2659
  providerOptions?: Record<string, Record<string, any>> | undefined;
4386
- args?: any;
4387
- providerExecuted?: boolean | undefined;
4388
- isError?: boolean | undefined;
4389
- experimental_content?: ({
2660
+ role: "assistant";
2661
+ content: string | ({
2662
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4390
2663
  type: "text";
4391
2664
  text: string;
4392
2665
  } | {
4393
- mimeType?: string | undefined;
4394
- type: "image";
2666
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2667
+ filename?: string | undefined;
2668
+ type: "file";
2669
+ mimeType: string;
2670
+ data: string | ArrayBuffer;
2671
+ } | {
2672
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2673
+ signature?: string | undefined;
2674
+ state?: "streaming" | "done" | undefined;
2675
+ type: "reasoning";
2676
+ text: string;
2677
+ } | {
2678
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2679
+ type: "redacted-reasoning";
4395
2680
  data: string;
4396
- })[] | undefined;
4397
- type: "tool-result";
4398
- toolCallId: string;
4399
- toolName: string;
4400
- result: any;
2681
+ } | {
2682
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2683
+ providerExecuted?: boolean | undefined;
2684
+ type: "tool-call";
2685
+ toolCallId: string;
2686
+ toolName: string;
2687
+ args: any;
2688
+ })[];
2689
+ } | {
2690
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2691
+ role: "tool";
2692
+ content: {
2693
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2694
+ args?: any;
2695
+ providerExecuted?: boolean | undefined;
2696
+ isError?: boolean | undefined;
2697
+ experimental_content?: ({
2698
+ type: "text";
2699
+ text: string;
2700
+ } | {
2701
+ mimeType?: string | undefined;
2702
+ type: "image";
2703
+ data: string;
2704
+ })[] | undefined;
2705
+ type: "tool-result";
2706
+ toolCallId: string;
2707
+ toolName: string;
2708
+ result: any;
2709
+ }[];
4401
2710
  } | {
2711
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2712
+ role: "system";
2713
+ content: string;
2714
+ } | undefined;
2715
+ text?: string | undefined;
2716
+ reasoning?: string | undefined;
2717
+ usage?: {
2718
+ reasoningTokens?: number | undefined;
2719
+ cachedInputTokens?: number | undefined;
2720
+ promptTokens: number;
2721
+ completionTokens: number;
2722
+ totalTokens: number;
2723
+ } | undefined;
2724
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2725
+ sources?: ({
4402
2726
  title?: string | undefined;
4403
2727
  type?: "source" | undefined;
4404
2728
  providerOptions?: Record<string, Record<string, any>> | undefined;
4405
- url?: string | undefined;
4406
2729
  id: string;
4407
2730
  sourceType: "url";
2731
+ url: string;
4408
2732
  } | {
4409
2733
  filename?: string | undefined;
4410
2734
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -4413,462 +2737,526 @@ export declare const vv: {
4413
2737
  type: "source";
4414
2738
  sourceType: "document";
4415
2739
  mediaType: string;
2740
+ })[] | undefined;
2741
+ warnings?: ({
2742
+ details?: string | undefined;
2743
+ type: "unsupported-setting";
2744
+ setting: string;
4416
2745
  } | {
4417
- type: "text-delta";
4418
- textDelta: string;
2746
+ details?: string | undefined;
2747
+ type: "unsupported-tool";
2748
+ tool: any;
4419
2749
  } | {
2750
+ type: "other";
2751
+ message: string;
2752
+ })[] | undefined;
2753
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2754
+ reasoningDetails?: ({
2755
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2756
+ signature?: string | undefined;
2757
+ state?: "streaming" | "done" | undefined;
4420
2758
  type: "reasoning";
4421
- textDelta: string;
4422
- } | {
4423
- type: "source";
4424
- source: {
4425
- title?: string | undefined;
4426
- providerOptions?: Record<string, Record<string, any>> | undefined;
4427
- url?: string | undefined;
4428
- id: string;
4429
- sourceType: "url";
4430
- };
4431
- } | {
4432
- type: "tool-call-streaming-start";
4433
- toolCallId: string;
4434
- toolName: string;
4435
- } | {
4436
- type: "tool-call-delta";
4437
- toolCallId: string;
4438
- toolName: string;
4439
- argsTextDelta: string;
4440
- } | {
4441
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4442
- id: string;
4443
- type: "text-delta";
4444
2759
  text: string;
4445
2760
  } | {
4446
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4447
- id: string;
4448
- type: "reasoning-delta";
2761
+ signature?: string | undefined;
2762
+ type: "text";
4449
2763
  text: string;
4450
2764
  } | {
4451
- providerExecuted?: boolean | undefined;
4452
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4453
- dynamic?: boolean | undefined;
4454
- type: "tool-call";
4455
- toolCallId: string;
4456
- toolName: string;
4457
- input: any;
4458
- } | {
4459
- providerExecuted?: boolean | undefined;
4460
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4461
- dynamic?: boolean | undefined;
4462
- id: string;
4463
- type: "tool-input-start";
4464
- toolName: string;
4465
- } | {
4466
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4467
- id: string;
4468
- type: "tool-input-delta";
4469
- delta: string;
2765
+ type: "redacted";
2766
+ data: string;
2767
+ })[] | undefined;
2768
+ parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2769
+ stepId?: string | undefined;
2770
+ status: "pending" | "success" | "failed";
2771
+ order: number;
2772
+ threadId: import("convex/values").GenericId<"threads">;
2773
+ stepOrder: number;
2774
+ tool: boolean;
2775
+ }, {
2776
+ userId: import("convex/values").VString<string | undefined, "optional">;
2777
+ threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
2778
+ order: import("convex/values").VFloat64<number, "required">;
2779
+ stepOrder: import("convex/values").VFloat64<number, "required">;
2780
+ embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
2781
+ fileIds: import("convex/values").VArray<import("convex/values").GenericId<"files">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"files">, "required">, "optional">;
2782
+ error: import("convex/values").VString<string | undefined, "optional">;
2783
+ status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
2784
+ agentName: import("convex/values").VString<string | undefined, "optional">;
2785
+ model: import("convex/values").VString<string | undefined, "optional">;
2786
+ provider: import("convex/values").VString<string | undefined, "optional">;
2787
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2788
+ message: import("convex/values").VUnion<{
2789
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2790
+ role: "user";
2791
+ content: string | ({
2792
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2793
+ type: "text";
2794
+ text: string;
2795
+ } | {
2796
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2797
+ mimeType?: string | undefined;
2798
+ type: "image";
2799
+ image: string | ArrayBuffer;
2800
+ } | {
2801
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2802
+ filename?: string | undefined;
2803
+ type: "file";
2804
+ mimeType: string;
2805
+ data: string | ArrayBuffer;
2806
+ })[];
4470
2807
  } | {
4471
- providerExecuted?: boolean | undefined;
4472
- input?: any;
4473
- dynamic?: boolean | undefined;
4474
- output?: any;
4475
- type: "tool-result";
4476
- toolCallId: string;
4477
- toolName: string;
2808
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2809
+ role: "assistant";
2810
+ content: string | ({
2811
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2812
+ type: "text";
2813
+ text: string;
2814
+ } | {
2815
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2816
+ filename?: string | undefined;
2817
+ type: "file";
2818
+ mimeType: string;
2819
+ data: string | ArrayBuffer;
2820
+ } | {
2821
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2822
+ signature?: string | undefined;
2823
+ state?: "streaming" | "done" | undefined;
2824
+ type: "reasoning";
2825
+ text: string;
2826
+ } | {
2827
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2828
+ type: "redacted-reasoning";
2829
+ data: string;
2830
+ } | {
2831
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2832
+ providerExecuted?: boolean | undefined;
2833
+ type: "tool-call";
2834
+ toolCallId: string;
2835
+ toolName: string;
2836
+ args: any;
2837
+ })[];
4478
2838
  } | {
4479
- type: "raw";
4480
- rawValue: any;
4481
- })[];
4482
- }, {
4483
- streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
4484
- start: import("convex/values").VFloat64<number, "required">;
4485
- end: import("convex/values").VFloat64<number, "required">;
4486
- parts: import("convex/values").VArray<({
4487
2839
  providerOptions?: Record<string, Record<string, any>> | undefined;
4488
- providerExecuted?: boolean | undefined;
4489
- type: "tool-call";
4490
- toolCallId: string;
4491
- toolName: string;
4492
- args: any;
2840
+ role: "tool";
2841
+ content: {
2842
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2843
+ args?: any;
2844
+ providerExecuted?: boolean | undefined;
2845
+ isError?: boolean | undefined;
2846
+ experimental_content?: ({
2847
+ type: "text";
2848
+ text: string;
2849
+ } | {
2850
+ mimeType?: string | undefined;
2851
+ type: "image";
2852
+ data: string;
2853
+ })[] | undefined;
2854
+ type: "tool-result";
2855
+ toolCallId: string;
2856
+ toolName: string;
2857
+ result: any;
2858
+ }[];
4493
2859
  } | {
4494
2860
  providerOptions?: Record<string, Record<string, any>> | undefined;
4495
- args?: any;
4496
- providerExecuted?: boolean | undefined;
4497
- isError?: boolean | undefined;
4498
- experimental_content?: ({
2861
+ role: "system";
2862
+ content: string;
2863
+ } | undefined, [import("convex/values").VObject<{
2864
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2865
+ role: "user";
2866
+ content: string | ({
2867
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2868
+ type: "text";
2869
+ text: string;
2870
+ } | {
2871
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2872
+ mimeType?: string | undefined;
2873
+ type: "image";
2874
+ image: string | ArrayBuffer;
2875
+ } | {
2876
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2877
+ filename?: string | undefined;
2878
+ type: "file";
2879
+ mimeType: string;
2880
+ data: string | ArrayBuffer;
2881
+ })[];
2882
+ }, {
2883
+ role: import("convex/values").VLiteral<"user", "required">;
2884
+ content: import("convex/values").VUnion<string | ({
2885
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2886
+ type: "text";
2887
+ text: string;
2888
+ } | {
2889
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2890
+ mimeType?: string | undefined;
2891
+ type: "image";
2892
+ image: string | ArrayBuffer;
2893
+ } | {
2894
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2895
+ filename?: string | undefined;
2896
+ type: "file";
2897
+ mimeType: string;
2898
+ data: string | ArrayBuffer;
2899
+ })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
2900
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2901
+ type: "text";
2902
+ text: string;
2903
+ } | {
2904
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2905
+ mimeType?: string | undefined;
2906
+ type: "image";
2907
+ image: string | ArrayBuffer;
2908
+ } | {
2909
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2910
+ filename?: string | undefined;
2911
+ type: "file";
2912
+ mimeType: string;
2913
+ data: string | ArrayBuffer;
2914
+ })[], import("convex/values").VUnion<{
2915
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4499
2916
  type: "text";
4500
2917
  text: string;
4501
2918
  } | {
2919
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4502
2920
  mimeType?: string | undefined;
4503
2921
  type: "image";
4504
- data: string;
4505
- })[] | undefined;
4506
- type: "tool-result";
4507
- toolCallId: string;
4508
- toolName: string;
4509
- result: any;
4510
- } | {
4511
- title?: string | undefined;
4512
- type?: "source" | undefined;
4513
- providerOptions?: Record<string, Record<string, any>> | undefined;
4514
- url?: string | undefined;
4515
- id: string;
4516
- sourceType: "url";
4517
- } | {
4518
- filename?: string | undefined;
4519
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4520
- id: string;
4521
- title: string;
4522
- type: "source";
4523
- sourceType: "document";
4524
- mediaType: string;
4525
- } | {
4526
- type: "text-delta";
4527
- textDelta: string;
4528
- } | {
4529
- type: "reasoning";
4530
- textDelta: string;
4531
- } | {
4532
- type: "source";
4533
- source: {
4534
- title?: string | undefined;
2922
+ image: string | ArrayBuffer;
2923
+ } | {
2924
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2925
+ filename?: string | undefined;
2926
+ type: "file";
2927
+ mimeType: string;
2928
+ data: string | ArrayBuffer;
2929
+ }, [import("convex/values").VObject<{
4535
2930
  providerOptions?: Record<string, Record<string, any>> | undefined;
4536
- url?: string | undefined;
4537
- id: string;
4538
- sourceType: "url";
4539
- };
4540
- } | {
4541
- type: "tool-call-streaming-start";
4542
- toolCallId: string;
4543
- toolName: string;
4544
- } | {
4545
- type: "tool-call-delta";
4546
- toolCallId: string;
4547
- toolName: string;
4548
- argsTextDelta: string;
4549
- } | {
4550
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4551
- id: string;
4552
- type: "text-delta";
4553
- text: string;
4554
- } | {
4555
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4556
- id: string;
4557
- type: "reasoning-delta";
4558
- text: string;
4559
- } | {
4560
- providerExecuted?: boolean | undefined;
4561
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4562
- dynamic?: boolean | undefined;
4563
- type: "tool-call";
4564
- toolCallId: string;
4565
- toolName: string;
4566
- input: any;
4567
- } | {
4568
- providerExecuted?: boolean | undefined;
4569
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4570
- dynamic?: boolean | undefined;
4571
- id: string;
4572
- type: "tool-input-start";
4573
- toolName: string;
4574
- } | {
4575
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4576
- id: string;
4577
- type: "tool-input-delta";
4578
- delta: string;
4579
- } | {
4580
- providerExecuted?: boolean | undefined;
4581
- input?: any;
4582
- dynamic?: boolean | undefined;
4583
- output?: any;
4584
- type: "tool-result";
4585
- toolCallId: string;
4586
- toolName: string;
4587
- } | {
4588
- type: "raw";
4589
- rawValue: any;
4590
- })[], import("convex/values").VUnion<{
4591
- providerOptions?: Record<string, Record<string, any>> | undefined;
4592
- providerExecuted?: boolean | undefined;
4593
- type: "tool-call";
4594
- toolCallId: string;
4595
- toolName: string;
4596
- args: any;
4597
- } | {
4598
- providerOptions?: Record<string, Record<string, any>> | undefined;
4599
- args?: any;
4600
- providerExecuted?: boolean | undefined;
4601
- isError?: boolean | undefined;
4602
- experimental_content?: ({
4603
2931
  type: "text";
4604
2932
  text: string;
4605
- } | {
2933
+ }, {
2934
+ type: import("convex/values").VLiteral<"text", "required">;
2935
+ text: import("convex/values").VString<string, "required">;
2936
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2937
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
2938
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4606
2939
  mimeType?: string | undefined;
4607
2940
  type: "image";
4608
- data: string;
4609
- })[] | undefined;
4610
- type: "tool-result";
4611
- toolCallId: string;
4612
- toolName: string;
4613
- result: any;
4614
- } | {
4615
- title?: string | undefined;
4616
- type?: "source" | undefined;
4617
- providerOptions?: Record<string, Record<string, any>> | undefined;
4618
- url?: string | undefined;
4619
- id: string;
4620
- sourceType: "url";
4621
- } | {
4622
- filename?: string | undefined;
4623
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4624
- id: string;
4625
- title: string;
4626
- type: "source";
4627
- sourceType: "document";
4628
- mediaType: string;
4629
- } | {
4630
- type: "text-delta";
4631
- textDelta: string;
4632
- } | {
4633
- type: "reasoning";
4634
- textDelta: string;
4635
- } | {
4636
- type: "source";
4637
- source: {
4638
- title?: string | undefined;
2941
+ image: string | ArrayBuffer;
2942
+ }, {
2943
+ type: import("convex/values").VLiteral<"image", "required">;
2944
+ image: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
2945
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
2946
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2947
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType">, import("convex/values").VObject<{
4639
2948
  providerOptions?: Record<string, Record<string, any>> | undefined;
4640
- url?: string | undefined;
4641
- id: string;
4642
- sourceType: "url";
4643
- };
4644
- } | {
4645
- type: "tool-call-streaming-start";
4646
- toolCallId: string;
4647
- toolName: string;
4648
- } | {
4649
- type: "tool-call-delta";
4650
- toolCallId: string;
4651
- toolName: string;
4652
- argsTextDelta: string;
4653
- } | {
4654
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4655
- id: string;
4656
- type: "text-delta";
4657
- text: string;
4658
- } | {
4659
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4660
- id: string;
4661
- type: "reasoning-delta";
4662
- text: string;
4663
- } | {
4664
- providerExecuted?: boolean | undefined;
4665
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4666
- dynamic?: boolean | undefined;
4667
- type: "tool-call";
4668
- toolCallId: string;
4669
- toolName: string;
4670
- input: any;
4671
- } | {
4672
- providerExecuted?: boolean | undefined;
4673
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4674
- dynamic?: boolean | undefined;
4675
- id: string;
4676
- type: "tool-input-start";
4677
- toolName: string;
4678
- } | {
4679
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4680
- id: string;
4681
- type: "tool-input-delta";
4682
- delta: string;
4683
- } | {
4684
- providerExecuted?: boolean | undefined;
4685
- input?: any;
4686
- dynamic?: boolean | undefined;
4687
- output?: any;
4688
- type: "tool-result";
4689
- toolCallId: string;
4690
- toolName: string;
4691
- } | {
4692
- type: "raw";
4693
- rawValue: any;
4694
- }, [import("convex/values").VUnion<{
4695
- providerOptions?: Record<string, Record<string, any>> | undefined;
4696
- providerExecuted?: boolean | undefined;
4697
- type: "tool-call";
4698
- toolCallId: string;
4699
- toolName: string;
4700
- args: any;
4701
- } | {
2949
+ filename?: string | undefined;
2950
+ type: "file";
2951
+ mimeType: string;
2952
+ data: string | ArrayBuffer;
2953
+ }, {
2954
+ type: import("convex/values").VLiteral<"file", "required">;
2955
+ data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
2956
+ filename: import("convex/values").VString<string | undefined, "optional">;
2957
+ mimeType: import("convex/values").VString<string, "required">;
2958
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2959
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
2960
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2961
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4702
2962
  providerOptions?: Record<string, Record<string, any>> | undefined;
4703
- args?: any;
4704
- providerExecuted?: boolean | undefined;
4705
- isError?: boolean | undefined;
4706
- experimental_content?: ({
2963
+ role: "assistant";
2964
+ content: string | ({
2965
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2966
+ type: "text";
2967
+ text: string;
2968
+ } | {
2969
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2970
+ filename?: string | undefined;
2971
+ type: "file";
2972
+ mimeType: string;
2973
+ data: string | ArrayBuffer;
2974
+ } | {
2975
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2976
+ signature?: string | undefined;
2977
+ state?: "streaming" | "done" | undefined;
2978
+ type: "reasoning";
2979
+ text: string;
2980
+ } | {
2981
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2982
+ type: "redacted-reasoning";
2983
+ data: string;
2984
+ } | {
2985
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2986
+ providerExecuted?: boolean | undefined;
2987
+ type: "tool-call";
2988
+ toolCallId: string;
2989
+ toolName: string;
2990
+ args: any;
2991
+ })[];
2992
+ }, {
2993
+ role: import("convex/values").VLiteral<"assistant", "required">;
2994
+ content: import("convex/values").VUnion<string | ({
2995
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2996
+ type: "text";
2997
+ text: string;
2998
+ } | {
2999
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3000
+ filename?: string | undefined;
3001
+ type: "file";
3002
+ mimeType: string;
3003
+ data: string | ArrayBuffer;
3004
+ } | {
3005
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3006
+ signature?: string | undefined;
3007
+ state?: "streaming" | "done" | undefined;
3008
+ type: "reasoning";
3009
+ text: string;
3010
+ } | {
3011
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3012
+ type: "redacted-reasoning";
3013
+ data: string;
3014
+ } | {
3015
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3016
+ providerExecuted?: boolean | undefined;
3017
+ type: "tool-call";
3018
+ toolCallId: string;
3019
+ toolName: string;
3020
+ args: any;
3021
+ })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
3022
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4707
3023
  type: "text";
4708
3024
  text: string;
4709
3025
  } | {
4710
- mimeType?: string | undefined;
4711
- type: "image";
3026
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3027
+ filename?: string | undefined;
3028
+ type: "file";
3029
+ mimeType: string;
3030
+ data: string | ArrayBuffer;
3031
+ } | {
3032
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3033
+ signature?: string | undefined;
3034
+ state?: "streaming" | "done" | undefined;
3035
+ type: "reasoning";
3036
+ text: string;
3037
+ } | {
3038
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3039
+ type: "redacted-reasoning";
4712
3040
  data: string;
4713
- })[] | undefined;
4714
- type: "tool-result";
4715
- toolCallId: string;
4716
- toolName: string;
4717
- result: any;
4718
- } | {
4719
- type: "text-delta";
4720
- textDelta: string;
4721
- } | {
4722
- type: "reasoning";
4723
- textDelta: string;
4724
- } | {
4725
- type: "source";
4726
- source: {
4727
- title?: string | undefined;
3041
+ } | {
4728
3042
  providerOptions?: Record<string, Record<string, any>> | undefined;
4729
- url?: string | undefined;
4730
- id: string;
4731
- sourceType: "url";
4732
- };
4733
- } | {
4734
- type: "tool-call-streaming-start";
4735
- toolCallId: string;
4736
- toolName: string;
4737
- } | {
4738
- type: "tool-call-delta";
4739
- toolCallId: string;
4740
- toolName: string;
4741
- argsTextDelta: string;
4742
- }, [import("convex/values").VObject<{
4743
- type: "text-delta";
4744
- textDelta: string;
4745
- }, {
4746
- type: import("convex/values").VLiteral<"text-delta", "required">;
4747
- textDelta: import("convex/values").VString<string, "required">;
4748
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
4749
- type: "reasoning";
4750
- textDelta: string;
4751
- }, {
4752
- type: import("convex/values").VLiteral<"reasoning", "required">;
4753
- textDelta: import("convex/values").VString<string, "required">;
4754
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
4755
- type: "source";
4756
- source: {
4757
- title?: string | undefined;
3043
+ providerExecuted?: boolean | undefined;
3044
+ type: "tool-call";
3045
+ toolCallId: string;
3046
+ toolName: string;
3047
+ args: any;
3048
+ })[], import("convex/values").VUnion<{
4758
3049
  providerOptions?: Record<string, Record<string, any>> | undefined;
4759
- url?: string | undefined;
4760
- id: string;
4761
- sourceType: "url";
4762
- };
4763
- }, {
4764
- type: import("convex/values").VLiteral<"source", "required">;
4765
- source: import("convex/values").VObject<{
4766
- title?: string | undefined;
3050
+ type: "text";
3051
+ text: string;
3052
+ } | {
4767
3053
  providerOptions?: Record<string, Record<string, any>> | undefined;
4768
- url?: string | undefined;
4769
- id: string;
4770
- sourceType: "url";
3054
+ filename?: string | undefined;
3055
+ type: "file";
3056
+ mimeType: string;
3057
+ data: string | ArrayBuffer;
3058
+ } | {
3059
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3060
+ signature?: string | undefined;
3061
+ state?: "streaming" | "done" | undefined;
3062
+ type: "reasoning";
3063
+ text: string;
3064
+ } | {
3065
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3066
+ type: "redacted-reasoning";
3067
+ data: string;
3068
+ } | {
3069
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3070
+ providerExecuted?: boolean | undefined;
3071
+ type: "tool-call";
3072
+ toolCallId: string;
3073
+ toolName: string;
3074
+ args: any;
3075
+ }, [import("convex/values").VObject<{
3076
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3077
+ type: "text";
3078
+ text: string;
4771
3079
  }, {
4772
- sourceType: import("convex/values").VLiteral<"url", "required">;
4773
- id: import("convex/values").VString<string, "required">;
4774
- url: import("convex/values").VString<string | undefined, "optional">;
4775
- title: import("convex/values").VString<string | undefined, "optional">;
3080
+ type: import("convex/values").VLiteral<"text", "required">;
3081
+ text: import("convex/values").VString<string, "required">;
4776
3082
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4777
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
4778
- }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
4779
- providerOptions?: Record<string, Record<string, any>> | undefined;
4780
- providerExecuted?: boolean | undefined;
4781
- type: "tool-call";
4782
- toolCallId: string;
4783
- toolName: string;
4784
- args: any;
4785
- }, {
4786
- type: import("convex/values").VLiteral<"tool-call", "required">;
4787
- toolCallId: import("convex/values").VString<string, "required">;
4788
- toolName: import("convex/values").VString<string, "required">;
4789
- args: import("convex/values").VAny<any, "required", string>;
4790
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4791
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4792
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, import("convex/values").VObject<{
4793
- providerOptions?: Record<string, Record<string, any>> | undefined;
4794
- args?: any;
4795
- providerExecuted?: boolean | undefined;
4796
- isError?: boolean | undefined;
4797
- experimental_content?: ({
4798
- type: "text";
3083
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3084
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3085
+ filename?: string | undefined;
3086
+ type: "file";
3087
+ mimeType: string;
3088
+ data: string | ArrayBuffer;
3089
+ }, {
3090
+ type: import("convex/values").VLiteral<"file", "required">;
3091
+ data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
3092
+ filename: import("convex/values").VString<string | undefined, "optional">;
3093
+ mimeType: import("convex/values").VString<string, "required">;
3094
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3095
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
3096
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3097
+ signature?: string | undefined;
3098
+ state?: "streaming" | "done" | undefined;
3099
+ type: "reasoning";
4799
3100
  text: string;
4800
- } | {
4801
- mimeType?: string | undefined;
4802
- type: "image";
3101
+ }, {
3102
+ type: import("convex/values").VLiteral<"reasoning", "required">;
3103
+ text: import("convex/values").VString<string, "required">;
3104
+ signature: import("convex/values").VString<string | undefined, "optional">;
3105
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3106
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
3107
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
3108
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3109
+ type: "redacted-reasoning";
4803
3110
  data: string;
4804
- })[] | undefined;
4805
- type: "tool-result";
4806
- toolCallId: string;
4807
- toolName: string;
4808
- result: any;
3111
+ }, {
3112
+ type: import("convex/values").VLiteral<"redacted-reasoning", "required">;
3113
+ data: import("convex/values").VString<string, "required">;
3114
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3115
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
3116
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3117
+ providerExecuted?: boolean | undefined;
3118
+ type: "tool-call";
3119
+ toolCallId: string;
3120
+ toolName: string;
3121
+ args: any;
3122
+ }, {
3123
+ type: import("convex/values").VLiteral<"tool-call", "required">;
3124
+ toolCallId: import("convex/values").VString<string, "required">;
3125
+ toolName: import("convex/values").VString<string, "required">;
3126
+ args: import("convex/values").VAny<any, "required", string>;
3127
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3128
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
3129
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "state" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}`>, "required">], "required", never>;
3130
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3131
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3132
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3133
+ role: "tool";
3134
+ content: {
3135
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3136
+ args?: any;
3137
+ providerExecuted?: boolean | undefined;
3138
+ isError?: boolean | undefined;
3139
+ experimental_content?: ({
3140
+ type: "text";
3141
+ text: string;
3142
+ } | {
3143
+ mimeType?: string | undefined;
3144
+ type: "image";
3145
+ data: string;
3146
+ })[] | undefined;
3147
+ type: "tool-result";
3148
+ toolCallId: string;
3149
+ toolName: string;
3150
+ result: any;
3151
+ }[];
4809
3152
  }, {
4810
- type: import("convex/values").VLiteral<"tool-result", "required">;
4811
- toolCallId: import("convex/values").VString<string, "required">;
4812
- toolName: import("convex/values").VString<string, "required">;
4813
- result: import("convex/values").VAny<any, "required", string>;
3153
+ role: import("convex/values").VLiteral<"tool", "required">;
3154
+ content: import("convex/values").VArray<{
3155
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3156
+ args?: any;
3157
+ providerExecuted?: boolean | undefined;
3158
+ isError?: boolean | undefined;
3159
+ experimental_content?: ({
3160
+ type: "text";
3161
+ text: string;
3162
+ } | {
3163
+ mimeType?: string | undefined;
3164
+ type: "image";
3165
+ data: string;
3166
+ })[] | undefined;
3167
+ type: "tool-result";
3168
+ toolCallId: string;
3169
+ toolName: string;
3170
+ result: any;
3171
+ }[], import("convex/values").VObject<{
3172
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3173
+ args?: any;
3174
+ providerExecuted?: boolean | undefined;
3175
+ isError?: boolean | undefined;
3176
+ experimental_content?: ({
3177
+ type: "text";
3178
+ text: string;
3179
+ } | {
3180
+ mimeType?: string | undefined;
3181
+ type: "image";
3182
+ data: string;
3183
+ })[] | undefined;
3184
+ type: "tool-result";
3185
+ toolCallId: string;
3186
+ toolName: string;
3187
+ result: any;
3188
+ }, {
3189
+ type: import("convex/values").VLiteral<"tool-result", "required">;
3190
+ toolCallId: import("convex/values").VString<string, "required">;
3191
+ toolName: import("convex/values").VString<string, "required">;
3192
+ result: import("convex/values").VAny<any, "required", string>;
3193
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3194
+ providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
3195
+ isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3196
+ args: import("convex/values").VAny<any, "optional", string>;
3197
+ experimental_content: import("convex/values").VArray<({
3198
+ type: "text";
3199
+ text: string;
3200
+ } | {
3201
+ mimeType?: string | undefined;
3202
+ type: "image";
3203
+ data: string;
3204
+ })[] | undefined, import("convex/values").VUnion<{
3205
+ type: "text";
3206
+ text: string;
3207
+ } | {
3208
+ mimeType?: string | undefined;
3209
+ type: "image";
3210
+ data: string;
3211
+ }, [import("convex/values").VObject<{
3212
+ type: "text";
3213
+ text: string;
3214
+ }, {
3215
+ type: import("convex/values").VLiteral<"text", "required">;
3216
+ text: import("convex/values").VString<string, "required">;
3217
+ }, "required", "type" | "text">, import("convex/values").VObject<{
3218
+ mimeType?: string | undefined;
3219
+ type: "image";
3220
+ data: string;
3221
+ }, {
3222
+ type: import("convex/values").VLiteral<"image", "required">;
3223
+ data: import("convex/values").VString<string, "required">;
3224
+ mimeType: import("convex/values").VString<string | undefined, "optional">;
3225
+ }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3226
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, "required">;
4814
3227
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4815
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
4816
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4817
- args: import("convex/values").VAny<any, "optional", string>;
4818
- experimental_content: import("convex/values").VArray<({
4819
- type: "text";
4820
- text: string;
4821
- } | {
4822
- mimeType?: string | undefined;
4823
- type: "image";
4824
- data: string;
4825
- })[] | undefined, import("convex/values").VUnion<{
4826
- type: "text";
4827
- text: string;
4828
- } | {
4829
- mimeType?: string | undefined;
4830
- type: "image";
4831
- data: string;
4832
- }, [import("convex/values").VObject<{
4833
- type: "text";
4834
- text: string;
4835
- }, {
4836
- type: import("convex/values").VLiteral<"text", "required">;
4837
- text: import("convex/values").VString<string, "required">;
4838
- }, "required", "type" | "text">, import("convex/values").VObject<{
4839
- mimeType?: string | undefined;
4840
- type: "image";
4841
- data: string;
4842
- }, {
4843
- type: import("convex/values").VLiteral<"image", "required">;
4844
- data: import("convex/values").VString<string, "required">;
4845
- mimeType: import("convex/values").VString<string | undefined, "optional">;
4846
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
4847
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}`>, import("convex/values").VObject<{
4848
- type: "tool-call-streaming-start";
4849
- toolCallId: string;
4850
- toolName: string;
4851
- }, {
4852
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
4853
- toolCallId: import("convex/values").VString<string, "required">;
4854
- toolName: import("convex/values").VString<string, "required">;
4855
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
4856
- type: "tool-call-delta";
4857
- toolCallId: string;
4858
- toolName: string;
4859
- argsTextDelta: string;
3228
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3229
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3230
+ role: "system";
3231
+ content: string;
4860
3232
  }, {
4861
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
4862
- toolCallId: import("convex/values").VString<string, "required">;
4863
- toolName: import("convex/values").VString<string, "required">;
4864
- argsTextDelta: import("convex/values").VString<string, "required">;
4865
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "source" | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, import("convex/values").VUnion<{
3233
+ role: import("convex/values").VLiteral<"system", "required">;
3234
+ content: import("convex/values").VString<string, "required">;
3235
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3236
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
3237
+ tool: import("convex/values").VBoolean<boolean, "required">;
3238
+ text: import("convex/values").VString<string | undefined, "optional">;
3239
+ usage: import("convex/values").VObject<{
3240
+ reasoningTokens?: number | undefined;
3241
+ cachedInputTokens?: number | undefined;
3242
+ promptTokens: number;
3243
+ completionTokens: number;
3244
+ totalTokens: number;
3245
+ } | undefined, {
3246
+ promptTokens: import("convex/values").VFloat64<number, "required">;
3247
+ completionTokens: import("convex/values").VFloat64<number, "required">;
3248
+ totalTokens: import("convex/values").VFloat64<number, "required">;
3249
+ reasoningTokens: import("convex/values").VFloat64<number | undefined, "optional">;
3250
+ cachedInputTokens: import("convex/values").VFloat64<number | undefined, "optional">;
3251
+ }, "optional", "promptTokens" | "completionTokens" | "totalTokens" | "reasoningTokens" | "cachedInputTokens">;
3252
+ providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3253
+ sources: import("convex/values").VArray<({
4866
3254
  title?: string | undefined;
4867
3255
  type?: "source" | undefined;
4868
3256
  providerOptions?: Record<string, Record<string, any>> | undefined;
4869
- url?: string | undefined;
4870
3257
  id: string;
4871
3258
  sourceType: "url";
3259
+ url: string;
4872
3260
  } | {
4873
3261
  filename?: string | undefined;
4874
3262
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -4877,175 +3265,247 @@ export declare const vv: {
4877
3265
  type: "source";
4878
3266
  sourceType: "document";
4879
3267
  mediaType: string;
3268
+ })[] | undefined, import("convex/values").VUnion<{
3269
+ title?: string | undefined;
3270
+ type?: "source" | undefined;
3271
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3272
+ id: string;
3273
+ sourceType: "url";
3274
+ url: string;
4880
3275
  } | {
3276
+ filename?: string | undefined;
4881
3277
  providerMetadata?: Record<string, Record<string, any>> | undefined;
4882
3278
  id: string;
4883
- type: "text-delta";
4884
- text: string;
4885
- } | {
3279
+ title: string;
3280
+ type: "source";
3281
+ sourceType: "document";
3282
+ mediaType: string;
3283
+ }, [import("convex/values").VObject<{
3284
+ title?: string | undefined;
3285
+ type?: "source" | undefined;
3286
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3287
+ id: string;
3288
+ sourceType: "url";
3289
+ url: string;
3290
+ }, {
3291
+ type: import("convex/values").VLiteral<"source" | undefined, "optional">;
3292
+ sourceType: import("convex/values").VLiteral<"url", "required">;
3293
+ id: import("convex/values").VString<string, "required">;
3294
+ url: import("convex/values").VString<string, "required">;
3295
+ title: import("convex/values").VString<string | undefined, "optional">;
3296
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3297
+ }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
3298
+ filename?: string | undefined;
4886
3299
  providerMetadata?: Record<string, Record<string, any>> | undefined;
4887
3300
  id: string;
4888
- type: "reasoning-delta";
3301
+ title: string;
3302
+ type: "source";
3303
+ sourceType: "document";
3304
+ mediaType: string;
3305
+ }, {
3306
+ type: import("convex/values").VLiteral<"source", "required">;
3307
+ sourceType: import("convex/values").VLiteral<"document", "required">;
3308
+ id: import("convex/values").VString<string, "required">;
3309
+ mediaType: import("convex/values").VString<string, "required">;
3310
+ title: import("convex/values").VString<string, "required">;
3311
+ filename: import("convex/values").VString<string | undefined, "optional">;
3312
+ providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3313
+ }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, "optional">;
3314
+ warnings: import("convex/values").VArray<({
3315
+ details?: string | undefined;
3316
+ type: "unsupported-setting";
3317
+ setting: string;
3318
+ } | {
3319
+ details?: string | undefined;
3320
+ type: "unsupported-tool";
3321
+ tool: any;
3322
+ } | {
3323
+ type: "other";
3324
+ message: string;
3325
+ })[] | undefined, import("convex/values").VUnion<{
3326
+ details?: string | undefined;
3327
+ type: "unsupported-setting";
3328
+ setting: string;
3329
+ } | {
3330
+ details?: string | undefined;
3331
+ type: "unsupported-tool";
3332
+ tool: any;
3333
+ } | {
3334
+ type: "other";
3335
+ message: string;
3336
+ }, [import("convex/values").VObject<{
3337
+ details?: string | undefined;
3338
+ type: "unsupported-setting";
3339
+ setting: string;
3340
+ }, {
3341
+ type: import("convex/values").VLiteral<"unsupported-setting", "required">;
3342
+ setting: import("convex/values").VString<string, "required">;
3343
+ details: import("convex/values").VString<string | undefined, "optional">;
3344
+ }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
3345
+ details?: string | undefined;
3346
+ type: "unsupported-tool";
3347
+ tool: any;
3348
+ }, {
3349
+ type: import("convex/values").VLiteral<"unsupported-tool", "required">;
3350
+ tool: import("convex/values").VAny<any, "required", string>;
3351
+ details: import("convex/values").VString<string | undefined, "optional">;
3352
+ }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
3353
+ type: "other";
3354
+ message: string;
3355
+ }, {
3356
+ type: import("convex/values").VLiteral<"other", "required">;
3357
+ message: import("convex/values").VString<string, "required">;
3358
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
3359
+ finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
3360
+ reasoning: import("convex/values").VString<string | undefined, "optional">;
3361
+ reasoningDetails: import("convex/values").VArray<({
3362
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3363
+ signature?: string | undefined;
3364
+ state?: "streaming" | "done" | undefined;
3365
+ type: "reasoning";
4889
3366
  text: string;
4890
3367
  } | {
4891
- providerExecuted?: boolean | undefined;
4892
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4893
- dynamic?: boolean | undefined;
4894
- type: "tool-call";
4895
- toolCallId: string;
4896
- toolName: string;
4897
- input: any;
3368
+ signature?: string | undefined;
3369
+ type: "text";
3370
+ text: string;
4898
3371
  } | {
4899
- providerExecuted?: boolean | undefined;
4900
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4901
- dynamic?: boolean | undefined;
4902
- id: string;
4903
- type: "tool-input-start";
4904
- toolName: string;
3372
+ type: "redacted";
3373
+ data: string;
3374
+ })[] | undefined, import("convex/values").VUnion<{
3375
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3376
+ signature?: string | undefined;
3377
+ state?: "streaming" | "done" | undefined;
3378
+ type: "reasoning";
3379
+ text: string;
4905
3380
  } | {
4906
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4907
- id: string;
4908
- type: "tool-input-delta";
4909
- delta: string;
3381
+ signature?: string | undefined;
3382
+ type: "text";
3383
+ text: string;
4910
3384
  } | {
4911
- providerExecuted?: boolean | undefined;
4912
- input?: any;
4913
- dynamic?: boolean | undefined;
4914
- output?: any;
4915
- type: "tool-result";
4916
- toolCallId: string;
4917
- toolName: string;
3385
+ type: "redacted";
3386
+ data: string;
3387
+ }, [import("convex/values").VObject<{
3388
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3389
+ signature?: string | undefined;
3390
+ state?: "streaming" | "done" | undefined;
3391
+ type: "reasoning";
3392
+ text: string;
3393
+ }, {
3394
+ type: import("convex/values").VLiteral<"reasoning", "required">;
3395
+ text: import("convex/values").VString<string, "required">;
3396
+ signature: import("convex/values").VString<string | undefined, "optional">;
3397
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3398
+ state: import("convex/values").VUnion<"streaming" | "done" | undefined, [import("convex/values").VLiteral<"streaming", "required">, import("convex/values").VLiteral<"done", "required">], "optional", never>;
3399
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature" | "state">, import("convex/values").VObject<{
3400
+ signature?: string | undefined;
3401
+ type: "text";
3402
+ text: string;
3403
+ }, {
3404
+ type: import("convex/values").VLiteral<"text", "required">;
3405
+ text: import("convex/values").VString<string, "required">;
3406
+ signature: import("convex/values").VString<string | undefined, "optional">;
3407
+ }, "required", "type" | "text" | "signature">, import("convex/values").VObject<{
3408
+ type: "redacted";
3409
+ data: string;
3410
+ }, {
3411
+ type: import("convex/values").VLiteral<"redacted", "required">;
3412
+ data: import("convex/values").VString<string, "required">;
3413
+ }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
3414
+ id: import("convex/values").VString<string | undefined, "optional">;
3415
+ parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
3416
+ stepId: import("convex/values").VString<string | undefined, "optional">;
3417
+ files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
3418
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "warnings" | "finishReason" | "reasoningDetails" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">, {
3419
+ threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
3420
+ embeddingId_threadId: ["embeddingId", "threadId", "_creationTime"];
3421
+ }, {
3422
+ text_search: {
3423
+ searchField: "text";
3424
+ filterFields: "userId" | "threadId";
3425
+ };
3426
+ }, {}>;
3427
+ streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
3428
+ userId?: string | undefined;
3429
+ agentName?: string | undefined;
3430
+ model?: string | undefined;
3431
+ provider?: string | undefined;
3432
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3433
+ order: number;
3434
+ threadId: import("convex/values").GenericId<"threads">;
3435
+ stepOrder: number;
3436
+ state: {
3437
+ timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3438
+ kind: "streaming";
3439
+ lastHeartbeat: number;
3440
+ } | {
3441
+ cleanupFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3442
+ kind: "finished";
3443
+ endedAt: number;
3444
+ } | {
3445
+ kind: "aborted";
3446
+ reason: string;
3447
+ };
3448
+ }, {
3449
+ userId: import("convex/values").VString<string | undefined, "optional">;
3450
+ agentName: import("convex/values").VString<string | undefined, "optional">;
3451
+ model: import("convex/values").VString<string | undefined, "optional">;
3452
+ provider: import("convex/values").VString<string | undefined, "optional">;
3453
+ providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3454
+ threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
3455
+ order: import("convex/values").VFloat64<number, "required">;
3456
+ /**
3457
+ * The step order of the first message in the stream.
3458
+ * If the stream ends up with both a tool call and a tool result,
3459
+ * the stepOrder of the result will be +1 of the tool call.
3460
+ */
3461
+ stepOrder: import("convex/values").VFloat64<number, "required">;
3462
+ state: import("convex/values").VUnion<{
3463
+ timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3464
+ kind: "streaming";
3465
+ lastHeartbeat: number;
4918
3466
  } | {
4919
- type: "raw";
4920
- rawValue: any;
4921
- }, [import("convex/values").VObject<{
4922
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4923
- id: string;
4924
- type: "text-delta";
4925
- text: string;
4926
- }, {
4927
- type: import("convex/values").VLiteral<"text-delta", "required">;
4928
- id: import("convex/values").VString<string, "required">;
4929
- text: import("convex/values").VString<string, "required">;
4930
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4931
- }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VObject<{
4932
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4933
- id: string;
4934
- type: "reasoning-delta";
4935
- text: string;
4936
- }, {
4937
- type: import("convex/values").VLiteral<"reasoning-delta", "required">;
4938
- id: import("convex/values").VString<string, "required">;
4939
- text: import("convex/values").VString<string, "required">;
4940
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4941
- }, "required", "id" | "type" | "text" | "providerMetadata" | `providerMetadata.${string}`>, import("convex/values").VUnion<{
4942
- title?: string | undefined;
4943
- type?: "source" | undefined;
4944
- providerOptions?: Record<string, Record<string, any>> | undefined;
4945
- url?: string | undefined;
4946
- id: string;
4947
- sourceType: "url";
3467
+ cleanupFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3468
+ kind: "finished";
3469
+ endedAt: number;
4948
3470
  } | {
4949
- filename?: string | undefined;
4950
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4951
- id: string;
4952
- title: string;
4953
- type: "source";
4954
- sourceType: "document";
4955
- mediaType: string;
3471
+ kind: "aborted";
3472
+ reason: string;
4956
3473
  }, [import("convex/values").VObject<{
4957
- title?: string | undefined;
4958
- type?: "source" | undefined;
4959
- providerOptions?: Record<string, Record<string, any>> | undefined;
4960
- url?: string | undefined;
4961
- id: string;
4962
- sourceType: "url";
4963
- }, {
4964
- type: import("convex/values").VLiteral<"source" | undefined, "optional">;
4965
- sourceType: import("convex/values").VLiteral<"url", "required">;
4966
- id: import("convex/values").VString<string, "required">;
4967
- url: import("convex/values").VString<string | undefined, "optional">;
4968
- title: import("convex/values").VString<string | undefined, "optional">;
4969
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4970
- }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
4971
- filename?: string | undefined;
4972
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4973
- id: string;
4974
- title: string;
4975
- type: "source";
4976
- sourceType: "document";
4977
- mediaType: string;
4978
- }, {
4979
- type: import("convex/values").VLiteral<"source", "required">;
4980
- sourceType: import("convex/values").VLiteral<"document", "required">;
4981
- id: import("convex/values").VString<string, "required">;
4982
- mediaType: import("convex/values").VString<string, "required">;
4983
- title: import("convex/values").VString<string, "required">;
4984
- filename: import("convex/values").VString<string | undefined, "optional">;
4985
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4986
- }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, import("convex/values").VObject<{
4987
- providerExecuted?: boolean | undefined;
4988
- providerMetadata?: Record<string, Record<string, any>> | undefined;
4989
- dynamic?: boolean | undefined;
4990
- type: "tool-call";
4991
- toolCallId: string;
4992
- toolName: string;
4993
- input: any;
4994
- }, {
4995
- type: import("convex/values").VLiteral<"tool-call", "required">;
4996
- toolCallId: import("convex/values").VString<string, "required">;
4997
- toolName: import("convex/values").VString<string, "required">;
4998
- input: import("convex/values").VAny<any, "required", string>;
4999
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5000
- dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5001
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
5002
- }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}`>, import("convex/values").VObject<{
5003
- providerExecuted?: boolean | undefined;
5004
- providerMetadata?: Record<string, Record<string, any>> | undefined;
5005
- dynamic?: boolean | undefined;
5006
- id: string;
5007
- type: "tool-input-start";
5008
- toolName: string;
5009
- }, {
5010
- type: import("convex/values").VLiteral<"tool-input-start", "required">;
5011
- id: import("convex/values").VString<string, "required">;
5012
- toolName: import("convex/values").VString<string, "required">;
5013
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
5014
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5015
- dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5016
- }, "required", "id" | "type" | "toolName" | "providerExecuted" | "providerMetadata" | `providerMetadata.${string}` | "dynamic">, import("convex/values").VObject<{
5017
- providerMetadata?: Record<string, Record<string, any>> | undefined;
5018
- id: string;
5019
- type: "tool-input-delta";
5020
- delta: string;
3474
+ timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3475
+ kind: "streaming";
3476
+ lastHeartbeat: number;
5021
3477
  }, {
5022
- type: import("convex/values").VLiteral<"tool-input-delta", "required">;
5023
- id: import("convex/values").VString<string, "required">;
5024
- delta: import("convex/values").VString<string, "required">;
5025
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
5026
- }, "required", "id" | "type" | "providerMetadata" | `providerMetadata.${string}` | "delta">, import("convex/values").VObject<{
5027
- providerExecuted?: boolean | undefined;
5028
- input?: any;
5029
- dynamic?: boolean | undefined;
5030
- output?: any;
5031
- type: "tool-result";
5032
- toolCallId: string;
5033
- toolName: string;
3478
+ kind: import("convex/values").VLiteral<"streaming", "required">;
3479
+ lastHeartbeat: import("convex/values").VFloat64<number, "required">;
3480
+ timeoutFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
3481
+ }, "required", "kind" | "lastHeartbeat" | "timeoutFnId">, import("convex/values").VObject<{
3482
+ cleanupFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3483
+ kind: "finished";
3484
+ endedAt: number;
5034
3485
  }, {
5035
- type: import("convex/values").VLiteral<"tool-result", "required">;
5036
- toolCallId: import("convex/values").VString<string, "required">;
5037
- toolName: import("convex/values").VString<string, "required">;
5038
- input: import("convex/values").VAny<any, "optional", string>;
5039
- output: import("convex/values").VAny<any, "optional", string>;
5040
- providerExecuted: import("convex/values").VBoolean<boolean | undefined, "optional">;
5041
- dynamic: import("convex/values").VBoolean<boolean | undefined, "optional">;
5042
- }, "required", "type" | "toolCallId" | "toolName" | "providerExecuted" | "input" | "dynamic" | `input.${string}` | "output" | `output.${string}`>, import("convex/values").VObject<{
5043
- type: "raw";
5044
- rawValue: any;
3486
+ kind: import("convex/values").VLiteral<"finished", "required">;
3487
+ endedAt: import("convex/values").VFloat64<number, "required">;
3488
+ cleanupFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
3489
+ }, "required", "kind" | "endedAt" | "cleanupFnId">, import("convex/values").VObject<{
3490
+ kind: "aborted";
3491
+ reason: string;
5045
3492
  }, {
5046
- type: import("convex/values").VLiteral<"raw", "required">;
5047
- rawValue: import("convex/values").VAny<any, "required", string>;
5048
- }, "required", "type" | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "providerExecuted" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | "text" | `providerOptions.${string}` | "filename" | "toolCallId" | "toolName" | "args" | "providerExecuted" | `args.${string}` | "result" | "isError" | "experimental_content" | `result.${string}` | "providerMetadata" | "source" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}` | "textDelta" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta" | "input" | "dynamic" | `input.${string}` | "delta" | "output" | `output.${string}` | "rawValue" | `rawValue.${string}`>, "required">;
3493
+ kind: import("convex/values").VLiteral<"aborted", "required">;
3494
+ reason: import("convex/values").VString<string, "required">;
3495
+ }, "required", "kind" | "reason">], "required", "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt" | "cleanupFnId" | "reason">;
3496
+ }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.cleanupFnId" | "state.reason">, {
3497
+ threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
3498
+ }, {}, {}>;
3499
+ streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
3500
+ streamId: import("convex/values").GenericId<"streamingMessages">;
3501
+ start: number;
3502
+ end: number;
3503
+ parts: any[];
3504
+ }, {
3505
+ streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
3506
+ start: import("convex/values").VFloat64<number, "required">;
3507
+ end: import("convex/values").VFloat64<number, "required">;
3508
+ parts: import("convex/values").VArray<any[], import("convex/values").VAny<any, "required", string>, "required">;
5049
3509
  }, "required", "streamId" | "start" | "end" | "parts">, {
5050
3510
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
5051
3511
  }, {}, {}>;
@@ -5219,9 +3679,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5219
3679
  title?: string | undefined;
5220
3680
  type?: "source" | undefined;
5221
3681
  providerOptions?: Record<string, Record<string, any>> | undefined;
5222
- url?: string | undefined;
5223
3682
  id: string;
5224
3683
  sourceType: "url";
3684
+ url: string;
5225
3685
  } | {
5226
3686
  filename?: string | undefined;
5227
3687
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -5231,6 +3691,19 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5231
3691
  sourceType: "document";
5232
3692
  mediaType: string;
5233
3693
  })[] | undefined;
3694
+ warnings?: ({
3695
+ details?: string | undefined;
3696
+ type: "unsupported-setting";
3697
+ setting: string;
3698
+ } | {
3699
+ details?: string | undefined;
3700
+ type: "unsupported-tool";
3701
+ tool: any;
3702
+ } | {
3703
+ type: "other";
3704
+ message: string;
3705
+ })[] | undefined;
3706
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
5234
3707
  reasoningDetails?: ({
5235
3708
  providerOptions?: Record<string, Record<string, any>> | undefined;
5236
3709
  signature?: string | undefined;
@@ -5245,19 +3718,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5245
3718
  type: "redacted";
5246
3719
  data: string;
5247
3720
  })[] | undefined;
5248
- warnings?: ({
5249
- details?: string | undefined;
5250
- type: "unsupported-setting";
5251
- setting: string;
5252
- } | {
5253
- details?: string | undefined;
5254
- type: "unsupported-tool";
5255
- tool: any;
5256
- } | {
5257
- type: "other";
5258
- message: string;
5259
- })[] | undefined;
5260
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
5261
3721
  _id: string;
5262
3722
  _creationTime: number;
5263
3723
  status: "pending" | "success" | "failed";
@@ -5747,9 +4207,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5747
4207
  title?: string | undefined;
5748
4208
  type?: "source" | undefined;
5749
4209
  providerOptions?: Record<string, Record<string, any>> | undefined;
5750
- url?: string | undefined;
5751
4210
  id: string;
5752
4211
  sourceType: "url";
4212
+ url: string;
5753
4213
  } | {
5754
4214
  filename?: string | undefined;
5755
4215
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -5762,9 +4222,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5762
4222
  title?: string | undefined;
5763
4223
  type?: "source" | undefined;
5764
4224
  providerOptions?: Record<string, Record<string, any>> | undefined;
5765
- url?: string | undefined;
5766
4225
  id: string;
5767
4226
  sourceType: "url";
4227
+ url: string;
5768
4228
  } | {
5769
4229
  filename?: string | undefined;
5770
4230
  providerMetadata?: Record<string, Record<string, any>> | undefined;
@@ -5777,14 +4237,14 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5777
4237
  title?: string | undefined;
5778
4238
  type?: "source" | undefined;
5779
4239
  providerOptions?: Record<string, Record<string, any>> | undefined;
5780
- url?: string | undefined;
5781
4240
  id: string;
5782
4241
  sourceType: "url";
4242
+ url: string;
5783
4243
  }, {
5784
4244
  type: import("convex/values").VLiteral<"source" | undefined, "optional">;
5785
4245
  sourceType: import("convex/values").VLiteral<"url", "required">;
5786
4246
  id: import("convex/values").VString<string, "required">;
5787
- url: import("convex/values").VString<string | undefined, "optional">;
4247
+ url: import("convex/values").VString<string, "required">;
5788
4248
  title: import("convex/values").VString<string | undefined, "optional">;
5789
4249
  providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
5790
4250
  }, "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, import("convex/values").VObject<{
@@ -5804,6 +4264,52 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5804
4264
  filename: import("convex/values").VString<string | undefined, "optional">;
5805
4265
  providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
5806
4266
  }, "required", "id" | "title" | "type" | "filename" | "providerMetadata" | "sourceType" | "mediaType" | `providerMetadata.${string}`>], "required", "id" | "title" | "type" | "providerOptions" | `providerOptions.${string}` | "filename" | "providerMetadata" | "sourceType" | "url" | "mediaType" | `providerMetadata.${string}`>, "optional">;
4267
+ warnings: import("convex/values").VArray<({
4268
+ details?: string | undefined;
4269
+ type: "unsupported-setting";
4270
+ setting: string;
4271
+ } | {
4272
+ details?: string | undefined;
4273
+ type: "unsupported-tool";
4274
+ tool: any;
4275
+ } | {
4276
+ type: "other";
4277
+ message: string;
4278
+ })[] | undefined, import("convex/values").VUnion<{
4279
+ details?: string | undefined;
4280
+ type: "unsupported-setting";
4281
+ setting: string;
4282
+ } | {
4283
+ details?: string | undefined;
4284
+ type: "unsupported-tool";
4285
+ tool: any;
4286
+ } | {
4287
+ type: "other";
4288
+ message: string;
4289
+ }, [import("convex/values").VObject<{
4290
+ details?: string | undefined;
4291
+ type: "unsupported-setting";
4292
+ setting: string;
4293
+ }, {
4294
+ type: import("convex/values").VLiteral<"unsupported-setting", "required">;
4295
+ setting: import("convex/values").VString<string, "required">;
4296
+ details: import("convex/values").VString<string | undefined, "optional">;
4297
+ }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
4298
+ details?: string | undefined;
4299
+ type: "unsupported-tool";
4300
+ tool: any;
4301
+ }, {
4302
+ type: import("convex/values").VLiteral<"unsupported-tool", "required">;
4303
+ tool: import("convex/values").VAny<any, "required", string>;
4304
+ details: import("convex/values").VString<string | undefined, "optional">;
4305
+ }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
4306
+ type: "other";
4307
+ message: string;
4308
+ }, {
4309
+ type: import("convex/values").VLiteral<"other", "required">;
4310
+ message: import("convex/values").VString<string, "required">;
4311
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
4312
+ finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
5807
4313
  reasoning: import("convex/values").VString<string | undefined, "optional">;
5808
4314
  reasoningDetails: import("convex/values").VArray<({
5809
4315
  providerOptions?: Record<string, Record<string, any>> | undefined;
@@ -5858,56 +4364,10 @@ export declare const vMessageDoc: import("convex/values").VObject<{
5858
4364
  type: import("convex/values").VLiteral<"redacted", "required">;
5859
4365
  data: import("convex/values").VString<string, "required">;
5860
4366
  }, "required", "type" | "data">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "data" | "signature" | "state">, "optional">;
5861
- warnings: import("convex/values").VArray<({
5862
- details?: string | undefined;
5863
- type: "unsupported-setting";
5864
- setting: string;
5865
- } | {
5866
- details?: string | undefined;
5867
- type: "unsupported-tool";
5868
- tool: any;
5869
- } | {
5870
- type: "other";
5871
- message: string;
5872
- })[] | undefined, import("convex/values").VUnion<{
5873
- details?: string | undefined;
5874
- type: "unsupported-setting";
5875
- setting: string;
5876
- } | {
5877
- details?: string | undefined;
5878
- type: "unsupported-tool";
5879
- tool: any;
5880
- } | {
5881
- type: "other";
5882
- message: string;
5883
- }, [import("convex/values").VObject<{
5884
- details?: string | undefined;
5885
- type: "unsupported-setting";
5886
- setting: string;
5887
- }, {
5888
- type: import("convex/values").VLiteral<"unsupported-setting", "required">;
5889
- setting: import("convex/values").VString<string, "required">;
5890
- details: import("convex/values").VString<string | undefined, "optional">;
5891
- }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
5892
- details?: string | undefined;
5893
- type: "unsupported-tool";
5894
- tool: any;
5895
- }, {
5896
- type: import("convex/values").VLiteral<"unsupported-tool", "required">;
5897
- tool: import("convex/values").VAny<any, "required", string>;
5898
- details: import("convex/values").VString<string | undefined, "optional">;
5899
- }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
5900
- type: "other";
5901
- message: string;
5902
- }, {
5903
- type: import("convex/values").VLiteral<"other", "required">;
5904
- message: import("convex/values").VString<string, "required">;
5905
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
5906
- finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
5907
4367
  id: import("convex/values").VString<string | undefined, "optional">;
5908
4368
  _id: import("convex/values").VString<string, "required">;
5909
4369
  _creationTime: import("convex/values").VFloat64<number, "required">;
5910
- }, "required", "_id" | "_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">;
4370
+ }, "required", "_id" | "_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | `providerMetadata.${string}` | "warnings" | "finishReason" | "reasoningDetails" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "usage.reasoningTokens" | "usage.cachedInputTokens">;
5911
4371
  export type MessageDoc = Infer<typeof vMessageDoc>;
5912
4372
  export default schema;
5913
4373
  //# sourceMappingURL=schema.d.ts.map