@convex-dev/agent 0.0.1-alpha.4 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +9 -7
  2. package/dist/commonjs/client/index.d.ts +12 -5
  3. package/dist/commonjs/client/index.d.ts.map +1 -1
  4. package/dist/commonjs/client/index.js +127 -44
  5. package/dist/commonjs/client/index.js.map +1 -1
  6. package/dist/commonjs/component/messages.d.ts +114 -103
  7. package/dist/commonjs/component/messages.d.ts.map +1 -1
  8. package/dist/commonjs/component/messages.js +143 -246
  9. package/dist/commonjs/component/messages.js.map +1 -1
  10. package/dist/commonjs/component/schema.d.ts +808 -738
  11. package/dist/commonjs/component/schema.d.ts.map +1 -1
  12. package/dist/commonjs/component/schema.js +12 -3
  13. package/dist/commonjs/component/schema.js.map +1 -1
  14. package/dist/commonjs/component/vector/index.d.ts +21 -6
  15. package/dist/commonjs/component/vector/index.d.ts.map +1 -1
  16. package/dist/commonjs/component/vector/index.js +33 -21
  17. package/dist/commonjs/component/vector/index.js.map +1 -1
  18. package/dist/commonjs/component/vector/tables.d.ts +25 -5
  19. package/dist/commonjs/component/vector/tables.d.ts.map +1 -1
  20. package/dist/commonjs/component/vector/tables.js +14 -6
  21. package/dist/commonjs/component/vector/tables.js.map +1 -1
  22. package/dist/commonjs/validators.d.ts +101 -89
  23. package/dist/commonjs/validators.d.ts.map +1 -1
  24. package/dist/commonjs/validators.js +8 -1
  25. package/dist/commonjs/validators.js.map +1 -1
  26. package/dist/esm/client/index.d.ts +12 -5
  27. package/dist/esm/client/index.d.ts.map +1 -1
  28. package/dist/esm/client/index.js +127 -44
  29. package/dist/esm/client/index.js.map +1 -1
  30. package/dist/esm/component/messages.d.ts +114 -103
  31. package/dist/esm/component/messages.d.ts.map +1 -1
  32. package/dist/esm/component/messages.js +143 -246
  33. package/dist/esm/component/messages.js.map +1 -1
  34. package/dist/esm/component/schema.d.ts +808 -738
  35. package/dist/esm/component/schema.d.ts.map +1 -1
  36. package/dist/esm/component/schema.js +12 -3
  37. package/dist/esm/component/schema.js.map +1 -1
  38. package/dist/esm/component/vector/index.d.ts +21 -6
  39. package/dist/esm/component/vector/index.d.ts.map +1 -1
  40. package/dist/esm/component/vector/index.js +33 -21
  41. package/dist/esm/component/vector/index.js.map +1 -1
  42. package/dist/esm/component/vector/tables.d.ts +25 -5
  43. package/dist/esm/component/vector/tables.d.ts.map +1 -1
  44. package/dist/esm/component/vector/tables.js +14 -6
  45. package/dist/esm/component/vector/tables.js.map +1 -1
  46. package/dist/esm/validators.d.ts +101 -89
  47. package/dist/esm/validators.d.ts.map +1 -1
  48. package/dist/esm/validators.js +8 -1
  49. package/dist/esm/validators.js.map +1 -1
  50. package/package.json +1 -1
  51. package/src/client/index.ts +149 -50
  52. package/src/component/_generated/api.d.ts +28 -16
  53. package/src/component/messages.ts +175 -289
  54. package/src/component/schema.ts +13 -3
  55. package/src/component/vector/index.ts +65 -26
  56. package/src/component/vector/tables.ts +38 -6
  57. package/src/validators.ts +11 -4
