@convex-dev/agent 0.1.9-alpha.5 → 0.1.9-alpha.6

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 (73) hide show
  1. package/dist/commonjs/client/index.d.ts +71 -72
  2. package/dist/commonjs/client/index.d.ts.map +1 -1
  3. package/dist/commonjs/client/index.js +0 -2
  4. package/dist/commonjs/client/index.js.map +1 -1
  5. package/dist/commonjs/client/streaming.d.ts.map +1 -1
  6. package/dist/commonjs/client/streaming.js +1 -7
  7. package/dist/commonjs/client/streaming.js.map +1 -1
  8. package/dist/commonjs/component/_generated/api.d.ts +1 -12
  9. package/dist/commonjs/component/messages.d.ts +210 -210
  10. package/dist/commonjs/component/schema.d.ts +583 -583
  11. package/dist/commonjs/component/schema.d.ts.map +1 -1
  12. package/dist/commonjs/component/schema.js +2 -2
  13. package/dist/commonjs/component/schema.js.map +1 -1
  14. package/dist/commonjs/component/streams.d.ts +10 -17
  15. package/dist/commonjs/component/streams.d.ts.map +1 -1
  16. package/dist/commonjs/component/streams.js +12 -42
  17. package/dist/commonjs/component/streams.js.map +1 -1
  18. package/dist/commonjs/component/threads.d.ts +18 -18
  19. package/dist/commonjs/component/vector/index.d.ts +3 -3
  20. package/dist/commonjs/component/vector/tables.d.ts +2 -2
  21. package/dist/commonjs/react/deltas.d.ts.map +1 -1
  22. package/dist/commonjs/react/deltas.js +3 -2
  23. package/dist/commonjs/react/deltas.js.map +1 -1
  24. package/dist/commonjs/react/index.d.ts +1 -3
  25. package/dist/commonjs/react/index.d.ts.map +1 -1
  26. package/dist/commonjs/react/index.js +3 -14
  27. package/dist/commonjs/react/index.js.map +1 -1
  28. package/dist/commonjs/validators.d.ts +162 -167
  29. package/dist/commonjs/validators.d.ts.map +1 -1
  30. package/dist/commonjs/validators.js +0 -2
  31. package/dist/commonjs/validators.js.map +1 -1
  32. package/dist/commonjs.tsbuildinfo +1 -1
  33. package/dist/esm/client/index.d.ts +19 -20
  34. package/dist/esm/client/index.d.ts.map +1 -1
  35. package/dist/esm/client/index.js +0 -2
  36. package/dist/esm/client/index.js.map +1 -1
  37. package/dist/esm/client/streaming.d.ts.map +1 -1
  38. package/dist/esm/client/streaming.js +1 -7
  39. package/dist/esm/client/streaming.js.map +1 -1
  40. package/dist/esm/component/_generated/api.d.ts +1 -12
  41. package/dist/esm/component/messages.d.ts +37 -37
  42. package/dist/esm/component/schema.d.ts +583 -583
  43. package/dist/esm/component/schema.d.ts.map +1 -1
  44. package/dist/esm/component/schema.js +2 -2
  45. package/dist/esm/component/schema.js.map +1 -1
  46. package/dist/esm/component/streams.d.ts +0 -7
  47. package/dist/esm/component/streams.d.ts.map +1 -1
  48. package/dist/esm/component/streams.js +12 -42
  49. package/dist/esm/component/streams.js.map +1 -1
  50. package/dist/esm/component/threads.d.ts +15 -15
  51. package/dist/esm/component/vector/index.d.ts +3 -3
  52. package/dist/esm/component/vector/tables.d.ts +2 -2
  53. package/dist/esm/react/deltas.d.ts.map +1 -1
  54. package/dist/esm/react/deltas.js +3 -2
  55. package/dist/esm/react/deltas.js.map +1 -1
  56. package/dist/esm/react/index.d.ts +1 -3
  57. package/dist/esm/react/index.d.ts.map +1 -1
  58. package/dist/esm/react/index.js +3 -14
  59. package/dist/esm/react/index.js.map +1 -1
  60. package/dist/esm/validators.d.ts +162 -167
  61. package/dist/esm/validators.d.ts.map +1 -1
  62. package/dist/esm/validators.js +0 -2
  63. package/dist/esm/validators.js.map +1 -1
  64. package/dist/esm.tsbuildinfo +1 -1
  65. package/package.json +1 -1
  66. package/src/client/index.ts +0 -4
  67. package/src/client/streaming.ts +1 -7
  68. package/src/component/_generated/api.d.ts +1 -12
  69. package/src/component/schema.ts +2 -2
  70. package/src/component/streams.ts +27 -76
  71. package/src/react/deltas.ts +3 -4
  72. package/src/react/index.ts +4 -15
  73. package/src/validators.ts +0 -6
@@ -13,8 +13,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
13
13
  model_table_userId?: string[] | undefined;
14
14
  model_table_threadId?: string[] | undefined;
15
15
  model: string;
16
- vector: number[];
17
16
  table: string;
