@convex-dev/agent 0.1.7-alpha.2 → 0.1.8-alpha.0

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 (97) hide show
  1. package/README.md +55 -21
  2. package/dist/commonjs/client/index.d.ts +51 -51
  3. package/dist/commonjs/client/streaming.d.ts +3 -3
  4. package/dist/commonjs/client/streaming.d.ts.map +1 -1
  5. package/dist/commonjs/component/apiKeys.js +1 -1
  6. package/dist/commonjs/component/apiKeys.js.map +1 -1
  7. package/dist/commonjs/component/messages.d.ts +155 -155
  8. package/dist/commonjs/component/schema.d.ts +753 -753
  9. package/dist/commonjs/component/streams.d.ts +18 -18
  10. package/dist/commonjs/component/streams.d.ts.map +1 -1
  11. package/dist/commonjs/component/streams.js +4 -4
  12. package/dist/commonjs/component/streams.js.map +1 -1
  13. package/dist/commonjs/component/threads.d.ts +6 -6
  14. package/dist/commonjs/component/vector/index.d.ts +12 -12
  15. package/dist/commonjs/component/vector/tables.d.ts +6 -6
  16. package/dist/commonjs/mapping.d.ts +1 -1
  17. package/dist/commonjs/mapping.d.ts.map +1 -1
  18. package/dist/commonjs/react/deltas.d.ts +4 -4
  19. package/dist/commonjs/react/deltas.d.ts.map +1 -1
  20. package/dist/commonjs/react/deltas.js +1 -1
  21. package/dist/commonjs/react/deltas.js.map +1 -1
  22. package/dist/commonjs/react/index.d.ts +5 -5
  23. package/dist/commonjs/react/index.d.ts.map +1 -1
  24. package/dist/commonjs/react/index.js +5 -5
  25. package/dist/commonjs/react/index.js.map +1 -1
  26. package/dist/commonjs/react/optimisticallySendMessage.d.ts +2 -2
  27. package/dist/commonjs/react/optimisticallySendMessage.d.ts.map +1 -1
  28. package/dist/commonjs/react/toUIMessages.d.ts +2 -2
  29. package/dist/commonjs/react/toUIMessages.d.ts.map +1 -1
  30. package/dist/commonjs/react/toUIMessages.js +1 -1
  31. package/dist/commonjs/react/toUIMessages.js.map +1 -1
  32. package/dist/commonjs/react/usePaginatedQuery.d.ts.map +1 -1
  33. package/dist/commonjs/react/usePaginatedQuery.js +0 -1
  34. package/dist/commonjs/react/usePaginatedQuery.js.map +1 -1
  35. package/dist/commonjs/shared.d.ts +1 -1
  36. package/dist/commonjs/shared.d.ts.map +1 -1
  37. package/dist/commonjs/validators.d.ts +161 -161
  38. package/dist/commonjs/vitest.config.d.ts +3 -0
  39. package/dist/commonjs/vitest.config.d.ts.map +1 -0
  40. package/dist/commonjs/vitest.config.js +7 -0
  41. package/dist/commonjs/vitest.config.js.map +1 -0
  42. package/dist/commonjs.tsbuildinfo +1 -1
  43. package/dist/esm/client/index.d.ts +17 -17
  44. package/dist/esm/client/streaming.d.ts +3 -3
  45. package/dist/esm/client/streaming.d.ts.map +1 -1
  46. package/dist/esm/component/apiKeys.js +1 -1
  47. package/dist/esm/component/apiKeys.js.map +1 -1
  48. package/dist/esm/component/messages.d.ts +27 -27
  49. package/dist/esm/component/schema.d.ts +48 -48
  50. package/dist/esm/component/streams.d.ts.map +1 -1
  51. package/dist/esm/component/streams.js +4 -4
  52. package/dist/esm/component/streams.js.map +1 -1
  53. package/dist/esm/component/threads.d.ts +8 -8
  54. package/dist/esm/mapping.d.ts +1 -1
  55. package/dist/esm/mapping.d.ts.map +1 -1
  56. package/dist/esm/react/deltas.d.ts +4 -4
  57. package/dist/esm/react/deltas.d.ts.map +1 -1
  58. package/dist/esm/react/deltas.js +1 -1
  59. package/dist/esm/react/deltas.js.map +1 -1
  60. package/dist/esm/react/index.d.ts +5 -5
  61. package/dist/esm/react/index.d.ts.map +1 -1
  62. package/dist/esm/react/index.js +5 -5
  63. package/dist/esm/react/index.js.map +1 -1
  64. package/dist/esm/react/optimisticallySendMessage.d.ts +2 -2
  65. package/dist/esm/react/optimisticallySendMessage.d.ts.map +1 -1
  66. package/dist/esm/react/toUIMessages.d.ts +2 -2
  67. package/dist/esm/react/toUIMessages.d.ts.map +1 -1
  68. package/dist/esm/react/toUIMessages.js +1 -1
  69. package/dist/esm/react/toUIMessages.js.map +1 -1
  70. package/dist/esm/react/usePaginatedQuery.d.ts.map +1 -1
  71. package/dist/esm/react/usePaginatedQuery.js +0 -1
  72. package/dist/esm/react/usePaginatedQuery.js.map +1 -1
  73. package/dist/esm/shared.d.ts +1 -1
  74. package/dist/esm/shared.d.ts.map +1 -1
  75. package/dist/esm/validators.d.ts +19 -19
  76. package/dist/esm/vitest.config.d.ts +3 -0
  77. package/dist/esm/vitest.config.d.ts.map +1 -0
  78. package/dist/esm/vitest.config.js +7 -0
  79. package/dist/esm/vitest.config.js.map +1 -0
  80. package/dist/esm.tsbuildinfo +1 -1
  81. package/package.json +6 -5
  82. package/src/client/index.test.ts +271 -4
  83. package/src/client/streaming.ts +3 -3
  84. package/src/component/apiKeys.ts +1 -1
  85. package/src/component/streams.ts +9 -5
  86. package/src/mapping.test.ts +4 -4
  87. package/src/mapping.ts +1 -1
  88. package/src/react/deltas.test.ts +17 -3
  89. package/src/react/deltas.ts +4 -4
  90. package/src/react/index.ts +10 -10
  91. package/src/react/optimisticallySendMessage.ts +2 -2
  92. package/src/react/toUIMessages.test.ts +2 -8
  93. package/src/react/toUIMessages.ts +3 -3
  94. package/src/react/usePaginatedQuery.ts +0 -1
  95. package/src/shared.ts +1 -1
  96. package/src/validators.test.ts +4 -4
  97. package/src/vitest.config.ts +7 -0
