@convex-dev/agent 0.1.10 → 0.1.12

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 (138) hide show
  1. package/dist/esm/client/index.d.ts +2 -0
  2. package/dist/esm/client/index.d.ts.map +1 -1
  3. package/dist/esm/client/index.js +35 -26
  4. package/dist/esm/client/index.js.map +1 -1
  5. package/dist/esm/mapping.d.ts +1 -0
  6. package/dist/esm/mapping.d.ts.map +1 -1
  7. package/dist/esm/mapping.js +2 -2
  8. package/dist/esm/mapping.js.map +1 -1
  9. package/dist/esm/react/useSmoothText.d.ts +7 -1
  10. package/dist/esm/react/useSmoothText.d.ts.map +1 -1
  11. package/dist/esm/react/useSmoothText.js +5 -5
  12. package/dist/esm/react/useSmoothText.js.map +1 -1
  13. package/dist/esm.tsbuildinfo +1 -1
  14. package/package.json +24 -53
  15. package/src/client/index.ts +39 -29
  16. package/src/mapping.ts +9 -2
  17. package/src/react/useSmoothText.ts +11 -4
  18. package/dist/commonjs/client/_generated/_ignore.d.ts +0 -1
  19. package/dist/commonjs/client/_generated/_ignore.d.ts.map +0 -1
  20. package/dist/commonjs/client/_generated/_ignore.js +0 -3
  21. package/dist/commonjs/client/_generated/_ignore.js.map +0 -1
  22. package/dist/commonjs/client/createTool.d.ts +0 -47
  23. package/dist/commonjs/client/createTool.d.ts.map +0 -1
  24. package/dist/commonjs/client/createTool.js +0 -49
  25. package/dist/commonjs/client/createTool.js.map +0 -1
  26. package/dist/commonjs/client/files.d.ts +0 -56
  27. package/dist/commonjs/client/files.d.ts.map +0 -1
  28. package/dist/commonjs/client/files.js +0 -129
  29. package/dist/commonjs/client/files.js.map +0 -1
  30. package/dist/commonjs/client/index.d.ts +0 -1355
  31. package/dist/commonjs/client/index.d.ts.map +0 -1
  32. package/dist/commonjs/client/index.js +0 -1169
  33. package/dist/commonjs/client/index.js.map +0 -1
  34. package/dist/commonjs/client/streaming.d.ts +0 -57
  35. package/dist/commonjs/client/streaming.d.ts.map +0 -1
  36. package/dist/commonjs/client/streaming.js +0 -148
  37. package/dist/commonjs/client/streaming.js.map +0 -1
  38. package/dist/commonjs/client/types.d.ts +0 -352
  39. package/dist/commonjs/client/types.d.ts.map +0 -1
  40. package/dist/commonjs/client/types.js +0 -3
  41. package/dist/commonjs/client/types.js.map +0 -1
  42. package/dist/commonjs/component/_generated/api.d.ts +0 -1938
  43. package/dist/commonjs/component/_generated/api.d.ts.map +0 -1
  44. package/dist/commonjs/component/_generated/api.js +0 -25
  45. package/dist/commonjs/component/_generated/api.js.map +0 -1
  46. package/dist/commonjs/component/_generated/dataModel.d.ts +0 -60
  47. package/dist/commonjs/component/_generated/server.d.ts +0 -149
  48. package/dist/commonjs/component/_generated/server.d.ts.map +0 -1
  49. package/dist/commonjs/component/_generated/server.js +0 -77
  50. package/dist/commonjs/component/_generated/server.js.map +0 -1
  51. package/dist/commonjs/component/apiKeys.d.ts +0 -11
  52. package/dist/commonjs/component/apiKeys.d.ts.map +0 -1
  53. package/dist/commonjs/component/apiKeys.js +0 -72
  54. package/dist/commonjs/component/apiKeys.js.map +0 -1
  55. package/dist/commonjs/component/convex.config.d.ts +0 -3
  56. package/dist/commonjs/component/convex.config.d.ts.map +0 -1
  57. package/dist/commonjs/component/convex.config.js +0 -5
  58. package/dist/commonjs/component/convex.config.js.map +0 -1
  59. package/dist/commonjs/component/files.d.ts +0 -90
  60. package/dist/commonjs/component/files.d.ts.map +0 -1
  61. package/dist/commonjs/component/files.js +0 -157
  62. package/dist/commonjs/component/files.js.map +0 -1
  63. package/dist/commonjs/component/messages.d.ts +0 -1479
  64. package/dist/commonjs/component/messages.d.ts.map +0 -1
  65. package/dist/commonjs/component/messages.js +0 -483
  66. package/dist/commonjs/component/messages.js.map +0 -1
  67. package/dist/commonjs/component/schema.d.ts +0 -4582
  68. package/dist/commonjs/component/schema.d.ts.map +0 -1
  69. package/dist/commonjs/component/schema.js +0 -167
  70. package/dist/commonjs/component/schema.js.map +0 -1
  71. package/dist/commonjs/component/streams.d.ts +0 -242
  72. package/dist/commonjs/component/streams.d.ts.map +0 -1
  73. package/dist/commonjs/component/streams.js +0 -323
  74. package/dist/commonjs/component/streams.js.map +0 -1
  75. package/dist/commonjs/component/threads.d.ts +0 -101
  76. package/dist/commonjs/component/threads.d.ts.map +0 -1
  77. package/dist/commonjs/component/threads.js +0 -188
  78. package/dist/commonjs/component/threads.js.map +0 -1
  79. package/dist/commonjs/component/users.d.ts +0 -52
  80. package/dist/commonjs/component/users.d.ts.map +0 -1
  81. package/dist/commonjs/component/users.js +0 -233
  82. package/dist/commonjs/component/users.js.map +0 -1
  83. package/dist/commonjs/component/vector/index.d.ts +0 -61
  84. package/dist/commonjs/component/vector/index.d.ts.map +0 -1
  85. package/dist/commonjs/component/vector/index.js +0 -153
  86. package/dist/commonjs/component/vector/index.js.map +0 -1
  87. package/dist/commonjs/component/vector/tables.d.ts +0 -58
  88. package/dist/commonjs/component/vector/tables.d.ts.map +0 -1
  89. package/dist/commonjs/component/vector/tables.js +0 -62
  90. package/dist/commonjs/component/vector/tables.js.map +0 -1
  91. package/dist/commonjs/mapping.d.ts +0 -50
  92. package/dist/commonjs/mapping.d.ts.map +0 -1
  93. package/dist/commonjs/mapping.js +0 -272
  94. package/dist/commonjs/mapping.js.map +0 -1
  95. package/dist/commonjs/package.json +0 -3
  96. package/dist/commonjs/react/deltas.d.ts +0 -29
  97. package/dist/commonjs/react/deltas.d.ts.map +0 -1
  98. package/dist/commonjs/react/deltas.js +0 -274
  99. package/dist/commonjs/react/deltas.js.map +0 -1
  100. package/dist/commonjs/react/index.d.ts +0 -95
  101. package/dist/commonjs/react/index.d.ts.map +0 -1
  102. package/dist/commonjs/react/index.js +0 -219
  103. package/dist/commonjs/react/index.js.map +0 -1
  104. package/dist/commonjs/react/optimisticallySendMessage.d.ts +0 -8
  105. package/dist/commonjs/react/optimisticallySendMessage.d.ts.map +0 -1
  106. package/dist/commonjs/react/optimisticallySendMessage.js +0 -43
  107. package/dist/commonjs/react/optimisticallySendMessage.js.map +0 -1
  108. package/dist/commonjs/react/toUIMessages.d.ts +0 -13
  109. package/dist/commonjs/react/toUIMessages.d.ts.map +0 -1
  110. package/dist/commonjs/react/toUIMessages.js +0 -149
  111. package/dist/commonjs/react/toUIMessages.js.map +0 -1
  112. package/dist/commonjs/react/types.d.ts +0 -26
  113. package/dist/commonjs/react/types.d.ts.map +0 -1
  114. package/dist/commonjs/react/types.js +0 -3
  115. package/dist/commonjs/react/types.js.map +0 -1
  116. package/dist/commonjs/react/useSmoothText.d.ts +0 -20
  117. package/dist/commonjs/react/useSmoothText.d.ts.map +0 -1
  118. package/dist/commonjs/react/useSmoothText.js +0 -54
  119. package/dist/commonjs/react/useSmoothText.js.map +0 -1
  120. package/dist/commonjs/shared.d.ts +0 -10
  121. package/dist/commonjs/shared.d.ts.map +0 -1
  122. package/dist/commonjs/shared.js +0 -35
  123. package/dist/commonjs/shared.js.map +0 -1
  124. package/dist/commonjs/validators.d.ts +0 -5716
  125. package/dist/commonjs/validators.d.ts.map +0 -1
  126. package/dist/commonjs/validators.js +0 -319
  127. package/dist/commonjs/validators.js.map +0 -1
  128. package/dist/commonjs/vitest.config.d.ts +0 -3
  129. package/dist/commonjs/vitest.config.d.ts.map +0 -1
  130. package/dist/commonjs/vitest.config.js +0 -9
  131. package/dist/commonjs/vitest.config.js.map +0 -1
  132. package/dist/commonjs.tsbuildinfo +0 -1
  133. package/dist/esm/vitest.config.d.ts +0 -3
  134. package/dist/esm/vitest.config.d.ts.map +0 -1
  135. package/dist/esm/vitest.config.js +0 -7
  136. package/dist/esm/vitest.config.js.map +0 -1
  137. package/react/package.json +0 -5
  138. package/validators/package.json +0 -5