17
+ vector: number[];
18
18
  }, {
19
19
  model: import("convex/values").VString<string, "required">;
20
20
  table: import("convex/values").VString<string, "required">;
@@ -23,7 +23,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
23
23
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
24
24
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
25
25
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
26
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
26
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
27
27
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
28
28
  }, import("convex/server").GenericTableSearchIndexes, {
29
29
  vector: {
@@ -38,8 +38,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
38
38
  model_table_userId?: string[] | undefined;
39
39
  model_table_threadId?: string[] | undefined;
40
40
  model: string;
41
- vector: number[];
42
41
  table: string;
42
+ vector: number[];
43
43
  }, {
44
44
  model: import("convex/values").VString<string, "required">;
45
45
  table: import("convex/values").VString<string, "required">;
@@ -48,7 +48,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
48
48
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
49
49
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
50
50
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
51
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
51
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
52
52
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
53
53
  }, import("convex/server").GenericTableSearchIndexes, {
54
54
  vector: {
@@ -63,8 +63,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
63
63
  model_table_userId?: string[] | undefined;
64
64
  model_table_threadId?: string[] | undefined;
65
65
  model: string;
66
- vector: number[];
67
66
  table: string;
67
+ vector: number[];
68
68
  }, {
69
69
  model: import("convex/values").VString<string, "required">;
70
70
  table: import("convex/values").VString<string, "required">;
@@ -73,7 +73,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
73
73
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
74
74
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
75
75
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
76
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
76
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
77
77
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
78
78
  }, import("convex/server").GenericTableSearchIndexes, {
79
79
  vector: {
@@ -88,8 +88,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
88
88
  model_table_userId?: string[] | undefined;
89
89
  model_table_threadId?: string[] | undefined;
90
90
  model: string;
91
- vector: number[];
92
91
  table: string;
92
+ vector: number[];
93
93
  }, {
94
94
  model: import("convex/values").VString<string, "required">;
95
95
  table: import("convex/values").VString<string, "required">;
@@ -98,7 +98,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
98
98
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
99
99
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
100
100
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
101
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
101
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
102
102
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
103
103
  }, import("convex/server").GenericTableSearchIndexes, {
104
104
  vector: {
@@ -113,8 +113,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
113
113
  model_table_userId?: string[] | undefined;
114
114
  model_table_threadId?: string[] | undefined;
115
115
  model: string;
116
- vector: number[];
117
116
  table: string;
117
+ vector: number[];
118
118
  }, {
119
119
  model: import("convex/values").VString<string, "required">;
120
120
  table: import("convex/values").VString<string, "required">;
@@ -123,7 +123,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
123
123
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
124
124
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
125
125
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
126
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
126
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
127
127
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
128
128
  }, import("convex/server").GenericTableSearchIndexes, {
129
129
  vector: {
@@ -138,8 +138,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
138
138
  model_table_userId?: string[] | undefined;
139
139
  model_table_threadId?: string[] | undefined;
140
140
  model: string;
141
- vector: number[];
142
141
  table: string;
142
+ vector: number[];
143
143
  }, {
144
144
  model: import("convex/values").VString<string, "required">;
145
145
  table: import("convex/values").VString<string, "required">;
@@ -148,7 +148,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
148
148
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
149
149
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
150
150
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
151
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
151
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
152
152
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
153
153
  }, import("convex/server").GenericTableSearchIndexes, {
154
154
  vector: {
@@ -163,8 +163,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
163
163
  model_table_userId?: string[] | undefined;
164
164
  model_table_threadId?: string[] | undefined;
165
165
  model: string;
166
- vector: number[];
167
166
  table: string;
167
+ vector: number[];
168
168
  }, {
169
169
  model: import("convex/values").VString<string, "required">;
170
170
  table: import("convex/values").VString<string, "required">;
@@ -173,7 +173,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
173
173
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
174
174
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
175
175
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
176
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
176
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
177
177
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
178
178
  }, import("convex/server").GenericTableSearchIndexes, {
179
179
  vector: {
@@ -188,8 +188,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
188
188
  model_table_userId?: string[] | undefined;
189
189
  model_table_threadId?: string[] | undefined;
190
190
  model: string;
191
- vector: number[];
192
191
  table: string;
192
+ vector: number[];
193
193
  }, {
194
194
  model: import("convex/values").VString<string, "required">;
195
195
  table: import("convex/values").VString<string, "required">;
@@ -198,7 +198,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
198
198
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
199
199
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
200
200
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
201
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
201
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
202
202
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
203
203
  }, import("convex/server").GenericTableSearchIndexes, {
204
204
  vector: {
@@ -213,8 +213,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
213
213
  model_table_userId?: string[] | undefined;
214
214
  model_table_threadId?: string[] | undefined;
215
215
  model: string;
216
- vector: number[];
217
216
  table: string;
217
+ vector: number[];
218
218
  }, {
219
219
  model: import("convex/values").VString<string, "required">;
220
220
  table: import("convex/values").VString<string, "required">;
@@ -223,7 +223,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
223
223
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
224
224
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
225
225
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
226
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
226
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
227
227
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
228
228
  }, import("convex/server").GenericTableSearchIndexes, {
229
229
  vector: {
@@ -238,8 +238,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
238
238
  model_table_userId?: string[] | undefined;
239
239
  model_table_threadId?: string[] | undefined;
240
240
  model: string;
241
- vector: number[];
242
241
  table: string;
242
+ vector: number[];
243
243
  }, {
244
244
  model: import("convex/values").VString<string, "required">;
245
245
  table: import("convex/values").VString<string, "required">;
@@ -248,7 +248,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
248
248
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
249
249
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
250
250
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
251
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
251
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
252
252
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
253
253
  }, import("convex/server").GenericTableSearchIndexes, {
254
254
  vector: {
@@ -258,12 +258,12 @@ export declare const schema: import("convex/server").SchemaDefinition<{
258
258
  };
259
259
  }>;
260
260
  threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
261
- title?: string | undefined;
262
261
  userId?: string | undefined;
263
- order?: number | undefined;
262
+ title?: string | undefined;
264
263
  summary?: string | undefined;
265
264
  defaultSystemPrompt?: string | undefined;
266
265
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
266
+ order?: number | undefined;
267
267
  status: "active" | "archived";
268
268
  }, {
269
269
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -273,14 +273,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
273
273
  defaultSystemPrompt: import("convex/values").VString<string | undefined, "optional">;
274
274
  parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
275
275
  order: import("convex/values").VFloat64<number | undefined, "optional">;
276
- }, "required", "title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds">, {
276
+ }, "required", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
277
277
  userId: ["userId", "_creationTime"];
278
278
  }, {}, {}>;
279
279
  messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
280
280
  id?: string | undefined;
281
- text?: string | undefined;
281
+ userId?: string | undefined;
282
+ 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;
283
+ fileIds?: import("convex/values").GenericId<"files">[] | undefined;
284
+ files?: any[] | undefined;
285
+ error?: string | undefined;
286
+ agentName?: string | undefined;
287
+ model?: string | undefined;
288
+ provider?: string | undefined;
282
289
  providerOptions?: Record<string, Record<string, any>> | undefined;
283
- reasoning?: string | undefined;
284
290
  message?: {
285
291
  providerOptions?: Record<string, Record<string, any>> | undefined;
286
292
  role: "user";
@@ -354,16 +360,17 @@ export declare const schema: import("convex/server").SchemaDefinition<{
354
360
  role: "system";
355
361
  content: string;
356
362
  } | undefined;
357
- files?: any[] | undefined;
358
- error?: string | undefined;
359
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
360
- finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
361
- model?: string | undefined;
362
- provider?: string | undefined;
363
+ text?: string | undefined;
364
+ reasoning?: string | undefined;
365
+ usage?: {
366
+ promptTokens: number;
367
+ completionTokens: number;
368
+ totalTokens: number;
369
+ } | undefined;
363
370
  providerMetadata?: Record<string, Record<string, any>> | undefined;
364
371
  sources?: {
365
- providerOptions?: Record<string, Record<string, any>> | undefined;
366
372
  title?: string | undefined;
373
+ providerOptions?: Record<string, Record<string, any>> | undefined;
367
374
  id: string;
368
375
  sourceType: "url";
369
376
  url: string;
@@ -376,11 +383,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
376
383
  type: "redacted";
377
384
  data: string;
378
385
  })[] | undefined;
379
- usage?: {
380
- promptTokens: number;
381
- completionTokens: number;
382
- totalTokens: number;
383
- } | undefined;
384
386
  warnings?: ({
385
387
  details?: string | undefined;
386
388
  type: "unsupported-setting";
@@ -393,16 +395,14 @@ export declare const schema: import("convex/server").SchemaDefinition<{
393
395
  type: "other";
394
396
  message: string;
395
397
  })[] | undefined;
396
- userId?: string | undefined;
397
- agentName?: string | undefined;
398
- 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;
398
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
399
399
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
400
400
  stepId?: string | undefined;
401
- tool: boolean;
402
- threadId: import("convex/values").GenericId<"threads">;
403
401
  status: "pending" | "success" | "failed";
404
402
  order: number;
403
+ threadId: import("convex/values").GenericId<"threads">;
405
404
  stepOrder: number;
405
+ tool: boolean;
406
406
  }, {
407
407
  id: import("convex/values").VString<string | undefined, "optional">;
408
408
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -563,7 +563,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
563
563
  type: import("convex/values").VLiteral<"text", "required">;
564
564
  text: import("convex/values").VString<string, "required">;
565
565
  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>;
566
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
566
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
567
567
  providerOptions?: Record<string, Record<string, any>> | undefined;
568
568
  mimeType?: string | undefined;
569
569
  type: "image";
@@ -585,9 +585,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
585
585
  filename: import("convex/values").VString<string | undefined, "optional">;
586
586
  mimeType: import("convex/values").VString<string, "required">;
587
587
  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>;
588
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
588
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
589
589
  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>;
590
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
590
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
591
591
  providerOptions?: Record<string, Record<string, any>> | undefined;
592
592
  role: "assistant";
593
593
  content: string | ({
@@ -701,7 +701,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
701
701
  type: import("convex/values").VLiteral<"text", "required">;
702
702
  text: import("convex/values").VString<string, "required">;
703
703
  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>;
704
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
704
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
705
705
  providerOptions?: Record<string, Record<string, any>> | undefined;
706
706
  filename?: string | undefined;
707
707
  type: "file";
@@ -723,7 +723,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
723
723
  text: import("convex/values").VString<string, "required">;
724
724
  signature: import("convex/values").VString<string | undefined, "optional">;
725
725
  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>;
726
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
726
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
727
727
  providerOptions?: Record<string, Record<string, any>> | undefined;
728
728
  type: "redacted-reasoning";
729
729
  data: string;
@@ -743,9 +743,9 @@ export declare const schema: import("convex/server").SchemaDefinition<{
743
743
  toolName: import("convex/values").VString<string, "required">;
744
744
  args: import("convex/values").VAny<any, "required", string>;
745
745
  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>;
746
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
746
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
747
747
  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>;
748
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
748
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
749
749
  providerOptions?: Record<string, Record<string, any>> | undefined;
750
750
  role: "tool";
751
751
  content: {
@@ -838,7 +838,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
838
838
  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>;
839
839
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
840
840
  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>;
841
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
841
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
842
842
  providerOptions?: Record<string, Record<string, any>> | undefined;
843
843
  role: "system";
844
844
  content: string;
@@ -846,7 +846,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
846
846
  role: import("convex/values").VLiteral<"system", "required">;
847
847
  content: import("convex/values").VString<string, "required">;
848
848
  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>;
849
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">], "optional", "providerOptions" | `providerOptions.${string}` | "role" | "content">;
849
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
850
850
  tool: import("convex/values").VBoolean<boolean, "required">;
851
851
  text: import("convex/values").VString<string | undefined, "optional">;
852
852
  usage: import("convex/values").VObject<{
@@ -860,14 +860,14 @@ export declare const schema: import("convex/server").SchemaDefinition<{
860
860
  }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
861
861
  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>;
862
862
  sources: import("convex/values").VArray<{
863
- providerOptions?: Record<string, Record<string, any>> | undefined;
864
863
  title?: string | undefined;
864
+ providerOptions?: Record<string, Record<string, any>> | undefined;
865
865
  id: string;
866
866
  sourceType: "url";
867
867
  url: string;
868
868
  }[] | undefined, import("convex/values").VObject<{
869
- providerOptions?: Record<string, Record<string, any>> | undefined;
870
869
  title?: string | undefined;
870
+ providerOptions?: Record<string, Record<string, any>> | undefined;
871
871
  id: string;
872
872
  sourceType: "url";
873
873
  url: string;
@@ -877,7 +877,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
877
877
  url: import("convex/values").VString<string, "required">;
878
878
  title: import("convex/values").VString<string | undefined, "optional">;
879
879
  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>;
880
- }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">, "optional">;
880
+ }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
881
881
  reasoning: import("convex/values").VString<string | undefined, "optional">;
882
882
  reasoningDetails: import("convex/values").VArray<({
883
883
  signature?: string | undefined;
@@ -952,12 +952,12 @@ export declare const schema: import("convex/server").SchemaDefinition<{
952
952
  }, {
953
953
  type: import("convex/values").VLiteral<"other", "required">;
954
954
  message: import("convex/values").VString<string, "required">;
955
- }, "required", "type" | "message">], "required", "type" | "tool" | "message" | "setting" | "details" | `tool.${string}`>, "optional">;
956
- finishReason: import("convex/values").VUnion<"length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "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>;
955
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
956
+ 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>;
957
957
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
958
958
  stepId: import("convex/values").VString<string | undefined, "optional">;
959
959
  files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
960
- }, "required", "id" | "tool" | "text" | "providerOptions" | `providerOptions.${string}` | "reasoning" | "message" | "files" | "message.providerOptions" | `message.providerOptions.${string}` | "message.role" | "message.content" | "error" | "fileIds" | "finishReason" | "model" | "provider" | "providerMetadata" | "sources" | "reasoningDetails" | "usage" | "warnings" | `providerMetadata.${string}` | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "userId" | "threadId" | "status" | "order" | "stepOrder" | "agentName" | "embeddingId" | "parentMessageId" | "stepId">, {
960
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>, {
961
961
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
962
962
  embeddingId: ["embeddingId", "_creationTime"];
963
963
  }, {
@@ -967,13 +967,13 @@ export declare const schema: import("convex/server").SchemaDefinition<{
967
967
  };
968
968
  }, {}>;
969
969
  streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
970
- providerOptions?: Record<string, Record<string, any>> | undefined;
971
- model?: string | undefined;
972
- provider?: string | undefined;
973
970
  userId?: string | undefined;
974
971
  agentName?: string | undefined;
975
- threadId: import("convex/values").GenericId<"threads">;
972
+ model?: string | undefined;
973
+ provider?: string | undefined;
974
+ providerOptions?: Record<string, Record<string, any>> | undefined;
976
975
  order: number;
976
+ threadId: import("convex/values").GenericId<"threads">;
977
977
  stepOrder: number;
978
978
  state: {
979
979
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
@@ -983,8 +983,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
983
983
  kind: "finished";
984
984
  endedAt: number;
985
985
  } | {
986
- kind: "aborted";
987
- reason: string;
986
+ error: string;
987
+ kind: "error";
988
988
  };
989
989
  }, {
990
990
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -1008,8 +1008,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1008
1008
  kind: "finished";
1009
1009
  endedAt: number;
1010
1010
  } | {
1011
- kind: "aborted";
1012
- reason: string;
1011
+ error: string;
1012
+ kind: "error";
1013
1013
  }, [import("convex/values").VObject<{
1014
1014
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1015
1015
  kind: "streaming";
@@ -1025,13 +1025,13 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1025
1025
  kind: import("convex/values").VLiteral<"finished", "required">;
1026
1026
  endedAt: import("convex/values").VFloat64<number, "required">;
1027
1027
  }, "required", "kind" | "endedAt">, import("convex/values").VObject<{
1028
- kind: "aborted";
1029
- reason: string;
1028
+ error: string;
1029
+ kind: "error";
1030
1030
  }, {
1031
- kind: import("convex/values").VLiteral<"aborted", "required">;
1032
- reason: import("convex/values").VString<string, "required">;
1033
- }, "required", "kind" | "reason">], "required", "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt" | "reason">;
1034
- }, "required", "providerOptions" | `providerOptions.${string}` | "model" | "provider" | "userId" | "threadId" | "order" | "stepOrder" | "agentName" | "state" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason">, {
1031
+ kind: import("convex/values").VLiteral<"error", "required">;
1032
+ error: import("convex/values").VString<string, "required">;
1033
+ }, "required", "error" | "kind">], "required", "error" | "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt">;
1034
+ }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt">, {
1035
1035
  threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
1036
1036
  }, {}, {}>;
1037
1037
  streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
@@ -1069,8 +1069,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1069
1069
  } | {
1070
1070
  type: "source";
1071
1071
  source: {
1072
- providerOptions?: Record<string, Record<string, any>> | undefined;
1073
1072
  title?: string | undefined;
1073
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1074
1074
  id: string;
1075
1075
  sourceType: "url";
1076
1076
  url: string;
@@ -1120,8 +1120,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1120
1120
  } | {
1121
1121
  type: "source";
1122
1122
  source: {
1123
- providerOptions?: Record<string, Record<string, any>> | undefined;
1124
1123
  title?: string | undefined;
1124
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1125
1125
  id: string;
1126
1126
  sourceType: "url";
1127
1127
  url: string;
@@ -1166,8 +1166,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1166
1166
  } | {
1167
1167
  type: "source";
1168
1168
  source: {
1169
- providerOptions?: Record<string, Record<string, any>> | undefined;
1170
1169
  title?: string | undefined;
1170
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1171
1171
  id: string;
1172
1172
  sourceType: "url";
1173
1173
  url: string;
@@ -1196,8 +1196,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1196
1196
  }, "required", "type" | "textDelta">, import("convex/values").VObject<{
1197
1197
  type: "source";
1198
1198
  source: {
1199
- providerOptions?: Record<string, Record<string, any>> | undefined;
1200
1199
  title?: string | undefined;
1200
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1201
1201
  id: string;
1202
1202
  sourceType: "url";
1203
1203
  url: string;
@@ -1205,8 +1205,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1205
1205
  }, {
1206
1206
  type: import("convex/values").VLiteral<"source", "required">;
1207
1207
  source: import("convex/values").VObject<{
1208
- providerOptions?: Record<string, Record<string, any>> | undefined;
1209
1208
  title?: string | undefined;
1209
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1210
1210
  id: string;
1211
1211
  sourceType: "url";
1212
1212
  url: string;
@@ -1216,8 +1216,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1216
1216
  url: import("convex/values").VString<string, "required">;
1217
1217
  title: import("convex/values").VString<string | undefined, "optional">;
1218
1218
  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>;
1219
- }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">;
1220
- }, "required", "type" | "source" | "source.id" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "source.title">, import("convex/values").VObject<{
1219
+ }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
1220
+ }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
1221
1221
  providerOptions?: Record<string, Record<string, any>> | undefined;
1222
1222
  type: "tool-call";
1223
1223
  toolCallId: string;
@@ -1300,7 +1300,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1300
1300
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1301
1301
  isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1302
1302
  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>;
1303
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "source.title" | "argsTextDelta">, "required">;
1303
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, "required">;
1304
1304
  }, "required", "streamId" | "start" | "end" | "parts">, {
1305
1305
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1306
1306
  }, {}, {}>;
@@ -1340,186 +1340,19 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1340
1340
  }, true>;
1341
1341
  export declare const vv: {
1342
1342
  id: <TableName extends import("convex/server").TableNamesInDataModel<{
1343
- messages: {
1344
- document: {
1345
- _id: import("convex/values").GenericId<"messages">;
1346
- _creationTime: number;
1347
- id?: string | undefined;
1348
- text?: string | undefined;
1349
- providerOptions?: Record<string, Record<string, any>> | undefined;
1350
- reasoning?: string | undefined;
1351
- message?: {
1352
- providerOptions?: Record<string, Record<string, any>> | undefined;
1353
- role: "user";
1354
- content: string | ({
1355
- providerOptions?: Record<string, Record<string, any>> | undefined;
1356
- type: "text";
1357
- text: string;
1358
- } | {
1359
- providerOptions?: Record<string, Record<string, any>> | undefined;
1360
- mimeType?: string | undefined;
1361
- type: "image";
1362
- image: string | ArrayBuffer;
1363
- } | {
1364
- providerOptions?: Record<string, Record<string, any>> | undefined;
1365
- filename?: string | undefined;
1366
- type: "file";
1367
- mimeType: string;
1368
- data: string | ArrayBuffer;
1369
- })[];
1370
- } | {
1371
- providerOptions?: Record<string, Record<string, any>> | undefined;
1372
- role: "assistant";
1373
- content: string | ({
1374
- providerOptions?: Record<string, Record<string, any>> | undefined;
1375
- type: "text";
1376
- text: string;
1377
- } | {
1378
- providerOptions?: Record<string, Record<string, any>> | undefined;
1379
- filename?: string | undefined;
1380
- type: "file";
1381
- mimeType: string;
1382
- data: string | ArrayBuffer;
1383
- } | {
1384
- providerOptions?: Record<string, Record<string, any>> | undefined;
1385
- signature?: string | undefined;
1386
- type: "reasoning";
1387
- text: string;
1388
- } | {
1389
- providerOptions?: Record<string, Record<string, any>> | undefined;
1390
- type: "redacted-reasoning";
1391
- data: string;
1392
- } | {
1393
- providerOptions?: Record<string, Record<string, any>> | undefined;
1394
- type: "tool-call";
1395
- toolCallId: string;
1396
- toolName: string;
1397
- args: any;
1398
- })[];
1399
- } | {
1400
- providerOptions?: Record<string, Record<string, any>> | undefined;
1401
- role: "tool";
1402
- content: {
1403
- providerOptions?: Record<string, Record<string, any>> | undefined;
1404
- args?: any;
1405
- experimental_content?: ({
1406
- type: "text";
1407
- text: string;
1408
- } | {
1409
- mimeType?: string | undefined;
1410
- type: "image";
1411
- data: string;
1412
- })[] | undefined;
1413
- isError?: boolean | undefined;
1414
- type: "tool-result";
1415
- toolCallId: string;
1416
- toolName: string;
1417
- result: any;
1418
- }[];
1419
- } | {
1420
- providerOptions?: Record<string, Record<string, any>> | undefined;
1421
- role: "system";
1422
- content: string;
1423
- } | undefined;
1424
- files?: any[] | undefined;
1425
- error?: string | undefined;
1426
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
1427
- finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
1428
- model?: string | undefined;
1429
- provider?: string | undefined;
1430
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1431
- sources?: {
1432
- providerOptions?: Record<string, Record<string, any>> | undefined;
1433
- title?: string | undefined;
1434
- id: string;
1435
- sourceType: "url";
1436
- url: string;
1437
- }[] | undefined;
1438
- reasoningDetails?: ({
1439
- signature?: string | undefined;
1440
- type: "text";
1441
- text: string;
1442
- } | {
1443
- type: "redacted";
1444
- data: string;
1445
- })[] | undefined;
1446
- usage?: {
1447
- promptTokens: number;
1448
- completionTokens: number;
1449
- totalTokens: number;
1450
- } | undefined;
1451
- warnings?: ({
1452
- details?: string | undefined;
1453
- type: "unsupported-setting";
1454
- setting: string;
1455
- } | {
1456
- details?: string | undefined;
1457
- type: "unsupported-tool";
1458
- tool: any;
1459
- } | {
1460
- type: "other";
1461
- message: string;
1462
- })[] | undefined;
1463
- userId?: string | undefined;
1464
- agentName?: string | undefined;
1465
- 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;
1466
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
1467
- stepId?: string | undefined;
1468
- tool: boolean;
1469
- threadId: import("convex/values").GenericId<"threads">;
1470
- status: "pending" | "success" | "failed";
1471
- order: number;
1472
- stepOrder: number;
1473
- };
1474
- fieldPaths: ("id" | "tool" | "text" | "providerOptions" | `providerOptions.${string}` | "reasoning" | "message" | "files" | "message.providerOptions" | `message.providerOptions.${string}` | "message.role" | "message.content" | "error" | "fileIds" | "finishReason" | "model" | "provider" | "providerMetadata" | "sources" | "reasoningDetails" | "usage" | "warnings" | `providerMetadata.${string}` | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "userId" | "threadId" | "status" | "order" | "stepOrder" | "agentName" | "_creationTime" | "embeddingId" | "parentMessageId" | "stepId") | "_id";
1475
- indexes: {
1476
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
1477
- embeddingId: ["embeddingId", "_creationTime"];
1478
- by_id: ["_id"];
1479
- by_creation_time: ["_creationTime"];
1480
- };
1481
- searchIndexes: {
1482
- text_search: {
1483
- searchField: "text";
1484
- filterFields: "userId" | "threadId";
1485
- };
1486
- };
1487
- vectorIndexes: {};
1488
- };
1489
- files: {
1490
- document: {
1491
- _id: import("convex/values").GenericId<"files">;
1492
- _creationTime: number;
1493
- filename?: string | undefined;
1494
- mimeType: string;
1495
- storageId: string;
1496
- hash: string;
1497
- refcount: number;
1498
- lastTouchedAt: number;
1499
- };
1500
- fieldPaths: ("mimeType" | "filename" | "_creationTime" | "storageId" | "hash" | "refcount" | "lastTouchedAt") | "_id";
1501
- indexes: {
1502
- hash: ["hash", "_creationTime"];
1503
- refcount: ["refcount", "_creationTime"];
1504
- by_id: ["_id"];
1505
- by_creation_time: ["_creationTime"];
1506
- };
1507
- searchIndexes: {};
1508
- vectorIndexes: {};
1509
- };
1510
1343
  threads: {
1511
1344
  document: {
1512
1345
  _id: import("convex/values").GenericId<"threads">;
1513
1346
  _creationTime: number;
1514
- title?: string | undefined;
1515
1347
  userId?: string | undefined;
1516
- order?: number | undefined;
1348
+ title?: string | undefined;
1517
1349
  summary?: string | undefined;
1518
1350
  defaultSystemPrompt?: string | undefined;
1519
1351
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1352
+ order?: number | undefined;
1520
1353
  status: "active" | "archived";
1521
1354
  };
1522
- fieldPaths: ("title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "_creationTime") | "_id";
1355
+ fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
1523
1356
  indexes: {
1524
1357
  userId: ["userId", "_creationTime"];
1525
1358
  by_id: ["_id"];
@@ -1537,10 +1370,10 @@ export declare const vv: {
1537
1370
  model_table_userId?: string[] | undefined;
1538
1371
  model_table_threadId?: string[] | undefined;
1539
1372
  model: string;
1540
- vector: number[];
1541
1373
  table: string;
1374
+ vector: number[];
1542
1375
  };
1543
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1376
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1544
1377
  indexes: {
1545
1378
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1546
1379
  by_id: ["_id"];
@@ -1564,10 +1397,10 @@ export declare const vv: {
1564
1397
  model_table_userId?: string[] | undefined;
1565
1398
  model_table_threadId?: string[] | undefined;
1566
1399
  model: string;
1567
- vector: number[];
1568
1400
  table: string;
1401
+ vector: number[];
1569
1402
  };
1570
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1403
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1571
1404
  indexes: {
1572
1405
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1573
1406
  by_id: ["_id"];
@@ -1591,10 +1424,10 @@ export declare const vv: {
1591
1424
  model_table_userId?: string[] | undefined;
1592
1425
  model_table_threadId?: string[] | undefined;
1593
1426
  model: string;
1594
- vector: number[];
1595
1427
  table: string;
1428
+ vector: number[];
1596
1429
  };
1597
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1430
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1598
1431
  indexes: {
1599
1432
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1600
1433
  by_id: ["_id"];
@@ -1618,10 +1451,10 @@ export declare const vv: {
1618
1451
  model_table_userId?: string[] | undefined;
1619
1452
  model_table_threadId?: string[] | undefined;
1620
1453
  model: string;
1621
- vector: number[];
1622
1454
  table: string;
1455
+ vector: number[];
1623
1456
  };
1624
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1457
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1625
1458
  indexes: {
1626
1459
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1627
1460
  by_id: ["_id"];
@@ -1645,10 +1478,10 @@ export declare const vv: {
1645
1478
  model_table_userId?: string[] | undefined;
1646
1479
  model_table_threadId?: string[] | undefined;
1647
1480
  model: string;
1648
- vector: number[];
1649
1481
  table: string;
1482
+ vector: number[];
1650
1483
  };
1651
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1484
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1652
1485
  indexes: {
1653
1486
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1654
1487
  by_id: ["_id"];
@@ -1672,10 +1505,10 @@ export declare const vv: {
1672
1505
  model_table_userId?: string[] | undefined;
1673
1506
  model_table_threadId?: string[] | undefined;
1674
1507
  model: string;
1675
- vector: number[];
1676
1508
  table: string;
1509
+ vector: number[];
1677
1510
  };
1678
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1511
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1679
1512
  indexes: {
1680
1513
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1681
1514
  by_id: ["_id"];
@@ -1699,10 +1532,10 @@ export declare const vv: {
1699
1532
  model_table_userId?: string[] | undefined;
1700
1533
  model_table_threadId?: string[] | undefined;
1701
1534
  model: string;
1702
- vector: number[];
1703
1535
  table: string;
1536
+ vector: number[];
1704
1537
  };
1705
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1538
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1706
1539
  indexes: {
1707
1540
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1708
1541
  by_id: ["_id"];
@@ -1726,10 +1559,10 @@ export declare const vv: {
1726
1559
  model_table_userId?: string[] | undefined;
1727
1560
  model_table_threadId?: string[] | undefined;
1728
1561
  model: string;
1729
- vector: number[];
1730
1562
  table: string;
1563
+ vector: number[];
1731
1564
  };
1732
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1565
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1733
1566
  indexes: {
1734
1567
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1735
1568
  by_id: ["_id"];
@@ -1753,10 +1586,10 @@ export declare const vv: {
1753
1586
  model_table_userId?: string[] | undefined;
1754
1587
  model_table_threadId?: string[] | undefined;
1755
1588
  model: string;
1756
- vector: number[];
1757
1589
  table: string;
1590
+ vector: number[];
1758
1591
  };
1759
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1592
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1760
1593
  indexes: {
1761
1594
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1762
1595
  by_id: ["_id"];
@@ -1780,10 +1613,10 @@ export declare const vv: {
1780
1613
  model_table_userId?: string[] | undefined;
1781
1614
  model_table_threadId?: string[] | undefined;
1782
1615
  model: string;
1783
- vector: number[];
1784
1616
  table: string;
1617
+ vector: number[];
1785
1618
  };
1786
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1619
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1787
1620
  indexes: {
1788
1621
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1789
1622
  by_id: ["_id"];
@@ -1798,148 +1631,41 @@ export declare const vv: {
1798
1631
  };
1799
1632
  };
1800
1633
  };
1801
- streamingMessages: {
1802
- document: {
1803
- _id: import("convex/values").GenericId<"streamingMessages">;
1804
- _creationTime: number;
1805
- providerOptions?: Record<string, Record<string, any>> | undefined;
1806
- model?: string | undefined;
1807
- provider?: string | undefined;
1808
- userId?: string | undefined;
1809
- agentName?: string | undefined;
1810
- threadId: import("convex/values").GenericId<"threads">;
1811
- order: number;
1812
- stepOrder: number;
1813
- state: {
1814
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1815
- kind: "streaming";
1816
- lastHeartbeat: number;
1817
- } | {
1818
- kind: "finished";
1819
- endedAt: number;
1820
- } | {
1821
- kind: "aborted";
1822
- reason: string;
1823
- };
1824
- };
1825
- fieldPaths: ("providerOptions" | `providerOptions.${string}` | "model" | "provider" | "userId" | "threadId" | "order" | "stepOrder" | "agentName" | "_creationTime" | "state" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason") | "_id";
1826
- indexes: {
1827
- threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
1828
- by_id: ["_id"];
1829
- by_creation_time: ["_creationTime"];
1830
- };
1831
- searchIndexes: {};
1832
- vectorIndexes: {};
1833
- };
1834
- streamDeltas: {
1835
- document: {
1836
- _id: import("convex/values").GenericId<"streamDeltas">;
1837
- _creationTime: number;
1838
- streamId: import("convex/values").GenericId<"streamingMessages">;
1839
- start: number;
1840
- end: number;
1841
- parts: ({
1842
- providerOptions?: Record<string, Record<string, any>> | undefined;
1843
- type: "tool-call";
1844
- toolCallId: string;
1845
- toolName: string;
1846
- args: any;
1847
- } | {
1848
- providerOptions?: Record<string, Record<string, any>> | undefined;
1849
- args?: any;
1850
- experimental_content?: ({
1851
- type: "text";
1852
- text: string;
1853
- } | {
1854
- mimeType?: string | undefined;
1855
- type: "image";
1856
- data: string;
1857
- })[] | undefined;
1858
- isError?: boolean | undefined;
1859
- type: "tool-result";
1860
- toolCallId: string;
1861
- toolName: string;
1862
- result: any;
1863
- } | {
1864
- type: "text-delta";
1865
- textDelta: string;
1866
- } | {
1867
- type: "reasoning";
1868
- textDelta: string;
1869
- } | {
1870
- type: "source";
1871
- source: {
1872
- providerOptions?: Record<string, Record<string, any>> | undefined;
1873
- title?: string | undefined;
1874
- id: string;
1875
- sourceType: "url";
1876
- url: string;
1877
- };
1878
- } | {
1879
- type: "tool-call-streaming-start";
1880
- toolCallId: string;
1881
- toolName: string;
1882
- } | {
1883
- type: "tool-call-delta";
1884
- toolCallId: string;
1885
- toolName: string;
1886
- argsTextDelta: string;
1887
- })[];
1888
- };
1889
- fieldPaths: ("streamId" | "start" | "end" | "parts" | "_creationTime") | "_id";
1890
- indexes: {
1891
- streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1892
- by_id: ["_id"];
1893
- by_creation_time: ["_creationTime"];
1894
- };
1895
- searchIndexes: {};
1896
- vectorIndexes: {};
1897
- };
1898
- memories: {
1899
- document: {
1900
- _id: import("convex/values").GenericId<"memories">;
1901
- _creationTime: number;
1902
- userId?: string | undefined;
1903
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
1904
- 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;
1905
- memory: string;
1906
- };
1907
- fieldPaths: ("userId" | "threadId" | "_creationTime" | "embeddingId" | "memory") | "_id";
1908
- indexes: {
1909
- threadId: ["threadId", "_creationTime"];
1910
- userId: ["userId", "_creationTime"];
1911
- embeddingId: ["embeddingId", "_creationTime"];
1912
- by_id: ["_id"];
1913
- by_creation_time: ["_creationTime"];
1914
- };
1915
- searchIndexes: {};
1916
- vectorIndexes: {};
1917
- };
1918
- apiKeys: {
1634
+ files: {
1919
1635
  document: {
1920
- _id: import("convex/values").GenericId<"apiKeys">;
1636
+ _id: import("convex/values").GenericId<"files">;
1921
1637
  _creationTime: number;
1922
- name?: string | undefined;
1638
+ filename?: string | undefined;
1639
+ mimeType: string;
1640
+ storageId: string;
1641
+ hash: string;
1642
+ refcount: number;
1643
+ lastTouchedAt: number;
1923
1644
  };
1924
- fieldPaths: ("_creationTime" | "name") | "_id";
1645
+ fieldPaths: "_id" | ("_creationTime" | "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt");
1925
1646
  indexes: {
1926
- name: ["name", "_creationTime"];
1647
+ hash: ["hash", "_creationTime"];
1648
+ refcount: ["refcount", "_creationTime"];
1927
1649
  by_id: ["_id"];
1928
1650
  by_creation_time: ["_creationTime"];
1929
1651
  };
1930
1652
  searchIndexes: {};
1931
1653
  vectorIndexes: {};
1932
1654
  };
1933
- }>>(tableName: TableName) => import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
1934
- doc: <TableName extends import("convex/server").TableNamesInDataModel<{
1935
1655
  messages: {
1936
1656
  document: {
1937
1657
  _id: import("convex/values").GenericId<"messages">;
1938
1658
  _creationTime: number;
1939
1659
  id?: string | undefined;
1940
- text?: string | undefined;
1660
+ userId?: string | undefined;
1661
+ 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;
1662
+ fileIds?: import("convex/values").GenericId<"files">[] | undefined;
1663
+ files?: any[] | undefined;
1664
+ error?: string | undefined;
1665
+ agentName?: string | undefined;
1666
+ model?: string | undefined;
1667
+ provider?: string | undefined;
1941
1668
  providerOptions?: Record<string, Record<string, any>> | undefined;
1942
- reasoning?: string | undefined;
1943
1669
  message?: {
1944
1670
  providerOptions?: Record<string, Record<string, any>> | undefined;
1945
1671
  role: "user";
@@ -2013,16 +1739,17 @@ export declare const vv: {
2013
1739
  role: "system";
2014
1740
  content: string;
2015
1741
  } | undefined;
2016
- files?: any[] | undefined;
2017
- error?: string | undefined;
2018
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2019
- finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
2020
- model?: string | undefined;
2021
- provider?: string | undefined;
1742
+ text?: string | undefined;
1743
+ reasoning?: string | undefined;
1744
+ usage?: {
1745
+ promptTokens: number;
1746
+ completionTokens: number;
1747
+ totalTokens: number;
1748
+ } | undefined;
2022
1749
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2023
1750
  sources?: {
2024
- providerOptions?: Record<string, Record<string, any>> | undefined;
2025
1751
  title?: string | undefined;
1752
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2026
1753
  id: string;
2027
1754
  sourceType: "url";
2028
1755
  url: string;
@@ -2035,11 +1762,6 @@ export declare const vv: {
2035
1762
  type: "redacted";
2036
1763
  data: string;
2037
1764
  })[] | undefined;
2038
- usage?: {
2039
- promptTokens: number;
2040
- completionTokens: number;
2041
- totalTokens: number;
2042
- } | undefined;
2043
1765
  warnings?: ({
2044
1766
  details?: string | undefined;
2045
1767
  type: "unsupported-setting";
@@ -2052,18 +1774,16 @@ export declare const vv: {
2052
1774
  type: "other";
2053
1775
  message: string;
2054
1776
  })[] | undefined;
2055
- userId?: string | undefined;
2056
- agentName?: string | undefined;
2057
- 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;
1777
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2058
1778
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2059
1779
  stepId?: string | undefined;
2060
- tool: boolean;
2061
- threadId: import("convex/values").GenericId<"threads">;
2062
1780
  status: "pending" | "success" | "failed";
2063
1781
  order: number;
1782
+ threadId: import("convex/values").GenericId<"threads">;
2064
1783
  stepOrder: number;
1784
+ tool: boolean;
2065
1785
  };
2066
- fieldPaths: ("id" | "tool" | "text" | "providerOptions" | `providerOptions.${string}` | "reasoning" | "message" | "files" | "message.providerOptions" | `message.providerOptions.${string}` | "message.role" | "message.content" | "error" | "fileIds" | "finishReason" | "model" | "provider" | "providerMetadata" | "sources" | "reasoningDetails" | "usage" | "warnings" | `providerMetadata.${string}` | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "userId" | "threadId" | "status" | "order" | "stepOrder" | "agentName" | "_creationTime" | "embeddingId" | "parentMessageId" | "stepId") | "_id";
1786
+ 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" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`);
2067
1787
  indexes: {
2068
1788
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2069
1789
  embeddingId: ["embeddingId", "_creationTime"];
@@ -2078,40 +1798,153 @@ export declare const vv: {
2078
1798
  };
2079
1799
  vectorIndexes: {};
2080
1800
  };
2081
- files: {
1801
+ streamingMessages: {
2082
1802
  document: {
2083
- _id: import("convex/values").GenericId<"files">;
1803
+ _id: import("convex/values").GenericId<"streamingMessages">;
2084
1804
  _creationTime: number;
2085
- filename?: string | undefined;
2086
- mimeType: string;
2087
- storageId: string;
2088
- hash: string;
2089
- refcount: number;
2090
- lastTouchedAt: number;
1805
+ userId?: string | undefined;
1806
+ agentName?: string | undefined;
1807
+ model?: string | undefined;
1808
+ provider?: string | undefined;
1809
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1810
+ order: number;
1811
+ threadId: import("convex/values").GenericId<"threads">;
1812
+ stepOrder: number;
1813
+ state: {
1814
+ timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1815
+ kind: "streaming";
1816
+ lastHeartbeat: number;
1817
+ } | {
1818
+ kind: "finished";
1819
+ endedAt: number;
1820
+ } | {
1821
+ error: string;
1822
+ kind: "error";
1823
+ };
2091
1824
  };
2092
- fieldPaths: ("mimeType" | "filename" | "_creationTime" | "storageId" | "hash" | "refcount" | "lastTouchedAt") | "_id";
1825
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt");
2093
1826
  indexes: {
2094
- hash: ["hash", "_creationTime"];
2095
- refcount: ["refcount", "_creationTime"];
1827
+ threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
1828
+ by_id: ["_id"];
1829
+ by_creation_time: ["_creationTime"];
1830
+ };
1831
+ searchIndexes: {};
1832
+ vectorIndexes: {};
1833
+ };
1834
+ streamDeltas: {
1835
+ document: {
1836
+ _id: import("convex/values").GenericId<"streamDeltas">;
1837
+ _creationTime: number;
1838
+ streamId: import("convex/values").GenericId<"streamingMessages">;
1839
+ start: number;
1840
+ end: number;
1841
+ parts: ({
1842
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1843
+ type: "tool-call";
1844
+ toolCallId: string;
1845
+ toolName: string;
1846
+ args: any;
1847
+ } | {
1848
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1849
+ args?: any;
1850
+ experimental_content?: ({
1851
+ type: "text";
1852
+ text: string;
1853
+ } | {
1854
+ mimeType?: string | undefined;
1855
+ type: "image";
1856
+ data: string;
1857
+ })[] | undefined;
1858
+ isError?: boolean | undefined;
1859
+ type: "tool-result";
1860
+ toolCallId: string;
1861
+ toolName: string;
1862
+ result: any;
1863
+ } | {
1864
+ type: "text-delta";
1865
+ textDelta: string;
1866
+ } | {
1867
+ type: "reasoning";
1868
+ textDelta: string;
1869
+ } | {
1870
+ type: "source";
1871
+ source: {
1872
+ title?: string | undefined;
1873
+ providerOptions?: Record<string, Record<string, any>> | undefined;
1874
+ id: string;
1875
+ sourceType: "url";
1876
+ url: string;
1877
+ };
1878
+ } | {
1879
+ type: "tool-call-streaming-start";
1880
+ toolCallId: string;
1881
+ toolName: string;
1882
+ } | {
1883
+ type: "tool-call-delta";
1884
+ toolCallId: string;
1885
+ toolName: string;
1886
+ argsTextDelta: string;
1887
+ })[];
1888
+ };
1889
+ fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
1890
+ indexes: {
1891
+ streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1892
+ by_id: ["_id"];
1893
+ by_creation_time: ["_creationTime"];
1894
+ };
1895
+ searchIndexes: {};
1896
+ vectorIndexes: {};
1897
+ };
1898
+ memories: {
1899
+ document: {
1900
+ _id: import("convex/values").GenericId<"memories">;
1901
+ _creationTime: number;
1902
+ userId?: string | undefined;
1903
+ threadId?: import("convex/values").GenericId<"threads"> | undefined;
1904
+ 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;
1905
+ memory: string;
1906
+ };
1907
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "embeddingId" | "memory");
1908
+ indexes: {
1909
+ threadId: ["threadId", "_creationTime"];
1910
+ userId: ["userId", "_creationTime"];
1911
+ embeddingId: ["embeddingId", "_creationTime"];
1912
+ by_id: ["_id"];
1913
+ by_creation_time: ["_creationTime"];
1914
+ };
1915
+ searchIndexes: {};
1916
+ vectorIndexes: {};
1917
+ };
1918
+ apiKeys: {
1919
+ document: {
1920
+ _id: import("convex/values").GenericId<"apiKeys">;
1921
+ _creationTime: number;
1922
+ name?: string | undefined;
1923
+ };
1924
+ fieldPaths: "_id" | ("_creationTime" | "name");
1925
+ indexes: {
1926
+ name: ["name", "_creationTime"];
2096
1927
  by_id: ["_id"];
2097
1928
  by_creation_time: ["_creationTime"];
2098
1929
  };
2099
1930
  searchIndexes: {};
2100
1931
  vectorIndexes: {};
2101
1932
  };
1933
+ }>>(tableName: TableName) => import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
1934
+ doc: <TableName extends import("convex/server").TableNamesInDataModel<{
2102
1935
  threads: {
2103
1936
  document: {
2104
1937
  _id: import("convex/values").GenericId<"threads">;
2105
1938
  _creationTime: number;
2106
- title?: string | undefined;
2107
1939
  userId?: string | undefined;
2108
- order?: number | undefined;
1940
+ title?: string | undefined;
2109
1941
  summary?: string | undefined;
2110
1942
  defaultSystemPrompt?: string | undefined;
2111
1943
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1944
+ order?: number | undefined;
2112
1945
  status: "active" | "archived";
2113
1946
  };
2114
- fieldPaths: ("title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "_creationTime") | "_id";
1947
+ fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
2115
1948
  indexes: {
2116
1949
  userId: ["userId", "_creationTime"];
2117
1950
  by_id: ["_id"];
@@ -2129,10 +1962,10 @@ export declare const vv: {
2129
1962
  model_table_userId?: string[] | undefined;
2130
1963
  model_table_threadId?: string[] | undefined;
2131
1964
  model: string;
2132
- vector: number[];
2133
1965
  table: string;
1966
+ vector: number[];
2134
1967
  };
2135
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1968
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2136
1969
  indexes: {
2137
1970
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2138
1971
  by_id: ["_id"];
@@ -2156,10 +1989,10 @@ export declare const vv: {
2156
1989
  model_table_userId?: string[] | undefined;
2157
1990
  model_table_threadId?: string[] | undefined;
2158
1991
  model: string;
2159
- vector: number[];
2160
1992
  table: string;
1993
+ vector: number[];
2161
1994
  };
2162
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1995
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2163
1996
  indexes: {
2164
1997
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2165
1998
  by_id: ["_id"];
@@ -2183,10 +2016,10 @@ export declare const vv: {
2183
2016
  model_table_userId?: string[] | undefined;
2184
2017
  model_table_threadId?: string[] | undefined;
2185
2018
  model: string;
2186
- vector: number[];
2187
2019
  table: string;
2020
+ vector: number[];
2188
2021
  };
2189
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2022
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2190
2023
  indexes: {
2191
2024
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2192
2025
  by_id: ["_id"];
@@ -2210,10 +2043,10 @@ export declare const vv: {
2210
2043
  model_table_userId?: string[] | undefined;
2211
2044
  model_table_threadId?: string[] | undefined;
2212
2045
  model: string;
2213
- vector: number[];
2214
2046
  table: string;
2047
+ vector: number[];
2215
2048
  };
2216
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2049
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2217
2050
  indexes: {
2218
2051
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2219
2052
  by_id: ["_id"];
@@ -2237,10 +2070,10 @@ export declare const vv: {
2237
2070
  model_table_userId?: string[] | undefined;
2238
2071
  model_table_threadId?: string[] | undefined;
2239
2072
  model: string;
2240
- vector: number[];
2241
2073
  table: string;
2074
+ vector: number[];
2242
2075
  };
2243
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2076
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2244
2077
  indexes: {
2245
2078
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2246
2079
  by_id: ["_id"];
@@ -2264,10 +2097,10 @@ export declare const vv: {
2264
2097
  model_table_userId?: string[] | undefined;
2265
2098
  model_table_threadId?: string[] | undefined;
2266
2099
  model: string;
2267
- vector: number[];
2268
2100
  table: string;
2101
+ vector: number[];
2269
2102
  };
2270
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2103
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2271
2104
  indexes: {
2272
2105
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2273
2106
  by_id: ["_id"];
@@ -2291,10 +2124,10 @@ export declare const vv: {
2291
2124
  model_table_userId?: string[] | undefined;
2292
2125
  model_table_threadId?: string[] | undefined;
2293
2126
  model: string;
2294
- vector: number[];
2295
2127
  table: string;
2128
+ vector: number[];
2296
2129
  };
2297
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2130
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2298
2131
  indexes: {
2299
2132
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2300
2133
  by_id: ["_id"];
@@ -2318,10 +2151,10 @@ export declare const vv: {
2318
2151
  model_table_userId?: string[] | undefined;
2319
2152
  model_table_threadId?: string[] | undefined;
2320
2153
  model: string;
2321
- vector: number[];
2322
2154
  table: string;
2155
+ vector: number[];
2323
2156
  };
2324
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2157
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2325
2158
  indexes: {
2326
2159
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2327
2160
  by_id: ["_id"];
@@ -2345,10 +2178,10 @@ export declare const vv: {
2345
2178
  model_table_userId?: string[] | undefined;
2346
2179
  model_table_threadId?: string[] | undefined;
2347
2180
  model: string;
2348
- vector: number[];
2349
2181
  table: string;
2182
+ vector: number[];
2350
2183
  };
2351
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2184
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2352
2185
  indexes: {
2353
2186
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2354
2187
  by_id: ["_id"];
@@ -2372,35 +2205,202 @@ export declare const vv: {
2372
2205
  model_table_userId?: string[] | undefined;
2373
2206
  model_table_threadId?: string[] | undefined;
2374
2207
  model: string;
2375
- vector: number[];
2376
2208
  table: string;
2209
+ vector: number[];
2210
+ };
2211
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2212
+ indexes: {
2213
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2214
+ by_id: ["_id"];
2215
+ by_creation_time: ["_creationTime"];
2216
+ };
2217
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
2218
+ vectorIndexes: {
2219
+ vector: {
2220
+ vectorField: "vector";
2221
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2222
+ filterFields: "model_table_userId" | "model_table_threadId";
2223
+ };
2224
+ };
2225
+ };
2226
+ files: {
2227
+ document: {
2228
+ _id: import("convex/values").GenericId<"files">;
2229
+ _creationTime: number;
2230
+ filename?: string | undefined;
2231
+ mimeType: string;
2232
+ storageId: string;
2233
+ hash: string;
2234
+ refcount: number;
2235
+ lastTouchedAt: number;
2236
+ };
2237
+ fieldPaths: "_id" | ("_creationTime" | "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt");
2238
+ indexes: {
2239
+ hash: ["hash", "_creationTime"];
2240
+ refcount: ["refcount", "_creationTime"];
2241
+ by_id: ["_id"];
2242
+ by_creation_time: ["_creationTime"];
2243
+ };
2244
+ searchIndexes: {};
2245
+ vectorIndexes: {};
2246
+ };
2247
+ messages: {
2248
+ document: {
2249
+ _id: import("convex/values").GenericId<"messages">;
2250
+ _creationTime: number;
2251
+ id?: string | undefined;
2252
+ userId?: string | undefined;
2253
+ 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;
2254
+ fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2255
+ files?: any[] | undefined;
2256
+ error?: string | undefined;
2257
+ agentName?: string | undefined;
2258
+ model?: string | undefined;
2259
+ provider?: string | undefined;
2260
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2261
+ message?: {
2262
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2263
+ role: "user";
2264
+ content: string | ({
2265
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2266
+ type: "text";
2267
+ text: string;
2268
+ } | {
2269
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2270
+ mimeType?: string | undefined;
2271
+ type: "image";
2272
+ image: string | ArrayBuffer;
2273
+ } | {
2274
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2275
+ filename?: string | undefined;
2276
+ type: "file";
2277
+ mimeType: string;
2278
+ data: string | ArrayBuffer;
2279
+ })[];
2280
+ } | {
2281
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2282
+ role: "assistant";
2283
+ content: string | ({
2284
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2285
+ type: "text";
2286
+ text: string;
2287
+ } | {
2288
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2289
+ filename?: string | undefined;
2290
+ type: "file";
2291
+ mimeType: string;
2292
+ data: string | ArrayBuffer;
2293
+ } | {
2294
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2295
+ signature?: string | undefined;
2296
+ type: "reasoning";
2297
+ text: string;
2298
+ } | {
2299
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2300
+ type: "redacted-reasoning";
2301
+ data: string;
2302
+ } | {
2303
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2304
+ type: "tool-call";
2305
+ toolCallId: string;
2306
+ toolName: string;
2307
+ args: any;
2308
+ })[];
2309
+ } | {
2310
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2311
+ role: "tool";
2312
+ content: {
2313
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2314
+ args?: any;
2315
+ experimental_content?: ({
2316
+ type: "text";
2317
+ text: string;
2318
+ } | {
2319
+ mimeType?: string | undefined;
2320
+ type: "image";
2321
+ data: string;
2322
+ })[] | undefined;
2323
+ isError?: boolean | undefined;
2324
+ type: "tool-result";
2325
+ toolCallId: string;
2326
+ toolName: string;
2327
+ result: any;
2328
+ }[];
2329
+ } | {
2330
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2331
+ role: "system";
2332
+ content: string;
2333
+ } | undefined;
2334
+ text?: string | undefined;
2335
+ reasoning?: string | undefined;
2336
+ usage?: {
2337
+ promptTokens: number;
2338
+ completionTokens: number;
2339
+ totalTokens: number;
2340
+ } | undefined;
2341
+ providerMetadata?: Record<string, Record<string, any>> | undefined;
2342
+ sources?: {
2343
+ title?: string | undefined;
2344
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2345
+ id: string;
2346
+ sourceType: "url";
2347
+ url: string;
2348
+ }[] | undefined;
2349
+ reasoningDetails?: ({
2350
+ signature?: string | undefined;
2351
+ type: "text";
2352
+ text: string;
2353
+ } | {
2354
+ type: "redacted";
2355
+ data: string;
2356
+ })[] | undefined;
2357
+ warnings?: ({
2358
+ details?: string | undefined;
2359
+ type: "unsupported-setting";
2360
+ setting: string;
2361
+ } | {
2362
+ details?: string | undefined;
2363
+ type: "unsupported-tool";
2364
+ tool: any;
2365
+ } | {
2366
+ type: "other";
2367
+ message: string;
2368
+ })[] | undefined;
2369
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2370
+ parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2371
+ stepId?: string | undefined;
2372
+ status: "pending" | "success" | "failed";
2373
+ order: number;
2374
+ threadId: import("convex/values").GenericId<"threads">;
2375
+ stepOrder: number;
2376
+ tool: boolean;
2377
2377
  };
2378
- fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2378
+ 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" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`);
2379
2379
  indexes: {
2380
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2380
+ threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2381
+ embeddingId: ["embeddingId", "_creationTime"];
2381
2382
  by_id: ["_id"];
2382
2383
  by_creation_time: ["_creationTime"];
2383
2384
  };
2384
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2385
- vectorIndexes: {
2386
- vector: {
2387
- vectorField: "vector";
2388
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2389
- filterFields: "model_table_userId" | "model_table_threadId";
2385
+ searchIndexes: {
2386
+ text_search: {
2387
+ searchField: "text";
2388
+ filterFields: "userId" | "threadId";
2390
2389
  };
2391
2390
  };
2391
+ vectorIndexes: {};
2392
2392
  };
2393
2393
  streamingMessages: {
2394
2394
  document: {
2395
2395
  _id: import("convex/values").GenericId<"streamingMessages">;
2396
2396
  _creationTime: number;
2397
- providerOptions?: Record<string, Record<string, any>> | undefined;
2398
- model?: string | undefined;
2399
- provider?: string | undefined;
2400
2397
  userId?: string | undefined;
2401
2398
  agentName?: string | undefined;
2402
- threadId: import("convex/values").GenericId<"threads">;
2399
+ model?: string | undefined;
2400
+ provider?: string | undefined;
2401
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2403
2402
  order: number;
2403
+ threadId: import("convex/values").GenericId<"threads">;
2404
2404
  stepOrder: number;
2405
2405
  state: {
2406
2406
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
@@ -2410,11 +2410,11 @@ export declare const vv: {
2410
2410
  kind: "finished";
2411
2411
  endedAt: number;
2412
2412
  } | {
2413
- kind: "aborted";
2414
- reason: string;
2413
+ error: string;
2414
+ kind: "error";
2415
2415
  };
2416
2416
  };
2417
- fieldPaths: ("providerOptions" | `providerOptions.${string}` | "model" | "provider" | "userId" | "threadId" | "order" | "stepOrder" | "agentName" | "_creationTime" | "state" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason") | "_id";
2417
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt");
2418
2418
  indexes: {
2419
2419
  threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
2420
2420
  by_id: ["_id"];
@@ -2461,8 +2461,8 @@ export declare const vv: {
2461
2461
  } | {
2462
2462
  type: "source";
2463
2463
  source: {
2464
- providerOptions?: Record<string, Record<string, any>> | undefined;
2465
2464
  title?: string | undefined;
2465
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2466
2466
  id: string;
2467
2467
  sourceType: "url";
2468
2468
  url: string;
@@ -2478,7 +2478,7 @@ export declare const vv: {
2478
2478
  argsTextDelta: string;
2479
2479
  })[];
2480
2480
  };
2481
- fieldPaths: ("streamId" | "start" | "end" | "parts" | "_creationTime") | "_id";
2481
+ fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
2482
2482
  indexes: {
2483
2483
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
2484
2484
  by_id: ["_id"];
@@ -2496,7 +2496,7 @@ export declare const vv: {
2496
2496
  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;
2497
2497
  memory: string;
2498
2498
  };
2499
- fieldPaths: ("userId" | "threadId" | "_creationTime" | "embeddingId" | "memory") | "_id";
2499
+ fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "embeddingId" | "memory");
2500
2500
  indexes: {
2501
2501
  threadId: ["threadId", "_creationTime"];
2502
2502
  userId: ["userId", "_creationTime"];
@@ -2513,7 +2513,7 @@ export declare const vv: {
2513
2513
  _creationTime: number;
2514
2514
  name?: string | undefined;
2515
2515
  };
2516
- fieldPaths: ("_creationTime" | "name") | "_id";
2516
+ fieldPaths: "_id" | ("_creationTime" | "name");
2517
2517
  indexes: {
2518
2518
  name: ["name", "_creationTime"];
2519
2519
  by_id: ["_id"];
@@ -2536,8 +2536,8 @@ export declare const vv: {
2536
2536
  model_table_userId?: string[] | undefined;
2537
2537
  model_table_threadId?: string[] | undefined;
2538
2538
  model: string;
2539
- vector: number[];
2540
2539
  table: string;
2540
+ vector: number[];
2541
2541
  }, {
2542
2542
  model: import("convex/values").VString<string, "required">;
2543
2543
  table: import("convex/values").VString<string, "required">;
@@ -2546,7 +2546,7 @@ export declare const vv: {
2546
2546
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2547
2547
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2548
2548
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2549
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2549
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2550
2550
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2551
2551
  }, import("convex/server").GenericTableSearchIndexes, {
2552
2552
  vector: {
@@ -2561,8 +2561,8 @@ export declare const vv: {
2561
2561
  model_table_userId?: string[] | undefined;
2562
2562
  model_table_threadId?: string[] | undefined;
2563
2563
  model: string;
2564
- vector: number[];
2565
2564
  table: string;
2565
+ vector: number[];
2566
2566
  }, {
2567
2567
  model: import("convex/values").VString<string, "required">;
2568
2568
  table: import("convex/values").VString<string, "required">;
@@ -2571,7 +2571,7 @@ export declare const vv: {
2571
2571
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2572
2572
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2573
2573
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2574
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2574
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2575
2575
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2576
2576
  }, import("convex/server").GenericTableSearchIndexes, {
2577
2577
  vector: {
@@ -2586,8 +2586,8 @@ export declare const vv: {
2586
2586
  model_table_userId?: string[] | undefined;
2587
2587
  model_table_threadId?: string[] | undefined;
2588
2588
  model: string;
2589
- vector: number[];
2590
2589
  table: string;
2590
+ vector: number[];
2591
2591
  }, {
2592
2592
  model: import("convex/values").VString<string, "required">;
2593
2593
  table: import("convex/values").VString<string, "required">;
@@ -2596,7 +2596,7 @@ export declare const vv: {
2596
2596
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2597
2597
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2598
2598
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2599
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2599
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2600
2600
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2601
2601
  }, import("convex/server").GenericTableSearchIndexes, {
2602
2602
  vector: {
@@ -2611,8 +2611,8 @@ export declare const vv: {
2611
2611
  model_table_userId?: string[] | undefined;
2612
2612
  model_table_threadId?: string[] | undefined;
2613
2613
  model: string;
2614
- vector: number[];
2615
2614
  table: string;
2615
+ vector: number[];
2616
2616
  }, {
2617
2617
  model: import("convex/values").VString<string, "required">;
2618
2618
  table: import("convex/values").VString<string, "required">;
@@ -2621,7 +2621,7 @@ export declare const vv: {
2621
2621
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2622
2622
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2623
2623
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2624
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2624
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2625
2625
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2626
2626
  }, import("convex/server").GenericTableSearchIndexes, {
2627
2627
  vector: {
@@ -2636,8 +2636,8 @@ export declare const vv: {
2636
2636
  model_table_userId?: string[] | undefined;
2637
2637
  model_table_threadId?: string[] | undefined;
2638
2638
  model: string;
2639
- vector: number[];
2640
2639
  table: string;
2640
+ vector: number[];
2641
2641
  }, {
2642
2642
  model: import("convex/values").VString<string, "required">;
2643
2643
  table: import("convex/values").VString<string, "required">;
@@ -2646,7 +2646,7 @@ export declare const vv: {
2646
2646
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2647
2647
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2648
2648
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2649
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2649
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2650
2650
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2651
2651
  }, import("convex/server").GenericTableSearchIndexes, {
2652
2652
  vector: {
@@ -2661,8 +2661,8 @@ export declare const vv: {
2661
2661
  model_table_userId?: string[] | undefined;
2662
2662
  model_table_threadId?: string[] | undefined;
2663
2663
  model: string;
2664
- vector: number[];
2665
2664
  table: string;
2665
+ vector: number[];
2666
2666
  }, {
2667
2667
  model: import("convex/values").VString<string, "required">;
2668
2668
  table: import("convex/values").VString<string, "required">;
@@ -2671,7 +2671,7 @@ export declare const vv: {
2671
2671
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2672
2672
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2673
2673
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2674
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2674
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2675
2675
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2676
2676
  }, import("convex/server").GenericTableSearchIndexes, {
2677
2677
  vector: {
@@ -2686,8 +2686,8 @@ export declare const vv: {
2686
2686
  model_table_userId?: string[] | undefined;
2687
2687
  model_table_threadId?: string[] | undefined;
2688
2688
  model: string;
2689
- vector: number[];
2690
2689
  table: string;
2690
+ vector: number[];
2691
2691
  }, {
2692
2692
  model: import("convex/values").VString<string, "required">;
2693
2693
  table: import("convex/values").VString<string, "required">;
@@ -2696,7 +2696,7 @@ export declare const vv: {
2696
2696
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2697
2697
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2698
2698
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2699
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2699
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2700
2700
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2701
2701
  }, import("convex/server").GenericTableSearchIndexes, {
2702
2702
  vector: {
@@ -2711,8 +2711,8 @@ export declare const vv: {
2711
2711
  model_table_userId?: string[] | undefined;
2712
2712
  model_table_threadId?: string[] | undefined;
2713
2713
  model: string;
2714
- vector: number[];
2715
2714
  table: string;
2715
+ vector: number[];
2716
2716
  }, {
2717
2717
  model: import("convex/values").VString<string, "required">;
2718
2718
  table: import("convex/values").VString<string, "required">;
@@ -2721,7 +2721,7 @@ export declare const vv: {
2721
2721
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2722
2722
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2723
2723
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2724
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2724
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2725
2725
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2726
2726
  }, import("convex/server").GenericTableSearchIndexes, {
2727
2727
  vector: {
@@ -2736,8 +2736,8 @@ export declare const vv: {
2736
2736
  model_table_userId?: string[] | undefined;
2737
2737
  model_table_threadId?: string[] | undefined;
2738
2738
  model: string;
2739
- vector: number[];
2740
2739
  table: string;
2740
+ vector: number[];
2741
2741
  }, {
2742
2742
  model: import("convex/values").VString<string, "required">;
2743
2743
  table: import("convex/values").VString<string, "required">;
@@ -2746,7 +2746,7 @@ export declare const vv: {
2746
2746
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2747
2747
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2748
2748
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2749
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2749
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2750
2750
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2751
2751
  }, import("convex/server").GenericTableSearchIndexes, {
2752
2752
  vector: {
@@ -2761,8 +2761,8 @@ export declare const vv: {
2761
2761
  model_table_userId?: string[] | undefined;
2762
2762
  model_table_threadId?: string[] | undefined;
2763
2763
  model: string;
2764
- vector: number[];
2765
2764
  table: string;
2765
+ vector: number[];
2766
2766
  }, {
2767
2767
  model: import("convex/values").VString<string, "required">;
2768
2768
  table: import("convex/values").VString<string, "required">;
@@ -2771,7 +2771,7 @@ export declare const vv: {
2771
2771
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2772
2772
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2773
2773
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2774
- }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2774
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2775
2775
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2776
2776
  }, import("convex/server").GenericTableSearchIndexes, {
2777
2777
  vector: {
@@ -2781,12 +2781,12 @@ export declare const vv: {
2781
2781
  };
2782
2782
  }>;
2783
2783
  threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
2784
- title?: string | undefined;
2785
2784
  userId?: string | undefined;
2786
- order?: number | undefined;
2785
+ title?: string | undefined;
2787
2786
  summary?: string | undefined;
2788
2787
  defaultSystemPrompt?: string | undefined;
2789
2788
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
2789
+ order?: number | undefined;
2790
2790
  status: "active" | "archived";
2791
2791
  }, {
2792
2792
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -2796,14 +2796,20 @@ export declare const vv: {
2796
2796
  defaultSystemPrompt: import("convex/values").VString<string | undefined, "optional">;
2797
2797
  parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
2798
2798
  order: import("convex/values").VFloat64<number | undefined, "optional">;
2799
- }, "required", "title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds">, {
2799
+ }, "required", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
2800
2800
  userId: ["userId", "_creationTime"];
2801
2801
  }, {}, {}>;
2802
2802
  messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
2803
2803
  id?: string | undefined;
2804
- text?: string | undefined;
2804
+ userId?: string | undefined;
2805
+ 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;
2806
+ fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2807
+ files?: any[] | undefined;
2808
+ error?: string | undefined;
2809
+ agentName?: string | undefined;
2810
+ model?: string | undefined;
2811
+ provider?: string | undefined;
2805
2812
  providerOptions?: Record<string, Record<string, any>> | undefined;
2806
- reasoning?: string | undefined;
2807
2813
  message?: {
2808
2814
  providerOptions?: Record<string, Record<string, any>> | undefined;
2809
2815
  role: "user";
@@ -2877,16 +2883,17 @@ export declare const vv: {
2877
2883
  role: "system";
2878
2884
  content: string;
2879
2885
  } | undefined;
2880
- files?: any[] | undefined;
2881
- error?: string | undefined;
2882
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2883
- finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
2884
- model?: string | undefined;
2885
- provider?: string | undefined;
2886
+ text?: string | undefined;
2887
+ reasoning?: string | undefined;
2888
+ usage?: {
2889
+ promptTokens: number;
2890
+ completionTokens: number;
2891
+ totalTokens: number;
2892
+ } | undefined;
2886
2893
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2887
2894
  sources?: {
2888
- providerOptions?: Record<string, Record<string, any>> | undefined;
2889
2895
  title?: string | undefined;
2896
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2890
2897
  id: string;
2891
2898
  sourceType: "url";
2892
2899
  url: string;
@@ -2899,11 +2906,6 @@ export declare const vv: {
2899
2906
  type: "redacted";
2900
2907
  data: string;
2901
2908
  })[] | undefined;
2902
- usage?: {
2903
- promptTokens: number;
2904
- completionTokens: number;
2905
- totalTokens: number;
2906
- } | undefined;
2907
2909
  warnings?: ({
2908
2910
  details?: string | undefined;
2909
2911
  type: "unsupported-setting";
@@ -2916,16 +2918,14 @@ export declare const vv: {
2916
2918
  type: "other";
2917
2919
  message: string;
2918
2920
  })[] | undefined;
2919
- userId?: string | undefined;
2920
- agentName?: string | undefined;
2921
- 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;
2921
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2922
2922
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2923
2923
  stepId?: string | undefined;
2924
- tool: boolean;
2925
- threadId: import("convex/values").GenericId<"threads">;
2926
2924
  status: "pending" | "success" | "failed";
2927
2925
  order: number;
2926
+ threadId: import("convex/values").GenericId<"threads">;
2928
2927
  stepOrder: number;
2928
+ tool: boolean;
2929
2929
  }, {
2930
2930
  id: import("convex/values").VString<string | undefined, "optional">;
2931
2931
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -3086,7 +3086,7 @@ export declare const vv: {
3086
3086
  type: import("convex/values").VLiteral<"text", "required">;
3087
3087
  text: import("convex/values").VString<string, "required">;
3088
3088
  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>;
3089
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
3089
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3090
3090
  providerOptions?: Record<string, Record<string, any>> | undefined;
3091
3091
  mimeType?: string | undefined;
3092
3092
  type: "image";
@@ -3108,9 +3108,9 @@ export declare const vv: {
3108
3108
  filename: import("convex/values").VString<string | undefined, "optional">;
3109
3109
  mimeType: import("convex/values").VString<string, "required">;
3110
3110
  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>;
3111
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
3111
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
3112
3112
  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>;
3113
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
3113
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3114
3114
  providerOptions?: Record<string, Record<string, any>> | undefined;
3115
3115
  role: "assistant";
3116
3116
  content: string | ({
@@ -3224,7 +3224,7 @@ export declare const vv: {
3224
3224
  type: import("convex/values").VLiteral<"text", "required">;
3225
3225
  text: import("convex/values").VString<string, "required">;
3226
3226
  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>;
3227
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
3227
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3228
3228
  providerOptions?: Record<string, Record<string, any>> | undefined;
3229
3229
  filename?: string | undefined;
3230
3230
  type: "file";
@@ -3246,7 +3246,7 @@ export declare const vv: {
3246
3246
  text: import("convex/values").VString<string, "required">;
3247
3247
  signature: import("convex/values").VString<string | undefined, "optional">;
3248
3248
  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>;
3249
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
3249
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
3250
3250
  providerOptions?: Record<string, Record<string, any>> | undefined;
3251
3251
  type: "redacted-reasoning";
3252
3252
  data: string;
@@ -3266,9 +3266,9 @@ export declare const vv: {
3266
3266
  toolName: import("convex/values").VString<string, "required">;
3267
3267
  args: import("convex/values").VAny<any, "required", string>;
3268
3268
  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>;
3269
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
3269
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
3270
3270
  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>;
3271
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
3271
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3272
3272
  providerOptions?: Record<string, Record<string, any>> | undefined;
3273
3273
  role: "tool";
3274
3274
  content: {
@@ -3361,7 +3361,7 @@ export declare const vv: {
3361
3361
  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>;
3362
3362
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
3363
3363
  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>;
3364
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
3364
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3365
3365
  providerOptions?: Record<string, Record<string, any>> | undefined;
3366
3366
  role: "system";
3367
3367
  content: string;
@@ -3369,7 +3369,7 @@ export declare const vv: {
3369
3369
  role: import("convex/values").VLiteral<"system", "required">;
3370
3370
  content: import("convex/values").VString<string, "required">;
3371
3371
  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>;
3372
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">], "optional", "providerOptions" | `providerOptions.${string}` | "role" | "content">;
3372
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
3373
3373
  tool: import("convex/values").VBoolean<boolean, "required">;
3374
3374
  text: import("convex/values").VString<string | undefined, "optional">;
3375
3375
  usage: import("convex/values").VObject<{
@@ -3383,14 +3383,14 @@ export declare const vv: {
3383
3383
  }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
3384
3384
  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>;
3385
3385
  sources: import("convex/values").VArray<{
3386
- providerOptions?: Record<string, Record<string, any>> | undefined;
3387
3386
  title?: string | undefined;
3387
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3388
3388
  id: string;
3389
3389
  sourceType: "url";
3390
3390
  url: string;
3391
3391
  }[] | undefined, import("convex/values").VObject<{
3392
- providerOptions?: Record<string, Record<string, any>> | undefined;
3393
3392
  title?: string | undefined;
3393
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3394
3394
  id: string;
3395
3395
  sourceType: "url";
3396
3396
  url: string;
@@ -3400,7 +3400,7 @@ export declare const vv: {
3400
3400
  url: import("convex/values").VString<string, "required">;
3401
3401
  title: import("convex/values").VString<string | undefined, "optional">;
3402
3402
  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>;
3403
- }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">, "optional">;
3403
+ }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
3404
3404
  reasoning: import("convex/values").VString<string | undefined, "optional">;
3405
3405
  reasoningDetails: import("convex/values").VArray<({
3406
3406
  signature?: string | undefined;
@@ -3475,12 +3475,12 @@ export declare const vv: {
3475
3475
  }, {
3476
3476
  type: import("convex/values").VLiteral<"other", "required">;
3477
3477
  message: import("convex/values").VString<string, "required">;
3478
- }, "required", "type" | "message">], "required", "type" | "tool" | "message" | "setting" | "details" | `tool.${string}`>, "optional">;
3479
- finishReason: import("convex/values").VUnion<"length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "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>;
3478
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
3479
+ 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>;
3480
3480
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
3481
3481
  stepId: import("convex/values").VString<string | undefined, "optional">;
3482
3482
  files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
3483
- }, "required", "id" | "tool" | "text" | "providerOptions" | `providerOptions.${string}` | "reasoning" | "message" | "files" | "message.providerOptions" | `message.providerOptions.${string}` | "message.role" | "message.content" | "error" | "fileIds" | "finishReason" | "model" | "provider" | "providerMetadata" | "sources" | "reasoningDetails" | "usage" | "warnings" | `providerMetadata.${string}` | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "userId" | "threadId" | "status" | "order" | "stepOrder" | "agentName" | "embeddingId" | "parentMessageId" | "stepId">, {
3483
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>, {
3484
3484
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
3485
3485
  embeddingId: ["embeddingId", "_creationTime"];
3486
3486
  }, {
@@ -3490,13 +3490,13 @@ export declare const vv: {
3490
3490
  };
3491
3491
  }, {}>;
3492
3492
  streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
3493
- providerOptions?: Record<string, Record<string, any>> | undefined;
3494
- model?: string | undefined;
3495
- provider?: string | undefined;
3496
3493
  userId?: string | undefined;
3497
3494
  agentName?: string | undefined;
3498
- threadId: import("convex/values").GenericId<"threads">;
3495
+ model?: string | undefined;
3496
+ provider?: string | undefined;
3497
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3499
3498
  order: number;
3499
+ threadId: import("convex/values").GenericId<"threads">;
3500
3500
  stepOrder: number;
3501
3501
  state: {
3502
3502
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
@@ -3506,8 +3506,8 @@ export declare const vv: {
3506
3506
  kind: "finished";
3507
3507
  endedAt: number;
3508
3508
  } | {
3509
- kind: "aborted";
3510
- reason: string;
3509
+ error: string;
3510
+ kind: "error";
3511
3511
  };
3512
3512
  }, {
3513
3513
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -3531,8 +3531,8 @@ export declare const vv: {
3531
3531
  kind: "finished";
3532
3532
  endedAt: number;
3533
3533
  } | {
3534
- kind: "aborted";
3535
- reason: string;
3534
+ error: string;
3535
+ kind: "error";
3536
3536
  }, [import("convex/values").VObject<{
3537
3537
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3538
3538
  kind: "streaming";
@@ -3548,13 +3548,13 @@ export declare const vv: {
3548
3548
  kind: import("convex/values").VLiteral<"finished", "required">;
3549
3549
  endedAt: import("convex/values").VFloat64<number, "required">;
3550
3550
  }, "required", "kind" | "endedAt">, import("convex/values").VObject<{
3551
- kind: "aborted";
3552
- reason: string;
3551
+ error: string;
3552
+ kind: "error";
3553
3553
  }, {
3554
- kind: import("convex/values").VLiteral<"aborted", "required">;
3555
- reason: import("convex/values").VString<string, "required">;
3556
- }, "required", "kind" | "reason">], "required", "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt" | "reason">;
3557
- }, "required", "providerOptions" | `providerOptions.${string}` | "model" | "provider" | "userId" | "threadId" | "order" | "stepOrder" | "agentName" | "state" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason">, {
3554
+ kind: import("convex/values").VLiteral<"error", "required">;
3555
+ error: import("convex/values").VString<string, "required">;
3556
+ }, "required", "error" | "kind">], "required", "error" | "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt">;
3557
+ }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt">, {
3558
3558
  threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
3559
3559
  }, {}, {}>;
3560
3560
  streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
@@ -3592,8 +3592,8 @@ export declare const vv: {
3592
3592
  } | {
3593
3593
  type: "source";
3594
3594
  source: {
3595
- providerOptions?: Record<string, Record<string, any>> | undefined;
3596
3595
  title?: string | undefined;
3596
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3597
3597
  id: string;
3598
3598
  sourceType: "url";
3599
3599
  url: string;
@@ -3643,8 +3643,8 @@ export declare const vv: {
3643
3643
  } | {
3644
3644
  type: "source";
3645
3645
  source: {
3646
- providerOptions?: Record<string, Record<string, any>> | undefined;
3647
3646
  title?: string | undefined;
3647
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3648
3648
  id: string;
3649
3649
  sourceType: "url";
3650
3650
  url: string;
@@ -3689,8 +3689,8 @@ export declare const vv: {
3689
3689
  } | {
3690
3690
  type: "source";
3691
3691
  source: {
3692
- providerOptions?: Record<string, Record<string, any>> | undefined;
3693
3692
  title?: string | undefined;
3693
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3694
3694
  id: string;
3695
3695
  sourceType: "url";
3696
3696
  url: string;
@@ -3719,8 +3719,8 @@ export declare const vv: {
3719
3719
  }, "required", "type" | "textDelta">, import("convex/values").VObject<{
3720
3720
  type: "source";
3721
3721
  source: {
3722
- providerOptions?: Record<string, Record<string, any>> | undefined;
3723
3722
  title?: string | undefined;
3723
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3724
3724
  id: string;
3725
3725
  sourceType: "url";
3726
3726
  url: string;
@@ -3728,8 +3728,8 @@ export declare const vv: {
3728
3728
  }, {
3729
3729
  type: import("convex/values").VLiteral<"source", "required">;
3730
3730
  source: import("convex/values").VObject<{
3731
- providerOptions?: Record<string, Record<string, any>> | undefined;
3732
3731
  title?: string | undefined;
3732
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3733
3733
  id: string;
3734
3734
  sourceType: "url";
3735
3735
  url: string;
@@ -3739,8 +3739,8 @@ export declare const vv: {
3739
3739
  url: import("convex/values").VString<string, "required">;
3740
3740
  title: import("convex/values").VString<string | undefined, "optional">;
3741
3741
  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>;
3742
- }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">;
3743
- }, "required", "type" | "source" | "source.id" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "source.title">, import("convex/values").VObject<{
3742
+ }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
3743
+ }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
3744
3744
  providerOptions?: Record<string, Record<string, any>> | undefined;
3745
3745
  type: "tool-call";
3746
3746
  toolCallId: string;
@@ -3823,7 +3823,7 @@ export declare const vv: {
3823
3823
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3824
3824
  isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3825
3825
  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>;
3826
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "source.title" | "argsTextDelta">, "required">;
3826
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, "required">;
3827
3827
  }, "required", "streamId" | "start" | "end" | "parts">, {
3828
3828
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
3829
3829
  }, {}, {}>;
@@ -3882,12 +3882,12 @@ export declare const vv: {
3882
3882
  };
3883
3883
  export { vv as v };
3884
3884
  export declare const vThreadDoc: import("convex/values").VObject<{
3885
- title?: string | undefined;
3886
3885
  userId?: string | undefined;
3886
+ title?: string | undefined;
3887
3887
  summary?: string | undefined;
3888
- status: "active" | "archived";
3889
- _creationTime: number;
3890
3888
  _id: string;
3889
+ _creationTime: number;
3890
+ status: "active" | "archived";
3891
3891
  }, {
3892
3892
  _id: import("convex/values").VString<string, "required">;
3893
3893
  _creationTime: import("convex/values").VFloat64<number, "required">;
@@ -3895,13 +3895,18 @@ export declare const vThreadDoc: import("convex/values").VObject<{
3895
3895
  title: import("convex/values").VString<string | undefined, "optional">;
3896
3896
  summary: import("convex/values").VString<string | undefined, "optional">;
3897
3897
  status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
3898
- }, "required", "title" | "userId" | "status" | "summary" | "_creationTime" | "_id">;
3898
+ }, "required", "_id" | "_creationTime" | "status" | "userId" | "title" | "summary">;
3899
3899
  export type ThreadDoc = Infer<typeof vThreadDoc>;
3900
3900
  export declare const vMessageDoc: import("convex/values").VObject<{
3901
3901
  id?: string | undefined;
3902
- text?: string | undefined;
3902
+ userId?: string | undefined;
3903
+ embeddingId?: string | undefined;
3904
+ fileIds?: string[] | undefined;
3905
+ error?: string | undefined;
3906
+ agentName?: string | undefined;
3907
+ model?: string | undefined;
3908
+ provider?: string | undefined;
3903
3909
  providerOptions?: Record<string, Record<string, any>> | undefined;
3904
- reasoning?: string | undefined;
3905
3910
  message?: {
3906
3911
  providerOptions?: Record<string, Record<string, any>> | undefined;
3907
3912
  role: "user";
@@ -3975,15 +3980,17 @@ export declare const vMessageDoc: import("convex/values").VObject<{
3975
3980
  role: "system";
3976
3981
  content: string;
3977
3982
  } | undefined;
3978
- error?: string | undefined;
3979
- fileIds?: string[] | undefined;
3980
- finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
3981
- model?: string | undefined;
3982
- provider?: string | undefined;
3983
+ text?: string | undefined;
3984
+ reasoning?: string | undefined;
3985
+ usage?: {
3986
+ promptTokens: number;
3987
+ completionTokens: number;
3988
+ totalTokens: number;
3989
+ } | undefined;
3983
3990
  providerMetadata?: Record<string, Record<string, any>> | undefined;
3984
3991
  sources?: {
3985
- providerOptions?: Record<string, Record<string, any>> | undefined;
3986
3992
  title?: string | undefined;
3993
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3987
3994
  id: string;
3988
3995
  sourceType: "url";
3989
3996
  url: string;
@@ -3996,11 +4003,6 @@ export declare const vMessageDoc: import("convex/values").VObject<{
3996
4003
  type: "redacted";
3997
4004
  data: string;
3998
4005
  })[] | undefined;
3999
- usage?: {
4000
- promptTokens: number;
4001
- completionTokens: number;
4002
- totalTokens: number;
4003
- } | undefined;
4004
4006
  warnings?: ({
4005
4007
  details?: string | undefined;
4006
4008
  type: "unsupported-setting";
@@ -4013,16 +4015,14 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4013
4015
  type: "other";
4014
4016
  message: string;
4015
4017
  })[] | undefined;
4016
- userId?: string | undefined;
4017
- agentName?: string | undefined;
4018
- embeddingId?: string | undefined;
4019
- tool: boolean;
4020
- threadId: string;
4018
+ finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
4019
+ _id: string;
4020
+ _creationTime: number;
4021
4021
  status: "pending" | "success" | "failed";
4022
4022
  order: number;
4023
+ threadId: string;
4023
4024
  stepOrder: number;
4024
- _creationTime: number;
4025
- _id: string;
4025
+ tool: boolean;
4026
4026
  }, {
4027
4027
  threadId: import("convex/values").VString<string, "required">;
4028
4028
  embeddingId: import("convex/values").VString<string | undefined, "optional">;
@@ -4183,7 +4183,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4183
4183
  type: import("convex/values").VLiteral<"text", "required">;
4184
4184
  text: import("convex/values").VString<string, "required">;
4185
4185
  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>;
4186
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
4186
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
4187
4187
  providerOptions?: Record<string, Record<string, any>> | undefined;
4188
4188
  mimeType?: string | undefined;
4189
4189
  type: "image";
@@ -4205,9 +4205,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4205
4205
  filename: import("convex/values").VString<string | undefined, "optional">;
4206
4206
  mimeType: import("convex/values").VString<string, "required">;
4207
4207
  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>;
4208
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
4208
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
4209
4209
  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>;
4210
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
4210
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4211
4211
  providerOptions?: Record<string, Record<string, any>> | undefined;
4212
4212
  role: "assistant";
4213
4213
  content: string | ({
@@ -4321,7 +4321,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4321
4321
  type: import("convex/values").VLiteral<"text", "required">;
4322
4322
  text: import("convex/values").VString<string, "required">;
4323
4323
  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>;
4324
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
4324
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
4325
4325
  providerOptions?: Record<string, Record<string, any>> | undefined;
4326
4326
  filename?: string | undefined;
4327
4327
  type: "file";
@@ -4343,7 +4343,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4343
4343
  text: import("convex/values").VString<string, "required">;
4344
4344
  signature: import("convex/values").VString<string | undefined, "optional">;
4345
4345
  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>;
4346
- }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
4346
+ }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
4347
4347
  providerOptions?: Record<string, Record<string, any>> | undefined;
4348
4348
  type: "redacted-reasoning";
4349
4349
  data: string;
@@ -4363,9 +4363,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4363
4363
  toolName: import("convex/values").VString<string, "required">;
4364
4364
  args: import("convex/values").VAny<any, "required", string>;
4365
4365
  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>;
4366
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
4366
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
4367
4367
  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>;
4368
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
4368
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4369
4369
  providerOptions?: Record<string, Record<string, any>> | undefined;
4370
4370
  role: "tool";
4371
4371
  content: {
@@ -4458,7 +4458,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4458
4458
  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>;
4459
4459
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
4460
4460
  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>;
4461
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
4461
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4462
4462
  providerOptions?: Record<string, Record<string, any>> | undefined;
4463
4463
  role: "system";
4464
4464
  content: string;
@@ -4466,7 +4466,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4466
4466
  role: import("convex/values").VLiteral<"system", "required">;
4467
4467
  content: import("convex/values").VString<string, "required">;
4468
4468
  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>;
4469
- }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">], "optional", "providerOptions" | `providerOptions.${string}` | "role" | "content">;
4469
+ }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
4470
4470
  tool: import("convex/values").VBoolean<boolean, "required">;
4471
4471
  text: import("convex/values").VString<string | undefined, "optional">;
4472
4472
  usage: import("convex/values").VObject<{
@@ -4480,14 +4480,14 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4480
4480
  }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
4481
4481
  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>;
4482
4482
  sources: import("convex/values").VArray<{
4483
- providerOptions?: Record<string, Record<string, any>> | undefined;
4484
4483
  title?: string | undefined;
4484
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4485
4485
  id: string;
4486
4486
  sourceType: "url";
4487
4487
  url: string;
4488
4488
  }[] | undefined, import("convex/values").VObject<{
4489
- providerOptions?: Record<string, Record<string, any>> | undefined;
4490
4489
  title?: string | undefined;
4490
+ providerOptions?: Record<string, Record<string, any>> | undefined;
4491
4491
  id: string;
4492
4492
  sourceType: "url";
4493
4493
  url: string;
@@ -4497,7 +4497,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4497
4497
  url: import("convex/values").VString<string, "required">;
4498
4498
  title: import("convex/values").VString<string | undefined, "optional">;
4499
4499
  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>;
4500
- }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">, "optional">;
4500
+ }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
4501
4501
  reasoning: import("convex/values").VString<string | undefined, "optional">;
4502
4502
  reasoningDetails: import("convex/values").VArray<({
4503
4503
  signature?: string | undefined;
@@ -4572,11 +4572,11 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4572
4572
  }, {
4573
4573
  type: import("convex/values").VLiteral<"other", "required">;
4574
4574
  message: import("convex/values").VString<string, "required">;
4575
- }, "required", "type" | "message">], "required", "type" | "tool" | "message" | "setting" | "details" | `tool.${string}`>, "optional">;
4576
- finishReason: import("convex/values").VUnion<"length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "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>;
4575
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
4576
+ 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>;
4577
4577
  _id: import("convex/values").VString<string, "required">;
4578
4578
  _creationTime: import("convex/values").VFloat64<number, "required">;
4579
- }, "required", "id" | "tool" | "text" | "providerOptions" | `providerOptions.${string}` | "reasoning" | "message" | "message.providerOptions" | `message.providerOptions.${string}` | "message.role" | "message.content" | "error" | "fileIds" | "finishReason" | "model" | "provider" | "providerMetadata" | "sources" | "reasoningDetails" | "usage" | "warnings" | `providerMetadata.${string}` | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | "userId" | "threadId" | "status" | "order" | "stepOrder" | "agentName" | "_creationTime" | "embeddingId" | "_id">;
4579
+ }, "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" | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>;
4580
4580
  export type MessageDoc = Infer<typeof vMessageDoc>;
4581
4581
  export default schema;
4582
4582
  //# sourceMappingURL=schema.d.ts.map