@@ -14,8 +14,8 @@ export declare const listThreadsByUserId: import("convex/server").RegisteredQuer
14
14
  } | undefined;
15
15
  }, Promise<{
16
16
  page: {
17
- userId?: string | undefined;
18
17
  title?: string | undefined;
18
+ userId?: string | undefined;
19
19
  summary?: string | undefined;
20
20
  _id: string;
21
21
  _creationTime: number;
@@ -30,8 +30,8 @@ export declare const listThreadsByUserId: import("convex/server").RegisteredQuer
30
30
  export declare const getThread: import("convex/server").RegisteredQuery<"public", {
31
31
  threadId: import("convex/values").GenericId<"threads">;
32
32
  }, Promise<{
33
- userId?: string | undefined;
34
33
  title?: string | undefined;
34
+ userId?: string | undefined;
35
35
  summary?: string | undefined;
36
36
  _id: string;
37
37
  _creationTime: number;
@@ -41,13 +41,13 @@ export declare const getThread: import("convex/server").RegisteredQuery<"public"
41
41
  export declare const updateThread: import("convex/server").RegisteredMutation<"public", {
42
42
  threadId: import("convex/values").GenericId<"threads">;
43
43
  patch: {
44
- status?: "active" | "archived" | undefined;
45
44
  title?: string | undefined;
45
+ status?: "active" | "archived" | undefined;
46
46
  summary?: string | undefined;
47
47
  };
48
48
  }, Promise<{
49
- userId?: string | undefined;
50
49
  title?: string | undefined;
50
+ userId?: string | undefined;
51
51
  summary?: string | undefined;
52
52
  _id: string;
53
53
  _creationTime: number;
@@ -63,27 +63,22 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
63
63
  failPendingSteps?: boolean | undefined;
64
64
  embeddings?: {
65
65
  model: string;
66
- dimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096;
66
+ dimension: 1024 | 128 | 256 | 512 | 768 | 1408 | 1536 | 2048 | 3072 | 4096;
67
67
  vectors: (number[] | null)[];
68
68
  } | undefined;
69
- threadId: import("convex/values").GenericId<"threads">;
70
69
  messages: {
70
+ text?: string | undefined;
71
71
  id?: string | undefined;
72
+ reasoning?: string | undefined;
72
73
  fileIds?: import("convex/values").GenericId<"files">[] | undefined;
74
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
73
75
  error?: string | undefined;
74
76
  model?: string | undefined;
75
77
  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
78
  providerMetadata?: Record<string, Record<string, any>> | undefined;
84
79
  sources?: {
85
- title?: string | undefined;
86
80
  providerOptions?: Record<string, Record<string, any>> | undefined;
81
+ title?: string | undefined;
87
82
  id: string;
88
83
  sourceType: "url";
89
84
  url: string;
@@ -96,6 +91,11 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
96
91
  type: "redacted";
97
92
  data: string;
98
93
  })[] | undefined;
94
+ usage?: {
95
+ promptTokens: number;
96
+ completionTokens: number;
97
+ totalTokens: number;
98
+ } | undefined;
99
99
  warnings?: ({
100
100
  details?: string | undefined;
101
101
  type: "unsupported-setting";
@@ -108,7 +108,6 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
108
108
  type: "other";
109
109
  message: string;
110
110
  })[] | undefined;
111
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
112
111
  message: {
113
112
  providerOptions?: Record<string, Record<string, any>> | undefined;
114
113
  role: "user";
@@ -183,17 +182,13 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
183
182
  content: string;
184
183
  };
185
184
  }[];
185
+ threadId: import("convex/values").GenericId<"threads">;
186
186
  }, Promise<{
187
187
  messages: {
188
+ text?: string | undefined;
188
189
  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
190
  providerOptions?: Record<string, Record<string, any>> | undefined;
191
+ reasoning?: string | undefined;
197
192
  message?: {
198
193
  providerOptions?: Record<string, Record<string, any>> | undefined;
199
194
  role: "user";
@@ -267,17 +262,15 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
267
262
  role: "system";
268
263
  content: string;
269
264
  } | undefined;
270
- text?: string | undefined;
271
- reasoning?: string | undefined;
272
- usage?: {
273
- promptTokens: number;
274
- completionTokens: number;
275
- totalTokens: number;
276
- } | undefined;
265
+ fileIds?: string[] | undefined;
266
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
267
+ error?: string | undefined;
268
+ model?: string | undefined;
269
+ provider?: string | undefined;
277
270
  providerMetadata?: Record<string, Record<string, any>> | undefined;
278
271
  sources?: {
279
- title?: string | undefined;
280
272
  providerOptions?: Record<string, Record<string, any>> | undefined;
273
+ title?: string | undefined;
281
274
  id: string;
282
275
  sourceType: "url";
283
276
  url: string;
@@ -290,6 +283,11 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
290
283
  type: "redacted";
291
284
  data: string;
292
285
  })[] | undefined;
286
+ usage?: {
287
+ promptTokens: number;
288
+ completionTokens: number;
289
+ totalTokens: number;
290
+ } | undefined;
293
291
  warnings?: ({
294
292
  details?: string | undefined;
295
293
  type: "unsupported-setting";
@@ -302,29 +300,26 @@ export declare const addMessages: import("convex/server").RegisteredMutation<"pu
302
300
  type: "other";
303
301
  message: string;
304
302
  })[] | undefined;
305
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
303
+ userId?: string | undefined;
304
+ embeddingId?: string | undefined;
305
+ agentName?: string | undefined;
306
+ tool: boolean;
306
307
  _id: string;
307
308
  _creationTime: number;
308
309
  status: "pending" | "success" | "failed";
309
310
  order: number;
310
311
  threadId: string;
311
312
  stepOrder: number;
312
- tool: boolean;
313
313
  }[];
314
314
  }>>;
315
315
  export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, order?: number): Promise<{
316
316
  _id: import("convex/values").GenericId<"messages">;
317
317
  _creationTime: number;
318
+ text?: string | undefined;
318
319
  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
320
  providerOptions?: Record<string, Record<string, any>> | undefined;
321
+ reasoning?: string | undefined;
322
+ files?: any[] | undefined;
328
323
  message?: {
329
324
  providerOptions?: Record<string, Record<string, any>> | undefined;
330
325
  role: "user";
@@ -398,17 +393,15 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
398
393
  role: "system";
399
394
  content: string;
400
395
  } | undefined;
401
- text?: string | undefined;
402
- reasoning?: string | undefined;
403
- usage?: {
404
- promptTokens: number;
405
- completionTokens: number;
406
- totalTokens: number;
407
- } | undefined;
396
+ fileIds?: import("convex/values").GenericId<"files">[] | undefined;
397
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
398
+ error?: string | undefined;
399
+ model?: string | undefined;
400
+ provider?: string | undefined;
408
401
  providerMetadata?: Record<string, Record<string, any>> | undefined;
409
402
  sources?: {
410
- title?: string | undefined;
411
403
  providerOptions?: Record<string, Record<string, any>> | undefined;
404
+ title?: string | undefined;
412
405
  id: string;
413
406
  sourceType: "url";
414
407
  url: string;
@@ -421,6 +414,11 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
421
414
  type: "redacted";
422
415
  data: string;
423
416
  })[] | undefined;
