@convex-dev/agent 0.0.1-alpha.4 → 0.0.2

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 (66) hide show
  1. package/README.md +35 -7
  2. package/dist/commonjs/client/index.d.ts +800 -84
  3. package/dist/commonjs/client/index.d.ts.map +1 -1
  4. package/dist/commonjs/client/index.js +176 -130
  5. package/dist/commonjs/client/index.js.map +1 -1
  6. package/dist/commonjs/component/messages.d.ts +124 -105
  7. package/dist/commonjs/component/messages.d.ts.map +1 -1
  8. package/dist/commonjs/component/messages.js +145 -247
  9. package/dist/commonjs/component/messages.js.map +1 -1
  10. package/dist/commonjs/component/schema.d.ts +822 -746
  11. package/dist/commonjs/component/schema.d.ts.map +1 -1
  12. package/dist/commonjs/component/schema.js +13 -3
  13. package/dist/commonjs/component/schema.js.map +1 -1
  14. package/dist/commonjs/component/vector/index.d.ts +21 -6
  15. package/dist/commonjs/component/vector/index.d.ts.map +1 -1
  16. package/dist/commonjs/component/vector/index.js +32 -20
  17. package/dist/commonjs/component/vector/index.js.map +1 -1
  18. package/dist/commonjs/component/vector/tables.d.ts +25 -5
  19. package/dist/commonjs/component/vector/tables.d.ts.map +1 -1
  20. package/dist/commonjs/component/vector/tables.js +14 -6
  21. package/dist/commonjs/component/vector/tables.js.map +1 -1
  22. package/dist/commonjs/mapping.d.ts +3 -2
  23. package/dist/commonjs/mapping.d.ts.map +1 -1
  24. package/dist/commonjs/mapping.js +45 -13
  25. package/dist/commonjs/mapping.js.map +1 -1
  26. package/dist/commonjs/validators.d.ts +2817 -145
  27. package/dist/commonjs/validators.d.ts.map +1 -1
  28. package/dist/commonjs/validators.js +79 -7
  29. package/dist/commonjs/validators.js.map +1 -1
  30. package/dist/esm/client/index.d.ts +800 -84
  31. package/dist/esm/client/index.d.ts.map +1 -1
  32. package/dist/esm/client/index.js +176 -130
  33. package/dist/esm/client/index.js.map +1 -1
  34. package/dist/esm/component/messages.d.ts +124 -105
  35. package/dist/esm/component/messages.d.ts.map +1 -1
  36. package/dist/esm/component/messages.js +145 -247
  37. package/dist/esm/component/messages.js.map +1 -1
  38. package/dist/esm/component/schema.d.ts +822 -746
  39. package/dist/esm/component/schema.d.ts.map +1 -1
  40. package/dist/esm/component/schema.js +13 -3
  41. package/dist/esm/component/schema.js.map +1 -1
  42. package/dist/esm/component/vector/index.d.ts +21 -6
  43. package/dist/esm/component/vector/index.d.ts.map +1 -1
  44. package/dist/esm/component/vector/index.js +32 -20
  45. package/dist/esm/component/vector/index.js.map +1 -1
  46. package/dist/esm/component/vector/tables.d.ts +25 -5
  47. package/dist/esm/component/vector/tables.d.ts.map +1 -1
  48. package/dist/esm/component/vector/tables.js +14 -6
  49. package/dist/esm/component/vector/tables.js.map +1 -1
  50. package/dist/esm/mapping.d.ts +3 -2
  51. package/dist/esm/mapping.d.ts.map +1 -1
  52. package/dist/esm/mapping.js +45 -13
  53. package/dist/esm/mapping.js.map +1 -1
  54. package/dist/esm/validators.d.ts +2817 -145
  55. package/dist/esm/validators.d.ts.map +1 -1
  56. package/dist/esm/validators.js +79 -7
  57. package/dist/esm/validators.js.map +1 -1
  58. package/package.json +7 -7
  59. package/src/client/index.ts +347 -170
  60. package/src/component/_generated/api.d.ts +33 -16
  61. package/src/component/messages.ts +177 -290
  62. package/src/component/schema.ts +14 -3
  63. package/src/component/vector/index.ts +59 -26
  64. package/src/component/vector/tables.ts +38 -6
  65. package/src/mapping.ts +60 -19
  66. package/src/validators.ts +112 -12
