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

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 (57) hide show
  1. package/dist/commonjs/client/index.d.ts +72 -71
  2. package/dist/commonjs/client/index.d.ts.map +1 -1
  3. package/dist/commonjs/client/index.js +2 -0
  4. package/dist/commonjs/client/index.js.map +1 -1
  5. package/dist/commonjs/component/_generated/api.d.ts +6 -1
  6. package/dist/commonjs/component/messages.d.ts +210 -210
  7. package/dist/commonjs/component/schema.d.ts +677 -707
  8. package/dist/commonjs/component/schema.d.ts.map +1 -1
  9. package/dist/commonjs/component/schema.js +0 -3
  10. package/dist/commonjs/component/schema.js.map +1 -1
  11. package/dist/commonjs/component/streams.d.ts +13 -11
  12. package/dist/commonjs/component/streams.d.ts.map +1 -1
  13. package/dist/commonjs/component/streams.js +8 -6
  14. package/dist/commonjs/component/streams.js.map +1 -1
  15. package/dist/commonjs/component/threads.d.ts +18 -18
  16. package/dist/commonjs/component/vector/index.d.ts +3 -3
  17. package/dist/commonjs/component/vector/tables.d.ts +2 -2
  18. package/dist/commonjs/react/deltas.d.ts.map +1 -1
  19. package/dist/commonjs/react/deltas.js +2 -2
  20. package/dist/commonjs/react/deltas.js.map +1 -1
  21. package/dist/commonjs/validators.d.ts +162 -160
  22. package/dist/commonjs/validators.d.ts.map +1 -1
  23. package/dist/commonjs/validators.js +1 -0
  24. package/dist/commonjs/validators.js.map +1 -1
  25. package/dist/commonjs.tsbuildinfo +1 -1
  26. package/dist/esm/client/index.d.ts +20 -19
  27. package/dist/esm/client/index.d.ts.map +1 -1
  28. package/dist/esm/client/index.js +2 -0
  29. package/dist/esm/client/index.js.map +1 -1
  30. package/dist/esm/component/_generated/api.d.ts +6 -1
  31. package/dist/esm/component/messages.d.ts +37 -37
  32. package/dist/esm/component/schema.d.ts +677 -707
  33. package/dist/esm/component/schema.d.ts.map +1 -1
  34. package/dist/esm/component/schema.js +0 -3
  35. package/dist/esm/component/schema.js.map +1 -1
  36. package/dist/esm/component/streams.d.ts +2 -0
  37. package/dist/esm/component/streams.d.ts.map +1 -1
  38. package/dist/esm/component/streams.js +8 -6
  39. package/dist/esm/component/streams.js.map +1 -1
  40. package/dist/esm/component/threads.d.ts +15 -15
  41. package/dist/esm/component/vector/index.d.ts +3 -3
  42. package/dist/esm/component/vector/tables.d.ts +2 -2
  43. package/dist/esm/react/deltas.d.ts.map +1 -1
  44. package/dist/esm/react/deltas.js +2 -2
  45. package/dist/esm/react/deltas.js.map +1 -1
  46. package/dist/esm/validators.d.ts +162 -160
  47. package/dist/esm/validators.d.ts.map +1 -1
  48. package/dist/esm/validators.js +1 -0
  49. package/dist/esm/validators.js.map +1 -1
  50. package/dist/esm.tsbuildinfo +1 -1
  51. package/package.json +1 -1
  52. package/src/client/index.ts +4 -0
  53. package/src/component/_generated/api.d.ts +6 -1
  54. package/src/component/schema.ts +0 -4
  55. package/src/component/streams.ts +38 -24
  56. package/src/react/deltas.ts +4 -2
  57. package/src/validators.ts +5 -0
@@ -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
- table: string;
17
16
  vector: number[];
17
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
26
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
42
41
  vector: number[];
42
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
51
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
67
66
  vector: number[];
67
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
76
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
92
91
  vector: number[];
92
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
101
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
117
116
  vector: number[];
117
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
126
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
142
141
  vector: number[];
142
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
151
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
167
166
  vector: number[];
167
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
176
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
192
191
  vector: number[];
192
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
201
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
217
216
  vector: number[];
217
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
226
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- table: string;
242
241
  vector: number[];
242
+ table: string;
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", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
251
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
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
- userId?: string | undefined;
262
261
  title?: string | undefined;
262
+ userId?: string | undefined;
263
+ order?: number | undefined;
263
264
  summary?: string | undefined;
264
265
  defaultSystemPrompt?: string | undefined;
265
266
  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,20 +273,14 @@ 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", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
276
+ }, "required", "title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds">, {
277
277
  userId: ["userId", "_creationTime"];
278
278
  }, {}, {}>;
279
279
  messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
280
280
  id?: 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;
281
+ text?: string | undefined;
289
282
  providerOptions?: Record<string, Record<string, any>> | undefined;
283
+ reasoning?: string | undefined;
290
284
  message?: {
291
285
  providerOptions?: Record<string, Record<string, any>> | undefined;
292
286
  role: "user";
@@ -360,17 +354,16 @@ export declare const schema: import("convex/server").SchemaDefinition<{
360
354
  role: "system";
361
355
  content: string;
362
356
  } | undefined;
363
- text?: string | undefined;
364
- reasoning?: string | undefined;
365
- usage?: {
366
- promptTokens: number;
367
- completionTokens: number;
368
- totalTokens: number;
369
- } | 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;
370
363
  providerMetadata?: Record<string, Record<string, any>> | undefined;
371
364
  sources?: {
372
- title?: string | undefined;
373
365
  providerOptions?: Record<string, Record<string, any>> | undefined;
366
+ title?: string | undefined;
374
367
  id: string;
375
368
  sourceType: "url";
376
369
  url: string;
@@ -383,6 +376,11 @@ export declare const schema: import("convex/server").SchemaDefinition<{
383
376
  type: "redacted";
384
377
  data: string;
385
378
  })[] | undefined;
379
+ usage?: {
380
+ promptTokens: number;
381
+ completionTokens: number;
382
+ totalTokens: number;
383
+ } | undefined;
386
384
  warnings?: ({
387
385
  details?: string | undefined;
388
386
  type: "unsupported-setting";
@@ -395,14 +393,16 @@ export declare const schema: import("convex/server").SchemaDefinition<{
395
393
  type: "other";
396
394
  message: string;
397
395
  })[] | undefined;
398
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | 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;
399
399
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
400
400
  stepId?: string | undefined;
401
+ tool: boolean;
402
+ threadId: import("convex/values").GenericId<"threads">;
401
403
  status: "pending" | "success" | "failed";
402
404
  order: number;
403
- threadId: import("convex/values").GenericId<"threads">;
404
405
  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" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
566
+ }, "required", "type" | "text" | "providerOptions" | `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" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
588
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "text" | "providerOptions" | `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" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
590
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "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" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
704
+ }, "required", "type" | "text" | "providerOptions" | `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" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
726
+ }, "required", "type" | "text" | "providerOptions" | `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" | "providerOptions" | "text" | `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" | "text" | "providerOptions" | `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" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
748
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "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" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
841
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "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" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
849
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">], "optional", "providerOptions" | `providerOptions.${string}` | "role" | "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
- title?: string | undefined;
864
863
  providerOptions?: Record<string, Record<string, any>> | undefined;
864
+ title?: string | undefined;
865
865
  id: string;
866
866
  sourceType: "url";
867
867
  url: string;
868
868
  }[] | undefined, import("convex/values").VObject<{
869
- title?: string | undefined;
870
869
  providerOptions?: Record<string, Record<string, any>> | undefined;
870
+ title?: string | 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" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
880
+ }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">, "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" | "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>;
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>;
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" | "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}`>, {
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">, {
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
- userId?: string | undefined;
971
- agentName?: string | undefined;
970
+ providerOptions?: Record<string, Record<string, any>> | undefined;
972
971
  model?: string | undefined;
973
972
  provider?: string | undefined;
974
- providerOptions?: Record<string, Record<string, any>> | undefined;
975
- order: number;
973
+ userId?: string | undefined;
974
+ agentName?: string | undefined;
976
975
  threadId: import("convex/values").GenericId<"threads">;
976
+ order: number;
977
977
  stepOrder: number;
978
978
  state: {
979
979
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
@@ -985,9 +985,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
985
985
  } | {
986
986
  kind: "aborted";
987
987
  reason: string;
988
- } | {
989
- error: string;
990
- kind: "error";
991
988
  };
992
989
  }, {
993
990
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -1013,9 +1010,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1013
1010
  } | {
1014
1011
  kind: "aborted";
1015
1012
  reason: string;
1016
- } | {
1017
- error: string;
1018
- kind: "error";
1019
1013
  }, [import("convex/values").VObject<{
1020
1014
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1021
1015
  kind: "streaming";
@@ -1036,14 +1030,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1036
1030
  }, {
1037
1031
  kind: import("convex/values").VLiteral<"aborted", "required">;
1038
1032
  reason: import("convex/values").VString<string, "required">;
1039
- }, "required", "kind" | "reason">, import("convex/values").VObject<{
1040
- error: string;
1041
- kind: "error";
1042
- }, {
1043
- kind: import("convex/values").VLiteral<"error", "required">;
1044
- error: import("convex/values").VString<string, "required">;
1045
- }, "required", "error" | "kind">], "required", "error" | "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt" | "reason">;
1046
- }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason">, {
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">, {
1047
1035
  threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
1048
1036
  }, {}, {}>;
1049
1037
  streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