417
+ usage?: {
418
+ promptTokens: number;
419
+ completionTokens: number;
420
+ totalTokens: number;
421
+ } | undefined;
424
422
  warnings?: ({
425
423
  details?: string | undefined;
426
424
  type: "unsupported-setting";
@@ -433,14 +431,16 @@ export declare function getMaxMessage(ctx: QueryCtx, threadId: Id<"threads">, or
433
431
  type: "other";
434
432
  message: string;
435
433
  })[] | undefined;
436
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
434
+ userId?: string | undefined;
435
+ embeddingId?: import("convex/values").GenericId<"embeddings_1024" | "embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
436
+ agentName?: string | undefined;
437
437
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
438
438
  stepId?: string | undefined;
439
+ tool: boolean;
439
440
  status: "pending" | "success" | "failed";
440
441
  order: number;
441
442
  threadId: import("convex/values").GenericId<"threads">;
442
443
  stepOrder: number;
443
- tool: boolean;
444
444
  } | null>;
445
445
  export declare const rollbackMessage: import("convex/server").RegisteredMutation<"public", {
446
446
  error?: string | undefined;
@@ -466,15 +466,10 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
466
466
  threadId: import("convex/values").GenericId<"threads">;
467
467
  }, Promise<{
468
468
  page: {
469
+ text?: string | undefined;
469
470
  id?: string | undefined;
470
- userId?: string | undefined;
471
- embeddingId?: string | undefined;
472
- fileIds?: string[] | undefined;
473
- error?: string | undefined;
474
- agentName?: string | undefined;
475
- model?: string | undefined;
476
- provider?: string | undefined;
477
471
  providerOptions?: Record<string, Record<string, any>> | undefined;
472
+ reasoning?: string | undefined;
478
473
  message?: {
479
474
  providerOptions?: Record<string, Record<string, any>> | undefined;
480
475
  role: "user";
@@ -548,17 +543,15 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
548
543
  role: "system";
549
544
  content: string;
550
545
  } | undefined;
551
- text?: string | undefined;
552
- reasoning?: string | undefined;
553
- usage?: {
554
- promptTokens: number;
555
- completionTokens: number;
556
- totalTokens: number;
557
- } | undefined;
546
+ fileIds?: string[] | undefined;
547
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
548
+ error?: string | undefined;
549
+ model?: string | undefined;
550
+ provider?: string | undefined;
558
551
  providerMetadata?: Record<string, Record<string, any>> | undefined;
559
552
  sources?: {
560
- title?: string | undefined;
561
553
  providerOptions?: Record<string, Record<string, any>> | undefined;
554
+ title?: string | undefined;
562
555
  id: string;
563
556
  sourceType: "url";
564
557
  url: string;
@@ -571,6 +564,11 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
571
564
  type: "redacted";
572
565
  data: string;
573
566
  })[] | undefined;
567
+ usage?: {
568
+ promptTokens: number;
569
+ completionTokens: number;
570
+ totalTokens: number;
571
+ } | undefined;
574
572
  warnings?: ({
575
573
  details?: string | undefined;
576
574
  type: "unsupported-setting";
@@ -583,14 +581,16 @@ export declare const listMessagesByThreadId: import("convex/server").RegisteredQ
583
581
  type: "other";
584
582
  message: string;
585
583
  })[] | undefined;
586
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
584
+ userId?: string | undefined;
585
+ embeddingId?: string | undefined;
586
+ agentName?: string | undefined;
587
+ tool: boolean;
587
588
  _id: string;
588
589
  _creationTime: number;
589
590
  status: "pending" | "success" | "failed";
590
591
  order: number;
591
592
  threadId: string;
592
593
  stepOrder: number;
593
- tool: boolean;
594
594
  }[];