@@ -2,20 +2,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
2
2
  embeddings_128: import("convex/server").TableDefinition<import("convex/values").VObject<{
3
3
  userId?: string | undefined;
4
4
  threadId?: string | undefined;
5
- model_kind_userId?: string[] | undefined;
6
- model_kind_threadId?: string[] | undefined;
7
- vector: number[];
5
+ model_table_userId?: string[] | undefined;
6
+ model_table_threadId?: string[] | undefined;
8
7
  model: string;
9
- kind: "thread" | "memory";
8
+ table: string;
9
+ vector: number[];
10
10
  }, {
11
11
  model: import("convex/values").VString<string, "required">;
12
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
12
+ table: import("convex/values").VString<string, "required">;
13
13
  userId: import("convex/values").VString<string | undefined, "optional">;
14
14
  threadId: import("convex/values").VString<string | undefined, "optional">;
15
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
16
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
15
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
16
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
17
17
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
18
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
18
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
19
19
  id: ["id"];
20
20
  }, import("convex/server").GenericTableSearchIndexes, {
21
21
  vector: {
@@ -27,20 +27,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
27
27
  embeddings_256: import("convex/server").TableDefinition<import("convex/values").VObject<{
28
28
  userId?: string | undefined;
29
29
  threadId?: string | undefined;
30
- model_kind_userId?: string[] | undefined;
31
- model_kind_threadId?: string[] | undefined;
32
- vector: number[];
30
+ model_table_userId?: string[] | undefined;
31
+ model_table_threadId?: string[] | undefined;
33
32
  model: string;
34
- kind: "thread" | "memory";
33
+ table: string;
34
+ vector: number[];
35
35
  }, {
36
36
  model: import("convex/values").VString<string, "required">;
37
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
37
+ table: import("convex/values").VString<string, "required">;
38
38
  userId: import("convex/values").VString<string | undefined, "optional">;
39
39
  threadId: import("convex/values").VString<string | undefined, "optional">;
40
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
41
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
40
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
41
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
42
42
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
43
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
43
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
44
44
  id: ["id"];
45
45
  }, import("convex/server").GenericTableSearchIndexes, {
46
46
  vector: {
@@ -52,20 +52,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
52
52
  embeddings_512: import("convex/server").TableDefinition<import("convex/values").VObject<{
53
53
  userId?: string | undefined;
54
54
  threadId?: string | undefined;
55
- model_kind_userId?: string[] | undefined;
56
- model_kind_threadId?: string[] | undefined;
57
- vector: number[];
55
+ model_table_userId?: string[] | undefined;
56
+ model_table_threadId?: string[] | undefined;
58
57
  model: string;
59
- kind: "thread" | "memory";
58
+ table: string;
59
+ vector: number[];
60
60
  }, {
61
61
  model: import("convex/values").VString<string, "required">;
62
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
62
+ table: import("convex/values").VString<string, "required">;
63
63
  userId: import("convex/values").VString<string | undefined, "optional">;
64
64
  threadId: import("convex/values").VString<string | undefined, "optional">;
65
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
66
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
65
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
66
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
67
67
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
68
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
68
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
69
69
  id: ["id"];
70
70
  }, import("convex/server").GenericTableSearchIndexes, {
71
71
  vector: {
@@ -77,20 +77,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
77
77
  embeddings_768: import("convex/server").TableDefinition<import("convex/values").VObject<{
78
78
  userId?: string | undefined;
79
79
  threadId?: string | undefined;
80
- model_kind_userId?: string[] | undefined;
81
- model_kind_threadId?: string[] | undefined;
82
- vector: number[];
80
+ model_table_userId?: string[] | undefined;
81
+ model_table_threadId?: string[] | undefined;
83
82
  model: string;
84
- kind: "thread" | "memory";
83
+ table: string;
84
+ vector: number[];
85
85
  }, {
86
86
  model: import("convex/values").VString<string, "required">;
87
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
87
+ table: import("convex/values").VString<string, "required">;
88
88
  userId: import("convex/values").VString<string | undefined, "optional">;
89
89
  threadId: import("convex/values").VString<string | undefined, "optional">;
90
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
91
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
90
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
91
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
92
92
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
93
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
93
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
94
94
  id: ["id"];
95
95
  }, import("convex/server").GenericTableSearchIndexes, {
96
96
  vector: {
@@ -102,20 +102,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
102
102
  embeddings_1024: import("convex/server").TableDefinition<import("convex/values").VObject<{
103
103
  userId?: string | undefined;
104
104
  threadId?: string | undefined;
105
- model_kind_userId?: string[] | undefined;
106
- model_kind_threadId?: string[] | undefined;
107
- vector: number[];
105
+ model_table_userId?: string[] | undefined;
106
+ model_table_threadId?: string[] | undefined;
108
107
  model: string;
109
- kind: "thread" | "memory";
108
+ table: string;
109
+ vector: number[];
110
110
  }, {
111
111
  model: import("convex/values").VString<string, "required">;
112
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
112
+ table: import("convex/values").VString<string, "required">;
113
113
  userId: import("convex/values").VString<string | undefined, "optional">;
114
114
  threadId: import("convex/values").VString<string | undefined, "optional">;
115
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
116
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
115
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
116
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
117
117
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
118
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
118
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
119
119
  id: ["id"];
120
120
  }, import("convex/server").GenericTableSearchIndexes, {
121
121
  vector: {
@@ -127,20 +127,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
127
127
  embeddings_1536: import("convex/server").TableDefinition<import("convex/values").VObject<{
128
128
  userId?: string | undefined;
129
129
  threadId?: string | undefined;
130
- model_kind_userId?: string[] | undefined;
131
- model_kind_threadId?: string[] | undefined;
132
- vector: number[];
130
+ model_table_userId?: string[] | undefined;
131
+ model_table_threadId?: string[] | undefined;
133
132
  model: string;
134
- kind: "thread" | "memory";
133
+ table: string;
134
+ vector: number[];
135
135
  }, {
136
136
  model: import("convex/values").VString<string, "required">;
137
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
137
+ table: import("convex/values").VString<string, "required">;
138
138
  userId: import("convex/values").VString<string | undefined, "optional">;
139
139
  threadId: import("convex/values").VString<string | undefined, "optional">;
140
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
141
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
140
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
141
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
142
142
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
143
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
143
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
144
144
  id: ["id"];
145
145
  }, import("convex/server").GenericTableSearchIndexes, {
146
146
  vector: {
@@ -152,20 +152,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
152
152
  embeddings_2048: import("convex/server").TableDefinition<import("convex/values").VObject<{
153
153
  userId?: string | undefined;
154
154
  threadId?: string | undefined;
155
- model_kind_userId?: string[] | undefined;
156
- model_kind_threadId?: string[] | undefined;
157
- vector: number[];
155
+ model_table_userId?: string[] | undefined;
156
+ model_table_threadId?: string[] | undefined;
158
157
  model: string;
159
- kind: "thread" | "memory";
158
+ table: string;
159
+ vector: number[];
160
160
  }, {
161
161
  model: import("convex/values").VString<string, "required">;
162
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
162
+ table: import("convex/values").VString<string, "required">;
163
163
  userId: import("convex/values").VString<string | undefined, "optional">;
164
164
  threadId: import("convex/values").VString<string | undefined, "optional">;
165
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
166
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
165
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
166
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
167
167
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
168
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
168
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
169
169
  id: ["id"];
170
170
  }, import("convex/server").GenericTableSearchIndexes, {
171
171
  vector: {
@@ -177,20 +177,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
177
177
  embeddings_3072: import("convex/server").TableDefinition<import("convex/values").VObject<{
178
178
  userId?: string | undefined;
179
179
  threadId?: string | undefined;
180
- model_kind_userId?: string[] | undefined;
181
- model_kind_threadId?: string[] | undefined;
182
- vector: number[];
180
+ model_table_userId?: string[] | undefined;
181
+ model_table_threadId?: string[] | undefined;
183
182
  model: string;
184
- kind: "thread" | "memory";
183
+ table: string;
184
+ vector: number[];
185
185
  }, {
186
186
  model: import("convex/values").VString<string, "required">;
187
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
187
+ table: import("convex/values").VString<string, "required">;
188
188
  userId: import("convex/values").VString<string | undefined, "optional">;
189
189
  threadId: import("convex/values").VString<string | undefined, "optional">;
190
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
191
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
190
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
191
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
192
192
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
193
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
193
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
194
194
  id: ["id"];
195
195
  }, import("convex/server").GenericTableSearchIndexes, {
196
196
  vector: {
@@ -202,20 +202,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
202
202
  embeddings_4096: import("convex/server").TableDefinition<import("convex/values").VObject<{
203
203
  userId?: string | undefined;
204
204
  threadId?: string | undefined;
205
- model_kind_userId?: string[] | undefined;
206
- model_kind_threadId?: string[] | undefined;
207
- vector: number[];
205
+ model_table_userId?: string[] | undefined;
206
+ model_table_threadId?: string[] | undefined;
208
207
  model: string;
209
- kind: "thread" | "memory";
208
+ table: string;
209
+ vector: number[];
210
210
  }, {
211
211
  model: import("convex/values").VString<string, "required">;
212
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
212
+ table: import("convex/values").VString<string, "required">;
213
213
  userId: import("convex/values").VString<string | undefined, "optional">;
214
214
  threadId: import("convex/values").VString<string | undefined, "optional">;
215
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
216
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
215
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
216
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
217
217
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
218
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
218
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
219
219
  id: ["id"];
220
220
  }, import("convex/server").GenericTableSearchIndexes, {
221
221
  vector: {
@@ -225,10 +225,10 @@ export declare const schema: import("convex/server").SchemaDefinition<{
225
225
  };
226
226
  }>;
227
227
  threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
228
- title?: string | undefined;
229
228
  userId?: string | undefined;
230
229
  order?: number | undefined;
231
230
  defaultSystemPrompt?: string | undefined;
231
+ title?: string | undefined;
232
232
  summary?: string | undefined;
233
233
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
234
234
  status: "active" | "archived";
@@ -240,12 +240,15 @@ export declare const schema: import("convex/server").SchemaDefinition<{
240
240
  summary: import("convex/values").VString<string | undefined, "optional">;
241
241
  status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
242
242
  parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
243
- }, "required", "title" | "userId" | "status" | "order" | "defaultSystemPrompt" | "summary" | "parentThreadIds">, {
244
- status_userId_order: ["status", "userId", "order", "_creationTime"];
243
+ }, "required", "status" | "userId" | "order" | "defaultSystemPrompt" | "title" | "summary" | "parentThreadIds">, {
244
+ userId_status_order: ["userId", "status", "order", "_creationTime"];
245
245
  }, {}, {}>;
246
246
  messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
247
247
  id?: string | undefined;
248
- text?: string | undefined;
248
+ userId?: string | undefined;
249
+ parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
250
+ stepId?: import("convex/values").GenericId<"steps"> | undefined;
251
+ agentName?: string | undefined;
249
252
  message?: {
250
253
  providerOptions?: Record<string, any> | undefined;
251
254
  experimental_providerMetadata?: Record<string, any> | undefined;
@@ -329,22 +332,19 @@ export declare const schema: import("convex/server").SchemaDefinition<{
329
332
  role: "system";
330
333
  content: string;
331
334
  } | undefined;
332
- fileId?: import("convex/values").GenericId<"files"> | undefined;
335
+ text?: string | undefined;
333
336
  model?: string | undefined;
334
- userId?: string | undefined;
335
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
336
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
337
- stepId?: import("convex/values").GenericId<"steps"> | undefined;
338
- agentName?: string | undefined;
339
337
  embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
340
- stepOrder?: number | undefined;
341
- tool: boolean;
338
+ fileId?: import("convex/values").GenericId<"files"> | undefined;
342
339
  status: "pending" | "success" | "failed";
343
340
  order: number;
341
+ threadId: import("convex/values").GenericId<"threads">;
342
+ tool: boolean;
343
+ stepOrder: number;
344
344
  }, {
345
345
  id: import("convex/values").VString<string | undefined, "optional">;
346
346
  userId: import("convex/values").VString<string | undefined, "optional">;
347
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
347
+ threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
348
348
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
349
349
  stepId: import("convex/values").VId<import("convex/values").GenericId<"steps"> | undefined, "optional">;
350
350
  agentName: import("convex/values").VString<string | undefined, "optional">;
@@ -542,7 +542,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
542
542
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data">], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "image" | "mimeType" | "data">, "required">], "required", never>;
543
543
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
544
544
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
545
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
545
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
546
546
  providerOptions?: Record<string, any> | undefined;
547
547
  experimental_providerMetadata?: Record<string, any> | undefined;
548
548
  role: "assistant";
@@ -720,7 +720,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
720
720
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
721
721
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
722
722
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
723
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
723
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
724
724
  providerOptions?: Record<string, any> | undefined;
725
725
  experimental_providerMetadata?: Record<string, any> | undefined;
726
726
  role: "tool";
@@ -819,7 +819,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
819
819
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
820
820
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
821
821
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
822
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
822
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
823
823
  providerOptions?: Record<string, any> | undefined;
824
824
  experimental_providerMetadata?: Record<string, any> | undefined;
825
825
  role: "system";
@@ -829,16 +829,16 @@ export declare const schema: import("convex/server").SchemaDefinition<{
829
829
  content: import("convex/values").VString<string, "required">;
830
830
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
831
831
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
832
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">], "optional", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">;
832
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">], "optional", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">;
833
833
  model: import("convex/values").VString<string | undefined, "optional">;
834
834
  text: import("convex/values").VString<string | undefined, "optional">;
835
835
  embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
836
836
  tool: import("convex/values").VBoolean<boolean, "required">;
837
837
  order: import("convex/values").VFloat64<number, "required">;
838
- stepOrder: import("convex/values").VFloat64<number | undefined, "optional">;
838
+ stepOrder: import("convex/values").VFloat64<number, "required">;
839
839
  fileId: import("convex/values").VId<import("convex/values").GenericId<"files"> | undefined, "optional">;
840
840
  status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
841
- }, "required", "id" | "tool" | "text" | "message" | "fileId" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.role" | "message.content" | "model" | "userId" | "threadId" | "status" | "order" | "parentMessageId" | "stepId" | "agentName" | "embeddingId" | "stepOrder">, {
841
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "parentMessageId" | "stepId" | "agentName" | "message" | "text" | "tool" | "model" | "embeddingId" | "stepOrder" | "fileId" | "message.role" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.content">, {
842
842
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
843
843
  userId_status_tool_order_stepOrder: ["userId", "status", "tool", "order", "stepOrder", "_creationTime"];
844
844
  embeddingId: ["embeddingId", "_creationTime"];
@@ -849,26 +849,29 @@ export declare const schema: import("convex/server").SchemaDefinition<{
849
849
  };
850
850
  }, {}>;
851
851
  steps: import("convex/server").TableDefinition<import("convex/values").VObject<{
852
+ status: "pending" | "success" | "failed";
853
+ order: number;
854
+ threadId: import("convex/values").GenericId<"threads">;
855
+ parentMessageId: import("convex/values").GenericId<"messages">;
856
+ stepOrder: number;
852
857
  step: {
853
858
  providerOptions?: Record<string, any> | undefined;
854
859
  experimental_providerMetadata?: Record<string, any> | undefined;
855
860
  reasoning?: string | undefined;
856
861
  files?: any[] | undefined;
857
- providerMetadata?: Record<string, any> | undefined;
858
862
  logprobs?: any;
863
+ providerMetadata?: Record<string, any> | undefined;
859
864
  reasoningDetails?: any[] | undefined;
860
865
  request?: {
861
- url?: string | undefined;
862
866
  body?: any;
863
867
  headers?: Record<string, string> | undefined;
864
868
  method?: string | undefined;
869
+ url?: string | undefined;
865
870
  } | undefined;
866
871
  response?: {
867
872
  body?: any;
868
873
  headers?: Record<string, string> | undefined;
869
874
  id: string;
870
- timestamp: number;
871
- modelId: string;
872
875
  messages: {
873
876
  id?: string | undefined;
874
877
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -956,13 +959,15 @@ export declare const schema: import("convex/server").SchemaDefinition<{
956
959
  content: string;
957
960
  };
958
961
  }[];
962
+ timestamp: number;
963
+ modelId: string;
959
964
  } | undefined;
960
965
  sources?: {
961
966
  title?: string | undefined;
962
967
  providerMetadata?: Record<string, any> | undefined;
963
968
  id: string;
964
- sourceType: "url";
965
969
  url: string;
970
+ sourceType: "url";
966
971
  }[] | undefined;
967
972
  usage?: {
968
973
  promptTokens: number;
@@ -1012,11 +1017,6 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1012
1017
  result: any;
1013
1018
  }[];
1014
1019
  };
1015
- threadId: import("convex/values").GenericId<"threads">;
1016
- status: "pending" | "success" | "failed";
1017
- order: number;
1018
- parentMessageId: import("convex/values").GenericId<"messages">;
1019
- stepOrder: number;
1020
1020
  }, {
1021
1021
  threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
1022
1022
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages">, "required">;
@@ -1027,21 +1027,19 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1027
1027
  experimental_providerMetadata?: Record<string, any> | undefined;
1028
1028
  reasoning?: string | undefined;
1029
1029
  files?: any[] | undefined;
1030
- providerMetadata?: Record<string, any> | undefined;
1031
1030
  logprobs?: any;
1031
+ providerMetadata?: Record<string, any> | undefined;
1032
1032
  reasoningDetails?: any[] | undefined;
1033
1033
  request?: {
1034
- url?: string | undefined;
1035
1034
  body?: any;
1036
1035
  headers?: Record<string, string> | undefined;
1037
1036
  method?: string | undefined;
1037
+ url?: string | undefined;
1038
1038
  } | undefined;
1039
1039
  response?: {
1040
1040
  body?: any;
1041
1041
  headers?: Record<string, string> | undefined;
1042
1042
  id: string;
1043
- timestamp: number;
1044
- modelId: string;
1045
1043
  messages: {
1046
1044
  id?: string | undefined;
1047
1045
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -1129,13 +1127,15 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1129
1127
  content: string;
1130
1128
  };
1131
1129
  }[];
1130
+ timestamp: number;
1131
+ modelId: string;
1132
1132
  } | undefined;
1133
1133
  sources?: {
1134
1134
  title?: string | undefined;
1135
1135
  providerMetadata?: Record<string, any> | undefined;
1136
1136
  id: string;
1137
- sourceType: "url";
1138
1137
  url: string;
1138
+ sourceType: "url";
1139
1139
  }[] | undefined;
1140
1140
  usage?: {
1141
1141
  promptTokens: number;
@@ -1195,22 +1195,20 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1195
1195
  reasoning: import("convex/values").VString<string | undefined, "optional">;
1196
1196
  reasoningDetails: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
1197
1197
  request: import("convex/values").VObject<{
1198
- url?: string | undefined;
1199
1198
  body?: any;
1200
1199
  headers?: Record<string, string> | undefined;
1201
1200
  method?: string | undefined;
1201
+ url?: string | undefined;
1202
1202
  } | undefined, {
1203
1203
  body: import("convex/values").VAny<any, "optional", string>;
1204
1204
  headers: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
1205
1205
  method: import("convex/values").VString<string | undefined, "optional">;
1206
1206
  url: import("convex/values").VString<string | undefined, "optional">;
1207
- }, "optional", "url" | "body" | "headers" | "method" | `body.${string}` | `headers.${string}`>;
1207
+ }, "optional", "body" | "headers" | "method" | "url" | `body.${string}` | `headers.${string}`>;
1208
1208
  response: import("convex/values").VObject<{
1209
1209
  body?: any;
1210
1210
  headers?: Record<string, string> | undefined;
1211
1211
  id: string;
1212
- timestamp: number;
1213
- modelId: string;
1214
1212
  messages: {
1215
1213
  id?: string | undefined;
1216
1214
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -1298,6 +1296,8 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1298
1296
  content: string;
1299
1297
  };
1300
1298
  }[];
1299
+ timestamp: number;
1300
+ modelId: string;
1301
1301
  } | undefined, {
1302
1302
  id: import("convex/values").VString<string, "required">;
1303
1303
  timestamp: import("convex/values").VFloat64<number, "required">;
@@ -1671,7 +1671,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1671
1671
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data">], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "image" | "mimeType" | "data">, "required">], "required", never>;
1672
1672
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1673
1673
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1674
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
1674
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
1675
1675
  providerOptions?: Record<string, any> | undefined;
1676
1676
  experimental_providerMetadata?: Record<string, any> | undefined;
1677
1677
  role: "assistant";
@@ -1849,7 +1849,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1849
1849
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
1850
1850
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1851
1851
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1852
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
1852
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
1853
1853
  providerOptions?: Record<string, any> | undefined;
1854
1854
  experimental_providerMetadata?: Record<string, any> | undefined;
1855
1855
  role: "tool";
@@ -1948,7 +1948,7 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1948
1948
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
1949
1949
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1950
1950
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1951
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
1951
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
1952
1952
  providerOptions?: Record<string, any> | undefined;
1953
1953
  experimental_providerMetadata?: Record<string, any> | undefined;
1954
1954
  role: "system";
@@ -1958,30 +1958,30 @@ export declare const schema: import("convex/server").SchemaDefinition<{
1958
1958
  content: import("convex/values").VString<string, "required">;
1959
1959
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1960
1960
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1961
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">], "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">;
1961
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">], "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">;
1962
1962
  fileId: import("convex/values").VId<import("convex/values").GenericId<"files"> | undefined, "optional">;
1963
- }, "required", "id" | "message" | "fileId" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.role" | "message.content">, "required">;
1963
+ }, "required", "id" | "message" | "fileId" | "message.role" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.content">, "required">;
1964
1964
  body: import("convex/values").VAny<any, "optional", string>;
1965
- }, "optional", "id" | "body" | "headers" | `body.${string}` | `headers.${string}` | "timestamp" | "modelId" | "messages">;
1965
+ }, "optional", "id" | "messages" | "body" | "headers" | `body.${string}` | `headers.${string}` | "timestamp" | "modelId">;
1966
1966
  sources: import("convex/values").VArray<{
1967
1967
  title?: string | undefined;
1968
1968
  providerMetadata?: Record<string, any> | undefined;
1969
1969
  id: string;
1970
- sourceType: "url";
1971
1970
  url: string;
1971
+ sourceType: "url";
1972
1972
  }[] | undefined, import("convex/values").VObject<{
1973
1973
  title?: string | undefined;
1974
1974
  providerMetadata?: Record<string, any> | undefined;
1975
1975
  id: string;
1976
- sourceType: "url";
1977
1976
  url: string;
1977
+ sourceType: "url";
1978
1978
  }, {
1979
1979
  sourceType: import("convex/values").VLiteral<"url", "required">;
1980
1980
  id: import("convex/values").VString<string, "required">;
1981
1981
  url: import("convex/values").VString<string, "required">;
1982
1982
  title: import("convex/values").VString<string | undefined, "optional">;
1983
1983
  providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
1984
- }, "required", "id" | "sourceType" | "url" | "title" | "providerMetadata" | `providerMetadata.${string}`>, "optional">;
1984
+ }, "required", "id" | "title" | "providerMetadata" | "url" | "sourceType" | `providerMetadata.${string}`>, "optional">;
1985
1985
  stepType: import("convex/values").VUnion<"tool-result" | "initial" | "continue", [import("convex/values").VLiteral<"initial", "required">, import("convex/values").VLiteral<"continue", "required">, import("convex/values").VLiteral<"tool-result", "required">], "required", never>;
1986
1986
  text: import("convex/values").VString<string, "required">;
1987
1987
  toolCalls: import("convex/values").VArray<{
@@ -2132,13 +2132,28 @@ export declare const schema: import("convex/server").SchemaDefinition<{
2132
2132
  }, {
2133
2133
  type: import("convex/values").VLiteral<"other", "required">;
2134
2134
  message: import("convex/values").VString<string, "required">;
2135
- }, "required", "type" | "message">], "required", "type" | "tool" | "message" | "setting" | "details" | `tool.${string}`>, "optional">;
2136
- }, "required", "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "reasoning" | "files" | "providerMetadata" | `providerMetadata.${string}` | "finishReason" | "isContinued" | "logprobs" | "reasoningDetails" | "request" | "response" | "sources" | "stepType" | "toolCalls" | "toolResults" | "usage" | "warnings" | `logprobs.${string}` | "request.url" | "request.body" | "request.headers" | "request.method" | `request.body.${string}` | `request.headers.${string}` | "response.id" | "response.body" | "response.headers" | `response.body.${string}` | `response.headers.${string}` | "response.timestamp" | "response.modelId" | "response.messages" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens">;
2135
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
2136
+ }, "required", "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "reasoning" | "files" | "finishReason" | "isContinued" | "logprobs" | "providerMetadata" | "reasoningDetails" | "request" | "response" | "sources" | `providerMetadata.${string}` | "stepType" | "toolCalls" | "toolResults" | "usage" | "warnings" | `logprobs.${string}` | "request.body" | "request.headers" | "request.method" | "request.url" | `request.body.${string}` | `request.headers.${string}` | "response.id" | "response.messages" | "response.body" | "response.headers" | `response.body.${string}` | `response.headers.${string}` | "response.timestamp" | "response.modelId" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens">;
2137
2137
  status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
2138
- }, "required", "step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.providerMetadata" | `step.providerMetadata.${string}` | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.url" | "step.request.body" | "step.request.headers" | "step.request.method" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.response.messages" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens" | "threadId" | "status" | "order" | "parentMessageId" | "stepOrder">, {
2138
+ }, "required", "status" | "order" | "threadId" | "parentMessageId" | "stepOrder" | "step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.providerMetadata" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | `step.providerMetadata.${string}` | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.body" | "step.request.headers" | "step.request.method" | "step.request.url" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.messages" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens">, {
2139
2139
  status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
2140
2140
  parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
2141
2141
  }, {}, {}>;
2142
+ memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
2143
+ userId?: string | undefined;
2144
+ threadId?: import("convex/values").GenericId<"threads"> | undefined;
2145
+ embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2146
+ memory: string;
2147
+ }, {
2148
+ threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
2149
+ userId: import("convex/values").VString<string | undefined, "optional">;
2150
+ memory: import("convex/values").VString<string, "required">;
2151
+ embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
2152
+ }, "required", "userId" | "threadId" | "embeddingId" | "memory">, {
2153
+ threadId: ["threadId", "_creationTime"];
2154
+ userId: ["userId", "_creationTime"];
2155
+ embeddingId: ["embeddingId", "_creationTime"];
2156
+ }, {}, {}>;
2142
2157
  files: import("convex/server").TableDefinition<import("convex/values").VObject<{
2143
2158
  storageId: string;
2144
2159
  hash: string;
@@ -2154,18 +2169,21 @@ export declare const schema: import("convex/server").SchemaDefinition<{
2154
2169
  }, true>;
2155
2170
  export declare const vv: {
2156
2171
  id: <TableName extends import("convex/server").TableNamesInDataModel<{
2157
- files: {
2172
+ threads: {
2158
2173
  document: {
2159
- _id: import("convex/values").GenericId<"files">;
2174
+ _id: import("convex/values").GenericId<"threads">;
2160
2175
  _creationTime: number;
2161
- storageId: string;
2162
- hash: string;
2163
- refcount: number;
2176
+ userId?: string | undefined;
2177
+ order?: number | undefined;
2178
+ defaultSystemPrompt?: string | undefined;
2179
+ title?: string | undefined;
2180
+ summary?: string | undefined;
2181
+ parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
2182
+ status: "active" | "archived";
2164
2183
  };
2165
- fieldPaths: ("_creationTime" | "storageId" | "hash" | "refcount") | "_id";
2184
+ fieldPaths: ("status" | "userId" | "order" | "defaultSystemPrompt" | "title" | "summary" | "parentThreadIds" | "_creationTime") | "_id";
2166
2185
  indexes: {
2167
- hash: ["hash", "_creationTime"];
2168
- refcount: ["refcount", "_creationTime"];
2186
+ userId_status_order: ["userId", "status", "order", "_creationTime"];
2169
2187
  by_id: ["_id"];
2170
2188
  by_creation_time: ["_creationTime"];
2171
2189
  };
@@ -2177,7 +2195,10 @@ export declare const vv: {
2177
2195
  _id: import("convex/values").GenericId<"messages">;
2178
2196
  _creationTime: number;
2179
2197
  id?: string | undefined;
2180
- text?: string | undefined;
2198
+ userId?: string | undefined;
2199
+ parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2200
+ stepId?: import("convex/values").GenericId<"steps"> | undefined;
2201
+ agentName?: string | undefined;
2181
2202
  message?: {
2182
2203
  providerOptions?: Record<string, any> | undefined;
2183
2204
  experimental_providerMetadata?: Record<string, any> | undefined;
@@ -2261,20 +2282,17 @@ export declare const vv: {
2261
2282
  role: "system";
2262
2283
  content: string;
2263
2284
  } | undefined;
2264
- fileId?: import("convex/values").GenericId<"files"> | undefined;
2285
+ text?: string | undefined;
2265
2286
  model?: string | undefined;
2266
- userId?: string | undefined;
2267
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
2268
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2269
- stepId?: import("convex/values").GenericId<"steps"> | undefined;
2270
- agentName?: string | undefined;
2271
2287
  embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2272
- stepOrder?: number | undefined;
2273
- tool: boolean;
2288
+ fileId?: import("convex/values").GenericId<"files"> | undefined;
2274
2289
  status: "pending" | "success" | "failed";
2275
2290
  order: number;
2291
+ threadId: import("convex/values").GenericId<"threads">;
2292
+ tool: boolean;
2293
+ stepOrder: number;
2276
2294
  };
2277
- fieldPaths: ("id" | "tool" | "text" | "message" | "fileId" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.role" | "message.content" | "model" | "userId" | "threadId" | "_creationTime" | "status" | "order" | "parentMessageId" | "stepId" | "agentName" | "embeddingId" | "stepOrder") | "_id";
2295
+ fieldPaths: ("id" | "status" | "userId" | "order" | "_creationTime" | "threadId" | "parentMessageId" | "stepId" | "agentName" | "message" | "text" | "tool" | "model" | "embeddingId" | "stepOrder" | "fileId" | "message.role" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.content") | "_id";
2278
2296
  indexes: {
2279
2297
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2280
2298
  userId_status_tool_order_stepOrder: ["userId", "status", "tool", "order", "stepOrder", "_creationTime"];
@@ -2290,294 +2308,33 @@ export declare const vv: {
2290
2308
  };
2291
2309
  vectorIndexes: {};
2292
2310
  };
2293
- embeddings_128: {
2294
- document: {
2295
- _id: import("convex/values").GenericId<"embeddings_128">;
2296
- _creationTime: number;
2297
- userId?: string | undefined;
2298
- threadId?: string | undefined;
2299
- model_kind_userId?: string[] | undefined;
2300
- model_kind_threadId?: string[] | undefined;
2301
- vector: number[];
2302
- model: string;
2303
- kind: "thread" | "memory";
2304
- };
2305
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2306
- indexes: {
2307
- id: ["id"];
2308
- by_id: ["_id"];
2309
- by_creation_time: ["_creationTime"];
2310
- };
2311
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2312
- vectorIndexes: {
2313
- vector: {
2314
- vectorField: "vector";
2315
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2316
- filterFields: string;
2317
- };
2318
- };
2319
- };
2320
- embeddings_256: {
2321
- document: {
2322
- _id: import("convex/values").GenericId<"embeddings_256">;
2323
- _creationTime: number;
2324
- userId?: string | undefined;
2325
- threadId?: string | undefined;
2326
- model_kind_userId?: string[] | undefined;
2327
- model_kind_threadId?: string[] | undefined;
2328
- vector: number[];
2329
- model: string;
2330
- kind: "thread" | "memory";
2331
- };
2332
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2333
- indexes: {
2334
- id: ["id"];
2335
- by_id: ["_id"];
2336
- by_creation_time: ["_creationTime"];
2337
- };
2338
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2339
- vectorIndexes: {
2340
- vector: {
2341
- vectorField: "vector";
2342
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2343
- filterFields: string;
2344
- };
2345
- };
2346
- };
2347
- embeddings_512: {
2348
- document: {
2349
- _id: import("convex/values").GenericId<"embeddings_512">;
2350
- _creationTime: number;
2351
- userId?: string | undefined;
2352
- threadId?: string | undefined;
2353
- model_kind_userId?: string[] | undefined;
2354
- model_kind_threadId?: string[] | undefined;
2355
- vector: number[];
2356
- model: string;
2357
- kind: "thread" | "memory";
2358
- };
2359
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2360
- indexes: {
2361
- id: ["id"];
2362
- by_id: ["_id"];
2363
- by_creation_time: ["_creationTime"];
2364
- };
2365
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2366
- vectorIndexes: {
2367
- vector: {
2368
- vectorField: "vector";
2369
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2370
- filterFields: string;
2371
- };
2372
- };
2373
- };
2374
- embeddings_768: {
2375
- document: {
2376
- _id: import("convex/values").GenericId<"embeddings_768">;
2377
- _creationTime: number;
2378
- userId?: string | undefined;
2379
- threadId?: string | undefined;
2380
- model_kind_userId?: string[] | undefined;
2381
- model_kind_threadId?: string[] | undefined;
2382
- vector: number[];
2383
- model: string;
2384
- kind: "thread" | "memory";
2385
- };
2386
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2387
- indexes: {
2388
- id: ["id"];
2389
- by_id: ["_id"];
2390
- by_creation_time: ["_creationTime"];
2391
- };
2392
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2393
- vectorIndexes: {
2394
- vector: {
2395
- vectorField: "vector";
2396
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2397
- filterFields: string;
2398
- };
2399
- };
2400
- };
2401
- embeddings_1024: {
2402
- document: {
2403
- _id: import("convex/values").GenericId<"embeddings_1024">;
2404
- _creationTime: number;
2405
- userId?: string | undefined;
2406
- threadId?: string | undefined;
2407
- model_kind_userId?: string[] | undefined;
2408
- model_kind_threadId?: string[] | undefined;
2409
- vector: number[];
2410
- model: string;
2411
- kind: "thread" | "memory";
2412
- };
2413
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2414
- indexes: {
2415
- id: ["id"];
2416
- by_id: ["_id"];
2417
- by_creation_time: ["_creationTime"];
2418
- };
2419
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2420
- vectorIndexes: {
2421
- vector: {
2422
- vectorField: "vector";
2423
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2424
- filterFields: string;
2425
- };
2426
- };
2427
- };
2428
- embeddings_1536: {
2311
+ steps: {
2429
2312
  document: {
2430
- _id: import("convex/values").GenericId<"embeddings_1536">;
2431
- _creationTime: number;
2432
- userId?: string | undefined;
2433
- threadId?: string | undefined;
2434
- model_kind_userId?: string[] | undefined;
2435
- model_kind_threadId?: string[] | undefined;
2436
- vector: number[];
2437
- model: string;
2438
- kind: "thread" | "memory";
2439
- };
2440
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2441
- indexes: {
2442
- id: ["id"];
2443
- by_id: ["_id"];
2444
- by_creation_time: ["_creationTime"];
2445
- };
2446
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2447
- vectorIndexes: {
2448
- vector: {
2449
- vectorField: "vector";
2450
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2451
- filterFields: string;
2452
- };
2453
- };
2454
- };
2455
- embeddings_2048: {
2456
- document: {
2457
- _id: import("convex/values").GenericId<"embeddings_2048">;
2458
- _creationTime: number;
2459
- userId?: string | undefined;
2460
- threadId?: string | undefined;
2461
- model_kind_userId?: string[] | undefined;
2462
- model_kind_threadId?: string[] | undefined;
2463
- vector: number[];
2464
- model: string;
2465
- kind: "thread" | "memory";
2466
- };
2467
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2468
- indexes: {
2469
- id: ["id"];
2470
- by_id: ["_id"];
2471
- by_creation_time: ["_creationTime"];
2472
- };
2473
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2474
- vectorIndexes: {
2475
- vector: {
2476
- vectorField: "vector";
2477
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2478
- filterFields: string;
2479
- };
2480
- };
2481
- };
2482
- embeddings_3072: {
2483
- document: {
2484
- _id: import("convex/values").GenericId<"embeddings_3072">;
2485
- _creationTime: number;
2486
- userId?: string | undefined;
2487
- threadId?: string | undefined;
2488
- model_kind_userId?: string[] | undefined;
2489
- model_kind_threadId?: string[] | undefined;
2490
- vector: number[];
2491
- model: string;
2492
- kind: "thread" | "memory";
2493
- };
2494
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2495
- indexes: {
2496
- id: ["id"];
2497
- by_id: ["_id"];
2498
- by_creation_time: ["_creationTime"];
2499
- };
2500
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2501
- vectorIndexes: {
2502
- vector: {
2503
- vectorField: "vector";
2504
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2505
- filterFields: string;
2506
- };
2507
- };
2508
- };
2509
- embeddings_4096: {
2510
- document: {
2511
- _id: import("convex/values").GenericId<"embeddings_4096">;
2512
- _creationTime: number;
2513
- userId?: string | undefined;
2514
- threadId?: string | undefined;
2515
- model_kind_userId?: string[] | undefined;
2516
- model_kind_threadId?: string[] | undefined;
2517
- vector: number[];
2518
- model: string;
2519
- kind: "thread" | "memory";
2520
- };
2521
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2522
- indexes: {
2523
- id: ["id"];
2524
- by_id: ["_id"];
2525
- by_creation_time: ["_creationTime"];
2526
- };
2527
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2528
- vectorIndexes: {
2529
- vector: {
2530
- vectorField: "vector";
2531
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
2532
- filterFields: string;
2533
- };
2534
- };
2535
- };
2536
- threads: {
2537
- document: {
2538
- _id: import("convex/values").GenericId<"threads">;
2539
- _creationTime: number;
2540
- title?: string | undefined;
2541
- userId?: string | undefined;
2542
- order?: number | undefined;
2543
- defaultSystemPrompt?: string | undefined;
2544
- summary?: string | undefined;
2545
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
2546
- status: "active" | "archived";
2547
- };
2548
- fieldPaths: ("title" | "userId" | "_creationTime" | "status" | "order" | "defaultSystemPrompt" | "summary" | "parentThreadIds") | "_id";
2549
- indexes: {
2550
- status_userId_order: ["status", "userId", "order", "_creationTime"];
2551
- by_id: ["_id"];
2552
- by_creation_time: ["_creationTime"];
2553
- };
2554
- searchIndexes: {};
2555
- vectorIndexes: {};
2556
- };
2557
- steps: {
2558
- document: {
2559
- _id: import("convex/values").GenericId<"steps">;
2313
+ _id: import("convex/values").GenericId<"steps">;
2560
2314
  _creationTime: number;
2315
+ status: "pending" | "success" | "failed";
2316
+ order: number;
2317
+ threadId: import("convex/values").GenericId<"threads">;
2318
+ parentMessageId: import("convex/values").GenericId<"messages">;
2319
+ stepOrder: number;
2561
2320
  step: {
2562
2321
  providerOptions?: Record<string, any> | undefined;
2563
2322
  experimental_providerMetadata?: Record<string, any> | undefined;
2564
2323
  reasoning?: string | undefined;
2565
2324
  files?: any[] | undefined;
2566
- providerMetadata?: Record<string, any> | undefined;
2567
2325
  logprobs?: any;
2326
+ providerMetadata?: Record<string, any> | undefined;
2568
2327
  reasoningDetails?: any[] | undefined;
2569
2328
  request?: {
2570
- url?: string | undefined;
2571
2329
  body?: any;
2572
2330
  headers?: Record<string, string> | undefined;
2573
2331
  method?: string | undefined;
2332
+ url?: string | undefined;
2574
2333
  } | undefined;
2575
2334
  response?: {
2576
2335
  body?: any;
2577
2336
  headers?: Record<string, string> | undefined;
2578
2337
  id: string;
2579
- timestamp: number;
2580
- modelId: string;
2581
2338
  messages: {
2582
2339
  id?: string | undefined;
2583
2340
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -2665,13 +2422,15 @@ export declare const vv: {
2665
2422
  content: string;
2666
2423
  };
2667
2424
  }[];
2425
+ timestamp: number;
2426
+ modelId: string;
2668
2427
  } | undefined;
2669
2428
  sources?: {
2670
2429
  title?: string | undefined;
2671
2430
  providerMetadata?: Record<string, any> | undefined;
2672
2431
  id: string;
2673
- sourceType: "url";
2674
2432
  url: string;
2433
+ sourceType: "url";
2675
2434
  }[] | undefined;
2676
2435
  usage?: {
2677
2436
  promptTokens: number;
@@ -2721,13 +2480,8 @@ export declare const vv: {
2721
2480
  result: any;
2722
2481
  }[];
2723
2482
  };
2724
- threadId: import("convex/values").GenericId<"threads">;
2725
- status: "pending" | "success" | "failed";
2726
- order: number;
2727
- parentMessageId: import("convex/values").GenericId<"messages">;
2728
- stepOrder: number;
2729
2483
  };
2730
- fieldPaths: ("step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.providerMetadata" | `step.providerMetadata.${string}` | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.url" | "step.request.body" | "step.request.headers" | "step.request.method" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.response.messages" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens" | "threadId" | "_creationTime" | "status" | "order" | "parentMessageId" | "stepOrder") | "_id";
2484
+ fieldPaths: ("status" | "order" | "_creationTime" | "threadId" | "parentMessageId" | "stepOrder" | "step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.providerMetadata" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | `step.providerMetadata.${string}` | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.body" | "step.request.headers" | "step.request.method" | "step.request.url" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.messages" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens") | "_id";
2731
2485
  indexes: {
2732
2486
  status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
2733
2487
  parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
@@ -2737,157 +2491,19 @@ export declare const vv: {
2737
2491
  searchIndexes: {};
2738
2492
  vectorIndexes: {};
2739
2493
  };
2740
- }>>(tableName: TableName) => import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
2741
- doc: <TableName extends import("convex/server").TableNamesInDataModel<{
2742
- files: {
2743
- document: {
2744
- _id: import("convex/values").GenericId<"files">;
2745
- _creationTime: number;
2746
- storageId: string;
2747
- hash: string;
2748
- refcount: number;
2749
- };
2750
- fieldPaths: ("_creationTime" | "storageId" | "hash" | "refcount") | "_id";
2751
- indexes: {
2752
- hash: ["hash", "_creationTime"];
2753
- refcount: ["refcount", "_creationTime"];
2754
- by_id: ["_id"];
2755
- by_creation_time: ["_creationTime"];
2756
- };
2757
- searchIndexes: {};
2758
- vectorIndexes: {};
2759
- };
2760
- messages: {
2761
- document: {
2762
- _id: import("convex/values").GenericId<"messages">;
2763
- _creationTime: number;
2764
- id?: string | undefined;
2765
- text?: string | undefined;
2766
- message?: {
2767
- providerOptions?: Record<string, any> | undefined;
2768
- experimental_providerMetadata?: Record<string, any> | undefined;
2769
- role: "user";
2770
- content: string | ({
2771
- providerOptions?: Record<string, any> | undefined;
2772
- experimental_providerMetadata?: Record<string, any> | undefined;
2773
- type: "text";
2774
- text: string;
2775
- } | {
2776
- providerOptions?: Record<string, any> | undefined;
2777
- experimental_providerMetadata?: Record<string, any> | undefined;
2778
- mimeType?: string | undefined;
2779
- type: "image";
2780
- image: string | ArrayBuffer;
2781
- } | {
2782
- providerOptions?: Record<string, any> | undefined;
2783
- experimental_providerMetadata?: Record<string, any> | undefined;
2784
- type: "file";
2785
- mimeType: string;
2786
- data: string | ArrayBuffer;
2787
- })[];
2788
- } | {
2789
- providerOptions?: Record<string, any> | undefined;
2790
- experimental_providerMetadata?: Record<string, any> | undefined;
2791
- role: "assistant";
2792
- content: string | ({
2793
- providerOptions?: Record<string, any> | undefined;
2794
- experimental_providerMetadata?: Record<string, any> | undefined;
2795
- type: "text";
2796
- text: string;
2797
- } | {
2798
- providerOptions?: Record<string, any> | undefined;
2799
- experimental_providerMetadata?: Record<string, any> | undefined;
2800
- type: "file";
2801
- mimeType: string;
2802
- data: string | ArrayBuffer;
2803
- } | {
2804
- providerOptions?: Record<string, any> | undefined;
2805
- experimental_providerMetadata?: Record<string, any> | undefined;
2806
- type: "reasoning";
2807
- text: string;
2808
- } | {
2809
- providerOptions?: Record<string, any> | undefined;
2810
- experimental_providerMetadata?: Record<string, any> | undefined;
2811
- type: "redacted-reasoning";
2812
- data: string;
2813
- } | {
2814
- providerOptions?: Record<string, any> | undefined;
2815
- experimental_providerMetadata?: Record<string, any> | undefined;
2816
- type: "tool-call";
2817
- toolCallId: string;
2818
- toolName: string;
2819
- args: any;
2820
- })[];
2821
- } | {
2822
- providerOptions?: Record<string, any> | undefined;
2823
- experimental_providerMetadata?: Record<string, any> | undefined;
2824
- role: "tool";
2825
- content: {
2826
- providerOptions?: Record<string, any> | undefined;
2827
- experimental_providerMetadata?: Record<string, any> | undefined;
2828
- args?: any;
2829
- experimental_content?: ({
2830
- type: "text";
2831
- text: string;
2832
- } | {
2833
- mimeType?: string | undefined;
2834
- type: "image";
2835
- data: string;
2836
- })[] | undefined;
2837
- isError?: boolean | undefined;
2838
- type: "tool-result";
2839
- toolCallId: string;
2840
- toolName: string;
2841
- result: any;
2842
- }[];
2843
- } | {
2844
- providerOptions?: Record<string, any> | undefined;
2845
- experimental_providerMetadata?: Record<string, any> | undefined;
2846
- role: "system";
2847
- content: string;
2848
- } | undefined;
2849
- fileId?: import("convex/values").GenericId<"files"> | undefined;
2850
- model?: string | undefined;
2851
- userId?: string | undefined;
2852
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
2853
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2854
- stepId?: import("convex/values").GenericId<"steps"> | undefined;
2855
- agentName?: string | undefined;
2856
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2857
- stepOrder?: number | undefined;
2858
- tool: boolean;
2859
- status: "pending" | "success" | "failed";
2860
- order: number;
2861
- };
2862
- fieldPaths: ("id" | "tool" | "text" | "message" | "fileId" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.role" | "message.content" | "model" | "userId" | "threadId" | "_creationTime" | "status" | "order" | "parentMessageId" | "stepId" | "agentName" | "embeddingId" | "stepOrder") | "_id";
2863
- indexes: {
2864
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2865
- userId_status_tool_order_stepOrder: ["userId", "status", "tool", "order", "stepOrder", "_creationTime"];
2866
- embeddingId: ["embeddingId", "_creationTime"];
2867
- by_id: ["_id"];
2868
- by_creation_time: ["_creationTime"];
2869
- };
2870
- searchIndexes: {
2871
- text_search: {
2872
- searchField: "text";
2873
- filterFields: "userId" | "threadId";
2874
- };
2875
- };
2876
- vectorIndexes: {};
2877
- };
2878
2494
  embeddings_128: {
2879
2495
  document: {
2880
2496
  _id: import("convex/values").GenericId<"embeddings_128">;
2881
2497
  _creationTime: number;
2882
2498
  userId?: string | undefined;
2883
2499
  threadId?: string | undefined;
2884
- model_kind_userId?: string[] | undefined;
2885
- model_kind_threadId?: string[] | undefined;
2886
- vector: number[];
2500
+ model_table_userId?: string[] | undefined;
2501
+ model_table_threadId?: string[] | undefined;
2887
2502
  model: string;
2888
- kind: "thread" | "memory";
2503
+ table: string;
2504
+ vector: number[];
2889
2505
  };
2890
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2506
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2891
2507
  indexes: {
2892
2508
  id: ["id"];
2893
2509
  by_id: ["_id"];
@@ -2908,13 +2524,13 @@ export declare const vv: {
2908
2524
  _creationTime: number;
2909
2525
  userId?: string | undefined;
2910
2526
  threadId?: string | undefined;
2911
- model_kind_userId?: string[] | undefined;
2912
- model_kind_threadId?: string[] | undefined;
2913
- vector: number[];
2527
+ model_table_userId?: string[] | undefined;
2528
+ model_table_threadId?: string[] | undefined;
2914
2529
  model: string;
2915
- kind: "thread" | "memory";
2530
+ table: string;
2531
+ vector: number[];
2916
2532
  };
2917
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2533
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2918
2534
  indexes: {
2919
2535
  id: ["id"];
2920
2536
  by_id: ["_id"];
@@ -2935,13 +2551,13 @@ export declare const vv: {
2935
2551
  _creationTime: number;
2936
2552
  userId?: string | undefined;
2937
2553
  threadId?: string | undefined;
2938
- model_kind_userId?: string[] | undefined;
2939
- model_kind_threadId?: string[] | undefined;
2940
- vector: number[];
2554
+ model_table_userId?: string[] | undefined;
2555
+ model_table_threadId?: string[] | undefined;
2941
2556
  model: string;
2942
- kind: "thread" | "memory";
2557
+ table: string;
2558
+ vector: number[];
2943
2559
  };
2944
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2560
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2945
2561
  indexes: {
2946
2562
  id: ["id"];
2947
2563
  by_id: ["_id"];
@@ -2962,13 +2578,13 @@ export declare const vv: {
2962
2578
  _creationTime: number;
2963
2579
  userId?: string | undefined;
2964
2580
  threadId?: string | undefined;
2965
- model_kind_userId?: string[] | undefined;
2966
- model_kind_threadId?: string[] | undefined;
2967
- vector: number[];
2581
+ model_table_userId?: string[] | undefined;
2582
+ model_table_threadId?: string[] | undefined;
2968
2583
  model: string;
2969
- kind: "thread" | "memory";
2584
+ table: string;
2585
+ vector: number[];
2970
2586
  };
2971
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2587
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2972
2588
  indexes: {
2973
2589
  id: ["id"];
2974
2590
  by_id: ["_id"];
@@ -2989,13 +2605,13 @@ export declare const vv: {
2989
2605
  _creationTime: number;
2990
2606
  userId?: string | undefined;
2991
2607
  threadId?: string | undefined;
2992
- model_kind_userId?: string[] | undefined;
2993
- model_kind_threadId?: string[] | undefined;
2994
- vector: number[];
2608
+ model_table_userId?: string[] | undefined;
2609
+ model_table_threadId?: string[] | undefined;
2995
2610
  model: string;
2996
- kind: "thread" | "memory";
2611
+ table: string;
2612
+ vector: number[];
2997
2613
  };
2998
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2614
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2999
2615
  indexes: {
3000
2616
  id: ["id"];
3001
2617
  by_id: ["_id"];
@@ -3016,13 +2632,13 @@ export declare const vv: {
3016
2632
  _creationTime: number;
3017
2633
  userId?: string | undefined;
3018
2634
  threadId?: string | undefined;
3019
- model_kind_userId?: string[] | undefined;
3020
- model_kind_threadId?: string[] | undefined;
3021
- vector: number[];
2635
+ model_table_userId?: string[] | undefined;
2636
+ model_table_threadId?: string[] | undefined;
3022
2637
  model: string;
3023
- kind: "thread" | "memory";
2638
+ table: string;
2639
+ vector: number[];
3024
2640
  };
3025
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2641
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3026
2642
  indexes: {
3027
2643
  id: ["id"];
3028
2644
  by_id: ["_id"];
@@ -3043,13 +2659,13 @@ export declare const vv: {
3043
2659
  _creationTime: number;
3044
2660
  userId?: string | undefined;
3045
2661
  threadId?: string | undefined;
3046
- model_kind_userId?: string[] | undefined;
3047
- model_kind_threadId?: string[] | undefined;
3048
- vector: number[];
2662
+ model_table_userId?: string[] | undefined;
2663
+ model_table_threadId?: string[] | undefined;
3049
2664
  model: string;
3050
- kind: "thread" | "memory";
2665
+ table: string;
2666
+ vector: number[];
3051
2667
  };
3052
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2668
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3053
2669
  indexes: {
3054
2670
  id: ["id"];
3055
2671
  by_id: ["_id"];
@@ -3070,13 +2686,13 @@ export declare const vv: {
3070
2686
  _creationTime: number;
3071
2687
  userId?: string | undefined;
3072
2688
  threadId?: string | undefined;
3073
- model_kind_userId?: string[] | undefined;
3074
- model_kind_threadId?: string[] | undefined;
3075
- vector: number[];
2689
+ model_table_userId?: string[] | undefined;
2690
+ model_table_threadId?: string[] | undefined;
3076
2691
  model: string;
3077
- kind: "thread" | "memory";
2692
+ table: string;
2693
+ vector: number[];
3078
2694
  };
3079
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2695
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3080
2696
  indexes: {
3081
2697
  id: ["id"];
3082
2698
  by_id: ["_id"];
@@ -3097,13 +2713,13 @@ export declare const vv: {
3097
2713
  _creationTime: number;
3098
2714
  userId?: string | undefined;
3099
2715
  threadId?: string | undefined;
3100
- model_kind_userId?: string[] | undefined;
3101
- model_kind_threadId?: string[] | undefined;
3102
- vector: number[];
2716
+ model_table_userId?: string[] | undefined;
2717
+ model_table_threadId?: string[] | undefined;
3103
2718
  model: string;
3104
- kind: "thread" | "memory";
2719
+ table: string;
2720
+ vector: number[];
3105
2721
  };
3106
- fieldPaths: "_id" | ("vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind" | "_creationTime");
2722
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3107
2723
  indexes: {
3108
2724
  id: ["id"];
3109
2725
  by_id: ["_id"];
@@ -3118,51 +2734,212 @@ export declare const vv: {
3118
2734
  };
3119
2735
  };
3120
2736
  };
2737
+ files: {
2738
+ document: {
2739
+ _id: import("convex/values").GenericId<"files">;
2740
+ _creationTime: number;
2741
+ storageId: string;
2742
+ hash: string;
2743
+ refcount: number;
2744
+ };
2745
+ fieldPaths: ("_creationTime" | "storageId" | "hash" | "refcount") | "_id";
2746
+ indexes: {
2747
+ hash: ["hash", "_creationTime"];
2748
+ refcount: ["refcount", "_creationTime"];
2749
+ by_id: ["_id"];
2750
+ by_creation_time: ["_creationTime"];
2751
+ };
2752
+ searchIndexes: {};
2753
+ vectorIndexes: {};
2754
+ };
2755
+ memories: {
2756
+ document: {
2757
+ _id: import("convex/values").GenericId<"memories">;
2758
+ _creationTime: number;
2759
+ userId?: string | undefined;
2760
+ threadId?: import("convex/values").GenericId<"threads"> | undefined;
2761
+ embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2762
+ memory: string;
2763
+ };
2764
+ fieldPaths: ("userId" | "_creationTime" | "threadId" | "embeddingId" | "memory") | "_id";
2765
+ indexes: {
2766
+ threadId: ["threadId", "_creationTime"];
2767
+ userId: ["userId", "_creationTime"];
2768
+ embeddingId: ["embeddingId", "_creationTime"];
2769
+ by_id: ["_id"];
2770
+ by_creation_time: ["_creationTime"];
2771
+ };
2772
+ searchIndexes: {};
2773
+ vectorIndexes: {};
2774
+ };
2775
+ }>>(tableName: TableName) => import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
2776
+ doc: <TableName extends import("convex/server").TableNamesInDataModel<{
3121
2777
  threads: {
3122
2778
  document: {
3123
2779
  _id: import("convex/values").GenericId<"threads">;
3124
2780
  _creationTime: number;
3125
- title?: string | undefined;
3126
2781
  userId?: string | undefined;
3127
2782
  order?: number | undefined;
3128
2783
  defaultSystemPrompt?: string | undefined;
2784
+ title?: string | undefined;
3129
2785
  summary?: string | undefined;
3130
2786
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
3131
2787
  status: "active" | "archived";
3132
2788
  };
3133
- fieldPaths: ("title" | "userId" | "_creationTime" | "status" | "order" | "defaultSystemPrompt" | "summary" | "parentThreadIds") | "_id";
2789
+ fieldPaths: ("status" | "userId" | "order" | "defaultSystemPrompt" | "title" | "summary" | "parentThreadIds" | "_creationTime") | "_id";
3134
2790
  indexes: {
3135
- status_userId_order: ["status", "userId", "order", "_creationTime"];
2791
+ userId_status_order: ["userId", "status", "order", "_creationTime"];
3136
2792
  by_id: ["_id"];
3137
2793
  by_creation_time: ["_creationTime"];
3138
2794
  };
3139
2795
  searchIndexes: {};
3140
2796
  vectorIndexes: {};
3141
2797
  };
2798
+ messages: {
2799
+ document: {
2800
+ _id: import("convex/values").GenericId<"messages">;
2801
+ _creationTime: number;
2802
+ id?: string | undefined;
2803
+ userId?: string | undefined;
2804
+ parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2805
+ stepId?: import("convex/values").GenericId<"steps"> | undefined;
2806
+ agentName?: string | undefined;
2807
+ message?: {
2808
+ providerOptions?: Record<string, any> | undefined;
2809
+ experimental_providerMetadata?: Record<string, any> | undefined;
2810
+ role: "user";
2811
+ content: string | ({
2812
+ providerOptions?: Record<string, any> | undefined;
2813
+ experimental_providerMetadata?: Record<string, any> | undefined;
2814
+ type: "text";
2815
+ text: string;
2816
+ } | {
2817
+ providerOptions?: Record<string, any> | undefined;
2818
+ experimental_providerMetadata?: Record<string, any> | undefined;
2819
+ mimeType?: string | undefined;
2820
+ type: "image";
2821
+ image: string | ArrayBuffer;
2822
+ } | {
2823
+ providerOptions?: Record<string, any> | undefined;
2824
+ experimental_providerMetadata?: Record<string, any> | undefined;
2825
+ type: "file";
2826
+ mimeType: string;
2827
+ data: string | ArrayBuffer;
2828
+ })[];
2829
+ } | {
2830
+ providerOptions?: Record<string, any> | undefined;
2831
+ experimental_providerMetadata?: Record<string, any> | undefined;
2832
+ role: "assistant";
2833
+ content: string | ({
2834
+ providerOptions?: Record<string, any> | undefined;
2835
+ experimental_providerMetadata?: Record<string, any> | undefined;
2836
+ type: "text";
2837
+ text: string;
2838
+ } | {
2839
+ providerOptions?: Record<string, any> | undefined;
2840
+ experimental_providerMetadata?: Record<string, any> | undefined;
2841
+ type: "file";
2842
+ mimeType: string;
2843
+ data: string | ArrayBuffer;
2844
+ } | {
2845
+ providerOptions?: Record<string, any> | undefined;
2846
+ experimental_providerMetadata?: Record<string, any> | undefined;
2847
+ type: "reasoning";
2848
+ text: string;
2849
+ } | {
2850
+ providerOptions?: Record<string, any> | undefined;
2851
+ experimental_providerMetadata?: Record<string, any> | undefined;
2852
+ type: "redacted-reasoning";
2853
+ data: string;
2854
+ } | {
2855
+ providerOptions?: Record<string, any> | undefined;
2856
+ experimental_providerMetadata?: Record<string, any> | undefined;
2857
+ type: "tool-call";
2858
+ toolCallId: string;
2859
+ toolName: string;
2860
+ args: any;
2861
+ })[];
2862
+ } | {
2863
+ providerOptions?: Record<string, any> | undefined;
2864
+ experimental_providerMetadata?: Record<string, any> | undefined;
2865
+ role: "tool";
2866
+ content: {
2867
+ providerOptions?: Record<string, any> | undefined;
2868
+ experimental_providerMetadata?: Record<string, any> | undefined;
2869
+ args?: any;
2870
+ experimental_content?: ({
2871
+ type: "text";
2872
+ text: string;
2873
+ } | {
2874
+ mimeType?: string | undefined;
2875
+ type: "image";
2876
+ data: string;
2877
+ })[] | undefined;
2878
+ isError?: boolean | undefined;
2879
+ type: "tool-result";
2880
+ toolCallId: string;
2881
+ toolName: string;
2882
+ result: any;
2883
+ }[];
2884
+ } | {
2885
+ providerOptions?: Record<string, any> | undefined;
2886
+ experimental_providerMetadata?: Record<string, any> | undefined;
2887
+ role: "system";
2888
+ content: string;
2889
+ } | undefined;
2890
+ text?: string | undefined;
2891
+ model?: string | undefined;
2892
+ embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2893
+ fileId?: import("convex/values").GenericId<"files"> | undefined;
2894
+ status: "pending" | "success" | "failed";
2895
+ order: number;
2896
+ threadId: import("convex/values").GenericId<"threads">;
2897
+ tool: boolean;
2898
+ stepOrder: number;
2899
+ };
2900
+ fieldPaths: ("id" | "status" | "userId" | "order" | "_creationTime" | "threadId" | "parentMessageId" | "stepId" | "agentName" | "message" | "text" | "tool" | "model" | "embeddingId" | "stepOrder" | "fileId" | "message.role" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.content") | "_id";
2901
+ indexes: {
2902
+ threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2903
+ userId_status_tool_order_stepOrder: ["userId", "status", "tool", "order", "stepOrder", "_creationTime"];
2904
+ embeddingId: ["embeddingId", "_creationTime"];
2905
+ by_id: ["_id"];
2906
+ by_creation_time: ["_creationTime"];
2907
+ };
2908
+ searchIndexes: {
2909
+ text_search: {
2910
+ searchField: "text";
2911
+ filterFields: "userId" | "threadId";
2912
+ };
2913
+ };
2914
+ vectorIndexes: {};
2915
+ };
3142
2916
  steps: {
3143
2917
  document: {
3144
2918
  _id: import("convex/values").GenericId<"steps">;
3145
2919
  _creationTime: number;
2920
+ status: "pending" | "success" | "failed";
2921
+ order: number;
2922
+ threadId: import("convex/values").GenericId<"threads">;
2923
+ parentMessageId: import("convex/values").GenericId<"messages">;
2924
+ stepOrder: number;
3146
2925
  step: {
3147
2926
  providerOptions?: Record<string, any> | undefined;
3148
2927
  experimental_providerMetadata?: Record<string, any> | undefined;
3149
2928
  reasoning?: string | undefined;
3150
2929
  files?: any[] | undefined;
3151
- providerMetadata?: Record<string, any> | undefined;
3152
2930
  logprobs?: any;
2931
+ providerMetadata?: Record<string, any> | undefined;
3153
2932
  reasoningDetails?: any[] | undefined;
3154
2933
  request?: {
3155
- url?: string | undefined;
3156
2934
  body?: any;
3157
2935
  headers?: Record<string, string> | undefined;
3158
2936
  method?: string | undefined;
2937
+ url?: string | undefined;
3159
2938
  } | undefined;
3160
2939
  response?: {
3161
2940
  body?: any;
3162
2941
  headers?: Record<string, string> | undefined;
3163
2942
  id: string;
3164
- timestamp: number;
3165
- modelId: string;
3166
2943
  messages: {
3167
2944
  id?: string | undefined;
3168
2945
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -3250,13 +3027,15 @@ export declare const vv: {
3250
3027
  content: string;
3251
3028
  };
3252
3029
  }[];
3030
+ timestamp: number;
3031
+ modelId: string;
3253
3032
  } | undefined;
3254
3033
  sources?: {
3255
3034
  title?: string | undefined;
3256
3035
  providerMetadata?: Record<string, any> | undefined;
3257
3036
  id: string;
3258
- sourceType: "url";
3259
3037
  url: string;
3038
+ sourceType: "url";
3260
3039
  }[] | undefined;
3261
3040
  usage?: {
3262
3041
  promptTokens: number;
@@ -3306,16 +3085,292 @@ export declare const vv: {
3306
3085
  result: any;
3307
3086
  }[];
3308
3087
  };
3309
- threadId: import("convex/values").GenericId<"threads">;
3310
- status: "pending" | "success" | "failed";
3311
- order: number;
3312
- parentMessageId: import("convex/values").GenericId<"messages">;
3313
- stepOrder: number;
3314
3088
  };
3315
- fieldPaths: ("step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.providerMetadata" | `step.providerMetadata.${string}` | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.url" | "step.request.body" | "step.request.headers" | "step.request.method" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.response.messages" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens" | "threadId" | "_creationTime" | "status" | "order" | "parentMessageId" | "stepOrder") | "_id";
3089
+ fieldPaths: ("status" | "order" | "_creationTime" | "threadId" | "parentMessageId" | "stepOrder" | "step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.providerMetadata" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | `step.providerMetadata.${string}` | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.body" | "step.request.headers" | "step.request.method" | "step.request.url" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.messages" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens") | "_id";
3090
+ indexes: {
3091
+ status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
3092
+ parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
3093
+ by_id: ["_id"];
3094
+ by_creation_time: ["_creationTime"];
3095
+ };
3096
+ searchIndexes: {};
3097
+ vectorIndexes: {};
3098
+ };
3099
+ embeddings_128: {
3100
+ document: {
3101
+ _id: import("convex/values").GenericId<"embeddings_128">;
3102
+ _creationTime: number;
3103
+ userId?: string | undefined;
3104
+ threadId?: string | undefined;
3105
+ model_table_userId?: string[] | undefined;
3106
+ model_table_threadId?: string[] | undefined;
3107
+ model: string;
3108
+ table: string;
3109
+ vector: number[];
3110
+ };
3111
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3112
+ indexes: {
3113
+ id: ["id"];
3114
+ by_id: ["_id"];
3115
+ by_creation_time: ["_creationTime"];
3116
+ };
3117
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3118
+ vectorIndexes: {
3119
+ vector: {
3120
+ vectorField: "vector";
3121
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3122
+ filterFields: string;
3123
+ };
3124
+ };
3125
+ };
3126
+ embeddings_256: {
3127
+ document: {
3128
+ _id: import("convex/values").GenericId<"embeddings_256">;
3129
+ _creationTime: number;
3130
+ userId?: string | undefined;
3131
+ threadId?: string | undefined;
3132
+ model_table_userId?: string[] | undefined;
3133
+ model_table_threadId?: string[] | undefined;
3134
+ model: string;
3135
+ table: string;
3136
+ vector: number[];
3137
+ };
3138
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3139
+ indexes: {
3140
+ id: ["id"];
3141
+ by_id: ["_id"];
3142
+ by_creation_time: ["_creationTime"];
3143
+ };
3144
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3145
+ vectorIndexes: {
3146
+ vector: {
3147
+ vectorField: "vector";
3148
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3149
+ filterFields: string;
3150
+ };
3151
+ };
3152
+ };
3153
+ embeddings_512: {
3154
+ document: {
3155
+ _id: import("convex/values").GenericId<"embeddings_512">;
3156
+ _creationTime: number;
3157
+ userId?: string | undefined;
3158
+ threadId?: string | undefined;
3159
+ model_table_userId?: string[] | undefined;
3160
+ model_table_threadId?: string[] | undefined;
3161
+ model: string;
3162
+ table: string;
3163
+ vector: number[];
3164
+ };
3165
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3166
+ indexes: {
3167
+ id: ["id"];
3168
+ by_id: ["_id"];
3169
+ by_creation_time: ["_creationTime"];
3170
+ };
3171
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3172
+ vectorIndexes: {
3173
+ vector: {
3174
+ vectorField: "vector";
3175
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3176
+ filterFields: string;
3177
+ };
3178
+ };
3179
+ };
3180
+ embeddings_768: {
3181
+ document: {
3182
+ _id: import("convex/values").GenericId<"embeddings_768">;
3183
+ _creationTime: number;
3184
+ userId?: string | undefined;
3185
+ threadId?: string | undefined;
3186
+ model_table_userId?: string[] | undefined;
3187
+ model_table_threadId?: string[] | undefined;
3188
+ model: string;
3189
+ table: string;
3190
+ vector: number[];
3191
+ };
3192
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3193
+ indexes: {
3194
+ id: ["id"];
3195
+ by_id: ["_id"];
3196
+ by_creation_time: ["_creationTime"];
3197
+ };
3198
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3199
+ vectorIndexes: {
3200
+ vector: {
3201
+ vectorField: "vector";
3202
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3203
+ filterFields: string;
3204
+ };
3205
+ };
3206
+ };
3207
+ embeddings_1024: {
3208
+ document: {
3209
+ _id: import("convex/values").GenericId<"embeddings_1024">;
3210
+ _creationTime: number;
3211
+ userId?: string | undefined;
3212
+ threadId?: string | undefined;
3213
+ model_table_userId?: string[] | undefined;
3214
+ model_table_threadId?: string[] | undefined;
3215
+ model: string;
3216
+ table: string;
3217
+ vector: number[];
3218
+ };
3219
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3316
3220
  indexes: {
3317
- status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
3318
- parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
3221
+ id: ["id"];
3222
+ by_id: ["_id"];
3223
+ by_creation_time: ["_creationTime"];
3224
+ };
3225
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3226
+ vectorIndexes: {
3227
+ vector: {
3228
+ vectorField: "vector";
3229
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3230
+ filterFields: string;
3231
+ };
3232
+ };
3233
+ };
3234
+ embeddings_1536: {
3235
+ document: {
3236
+ _id: import("convex/values").GenericId<"embeddings_1536">;
3237
+ _creationTime: number;
3238
+ userId?: string | undefined;
3239
+ threadId?: string | undefined;
3240
+ model_table_userId?: string[] | undefined;
3241
+ model_table_threadId?: string[] | undefined;
3242
+ model: string;
3243
+ table: string;
3244
+ vector: number[];
3245
+ };
3246
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3247
+ indexes: {
3248
+ id: ["id"];
3249
+ by_id: ["_id"];
3250
+ by_creation_time: ["_creationTime"];
3251
+ };
3252
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3253
+ vectorIndexes: {
3254
+ vector: {
3255
+ vectorField: "vector";
3256
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3257
+ filterFields: string;
3258
+ };
3259
+ };
3260
+ };
3261
+ embeddings_2048: {
3262
+ document: {
3263
+ _id: import("convex/values").GenericId<"embeddings_2048">;
3264
+ _creationTime: number;
3265
+ userId?: string | undefined;
3266
+ threadId?: string | undefined;
3267
+ model_table_userId?: string[] | undefined;
3268
+ model_table_threadId?: string[] | undefined;
3269
+ model: string;
3270
+ table: string;
3271
+ vector: number[];
3272
+ };
3273
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3274
+ indexes: {
3275
+ id: ["id"];
3276
+ by_id: ["_id"];
3277
+ by_creation_time: ["_creationTime"];
3278
+ };
3279
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3280
+ vectorIndexes: {
3281
+ vector: {
3282
+ vectorField: "vector";
3283
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3284
+ filterFields: string;
3285
+ };
3286
+ };
3287
+ };
3288
+ embeddings_3072: {
3289
+ document: {
3290
+ _id: import("convex/values").GenericId<"embeddings_3072">;
3291
+ _creationTime: number;
3292
+ userId?: string | undefined;
3293
+ threadId?: string | undefined;
3294
+ model_table_userId?: string[] | undefined;
3295
+ model_table_threadId?: string[] | undefined;
3296
+ model: string;
3297
+ table: string;
3298
+ vector: number[];
3299
+ };
3300
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3301
+ indexes: {
3302
+ id: ["id"];
3303
+ by_id: ["_id"];
3304
+ by_creation_time: ["_creationTime"];
3305
+ };
3306
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3307
+ vectorIndexes: {
3308
+ vector: {
3309
+ vectorField: "vector";
3310
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3311
+ filterFields: string;
3312
+ };
3313
+ };
3314
+ };
3315
+ embeddings_4096: {
3316
+ document: {
3317
+ _id: import("convex/values").GenericId<"embeddings_4096">;
3318
+ _creationTime: number;
3319
+ userId?: string | undefined;
3320
+ threadId?: string | undefined;
3321
+ model_table_userId?: string[] | undefined;
3322
+ model_table_threadId?: string[] | undefined;
3323
+ model: string;
3324
+ table: string;
3325
+ vector: number[];
3326
+ };
3327
+ fieldPaths: "_id" | ("userId" | "_creationTime" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
3328
+ indexes: {
3329
+ id: ["id"];
3330
+ by_id: ["_id"];
3331
+ by_creation_time: ["_creationTime"];
3332
+ };
3333
+ searchIndexes: import("convex/server").GenericTableSearchIndexes;
3334
+ vectorIndexes: {
3335
+ vector: {
3336
+ vectorField: "vector";
3337
+ dimensions: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
3338
+ filterFields: string;
3339
+ };
3340
+ };
3341
+ };
3342
+ files: {
3343
+ document: {
3344
+ _id: import("convex/values").GenericId<"files">;
3345
+ _creationTime: number;
3346
+ storageId: string;
3347
+ hash: string;
3348
+ refcount: number;
3349
+ };
3350
+ fieldPaths: ("_creationTime" | "storageId" | "hash" | "refcount") | "_id";
3351
+ indexes: {
3352
+ hash: ["hash", "_creationTime"];
3353
+ refcount: ["refcount", "_creationTime"];
3354
+ by_id: ["_id"];
3355
+ by_creation_time: ["_creationTime"];
3356
+ };
3357
+ searchIndexes: {};
3358
+ vectorIndexes: {};
3359
+ };
3360
+ memories: {
3361
+ document: {
3362
+ _id: import("convex/values").GenericId<"memories">;
3363
+ _creationTime: number;
3364
+ userId?: string | undefined;
3365
+ threadId?: import("convex/values").GenericId<"threads"> | undefined;
3366
+ embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
3367
+ memory: string;
3368
+ };
3369
+ fieldPaths: ("userId" | "_creationTime" | "threadId" | "embeddingId" | "memory") | "_id";
3370
+ indexes: {
3371
+ threadId: ["threadId", "_creationTime"];
3372
+ userId: ["userId", "_creationTime"];
3373
+ embeddingId: ["embeddingId", "_creationTime"];
3319
3374
  by_id: ["_id"];
3320
3375
  by_creation_time: ["_creationTime"];
3321
3376
  };
@@ -3326,20 +3381,20 @@ export declare const vv: {
3326
3381
  embeddings_128: import("convex/server").TableDefinition<import("convex/values").VObject<{
3327
3382
  userId?: string | undefined;
3328
3383
  threadId?: string | undefined;
3329
- model_kind_userId?: string[] | undefined;
3330
- model_kind_threadId?: string[] | undefined;
3331
- vector: number[];
3384
+ model_table_userId?: string[] | undefined;
3385
+ model_table_threadId?: string[] | undefined;
3332
3386
  model: string;
3333
- kind: "thread" | "memory";
3387
+ table: string;
3388
+ vector: number[];
3334
3389
  }, {
3335
3390
  model: import("convex/values").VString<string, "required">;
3336
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3391
+ table: import("convex/values").VString<string, "required">;
3337
3392
  userId: import("convex/values").VString<string | undefined, "optional">;
3338
3393
  threadId: import("convex/values").VString<string | undefined, "optional">;
3339
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3340
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3394
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3395
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3341
3396
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3342
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3397
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3343
3398
  id: ["id"];
3344
3399
  }, import("convex/server").GenericTableSearchIndexes, {
3345
3400
  vector: {
@@ -3351,20 +3406,20 @@ export declare const vv: {
3351
3406
  embeddings_256: import("convex/server").TableDefinition<import("convex/values").VObject<{
3352
3407
  userId?: string | undefined;
3353
3408
  threadId?: string | undefined;
3354
- model_kind_userId?: string[] | undefined;
3355
- model_kind_threadId?: string[] | undefined;
3356
- vector: number[];
3409
+ model_table_userId?: string[] | undefined;
3410
+ model_table_threadId?: string[] | undefined;
3357
3411
  model: string;
3358
- kind: "thread" | "memory";
3412
+ table: string;
3413
+ vector: number[];
3359
3414
  }, {
3360
3415
  model: import("convex/values").VString<string, "required">;
3361
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3416
+ table: import("convex/values").VString<string, "required">;
3362
3417
  userId: import("convex/values").VString<string | undefined, "optional">;
3363
3418
  threadId: import("convex/values").VString<string | undefined, "optional">;
3364
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3365
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3419
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3420
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3366
3421
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3367
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3422
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3368
3423
  id: ["id"];
3369
3424
  }, import("convex/server").GenericTableSearchIndexes, {
3370
3425
  vector: {
@@ -3376,20 +3431,20 @@ export declare const vv: {
3376
3431
  embeddings_512: import("convex/server").TableDefinition<import("convex/values").VObject<{
3377
3432
  userId?: string | undefined;
3378
3433
  threadId?: string | undefined;
3379
- model_kind_userId?: string[] | undefined;
3380
- model_kind_threadId?: string[] | undefined;
3381
- vector: number[];
3434
+ model_table_userId?: string[] | undefined;
3435
+ model_table_threadId?: string[] | undefined;
3382
3436
  model: string;
3383
- kind: "thread" | "memory";
3437
+ table: string;
3438
+ vector: number[];
3384
3439
  }, {
3385
3440
  model: import("convex/values").VString<string, "required">;
3386
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3441
+ table: import("convex/values").VString<string, "required">;
3387
3442
  userId: import("convex/values").VString<string | undefined, "optional">;
3388
3443
  threadId: import("convex/values").VString<string | undefined, "optional">;
3389
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3390
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3444
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3445
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3391
3446
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3392
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3447
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3393
3448
  id: ["id"];
3394
3449
  }, import("convex/server").GenericTableSearchIndexes, {
3395
3450
  vector: {
@@ -3401,20 +3456,20 @@ export declare const vv: {
3401
3456
  embeddings_768: import("convex/server").TableDefinition<import("convex/values").VObject<{
3402
3457
  userId?: string | undefined;
3403
3458
  threadId?: string | undefined;
3404
- model_kind_userId?: string[] | undefined;
3405
- model_kind_threadId?: string[] | undefined;
3406
- vector: number[];
3459
+ model_table_userId?: string[] | undefined;
3460
+ model_table_threadId?: string[] | undefined;
3407
3461
  model: string;
3408
- kind: "thread" | "memory";
3462
+ table: string;
3463
+ vector: number[];
3409
3464
  }, {
3410
3465
  model: import("convex/values").VString<string, "required">;
3411
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3466
+ table: import("convex/values").VString<string, "required">;
3412
3467
  userId: import("convex/values").VString<string | undefined, "optional">;
3413
3468
  threadId: import("convex/values").VString<string | undefined, "optional">;
3414
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3415
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3469
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3470
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3416
3471
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3417
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3472
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3418
3473
  id: ["id"];
3419
3474
  }, import("convex/server").GenericTableSearchIndexes, {
3420
3475
  vector: {
@@ -3426,20 +3481,20 @@ export declare const vv: {
3426
3481
  embeddings_1024: import("convex/server").TableDefinition<import("convex/values").VObject<{
3427
3482
  userId?: string | undefined;
3428
3483
  threadId?: string | undefined;
3429
- model_kind_userId?: string[] | undefined;
3430
- model_kind_threadId?: string[] | undefined;
3431
- vector: number[];
3484
+ model_table_userId?: string[] | undefined;
3485
+ model_table_threadId?: string[] | undefined;
3432
3486
  model: string;
3433
- kind: "thread" | "memory";
3487
+ table: string;
3488
+ vector: number[];
3434
3489
  }, {
3435
3490
  model: import("convex/values").VString<string, "required">;
3436
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3491
+ table: import("convex/values").VString<string, "required">;
3437
3492
  userId: import("convex/values").VString<string | undefined, "optional">;
3438
3493
  threadId: import("convex/values").VString<string | undefined, "optional">;
3439
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3440
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3494
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3495
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3441
3496
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3442
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3497
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3443
3498
  id: ["id"];
3444
3499
  }, import("convex/server").GenericTableSearchIndexes, {
3445
3500
  vector: {
@@ -3451,20 +3506,20 @@ export declare const vv: {
3451
3506
  embeddings_1536: import("convex/server").TableDefinition<import("convex/values").VObject<{
3452
3507
  userId?: string | undefined;
3453
3508
  threadId?: string | undefined;
3454
- model_kind_userId?: string[] | undefined;
3455
- model_kind_threadId?: string[] | undefined;
3456
- vector: number[];
3509
+ model_table_userId?: string[] | undefined;
3510
+ model_table_threadId?: string[] | undefined;
3457
3511
  model: string;
3458
- kind: "thread" | "memory";
3512
+ table: string;
3513
+ vector: number[];
3459
3514
  }, {
3460
3515
  model: import("convex/values").VString<string, "required">;
3461
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3516
+ table: import("convex/values").VString<string, "required">;
3462
3517
  userId: import("convex/values").VString<string | undefined, "optional">;
3463
3518
  threadId: import("convex/values").VString<string | undefined, "optional">;
3464
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3465
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3519
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3520
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3466
3521
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3467
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3522
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3468
3523
  id: ["id"];
3469
3524
  }, import("convex/server").GenericTableSearchIndexes, {
3470
3525
  vector: {
@@ -3476,20 +3531,20 @@ export declare const vv: {
3476
3531
  embeddings_2048: import("convex/server").TableDefinition<import("convex/values").VObject<{
3477
3532
  userId?: string | undefined;
3478
3533
  threadId?: string | undefined;
3479
- model_kind_userId?: string[] | undefined;
3480
- model_kind_threadId?: string[] | undefined;
3481
- vector: number[];
3534
+ model_table_userId?: string[] | undefined;
3535
+ model_table_threadId?: string[] | undefined;
3482
3536
  model: string;
3483
- kind: "thread" | "memory";
3537
+ table: string;
3538
+ vector: number[];
3484
3539
  }, {
3485
3540
  model: import("convex/values").VString<string, "required">;
3486
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3541
+ table: import("convex/values").VString<string, "required">;
3487
3542
  userId: import("convex/values").VString<string | undefined, "optional">;
3488
3543
  threadId: import("convex/values").VString<string | undefined, "optional">;
3489
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3490
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3544
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3545
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3491
3546
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3492
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3547
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3493
3548
  id: ["id"];
3494
3549
  }, import("convex/server").GenericTableSearchIndexes, {
3495
3550
  vector: {
@@ -3501,20 +3556,20 @@ export declare const vv: {
3501
3556
  embeddings_3072: import("convex/server").TableDefinition<import("convex/values").VObject<{
3502
3557
  userId?: string | undefined;
3503
3558
  threadId?: string | undefined;
3504
- model_kind_userId?: string[] | undefined;
3505
- model_kind_threadId?: string[] | undefined;
3506
- vector: number[];
3559
+ model_table_userId?: string[] | undefined;
3560
+ model_table_threadId?: string[] | undefined;
3507
3561
  model: string;
3508
- kind: "thread" | "memory";
3562
+ table: string;
3563
+ vector: number[];
3509
3564
  }, {
3510
3565
  model: import("convex/values").VString<string, "required">;
3511
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3566
+ table: import("convex/values").VString<string, "required">;
3512
3567
  userId: import("convex/values").VString<string | undefined, "optional">;
3513
3568
  threadId: import("convex/values").VString<string | undefined, "optional">;
3514
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3515
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3569
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3570
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3516
3571
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3517
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3572
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3518
3573
  id: ["id"];
3519
3574
  }, import("convex/server").GenericTableSearchIndexes, {
3520
3575
  vector: {
@@ -3526,20 +3581,20 @@ export declare const vv: {
3526
3581
  embeddings_4096: import("convex/server").TableDefinition<import("convex/values").VObject<{
3527
3582
  userId?: string | undefined;
3528
3583
  threadId?: string | undefined;
3529
- model_kind_userId?: string[] | undefined;
3530
- model_kind_threadId?: string[] | undefined;
3531
- vector: number[];
3584
+ model_table_userId?: string[] | undefined;
3585
+ model_table_threadId?: string[] | undefined;
3532
3586
  model: string;
3533
- kind: "thread" | "memory";
3587
+ table: string;
3588
+ vector: number[];
3534
3589
  }, {
3535
3590
  model: import("convex/values").VString<string, "required">;
3536
- kind: import("convex/values").VUnion<"thread" | "memory", [import("convex/values").VLiteral<"thread", "required">, import("convex/values").VLiteral<"memory", "required">], "required", never>;
3591
+ table: import("convex/values").VString<string, "required">;
3537
3592
  userId: import("convex/values").VString<string | undefined, "optional">;
3538
3593
  threadId: import("convex/values").VString<string | undefined, "optional">;
3539
- model_kind_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3540
- model_kind_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3594
+ model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3595
+ model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
3541
3596
  vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
3542
- }, "required", "vector" | "model" | "userId" | "threadId" | "model_kind_userId" | "model_kind_threadId" | "kind">, {
3597
+ }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
3543
3598
  id: ["id"];
3544
3599
  }, import("convex/server").GenericTableSearchIndexes, {
3545
3600
  vector: {
@@ -3549,10 +3604,10 @@ export declare const vv: {
3549
3604
  };
3550
3605
  }>;
3551
3606
  threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
3552
- title?: string | undefined;
3553
3607
  userId?: string | undefined;
3554
3608
  order?: number | undefined;
3555
3609
  defaultSystemPrompt?: string | undefined;
3610
+ title?: string | undefined;
3556
3611
  summary?: string | undefined;
3557
3612
  parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
3558
3613
  status: "active" | "archived";
@@ -3564,12 +3619,15 @@ export declare const vv: {
3564
3619
  summary: import("convex/values").VString<string | undefined, "optional">;
3565
3620
  status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
3566
3621
  parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
3567
- }, "required", "title" | "userId" | "status" | "order" | "defaultSystemPrompt" | "summary" | "parentThreadIds">, {
3568
- status_userId_order: ["status", "userId", "order", "_creationTime"];
3622
+ }, "required", "status" | "userId" | "order" | "defaultSystemPrompt" | "title" | "summary" | "parentThreadIds">, {
3623
+ userId_status_order: ["userId", "status", "order", "_creationTime"];
3569
3624
  }, {}, {}>;
3570
3625
  messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
3571
3626
  id?: string | undefined;
3572
- text?: string | undefined;
3627
+ userId?: string | undefined;
3628
+ parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
3629
+ stepId?: import("convex/values").GenericId<"steps"> | undefined;
3630
+ agentName?: string | undefined;
3573
3631
  message?: {
3574
3632
  providerOptions?: Record<string, any> | undefined;
3575
3633
  experimental_providerMetadata?: Record<string, any> | undefined;
@@ -3653,22 +3711,19 @@ export declare const vv: {
3653
3711
  role: "system";
3654
3712
  content: string;
3655
3713
  } | undefined;
3656
- fileId?: import("convex/values").GenericId<"files"> | undefined;
3714
+ text?: string | undefined;
3657
3715
  model?: string | undefined;
3658
- userId?: string | undefined;
3659
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
3660
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
3661
- stepId?: import("convex/values").GenericId<"steps"> | undefined;
3662
- agentName?: string | undefined;
3663
3716
  embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
3664
- stepOrder?: number | undefined;
3665
- tool: boolean;
3717
+ fileId?: import("convex/values").GenericId<"files"> | undefined;
3666
3718
  status: "pending" | "success" | "failed";
3667
3719
  order: number;
3720
+ threadId: import("convex/values").GenericId<"threads">;
3721
+ tool: boolean;
3722
+ stepOrder: number;
3668
3723
  }, {
3669
3724
  id: import("convex/values").VString<string | undefined, "optional">;
3670
3725
  userId: import("convex/values").VString<string | undefined, "optional">;
3671
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
3726
+ threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
3672
3727
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
3673
3728
  stepId: import("convex/values").VId<import("convex/values").GenericId<"steps"> | undefined, "optional">;
3674
3729
  agentName: import("convex/values").VString<string | undefined, "optional">;
@@ -3866,7 +3921,7 @@ export declare const vv: {
3866
3921
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data">], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "image" | "mimeType" | "data">, "required">], "required", never>;
3867
3922
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
3868
3923
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
3869
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
3924
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
3870
3925
  providerOptions?: Record<string, any> | undefined;
3871
3926
  experimental_providerMetadata?: Record<string, any> | undefined;
3872
3927
  role: "assistant";
@@ -4044,7 +4099,7 @@ export declare const vv: {
4044
4099
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
4045
4100
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4046
4101
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4047
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
4102
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
4048
4103
  providerOptions?: Record<string, any> | undefined;
4049
4104
  experimental_providerMetadata?: Record<string, any> | undefined;
4050
4105
  role: "tool";
@@ -4143,7 +4198,7 @@ export declare const vv: {
4143
4198
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
4144
4199
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4145
4200
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4146
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
4201
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
4147
4202
  providerOptions?: Record<string, any> | undefined;
4148
4203
  experimental_providerMetadata?: Record<string, any> | undefined;
4149
4204
  role: "system";
@@ -4153,16 +4208,16 @@ export declare const vv: {
4153
4208
  content: import("convex/values").VString<string, "required">;
4154
4209
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4155
4210
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4156
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">], "optional", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">;
4211
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">], "optional", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">;
4157
4212
  model: import("convex/values").VString<string | undefined, "optional">;
4158
4213
  text: import("convex/values").VString<string | undefined, "optional">;
4159
4214
  embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
4160
4215
  tool: import("convex/values").VBoolean<boolean, "required">;
4161
4216
  order: import("convex/values").VFloat64<number, "required">;
4162
- stepOrder: import("convex/values").VFloat64<number | undefined, "optional">;
4217
+ stepOrder: import("convex/values").VFloat64<number, "required">;
4163
4218
  fileId: import("convex/values").VId<import("convex/values").GenericId<"files"> | undefined, "optional">;
4164
4219
  status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
4165
- }, "required", "id" | "tool" | "text" | "message" | "fileId" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.role" | "message.content" | "model" | "userId" | "threadId" | "status" | "order" | "parentMessageId" | "stepId" | "agentName" | "embeddingId" | "stepOrder">, {
4220
+ }, "required", "id" | "status" | "userId" | "order" | "threadId" | "parentMessageId" | "stepId" | "agentName" | "message" | "text" | "tool" | "model" | "embeddingId" | "stepOrder" | "fileId" | "message.role" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.content">, {
4166
4221
  threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
4167
4222
  userId_status_tool_order_stepOrder: ["userId", "status", "tool", "order", "stepOrder", "_creationTime"];
4168
4223
  embeddingId: ["embeddingId", "_creationTime"];
@@ -4173,26 +4228,29 @@ export declare const vv: {
4173
4228
  };
4174
4229
  }, {}>;
4175
4230
  steps: import("convex/server").TableDefinition<import("convex/values").VObject<{
4231
+ status: "pending" | "success" | "failed";
4232
+ order: number;
4233
+ threadId: import("convex/values").GenericId<"threads">;
4234
+ parentMessageId: import("convex/values").GenericId<"messages">;
4235
+ stepOrder: number;
4176
4236
  step: {
4177
4237
  providerOptions?: Record<string, any> | undefined;
4178
4238
  experimental_providerMetadata?: Record<string, any> | undefined;
4179
4239
  reasoning?: string | undefined;
4180
4240
  files?: any[] | undefined;
4181
- providerMetadata?: Record<string, any> | undefined;
4182
4241
  logprobs?: any;
4242
+ providerMetadata?: Record<string, any> | undefined;
4183
4243
  reasoningDetails?: any[] | undefined;
4184
4244
  request?: {
4185
- url?: string | undefined;
4186
4245
  body?: any;
4187
4246
  headers?: Record<string, string> | undefined;
4188
4247
  method?: string | undefined;
4248
+ url?: string | undefined;
4189
4249
  } | undefined;
4190
4250
  response?: {
4191
4251
  body?: any;
4192
4252
  headers?: Record<string, string> | undefined;
4193
4253
  id: string;
4194
- timestamp: number;
4195
- modelId: string;
4196
4254
  messages: {
4197
4255
  id?: string | undefined;
4198
4256
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -4280,13 +4338,15 @@ export declare const vv: {
4280
4338
  content: string;
4281
4339
  };
4282
4340
  }[];
4341
+ timestamp: number;
4342
+ modelId: string;
4283
4343
  } | undefined;
4284
4344
  sources?: {
4285
4345
  title?: string | undefined;
4286
4346
  providerMetadata?: Record<string, any> | undefined;
4287
4347
  id: string;
4288
- sourceType: "url";
4289
4348
  url: string;
4349
+ sourceType: "url";
4290
4350
  }[] | undefined;
4291
4351
  usage?: {
4292
4352
  promptTokens: number;
@@ -4336,11 +4396,6 @@ export declare const vv: {
4336
4396
  result: any;
4337
4397
  }[];
4338
4398
  };
4339
- threadId: import("convex/values").GenericId<"threads">;
4340
- status: "pending" | "success" | "failed";
4341
- order: number;
4342
- parentMessageId: import("convex/values").GenericId<"messages">;
4343
- stepOrder: number;
4344
4399
  }, {
4345
4400
  threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
4346
4401
  parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages">, "required">;
@@ -4351,21 +4406,19 @@ export declare const vv: {
4351
4406
  experimental_providerMetadata?: Record<string, any> | undefined;
4352
4407
  reasoning?: string | undefined;
4353
4408
  files?: any[] | undefined;
4354
- providerMetadata?: Record<string, any> | undefined;
4355
4409
  logprobs?: any;
4410
+ providerMetadata?: Record<string, any> | undefined;
4356
4411
  reasoningDetails?: any[] | undefined;
4357
4412
  request?: {
4358
- url?: string | undefined;
4359
4413
  body?: any;
4360
4414
  headers?: Record<string, string> | undefined;
4361
4415
  method?: string | undefined;
4416
+ url?: string | undefined;
4362
4417
  } | undefined;
4363
4418
  response?: {
4364
4419
  body?: any;
4365
4420
  headers?: Record<string, string> | undefined;
4366
4421
  id: string;
4367
- timestamp: number;
4368
- modelId: string;
4369
4422
  messages: {
4370
4423
  id?: string | undefined;
4371
4424
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -4453,13 +4506,15 @@ export declare const vv: {
4453
4506
  content: string;
4454
4507
  };
4455
4508
  }[];
4509
+ timestamp: number;
4510
+ modelId: string;
4456
4511
  } | undefined;
4457
4512
  sources?: {
4458
4513
  title?: string | undefined;
4459
4514
  providerMetadata?: Record<string, any> | undefined;
4460
4515
  id: string;
4461
- sourceType: "url";
4462
4516
  url: string;
4517
+ sourceType: "url";
4463
4518
  }[] | undefined;
4464
4519
  usage?: {
4465
4520
  promptTokens: number;
@@ -4519,22 +4574,20 @@ export declare const vv: {
4519
4574
  reasoning: import("convex/values").VString<string | undefined, "optional">;
4520
4575
  reasoningDetails: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
4521
4576
  request: import("convex/values").VObject<{
4522
- url?: string | undefined;
4523
4577
  body?: any;
4524
4578
  headers?: Record<string, string> | undefined;
4525
4579
  method?: string | undefined;
4580
+ url?: string | undefined;
4526
4581
  } | undefined, {
4527
4582
  body: import("convex/values").VAny<any, "optional", string>;
4528
4583
  headers: import("convex/values").VRecord<Record<string, string> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VString<string, "required">, "optional", string>;
4529
4584
  method: import("convex/values").VString<string | undefined, "optional">;
4530
4585
  url: import("convex/values").VString<string | undefined, "optional">;
4531
- }, "optional", "url" | "body" | "headers" | "method" | `body.${string}` | `headers.${string}`>;
4586
+ }, "optional", "body" | "headers" | "method" | "url" | `body.${string}` | `headers.${string}`>;
4532
4587
  response: import("convex/values").VObject<{
4533
4588
  body?: any;
4534
4589
  headers?: Record<string, string> | undefined;
4535
4590
  id: string;
4536
- timestamp: number;
4537
- modelId: string;
4538
4591
  messages: {
4539
4592
  id?: string | undefined;
4540
4593
  fileId?: import("convex/values").GenericId<"files"> | undefined;
@@ -4622,6 +4675,8 @@ export declare const vv: {
4622
4675
  content: string;
4623
4676
  };
4624
4677
  }[];
4678
+ timestamp: number;
4679
+ modelId: string;
4625
4680
  } | undefined, {
4626
4681
  id: import("convex/values").VString<string, "required">;
4627
4682
  timestamp: import("convex/values").VFloat64<number, "required">;
@@ -4995,7 +5050,7 @@ export declare const vv: {
4995
5050
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data">], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "image" | "mimeType" | "data">, "required">], "required", never>;
4996
5051
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4997
5052
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
4998
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
5053
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
4999
5054
  providerOptions?: Record<string, any> | undefined;
5000
5055
  experimental_providerMetadata?: Record<string, any> | undefined;
5001
5056
  role: "assistant";
@@ -5173,7 +5228,7 @@ export declare const vv: {
5173
5228
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "mimeType" | "data" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
5174
5229
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
5175
5230
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
5176
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
5231
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
5177
5232
  providerOptions?: Record<string, any> | undefined;
5178
5233
  experimental_providerMetadata?: Record<string, any> | undefined;
5179
5234
  role: "tool";
@@ -5272,7 +5327,7 @@ export declare const vv: {
5272
5327
  }, "required", "type" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
5273
5328
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
5274
5329
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
5275
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">, import("convex/values").VObject<{
5330
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">, import("convex/values").VObject<{
5276
5331
  providerOptions?: Record<string, any> | undefined;
5277
5332
  experimental_providerMetadata?: Record<string, any> | undefined;
5278
5333
  role: "system";
@@ -5282,30 +5337,30 @@ export declare const vv: {
5282
5337
  content: import("convex/values").VString<string, "required">;
5283
5338
  providerOptions: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
5284
5339
  experimental_providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
5285
- }, "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">], "required", "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "role" | "content">;
5340
+ }, "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">], "required", "role" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "content">;
5286
5341
  fileId: import("convex/values").VId<import("convex/values").GenericId<"files"> | undefined, "optional">;
5287
- }, "required", "id" | "message" | "fileId" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.role" | "message.content">, "required">;
5342
+ }, "required", "id" | "message" | "fileId" | "message.role" | "message.providerOptions" | "message.experimental_providerMetadata" | `message.providerOptions.${string}` | `message.experimental_providerMetadata.${string}` | "message.content">, "required">;
5288
5343
  body: import("convex/values").VAny<any, "optional", string>;
5289
- }, "optional", "id" | "body" | "headers" | `body.${string}` | `headers.${string}` | "timestamp" | "modelId" | "messages">;
5344
+ }, "optional", "id" | "messages" | "body" | "headers" | `body.${string}` | `headers.${string}` | "timestamp" | "modelId">;
5290
5345
  sources: import("convex/values").VArray<{
5291
5346
  title?: string | undefined;
5292
5347
  providerMetadata?: Record<string, any> | undefined;
5293
5348
  id: string;
5294
- sourceType: "url";
5295
5349
  url: string;
5350
+ sourceType: "url";
5296
5351
  }[] | undefined, import("convex/values").VObject<{
5297
5352
  title?: string | undefined;
5298
5353
  providerMetadata?: Record<string, any> | undefined;
5299
5354
  id: string;
5300
- sourceType: "url";
5301
5355
  url: string;
5356
+ sourceType: "url";
5302
5357
  }, {
5303
5358
  sourceType: import("convex/values").VLiteral<"url", "required">;
5304
5359
  id: import("convex/values").VString<string, "required">;
5305
5360
  url: import("convex/values").VString<string, "required">;
5306
5361
  title: import("convex/values").VString<string | undefined, "optional">;
5307
5362
  providerMetadata: import("convex/values").VRecord<Record<string, any> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "optional", string>;
5308
- }, "required", "id" | "sourceType" | "url" | "title" | "providerMetadata" | `providerMetadata.${string}`>, "optional">;
5363
+ }, "required", "id" | "title" | "providerMetadata" | "url" | "sourceType" | `providerMetadata.${string}`>, "optional">;
5309
5364
  stepType: import("convex/values").VUnion<"tool-result" | "initial" | "continue", [import("convex/values").VLiteral<"initial", "required">, import("convex/values").VLiteral<"continue", "required">, import("convex/values").VLiteral<"tool-result", "required">], "required", never>;
5310
5365
  text: import("convex/values").VString<string, "required">;
5311
5366
  toolCalls: import("convex/values").VArray<{
@@ -5456,13 +5511,28 @@ export declare const vv: {
5456
5511
  }, {
5457
5512
  type: import("convex/values").VLiteral<"other", "required">;
5458
5513
  message: import("convex/values").VString<string, "required">;
5459
- }, "required", "type" | "message">], "required", "type" | "tool" | "message" | "setting" | "details" | `tool.${string}`>, "optional">;
5460
- }, "required", "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "reasoning" | "files" | "providerMetadata" | `providerMetadata.${string}` | "finishReason" | "isContinued" | "logprobs" | "reasoningDetails" | "request" | "response" | "sources" | "stepType" | "toolCalls" | "toolResults" | "usage" | "warnings" | `logprobs.${string}` | "request.url" | "request.body" | "request.headers" | "request.method" | `request.body.${string}` | `request.headers.${string}` | "response.id" | "response.body" | "response.headers" | `response.body.${string}` | `response.headers.${string}` | "response.timestamp" | "response.modelId" | "response.messages" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens">;
5514
+ }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
5515
+ }, "required", "text" | "providerOptions" | "experimental_providerMetadata" | `providerOptions.${string}` | `experimental_providerMetadata.${string}` | "reasoning" | "files" | "finishReason" | "isContinued" | "logprobs" | "providerMetadata" | "reasoningDetails" | "request" | "response" | "sources" | `providerMetadata.${string}` | "stepType" | "toolCalls" | "toolResults" | "usage" | "warnings" | `logprobs.${string}` | "request.body" | "request.headers" | "request.method" | "request.url" | `request.body.${string}` | `request.headers.${string}` | "response.id" | "response.messages" | "response.body" | "response.headers" | `response.body.${string}` | `response.headers.${string}` | "response.timestamp" | "response.modelId" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens">;
5461
5516
  status: import("convex/values").VUnion<"pending" | "success" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"success", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
5462
- }, "required", "step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.providerMetadata" | `step.providerMetadata.${string}` | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.url" | "step.request.body" | "step.request.headers" | "step.request.method" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.response.messages" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens" | "threadId" | "status" | "order" | "parentMessageId" | "stepOrder">, {
5517
+ }, "required", "status" | "order" | "threadId" | "parentMessageId" | "stepOrder" | "step" | "step.text" | "step.providerOptions" | "step.experimental_providerMetadata" | `step.providerOptions.${string}` | `step.experimental_providerMetadata.${string}` | "step.reasoning" | "step.files" | "step.finishReason" | "step.isContinued" | "step.logprobs" | "step.providerMetadata" | "step.reasoningDetails" | "step.request" | "step.response" | "step.sources" | `step.providerMetadata.${string}` | "step.stepType" | "step.toolCalls" | "step.toolResults" | "step.usage" | "step.warnings" | `step.logprobs.${string}` | "step.request.body" | "step.request.headers" | "step.request.method" | "step.request.url" | `step.request.body.${string}` | `step.request.headers.${string}` | "step.response.id" | "step.response.messages" | "step.response.body" | "step.response.headers" | `step.response.body.${string}` | `step.response.headers.${string}` | "step.response.timestamp" | "step.response.modelId" | "step.usage.promptTokens" | "step.usage.completionTokens" | "step.usage.totalTokens">, {
5463
5518
  status_threadId_order_stepOrder: ["status", "threadId", "order", "stepOrder", "_creationTime"];
5464
5519
  parentMessageId_order_stepOrder: ["parentMessageId", "order", "stepOrder", "_creationTime"];
5465
5520
  }, {}, {}>;
5521
+ memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
5522
+ userId?: string | undefined;
5523
+ threadId?: import("convex/values").GenericId<"threads"> | undefined;
5524
+ embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
5525
+ memory: string;
5526
+ }, {
5527
+ threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
5528
+ userId: import("convex/values").VString<string | undefined, "optional">;
5529
+ memory: import("convex/values").VString<string, "required">;
5530
+ embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
5531
+ }, "required", "userId" | "threadId" | "embeddingId" | "memory">, {
5532
+ threadId: ["threadId", "_creationTime"];
5533
+ userId: ["userId", "_creationTime"];
5534
+ embeddingId: ["embeddingId", "_creationTime"];
5535
+ }, {}, {}>;
5466
5536
  files: import("convex/server").TableDefinition<import("convex/values").VObject<{
5467
5537
  storageId: string;
5468
5538
  hash: string;