@@ -1081,8 +1069,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1081
1069
  } | {
1082
1070
  type: "source";
1083
1071
  source: {
1084
- title?: string | undefined;
1085
1072
  providerOptions?: Record<string, Record<string, any>> | undefined;
1073
+ title?: string | undefined;
1086
1074
  id: string;
1087
1075
  sourceType: "url";
1088
1076
  url: string;
@@ -1132,8 +1120,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1132
1120
  } | {
1133
1121
  type: "source";
1134
1122
  source: {
1135
- title?: string | undefined;
1136
1123
  providerOptions?: Record<string, Record<string, any>> | undefined;
1124
+ title?: string | undefined;
1137
1125
  id: string;
1138
1126
  sourceType: "url";
1139
1127
  url: string;
@@ -1178,8 +1166,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1178
1166
  } | {
1179
1167
  type: "source";
1180
1168
  source: {
1181
- title?: string | undefined;
1182
1169
  providerOptions?: Record<string, Record<string, any>> | undefined;
1170
+ title?: string | undefined;
1183
1171
  id: string;
1184
1172
  sourceType: "url";
1185
1173
  url: string;
@@ -1208,8 +1196,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1208
1196
  }, "required", "type" | "textDelta">, import("convex/values").VObject<{
1209
1197
  type: "source";
1210
1198
  source: {
1211
- title?: string | undefined;
1212
1199
  providerOptions?: Record<string, Record<string, any>> | undefined;
1200
+ title?: string | undefined;
1213
1201
  id: string;
1214
1202
  sourceType: "url";
1215
1203
  url: string;
@@ -1217,8 +1205,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1217
1205
  }, {
1218
1206
  type: import("convex/values").VLiteral<"source", "required">;
1219
1207
  source: import("convex/values").VObject<{
1220
- title?: string | undefined;
1221
1208
  providerOptions?: Record<string, Record<string, any>> | undefined;
1209
+ title?: string | undefined;
1222
1210
  id: string;
1223
1211
  sourceType: "url";
1224
1212
  url: string;
@@ -1228,8 +1216,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1228
1216
  url: import("convex/values").VString<string, "required">;
1229
1217
  title: import("convex/values").VString<string | undefined, "optional">;
1230
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>;
1231
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
1232
- }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
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<{
1233
1221
  providerOptions?: Record<string, Record<string, any>> | undefined;
1234
1222
  type: "tool-call";
1235
1223
  toolCallId: string;
@@ -1312,7 +1300,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1312
1300
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1313
1301
  isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1314
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>;
1315
- }, "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">;
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">;
1316
1304
  }, "required", "streamId" | "start" | "end" | "parts">, {
1317
1305
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1318
1306
  }, {}, {}>;
@@ -1352,19 +1340,186 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1352
1340
  }, true>;
1353
1341
  export declare const vv: {
1354
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
+ };
1355
1510
  threads: {
1356
1511
  document: {
1357
1512
  _id: import("convex/values").GenericId<"threads">;
1358
1513
  _creationTime: number;
1359
- userId?: string | undefined;
1360
1514
  title?: string | undefined;
1515
+ userId?: string | undefined;
1516
+ order?: number | undefined;
1361
1517
  summary?: string | undefined;
1362
1518
  defaultSystemPrompt?: string | undefined;
1363
1519
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1364
- order?: number | undefined;
1365
1520
  status: "active" | "archived";
1366
1521
  };
1367
- fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
1522
+ fieldPaths: ("title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "_creationTime") | "_id";
1368
1523
  indexes: {
1369
1524
  userId: ["userId", "_creationTime"];
1370
1525
  by_id: ["_id"];
@@ -1382,10 +1537,10 @@ export declare const vv: {
1382
1537
  model_table_userId?: string[] | undefined;
1383
1538
  model_table_threadId?: string[] | undefined;
1384
1539
  model: string;
1385
- table: string;
1386
1540
  vector: number[];
1541
+ table: string;
1387
1542
  };
1388
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1543
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1389
1544
  indexes: {
1390
1545
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1391
1546
  by_id: ["_id"];
@@ -1409,10 +1564,10 @@ export declare const vv: {
1409
1564
  model_table_userId?: string[] | undefined;
1410
1565
  model_table_threadId?: string[] | undefined;
1411
1566
  model: string;
1412
- table: string;
1413
1567
  vector: number[];
1568
+ table: string;
1414
1569
  };
1415
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1570
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1416
1571
  indexes: {
1417
1572
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1418
1573
  by_id: ["_id"];
@@ -1436,10 +1591,10 @@ export declare const vv: {
1436
1591
  model_table_userId?: string[] | undefined;
1437
1592
  model_table_threadId?: string[] | undefined;
1438
1593
  model: string;
1439
- table: string;
1440
1594
  vector: number[];
1595
+ table: string;
1441
1596
  };
1442
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1597
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1443
1598
  indexes: {
1444
1599
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1445
1600
  by_id: ["_id"];
@@ -1463,10 +1618,10 @@ export declare const vv: {
1463
1618
  model_table_userId?: string[] | undefined;
1464
1619
  model_table_threadId?: string[] | undefined;
1465
1620
  model: string;
1466
- table: string;
1467
1621
  vector: number[];
1622
+ table: string;
1468
1623
  };
1469
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1624
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1470
1625
  indexes: {
1471
1626
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1472
1627
  by_id: ["_id"];
@@ -1490,10 +1645,10 @@ export declare const vv: {
1490
1645
  model_table_userId?: string[] | undefined;
1491
1646
  model_table_threadId?: string[] | undefined;
1492
1647
  model: string;
1493
- table: string;
1494
1648
  vector: number[];
1649
+ table: string;
1495
1650
  };
1496
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1651
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1497
1652
  indexes: {
1498
1653
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1499
1654
  by_id: ["_id"];
@@ -1517,10 +1672,10 @@ export declare const vv: {
1517
1672
  model_table_userId?: string[] | undefined;
1518
1673
  model_table_threadId?: string[] | undefined;
1519
1674
  model: string;
1520
- table: string;
1521
1675
  vector: number[];
1676
+ table: string;
1522
1677
  };
1523
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1678
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1524
1679
  indexes: {
1525
1680
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1526
1681
  by_id: ["_id"];
@@ -1544,10 +1699,10 @@ export declare const vv: {
1544
1699
  model_table_userId?: string[] | undefined;
1545
1700
  model_table_threadId?: string[] | undefined;
1546
1701
  model: string;
1547
- table: string;
1548
1702
  vector: number[];
1703
+ table: string;
1549
1704
  };
1550
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1705
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1551
1706
  indexes: {
1552
1707
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1553
1708
  by_id: ["_id"];
@@ -1571,10 +1726,10 @@ export declare const vv: {
1571
1726
  model_table_userId?: string[] | undefined;
1572
1727
  model_table_threadId?: string[] | undefined;
1573
1728
  model: string;
1574
- table: string;
1575
1729
  vector: number[];
1730
+ table: string;
1576
1731
  };
1577
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1732
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1578
1733
  indexes: {
1579
1734
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1580
1735
  by_id: ["_id"];
@@ -1598,10 +1753,10 @@ export declare const vv: {
1598
1753
  model_table_userId?: string[] | undefined;
1599
1754
  model_table_threadId?: string[] | undefined;
1600
1755
  model: string;
1601
- table: string;
1602
1756
  vector: number[];
1757
+ table: string;
1603
1758
  };
1604
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1759
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1605
1760
  indexes: {
1606
1761
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1607
1762
  by_id: ["_id"];
@@ -1625,10 +1780,10 @@ export declare const vv: {
1625
1780
  model_table_userId?: string[] | undefined;
1626
1781
  model_table_threadId?: string[] | undefined;
1627
1782
  model: string;
1628
- table: string;
1629
1783
  vector: number[];
1784
+ table: string;
1630
1785
  };
1631
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1786
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1632
1787
  indexes: {
1633
1788
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1634
1789
  by_id: ["_id"];
@@ -1643,41 +1798,148 @@ export declare const vv: {
1643
1798
  };
1644
1799
  };
1645
1800
  };
1646
- files: {
1801
+ streamingMessages: {
1647
1802
  document: {
1648
- _id: import("convex/values").GenericId<"files">;
1803
+ _id: import("convex/values").GenericId<"streamingMessages">;
1649
1804
  _creationTime: number;
1650
- filename?: string | undefined;
1651
- mimeType: string;
1652
- storageId: string;
1653
- hash: string;
1654
- refcount: number;
1655
- lastTouchedAt: 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
+ };
1656
1824
  };
1657
- fieldPaths: "_id" | ("_creationTime" | "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt");
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";
1658
1826
  indexes: {
1659
- hash: ["hash", "_creationTime"];
1660
- 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
+ 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: {
1919
+ document: {
1920
+ _id: import("convex/values").GenericId<"apiKeys">;
1921
+ _creationTime: number;
1922
+ name?: string | undefined;
1923
+ };
1924
+ fieldPaths: ("_creationTime" | "name") | "_id";
1925
+ indexes: {
1926
+ name: ["name", "_creationTime"];
1661
1927
  by_id: ["_id"];
1662
1928
  by_creation_time: ["_creationTime"];
1663
1929
  };
1664
1930
  searchIndexes: {};
1665
1931
  vectorIndexes: {};
1666
1932
  };
1933
+ }>>(tableName: TableName) => import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
1934
+ doc: <TableName extends import("convex/server").TableNamesInDataModel<{
1667
1935
  messages: {
1668
1936
  document: {
1669
1937
  _id: import("convex/values").GenericId<"messages">;
1670
1938
  _creationTime: number;
1671
1939
  id?: string | undefined;
1672
- userId?: string | undefined;
1673
- 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;
1674
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
1675
- files?: any[] | undefined;
1676
- error?: string | undefined;
1677
- agentName?: string | undefined;
1678
- model?: string | undefined;
1679
- provider?: string | undefined;
1940
+ text?: string | undefined;
1680
1941
  providerOptions?: Record<string, Record<string, any>> | undefined;
1942
+ reasoning?: string | undefined;
1681
1943
  message?: {
1682
1944
  providerOptions?: Record<string, Record<string, any>> | undefined;
1683
1945
  role: "user";
@@ -1751,17 +2013,16 @@ export declare const vv: {
1751
2013
  role: "system";
1752
2014
  content: string;
1753
2015
  } | undefined;
1754
- text?: string | undefined;
1755
- reasoning?: string | undefined;
1756
- usage?: {
1757
- promptTokens: number;
1758
- completionTokens: number;
1759
- totalTokens: number;
1760
- } | 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;
1761
2022
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1762
2023
  sources?: {
1763
- title?: string | undefined;
1764
2024
  providerOptions?: Record<string, Record<string, any>> | undefined;
2025
+ title?: string | undefined;
1765
2026
  id: string;
1766
2027
  sourceType: "url";
1767
2028
  url: string;
@@ -1774,6 +2035,11 @@ export declare const vv: {
1774
2035
  type: "redacted";
1775
2036
  data: string;
1776
2037
  })[] | undefined;
2038
+ usage?: {
2039
+ promptTokens: number;
2040
+ completionTokens: number;
2041
+ totalTokens: number;
2042
+ } | undefined;
1777
2043
  warnings?: ({
1778
2044
  details?: string | undefined;
1779
2045
  type: "unsupported-setting";
@@ -1786,16 +2052,18 @@ export declare const vv: {
1786
2052
  type: "other";
1787
2053
  message: string;
1788
2054
  })[] | undefined;
1789
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | 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;
1790
2058
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
1791
2059
  stepId?: string | undefined;
2060
+ tool: boolean;
2061
+ threadId: import("convex/values").GenericId<"threads">;
1792
2062
  status: "pending" | "success" | "failed";
1793
2063
  order: number;
1794
- threadId: import("convex/values").GenericId<"threads">;
1795
2064
  stepOrder: number;
1796
- tool: boolean;
1797
2065
  };
1798
- 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}`);
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";
1799
2067
  indexes: {
1800
2068
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
1801
2069
  embeddingId: ["embeddingId", "_creationTime"];
@@ -1810,177 +2078,61 @@ export declare const vv: {
1810
2078
  };
1811
2079
  vectorIndexes: {};
1812
2080
  };
1813
- streamingMessages: {
2081
+ files: {
1814
2082
  document: {
1815
- _id: import("convex/values").GenericId<"streamingMessages">;
2083
+ _id: import("convex/values").GenericId<"files">;
2084
+ _creationTime: number;
2085
+ filename?: string | undefined;
2086
+ mimeType: string;
2087
+ storageId: string;
2088
+ hash: string;
2089
+ refcount: number;
2090
+ lastTouchedAt: number;
2091
+ };
2092
+ fieldPaths: ("mimeType" | "filename" | "_creationTime" | "storageId" | "hash" | "refcount" | "lastTouchedAt") | "_id";
2093
+ indexes: {
2094
+ hash: ["hash", "_creationTime"];
2095
+ refcount: ["refcount", "_creationTime"];
2096
+ by_id: ["_id"];
2097
+ by_creation_time: ["_creationTime"];
2098
+ };
2099
+ searchIndexes: {};
2100
+ vectorIndexes: {};
2101
+ };
2102
+ threads: {
2103
+ document: {
2104
+ _id: import("convex/values").GenericId<"threads">;
1816
2105
  _creationTime: number;
2106
+ title?: string | undefined;
1817
2107
  userId?: string | undefined;
1818
- agentName?: string | undefined;
1819
- model?: string | undefined;
1820
- provider?: string | undefined;
1821
- providerOptions?: Record<string, Record<string, any>> | undefined;
1822
- order: number;
1823
- threadId: import("convex/values").GenericId<"threads">;
1824
- stepOrder: number;
1825
- state: {
1826
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1827
- kind: "streaming";
1828
- lastHeartbeat: number;
1829
- } | {
1830
- kind: "finished";
1831
- endedAt: number;
1832
- } | {
1833
- kind: "aborted";
1834
- reason: string;
1835
- } | {
1836
- error: string;
1837
- kind: "error";
1838
- };
2108
+ order?: number | undefined;
2109
+ summary?: string | undefined;
2110
+ defaultSystemPrompt?: string | undefined;
2111
+ parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
2112
+ status: "active" | "archived";
1839
2113
  };
1840
- fieldPaths: "_id" | ("_creationTime" | "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason");
2114
+ fieldPaths: ("title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "_creationTime") | "_id";
1841
2115
  indexes: {
1842
- threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
2116
+ userId: ["userId", "_creationTime"];
1843
2117
  by_id: ["_id"];
1844
2118
  by_creation_time: ["_creationTime"];
1845
2119
  };
1846
2120
  searchIndexes: {};
1847
2121
  vectorIndexes: {};
1848
2122
  };
1849
- streamDeltas: {
2123
+ embeddings_128: {
1850
2124
  document: {
1851
- _id: import("convex/values").GenericId<"streamDeltas">;
1852
- _creationTime: number;
1853
- streamId: import("convex/values").GenericId<"streamingMessages">;
1854
- start: number;
1855
- end: number;
1856
- parts: ({
1857
- providerOptions?: Record<string, Record<string, any>> | undefined;
1858
- type: "tool-call";
1859
- toolCallId: string;
1860
- toolName: string;
1861
- args: any;
1862
- } | {
1863
- providerOptions?: Record<string, Record<string, any>> | undefined;
1864
- args?: any;
1865
- experimental_content?: ({
1866
- type: "text";
1867
- text: string;
1868
- } | {
1869
- mimeType?: string | undefined;
1870
- type: "image";
1871
- data: string;
1872
- })[] | undefined;
1873
- isError?: boolean | undefined;
1874
- type: "tool-result";
1875
- toolCallId: string;
1876
- toolName: string;
1877
- result: any;
1878
- } | {
1879
- type: "text-delta";
1880
- textDelta: string;
1881
- } | {
1882
- type: "reasoning";
1883
- textDelta: string;
1884
- } | {
1885
- type: "source";
1886
- source: {
1887
- title?: string | undefined;
1888
- providerOptions?: Record<string, Record<string, any>> | undefined;
1889
- id: string;
1890
- sourceType: "url";
1891
- url: string;
1892
- };
1893
- } | {
1894
- type: "tool-call-streaming-start";
1895
- toolCallId: string;
1896
- toolName: string;
1897
- } | {
1898
- type: "tool-call-delta";
1899
- toolCallId: string;
1900
- toolName: string;
1901
- argsTextDelta: string;
1902
- })[];
1903
- };
1904
- fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
1905
- indexes: {
1906
- streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1907
- by_id: ["_id"];
1908
- by_creation_time: ["_creationTime"];
1909
- };
1910
- searchIndexes: {};
1911
- vectorIndexes: {};
1912
- };
1913
- memories: {
1914
- document: {
1915
- _id: import("convex/values").GenericId<"memories">;
1916
- _creationTime: number;
1917
- userId?: string | undefined;
1918
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
1919
- 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;
1920
- memory: string;
1921
- };
1922
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "embeddingId" | "memory");
1923
- indexes: {
1924
- threadId: ["threadId", "_creationTime"];
1925
- userId: ["userId", "_creationTime"];
1926
- embeddingId: ["embeddingId", "_creationTime"];
1927
- by_id: ["_id"];
1928
- by_creation_time: ["_creationTime"];
1929
- };
1930
- searchIndexes: {};
1931
- vectorIndexes: {};
1932
- };
1933
- apiKeys: {
1934
- document: {
1935
- _id: import("convex/values").GenericId<"apiKeys">;
1936
- _creationTime: number;
1937
- name?: string | undefined;
1938
- };
1939
- fieldPaths: "_id" | ("_creationTime" | "name");
1940
- indexes: {
1941
- name: ["name", "_creationTime"];
1942
- by_id: ["_id"];
1943
- by_creation_time: ["_creationTime"];
1944
- };
1945
- searchIndexes: {};
1946
- vectorIndexes: {};
1947
- };
1948
- }>>(tableName: TableName) => import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
1949
- doc: <TableName extends import("convex/server").TableNamesInDataModel<{
1950
- threads: {
1951
- document: {
1952
- _id: import("convex/values").GenericId<"threads">;
1953
- _creationTime: number;
1954
- userId?: string | undefined;
1955
- title?: string | undefined;
1956
- summary?: string | undefined;
1957
- defaultSystemPrompt?: string | undefined;
1958
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1959
- order?: number | undefined;
1960
- status: "active" | "archived";
1961
- };
1962
- fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
1963
- indexes: {
1964
- userId: ["userId", "_creationTime"];
1965
- by_id: ["_id"];
1966
- by_creation_time: ["_creationTime"];
1967
- };
1968
- searchIndexes: {};
1969
- vectorIndexes: {};
1970
- };
1971
- embeddings_128: {
1972
- document: {
1973
- _id: import("convex/values").GenericId<"embeddings_128">;
2125
+ _id: import("convex/values").GenericId<"embeddings_128">;
1974
2126
  _creationTime: number;
1975
2127
  userId?: string | undefined;
1976
2128
  threadId?: string | undefined;
1977
2129
  model_table_userId?: string[] | undefined;
1978
2130
  model_table_threadId?: string[] | undefined;
1979
2131
  model: string;
1980
- table: string;
1981
2132
  vector: number[];
2133
+ table: string;
1982
2134
  };
1983
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2135
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
1984
2136
  indexes: {
1985
2137
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1986
2138
  by_id: ["_id"];
@@ -2004,10 +2156,10 @@ export declare const vv: {
2004
2156
  model_table_userId?: string[] | undefined;
2005
2157
  model_table_threadId?: string[] | undefined;
2006
2158
  model: string;
2007
- table: string;
2008
2159
  vector: number[];
2160
+ table: string;
2009
2161
  };
2010
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2162
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2011
2163
  indexes: {
2012
2164
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2013
2165
  by_id: ["_id"];
@@ -2031,10 +2183,10 @@ export declare const vv: {
2031
2183
  model_table_userId?: string[] | undefined;
2032
2184
  model_table_threadId?: string[] | undefined;
2033
2185
  model: string;
2034
- table: string;
2035
2186
  vector: number[];
2187
+ table: string;
2036
2188
  };
2037
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2189
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2038
2190
  indexes: {
2039
2191
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2040
2192
  by_id: ["_id"];
@@ -2058,10 +2210,10 @@ export declare const vv: {
2058
2210
  model_table_userId?: string[] | undefined;
2059
2211
  model_table_threadId?: string[] | undefined;
2060
2212
  model: string;
2061
- table: string;
2062
2213
  vector: number[];
2214
+ table: string;
2063
2215
  };
2064
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2216
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2065
2217
  indexes: {
2066
2218
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2067
2219
  by_id: ["_id"];
@@ -2085,10 +2237,10 @@ export declare const vv: {
2085
2237
  model_table_userId?: string[] | undefined;
2086
2238
  model_table_threadId?: string[] | undefined;
2087
2239
  model: string;
2088
- table: string;
2089
2240
  vector: number[];
2241
+ table: string;
2090
2242
  };
2091
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2243
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2092
2244
  indexes: {
2093
2245
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2094
2246
  by_id: ["_id"];
@@ -2112,310 +2264,143 @@ export declare const vv: {
2112
2264
  model_table_userId?: string[] | undefined;
2113
2265
  model_table_threadId?: string[] | undefined;
2114
2266
  model: string;
2115
- table: string;
2116
- vector: number[];
2117
- };
2118
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2119
- indexes: {
2120
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2121
- by_id: ["_id"];
2122
- by_creation_time: ["_creationTime"];
2123
- };
2124
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2125
- vectorIndexes: {
2126
- vector: {
2127
- vectorField: "vector";
2128
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2129
- filterFields: "model_table_userId" | "model_table_threadId";
2130
- };
2131
- };
2132
- };
2133
- embeddings_1536: {
2134
- document: {
2135
- _id: import("convex/values").GenericId<"embeddings_1536">;
2136
- _creationTime: number;
2137
- userId?: string | undefined;
2138
- threadId?: string | undefined;
2139
- model_table_userId?: string[] | undefined;
2140
- model_table_threadId?: string[] | undefined;
2141
- model: string;
2142
- table: string;
2143
- vector: number[];
2144
- };
2145
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2146
- indexes: {
2147
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2148
- by_id: ["_id"];
2149
- by_creation_time: ["_creationTime"];
2150
- };
2151
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2152
- vectorIndexes: {
2153
- vector: {
2154
- vectorField: "vector";
2155
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2156
- filterFields: "model_table_userId" | "model_table_threadId";
2157
- };
2158
- };
2159
- };
2160
- embeddings_2048: {
2161
- document: {
2162
- _id: import("convex/values").GenericId<"embeddings_2048">;
2163
- _creationTime: number;
2164
- userId?: string | undefined;
2165
- threadId?: string | undefined;
2166
- model_table_userId?: string[] | undefined;
2167
- model_table_threadId?: string[] | undefined;
2168
- model: string;
2169
- table: string;
2170
- vector: number[];
2171
- };
2172
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2173
- indexes: {
2174
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2175
- by_id: ["_id"];
2176
- by_creation_time: ["_creationTime"];
2177
- };
2178
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2179
- vectorIndexes: {
2180
- vector: {
2181
- vectorField: "vector";
2182
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2183
- filterFields: "model_table_userId" | "model_table_threadId";
2184
- };
2185
- };
2186
- };
2187
- embeddings_3072: {
2188
- document: {
2189
- _id: import("convex/values").GenericId<"embeddings_3072">;
2190
- _creationTime: number;
2191
- userId?: string | undefined;
2192
- threadId?: string | undefined;
2193
- model_table_userId?: string[] | undefined;
2194
- model_table_threadId?: string[] | undefined;
2195
- model: string;
2196
- table: string;
2197
2267
  vector: number[];
2198
- };
2199
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2200
- indexes: {
2201
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2202
- by_id: ["_id"];
2203
- by_creation_time: ["_creationTime"];
2204
- };
2205
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2206
- vectorIndexes: {
2207
- vector: {
2208
- vectorField: "vector";
2209
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2210
- filterFields: "model_table_userId" | "model_table_threadId";
2211
- };
2212
- };
2213
- };
2214
- embeddings_4096: {
2215
- document: {
2216
- _id: import("convex/values").GenericId<"embeddings_4096">;
2217
- _creationTime: number;
2218
- userId?: string | undefined;
2219
- threadId?: string | undefined;
2220
- model_table_userId?: string[] | undefined;
2221
- model_table_threadId?: string[] | undefined;
2222
- model: string;
2223
2268
  table: string;
2224
- vector: number[];
2225
2269
  };
2226
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2270
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2227
2271
  indexes: {
2228
2272
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2229
2273
  by_id: ["_id"];
2230
2274
  by_creation_time: ["_creationTime"];
2231
2275
  };
2232
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2233
- vectorIndexes: {
2234
- vector: {
2235
- vectorField: "vector";
2236
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2237
- filterFields: "model_table_userId" | "model_table_threadId";
2238
- };
2239
- };
2240
- };
2241
- files: {
2242
- document: {
2243
- _id: import("convex/values").GenericId<"files">;
2244
- _creationTime: number;
2245
- filename?: string | undefined;
2246
- mimeType: string;
2247
- storageId: string;
2248
- hash: string;
2249
- refcount: number;
2250
- lastTouchedAt: number;
2251
- };
2252
- fieldPaths: "_id" | ("_creationTime" | "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt");
2253
- indexes: {
2254
- hash: ["hash", "_creationTime"];
2255
- refcount: ["refcount", "_creationTime"];
2256
- by_id: ["_id"];
2257
- by_creation_time: ["_creationTime"];
2258
- };
2259
- searchIndexes: {};
2260
- vectorIndexes: {};
2261
- };
2262
- messages: {
2263
- document: {
2264
- _id: import("convex/values").GenericId<"messages">;
2265
- _creationTime: number;
2266
- id?: string | undefined;
2267
- userId?: string | undefined;
2268
- 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;
2269
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2270
- files?: any[] | undefined;
2271
- error?: string | undefined;
2272
- agentName?: string | undefined;
2273
- model?: string | undefined;
2274
- provider?: string | undefined;
2275
- providerOptions?: Record<string, Record<string, any>> | undefined;
2276
- message?: {
2277
- providerOptions?: Record<string, Record<string, any>> | undefined;
2278
- role: "user";
2279
- content: string | ({
2280
- providerOptions?: Record<string, Record<string, any>> | undefined;
2281
- type: "text";
2282
- text: string;
2283
- } | {
2284
- providerOptions?: Record<string, Record<string, any>> | undefined;
2285
- mimeType?: string | undefined;
2286
- type: "image";
2287
- image: string | ArrayBuffer;
2288
- } | {
2289
- providerOptions?: Record<string, Record<string, any>> | undefined;
2290
- filename?: string | undefined;
2291
- type: "file";
2292
- mimeType: string;
2293
- data: string | ArrayBuffer;
2294
- })[];
2295
- } | {
2296
- providerOptions?: Record<string, Record<string, any>> | undefined;
2297
- role: "assistant";
2298
- content: string | ({
2299
- providerOptions?: Record<string, Record<string, any>> | undefined;
2300
- type: "text";
2301
- text: string;
2302
- } | {
2303
- providerOptions?: Record<string, Record<string, any>> | undefined;
2304
- filename?: string | undefined;
2305
- type: "file";
2306
- mimeType: string;
2307
- data: string | ArrayBuffer;
2308
- } | {
2309
- providerOptions?: Record<string, Record<string, any>> | undefined;
2310
- signature?: string | undefined;
2311
- type: "reasoning";
2312
- text: string;
2313
- } | {
2314
- providerOptions?: Record<string, Record<string, any>> | undefined;
2315
- type: "redacted-reasoning";
2316
- data: string;
2317
- } | {
2318
- providerOptions?: Record<string, Record<string, any>> | undefined;
2319
- type: "tool-call";
2320
- toolCallId: string;
2321
- toolName: string;
2322
- args: any;
2323
- })[];
2324
- } | {
2325
- providerOptions?: Record<string, Record<string, any>> | undefined;
2326
- role: "tool";
2327
- content: {
2328
- providerOptions?: Record<string, Record<string, any>> | undefined;
2329
- args?: any;
2330
- experimental_content?: ({
2331
- type: "text";
2332
- text: string;
2333
- } | {
2334
- mimeType?: string | undefined;
2335
- type: "image";
2336
- data: string;
2337
- })[] | undefined;
2338
- isError?: boolean | undefined;
2339
- type: "tool-result";
2340
- toolCallId: string;
2341
- toolName: string;
2342
- result: any;
2343
- }[];
2344
- } | {
2345
- providerOptions?: Record<string, Record<string, any>> | undefined;
2346
- role: "system";
2347
- content: string;
2348
- } | undefined;
2349
- text?: string | undefined;
2350
- reasoning?: string | undefined;
2351
- usage?: {
2352
- promptTokens: number;
2353
- completionTokens: number;
2354
- totalTokens: number;
2355
- } | undefined;
2356
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2357
- sources?: {
2358
- title?: string | undefined;
2359
- providerOptions?: Record<string, Record<string, any>> | undefined;
2360
- id: string;
2361
- sourceType: "url";
2362
- url: string;
2363
- }[] | undefined;
2364
- reasoningDetails?: ({
2365
- signature?: string | undefined;
2366
- type: "text";
2367
- text: string;
2368
- } | {
2369
- type: "redacted";
2370
- data: string;
2371
- })[] | undefined;
2372
- warnings?: ({
2373
- details?: string | undefined;
2374
- type: "unsupported-setting";
2375
- setting: string;
2376
- } | {
2377
- details?: string | undefined;
2378
- type: "unsupported-tool";
2379
- tool: any;
2380
- } | {
2381
- type: "other";
2382
- message: string;
2383
- })[] | undefined;
2384
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2385
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2386
- stepId?: string | undefined;
2387
- status: "pending" | "success" | "failed";
2388
- order: number;
2389
- threadId: import("convex/values").GenericId<"threads">;
2390
- stepOrder: number;
2391
- tool: boolean;
2276
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
2277
+ vectorIndexes: {
2278
+ vector: {
2279
+ vectorField: "vector";
2280
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2281
+ filterFields: "model_table_userId" | "model_table_threadId";
2282
+ };
2283
+ };
2284
+ };
2285
+ embeddings_1536: {
2286
+ document: {
2287
+ _id: import("convex/values").GenericId<"embeddings_1536">;
2288
+ _creationTime: number;
2289
+ userId?: string | undefined;
2290
+ threadId?: string | undefined;
2291
+ model_table_userId?: string[] | undefined;
2292
+ model_table_threadId?: string[] | undefined;
2293
+ model: string;
2294
+ vector: number[];
2295
+ table: string;
2392
2296
  };
2393
- 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}`);
2297
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2394
2298
  indexes: {
2395
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2396
- embeddingId: ["embeddingId", "_creationTime"];
2299
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2397
2300
  by_id: ["_id"];
2398
2301
  by_creation_time: ["_creationTime"];
2399
2302
  };
2400
- searchIndexes: {
2401
- text_search: {
2402
- searchField: "text";
2403
- filterFields: "userId" | "threadId";
2303
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
2304
+ vectorIndexes: {
2305
+ vector: {
2306
+ vectorField: "vector";
2307
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2308
+ filterFields: "model_table_userId" | "model_table_threadId";
2309
+ };
2310
+ };
2311
+ };
2312
+ embeddings_2048: {
2313
+ document: {
2314
+ _id: import("convex/values").GenericId<"embeddings_2048">;
2315
+ _creationTime: number;
2316
+ userId?: string | undefined;
2317
+ threadId?: string | undefined;
2318
+ model_table_userId?: string[] | undefined;
2319
+ model_table_threadId?: string[] | undefined;
2320
+ model: string;
2321
+ vector: number[];
2322
+ table: string;
2323
+ };
2324
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2325
+ indexes: {
2326
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2327
+ by_id: ["_id"];
2328
+ by_creation_time: ["_creationTime"];
2329
+ };
2330
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
2331
+ vectorIndexes: {
2332
+ vector: {
2333
+ vectorField: "vector";
2334
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2335
+ filterFields: "model_table_userId" | "model_table_threadId";
2336
+ };
2337
+ };
2338
+ };
2339
+ embeddings_3072: {
2340
+ document: {
2341
+ _id: import("convex/values").GenericId<"embeddings_3072">;
2342
+ _creationTime: number;
2343
+ userId?: string | undefined;
2344
+ threadId?: string | undefined;
2345
+ model_table_userId?: string[] | undefined;
2346
+ model_table_threadId?: string[] | undefined;
2347
+ model: string;
2348
+ vector: number[];
2349
+ table: string;
2350
+ };
2351
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2352
+ indexes: {
2353
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2354
+ by_id: ["_id"];
2355
+ by_creation_time: ["_creationTime"];
2356
+ };
2357
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
2358
+ vectorIndexes: {
2359
+ vector: {
2360
+ vectorField: "vector";
2361
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2362
+ filterFields: "model_table_userId" | "model_table_threadId";
2363
+ };
2364
+ };
2365
+ };
2366
+ embeddings_4096: {
2367
+ document: {
2368
+ _id: import("convex/values").GenericId<"embeddings_4096">;
2369
+ _creationTime: number;
2370
+ userId?: string | undefined;
2371
+ threadId?: string | undefined;
2372
+ model_table_userId?: string[] | undefined;
2373
+ model_table_threadId?: string[] | undefined;
2374
+ model: string;
2375
+ vector: number[];
2376
+ table: string;
2377
+ };
2378
+ fieldPaths: "_id" | ("model" | "vector" | "userId" | "threadId" | "_creationTime" | "table" | "model_table_userId" | "model_table_threadId");
2379
+ indexes: {
2380
+ model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2381
+ by_id: ["_id"];
2382
+ by_creation_time: ["_creationTime"];
2383
+ };
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";
2404
2390
  };
2405
2391
  };
2406
- vectorIndexes: {};
2407
2392
  };
2408
2393
  streamingMessages: {
2409
2394
  document: {
2410
2395
  _id: import("convex/values").GenericId<"streamingMessages">;
2411
2396
  _creationTime: number;
2412
- userId?: string | undefined;
2413
- agentName?: string | undefined;
2397
+ providerOptions?: Record<string, Record<string, any>> | undefined;
2414
2398
  model?: string | undefined;
2415
2399
  provider?: string | undefined;
2416
- providerOptions?: Record<string, Record<string, any>> | undefined;
2417
- order: number;
2400
+ userId?: string | undefined;
2401
+ agentName?: string | undefined;
2418
2402
  threadId: import("convex/values").GenericId<"threads">;
2403
+ order: number;
2419
2404
  stepOrder: number;
2420
2405
  state: {
2421
2406
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
@@ -2427,12 +2412,9 @@ export declare const vv: {
2427
2412
  } | {
2428
2413
  kind: "aborted";
2429
2414
  reason: string;
2430
- } | {
2431
- error: string;
2432
- kind: "error";
2433
2415
  };
2434
2416
  };
2435
- fieldPaths: "_id" | ("_creationTime" | "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason");
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";
2436
2418
  indexes: {
2437
2419
  threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
2438
2420
  by_id: ["_id"];
@@ -2479,8 +2461,8 @@ export declare const vv: {
2479
2461
  } | {
2480
2462
  type: "source";
2481
2463
  source: {
2482
- title?: string | undefined;
2483
2464
  providerOptions?: Record<string, Record<string, any>> | undefined;
2465
+ title?: string | undefined;
2484
2466
  id: string;
2485
2467
  sourceType: "url";
2486
2468
  url: string;
@@ -2496,7 +2478,7 @@ export declare const vv: {
2496
2478
  argsTextDelta: string;
2497
2479
  })[];
2498
2480
  };
2499
- fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
2481
+ fieldPaths: ("streamId" | "start" | "end" | "parts" | "_creationTime") | "_id";
2500
2482
  indexes: {
2501
2483
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
2502
2484
  by_id: ["_id"];
@@ -2514,7 +2496,7 @@ export declare const vv: {
2514
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;
2515
2497
  memory: string;
2516
2498
  };
2517
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "embeddingId" | "memory");
2499
+ fieldPaths: ("userId" | "threadId" | "_creationTime" | "embeddingId" | "memory") | "_id";
2518
2500
  indexes: {
2519
2501
  threadId: ["threadId", "_creationTime"];
2520
2502
  userId: ["userId", "_creationTime"];
@@ -2531,7 +2513,7 @@ export declare const vv: {
2531
2513
  _creationTime: number;
2532
2514
  name?: string | undefined;
2533
2515
  };
2534
- fieldPaths: "_id" | ("_creationTime" | "name");
2516
+ fieldPaths: ("_creationTime" | "name") | "_id";
2535
2517
  indexes: {
2536
2518
  name: ["name", "_creationTime"];
2537
2519
  by_id: ["_id"];
@@ -2554,8 +2536,8 @@ export declare const vv: {
2554
2536
  model_table_userId?: string[] | undefined;
2555
2537
  model_table_threadId?: string[] | undefined;
2556
2538
  model: string;
2557
- table: string;
2558
2539
  vector: number[];
2540
+ table: string;
2559
2541
  }, {
2560
2542
  model: import("convex/values").VString<string, "required">;
2561
2543
  table: import("convex/values").VString<string, "required">;
@@ -2564,7 +2546,7 @@ export declare const vv: {
2564
2546
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2565
2547
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2566
2548
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2567
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2549
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2568
2550
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2569
2551
  }, import("convex/server").GenericTableSearchIndexes, {
2570
2552
  vector: {
@@ -2579,8 +2561,8 @@ export declare const vv: {
2579
2561
  model_table_userId?: string[] | undefined;
2580
2562
  model_table_threadId?: string[] | undefined;
2581
2563
  model: string;
2582
- table: string;
2583
2564
  vector: number[];
2565
+ table: string;
2584
2566
  }, {
2585
2567
  model: import("convex/values").VString<string, "required">;
2586
2568
  table: import("convex/values").VString<string, "required">;
@@ -2589,7 +2571,7 @@ export declare const vv: {
2589
2571
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2590
2572
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2591
2573
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2592
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2574
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2593
2575
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2594
2576
  }, import("convex/server").GenericTableSearchIndexes, {
2595
2577
  vector: {
@@ -2604,8 +2586,8 @@ export declare const vv: {
2604
2586
  model_table_userId?: string[] | undefined;
2605
2587
  model_table_threadId?: string[] | undefined;
2606
2588
  model: string;
2607
- table: string;
2608
2589
  vector: number[];
2590
+ table: string;
2609
2591
  }, {
2610
2592
  model: import("convex/values").VString<string, "required">;
2611
2593
  table: import("convex/values").VString<string, "required">;
@@ -2614,7 +2596,7 @@ export declare const vv: {
2614
2596
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2615
2597
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2616
2598
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2617
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2599
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2618
2600
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2619
2601
  }, import("convex/server").GenericTableSearchIndexes, {
2620
2602
  vector: {
@@ -2629,8 +2611,8 @@ export declare const vv: {
2629
2611
  model_table_userId?: string[] | undefined;
2630
2612
  model_table_threadId?: string[] | undefined;
2631
2613
  model: string;
2632
- table: string;
2633
2614
  vector: number[];
2615
+ table: string;
2634
2616
  }, {
2635
2617
  model: import("convex/values").VString<string, "required">;
2636
2618
  table: import("convex/values").VString<string, "required">;
@@ -2639,7 +2621,7 @@ export declare const vv: {
2639
2621
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2640
2622
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2641
2623
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2642
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2624
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2643
2625
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2644
2626
  }, import("convex/server").GenericTableSearchIndexes, {
2645
2627
  vector: {
@@ -2654,8 +2636,8 @@ export declare const vv: {
2654
2636
  model_table_userId?: string[] | undefined;
2655
2637
  model_table_threadId?: string[] | undefined;
2656
2638
  model: string;
2657
- table: string;
2658
2639
  vector: number[];
2640
+ table: string;
2659
2641
  }, {
2660
2642
  model: import("convex/values").VString<string, "required">;
2661
2643
  table: import("convex/values").VString<string, "required">;
@@ -2664,7 +2646,7 @@ export declare const vv: {
2664
2646
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2665
2647
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2666
2648
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2667
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2649
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2668
2650
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2669
2651
  }, import("convex/server").GenericTableSearchIndexes, {
2670
2652
  vector: {
@@ -2679,8 +2661,8 @@ export declare const vv: {
2679
2661
  model_table_userId?: string[] | undefined;
2680
2662
  model_table_threadId?: string[] | undefined;
2681
2663
  model: string;
2682
- table: string;
2683
2664
  vector: number[];
2665
+ table: string;
2684
2666
  }, {
2685
2667
  model: import("convex/values").VString<string, "required">;
2686
2668
  table: import("convex/values").VString<string, "required">;
@@ -2689,7 +2671,7 @@ export declare const vv: {
2689
2671
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2690
2672
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2691
2673
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2692
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2674
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2693
2675
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2694
2676
  }, import("convex/server").GenericTableSearchIndexes, {
2695
2677
  vector: {
@@ -2704,8 +2686,8 @@ export declare const vv: {
2704
2686
  model_table_userId?: string[] | undefined;
2705
2687
  model_table_threadId?: string[] | undefined;
2706
2688
  model: string;
2707
- table: string;
2708
2689
  vector: number[];
2690
+ table: string;
2709
2691
  }, {
2710
2692
  model: import("convex/values").VString<string, "required">;
2711
2693
  table: import("convex/values").VString<string, "required">;
@@ -2714,7 +2696,7 @@ export declare const vv: {
2714
2696
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2715
2697
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2716
2698
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2717
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2699
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2718
2700
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2719
2701
  }, import("convex/server").GenericTableSearchIndexes, {
2720
2702
  vector: {
@@ -2729,8 +2711,8 @@ export declare const vv: {
2729
2711
  model_table_userId?: string[] | undefined;
2730
2712
  model_table_threadId?: string[] | undefined;
2731
2713
  model: string;
2732
- table: string;
2733
2714
  vector: number[];
2715
+ table: string;
2734
2716
  }, {
2735
2717
  model: import("convex/values").VString<string, "required">;
2736
2718
  table: import("convex/values").VString<string, "required">;
@@ -2739,7 +2721,7 @@ export declare const vv: {
2739
2721
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2740
2722
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2741
2723
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2742
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2724
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2743
2725
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2744
2726
  }, import("convex/server").GenericTableSearchIndexes, {
2745
2727
  vector: {
@@ -2754,8 +2736,8 @@ export declare const vv: {
2754
2736
  model_table_userId?: string[] | undefined;
2755
2737
  model_table_threadId?: string[] | undefined;
2756
2738
  model: string;
2757
- table: string;
2758
2739
  vector: number[];
2740
+ table: string;
2759
2741
  }, {
2760
2742
  model: import("convex/values").VString<string, "required">;
2761
2743
  table: import("convex/values").VString<string, "required">;
@@ -2764,7 +2746,7 @@ export declare const vv: {
2764
2746
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2765
2747
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2766
2748
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2767
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2749
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2768
2750
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2769
2751
  }, import("convex/server").GenericTableSearchIndexes, {
2770
2752
  vector: {
@@ -2779,8 +2761,8 @@ export declare const vv: {
2779
2761
  model_table_userId?: string[] | undefined;
2780
2762
  model_table_threadId?: string[] | undefined;
2781
2763
  model: string;
2782
- table: string;
2783
2764
  vector: number[];
2765
+ table: string;
2784
2766
  }, {
2785
2767
  model: import("convex/values").VString<string, "required">;
2786
2768
  table: import("convex/values").VString<string, "required">;
@@ -2789,7 +2771,7 @@ export declare const vv: {
2789
2771
  model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2790
2772
  model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2791
2773
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2792
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2774
+ }, "required", "model" | "vector" | "userId" | "threadId" | "table" | "model_table_userId" | "model_table_threadId">, {
2793
2775
  model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2794
2776
  }, import("convex/server").GenericTableSearchIndexes, {
2795
2777
  vector: {
@@ -2799,12 +2781,12 @@ export declare const vv: {
2799
2781
  };
2800
2782
  }>;
2801
2783
  threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
2802
- userId?: string | undefined;
2803
2784
  title?: string | undefined;
2785
+ userId?: string | undefined;
2786
+ order?: number | undefined;
2804
2787
  summary?: string | undefined;
2805
2788
  defaultSystemPrompt?: string | undefined;
2806
2789
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
2807
- order?: number | undefined;
2808
2790
  status: "active" | "archived";
2809
2791
  }, {
2810
2792
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -2814,20 +2796,14 @@ export declare const vv: {
2814
2796
  defaultSystemPrompt: import("convex/values").VString<string | undefined, "optional">;
2815
2797
  parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
2816
2798
  order: import("convex/values").VFloat64<number | undefined, "optional">;
2817
- }, "required", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
2799
+ }, "required", "title" | "userId" | "status" | "order" | "summary" | "defaultSystemPrompt" | "parentThreadIds">, {
2818
2800
  userId: ["userId", "_creationTime"];
2819
2801
  }, {}, {}>;
2820
2802
  messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
2821
2803
  id?: string | undefined;
2822
- userId?: string | undefined;
2823
- 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;
2824
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2825
- files?: any[] | undefined;
2826
- error?: string | undefined;
2827
- agentName?: string | undefined;
2828
- model?: string | undefined;
2829
- provider?: string | undefined;
2804
+ text?: string | undefined;
2830
2805
  providerOptions?: Record<string, Record<string, any>> | undefined;
2806
+ reasoning?: string | undefined;
2831
2807
  message?: {
2832
2808
  providerOptions?: Record<string, Record<string, any>> | undefined;
2833
2809
  role: "user";
@@ -2901,17 +2877,16 @@ export declare const vv: {
2901
2877
  role: "system";
2902
2878
  content: string;
2903
2879
  } | undefined;
2904
- text?: string | undefined;
2905
- reasoning?: string | undefined;
2906
- usage?: {
2907
- promptTokens: number;
2908
- completionTokens: number;
2909
- totalTokens: number;
2910
- } | 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;
2911
2886
  providerMetadata?: Record<string, Record<string, any>> | undefined;
2912
2887
  sources?: {
2913
- title?: string | undefined;
2914
2888
  providerOptions?: Record<string, Record<string, any>> | undefined;
2889
+ title?: string | undefined;
2915
2890
  id: string;
2916
2891
  sourceType: "url";
2917
2892
  url: string;
@@ -2924,6 +2899,11 @@ export declare const vv: {
2924
2899
  type: "redacted";
2925
2900
  data: string;
2926
2901
  })[] | undefined;
2902
+ usage?: {
2903
+ promptTokens: number;
2904
+ completionTokens: number;
2905
+ totalTokens: number;
2906
+ } | undefined;
2927
2907
  warnings?: ({
2928
2908
  details?: string | undefined;
2929
2909
  type: "unsupported-setting";
@@ -2936,14 +2916,16 @@ export declare const vv: {
2936
2916
  type: "other";
2937
2917
  message: string;
2938
2918
  })[] | undefined;
2939
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | 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;
2940
2922
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2941
2923
  stepId?: string | undefined;
2924
+ tool: boolean;
2925
+ threadId: import("convex/values").GenericId<"threads">;
2942
2926
  status: "pending" | "success" | "failed";
2943
2927
  order: number;
2944
- threadId: import("convex/values").GenericId<"threads">;
2945
2928
  stepOrder: number;
2946
- tool: boolean;
2947
2929
  }, {
2948
2930
  id: import("convex/values").VString<string | undefined, "optional">;
2949
2931
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -3104,7 +3086,7 @@ export declare const vv: {
3104
3086
  type: import("convex/values").VLiteral<"text", "required">;
3105
3087
  text: import("convex/values").VString<string, "required">;
3106
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>;
3107
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3089
+ }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
3108
3090
  providerOptions?: Record<string, Record<string, any>> | undefined;
3109
3091
  mimeType?: string | undefined;
3110
3092
  type: "image";
@@ -3126,9 +3108,9 @@ export declare const vv: {
3126
3108
  filename: import("convex/values").VString<string | undefined, "optional">;
3127
3109
  mimeType: import("convex/values").VString<string, "required">;
3128
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>;
3129
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
3111
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
3130
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>;
3131
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3113
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
3132
3114
  providerOptions?: Record<string, Record<string, any>> | undefined;
3133
3115
  role: "assistant";
3134
3116
  content: string | ({
@@ -3242,7 +3224,7 @@ export declare const vv: {
3242
3224
  type: import("convex/values").VLiteral<"text", "required">;
3243
3225
  text: import("convex/values").VString<string, "required">;
3244
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>;
3245
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3227
+ }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
3246
3228
  providerOptions?: Record<string, Record<string, any>> | undefined;
3247
3229
  filename?: string | undefined;
3248
3230
  type: "file";
@@ -3264,7 +3246,7 @@ export declare const vv: {
3264
3246
  text: import("convex/values").VString<string, "required">;
3265
3247
  signature: import("convex/values").VString<string | undefined, "optional">;
3266
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>;
3267
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
3249
+ }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
3268
3250
  providerOptions?: Record<string, Record<string, any>> | undefined;
3269
3251
  type: "redacted-reasoning";
3270
3252
  data: string;
@@ -3284,9 +3266,9 @@ export declare const vv: {
3284
3266
  toolName: import("convex/values").VString<string, "required">;
3285
3267
  args: import("convex/values").VAny<any, "required", string>;
3286
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>;
3287
- }, "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>;
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>;
3288
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>;
3289
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3271
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
3290
3272
  providerOptions?: Record<string, Record<string, any>> | undefined;
3291
3273
  role: "tool";
3292
3274
  content: {
@@ -3379,7 +3361,7 @@ export declare const vv: {
3379
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>;
3380
3362
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
3381
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>;
3382
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3364
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
3383
3365
  providerOptions?: Record<string, Record<string, any>> | undefined;
3384
3366
  role: "system";
3385
3367
  content: string;
@@ -3387,7 +3369,7 @@ export declare const vv: {
3387
3369
  role: import("convex/values").VLiteral<"system", "required">;
3388
3370
  content: import("convex/values").VString<string, "required">;
3389
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>;
3390
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
3372
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">], "optional", "providerOptions" | `providerOptions.${string}` | "role" | "content">;
3391
3373
  tool: import("convex/values").VBoolean<boolean, "required">;
3392
3374
  text: import("convex/values").VString<string | undefined, "optional">;
3393
3375
  usage: import("convex/values").VObject<{
@@ -3401,14 +3383,14 @@ export declare const vv: {
3401
3383
  }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
3402
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>;
3403
3385
  sources: import("convex/values").VArray<{
3404
- title?: string | undefined;
3405
3386
  providerOptions?: Record<string, Record<string, any>> | undefined;
3387
+ title?: string | undefined;
3406
3388
  id: string;
3407
3389
  sourceType: "url";
3408
3390
  url: string;
3409
3391
  }[] | undefined, import("convex/values").VObject<{
3410
- title?: string | undefined;
3411
3392
  providerOptions?: Record<string, Record<string, any>> | undefined;
3393
+ title?: string | undefined;
3412
3394
  id: string;
3413
3395
  sourceType: "url";
3414
3396
  url: string;
@@ -3418,7 +3400,7 @@ export declare const vv: {
3418
3400
  url: import("convex/values").VString<string, "required">;
3419
3401
  title: import("convex/values").VString<string | undefined, "optional">;
3420
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>;
3421
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
3403
+ }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">, "optional">;
3422
3404
  reasoning: import("convex/values").VString<string | undefined, "optional">;
3423
3405
  reasoningDetails: import("convex/values").VArray<({
3424
3406
  signature?: string | undefined;
@@ -3493,12 +3475,12 @@ export declare const vv: {
3493
3475
  }, {
3494
3476
  type: import("convex/values").VLiteral<"other", "required">;
3495
3477
  message: import("convex/values").VString<string, "required">;
3496
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
3497
- 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>;
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>;
3498
3480
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
3499
3481
  stepId: import("convex/values").VString<string | undefined, "optional">;
3500
3482
  files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
3501
- }, "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}`>, {
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">, {
3502
3484
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
3503
3485
  embeddingId: ["embeddingId", "_creationTime"];
3504
3486
  }, {
@@ -3508,13 +3490,13 @@ export declare const vv: {
3508
3490
  };
3509
3491
  }, {}>;
3510
3492
  streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
3511
- userId?: string | undefined;
3512
- agentName?: string | undefined;
3493
+ providerOptions?: Record<string, Record<string, any>> | undefined;
3513
3494
  model?: string | undefined;
3514
3495
  provider?: string | undefined;
3515
- providerOptions?: Record<string, Record<string, any>> | undefined;
3516
- order: number;
3496
+ userId?: string | undefined;
3497
+ agentName?: string | undefined;
3517
3498
  threadId: import("convex/values").GenericId<"threads">;
3499
+ order: number;
3518
3500
  stepOrder: number;
3519
3501
  state: {
3520
3502
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
@@ -3526,9 +3508,6 @@ export declare const vv: {
3526
3508
  } | {
3527
3509
  kind: "aborted";
3528
3510
  reason: string;
3529
- } | {
3530
- error: string;
3531
- kind: "error";
3532
3511
  };
3533
3512
  }, {
3534
3513
  userId: import("convex/values").VString<string | undefined, "optional">;
@@ -3554,9 +3533,6 @@ export declare const vv: {
3554
3533
  } | {
3555
3534
  kind: "aborted";
3556
3535
  reason: string;
3557
- } | {
3558
- error: string;
3559
- kind: "error";
3560
3536
  }, [import("convex/values").VObject<{
3561
3537
  timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3562
3538
  kind: "streaming";
@@ -3577,14 +3553,8 @@ export declare const vv: {
3577
3553
  }, {
3578
3554
  kind: import("convex/values").VLiteral<"aborted", "required">;
3579
3555
  reason: import("convex/values").VString<string, "required">;
3580
- }, "required", "kind" | "reason">, import("convex/values").VObject<{
3581
- error: string;
3582
- kind: "error";
3583
- }, {
3584
- kind: import("convex/values").VLiteral<"error", "required">;
3585
- error: import("convex/values").VString<string, "required">;
3586
- }, "required", "error" | "kind">], "required", "error" | "kind" | "lastHeartbeat" | "timeoutFnId" | "endedAt" | "reason">;
3587
- }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.error" | "state.kind" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt" | "state.reason">, {
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">, {
3588
3558
  threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
3589
3559
  }, {}, {}>;
3590
3560
  streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
@@ -3622,8 +3592,8 @@ export declare const vv: {
3622
3592
  } | {
3623
3593
  type: "source";
3624
3594
  source: {
3625
- title?: string | undefined;
3626
3595
  providerOptions?: Record<string, Record<string, any>> | undefined;
3596
+ title?: string | undefined;
3627
3597
  id: string;
3628
3598
  sourceType: "url";
3629
3599
  url: string;
@@ -3673,8 +3643,8 @@ export declare const vv: {
3673
3643
  } | {
3674
3644
  type: "source";
3675
3645
  source: {
3676
- title?: string | undefined;
3677
3646
  providerOptions?: Record<string, Record<string, any>> | undefined;
3647
+ title?: string | undefined;
3678
3648
  id: string;
3679
3649
  sourceType: "url";
3680
3650
  url: string;
@@ -3719,8 +3689,8 @@ export declare const vv: {
3719
3689
  } | {
3720
3690
  type: "source";
3721
3691
  source: {
3722
- title?: string | undefined;
3723
3692
  providerOptions?: Record<string, Record<string, any>> | undefined;
3693
+ title?: string | undefined;
3724
3694
  id: string;
3725
3695
  sourceType: "url";
3726
3696
  url: string;
@@ -3749,8 +3719,8 @@ export declare const vv: {
3749
3719
  }, "required", "type" | "textDelta">, import("convex/values").VObject<{
3750
3720
  type: "source";
3751
3721
  source: {
3752
- title?: string | undefined;
3753
3722
  providerOptions?: Record<string, Record<string, any>> | undefined;
3723
+ title?: string | undefined;
3754
3724
  id: string;
3755
3725
  sourceType: "url";
3756
3726
  url: string;
@@ -3758,8 +3728,8 @@ export declare const vv: {
3758
3728
  }, {
3759
3729
  type: import("convex/values").VLiteral<"source", "required">;
3760
3730
  source: import("convex/values").VObject<{
3761
- title?: string | undefined;
3762
3731
  providerOptions?: Record<string, Record<string, any>> | undefined;
3732
+ title?: string | undefined;
3763
3733
  id: string;
3764
3734
  sourceType: "url";
3765
3735
  url: string;
@@ -3769,8 +3739,8 @@ export declare const vv: {
3769
3739
  url: import("convex/values").VString<string, "required">;
3770
3740
  title: import("convex/values").VString<string | undefined, "optional">;
3771
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>;
3772
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
3773
- }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
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<{
3774
3744
  providerOptions?: Record<string, Record<string, any>> | undefined;
3775
3745
  type: "tool-call";
3776
3746
  toolCallId: string;
@@ -3853,7 +3823,7 @@ export declare const vv: {
3853
3823
  }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3854
3824
  isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3855
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>;
3856
- }, "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">;
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">;
3857
3827
  }, "required", "streamId" | "start" | "end" | "parts">, {
3858
3828
  streamId_start_end: ["streamId", "start", "end", "_creationTime"];
3859
3829
  }, {}, {}>;
@@ -3912,12 +3882,12 @@ export declare const vv: {
3912
3882
  };
3913
3883
  export { vv as v };
3914
3884
  export declare const vThreadDoc: import("convex/values").VObject<{
3915
- userId?: string | undefined;
3916
3885
  title?: string | undefined;
3886
+ userId?: string | undefined;
3917
3887
  summary?: string | undefined;
3918
- _id: string;
3919
- _creationTime: number;
3920
3888
  status: "active" | "archived";
3889
+ _creationTime: number;
3890
+ _id: string;
3921
3891
  }, {
3922
3892
  _id: import("convex/values").VString<string, "required">;
3923
3893
  _creationTime: import("convex/values").VFloat64<number, "required">;
@@ -3925,18 +3895,13 @@ export declare const vThreadDoc: import("convex/values").VObject<{
3925
3895
  title: import("convex/values").VString<string | undefined, "optional">;
3926
3896
  summary: import("convex/values").VString<string | undefined, "optional">;
3927
3897
  status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
3928
- }, "required", "_id" | "_creationTime" | "status" | "userId" | "title" | "summary">;
3898
+ }, "required", "title" | "userId" | "status" | "summary" | "_creationTime" | "_id">;
3929
3899
  export type ThreadDoc = Infer<typeof vThreadDoc>;
3930
3900
  export declare const vMessageDoc: import("convex/values").VObject<{
3931
3901
  id?: string | undefined;
3932
- userId?: string | undefined;
3933
- embeddingId?: string | undefined;
3934
- fileIds?: string[] | undefined;
3935
- error?: string | undefined;
3936
- agentName?: string | undefined;
3937
- model?: string | undefined;
3938
- provider?: string | undefined;
3902
+ text?: string | undefined;
3939
3903
  providerOptions?: Record<string, Record<string, any>> | undefined;
3904
+ reasoning?: string | undefined;
3940
3905
  message?: {
3941
3906
  providerOptions?: Record<string, Record<string, any>> | undefined;
3942
3907
  role: "user";
@@ -4010,17 +3975,15 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4010
3975
  role: "system";
4011
3976
  content: string;
4012
3977
  } | undefined;
4013
- text?: string | undefined;
4014
- reasoning?: string | undefined;
4015
- usage?: {
4016
- promptTokens: number;
4017
- completionTokens: number;
4018
- totalTokens: number;
4019
- } | 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;
4020
3983
  providerMetadata?: Record<string, Record<string, any>> | undefined;
4021
3984
  sources?: {
4022
- title?: string | undefined;
4023
3985
  providerOptions?: Record<string, Record<string, any>> | undefined;
3986
+ title?: string | undefined;
4024
3987
  id: string;
4025
3988
  sourceType: "url";
4026
3989
  url: string;
@@ -4033,6 +3996,11 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4033
3996
  type: "redacted";
4034
3997
  data: string;
4035
3998
  })[] | undefined;
3999
+ usage?: {
4000
+ promptTokens: number;
4001
+ completionTokens: number;
4002
+ totalTokens: number;
4003
+ } | undefined;
4036
4004
  warnings?: ({
4037
4005
  details?: string | undefined;
4038
4006
  type: "unsupported-setting";
@@ -4045,14 +4013,16 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4045
4013
  type: "other";
4046
4014
  message: string;
4047
4015
  })[] | undefined;
4048
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
4049
- _id: string;
4050
- _creationTime: number;
4016
+ userId?: string | undefined;
4017
+ agentName?: string | undefined;
4018
+ embeddingId?: string | undefined;
4019
+ tool: boolean;
4020
+ threadId: string;
4051
4021
  status: "pending" | "success" | "failed";
4052
4022
  order: number;
4053
- threadId: string;
4054
4023
  stepOrder: number;
4055
- tool: boolean;
4024
+ _creationTime: number;
4025
+ _id: string;
4056
4026
  }, {
4057
4027
  threadId: import("convex/values").VString<string, "required">;
4058
4028
  embeddingId: import("convex/values").VString<string | undefined, "optional">;
@@ -4213,7 +4183,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4213
4183
  type: import("convex/values").VLiteral<"text", "required">;
4214
4184
  text: import("convex/values").VString<string, "required">;
4215
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>;
4216
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
4186
+ }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
4217
4187
  providerOptions?: Record<string, Record<string, any>> | undefined;
4218
4188
  mimeType?: string | undefined;
4219
4189
  type: "image";
@@ -4235,9 +4205,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4235
4205
  filename: import("convex/values").VString<string | undefined, "optional">;
4236
4206
  mimeType: import("convex/values").VString<string, "required">;
4237
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>;
4238
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
4208
+ }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
4239
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>;
4240
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4210
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
4241
4211
  providerOptions?: Record<string, Record<string, any>> | undefined;
4242
4212
  role: "assistant";
4243
4213
  content: string | ({
@@ -4351,7 +4321,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4351
4321
  type: import("convex/values").VLiteral<"text", "required">;
4352
4322
  text: import("convex/values").VString<string, "required">;
4353
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>;
4354
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
4324
+ }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}`>, import("convex/values").VObject<{
4355
4325
  providerOptions?: Record<string, Record<string, any>> | undefined;
4356
4326
  filename?: string | undefined;
4357
4327
  type: "file";
@@ -4373,7 +4343,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4373
4343
  text: import("convex/values").VString<string, "required">;
4374
4344
  signature: import("convex/values").VString<string | undefined, "optional">;
4375
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>;
4376
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
4346
+ }, "required", "type" | "text" | "providerOptions" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
4377
4347
  providerOptions?: Record<string, Record<string, any>> | undefined;
4378
4348
  type: "redacted-reasoning";
4379
4349
  data: string;
@@ -4393,9 +4363,9 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4393
4363
  toolName: import("convex/values").VString<string, "required">;
4394
4364
  args: import("convex/values").VAny<any, "required", string>;
4395
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>;
4396
- }, "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>;
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>;
4397
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>;
4398
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4368
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
4399
4369
  providerOptions?: Record<string, Record<string, any>> | undefined;
4400
4370
  role: "tool";
4401
4371
  content: {
@@ -4488,7 +4458,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4488
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>;
4489
4459
  }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
4490
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>;
4491
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4461
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">, import("convex/values").VObject<{
4492
4462
  providerOptions?: Record<string, Record<string, any>> | undefined;
4493
4463
  role: "system";
4494
4464
  content: string;
@@ -4496,7 +4466,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4496
4466
  role: import("convex/values").VLiteral<"system", "required">;
4497
4467
  content: import("convex/values").VString<string, "required">;
4498
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>;
4499
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
4469
+ }, "required", "providerOptions" | `providerOptions.${string}` | "role" | "content">], "optional", "providerOptions" | `providerOptions.${string}` | "role" | "content">;
4500
4470
  tool: import("convex/values").VBoolean<boolean, "required">;
4501
4471
  text: import("convex/values").VString<string | undefined, "optional">;
4502
4472
  usage: import("convex/values").VObject<{
@@ -4510,14 +4480,14 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4510
4480
  }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
4511
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>;
4512
4482
  sources: import("convex/values").VArray<{
4513
- title?: string | undefined;
4514
4483
  providerOptions?: Record<string, Record<string, any>> | undefined;
4484
+ title?: string | undefined;
4515
4485
  id: string;
4516
4486
  sourceType: "url";
4517
4487
  url: string;
4518
4488
  }[] | undefined, import("convex/values").VObject<{
4519
- title?: string | undefined;
4520
4489
  providerOptions?: Record<string, Record<string, any>> | undefined;
4490
+ title?: string | undefined;
4521
4491
  id: string;
4522
4492
  sourceType: "url";
4523
4493
  url: string;
@@ -4527,7 +4497,7 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4527
4497
  url: import("convex/values").VString<string, "required">;
4528
4498
  title: import("convex/values").VString<string | undefined, "optional">;
4529
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>;
4530
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
4500
+ }, "required", "id" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url" | "title">, "optional">;
4531
4501
  reasoning: import("convex/values").VString<string | undefined, "optional">;
4532
4502
  reasoningDetails: import("convex/values").VArray<({
4533
4503
  signature?: string | undefined;
@@ -4602,11 +4572,11 @@ export declare const vMessageDoc: import("convex/values").VObject<{
4602
4572
  }, {
4603
4573
  type: import("convex/values").VLiteral<"other", "required">;
4604
4574
  message: import("convex/values").VString<string, "required">;
4605
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
4606
- 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>;
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>;
4607
4577
  _id: import("convex/values").VString<string, "required">;
4608
4578
  _creationTime: import("convex/values").VFloat64<number, "required">;
4609
- }, "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}`>;
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">;
4610
4580
  export type MessageDoc = Infer<typeof vMessageDoc>;
4611
4581
  export default schema;
4612
4582
  //# sourceMappingURL=schema.d.ts.map