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