@mastra/server 0.0.0-consolidate-changesets-20250904042643 → 0.0.0-createToolOptions-20250926094418

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 (223) hide show
  1. package/CHANGELOG.md +363 -4
  2. package/README.md +0 -5
  3. package/dist/{chunk-GUI3CROV.cjs → chunk-2GDLSAVJ.cjs} +60 -22
  4. package/dist/chunk-2GDLSAVJ.cjs.map +1 -0
  5. package/dist/{chunk-OW4FX5TS.js → chunk-4QCXUEAT.js} +10 -3
  6. package/dist/chunk-4QCXUEAT.js.map +1 -0
  7. package/dist/chunk-4RRMWXQ2.js +3522 -0
  8. package/dist/chunk-4RRMWXQ2.js.map +1 -0
  9. package/dist/chunk-5DP5XZH6.cjs +928 -0
  10. package/dist/chunk-5DP5XZH6.cjs.map +1 -0
  11. package/dist/{chunk-R7NOGUZG.js → chunk-5KRXONRF.js} +43 -4
  12. package/dist/chunk-5KRXONRF.js.map +1 -0
  13. package/dist/{chunk-L265APUD.cjs → chunk-5N724Q2T.cjs} +43 -3
  14. package/dist/chunk-5N724Q2T.cjs.map +1 -0
  15. package/dist/chunk-66YYHFGF.js +761 -0
  16. package/dist/chunk-66YYHFGF.js.map +1 -0
  17. package/dist/chunk-6GMFZ5LK.js +2774 -0
  18. package/dist/chunk-6GMFZ5LK.js.map +1 -0
  19. package/dist/{chunk-5QUKZCEF.js → chunk-6IJWRJZE.js} +4 -3
  20. package/dist/chunk-6IJWRJZE.js.map +1 -0
  21. package/dist/chunk-743UIDHI.cjs +2013 -0
  22. package/dist/chunk-743UIDHI.cjs.map +1 -0
  23. package/dist/{chunk-ROA7BCHD.js → chunk-A3AL7EWJ.js} +3 -3
  24. package/dist/{chunk-ROA7BCHD.js.map → chunk-A3AL7EWJ.js.map} +1 -1
  25. package/dist/chunk-AK2FXLLB.cjs +849 -0
  26. package/dist/chunk-AK2FXLLB.cjs.map +1 -0
  27. package/dist/chunk-BOVFMBXY.js +607 -0
  28. package/dist/chunk-BOVFMBXY.js.map +1 -0
  29. package/dist/{chunk-E64XEGXM.cjs → chunk-CML3EOO5.cjs} +96 -107
  30. package/dist/chunk-CML3EOO5.cjs.map +1 -0
  31. package/dist/chunk-EMNGA4R4.js +845 -0
  32. package/dist/chunk-EMNGA4R4.js.map +1 -0
  33. package/dist/chunk-FALVL2VV.cjs +3525 -0
  34. package/dist/chunk-FALVL2VV.cjs.map +1 -0
  35. package/dist/chunk-FQNT7PI4.js +937 -0
  36. package/dist/chunk-FQNT7PI4.js.map +1 -0
  37. package/dist/{chunk-4QSNRCOT.cjs → chunk-G4PUALCE.cjs} +10 -2
  38. package/dist/chunk-G4PUALCE.cjs.map +1 -0
  39. package/dist/chunk-HJQKWRKQ.cjs +764 -0
  40. package/dist/chunk-HJQKWRKQ.cjs.map +1 -0
  41. package/dist/chunk-HVBBFCDH.cjs +2321 -0
  42. package/dist/chunk-HVBBFCDH.cjs.map +1 -0
  43. package/dist/chunk-HZJRQ5L3.cjs +1411 -0
  44. package/dist/chunk-HZJRQ5L3.cjs.map +1 -0
  45. package/dist/chunk-IGFMAZZ5.cjs +1150 -0
  46. package/dist/chunk-IGFMAZZ5.cjs.map +1 -0
  47. package/dist/chunk-IOQGI4ML.js +931 -0
  48. package/dist/chunk-IOQGI4ML.js.map +1 -0
  49. package/dist/{chunk-7QEJ5QG5.js → chunk-IYJW2OVQ.js} +60 -22
  50. package/dist/chunk-IYJW2OVQ.js.map +1 -0
  51. package/dist/{chunk-QBWF6U7Z.js → chunk-JRDEOHAJ.js} +20 -12
  52. package/dist/chunk-JRDEOHAJ.js.map +1 -0
  53. package/dist/{chunk-A3ZHTDWB.js → chunk-KM7EJKXV.js} +9 -5
  54. package/dist/chunk-KM7EJKXV.js.map +1 -0
  55. package/dist/{chunk-YFLNLDQV.cjs → chunk-LJFAAEU7.cjs} +10 -6
  56. package/dist/chunk-LJFAAEU7.cjs.map +1 -0
  57. package/dist/chunk-LYPU75T6.js +1147 -0
  58. package/dist/chunk-LYPU75T6.js.map +1 -0
  59. package/dist/chunk-N5ID53SA.js +15712 -0
  60. package/dist/chunk-N5ID53SA.js.map +1 -0
  61. package/dist/chunk-N7F33WAD.js +2290 -0
  62. package/dist/chunk-N7F33WAD.js.map +1 -0
  63. package/dist/chunk-NG5IVLEZ.js +1012 -0
  64. package/dist/chunk-NG5IVLEZ.js.map +1 -0
  65. package/dist/{chunk-OZGPYA7A.js → chunk-NH7XUTIO.js} +93 -104
  66. package/dist/chunk-NH7XUTIO.js.map +1 -0
  67. package/dist/{chunk-KLCYAQBL.cjs → chunk-NLWACBE7.cjs} +21 -13
  68. package/dist/chunk-NLWACBE7.cjs.map +1 -0
  69. package/dist/chunk-OGW6HHVI.js +1408 -0
  70. package/dist/chunk-OGW6HHVI.js.map +1 -0
  71. package/dist/{chunk-3THIIWWW.cjs → chunk-OPI3FZYH.cjs} +4 -3
  72. package/dist/chunk-OPI3FZYH.cjs.map +1 -0
  73. package/dist/{chunk-UVKXRPMV.cjs → chunk-OZLRIVC4.cjs} +14 -14
  74. package/dist/{chunk-UVKXRPMV.cjs.map → chunk-OZLRIVC4.cjs.map} +1 -1
  75. package/dist/chunk-P7CIEIJ3.js +925 -0
  76. package/dist/chunk-P7CIEIJ3.js.map +1 -0
  77. package/dist/chunk-P7RBMCBE.cjs +934 -0
  78. package/dist/chunk-P7RBMCBE.cjs.map +1 -0
  79. package/dist/chunk-PPYGWINI.cjs +2777 -0
  80. package/dist/chunk-PPYGWINI.cjs.map +1 -0
  81. package/dist/chunk-QNWXF57L.cjs +15748 -0
  82. package/dist/chunk-QNWXF57L.cjs.map +1 -0
  83. package/dist/chunk-RCHEPTZZ.js +2006 -0
  84. package/dist/chunk-RCHEPTZZ.js.map +1 -0
  85. package/dist/chunk-SIGXR3JT.cjs +1043 -0
  86. package/dist/chunk-SIGXR3JT.cjs.map +1 -0
  87. package/dist/{chunk-NPE3X7FQ.cjs → chunk-SPLSYTYW.cjs} +5 -5
  88. package/dist/{chunk-NPE3X7FQ.cjs.map → chunk-SPLSYTYW.cjs.map} +1 -1
  89. package/dist/{chunk-LUPY3MQY.js → chunk-SQY4T6EJ.js} +3 -3
  90. package/dist/{chunk-LUPY3MQY.js.map → chunk-SQY4T6EJ.js.map} +1 -1
  91. package/dist/chunk-SXENNNR7.cjs +625 -0
  92. package/dist/chunk-SXENNNR7.cjs.map +1 -0
  93. package/dist/chunk-TVSIG4JE.cjs +940 -0
  94. package/dist/chunk-TVSIG4JE.cjs.map +1 -0
  95. package/dist/chunk-VY4ENABS.cjs +135 -0
  96. package/dist/chunk-VY4ENABS.cjs.map +1 -0
  97. package/dist/chunk-YWOK4F5A.js +131 -0
  98. package/dist/chunk-YWOK4F5A.js.map +1 -0
  99. package/dist/dist-26HWEQY6.js +3 -0
  100. package/dist/dist-26HWEQY6.js.map +1 -0
  101. package/dist/dist-3A5DXB37.cjs +20 -0
  102. package/dist/dist-3A5DXB37.cjs.map +1 -0
  103. package/dist/dist-3SJKQJGY.cjs +16 -0
  104. package/dist/dist-3SJKQJGY.cjs.map +1 -0
  105. package/dist/dist-4ZQSPE5K.js +3 -0
  106. package/dist/dist-4ZQSPE5K.js.map +1 -0
  107. package/dist/dist-5W5QNRTD.js +3 -0
  108. package/dist/dist-5W5QNRTD.js.map +1 -0
  109. package/dist/dist-653SRMPL.js +3 -0
  110. package/dist/dist-653SRMPL.js.map +1 -0
  111. package/dist/dist-6U6EFC5C.cjs +16 -0
  112. package/dist/dist-6U6EFC5C.cjs.map +1 -0
  113. package/dist/dist-7IHNNYMF.cjs +16 -0
  114. package/dist/dist-7IHNNYMF.cjs.map +1 -0
  115. package/dist/dist-B5IPRF6W.js +3 -0
  116. package/dist/dist-B5IPRF6W.js.map +1 -0
  117. package/dist/dist-EOMYFT4Y.cjs +16 -0
  118. package/dist/dist-EOMYFT4Y.cjs.map +1 -0
  119. package/dist/dist-EZZMMMNT.cjs +16 -0
  120. package/dist/dist-EZZMMMNT.cjs.map +1 -0
  121. package/dist/dist-F2ET4MNO.cjs +16 -0
  122. package/dist/dist-F2ET4MNO.cjs.map +1 -0
  123. package/dist/dist-H64VX6DE.js +3 -0
  124. package/dist/dist-H64VX6DE.js.map +1 -0
  125. package/dist/dist-HY7RMLJQ.cjs +16 -0
  126. package/dist/dist-HY7RMLJQ.cjs.map +1 -0
  127. package/dist/dist-M6S4P3FJ.js +3 -0
  128. package/dist/dist-M6S4P3FJ.js.map +1 -0
  129. package/dist/dist-NR7QSCQT.js +3 -0
  130. package/dist/dist-NR7QSCQT.js.map +1 -0
  131. package/dist/dist-QLFMCMCX.js +3 -0
  132. package/dist/dist-QLFMCMCX.js.map +1 -0
  133. package/dist/dist-UY46BFRP.js +3 -0
  134. package/dist/dist-UY46BFRP.js.map +1 -0
  135. package/dist/dist-WCQDRTIV.cjs +16 -0
  136. package/dist/dist-WCQDRTIV.cjs.map +1 -0
  137. package/dist/dist-WKYB3LTJ.cjs +16 -0
  138. package/dist/dist-WKYB3LTJ.cjs.map +1 -0
  139. package/dist/index.cjs +4 -0
  140. package/dist/index.cjs.map +1 -1
  141. package/dist/index.js +3 -0
  142. package/dist/index.js.map +1 -1
  143. package/dist/server/handlers/a2a.cjs +7 -7
  144. package/dist/server/handlers/a2a.d.ts.map +1 -1
  145. package/dist/server/handlers/a2a.js +1 -1
  146. package/dist/server/handlers/agent-builder.cjs +16 -16
  147. package/dist/server/handlers/agent-builder.d.ts +5 -4
  148. package/dist/server/handlers/agent-builder.d.ts.map +1 -1
  149. package/dist/server/handlers/agent-builder.js +1 -1
  150. package/dist/server/handlers/agents.cjs +26 -14
  151. package/dist/server/handlers/agents.d.ts +64 -8
  152. package/dist/server/handlers/agents.d.ts.map +1 -1
  153. package/dist/server/handlers/agents.js +1 -1
  154. package/dist/server/handlers/logs.cjs +4 -4
  155. package/dist/server/handlers/logs.js +1 -1
  156. package/dist/server/handlers/memory.cjs +16 -16
  157. package/dist/server/handlers/memory.js +1 -1
  158. package/dist/server/handlers/observability.cjs +7 -3
  159. package/dist/server/handlers/observability.d.ts +18 -0
  160. package/dist/server/handlers/observability.d.ts.map +1 -1
  161. package/dist/server/handlers/observability.js +1 -1
  162. package/dist/server/handlers/scores.cjs +7 -7
  163. package/dist/server/handlers/scores.d.ts +208 -6
  164. package/dist/server/handlers/scores.d.ts.map +1 -1
  165. package/dist/server/handlers/scores.js +1 -1
  166. package/dist/server/handlers/tools.cjs +6 -6
  167. package/dist/server/handlers/tools.d.ts.map +1 -1
  168. package/dist/server/handlers/tools.js +1 -1
  169. package/dist/server/handlers/utils.cjs +6 -2
  170. package/dist/server/handlers/utils.d.ts +6 -0
  171. package/dist/server/handlers/utils.d.ts.map +1 -1
  172. package/dist/server/handlers/utils.js +1 -1
  173. package/dist/server/handlers/vNextNetwork.cjs +5 -5
  174. package/dist/server/handlers/vNextNetwork.d.ts +77 -10
  175. package/dist/server/handlers/vNextNetwork.d.ts.map +1 -1
  176. package/dist/server/handlers/vNextNetwork.js +1 -1
  177. package/dist/server/handlers/voice.cjs +5 -5
  178. package/dist/server/handlers/voice.d.ts +6 -4
  179. package/dist/server/handlers/voice.d.ts.map +1 -1
  180. package/dist/server/handlers/voice.js +1 -1
  181. package/dist/server/handlers/workflows.cjs +24 -16
  182. package/dist/server/handlers/workflows.d.ts +16 -7
  183. package/dist/server/handlers/workflows.d.ts.map +1 -1
  184. package/dist/server/handlers/workflows.js +1 -1
  185. package/dist/server/handlers.cjs +20 -25
  186. package/dist/server/handlers.d.ts +0 -1
  187. package/dist/server/handlers.d.ts.map +1 -1
  188. package/dist/server/handlers.js +10 -11
  189. package/dist/server/utils.d.ts +3 -1
  190. package/dist/server/utils.d.ts.map +1 -1
  191. package/package.json +8 -8
  192. package/dist/chunk-3THIIWWW.cjs.map +0 -1
  193. package/dist/chunk-4QSNRCOT.cjs.map +0 -1
  194. package/dist/chunk-5N6646N2.cjs +0 -17638
  195. package/dist/chunk-5N6646N2.cjs.map +0 -1
  196. package/dist/chunk-5QUKZCEF.js.map +0 -1
  197. package/dist/chunk-7QEJ5QG5.js.map +0 -1
  198. package/dist/chunk-A3ZHTDWB.js.map +0 -1
  199. package/dist/chunk-B43YAQJR.js +0 -144
  200. package/dist/chunk-B43YAQJR.js.map +0 -1
  201. package/dist/chunk-E64XEGXM.cjs.map +0 -1
  202. package/dist/chunk-GGCXLQ4J.js +0 -17619
  203. package/dist/chunk-GGCXLQ4J.js.map +0 -1
  204. package/dist/chunk-GUI3CROV.cjs.map +0 -1
  205. package/dist/chunk-JGD42NME.cjs +0 -150
  206. package/dist/chunk-JGD42NME.cjs.map +0 -1
  207. package/dist/chunk-KLCYAQBL.cjs.map +0 -1
  208. package/dist/chunk-L265APUD.cjs.map +0 -1
  209. package/dist/chunk-ODGI2PKN.cjs +0 -143
  210. package/dist/chunk-ODGI2PKN.cjs.map +0 -1
  211. package/dist/chunk-OW4FX5TS.js.map +0 -1
  212. package/dist/chunk-OZGPYA7A.js.map +0 -1
  213. package/dist/chunk-QBWF6U7Z.js.map +0 -1
  214. package/dist/chunk-R7NOGUZG.js.map +0 -1
  215. package/dist/chunk-V7VWD2Y2.js +0 -126
  216. package/dist/chunk-V7VWD2Y2.js.map +0 -1
  217. package/dist/chunk-YFLNLDQV.cjs.map +0 -1
  218. package/dist/server/handlers/network.cjs +0 -24
  219. package/dist/server/handlers/network.cjs.map +0 -1
  220. package/dist/server/handlers/network.d.ts +0 -50
  221. package/dist/server/handlers/network.d.ts.map +0 -1
  222. package/dist/server/handlers/network.js +0 -3
  223. package/dist/server/handlers/network.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,16 +1,369 @@