@@ -1,4582 +0,0 @@
1
- import { type Infer } from "convex/values";
2
- export declare const schema: import("convex/server").SchemaDefinition<{
3
- apiKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
4
- name?: string | undefined;
5
- }, {
6
- name: import("convex/values").VString<string | undefined, "optional">;
7
- }, "required", "name">, {
8
- name: ["name", "_creationTime"];
9
- }, {}, {}>;
10
- embeddings_128: import("convex/server").TableDefinition<import("convex/values").VObject<{
11
- userId?: string | undefined;
12
- threadId?: string | undefined;
13
- model_table_userId?: string[] | undefined;
14
- model_table_threadId?: string[] | undefined;
15
- model: string;
16
- table: string;
17
- vector: number[];
18
- }, {
19
- model: import("convex/values").VString<string, "required">;
20
- table: import("convex/values").VString<string, "required">;
21
- userId: import("convex/values").VString<string | undefined, "optional">;
22
- threadId: import("convex/values").VString<string | undefined, "optional">;
23
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
24
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
25
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
26
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
27
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
28
- }, import("convex/server").GenericTableSearchIndexes, {
29
- vector: {
30
- vectorField: "vector";
31
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
32
- filterFields: "model_table_userId" | "model_table_threadId";
33
- };
34
- }>;
35
- embeddings_256: import("convex/server").TableDefinition<import("convex/values").VObject<{
36
- userId?: string | undefined;
37
- threadId?: string | undefined;
38
- model_table_userId?: string[] | undefined;
39
- model_table_threadId?: string[] | undefined;
40
- model: string;
41
- table: string;
42
- vector: number[];
43
- }, {
44
- model: import("convex/values").VString<string, "required">;
45
- table: import("convex/values").VString<string, "required">;
46
- userId: import("convex/values").VString<string | undefined, "optional">;
47
- threadId: import("convex/values").VString<string | undefined, "optional">;
48
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
49
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
50
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
51
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
52
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
53
- }, import("convex/server").GenericTableSearchIndexes, {
54
- vector: {
55
- vectorField: "vector";
56
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
57
- filterFields: "model_table_userId" | "model_table_threadId";
58
- };
59
- }>;
60
- embeddings_512: import("convex/server").TableDefinition<import("convex/values").VObject<{
61
- userId?: string | undefined;
62
- threadId?: string | undefined;
63
- model_table_userId?: string[] | undefined;
64
- model_table_threadId?: string[] | undefined;
65
- model: string;
66
- table: string;
67
- vector: number[];
68
- }, {
69
- model: import("convex/values").VString<string, "required">;
70
- table: import("convex/values").VString<string, "required">;
71
- userId: import("convex/values").VString<string | undefined, "optional">;
72
- threadId: import("convex/values").VString<string | undefined, "optional">;
73
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
74
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
75
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
76
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
77
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
78
- }, import("convex/server").GenericTableSearchIndexes, {
79
- vector: {
80
- vectorField: "vector";
81
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
82
- filterFields: "model_table_userId" | "model_table_threadId";
83
- };
84
- }>;
85
- embeddings_768: import("convex/server").TableDefinition<import("convex/values").VObject<{
86
- userId?: string | undefined;
87
- threadId?: string | undefined;
88
- model_table_userId?: string[] | undefined;
89
- model_table_threadId?: string[] | undefined;
90
- model: string;
91
- table: string;
92
- vector: number[];
93
- }, {
94
- model: import("convex/values").VString<string, "required">;
95
- table: import("convex/values").VString<string, "required">;
96
- userId: import("convex/values").VString<string | undefined, "optional">;
97
- threadId: import("convex/values").VString<string | undefined, "optional">;
98
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
99
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
100
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
101
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
102
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
103
- }, import("convex/server").GenericTableSearchIndexes, {
104
- vector: {
105
- vectorField: "vector";
106
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
107
- filterFields: "model_table_userId" | "model_table_threadId";
108
- };
109
- }>;
110
- embeddings_1024: import("convex/server").TableDefinition<import("convex/values").VObject<{
111
- userId?: string | undefined;
112
- threadId?: string | undefined;
113
- model_table_userId?: string[] | undefined;
114
- model_table_threadId?: string[] | undefined;
115
- model: string;
116
- table: string;
117
- vector: number[];
118
- }, {
119
- model: import("convex/values").VString<string, "required">;
120
- table: import("convex/values").VString<string, "required">;
121
- userId: import("convex/values").VString<string | undefined, "optional">;
122
- threadId: import("convex/values").VString<string | undefined, "optional">;
123
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
124
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
125
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
126
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
127
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
128
- }, import("convex/server").GenericTableSearchIndexes, {
129
- vector: {
130
- vectorField: "vector";
131
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
132
- filterFields: "model_table_userId" | "model_table_threadId";
133
- };
134
- }>;
135
- embeddings_1408: import("convex/server").TableDefinition<import("convex/values").VObject<{
136
- userId?: string | undefined;
137
- threadId?: string | undefined;
138
- model_table_userId?: string[] | undefined;
139
- model_table_threadId?: string[] | undefined;
140
- model: string;
141
- table: string;
142
- vector: number[];
143
- }, {
144
- model: import("convex/values").VString<string, "required">;
145
- table: import("convex/values").VString<string, "required">;
146
- userId: import("convex/values").VString<string | undefined, "optional">;
147
- threadId: import("convex/values").VString<string | undefined, "optional">;
148
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
149
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
150
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
151
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
152
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
153
- }, import("convex/server").GenericTableSearchIndexes, {
154
- vector: {
155
- vectorField: "vector";
156
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
157
- filterFields: "model_table_userId" | "model_table_threadId";
158
- };
159
- }>;
160
- embeddings_1536: import("convex/server").TableDefinition<import("convex/values").VObject<{
161
- userId?: string | undefined;
162
- threadId?: string | undefined;
163
- model_table_userId?: string[] | undefined;
164
- model_table_threadId?: string[] | undefined;
165
- model: string;
166
- table: string;
167
- vector: number[];
168
- }, {
169
- model: import("convex/values").VString<string, "required">;
170
- table: import("convex/values").VString<string, "required">;
171
- userId: import("convex/values").VString<string | undefined, "optional">;
172
- threadId: import("convex/values").VString<string | undefined, "optional">;
173
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
174
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
175
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
176
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
177
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
178
- }, import("convex/server").GenericTableSearchIndexes, {
179
- vector: {
180
- vectorField: "vector";
181
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
182
- filterFields: "model_table_userId" | "model_table_threadId";
183
- };
184
- }>;
185
- embeddings_2048: import("convex/server").TableDefinition<import("convex/values").VObject<{
186
- userId?: string | undefined;
187
- threadId?: string | undefined;
188
- model_table_userId?: string[] | undefined;
189
- model_table_threadId?: string[] | undefined;
190
- model: string;
191
- table: string;
192
- vector: number[];
193
- }, {
194
- model: import("convex/values").VString<string, "required">;
195
- table: import("convex/values").VString<string, "required">;
196
- userId: import("convex/values").VString<string | undefined, "optional">;
197
- threadId: import("convex/values").VString<string | undefined, "optional">;
198
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
199
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
200
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
201
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
202
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
203
- }, import("convex/server").GenericTableSearchIndexes, {
204
- vector: {
205
- vectorField: "vector";
206
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
207
- filterFields: "model_table_userId" | "model_table_threadId";
208
- };
209
- }>;
210
- embeddings_3072: import("convex/server").TableDefinition<import("convex/values").VObject<{
211
- userId?: string | undefined;
212
- threadId?: string | undefined;
213
- model_table_userId?: string[] | undefined;
214
- model_table_threadId?: string[] | undefined;
215
- model: string;
216
- table: string;
217
- vector: number[];
218
- }, {
219
- model: import("convex/values").VString<string, "required">;
220
- table: import("convex/values").VString<string, "required">;
221
- userId: import("convex/values").VString<string | undefined, "optional">;
222
- threadId: import("convex/values").VString<string | undefined, "optional">;
223
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
224
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
225
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
226
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
227
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
228
- }, import("convex/server").GenericTableSearchIndexes, {
229
- vector: {
230
- vectorField: "vector";
231
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
232
- filterFields: "model_table_userId" | "model_table_threadId";
233
- };
234
- }>;
235
- embeddings_4096: import("convex/server").TableDefinition<import("convex/values").VObject<{
236
- userId?: string | undefined;
237
- threadId?: string | undefined;
238
- model_table_userId?: string[] | undefined;
239
- model_table_threadId?: string[] | undefined;
240
- model: string;
241
- table: string;
242
- vector: number[];
243
- }, {
244
- model: import("convex/values").VString<string, "required">;
245
- table: import("convex/values").VString<string, "required">;
246
- userId: import("convex/values").VString<string | undefined, "optional">;
247
- threadId: import("convex/values").VString<string | undefined, "optional">;
248
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
249
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
250
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
251
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
252
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
253
- }, import("convex/server").GenericTableSearchIndexes, {
254
- vector: {
255
- vectorField: "vector";
256
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
257
- filterFields: "model_table_userId" | "model_table_threadId";
258
- };
259
- }>;
260
- threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
261
- userId?: string | undefined;
262
- title?: string | undefined;
263
- summary?: string | undefined;
264
- defaultSystemPrompt?: string | undefined;
265
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
266
- order?: number | undefined;
267
- status: "active" | "archived";
268
- }, {
269
- userId: import("convex/values").VString<string | undefined, "optional">;
270
- title: import("convex/values").VString<string | undefined, "optional">;
271
- summary: import("convex/values").VString<string | undefined, "optional">;
272
- status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
273
- defaultSystemPrompt: import("convex/values").VString<string | undefined, "optional">;
274
- parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
275
- order: import("convex/values").VFloat64<number | undefined, "optional">;
276
- }, "required", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
277
- userId: ["userId", "_creationTime"];
278
- }, {}, {}>;
279
- messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
280
- id?: string | undefined;
281
- userId?: string | undefined;
282
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
283
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
284
- files?: any[] | undefined;
285
- error?: string | undefined;
286
- agentName?: string | undefined;
287
- model?: string | undefined;
288
- provider?: string | undefined;
289
- providerOptions?: Record<string, Record<string, any>> | undefined;
290
- message?: {
291
- providerOptions?: Record<string, Record<string, any>> | undefined;
292
- role: "user";
293
- content: string | ({
294
- providerOptions?: Record<string, Record<string, any>> | undefined;
295
- type: "text";
296
- text: string;
297
- } | {
298
- providerOptions?: Record<string, Record<string, any>> | undefined;
299
- mimeType?: string | undefined;
300
- type: "image";
301
- image: string | ArrayBuffer;
302
- } | {
303
- providerOptions?: Record<string, Record<string, any>> | undefined;
304
- filename?: string | undefined;
305
- type: "file";
306
- mimeType: string;
307
- data: string | ArrayBuffer;
308
- })[];
309
- } | {
310
- providerOptions?: Record<string, Record<string, any>> | undefined;
311
- role: "assistant";
312
- content: string | ({
313
- providerOptions?: Record<string, Record<string, any>> | undefined;
314
- type: "text";
315
- text: string;
316
- } | {
317
- providerOptions?: Record<string, Record<string, any>> | undefined;
318
- filename?: string | undefined;
319
- type: "file";
320
- mimeType: string;
321
- data: string | ArrayBuffer;
322
- } | {
323
- providerOptions?: Record<string, Record<string, any>> | undefined;
324
- signature?: string | undefined;
325
- type: "reasoning";
326
- text: string;
327
- } | {
328
- providerOptions?: Record<string, Record<string, any>> | undefined;
329
- type: "redacted-reasoning";
330
- data: string;
331
- } | {
332
- providerOptions?: Record<string, Record<string, any>> | undefined;
333
- type: "tool-call";
334
- toolCallId: string;
335
- toolName: string;
336
- args: any;
337
- })[];
338
- } | {
339
- providerOptions?: Record<string, Record<string, any>> | undefined;
340
- role: "tool";
341
- content: {
342
- providerOptions?: Record<string, Record<string, any>> | undefined;
343
- args?: any;
344
- experimental_content?: ({
345
- type: "text";
346
- text: string;
347
- } | {
348
- mimeType?: string | undefined;
349
- type: "image";
350
- data: string;
351
- })[] | undefined;
352
- isError?: boolean | undefined;
353
- type: "tool-result";
354
- toolCallId: string;
355
- toolName: string;
356
- result: any;
357
- }[];
358
- } | {
359
- providerOptions?: Record<string, Record<string, any>> | undefined;
360
- role: "system";
361
- content: string;
362
- } | undefined;
363
- text?: string | undefined;
364
- reasoning?: string | undefined;
365
- usage?: {
366
- promptTokens: number;
367
- completionTokens: number;
368
- totalTokens: number;
369
- } | undefined;
370
- providerMetadata?: Record<string, Record<string, any>> | undefined;
371
- sources?: {
372
- title?: string | undefined;
373
- providerOptions?: Record<string, Record<string, any>> | undefined;
374
- id: string;
375
- sourceType: "url";
376
- url: string;
377
- }[] | undefined;
378
- reasoningDetails?: ({
379
- signature?: string | undefined;
380
- type: "text";
381
- text: string;
382
- } | {
383
- type: "redacted";
384
- data: string;
385
- })[] | undefined;
386
- warnings?: ({
387
- details?: string | undefined;
388
- type: "unsupported-setting";
389
- setting: string;
390
- } | {
391
- details?: string | undefined;
392
- type: "unsupported-tool";
393
- tool: any;
394
- } | {
395
- type: "other";
396
- message: string;
397
- })[] | undefined;
398
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
399
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
400
- stepId?: string | undefined;
401
- status: "pending" | "success" | "failed";
402
- order: number;
403
- threadId: import("convex/values").GenericId<"threads">;
404
- stepOrder: number;
405
- tool: boolean;
406
- }, {
407
- id: import("convex/values").VString<string | undefined, "optional">;
408
- userId: import("convex/values").VString<string | undefined, "optional">;
409
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
410
- order: import("convex/values").VFloat64<number, "required">;
411
- stepOrder: import("convex/values").VFloat64<number, "required">;
412
- embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
413
- fileIds: import("convex/values").VArray<import("convex/values").GenericId<"files">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"files">, "required">, "optional">;
414
- error: import("convex/values").VString<string | undefined, "optional">;
415
- 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>;
416
- agentName: import("convex/values").VString<string | undefined, "optional">;
417
- model: import("convex/values").VString<string | undefined, "optional">;
418
- provider: import("convex/values").VString<string | undefined, "optional">;
419
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
420
- message: import("convex/values").VUnion<{
421
- providerOptions?: Record<string, Record<string, any>> | undefined;
422
- role: "user";
423
- content: string | ({
424
- providerOptions?: Record<string, Record<string, any>> | undefined;
425
- type: "text";
426
- text: string;
427
- } | {
428
- providerOptions?: Record<string, Record<string, any>> | undefined;
429
- mimeType?: string | undefined;
430
- type: "image";
431
- image: string | ArrayBuffer;
432
- } | {
433
- providerOptions?: Record<string, Record<string, any>> | undefined;
434
- filename?: string | undefined;
435
- type: "file";
436
- mimeType: string;
437
- data: string | ArrayBuffer;
438
- })[];
439
- } | {
440
- providerOptions?: Record<string, Record<string, any>> | undefined;
441
- role: "assistant";
442
- content: string | ({
443
- providerOptions?: Record<string, Record<string, any>> | undefined;
444
- type: "text";
445
- text: string;
446
- } | {
447
- providerOptions?: Record<string, Record<string, any>> | undefined;
448
- filename?: string | undefined;
449
- type: "file";
450
- mimeType: string;
451
- data: string | ArrayBuffer;
452
- } | {
453
- providerOptions?: Record<string, Record<string, any>> | undefined;
454
- signature?: string | undefined;
455
- type: "reasoning";
456
- text: string;
457
- } | {
458
- providerOptions?: Record<string, Record<string, any>> | undefined;
459
- type: "redacted-reasoning";
460
- data: string;
461
- } | {
462
- providerOptions?: Record<string, Record<string, any>> | undefined;
463
- type: "tool-call";
464
- toolCallId: string;
465
- toolName: string;
466
- args: any;
467
- })[];
468
- } | {
469
- providerOptions?: Record<string, Record<string, any>> | undefined;
470
- role: "tool";
471
- content: {
472
- providerOptions?: Record<string, Record<string, any>> | undefined;
473
- args?: any;
474
- experimental_content?: ({
475
- type: "text";
476
- text: string;
477
- } | {
478
- mimeType?: string | undefined;
479
- type: "image";
480
- data: string;
481
- })[] | undefined;
482
- isError?: boolean | undefined;
483
- type: "tool-result";
484
- toolCallId: string;
485
- toolName: string;
486
- result: any;
487
- }[];
488
- } | {
489
- providerOptions?: Record<string, Record<string, any>> | undefined;
490
- role: "system";
491
- content: string;
492
- } | undefined, [import("convex/values").VObject<{
493
- providerOptions?: Record<string, Record<string, any>> | undefined;
494
- role: "user";
495
- content: string | ({
496
- providerOptions?: Record<string, Record<string, any>> | undefined;
497
- type: "text";
498
- text: string;
499
- } | {
500
- providerOptions?: Record<string, Record<string, any>> | undefined;
501
- mimeType?: string | undefined;
502
- type: "image";
503
- image: string | ArrayBuffer;
504
- } | {
505
- providerOptions?: Record<string, Record<string, any>> | undefined;
506
- filename?: string | undefined;
507
- type: "file";
508
- mimeType: string;
509
- data: string | ArrayBuffer;
510
- })[];
511
- }, {
512
- role: import("convex/values").VLiteral<"user", "required">;
513
- content: import("convex/values").VUnion<string | ({
514
- providerOptions?: Record<string, Record<string, any>> | undefined;
515
- type: "text";
516
- text: string;
517
- } | {
518
- providerOptions?: Record<string, Record<string, any>> | undefined;
519
- mimeType?: string | undefined;
520
- type: "image";
521
- image: string | ArrayBuffer;
522
- } | {
523
- providerOptions?: Record<string, Record<string, any>> | undefined;
524
- filename?: string | undefined;
525
- type: "file";
526
- mimeType: string;
527
- data: string | ArrayBuffer;
528
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
529
- providerOptions?: Record<string, Record<string, any>> | undefined;
530
- type: "text";
531
- text: string;
532
- } | {
533
- providerOptions?: Record<string, Record<string, any>> | undefined;
534
- mimeType?: string | undefined;
535
- type: "image";
536
- image: string | ArrayBuffer;
537
- } | {
538
- providerOptions?: Record<string, Record<string, any>> | undefined;
539
- filename?: string | undefined;
540
- type: "file";
541
- mimeType: string;
542
- data: string | ArrayBuffer;
543
- })[], import("convex/values").VUnion<{
544
- providerOptions?: Record<string, Record<string, any>> | undefined;
545
- type: "text";
546
- text: string;
547
- } | {
548
- providerOptions?: Record<string, Record<string, any>> | undefined;
549
- mimeType?: string | undefined;
550
- type: "image";
551
- image: string | ArrayBuffer;
552
- } | {
553
- providerOptions?: Record<string, Record<string, any>> | undefined;
554
- filename?: string | undefined;
555
- type: "file";
556
- mimeType: string;
557
- data: string | ArrayBuffer;
558
- }, [import("convex/values").VObject<{
559
- providerOptions?: Record<string, Record<string, any>> | undefined;
560
- type: "text";
561
- text: string;
562
- }, {
563
- type: import("convex/values").VLiteral<"text", "required">;
564
- text: import("convex/values").VString<string, "required">;
565
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
566
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
567
- providerOptions?: Record<string, Record<string, any>> | undefined;
568
- mimeType?: string | undefined;
569
- type: "image";
570
- image: string | ArrayBuffer;
571
- }, {
572
- type: import("convex/values").VLiteral<"image", "required">;
573
- image: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
574
- mimeType: import("convex/values").VString<string | undefined, "optional">;
575
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
576
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType">, import("convex/values").VObject<{
577
- providerOptions?: Record<string, Record<string, any>> | undefined;
578
- filename?: string | undefined;
579
- type: "file";
580
- mimeType: string;
581
- data: string | ArrayBuffer;
582
- }, {
583
- type: import("convex/values").VLiteral<"file", "required">;
584
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
585
- filename: import("convex/values").VString<string | undefined, "optional">;
586
- mimeType: import("convex/values").VString<string, "required">;
587
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
588
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
589
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
590
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
591
- providerOptions?: Record<string, Record<string, any>> | undefined;
592
- role: "assistant";
593
- content: string | ({
594
- providerOptions?: Record<string, Record<string, any>> | undefined;
595
- type: "text";
596
- text: string;
597
- } | {
598
- providerOptions?: Record<string, Record<string, any>> | undefined;
599
- filename?: string | undefined;
600
- type: "file";
601
- mimeType: string;
602
- data: string | ArrayBuffer;
603
- } | {
604
- providerOptions?: Record<string, Record<string, any>> | undefined;
605
- signature?: string | undefined;
606
- type: "reasoning";
607
- text: string;
608
- } | {
609
- providerOptions?: Record<string, Record<string, any>> | undefined;
610
- type: "redacted-reasoning";
611
- data: string;
612
- } | {
613
- providerOptions?: Record<string, Record<string, any>> | undefined;
614
- type: "tool-call";
615
- toolCallId: string;
616
- toolName: string;
617
- args: any;
618
- })[];
619
- }, {
620
- role: import("convex/values").VLiteral<"assistant", "required">;
621
- content: import("convex/values").VUnion<string | ({
622
- providerOptions?: Record<string, Record<string, any>> | undefined;
623
- type: "text";
624
- text: string;
625
- } | {
626
- providerOptions?: Record<string, Record<string, any>> | undefined;
627
- filename?: string | undefined;
628
- type: "file";
629
- mimeType: string;
630
- data: string | ArrayBuffer;
631
- } | {
632
- providerOptions?: Record<string, Record<string, any>> | undefined;
633
- signature?: string | undefined;
634
- type: "reasoning";
635
- text: string;
636
- } | {
637
- providerOptions?: Record<string, Record<string, any>> | undefined;
638
- type: "redacted-reasoning";
639
- data: string;
640
- } | {
641
- providerOptions?: Record<string, Record<string, any>> | undefined;
642
- type: "tool-call";
643
- toolCallId: string;
644
- toolName: string;
645
- args: any;
646
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
647
- providerOptions?: Record<string, Record<string, any>> | undefined;
648
- type: "text";
649
- text: string;
650
- } | {
651
- providerOptions?: Record<string, Record<string, any>> | undefined;
652
- filename?: string | undefined;
653
- type: "file";
654
- mimeType: string;
655
- data: string | ArrayBuffer;
656
- } | {
657
- providerOptions?: Record<string, Record<string, any>> | undefined;
658
- signature?: string | undefined;
659
- type: "reasoning";
660
- text: string;
661
- } | {
662
- providerOptions?: Record<string, Record<string, any>> | undefined;
663
- type: "redacted-reasoning";
664
- data: string;
665
- } | {
666
- providerOptions?: Record<string, Record<string, any>> | undefined;
667
- type: "tool-call";
668
- toolCallId: string;
669
- toolName: string;
670
- args: any;
671
- })[], import("convex/values").VUnion<{
672
- providerOptions?: Record<string, Record<string, any>> | undefined;
673
- type: "text";
674
- text: string;
675
- } | {
676
- providerOptions?: Record<string, Record<string, any>> | undefined;
677
- filename?: string | undefined;
678
- type: "file";
679
- mimeType: string;
680
- data: string | ArrayBuffer;
681
- } | {
682
- providerOptions?: Record<string, Record<string, any>> | undefined;
683
- signature?: string | undefined;
684
- type: "reasoning";
685
- text: string;
686
- } | {
687
- providerOptions?: Record<string, Record<string, any>> | undefined;
688
- type: "redacted-reasoning";
689
- data: string;
690
- } | {
691
- providerOptions?: Record<string, Record<string, any>> | undefined;
692
- type: "tool-call";
693
- toolCallId: string;
694
- toolName: string;
695
- args: any;
696
- }, [import("convex/values").VObject<{
697
- providerOptions?: Record<string, Record<string, any>> | undefined;
698
- type: "text";
699
- text: string;
700
- }, {
701
- type: import("convex/values").VLiteral<"text", "required">;
702
- text: import("convex/values").VString<string, "required">;
703
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
704
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
705
- providerOptions?: Record<string, Record<string, any>> | undefined;
706
- filename?: string | undefined;
707
- type: "file";
708
- mimeType: string;
709
- data: string | ArrayBuffer;
710
- }, {
711
- type: import("convex/values").VLiteral<"file", "required">;
712
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
713
- filename: import("convex/values").VString<string | undefined, "optional">;
714
- mimeType: import("convex/values").VString<string, "required">;
715
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
716
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
717
- providerOptions?: Record<string, Record<string, any>> | undefined;
718
- signature?: string | undefined;
719
- type: "reasoning";
720
- text: string;
721
- }, {
722
- type: import("convex/values").VLiteral<"reasoning", "required">;
723
- text: import("convex/values").VString<string, "required">;
724
- signature: import("convex/values").VString<string | undefined, "optional">;
725
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
726
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
727
- providerOptions?: Record<string, Record<string, any>> | undefined;
728
- type: "redacted-reasoning";
729
- data: string;
730
- }, {
731
- type: import("convex/values").VLiteral<"redacted-reasoning", "required">;
732
- data: import("convex/values").VString<string, "required">;
733
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
734
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
735
- providerOptions?: Record<string, Record<string, any>> | undefined;
736
- type: "tool-call";
737
- toolCallId: string;
738
- toolName: string;
739
- args: any;
740
- }, {
741
- type: import("convex/values").VLiteral<"tool-call", "required">;
742
- toolCallId: import("convex/values").VString<string, "required">;
743
- toolName: import("convex/values").VString<string, "required">;
744
- args: import("convex/values").VAny<any, "required", string>;
745
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
746
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
747
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
748
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
749
- providerOptions?: Record<string, Record<string, any>> | undefined;
750
- role: "tool";
751
- content: {
752
- providerOptions?: Record<string, Record<string, any>> | undefined;
753
- args?: any;
754
- experimental_content?: ({
755
- type: "text";
756
- text: string;
757
- } | {
758
- mimeType?: string | undefined;
759
- type: "image";
760
- data: string;
761
- })[] | undefined;
762
- isError?: boolean | undefined;
763
- type: "tool-result";
764
- toolCallId: string;
765
- toolName: string;
766
- result: any;
767
- }[];
768
- }, {
769
- role: import("convex/values").VLiteral<"tool", "required">;
770
- content: import("convex/values").VArray<{
771
- providerOptions?: Record<string, Record<string, any>> | undefined;
772
- args?: any;
773
- experimental_content?: ({
774
- type: "text";
775
- text: string;
776
- } | {
777
- mimeType?: string | undefined;
778
- type: "image";
779
- data: string;
780
- })[] | undefined;
781
- isError?: boolean | undefined;
782
- type: "tool-result";
783
- toolCallId: string;
784
- toolName: string;
785
- result: any;
786
- }[], import("convex/values").VObject<{
787
- providerOptions?: Record<string, Record<string, any>> | undefined;
788
- args?: any;
789
- experimental_content?: ({
790
- type: "text";
791
- text: string;
792
- } | {
793
- mimeType?: string | undefined;
794
- type: "image";
795
- data: string;
796
- })[] | undefined;
797
- isError?: boolean | undefined;
798
- type: "tool-result";
799
- toolCallId: string;
800
- toolName: string;
801
- result: any;
802
- }, {
803
- type: import("convex/values").VLiteral<"tool-result", "required">;
804
- toolCallId: import("convex/values").VString<string, "required">;
805
- toolName: import("convex/values").VString<string, "required">;
806
- result: import("convex/values").VAny<any, "required", string>;
807
- args: import("convex/values").VAny<any, "optional", string>;
808
- experimental_content: import("convex/values").VArray<({
809
- type: "text";
810
- text: string;
811
- } | {
812
- mimeType?: string | undefined;
813
- type: "image";
814
- data: string;
815
- })[] | undefined, import("convex/values").VUnion<{
816
- type: "text";
817
- text: string;
818
- } | {
819
- mimeType?: string | undefined;
820
- type: "image";
821
- data: string;
822
- }, [import("convex/values").VObject<{
823
- type: "text";
824
- text: string;
825
- }, {
826
- type: import("convex/values").VLiteral<"text", "required">;
827
- text: import("convex/values").VString<string, "required">;
828
- }, "required", "type" | "text">, import("convex/values").VObject<{
829
- mimeType?: string | undefined;
830
- type: "image";
831
- data: string;
832
- }, {
833
- type: import("convex/values").VLiteral<"image", "required">;
834
- data: import("convex/values").VString<string, "required">;
835
- mimeType: import("convex/values").VString<string | undefined, "optional">;
836
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
837
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
838
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
839
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
840
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
841
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
842
- providerOptions?: Record<string, Record<string, any>> | undefined;
843
- role: "system";
844
- content: string;
845
- }, {
846
- role: import("convex/values").VLiteral<"system", "required">;
847
- content: import("convex/values").VString<string, "required">;
848
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
849
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
850
- tool: import("convex/values").VBoolean<boolean, "required">;
851
- text: import("convex/values").VString<string | undefined, "optional">;
852
- usage: import("convex/values").VObject<{
853
- promptTokens: number;
854
- completionTokens: number;
855
- totalTokens: number;
856
- } | undefined, {
857
- promptTokens: import("convex/values").VFloat64<number, "required">;
858
- completionTokens: import("convex/values").VFloat64<number, "required">;
859
- totalTokens: import("convex/values").VFloat64<number, "required">;
860
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
861
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
862
- sources: import("convex/values").VArray<{
863
- title?: string | undefined;
864
- providerOptions?: Record<string, Record<string, any>> | undefined;
865
- id: string;
866
- sourceType: "url";
867
- url: string;
868
- }[] | undefined, import("convex/values").VObject<{
869
- title?: string | undefined;
870
- providerOptions?: Record<string, Record<string, any>> | undefined;
871
- id: string;
872
- sourceType: "url";
873
- url: string;
874
- }, {
875
- sourceType: import("convex/values").VLiteral<"url", "required">;
876
- id: import("convex/values").VString<string, "required">;
877
- url: import("convex/values").VString<string, "required">;
878
- title: import("convex/values").VString<string | undefined, "optional">;
879
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
880
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
881
- reasoning: import("convex/values").VString<string | undefined, "optional">;
882
- reasoningDetails: import("convex/values").VArray<({
883
- signature?: string | undefined;
884
- type: "text";
885
- text: string;
886
- } | {
887
- type: "redacted";
888
- data: string;
889
- })[] | undefined, import("convex/values").VUnion<{
890
- signature?: string | undefined;
891
- type: "text";
892
- text: string;
893
- } | {
894
- type: "redacted";
895
- data: string;
896
- }, [import("convex/values").VObject<{
897
- signature?: string | undefined;
898
- type: "text";
899
- text: string;
900
- }, {
901
- type: import("convex/values").VLiteral<"text", "required">;
902
- text: import("convex/values").VString<string, "required">;
903
- signature: import("convex/values").VString<string | undefined, "optional">;
904
- }, "required", "type" | "text" | "signature">, import("convex/values").VObject<{
905
- type: "redacted";
906
- data: string;
907
- }, {
908
- type: import("convex/values").VLiteral<"redacted", "required">;
909
- data: import("convex/values").VString<string, "required">;
910
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
911
- warnings: import("convex/values").VArray<({
912
- details?: string | undefined;
913
- type: "unsupported-setting";
914
- setting: string;
915
- } | {
916
- details?: string | undefined;
917
- type: "unsupported-tool";
918
- tool: any;
919
- } | {
920
- type: "other";
921
- message: string;
922
- })[] | undefined, import("convex/values").VUnion<{
923
- details?: string | undefined;
924
- type: "unsupported-setting";
925
- setting: string;
926
- } | {
927
- details?: string | undefined;
928
- type: "unsupported-tool";
929
- tool: any;
930
- } | {
931
- type: "other";
932
- message: string;
933
- }, [import("convex/values").VObject<{
934
- details?: string | undefined;
935
- type: "unsupported-setting";
936
- setting: string;
937
- }, {
938
- type: import("convex/values").VLiteral<"unsupported-setting", "required">;
939
- setting: import("convex/values").VString<string, "required">;
940
- details: import("convex/values").VString<string | undefined, "optional">;
941
- }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
942
- details?: string | undefined;
943
- type: "unsupported-tool";
944
- tool: any;
945
- }, {
946
- type: import("convex/values").VLiteral<"unsupported-tool", "required">;
947
- tool: import("convex/values").VAny<any, "required", string>;
948
- details: import("convex/values").VString<string | undefined, "optional">;
949
- }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
950
- type: "other";
951
- message: string;
952
- }, {
953
- type: import("convex/values").VLiteral<"other", "required">;
954
- message: import("convex/values").VString<string, "required">;
955
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
956
- finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
957
- parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
958
- stepId: import("convex/values").VString<string | undefined, "optional">;
959
- files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
960
- }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>, {
961
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
962
- embeddingId: ["embeddingId", "_creationTime"];
963
- }, {
964
- text_search: {
965
- searchField: "text";
966
- filterFields: "userId" | "threadId";
967
- };
968
- }, {}>;
969
- streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
970
- userId?: string | undefined;
971
- agentName?: string | undefined;
972
- model?: string | undefined;
973
- provider?: string | undefined;
974
- providerOptions?: Record<string, Record<string, any>> | undefined;
975
- order: number;
976
- threadId: import("convex/values").GenericId<"threads">;
977
- stepOrder: number;
978
- state: {
979
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
980
- kind: "streaming";
981
- lastHeartbeat: number;
982
- } | {
983
- kind: "finished";
984
- endedAt: number;
985
- } | {
986
- kind: "error";
987
- error: string;
988
- };
989
- }, {
990
- userId: import("convex/values").VString<string | undefined, "optional">;
991
- agentName: import("convex/values").VString<string | undefined, "optional">;
992
- model: import("convex/values").VString<string | undefined, "optional">;
993
- provider: import("convex/values").VString<string | undefined, "optional">;
994
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
995
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
996
- order: import("convex/values").VFloat64<number, "required">;
997
- /**
998
- * The step order of the first message in the stream.
999
- * If the stream ends up with both a tool call and a tool result,
1000
- * the stepOrder of the result will be +1 of the tool call.
1001
- */
1002
- stepOrder: import("convex/values").VFloat64<number, "required">;
1003
- state: import("convex/values").VUnion<{
1004
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1005
- kind: "streaming";
1006
- lastHeartbeat: number;
1007
- } | {
1008
- kind: "finished";
1009
- endedAt: number;
1010
- } | {
1011
- kind: "error";
1012
- error: string;
1013
- }, [import("convex/values").VObject<{
1014
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1015
- kind: "streaming";
1016
- lastHeartbeat: number;
1017
- }, {
1018
- kind: import("convex/values").VLiteral<"streaming", "required">;
1019
- lastHeartbeat: import("convex/values").VFloat64<number, "required">;
1020
- timeoutFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
1021
- }, "required", "kind" | "lastHeartbeat" | "timeoutFnId">, import("convex/values").VObject<{
1022
- kind: "finished";
1023
- endedAt: number;
1024
- }, {
1025
- kind: import("convex/values").VLiteral<"finished", "required">;
1026
- endedAt: import("convex/values").VFloat64<number, "required">;
1027
- }, "required", "kind" | "endedAt">, import("convex/values").VObject<{
1028
- kind: "error";
1029
- error: string;
1030
- }, {
1031
- kind: import("convex/values").VLiteral<"error", "required">;
1032
- error: import("convex/values").VString<string, "required">;
1033
- }, "required", "kind" | "error">], "required", "kind" | "error" | "lastHeartbeat" | "timeoutFnId" | "endedAt">;
1034
- }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.kind" | "state.error" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt">, {
1035
- threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
1036
- }, {}, {}>;
1037
- streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
1038
- streamId: import("convex/values").GenericId<"streamingMessages">;
1039
- start: number;
1040
- end: number;
1041
- parts: ({
1042
- providerOptions?: Record<string, Record<string, any>> | undefined;
1043
- type: "tool-call";
1044
- toolCallId: string;
1045
- toolName: string;
1046
- args: any;
1047
- } | {
1048
- providerOptions?: Record<string, Record<string, any>> | undefined;
1049
- args?: any;
1050
- experimental_content?: ({
1051
- type: "text";
1052
- text: string;
1053
- } | {
1054
- mimeType?: string | undefined;
1055
- type: "image";
1056
- data: string;
1057
- })[] | undefined;
1058
- isError?: boolean | undefined;
1059
- type: "tool-result";
1060
- toolCallId: string;
1061
- toolName: string;
1062
- result: any;
1063
- } | {
1064
- type: "text-delta";
1065
- textDelta: string;
1066
- } | {
1067
- type: "reasoning";
1068
- textDelta: string;
1069
- } | {
1070
- type: "source";
1071
- source: {
1072
- title?: string | undefined;
1073
- providerOptions?: Record<string, Record<string, any>> | undefined;
1074
- id: string;
1075
- sourceType: "url";
1076
- url: string;
1077
- };
1078
- } | {
1079
- type: "tool-call-streaming-start";
1080
- toolCallId: string;
1081
- toolName: string;
1082
- } | {
1083
- type: "tool-call-delta";
1084
- toolCallId: string;
1085
- toolName: string;
1086
- argsTextDelta: string;
1087
- })[];
1088
- }, {
1089
- streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
1090
- start: import("convex/values").VFloat64<number, "required">;
1091
- end: import("convex/values").VFloat64<number, "required">;
1092
- parts: import("convex/values").VArray<({
1093
- providerOptions?: Record<string, Record<string, any>> | undefined;
1094
- type: "tool-call";
1095
- toolCallId: string;
1096
- toolName: string;
1097
- args: any;
1098
- } | {
1099
- providerOptions?: Record<string, Record<string, any>> | undefined;
1100
- args?: any;
1101
- experimental_content?: ({
1102
- type: "text";
1103
- text: string;
1104
- } | {
1105
- mimeType?: string | undefined;
1106
- type: "image";
1107
- data: string;
1108
- })[] | undefined;
1109
- isError?: boolean | undefined;
1110
- type: "tool-result";
1111
- toolCallId: string;
1112
- toolName: string;
1113
- result: any;
1114
- } | {
1115
- type: "text-delta";
1116
- textDelta: string;
1117
- } | {
1118
- type: "reasoning";
1119
- textDelta: string;
1120
- } | {
1121
- type: "source";
1122
- source: {
1123
- title?: string | undefined;
1124
- providerOptions?: Record<string, Record<string, any>> | undefined;
1125
- id: string;
1126
- sourceType: "url";
1127
- url: string;
1128
- };
1129
- } | {
1130
- type: "tool-call-streaming-start";
1131
- toolCallId: string;
1132
- toolName: string;
1133
- } | {
1134
- type: "tool-call-delta";
1135
- toolCallId: string;
1136
- toolName: string;
1137
- argsTextDelta: string;
1138
- })[], import("convex/values").VUnion<{
1139
- providerOptions?: Record<string, Record<string, any>> | undefined;
1140
- type: "tool-call";
1141
- toolCallId: string;
1142
- toolName: string;
1143
- args: any;
1144
- } | {
1145
- providerOptions?: Record<string, Record<string, any>> | undefined;
1146
- args?: any;
1147
- experimental_content?: ({
1148
- type: "text";
1149
- text: string;
1150
- } | {
1151
- mimeType?: string | undefined;
1152
- type: "image";
1153
- data: string;
1154
- })[] | undefined;
1155
- isError?: boolean | undefined;
1156
- type: "tool-result";
1157
- toolCallId: string;
1158
- toolName: string;
1159
- result: any;
1160
- } | {
1161
- type: "text-delta";
1162
- textDelta: string;
1163
- } | {
1164
- type: "reasoning";
1165
- textDelta: string;
1166
- } | {
1167
- type: "source";
1168
- source: {
1169
- title?: string | undefined;
1170
- providerOptions?: Record<string, Record<string, any>> | undefined;
1171
- id: string;
1172
- sourceType: "url";
1173
- url: string;
1174
- };
1175
- } | {
1176
- type: "tool-call-streaming-start";
1177
- toolCallId: string;
1178
- toolName: string;
1179
- } | {
1180
- type: "tool-call-delta";
1181
- toolCallId: string;
1182
- toolName: string;
1183
- argsTextDelta: string;
1184
- }, [import("convex/values").VObject<{
1185
- type: "text-delta";
1186
- textDelta: string;
1187
- }, {
1188
- type: import("convex/values").VLiteral<"text-delta", "required">;
1189
- textDelta: import("convex/values").VString<string, "required">;
1190
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
1191
- type: "reasoning";
1192
- textDelta: string;
1193
- }, {
1194
- type: import("convex/values").VLiteral<"reasoning", "required">;
1195
- textDelta: import("convex/values").VString<string, "required">;
1196
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
1197
- type: "source";
1198
- source: {
1199
- title?: string | undefined;
1200
- providerOptions?: Record<string, Record<string, any>> | undefined;
1201
- id: string;
1202
- sourceType: "url";
1203
- url: string;
1204
- };
1205
- }, {
1206
- type: import("convex/values").VLiteral<"source", "required">;
1207
- source: import("convex/values").VObject<{
1208
- title?: string | undefined;
1209
- providerOptions?: Record<string, Record<string, any>> | undefined;
1210
- id: string;
1211
- sourceType: "url";
1212
- url: string;
1213
- }, {
1214
- sourceType: import("convex/values").VLiteral<"url", "required">;
1215
- id: import("convex/values").VString<string, "required">;
1216
- url: import("convex/values").VString<string, "required">;
1217
- title: import("convex/values").VString<string | undefined, "optional">;
1218
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1219
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
1220
- }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
1221
- providerOptions?: Record<string, Record<string, any>> | undefined;
1222
- type: "tool-call";
1223
- toolCallId: string;
1224
- toolName: string;
1225
- args: any;
1226
- }, {
1227
- type: import("convex/values").VLiteral<"tool-call", "required">;
1228
- toolCallId: import("convex/values").VString<string, "required">;
1229
- toolName: import("convex/values").VString<string, "required">;
1230
- args: import("convex/values").VAny<any, "required", string>;
1231
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1232
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
1233
- type: "tool-call-streaming-start";
1234
- toolCallId: string;
1235
- toolName: string;
1236
- }, {
1237
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
1238
- toolCallId: import("convex/values").VString<string, "required">;
1239
- toolName: import("convex/values").VString<string, "required">;
1240
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
1241
- type: "tool-call-delta";
1242
- toolCallId: string;
1243
- toolName: string;
1244
- argsTextDelta: string;
1245
- }, {
1246
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
1247
- toolCallId: import("convex/values").VString<string, "required">;
1248
- toolName: import("convex/values").VString<string, "required">;
1249
- argsTextDelta: import("convex/values").VString<string, "required">;
1250
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
1251
- providerOptions?: Record<string, Record<string, any>> | undefined;
1252
- args?: any;
1253
- experimental_content?: ({
1254
- type: "text";
1255
- text: string;
1256
- } | {
1257
- mimeType?: string | undefined;
1258
- type: "image";
1259
- data: string;
1260
- })[] | undefined;
1261
- isError?: boolean | undefined;
1262
- type: "tool-result";
1263
- toolCallId: string;
1264
- toolName: string;
1265
- result: any;
1266
- }, {
1267
- type: import("convex/values").VLiteral<"tool-result", "required">;
1268
- toolCallId: import("convex/values").VString<string, "required">;
1269
- toolName: import("convex/values").VString<string, "required">;
1270
- result: import("convex/values").VAny<any, "required", string>;
1271
- args: import("convex/values").VAny<any, "optional", string>;
1272
- experimental_content: import("convex/values").VArray<({
1273
- type: "text";
1274
- text: string;
1275
- } | {
1276
- mimeType?: string | undefined;
1277
- type: "image";
1278
- data: string;
1279
- })[] | undefined, import("convex/values").VUnion<{
1280
- type: "text";
1281
- text: string;
1282
- } | {
1283
- mimeType?: string | undefined;
1284
- type: "image";
1285
- data: string;
1286
- }, [import("convex/values").VObject<{
1287
- type: "text";
1288
- text: string;
1289
- }, {
1290
- type: import("convex/values").VLiteral<"text", "required">;
1291
- text: import("convex/values").VString<string, "required">;
1292
- }, "required", "type" | "text">, import("convex/values").VObject<{
1293
- mimeType?: string | undefined;
1294
- type: "image";
1295
- data: string;
1296
- }, {
1297
- type: import("convex/values").VLiteral<"image", "required">;
1298
- data: import("convex/values").VString<string, "required">;
1299
- mimeType: import("convex/values").VString<string | undefined, "optional">;
1300
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
1301
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
1302
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
1303
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, "required">;
1304
- }, "required", "streamId" | "start" | "end" | "parts">, {
1305
- streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1306
- }, {}, {}>;
1307
- memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
1308
- userId?: string | undefined;
1309
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
1310
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
1311
- memory: string;
1312
- }, {
1313
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
1314
- userId: import("convex/values").VString<string | undefined, "optional">;
1315
- memory: import("convex/values").VString<string, "required">;
1316
- embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
1317
- }, "required", "userId" | "threadId" | "embeddingId" | "memory">, {
1318
- threadId: ["threadId", "_creationTime"];
1319
- userId: ["userId", "_creationTime"];
1320
- embeddingId: ["embeddingId", "_creationTime"];
1321
- }, {}, {}>;
1322
- files: import("convex/server").TableDefinition<import("convex/values").VObject<{
1323
- filename?: string | undefined;
1324
- mimeType: string;
1325
- storageId: string;
1326
- hash: string;
1327
- refcount: number;
1328
- lastTouchedAt: number;
1329
- }, {
1330
- storageId: import("convex/values").VString<string, "required">;
1331
- mimeType: import("convex/values").VString<string, "required">;
1332
- filename: import("convex/values").VString<string | undefined, "optional">;
1333
- hash: import("convex/values").VString<string, "required">;
1334
- refcount: import("convex/values").VFloat64<number, "required">;
1335
- lastTouchedAt: import("convex/values").VFloat64<number, "required">;
1336
- }, "required", "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt">, {
1337
- hash: ["hash", "_creationTime"];
1338
- refcount: ["refcount", "_creationTime"];
1339
- }, {}, {}>;
1340
- }, true>;
1341
- export declare const vv: {
1342
- id: <TableName extends import("convex/server").TableNamesInDataModel<{
1343
- threads: {
1344
- document: {
1345
- _id: import("convex/values").GenericId<"threads">;
1346
- _creationTime: number;
1347
- userId?: string | undefined;
1348
- title?: string | undefined;
1349
- summary?: string | undefined;
1350
- defaultSystemPrompt?: string | undefined;
1351
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1352
- order?: number | undefined;
1353
- status: "active" | "archived";
1354
- };
1355
- fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
1356
- indexes: {
1357
- userId: ["userId", "_creationTime"];
1358
- by_id: ["_id"];
1359
- by_creation_time: ["_creationTime"];
1360
- };
1361
- searchIndexes: {};
1362
- vectorIndexes: {};
1363
- };
1364
- embeddings_128: {
1365
- document: {
1366
- _id: import("convex/values").GenericId<"embeddings_128">;
1367
- _creationTime: number;
1368
- userId?: string | undefined;
1369
- threadId?: string | undefined;
1370
- model_table_userId?: string[] | undefined;
1371
- model_table_threadId?: string[] | undefined;
1372
- model: string;
1373
- table: string;
1374
- vector: number[];
1375
- };
1376
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1377
- indexes: {
1378
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1379
- by_id: ["_id"];
1380
- by_creation_time: ["_creationTime"];
1381
- };
1382
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1383
- vectorIndexes: {
1384
- vector: {
1385
- vectorField: "vector";
1386
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1387
- filterFields: "model_table_userId" | "model_table_threadId";
1388
- };
1389
- };
1390
- };
1391
- embeddings_256: {
1392
- document: {
1393
- _id: import("convex/values").GenericId<"embeddings_256">;
1394
- _creationTime: number;
1395
- userId?: string | undefined;
1396
- threadId?: string | undefined;
1397
- model_table_userId?: string[] | undefined;
1398
- model_table_threadId?: string[] | undefined;
1399
- model: string;
1400
- table: string;
1401
- vector: number[];
1402
- };
1403
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1404
- indexes: {
1405
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1406
- by_id: ["_id"];
1407
- by_creation_time: ["_creationTime"];
1408
- };
1409
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1410
- vectorIndexes: {
1411
- vector: {
1412
- vectorField: "vector";
1413
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1414
- filterFields: "model_table_userId" | "model_table_threadId";
1415
- };
1416
- };
1417
- };
1418
- embeddings_512: {
1419
- document: {
1420
- _id: import("convex/values").GenericId<"embeddings_512">;
1421
- _creationTime: number;
1422
- userId?: string | undefined;
1423
- threadId?: string | undefined;
1424
- model_table_userId?: string[] | undefined;
1425
- model_table_threadId?: string[] | undefined;
1426
- model: string;
1427
- table: string;
1428
- vector: number[];
1429
- };
1430
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1431
- indexes: {
1432
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1433
- by_id: ["_id"];
1434
- by_creation_time: ["_creationTime"];
1435
- };
1436
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1437
- vectorIndexes: {
1438
- vector: {
1439
- vectorField: "vector";
1440
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1441
- filterFields: "model_table_userId" | "model_table_threadId";
1442
- };
1443
- };
1444
- };
1445
- embeddings_768: {
1446
- document: {
1447
- _id: import("convex/values").GenericId<"embeddings_768">;
1448
- _creationTime: number;
1449
- userId?: string | undefined;
1450
- threadId?: string | undefined;
1451
- model_table_userId?: string[] | undefined;
1452
- model_table_threadId?: string[] | undefined;
1453
- model: string;
1454
- table: string;
1455
- vector: number[];
1456
- };
1457
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1458
- indexes: {
1459
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1460
- by_id: ["_id"];
1461
- by_creation_time: ["_creationTime"];
1462
- };
1463
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1464
- vectorIndexes: {
1465
- vector: {
1466
- vectorField: "vector";
1467
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1468
- filterFields: "model_table_userId" | "model_table_threadId";
1469
- };
1470
- };
1471
- };
1472
- embeddings_1024: {
1473
- document: {
1474
- _id: import("convex/values").GenericId<"embeddings_1024">;
1475
- _creationTime: number;
1476
- userId?: string | undefined;
1477
- threadId?: string | undefined;
1478
- model_table_userId?: string[] | undefined;
1479
- model_table_threadId?: string[] | undefined;
1480
- model: string;
1481
- table: string;
1482
- vector: number[];
1483
- };
1484
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1485
- indexes: {
1486
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1487
- by_id: ["_id"];
1488
- by_creation_time: ["_creationTime"];
1489
- };
1490
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1491
- vectorIndexes: {
1492
- vector: {
1493
- vectorField: "vector";
1494
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1495
- filterFields: "model_table_userId" | "model_table_threadId";
1496
- };
1497
- };
1498
- };
1499
- embeddings_1408: {
1500
- document: {
1501
- _id: import("convex/values").GenericId<"embeddings_1408">;
1502
- _creationTime: number;
1503
- userId?: string | undefined;
1504
- threadId?: string | undefined;
1505
- model_table_userId?: string[] | undefined;
1506
- model_table_threadId?: string[] | undefined;
1507
- model: string;
1508
- table: string;
1509
- vector: number[];
1510
- };
1511
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1512
- indexes: {
1513
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1514
- by_id: ["_id"];
1515
- by_creation_time: ["_creationTime"];
1516
- };
1517
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1518
- vectorIndexes: {
1519
- vector: {
1520
- vectorField: "vector";
1521
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1522
- filterFields: "model_table_userId" | "model_table_threadId";
1523
- };
1524
- };
1525
- };
1526
- embeddings_1536: {
1527
- document: {
1528
- _id: import("convex/values").GenericId<"embeddings_1536">;
1529
- _creationTime: number;
1530
- userId?: string | undefined;
1531
- threadId?: string | undefined;
1532
- model_table_userId?: string[] | undefined;
1533
- model_table_threadId?: string[] | undefined;
1534
- model: string;
1535
- table: string;
1536
- vector: number[];
1537
- };
1538
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1539
- indexes: {
1540
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1541
- by_id: ["_id"];
1542
- by_creation_time: ["_creationTime"];
1543
- };
1544
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1545
- vectorIndexes: {
1546
- vector: {
1547
- vectorField: "vector";
1548
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1549
- filterFields: "model_table_userId" | "model_table_threadId";
1550
- };
1551
- };
1552
- };
1553
- embeddings_2048: {
1554
- document: {
1555
- _id: import("convex/values").GenericId<"embeddings_2048">;
1556
- _creationTime: number;
1557
- userId?: string | undefined;
1558
- threadId?: string | undefined;
1559
- model_table_userId?: string[] | undefined;
1560
- model_table_threadId?: string[] | undefined;
1561
- model: string;
1562
- table: string;
1563
- vector: number[];
1564
- };
1565
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1566
- indexes: {
1567
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1568
- by_id: ["_id"];
1569
- by_creation_time: ["_creationTime"];
1570
- };
1571
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1572
- vectorIndexes: {
1573
- vector: {
1574
- vectorField: "vector";
1575
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1576
- filterFields: "model_table_userId" | "model_table_threadId";
1577
- };
1578
- };
1579
- };
1580
- embeddings_3072: {
1581
- document: {
1582
- _id: import("convex/values").GenericId<"embeddings_3072">;
1583
- _creationTime: number;
1584
- userId?: string | undefined;
1585
- threadId?: string | undefined;
1586
- model_table_userId?: string[] | undefined;
1587
- model_table_threadId?: string[] | undefined;
1588
- model: string;
1589
- table: string;
1590
- vector: number[];
1591
- };
1592
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1593
- indexes: {
1594
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1595
- by_id: ["_id"];
1596
- by_creation_time: ["_creationTime"];
1597
- };
1598
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1599
- vectorIndexes: {
1600
- vector: {
1601
- vectorField: "vector";
1602
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1603
- filterFields: "model_table_userId" | "model_table_threadId";
1604
- };
1605
- };
1606
- };
1607
- embeddings_4096: {
1608
- document: {
1609
- _id: import("convex/values").GenericId<"embeddings_4096">;
1610
- _creationTime: number;
1611
- userId?: string | undefined;
1612
- threadId?: string | undefined;
1613
- model_table_userId?: string[] | undefined;
1614
- model_table_threadId?: string[] | undefined;
1615
- model: string;
1616
- table: string;
1617
- vector: number[];
1618
- };
1619
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1620
- indexes: {
1621
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1622
- by_id: ["_id"];
1623
- by_creation_time: ["_creationTime"];
1624
- };
1625
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1626
- vectorIndexes: {
1627
- vector: {
1628
- vectorField: "vector";
1629
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1630
- filterFields: "model_table_userId" | "model_table_threadId";
1631
- };
1632
- };
1633
- };
1634
- files: {
1635
- document: {
1636
- _id: import("convex/values").GenericId<"files">;
1637
- _creationTime: number;
1638
- filename?: string | undefined;
1639
- mimeType: string;
1640
- storageId: string;
1641
- hash: string;
1642
- refcount: number;
1643
- lastTouchedAt: number;
1644
- };
1645
- fieldPaths: "_id" | ("_creationTime" | "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt");
1646
- indexes: {
1647
- hash: ["hash", "_creationTime"];
1648
- refcount: ["refcount", "_creationTime"];
1649
- by_id: ["_id"];
1650
- by_creation_time: ["_creationTime"];
1651
- };
1652
- searchIndexes: {};
1653
- vectorIndexes: {};
1654
- };
1655
- messages: {
1656
- document: {
1657
- _id: import("convex/values").GenericId<"messages">;
1658
- _creationTime: number;
1659
- id?: string | undefined;
1660
- userId?: string | undefined;
1661
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
1662
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
1663
- files?: any[] | undefined;
1664
- error?: string | undefined;
1665
- agentName?: string | undefined;
1666
- model?: string | undefined;
1667
- provider?: string | undefined;
1668
- providerOptions?: Record<string, Record<string, any>> | undefined;
1669
- message?: {
1670
- providerOptions?: Record<string, Record<string, any>> | undefined;
1671
- role: "user";
1672
- content: string | ({
1673
- providerOptions?: Record<string, Record<string, any>> | undefined;
1674
- type: "text";
1675
- text: string;
1676
- } | {
1677
- providerOptions?: Record<string, Record<string, any>> | undefined;
1678
- mimeType?: string | undefined;
1679
- type: "image";
1680
- image: string | ArrayBuffer;
1681
- } | {
1682
- providerOptions?: Record<string, Record<string, any>> | undefined;
1683
- filename?: string | undefined;
1684
- type: "file";
1685
- mimeType: string;
1686
- data: string | ArrayBuffer;
1687
- })[];
1688
- } | {
1689
- providerOptions?: Record<string, Record<string, any>> | undefined;
1690
- role: "assistant";
1691
- content: string | ({
1692
- providerOptions?: Record<string, Record<string, any>> | undefined;
1693
- type: "text";
1694
- text: string;
1695
- } | {
1696
- providerOptions?: Record<string, Record<string, any>> | undefined;
1697
- filename?: string | undefined;
1698
- type: "file";
1699
- mimeType: string;
1700
- data: string | ArrayBuffer;
1701
- } | {
1702
- providerOptions?: Record<string, Record<string, any>> | undefined;
1703
- signature?: string | undefined;
1704
- type: "reasoning";
1705
- text: string;
1706
- } | {
1707
- providerOptions?: Record<string, Record<string, any>> | undefined;
1708
- type: "redacted-reasoning";
1709
- data: string;
1710
- } | {
1711
- providerOptions?: Record<string, Record<string, any>> | undefined;
1712
- type: "tool-call";
1713
- toolCallId: string;
1714
- toolName: string;
1715
- args: any;
1716
- })[];
1717
- } | {
1718
- providerOptions?: Record<string, Record<string, any>> | undefined;
1719
- role: "tool";
1720
- content: {
1721
- providerOptions?: Record<string, Record<string, any>> | undefined;
1722
- args?: any;
1723
- experimental_content?: ({
1724
- type: "text";
1725
- text: string;
1726
- } | {
1727
- mimeType?: string | undefined;
1728
- type: "image";
1729
- data: string;
1730
- })[] | undefined;
1731
- isError?: boolean | undefined;
1732
- type: "tool-result";
1733
- toolCallId: string;
1734
- toolName: string;
1735
- result: any;
1736
- }[];
1737
- } | {
1738
- providerOptions?: Record<string, Record<string, any>> | undefined;
1739
- role: "system";
1740
- content: string;
1741
- } | undefined;
1742
- text?: string | undefined;
1743
- reasoning?: string | undefined;
1744
- usage?: {
1745
- promptTokens: number;
1746
- completionTokens: number;
1747
- totalTokens: number;
1748
- } | undefined;
1749
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1750
- sources?: {
1751
- title?: string | undefined;
1752
- providerOptions?: Record<string, Record<string, any>> | undefined;
1753
- id: string;
1754
- sourceType: "url";
1755
- url: string;
1756
- }[] | undefined;
1757
- reasoningDetails?: ({
1758
- signature?: string | undefined;
1759
- type: "text";
1760
- text: string;
1761
- } | {
1762
- type: "redacted";
1763
- data: string;
1764
- })[] | undefined;
1765
- warnings?: ({
1766
- details?: string | undefined;
1767
- type: "unsupported-setting";
1768
- setting: string;
1769
- } | {
1770
- details?: string | undefined;
1771
- type: "unsupported-tool";
1772
- tool: any;
1773
- } | {
1774
- type: "other";
1775
- message: string;
1776
- })[] | undefined;
1777
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1778
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
1779
- stepId?: string | undefined;
1780
- status: "pending" | "success" | "failed";
1781
- order: number;
1782
- threadId: import("convex/values").GenericId<"threads">;
1783
- stepOrder: number;
1784
- tool: boolean;
1785
- };
1786
- fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`);
1787
- indexes: {
1788
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
1789
- embeddingId: ["embeddingId", "_creationTime"];
1790
- by_id: ["_id"];
1791
- by_creation_time: ["_creationTime"];
1792
- };
1793
- searchIndexes: {
1794
- text_search: {
1795
- searchField: "text";
1796
- filterFields: "userId" | "threadId";
1797
- };
1798
- };
1799
- vectorIndexes: {};
1800
- };
1801
- streamingMessages: {
1802
- document: {
1803
- _id: import("convex/values").GenericId<"streamingMessages">;
1804
- _creationTime: number;
1805
- userId?: string | undefined;
1806
- agentName?: string | undefined;
1807
- model?: string | undefined;
1808
- provider?: string | undefined;
1809
- providerOptions?: Record<string, Record<string, any>> | undefined;
1810
- order: number;
1811
- threadId: import("convex/values").GenericId<"threads">;
1812
- stepOrder: number;
1813
- state: {
1814
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
1815
- kind: "streaming";
1816
- lastHeartbeat: number;
1817
- } | {
1818
- kind: "finished";
1819
- endedAt: number;
1820
- } | {
1821
- kind: "error";
1822
- error: string;
1823
- };
1824
- };
1825
- fieldPaths: "_id" | ("_creationTime" | "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.kind" | "state.error" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt");
1826
- indexes: {
1827
- threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
1828
- by_id: ["_id"];
1829
- by_creation_time: ["_creationTime"];
1830
- };
1831
- searchIndexes: {};
1832
- vectorIndexes: {};
1833
- };
1834
- streamDeltas: {
1835
- document: {
1836
- _id: import("convex/values").GenericId<"streamDeltas">;
1837
- _creationTime: number;
1838
- streamId: import("convex/values").GenericId<"streamingMessages">;
1839
- start: number;
1840
- end: number;
1841
- parts: ({
1842
- providerOptions?: Record<string, Record<string, any>> | undefined;
1843
- type: "tool-call";
1844
- toolCallId: string;
1845
- toolName: string;
1846
- args: any;
1847
- } | {
1848
- providerOptions?: Record<string, Record<string, any>> | undefined;
1849
- args?: any;
1850
- experimental_content?: ({
1851
- type: "text";
1852
- text: string;
1853
- } | {
1854
- mimeType?: string | undefined;
1855
- type: "image";
1856
- data: string;
1857
- })[] | undefined;
1858
- isError?: boolean | undefined;
1859
- type: "tool-result";
1860
- toolCallId: string;
1861
- toolName: string;
1862
- result: any;
1863
- } | {
1864
- type: "text-delta";
1865
- textDelta: string;
1866
- } | {
1867
- type: "reasoning";
1868
- textDelta: string;
1869
- } | {
1870
- type: "source";
1871
- source: {
1872
- title?: string | undefined;
1873
- providerOptions?: Record<string, Record<string, any>> | undefined;
1874
- id: string;
1875
- sourceType: "url";
1876
- url: string;
1877
- };
1878
- } | {
1879
- type: "tool-call-streaming-start";
1880
- toolCallId: string;
1881
- toolName: string;
1882
- } | {
1883
- type: "tool-call-delta";
1884
- toolCallId: string;
1885
- toolName: string;
1886
- argsTextDelta: string;
1887
- })[];
1888
- };
1889
- fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
1890
- indexes: {
1891
- streamId_start_end: ["streamId", "start", "end", "_creationTime"];
1892
- by_id: ["_id"];
1893
- by_creation_time: ["_creationTime"];
1894
- };
1895
- searchIndexes: {};
1896
- vectorIndexes: {};
1897
- };
1898
- memories: {
1899
- document: {
1900
- _id: import("convex/values").GenericId<"memories">;
1901
- _creationTime: number;
1902
- userId?: string | undefined;
1903
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
1904
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
1905
- memory: string;
1906
- };
1907
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "embeddingId" | "memory");
1908
- indexes: {
1909
- threadId: ["threadId", "_creationTime"];
1910
- userId: ["userId", "_creationTime"];
1911
- embeddingId: ["embeddingId", "_creationTime"];
1912
- by_id: ["_id"];
1913
- by_creation_time: ["_creationTime"];
1914
- };
1915
- searchIndexes: {};
1916
- vectorIndexes: {};
1917
- };
1918
- apiKeys: {
1919
- document: {
1920
- _id: import("convex/values").GenericId<"apiKeys">;
1921
- _creationTime: number;
1922
- name?: string | undefined;
1923
- };
1924
- fieldPaths: "_id" | ("_creationTime" | "name");
1925
- indexes: {
1926
- name: ["name", "_creationTime"];
1927
- by_id: ["_id"];
1928
- by_creation_time: ["_creationTime"];
1929
- };
1930
- searchIndexes: {};
1931
- vectorIndexes: {};
1932
- };
1933
- }>>(tableName: TableName) => import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
1934
- doc: <TableName extends import("convex/server").TableNamesInDataModel<{
1935
- threads: {
1936
- document: {
1937
- _id: import("convex/values").GenericId<"threads">;
1938
- _creationTime: number;
1939
- userId?: string | undefined;
1940
- title?: string | undefined;
1941
- summary?: string | undefined;
1942
- defaultSystemPrompt?: string | undefined;
1943
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
1944
- order?: number | undefined;
1945
- status: "active" | "archived";
1946
- };
1947
- fieldPaths: "_id" | ("_creationTime" | "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order");
1948
- indexes: {
1949
- userId: ["userId", "_creationTime"];
1950
- by_id: ["_id"];
1951
- by_creation_time: ["_creationTime"];
1952
- };
1953
- searchIndexes: {};
1954
- vectorIndexes: {};
1955
- };
1956
- embeddings_128: {
1957
- document: {
1958
- _id: import("convex/values").GenericId<"embeddings_128">;
1959
- _creationTime: number;
1960
- userId?: string | undefined;
1961
- threadId?: string | undefined;
1962
- model_table_userId?: string[] | undefined;
1963
- model_table_threadId?: string[] | undefined;
1964
- model: string;
1965
- table: string;
1966
- vector: number[];
1967
- };
1968
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1969
- indexes: {
1970
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1971
- by_id: ["_id"];
1972
- by_creation_time: ["_creationTime"];
1973
- };
1974
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
1975
- vectorIndexes: {
1976
- vector: {
1977
- vectorField: "vector";
1978
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
1979
- filterFields: "model_table_userId" | "model_table_threadId";
1980
- };
1981
- };
1982
- };
1983
- embeddings_256: {
1984
- document: {
1985
- _id: import("convex/values").GenericId<"embeddings_256">;
1986
- _creationTime: number;
1987
- userId?: string | undefined;
1988
- threadId?: string | undefined;
1989
- model_table_userId?: string[] | undefined;
1990
- model_table_threadId?: string[] | undefined;
1991
- model: string;
1992
- table: string;
1993
- vector: number[];
1994
- };
1995
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
1996
- indexes: {
1997
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
1998
- by_id: ["_id"];
1999
- by_creation_time: ["_creationTime"];
2000
- };
2001
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2002
- vectorIndexes: {
2003
- vector: {
2004
- vectorField: "vector";
2005
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2006
- filterFields: "model_table_userId" | "model_table_threadId";
2007
- };
2008
- };
2009
- };
2010
- embeddings_512: {
2011
- document: {
2012
- _id: import("convex/values").GenericId<"embeddings_512">;
2013
- _creationTime: number;
2014
- userId?: string | undefined;
2015
- threadId?: string | undefined;
2016
- model_table_userId?: string[] | undefined;
2017
- model_table_threadId?: string[] | undefined;
2018
- model: string;
2019
- table: string;
2020
- vector: number[];
2021
- };
2022
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2023
- indexes: {
2024
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2025
- by_id: ["_id"];
2026
- by_creation_time: ["_creationTime"];
2027
- };
2028
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2029
- vectorIndexes: {
2030
- vector: {
2031
- vectorField: "vector";
2032
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2033
- filterFields: "model_table_userId" | "model_table_threadId";
2034
- };
2035
- };
2036
- };
2037
- embeddings_768: {
2038
- document: {
2039
- _id: import("convex/values").GenericId<"embeddings_768">;
2040
- _creationTime: number;
2041
- userId?: string | undefined;
2042
- threadId?: string | undefined;
2043
- model_table_userId?: string[] | undefined;
2044
- model_table_threadId?: string[] | undefined;
2045
- model: string;
2046
- table: string;
2047
- vector: number[];
2048
- };
2049
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2050
- indexes: {
2051
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2052
- by_id: ["_id"];
2053
- by_creation_time: ["_creationTime"];
2054
- };
2055
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2056
- vectorIndexes: {
2057
- vector: {
2058
- vectorField: "vector";
2059
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2060
- filterFields: "model_table_userId" | "model_table_threadId";
2061
- };
2062
- };
2063
- };
2064
- embeddings_1024: {
2065
- document: {
2066
- _id: import("convex/values").GenericId<"embeddings_1024">;
2067
- _creationTime: number;
2068
- userId?: string | undefined;
2069
- threadId?: string | undefined;
2070
- model_table_userId?: string[] | undefined;
2071
- model_table_threadId?: string[] | undefined;
2072
- model: string;
2073
- table: string;
2074
- vector: number[];
2075
- };
2076
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2077
- indexes: {
2078
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2079
- by_id: ["_id"];
2080
- by_creation_time: ["_creationTime"];
2081
- };
2082
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2083
- vectorIndexes: {
2084
- vector: {
2085
- vectorField: "vector";
2086
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2087
- filterFields: "model_table_userId" | "model_table_threadId";
2088
- };
2089
- };
2090
- };
2091
- embeddings_1408: {
2092
- document: {
2093
- _id: import("convex/values").GenericId<"embeddings_1408">;
2094
- _creationTime: number;
2095
- userId?: string | undefined;
2096
- threadId?: string | undefined;
2097
- model_table_userId?: string[] | undefined;
2098
- model_table_threadId?: string[] | undefined;
2099
- model: string;
2100
- table: string;
2101
- vector: number[];
2102
- };
2103
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2104
- indexes: {
2105
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2106
- by_id: ["_id"];
2107
- by_creation_time: ["_creationTime"];
2108
- };
2109
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2110
- vectorIndexes: {
2111
- vector: {
2112
- vectorField: "vector";
2113
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2114
- filterFields: "model_table_userId" | "model_table_threadId";
2115
- };
2116
- };
2117
- };
2118
- embeddings_1536: {
2119
- document: {
2120
- _id: import("convex/values").GenericId<"embeddings_1536">;
2121
- _creationTime: number;
2122
- userId?: string | undefined;
2123
- threadId?: string | undefined;
2124
- model_table_userId?: string[] | undefined;
2125
- model_table_threadId?: string[] | undefined;
2126
- model: string;
2127
- table: string;
2128
- vector: number[];
2129
- };
2130
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2131
- indexes: {
2132
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2133
- by_id: ["_id"];
2134
- by_creation_time: ["_creationTime"];
2135
- };
2136
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2137
- vectorIndexes: {
2138
- vector: {
2139
- vectorField: "vector";
2140
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2141
- filterFields: "model_table_userId" | "model_table_threadId";
2142
- };
2143
- };
2144
- };
2145
- embeddings_2048: {
2146
- document: {
2147
- _id: import("convex/values").GenericId<"embeddings_2048">;
2148
- _creationTime: number;
2149
- userId?: string | undefined;
2150
- threadId?: string | undefined;
2151
- model_table_userId?: string[] | undefined;
2152
- model_table_threadId?: string[] | undefined;
2153
- model: string;
2154
- table: string;
2155
- vector: number[];
2156
- };
2157
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2158
- indexes: {
2159
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2160
- by_id: ["_id"];
2161
- by_creation_time: ["_creationTime"];
2162
- };
2163
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2164
- vectorIndexes: {
2165
- vector: {
2166
- vectorField: "vector";
2167
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2168
- filterFields: "model_table_userId" | "model_table_threadId";
2169
- };
2170
- };
2171
- };
2172
- embeddings_3072: {
2173
- document: {
2174
- _id: import("convex/values").GenericId<"embeddings_3072">;
2175
- _creationTime: number;
2176
- userId?: string | undefined;
2177
- threadId?: string | undefined;
2178
- model_table_userId?: string[] | undefined;
2179
- model_table_threadId?: string[] | undefined;
2180
- model: string;
2181
- table: string;
2182
- vector: number[];
2183
- };
2184
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2185
- indexes: {
2186
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2187
- by_id: ["_id"];
2188
- by_creation_time: ["_creationTime"];
2189
- };
2190
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2191
- vectorIndexes: {
2192
- vector: {
2193
- vectorField: "vector";
2194
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2195
- filterFields: "model_table_userId" | "model_table_threadId";
2196
- };
2197
- };
2198
- };
2199
- embeddings_4096: {
2200
- document: {
2201
- _id: import("convex/values").GenericId<"embeddings_4096">;
2202
- _creationTime: number;
2203
- userId?: string | undefined;
2204
- threadId?: string | undefined;
2205
- model_table_userId?: string[] | undefined;
2206
- model_table_threadId?: string[] | undefined;
2207
- model: string;
2208
- table: string;
2209
- vector: number[];
2210
- };
2211
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector");
2212
- indexes: {
2213
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2214
- by_id: ["_id"];
2215
- by_creation_time: ["_creationTime"];
2216
- };
2217
- searchIndexes: import("convex/server").GenericTableSearchIndexes;
2218
- vectorIndexes: {
2219
- vector: {
2220
- vectorField: "vector";
2221
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2222
- filterFields: "model_table_userId" | "model_table_threadId";
2223
- };
2224
- };
2225
- };
2226
- files: {
2227
- document: {
2228
- _id: import("convex/values").GenericId<"files">;
2229
- _creationTime: number;
2230
- filename?: string | undefined;
2231
- mimeType: string;
2232
- storageId: string;
2233
- hash: string;
2234
- refcount: number;
2235
- lastTouchedAt: number;
2236
- };
2237
- fieldPaths: "_id" | ("_creationTime" | "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt");
2238
- indexes: {
2239
- hash: ["hash", "_creationTime"];
2240
- refcount: ["refcount", "_creationTime"];
2241
- by_id: ["_id"];
2242
- by_creation_time: ["_creationTime"];
2243
- };
2244
- searchIndexes: {};
2245
- vectorIndexes: {};
2246
- };
2247
- messages: {
2248
- document: {
2249
- _id: import("convex/values").GenericId<"messages">;
2250
- _creationTime: number;
2251
- id?: string | undefined;
2252
- userId?: string | undefined;
2253
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2254
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2255
- files?: any[] | undefined;
2256
- error?: string | undefined;
2257
- agentName?: string | undefined;
2258
- model?: string | undefined;
2259
- provider?: string | undefined;
2260
- providerOptions?: Record<string, Record<string, any>> | undefined;
2261
- message?: {
2262
- providerOptions?: Record<string, Record<string, any>> | undefined;
2263
- role: "user";
2264
- content: string | ({
2265
- providerOptions?: Record<string, Record<string, any>> | undefined;
2266
- type: "text";
2267
- text: string;
2268
- } | {
2269
- providerOptions?: Record<string, Record<string, any>> | undefined;
2270
- mimeType?: string | undefined;
2271
- type: "image";
2272
- image: string | ArrayBuffer;
2273
- } | {
2274
- providerOptions?: Record<string, Record<string, any>> | undefined;
2275
- filename?: string | undefined;
2276
- type: "file";
2277
- mimeType: string;
2278
- data: string | ArrayBuffer;
2279
- })[];
2280
- } | {
2281
- providerOptions?: Record<string, Record<string, any>> | undefined;
2282
- role: "assistant";
2283
- content: string | ({
2284
- providerOptions?: Record<string, Record<string, any>> | undefined;
2285
- type: "text";
2286
- text: string;
2287
- } | {
2288
- providerOptions?: Record<string, Record<string, any>> | undefined;
2289
- filename?: string | undefined;
2290
- type: "file";
2291
- mimeType: string;
2292
- data: string | ArrayBuffer;
2293
- } | {
2294
- providerOptions?: Record<string, Record<string, any>> | undefined;
2295
- signature?: string | undefined;
2296
- type: "reasoning";
2297
- text: string;
2298
- } | {
2299
- providerOptions?: Record<string, Record<string, any>> | undefined;
2300
- type: "redacted-reasoning";
2301
- data: string;
2302
- } | {
2303
- providerOptions?: Record<string, Record<string, any>> | undefined;
2304
- type: "tool-call";
2305
- toolCallId: string;
2306
- toolName: string;
2307
- args: any;
2308
- })[];
2309
- } | {
2310
- providerOptions?: Record<string, Record<string, any>> | undefined;
2311
- role: "tool";
2312
- content: {
2313
- providerOptions?: Record<string, Record<string, any>> | undefined;
2314
- args?: any;
2315
- experimental_content?: ({
2316
- type: "text";
2317
- text: string;
2318
- } | {
2319
- mimeType?: string | undefined;
2320
- type: "image";
2321
- data: string;
2322
- })[] | undefined;
2323
- isError?: boolean | undefined;
2324
- type: "tool-result";
2325
- toolCallId: string;
2326
- toolName: string;
2327
- result: any;
2328
- }[];
2329
- } | {
2330
- providerOptions?: Record<string, Record<string, any>> | undefined;
2331
- role: "system";
2332
- content: string;
2333
- } | undefined;
2334
- text?: string | undefined;
2335
- reasoning?: string | undefined;
2336
- usage?: {
2337
- promptTokens: number;
2338
- completionTokens: number;
2339
- totalTokens: number;
2340
- } | undefined;
2341
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2342
- sources?: {
2343
- title?: string | undefined;
2344
- providerOptions?: Record<string, Record<string, any>> | undefined;
2345
- id: string;
2346
- sourceType: "url";
2347
- url: string;
2348
- }[] | undefined;
2349
- reasoningDetails?: ({
2350
- signature?: string | undefined;
2351
- type: "text";
2352
- text: string;
2353
- } | {
2354
- type: "redacted";
2355
- data: string;
2356
- })[] | undefined;
2357
- warnings?: ({
2358
- details?: string | undefined;
2359
- type: "unsupported-setting";
2360
- setting: string;
2361
- } | {
2362
- details?: string | undefined;
2363
- type: "unsupported-tool";
2364
- tool: any;
2365
- } | {
2366
- type: "other";
2367
- message: string;
2368
- })[] | undefined;
2369
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2370
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2371
- stepId?: string | undefined;
2372
- status: "pending" | "success" | "failed";
2373
- order: number;
2374
- threadId: import("convex/values").GenericId<"threads">;
2375
- stepOrder: number;
2376
- tool: boolean;
2377
- };
2378
- fieldPaths: "_id" | ("_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`);
2379
- indexes: {
2380
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
2381
- embeddingId: ["embeddingId", "_creationTime"];
2382
- by_id: ["_id"];
2383
- by_creation_time: ["_creationTime"];
2384
- };
2385
- searchIndexes: {
2386
- text_search: {
2387
- searchField: "text";
2388
- filterFields: "userId" | "threadId";
2389
- };
2390
- };
2391
- vectorIndexes: {};
2392
- };
2393
- streamingMessages: {
2394
- document: {
2395
- _id: import("convex/values").GenericId<"streamingMessages">;
2396
- _creationTime: number;
2397
- userId?: string | undefined;
2398
- agentName?: string | undefined;
2399
- model?: string | undefined;
2400
- provider?: string | undefined;
2401
- providerOptions?: Record<string, Record<string, any>> | undefined;
2402
- order: number;
2403
- threadId: import("convex/values").GenericId<"threads">;
2404
- stepOrder: number;
2405
- state: {
2406
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
2407
- kind: "streaming";
2408
- lastHeartbeat: number;
2409
- } | {
2410
- kind: "finished";
2411
- endedAt: number;
2412
- } | {
2413
- kind: "error";
2414
- error: string;
2415
- };
2416
- };
2417
- fieldPaths: "_id" | ("_creationTime" | "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.kind" | "state.error" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt");
2418
- indexes: {
2419
- threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
2420
- by_id: ["_id"];
2421
- by_creation_time: ["_creationTime"];
2422
- };
2423
- searchIndexes: {};
2424
- vectorIndexes: {};
2425
- };
2426
- streamDeltas: {
2427
- document: {
2428
- _id: import("convex/values").GenericId<"streamDeltas">;
2429
- _creationTime: number;
2430
- streamId: import("convex/values").GenericId<"streamingMessages">;
2431
- start: number;
2432
- end: number;
2433
- parts: ({
2434
- providerOptions?: Record<string, Record<string, any>> | undefined;
2435
- type: "tool-call";
2436
- toolCallId: string;
2437
- toolName: string;
2438
- args: any;
2439
- } | {
2440
- providerOptions?: Record<string, Record<string, any>> | undefined;
2441
- args?: any;
2442
- experimental_content?: ({
2443
- type: "text";
2444
- text: string;
2445
- } | {
2446
- mimeType?: string | undefined;
2447
- type: "image";
2448
- data: string;
2449
- })[] | undefined;
2450
- isError?: boolean | undefined;
2451
- type: "tool-result";
2452
- toolCallId: string;
2453
- toolName: string;
2454
- result: any;
2455
- } | {
2456
- type: "text-delta";
2457
- textDelta: string;
2458
- } | {
2459
- type: "reasoning";
2460
- textDelta: string;
2461
- } | {
2462
- type: "source";
2463
- source: {
2464
- title?: string | undefined;
2465
- providerOptions?: Record<string, Record<string, any>> | undefined;
2466
- id: string;
2467
- sourceType: "url";
2468
- url: string;
2469
- };
2470
- } | {
2471
- type: "tool-call-streaming-start";
2472
- toolCallId: string;
2473
- toolName: string;
2474
- } | {
2475
- type: "tool-call-delta";
2476
- toolCallId: string;
2477
- toolName: string;
2478
- argsTextDelta: string;
2479
- })[];
2480
- };
2481
- fieldPaths: "_id" | ("_creationTime" | "streamId" | "start" | "end" | "parts");
2482
- indexes: {
2483
- streamId_start_end: ["streamId", "start", "end", "_creationTime"];
2484
- by_id: ["_id"];
2485
- by_creation_time: ["_creationTime"];
2486
- };
2487
- searchIndexes: {};
2488
- vectorIndexes: {};
2489
- };
2490
- memories: {
2491
- document: {
2492
- _id: import("convex/values").GenericId<"memories">;
2493
- _creationTime: number;
2494
- userId?: string | undefined;
2495
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
2496
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2497
- memory: string;
2498
- };
2499
- fieldPaths: "_id" | ("_creationTime" | "userId" | "threadId" | "embeddingId" | "memory");
2500
- indexes: {
2501
- threadId: ["threadId", "_creationTime"];
2502
- userId: ["userId", "_creationTime"];
2503
- embeddingId: ["embeddingId", "_creationTime"];
2504
- by_id: ["_id"];
2505
- by_creation_time: ["_creationTime"];
2506
- };
2507
- searchIndexes: {};
2508
- vectorIndexes: {};
2509
- };
2510
- apiKeys: {
2511
- document: {
2512
- _id: import("convex/values").GenericId<"apiKeys">;
2513
- _creationTime: number;
2514
- name?: string | undefined;
2515
- };
2516
- fieldPaths: "_id" | ("_creationTime" | "name");
2517
- indexes: {
2518
- name: ["name", "_creationTime"];
2519
- by_id: ["_id"];
2520
- by_creation_time: ["_creationTime"];
2521
- };
2522
- searchIndexes: {};
2523
- vectorIndexes: {};
2524
- };
2525
- }>>(tableName: TableName) => import("convex-helpers/validators").AddFieldsToValidator<{
2526
- apiKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
2527
- name?: string | undefined;
2528
- }, {
2529
- name: import("convex/values").VString<string | undefined, "optional">;
2530
- }, "required", "name">, {
2531
- name: ["name", "_creationTime"];
2532
- }, {}, {}>;
2533
- embeddings_128: import("convex/server").TableDefinition<import("convex/values").VObject<{
2534
- userId?: string | undefined;
2535
- threadId?: string | undefined;
2536
- model_table_userId?: string[] | undefined;
2537
- model_table_threadId?: string[] | undefined;
2538
- model: string;
2539
- table: string;
2540
- vector: number[];
2541
- }, {
2542
- model: import("convex/values").VString<string, "required">;
2543
- table: import("convex/values").VString<string, "required">;
2544
- userId: import("convex/values").VString<string | undefined, "optional">;
2545
- threadId: import("convex/values").VString<string | undefined, "optional">;
2546
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2547
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2548
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2549
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2550
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2551
- }, import("convex/server").GenericTableSearchIndexes, {
2552
- vector: {
2553
- vectorField: "vector";
2554
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2555
- filterFields: "model_table_userId" | "model_table_threadId";
2556
- };
2557
- }>;
2558
- embeddings_256: import("convex/server").TableDefinition<import("convex/values").VObject<{
2559
- userId?: string | undefined;
2560
- threadId?: string | undefined;
2561
- model_table_userId?: string[] | undefined;
2562
- model_table_threadId?: string[] | undefined;
2563
- model: string;
2564
- table: string;
2565
- vector: number[];
2566
- }, {
2567
- model: import("convex/values").VString<string, "required">;
2568
- table: import("convex/values").VString<string, "required">;
2569
- userId: import("convex/values").VString<string | undefined, "optional">;
2570
- threadId: import("convex/values").VString<string | undefined, "optional">;
2571
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2572
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2573
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2574
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2575
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2576
- }, import("convex/server").GenericTableSearchIndexes, {
2577
- vector: {
2578
- vectorField: "vector";
2579
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2580
- filterFields: "model_table_userId" | "model_table_threadId";
2581
- };
2582
- }>;
2583
- embeddings_512: import("convex/server").TableDefinition<import("convex/values").VObject<{
2584
- userId?: string | undefined;
2585
- threadId?: string | undefined;
2586
- model_table_userId?: string[] | undefined;
2587
- model_table_threadId?: string[] | undefined;
2588
- model: string;
2589
- table: string;
2590
- vector: number[];
2591
- }, {
2592
- model: import("convex/values").VString<string, "required">;
2593
- table: import("convex/values").VString<string, "required">;
2594
- userId: import("convex/values").VString<string | undefined, "optional">;
2595
- threadId: import("convex/values").VString<string | undefined, "optional">;
2596
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2597
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2598
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2599
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2600
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2601
- }, import("convex/server").GenericTableSearchIndexes, {
2602
- vector: {
2603
- vectorField: "vector";
2604
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2605
- filterFields: "model_table_userId" | "model_table_threadId";
2606
- };
2607
- }>;
2608
- embeddings_768: import("convex/server").TableDefinition<import("convex/values").VObject<{
2609
- userId?: string | undefined;
2610
- threadId?: string | undefined;
2611
- model_table_userId?: string[] | undefined;
2612
- model_table_threadId?: string[] | undefined;
2613
- model: string;
2614
- table: string;
2615
- vector: number[];
2616
- }, {
2617
- model: import("convex/values").VString<string, "required">;
2618
- table: import("convex/values").VString<string, "required">;
2619
- userId: import("convex/values").VString<string | undefined, "optional">;
2620
- threadId: import("convex/values").VString<string | undefined, "optional">;
2621
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2622
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2623
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2624
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2625
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2626
- }, import("convex/server").GenericTableSearchIndexes, {
2627
- vector: {
2628
- vectorField: "vector";
2629
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2630
- filterFields: "model_table_userId" | "model_table_threadId";
2631
- };
2632
- }>;
2633
- embeddings_1024: import("convex/server").TableDefinition<import("convex/values").VObject<{
2634
- userId?: string | undefined;
2635
- threadId?: string | undefined;
2636
- model_table_userId?: string[] | undefined;
2637
- model_table_threadId?: string[] | undefined;
2638
- model: string;
2639
- table: string;
2640
- vector: number[];
2641
- }, {
2642
- model: import("convex/values").VString<string, "required">;
2643
- table: import("convex/values").VString<string, "required">;
2644
- userId: import("convex/values").VString<string | undefined, "optional">;
2645
- threadId: import("convex/values").VString<string | undefined, "optional">;
2646
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2647
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2648
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2649
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2650
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2651
- }, import("convex/server").GenericTableSearchIndexes, {
2652
- vector: {
2653
- vectorField: "vector";
2654
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2655
- filterFields: "model_table_userId" | "model_table_threadId";
2656
- };
2657
- }>;
2658
- embeddings_1408: import("convex/server").TableDefinition<import("convex/values").VObject<{
2659
- userId?: string | undefined;
2660
- threadId?: string | undefined;
2661
- model_table_userId?: string[] | undefined;
2662
- model_table_threadId?: string[] | undefined;
2663
- model: string;
2664
- table: string;
2665
- vector: number[];
2666
- }, {
2667
- model: import("convex/values").VString<string, "required">;
2668
- table: import("convex/values").VString<string, "required">;
2669
- userId: import("convex/values").VString<string | undefined, "optional">;
2670
- threadId: import("convex/values").VString<string | undefined, "optional">;
2671
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2672
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2673
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2674
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2675
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2676
- }, import("convex/server").GenericTableSearchIndexes, {
2677
- vector: {
2678
- vectorField: "vector";
2679
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2680
- filterFields: "model_table_userId" | "model_table_threadId";
2681
- };
2682
- }>;
2683
- embeddings_1536: import("convex/server").TableDefinition<import("convex/values").VObject<{
2684
- userId?: string | undefined;
2685
- threadId?: string | undefined;
2686
- model_table_userId?: string[] | undefined;
2687
- model_table_threadId?: string[] | undefined;
2688
- model: string;
2689
- table: string;
2690
- vector: number[];
2691
- }, {
2692
- model: import("convex/values").VString<string, "required">;
2693
- table: import("convex/values").VString<string, "required">;
2694
- userId: import("convex/values").VString<string | undefined, "optional">;
2695
- threadId: import("convex/values").VString<string | undefined, "optional">;
2696
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2697
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2698
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2699
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2700
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2701
- }, import("convex/server").GenericTableSearchIndexes, {
2702
- vector: {
2703
- vectorField: "vector";
2704
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2705
- filterFields: "model_table_userId" | "model_table_threadId";
2706
- };
2707
- }>;
2708
- embeddings_2048: import("convex/server").TableDefinition<import("convex/values").VObject<{
2709
- userId?: string | undefined;
2710
- threadId?: string | undefined;
2711
- model_table_userId?: string[] | undefined;
2712
- model_table_threadId?: string[] | undefined;
2713
- model: string;
2714
- table: string;
2715
- vector: number[];
2716
- }, {
2717
- model: import("convex/values").VString<string, "required">;
2718
- table: import("convex/values").VString<string, "required">;
2719
- userId: import("convex/values").VString<string | undefined, "optional">;
2720
- threadId: import("convex/values").VString<string | undefined, "optional">;
2721
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2722
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2723
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2724
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2725
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2726
- }, import("convex/server").GenericTableSearchIndexes, {
2727
- vector: {
2728
- vectorField: "vector";
2729
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2730
- filterFields: "model_table_userId" | "model_table_threadId";
2731
- };
2732
- }>;
2733
- embeddings_3072: import("convex/server").TableDefinition<import("convex/values").VObject<{
2734
- userId?: string | undefined;
2735
- threadId?: string | undefined;
2736
- model_table_userId?: string[] | undefined;
2737
- model_table_threadId?: string[] | undefined;
2738
- model: string;
2739
- table: string;
2740
- vector: number[];
2741
- }, {
2742
- model: import("convex/values").VString<string, "required">;
2743
- table: import("convex/values").VString<string, "required">;
2744
- userId: import("convex/values").VString<string | undefined, "optional">;
2745
- threadId: import("convex/values").VString<string | undefined, "optional">;
2746
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2747
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2748
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2749
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2750
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2751
- }, import("convex/server").GenericTableSearchIndexes, {
2752
- vector: {
2753
- vectorField: "vector";
2754
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2755
- filterFields: "model_table_userId" | "model_table_threadId";
2756
- };
2757
- }>;
2758
- embeddings_4096: import("convex/server").TableDefinition<import("convex/values").VObject<{
2759
- userId?: string | undefined;
2760
- threadId?: string | undefined;
2761
- model_table_userId?: string[] | undefined;
2762
- model_table_threadId?: string[] | undefined;
2763
- model: string;
2764
- table: string;
2765
- vector: number[];
2766
- }, {
2767
- model: import("convex/values").VString<string, "required">;
2768
- table: import("convex/values").VString<string, "required">;
2769
- userId: import("convex/values").VString<string | undefined, "optional">;
2770
- threadId: import("convex/values").VString<string | undefined, "optional">;
2771
- model_table_userId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2772
- model_table_threadId: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
2773
- vector: import("convex/values").VArray<number[], import("convex/values").VFloat64<number, "required">, "required">;
2774
- }, "required", "userId" | "threadId" | "model" | "table" | "model_table_userId" | "model_table_threadId" | "vector">, {
2775
- model_table_threadId: ["model", "table", "threadId", "_creationTime"];
2776
- }, import("convex/server").GenericTableSearchIndexes, {
2777
- vector: {
2778
- vectorField: "vector";
2779
- dimensions: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
2780
- filterFields: "model_table_userId" | "model_table_threadId";
2781
- };
2782
- }>;
2783
- threads: import("convex/server").TableDefinition<import("convex/values").VObject<{
2784
- userId?: string | undefined;
2785
- title?: string | undefined;
2786
- summary?: string | undefined;
2787
- defaultSystemPrompt?: string | undefined;
2788
- parentThreadIds?: import("convex/values").GenericId<"threads">[] | undefined;
2789
- order?: number | undefined;
2790
- status: "active" | "archived";
2791
- }, {
2792
- userId: import("convex/values").VString<string | undefined, "optional">;
2793
- title: import("convex/values").VString<string | undefined, "optional">;
2794
- summary: import("convex/values").VString<string | undefined, "optional">;
2795
- status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
2796
- defaultSystemPrompt: import("convex/values").VString<string | undefined, "optional">;
2797
- parentThreadIds: import("convex/values").VArray<import("convex/values").GenericId<"threads">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">, "optional">;
2798
- order: import("convex/values").VFloat64<number | undefined, "optional">;
2799
- }, "required", "status" | "userId" | "title" | "summary" | "defaultSystemPrompt" | "parentThreadIds" | "order">, {
2800
- userId: ["userId", "_creationTime"];
2801
- }, {}, {}>;
2802
- messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
2803
- id?: string | undefined;
2804
- userId?: string | undefined;
2805
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
2806
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
2807
- files?: any[] | undefined;
2808
- error?: string | undefined;
2809
- agentName?: string | undefined;
2810
- model?: string | undefined;
2811
- provider?: string | undefined;
2812
- providerOptions?: Record<string, Record<string, any>> | undefined;
2813
- message?: {
2814
- providerOptions?: Record<string, Record<string, any>> | undefined;
2815
- role: "user";
2816
- content: string | ({
2817
- providerOptions?: Record<string, Record<string, any>> | undefined;
2818
- type: "text";
2819
- text: string;
2820
- } | {
2821
- providerOptions?: Record<string, Record<string, any>> | undefined;
2822
- mimeType?: string | undefined;
2823
- type: "image";
2824
- image: string | ArrayBuffer;
2825
- } | {
2826
- providerOptions?: Record<string, Record<string, any>> | undefined;
2827
- filename?: string | undefined;
2828
- type: "file";
2829
- mimeType: string;
2830
- data: string | ArrayBuffer;
2831
- })[];
2832
- } | {
2833
- providerOptions?: Record<string, Record<string, any>> | undefined;
2834
- role: "assistant";
2835
- content: string | ({
2836
- providerOptions?: Record<string, Record<string, any>> | undefined;
2837
- type: "text";
2838
- text: string;
2839
- } | {
2840
- providerOptions?: Record<string, Record<string, any>> | undefined;
2841
- filename?: string | undefined;
2842
- type: "file";
2843
- mimeType: string;
2844
- data: string | ArrayBuffer;
2845
- } | {
2846
- providerOptions?: Record<string, Record<string, any>> | undefined;
2847
- signature?: string | undefined;
2848
- type: "reasoning";
2849
- text: string;
2850
- } | {
2851
- providerOptions?: Record<string, Record<string, any>> | undefined;
2852
- type: "redacted-reasoning";
2853
- data: string;
2854
- } | {
2855
- providerOptions?: Record<string, Record<string, any>> | undefined;
2856
- type: "tool-call";
2857
- toolCallId: string;
2858
- toolName: string;
2859
- args: any;
2860
- })[];
2861
- } | {
2862
- providerOptions?: Record<string, Record<string, any>> | undefined;
2863
- role: "tool";
2864
- content: {
2865
- providerOptions?: Record<string, Record<string, any>> | undefined;
2866
- args?: any;
2867
- experimental_content?: ({
2868
- type: "text";
2869
- text: string;
2870
- } | {
2871
- mimeType?: string | undefined;
2872
- type: "image";
2873
- data: string;
2874
- })[] | undefined;
2875
- isError?: boolean | undefined;
2876
- type: "tool-result";
2877
- toolCallId: string;
2878
- toolName: string;
2879
- result: any;
2880
- }[];
2881
- } | {
2882
- providerOptions?: Record<string, Record<string, any>> | undefined;
2883
- role: "system";
2884
- content: string;
2885
- } | undefined;
2886
- text?: string | undefined;
2887
- reasoning?: string | undefined;
2888
- usage?: {
2889
- promptTokens: number;
2890
- completionTokens: number;
2891
- totalTokens: number;
2892
- } | undefined;
2893
- providerMetadata?: Record<string, Record<string, any>> | undefined;
2894
- sources?: {
2895
- title?: string | undefined;
2896
- providerOptions?: Record<string, Record<string, any>> | undefined;
2897
- id: string;
2898
- sourceType: "url";
2899
- url: string;
2900
- }[] | undefined;
2901
- reasoningDetails?: ({
2902
- signature?: string | undefined;
2903
- type: "text";
2904
- text: string;
2905
- } | {
2906
- type: "redacted";
2907
- data: string;
2908
- })[] | undefined;
2909
- warnings?: ({
2910
- details?: string | undefined;
2911
- type: "unsupported-setting";
2912
- setting: string;
2913
- } | {
2914
- details?: string | undefined;
2915
- type: "unsupported-tool";
2916
- tool: any;
2917
- } | {
2918
- type: "other";
2919
- message: string;
2920
- })[] | undefined;
2921
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
2922
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
2923
- stepId?: string | undefined;
2924
- status: "pending" | "success" | "failed";
2925
- order: number;
2926
- threadId: import("convex/values").GenericId<"threads">;
2927
- stepOrder: number;
2928
- tool: boolean;
2929
- }, {
2930
- id: import("convex/values").VString<string | undefined, "optional">;
2931
- userId: import("convex/values").VString<string | undefined, "optional">;
2932
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
2933
- order: import("convex/values").VFloat64<number, "required">;
2934
- stepOrder: import("convex/values").VFloat64<number, "required">;
2935
- embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
2936
- fileIds: import("convex/values").VArray<import("convex/values").GenericId<"files">[] | undefined, import("convex/values").VId<import("convex/values").GenericId<"files">, "required">, "optional">;
2937
- error: import("convex/values").VString<string | undefined, "optional">;
2938
- 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>;
2939
- agentName: import("convex/values").VString<string | undefined, "optional">;
2940
- model: import("convex/values").VString<string | undefined, "optional">;
2941
- provider: import("convex/values").VString<string | undefined, "optional">;
2942
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
2943
- message: import("convex/values").VUnion<{
2944
- providerOptions?: Record<string, Record<string, any>> | undefined;
2945
- role: "user";
2946
- content: string | ({
2947
- providerOptions?: Record<string, Record<string, any>> | undefined;
2948
- type: "text";
2949
- text: string;
2950
- } | {
2951
- providerOptions?: Record<string, Record<string, any>> | undefined;
2952
- mimeType?: string | undefined;
2953
- type: "image";
2954
- image: string | ArrayBuffer;
2955
- } | {
2956
- providerOptions?: Record<string, Record<string, any>> | undefined;
2957
- filename?: string | undefined;
2958
- type: "file";
2959
- mimeType: string;
2960
- data: string | ArrayBuffer;
2961
- })[];
2962
- } | {
2963
- providerOptions?: Record<string, Record<string, any>> | undefined;
2964
- role: "assistant";
2965
- content: string | ({
2966
- providerOptions?: Record<string, Record<string, any>> | undefined;
2967
- type: "text";
2968
- text: string;
2969
- } | {
2970
- providerOptions?: Record<string, Record<string, any>> | undefined;
2971
- filename?: string | undefined;
2972
- type: "file";
2973
- mimeType: string;
2974
- data: string | ArrayBuffer;
2975
- } | {
2976
- providerOptions?: Record<string, Record<string, any>> | undefined;
2977
- signature?: string | undefined;
2978
- type: "reasoning";
2979
- text: string;
2980
- } | {
2981
- providerOptions?: Record<string, Record<string, any>> | undefined;
2982
- type: "redacted-reasoning";
2983
- data: string;
2984
- } | {
2985
- providerOptions?: Record<string, Record<string, any>> | undefined;
2986
- type: "tool-call";
2987
- toolCallId: string;
2988
- toolName: string;
2989
- args: any;
2990
- })[];
2991
- } | {
2992
- providerOptions?: Record<string, Record<string, any>> | undefined;
2993
- role: "tool";
2994
- content: {
2995
- providerOptions?: Record<string, Record<string, any>> | undefined;
2996
- args?: any;
2997
- experimental_content?: ({
2998
- type: "text";
2999
- text: string;
3000
- } | {
3001
- mimeType?: string | undefined;
3002
- type: "image";
3003
- data: string;
3004
- })[] | undefined;
3005
- isError?: boolean | undefined;
3006
- type: "tool-result";
3007
- toolCallId: string;
3008
- toolName: string;
3009
- result: any;
3010
- }[];
3011
- } | {
3012
- providerOptions?: Record<string, Record<string, any>> | undefined;
3013
- role: "system";
3014
- content: string;
3015
- } | undefined, [import("convex/values").VObject<{
3016
- providerOptions?: Record<string, Record<string, any>> | undefined;
3017
- role: "user";
3018
- content: string | ({
3019
- providerOptions?: Record<string, Record<string, any>> | undefined;
3020
- type: "text";
3021
- text: string;
3022
- } | {
3023
- providerOptions?: Record<string, Record<string, any>> | undefined;
3024
- mimeType?: string | undefined;
3025
- type: "image";
3026
- image: string | ArrayBuffer;
3027
- } | {
3028
- providerOptions?: Record<string, Record<string, any>> | undefined;
3029
- filename?: string | undefined;
3030
- type: "file";
3031
- mimeType: string;
3032
- data: string | ArrayBuffer;
3033
- })[];
3034
- }, {
3035
- role: import("convex/values").VLiteral<"user", "required">;
3036
- content: import("convex/values").VUnion<string | ({
3037
- providerOptions?: Record<string, Record<string, any>> | undefined;
3038
- type: "text";
3039
- text: string;
3040
- } | {
3041
- providerOptions?: Record<string, Record<string, any>> | undefined;
3042
- mimeType?: string | undefined;
3043
- type: "image";
3044
- image: string | ArrayBuffer;
3045
- } | {
3046
- providerOptions?: Record<string, Record<string, any>> | undefined;
3047
- filename?: string | undefined;
3048
- type: "file";
3049
- mimeType: string;
3050
- data: string | ArrayBuffer;
3051
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
3052
- providerOptions?: Record<string, Record<string, any>> | undefined;
3053
- type: "text";
3054
- text: string;
3055
- } | {
3056
- providerOptions?: Record<string, Record<string, any>> | undefined;
3057
- mimeType?: string | undefined;
3058
- type: "image";
3059
- image: string | ArrayBuffer;
3060
- } | {
3061
- providerOptions?: Record<string, Record<string, any>> | undefined;
3062
- filename?: string | undefined;
3063
- type: "file";
3064
- mimeType: string;
3065
- data: string | ArrayBuffer;
3066
- })[], import("convex/values").VUnion<{
3067
- providerOptions?: Record<string, Record<string, any>> | undefined;
3068
- type: "text";
3069
- text: string;
3070
- } | {
3071
- providerOptions?: Record<string, Record<string, any>> | undefined;
3072
- mimeType?: string | undefined;
3073
- type: "image";
3074
- image: string | ArrayBuffer;
3075
- } | {
3076
- providerOptions?: Record<string, Record<string, any>> | undefined;
3077
- filename?: string | undefined;
3078
- type: "file";
3079
- mimeType: string;
3080
- data: string | ArrayBuffer;
3081
- }, [import("convex/values").VObject<{
3082
- providerOptions?: Record<string, Record<string, any>> | undefined;
3083
- type: "text";
3084
- text: string;
3085
- }, {
3086
- type: import("convex/values").VLiteral<"text", "required">;
3087
- text: import("convex/values").VString<string, "required">;
3088
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3089
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3090
- providerOptions?: Record<string, Record<string, any>> | undefined;
3091
- mimeType?: string | undefined;
3092
- type: "image";
3093
- image: string | ArrayBuffer;
3094
- }, {
3095
- type: import("convex/values").VLiteral<"image", "required">;
3096
- image: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
3097
- mimeType: import("convex/values").VString<string | undefined, "optional">;
3098
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3099
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType">, import("convex/values").VObject<{
3100
- providerOptions?: Record<string, Record<string, any>> | undefined;
3101
- filename?: string | undefined;
3102
- type: "file";
3103
- mimeType: string;
3104
- data: string | ArrayBuffer;
3105
- }, {
3106
- type: import("convex/values").VLiteral<"file", "required">;
3107
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
3108
- filename: import("convex/values").VString<string | undefined, "optional">;
3109
- mimeType: import("convex/values").VString<string, "required">;
3110
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3111
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
3112
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3113
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3114
- providerOptions?: Record<string, Record<string, any>> | undefined;
3115
- role: "assistant";
3116
- content: string | ({
3117
- providerOptions?: Record<string, Record<string, any>> | undefined;
3118
- type: "text";
3119
- text: string;
3120
- } | {
3121
- providerOptions?: Record<string, Record<string, any>> | undefined;
3122
- filename?: string | undefined;
3123
- type: "file";
3124
- mimeType: string;
3125
- data: string | ArrayBuffer;
3126
- } | {
3127
- providerOptions?: Record<string, Record<string, any>> | undefined;
3128
- signature?: string | undefined;
3129
- type: "reasoning";
3130
- text: string;
3131
- } | {
3132
- providerOptions?: Record<string, Record<string, any>> | undefined;
3133
- type: "redacted-reasoning";
3134
- data: string;
3135
- } | {
3136
- providerOptions?: Record<string, Record<string, any>> | undefined;
3137
- type: "tool-call";
3138
- toolCallId: string;
3139
- toolName: string;
3140
- args: any;
3141
- })[];
3142
- }, {
3143
- role: import("convex/values").VLiteral<"assistant", "required">;
3144
- content: import("convex/values").VUnion<string | ({
3145
- providerOptions?: Record<string, Record<string, any>> | undefined;
3146
- type: "text";
3147
- text: string;
3148
- } | {
3149
- providerOptions?: Record<string, Record<string, any>> | undefined;
3150
- filename?: string | undefined;
3151
- type: "file";
3152
- mimeType: string;
3153
- data: string | ArrayBuffer;
3154
- } | {
3155
- providerOptions?: Record<string, Record<string, any>> | undefined;
3156
- signature?: string | undefined;
3157
- type: "reasoning";
3158
- text: string;
3159
- } | {
3160
- providerOptions?: Record<string, Record<string, any>> | undefined;
3161
- type: "redacted-reasoning";
3162
- data: string;
3163
- } | {
3164
- providerOptions?: Record<string, Record<string, any>> | undefined;
3165
- type: "tool-call";
3166
- toolCallId: string;
3167
- toolName: string;
3168
- args: any;
3169
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
3170
- providerOptions?: Record<string, Record<string, any>> | undefined;
3171
- type: "text";
3172
- text: string;
3173
- } | {
3174
- providerOptions?: Record<string, Record<string, any>> | undefined;
3175
- filename?: string | undefined;
3176
- type: "file";
3177
- mimeType: string;
3178
- data: string | ArrayBuffer;
3179
- } | {
3180
- providerOptions?: Record<string, Record<string, any>> | undefined;
3181
- signature?: string | undefined;
3182
- type: "reasoning";
3183
- text: string;
3184
- } | {
3185
- providerOptions?: Record<string, Record<string, any>> | undefined;
3186
- type: "redacted-reasoning";
3187
- data: string;
3188
- } | {
3189
- providerOptions?: Record<string, Record<string, any>> | undefined;
3190
- type: "tool-call";
3191
- toolCallId: string;
3192
- toolName: string;
3193
- args: any;
3194
- })[], import("convex/values").VUnion<{
3195
- providerOptions?: Record<string, Record<string, any>> | undefined;
3196
- type: "text";
3197
- text: string;
3198
- } | {
3199
- providerOptions?: Record<string, Record<string, any>> | undefined;
3200
- filename?: string | undefined;
3201
- type: "file";
3202
- mimeType: string;
3203
- data: string | ArrayBuffer;
3204
- } | {
3205
- providerOptions?: Record<string, Record<string, any>> | undefined;
3206
- signature?: string | undefined;
3207
- type: "reasoning";
3208
- text: string;
3209
- } | {
3210
- providerOptions?: Record<string, Record<string, any>> | undefined;
3211
- type: "redacted-reasoning";
3212
- data: string;
3213
- } | {
3214
- providerOptions?: Record<string, Record<string, any>> | undefined;
3215
- type: "tool-call";
3216
- toolCallId: string;
3217
- toolName: string;
3218
- args: any;
3219
- }, [import("convex/values").VObject<{
3220
- providerOptions?: Record<string, Record<string, any>> | undefined;
3221
- type: "text";
3222
- text: string;
3223
- }, {
3224
- type: import("convex/values").VLiteral<"text", "required">;
3225
- text: import("convex/values").VString<string, "required">;
3226
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3227
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
3228
- providerOptions?: Record<string, Record<string, any>> | undefined;
3229
- filename?: string | undefined;
3230
- type: "file";
3231
- mimeType: string;
3232
- data: string | ArrayBuffer;
3233
- }, {
3234
- type: import("convex/values").VLiteral<"file", "required">;
3235
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
3236
- filename: import("convex/values").VString<string | undefined, "optional">;
3237
- mimeType: import("convex/values").VString<string, "required">;
3238
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3239
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
3240
- providerOptions?: Record<string, Record<string, any>> | undefined;
3241
- signature?: string | undefined;
3242
- type: "reasoning";
3243
- text: string;
3244
- }, {
3245
- type: import("convex/values").VLiteral<"reasoning", "required">;
3246
- text: import("convex/values").VString<string, "required">;
3247
- signature: import("convex/values").VString<string | undefined, "optional">;
3248
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3249
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
3250
- providerOptions?: Record<string, Record<string, any>> | undefined;
3251
- type: "redacted-reasoning";
3252
- data: string;
3253
- }, {
3254
- type: import("convex/values").VLiteral<"redacted-reasoning", "required">;
3255
- data: import("convex/values").VString<string, "required">;
3256
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3257
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
3258
- providerOptions?: Record<string, Record<string, any>> | undefined;
3259
- type: "tool-call";
3260
- toolCallId: string;
3261
- toolName: string;
3262
- args: any;
3263
- }, {
3264
- type: import("convex/values").VLiteral<"tool-call", "required">;
3265
- toolCallId: import("convex/values").VString<string, "required">;
3266
- toolName: import("convex/values").VString<string, "required">;
3267
- args: import("convex/values").VAny<any, "required", string>;
3268
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3269
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
3270
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3271
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3272
- providerOptions?: Record<string, Record<string, any>> | undefined;
3273
- role: "tool";
3274
- content: {
3275
- providerOptions?: Record<string, Record<string, any>> | undefined;
3276
- args?: any;
3277
- experimental_content?: ({
3278
- type: "text";
3279
- text: string;
3280
- } | {
3281
- mimeType?: string | undefined;
3282
- type: "image";
3283
- data: string;
3284
- })[] | undefined;
3285
- isError?: boolean | undefined;
3286
- type: "tool-result";
3287
- toolCallId: string;
3288
- toolName: string;
3289
- result: any;
3290
- }[];
3291
- }, {
3292
- role: import("convex/values").VLiteral<"tool", "required">;
3293
- content: import("convex/values").VArray<{
3294
- providerOptions?: Record<string, Record<string, any>> | undefined;
3295
- args?: any;
3296
- experimental_content?: ({
3297
- type: "text";
3298
- text: string;
3299
- } | {
3300
- mimeType?: string | undefined;
3301
- type: "image";
3302
- data: string;
3303
- })[] | undefined;
3304
- isError?: boolean | undefined;
3305
- type: "tool-result";
3306
- toolCallId: string;
3307
- toolName: string;
3308
- result: any;
3309
- }[], import("convex/values").VObject<{
3310
- providerOptions?: Record<string, Record<string, any>> | undefined;
3311
- args?: any;
3312
- experimental_content?: ({
3313
- type: "text";
3314
- text: string;
3315
- } | {
3316
- mimeType?: string | undefined;
3317
- type: "image";
3318
- data: string;
3319
- })[] | undefined;
3320
- isError?: boolean | undefined;
3321
- type: "tool-result";
3322
- toolCallId: string;
3323
- toolName: string;
3324
- result: any;
3325
- }, {
3326
- type: import("convex/values").VLiteral<"tool-result", "required">;
3327
- toolCallId: import("convex/values").VString<string, "required">;
3328
- toolName: import("convex/values").VString<string, "required">;
3329
- result: import("convex/values").VAny<any, "required", string>;
3330
- args: import("convex/values").VAny<any, "optional", string>;
3331
- experimental_content: import("convex/values").VArray<({
3332
- type: "text";
3333
- text: string;
3334
- } | {
3335
- mimeType?: string | undefined;
3336
- type: "image";
3337
- data: string;
3338
- })[] | undefined, import("convex/values").VUnion<{
3339
- type: "text";
3340
- text: string;
3341
- } | {
3342
- mimeType?: string | undefined;
3343
- type: "image";
3344
- data: string;
3345
- }, [import("convex/values").VObject<{
3346
- type: "text";
3347
- text: string;
3348
- }, {
3349
- type: import("convex/values").VLiteral<"text", "required">;
3350
- text: import("convex/values").VString<string, "required">;
3351
- }, "required", "type" | "text">, import("convex/values").VObject<{
3352
- mimeType?: string | undefined;
3353
- type: "image";
3354
- data: string;
3355
- }, {
3356
- type: import("convex/values").VLiteral<"image", "required">;
3357
- data: import("convex/values").VString<string, "required">;
3358
- mimeType: import("convex/values").VString<string | undefined, "optional">;
3359
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3360
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3361
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3362
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
3363
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3364
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
3365
- providerOptions?: Record<string, Record<string, any>> | undefined;
3366
- role: "system";
3367
- content: string;
3368
- }, {
3369
- role: import("convex/values").VLiteral<"system", "required">;
3370
- content: import("convex/values").VString<string, "required">;
3371
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3372
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
3373
- tool: import("convex/values").VBoolean<boolean, "required">;
3374
- text: import("convex/values").VString<string | undefined, "optional">;
3375
- usage: import("convex/values").VObject<{
3376
- promptTokens: number;
3377
- completionTokens: number;
3378
- totalTokens: number;
3379
- } | undefined, {
3380
- promptTokens: import("convex/values").VFloat64<number, "required">;
3381
- completionTokens: import("convex/values").VFloat64<number, "required">;
3382
- totalTokens: import("convex/values").VFloat64<number, "required">;
3383
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
3384
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3385
- sources: import("convex/values").VArray<{
3386
- title?: string | undefined;
3387
- providerOptions?: Record<string, Record<string, any>> | undefined;
3388
- id: string;
3389
- sourceType: "url";
3390
- url: string;
3391
- }[] | undefined, import("convex/values").VObject<{
3392
- title?: string | undefined;
3393
- providerOptions?: Record<string, Record<string, any>> | undefined;
3394
- id: string;
3395
- sourceType: "url";
3396
- url: string;
3397
- }, {
3398
- sourceType: import("convex/values").VLiteral<"url", "required">;
3399
- id: import("convex/values").VString<string, "required">;
3400
- url: import("convex/values").VString<string, "required">;
3401
- title: import("convex/values").VString<string | undefined, "optional">;
3402
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3403
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
3404
- reasoning: import("convex/values").VString<string | undefined, "optional">;
3405
- reasoningDetails: import("convex/values").VArray<({
3406
- signature?: string | undefined;
3407
- type: "text";
3408
- text: string;
3409
- } | {
3410
- type: "redacted";
3411
- data: string;
3412
- })[] | undefined, import("convex/values").VUnion<{
3413
- signature?: string | undefined;
3414
- type: "text";
3415
- text: string;
3416
- } | {
3417
- type: "redacted";
3418
- data: string;
3419
- }, [import("convex/values").VObject<{
3420
- signature?: string | undefined;
3421
- type: "text";
3422
- text: string;
3423
- }, {
3424
- type: import("convex/values").VLiteral<"text", "required">;
3425
- text: import("convex/values").VString<string, "required">;
3426
- signature: import("convex/values").VString<string | undefined, "optional">;
3427
- }, "required", "type" | "text" | "signature">, import("convex/values").VObject<{
3428
- type: "redacted";
3429
- data: string;
3430
- }, {
3431
- type: import("convex/values").VLiteral<"redacted", "required">;
3432
- data: import("convex/values").VString<string, "required">;
3433
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
3434
- warnings: import("convex/values").VArray<({
3435
- details?: string | undefined;
3436
- type: "unsupported-setting";
3437
- setting: string;
3438
- } | {
3439
- details?: string | undefined;
3440
- type: "unsupported-tool";
3441
- tool: any;
3442
- } | {
3443
- type: "other";
3444
- message: string;
3445
- })[] | undefined, import("convex/values").VUnion<{
3446
- details?: string | undefined;
3447
- type: "unsupported-setting";
3448
- setting: string;
3449
- } | {
3450
- details?: string | undefined;
3451
- type: "unsupported-tool";
3452
- tool: any;
3453
- } | {
3454
- type: "other";
3455
- message: string;
3456
- }, [import("convex/values").VObject<{
3457
- details?: string | undefined;
3458
- type: "unsupported-setting";
3459
- setting: string;
3460
- }, {
3461
- type: import("convex/values").VLiteral<"unsupported-setting", "required">;
3462
- setting: import("convex/values").VString<string, "required">;
3463
- details: import("convex/values").VString<string | undefined, "optional">;
3464
- }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
3465
- details?: string | undefined;
3466
- type: "unsupported-tool";
3467
- tool: any;
3468
- }, {
3469
- type: import("convex/values").VLiteral<"unsupported-tool", "required">;
3470
- tool: import("convex/values").VAny<any, "required", string>;
3471
- details: import("convex/values").VString<string | undefined, "optional">;
3472
- }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
3473
- type: "other";
3474
- message: string;
3475
- }, {
3476
- type: import("convex/values").VLiteral<"other", "required">;
3477
- message: import("convex/values").VString<string, "required">;
3478
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
3479
- finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
3480
- parentMessageId: import("convex/values").VId<import("convex/values").GenericId<"messages"> | undefined, "optional">;
3481
- stepId: import("convex/values").VString<string | undefined, "optional">;
3482
- files: import("convex/values").VArray<any[] | undefined, import("convex/values").VAny<any, "required", string>, "optional">;
3483
- }, "required", "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "files" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "parentMessageId" | "stepId" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>, {
3484
- threadId_status_tool_order_stepOrder: ["threadId", "status", "tool", "order", "stepOrder", "_creationTime"];
3485
- embeddingId: ["embeddingId", "_creationTime"];
3486
- }, {
3487
- text_search: {
3488
- searchField: "text";
3489
- filterFields: "userId" | "threadId";
3490
- };
3491
- }, {}>;
3492
- streamingMessages: import("convex/server").TableDefinition<import("convex/values").VObject<{
3493
- userId?: string | undefined;
3494
- agentName?: string | undefined;
3495
- model?: string | undefined;
3496
- provider?: string | undefined;
3497
- providerOptions?: Record<string, Record<string, any>> | undefined;
3498
- order: number;
3499
- threadId: import("convex/values").GenericId<"threads">;
3500
- stepOrder: number;
3501
- state: {
3502
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3503
- kind: "streaming";
3504
- lastHeartbeat: number;
3505
- } | {
3506
- kind: "finished";
3507
- endedAt: number;
3508
- } | {
3509
- kind: "error";
3510
- error: string;
3511
- };
3512
- }, {
3513
- userId: import("convex/values").VString<string | undefined, "optional">;
3514
- agentName: import("convex/values").VString<string | undefined, "optional">;
3515
- model: import("convex/values").VString<string | undefined, "optional">;
3516
- provider: import("convex/values").VString<string | undefined, "optional">;
3517
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3518
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads">, "required">;
3519
- order: import("convex/values").VFloat64<number, "required">;
3520
- /**
3521
- * The step order of the first message in the stream.
3522
- * If the stream ends up with both a tool call and a tool result,
3523
- * the stepOrder of the result will be +1 of the tool call.
3524
- */
3525
- stepOrder: import("convex/values").VFloat64<number, "required">;
3526
- state: import("convex/values").VUnion<{
3527
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3528
- kind: "streaming";
3529
- lastHeartbeat: number;
3530
- } | {
3531
- kind: "finished";
3532
- endedAt: number;
3533
- } | {
3534
- kind: "error";
3535
- error: string;
3536
- }, [import("convex/values").VObject<{
3537
- timeoutFnId?: import("convex/values").GenericId<"_scheduled_functions"> | undefined;
3538
- kind: "streaming";
3539
- lastHeartbeat: number;
3540
- }, {
3541
- kind: import("convex/values").VLiteral<"streaming", "required">;
3542
- lastHeartbeat: import("convex/values").VFloat64<number, "required">;
3543
- timeoutFnId: import("convex/values").VId<import("convex/values").GenericId<"_scheduled_functions"> | undefined, "optional">;
3544
- }, "required", "kind" | "lastHeartbeat" | "timeoutFnId">, import("convex/values").VObject<{
3545
- kind: "finished";
3546
- endedAt: number;
3547
- }, {
3548
- kind: import("convex/values").VLiteral<"finished", "required">;
3549
- endedAt: import("convex/values").VFloat64<number, "required">;
3550
- }, "required", "kind" | "endedAt">, import("convex/values").VObject<{
3551
- kind: "error";
3552
- error: string;
3553
- }, {
3554
- kind: import("convex/values").VLiteral<"error", "required">;
3555
- error: import("convex/values").VString<string, "required">;
3556
- }, "required", "kind" | "error">], "required", "kind" | "error" | "lastHeartbeat" | "timeoutFnId" | "endedAt">;
3557
- }, "required", "userId" | "order" | "threadId" | "stepOrder" | "agentName" | "model" | "provider" | "providerOptions" | `providerOptions.${string}` | "state" | "state.kind" | "state.error" | "state.lastHeartbeat" | "state.timeoutFnId" | "state.endedAt">, {
3558
- threadId_state_order_stepOrder: ["threadId", "state.kind", "order", "stepOrder", "_creationTime"];
3559
- }, {}, {}>;
3560
- streamDeltas: import("convex/server").TableDefinition<import("convex/values").VObject<{
3561
- streamId: import("convex/values").GenericId<"streamingMessages">;
3562
- start: number;
3563
- end: number;
3564
- parts: ({
3565
- providerOptions?: Record<string, Record<string, any>> | undefined;
3566
- type: "tool-call";
3567
- toolCallId: string;
3568
- toolName: string;
3569
- args: any;
3570
- } | {
3571
- providerOptions?: Record<string, Record<string, any>> | undefined;
3572
- args?: any;
3573
- experimental_content?: ({
3574
- type: "text";
3575
- text: string;
3576
- } | {
3577
- mimeType?: string | undefined;
3578
- type: "image";
3579
- data: string;
3580
- })[] | undefined;
3581
- isError?: boolean | undefined;
3582
- type: "tool-result";
3583
- toolCallId: string;
3584
- toolName: string;
3585
- result: any;
3586
- } | {
3587
- type: "text-delta";
3588
- textDelta: string;
3589
- } | {
3590
- type: "reasoning";
3591
- textDelta: string;
3592
- } | {
3593
- type: "source";
3594
- source: {
3595
- title?: string | undefined;
3596
- providerOptions?: Record<string, Record<string, any>> | undefined;
3597
- id: string;
3598
- sourceType: "url";
3599
- url: string;
3600
- };
3601
- } | {
3602
- type: "tool-call-streaming-start";
3603
- toolCallId: string;
3604
- toolName: string;
3605
- } | {
3606
- type: "tool-call-delta";
3607
- toolCallId: string;
3608
- toolName: string;
3609
- argsTextDelta: string;
3610
- })[];
3611
- }, {
3612
- streamId: import("convex/values").VId<import("convex/values").GenericId<"streamingMessages">, "required">;
3613
- start: import("convex/values").VFloat64<number, "required">;
3614
- end: import("convex/values").VFloat64<number, "required">;
3615
- parts: import("convex/values").VArray<({
3616
- providerOptions?: Record<string, Record<string, any>> | undefined;
3617
- type: "tool-call";
3618
- toolCallId: string;
3619
- toolName: string;
3620
- args: any;
3621
- } | {
3622
- providerOptions?: Record<string, Record<string, any>> | undefined;
3623
- args?: any;
3624
- experimental_content?: ({
3625
- type: "text";
3626
- text: string;
3627
- } | {
3628
- mimeType?: string | undefined;
3629
- type: "image";
3630
- data: string;
3631
- })[] | undefined;
3632
- isError?: boolean | undefined;
3633
- type: "tool-result";
3634
- toolCallId: string;
3635
- toolName: string;
3636
- result: any;
3637
- } | {
3638
- type: "text-delta";
3639
- textDelta: string;
3640
- } | {
3641
- type: "reasoning";
3642
- textDelta: string;
3643
- } | {
3644
- type: "source";
3645
- source: {
3646
- title?: string | undefined;
3647
- providerOptions?: Record<string, Record<string, any>> | undefined;
3648
- id: string;
3649
- sourceType: "url";
3650
- url: string;
3651
- };
3652
- } | {
3653
- type: "tool-call-streaming-start";
3654
- toolCallId: string;
3655
- toolName: string;
3656
- } | {
3657
- type: "tool-call-delta";
3658
- toolCallId: string;
3659
- toolName: string;
3660
- argsTextDelta: string;
3661
- })[], import("convex/values").VUnion<{
3662
- providerOptions?: Record<string, Record<string, any>> | undefined;
3663
- type: "tool-call";
3664
- toolCallId: string;
3665
- toolName: string;
3666
- args: any;
3667
- } | {
3668
- providerOptions?: Record<string, Record<string, any>> | undefined;
3669
- args?: any;
3670
- experimental_content?: ({
3671
- type: "text";
3672
- text: string;
3673
- } | {
3674
- mimeType?: string | undefined;
3675
- type: "image";
3676
- data: string;
3677
- })[] | undefined;
3678
- isError?: boolean | undefined;
3679
- type: "tool-result";
3680
- toolCallId: string;
3681
- toolName: string;
3682
- result: any;
3683
- } | {
3684
- type: "text-delta";
3685
- textDelta: string;
3686
- } | {
3687
- type: "reasoning";
3688
- textDelta: string;
3689
- } | {
3690
- type: "source";
3691
- source: {
3692
- title?: string | undefined;
3693
- providerOptions?: Record<string, Record<string, any>> | undefined;
3694
- id: string;
3695
- sourceType: "url";
3696
- url: string;
3697
- };
3698
- } | {
3699
- type: "tool-call-streaming-start";
3700
- toolCallId: string;
3701
- toolName: string;
3702
- } | {
3703
- type: "tool-call-delta";
3704
- toolCallId: string;
3705
- toolName: string;
3706
- argsTextDelta: string;
3707
- }, [import("convex/values").VObject<{
3708
- type: "text-delta";
3709
- textDelta: string;
3710
- }, {
3711
- type: import("convex/values").VLiteral<"text-delta", "required">;
3712
- textDelta: import("convex/values").VString<string, "required">;
3713
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
3714
- type: "reasoning";
3715
- textDelta: string;
3716
- }, {
3717
- type: import("convex/values").VLiteral<"reasoning", "required">;
3718
- textDelta: import("convex/values").VString<string, "required">;
3719
- }, "required", "type" | "textDelta">, import("convex/values").VObject<{
3720
- type: "source";
3721
- source: {
3722
- title?: string | undefined;
3723
- providerOptions?: Record<string, Record<string, any>> | undefined;
3724
- id: string;
3725
- sourceType: "url";
3726
- url: string;
3727
- };
3728
- }, {
3729
- type: import("convex/values").VLiteral<"source", "required">;
3730
- source: import("convex/values").VObject<{
3731
- title?: string | undefined;
3732
- providerOptions?: Record<string, Record<string, any>> | undefined;
3733
- id: string;
3734
- sourceType: "url";
3735
- url: string;
3736
- }, {
3737
- sourceType: import("convex/values").VLiteral<"url", "required">;
3738
- id: import("convex/values").VString<string, "required">;
3739
- url: import("convex/values").VString<string, "required">;
3740
- title: import("convex/values").VString<string | undefined, "optional">;
3741
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3742
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">;
3743
- }, "required", "type" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url">, import("convex/values").VObject<{
3744
- providerOptions?: Record<string, Record<string, any>> | undefined;
3745
- type: "tool-call";
3746
- toolCallId: string;
3747
- toolName: string;
3748
- args: any;
3749
- }, {
3750
- type: import("convex/values").VLiteral<"tool-call", "required">;
3751
- toolCallId: import("convex/values").VString<string, "required">;
3752
- toolName: import("convex/values").VString<string, "required">;
3753
- args: import("convex/values").VAny<any, "required", string>;
3754
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3755
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>, import("convex/values").VObject<{
3756
- type: "tool-call-streaming-start";
3757
- toolCallId: string;
3758
- toolName: string;
3759
- }, {
3760
- type: import("convex/values").VLiteral<"tool-call-streaming-start", "required">;
3761
- toolCallId: import("convex/values").VString<string, "required">;
3762
- toolName: import("convex/values").VString<string, "required">;
3763
- }, "required", "type" | "toolCallId" | "toolName">, import("convex/values").VObject<{
3764
- type: "tool-call-delta";
3765
- toolCallId: string;
3766
- toolName: string;
3767
- argsTextDelta: string;
3768
- }, {
3769
- type: import("convex/values").VLiteral<"tool-call-delta", "required">;
3770
- toolCallId: import("convex/values").VString<string, "required">;
3771
- toolName: import("convex/values").VString<string, "required">;
3772
- argsTextDelta: import("convex/values").VString<string, "required">;
3773
- }, "required", "type" | "toolCallId" | "toolName" | "argsTextDelta">, import("convex/values").VObject<{
3774
- providerOptions?: Record<string, Record<string, any>> | undefined;
3775
- args?: any;
3776
- experimental_content?: ({
3777
- type: "text";
3778
- text: string;
3779
- } | {
3780
- mimeType?: string | undefined;
3781
- type: "image";
3782
- data: string;
3783
- })[] | undefined;
3784
- isError?: boolean | undefined;
3785
- type: "tool-result";
3786
- toolCallId: string;
3787
- toolName: string;
3788
- result: any;
3789
- }, {
3790
- type: import("convex/values").VLiteral<"tool-result", "required">;
3791
- toolCallId: import("convex/values").VString<string, "required">;
3792
- toolName: import("convex/values").VString<string, "required">;
3793
- result: import("convex/values").VAny<any, "required", string>;
3794
- args: import("convex/values").VAny<any, "optional", string>;
3795
- experimental_content: import("convex/values").VArray<({
3796
- type: "text";
3797
- text: string;
3798
- } | {
3799
- mimeType?: string | undefined;
3800
- type: "image";
3801
- data: string;
3802
- })[] | undefined, import("convex/values").VUnion<{
3803
- type: "text";
3804
- text: string;
3805
- } | {
3806
- mimeType?: string | undefined;
3807
- type: "image";
3808
- data: string;
3809
- }, [import("convex/values").VObject<{
3810
- type: "text";
3811
- text: string;
3812
- }, {
3813
- type: import("convex/values").VLiteral<"text", "required">;
3814
- text: import("convex/values").VString<string, "required">;
3815
- }, "required", "type" | "text">, import("convex/values").VObject<{
3816
- mimeType?: string | undefined;
3817
- type: "image";
3818
- data: string;
3819
- }, {
3820
- type: import("convex/values").VLiteral<"image", "required">;
3821
- data: import("convex/values").VString<string, "required">;
3822
- mimeType: import("convex/values").VString<string | undefined, "optional">;
3823
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
3824
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
3825
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
3826
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>], "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}` | "textDelta" | "source" | "source.id" | "source.title" | "source.providerOptions" | `source.providerOptions.${string}` | "source.sourceType" | "source.url" | "argsTextDelta">, "required">;
3827
- }, "required", "streamId" | "start" | "end" | "parts">, {
3828
- streamId_start_end: ["streamId", "start", "end", "_creationTime"];
3829
- }, {}, {}>;
3830
- memories: import("convex/server").TableDefinition<import("convex/values").VObject<{
3831
- userId?: string | undefined;
3832
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
3833
- embeddingId?: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
3834
- memory: string;
3835
- }, {
3836
- threadId: import("convex/values").VId<import("convex/values").GenericId<"threads"> | undefined, "optional">;
3837
- userId: import("convex/values").VString<string | undefined, "optional">;
3838
- memory: import("convex/values").VString<string, "required">;
3839
- embeddingId: import("convex/values").VUnion<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined, import("convex/values").VId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096", "required">[], "optional", never>;
3840
- }, "required", "userId" | "threadId" | "embeddingId" | "memory">, {
3841
- threadId: ["threadId", "_creationTime"];
3842
- userId: ["userId", "_creationTime"];
3843
- embeddingId: ["embeddingId", "_creationTime"];
3844
- }, {}, {}>;
3845
- files: import("convex/server").TableDefinition<import("convex/values").VObject<{
3846
- filename?: string | undefined;
3847
- mimeType: string;
3848
- storageId: string;
3849
- hash: string;
3850
- refcount: number;
3851
- lastTouchedAt: number;
3852
- }, {
3853
- storageId: import("convex/values").VString<string, "required">;
3854
- mimeType: import("convex/values").VString<string, "required">;
3855
- filename: import("convex/values").VString<string | undefined, "optional">;
3856
- hash: import("convex/values").VString<string, "required">;
3857
- refcount: import("convex/values").VFloat64<number, "required">;
3858
- lastTouchedAt: import("convex/values").VFloat64<number, "required">;
3859
- }, "required", "mimeType" | "filename" | "storageId" | "hash" | "refcount" | "lastTouchedAt">, {
3860
- hash: ["hash", "_creationTime"];
3861
- refcount: ["refcount", "_creationTime"];
3862
- }, {}, {}>;
3863
- }[TableName]["validator"], {
3864
- _id: import("convex/values").VId<import("convex/values").GenericId<TableName>, "required">;
3865
- _creationTime: import("convex/values").VFloat64<number, "required">;
3866
- }>;
3867
- null: () => import("convex/values").VNull<null, "required">;
3868
- number: () => import("convex/values").VFloat64<number, "required">;
3869
- float64: () => import("convex/values").VFloat64<number, "required">;
3870
- bigint: () => import("convex/values").VInt64<bigint, "required">;
3871
- int64: () => import("convex/values").VInt64<bigint, "required">;
3872
- boolean: () => import("convex/values").VBoolean<boolean, "required">;
3873
- string: () => import("convex/values").VString<string, "required">;
3874
- bytes: () => import("convex/values").VBytes<ArrayBuffer, "required">;
3875
- literal: <T extends string | number | bigint | boolean>(literal: T) => import("convex/values").VLiteral<T, "required">;
3876
- array: <T_1 extends import("convex/values").Validator<any, "required", any>>(element: T_1) => import("convex/values").VArray<T_1["type"][], T_1, "required">;
3877
- object: <T_2 extends import("convex/values").PropertyValidators>(fields: T_2) => import("convex/values").VObject<import("convex/server").Expand<{ [Property in { [Property_1 in keyof T_2]: T_2[Property_1]["isOptional"] extends "optional" ? Property_1 : never; }[keyof T_2]]?: Exclude<Infer<T_2[Property]>, undefined> | undefined; } & { [Property_1 in Exclude<keyof T_2, { [Property in keyof T_2]: T_2[Property]["isOptional"] extends "optional" ? Property : never; }[keyof T_2]>]: Infer<T_2[Property_1]>; }>, T_2, "required", { [Property_2 in keyof T_2]: Property_2 | `${Property_2 & string}.${T_2[Property_2]["fieldPaths"]}`; }[keyof T_2] & string>;
3878
- record: <Key extends import("convex/values").Validator<string, "required", any>, Value extends import("convex/values").Validator<any, "required", any>>(keys: Key, values: Value) => import("convex/values").VRecord<Record<Infer<Key>, Value["type"]>, Key, Value, "required", string>;
3879
- union: <T_3 extends import("convex/values").Validator<any, "required", any>[]>(...members: T_3) => import("convex/values").VUnion<T_3[number]["type"], T_3, "required", T_3[number]["fieldPaths"]>;
3880
- any: () => import("convex/values").VAny<any, "required", string>;
3881
- optional: <T_4 extends import("convex/values").GenericValidator>(value: T_4) => import("convex/values").VOptional<T_4>;
3882
- };
3883
- export { vv as v };
3884
- export declare const vThreadDoc: import("convex/values").VObject<{
3885
- userId?: string | undefined;
3886
- title?: string | undefined;
3887
- summary?: string | undefined;
3888
- _id: string;
3889
- _creationTime: number;
3890
- status: "active" | "archived";
3891
- }, {
3892
- _id: import("convex/values").VString<string, "required">;
3893
- _creationTime: import("convex/values").VFloat64<number, "required">;
3894
- userId: import("convex/values").VString<string | undefined, "optional">;
3895
- title: import("convex/values").VString<string | undefined, "optional">;
3896
- summary: import("convex/values").VString<string | undefined, "optional">;
3897
- status: import("convex/values").VUnion<"active" | "archived", [import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"archived", "required">], "required", never>;
3898
- }, "required", "_id" | "_creationTime" | "status" | "userId" | "title" | "summary">;
3899
- export type ThreadDoc = Infer<typeof vThreadDoc>;
3900
- export declare const vMessageDoc: import("convex/values").VObject<{
3901
- id?: string | undefined;
3902
- userId?: string | undefined;
3903
- embeddingId?: string | undefined;
3904
- fileIds?: string[] | undefined;
3905
- error?: string | undefined;
3906
- agentName?: string | undefined;
3907
- model?: string | undefined;
3908
- provider?: string | undefined;
3909
- providerOptions?: Record<string, Record<string, any>> | undefined;
3910
- message?: {
3911
- providerOptions?: Record<string, Record<string, any>> | undefined;
3912
- role: "user";
3913
- content: string | ({
3914
- providerOptions?: Record<string, Record<string, any>> | undefined;
3915
- type: "text";
3916
- text: string;
3917
- } | {
3918
- providerOptions?: Record<string, Record<string, any>> | undefined;
3919
- mimeType?: string | undefined;
3920
- type: "image";
3921
- image: string | ArrayBuffer;
3922
- } | {
3923
- providerOptions?: Record<string, Record<string, any>> | undefined;
3924
- filename?: string | undefined;
3925
- type: "file";
3926
- mimeType: string;
3927
- data: string | ArrayBuffer;
3928
- })[];
3929
- } | {
3930
- providerOptions?: Record<string, Record<string, any>> | undefined;
3931
- role: "assistant";
3932
- content: string | ({
3933
- providerOptions?: Record<string, Record<string, any>> | undefined;
3934
- type: "text";
3935
- text: string;
3936
- } | {
3937
- providerOptions?: Record<string, Record<string, any>> | undefined;
3938
- filename?: string | undefined;
3939
- type: "file";
3940
- mimeType: string;
3941
- data: string | ArrayBuffer;
3942
- } | {
3943
- providerOptions?: Record<string, Record<string, any>> | undefined;
3944
- signature?: string | undefined;
3945
- type: "reasoning";
3946
- text: string;
3947
- } | {
3948
- providerOptions?: Record<string, Record<string, any>> | undefined;
3949
- type: "redacted-reasoning";
3950
- data: string;
3951
- } | {
3952
- providerOptions?: Record<string, Record<string, any>> | undefined;
3953
- type: "tool-call";
3954
- toolCallId: string;
3955
- toolName: string;
3956
- args: any;
3957
- })[];
3958
- } | {
3959
- providerOptions?: Record<string, Record<string, any>> | undefined;
3960
- role: "tool";
3961
- content: {
3962
- providerOptions?: Record<string, Record<string, any>> | undefined;
3963
- args?: any;
3964
- experimental_content?: ({
3965
- type: "text";
3966
- text: string;
3967
- } | {
3968
- mimeType?: string | undefined;
3969
- type: "image";
3970
- data: string;
3971
- })[] | undefined;
3972
- isError?: boolean | undefined;
3973
- type: "tool-result";
3974
- toolCallId: string;
3975
- toolName: string;
3976
- result: any;
3977
- }[];
3978
- } | {
3979
- providerOptions?: Record<string, Record<string, any>> | undefined;
3980
- role: "system";
3981
- content: string;
3982
- } | undefined;
3983
- text?: string | undefined;
3984
- reasoning?: string | undefined;
3985
- usage?: {
3986
- promptTokens: number;
3987
- completionTokens: number;
3988
- totalTokens: number;
3989
- } | undefined;
3990
- providerMetadata?: Record<string, Record<string, any>> | undefined;
3991
- sources?: {
3992
- title?: string | undefined;
3993
- providerOptions?: Record<string, Record<string, any>> | undefined;
3994
- id: string;
3995
- sourceType: "url";
3996
- url: string;
3997
- }[] | undefined;
3998
- reasoningDetails?: ({
3999
- signature?: string | undefined;
4000
- type: "text";
4001
- text: string;
4002
- } | {
4003
- type: "redacted";
4004
- data: string;
4005
- })[] | undefined;
4006
- warnings?: ({
4007
- details?: string | undefined;
4008
- type: "unsupported-setting";
4009
- setting: string;
4010
- } | {
4011
- details?: string | undefined;
4012
- type: "unsupported-tool";
4013
- tool: any;
4014
- } | {
4015
- type: "other";
4016
- message: string;
4017
- })[] | undefined;
4018
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
4019
- _id: string;
4020
- _creationTime: number;
4021
- status: "pending" | "success" | "failed";
4022
- order: number;
4023
- threadId: string;
4024
- stepOrder: number;
4025
- tool: boolean;
4026
- }, {
4027
- threadId: import("convex/values").VString<string, "required">;
4028
- embeddingId: import("convex/values").VString<string | undefined, "optional">;
4029
- fileIds: import("convex/values").VArray<string[] | undefined, import("convex/values").VString<string, "required">, "optional">;
4030
- id: import("convex/values").VString<string | undefined, "optional">;
4031
- userId: import("convex/values").VString<string | undefined, "optional">;
4032
- order: import("convex/values").VFloat64<number, "required">;
4033
- stepOrder: import("convex/values").VFloat64<number, "required">;
4034
- error: import("convex/values").VString<string | undefined, "optional">;
4035
- 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>;
4036
- agentName: import("convex/values").VString<string | undefined, "optional">;
4037
- model: import("convex/values").VString<string | undefined, "optional">;
4038
- provider: import("convex/values").VString<string | undefined, "optional">;
4039
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4040
- message: import("convex/values").VUnion<{
4041
- providerOptions?: Record<string, Record<string, any>> | undefined;
4042
- role: "user";
4043
- content: string | ({
4044
- providerOptions?: Record<string, Record<string, any>> | undefined;
4045
- type: "text";
4046
- text: string;
4047
- } | {
4048
- providerOptions?: Record<string, Record<string, any>> | undefined;
4049
- mimeType?: string | undefined;
4050
- type: "image";
4051
- image: string | ArrayBuffer;
4052
- } | {
4053
- providerOptions?: Record<string, Record<string, any>> | undefined;
4054
- filename?: string | undefined;
4055
- type: "file";
4056
- mimeType: string;
4057
- data: string | ArrayBuffer;
4058
- })[];
4059
- } | {
4060
- providerOptions?: Record<string, Record<string, any>> | undefined;
4061
- role: "assistant";
4062
- content: string | ({
4063
- providerOptions?: Record<string, Record<string, any>> | undefined;
4064
- type: "text";
4065
- text: string;
4066
- } | {
4067
- providerOptions?: Record<string, Record<string, any>> | undefined;
4068
- filename?: string | undefined;
4069
- type: "file";
4070
- mimeType: string;
4071
- data: string | ArrayBuffer;
4072
- } | {
4073
- providerOptions?: Record<string, Record<string, any>> | undefined;
4074
- signature?: string | undefined;
4075
- type: "reasoning";
4076
- text: string;
4077
- } | {
4078
- providerOptions?: Record<string, Record<string, any>> | undefined;
4079
- type: "redacted-reasoning";
4080
- data: string;
4081
- } | {
4082
- providerOptions?: Record<string, Record<string, any>> | undefined;
4083
- type: "tool-call";
4084
- toolCallId: string;
4085
- toolName: string;
4086
- args: any;
4087
- })[];
4088
- } | {
4089
- providerOptions?: Record<string, Record<string, any>> | undefined;
4090
- role: "tool";
4091
- content: {
4092
- providerOptions?: Record<string, Record<string, any>> | undefined;
4093
- args?: any;
4094
- experimental_content?: ({
4095
- type: "text";
4096
- text: string;
4097
- } | {
4098
- mimeType?: string | undefined;
4099
- type: "image";
4100
- data: string;
4101
- })[] | undefined;
4102
- isError?: boolean | undefined;
4103
- type: "tool-result";
4104
- toolCallId: string;
4105
- toolName: string;
4106
- result: any;
4107
- }[];
4108
- } | {
4109
- providerOptions?: Record<string, Record<string, any>> | undefined;
4110
- role: "system";
4111
- content: string;
4112
- } | undefined, [import("convex/values").VObject<{
4113
- providerOptions?: Record<string, Record<string, any>> | undefined;
4114
- role: "user";
4115
- content: string | ({
4116
- providerOptions?: Record<string, Record<string, any>> | undefined;
4117
- type: "text";
4118
- text: string;
4119
- } | {
4120
- providerOptions?: Record<string, Record<string, any>> | undefined;
4121
- mimeType?: string | undefined;
4122
- type: "image";
4123
- image: string | ArrayBuffer;
4124
- } | {
4125
- providerOptions?: Record<string, Record<string, any>> | undefined;
4126
- filename?: string | undefined;
4127
- type: "file";
4128
- mimeType: string;
4129
- data: string | ArrayBuffer;
4130
- })[];
4131
- }, {
4132
- role: import("convex/values").VLiteral<"user", "required">;
4133
- content: import("convex/values").VUnion<string | ({
4134
- providerOptions?: Record<string, Record<string, any>> | undefined;
4135
- type: "text";
4136
- text: string;
4137
- } | {
4138
- providerOptions?: Record<string, Record<string, any>> | undefined;
4139
- mimeType?: string | undefined;
4140
- type: "image";
4141
- image: string | ArrayBuffer;
4142
- } | {
4143
- providerOptions?: Record<string, Record<string, any>> | undefined;
4144
- filename?: string | undefined;
4145
- type: "file";
4146
- mimeType: string;
4147
- data: string | ArrayBuffer;
4148
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
4149
- providerOptions?: Record<string, Record<string, any>> | undefined;
4150
- type: "text";
4151
- text: string;
4152
- } | {
4153
- providerOptions?: Record<string, Record<string, any>> | undefined;
4154
- mimeType?: string | undefined;
4155
- type: "image";
4156
- image: string | ArrayBuffer;
4157
- } | {
4158
- providerOptions?: Record<string, Record<string, any>> | undefined;
4159
- filename?: string | undefined;
4160
- type: "file";
4161
- mimeType: string;
4162
- data: string | ArrayBuffer;
4163
- })[], import("convex/values").VUnion<{
4164
- providerOptions?: Record<string, Record<string, any>> | undefined;
4165
- type: "text";
4166
- text: string;
4167
- } | {
4168
- providerOptions?: Record<string, Record<string, any>> | undefined;
4169
- mimeType?: string | undefined;
4170
- type: "image";
4171
- image: string | ArrayBuffer;
4172
- } | {
4173
- providerOptions?: Record<string, Record<string, any>> | undefined;
4174
- filename?: string | undefined;
4175
- type: "file";
4176
- mimeType: string;
4177
- data: string | ArrayBuffer;
4178
- }, [import("convex/values").VObject<{
4179
- providerOptions?: Record<string, Record<string, any>> | undefined;
4180
- type: "text";
4181
- text: string;
4182
- }, {
4183
- type: import("convex/values").VLiteral<"text", "required">;
4184
- text: import("convex/values").VString<string, "required">;
4185
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4186
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
4187
- providerOptions?: Record<string, Record<string, any>> | undefined;
4188
- mimeType?: string | undefined;
4189
- type: "image";
4190
- image: string | ArrayBuffer;
4191
- }, {
4192
- type: import("convex/values").VLiteral<"image", "required">;
4193
- image: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
4194
- mimeType: import("convex/values").VString<string | undefined, "optional">;
4195
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4196
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "image" | "mimeType">, import("convex/values").VObject<{
4197
- providerOptions?: Record<string, Record<string, any>> | undefined;
4198
- filename?: string | undefined;
4199
- type: "file";
4200
- mimeType: string;
4201
- data: string | ArrayBuffer;
4202
- }, {
4203
- type: import("convex/values").VLiteral<"file", "required">;
4204
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
4205
- filename: import("convex/values").VString<string | undefined, "optional">;
4206
- mimeType: import("convex/values").VString<string, "required">;
4207
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4208
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "image" | "mimeType" | "data" | "filename">, "required">], "required", never>;
4209
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4210
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4211
- providerOptions?: Record<string, Record<string, any>> | undefined;
4212
- role: "assistant";
4213
- content: string | ({
4214
- providerOptions?: Record<string, Record<string, any>> | undefined;
4215
- type: "text";
4216
- text: string;
4217
- } | {
4218
- providerOptions?: Record<string, Record<string, any>> | undefined;
4219
- filename?: string | undefined;
4220
- type: "file";
4221
- mimeType: string;
4222
- data: string | ArrayBuffer;
4223
- } | {
4224
- providerOptions?: Record<string, Record<string, any>> | undefined;
4225
- signature?: string | undefined;
4226
- type: "reasoning";
4227
- text: string;
4228
- } | {
4229
- providerOptions?: Record<string, Record<string, any>> | undefined;
4230
- type: "redacted-reasoning";
4231
- data: string;
4232
- } | {
4233
- providerOptions?: Record<string, Record<string, any>> | undefined;
4234
- type: "tool-call";
4235
- toolCallId: string;
4236
- toolName: string;
4237
- args: any;
4238
- })[];
4239
- }, {
4240
- role: import("convex/values").VLiteral<"assistant", "required">;
4241
- content: import("convex/values").VUnion<string | ({
4242
- providerOptions?: Record<string, Record<string, any>> | undefined;
4243
- type: "text";
4244
- text: string;
4245
- } | {
4246
- providerOptions?: Record<string, Record<string, any>> | undefined;
4247
- filename?: string | undefined;
4248
- type: "file";
4249
- mimeType: string;
4250
- data: string | ArrayBuffer;
4251
- } | {
4252
- providerOptions?: Record<string, Record<string, any>> | undefined;
4253
- signature?: string | undefined;
4254
- type: "reasoning";
4255
- text: string;
4256
- } | {
4257
- providerOptions?: Record<string, Record<string, any>> | undefined;
4258
- type: "redacted-reasoning";
4259
- data: string;
4260
- } | {
4261
- providerOptions?: Record<string, Record<string, any>> | undefined;
4262
- type: "tool-call";
4263
- toolCallId: string;
4264
- toolName: string;
4265
- args: any;
4266
- })[], [import("convex/values").VString<string, "required">, import("convex/values").VArray<({
4267
- providerOptions?: Record<string, Record<string, any>> | undefined;
4268
- type: "text";
4269
- text: string;
4270
- } | {
4271
- providerOptions?: Record<string, Record<string, any>> | undefined;
4272
- filename?: string | undefined;
4273
- type: "file";
4274
- mimeType: string;
4275
- data: string | ArrayBuffer;
4276
- } | {
4277
- providerOptions?: Record<string, Record<string, any>> | undefined;
4278
- signature?: string | undefined;
4279
- type: "reasoning";
4280
- text: string;
4281
- } | {
4282
- providerOptions?: Record<string, Record<string, any>> | undefined;
4283
- type: "redacted-reasoning";
4284
- data: string;
4285
- } | {
4286
- providerOptions?: Record<string, Record<string, any>> | undefined;
4287
- type: "tool-call";
4288
- toolCallId: string;
4289
- toolName: string;
4290
- args: any;
4291
- })[], import("convex/values").VUnion<{
4292
- providerOptions?: Record<string, Record<string, any>> | undefined;
4293
- type: "text";
4294
- text: string;
4295
- } | {
4296
- providerOptions?: Record<string, Record<string, any>> | undefined;
4297
- filename?: string | undefined;
4298
- type: "file";
4299
- mimeType: string;
4300
- data: string | ArrayBuffer;
4301
- } | {
4302
- providerOptions?: Record<string, Record<string, any>> | undefined;
4303
- signature?: string | undefined;
4304
- type: "reasoning";
4305
- text: string;
4306
- } | {
4307
- providerOptions?: Record<string, Record<string, any>> | undefined;
4308
- type: "redacted-reasoning";
4309
- data: string;
4310
- } | {
4311
- providerOptions?: Record<string, Record<string, any>> | undefined;
4312
- type: "tool-call";
4313
- toolCallId: string;
4314
- toolName: string;
4315
- args: any;
4316
- }, [import("convex/values").VObject<{
4317
- providerOptions?: Record<string, Record<string, any>> | undefined;
4318
- type: "text";
4319
- text: string;
4320
- }, {
4321
- type: import("convex/values").VLiteral<"text", "required">;
4322
- text: import("convex/values").VString<string, "required">;
4323
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4324
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}`>, import("convex/values").VObject<{
4325
- providerOptions?: Record<string, Record<string, any>> | undefined;
4326
- filename?: string | undefined;
4327
- type: "file";
4328
- mimeType: string;
4329
- data: string | ArrayBuffer;
4330
- }, {
4331
- type: import("convex/values").VLiteral<"file", "required">;
4332
- data: import("convex/values").VUnion<string | ArrayBuffer, [import("convex/values").VString<string, "required">, import("convex/values").VBytes<ArrayBuffer, "required">], "required", never>;
4333
- filename: import("convex/values").VString<string | undefined, "optional">;
4334
- mimeType: import("convex/values").VString<string, "required">;
4335
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4336
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "mimeType" | "data" | "filename">, import("convex/values").VObject<{
4337
- providerOptions?: Record<string, Record<string, any>> | undefined;
4338
- signature?: string | undefined;
4339
- type: "reasoning";
4340
- text: string;
4341
- }, {
4342
- type: import("convex/values").VLiteral<"reasoning", "required">;
4343
- text: import("convex/values").VString<string, "required">;
4344
- signature: import("convex/values").VString<string | undefined, "optional">;
4345
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4346
- }, "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "signature">, import("convex/values").VObject<{
4347
- providerOptions?: Record<string, Record<string, any>> | undefined;
4348
- type: "redacted-reasoning";
4349
- data: string;
4350
- }, {
4351
- type: import("convex/values").VLiteral<"redacted-reasoning", "required">;
4352
- data: import("convex/values").VString<string, "required">;
4353
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4354
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "data">, import("convex/values").VObject<{
4355
- providerOptions?: Record<string, Record<string, any>> | undefined;
4356
- type: "tool-call";
4357
- toolCallId: string;
4358
- toolName: string;
4359
- args: any;
4360
- }, {
4361
- type: import("convex/values").VLiteral<"tool-call", "required">;
4362
- toolCallId: import("convex/values").VString<string, "required">;
4363
- toolName: import("convex/values").VString<string, "required">;
4364
- args: import("convex/values").VAny<any, "required", string>;
4365
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4366
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}`>], "required", "type" | "providerOptions" | "text" | `providerOptions.${string}` | "mimeType" | "data" | "filename" | "signature" | "toolCallId" | "toolName" | "args" | `args.${string}`>, "required">], "required", never>;
4367
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4368
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4369
- providerOptions?: Record<string, Record<string, any>> | undefined;
4370
- role: "tool";
4371
- content: {
4372
- providerOptions?: Record<string, Record<string, any>> | undefined;
4373
- args?: any;
4374
- experimental_content?: ({
4375
- type: "text";
4376
- text: string;
4377
- } | {
4378
- mimeType?: string | undefined;
4379
- type: "image";
4380
- data: string;
4381
- })[] | undefined;
4382
- isError?: boolean | undefined;
4383
- type: "tool-result";
4384
- toolCallId: string;
4385
- toolName: string;
4386
- result: any;
4387
- }[];
4388
- }, {
4389
- role: import("convex/values").VLiteral<"tool", "required">;
4390
- content: import("convex/values").VArray<{
4391
- providerOptions?: Record<string, Record<string, any>> | undefined;
4392
- args?: any;
4393
- experimental_content?: ({
4394
- type: "text";
4395
- text: string;
4396
- } | {
4397
- mimeType?: string | undefined;
4398
- type: "image";
4399
- data: string;
4400
- })[] | undefined;
4401
- isError?: boolean | undefined;
4402
- type: "tool-result";
4403
- toolCallId: string;
4404
- toolName: string;
4405
- result: any;
4406
- }[], import("convex/values").VObject<{
4407
- providerOptions?: Record<string, Record<string, any>> | undefined;
4408
- args?: any;
4409
- experimental_content?: ({
4410
- type: "text";
4411
- text: string;
4412
- } | {
4413
- mimeType?: string | undefined;
4414
- type: "image";
4415
- data: string;
4416
- })[] | undefined;
4417
- isError?: boolean | undefined;
4418
- type: "tool-result";
4419
- toolCallId: string;
4420
- toolName: string;
4421
- result: any;
4422
- }, {
4423
- type: import("convex/values").VLiteral<"tool-result", "required">;
4424
- toolCallId: import("convex/values").VString<string, "required">;
4425
- toolName: import("convex/values").VString<string, "required">;
4426
- result: import("convex/values").VAny<any, "required", string>;
4427
- args: import("convex/values").VAny<any, "optional", string>;
4428
- experimental_content: import("convex/values").VArray<({
4429
- type: "text";
4430
- text: string;
4431
- } | {
4432
- mimeType?: string | undefined;
4433
- type: "image";
4434
- data: string;
4435
- })[] | undefined, import("convex/values").VUnion<{
4436
- type: "text";
4437
- text: string;
4438
- } | {
4439
- mimeType?: string | undefined;
4440
- type: "image";
4441
- data: string;
4442
- }, [import("convex/values").VObject<{
4443
- type: "text";
4444
- text: string;
4445
- }, {
4446
- type: import("convex/values").VLiteral<"text", "required">;
4447
- text: import("convex/values").VString<string, "required">;
4448
- }, "required", "type" | "text">, import("convex/values").VObject<{
4449
- mimeType?: string | undefined;
4450
- type: "image";
4451
- data: string;
4452
- }, {
4453
- type: import("convex/values").VLiteral<"image", "required">;
4454
- data: import("convex/values").VString<string, "required">;
4455
- mimeType: import("convex/values").VString<string | undefined, "optional">;
4456
- }, "required", "type" | "mimeType" | "data">], "required", "type" | "text" | "mimeType" | "data">, "optional">;
4457
- isError: import("convex/values").VBoolean<boolean | undefined, "optional">;
4458
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4459
- }, "required", "type" | "providerOptions" | `providerOptions.${string}` | "toolCallId" | "toolName" | "args" | `args.${string}` | "result" | "experimental_content" | "isError" | `result.${string}`>, "required">;
4460
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4461
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">, import("convex/values").VObject<{
4462
- providerOptions?: Record<string, Record<string, any>> | undefined;
4463
- role: "system";
4464
- content: string;
4465
- }, {
4466
- role: import("convex/values").VLiteral<"system", "required">;
4467
- content: import("convex/values").VString<string, "required">;
4468
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4469
- }, "required", "providerOptions" | "role" | `providerOptions.${string}` | "content">], "optional", "providerOptions" | "role" | `providerOptions.${string}` | "content">;
4470
- tool: import("convex/values").VBoolean<boolean, "required">;
4471
- text: import("convex/values").VString<string | undefined, "optional">;
4472
- usage: import("convex/values").VObject<{
4473
- promptTokens: number;
4474
- completionTokens: number;
4475
- totalTokens: number;
4476
- } | undefined, {
4477
- promptTokens: import("convex/values").VFloat64<number, "required">;
4478
- completionTokens: import("convex/values").VFloat64<number, "required">;
4479
- totalTokens: import("convex/values").VFloat64<number, "required">;
4480
- }, "optional", "promptTokens" | "completionTokens" | "totalTokens">;
4481
- providerMetadata: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4482
- sources: import("convex/values").VArray<{
4483
- title?: string | undefined;
4484
- providerOptions?: Record<string, Record<string, any>> | undefined;
4485
- id: string;
4486
- sourceType: "url";
4487
- url: string;
4488
- }[] | undefined, import("convex/values").VObject<{
4489
- title?: string | undefined;
4490
- providerOptions?: Record<string, Record<string, any>> | undefined;
4491
- id: string;
4492
- sourceType: "url";
4493
- url: string;
4494
- }, {
4495
- sourceType: import("convex/values").VLiteral<"url", "required">;
4496
- id: import("convex/values").VString<string, "required">;
4497
- url: import("convex/values").VString<string, "required">;
4498
- title: import("convex/values").VString<string | undefined, "optional">;
4499
- providerOptions: import("convex/values").VRecord<Record<string, Record<string, any>> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VRecord<Record<string, any>, import("convex/values").VString<string, "required">, import("convex/values").VAny<any, "required", string>, "required", string>, "optional", string>;
4500
- }, "required", "id" | "title" | "providerOptions" | `providerOptions.${string}` | "sourceType" | "url">, "optional">;
4501
- reasoning: import("convex/values").VString<string | undefined, "optional">;
4502
- reasoningDetails: import("convex/values").VArray<({
4503
- signature?: string | undefined;
4504
- type: "text";
4505
- text: string;
4506
- } | {
4507
- type: "redacted";
4508
- data: string;
4509
- })[] | undefined, import("convex/values").VUnion<{
4510
- signature?: string | undefined;
4511
- type: "text";
4512
- text: string;
4513
- } | {
4514
- type: "redacted";
4515
- data: string;
4516
- }, [import("convex/values").VObject<{
4517
- signature?: string | undefined;
4518
- type: "text";
4519
- text: string;
4520
- }, {
4521
- type: import("convex/values").VLiteral<"text", "required">;
4522
- text: import("convex/values").VString<string, "required">;
4523
- signature: import("convex/values").VString<string | undefined, "optional">;
4524
- }, "required", "type" | "text" | "signature">, import("convex/values").VObject<{
4525
- type: "redacted";
4526
- data: string;
4527
- }, {
4528
- type: import("convex/values").VLiteral<"redacted", "required">;
4529
- data: import("convex/values").VString<string, "required">;
4530
- }, "required", "type" | "data">], "required", "type" | "text" | "data" | "signature">, "optional">;
4531
- warnings: import("convex/values").VArray<({
4532
- details?: string | undefined;
4533
- type: "unsupported-setting";
4534
- setting: string;
4535
- } | {
4536
- details?: string | undefined;
4537
- type: "unsupported-tool";
4538
- tool: any;
4539
- } | {
4540
- type: "other";
4541
- message: string;
4542
- })[] | undefined, import("convex/values").VUnion<{
4543
- details?: string | undefined;
4544
- type: "unsupported-setting";
4545
- setting: string;
4546
- } | {
4547
- details?: string | undefined;
4548
- type: "unsupported-tool";
4549
- tool: any;
4550
- } | {
4551
- type: "other";
4552
- message: string;
4553
- }, [import("convex/values").VObject<{
4554
- details?: string | undefined;
4555
- type: "unsupported-setting";
4556
- setting: string;
4557
- }, {
4558
- type: import("convex/values").VLiteral<"unsupported-setting", "required">;
4559
- setting: import("convex/values").VString<string, "required">;
4560
- details: import("convex/values").VString<string | undefined, "optional">;
4561
- }, "required", "type" | "setting" | "details">, import("convex/values").VObject<{
4562
- details?: string | undefined;
4563
- type: "unsupported-tool";
4564
- tool: any;
4565
- }, {
4566
- type: import("convex/values").VLiteral<"unsupported-tool", "required">;
4567
- tool: import("convex/values").VAny<any, "required", string>;
4568
- details: import("convex/values").VString<string | undefined, "optional">;
4569
- }, "required", "type" | "tool" | "details" | `tool.${string}`>, import("convex/values").VObject<{
4570
- type: "other";
4571
- message: string;
4572
- }, {
4573
- type: import("convex/values").VLiteral<"other", "required">;
4574
- message: import("convex/values").VString<string, "required">;
4575
- }, "required", "type" | "message">], "required", "type" | "message" | "tool" | "setting" | "details" | `tool.${string}`>, "optional">;
4576
- finishReason: import("convex/values").VUnion<"length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined, [import("convex/values").VLiteral<"stop", "required">, import("convex/values").VLiteral<"length", "required">, import("convex/values").VLiteral<"content-filter", "required">, import("convex/values").VLiteral<"tool-calls", "required">, import("convex/values").VLiteral<"error", "required">, import("convex/values").VLiteral<"other", "required">, import("convex/values").VLiteral<"unknown", "required">], "optional", never>;
4577
- _id: import("convex/values").VString<string, "required">;
4578
- _creationTime: import("convex/values").VFloat64<number, "required">;
4579
- }, "required", "_id" | "_creationTime" | "id" | "status" | "userId" | "order" | "threadId" | "stepOrder" | "embeddingId" | "fileIds" | "error" | "agentName" | "model" | "provider" | "providerOptions" | "message" | "text" | `providerOptions.${string}` | "reasoning" | "tool" | "usage" | "providerMetadata" | "sources" | "reasoningDetails" | "warnings" | "finishReason" | "message.providerOptions" | "message.role" | `message.providerOptions.${string}` | "message.content" | "usage.promptTokens" | "usage.completionTokens" | "usage.totalTokens" | `providerMetadata.${string}`>;
4580
- export type MessageDoc = Infer<typeof vMessageDoc>;
4581
- export default schema;
4582
- //# sourceMappingURL=schema.d.ts.map