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