595
595
  isDone: boolean;
596
596
  continueCursor: import("convex/server").Cursor;
@@ -602,16 +602,11 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
602
602
  }, Promise<({
603
603
  _id: import("convex/values").GenericId<"messages">;
604
604
  _creationTime: number;
605
+ text?: string | undefined;
605
606
  id?: string | undefined;
606
- userId?: string | undefined;
607
- 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;
608
- fileIds?: import("convex/values").GenericId<"files">[] | undefined;
609
- files?: any[] | undefined;
610
- error?: string | undefined;
611
- agentName?: string | undefined;
612
- model?: string | undefined;
613
- provider?: string | undefined;
614
607
  providerOptions?: Record<string, Record<string, any>> | undefined;
608
+ reasoning?: string | undefined;
609
+ files?: any[] | undefined;
615
610
  message?: {
616
611
  providerOptions?: Record<string, Record<string, any>> | undefined;
617
612
  role: "user";
@@ -685,17 +680,15 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
685
680
  role: "system";
686
681
  content: string;
687
682
  } | undefined;
688
- text?: string | undefined;
689
- reasoning?: string | undefined;
690
- usage?: {
691
- promptTokens: number;
692
- completionTokens: number;
693
- totalTokens: number;
694
- } | undefined;
683
+ fileIds?: import("convex/values").GenericId<"files">[] | undefined;
684
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
685
+ error?: string | undefined;
686
+ model?: string | undefined;
687
+ provider?: string | undefined;
695
688
  providerMetadata?: Record<string, Record<string, any>> | undefined;
696
689
  sources?: {
697
- title?: string | undefined;
698
690
  providerOptions?: Record<string, Record<string, any>> | undefined;
691
+ title?: string | undefined;
699
692
  id: string;
700
693
  sourceType: "url";
701
694
  url: string;
@@ -708,6 +701,11 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
708
701
  type: "redacted";
709
702
  data: string;
710
703
  })[] | undefined;
704
+ usage?: {
705
+ promptTokens: number;
706
+ completionTokens: number;
707
+ totalTokens: number;
708
+ } | undefined;
711
709
  warnings?: ({
712
710
  details?: string | undefined;
713
711
  type: "unsupported-setting";
@@ -720,23 +718,25 @@ export declare const getMessagesByIds: import("convex/server").RegisteredQuery<"
720
718
  type: "other";
721
719
  message: string;
722
720
  })[] | undefined;
723
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
721
+ userId?: string | undefined;
722
+ embeddingId?: import("convex/values").GenericId<"embeddings_1024" | "embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"> | undefined;
723
+ agentName?: string | undefined;
724
724
  parentMessageId?: import("convex/values").GenericId<"messages"> | undefined;
725
725
  stepId?: string | undefined;
726
+ tool: boolean;
726
727
  status: "pending" | "success" | "failed";
727
728
  order: number;
728
729
  threadId: import("convex/values").GenericId<"threads">;
729
730
  stepOrder: number;
730
- tool: boolean;
731
731
  } | null)[]>>;
