@convex-dev/agent 0.1.10 → 0.1.11

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 (132) hide show
  1. package/dist/esm/client/index.d.ts.map +1 -1
  2. package/dist/esm/client/index.js +25 -24
  3. package/dist/esm/client/index.js.map +1 -1
  4. package/dist/esm/mapping.d.ts +1 -0
  5. package/dist/esm/mapping.d.ts.map +1 -1
  6. package/dist/esm/mapping.js +2 -2
  7. package/dist/esm/mapping.js.map +1 -1
  8. package/dist/esm.tsbuildinfo +1 -1
  9. package/package.json +23 -53
  10. package/src/client/index.ts +27 -27
  11. package/src/mapping.ts +9 -2
  12. package/dist/commonjs/client/_generated/_ignore.d.ts +0 -1
  13. package/dist/commonjs/client/_generated/_ignore.d.ts.map +0 -1
  14. package/dist/commonjs/client/_generated/_ignore.js +0 -3
  15. package/dist/commonjs/client/_generated/_ignore.js.map +0 -1
  16. package/dist/commonjs/client/createTool.d.ts +0 -47
  17. package/dist/commonjs/client/createTool.d.ts.map +0 -1
  18. package/dist/commonjs/client/createTool.js +0 -49
  19. package/dist/commonjs/client/createTool.js.map +0 -1
  20. package/dist/commonjs/client/files.d.ts +0 -56
  21. package/dist/commonjs/client/files.d.ts.map +0 -1
  22. package/dist/commonjs/client/files.js +0 -129
  23. package/dist/commonjs/client/files.js.map +0 -1
  24. package/dist/commonjs/client/index.d.ts +0 -1355
  25. package/dist/commonjs/client/index.d.ts.map +0 -1
  26. package/dist/commonjs/client/index.js +0 -1169
  27. package/dist/commonjs/client/index.js.map +0 -1
  28. package/dist/commonjs/client/streaming.d.ts +0 -57
  29. package/dist/commonjs/client/streaming.d.ts.map +0 -1
  30. package/dist/commonjs/client/streaming.js +0 -148
  31. package/dist/commonjs/client/streaming.js.map +0 -1
  32. package/dist/commonjs/client/types.d.ts +0 -352
  33. package/dist/commonjs/client/types.d.ts.map +0 -1
  34. package/dist/commonjs/client/types.js +0 -3
  35. package/dist/commonjs/client/types.js.map +0 -1
  36. package/dist/commonjs/component/_generated/api.d.ts +0 -1938
  37. package/dist/commonjs/component/_generated/api.d.ts.map +0 -1
  38. package/dist/commonjs/component/_generated/api.js +0 -25
  39. package/dist/commonjs/component/_generated/api.js.map +0 -1
  40. package/dist/commonjs/component/_generated/dataModel.d.ts +0 -60
  41. package/dist/commonjs/component/_generated/server.d.ts +0 -149
  42. package/dist/commonjs/component/_generated/server.d.ts.map +0 -1
  43. package/dist/commonjs/component/_generated/server.js +0 -77
  44. package/dist/commonjs/component/_generated/server.js.map +0 -1
  45. package/dist/commonjs/component/apiKeys.d.ts +0 -11
  46. package/dist/commonjs/component/apiKeys.d.ts.map +0 -1
  47. package/dist/commonjs/component/apiKeys.js +0 -72
  48. package/dist/commonjs/component/apiKeys.js.map +0 -1
  49. package/dist/commonjs/component/convex.config.d.ts +0 -3
  50. package/dist/commonjs/component/convex.config.d.ts.map +0 -1
  51. package/dist/commonjs/component/convex.config.js +0 -5
  52. package/dist/commonjs/component/convex.config.js.map +0 -1
  53. package/dist/commonjs/component/files.d.ts +0 -90
  54. package/dist/commonjs/component/files.d.ts.map +0 -1
  55. package/dist/commonjs/component/files.js +0 -157
  56. package/dist/commonjs/component/files.js.map +0 -1
  57. package/dist/commonjs/component/messages.d.ts +0 -1479
  58. package/dist/commonjs/component/messages.d.ts.map +0 -1
  59. package/dist/commonjs/component/messages.js +0 -483
  60. package/dist/commonjs/component/messages.js.map +0 -1
  61. package/dist/commonjs/component/schema.d.ts +0 -4582
  62. package/dist/commonjs/component/schema.d.ts.map +0 -1
  63. package/dist/commonjs/component/schema.js +0 -167
  64. package/dist/commonjs/component/schema.js.map +0 -1
  65. package/dist/commonjs/component/streams.d.ts +0 -242
  66. package/dist/commonjs/component/streams.d.ts.map +0 -1
  67. package/dist/commonjs/component/streams.js +0 -323
  68. package/dist/commonjs/component/streams.js.map +0 -1
  69. package/dist/commonjs/component/threads.d.ts +0 -101
  70. package/dist/commonjs/component/threads.d.ts.map +0 -1
  71. package/dist/commonjs/component/threads.js +0 -188
  72. package/dist/commonjs/component/threads.js.map +0 -1
  73. package/dist/commonjs/component/users.d.ts +0 -52
  74. package/dist/commonjs/component/users.d.ts.map +0 -1
  75. package/dist/commonjs/component/users.js +0 -233
  76. package/dist/commonjs/component/users.js.map +0 -1
  77. package/dist/commonjs/component/vector/index.d.ts +0 -61
  78. package/dist/commonjs/component/vector/index.d.ts.map +0 -1
  79. package/dist/commonjs/component/vector/index.js +0 -153
  80. package/dist/commonjs/component/vector/index.js.map +0 -1
  81. package/dist/commonjs/component/vector/tables.d.ts +0 -58
  82. package/dist/commonjs/component/vector/tables.d.ts.map +0 -1
  83. package/dist/commonjs/component/vector/tables.js +0 -62
  84. package/dist/commonjs/component/vector/tables.js.map +0 -1
  85. package/dist/commonjs/mapping.d.ts +0 -50
  86. package/dist/commonjs/mapping.d.ts.map +0 -1
  87. package/dist/commonjs/mapping.js +0 -272
  88. package/dist/commonjs/mapping.js.map +0 -1
  89. package/dist/commonjs/package.json +0 -3
  90. package/dist/commonjs/react/deltas.d.ts +0 -29
  91. package/dist/commonjs/react/deltas.d.ts.map +0 -1
  92. package/dist/commonjs/react/deltas.js +0 -274
  93. package/dist/commonjs/react/deltas.js.map +0 -1
  94. package/dist/commonjs/react/index.d.ts +0 -95
  95. package/dist/commonjs/react/index.d.ts.map +0 -1
  96. package/dist/commonjs/react/index.js +0 -219
  97. package/dist/commonjs/react/index.js.map +0 -1
  98. package/dist/commonjs/react/optimisticallySendMessage.d.ts +0 -8
  99. package/dist/commonjs/react/optimisticallySendMessage.d.ts.map +0 -1
  100. package/dist/commonjs/react/optimisticallySendMessage.js +0 -43
  101. package/dist/commonjs/react/optimisticallySendMessage.js.map +0 -1
  102. package/dist/commonjs/react/toUIMessages.d.ts +0 -13
  103. package/dist/commonjs/react/toUIMessages.d.ts.map +0 -1
  104. package/dist/commonjs/react/toUIMessages.js +0 -149
  105. package/dist/commonjs/react/toUIMessages.js.map +0 -1
  106. package/dist/commonjs/react/types.d.ts +0 -26
  107. package/dist/commonjs/react/types.d.ts.map +0 -1
  108. package/dist/commonjs/react/types.js +0 -3
  109. package/dist/commonjs/react/types.js.map +0 -1
  110. package/dist/commonjs/react/useSmoothText.d.ts +0 -20
  111. package/dist/commonjs/react/useSmoothText.d.ts.map +0 -1
  112. package/dist/commonjs/react/useSmoothText.js +0 -54
  113. package/dist/commonjs/react/useSmoothText.js.map +0 -1
  114. package/dist/commonjs/shared.d.ts +0 -10
  115. package/dist/commonjs/shared.d.ts.map +0 -1
  116. package/dist/commonjs/shared.js +0 -35
  117. package/dist/commonjs/shared.js.map +0 -1
  118. package/dist/commonjs/validators.d.ts +0 -5716
  119. package/dist/commonjs/validators.d.ts.map +0 -1
  120. package/dist/commonjs/validators.js +0 -319
  121. package/dist/commonjs/validators.js.map +0 -1
  122. package/dist/commonjs/vitest.config.d.ts +0 -3
  123. package/dist/commonjs/vitest.config.d.ts.map +0 -1
  124. package/dist/commonjs/vitest.config.js +0 -9
  125. package/dist/commonjs/vitest.config.js.map +0 -1
  126. package/dist/commonjs.tsbuildinfo +0 -1
  127. package/dist/esm/vitest.config.d.ts +0 -3
  128. package/dist/esm/vitest.config.d.ts.map +0 -1
  129. package/dist/esm/vitest.config.js +0 -7
  130. package/dist/esm/vitest.config.js.map +0 -1
  131. package/react/package.json +0 -5
  132. package/validators/package.json +0 -5
