@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,1938 +0,0 @@
1
- /* eslint-disable */
2
- /**
3
- * Generated `api` utility.
4
- *
5
- * THIS CODE IS AUTOMATICALLY GENERATED.
6
- *
7
- * To regenerate, run `npx convex dev`.
8
- * @module
9
- */
10
-
11
- import type * as apiKeys from "../apiKeys.js";
12
- import type * as files from "../files.js";
13
- import type * as messages from "../messages.js";
14
- import type * as streams from "../streams.js";
15
- import type * as threads from "../threads.js";
16
- import type * as users from "../users.js";
17
- import type * as vector_index from "../vector/index.js";
18
- import type * as vector_tables from "../vector/tables.js";
19
-
20
- import type {
21
- ApiFromModules,
22
- FilterApi,
23
- FunctionReference,
24
- } from "convex/server";
25
-
26
- /**
27
- * A utility for referencing Convex functions in your app's API.
28
- *
29
- * Usage:
30
- * ```js
31
- * const myFunctionReference = api.myModule.myFunction;
32
- * ```
33
- */
34
- declare const fullApi: ApiFromModules<{
35
- apiKeys: typeof apiKeys;
36
- files: typeof files;
37
- messages: typeof messages;
38
- streams: typeof streams;
39
- threads: typeof threads;
40
- users: typeof users;
41
- "vector/index": typeof vector_index;
42
- "vector/tables": typeof vector_tables;
43
- }>;
44
- export type Mounts = {
45
- apiKeys: {
46
- destroy: FunctionReference<
47
- "mutation",
48
- "public",
49
- { apiKey?: string; name?: string },
50
- | "missing"
51
- | "deleted"
52
- | "name mismatch"
53
- | "must provide either apiKey or name"
54
- >;
55
- issue: FunctionReference<"mutation", "public", { name?: string }, string>;
56
- validate: FunctionReference<"query", "public", { apiKey: string }, boolean>;
57
- };
58
- files: {
59
- addFile: FunctionReference<
60
- "mutation",
61
- "public",
62
- { filename?: string; hash: string; mimeType: string; storageId: string },
63
- { fileId: string; storageId: string }
64
- >;
65
- copyFile: FunctionReference<"mutation", "public", { fileId: string }, null>;
66
- deleteFiles: FunctionReference<
67
- "mutation",
68
- "public",
69
- { fileIds: Array<string>; force?: boolean },
70
- Array<string>
71
- >;
72
- get: FunctionReference<
73
- "query",
74
- "public",
75
- { fileId: string },
76
- null | {
77
- _creationTime: number;
78
- _id: string;
79
- filename?: string;
80
- hash: string;
81
- lastTouchedAt: number;
82
- mimeType: string;
83
- refcount: number;
84
- storageId: string;
85
- }
86
- >;
87
- getFilesToDelete: FunctionReference<
88
- "query",
89
- "public",
90
- {
91
- paginationOpts: {
92
- cursor: string | null;
93
- endCursor?: string | null;
94
- id?: number;
95
- maximumBytesRead?: number;
96
- maximumRowsRead?: number;
97
- numItems: number;
98
- };
99
- },
100
- {
101
- continueCursor: string;
102
- isDone: boolean;
103
- page: Array<{
104
- _creationTime: number;
105
- _id: string;
106
- filename?: string;
107
- hash: string;
108
- lastTouchedAt: number;
109
- mimeType: string;
110
- refcount: number;
111
- storageId: string;
112
- }>;
113
- }
114
- >;
115
- useExistingFile: FunctionReference<
116
- "mutation",
117
- "public",
118
- { filename?: string; hash: string },
119
- null | { fileId: string; storageId: string }
120
- >;
121
- };
122
- messages: {
123
- addMessages: FunctionReference<
124
- "mutation",
125
- "public",
126
- {
127
- agentName?: string;
128
- embeddings?: {
129
- dimension:
130
- | 128
131
- | 256
132
- | 512
133
- | 768
134
- | 1024
135
- | 1408
136
- | 1536
137
- | 2048
138
- | 3072
139
- | 4096;
140
- model: string;
141
- vectors: Array<Array<number> | null>;
142
- };
143
- failPendingSteps?: boolean;
144
- messages: Array<{
145
- error?: string;
146
- fileIds?: Array<string>;
147
- finishReason?:
148
- | "stop"
149
- | "length"
150
- | "content-filter"
151
- | "tool-calls"
152
- | "error"
153
- | "other"
154
- | "unknown";
155
- id?: string;
156
- message:
157
- | {
158
- content:
159
- | string
160
- | Array<
161
- | {
162
- providerOptions?: Record<string, Record<string, any>>;
163
- text: string;
164
- type: "text";
165
- }
166
- | {
167
- image: string | ArrayBuffer;
168
- mimeType?: string;
169
- providerOptions?: Record<string, Record<string, any>>;
170
- type: "image";
171
- }
172
- | {
173
- data: string | ArrayBuffer;
174
- filename?: string;
175
- mimeType: string;
176
- providerOptions?: Record<string, Record<string, any>>;
177
- type: "file";
178
- }
179
- >;
180
- providerOptions?: Record<string, Record<string, any>>;
181
- role: "user";
182
- }
183
- | {
184
- content:
185
- | string
186
- | Array<
187
- | {
188
- providerOptions?: Record<string, Record<string, any>>;
189
- text: string;
190
- type: "text";
191
- }
192
- | {
193
- data: string | ArrayBuffer;
194
- filename?: string;
195
- mimeType: string;
196
- providerOptions?: Record<string, Record<string, any>>;
197
- type: "file";
198
- }
199
- | {
200
- providerOptions?: Record<string, Record<string, any>>;
201
- signature?: string;
202
- text: string;
203
- type: "reasoning";
204
- }
205
- | {
206
- data: string;
207
- providerOptions?: Record<string, Record<string, any>>;
208
- type: "redacted-reasoning";
209
- }
210
- | {
211
- args: any;
212
- providerOptions?: Record<string, Record<string, any>>;
213
- toolCallId: string;
214
- toolName: string;
215
- type: "tool-call";
216
- }
217
- >;
218
- providerOptions?: Record<string, Record<string, any>>;
219
- role: "assistant";
220
- }
221
- | {
222
- content: Array<{
223
- args?: any;
224
- experimental_content?: Array<
225
- | { text: string; type: "text" }
226
- | { data: string; mimeType?: string; type: "image" }
227
- >;
228
- isError?: boolean;
229
- providerOptions?: Record<string, Record<string, any>>;
230
- result: any;
231
- toolCallId: string;
232
- toolName: string;
233
- type: "tool-result";
234
- }>;
235
- providerOptions?: Record<string, Record<string, any>>;
236
- role: "tool";
237
- }
238
- | {
239
- content: string;
240
- providerOptions?: Record<string, Record<string, any>>;
241
- role: "system";
242
- };
243
- model?: string;
244
- provider?: string;
245
- providerMetadata?: Record<string, Record<string, any>>;
246
- reasoning?: string;
247
- reasoningDetails?: Array<
248
- | { signature?: string; text: string; type: "text" }
249
- | { data: string; type: "redacted" }
250
- >;
251
- sources?: Array<{
252
- id: string;
253
- providerOptions?: Record<string, Record<string, any>>;
254
- sourceType: "url";
255
- title?: string;
256
- url: string;
257
- }>;
258
- text?: string;
259
- usage?: {
260
- completionTokens: number;
261
- promptTokens: number;
262
- totalTokens: number;
263
- };
264
- warnings?: Array<
265
- | { details?: string; setting: string; type: "unsupported-setting" }
266
- | { details?: string; tool: any; type: "unsupported-tool" }
267
- | { message: string; type: "other" }
268
- >;
269
- }>;
270
- pending?: boolean;
271
- promptMessageId?: string;
272
- threadId: string;
273
- userId?: string;
274
- },
275
- {
276
- messages: Array<{
277
- _creationTime: number;
278
- _id: string;
279
- agentName?: string;
280
- embeddingId?: string;
281
- error?: string;
282
- fileIds?: Array<string>;
283
- finishReason?:
284
- | "stop"
285
- | "length"
286
- | "content-filter"
287
- | "tool-calls"
288
- | "error"
289
- | "other"
290
- | "unknown";
291
- id?: string;
292
- message?:
293
- | {
294
- content:
295
- | string
296
- | Array<
297
- | {
298
- providerOptions?: Record<string, Record<string, any>>;
299
- text: string;
300
- type: "text";
301
- }
302
- | {
303
- image: string | ArrayBuffer;
304
- mimeType?: string;
305
- providerOptions?: Record<string, Record<string, any>>;
306
- type: "image";
307
- }
308
- | {
309
- data: string | ArrayBuffer;
310
- filename?: string;
311
- mimeType: string;
312
- providerOptions?: Record<string, Record<string, any>>;
313
- type: "file";
314
- }
315
- >;
316
- providerOptions?: Record<string, Record<string, any>>;
317
- role: "user";
318
- }
319
- | {
320
- content:
321
- | string
322
- | Array<
323
- | {
324
- providerOptions?: Record<string, Record<string, any>>;
325
- text: string;
326
- type: "text";
327
- }
328
- | {
329
- data: string | ArrayBuffer;
330
- filename?: string;
331
- mimeType: string;
332
- providerOptions?: Record<string, Record<string, any>>;
333
- type: "file";
334
- }
335
- | {
336
- providerOptions?: Record<string, Record<string, any>>;
337
- signature?: string;
338
- text: string;
339
- type: "reasoning";
340
- }
341
- | {
342
- data: string;
343
- providerOptions?: Record<string, Record<string, any>>;
344
- type: "redacted-reasoning";
345
- }
346
- | {
347
- args: any;
348
- providerOptions?: Record<string, Record<string, any>>;
349
- toolCallId: string;
350
- toolName: string;
351
- type: "tool-call";
352
- }
353
- >;
354
- providerOptions?: Record<string, Record<string, any>>;
355
- role: "assistant";
356
- }
357
- | {
358
- content: Array<{
359
- args?: any;
360
- experimental_content?: Array<
361
- | { text: string; type: "text" }
362
- | { data: string; mimeType?: string; type: "image" }
363
- >;
364
- isError?: boolean;
365
- providerOptions?: Record<string, Record<string, any>>;
366
- result: any;
367
- toolCallId: string;
368
- toolName: string;
369
- type: "tool-result";
370
- }>;
371
- providerOptions?: Record<string, Record<string, any>>;
372
- role: "tool";
373
- }
374
- | {
375
- content: string;
376
- providerOptions?: Record<string, Record<string, any>>;
377
- role: "system";
378
- };
379
- model?: string;
380
- order: number;
381
- provider?: string;
382
- providerMetadata?: Record<string, Record<string, any>>;
383
- providerOptions?: Record<string, Record<string, any>>;
384
- reasoning?: string;
385
- reasoningDetails?: Array<
386
- | { signature?: string; text: string; type: "text" }
387
- | { data: string; type: "redacted" }
388
- >;
389
- sources?: Array<{
390
- id: string;
391
- providerOptions?: Record<string, Record<string, any>>;
392
- sourceType: "url";
393
- title?: string;
394
- url: string;
395
- }>;
396
- status: "pending" | "success" | "failed";
397
- stepOrder: number;
398
- text?: string;
399
- threadId: string;
400
- tool: boolean;
401
- usage?: {
402
- completionTokens: number;
403
- promptTokens: number;
404
- totalTokens: number;
405
- };
406
- userId?: string;
407
- warnings?: Array<
408
- | { details?: string; setting: string; type: "unsupported-setting" }
409
- | { details?: string; tool: any; type: "unsupported-tool" }
410
- | { message: string; type: "other" }
411
- >;
412
- }>;
413
- }
414
- >;
415
- commitMessage: FunctionReference<
416
- "mutation",
417
- "public",
418
- { messageId: string },
419
- null
420
- >;
421
- getMessagesByIds: FunctionReference<
422
- "query",
423
- "public",
424
- { messageIds: Array<string> },
425
- Array<null | {
426
- _creationTime: number;
427
- _id: string;
428
- agentName?: string;
429
- embeddingId?: string;
430
- error?: string;
431
- fileIds?: Array<string>;
432
- finishReason?:
433
- | "stop"
434
- | "length"
435
- | "content-filter"
436
- | "tool-calls"
437
- | "error"
438
- | "other"
439
- | "unknown";
440
- id?: string;
441
- message?:
442
- | {
443
- content:
444
- | string
445
- | Array<
446
- | {
447
- providerOptions?: Record<string, Record<string, any>>;
448
- text: string;
449
- type: "text";
450
- }
451
- | {
452
- image: string | ArrayBuffer;
453
- mimeType?: string;
454
- providerOptions?: Record<string, Record<string, any>>;
455
- type: "image";
456
- }
457
- | {
458
- data: string | ArrayBuffer;
459
- filename?: string;
460
- mimeType: string;
461
- providerOptions?: Record<string, Record<string, any>>;
462
- type: "file";
463
- }
464
- >;
465
- providerOptions?: Record<string, Record<string, any>>;
466
- role: "user";
467
- }
468
- | {
469
- content:
470
- | string
471
- | Array<
472
- | {
473
- providerOptions?: Record<string, Record<string, any>>;
474
- text: string;
475
- type: "text";
476
- }
477
- | {
478
- data: string | ArrayBuffer;
479
- filename?: string;
480
- mimeType: string;
481
- providerOptions?: Record<string, Record<string, any>>;
482
- type: "file";
483
- }
484
- | {
485
- providerOptions?: Record<string, Record<string, any>>;
486
- signature?: string;
487
- text: string;
488
- type: "reasoning";
489
- }
490
- | {
491
- data: string;
492
- providerOptions?: Record<string, Record<string, any>>;
493
- type: "redacted-reasoning";
494
- }
495
- | {
496
- args: any;
497
- providerOptions?: Record<string, Record<string, any>>;
498
- toolCallId: string;
499
- toolName: string;
500
- type: "tool-call";
501
- }
502
- >;
503
- providerOptions?: Record<string, Record<string, any>>;
504
- role: "assistant";
505
- }
506
- | {
507
- content: Array<{
508
- args?: any;
509
- experimental_content?: Array<
510
- | { text: string; type: "text" }
511
- | { data: string; mimeType?: string; type: "image" }
512
- >;
513
- isError?: boolean;
514
- providerOptions?: Record<string, Record<string, any>>;
515
- result: any;
516
- toolCallId: string;
517
- toolName: string;
518
- type: "tool-result";
519
- }>;
520
- providerOptions?: Record<string, Record<string, any>>;
521
- role: "tool";
522
- }
523
- | {
524
- content: string;
525
- providerOptions?: Record<string, Record<string, any>>;
526
- role: "system";
527
- };
528
- model?: string;
529
- order: number;
530
- provider?: string;
531
- providerMetadata?: Record<string, Record<string, any>>;
532
- providerOptions?: Record<string, Record<string, any>>;
533
- reasoning?: string;
534
- reasoningDetails?: Array<
535
- | { signature?: string; text: string; type: "text" }
536
- | { data: string; type: "redacted" }
537
- >;
538
- sources?: Array<{
539
- id: string;
540
- providerOptions?: Record<string, Record<string, any>>;
541
- sourceType: "url";
542
- title?: string;
543
- url: string;
544
- }>;
545
- status: "pending" | "success" | "failed";
546
- stepOrder: number;
547
- text?: string;
548
- threadId: string;
549
- tool: boolean;
550
- usage?: {
551
- completionTokens: number;
552
- promptTokens: number;
553
- totalTokens: number;
554
- };
555
- userId?: string;
556
- warnings?: Array<
557
- | { details?: string; setting: string; type: "unsupported-setting" }
558
- | { details?: string; tool: any; type: "unsupported-tool" }
559
- | { message: string; type: "other" }
560
- >;
561
- }>
562
- >;
563
- getThreadMessages: FunctionReference<
564
- "query",
565
- "public",
566
- { deprecated: "Use listMessagesByThreadId instead" },
567
- {
568
- continueCursor: string;
569
- isDone: boolean;
570
- page: Array<{
571
- _creationTime: number;
572
- _id: string;
573
- agentName?: string;
574
- embeddingId?: string;
575
- error?: string;
576
- fileIds?: Array<string>;
577
- finishReason?:
578
- | "stop"
579
- | "length"
580
- | "content-filter"
581
- | "tool-calls"
582
- | "error"
583
- | "other"
584
- | "unknown";
585
- id?: string;
586
- message?:
587
- | {
588
- content:
589
- | string
590
- | Array<
591
- | {
592
- providerOptions?: Record<string, Record<string, any>>;
593
- text: string;
594
- type: "text";
595
- }
596
- | {
597
- image: string | ArrayBuffer;
598
- mimeType?: string;
599
- providerOptions?: Record<string, Record<string, any>>;
600
- type: "image";
601
- }
602
- | {
603
- data: string | ArrayBuffer;
604
- filename?: string;
605
- mimeType: string;
606
- providerOptions?: Record<string, Record<string, any>>;
607
- type: "file";
608
- }
609
- >;
610
- providerOptions?: Record<string, Record<string, any>>;
611
- role: "user";
612
- }
613
- | {
614
- content:
615
- | string
616
- | Array<
617
- | {
618
- providerOptions?: Record<string, Record<string, any>>;
619
- text: string;
620
- type: "text";
621
- }
622
- | {
623
- data: string | ArrayBuffer;
624
- filename?: string;
625
- mimeType: string;
626
- providerOptions?: Record<string, Record<string, any>>;
627
- type: "file";
628
- }
629
- | {
630
- providerOptions?: Record<string, Record<string, any>>;
631
- signature?: string;
632
- text: string;
633
- type: "reasoning";
634
- }
635
- | {
636
- data: string;
637
- providerOptions?: Record<string, Record<string, any>>;
638
- type: "redacted-reasoning";
639
- }
640
- | {
641
- args: any;
642
- providerOptions?: Record<string, Record<string, any>>;
643
- toolCallId: string;
644
- toolName: string;
645
- type: "tool-call";
646
- }
647
- >;
648
- providerOptions?: Record<string, Record<string, any>>;
649
- role: "assistant";
650
- }
651
- | {
652
- content: Array<{
653
- args?: any;
654
- experimental_content?: Array<
655
- | { text: string; type: "text" }
656
- | { data: string; mimeType?: string; type: "image" }
657
- >;
658
- isError?: boolean;
659
- providerOptions?: Record<string, Record<string, any>>;
660
- result: any;
661
- toolCallId: string;
662
- toolName: string;
663
- type: "tool-result";
664
- }>;
665
- providerOptions?: Record<string, Record<string, any>>;
666
- role: "tool";
667
- }
668
- | {
669
- content: string;
670
- providerOptions?: Record<string, Record<string, any>>;
671
- role: "system";
672
- };
673
- model?: string;
674
- order: number;
675
- provider?: string;
676
- providerMetadata?: Record<string, Record<string, any>>;
677
- providerOptions?: Record<string, Record<string, any>>;
678
- reasoning?: string;
679
- reasoningDetails?: Array<
680
- | { signature?: string; text: string; type: "text" }
681
- | { data: string; type: "redacted" }
682
- >;
683
- sources?: Array<{
684
- id: string;
685
- providerOptions?: Record<string, Record<string, any>>;
686
- sourceType: "url";
687
- title?: string;
688
- url: string;
689
- }>;
690
- status: "pending" | "success" | "failed";
691
- stepOrder: number;
692
- text?: string;
693
- threadId: string;
694
- tool: boolean;
695
- usage?: {
696
- completionTokens: number;
697
- promptTokens: number;
698
- totalTokens: number;
699
- };
700
- userId?: string;
701
- warnings?: Array<
702
- | { details?: string; setting: string; type: "unsupported-setting" }
703
- | { details?: string; tool: any; type: "unsupported-tool" }
704
- | { message: string; type: "other" }
705
- >;
706
- }>;
707
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
708
- splitCursor?: string | null;
709
- }
710
- >;
711
- listMessagesByThreadId: FunctionReference<
712
- "query",
713
- "public",
714
- {
715
- excludeToolMessages?: boolean;
716
- isTool?: "use excludeToolMessages instead of this";
717
- order: "asc" | "desc";
718
- paginationOpts?: {
719
- cursor: string | null;
720
- endCursor?: string | null;
721
- id?: number;
722
- maximumBytesRead?: number;
723
- maximumRowsRead?: number;
724
- numItems: number;
725
- };
726
- statuses?: Array<"pending" | "success" | "failed">;
727
- threadId: string;
728
- upToAndIncludingMessageId?: string;
729
- },
730
- {
731
- continueCursor: string;
732
- isDone: boolean;
733
- page: Array<{
734
- _creationTime: number;
735
- _id: string;
736
- agentName?: string;
737
- embeddingId?: string;
738
- error?: string;
739
- fileIds?: Array<string>;
740
- finishReason?:
741
- | "stop"
742
- | "length"
743
- | "content-filter"
744
- | "tool-calls"
745
- | "error"
746
- | "other"
747
- | "unknown";
748
- id?: string;
749
- message?:
750
- | {
751
- content:
752
- | string
753
- | Array<
754
- | {
755
- providerOptions?: Record<string, Record<string, any>>;
756
- text: string;
757
- type: "text";
758
- }
759
- | {
760
- image: string | ArrayBuffer;
761
- mimeType?: string;
762
- providerOptions?: Record<string, Record<string, any>>;
763
- type: "image";
764
- }
765
- | {
766
- data: string | ArrayBuffer;
767
- filename?: string;
768
- mimeType: string;
769
- providerOptions?: Record<string, Record<string, any>>;
770
- type: "file";
771
- }
772
- >;
773
- providerOptions?: Record<string, Record<string, any>>;
774
- role: "user";
775
- }
776
- | {
777
- content:
778
- | string
779
- | Array<
780
- | {
781
- providerOptions?: Record<string, Record<string, any>>;
782
- text: string;
783
- type: "text";
784
- }
785
- | {
786
- data: string | ArrayBuffer;
787
- filename?: string;
788
- mimeType: string;
789
- providerOptions?: Record<string, Record<string, any>>;
790
- type: "file";
791
- }
792
- | {
793
- providerOptions?: Record<string, Record<string, any>>;
794
- signature?: string;
795
- text: string;
796
- type: "reasoning";
797
- }
798
- | {
799
- data: string;
800
- providerOptions?: Record<string, Record<string, any>>;
801
- type: "redacted-reasoning";
802
- }
803
- | {
804
- args: any;
805
- providerOptions?: Record<string, Record<string, any>>;
806
- toolCallId: string;
807
- toolName: string;
808
- type: "tool-call";
809
- }
810
- >;
811
- providerOptions?: Record<string, Record<string, any>>;
812
- role: "assistant";
813
- }
814
- | {
815
- content: Array<{
816
- args?: any;
817
- experimental_content?: Array<
818
- | { text: string; type: "text" }
819
- | { data: string; mimeType?: string; type: "image" }
820
- >;
821
- isError?: boolean;
822
- providerOptions?: Record<string, Record<string, any>>;
823
- result: any;
824
- toolCallId: string;
825
- toolName: string;
826
- type: "tool-result";
827
- }>;
828
- providerOptions?: Record<string, Record<string, any>>;
829
- role: "tool";
830
- }
831
- | {
832
- content: string;
833
- providerOptions?: Record<string, Record<string, any>>;
834
- role: "system";
835
- };
836
- model?: string;
837
- order: number;
838
- provider?: string;
839
- providerMetadata?: Record<string, Record<string, any>>;
840
- providerOptions?: Record<string, Record<string, any>>;
841
- reasoning?: string;
842
- reasoningDetails?: Array<
843
- | { signature?: string; text: string; type: "text" }
844
- | { data: string; type: "redacted" }
845
- >;
846
- sources?: Array<{
847
- id: string;
848
- providerOptions?: Record<string, Record<string, any>>;
849
- sourceType: "url";
850
- title?: string;
851
- url: string;
852
- }>;
853
- status: "pending" | "success" | "failed";
854
- stepOrder: number;
855
- text?: string;
856
- threadId: string;
857
- tool: boolean;
858
- usage?: {
859
- completionTokens: number;
860
- promptTokens: number;
861
- totalTokens: number;
862
- };
863
- userId?: string;
864
- warnings?: Array<
865
- | { details?: string; setting: string; type: "unsupported-setting" }
866
- | { details?: string; tool: any; type: "unsupported-tool" }
867
- | { message: string; type: "other" }
868
- >;
869
- }>;
870
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
871
- splitCursor?: string | null;
872
- }
873
- >;
874
- rollbackMessage: FunctionReference<
875
- "mutation",
876
- "public",
877
- { error?: string; messageId: string },
878
- null
879
- >;
880
- searchMessages: FunctionReference<
881
- "action",
882
- "public",
883
- {
884
- beforeMessageId?: string;
885
- limit: number;
886
- messageRange?: { after: number; before: number };
887
- searchAllMessagesForUserId?: string;
888
- text?: string;
889
- threadId?: string;
890
- vector?: Array<number>;
891
- vectorModel?: string;
892
- vectorScoreThreshold?: number;
893
- },
894
- Array<{
895
- _creationTime: number;
896
- _id: string;
897
- agentName?: string;
898
- embeddingId?: string;
899
- error?: string;
900
- fileIds?: Array<string>;
901
- finishReason?:
902
- | "stop"
903
- | "length"
904
- | "content-filter"
905
- | "tool-calls"
906
- | "error"
907
- | "other"
908
- | "unknown";
909
- id?: string;
910
- message?:
911
- | {
912
- content:
913
- | string
914
- | Array<
915
- | {
916
- providerOptions?: Record<string, Record<string, any>>;
917
- text: string;
918
- type: "text";
919
- }
920
- | {
921
- image: string | ArrayBuffer;
922
- mimeType?: string;
923
- providerOptions?: Record<string, Record<string, any>>;
924
- type: "image";
925
- }
926
- | {
927
- data: string | ArrayBuffer;
928
- filename?: string;
929
- mimeType: string;
930
- providerOptions?: Record<string, Record<string, any>>;
931
- type: "file";
932
- }
933
- >;
934
- providerOptions?: Record<string, Record<string, any>>;
935
- role: "user";
936
- }
937
- | {
938
- content:
939
- | string
940
- | Array<
941
- | {
942
- providerOptions?: Record<string, Record<string, any>>;
943
- text: string;
944
- type: "text";
945
- }
946
- | {
947
- data: string | ArrayBuffer;
948
- filename?: string;
949
- mimeType: string;
950
- providerOptions?: Record<string, Record<string, any>>;
951
- type: "file";
952
- }
953
- | {
954
- providerOptions?: Record<string, Record<string, any>>;
955
- signature?: string;
956
- text: string;
957
- type: "reasoning";
958
- }
959
- | {
960
- data: string;
961
- providerOptions?: Record<string, Record<string, any>>;
962
- type: "redacted-reasoning";
963
- }
964
- | {
965
- args: any;
966
- providerOptions?: Record<string, Record<string, any>>;
967
- toolCallId: string;
968
- toolName: string;
969
- type: "tool-call";
970
- }
971
- >;
972
- providerOptions?: Record<string, Record<string, any>>;
973
- role: "assistant";
974
- }
975
- | {
976
- content: Array<{
977
- args?: any;
978
- experimental_content?: Array<
979
- | { text: string; type: "text" }
980
- | { data: string; mimeType?: string; type: "image" }
981
- >;
982
- isError?: boolean;
983
- providerOptions?: Record<string, Record<string, any>>;
984
- result: any;
985
- toolCallId: string;
986
- toolName: string;
987
- type: "tool-result";
988
- }>;
989
- providerOptions?: Record<string, Record<string, any>>;
990
- role: "tool";
991
- }
992
- | {
993
- content: string;
994
- providerOptions?: Record<string, Record<string, any>>;
995
- role: "system";
996
- };
997
- model?: string;
998
- order: number;
999
- provider?: string;
1000
- providerMetadata?: Record<string, Record<string, any>>;
1001
- providerOptions?: Record<string, Record<string, any>>;
1002
- reasoning?: string;
1003
- reasoningDetails?: Array<
1004
- | { signature?: string; text: string; type: "text" }
1005
- | { data: string; type: "redacted" }
1006
- >;
1007
- sources?: Array<{
1008
- id: string;
1009
- providerOptions?: Record<string, Record<string, any>>;
1010
- sourceType: "url";
1011
- title?: string;
1012
- url: string;
1013
- }>;
1014
- status: "pending" | "success" | "failed";
1015
- stepOrder: number;
1016
- text?: string;
1017
- threadId: string;
1018
- tool: boolean;
1019
- usage?: {
1020
- completionTokens: number;
1021
- promptTokens: number;
1022
- totalTokens: number;
1023
- };
1024
- userId?: string;
1025
- warnings?: Array<
1026
- | { details?: string; setting: string; type: "unsupported-setting" }
1027
- | { details?: string; tool: any; type: "unsupported-tool" }
1028
- | { message: string; type: "other" }
1029
- >;
1030
- }>
1031
- >;
1032
- textSearch: FunctionReference<
1033
- "query",
1034
- "public",
1035
- {
1036
- beforeMessageId?: string;
1037
- limit: number;
1038
- searchAllMessagesForUserId?: string;
1039
- text: string;
1040
- threadId?: string;
1041
- },
1042
- Array<{
1043
- _creationTime: number;
1044
- _id: string;
1045
- agentName?: string;
1046
- embeddingId?: string;
1047
- error?: string;
1048
- fileIds?: Array<string>;
1049
- finishReason?:
1050
- | "stop"
1051
- | "length"
1052
- | "content-filter"
1053
- | "tool-calls"
1054
- | "error"
1055
- | "other"
1056
- | "unknown";
1057
- id?: string;
1058
- message?:
1059
- | {
1060
- content:
1061
- | string
1062
- | Array<
1063
- | {
1064
- providerOptions?: Record<string, Record<string, any>>;
1065
- text: string;
1066
- type: "text";
1067
- }
1068
- | {
1069
- image: string | ArrayBuffer;
1070
- mimeType?: string;
1071
- providerOptions?: Record<string, Record<string, any>>;
1072
- type: "image";
1073
- }
1074
- | {
1075
- data: string | ArrayBuffer;
1076
- filename?: string;
1077
- mimeType: string;
1078
- providerOptions?: Record<string, Record<string, any>>;
1079
- type: "file";
1080
- }
1081
- >;
1082
- providerOptions?: Record<string, Record<string, any>>;
1083
- role: "user";
1084
- }
1085
- | {
1086
- content:
1087
- | string
1088
- | Array<
1089
- | {
1090
- providerOptions?: Record<string, Record<string, any>>;
1091
- text: string;
1092
- type: "text";
1093
- }
1094
- | {
1095
- data: string | ArrayBuffer;
1096
- filename?: string;
1097
- mimeType: string;
1098
- providerOptions?: Record<string, Record<string, any>>;
1099
- type: "file";
1100
- }
1101
- | {
1102
- providerOptions?: Record<string, Record<string, any>>;
1103
- signature?: string;
1104
- text: string;
1105
- type: "reasoning";
1106
- }
1107
- | {
1108
- data: string;
1109
- providerOptions?: Record<string, Record<string, any>>;
1110
- type: "redacted-reasoning";
1111
- }
1112
- | {
1113
- args: any;
1114
- providerOptions?: Record<string, Record<string, any>>;
1115
- toolCallId: string;
1116
- toolName: string;
1117
- type: "tool-call";
1118
- }
1119
- >;
1120
- providerOptions?: Record<string, Record<string, any>>;
1121
- role: "assistant";
1122
- }
1123
- | {
1124
- content: Array<{
1125
- args?: any;
1126
- experimental_content?: Array<
1127
- | { text: string; type: "text" }
1128
- | { data: string; mimeType?: string; type: "image" }
1129
- >;
1130
- isError?: boolean;
1131
- providerOptions?: Record<string, Record<string, any>>;
1132
- result: any;
1133
- toolCallId: string;
1134
- toolName: string;
1135
- type: "tool-result";
1136
- }>;
1137
- providerOptions?: Record<string, Record<string, any>>;
1138
- role: "tool";
1139
- }
1140
- | {
1141
- content: string;
1142
- providerOptions?: Record<string, Record<string, any>>;
1143
- role: "system";
1144
- };
1145
- model?: string;
1146
- order: number;
1147
- provider?: string;
1148
- providerMetadata?: Record<string, Record<string, any>>;
1149
- providerOptions?: Record<string, Record<string, any>>;
1150
- reasoning?: string;
1151
- reasoningDetails?: Array<
1152
- | { signature?: string; text: string; type: "text" }
1153
- | { data: string; type: "redacted" }
1154
- >;
1155
- sources?: Array<{
1156
- id: string;
1157
- providerOptions?: Record<string, Record<string, any>>;
1158
- sourceType: "url";
1159
- title?: string;
1160
- url: string;
1161
- }>;
1162
- status: "pending" | "success" | "failed";
1163
- stepOrder: number;
1164
- text?: string;
1165
- threadId: string;
1166
- tool: boolean;
1167
- usage?: {
1168
- completionTokens: number;
1169
- promptTokens: number;
1170
- totalTokens: number;
1171
- };
1172
- userId?: string;
1173
- warnings?: Array<
1174
- | { details?: string; setting: string; type: "unsupported-setting" }
1175
- | { details?: string; tool: any; type: "unsupported-tool" }
1176
- | { message: string; type: "other" }
1177
- >;
1178
- }>
1179
- >;
1180
- updateMessage: FunctionReference<
1181
- "mutation",
1182
- "public",
1183
- {
1184
- messageId: string;
1185
- patch: {
1186
- error?: string;
1187
- message?:
1188
- | {
1189
- content:
1190
- | string
1191
- | Array<
1192
- | {
1193
- providerOptions?: Record<string, Record<string, any>>;
1194
- text: string;
1195
- type: "text";
1196
- }
1197
- | {
1198
- image: string | ArrayBuffer;
1199
- mimeType?: string;
1200
- providerOptions?: Record<string, Record<string, any>>;
1201
- type: "image";
1202
- }
1203
- | {
1204
- data: string | ArrayBuffer;
1205
- filename?: string;
1206
- mimeType: string;
1207
- providerOptions?: Record<string, Record<string, any>>;
1208
- type: "file";
1209
- }
1210
- >;
1211
- providerOptions?: Record<string, Record<string, any>>;
1212
- role: "user";
1213
- }
1214
- | {
1215
- content:
1216
- | string
1217
- | Array<
1218
- | {
1219
- providerOptions?: Record<string, Record<string, any>>;
1220
- text: string;
1221
- type: "text";
1222
- }
1223
- | {
1224
- data: string | ArrayBuffer;
1225
- filename?: string;
1226
- mimeType: string;
1227
- providerOptions?: Record<string, Record<string, any>>;
1228
- type: "file";
1229
- }
1230
- | {
1231
- providerOptions?: Record<string, Record<string, any>>;
1232
- signature?: string;
1233
- text: string;
1234
- type: "reasoning";
1235
- }
1236
- | {
1237
- data: string;
1238
- providerOptions?: Record<string, Record<string, any>>;
1239
- type: "redacted-reasoning";
1240
- }
1241
- | {
1242
- args: any;
1243
- providerOptions?: Record<string, Record<string, any>>;
1244
- toolCallId: string;
1245
- toolName: string;
1246
- type: "tool-call";
1247
- }
1248
- >;
1249
- providerOptions?: Record<string, Record<string, any>>;
1250
- role: "assistant";
1251
- }
1252
- | {
1253
- content: Array<{
1254
- args?: any;
1255
- experimental_content?: Array<
1256
- | { text: string; type: "text" }
1257
- | { data: string; mimeType?: string; type: "image" }
1258
- >;
1259
- isError?: boolean;
1260
- providerOptions?: Record<string, Record<string, any>>;
1261
- result: any;
1262
- toolCallId: string;
1263
- toolName: string;
1264
- type: "tool-result";
1265
- }>;
1266
- providerOptions?: Record<string, Record<string, any>>;
1267
- role: "tool";
1268
- }
1269
- | {
1270
- content: string;
1271
- providerOptions?: Record<string, Record<string, any>>;
1272
- role: "system";
1273
- };
1274
- status?: "pending" | "success" | "failed";
1275
- };
1276
- },
1277
- {
1278
- _creationTime: number;
1279
- _id: string;
1280
- agentName?: string;
1281
- embeddingId?: string;
1282
- error?: string;
1283
- fileIds?: Array<string>;
1284
- finishReason?:
1285
- | "stop"
1286
- | "length"
1287
- | "content-filter"
1288
- | "tool-calls"
1289
- | "error"
1290
- | "other"
1291
- | "unknown";
1292
- id?: string;
1293
- message?:
1294
- | {
1295
- content:
1296
- | string
1297
- | Array<
1298
- | {
1299
- providerOptions?: Record<string, Record<string, any>>;
1300
- text: string;
1301
- type: "text";
1302
- }
1303
- | {
1304
- image: string | ArrayBuffer;
1305
- mimeType?: string;
1306
- providerOptions?: Record<string, Record<string, any>>;
1307
- type: "image";
1308
- }
1309
- | {
1310
- data: string | ArrayBuffer;
1311
- filename?: string;
1312
- mimeType: string;
1313
- providerOptions?: Record<string, Record<string, any>>;
1314
- type: "file";
1315
- }
1316
- >;
1317
- providerOptions?: Record<string, Record<string, any>>;
1318
- role: "user";
1319
- }
1320
- | {
1321
- content:
1322
- | string
1323
- | Array<
1324
- | {
1325
- providerOptions?: Record<string, Record<string, any>>;
1326
- text: string;
1327
- type: "text";
1328
- }
1329
- | {
1330
- data: string | ArrayBuffer;
1331
- filename?: string;
1332
- mimeType: string;
1333
- providerOptions?: Record<string, Record<string, any>>;
1334
- type: "file";
1335
- }
1336
- | {
1337
- providerOptions?: Record<string, Record<string, any>>;
1338
- signature?: string;
1339
- text: string;
1340
- type: "reasoning";
1341
- }
1342
- | {
1343
- data: string;
1344
- providerOptions?: Record<string, Record<string, any>>;
1345
- type: "redacted-reasoning";
1346
- }
1347
- | {
1348
- args: any;
1349
- providerOptions?: Record<string, Record<string, any>>;
1350
- toolCallId: string;
1351
- toolName: string;
1352
- type: "tool-call";
1353
- }
1354
- >;
1355
- providerOptions?: Record<string, Record<string, any>>;
1356
- role: "assistant";
1357
- }
1358
- | {
1359
- content: Array<{
1360
- args?: any;
1361
- experimental_content?: Array<
1362
- | { text: string; type: "text" }
1363
- | { data: string; mimeType?: string; type: "image" }
1364
- >;
1365
- isError?: boolean;
1366
- providerOptions?: Record<string, Record<string, any>>;
1367
- result: any;
1368
- toolCallId: string;
1369
- toolName: string;
1370
- type: "tool-result";
1371
- }>;
1372
- providerOptions?: Record<string, Record<string, any>>;
1373
- role: "tool";
1374
- }
1375
- | {
1376
- content: string;
1377
- providerOptions?: Record<string, Record<string, any>>;
1378
- role: "system";
1379
- };
1380
- model?: string;
1381
- order: number;
1382
- provider?: string;
1383
- providerMetadata?: Record<string, Record<string, any>>;
1384
- providerOptions?: Record<string, Record<string, any>>;
1385
- reasoning?: string;
1386
- reasoningDetails?: Array<
1387
- | { signature?: string; text: string; type: "text" }
1388
- | { data: string; type: "redacted" }
1389
- >;
1390
- sources?: Array<{
1391
- id: string;
1392
- providerOptions?: Record<string, Record<string, any>>;
1393
- sourceType: "url";
1394
- title?: string;
1395
- url: string;
1396
- }>;
1397
- status: "pending" | "success" | "failed";
1398
- stepOrder: number;
1399
- text?: string;
1400
- threadId: string;
1401
- tool: boolean;
1402
- usage?: {
1403
- completionTokens: number;
1404
- promptTokens: number;
1405
- totalTokens: number;
1406
- };
1407
- userId?: string;
1408
- warnings?: Array<
1409
- | { details?: string; setting: string; type: "unsupported-setting" }
1410
- | { details?: string; tool: any; type: "unsupported-tool" }
1411
- | { message: string; type: "other" }
1412
- >;
1413
- }
1414
- >;
1415
- };
1416
- streams: {
1417
- addDelta: FunctionReference<
1418
- "mutation",
1419
- "public",
1420
- {
1421
- end: number;
1422
- parts: Array<
1423
- | { textDelta: string; type: "text-delta" }
1424
- | { textDelta: string; type: "reasoning" }
1425
- | {
1426
- source: {
1427
- id: string;
1428
- providerOptions?: Record<string, Record<string, any>>;
1429
- sourceType: "url";
1430
- title?: string;
1431
- url: string;
1432
- };
1433
- type: "source";
1434
- }
1435
- | {
1436
- args: any;
1437
- providerOptions?: Record<string, Record<string, any>>;
1438
- toolCallId: string;
1439
- toolName: string;
1440
- type: "tool-call";
1441
- }
1442
- | {
1443
- toolCallId: string;
1444
- toolName: string;
1445
- type: "tool-call-streaming-start";
1446
- }
1447
- | {
1448
- argsTextDelta: string;
1449
- toolCallId: string;
1450
- toolName: string;
1451
- type: "tool-call-delta";
1452
- }
1453
- | {
1454
- args?: any;
1455
- experimental_content?: Array<
1456
- | { text: string; type: "text" }
1457
- | { data: string; mimeType?: string; type: "image" }
1458
- >;
1459
- isError?: boolean;
1460
- providerOptions?: Record<string, Record<string, any>>;
1461
- result: any;
1462
- toolCallId: string;
1463
- toolName: string;
1464
- type: "tool-result";
1465
- }
1466
- >;
1467
- start: number;
1468
- streamId: string;
1469
- },
1470
- boolean
1471
- >;
1472
- create: FunctionReference<
1473
- "mutation",
1474
- "public",
1475
- {
1476
- agentName?: string;
1477
- model?: string;
1478
- order: number;
1479
- provider?: string;
1480
- providerOptions?: Record<string, Record<string, any>>;
1481
- stepOrder: number;
1482
- threadId: string;
1483
- userId?: string;
1484
- },
1485
- string
1486
- >;
1487
- deleteAllStreamsForThreadIdAsync: FunctionReference<
1488
- "mutation",
1489
- "public",
1490
- { deltaCursor?: string; streamOrder?: number; threadId: string },
1491
- { deltaCursor?: string; isDone: boolean; streamOrder?: number }
1492
- >;
1493
- deleteAllStreamsForThreadIdSync: FunctionReference<
1494
- "action",
1495
- "public",
1496
- { threadId: string },
1497
- null
1498
- >;
1499
- deleteStreamAsync: FunctionReference<
1500
- "mutation",
1501
- "public",
1502
- { cursor?: string; streamId: string },
1503
- null
1504
- >;
1505
- deleteStreamSync: FunctionReference<
1506
- "mutation",
1507
- "public",
1508
- { streamId: string },
1509
- null
1510
- >;
1511
- finish: FunctionReference<
1512
- "mutation",
1513
- "public",
1514
- {
1515
- finalDelta?: {
1516
- end: number;
1517
- parts: Array<
1518
- | { textDelta: string; type: "text-delta" }
1519
- | { textDelta: string; type: "reasoning" }
1520
- | {
1521
- source: {
1522
- id: string;
1523
- providerOptions?: Record<string, Record<string, any>>;
1524
- sourceType: "url";
1525
- title?: string;
1526
- url: string;
1527
- };
1528
- type: "source";
1529
- }
1530
- | {
1531
- args: any;
1532
- providerOptions?: Record<string, Record<string, any>>;
1533
- toolCallId: string;
1534
- toolName: string;
1535
- type: "tool-call";
1536
- }
1537
- | {
1538
- toolCallId: string;
1539
- toolName: string;
1540
- type: "tool-call-streaming-start";
1541
- }
1542
- | {
1543
- argsTextDelta: string;
1544
- toolCallId: string;
1545
- toolName: string;
1546
- type: "tool-call-delta";
1547
- }
1548
- | {
1549
- args?: any;
1550
- experimental_content?: Array<
1551
- | { text: string; type: "text" }
1552
- | { data: string; mimeType?: string; type: "image" }
1553
- >;
1554
- isError?: boolean;
1555
- providerOptions?: Record<string, Record<string, any>>;
1556
- result: any;
1557
- toolCallId: string;
1558
- toolName: string;
1559
- type: "tool-result";
1560
- }
1561
- >;
1562
- start: number;
1563
- streamId: string;
1564
- };
1565
- streamId: string;
1566
- },
1567
- null
1568
- >;
1569
- list: FunctionReference<
1570
- "query",
1571
- "public",
1572
- { threadId: string },
1573
- Array<{
1574
- agentName?: string;
1575
- model?: string;
1576
- order: number;
1577
- provider?: string;
1578
- providerOptions?: Record<string, Record<string, any>>;
1579
- stepOrder: number;
1580
- streamId: string;
1581
- userId?: string;
1582
- }>
1583
- >;
1584
- listDeltas: FunctionReference<
1585
- "query",
1586
- "public",
1587
- {
1588
- cursors: Array<{ cursor: number; streamId: string }>;
1589
- threadId: string;
1590
- },
1591
- Array<{
1592
- end: number;
1593
- parts: Array<
1594
- | { textDelta: string; type: "text-delta" }
1595
- | { textDelta: string; type: "reasoning" }
1596
- | {
1597
- source: {
1598
- id: string;
1599
- providerOptions?: Record<string, Record<string, any>>;
1600
- sourceType: "url";
1601
- title?: string;
1602
- url: string;
1603
- };
1604
- type: "source";
1605
- }
1606
- | {
1607
- args: any;
1608
- providerOptions?: Record<string, Record<string, any>>;
1609
- toolCallId: string;
1610
- toolName: string;
1611
- type: "tool-call";
1612
- }
1613
- | {
1614
- toolCallId: string;
1615
- toolName: string;
1616
- type: "tool-call-streaming-start";
1617
- }
1618
- | {
1619
- argsTextDelta: string;
1620
- toolCallId: string;
1621
- toolName: string;
1622
- type: "tool-call-delta";
1623
- }
1624
- | {
1625
- args?: any;
1626
- experimental_content?: Array<
1627
- | { text: string; type: "text" }
1628
- | { data: string; mimeType?: string; type: "image" }
1629
- >;
1630
- isError?: boolean;
1631
- providerOptions?: Record<string, Record<string, any>>;
1632
- result: any;
1633
- toolCallId: string;
1634
- toolName: string;
1635
- type: "tool-result";
1636
- }
1637
- >;
1638
- start: number;
1639
- streamId: string;
1640
- }>
1641
- >;
1642
- };
1643
- threads: {
1644
- createThread: FunctionReference<
1645
- "mutation",
1646
- "public",
1647
- {
1648
- defaultSystemPrompt?: string;
1649
- parentThreadIds?: Array<string>;
1650
- summary?: string;
1651
- title?: string;
1652
- userId?: string;
1653
- },
1654
- {
1655
- _creationTime: number;
1656
- _id: string;
1657
- status: "active" | "archived";
1658
- summary?: string;
1659
- title?: string;
1660
- userId?: string;
1661
- }
1662
- >;
1663
- deleteAllForThreadIdAsync: FunctionReference<
1664
- "mutation",
1665
- "public",
1666
- {
1667
- cursor?: string;
1668
- deltaCursor?: string;
1669
- limit?: number;
1670
- messagesDone?: boolean;
1671
- streamOrder?: number;
1672
- streamsDone?: boolean;
1673
- threadId: string;
1674
- },
1675
- { isDone: boolean }
1676
- >;
1677
- deleteAllForThreadIdSync: FunctionReference<
1678
- "action",
1679
- "public",
1680
- { limit?: number; threadId: string },
1681
- null
1682
- >;
1683
- getThread: FunctionReference<
1684
- "query",
1685
- "public",
1686
- { threadId: string },
1687
- {
1688
- _creationTime: number;
1689
- _id: string;
1690
- status: "active" | "archived";
1691
- summary?: string;
1692
- title?: string;
1693
- userId?: string;
1694
- } | null
1695
- >;
1696
- listThreadsByUserId: FunctionReference<
1697
- "query",
1698
- "public",
1699
- {
1700
- order?: "asc" | "desc";
1701
- paginationOpts?: {
1702
- cursor: string | null;
1703
- endCursor?: string | null;
1704
- id?: number;
1705
- maximumBytesRead?: number;
1706
- maximumRowsRead?: number;
1707
- numItems: number;
1708
- };
1709
- userId?: string;
1710
- },
1711
- {
1712
- continueCursor: string;
1713
- isDone: boolean;
1714
- page: Array<{
1715
- _creationTime: number;
1716
- _id: string;
1717
- status: "active" | "archived";
1718
- summary?: string;
1719
- title?: string;
1720
- userId?: string;
1721
- }>;
1722
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
1723
- splitCursor?: string | null;
1724
- }
1725
- >;
1726
- updateThread: FunctionReference<
1727
- "mutation",
1728
- "public",
1729
- {
1730
- patch: {
1731
- status?: "active" | "archived";
1732
- summary?: string;
1733
- title?: string;
1734
- };
1735
- threadId: string;
1736
- },
1737
- {
1738
- _creationTime: number;
1739
- _id: string;
1740
- status: "active" | "archived";
1741
- summary?: string;
1742
- title?: string;
1743
- userId?: string;
1744
- }
1745
- >;
1746
- };
1747
- users: {
1748
- deleteAllForUserId: FunctionReference<
1749
- "action",
1750
- "public",
1751
- { userId: string },
1752
- null
1753
- >;
1754
- deleteAllForUserIdAsync: FunctionReference<
1755
- "mutation",
1756
- "public",
1757
- { userId: string },
1758
- boolean
1759
- >;
1760
- listUsersWithThreads: FunctionReference<
1761
- "query",
1762
- "public",
1763
- {
1764
- paginationOpts: {
1765
- cursor: string | null;
1766
- endCursor?: string | null;
1767
- id?: number;
1768
- maximumBytesRead?: number;
1769
- maximumRowsRead?: number;
1770
- numItems: number;
1771
- };
1772
- },
1773
- {
1774
- continueCursor: string;
1775
- isDone: boolean;
1776
- page: Array<string>;
1777
- pageStatus?: "SplitRecommended" | "SplitRequired" | null;
1778
- splitCursor?: string | null;
1779
- }
1780
- >;
1781
- };
1782
- vector: {
1783
- index: {
1784
- deleteBatch: FunctionReference<
1785
- "mutation",
1786
- "public",
1787
- {
1788
- ids: Array<
1789
- | string
1790
- | string
1791
- | string
1792
- | string
1793
- | string
1794
- | string
1795
- | string
1796
- | string
1797
- | string
1798
- | string
1799
- >;
1800
- },
1801
- null
1802
- >;
1803
- deleteBatchForThread: FunctionReference<
1804
- "mutation",
1805
- "public",
1806
- {
1807
- cursor?: string;
1808
- limit: number;
1809
- model: string;
1810
- threadId: string;
1811
- vectorDimension:
1812
- | 128
1813
- | 256
1814
- | 512
1815
- | 768
1816
- | 1024
1817
- | 1408
1818
- | 1536
1819
- | 2048
1820
- | 3072
1821
- | 4096;
1822
- },
1823
- { continueCursor: string; isDone: boolean }
1824
- >;
1825
- insertBatch: FunctionReference<
1826
- "mutation",
1827
- "public",
1828
- {
1829
- vectorDimension:
1830
- | 128
1831
- | 256
1832
- | 512
1833
- | 768
1834
- | 1024
1835
- | 1408
1836
- | 1536
1837
- | 2048
1838
- | 3072
1839
- | 4096;
1840
- vectors: Array<{
1841
- messageId?: string;
1842
- model: string;
1843
- table: string;
1844
- threadId?: string;
1845
- userId?: string;
1846
- vector: Array<number>;
1847
- }>;
1848
- },
1849
- Array<
1850
- | string
1851
- | string
1852
- | string
1853
- | string
1854
- | string
1855
- | string
1856
- | string
1857
- | string
1858
- | string
1859
- | string
1860
- >
1861
- >;
1862
- paginate: FunctionReference<
1863
- "query",
1864
- "public",
1865
- {
1866
- cursor?: string;
1867
- limit: number;
1868
- table?: string;
1869
- targetModel: string;
1870
- vectorDimension:
1871
- | 128
1872
- | 256
1873
- | 512
1874
- | 768
1875
- | 1024
1876
- | 1408
1877
- | 1536
1878
- | 2048
1879
- | 3072
1880
- | 4096;
1881
- },
1882
- {
1883
- continueCursor: string;
1884
- ids: Array<
1885
- | string
1886
- | string
1887
- | string
1888
- | string
1889
- | string
1890
- | string
1891
- | string
1892
- | string
1893
- | string
1894
- | string
1895
- >;
1896
- isDone: boolean;
1897
- }
1898
- >;
1899
- updateBatch: FunctionReference<
1900
- "mutation",
1901
- "public",
1902
- {
1903
- vectors: Array<{
1904
- id:
1905
- | string
1906
- | string
1907
- | string
1908
- | string
1909
- | string
1910
- | string
1911
- | string
1912
- | string
1913
- | string
1914
- | string;
1915
- model: string;
1916
- vector: Array<number>;
1917
- }>;
1918
- },
1919
- null
1920
- >;
1921
- };
1922
- };
1923
- };
1924
- // For now fullApiWithMounts is only fullApi which provides
1925
- // jump-to-definition in component client code.
1926
- // Use Mounts for the same type without the inference.
1927
- declare const fullApiWithMounts: typeof fullApi;
1928
-
1929
- export declare const api: FilterApi<
1930
- typeof fullApiWithMounts,
1931
- FunctionReference<any, "public">
1932
- >;
1933
- export declare const internal: FilterApi<
1934
- typeof fullApiWithMounts,
1935
- FunctionReference<any, "internal">
1936
- >;
1937
-
1938
- export declare const components: {};