732
732
  /** @deprecated Use listMessagesByThreadId instead. */
733
733
  export declare const getThreadMessages: import("convex/server").RegisteredQuery<"public", {
734
734
  deprecated: "Use listMessagesByThreadId instead";
735
735
  }, Promise<never>>;
736
736
  export declare const searchMessages: import("convex/server").RegisteredAction<"public", {
737
- threadId?: import("convex/values").GenericId<"threads"> | undefined;
738
737
  text?: string | undefined;
739
738
  vector?: number[] | undefined;
739
+ threadId?: import("convex/values").GenericId<"threads"> | undefined;
740
740
  vectorModel?: string | undefined;
741
741
  vectorScoreThreshold?: number | undefined;
742
742
  messageRange?: {
@@ -747,15 +747,10 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
747
747
  searchAllMessagesForUserId?: string | undefined;
748
748
  limit: number;
749
749
  }, Promise<{
750
+ text?: string | undefined;
750
751
  id?: string | undefined;
751
- userId?: string | undefined;
752
- embeddingId?: string | undefined;
753
- fileIds?: string[] | undefined;
754
- error?: string | undefined;
755
- agentName?: string | undefined;
756
- model?: string | undefined;
757
- provider?: string | undefined;
758
752
  providerOptions?: Record<string, Record<string, any>> | undefined;
753
+ reasoning?: string | undefined;
759
754
  message?: {
760
755
  providerOptions?: Record<string, Record<string, any>> | undefined;
761
756
  role: "user";
@@ -829,17 +824,15 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
829
824
  role: "system";
830
825
  content: string;
831
826
  } | undefined;
832
- text?: string | undefined;
833
- reasoning?: string | undefined;
834
- usage?: {
835
- promptTokens: number;
836
- completionTokens: number;
837
- totalTokens: number;
838
- } | undefined;
827
+ fileIds?: string[] | undefined;
828
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
829
+ error?: string | undefined;
830
+ model?: string | undefined;
831
+ provider?: string | undefined;
839
832
  providerMetadata?: Record<string, Record<string, any>> | undefined;
840
833
  sources?: {
841
- title?: string | undefined;
842
834
  providerOptions?: Record<string, Record<string, any>> | undefined;
835
+ title?: string | undefined;
843
836
  id: string;
844
837
  sourceType: "url";
845
838
  url: string;
@@ -852,6 +845,11 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
852
845
  type: "redacted";
853
846
  data: string;
854
847
  })[] | undefined;
848
+ usage?: {
849
+ promptTokens: number;
850
+ completionTokens: number;
851
+ totalTokens: number;
852
+ } | undefined;
855
853
  warnings?: ({
856
854
  details?: string | undefined;
857
855
  type: "unsupported-setting";
@@ -864,29 +862,26 @@ export declare const searchMessages: import("convex/server").RegisteredAction<"p
864
862
  type: "other";
865
863
  message: string;
866
864
  })[] | undefined;
867
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
865
+ userId?: string | undefined;
866
+ embeddingId?: string | undefined;
867
+ agentName?: string | undefined;
868
+ tool: boolean;
868
869
  _id: string;
869
870
  _creationTime: number;
870
871
  status: "pending" | "success" | "failed";
871
872
  order: number;
872
873
  threadId: string;
873
874
  stepOrder: number;
874
- tool: boolean;
875
875
  }[]>>;
