@mastra/dynamodb 0.0.0-working-memory-per-user-20250620163010 → 0.0.0-zod-v4-compat-part-2-20250822105954

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 (54) hide show
  1. package/LICENSE.md +11 -42
  2. package/dist/entities/eval.d.ts +102 -0
  3. package/dist/entities/eval.d.ts.map +1 -0
  4. package/dist/entities/index.d.ts +732 -0
  5. package/dist/entities/index.d.ts.map +1 -0
  6. package/dist/entities/message.d.ts +100 -0
  7. package/dist/entities/message.d.ts.map +1 -0
  8. package/dist/entities/resource.d.ts +54 -0
  9. package/dist/entities/resource.d.ts.map +1 -0
  10. package/dist/entities/score.d.ts +215 -0
  11. package/dist/entities/score.d.ts.map +1 -0
  12. package/dist/entities/thread.d.ts +69 -0
  13. package/dist/entities/thread.d.ts.map +1 -0
  14. package/dist/entities/trace.d.ts +127 -0
  15. package/dist/entities/trace.d.ts.map +1 -0
  16. package/dist/entities/utils.d.ts +21 -0
  17. package/dist/entities/utils.d.ts.map +1 -0
  18. package/dist/entities/workflow-snapshot.d.ts +74 -0
  19. package/dist/entities/workflow-snapshot.d.ts.map +1 -0
  20. package/dist/index.cjs +2176 -516
  21. package/dist/index.cjs.map +1 -0
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +2163 -503
  25. package/dist/index.js.map +1 -0
  26. package/dist/storage/domains/legacy-evals/index.d.ts +19 -0
  27. package/dist/storage/domains/legacy-evals/index.d.ts.map +1 -0
  28. package/dist/storage/domains/memory/index.d.ts +77 -0
  29. package/dist/storage/domains/memory/index.d.ts.map +1 -0
  30. package/dist/storage/domains/operations/index.d.ts +69 -0
  31. package/dist/storage/domains/operations/index.d.ts.map +1 -0
  32. package/dist/storage/domains/score/index.d.ts +42 -0
  33. package/dist/storage/domains/score/index.d.ts.map +1 -0
  34. package/dist/storage/domains/traces/index.d.ts +28 -0
  35. package/dist/storage/domains/traces/index.d.ts.map +1 -0
  36. package/dist/storage/domains/workflows/index.d.ts +32 -0
  37. package/dist/storage/domains/workflows/index.d.ts.map +1 -0
  38. package/dist/storage/index.d.ts +220 -0
  39. package/dist/storage/index.d.ts.map +1 -0
  40. package/package.json +12 -12
  41. package/src/entities/index.ts +5 -1
  42. package/src/entities/resource.ts +57 -0
  43. package/src/entities/score.ts +285 -0
  44. package/src/storage/domains/legacy-evals/index.ts +243 -0
  45. package/src/storage/domains/memory/index.ts +894 -0
  46. package/src/storage/domains/operations/index.ts +433 -0
  47. package/src/storage/domains/score/index.ts +285 -0
  48. package/src/storage/domains/traces/index.ts +286 -0
  49. package/src/storage/domains/workflows/index.ts +297 -0
  50. package/src/storage/index.test.ts +1347 -1216
  51. package/src/storage/index.ts +211 -881
  52. package/dist/_tsup-dts-rollup.d.cts +0 -1157
  53. package/dist/_tsup-dts-rollup.d.ts +0 -1157
  54. package/dist/index.d.cts +0 -2