1
1
  # @mastra/server
2
2
 
3
- ## 0.0.0-consolidate-changesets-20250904042643
3
+ ## 0.0.0-createToolOptions-20250926094418
4
+
5
+ ### Patch Changes
6
+
7
+ - add a way to hide the deploy mastra cloud button ([#8137](https://github.com/mastra-ai/mastra/pull/8137))
8
+
9
+ - Add types in the streamVNext codepath, fixes for various issues across multiple packages surfaced from type issues, align return types. ([#8010](https://github.com/mastra-ai/mastra/pull/8010))
10
+
11
+ - When step is created from agent or tool, add the description and component key to show that ([#8151](https://github.com/mastra-ai/mastra/pull/8151))
12
+
13
+ - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`045b5bd`](https://github.com/mastra-ai/mastra/commit/045b5bdb9ff1a8e55b971cb8b3efa4f1c1eead5b), [`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), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5)]:
14
+ - @mastra/core@0.0.0-createToolOptions-20250926094418
15
+
16
+ ## 0.18.1-alpha.0
17
+
18
+ ### Patch Changes
19
+
20
+ - add a way to hide the deploy mastra cloud button ([#8137](https://github.com/mastra-ai/mastra/pull/8137))
21
+
22
+ - Add types in the streamVNext codepath, fixes for various issues across multiple packages surfaced from type issues, align return types. ([#8010](https://github.com/mastra-ai/mastra/pull/8010))
23
+
24
+ - When step is created from agent or tool, add the description and component key to show that ([#8151](https://github.com/mastra-ai/mastra/pull/8151))
25
+
26
+ - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`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), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5)]:
27
+ - @mastra/core@0.18.1-alpha.0
28
+
29
+ ## 0.18.0
30
+
31
+ ### Patch Changes
32
+
33
+ - Allow agent instructions to accept SystemMessage types ([#7987](https://github.com/mastra-ai/mastra/pull/7987))
34
+
35
+ Agents can now use rich instruction formats beyond simple strings:
36
+ - CoreSystemMessage and SystemModelMessage objects with provider-specific options
37
+ - Arrays of strings or system messages
38
+ - Dynamic instructions returning any SystemMessage type
39
+
40
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
41
+
42
+ - Delayed streamVNext breaking change notice by 1 week ([#8121](https://github.com/mastra-ai/mastra/pull/8121))
43
+
44
+ - Update Peerdeps for packages based on core minor bump ([#8025](https://github.com/mastra-ai/mastra/pull/8025))
45
+
46
+ - Add server api to score traces ([#8064](https://github.com/mastra-ai/mastra/pull/8064))
47
+
48
+ - 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)]:
49
+ - @mastra/core@0.18.0
50
+
51
+ ## 0.18.0-alpha.3
52
+
53
+ ### Patch Changes
54
+
55
+ - Add model fallback handlers and apis ([#7378](https://github.com/mastra-ai/mastra/pull/7378))
56
+
57
+ - Delayed streamVNext breaking change notice by 1 week ([#8121](https://github.com/mastra-ai/mastra/pull/8121))
58
+
59
+ - Add server api to score traces ([#8064](https://github.com/mastra-ai/mastra/pull/8064))
60
+
61
+ - Updated dependencies [[`4b339b8`](https://github.com/mastra-ai/mastra/commit/4b339b8141c20d6a6d80583c7e8c5c05d8c19492), [`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)]:
62
+ - @mastra/core@0.18.0-alpha.3
63
+
64
+ ## 0.18.0-alpha.2
65
+
66
+ ### Patch Changes
67
+
68
+ - Allow agent instructions to accept SystemMessage types ([#7987](https://github.com/mastra-ai/mastra/pull/7987))
69
+
70
+ Agents can now use rich instruction formats beyond simple strings:
71
+ - CoreSystemMessage and SystemModelMessage objects with provider-specific options
72
+ - Arrays of strings or system messages
73
+ - Dynamic instructions returning any SystemMessage type
74
+
75
+ - Update Peerdeps for packages based on core minor bump ([#8025](https://github.com/mastra-ai/mastra/pull/8025))
76
+
77
+ - 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)]:
78
+ - @mastra/core@0.18.0-alpha.2
79
+
80
+ ## 0.17.2-alpha.1
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [[`c45298a`](https://github.com/mastra-ai/mastra/commit/c45298a0a0791db35cf79f1199d77004da0704cb)]:
85
+ - @mastra/core@0.17.2-alpha.1
86
+
87
+ ## 0.17.2-alpha.0
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [[`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad)]:
92
+ - @mastra/core@0.17.2-alpha.0
93
+
94
+ ## 0.17.1
95
+
96
+ ### Patch Changes
97
+
98
+ - fix workflow resuming issue in the playground ([#7988](https://github.com/mastra-ai/mastra/pull/7988))
99
+
100
+ - Updated dependencies [[`fd00e63`](https://github.com/mastra-ai/mastra/commit/fd00e63759cbcca3473c40cac9843280b0557cff), [`ab610f6`](https://github.com/mastra-ai/mastra/commit/ab610f6f41dbfe6c9502368671485ca7a0aac09b), [`e6bda5f`](https://github.com/mastra-ai/mastra/commit/e6bda5f954ee8493ea18adc1a883f0a5b785ad9b)]:
101
+ - @mastra/core@0.17.1
102
+
103
+ ## 0.17.1-alpha.0
104
+
105
+ ### Patch Changes
106
+
107
+ - fix workflow resuming issue in the playground ([#7988](https://github.com/mastra-ai/mastra/pull/7988))
108
+
109
+ - Updated dependencies [[`fd00e63`](https://github.com/mastra-ai/mastra/commit/fd00e63759cbcca3473c40cac9843280b0557cff), [`ab610f6`](https://github.com/mastra-ai/mastra/commit/ab610f6f41dbfe6c9502368671485ca7a0aac09b), [`e6bda5f`](https://github.com/mastra-ai/mastra/commit/e6bda5f954ee8493ea18adc1a883f0a5b785ad9b)]:
110
+ - @mastra/core@0.17.1-alpha.0
111
+
112
+ ## 0.17.0
113
+
114
+ ### Minor Changes
115
+
116
+ - Remove original AgentNetwork ([#7919](https://github.com/mastra-ai/mastra/pull/7919))
117
+
118
+ ### Patch Changes
119
+
120
+ - Add helpful error message when trying to import from top-level import ([#7762](https://github.com/mastra-ai/mastra/pull/7762))
121
+
122
+ - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
123
+
124
+ - Resumable streams ([#7949](https://github.com/mastra-ai/mastra/pull/7949))
125
+
126
+ - Voice errors that are instance of a MastraError should not throw a 500 ([#7749](https://github.com/mastra-ai/mastra/pull/7749))
127
+
128
+ - Update package.json and README ([#7886](https://github.com/mastra-ai/mastra/pull/7886))
129
+
130
+ - 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)]:
131
+ - @mastra/core@0.17.0
132
+
133
+ ## 0.17.0-alpha.8
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [[`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a)]:
138
+ - @mastra/core@0.17.0-alpha.8
139
+
140
+ ## 0.17.0-alpha.7
141
+
142
+ ### Patch Changes
143
+
144
+ - Updated dependencies [[`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689)]:
145
+ - @mastra/core@0.17.0-alpha.7
146
+
147
+ ## 0.17.0-alpha.6
148
+
149
+ ### Minor Changes
150
+
151
+ - Remove original AgentNetwork ([#7919](https://github.com/mastra-ai/mastra/pull/7919))
152
+
153
+ ### Patch Changes
154
+
155
+ - Resumable streams ([#7949](https://github.com/mastra-ai/mastra/pull/7949))
156
+
157
+ - 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)]:
158
+ - @mastra/core@0.17.0-alpha.6
159
+
160
+ ## 0.17.0-alpha.5
161
+
162
+ ### Patch Changes
163
+
164
+ - Updated dependencies [[`6047778`](https://github.com/mastra-ai/mastra/commit/6047778e501df460648f31decddf8e443f36e373)]:
165
+ - @mastra/core@0.17.0-alpha.5
166
+
167
+ ## 0.17.0-alpha.4
168
+
169
+ ### Patch Changes
170
+
171
+ - Update package.json and README ([#7886](https://github.com/mastra-ai/mastra/pull/7886))
172
+
173
+ - 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)]:
174
+ - @mastra/core@0.17.0-alpha.4
175
+
176
+ ## 0.17.0-alpha.3
177
+
178
+ ### Patch Changes
179
+
180
+ - Add helpful error message when trying to import from top-level import ([#7762](https://github.com/mastra-ai/mastra/pull/7762))
181
+
182
+ - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
183
+
184
+ - 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)]:
185
+ - @mastra/core@0.17.0-alpha.3
186
+
187
+ ## 0.16.4-alpha.2
188
+
189
+ ### Patch Changes
190
+
191
+ - Updated dependencies [[`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251)]:
192
+ - @mastra/core@0.16.4-alpha.2
193
+
194
+ ## 0.16.4-alpha.1
195
+
196
+ ### Patch Changes
197
+
198
+ - Updated dependencies [[`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4)]:
199
+ - @mastra/core@0.16.4-alpha.1
200
+
201
+ ## 0.16.4-alpha.0
202
+
203
+ ### Patch Changes
204
+
205
+ - Voice errors that are instance of a MastraError should not throw a 500 ([#7749](https://github.com/mastra-ai/mastra/pull/7749))
206
+
207
+ - Updated dependencies [[`5802bf5`](https://github.com/mastra-ai/mastra/commit/5802bf57f6182e4b67c28d7d91abed349a8d14f3), [`5bda53a`](https://github.com/mastra-ai/mastra/commit/5bda53a9747bfa7d876d754fc92c83a06e503f62), [`f26a8fd`](https://github.com/mastra-ai/mastra/commit/f26a8fd99fcb0497a5d86c28324430d7f6a5fb83), [`1a1fbe6`](https://github.com/mastra-ai/mastra/commit/1a1fbe66efb7d94abc373ed0dd9676adb8122454), [`36f39c0`](https://github.com/mastra-ai/mastra/commit/36f39c00dc794952dc3c11aab91c2fa8bca74b11)]:
208
+ - @mastra/core@0.16.4-alpha.0
209
+
210
+ ## 0.16.3
211
+
212
+ ### Patch Changes
213
+
214
+ - Delayed deprecation notice for streamVNext() replacing stream() until Sept 23rd ([#7739](https://github.com/mastra-ai/mastra/pull/7739))
215
+
216
+ - an part 3 ([#7705](https://github.com/mastra-ai/mastra/pull/7705))
217
+
218
+ - Update peer deps ([#7741](https://github.com/mastra-ai/mastra/pull/7741))
219
+
220
+ - Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
221
+
222
+ - Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`2a6585f`](https://github.com/mastra-ai/mastra/commit/2a6585f7cb71f023f805d521d1c3c95fb9a3aa59), [`3d26e83`](https://github.com/mastra-ai/mastra/commit/3d26e8353a945719028f087cc6ac4b06f0ce27d2), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`56e55d1`](https://github.com/mastra-ai/mastra/commit/56e55d1e9eb63e7d9e41aa46e012aae471256812), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
223
+ - @mastra/core@0.16.3
224
+
225
+ ## 0.16.3-alpha.1
226
+
227
+ ### Patch Changes
228
+
229
+ - Delayed deprecation notice for streamVNext() replacing stream() until Sept 23rd ([#7739](https://github.com/mastra-ai/mastra/pull/7739))
230
+
231
+ - Update peer deps ([#7741](https://github.com/mastra-ai/mastra/pull/7741))
232
+
233
+ - Client SDK Agents, Mastra server - support runtimeContext with GET requests ([#7734](https://github.com/mastra-ai/mastra/pull/7734))
234
+
235
+ - Updated dependencies [[`2a6585f`](https://github.com/mastra-ai/mastra/commit/2a6585f7cb71f023f805d521d1c3c95fb9a3aa59), [`3d26e83`](https://github.com/mastra-ai/mastra/commit/3d26e8353a945719028f087cc6ac4b06f0ce27d2), [`56e55d1`](https://github.com/mastra-ai/mastra/commit/56e55d1e9eb63e7d9e41aa46e012aae471256812)]:
236
+ - @mastra/core@0.16.3-alpha.1
237
+
238
+ ## 0.16.3-alpha.0
239
+
240
+ ### Patch Changes
241
+
242
+ - an part 3 ([#7705](https://github.com/mastra-ai/mastra/pull/7705))
243
+
244
+ - Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`a566c4e`](https://github.com/mastra-ai/mastra/commit/a566c4e92d86c1671707c54359b1d33934f7cc13), [`af333aa`](https://github.com/mastra-ai/mastra/commit/af333aa30fe6d1b127024b03a64736c46eddeca2), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975)]:
245
+ - @mastra/core@0.16.3-alpha.0
246
+
247
+ ## 0.16.2
248
+
249
+ ### Patch Changes
250
+
251
+ - Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
252
+ - @mastra/core@0.16.2
253
+
254
+ ## 0.16.2-alpha.0
255
+
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies [[`61926ef`](https://github.com/mastra-ai/mastra/commit/61926ef40d415b805a63527cffe27a50542e15e5)]:
259
+ - @mastra/core@0.16.2-alpha.0
260
+
261
+ ## 0.16.1
262
+
263
+ ### Patch Changes
264
+
265
+ - Flatten loop config in stream options and pass to loop options ([#7643](https://github.com/mastra-ai/mastra/pull/7643))
266
+
267
+ - Fix a bug where `typescript` was bundled into `dist` ([#7585](https://github.com/mastra-ai/mastra/pull/7585))
268
+
269
+ - 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)]:
270
+ - @mastra/core@0.16.1
271
+
272
+ ## 0.16.1-alpha.3
273
+
274
+ ### Patch Changes
275
+
276
+ - Updated dependencies [[`fd9bbfe`](https://github.com/mastra-ai/mastra/commit/fd9bbfee22484f8493582325f53e8171bf8e682b)]:
277
+ - @mastra/core@0.16.1-alpha.3
278
+
279
+ ## 0.16.1-alpha.2
280
+
281
+ ### Patch Changes
282
+
283
+ - Flatten loop config in stream options and pass to loop options ([#7643](https://github.com/mastra-ai/mastra/pull/7643))
284
+
285
+ - Fix a bug where `typescript` was bundled into `dist` ([#7585](https://github.com/mastra-ai/mastra/pull/7585))
286
+
287
+ - Updated dependencies [[`827d876`](https://github.com/mastra-ai/mastra/commit/827d8766f36a900afcaf64a040f7ba76249009b3), [`7eaf1d1`](https://github.com/mastra-ai/mastra/commit/7eaf1d1cec7e828d7a98efc2a748ac395bbdba3b), [`f3427cd`](https://github.com/mastra-ai/mastra/commit/f3427cdaf9eecd63360dfc897a4acbf5f4143a4e), [`05f13b8`](https://github.com/mastra-ai/mastra/commit/05f13b8fb269ccfc4de98e9db58dbe16eae55a5e)]:
288
+ - @mastra/core@0.16.1-alpha.2
289
+
290
+ ## 0.16.1-alpha.1
291
+
292
+ ### Patch Changes
293
+
294
+ - 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)]:
295
+ - @mastra/core@0.16.1-alpha.1
296
+
297
+ ## 0.16.1-alpha.0
298
+
299
+ ### Patch Changes
300
+
301
+ - Updated dependencies [[`0662d02`](https://github.com/mastra-ai/mastra/commit/0662d02ef16916e67531890639fcd72c69cfb6e2), [`6189844`](https://github.com/mastra-ai/mastra/commit/61898448e65bda02bb814fb15801a89dc6476938), [`d7a8f59`](https://github.com/mastra-ai/mastra/commit/d7a8f59154b0621aec4f41a6b2ea2b3882f03cb7), [`4dda259`](https://github.com/mastra-ai/mastra/commit/4dda2593b6343f9258671de5fb237aeba3ef6bb7), [`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)]:
302
+ - @mastra/core@0.16.1-alpha.0
303
+
304
+ ## 0.16.0
305
+
306
+ ### Minor Changes
307
+
308
+ - 376913a: Update peerdeps of @mastra/core
309
+
310
+ ### Patch Changes
311
+
312
+ - cf4e353: Agent Builder Template - adding in UI components to use agent builder template actions
313
+ - 5397eb4: Add public URL support when adding files in Multi Modal
314
+ - 97eea1f: add body sanitization to agent handlers
315
+ - Updated dependencies [8fbf79e]
316
+ - Updated dependencies [fd83526]
317
+ - Updated dependencies [d0b90ab]
318
+ - Updated dependencies [6f5eb7a]
319
+ - Updated dependencies [a01cf14]
320
+ - Updated dependencies [a9e50ee]
321
+ - Updated dependencies [5397eb4]
322
+ - Updated dependencies [c9f4e4a]
323
+ - Updated dependencies [0acbc80]
324
+ - @mastra/core@0.16.0
325
+
326
+ ## 0.16.0-alpha.1
327
+
328
+ ### Minor Changes
329
+
330
+ - 376913a: Update peerdeps of @mastra/core
331
+
332
+ ### Patch Changes
333
+
334
+ - Updated dependencies [8fbf79e]
335
+ - @mastra/core@0.16.0-alpha.1
336
+
337
+ ## 0.16.0-alpha.0
338
+
339
+ ### Patch Changes
340
+
341
+ - cf4e353: Agent Builder Template - adding in UI components to use agent builder template actions
342
+ - 5397eb4: Add public URL support when adding files in Multi Modal
343
+ - 97eea1f: add body sanitization to agent handlers
344
+ - Updated dependencies [fd83526]
345
+ - Updated dependencies [d0b90ab]
346
+ - Updated dependencies [6f5eb7a]
347
+ - Updated dependencies [a01cf14]
348
+ - Updated dependencies [a9e50ee]
349
+ - Updated dependencies [5397eb4]
350
+ - Updated dependencies [c9f4e4a]
351
+ - Updated dependencies [0acbc80]
352
+ - @mastra/core@0.16.0-alpha.0
353
+
354
+ ## 0.15.3
4
355
 
5
356
  ### Patch Changes
6
357
 
7
358
  - ff89505: Add deprecation warnings and add legacy routes
8
359
  - de3cbc6: Update the `package.json` file to include additional fields like `repository`, `homepage` or `files`.
9
360
  - f0dfcac: updated core peerdep
361
+ - 48f0742: add deployer, server and clientjs handlers for agent builder template
10
362
  - 12adcc8: add missing endpoint to get agent tool by ID
11
363
  - bcec7db: Mastra server - Pipe abort signal correctly to agent stream,generate
12
364
  - 5de1555: Fixed tracingContext on tool executions in AI tracing
13
365
  - 03d0c39: temp disable agent-builder workflows import
366
+ - Updated dependencies [ab48c97]
14
367
  - Updated dependencies [85ef90b]
15
368
  - Updated dependencies [aedbbfa]
16
369
  - Updated dependencies [ff89505]
@@ -19,34 +372,40 @@
19
372
  - Updated dependencies [c19bcf7]
20
373
  - Updated dependencies [4474d04]
21
374
  - Updated dependencies [183dc95]
22
- - Updated dependencies [f5e7282]
23
- - Updated dependencies [a32248b]
24
375
  - Updated dependencies [a1111e2]
25
376
  - Updated dependencies [b42a961]
26
377
  - Updated dependencies [61debef]
27
378
  - Updated dependencies [9beaeff]
379
+ - Updated dependencies [29de0e1]
380
+ - Updated dependencies [f643c65]
28
381
  - Updated dependencies [00c74e7]
29
382
  - Updated dependencies [fef7375]
30
383
  - Updated dependencies [e3d8fea]
31
384
  - Updated dependencies [45e4d39]
32
385
  - Updated dependencies [9eee594]
386
+ - Updated dependencies [7149d8d]
33
387
  - Updated dependencies [822c2e8]
34
388
  - Updated dependencies [979912c]
389
+ - Updated dependencies [7dcf4c0]
35
390
  - Updated dependencies [4106a58]
36
391
  - Updated dependencies [ad78bfc]
37
392
  - Updated dependencies [0302f50]
393
+ - Updated dependencies [6ac697e]
38
394
  - Updated dependencies [74db265]
395
+ - Updated dependencies [0ce418a]
396
+ - Updated dependencies [af90672]
39
397
  - Updated dependencies [8387952]
40
398
  - Updated dependencies [7f3b8da]
41
399
  - Updated dependencies [905352b]
42
400
  - Updated dependencies [599d04c]
43
401
  - Updated dependencies [56041d0]
402
+ - Updated dependencies [3412597]
44
403
  - Updated dependencies [5eca5d2]
45
404
  - Updated dependencies [f2cda47]
46
405
  - Updated dependencies [5de1555]
47
406
  - Updated dependencies [cfd377a]
48
407
  - Updated dependencies [1ed5a3e]
49
- - @mastra/core@0.0.0-consolidate-changesets-20250904042643
408
+ - @mastra/core@0.15.3
50
409
 
51
410
  ## 0.15.3-alpha.9
52
411
 
package/README.md CHANGED
@@ -65,8 +65,3 @@ pnpm run pull:openapispec
65
65
  ```
66
66
 
67
67
  within the `@mastra/server` directory.
68
-
69
- ## License
70
-
71
- Released under the Elastic License 2.0. The full license text is available in
72
- this repository.
@@ -20,19 +20,23 @@ async function getScorersFromSystem({
20
20
  const agents = mastra.getAgents();
21
21
  const workflows = mastra.getWorkflows();
22
22
  const scorersMap = /* @__PURE__ */ new Map();
23
- for (const [_agentId, agent] of Object.entries(agents)) {
23
+ for (const [agentId, agent] of Object.entries(agents)) {
24
24
  const scorers = await agent.getScorers({
25
25
  runtimeContext
26
26
  }) || {};
27
27
  if (Object.keys(scorers).length > 0) {
28
- for (const [scorerId, scorer] of Object.entries(scorers)) {
29
- if (scorersMap.has(scorerId)) {
30
- scorersMap.get(scorerId)?.agentIds.push(agent.name);
28
+ for (const [_scorerId, scorer] of Object.entries(scorers)) {
29
+ const scorerName = scorer.scorer.name;
30
+ if (scorersMap.has(scorerName)) {
31
+ scorersMap.get(scorerName)?.agentIds.push(agentId);
32
+ scorersMap.get(scorerName)?.agentNames.push(agent.name);
31
33
  } else {
32
- scorersMap.set(scorerId, {
34
+ scorersMap.set(scorerName, {
33
35
  workflowIds: [],
34
36
  ...scorer,
35
- agentIds: [agent.name]
37
+ agentNames: [agent.name],
38
+ agentIds: [agentId],
39
+ isRegistered: false
36
40
  });
37
41
  }
38
42
  }
@@ -43,19 +47,37 @@ async function getScorersFromSystem({
43
47
  runtimeContext
44
48
  }) || {};
45
49
  if (Object.keys(scorers).length > 0) {
46
- for (const [scorerId, scorer] of Object.entries(scorers)) {
47
- if (scorersMap.has(scorerId)) {
48
- scorersMap.get(scorerId)?.workflowIds.push(workflowId);
50
+ for (const [_scorerId, scorer] of Object.entries(scorers)) {
51
+ const scorerName = scorer.scorer.name;
52
+ if (scorersMap.has(scorerName)) {
53
+ scorersMap.get(scorerName)?.workflowIds.push(workflowId);
49
54
  } else {
50
- scorersMap.set(scorerId, {
55
+ scorersMap.set(scorerName, {
51
56
  agentIds: [],
57
+ agentNames: [],
52
58
  ...scorer,
53
- workflowIds: [workflowId]
59
+ workflowIds: [workflowId],
60
+ isRegistered: false
54
61
  });
55
62
  }
56
63
  }
57
64
  }
58
65
  }
66
+ const registeredScorers = await mastra.getScorers();
67
+ for (const [_scorerId, scorer] of Object.entries(registeredScorers || {})) {
68
+ const scorerName = scorer.name;
69
+ if (scorersMap.has(scorerName)) {
70
+ scorersMap.get(scorerName).isRegistered = true;
71
+ } else {
72
+ scorersMap.set(scorerName, {
73
+ scorer,
74
+ agentIds: [],
75
+ agentNames: [],
76
+ workflowIds: [],
77
+ isRegistered: true
78
+ });
79
+ }
80
+ }
59
81
  return Object.fromEntries(scorersMap.entries());
60
82
  }
61
83
  async function getScorersHandler({ mastra, runtimeContext }) {
@@ -86,11 +108,14 @@ async function getScoresByRunIdHandler({
86
108
  pagination
87
109
  }) {
88
110
  try {
89
- const scores = await mastra.getStorage()?.getScoresByRunId?.({
111
+ const scoreResults = await mastra.getStorage()?.getScoresByRunId?.({
90
112
  runId,
91
113
  pagination
92
- }) || [];
93
- return scores;
114
+ }) || { pagination: { total: 0, page: 0, perPage: 0, hasMore: false }, scores: [] };
115
+ return {
116
+ pagination: scoreResults.pagination,
117
+ scores: scoreResults.scores.map((score) => ({ ...score, ...getTraceDetails(score.traceId) }))
118
+ };
94
119
  } catch (error) {
95
120
  return chunkRE4RPXT2_cjs.handleError(error, "Error getting scores by run id");
96
121
  }
@@ -103,13 +128,16 @@ async function getScoresByScorerIdHandler({
103
128
  entityType
104
129
  }) {
105
130
  try {
106
- const scores = await mastra.getStorage()?.getScoresByScorerId?.({
131
+ const scoreResults = await mastra.getStorage()?.getScoresByScorerId?.({
107
132
  scorerId,
108
133
  pagination,
109
134
  entityId,
110
135
  entityType
111
- }) || [];
112
- return scores;
136
+ }) || { pagination: { total: 0, page: 0, perPage: 0, hasMore: false }, scores: [] };
137
+ return {
138
+ pagination: scoreResults.pagination,
139
+ scores: scoreResults.scores.map((score) => ({ ...score, ...getTraceDetails(score.traceId) }))
140
+ };
113
141
  } catch (error) {
114
142
  return chunkRE4RPXT2_cjs.handleError(error, "Error getting scores by scorer id");
115
143
  }
@@ -129,16 +157,26 @@ async function getScoresByEntityIdHandler({
129
157
  const workflow = mastra.getWorkflowById(entityId);
130
158
  entityIdToUse = workflow.id;
131
159
  }
132
- const scores = await mastra.getStorage()?.getScoresByEntityId?.({
160
+ const scoreResults = await mastra.getStorage()?.getScoresByEntityId?.({
133
161
  entityId: entityIdToUse,
134
162
  entityType,
135
163
  pagination
136
- }) || [];
137
- return scores;
164
+ }) || { pagination: { total: 0, page: 0, perPage: 0, hasMore: false }, scores: [] };
165
+ return {
166
+ pagination: scoreResults.pagination,
167
+ scores: scoreResults.scores.map((score) => ({ ...score, ...getTraceDetails(score.traceId) }))
168
+ };
138
169
  } catch (error) {
139
170
  return chunkRE4RPXT2_cjs.handleError(error, "Error getting scores by entity id");
140
171
  }
141
172
  }
173
+ function getTraceDetails(traceIdWithSpanId) {
174
+ if (!traceIdWithSpanId) {
175
+ return {};
176
+ }
177
+ const [traceId, spanId] = traceIdWithSpanId.split("-");
178
+ return { traceId, spanId };
179
+ }
142
180
  async function saveScoreHandler({ mastra, score }) {
143
181
  try {
144
182
  const scores = await mastra.getStorage()?.saveScore?.(score) || [];
@@ -155,5 +193,5 @@ exports.getScoresByRunIdHandler = getScoresByRunIdHandler;
155
193
  exports.getScoresByScorerIdHandler = getScoresByScorerIdHandler;
156
194
  exports.saveScoreHandler = saveScoreHandler;
157
195
  exports.scores_exports = scores_exports;
158
- //# sourceMappingURL=chunk-GUI3CROV.cjs.map
159
- //# sourceMappingURL=chunk-GUI3CROV.cjs.map
196
+ //# sourceMappingURL=chunk-2GDLSAVJ.cjs.map
197
+ //# sourceMappingURL=chunk-2GDLSAVJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/server/handlers/scores.ts"],"names":["__export","handleError"],"mappings":";;;;;;AAAA,IAAA,cAAA,GAAA;AAAAA,0BAAA,CAAA,cAAA,EAAA;AAAA,EAAA,gBAAA,EAAA,MAAA,gBAAA;AAAA,EAAA,iBAAA,EAAA,MAAA,iBAAA;AAAA,EAAA,0BAAA,EAAA,MAAA,0BAAA;AAAA,EAAA,uBAAA,EAAA,MAAA,uBAAA;AAAA,EAAA,0BAAA,EAAA,MAAA,0BAAA;AAAA,EAAA,gBAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAMA,eAAe,oBAAA,CAAqB;AAAA,EAClC,MAAA;AAAA,EACA;AACF,CAAA,EAEG;AACD,EAAA,MAAM,MAAA,GAAS,OAAO,SAAA,EAAU;AAChC,EAAA,MAAM,SAAA,GAAY,OAAO,YAAA,EAAa;AAEtC,EAAA,MAAM,UAAA,uBAAiB,GAAA,EAGrB;AAEF,EAAA,KAA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IAAc,mBAAA,GAAsB;AAAA,MACrE,QAAA,EAAU,aAAA;AAAA,MACV,UAAA;AAAA,MACA;AAAA,KACD,CAAA,IAAM,EAAE,UAAA,EAAY,EAAE,OAAO,CAAA,EAAG,IAAA,EAAM,CAAA,EAAG,OAAA,EAAS,GAAG,OAAA,EAAS,KAAA,EAAM,EAAG,MAAA,EAAQ,EAAC,EAAE;AAEnF,IAAA,OAAO;AAAA,MACL,YAAY,YAAA,CAAa,UAAA;AAAA,MACzB,MAAA,EAAQ,YAAA,CAAa,MAAA,CAAO,GAAA,CAAI,CAAA,KAAA,MAAU,EAAE,GAAG,KAAA,EAAO,GAAG,eAAA,CAAgB,KAAA,CAAM,OAAO,GAAE,CAAE;AAAA,KAC5F;AAAA,EACF,SAAS,KAAA,EAAO;AACd,IAAA,OAAOA,6BAAA,CAAY,OAAO,mCAAmC,CAAA;AAAA,EAC/D;AACF;AAEA,SAAS,gBAAgB,iBAAA,EAA4B;AACnD,EAAA,IAAI,CAAC,iBAAA,EAAmB;AACtB,IAAA,OAAO,EAAC;AAAA,EACV;AAEA,EAAA,MAAM,CAAC,OAAA,EAAS,MAAM,CAAA,GAAI,iBAAA,CAAkB,MAAM,GAAG,CAAA;AACrD,EAAA,OAAO,EAAE,SAAS,MAAA,EAAO;AAC3B;AAEA,eAAsB,gBAAA,CAAiB,EAAE,MAAA,EAAQ,KAAA,EAAM,EAAsC;AAC3F,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAU,MAAM,MAAA,CAAO,UAAA,IAAc,SAAA,GAAY,KAAK,KAAM,EAAC;AACnE,IAAA,OAAO,MAAA;AAAA,EACT,SAAS,KAAA,EAAO;AACd,IAAA,OAAOA,6BAAA,CAAY,OAAO,oBAAoB,CAAA;AAAA,EAChD;AACF","file":"chunk-2GDLSAVJ.cjs","sourcesContent":["import type { RuntimeContext } from '@mastra/core/runtime-context';\nimport type { MastraScorerEntry, ScoreRowData } from '@mastra/core/scores';\nimport type { StoragePagination } from '@mastra/core/storage';\nimport type { Context } from '../types';\nimport { handleError } from './error';\n\nasync function getScorersFromSystem({\n mastra,\n runtimeContext,\n}: Context & {\n runtimeContext: RuntimeContext;\n}) {\n const agents = mastra.getAgents();\n const workflows = mastra.getWorkflows();\n\n const scorersMap = new Map<\n string,\n MastraScorerEntry & { agentIds: string[]; agentNames: string[]; workflowIds: string[]; isRegistered: boolean }\n >();\n\n for (const [agentId, agent] of Object.entries(agents)) {\n const scorers =\n (await agent.getScorers({\n runtimeContext,\n })) || {};\n\n if (Object.keys(scorers).length > 0) {\n for (const [_scorerId, scorer] of Object.entries(scorers)) {\n const scorerName = scorer.scorer.name;\n if (scorersMap.has(scorerName)) {\n scorersMap.get(scorerName)?.agentIds.push(agentId);\n scorersMap.get(scorerName)?.agentNames.push(agent.name);\n } else {\n scorersMap.set(scorerName, {\n workflowIds: [],\n ...scorer,\n agentNames: [agent.name],\n agentIds: [agentId],\n isRegistered: false,\n });\n }\n }\n }\n }\n\n for (const [workflowId, workflow] of Object.entries(workflows)) {\n const scorers =\n (await workflow.getScorers({\n runtimeContext,\n })) || {};\n\n if (Object.keys(scorers).length > 0) {\n for (const [_scorerId, scorer] of Object.entries(scorers)) {\n const scorerName = scorer.scorer.name;\n if (scorersMap.has(scorerName)) {\n scorersMap.get(scorerName)?.workflowIds.push(workflowId);\n } else {\n scorersMap.set(scorerName, {\n agentIds: [],\n agentNames: [],\n ...scorer,\n workflowIds: [workflowId],\n isRegistered: false,\n });\n }\n }\n }\n }\n\n const registeredScorers = await mastra.getScorers();\n for (const [_scorerId, scorer] of Object.entries(registeredScorers || {})) {\n const scorerName = scorer.name;\n if (scorersMap.has(scorerName)) {\n scorersMap.get(scorerName)!.isRegistered = true;\n } else {\n scorersMap.set(scorerName, {\n scorer: scorer,\n agentIds: [],\n agentNames: [],\n workflowIds: [],\n isRegistered: true,\n });\n }\n }\n\n return Object.fromEntries(scorersMap.entries());\n}\n\nexport async function getScorersHandler({ mastra, runtimeContext }: Context & { runtimeContext: RuntimeContext }) {\n const scorers = await getScorersFromSystem({\n mastra,\n runtimeContext,\n });\n\n return scorers;\n}\n\nexport async function getScorerHandler({\n mastra,\n scorerId,\n runtimeContext,\n}: Context & { scorerId: string; runtimeContext: RuntimeContext }) {\n const scorers = await getScorersFromSystem({\n mastra,\n runtimeContext,\n });\n\n const scorer = scorers[scorerId];\n\n if (!scorer) {\n return null;\n }\n\n return scorer;\n}\n\nexport async function getScoresByRunIdHandler({\n mastra,\n runId,\n pagination,\n}: Context & { runId: string; pagination: StoragePagination }) {\n try {\n const scoreResults = (await mastra.getStorage()?.getScoresByRunId?.({\n runId,\n pagination,\n })) || { pagination: { total: 0, page: 0, perPage: 0, hasMore: false }, scores: [] };\n return {\n pagination: scoreResults.pagination,\n scores: scoreResults.scores.map(score => ({ ...score, ...getTraceDetails(score.traceId) })),\n };\n } catch (error) {\n return handleError(error, 'Error getting scores by run id');\n }\n}\n\nexport async function getScoresByScorerIdHandler({\n mastra,\n scorerId,\n pagination,\n entityId,\n entityType,\n}: Context & { scorerId: string; pagination: StoragePagination; entityId?: string; entityType?: string }) {\n try {\n const scoreResults = (await mastra.getStorage()?.getScoresByScorerId?.({\n scorerId,\n pagination,\n entityId,\n entityType,\n })) || { pagination: { total: 0, page: 0, perPage: 0, hasMore: false }, scores: [] };\n return {\n pagination: scoreResults.pagination,\n scores: scoreResults.scores.map(score => ({ ...score, ...getTraceDetails(score.traceId) })),\n };\n } catch (error) {\n return handleError(error, 'Error getting scores by scorer id');\n }\n}\n\nexport async function getScoresByEntityIdHandler({\n mastra,\n entityId,\n entityType,\n pagination,\n}: Context & { entityId: string; entityType: string; pagination: StoragePagination }) {\n try {\n let entityIdToUse = entityId;\n\n if (entityType === 'AGENT') {\n const agent = mastra.getAgentById(entityId);\n entityIdToUse = agent.id;\n } else if (entityType === 'WORKFLOW') {\n const workflow = mastra.getWorkflowById(entityId);\n entityIdToUse = workflow.id;\n }\n\n const scoreResults = (await mastra.getStorage()?.getScoresByEntityId?.({\n entityId: entityIdToUse,\n entityType,\n pagination,\n })) || { pagination: { total: 0, page: 0, perPage: 0, hasMore: false }, scores: [] };\n\n return {\n pagination: scoreResults.pagination,\n scores: scoreResults.scores.map(score => ({ ...score, ...getTraceDetails(score.traceId) })),\n };\n } catch (error) {\n return handleError(error, 'Error getting scores by entity id');\n }\n}\n\nfunction getTraceDetails(traceIdWithSpanId?: string) {\n if (!traceIdWithSpanId) {\n return {};\n }\n\n const [traceId, spanId] = traceIdWithSpanId.split('-');\n return { traceId, spanId };\n}\n\nexport async function saveScoreHandler({ mastra, score }: Context & { score: ScoreRowData }) {\n try {\n const scores = (await mastra.getStorage()?.saveScore?.(score)) || [];\n return scores;\n } catch (error) {\n return handleError(error, 'Error saving score');\n }\n}\n"]}
@@ -12,7 +12,14 @@ function validateBody(body) {
12
12
  throw new HTTPException(400, { message: Object.values(errorResponse)[0] });
13
13
  }
14
14
  }
15
+ function sanitizeBody(body, disallowedKeys) {
16
+ for (const key of disallowedKeys) {
17
+ if (key in body) {
18
+ delete body[key];
19
+ }
20
+ }
21
+ }
15
22
 
16
- export { validateBody };
17
- //# sourceMappingURL=chunk-OW4FX5TS.js.map
18
- //# sourceMappingURL=chunk-OW4FX5TS.js.map
23
+ export { sanitizeBody, validateBody };
24
+ //# sourceMappingURL=chunk-4QCXUEAT.js.map
25
+ //# sourceMappingURL=chunk-4QCXUEAT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/server/handlers/utils.ts"],"names":[],"mappings":";;;AAGO,SAAS,aAAa,IAAA,EAA+B;AAC1D,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,OAAA,CAAQ,IAAI,CAAA,CAAE,MAAA,CAA+B,CAAC,GAAA,EAAK,CAAC,GAAA,EAAK,KAAK,CAAA,KAAM;AAC/F,IAAA,IAAI,CAAC,KAAA,EAAO;AACV,MAAA,GAAA,CAAI,GAAG,CAAA,GAAI,CAAA,UAAA,EAAa,GAAG,CAAA,aAAA,CAAA;AAAA,IAC7B;AACA,IAAA,OAAO,GAAA;AAAA,EACT,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,IAAI,MAAA,CAAO,IAAA,CAAK,aAAa,CAAA,CAAE,SAAS,CAAA,EAAG;AACzC,IAAA,MAAM,IAAI,aAAA,CAAc,GAAA,EAAK,EAAE,OAAA,EAAS,MAAA,CAAO,MAAA,CAAO,aAAa,CAAA,CAAE,CAAC,CAAA,EAAG,CAAA;AAAA,EAC3E;AACF;AAOO,SAAS,YAAA,CAAa,MAA+B,cAAA,EAA0B;AACpF,EAAA,KAAA,MAAW,OAAO,cAAA,EAAgB;AAChC,IAAA,IAAI,OAAO,IAAA,EAAM;AACf,MAAA,OAAO,KAAK,GAAG,CAAA;AAAA,IACjB;AAAA,EACF;AACF","file":"chunk-4QCXUEAT.js","sourcesContent":["import { HTTPException } from '../http-exception';\n\n// Validation helper\nexport function validateBody(body: Record<string, unknown>) {\n const errorResponse = Object.entries(body).reduce<Record<string, string>>((acc, [key, value]) => {\n if (!value) {\n acc[key] = `Argument \"${key}\" is required`;\n }\n return acc;\n }, {});\n\n if (Object.keys(errorResponse).length > 0) {\n throw new HTTPException(400, { message: Object.values(errorResponse)[0] });\n }\n}\n\n/**\n * sanitizes the body by removing disallowed keys.\n * @param body body to sanitize\n * @param disallowedKeys keys to remove from the body\n */\nexport function sanitizeBody(body: Record<string, unknown>, disallowedKeys: string[]) {\n for (const key of disallowedKeys) {\n if (key in body) {\n delete body[key];\n }\n }\n}\n"]}