876
876
  export declare const _fetchSearchMessages: import("convex/server").RegisteredQuery<"internal", {
877
877
  threadId?: import("convex/values").GenericId<"threads"> | undefined;
878
878
  beforeMessageId?: import("convex/values").GenericId<"messages"> | undefined;
879
879
  searchAllMessagesForUserId?: string | undefined;
880
880
  textSearchMessages?: {
881
+ text?: string | undefined;
881
882
  id?: string | undefined;
882
- userId?: string | undefined;
883
- embeddingId?: string | undefined;
884
- fileIds?: string[] | undefined;
885
- error?: string | undefined;
886
- agentName?: string | undefined;
887
- model?: string | undefined;
888
- provider?: string | undefined;
889
883
  providerOptions?: Record<string, Record<string, any>> | undefined;
884
+ reasoning?: string | undefined;
890
885
  message?: {
891
886
  providerOptions?: Record<string, Record<string, any>> | undefined;
892
887
  role: "user";
@@ -960,17 +955,15 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
960
955
  role: "system";
961
956
  content: string;
962
957
  } | undefined;
963
- text?: string | undefined;
964
- reasoning?: string | undefined;
965
- usage?: {
966
- promptTokens: number;
967
- completionTokens: number;
968
- totalTokens: number;
969
- } | undefined;
958
+ fileIds?: string[] | undefined;
959
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
960
+ error?: string | undefined;
961
+ model?: string | undefined;
962
+ provider?: string | undefined;
970
963
  providerMetadata?: Record<string, Record<string, any>> | undefined;
971
964
  sources?: {
972
- title?: string | undefined;
973
965
  providerOptions?: Record<string, Record<string, any>> | undefined;
966
+ title?: string | undefined;
974
967
  id: string;
975
968
  sourceType: "url";
976
969
  url: string;
@@ -983,6 +976,11 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
983
976
  type: "redacted";
984
977
  data: string;
985
978
  })[] | undefined;
979
+ usage?: {
980
+ promptTokens: number;
981
+ completionTokens: number;
982
+ totalTokens: number;
983
+ } | undefined;
986
984
  warnings?: ({
987
985
  details?: string | undefined;
988
986
  type: "unsupported-setting";
@@ -995,31 +993,28 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
995
993
  type: "other";
996
994
  message: string;
997
995
  })[] | undefined;
998
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
996
+ userId?: string | undefined;
997
+ embeddingId?: string | undefined;
998
+ agentName?: string | undefined;
999
+ tool: boolean;
999
1000
  _id: string;
1000
1001
  _creationTime: number;
1001
1002
  status: "pending" | "success" | "failed";
1002
1003
  order: number;
1003
1004
  threadId: string;
1004
1005
  stepOrder: number;
1005
- tool: boolean;
1006
1006
  }[] | undefined;