@@ -40,6 +40,11 @@ export type Mounts = {
40
40
  "public",
41
41
  {
42
42
  agentName?: string;
43
+ embeddings?: {
44
+ dimension: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
45
+ model: string;
46
+ vectors: Array<Array<number> | null>;
47
+ };
43
48
  failPendingSteps?: boolean;
44
49
  messages: Array<{
45
50
  fileId?: string;
@@ -146,7 +151,7 @@ export type Mounts = {
146
151
  parentMessageId?: string;
147
152
  pending?: boolean;
148
153
  stepId?: string;
149
- threadId?: string;
154
+ threadId: string;
150
155
  userId?: string;
151
156
  },
152
157
  {
@@ -164,6 +169,7 @@ export type Mounts = {
164
169
  | string
165
170
  | string
166
171
  | string;
172
+ error?: string;
167
173
  fileId?: string;
168
174
  id?: string;
169
175
  message?:
@@ -268,9 +274,9 @@ export type Mounts = {
268
274
  parentMessageId?: string;
269
275
  status: "pending" | "success" | "failed";
270
276
  stepId?: string;
271
- stepOrder?: number;
277
+ stepOrder: number;
272
278
  text?: string;
273
- threadId?: string;
279
+ threadId: string;
274
280
  tool: boolean;
275
281
  userId?: string;
276
282
  }>;
@@ -288,6 +294,7 @@ export type Mounts = {
288
294
  | string
289
295
  | string
290
296
  | string;
297
+ error?: string;
291
298
  fileId?: string;
292
299
  id?: string;
293
300
  message?:
@@ -392,21 +399,26 @@ export type Mounts = {
392
399
  parentMessageId?: string;
393
400
  status: "pending" | "success" | "failed";
394
401
  stepId?: string;
395
- stepOrder?: number;
402
+ stepOrder: number;
396
403
  text?: string;
397
- threadId?: string;
404
+ threadId: string;
398
405
  tool: boolean;
399
406
  userId?: string;
400
407
  };
401
408
  }
402
409
  >;
403
- addSteps: FunctionReference<
410
+ addStep: FunctionReference<
404
411
  "mutation",
405
412
  "public",
406
413
  {
414
+ embeddings?: {
415
+ dimension: 128 | 256 | 512 | 768 | 1024 | 1536 | 2048 | 3072 | 4096;
416
+ model: string;
417
+ vectors: Array<Array<number> | null>;
418
+ };
407
419
  failPendingSteps?: boolean;
408
420
  messageId: string;
409
- steps: Array<{
421
+ step: {
410
422
  messages: Array<{
411
423
  fileId?: string;
412
424
  id?: string;
@@ -709,7 +721,7 @@ export type Mounts = {
709
721
  | { message: string; type: "other" }
710
722
  >;
711
723
  };
712
- }>;
724
+ };
713
725
  threadId: string;
714
726
  },
715
727
  Array<{
@@ -1048,6 +1060,7 @@ export type Mounts = {
1048
1060
  | string
1049
1061
  | string
1050
1062
  | string;
1063
+ error?: string;
1051
1064
  fileId?: string;
1052
1065
  id?: string;
1053
1066
  message?:
@@ -1152,9 +1165,9 @@ export type Mounts = {
1152
1165
  parentMessageId?: string;
1153
1166
  status: "pending" | "success" | "failed";
1154
1167
  stepId?: string;
1155
- stepOrder?: number;
1168
+ stepOrder: number;
1156
1169
  text?: string;
1157
- threadId?: string;
1170
+ threadId: string;
1158
1171
  tool: boolean;
1159
1172
  userId?: string;
1160
1173
  }>;
@@ -1167,7 +1180,7 @@ export type Mounts = {
1167
1180
  cursor?: string | null;
1168
1181
  limit?: number;
1169
1182
  offset?: number;
1170
- statuses?: Array<"active" | "archived">;
1183
+ statuses?: "active" | "archived";
1171
1184
  userId: string;
1172
1185
  },
1173
1186
  {
@@ -1204,6 +1217,7 @@ export type Mounts = {
1204
1217
  userId?: string;
1205
1218
  vector?: Array<number>;
1206
1219
  vectorModel?: string;
1220
+ vectorScoreThreshold?: number;
1207
1221
  },
1208
1222
  Array<{
1209
1223
  _creationTime: number;
@@ -1219,6 +1233,7 @@ export type Mounts = {
1219
1233
  | string
1220
1234
  | string
1221
1235
  | string;
1236
+ error?: string;
1222
1237
  fileId?: string;
1223
1238
  id?: string;
1224
1239
  message?:
@@ -1323,9 +1338,9 @@ export type Mounts = {
1323
1338
  parentMessageId?: string;
1324
1339
  status: "pending" | "success" | "failed";
1325
1340
  stepId?: string;
1326
- stepOrder?: number;
1341
+ stepOrder: number;
1327
1342
  text?: string;
1328
- threadId?: string;
1343
+ threadId: string;
1329
1344
  tool: boolean;
1330
1345
  userId?: string;
1331
1346
  }>
@@ -1348,6 +1363,7 @@ export type Mounts = {
1348
1363
  | string
1349
1364
  | string
1350
1365
  | string;
1366
+ error?: string;
1351
1367
  fileId?: string;
1352
1368
  id?: string;
1353
1369
  message?:
@@ -1452,9 +1468,9 @@ export type Mounts = {
1452
1468
  parentMessageId?: string;
1453
1469
  status: "pending" | "success" | "failed";
1454
1470
  stepId?: string;
1455
- stepOrder?: number;
1471
+ stepOrder: number;
1456
1472
  text?: string;
1457
- threadId?: string;
1473
+ threadId: string;
1458
1474
  tool: boolean;
1459
1475
  userId?: string;
1460
1476
  }>
@@ -1540,8 +1556,8 @@ export type Mounts = {
1540
1556
  | 3072
1541
1557
  | 4096;
1542
1558
  vectors: Array<{
1543
- kind: "thread" | "memory";
1544
1559
  model: string;
1560
+ table: string;
1545
1561
  threadId?: string;
1546
1562
  userId?: string;
1547
1563
  vector: Array<number>;
@@ -1555,6 +1571,7 @@ export type Mounts = {
1555
1571
  {
1556
1572
  cursor?: string;
1557
1573
  limit: number;
1574
+ table?: string;
1558
1575
  targetModel: string;
1559
1576
  vectorDimension:
1560
1577
  | 128