@@ -0,0 +1,732 @@
1
+ import type { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
2
+ import { Service } from 'electrodb';
3
+ export declare function getElectroDbService(client: DynamoDBDocumentClient, tableName: string): Service<{
4
+ thread: import("electrodb").Entity<string, string, string, {
5
+ model: {
6
+ entity: string;
7
+ version: string;
8
+ service: string;
9
+ };
10
+ attributes: {
11
+ id: {
12
+ type: "string";
13
+ required: true;
14
+ };
15
+ resourceId: {
16
+ type: "string";
17
+ required: true;
18
+ };
19
+ title: {
20
+ type: "string";
21
+ required: true;
22
+ };
23
+ metadata: {
24
+ type: "string";
25
+ required: false;
26
+ set: (value?: Record<string, unknown> | string) => string | undefined;
27
+ get: (value?: string) => any;
28
+ };
29
+ createdAt: {
30
+ readonly type: "string";
31
+ readonly required: true;
32
+ readonly readOnly: true;
33
+ readonly set: (value?: Date | string) => string;
34
+ readonly default: () => string;
35
+ };
36
+ updatedAt: {
37
+ readonly type: "string";
38
+ readonly required: true;
39
+ readonly set: (value?: Date | string) => string;
40
+ readonly default: () => string;
41
+ };
42
+ entity: {
43
+ type: "string";
44
+ required: true;
45
+ };
46
+ };
47
+ indexes: {
48
+ primary: {
49
+ pk: {
50
+ field: string;
51
+ composite: ("entity" | "id")[];
52
+ };
53
+ sk: {
54
+ field: string;
55
+ composite: "id"[];
56
+ };
57
+ };
58
+ byResource: {
59
+ index: string;
60
+ pk: {
61
+ field: string;
62
+ composite: ("entity" | "resourceId")[];
63
+ };
64
+ sk: {
65
+ field: string;
66
+ composite: "createdAt"[];
67
+ };
68
+ };
69
+ };
70
+ }>;
71
+ message: import("electrodb").Entity<string, string, string, {
72
+ model: {
73
+ entity: string;
74
+ version: string;
75
+ service: string;
76
+ };
77
+ attributes: {
78
+ id: {
79
+ type: "string";
80
+ required: true;
81
+ };
82
+ threadId: {
83
+ type: "string";
84
+ required: true;
85
+ };
86
+ content: {
87
+ type: "string";
88
+ required: true;
89
+ set: (value?: string | void | undefined) => string | void;
90
+ get: (value?: string) => any;
91
+ };
92
+ role: {
93
+ type: "string";
94
+ required: true;
95
+ };
96
+ type: {
97
+ type: "string";
98
+ default: string;
99
+ };
100
+ resourceId: {
101
+ type: "string";
102
+ required: false;
103
+ };
104
+ toolCallIds: {
105
+ type: "string";
106
+ required: false;
107
+ set: (value?: string[] | string) => string | undefined;
108
+ get: (value?: string) => any;
109
+ };
110
+ toolCallArgs: {
111
+ type: "string";
112
+ required: false;
113
+ set: (value?: Record<string, unknown>[] | string) => string | undefined;
114
+ get: (value?: string) => any;
115
+ };
116
+ toolNames: {
117
+ type: "string";
118
+ required: false;
119
+ set: (value?: string[] | string) => string | undefined;
120
+ get: (value?: string) => any;
121
+ };
122
+ createdAt: {
123
+ readonly type: "string";
124
+ readonly required: true;
125
+ readonly readOnly: true;
126
+ readonly set: (value?: Date | string) => string;
127
+ readonly default: () => string;
128
+ };
129
+ updatedAt: {
130
+ readonly type: "string";
131
+ readonly required: true;
132
+ readonly set: (value?: Date | string) => string;
133
+ readonly default: () => string;
134
+ };
135
+ metadata: {
136
+ readonly type: "string";
137
+ readonly set: (value?: Record<string, unknown> | string) => string | undefined;
138
+ readonly get: (value?: string) => any;
139
+ };
140
+ entity: {
141
+ type: "string";
142
+ required: true;
143
+ };
144
+ };
145
+ indexes: {
146
+ primary: {
147
+ pk: {
148
+ field: string;
149
+ composite: ("entity" | "id")[];
150
+ };
151
+ sk: {
152
+ field: string;
153
+ composite: "entity"[];
154
+ };
155
+ };
156
+ byThread: {
157
+ index: string;
158
+ pk: {
159
+ field: string;
160
+ composite: ("entity" | "threadId")[];
161
+ };
162
+ sk: {
163
+ field: string;
164
+ composite: "createdAt"[];
165
+ };
166
+ };
167
+ };
168
+ }>;
169
+ eval: import("electrodb").Entity<string, string, string, {
170
+ model: {
171
+ entity: string;
172
+ version: string;
173
+ service: string;
174
+ };
175
+ attributes: {
176
+ input: {
177
+ type: "string";
178
+ required: true;
179
+ };
180
+ output: {
181
+ type: "string";
182
+ required: true;
183
+ };
184
+ result: {
185
+ type: "string";
186
+ required: true;
187
+ set: (value?: any) => any;
188
+ get: (value?: string) => any;
189
+ };
190
+ agent_name: {
191
+ type: "string";
192
+ required: true;
193
+ };
194
+ metric_name: {
195
+ type: "string";
196
+ required: true;
197
+ };
198
+ instructions: {
199
+ type: "string";
200
+ required: true;
201
+ };
202
+ test_info: {
203
+ type: "string";
204
+ required: false;
205
+ set: (value?: any) => any;
206
+ get: (value?: string) => string | undefined;
207
+ };
208
+ global_run_id: {
209
+ type: "string";
210
+ required: true;
211
+ };
212
+ run_id: {
213
+ type: "string";
214
+ required: true;
215
+ };
216
+ created_at: {
217
+ type: "string";
218
+ required: true;
219
+ default: () => string;
220
+ set: (value?: Date | string) => string;
221
+ };
222
+ createdAt: {
223
+ readonly type: "string";
224
+ readonly required: true;
225
+ readonly readOnly: true;
226
+ readonly set: (value?: Date | string) => string;
227
+ readonly default: () => string;
228
+ };
229
+ updatedAt: {
230
+ readonly type: "string";
231
+ readonly required: true;
232
+ readonly set: (value?: Date | string) => string;
233
+ readonly default: () => string;
234
+ };
235
+ metadata: {
236
+ readonly type: "string";
237
+ readonly set: (value?: Record<string, unknown> | string) => string | undefined;
238
+ readonly get: (value?: string) => any;
239
+ };
240
+ entity: {
241
+ type: "string";
242
+ required: true;
243
+ };
244
+ };
245
+ indexes: {
246
+ primary: {
247
+ pk: {
248
+ field: string;
249
+ composite: ("entity" | "run_id")[];
250
+ };
251
+ sk: {
252
+ field: string;
253
+ composite: never[];
254
+ };
255
+ };
256
+ byAgent: {
257
+ index: string;
258
+ pk: {
259
+ field: string;
260
+ composite: ("entity" | "agent_name")[];
261
+ };
262
+ sk: {
263
+ field: string;
264
+ composite: "created_at"[];
265
+ };
266
+ };
267
+ };
268
+ }>;
269
+ trace: import("electrodb").Entity<string, string, string, {
270
+ model: {
271
+ entity: string;
272
+ version: string;
273
+ service: string;
274
+ };
275
+ attributes: {
276
+ id: {
277
+ type: "string";
278
+ required: true;
279
+ };
280
+ parentSpanId: {
281
+ type: "string";
282
+ required: false;
283
+ };
284
+ name: {
285
+ type: "string";
286
+ required: true;
287
+ };
288
+ traceId: {
289
+ type: "string";
290
+ required: true;
291
+ };
292
+ scope: {
293
+ type: "string";
294
+ required: true;
295
+ };
296
+ kind: {
297
+ type: "number";
298
+ required: true;
299
+ };
300
+ attributes: {
301
+ type: "string";
302
+ required: false;
303
+ set: (value?: any) => any;
304
+ get: (value?: string) => any;
305
+ };
306
+ status: {
307
+ type: "string";
308
+ required: false;
309
+ set: (value?: any) => any;
310
+ get: (value?: string) => string | undefined;
311
+ };
312
+ events: {
313
+ type: "string";
314
+ required: false;
315
+ set: (value?: any) => any;
316
+ get: (value?: string) => string | undefined;
317
+ };
318
+ links: {
319
+ type: "string";
320
+ required: false;
321
+ set: (value?: any) => any;
322
+ get: (value?: string) => string | undefined;
323
+ };
324
+ other: {
325
+ type: "string";
326
+ required: false;
327
+ };
328
+ startTime: {
329
+ type: "number";
330
+ required: true;
331
+ };
332
+ endTime: {
333
+ type: "number";
334
+ required: true;
335
+ };
336
+ createdAt: {
337
+ readonly type: "string";
338
+ readonly required: true;
339
+ readonly readOnly: true;
340
+ readonly set: (value?: Date | string) => string;
341
+ readonly default: () => string;
342
+ };
343
+ updatedAt: {
344
+ readonly type: "string";
345
+ readonly required: true;
346
+ readonly set: (value?: Date | string) => string;
347
+ readonly default: () => string;
348
+ };
349
+ metadata: {
350
+ readonly type: "string";
351
+ readonly set: (value?: Record<string, unknown> | string) => string | undefined;
352
+ readonly get: (value?: string) => any;
353
+ };
354
+ entity: {
355
+ type: "string";
356
+ required: true;
357
+ };
358
+ };
359
+ indexes: {
360
+ primary: {
361
+ pk: {
362
+ field: string;
363
+ composite: ("entity" | "id")[];
364
+ };
365
+ sk: {
366
+ field: string;
367
+ composite: never[];
368
+ };
369
+ };
370
+ byName: {
371
+ index: string;
372
+ pk: {
373
+ field: string;
374
+ composite: ("entity" | "name")[];
375
+ };
376
+ sk: {
377
+ field: string;
378
+ composite: "startTime"[];
379
+ };
380
+ };
381
+ byScope: {
382
+ index: string;
383
+ pk: {
384
+ field: string;
385
+ composite: ("entity" | "scope")[];
386
+ };
387
+ sk: {
388
+ field: string;
389
+ composite: "startTime"[];
390
+ };
391
+ };
392
+ };
393
+ }>;
394
+ workflow_snapshot: import("electrodb").Entity<string, string, string, {
395
+ model: {
396
+ entity: string;
397
+ version: string;
398
+ service: string;
399
+ };
400
+ attributes: {
401
+ workflow_name: {
402
+ type: "string";
403
+ required: true;
404
+ };
405
+ run_id: {
406
+ type: "string";
407
+ required: true;
408
+ };
409
+ snapshot: {
410
+ type: "string";
411
+ required: true;
412
+ set: (value?: any) => any;
413
+ get: (value?: string) => any;
414
+ };
415
+ resourceId: {
416
+ type: "string";
417
+ required: false;
418
+ };
419
+ createdAt: {
420
+ readonly type: "string";
421
+ readonly required: true;
422
+ readonly readOnly: true;
423
+ readonly set: (value?: Date | string) => string;
424
+ readonly default: () => string;
425
+ };
426
+ updatedAt: {
427
+ readonly type: "string";
428
+ readonly required: true;
429
+ readonly set: (value?: Date | string) => string;
430
+ readonly default: () => string;
431
+ };
432
+ metadata: {
433
+ readonly type: "string";
434
+ readonly set: (value?: Record<string, unknown> | string) => string | undefined;
435
+ readonly get: (value?: string) => any;
436
+ };
437
+ entity: {
438
+ type: "string";
439
+ required: true;
440
+ };
441
+ };
442
+ indexes: {
443
+ primary: {
444
+ pk: {
445
+ field: string;
446
+ composite: ("entity" | "workflow_name")[];
447
+ };
448
+ sk: {
449
+ field: string;
450
+ composite: "run_id"[];
451
+ };
452
+ };
453
+ gsi2: {
454
+ index: string;
455
+ pk: {
456
+ field: string;
457
+ composite: ("entity" | "run_id")[];
458
+ };
459
+ sk: {
460
+ field: string;
461
+ composite: "workflow_name"[];
462
+ };
463
+ };
464
+ };
465
+ }>;
466
+ resource: import("electrodb").Entity<string, string, string, {
467
+ model: {
468
+ entity: string;
469
+ version: string;
470
+ service: string;
471
+ };
472
+ attributes: {
473
+ id: {
474
+ type: "string";
475
+ required: true;
476
+ };
477
+ workingMemory: {
478
+ type: "string";
479
+ required: false;
480
+ };
481
+ metadata: {
482
+ type: "string";
483
+ required: false;
484
+ set: (value?: string | void | undefined) => string | void;
485
+ get: (value?: string) => any;
486
+ };
487
+ createdAt: {
488
+ readonly type: "string";
489
+ readonly required: true;
490
+ readonly readOnly: true;
491
+ readonly set: (value?: Date | string) => string;
492
+ readonly default: () => string;
493
+ };
494
+ updatedAt: {
495
+ readonly type: "string";
496
+ readonly required: true;
497
+ readonly set: (value?: Date | string) => string;
498
+ readonly default: () => string;
499
+ };
500
+ entity: {
501
+ type: "string";
502
+ required: true;
503
+ };
504
+ };
505
+ indexes: {
506
+ primary: {
507
+ pk: {
508
+ field: string;
509
+ composite: ("entity" | "id")[];
510
+ };
511
+ sk: {
512
+ field: string;
513
+ composite: "entity"[];
514
+ };
515
+ };
516
+ };
517
+ }>;
518
+ score: import("electrodb").Entity<string, string, string, {
519
+ model: {
520
+ entity: string;
521
+ version: string;
522
+ service: string;
523
+ };
524
+ attributes: {
525
+ id: {
526
+ type: "string";
527
+ required: true;
528
+ };
529
+ scorerId: {
530
+ type: "string";
531
+ required: true;
532
+ };
533
+ traceId: {
534
+ type: "string";
535
+ required: false;
536
+ };
537
+ runId: {
538
+ type: "string";
539
+ required: true;
540
+ };
541
+ scorer: {
542
+ type: "string";
543
+ required: true;
544
+ set: (value?: Record<string, unknown> | string) => string | undefined;
545
+ get: (value?: string) => any;
546
+ };
547
+ extractStepResult: {
548
+ type: "string";
549
+ required: false;
550
+ set: (value?: Record<string, unknown> | string) => string | undefined;
551
+ get: (value?: string) => any;
552
+ };
553
+ analyzeStepResult: {
554
+ type: "string";
555
+ required: false;
556
+ set: (value?: Record<string, unknown> | string) => string | undefined;
557
+ get: (value?: string) => any;
558
+ };
559
+ score: {
560
+ type: "number";
561
+ required: true;
562
+ };
563
+ reason: {
564
+ type: "string";
565
+ required: false;
566
+ };
567
+ extractPrompt: {
568
+ type: "string";
569
+ required: false;
570
+ };
571
+ analyzePrompt: {
572
+ type: "string";
573
+ required: false;
574
+ };
575
+ reasonPrompt: {
576
+ type: "string";
577
+ required: false;
578
+ };
579
+ input: {
580
+ type: "string";
581
+ required: true;
582
+ set: (value?: Record<string, unknown> | string) => string | undefined;
583
+ get: (value?: string) => any;
584
+ };
585
+ output: {
586
+ type: "string";
587
+ required: true;
588
+ set: (value?: Record<string, unknown> | string) => string | undefined;
589
+ get: (value?: string) => any;
590
+ };
591
+ additionalContext: {
592
+ type: "string";
593
+ required: false;
594
+ set: (value?: Record<string, unknown> | string) => string | undefined;
595
+ get: (value?: string) => any;
596
+ };
597
+ runtimeContext: {
598
+ type: "string";
599
+ required: false;
600
+ set: (value?: Record<string, unknown> | string) => string | undefined;
601
+ get: (value?: string) => any;
602
+ };
603
+ entityType: {
604
+ type: "string";
605
+ required: false;
606
+ };
607
+ entityData: {
608
+ type: "string";
609
+ required: false;
610
+ set: (value?: Record<string, unknown> | string) => string | undefined;
611
+ get: (value?: string) => any;
612
+ };
613
+ entityId: {
614
+ type: "string";
615
+ required: false;
616
+ };
617
+ source: {
618
+ type: "string";
619
+ required: true;
620
+ };
621
+ resourceId: {
622
+ type: "string";
623
+ required: false;
624
+ };
625
+ threadId: {
626
+ type: "string";
627
+ required: false;
628
+ };
629
+ createdAt: {
630
+ readonly type: "string";
631
+ readonly required: true;
632
+ readonly readOnly: true;
633
+ readonly set: (value?: Date | string) => string;
634
+ readonly default: () => string;
635
+ };
636
+ updatedAt: {
637
+ readonly type: "string";
638
+ readonly required: true;
639
+ readonly set: (value?: Date | string) => string;
640
+ readonly default: () => string;
641
+ };
642
+ metadata: {
643
+ readonly type: "string";
644
+ readonly set: (value?: Record<string, unknown> | string) => string | undefined;
645
+ readonly get: (value?: string) => any;
646
+ };
647
+ entity: {
648
+ type: "string";
649
+ required: true;
650
+ };
651
+ };
652
+ indexes: {
653
+ primary: {
654
+ pk: {
655
+ field: string;
656
+ composite: ("entity" | "id")[];
657
+ };
658
+ sk: {
659
+ field: string;
660
+ composite: "entity"[];
661
+ };
662
+ };
663
+ byScorer: {
664
+ index: string;
665
+ pk: {
666
+ field: string;
667
+ composite: ("entity" | "scorerId")[];
668
+ };
669
+ sk: {
670
+ field: string;
671
+ composite: "createdAt"[];
672
+ };
673
+ };
674
+ byRun: {
675
+ index: string;
676
+ pk: {
677
+ field: string;
678
+ composite: ("entity" | "runId")[];
679
+ };
680
+ sk: {
681
+ field: string;
682
+ composite: "createdAt"[];
683
+ };
684
+ };
685
+ byTrace: {
686
+ index: string;
687
+ pk: {
688
+ field: string;
689
+ composite: ("entity" | "traceId")[];
690
+ };
691
+ sk: {
692
+ field: string;
693
+ composite: "createdAt"[];
694
+ };
695
+ };
696
+ byEntityData: {
697
+ index: string;
698
+ pk: {
699
+ field: string;
700
+ composite: ("entity" | "entityId")[];
701
+ };
702
+ sk: {
703
+ field: string;
704
+ composite: "createdAt"[];
705
+ };
706
+ };
707
+ byResource: {
708
+ index: string;
709
+ pk: {
710
+ field: string;
711
+ composite: ("entity" | "resourceId")[];
712
+ };
713
+ sk: {
714
+ field: string;
715
+ composite: "createdAt"[];
716
+ };
717
+ };
718
+ byThread: {
719
+ index: string;
720
+ pk: {
721
+ field: string;
722
+ composite: ("entity" | "threadId")[];
723
+ };
724
+ sk: {
725
+ field: string;
726
+ composite: "createdAt"[];
727
+ };
728
+ };
729
+ };
730
+ }>;
731
+ }>;
732
+ //# sourceMappingURL=index.d.ts.map