@mastra/dynamodb 0.0.0-stream-vnext-usage-20250908171242 → 0.0.0-suspendRuntimeContextTypeFix-20250930142630

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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,102 @@
1
1
  # @mastra/dynamodb
2
2
 
3
- ## 0.0.0-stream-vnext-usage-20250908171242
3
+ ## 0.0.0-suspendRuntimeContextTypeFix-20250930142630
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`0662d02`](https://github.com/mastra-ai/mastra/commit/0662d02ef16916e67531890639fcd72c69cfb6e2), [`565d65f`](https://github.com/mastra-ai/mastra/commit/565d65fc16314a99f081975ec92f2636dff0c86d), [`6189844`](https://github.com/mastra-ai/mastra/commit/61898448e65bda02bb814fb15801a89dc6476938), [`7a46020`](https://github.com/mastra-ai/mastra/commit/7a46020f831ca61ce661ffb9ab3e8938cee9926e), [`d7a8f59`](https://github.com/mastra-ai/mastra/commit/d7a8f59154b0621aec4f41a6b2ea2b3882f03cb7), [`d951f41`](https://github.com/mastra-ai/mastra/commit/d951f41771e4e5da8da4b9f870949f9509e38756), [`4dda259`](https://github.com/mastra-ai/mastra/commit/4dda2593b6343f9258671de5fb237aeba3ef6bb7), [`8049e2e`](https://github.com/mastra-ai/mastra/commit/8049e2e8cce80a00353c64894c62b695ac34e35e), [`defed1c`](https://github.com/mastra-ai/mastra/commit/defed1ca8040cc8d42e645c5a50a1bc52a4918d7), [`6991ced`](https://github.com/mastra-ai/mastra/commit/6991cedcb5a44a49d9fe58ef67926e1f96ba55b1), [`9cb9c42`](https://github.com/mastra-ai/mastra/commit/9cb9c422854ee81074989dd2d8dccc0500ba8d3e), [`8334859`](https://github.com/mastra-ai/mastra/commit/83348594d4f37b311ba4a94d679c5f8721d796d4)]:
8
- - @mastra/core@0.0.0-stream-vnext-usage-20250908171242
7
+ - Update peer deps ([#8154](https://github.com/mastra-ai/mastra/pull/8154))
8
+
9
+ - Dynamodb support fetch scores by trace and span id ([#8154](https://github.com/mastra-ai/mastra/pull/8154))
10
+
11
+ - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`504438b`](https://github.com/mastra-ai/mastra/commit/504438b961bde211071186bba63a842c4e3db879), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`7fceb0a`](https://github.com/mastra-ai/mastra/commit/7fceb0a327d678e812f90f5387c5bc4f38bd039e), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`c7db3e0`](https://github.com/mastra-ai/mastra/commit/c7db3e057c4b2858a630a7c3f3d3aae571e3e5b7), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`809eea0`](https://github.com/mastra-ai/mastra/commit/809eea092fa80c3f69b9eaf078d843b57fd2a88e), [`623ffaf`](https://github.com/mastra-ai/mastra/commit/623ffaf2d969e11e99a0224633cf7b5a0815c857), [`9fc1613`](https://github.com/mastra-ai/mastra/commit/9fc16136400186648880fd990119ac15f7c02ee4), [`61f62aa`](https://github.com/mastra-ai/mastra/commit/61f62aa31bc88fe4ddf8da6240dbcfbeb07358bd), [`db1891a`](https://github.com/mastra-ai/mastra/commit/db1891a4707443720b7cd8a260dc7e1d49b3609c), [`e8f379d`](https://github.com/mastra-ai/mastra/commit/e8f379d390efa264c4e0874f9ac0cf8839b07777), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c2a4919`](https://github.com/mastra-ai/mastra/commit/c2a4919ba6797d8bdb1509e02287496eef69303e), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5)]:
12
+ - @mastra/core@0.0.0-suspendRuntimeContextTypeFix-20250930142630
13
+
14
+ ## 0.15.3
15
+
16
+ ### Patch Changes
17
+
18
+ - Update Peerdeps for packages based on core minor bump ([#8025](https://github.com/mastra-ai/mastra/pull/8025))
19
+
20
+ - Updated dependencies [[`cf34503`](https://github.com/mastra-ai/mastra/commit/cf345031de4e157f29087946449e60b965e9c8a9), [`6b4b1e4`](https://github.com/mastra-ai/mastra/commit/6b4b1e4235428d39e51cbda9832704c0ba70ab32), [`3469fca`](https://github.com/mastra-ai/mastra/commit/3469fca7bb7e5e19369ff9f7044716a5e4b02585), [`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`c45298a`](https://github.com/mastra-ai/mastra/commit/c45298a0a0791db35cf79f1199d77004da0704cb), [`c4a8204`](https://github.com/mastra-ai/mastra/commit/c4a82046bfd241d6044e234bc5917d5a01fe6b55), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad), [`c591dfc`](https://github.com/mastra-ai/mastra/commit/c591dfc1e600fae1dedffe239357d250e146378f), [`1920c5c`](https://github.com/mastra-ai/mastra/commit/1920c5c6d666f687785c73021196aa551e579e0d), [`b6a3b65`](https://github.com/mastra-ai/mastra/commit/b6a3b65d830fa0ca7754ad6481661d1f2c878f21), [`af3abb6`](https://github.com/mastra-ai/mastra/commit/af3abb6f7c7585d856e22d27f4e7d2ece2186b9a)]:
21
+ - @mastra/core@0.18.0
22
+
23
+ ## 0.15.3-alpha.0
24
+
25
+ ### Patch Changes
26
+
27
+ - Update Peerdeps for packages based on core minor bump ([#8025](https://github.com/mastra-ai/mastra/pull/8025))
28
+
29
+ - Updated dependencies [[`cf34503`](https://github.com/mastra-ai/mastra/commit/cf345031de4e157f29087946449e60b965e9c8a9), [`6b4b1e4`](https://github.com/mastra-ai/mastra/commit/6b4b1e4235428d39e51cbda9832704c0ba70ab32), [`3469fca`](https://github.com/mastra-ai/mastra/commit/3469fca7bb7e5e19369ff9f7044716a5e4b02585), [`c4a8204`](https://github.com/mastra-ai/mastra/commit/c4a82046bfd241d6044e234bc5917d5a01fe6b55)]:
30
+ - @mastra/core@0.18.0-alpha.2
31
+
32
+ ## 0.15.2
33
+
34
+ ### Patch Changes
35
+
36
+ - clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
37
+
38
+ - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
39
+
40
+ - Add resource id to workflow run snapshots ([#7740](https://github.com/mastra-ai/mastra/pull/7740))
41
+
42
+ - Update package.json and README ([#7886](https://github.com/mastra-ai/mastra/pull/7886))
43
+
44
+ - Updated dependencies [[`197cbb2`](https://github.com/mastra-ai/mastra/commit/197cbb248fc8cb4bbf61bf70b770f1388b445df2), [`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`6590763`](https://github.com/mastra-ai/mastra/commit/65907630ef4bf4127067cecd1cb21b56f55d5f1b), [`fb84c21`](https://github.com/mastra-ai/mastra/commit/fb84c21859d09bdc8f158bd5412bdc4b5835a61c), [`5802bf5`](https://github.com/mastra-ai/mastra/commit/5802bf57f6182e4b67c28d7d91abed349a8d14f3), [`5bda53a`](https://github.com/mastra-ai/mastra/commit/5bda53a9747bfa7d876d754fc92c83a06e503f62), [`c2eade3`](https://github.com/mastra-ai/mastra/commit/c2eade3508ef309662f065e5f340d7840295dd53), [`f26a8fd`](https://github.com/mastra-ai/mastra/commit/f26a8fd99fcb0497a5d86c28324430d7f6a5fb83), [`222965a`](https://github.com/mastra-ai/mastra/commit/222965a98ce8197b86673ec594244650b5960257), [`6047778`](https://github.com/mastra-ai/mastra/commit/6047778e501df460648f31decddf8e443f36e373), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`9d4fc09`](https://github.com/mastra-ai/mastra/commit/9d4fc09b2ad55caa7738c7ceb3a905e454f74cdd), [`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`0324ceb`](https://github.com/mastra-ai/mastra/commit/0324ceb8af9d16c12a531f90e575f6aab797ac81), [`d75ccf0`](https://github.com/mastra-ai/mastra/commit/d75ccf06dfd2582b916aa12624e3cd61b279edf1), [`0f9d227`](https://github.com/mastra-ai/mastra/commit/0f9d227890a98db33865abbea39daf407cd55ef7), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`de056a0`](https://github.com/mastra-ai/mastra/commit/de056a02cbb43f6aa0380ab2150ea404af9ec0dd), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`c93532a`](https://github.com/mastra-ai/mastra/commit/c93532a340b80e4dd946d4c138d9381de5f70399), [`6cb1fcb`](https://github.com/mastra-ai/mastra/commit/6cb1fcbc8d0378ffed0d17784c96e68f30cb0272), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251), [`0fed8f2`](https://github.com/mastra-ai/mastra/commit/0fed8f2aa84b167b3415ea6f8f70755775132c8d), [`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689), [`1a1fbe6`](https://github.com/mastra-ai/mastra/commit/1a1fbe66efb7d94abc373ed0dd9676adb8122454), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`87fd07f`](https://github.com/mastra-ai/mastra/commit/87fd07ff35387a38728967163460231b5d33ae3b), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`2685a78`](https://github.com/mastra-ai/mastra/commit/2685a78f224b8b04e20d4fab5ac1adb638190071), [`36f39c0`](https://github.com/mastra-ai/mastra/commit/36f39c00dc794952dc3c11aab91c2fa8bca74b11), [`239b5a4`](https://github.com/mastra-ai/mastra/commit/239b5a497aeae2e8b4d764f46217cfff2284788e), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
45
+ - @mastra/core@0.17.0
46
+
47
+ ## 0.15.2-alpha.3
48
+
49
+ ### Patch Changes
50
+
51
+ - clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
52
+
53
+ - Updated dependencies [[`197cbb2`](https://github.com/mastra-ai/mastra/commit/197cbb248fc8cb4bbf61bf70b770f1388b445df2), [`6590763`](https://github.com/mastra-ai/mastra/commit/65907630ef4bf4127067cecd1cb21b56f55d5f1b), [`c2eade3`](https://github.com/mastra-ai/mastra/commit/c2eade3508ef309662f065e5f340d7840295dd53), [`222965a`](https://github.com/mastra-ai/mastra/commit/222965a98ce8197b86673ec594244650b5960257), [`0324ceb`](https://github.com/mastra-ai/mastra/commit/0324ceb8af9d16c12a531f90e575f6aab797ac81), [`0f9d227`](https://github.com/mastra-ai/mastra/commit/0f9d227890a98db33865abbea39daf407cd55ef7), [`de056a0`](https://github.com/mastra-ai/mastra/commit/de056a02cbb43f6aa0380ab2150ea404af9ec0dd), [`c93532a`](https://github.com/mastra-ai/mastra/commit/c93532a340b80e4dd946d4c138d9381de5f70399), [`6cb1fcb`](https://github.com/mastra-ai/mastra/commit/6cb1fcbc8d0378ffed0d17784c96e68f30cb0272), [`2685a78`](https://github.com/mastra-ai/mastra/commit/2685a78f224b8b04e20d4fab5ac1adb638190071), [`239b5a4`](https://github.com/mastra-ai/mastra/commit/239b5a497aeae2e8b4d764f46217cfff2284788e)]:
54
+ - @mastra/core@0.17.0-alpha.6
55
+
56
+ ## 0.15.2-alpha.2
57
+
58
+ ### Patch Changes
59
+
60
+ - Update package.json and README ([#7886](https://github.com/mastra-ai/mastra/pull/7886))
61
+
62
+ - Updated dependencies [[`fb84c21`](https://github.com/mastra-ai/mastra/commit/fb84c21859d09bdc8f158bd5412bdc4b5835a61c), [`9d4fc09`](https://github.com/mastra-ai/mastra/commit/9d4fc09b2ad55caa7738c7ceb3a905e454f74cdd), [`d75ccf0`](https://github.com/mastra-ai/mastra/commit/d75ccf06dfd2582b916aa12624e3cd61b279edf1), [`0fed8f2`](https://github.com/mastra-ai/mastra/commit/0fed8f2aa84b167b3415ea6f8f70755775132c8d), [`87fd07f`](https://github.com/mastra-ai/mastra/commit/87fd07ff35387a38728967163460231b5d33ae3b)]:
63
+ - @mastra/core@0.17.0-alpha.4
64
+
65
+ ## 0.15.2-alpha.1
66
+
67
+ ### Patch Changes
68
+
69
+ - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
70
+
71
+ - Updated dependencies [[`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
72
+ - @mastra/core@0.17.0-alpha.3
73
+
74
+ ## 0.15.2-alpha.0
75
+
76
+ ### Patch Changes
77
+
78
+ - Add resource id to workflow run snapshots ([#7740](https://github.com/mastra-ai/mastra/pull/7740))
79
+
80
+ - Updated dependencies [[`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4)]:
81
+ - @mastra/core@0.16.4-alpha.1
82
+
83
+ ## 0.15.1
84
+
85
+ ### Patch Changes
86
+
87
+ - dependencies updates: ([#7500](https://github.com/mastra-ai/mastra/pull/7500))
88
+ - Updated dependency [`electrodb@^3.4.5` ↗︎](https://www.npmjs.com/package/electrodb/v/3.4.5) (from `^3.4.3`, in `dependencies`)
89
+ - Updated dependencies [[`47b6dc9`](https://github.com/mastra-ai/mastra/commit/47b6dc94f4976d4f3d3882e8f19eb365bbc5976c), [`827d876`](https://github.com/mastra-ai/mastra/commit/827d8766f36a900afcaf64a040f7ba76249009b3), [`0662d02`](https://github.com/mastra-ai/mastra/commit/0662d02ef16916e67531890639fcd72c69cfb6e2), [`565d65f`](https://github.com/mastra-ai/mastra/commit/565d65fc16314a99f081975ec92f2636dff0c86d), [`6189844`](https://github.com/mastra-ai/mastra/commit/61898448e65bda02bb814fb15801a89dc6476938), [`4da3d68`](https://github.com/mastra-ai/mastra/commit/4da3d68a778e5c4d5a17351ef223289fe2f45a45), [`fd9bbfe`](https://github.com/mastra-ai/mastra/commit/fd9bbfee22484f8493582325f53e8171bf8e682b), [`7eaf1d1`](https://github.com/mastra-ai/mastra/commit/7eaf1d1cec7e828d7a98efc2a748ac395bbdba3b), [`6f046b5`](https://github.com/mastra-ai/mastra/commit/6f046b5ccc5c8721302a9a61d5d16c12374cc8d7), [`d7a8f59`](https://github.com/mastra-ai/mastra/commit/d7a8f59154b0621aec4f41a6b2ea2b3882f03cb7), [`0b0bbb2`](https://github.com/mastra-ai/mastra/commit/0b0bbb24f4198ead69792e92b68a350f52b45cf3), [`d951f41`](https://github.com/mastra-ai/mastra/commit/d951f41771e4e5da8da4b9f870949f9509e38756), [`4dda259`](https://github.com/mastra-ai/mastra/commit/4dda2593b6343f9258671de5fb237aeba3ef6bb7), [`8049e2e`](https://github.com/mastra-ai/mastra/commit/8049e2e8cce80a00353c64894c62b695ac34e35e), [`f3427cd`](https://github.com/mastra-ai/mastra/commit/f3427cdaf9eecd63360dfc897a4acbf5f4143a4e), [`defed1c`](https://github.com/mastra-ai/mastra/commit/defed1ca8040cc8d42e645c5a50a1bc52a4918d7), [`6991ced`](https://github.com/mastra-ai/mastra/commit/6991cedcb5a44a49d9fe58ef67926e1f96ba55b1), [`9cb9c42`](https://github.com/mastra-ai/mastra/commit/9cb9c422854ee81074989dd2d8dccc0500ba8d3e), [`8334859`](https://github.com/mastra-ai/mastra/commit/83348594d4f37b311ba4a94d679c5f8721d796d4), [`05f13b8`](https://github.com/mastra-ai/mastra/commit/05f13b8fb269ccfc4de98e9db58dbe16eae55a5e)]:
90
+ - @mastra/core@0.16.1
91
+
92
+ ## 0.15.1-alpha.0
93
+
94
+ ### Patch Changes
95
+
96
+ - dependencies updates: ([#7500](https://github.com/mastra-ai/mastra/pull/7500))
97
+ - Updated dependency [`electrodb@^3.4.5` ↗︎](https://www.npmjs.com/package/electrodb/v/3.4.5) (from `^3.4.3`, in `dependencies`)
98
+ - Updated dependencies [[`47b6dc9`](https://github.com/mastra-ai/mastra/commit/47b6dc94f4976d4f3d3882e8f19eb365bbc5976c), [`565d65f`](https://github.com/mastra-ai/mastra/commit/565d65fc16314a99f081975ec92f2636dff0c86d), [`4da3d68`](https://github.com/mastra-ai/mastra/commit/4da3d68a778e5c4d5a17351ef223289fe2f45a45), [`0b0bbb2`](https://github.com/mastra-ai/mastra/commit/0b0bbb24f4198ead69792e92b68a350f52b45cf3), [`d951f41`](https://github.com/mastra-ai/mastra/commit/d951f41771e4e5da8da4b9f870949f9509e38756), [`8049e2e`](https://github.com/mastra-ai/mastra/commit/8049e2e8cce80a00353c64894c62b695ac34e35e)]:
99
+ - @mastra/core@0.16.1-alpha.1
9
100
 
10
101
  ## 0.15.0
11
102
 
package/README.md CHANGED
@@ -138,7 +138,3 @@ This implementation uses a single-table design pattern with ElectroDB, which off
138
138
  3. **Simplified administration**: Only one table to monitor and back up
139
139
  4. **Reduced complexity**: Consistent access patterns across entities
140
140
  5. **Transaction support**: Atomic operations across different entity types
141
-
142
- ## License
143
-
144
- MIT
@@ -534,6 +534,10 @@ export declare function getElectroDbService(client: DynamoDBDocumentClient, tabl
534
534
  type: "string";
535
535
  required: false;
536
536
  };
537
+ spanId: {
538
+ type: "string";
539
+ required: false;
540
+ };
537
541
  runId: {
538
542
  type: "string";
539
543
  required: true;
@@ -740,6 +744,17 @@ export declare function getElectroDbService(client: DynamoDBDocumentClient, tabl
740
744
  composite: "createdAt"[];
741
745
  };
742
746
  };
747
+ bySpan: {
748
+ index: string;
749
+ pk: {
750
+ field: string;
751
+ composite: ("entity" | "traceId" | "spanId")[];
752
+ };
753
+ sk: {
754
+ field: string;
755
+ composite: "createdAt"[];
756
+ };
757
+ };
743
758
  };
744
759
  }>;
745
760
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBpF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgBpF"}
@@ -18,6 +18,10 @@ export declare const scoreEntity: Entity<string, string, string, {
18
18
  type: "string";
19
19
  required: false;
20
20
  };
21
+ spanId: {
22
+ type: "string";
23
+ required: false;
24
+ };
21
25
  runId: {
22
26
  type: "string";
23
27
  required: true;
@@ -224,6 +228,17 @@ export declare const scoreEntity: Entity<string, string, string, {
224
228
  composite: "createdAt"[];
225
229
  };
226
230
  };
231
+ bySpan: {
232
+ index: string;
233
+ pk: {
234
+ field: string;
235
+ composite: ("entity" | "traceId" | "spanId")[];
236
+ };
237
+ sk: {
238
+ field: string;
239
+ composite: "createdAt"[];
240
+ };
241
+ };
227
242
  };
228
243
  }>;
229
244
  //# sourceMappingURL=score.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../src/entities/score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;0BA+BJ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA8CN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;0BAoBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkExB,CAAC"}
1
+ {"version":3,"file":"score.d.ts","sourceRoot":"","sources":["../../src/entities/score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGnC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAmCJ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA8CN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;0BAgBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;0BAoBN,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;0BAMhC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuExB,CAAC"}
package/dist/index.cjs CHANGED
@@ -6,6 +6,7 @@ var error = require('@mastra/core/error');
6
6
  var storage = require('@mastra/core/storage');
7
7
  var electrodb = require('electrodb');
8
8
  var agent = require('@mastra/core/agent');
9
+ var scores = require('@mastra/core/scores');
9
10
 
10
11
  // src/storage/index.ts
11
12
 
@@ -372,6 +373,10 @@ var scoreEntity = new electrodb.Entity({
372
373
  type: "string",
373
374
  required: false
374
375
  },
376
+ spanId: {
377
+ type: "string",
378
+ required: false
379
+ },
375
380
  runId: {
376
381
  type: "string",
377
382
  required: true
@@ -658,6 +663,11 @@ var scoreEntity = new electrodb.Entity({
658
663
  index: "gsi6",
659
664
  pk: { field: "gsi6pk", composite: ["entity", "threadId"] },
660
665
  sk: { field: "gsi6sk", composite: ["createdAt"] }
666
+ },
667
+ bySpan: {
668
+ index: "gsi7",
669
+ pk: { field: "gsi7pk", composite: ["entity", "traceId", "spanId"] },
670
+ sk: { field: "gsi7sk", composite: ["createdAt"] }
661
671
  }
662
672
  }
663
673
  });
@@ -2178,34 +2188,47 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
2178
2188
  }
2179
2189
  }
2180
2190
  async saveScore(score) {
2181
- this.logger.debug("Saving score", { scorerId: score.scorerId, runId: score.runId });
2191
+ let validatedScore;
2192
+ try {
2193
+ validatedScore = scores.saveScorePayloadSchema.parse(score);
2194
+ } catch (error$1) {
2195
+ throw new error.MastraError(
2196
+ {
2197
+ id: "STORAGE_DYNAMODB_STORE_SAVE_SCORE_FAILED",
2198
+ domain: error.ErrorDomain.STORAGE,
2199
+ category: error.ErrorCategory.THIRD_PARTY
2200
+ },
2201
+ error$1
2202
+ );
2203
+ }
2182
2204
  const now = /* @__PURE__ */ new Date();
2183
2205
  const scoreId = `score-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2184
2206
  const scoreData = {
2185
2207
  entity: "score",
2186
2208
  id: scoreId,
2187
- scorerId: score.scorerId,
2188
- traceId: score.traceId || "",
2189
- runId: score.runId,
2190
- scorer: typeof score.scorer === "string" ? score.scorer : JSON.stringify(score.scorer),
2191
- preprocessStepResult: typeof score.preprocessStepResult === "string" ? score.preprocessStepResult : JSON.stringify(score.preprocessStepResult),
2192
- analyzeStepResult: typeof score.analyzeStepResult === "string" ? score.analyzeStepResult : JSON.stringify(score.analyzeStepResult),
2193
- score: score.score,
2194
- reason: score.reason,
2195
- preprocessPrompt: score.preprocessPrompt,
2196
- generateScorePrompt: score.generateScorePrompt,
2197
- analyzePrompt: score.analyzePrompt,
2198
- reasonPrompt: score.reasonPrompt,
2199
- input: typeof score.input === "string" ? score.input : JSON.stringify(score.input),
2200
- output: typeof score.output === "string" ? score.output : JSON.stringify(score.output),
2201
- additionalContext: typeof score.additionalContext === "string" ? score.additionalContext : JSON.stringify(score.additionalContext),
2202
- runtimeContext: typeof score.runtimeContext === "string" ? score.runtimeContext : JSON.stringify(score.runtimeContext),
2203
- entityType: score.entityType,
2204
- entityData: typeof score.entity === "string" ? score.entity : JSON.stringify(score.entity),
2205
- entityId: score.entityId,
2206
- source: score.source,
2207
- resourceId: score.resourceId || "",
2208
- threadId: score.threadId || "",
2209
+ scorerId: validatedScore.scorerId,
2210
+ traceId: validatedScore.traceId || "",
2211
+ spanId: validatedScore.spanId || "",
2212
+ runId: validatedScore.runId,
2213
+ scorer: typeof validatedScore.scorer === "string" ? validatedScore.scorer : JSON.stringify(validatedScore.scorer),
2214
+ preprocessStepResult: typeof validatedScore.preprocessStepResult === "string" ? validatedScore.preprocessStepResult : JSON.stringify(validatedScore.preprocessStepResult),
2215
+ analyzeStepResult: typeof validatedScore.analyzeStepResult === "string" ? validatedScore.analyzeStepResult : JSON.stringify(validatedScore.analyzeStepResult),
2216
+ score: validatedScore.score,
2217
+ reason: validatedScore.reason,
2218
+ preprocessPrompt: validatedScore.preprocessPrompt,
2219
+ generateScorePrompt: validatedScore.generateScorePrompt,
2220
+ generateReasonPrompt: validatedScore.generateReasonPrompt,
2221
+ analyzePrompt: validatedScore.analyzePrompt,
2222
+ input: typeof validatedScore.input === "string" ? validatedScore.input : JSON.stringify(validatedScore.input),
2223
+ output: typeof validatedScore.output === "string" ? validatedScore.output : JSON.stringify(validatedScore.output),
2224
+ additionalContext: typeof validatedScore.additionalContext === "string" ? validatedScore.additionalContext : JSON.stringify(validatedScore.additionalContext),
2225
+ runtimeContext: typeof validatedScore.runtimeContext === "string" ? validatedScore.runtimeContext : JSON.stringify(validatedScore.runtimeContext),
2226
+ entityType: validatedScore.entityType,
2227
+ entityData: typeof validatedScore.entity === "string" ? validatedScore.entity : JSON.stringify(validatedScore.entity),
2228
+ entityId: validatedScore.entityId,
2229
+ source: validatedScore.source,
2230
+ resourceId: validatedScore.resourceId || "",
2231
+ threadId: validatedScore.threadId || "",
2209
2232
  createdAt: now.toISOString(),
2210
2233
  updatedAt: now.toISOString()
2211
2234
  };
@@ -2358,6 +2381,43 @@ var ScoresStorageDynamoDB = class extends storage.ScoresStorage {
2358
2381
  );
2359
2382
  }
2360
2383
  }
2384
+ async getScoresBySpan({
2385
+ traceId,
2386
+ spanId,
2387
+ pagination
2388
+ }) {
2389
+ this.logger.debug("Getting scores by span", { traceId, spanId, pagination });
2390
+ try {
2391
+ const query = this.service.entities.score.query.bySpan({ entity: "score", traceId, spanId });
2392
+ const results = await query.go();
2393
+ const allScores = results.data.map((data) => this.parseScoreData(data));
2394
+ allScores.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
2395
+ const startIndex = pagination.page * pagination.perPage;
2396
+ const endIndex = startIndex + pagination.perPage;
2397
+ const paginatedScores = allScores.slice(startIndex, endIndex);
2398
+ const total = allScores.length;
2399
+ const hasMore = endIndex < total;
2400
+ return {
2401
+ scores: paginatedScores,
2402
+ pagination: {
2403
+ total,
2404
+ page: pagination.page,
2405
+ perPage: pagination.perPage,
2406
+ hasMore
2407
+ }
2408
+ };
2409
+ } catch (error$1) {
2410
+ throw new error.MastraError(
2411
+ {
2412
+ id: "STORAGE_DYNAMODB_STORE_GET_SCORES_BY_SPAN_FAILED",
2413
+ domain: error.ErrorDomain.STORAGE,
2414
+ category: error.ErrorCategory.THIRD_PARTY,
2415
+ details: { traceId, spanId, page: pagination.page, perPage: pagination.perPage }
2416
+ },
2417
+ error$1
2418
+ );
2419
+ }
2420
+ }
2361
2421
  };
2362
2422
  var TracesStorageDynamoDB = class extends storage.TracesStorage {
2363
2423
  service;
@@ -2628,11 +2688,11 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
2628
2688
  async persistWorkflowSnapshot({
2629
2689
  workflowName,
2630
2690
  runId,
2691
+ resourceId,
2631
2692
  snapshot
2632
2693
  }) {
2633
2694
  this.logger.debug("Persisting workflow snapshot", { workflowName, runId });
2634
2695
  try {
2635
- const resourceId = "resourceId" in snapshot ? snapshot.resourceId : void 0;
2636
2696
  const now = (/* @__PURE__ */ new Date()).toISOString();
2637
2697
  const data = {
2638
2698
  entity: "workflow_snapshot",
@@ -2758,8 +2818,6 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
2758
2818
  async getWorkflowRunById(args) {
2759
2819
  const { runId, workflowName } = args;
2760
2820
  this.logger.debug("Getting workflow run by ID", { runId, workflowName });
2761
- console.log("workflowName", workflowName);
2762
- console.log("runId", runId);
2763
2821
  try {
2764
2822
  if (workflowName) {
2765
2823
  this.logger.debug("WorkflowName provided, using direct GET operation.");
@@ -2769,7 +2827,6 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
2769
2827
  workflow_name: workflowName,
2770
2828
  run_id: runId
2771
2829
  }).go();
2772
- console.log("result", result2);
2773
2830
  if (!result2.data) {
2774
2831
  return null;
2775
2832
  }
@@ -2874,7 +2931,8 @@ var DynamoDBStore = class extends storage.MastraStorage {
2874
2931
  resourceWorkingMemory: true,
2875
2932
  hasColumn: false,
2876
2933
  createTable: false,
2877
- deleteMessages: false
2934
+ deleteMessages: false,
2935
+ getScoresBySpan: true
2878
2936
  };
2879
2937
  }
2880
2938
  /**
@@ -3041,9 +3099,10 @@ var DynamoDBStore = class extends storage.MastraStorage {
3041
3099
  async persistWorkflowSnapshot({
3042
3100
  workflowName,
3043
3101
  runId,
3102
+ resourceId,
3044
3103
  snapshot
3045
3104
  }) {
3046
- return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, snapshot });
3105
+ return this.stores.workflows.persistWorkflowSnapshot({ workflowName, runId, resourceId, snapshot });
3047
3106
  }
3048
3107
  async loadWorkflowSnapshot({
3049
3108
  workflowName,
@@ -3132,6 +3191,13 @@ var DynamoDBStore = class extends storage.MastraStorage {
3132
3191
  }) {
3133
3192
  return this.stores.scores.getScoresByScorerId({ scorerId, source, entityId, entityType, pagination });
3134
3193
  }
3194
+ async getScoresBySpan({
3195
+ traceId,
3196
+ spanId,
3197
+ pagination
3198
+ }) {
3199
+ return this.stores.scores.getScoresBySpan({ traceId, spanId, pagination });
3200
+ }
3135
3201
  };
3136
3202
 
3137
3203
  exports.DynamoDBStore = DynamoDBStore;