@@ -1,1479 +0,0 @@
1
- import type { Doc, Id } from "./_generated/dataModel.js";
2
- import { type MutationCtx, type QueryCtx } from "./_generated/server.js";
3
- /** @deprecated Use *.threads.listMessagesByThreadId instead. */
4
- export declare const listThreadsByUserId: import("convex/server").RegisteredQuery<"public", {
5
- userId?: string | undefined;
6
- order?: "asc" | "desc" | undefined;
7
- paginationOpts?: {
8
- id?: number | undefined;
9
- endCursor?: string | null | undefined;
10
- maximumRowsRead?: number | undefined;
11
- maximumBytesRead?: number | undefined;
12
- numItems: number;
13
- cursor: string | null;
14
- } | undefined;
15
- }, Promise<{
16
- page: {
17
- userId?: string | undefined;
18
- title?: string | undefined;
19
- summary?: string | undefined;
20
- _id: string;
21
- _creationTime: number;
22
- status: "active" | "archived";
23
- }[];
24
- isDone: boolean;
25
- continueCursor: import("convex/server").Cursor;
26
- splitCursor?: import("convex/server").Cursor | null;
27
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
28
- }>>;
29
- /** @deprecated Use *.threads.getThread */
30
- export declare const getThread: import("convex/server").RegisteredQuery<"public", {
31
- threadId: import("convex/values").GenericId<"threads">;
32
- }, Promise<{
33
- userId?: string | undefined;
34
- title?: string | undefined;
35
- summary?: string | undefined;
36
- _id: string;
37
- _creationTime: number;
38
- status: "active" | "archived";
39
- } | null>>;
40
- /** @deprecated Use *.threads.updateThread instead */
41
- export declare const updateThread: import("convex/server").RegisteredMutation<"public", {
42
- threadId: import("convex/values").GenericId<"threads">;
43
- patch: {
44
- status?: "active" | "archived" | undefined;
45
- title?: string | undefined;
46
- summary?: string | undefined;
47
- };
48
- }, Promise<{
49
- userId?: string | undefined;
50
- title?: string | undefined;
51
- summary?: string | undefined;
52
- _id: string;
53
- _creationTime: number;
54
- status: "active" | "archived";
55
- }>>;
56
- export declare function deleteMessage(ctx: MutationCtx, messageDoc: Doc<"messages">): Promise<void>;
57
- export declare const messageStatuses: ("pending" | "success" | "failed")[];
58
- export declare const addMessages: import("convex/server").RegisteredMutation<"public", {
59
- userId?: string | undefined;
60
- pending?: boolean | undefined;
61
- agentName?: string | undefined;
62
- promptMessageId?: import("convex/values").GenericId<"messages"> | undefined;
63
- failPendingSteps?: boolean | undefined;
64
- embeddings?: {
65
- model: string;
66
- dimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
67
- vectors: (number[] | null)[];
68
- } | undefined;
69
- threadId: import("convex/values").GenericId<"threads">;
70
- messages: {
71
- id?: string | undefined;
72
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
73
- error?: string | undefined;
74
- model?: string | undefined;
75
- provider?: string | undefined;
76
- text?: string | undefined;
77
- reasoning?: string | undefined;
78
- usage?: {
79
- promptTokens: number;
80
- completionTokens: number;
81
- totalTokens: number;
82
- } | undefined;
83
- providerMetadata?: Record<string, Record<string, any>> | undefined;
84
- sources?: {
85
- title?: string | undefined;
86
- providerOptions?: Record<string, Record<string, any>> | undefined;
87
- id: string;
88
- sourceType: "url";
89
- url: string;
90
- }[] | undefined;
91
- reasoningDetails?: ({
92
- signature?: string | undefined;
93
- type: "text";
94
- text: string;
95
- } | {
96
- type: "redacted";
97
- data: string;
98
- })[] | undefined;
99
- warnings?: ({
100
- details?: string | undefined;
101
- type: "unsupported-setting";
102
- setting: string;
103
- } | {
104
- details?: string | undefined;
105
- type: "unsupported-tool";
106
- tool: any;
107
- } | {
108
- type: "other";
109
- message: string;
110
- })[] | undefined;
111
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
112
- message: {
113
- providerOptions?: Record<string, Record<string, any>> | undefined;
114
- role: "user";
115
- content: string | ({
116
- providerOptions?: Record<string, Record<string, any>> | undefined;
117
- type: "text";
118
- text: string;
119
- } | {
120
- providerOptions?: Record<string, Record<string, any>> | undefined;
121
- mimeType?: string | undefined;
122
- type: "image";
123
- image: string | ArrayBuffer;
124
- } | {
125
- providerOptions?: Record<string, Record<string, any>> | undefined;
126
- filename?: string | undefined;
127
- type: "file";
128
- mimeType: string;
129
- data: string | ArrayBuffer;
130
- })[];
131
- } | {
132
- providerOptions?: Record<string, Record<string, any>> | undefined;
133
- role: "assistant";
134
- content: string | ({
135
- providerOptions?: Record<string, Record<string, any>> | undefined;
136
- type: "text";
137
- text: string;
138
- } | {
139
- providerOptions?: Record<string, Record<string, any>> | undefined;
140
- filename?: string | undefined;
141
- type: "file";
142
- mimeType: string;
143
- data: string | ArrayBuffer;
144
- } | {
145
- providerOptions?: Record<string, Record<string, any>> | undefined;
146
- signature?: string | undefined;
147
- type: "reasoning";
148
- text: string;
149
- } | {
150
- providerOptions?: Record<string, Record<string, any>> | undefined;
151
- type: "redacted-reasoning";
152
- data: string;
153
- } | {
154
- providerOptions?: Record<string, Record<string, any>> | undefined;
155
- type: "tool-call";
156
- toolCallId: string;
157
- toolName: string;
158
- args: any;
159
- })[];
160
- } | {
161
- providerOptions?: Record<string, Record<string, any>> | undefined;
162
- role: "tool";
163
- content: {
164
- providerOptions?: Record<string, Record<string, any>> | undefined;
165
- args?: any;
166
- experimental_content?: ({
167
- type: "text";
168
- text: string;
169
- } | {
170
- mimeType?: string | undefined;
171
- type: "image";
172
- data: string;
173
- })[] | undefined;
174
- isError?: boolean | undefined;
175
- type: "tool-result";
176
- toolCallId: string;
177
- toolName: string;
178
- result: any;
179
- }[];
180
- } | {
181
- providerOptions?: Record<string, Record<string, any>> | undefined;
182
- role: "system";
183
- content: string;
184
- };
185
- }[];
186
- }, Promise<{
187
- messages: {
188
- id?: string | undefined;
189
- userId?: string | undefined;
190
- embeddingId?: string | undefined;
191
- fileIds?: string[] | undefined;
192
- error?: string | undefined;
193
- agentName?: string | undefined;
194
- model?: string | undefined;
195
- provider?: string | undefined;
196
- providerOptions?: Record<string, Record<string, any>> | undefined;
197
- message?: {
198
- providerOptions?: Record<string, Record<string, any>> | undefined;
199
- role: "user";
200
- content: string | ({
201
- providerOptions?: Record<string, Record<string, any>> | undefined;
202
- type: "text";
203
- text: string;
204
- } | {
205
- providerOptions?: Record<string, Record<string, any>> | undefined;
206
- mimeType?: string | undefined;
207
- type: "image";
208
- image: string | ArrayBuffer;
209
- } | {
210
- providerOptions?: Record<string, Record<string, any>> | undefined;
211
- filename?: string | undefined;
212
- type: "file";
213
- mimeType: string;
214
- data: string | ArrayBuffer;
215
- })[];
216
- } | {
217
- providerOptions?: Record<string, Record<string, any>> | undefined;
218
- role: "assistant";
219
- content: string | ({
220
- providerOptions?: Record<string, Record<string, any>> | undefined;
221
- type: "text";
222
- text: string;
223
- } | {
224
- providerOptions?: Record<string, Record<string, any>> | undefined;
225
- filename?: string | undefined;
226
- type: "file";
227
- mimeType: string;
228
- data: string | ArrayBuffer;
229
- } | {
230
- providerOptions?: Record<string, Record<string, any>> | undefined;
231
- signature?: string | undefined;
232
- type: "reasoning";
233
- text: string;
234
- } | {
235
- providerOptions?: Record<string, Record<string, any>> | undefined;
236
- type: "redacted-reasoning";
237
- data: string;
238
- } | {
239
- providerOptions?: Record<string, Record<string, any>> | undefined;
240
- type: "tool-call";
241
- toolCallId: string;
242
- toolName: string;
243
- args: any;
244
- })[];
245
- } | {
246
- providerOptions?: Record<string, Record<string, any>> | undefined;
247
- role: "tool";
248
- content: {
249
- providerOptions?: Record<string, Record<string, any>> | undefined;
250
- args?: any;
251
- experimental_content?: ({
252
- type: "text";
253
- text: string;
254
- } | {
255
- mimeType?: string | undefined;
256
- type: "image";
257
- data: string;
258
- })[] | undefined;
259
- isError?: boolean | undefined;
260
- type: "tool-result";
261
- toolCallId: string;
262
- toolName: string;
263
- result: any;
264
- }[];
265
- } | {
266
- providerOptions?: Record<string, Record<string, any>> | undefined;
267
- role: "system";
268
- content: string;
269
- } | undefined;
270
- text?: string | undefined;
271
- reasoning?: string | undefined;
272
- usage?: {
273
- promptTokens: number;
274
- completionTokens: number;
275
- totalTokens: number;
276
- } | undefined;
277
- providerMetadata?: Record<string, Record<string, any>> | undefined;
278
- sources?: {
279
- title?: string | undefined;
280
- providerOptions?: Record<string, Record<string, any>> | undefined;
281
- id: string;
282
- sourceType: "url";
283
- url: string;
284
- }[] | undefined;
285
- reasoningDetails?: ({
286
- signature?: string | undefined;
287
- type: "text";
288
- text: string;
289
- } | {
290
- type: "redacted";
291
- data: string;
292
- })[] | undefined;
293
- warnings?: ({
294
- details?: string | undefined;
295
- type: "unsupported-setting";
296
- setting: string;
297
- } | {
298
- details?: string | undefined;
299
- type: "unsupported-tool";
300
- tool: any;
301
- } | {
302
- type: "other";
303
- message: string;
304
- })[] | undefined;
305
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
306
- _id: string;
307
- _creationTime: number;
308
- status: "pending" | "success" | "failed";
309
- order: number;
310
- threadId: string;
311
- stepOrder: number;
312
- tool: boolean;
313
- }[];
314
- }>>;
315
- export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, order?: number): Promise<{
316
- _id: import("convex/values").GenericId<"messages">;
317
- _creationTime: number;
318
- id?: string | undefined;
319
- userId?: string | undefined;
320
- 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;
321
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
322
- files?: any[] | undefined;
323
- error?: string | undefined;
324
- agentName?: string | undefined;
325
- model?: string | undefined;
326
- provider?: string | undefined;
327
- providerOptions?: Record<string, Record<string, any>> | undefined;
328
- message?: {
329
- providerOptions?: Record<string, Record<string, any>> | undefined;
330
- role: "user";
331
- content: string | ({
332
- providerOptions?: Record<string, Record<string, any>> | undefined;
333
- type: "text";
334
- text: string;
335
- } | {
336
- providerOptions?: Record<string, Record<string, any>> | undefined;
337
- mimeType?: string | undefined;
338
- type: "image";
339
- image: string | ArrayBuffer;
340
- } | {
341
- providerOptions?: Record<string, Record<string, any>> | undefined;
342
- filename?: string | undefined;
343
- type: "file";
344
- mimeType: string;
345
- data: string | ArrayBuffer;
346
- })[];
347
- } | {
348
- providerOptions?: Record<string, Record<string, any>> | undefined;
349
- role: "assistant";
350
- content: string | ({
351
- providerOptions?: Record<string, Record<string, any>> | undefined;
352
- type: "text";
353
- text: string;
354
- } | {
355
- providerOptions?: Record<string, Record<string, any>> | undefined;
356
- filename?: string | undefined;
357
- type: "file";
358
- mimeType: string;
359
- data: string | ArrayBuffer;
360
- } | {
361
- providerOptions?: Record<string, Record<string, any>> | undefined;
362
- signature?: string | undefined;
363
- type: "reasoning";
364
- text: string;
365
- } | {
366
- providerOptions?: Record<string, Record<string, any>> | undefined;
367
- type: "redacted-reasoning";
368
- data: string;
369
- } | {
370
- providerOptions?: Record<string, Record<string, any>> | undefined;
371
- type: "tool-call";
372
- toolCallId: string;
373
- toolName: string;
374
- args: any;
375
- })[];
376
- } | {
377
- providerOptions?: Record<string, Record<string, any>> | undefined;
378
- role: "tool";
379
- content: {
380
- providerOptions?: Record<string, Record<string, any>> | undefined;
381
- args?: any;
382
- experimental_content?: ({
383
- type: "text";
384
- text: string;
385
- } | {
386
- mimeType?: string | undefined;
387
- type: "image";
388
- data: string;
389
- })[] | undefined;
390
- isError?: boolean | undefined;
391
- type: "tool-result";
392
- toolCallId: string;
393
- toolName: string;
394
- result: any;
395
- }[];
396
- } | {
397
- providerOptions?: Record<string, Record<string, any>> | undefined;
398
- role: "system";
399
- content: string;
400
- } | undefined;
401
- text?: string | undefined;
402
- reasoning?: string | undefined;
403
- usage?: {
404
- promptTokens: number;
405
- completionTokens: number;
406
- totalTokens: number;
407
- } | undefined;
408
- providerMetadata?: Record<string, Record<string, any>> | undefined;
409
- sources?: {
410
- title?: string | undefined;
411
- providerOptions?: Record<string, Record<string, any>> | undefined;
412
- id: string;
413
- sourceType: "url";
414
- url: string;
415
- }[] | undefined;
416
- reasoningDetails?: ({
417
- signature?: string | undefined;
418
- type: "text";
419
- text: string;
420
- } | {
421
- type: "redacted";
422
- data: string;
423
- })[] | undefined;
424
- warnings?: ({
425
- details?: string | undefined;
426
- type: "unsupported-setting";
427
- setting: string;
428
- } | {
429
- details?: string | undefined;
430
- type: "unsupported-tool";
431
- tool: any;
432
- } | {
433
- type: "other";
434
- message: string;
435
- })[] | undefined;
436
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
437
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
438
- stepId?: string | undefined;
439
- status: "pending" | "success" | "failed";
440
- order: number;
441
- threadId: import("convex/values").GenericId<"threads">;
442
- stepOrder: number;
443
- tool: boolean;
444
- }>;
445
- export declare const rollbackMessage: import("convex/server").RegisteredMutation<"public", {
446
- error?: string | undefined;
447
- messageId: import("convex/values").GenericId<"messages">;
448
- }, Promise<void>>;
449
- export declare const commitMessage: import("convex/server").RegisteredMutation<"public", {
450
- messageId: Id<"messages">;
451
- }, Promise<void>>;
452
- export declare const updateMessage: import("convex/server").RegisteredMutation<"public", {
453
- patch: {
454
- status?: "pending" | "success" | "failed" | undefined;
455
- error?: string | undefined;
456
- message?: {
457
- providerOptions?: Record<string, Record<string, any>> | undefined;
458
- role: "user";
459
- content: string | ({
460
- providerOptions?: Record<string, Record<string, any>> | undefined;
461
- type: "text";
462
- text: string;
463
- } | {
464
- providerOptions?: Record<string, Record<string, any>> | undefined;
465
- mimeType?: string | undefined;
466
- type: "image";
467
- image: string | ArrayBuffer;
468
- } | {
469
- providerOptions?: Record<string, Record<string, any>> | undefined;
470
- filename?: string | undefined;
471
- type: "file";
472
- mimeType: string;
473
- data: string | ArrayBuffer;
474
- })[];
475
- } | {
476
- providerOptions?: Record<string, Record<string, any>> | undefined;
477
- role: "assistant";
478
- content: string | ({
479
- providerOptions?: Record<string, Record<string, any>> | undefined;
480
- type: "text";
481
- text: string;
482
- } | {
483
- providerOptions?: Record<string, Record<string, any>> | undefined;
484
- filename?: string | undefined;
485
- type: "file";
486
- mimeType: string;
487
- data: string | ArrayBuffer;
488
- } | {
489
- providerOptions?: Record<string, Record<string, any>> | undefined;
490
- signature?: string | undefined;
491
- type: "reasoning";
492
- text: string;
493
- } | {
494
- providerOptions?: Record<string, Record<string, any>> | undefined;
495
- type: "redacted-reasoning";
496
- data: string;
497
- } | {
498
- providerOptions?: Record<string, Record<string, any>> | undefined;
499
- type: "tool-call";
500
- toolCallId: string;
501
- toolName: string;
502
- args: any;
503
- })[];
504
- } | {
505
- providerOptions?: Record<string, Record<string, any>> | undefined;
506
- role: "tool";
507
- content: {
508
- providerOptions?: Record<string, Record<string, any>> | undefined;
509
- args?: any;
510
- experimental_content?: ({
511
- type: "text";
512
- text: string;
513
- } | {
514
- mimeType?: string | undefined;
515
- type: "image";
516
- data: string;
517
- })[] | undefined;
518
- isError?: boolean | undefined;
519
- type: "tool-result";
520
- toolCallId: string;
521
- toolName: string;
522
- result: any;
523
- }[];
524
- } | {
525
- providerOptions?: Record<string, Record<string, any>> | undefined;
526
- role: "system";
527
- content: string;
528
- } | undefined;
529
- };
530
- messageId: import("convex/values").GenericId<"messages">;
531
- }, Promise<{
532
- id?: string | undefined;
533
- userId?: string | undefined;
534
- embeddingId?: string | undefined;
535
- fileIds?: string[] | undefined;
536
- error?: string | undefined;
537
- agentName?: string | undefined;
538
- model?: string | undefined;
539
- provider?: string | undefined;
540
- providerOptions?: Record<string, Record<string, any>> | undefined;
541
- message?: {
542
- providerOptions?: Record<string, Record<string, any>> | undefined;
543
- role: "user";
544
- content: string | ({
545
- providerOptions?: Record<string, Record<string, any>> | undefined;
546
- type: "text";
547
- text: string;
548
- } | {
549
- providerOptions?: Record<string, Record<string, any>> | undefined;
550
- mimeType?: string | undefined;
551
- type: "image";
552
- image: string | ArrayBuffer;
553
- } | {
554
- providerOptions?: Record<string, Record<string, any>> | undefined;
555
- filename?: string | undefined;
556
- type: "file";
557
- mimeType: string;
558
- data: string | ArrayBuffer;
559
- })[];
560
- } | {
561
- providerOptions?: Record<string, Record<string, any>> | undefined;
562
- role: "assistant";
563
- content: string | ({
564
- providerOptions?: Record<string, Record<string, any>> | undefined;
565
- type: "text";
566
- text: string;
567
- } | {
568
- providerOptions?: Record<string, Record<string, any>> | undefined;
569
- filename?: string | undefined;
570
- type: "file";
571
- mimeType: string;
572
- data: string | ArrayBuffer;
573
- } | {
574
- providerOptions?: Record<string, Record<string, any>> | undefined;
575
- signature?: string | undefined;
576
- type: "reasoning";
577
- text: string;
578
- } | {
579
- providerOptions?: Record<string, Record<string, any>> | undefined;
580
- type: "redacted-reasoning";
581
- data: string;
582
- } | {
583
- providerOptions?: Record<string, Record<string, any>> | undefined;
584
- type: "tool-call";
585
- toolCallId: string;
586
- toolName: string;
587
- args: any;
588
- })[];
589
- } | {
590
- providerOptions?: Record<string, Record<string, any>> | undefined;
591
- role: "tool";
592
- content: {
593
- providerOptions?: Record<string, Record<string, any>> | undefined;
594
- args?: any;
595
- experimental_content?: ({
596
- type: "text";
597
- text: string;
598
- } | {
599
- mimeType?: string | undefined;
600
- type: "image";
601
- data: string;
602
- })[] | undefined;
603
- isError?: boolean | undefined;
604
- type: "tool-result";
605
- toolCallId: string;
606
- toolName: string;
607
- result: any;
608
- }[];
609
- } | {
610
- providerOptions?: Record<string, Record<string, any>> | undefined;
611
- role: "system";
612
- content: string;
613
- } | undefined;
614
- text?: string | undefined;
615
- reasoning?: string | undefined;
616
- usage?: {
617
- promptTokens: number;
618
- completionTokens: number;
619
- totalTokens: number;
620
- } | undefined;
621
- providerMetadata?: Record<string, Record<string, any>> | undefined;
622
- sources?: {
623
- title?: string | undefined;
624
- providerOptions?: Record<string, Record<string, any>> | undefined;
625
- id: string;
626
- sourceType: "url";
627
- url: string;
628
- }[] | undefined;
629
- reasoningDetails?: ({
630
- signature?: string | undefined;
631
- type: "text";
632
- text: string;
633
- } | {
634
- type: "redacted";
635
- data: string;
636
- })[] | undefined;
637
- warnings?: ({
638
- details?: string | undefined;
639
- type: "unsupported-setting";
640
- setting: string;
641
- } | {
642
- details?: string | undefined;
643
- type: "unsupported-tool";
644
- tool: any;
645
- } | {
646
- type: "other";
647
- message: string;
648
- })[] | undefined;
649
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
650
- _id: string;
651
- _creationTime: number;
652
- status: "pending" | "success" | "failed";
653
- order: number;
654
- threadId: string;
655
- stepOrder: number;
656
- tool: boolean;
657
- }>>;
658
- export declare const listMessagesByThreadId: import("convex/server").RegisteredQuery<"public", {
659
- excludeToolMessages?: boolean | undefined;
660
- paginationOpts?: {
661
- id?: number | undefined;
662
- endCursor?: string | null | undefined;
663
- maximumRowsRead?: number | undefined;
664
- maximumBytesRead?: number | undefined;
665
- numItems: number;
666
- cursor: string | null;
667
- } | undefined;
668
- isTool?: "use excludeToolMessages instead of this" | undefined;
669
- statuses?: ("pending" | "success" | "failed")[] | undefined;
670
- upToAndIncludingMessageId?: import("convex/values").GenericId<"messages"> | undefined;
671
- order: "asc" | "desc";
672
- threadId: import("convex/values").GenericId<"threads">;
673
- }, Promise<{
674
- page: {
675
- id?: string | undefined;
676
- userId?: string | undefined;
677
- embeddingId?: string | undefined;
678
- fileIds?: string[] | undefined;
679
- error?: string | undefined;
680
- agentName?: string | undefined;
681
- model?: string | undefined;
682
- provider?: string | undefined;
683
- providerOptions?: Record<string, Record<string, any>> | undefined;
684
- message?: {
685
- providerOptions?: Record<string, Record<string, any>> | undefined;
686
- role: "user";
687
- content: string | ({
688
- providerOptions?: Record<string, Record<string, any>> | undefined;
689
- type: "text";
690
- text: string;
691
- } | {
692
- providerOptions?: Record<string, Record<string, any>> | undefined;
693
- mimeType?: string | undefined;
694
- type: "image";
695
- image: string | ArrayBuffer;
696
- } | {
697
- providerOptions?: Record<string, Record<string, any>> | undefined;
698
- filename?: string | undefined;
699
- type: "file";
700
- mimeType: string;
701
- data: string | ArrayBuffer;
702
- })[];
703
- } | {
704
- providerOptions?: Record<string, Record<string, any>> | undefined;
705
- role: "assistant";
706
- content: string | ({
707
- providerOptions?: Record<string, Record<string, any>> | undefined;
708
- type: "text";
709
- text: string;
710
- } | {
711
- providerOptions?: Record<string, Record<string, any>> | undefined;
712
- filename?: string | undefined;
713
- type: "file";
714
- mimeType: string;
715
- data: string | ArrayBuffer;
716
- } | {
717
- providerOptions?: Record<string, Record<string, any>> | undefined;
718
- signature?: string | undefined;
719
- type: "reasoning";
720
- text: string;
721
- } | {
722
- providerOptions?: Record<string, Record<string, any>> | undefined;
723
- type: "redacted-reasoning";
724
- data: string;
725
- } | {
726
- providerOptions?: Record<string, Record<string, any>> | undefined;
727
- type: "tool-call";
728
- toolCallId: string;
729
- toolName: string;
730
- args: any;
731
- })[];
732
- } | {
733
- providerOptions?: Record<string, Record<string, any>> | undefined;
734
- role: "tool";
735
- content: {
736
- providerOptions?: Record<string, Record<string, any>> | undefined;
737
- args?: any;
738
- experimental_content?: ({
739
- type: "text";
740
- text: string;
741
- } | {
742
- mimeType?: string | undefined;
743
- type: "image";
744
- data: string;
745
- })[] | undefined;
746
- isError?: boolean | undefined;
747
- type: "tool-result";
748
- toolCallId: string;
749
- toolName: string;
750
- result: any;
751
- }[];
752
- } | {
753
- providerOptions?: Record<string, Record<string, any>> | undefined;
754
- role: "system";
755
- content: string;
756
- } | undefined;
757
- text?: string | undefined;
758
- reasoning?: string | undefined;
759
- usage?: {
760
- promptTokens: number;
761
- completionTokens: number;
762
- totalTokens: number;
763
- } | undefined;
764
- providerMetadata?: Record<string, Record<string, any>> | undefined;
765
- sources?: {
766
- title?: string | undefined;
767
- providerOptions?: Record<string, Record<string, any>> | undefined;
768
- id: string;
769
- sourceType: "url";
770
- url: string;
771
- }[] | undefined;
772
- reasoningDetails?: ({
773
- signature?: string | undefined;
774
- type: "text";
775
- text: string;
776
- } | {
777
- type: "redacted";
778
- data: string;
779
- })[] | undefined;
780
- warnings?: ({
781
- details?: string | undefined;
782
- type: "unsupported-setting";
783
- setting: string;
784
- } | {
785
- details?: string | undefined;
786
- type: "unsupported-tool";
787
- tool: any;
788
- } | {
789
- type: "other";
790
- message: string;
791
- })[] | undefined;
792
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
793
- _id: string;
794
- _creationTime: number;
795
- status: "pending" | "success" | "failed";
796
- order: number;
797
- threadId: string;
798
- stepOrder: number;
799
- tool: boolean;
800
- }[];
801
- isDone: boolean;
802
- continueCursor: import("convex/server").Cursor;
803
- splitCursor?: import("convex/server").Cursor | null;
804
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
805
- }>>;
806
- export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"public", {
807
- messageIds: import("convex/values").GenericId<"messages">[];
808
- }, Promise<({
809
- _id: import("convex/values").GenericId<"messages">;
810
- _creationTime: number;
811
- id?: string | undefined;
812
- userId?: string | undefined;
813
- 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;
814
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
815
- files?: any[] | undefined;
816
- error?: string | undefined;
817
- agentName?: string | undefined;
818
- model?: string | undefined;
819
- provider?: string | undefined;
820
- providerOptions?: Record<string, Record<string, any>> | undefined;
821
- message?: {
822
- providerOptions?: Record<string, Record<string, any>> | undefined;
823
- role: "user";
824
- content: string | ({
825
- providerOptions?: Record<string, Record<string, any>> | undefined;
826
- type: "text";
827
- text: string;
828
- } | {
829
- providerOptions?: Record<string, Record<string, any>> | undefined;
830
- mimeType?: string | undefined;
831
- type: "image";
832
- image: string | ArrayBuffer;
833
- } | {
834
- providerOptions?: Record<string, Record<string, any>> | undefined;
835
- filename?: string | undefined;
836
- type: "file";
837
- mimeType: string;
838
- data: string | ArrayBuffer;
839
- })[];
840
- } | {
841
- providerOptions?: Record<string, Record<string, any>> | undefined;
842
- role: "assistant";
843
- content: string | ({
844
- providerOptions?: Record<string, Record<string, any>> | undefined;
845
- type: "text";
846
- text: string;
847
- } | {
848
- providerOptions?: Record<string, Record<string, any>> | undefined;
849
- filename?: string | undefined;
850
- type: "file";
851
- mimeType: string;
852
- data: string | ArrayBuffer;
853
- } | {
854
- providerOptions?: Record<string, Record<string, any>> | undefined;
855
- signature?: string | undefined;
856
- type: "reasoning";
857
- text: string;
858
- } | {
859
- providerOptions?: Record<string, Record<string, any>> | undefined;
860
- type: "redacted-reasoning";
861
- data: string;
862
- } | {
863
- providerOptions?: Record<string, Record<string, any>> | undefined;
864
- type: "tool-call";
865
- toolCallId: string;
866
- toolName: string;
867
- args: any;
868
- })[];
869
- } | {
870
- providerOptions?: Record<string, Record<string, any>> | undefined;
871
- role: "tool";
872
- content: {
873
- providerOptions?: Record<string, Record<string, any>> | undefined;
874
- args?: any;
875
- experimental_content?: ({
876
- type: "text";
877
- text: string;
878
- } | {
879
- mimeType?: string | undefined;
880
- type: "image";
881
- data: string;
882
- })[] | undefined;
883
- isError?: boolean | undefined;
884
- type: "tool-result";
885
- toolCallId: string;
886
- toolName: string;
887
- result: any;
888
- }[];
889
- } | {
890
- providerOptions?: Record<string, Record<string, any>> | undefined;
891
- role: "system";
892
- content: string;
893
- } | undefined;
894
- text?: string | undefined;
895
- reasoning?: string | undefined;
896
- usage?: {
897
- promptTokens: number;
898
- completionTokens: number;
899
- totalTokens: number;
900
- } | undefined;
901
- providerMetadata?: Record<string, Record<string, any>> | undefined;
902
- sources?: {
903
- title?: string | undefined;
904
- providerOptions?: Record<string, Record<string, any>> | undefined;
905
- id: string;
906
- sourceType: "url";
907
- url: string;
908
- }[] | undefined;
909
- reasoningDetails?: ({
910
- signature?: string | undefined;
911
- type: "text";
912
- text: string;
913
- } | {
914
- type: "redacted";
915
- data: string;
916
- })[] | undefined;
917
- warnings?: ({
918
- details?: string | undefined;
919
- type: "unsupported-setting";
920
- setting: string;
921
- } | {
922
- details?: string | undefined;
923
- type: "unsupported-tool";
924
- tool: any;
925
- } | {
926
- type: "other";
927
- message: string;
928
- })[] | undefined;
929
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
930
- parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
931
- stepId?: string | undefined;
932
- status: "pending" | "success" | "failed";
933
- order: number;
934
- threadId: import("convex/values").GenericId<"threads">;
935
- stepOrder: number;
936
- tool: boolean;
937
- } | null)[]>>;
938
- /** @deprecated Use listMessagesByThreadId instead. */
939
- export declare const getThreadMessages: import("convex/server").RegisteredQuery<"public", {
940
- deprecated: "Use listMessagesByThreadId instead";
941
- }, Promise<never>>;
942
- export declare const searchMessages: import("convex/server").RegisteredAction<"public", {
943
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
944
- text?: string | undefined;
945
- vector?: number[] | undefined;
946
- vectorModel?: string | undefined;
947
- vectorScoreThreshold?: number | undefined;
948
- messageRange?: {
949
- before: number;
950
- after: number;
951
- } | undefined;
952
- beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
953
- searchAllMessagesForUserId?: string | undefined;
954
- limit: number;
955
- }, Promise<{
956
- id?: string | undefined;
957
- userId?: string | undefined;
958
- embeddingId?: string | undefined;
959
- fileIds?: string[] | undefined;
960
- error?: string | undefined;
961
- agentName?: string | undefined;
962
- model?: string | undefined;
963
- provider?: string | undefined;
964
- providerOptions?: Record<string, Record<string, any>> | undefined;
965
- message?: {
966
- providerOptions?: Record<string, Record<string, any>> | undefined;
967
- role: "user";
968
- content: string | ({
969
- providerOptions?: Record<string, Record<string, any>> | undefined;
970
- type: "text";
971
- text: string;
972
- } | {
973
- providerOptions?: Record<string, Record<string, any>> | undefined;
974
- mimeType?: string | undefined;
975
- type: "image";
976
- image: string | ArrayBuffer;
977
- } | {
978
- providerOptions?: Record<string, Record<string, any>> | undefined;
979
- filename?: string | undefined;
980
- type: "file";
981
- mimeType: string;
982
- data: string | ArrayBuffer;
983
- })[];
984
- } | {
985
- providerOptions?: Record<string, Record<string, any>> | undefined;
986
- role: "assistant";
987
- content: string | ({
988
- providerOptions?: Record<string, Record<string, any>> | undefined;
989
- type: "text";
990
- text: string;
991
- } | {
992
- providerOptions?: Record<string, Record<string, any>> | undefined;
993
- filename?: string | undefined;
994
- type: "file";
995
- mimeType: string;
996
- data: string | ArrayBuffer;
997
- } | {
998
- providerOptions?: Record<string, Record<string, any>> | undefined;
999
- signature?: string | undefined;
1000
- type: "reasoning";
1001
- text: string;
1002
- } | {
1003
- providerOptions?: Record<string, Record<string, any>> | undefined;
1004
- type: "redacted-reasoning";
1005
- data: string;
1006
- } | {
1007
- providerOptions?: Record<string, Record<string, any>> | undefined;
1008
- type: "tool-call";
1009
- toolCallId: string;
1010
- toolName: string;
1011
- args: any;
1012
- })[];
1013
- } | {
1014
- providerOptions?: Record<string, Record<string, any>> | undefined;
1015
- role: "tool";
1016
- content: {
1017
- providerOptions?: Record<string, Record<string, any>> | undefined;
1018
- args?: any;
1019
- experimental_content?: ({
1020
- type: "text";
1021
- text: string;
1022
- } | {
1023
- mimeType?: string | undefined;
1024
- type: "image";
1025
- data: string;
1026
- })[] | undefined;
1027
- isError?: boolean | undefined;
1028
- type: "tool-result";
1029
- toolCallId: string;
1030
- toolName: string;
1031
- result: any;
1032
- }[];
1033
- } | {
1034
- providerOptions?: Record<string, Record<string, any>> | undefined;
1035
- role: "system";
1036
- content: string;
1037
- } | undefined;
1038
- text?: string | undefined;
1039
- reasoning?: string | undefined;
1040
- usage?: {
1041
- promptTokens: number;
1042
- completionTokens: number;
1043
- totalTokens: number;
1044
- } | undefined;
1045
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1046
- sources?: {
1047
- title?: string | undefined;
1048
- providerOptions?: Record<string, Record<string, any>> | undefined;
1049
- id: string;
1050
- sourceType: "url";
1051
- url: string;
1052
- }[] | undefined;
1053
- reasoningDetails?: ({
1054
- signature?: string | undefined;
1055
- type: "text";
1056
- text: string;
1057
- } | {
1058
- type: "redacted";
1059
- data: string;
1060
- })[] | undefined;
1061
- warnings?: ({
1062
- details?: string | undefined;
1063
- type: "unsupported-setting";
1064
- setting: string;
1065
- } | {
1066
- details?: string | undefined;
1067
- type: "unsupported-tool";
1068
- tool: any;
1069
- } | {
1070
- type: "other";
1071
- message: string;
1072
- })[] | undefined;
1073
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1074
- _id: string;
1075
- _creationTime: number;
1076
- status: "pending" | "success" | "failed";
1077
- order: number;
1078
- threadId: string;
1079
- stepOrder: number;
1080
- tool: boolean;
1081
- }[]>>;
1082
- export declare const _fetchSearchMessages: import("convex/server").RegisteredQuery<"internal", {
1083
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
1084
- beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
1085
- searchAllMessagesForUserId?: string | undefined;
1086
- textSearchMessages?: {
1087
- id?: string | undefined;
1088
- userId?: string | undefined;
1089
- embeddingId?: string | undefined;
1090
- fileIds?: string[] | undefined;
1091
- error?: string | undefined;
1092
- agentName?: string | undefined;
1093
- model?: string | undefined;
1094
- provider?: string | undefined;
1095
- providerOptions?: Record<string, Record<string, any>> | undefined;
1096
- message?: {
1097
- providerOptions?: Record<string, Record<string, any>> | undefined;
1098
- role: "user";
1099
- content: string | ({
1100
- providerOptions?: Record<string, Record<string, any>> | undefined;
1101
- type: "text";
1102
- text: string;
1103
- } | {
1104
- providerOptions?: Record<string, Record<string, any>> | undefined;
1105
- mimeType?: string | undefined;
1106
- type: "image";
1107
- image: string | ArrayBuffer;
1108
- } | {
1109
- providerOptions?: Record<string, Record<string, any>> | undefined;
1110
- filename?: string | undefined;
1111
- type: "file";
1112
- mimeType: string;
1113
- data: string | ArrayBuffer;
1114
- })[];
1115
- } | {
1116
- providerOptions?: Record<string, Record<string, any>> | undefined;
1117
- role: "assistant";
1118
- content: string | ({
1119
- providerOptions?: Record<string, Record<string, any>> | undefined;
1120
- type: "text";
1121
- text: string;
1122
- } | {
1123
- providerOptions?: Record<string, Record<string, any>> | undefined;
1124
- filename?: string | undefined;
1125
- type: "file";
1126
- mimeType: string;
1127
- data: string | ArrayBuffer;
1128
- } | {
1129
- providerOptions?: Record<string, Record<string, any>> | undefined;
1130
- signature?: string | undefined;
1131
- type: "reasoning";
1132
- text: string;
1133
- } | {
1134
- providerOptions?: Record<string, Record<string, any>> | undefined;
1135
- type: "redacted-reasoning";
1136
- data: string;
1137
- } | {
1138
- providerOptions?: Record<string, Record<string, any>> | undefined;
1139
- type: "tool-call";
1140
- toolCallId: string;
1141
- toolName: string;
1142
- args: any;
1143
- })[];
1144
- } | {
1145
- providerOptions?: Record<string, Record<string, any>> | undefined;
1146
- role: "tool";
1147
- content: {
1148
- providerOptions?: Record<string, Record<string, any>> | undefined;
1149
- args?: any;
1150
- experimental_content?: ({
1151
- type: "text";
1152
- text: string;
1153
- } | {
1154
- mimeType?: string | undefined;
1155
- type: "image";
1156
- data: string;
1157
- })[] | undefined;
1158
- isError?: boolean | undefined;
1159
- type: "tool-result";
1160
- toolCallId: string;
1161
- toolName: string;
1162
- result: any;
1163
- }[];
1164
- } | {
1165
- providerOptions?: Record<string, Record<string, any>> | undefined;
1166
- role: "system";
1167
- content: string;
1168
- } | undefined;
1169
- text?: string | undefined;
1170
- reasoning?: string | undefined;
1171
- usage?: {
1172
- promptTokens: number;
1173
- completionTokens: number;
1174
- totalTokens: number;
1175
- } | undefined;
1176
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1177
- sources?: {
1178
- title?: string | undefined;
1179
- providerOptions?: Record<string, Record<string, any>> | undefined;
1180
- id: string;
1181
- sourceType: "url";
1182
- url: string;
1183
- }[] | undefined;
1184
- reasoningDetails?: ({
1185
- signature?: string | undefined;
1186
- type: "text";
1187
- text: string;
1188
- } | {
1189
- type: "redacted";
1190
- data: string;
1191
- })[] | undefined;
1192
- warnings?: ({
1193
- details?: string | undefined;
1194
- type: "unsupported-setting";
1195
- setting: string;
1196
- } | {
1197
- details?: string | undefined;
1198
- type: "unsupported-tool";
1199
- tool: any;
1200
- } | {
1201
- type: "other";
1202
- message: string;
1203
- })[] | undefined;
1204
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1205
- _id: string;
1206
- _creationTime: number;
1207
- status: "pending" | "success" | "failed";
1208
- order: number;
1209
- threadId: string;
1210
- stepOrder: number;
1211
- tool: boolean;
1212
- }[] | undefined;
1213
- limit: number;
1214
- messageRange: {
1215
- before: number;
1216
- after: number;
1217
- };
1218
- vectorIds: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096">[];
1219
- }, Promise<{
1220
- id?: string | undefined;
1221
- userId?: string | undefined;
1222
- embeddingId?: string | undefined;
1223
- fileIds?: string[] | undefined;
1224
- error?: string | undefined;
1225
- agentName?: string | undefined;
1226
- model?: string | undefined;
1227
- provider?: string | undefined;
1228
- providerOptions?: Record<string, Record<string, any>> | undefined;
1229
- message?: {
1230
- providerOptions?: Record<string, Record<string, any>> | undefined;
1231
- role: "user";
1232
- content: string | ({
1233
- providerOptions?: Record<string, Record<string, any>> | undefined;
1234
- type: "text";
1235
- text: string;
1236
- } | {
1237
- providerOptions?: Record<string, Record<string, any>> | undefined;
1238
- mimeType?: string | undefined;
1239
- type: "image";
1240
- image: string | ArrayBuffer;
1241
- } | {
1242
- providerOptions?: Record<string, Record<string, any>> | undefined;
1243
- filename?: string | undefined;
1244
- type: "file";
1245
- mimeType: string;
1246
- data: string | ArrayBuffer;
1247
- })[];
1248
- } | {
1249
- providerOptions?: Record<string, Record<string, any>> | undefined;
1250
- role: "assistant";
1251
- content: string | ({
1252
- providerOptions?: Record<string, Record<string, any>> | undefined;
1253
- type: "text";
1254
- text: string;
1255
- } | {
1256
- providerOptions?: Record<string, Record<string, any>> | undefined;
1257
- filename?: string | undefined;
1258
- type: "file";
1259
- mimeType: string;
1260
- data: string | ArrayBuffer;
1261
- } | {
1262
- providerOptions?: Record<string, Record<string, any>> | undefined;
1263
- signature?: string | undefined;
1264
- type: "reasoning";
1265
- text: string;
1266
- } | {
1267
- providerOptions?: Record<string, Record<string, any>> | undefined;
1268
- type: "redacted-reasoning";
1269
- data: string;
1270
- } | {
1271
- providerOptions?: Record<string, Record<string, any>> | undefined;
1272
- type: "tool-call";
1273
- toolCallId: string;
1274
- toolName: string;
1275
- args: any;
1276
- })[];
1277
- } | {
1278
- providerOptions?: Record<string, Record<string, any>> | undefined;
1279
- role: "tool";
1280
- content: {
1281
- providerOptions?: Record<string, Record<string, any>> | undefined;
1282
- args?: any;
1283
- experimental_content?: ({
1284
- type: "text";
1285
- text: string;
1286
- } | {
1287
- mimeType?: string | undefined;
1288
- type: "image";
1289
- data: string;
1290
- })[] | undefined;
1291
- isError?: boolean | undefined;
1292
- type: "tool-result";
1293
- toolCallId: string;
1294
- toolName: string;
1295
- result: any;
1296
- }[];
1297
- } | {
1298
- providerOptions?: Record<string, Record<string, any>> | undefined;
1299
- role: "system";
1300
- content: string;
1301
- } | undefined;
1302
- text?: string | undefined;
1303
- reasoning?: string | undefined;
1304
- usage?: {
1305
- promptTokens: number;
1306
- completionTokens: number;
1307
- totalTokens: number;
1308
- } | undefined;
1309
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1310
- sources?: {
1311
- title?: string | undefined;
1312
- providerOptions?: Record<string, Record<string, any>> | undefined;
1313
- id: string;
1314
- sourceType: "url";
1315
- url: string;
1316
- }[] | undefined;
1317
- reasoningDetails?: ({
1318
- signature?: string | undefined;
1319
- type: "text";
1320
- text: string;
1321
- } | {
1322
- type: "redacted";
1323
- data: string;
1324
- })[] | undefined;
1325
- warnings?: ({
1326
- details?: string | undefined;
1327
- type: "unsupported-setting";
1328
- setting: string;
1329
- } | {
1330
- details?: string | undefined;
1331
- type: "unsupported-tool";
1332
- tool: any;
1333
- } | {
1334
- type: "other";
1335
- message: string;
1336
- })[] | undefined;
1337
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1338
- _id: string;
1339
- _creationTime: number;
1340
- status: "pending" | "success" | "failed";
1341
- order: number;
1342
- threadId: string;
1343
- stepOrder: number;
1344
- tool: boolean;
1345
- }[]>>;
1346
- export declare const textSearch: import("convex/server").RegisteredQuery<"public", {
1347
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
1348
- beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
1349
- searchAllMessagesForUserId?: string | undefined;
1350
- text: string;
1351
- limit: number;
1352
- }, Promise<{
1353
- id?: string | undefined;
1354
- userId?: string | undefined;
1355
- embeddingId?: string | undefined;
1356
- fileIds?: string[] | undefined;
1357
- error?: string | undefined;
1358
- agentName?: string | undefined;
1359
- model?: string | undefined;
1360
- provider?: string | undefined;
1361
- providerOptions?: Record<string, Record<string, any>> | undefined;
1362
- message?: {
1363
- providerOptions?: Record<string, Record<string, any>> | undefined;
1364
- role: "user";
1365
- content: string | ({
1366
- providerOptions?: Record<string, Record<string, any>> | undefined;
1367
- type: "text";
1368
- text: string;
1369
- } | {
1370
- providerOptions?: Record<string, Record<string, any>> | undefined;
1371
- mimeType?: string | undefined;
1372
- type: "image";
1373
- image: string | ArrayBuffer;
1374
- } | {
1375
- providerOptions?: Record<string, Record<string, any>> | undefined;
1376
- filename?: string | undefined;
1377
- type: "file";
1378
- mimeType: string;
1379
- data: string | ArrayBuffer;
1380
- })[];
1381
- } | {
1382
- providerOptions?: Record<string, Record<string, any>> | undefined;
1383
- role: "assistant";
1384
- content: string | ({
1385
- providerOptions?: Record<string, Record<string, any>> | undefined;
1386
- type: "text";
1387
- text: string;
1388
- } | {
1389
- providerOptions?: Record<string, Record<string, any>> | undefined;
1390
- filename?: string | undefined;
1391
- type: "file";
1392
- mimeType: string;
1393
- data: string | ArrayBuffer;
1394
- } | {
1395
- providerOptions?: Record<string, Record<string, any>> | undefined;
1396
- signature?: string | undefined;
1397
- type: "reasoning";
1398
- text: string;
1399
- } | {
1400
- providerOptions?: Record<string, Record<string, any>> | undefined;
1401
- type: "redacted-reasoning";
1402
- data: string;
1403
- } | {
1404
- providerOptions?: Record<string, Record<string, any>> | undefined;
1405
- type: "tool-call";
1406
- toolCallId: string;
1407
- toolName: string;
1408
- args: any;
1409
- })[];
1410
- } | {
1411
- providerOptions?: Record<string, Record<string, any>> | undefined;
1412
- role: "tool";
1413
- content: {
1414
- providerOptions?: Record<string, Record<string, any>> | undefined;
1415
- args?: any;
1416
- experimental_content?: ({
1417
- type: "text";
1418
- text: string;
1419
- } | {
1420
- mimeType?: string | undefined;
1421
- type: "image";
1422
- data: string;
1423
- })[] | undefined;
1424
- isError?: boolean | undefined;
1425
- type: "tool-result";
1426
- toolCallId: string;
1427
- toolName: string;
1428
- result: any;
1429
- }[];
1430
- } | {
1431
- providerOptions?: Record<string, Record<string, any>> | undefined;
1432
- role: "system";
1433
- content: string;
1434
- } | undefined;
1435
- text?: string | undefined;
1436
- reasoning?: string | undefined;
1437
- usage?: {
1438
- promptTokens: number;
1439
- completionTokens: number;
1440
- totalTokens: number;
1441
- } | undefined;
1442
- providerMetadata?: Record<string, Record<string, any>> | undefined;
1443
- sources?: {
1444
- title?: string | undefined;
1445
- providerOptions?: Record<string, Record<string, any>> | undefined;
1446
- id: string;
1447
- sourceType: "url";
1448
- url: string;
1449
- }[] | undefined;
1450
- reasoningDetails?: ({
1451
- signature?: string | undefined;
1452
- type: "text";
1453
- text: string;
1454
- } | {
1455
- type: "redacted";
1456
- data: string;
1457
- })[] | undefined;
1458
- warnings?: ({
1459
- details?: string | undefined;
1460
- type: "unsupported-setting";
1461
- setting: string;
1462
- } | {
1463
- details?: string | undefined;
1464
- type: "unsupported-tool";
1465
- tool: any;
1466
- } | {
1467
- type: "other";
1468
- message: string;
1469
- })[] | undefined;
1470
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1471
- _id: string;
1472
- _creationTime: number;
1473
- status: "pending" | "success" | "failed";
1474
- order: number;
1475
- threadId: string;
1476
- stepOrder: number;
1477
- tool: boolean;
1478
- }[]>>;
1479
- //# sourceMappingURL=messages.d.ts.map