1007
1007
  limit: number;
1008
1008
  messageRange: {
1009
1009
  before: number;
1010
1010
  after: number;
1011
1011
  };
1012
- 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">[];
1012
+ vectorIds: import("convex/values").GenericId<"embeddings_1024" | "embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096">[];
1013
1013
  }, Promise<{
1014
+ text?: string | undefined;
1014
1015
  id?: string | undefined;
1015
- userId?: string | undefined;
1016
- embeddingId?: string | undefined;
1017
- fileIds?: string[] | undefined;
1018
- error?: string | undefined;
1019
- agentName?: string | undefined;
1020
- model?: string | undefined;
1021
- provider?: string | undefined;
1022
1016
  providerOptions?: Record<string, Record<string, any>> | undefined;
1017
+ reasoning?: string | undefined;
1023
1018
  message?: {
1024
1019
  providerOptions?: Record<string, Record<string, any>> | undefined;
1025
1020
  role: "user";
@@ -1093,17 +1088,15 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1093
1088
  role: "system";
1094
1089
  content: string;
1095
1090
  } | undefined;
1096
- text?: string | undefined;
1097
- reasoning?: string | undefined;
1098
- usage?: {
1099
- promptTokens: number;
1100
- completionTokens: number;
1101
- totalTokens: number;
1102
- } | undefined;
1091
+ fileIds?: string[] | undefined;
1092
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
1093
+ error?: string | undefined;
1094
+ model?: string | undefined;
1095
+ provider?: string | undefined;
1103
1096
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1104
1097
  sources?: {
1105
- title?: string | undefined;
1106
1098
  providerOptions?: Record<string, Record<string, any>> | undefined;
1099
+ title?: string | undefined;
1107
1100
  id: string;
1108
1101
  sourceType: "url";
1109
1102
  url: string;
@@ -1116,6 +1109,11 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1116
1109
  type: "redacted";
1117
1110
  data: string;
1118
1111
  })[] | undefined;
1112
+ usage?: {
1113
+ promptTokens: number;
1114
+ completionTokens: number;
1115
+ totalTokens: number;
1116
+ } | undefined;
1119
1117
  warnings?: ({
1120
1118
  details?: string | undefined;
1121
1119
  type: "unsupported-setting";
@@ -1128,14 +1126,16 @@ export declare const _fetchSearchMessages: import("convex/server").RegisteredQue
1128
1126
  type: "other";
1129
1127
  message: string;
1130
1128
  })[] | undefined;
1131
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1129
+ userId?: string | undefined;
1130
+ embeddingId?: string | undefined;
1131
+ agentName?: string | undefined;
1132
+ tool: boolean;
1132
1133
  _id: string;
1133
1134
  _creationTime: number;
1134
1135
  status: "pending" | "success" | "failed";
1135
1136
  order: number;
1136
1137
  threadId: string;
1137
1138
  stepOrder: number;
1138
- tool: boolean;
1139
1139
  }[]>>;
1140
1140
  export declare const textSearch: import("convex/server").RegisteredQuery<"public", {
1141
1141
  threadId?: import("convex/values").GenericId<"threads"> | undefined;
@@ -1144,15 +1144,10 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1144
1144
  text: string;
1145
1145
  limit: number;
1146
1146
  }, Promise<{
1147
+ text?: string | undefined;
1147
1148
  id?: string | undefined;
1148
- userId?: string | undefined;
1149
- embeddingId?: string | undefined;
1150
- fileIds?: string[] | undefined;
1151
- error?: string | undefined;
1152
- agentName?: string | undefined;
1153
- model?: string | undefined;
1154
- provider?: string | undefined;
1155
1149
  providerOptions?: Record<string, Record<string, any>> | undefined;
1150
+ reasoning?: string | undefined;
1156
1151
  message?: {
1157
1152
  providerOptions?: Record<string, Record<string, any>> | undefined;
1158
1153
  role: "user";
@@ -1226,17 +1221,15 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1226
1221
  role: "system";
1227
1222
  content: string;
1228
1223
  } | undefined;
1229
- text?: string | undefined;
1230
- reasoning?: string | undefined;
1231
- usage?: {
1232
- promptTokens: number;
1233
- completionTokens: number;
1234
- totalTokens: number;
1235
- } | undefined;
1224
+ fileIds?: string[] | undefined;
1225
+ finishReason?: "length" | "stop" | "content-filter" | "tool-calls" | "error" | "other" | "unknown" | undefined;
1226
+ error?: string | undefined;
1227
+ model?: string | undefined;
1228
+ provider?: string | undefined;
1236
1229
  providerMetadata?: Record<string, Record<string, any>> | undefined;
1237
1230
  sources?: {
1238
- title?: string | undefined;
1239
1231
  providerOptions?: Record<string, Record<string, any>> | undefined;
1232
+ title?: string | undefined;
1240
1233
  id: string;
1241
1234
  sourceType: "url";
1242
1235
  url: string;
@@ -1249,6 +1242,11 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1249
1242
  type: "redacted";
1250
1243
  data: string;
1251
1244
  })[] | undefined;
1245
+ usage?: {
1246
+ promptTokens: number;
1247
+ completionTokens: number;
1248
+ totalTokens: number;
1249
+ } | undefined;
1252
1250
  warnings?: ({
1253
1251
  details?: string | undefined;
1254
1252
  type: "unsupported-setting";
@@ -1261,13 +1259,15 @@ export declare const textSearch: import("convex/server").RegisteredQuery<"public
1261
1259
  type: "other";
1262
1260
  message: string;
1263
1261
  })[] | undefined;
1264
- finishReason?: "length" | "error" | "other" | "stop" | "content-filter" | "tool-calls" | "unknown" | undefined;
1262
+ userId?: string | undefined;
1263
+ embeddingId?: string | undefined;
1264
+ agentName?: string | undefined;
1265
+ tool: boolean;
1265
1266
  _id: string;
1266
1267
  _creationTime: number;
1267
1268
  status: "pending" | "success" | "failed";
1268
1269
  order: number;
1269
1270
  threadId: string;
1270
1271
  stepOrder: number;
1271
- tool: boolean;
1272
1272
  }[]>>;
1273
1273
  //# sourceMappingURL=messages.d.ts.map