@mastra/server 1.58.0-alpha.8 → 1.58.0

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 (354) hide show
  1. package/CHANGELOG.md +273 -0
  2. package/dist/{a2a-_D2EA4oa.js → a2a-CUkzkdTZ.js} +3 -3
  3. package/dist/{a2a-_D2EA4oa.js.map → a2a-CUkzkdTZ.js.map} +1 -1
  4. package/dist/{a2a-B6YkZ2i9.cjs → a2a-DzZHH3OH.cjs} +3 -3
  5. package/dist/{a2a-B6YkZ2i9.cjs.map → a2a-DzZHH3OH.cjs.map} +1 -1
  6. package/dist/{agent-versions-DBwhQgbJ.js → agent-versions-CWEnD62A.js} +3 -3
  7. package/dist/{agent-versions-DBwhQgbJ.js.map → agent-versions-CWEnD62A.js.map} +1 -1
  8. package/dist/{agent-versions-znzuht90.cjs → agent-versions-xeysPGel.cjs} +3 -3
  9. package/dist/{agent-versions-znzuht90.cjs.map → agent-versions-xeysPGel.cjs.map} +1 -1
  10. package/dist/{agents--m8fNv8n.cjs → agents-0Tw3kkD_.cjs} +8 -4
  11. package/dist/agents-0Tw3kkD_.cjs.map +1 -0
  12. package/dist/{agents-DpZKzU92.js → agents-uT8ZDE4k.js} +8 -4
  13. package/dist/agents-uT8ZDE4k.js.map +1 -0
  14. package/dist/{api-schema-manifest-ShM6oDjl.cjs → api-schema-manifest-BPk3u4B-.cjs} +3 -3
  15. package/dist/{api-schema-manifest-ShM6oDjl.cjs.map → api-schema-manifest-BPk3u4B-.cjs.map} +1 -1
  16. package/dist/{api-schema-manifest-BEbcI0wc.js → api-schema-manifest-DSelT9XK.js} +3 -3
  17. package/dist/{api-schema-manifest-BEbcI0wc.js.map → api-schema-manifest-DSelT9XK.js.map} +1 -1
  18. package/dist/{background-tasks-DnmhLalp.js → background-tasks-BtWM0sZs.js} +2 -2
  19. package/dist/{background-tasks-DnmhLalp.js.map → background-tasks-BtWM0sZs.js.map} +1 -1
  20. package/dist/{background-tasks-CYgzzUnb.cjs → background-tasks-C5G2jJax.cjs} +2 -2
  21. package/dist/{background-tasks-CYgzzUnb.cjs.map → background-tasks-C5G2jJax.cjs.map} +1 -1
  22. package/dist/{builder-registry-DE5w7bNk.js → builder-registry-B8KyPAOP.js} +3 -3
  23. package/dist/{builder-registry-DE5w7bNk.js.map → builder-registry-B8KyPAOP.js.map} +1 -1
  24. package/dist/{builder-registry-BoaXBdm_.cjs → builder-registry-Dcou-kzd.cjs} +3 -3
  25. package/dist/{builder-registry-BoaXBdm_.cjs.map → builder-registry-Dcou-kzd.cjs.map} +1 -1
  26. package/dist/{channels-BqkOxxEk.js → channels-B9yt3a2P.js} +2 -2
  27. package/dist/{channels-BqkOxxEk.js.map → channels-B9yt3a2P.js.map} +1 -1
  28. package/dist/{channels-BonQBJT0.cjs → channels-BRoq3VKR.cjs} +2 -2
  29. package/dist/{channels-BonQBJT0.cjs.map → channels-BRoq3VKR.cjs.map} +1 -1
  30. package/dist/{default-options-BcPyp2Gx.cjs → default-options-C9HZGjYi.cjs} +6 -3
  31. package/dist/{default-options-BcPyp2Gx.cjs.map → default-options-C9HZGjYi.cjs.map} +1 -1
  32. package/dist/{default-options-DGCDKR3I.js → default-options-C9JVjlto.js} +6 -3
  33. package/dist/{default-options-DGCDKR3I.js.map → default-options-C9JVjlto.js.map} +1 -1
  34. package/dist/{dist-D-2BtcNU.js → dist-7r8jzEWH.js} +68 -1303
  35. package/dist/dist-7r8jzEWH.js.map +1 -0
  36. package/dist/{dist-DhqgxyoU.cjs → dist-DEgLyP8h.cjs} +77 -1315
  37. package/dist/dist-DEgLyP8h.cjs.map +1 -0
  38. package/dist/docs/SKILL.md +2 -1
  39. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  40. package/dist/docs/references/docs-server-custom-adapters.md +1 -1
  41. package/dist/docs/references/docs-server-custom-api-routes.md +375 -0
  42. package/dist/docs/references/reference-server-create-route.md +27 -1
  43. package/dist/{dynamic-workflows-B4LI2B52.js → dynamic-workflows-B0TE8mjA.js} +2 -2
  44. package/dist/{dynamic-workflows-B4LI2B52.js.map → dynamic-workflows-B0TE8mjA.js.map} +1 -1
  45. package/dist/{dynamic-workflows-BXeywVEf.cjs → dynamic-workflows-C-6vmau5.cjs} +2 -2
  46. package/dist/{dynamic-workflows-BXeywVEf.cjs.map → dynamic-workflows-C-6vmau5.cjs.map} +1 -1
  47. package/dist/{editor-builder-DTC6ejp8.js → editor-builder-Byg6wbi6.js} +3 -3
  48. package/dist/{editor-builder-DTC6ejp8.js.map → editor-builder-Byg6wbi6.js.map} +1 -1
  49. package/dist/{editor-builder-CIKX5MYh.cjs → editor-builder-C3ZvffGu.cjs} +2 -2
  50. package/dist/{editor-builder-CIKX5MYh.cjs.map → editor-builder-C3ZvffGu.cjs.map} +1 -1
  51. package/dist/{editor-builder-D20yfDgw.js → editor-builder-DJUxdzC8.js} +2 -2
  52. package/dist/{editor-builder-D20yfDgw.js.map → editor-builder-DJUxdzC8.js.map} +1 -1
  53. package/dist/{editor-builder-B7yBsr6o.cjs → editor-builder-DT7ypWfa.cjs} +3 -3
  54. package/dist/{editor-builder-B7yBsr6o.cjs.map → editor-builder-DT7ypWfa.cjs.map} +1 -1
  55. package/dist/{observability-new-endpoints-Dk3oatL8.cjs → observability-new-endpoints-BC-dasRY.cjs} +2 -2
  56. package/dist/{observability-new-endpoints-Dk3oatL8.cjs.map → observability-new-endpoints-BC-dasRY.cjs.map} +1 -1
  57. package/dist/{observability-new-endpoints-YK2DjZto.js → observability-new-endpoints-Drx0C8uc.js} +2 -2
  58. package/dist/{observability-new-endpoints-YK2DjZto.js.map → observability-new-endpoints-Drx0C8uc.js.map} +1 -1
  59. package/dist/{probe-image-size-DYJVSL0b.cjs → probe-image-size-C2F59z8Z.cjs} +56 -1707
  60. package/dist/probe-image-size-C2F59z8Z.cjs.map +1 -0
  61. package/dist/{probe-image-size-BQgIJeY_.js → probe-image-size-mXCWYNrz.js} +22 -1673
  62. package/dist/probe-image-size-mXCWYNrz.js.map +1 -0
  63. package/dist/{route-builder-CgLVYL1c.cjs → route-builder-BAAedfru.cjs} +11 -2
  64. package/dist/route-builder-BAAedfru.cjs.map +1 -0
  65. package/dist/{route-builder-CIk5k35M.js → route-builder-YQ_gLIvW.js} +11 -2
  66. package/dist/route-builder-YQ_gLIvW.js.map +1 -0
  67. package/dist/{routes-UhNfqEIU.cjs → routes-0BEh3stO.cjs} +10 -10
  68. package/dist/{routes-UhNfqEIU.cjs.map → routes-0BEh3stO.cjs.map} +1 -1
  69. package/dist/{routes-CQgza68o.js → routes-BsMPy5bu.js} +10 -10
  70. package/dist/{routes-CQgza68o.js.map → routes-BsMPy5bu.js.map} +1 -1
  71. package/dist/{schedules-CK3-IE0h.cjs → schedules-DOK225ZZ.cjs} +2 -2
  72. package/dist/{schedules-CK3-IE0h.cjs.map → schedules-DOK225ZZ.cjs.map} +1 -1
  73. package/dist/{schedules-qxFoU-Tb.js → schedules-RjPcNOmY.js} +2 -2
  74. package/dist/{schedules-qxFoU-Tb.js.map → schedules-RjPcNOmY.js.map} +1 -1
  75. package/dist/{schema-Bv9OdW1f-BY6u3u8K.cjs → schema-Bv9OdW1f-CHHI-NTr.cjs} +2 -76
  76. package/dist/schema-Bv9OdW1f-CHHI-NTr.cjs.map +1 -0
  77. package/dist/{schema-Bv9OdW1f-CIOfv-3w.js → schema-Bv9OdW1f-DLSJSqQv.js} +2 -76
  78. package/dist/schema-Bv9OdW1f-DLSJSqQv.js.map +1 -0
  79. package/dist/schema-CGeYTFwm.js +2 -0
  80. package/dist/schema-DkBbires.cjs +1 -0
  81. package/dist/{scorer-versions-PL0wCOT-.cjs → scorer-versions-CYXtxMTU.cjs} +2 -2
  82. package/dist/{scorer-versions-PL0wCOT-.cjs.map → scorer-versions-CYXtxMTU.cjs.map} +1 -1
  83. package/dist/{scorer-versions-DNdVTLOq.js → scorer-versions-CdVjOtQO.js} +2 -2
  84. package/dist/{scorer-versions-DNdVTLOq.js.map → scorer-versions-CdVjOtQO.js.map} +1 -1
  85. package/dist/server/handlers/a2a.cjs +1 -1
  86. package/dist/server/handlers/a2a.d.ts +545 -505
  87. package/dist/server/handlers/a2a.d.ts.map +1 -1
  88. package/dist/server/handlers/a2a.js +1 -1
  89. package/dist/server/handlers/agent-builder.cjs +4 -4
  90. package/dist/server/handlers/agent-builder.d.ts +1069 -764
  91. package/dist/server/handlers/agent-builder.d.ts.map +1 -1
  92. package/dist/server/handlers/agent-builder.js +4 -4
  93. package/dist/server/handlers/agent-controller.cjs +61 -11
  94. package/dist/server/handlers/agent-controller.cjs.map +1 -1
  95. package/dist/server/handlers/agent-controller.d.ts +1547 -893
  96. package/dist/server/handlers/agent-controller.d.ts.map +1 -1
  97. package/dist/server/handlers/agent-controller.js +61 -11
  98. package/dist/server/handlers/agent-controller.js.map +1 -1
  99. package/dist/server/handlers/agent-versions.cjs +3 -3
  100. package/dist/server/handlers/agent-versions.d.ts +8504 -8312
  101. package/dist/server/handlers/agent-versions.d.ts.map +1 -1
  102. package/dist/server/handlers/agent-versions.js +3 -3
  103. package/dist/server/handlers/agents.cjs +6 -6
  104. package/dist/server/handlers/agents.d.ts +9984 -9826
  105. package/dist/server/handlers/agents.d.ts.map +1 -1
  106. package/dist/server/handlers/agents.js +6 -6
  107. package/dist/server/handlers/auth.cjs +1 -1
  108. package/dist/server/handlers/auth.d.ts +693 -297
  109. package/dist/server/handlers/auth.d.ts.map +1 -1
  110. package/dist/server/handlers/auth.js +1 -1
  111. package/dist/server/handlers/background-tasks.cjs +1 -1
  112. package/dist/server/handlers/background-tasks.d.ts +190 -130
  113. package/dist/server/handlers/background-tasks.d.ts.map +1 -1
  114. package/dist/server/handlers/background-tasks.js +1 -1
  115. package/dist/server/handlers/builder-registry.cjs +1 -1
  116. package/dist/server/handlers/builder-registry.d.ts +218 -121
  117. package/dist/server/handlers/builder-registry.d.ts.map +1 -1
  118. package/dist/server/handlers/builder-registry.js +1 -1
  119. package/dist/server/handlers/channels.cjs +1 -1
  120. package/dist/server/handlers/channels.d.ts +157 -77
  121. package/dist/server/handlers/channels.d.ts.map +1 -1
  122. package/dist/server/handlers/channels.js +1 -1
  123. package/dist/server/handlers/conversations.cjs +1 -1
  124. package/dist/server/handlers/conversations.d.ts +221 -141
  125. package/dist/server/handlers/conversations.d.ts.map +1 -1
  126. package/dist/server/handlers/conversations.js +1 -1
  127. package/dist/server/handlers/datasets.cjs +1 -1
  128. package/dist/server/handlers/datasets.d.ts +2669 -2234
  129. package/dist/server/handlers/datasets.d.ts.map +1 -1
  130. package/dist/server/handlers/datasets.js +1 -1
  131. package/dist/server/handlers/dynamic-workflows.cjs +1 -1
  132. package/dist/server/handlers/dynamic-workflows.d.ts +506 -426
  133. package/dist/server/handlers/dynamic-workflows.d.ts.map +1 -1
  134. package/dist/server/handlers/dynamic-workflows.js +1 -1
  135. package/dist/server/handlers/editor-builder.cjs +1 -1
  136. package/dist/server/handlers/editor-builder.d.ts +305 -245
  137. package/dist/server/handlers/editor-builder.d.ts.map +1 -1
  138. package/dist/server/handlers/editor-builder.js +1 -1
  139. package/dist/server/handlers/favorites-enrichment.cjs +1 -1
  140. package/dist/server/handlers/favorites-enrichment.js +1 -1
  141. package/dist/server/handlers/logs.cjs +1 -1
  142. package/dist/server/handlers/logs.d.ts +245 -185
  143. package/dist/server/handlers/logs.d.ts.map +1 -1
  144. package/dist/server/handlers/logs.js +1 -1
  145. package/dist/server/handlers/mcp-client-versions.cjs +2 -2
  146. package/dist/server/handlers/mcp-client-versions.d.ts +447 -307
  147. package/dist/server/handlers/mcp-client-versions.d.ts.map +1 -1
  148. package/dist/server/handlers/mcp-client-versions.js +2 -2
  149. package/dist/server/handlers/mcp.cjs +1 -1
  150. package/dist/server/handlers/mcp.d.ts +357 -156
  151. package/dist/server/handlers/mcp.d.ts.map +1 -1
  152. package/dist/server/handlers/mcp.js +1 -1
  153. package/dist/server/handlers/memory.cjs +1 -1
  154. package/dist/server/handlers/memory.d.ts +1723 -1223
  155. package/dist/server/handlers/memory.d.ts.map +1 -1
  156. package/dist/server/handlers/memory.js +1 -1
  157. package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
  158. package/dist/server/handlers/observability-new-endpoints.d.ts +3239 -2158
  159. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  160. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  161. package/dist/server/handlers/observability-shared.cjs +1 -1
  162. package/dist/server/handlers/observability-shared.js +1 -1
  163. package/dist/server/handlers/observability.cjs +2 -2
  164. package/dist/server/handlers/observability.d.ts +267 -149
  165. package/dist/server/handlers/observability.d.ts.map +1 -1
  166. package/dist/server/handlers/observability.js +2 -2
  167. package/dist/server/handlers/processor-providers.cjs +1 -1
  168. package/dist/server/handlers/processor-providers.d.ts +74 -34
  169. package/dist/server/handlers/processor-providers.d.ts.map +1 -1
  170. package/dist/server/handlers/processor-providers.js +1 -1
  171. package/dist/server/handlers/processors.cjs +1 -1
  172. package/dist/server/handlers/processors.d.ts +222 -173
  173. package/dist/server/handlers/processors.d.ts.map +1 -1
  174. package/dist/server/handlers/processors.js +1 -1
  175. package/dist/server/handlers/prompt-block-versions.cjs +2 -2
  176. package/dist/server/handlers/prompt-block-versions.d.ts +646 -506
  177. package/dist/server/handlers/prompt-block-versions.d.ts.map +1 -1
  178. package/dist/server/handlers/prompt-block-versions.js +2 -2
  179. package/dist/server/handlers/responses.cjs +1 -1
  180. package/dist/server/handlers/responses.d.ts +352 -362
  181. package/dist/server/handlers/responses.d.ts.map +1 -1
  182. package/dist/server/handlers/responses.js +1 -1
  183. package/dist/server/handlers/schedules.cjs +1 -1
  184. package/dist/server/handlers/schedules.d.ts +1190 -1028
  185. package/dist/server/handlers/schedules.d.ts.map +1 -1
  186. package/dist/server/handlers/schedules.js +1 -1
  187. package/dist/server/handlers/scorer-versions.cjs +3 -3
  188. package/dist/server/handlers/scorer-versions.d.ts +551 -411
  189. package/dist/server/handlers/scorer-versions.d.ts.map +1 -1
  190. package/dist/server/handlers/scorer-versions.js +3 -3
  191. package/dist/server/handlers/scores.cjs +1 -1
  192. package/dist/server/handlers/scores.d.ts +287 -167
  193. package/dist/server/handlers/scores.d.ts.map +1 -1
  194. package/dist/server/handlers/scores.js +1 -1
  195. package/dist/server/handlers/stored-agent-favorites.cjs +4 -4
  196. package/dist/server/handlers/stored-agent-favorites.d.ts +62 -22
  197. package/dist/server/handlers/stored-agent-favorites.d.ts.map +1 -1
  198. package/dist/server/handlers/stored-agent-favorites.js +4 -4
  199. package/dist/server/handlers/stored-agents.cjs +4 -4
  200. package/dist/server/handlers/stored-agents.d.ts +12056 -16152
  201. package/dist/server/handlers/stored-agents.d.ts.map +1 -1
  202. package/dist/server/handlers/stored-agents.js +4 -4
  203. package/dist/server/handlers/stored-mcp-clients.cjs +2 -2
  204. package/dist/server/handlers/stored-mcp-clients.d.ts +417 -324
  205. package/dist/server/handlers/stored-mcp-clients.d.ts.map +1 -1
  206. package/dist/server/handlers/stored-mcp-clients.js +2 -2
  207. package/dist/server/handlers/stored-prompt-blocks.cjs +2 -2
  208. package/dist/server/handlers/stored-prompt-blocks.d.ts +603 -555
  209. package/dist/server/handlers/stored-prompt-blocks.d.ts.map +1 -1
  210. package/dist/server/handlers/stored-prompt-blocks.js +2 -2
  211. package/dist/server/handlers/stored-scorers.cjs +3 -3
  212. package/dist/server/handlers/stored-scorers.d.ts +556 -472
  213. package/dist/server/handlers/stored-scorers.d.ts.map +1 -1
  214. package/dist/server/handlers/stored-scorers.js +3 -3
  215. package/dist/server/handlers/stored-skill-favorites.cjs +3 -3
  216. package/dist/server/handlers/stored-skill-favorites.d.ts +62 -22
  217. package/dist/server/handlers/stored-skill-favorites.d.ts.map +1 -1
  218. package/dist/server/handlers/stored-skill-favorites.js +3 -3
  219. package/dist/server/handlers/stored-skills.cjs +3 -3
  220. package/dist/server/handlers/stored-skills.d.ts +632 -515
  221. package/dist/server/handlers/stored-skills.d.ts.map +1 -1
  222. package/dist/server/handlers/stored-skills.js +3 -3
  223. package/dist/server/handlers/stored-workspaces.cjs +2 -2
  224. package/dist/server/handlers/stored-workspaces.d.ts +646 -546
  225. package/dist/server/handlers/stored-workspaces.d.ts.map +1 -1
  226. package/dist/server/handlers/stored-workspaces.js +2 -2
  227. package/dist/server/handlers/system.cjs +2 -2
  228. package/dist/server/handlers/system.d.ts +146 -106
  229. package/dist/server/handlers/system.d.ts.map +1 -1
  230. package/dist/server/handlers/system.js +2 -2
  231. package/dist/server/handlers/tool-providers.cjs +1 -1
  232. package/dist/server/handlers/tool-providers.d.ts +580 -331
  233. package/dist/server/handlers/tool-providers.d.ts.map +1 -1
  234. package/dist/server/handlers/tool-providers.js +1 -1
  235. package/dist/server/handlers/tools.cjs +5 -5
  236. package/dist/server/handlers/tools.d.ts +177 -77
  237. package/dist/server/handlers/tools.d.ts.map +1 -1
  238. package/dist/server/handlers/tools.js +5 -5
  239. package/dist/server/handlers/validate-agent-instructions.cjs +1 -1
  240. package/dist/server/handlers/validate-agent-instructions.js +1 -1
  241. package/dist/server/handlers/vector.cjs +1 -1
  242. package/dist/server/handlers/vector.d.ts +282 -126
  243. package/dist/server/handlers/vector.d.ts.map +1 -1
  244. package/dist/server/handlers/vector.js +1 -1
  245. package/dist/server/handlers/workflows.cjs +3 -3
  246. package/dist/server/handlers/workflows.d.ts +1703 -1181
  247. package/dist/server/handlers/workflows.d.ts.map +1 -1
  248. package/dist/server/handlers/workflows.js +3 -3
  249. package/dist/server/handlers/workspace.cjs +1 -1
  250. package/dist/server/handlers/workspace.d.ts +1936 -1150
  251. package/dist/server/handlers/workspace.d.ts.map +1 -1
  252. package/dist/server/handlers/workspace.js +1 -1
  253. package/dist/server/handlers.cjs +2 -2
  254. package/dist/server/handlers.js +2 -2
  255. package/dist/server/schemas/agent-versions.d.ts +70 -10
  256. package/dist/server/schemas/agent-versions.d.ts.map +1 -1
  257. package/dist/server/schemas/agents.d.ts +23 -3
  258. package/dist/server/schemas/agents.d.ts.map +1 -1
  259. package/dist/server/schemas/default-options.d.ts +7 -1
  260. package/dist/server/schemas/default-options.d.ts.map +1 -1
  261. package/dist/server/schemas/index.cjs +7 -7
  262. package/dist/server/schemas/index.js +7 -7
  263. package/dist/server/schemas/stored-agents.d.ts +140 -20
  264. package/dist/server/schemas/stored-agents.d.ts.map +1 -1
  265. package/dist/server/server-adapter/index.cjs +28 -7
  266. package/dist/server/server-adapter/index.cjs.map +1 -1
  267. package/dist/server/server-adapter/index.d.ts +14 -1
  268. package/dist/server/server-adapter/index.d.ts.map +1 -1
  269. package/dist/server/server-adapter/index.js +28 -7
  270. package/dist/server/server-adapter/index.js.map +1 -1
  271. package/dist/server/server-adapter/openapi-utils.d.ts.map +1 -1
  272. package/dist/server/server-adapter/routes/a2a.d.ts +544 -504
  273. package/dist/server/server-adapter/routes/a2a.d.ts.map +1 -1
  274. package/dist/server/server-adapter/routes/agent-builder.d.ts +1054 -749
  275. package/dist/server/server-adapter/routes/agent-builder.d.ts.map +1 -1
  276. package/dist/server/server-adapter/routes/channels.d.ts +153 -73
  277. package/dist/server/server-adapter/routes/channels.d.ts.map +1 -1
  278. package/dist/server/server-adapter/routes/conversations.d.ts +218 -138
  279. package/dist/server/server-adapter/routes/conversations.d.ts.map +1 -1
  280. package/dist/server/server-adapter/routes/datasets.d.ts +2312 -1877
  281. package/dist/server/server-adapter/routes/datasets.d.ts.map +1 -1
  282. package/dist/server/server-adapter/routes/editor-builder.d.ts +506 -349
  283. package/dist/server/server-adapter/routes/editor-builder.d.ts.map +1 -1
  284. package/dist/server/server-adapter/routes/legacy.d.ts +615 -629
  285. package/dist/server/server-adapter/routes/legacy.d.ts.map +1 -1
  286. package/dist/server/server-adapter/routes/logs.d.ts +243 -183
  287. package/dist/server/server-adapter/routes/logs.d.ts.map +1 -1
  288. package/dist/server/server-adapter/routes/mcp.d.ts +347 -147
  289. package/dist/server/server-adapter/routes/mcp.d.ts.map +1 -1
  290. package/dist/server/server-adapter/routes/memory.d.ts +1699 -1199
  291. package/dist/server/server-adapter/routes/memory.d.ts.map +1 -1
  292. package/dist/server/server-adapter/routes/observability.d.ts +2761 -2103
  293. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  294. package/dist/server/server-adapter/routes/processor-providers.d.ts +70 -30
  295. package/dist/server/server-adapter/routes/processor-providers.d.ts.map +1 -1
  296. package/dist/server/server-adapter/routes/processors.d.ts +220 -171
  297. package/dist/server/server-adapter/routes/processors.d.ts.map +1 -1
  298. package/dist/server/server-adapter/routes/responses.d.ts +350 -360
  299. package/dist/server/server-adapter/routes/responses.d.ts.map +1 -1
  300. package/dist/server/server-adapter/routes/route-builder.d.ts +6 -2
  301. package/dist/server/server-adapter/routes/route-builder.d.ts.map +1 -1
  302. package/dist/server/server-adapter/routes/scorers.d.ts +282 -162
  303. package/dist/server/server-adapter/routes/scorers.d.ts.map +1 -1
  304. package/dist/server/server-adapter/routes/stored-mcp-clients.d.ts +821 -588
  305. package/dist/server/server-adapter/routes/stored-mcp-clients.d.ts.map +1 -1
  306. package/dist/server/server-adapter/routes/stored-prompt-blocks.d.ts +1252 -1064
  307. package/dist/server/server-adapter/routes/stored-prompt-blocks.d.ts.map +1 -1
  308. package/dist/server/server-adapter/routes/stored-scorers.d.ts +1046 -822
  309. package/dist/server/server-adapter/routes/stored-scorers.d.ts.map +1 -1
  310. package/dist/server/server-adapter/routes/stored-skills.d.ts +683 -526
  311. package/dist/server/server-adapter/routes/stored-skills.d.ts.map +1 -1
  312. package/dist/server/server-adapter/routes/stored-workspaces.d.ts +637 -537
  313. package/dist/server/server-adapter/routes/stored-workspaces.d.ts.map +1 -1
  314. package/dist/server/server-adapter/routes/system.d.ts +145 -105
  315. package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
  316. package/dist/server/server-adapter/routes/tool-providers.d.ts +566 -317
  317. package/dist/server/server-adapter/routes/tool-providers.d.ts.map +1 -1
  318. package/dist/server/server-adapter/routes/tools.d.ts +103 -43
  319. package/dist/server/server-adapter/routes/tools.d.ts.map +1 -1
  320. package/dist/server/server-adapter/routes/vectors.d.ts +275 -119
  321. package/dist/server/server-adapter/routes/vectors.d.ts.map +1 -1
  322. package/dist/server/server-adapter/routes/workflows.d.ts +1586 -1104
  323. package/dist/server/server-adapter/routes/workflows.d.ts.map +1 -1
  324. package/dist/server/server-adapter/routes/workspace.d.ts +1026 -613
  325. package/dist/server/server-adapter/routes/workspace.d.ts.map +1 -1
  326. package/dist/{stored-agents-CWC-Nj6N.js → stored-agents-BRBZM-Xl.js} +2 -2
  327. package/dist/{stored-agents-CWC-Nj6N.js.map → stored-agents-BRBZM-Xl.js.map} +1 -1
  328. package/dist/{stored-agents-d2kvyKAb.cjs → stored-agents-CPxfYRH9.cjs} +2 -2
  329. package/dist/{stored-agents-d2kvyKAb.cjs.map → stored-agents-CPxfYRH9.cjs.map} +1 -1
  330. package/dist/{stored-scorers-yaft2JFH.js → stored-scorers-B__LF0Cy.js} +2 -2
  331. package/dist/{stored-scorers-yaft2JFH.js.map → stored-scorers-B__LF0Cy.js.map} +1 -1
  332. package/dist/{stored-scorers-Dm0HwOZe.cjs → stored-scorers-Cml7jPJv.cjs} +2 -2
  333. package/dist/{stored-scorers-Dm0HwOZe.cjs.map → stored-scorers-Cml7jPJv.cjs.map} +1 -1
  334. package/dist/sync-BHatXKfg.cjs +1679 -0
  335. package/dist/sync-BHatXKfg.cjs.map +1 -0
  336. package/dist/sync-djJ8Lmds.js +1656 -0
  337. package/dist/sync-djJ8Lmds.js.map +1 -0
  338. package/dist/{utils-wESuBh27.cjs → utils-Bna_JCkb.cjs} +3 -3
  339. package/dist/{utils-wESuBh27.cjs.map → utils-Bna_JCkb.cjs.map} +1 -1
  340. package/dist/{utils-BUK03Frl.js → utils-QXKhjIm6.js} +3 -3
  341. package/dist/{utils-BUK03Frl.js.map → utils-QXKhjIm6.js.map} +1 -1
  342. package/package.json +9 -9
  343. package/dist/agents--m8fNv8n.cjs.map +0 -1
  344. package/dist/agents-DpZKzU92.js.map +0 -1
  345. package/dist/dist-D-2BtcNU.js.map +0 -1
  346. package/dist/dist-DhqgxyoU.cjs.map +0 -1
  347. package/dist/probe-image-size-BQgIJeY_.js.map +0 -1
  348. package/dist/probe-image-size-DYJVSL0b.cjs.map +0 -1
  349. package/dist/route-builder-CIk5k35M.js.map +0 -1
  350. package/dist/route-builder-CgLVYL1c.cjs.map +0 -1
  351. package/dist/schema-B8-5YCsA.js +0 -2
  352. package/dist/schema-BieM1qrc.cjs +0 -1
  353. package/dist/schema-Bv9OdW1f-BY6u3u8K.cjs.map +0 -1
  354. package/dist/schema-Bv9OdW1f-CIOfv-3w.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,278 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 1.58.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added `GET /api/workflows/run-counts` — per-workflow counts of running and suspended (awaiting resume) runs in one request, keyed by the workflow registry key. Counts respect the reserved request-context resource id the runs endpoints already enforce, are filtered per user when FGA is configured, and may be served from a short server-side cache otherwise. ([#18925](https://github.com/mastra-ai/mastra/pull/18925))
8
+
9
+ ```json
10
+ // GET /api/workflows/run-counts
11
+ {
12
+ "cityWorkflow": { "running": 2, "suspended": 1 },
13
+ "reportWorkflow": { "running": 0, "suspended": 0 }
14
+ }
15
+ ```
16
+
17
+ - Added `MastraServer.getFrameworkPublicMatcher()`, which returns a `(path, method) => boolean` matcher built from route metadata (built-in `SERVER_ROUTES` entries with `requiresAuth === false`, plus user-registered custom routes with `requiresAuth: false`). ([#20989](https://github.com/mastra-ai/mastra/pull/20989))
18
+
19
+ Adapters can use it to short-circuit user middleware for routes the framework has declared public, without duplicating any allowlist.
20
+
21
+ ```ts
22
+ const isFrameworkPublic = mastraServer.getFrameworkPublicMatcher();
23
+
24
+ app.use('*', async (c, next) => {
25
+ if (isFrameworkPublic(c.req.path, c.req.method)) {
26
+ return next();
27
+ }
28
+ return userMiddleware(c, next);
29
+ });
30
+ ```
31
+
32
+ - Renamed the stored workflows handlers and schemas to dynamic workflows. HTTP route paths and permissions are unchanged. ([#20938](https://github.com/mastra-ai/mastra/pull/20938))
33
+
34
+ - Added A2A Protocol v1.0 request handling through the standard A2A routes. Send `A2A-Version: 1.0` to use v1 methods, streaming responses, and task listing while existing requests continue to use v0.3. ([#20811](https://github.com/mastra-ai/mastra/pull/20811))
35
+
36
+ ```typescript
37
+ await fetch('/api/a2a/weather-agent', {
38
+ method: 'POST',
39
+ headers: { 'A2A-Version': '1.0' },
40
+ body: JSON.stringify({ jsonrpc: '2.0', id: '1', method: 'tasks/list', params: {} }),
41
+ });
42
+ ```
43
+
44
+ - Added experiment provenance and grouping fields to dataset HTTP APIs, including grouping filters for experiment lists. ([#20645](https://github.com/mastra-ai/mastra/pull/20645))
45
+
46
+ ```text
47
+ GET /api/datasets/my-dataset/experiments?experimentSetId=benchmark-1&trialIndex=0
48
+ ```
49
+
50
+ - Added A2A v0.3 human-in-the-loop task handling. Exposed agents now pause with an input-required status and resume the same run when clients send follow-up input. ([#20708](https://github.com/mastra-ai/mastra/pull/20708))
51
+
52
+ ```typescript
53
+ await fetch('https://agent.example.com/api/a2a/booking-agent', {
54
+ method: 'POST',
55
+ headers: { 'Content-Type': 'application/json' },
56
+ body: JSON.stringify({
57
+ jsonrpc: '2.0',
58
+ id: 'resume-1',
59
+ method: 'message/send',
60
+ params: {
61
+ message: {
62
+ kind: 'message',
63
+ messageId: crypto.randomUUID(),
64
+ role: 'user',
65
+ taskId,
66
+ parts: [{ kind: 'text', text: 'Approved' }],
67
+ },
68
+ },
69
+ }),
70
+ });
71
+ ```
72
+
73
+ The server also preserves terminal task states and handles authentication interruptions, resubscription, cancellation errors, unknown task IDs, and JSON-RPC request ID zero.
74
+
75
+ - `GET /observability/traces/light` now accepts `mode=delta`, `after` and `limit`, matching `GET /observability/traces`. Previously those parameters were silently ignored, so a client trying to live-tail a lightweight list would refetch the first page on every poll. ([#20677](https://github.com/mastra-ai/mastra/pull/20677))
76
+
77
+ ```http
78
+ GET /observability/traces/light?mode=delta&after=<deltaCursor>&limit=100
79
+ ```
80
+
81
+ The response contains the traces recorded since the cursor and a new `deltaCursor` for the next poll.
82
+
83
+ - Added native validation, authentication, streaming, and OpenAPI support for `createRoute()` routes configured through `server.apiRoutes`. ([#21184](https://github.com/mastra-ai/mastra/pull/21184))
84
+
85
+ ```ts
86
+ const route = createRoute({
87
+ method: 'POST',
88
+ path: '/items',
89
+ responseType: 'json',
90
+ bodySchema: z.object({ name: z.string() }),
91
+ handler: async ({ name }) => ({ name }),
92
+ });
93
+
94
+ const mastra = new Mastra({
95
+ server: { apiRoutes: [route] },
96
+ });
97
+ ```
98
+
99
+ ### Patch Changes
100
+
101
+ - Preserve experiment name, description, and metadata from HTTP trigger requests. ([#20578](https://github.com/mastra-ai/mastra/pull/20578))
102
+
103
+ - Report background failures on the agent controller message, steer, and follow-up routes instead of crashing the server. These routes acknowledge the request immediately and let the session finish the turn in the background, so a session that failed to start (for example when a signal cannot be submitted) previously produced an unhandled rejection that terminated the process. The failure is now logged and delivered to the session's subscribers as an `error` event, so clients streaming the session are told the turn did not start. ([#21093](https://github.com/mastra-ai/mastra/pull/21093))
104
+
105
+ - Fixed stored agent APIs to reject unpublished or unresolved prompt block references with the affected block IDs when creating or updating agents and activating agent versions. ([#20790](https://github.com/mastra-ai/mastra/pull/20790))
106
+
107
+ - Fixed agent-controller display-state events losing their tool state over SSE. The display state's Maps (active tools, streaming tool inputs, pending suspensions, active subagents, modified files) serialized to empty objects on the wire; they now arrive as plain records keyed the same way. ([#20805](https://github.com/mastra-ai/mastra/pull/20805))
108
+
109
+ - Add a reasoning-effort configuration surface across mastracode and Factory (fixes #20766): ([#20884](https://github.com/mastra-ai/mastra/pull/20884))
110
+
111
+ - New `max` thinking level (mapped to `reasoning effort: max` for OpenAI Codex and Anthropic `effort`).
112
+ - Anthropic extended-thinking wiring: the session thinking level now applies to anthropic/claude-opus-4-7 and other Anthropic models via provider thinking/effort options (previously OpenAI-only).
113
+ - New `models.modeThinkingDefaults` setting: per-mode (build/plan/fast) default thinking levels, resolved at request time with precedence session override → mode default → global `preferences.thinkingLevel`. Configuration changes now apply to the next request of every session, including automated Factory runs.
114
+ - Factory: new Settings → Defaults controls for editing global and per-mode thinking defaults in local deployments.
115
+ - TUI: `/think` now sets a session-only override, supports `/think default` to clear it, and `/think status` reports the effective level with provenance (session override / mode default / global default).
116
+
117
+ Example `settings.json` configuration:
118
+
119
+ ```json
120
+ {
121
+ "preferences": { "thinkingLevel": "medium" },
122
+ "models": {
123
+ "modeThinkingDefaults": {
124
+ "build": "high",
125
+ "plan": "max",
126
+ "fast": "off"
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+ - Prevent a failed background workflow run restart from terminating the server. ([#20473](https://github.com/mastra-ai/mastra/pull/20473))
133
+
134
+ - Abort active A2A streams when tasks are canceled or streaming requests disconnect, and prevent late updates from overwriting canceled tasks. ([#20505](https://github.com/mastra-ai/mastra/pull/20505))
135
+
136
+ - Fixed invalid pagination query parameters returning a 500 instead of a 400. ([#21013](https://github.com/mastra-ai/mastra/pull/21013))
137
+
138
+ Requests such as `?page=-1`, `?page=1.5`, or `?perPage=-5` used to pass request validation and were only rejected deep in the storage layer, which surfaced them as `500 Internal Server Error`. Malformed client input is now rejected at the request boundary and returns `400 Bad Request` naming the offending field, matching what `GET /api/workflows/:workflowId/runs` already did.
139
+
140
+ **Before**
141
+
142
+ ```
143
+ GET /api/memory/threads?resourceId=user-1&page=-1
144
+ → 500 Internal Server Error { "error": "page must be >= 0" }
145
+ ```
146
+
147
+ **After**
148
+
149
+ ```
150
+ GET /api/memory/threads?resourceId=user-1&page=-1
151
+ → 400 Bad Request
152
+ { "error": "Invalid query parameters", "issues": [{ "field": "page", "message": "..." }] }
153
+ ```
154
+
155
+ This affects every paginated endpoint built on the shared pagination schemas, including memory, logs, MCP, and the stored agent/skill/scorer routes. `perPage=0` stays valid, since storage uses it as the include-only fast path.
156
+
157
+ - Catch rejected background Run.resume() and Run.timeTravel() in the workflow /resume and /time-travel routes so they cannot become unhandled rejections and terminate the server process ([#20916](https://github.com/mastra-ai/mastra/pull/20916))
158
+
159
+ - Added an optional `reason` when declining a tool call, so the model and your UI can see _why_ a tool call was rejected instead of always showing "Tool call was not approved by the user". ([#21085](https://github.com/mastra-ai/mastra/pull/21085))
160
+
161
+ ```ts
162
+ // Before: the model only learned the call was declined
163
+ await agent.declineToolCall({ runId, toolCallId });
164
+
165
+ // After: give the model context it can act on
166
+ await agent.declineToolCall({
167
+ runId,
168
+ toolCallId,
169
+ reason: 'Reading other users personal data is not allowed, ask the user for their own email instead',
170
+ });
171
+ ```
172
+
173
+ The reason is retained with the tool call, so it is still there when the conversation is recalled later. It is supported by `declineToolCall`, `declineToolCallGenerate` and `declineNetworkToolCall`, on both regular and durable agents. Omitting `reason` keeps the previous default message.
174
+
175
+ Closes #20495
176
+
177
+ - Fix workflow stream caching being tied to a single client connection. Cached chunks are now written per run rather than per subscriber, so `/observe` replays a complete history after a client disconnects mid-run, and concurrent subscribers to the same run no longer cache every chunk twice. ([#21020](https://github.com/mastra-ai/mastra/pull/21020))
178
+
179
+ - Updated dependencies [[`e7109ee`](https://github.com/mastra-ai/mastra/commit/e7109ee6f731bacc79c885906f3c7dca8d8f013a), [`b8ce7ec`](https://github.com/mastra-ai/mastra/commit/b8ce7ec96e39343c6c2f36d12d68a9ad816c09f7), [`2e4624e`](https://github.com/mastra-ai/mastra/commit/2e4624edb6917e61249cb60ee377735e7af7e4a9), [`45a9147`](https://github.com/mastra-ai/mastra/commit/45a914741f578754d79d8b7de7b4e4f304d8e14a), [`a3a3624`](https://github.com/mastra-ai/mastra/commit/a3a3624f646b98e409424d8defccbd334da9e8b8), [`6246914`](https://github.com/mastra-ai/mastra/commit/62469146636911f3cbbe0880bd011c6a897a59a7), [`6445eba`](https://github.com/mastra-ai/mastra/commit/6445eba6020abac681aba1cc9289f446cb400cbe), [`86b7b77`](https://github.com/mastra-ai/mastra/commit/86b7b777980d30f66e1fd134a37d2af4c22e54cc), [`1c75e32`](https://github.com/mastra-ai/mastra/commit/1c75e32f7fc0b9fb6f548b4407feaec8a1440212), [`296dc9a`](https://github.com/mastra-ai/mastra/commit/296dc9af29f3616e786c7825ec32e0df92d754c5), [`f59032a`](https://github.com/mastra-ai/mastra/commit/f59032a73699443555a08a479e7ac578975784f2), [`cdd5c33`](https://github.com/mastra-ai/mastra/commit/cdd5c33ac6c7118a9f139e6dc0e14e6a8ae31658), [`3f73c07`](https://github.com/mastra-ai/mastra/commit/3f73c076727e8c36b4fff7a1b40290fb68957fa8), [`772c0c8`](https://github.com/mastra-ai/mastra/commit/772c0c897cec383258de2e6178147f8014767c7b), [`d7cf7fa`](https://github.com/mastra-ai/mastra/commit/d7cf7fafc1ae1b50bd8462dd0e6c671a8606db93), [`7c1ebb1`](https://github.com/mastra-ai/mastra/commit/7c1ebb15690c4b3f0eabb19077cf8af573311e57), [`0f9a448`](https://github.com/mastra-ai/mastra/commit/0f9a448502157e59f7b76f24360ad497168f5ef8), [`578bf2e`](https://github.com/mastra-ai/mastra/commit/578bf2e6a88e9d5b8bf502204e15a95dfbb679ae), [`c47165c`](https://github.com/mastra-ai/mastra/commit/c47165c983c87594c6952f1fd2fa51a90205034c), [`289f4ce`](https://github.com/mastra-ai/mastra/commit/289f4ce16e3293370440172132c52ee787cbc09f), [`df31eb0`](https://github.com/mastra-ai/mastra/commit/df31eb0c7087d782a0d9346e467f9a4af4b0eef6), [`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`4f16ff8`](https://github.com/mastra-ai/mastra/commit/4f16ff824bf2f9b0ddc93f210477c10c8a4fb1ab), [`b4c89b4`](https://github.com/mastra-ai/mastra/commit/b4c89b4371b0c86da57403ad1a3b3ef0681f3128), [`e6534fa`](https://github.com/mastra-ai/mastra/commit/e6534fab031216f6cb48c4c9907cbfdce9d60bc6), [`210cb7a`](https://github.com/mastra-ai/mastra/commit/210cb7a167998c7bbf72cb3b93e6eb0563330239), [`06b2d87`](https://github.com/mastra-ai/mastra/commit/06b2d87e63bcdd0ed59215c6789692b9b12de376), [`1c67d85`](https://github.com/mastra-ai/mastra/commit/1c67d85e9da8285662f4dbbf47e0378c3fee0747), [`ac01d63`](https://github.com/mastra-ai/mastra/commit/ac01d6355974aec73fdb8781449ed12bac582094), [`80a3324`](https://github.com/mastra-ai/mastra/commit/80a33245d3110204de6f56d61211523ffe338692), [`e44e8f3`](https://github.com/mastra-ai/mastra/commit/e44e8f370b66c339ddcaba946d33da6d3c3f06cd), [`d9d2881`](https://github.com/mastra-ai/mastra/commit/d9d2881ede6dd6c023d144215fc812062aed0890), [`a810a05`](https://github.com/mastra-ai/mastra/commit/a810a058f62ad407cfc1701e0be36ae91145d7cf), [`ba24be6`](https://github.com/mastra-ai/mastra/commit/ba24be662439c331ab23a600041f93803c89eca8), [`842b5fe`](https://github.com/mastra-ai/mastra/commit/842b5fe22b6a7fa811bd14e48eb9af523ac989f2), [`990611b`](https://github.com/mastra-ai/mastra/commit/990611ba76eb876d86c9c594371ae5f02f94b432), [`80bdf3a`](https://github.com/mastra-ai/mastra/commit/80bdf3ae16ade6ff63bde0cb16fa2df8ab7dd4dd), [`c967a5e`](https://github.com/mastra-ai/mastra/commit/c967a5eec150c5dc5418c4a4388982d1fb7ad27c), [`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b), [`9ba1247`](https://github.com/mastra-ai/mastra/commit/9ba12470c77f1c03642d720ce67e517e878f666e), [`fd96298`](https://github.com/mastra-ai/mastra/commit/fd96298a8367622f4ebfcaa97b5b6c1fbbd14564), [`66bbfb5`](https://github.com/mastra-ai/mastra/commit/66bbfb5f05b473d39f88c0e4a481ccac41634f3a), [`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b), [`f8da216`](https://github.com/mastra-ai/mastra/commit/f8da21633e7eb0e31c9ce0fc30567870d19416d3), [`4a09a9c`](https://github.com/mastra-ai/mastra/commit/4a09a9c0474ef643558fcb5f0edc542b82f1cab0), [`5f798b3`](https://github.com/mastra-ai/mastra/commit/5f798b3362e9bdf4d690f85245606e146eef60b9), [`6a84954`](https://github.com/mastra-ai/mastra/commit/6a84954a2667f85b6d59da652dab1bbff007ccb0), [`1e83a47`](https://github.com/mastra-ai/mastra/commit/1e83a4734ab61ba5926af6793e3569a78b72ed37), [`52d8ef0`](https://github.com/mastra-ai/mastra/commit/52d8ef03801f1deb7ee48532fc4190dd4a33916c), [`cdd5c33`](https://github.com/mastra-ai/mastra/commit/cdd5c33ac6c7118a9f139e6dc0e14e6a8ae31658), [`7fdcaa6`](https://github.com/mastra-ai/mastra/commit/7fdcaa66105d64290f9b14432a12ec99f39c4d3a), [`d6c56f9`](https://github.com/mastra-ai/mastra/commit/d6c56f951db3213330b98b0abafa9778c8770e58), [`e08e789`](https://github.com/mastra-ai/mastra/commit/e08e789c1bf4cd2fe46363f7a4728536ceccc9bd), [`bf936e2`](https://github.com/mastra-ai/mastra/commit/bf936e2c89b2ff0dad5695b873ddc009ba96d41e), [`7fb580a`](https://github.com/mastra-ai/mastra/commit/7fb580ac73fbcacf2ff00872a3395f73ae1b9fa5), [`ed5d606`](https://github.com/mastra-ai/mastra/commit/ed5d606739c5e3fbdfa9f272df7809aa5ab43b1d), [`f53d5bd`](https://github.com/mastra-ai/mastra/commit/f53d5bd4885b29e4ac29a428a6044088ea8d6aa3), [`32980a3`](https://github.com/mastra-ai/mastra/commit/32980a3e2413d0274ac244d32c37d910edc13f00), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`82e3365`](https://github.com/mastra-ai/mastra/commit/82e3365ef7c9bf7bee2e7a7029035ea262d68895), [`6104347`](https://github.com/mastra-ai/mastra/commit/61043473ba6bfd0a25156824e853e13165562e6c), [`35cc901`](https://github.com/mastra-ai/mastra/commit/35cc90102cf834a84827acaf9eee0b6d6d1e2a3b), [`a8b4cf0`](https://github.com/mastra-ai/mastra/commit/a8b4cf02823cffebc4751a53337dfacf097c1ae1), [`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`333785c`](https://github.com/mastra-ai/mastra/commit/333785c93cbb01e42c60167e995457c28897ddbf), [`bda2235`](https://github.com/mastra-ai/mastra/commit/bda22353ee28f2df0eaea555f7cae1549f979c0b), [`efd5c81`](https://github.com/mastra-ai/mastra/commit/efd5c81cc25fde3c2ddd86fc1178deb4ec176e19), [`1b482c2`](https://github.com/mastra-ai/mastra/commit/1b482c2d89244dd758c41e5f927a2b44041388d2), [`45bfb88`](https://github.com/mastra-ai/mastra/commit/45bfb88fd52f1dd3be20e2a38905777c96499c90), [`ff28284`](https://github.com/mastra-ai/mastra/commit/ff2828416f14daff9d956e6a352fdaa23c950979), [`4bcdfaf`](https://github.com/mastra-ai/mastra/commit/4bcdfaf0eac3199d7cb171b0a19a92c9c341eea4), [`e3b9307`](https://github.com/mastra-ai/mastra/commit/e3b9307098daefbfae2a52ae2ef51bc9fc701190), [`d6834c5`](https://github.com/mastra-ai/mastra/commit/d6834c5a7866b16734d23900163c2414ed70d791), [`f33264f`](https://github.com/mastra-ai/mastra/commit/f33264f517ae603279afd5c4251e2b40f6dd3618), [`689f2c4`](https://github.com/mastra-ai/mastra/commit/689f2c4b6c0835fe455702b01d21daa8abcd9331), [`fcd0667`](https://github.com/mastra-ai/mastra/commit/fcd0667a4e378be35c9a1b1eb19cce78fbfd7282), [`cfd0d9e`](https://github.com/mastra-ai/mastra/commit/cfd0d9ec77ec3c69dd96f79cdb579e03d79f22ce), [`acc3513`](https://github.com/mastra-ai/mastra/commit/acc3513b19f79bf0a7ec2998694580edca54086c), [`1670533`](https://github.com/mastra-ai/mastra/commit/1670533986f6bacf567746245348125e3a106448), [`a7eb4a1`](https://github.com/mastra-ai/mastra/commit/a7eb4a11450f6170274ed5141bffe821d4fdd5a6), [`0976933`](https://github.com/mastra-ai/mastra/commit/0976933142333ec78451feef265b68bcb45aa5e7), [`242b945`](https://github.com/mastra-ai/mastra/commit/242b94558777bfbdeb42cbfea84afff0b6ad0633), [`c52d346`](https://github.com/mastra-ai/mastra/commit/c52d3462ec831a5d95926ecd3d3373f5928ad2e5), [`af4636a`](https://github.com/mastra-ai/mastra/commit/af4636a74463275d71c1d13a38f7d2b738f128bf), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`2eabc09`](https://github.com/mastra-ai/mastra/commit/2eabc097d86d52fbd0123da36a7c874154cc384f), [`0023e79`](https://github.com/mastra-ai/mastra/commit/0023e7919431078280abd11c89d1edeae35fcc69), [`c2ad51e`](https://github.com/mastra-ai/mastra/commit/c2ad51e2467f901eecba8c9f4a45e22a50bd7c18), [`25ca73d`](https://github.com/mastra-ai/mastra/commit/25ca73d25dee7ce9f0ca72939e3a505c4db7257e), [`2f9ef3f`](https://github.com/mastra-ai/mastra/commit/2f9ef3f4ca06fc2dcdd5088c26b7f4da6a016791), [`e7eefcb`](https://github.com/mastra-ai/mastra/commit/e7eefcb162cda7c493e8c3bf43050ead0efbcb2c), [`fea5cae`](https://github.com/mastra-ai/mastra/commit/fea5caedc7e2cfea51784a15e015952692027abf), [`4d7aca2`](https://github.com/mastra-ai/mastra/commit/4d7aca2fe75f225c83d1502d63079568e6ec163f), [`e1cead1`](https://github.com/mastra-ai/mastra/commit/e1cead17b5f3653cf00d2f90cc19b113119c02ba), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`d9d93b2`](https://github.com/mastra-ai/mastra/commit/d9d93b25e4a65ad5fa153fa35be7ed149c8d587f), [`c4ec889`](https://github.com/mastra-ai/mastra/commit/c4ec889561c0264c43f66d04d587bee4ce35e792), [`4b59f78`](https://github.com/mastra-ai/mastra/commit/4b59f786cbc9a7d1ef07a07517dbd4b96865e99d), [`eeae63e`](https://github.com/mastra-ai/mastra/commit/eeae63e7fbe8e1f237adc69bca6e2ac13c5ca907), [`3dc97ea`](https://github.com/mastra-ai/mastra/commit/3dc97ea415fad353b48a13095fad1835933cc12a), [`94e7ae9`](https://github.com/mastra-ai/mastra/commit/94e7ae970b37c888cd1244ef013292639a2fe6d1), [`e6a2860`](https://github.com/mastra-ai/mastra/commit/e6a2860649cc51f87d32d78b766ae2126446ba07), [`7010c5d`](https://github.com/mastra-ai/mastra/commit/7010c5d15728bf9c5dfe4fb6b1bf80ce23bf143a), [`bab06b1`](https://github.com/mastra-ai/mastra/commit/bab06b18923873a584bdfc71a6b4ec7fb4727fb7), [`3d01cd3`](https://github.com/mastra-ai/mastra/commit/3d01cd387321b6f9c5cac31d487c84bf51b19c78), [`7bf3086`](https://github.com/mastra-ai/mastra/commit/7bf308663f0115ca74ad20554ade740f06640859), [`4c186a0`](https://github.com/mastra-ai/mastra/commit/4c186a017275f45e6ed4c09de0f89550e2d09e8c), [`b0fa077`](https://github.com/mastra-ai/mastra/commit/b0fa077bcbc9b08551846fe372a0d3d15b71ed72), [`0282e16`](https://github.com/mastra-ai/mastra/commit/0282e16115538c8e9b248b90f0748eb01cb5dc98), [`a8dd139`](https://github.com/mastra-ai/mastra/commit/a8dd1391a9fe9a6632c25809ef236980afa9a020), [`6a667b4`](https://github.com/mastra-ai/mastra/commit/6a667b4b7cd6a93fe41fcdd357b08c5a8c09b9ab), [`9be8878`](https://github.com/mastra-ai/mastra/commit/9be8878dcf0388e84fc4873e0eec27bd49b881a4), [`e5786be`](https://github.com/mastra-ai/mastra/commit/e5786be02bb903073082bd9d6da880ebaacc343f), [`2440e09`](https://github.com/mastra-ai/mastra/commit/2440e096ea6c2def1ccc1eb2d0f3f5b88c4af940), [`2093fbd`](https://github.com/mastra-ai/mastra/commit/2093fbd53bb744bae19ec89f6d73db9a66fbe8a7), [`a59049b`](https://github.com/mastra-ai/mastra/commit/a59049b1652a13efff66ac826326b5ed9a550342), [`7bd85ea`](https://github.com/mastra-ai/mastra/commit/7bd85ea7588b71c25ce9f4019c88f8539be5dcbc), [`83fa004`](https://github.com/mastra-ai/mastra/commit/83fa0044bfda8b703a83883dbd8bef204844d13f), [`a463cdf`](https://github.com/mastra-ai/mastra/commit/a463cdf1c95c3059e70f0bff27959e8558bb899d), [`e7a5da4`](https://github.com/mastra-ai/mastra/commit/e7a5da4ef8e4dd452d2f232961b4e682a85ffe43), [`7b4393d`](https://github.com/mastra-ai/mastra/commit/7b4393d557411fdcf07b0e30e5acaf7cc85154ae), [`0ea6b80`](https://github.com/mastra-ai/mastra/commit/0ea6b8001408ce02b56e8be0536b0fd8cbaf8ad2)]:
180
+ - @mastra/core@1.58.0
181
+
182
+ ## 1.58.0-alpha.16
183
+
184
+ ### Patch Changes
185
+
186
+ - Updated dependencies [[`296dc9a`](https://github.com/mastra-ai/mastra/commit/296dc9af29f3616e786c7825ec32e0df92d754c5), [`4a09a9c`](https://github.com/mastra-ai/mastra/commit/4a09a9c0474ef643558fcb5f0edc542b82f1cab0), [`1e83a47`](https://github.com/mastra-ai/mastra/commit/1e83a4734ab61ba5926af6793e3569a78b72ed37), [`ff28284`](https://github.com/mastra-ai/mastra/commit/ff2828416f14daff9d956e6a352fdaa23c950979), [`1670533`](https://github.com/mastra-ai/mastra/commit/1670533986f6bacf567746245348125e3a106448)]:
187
+ - @mastra/core@1.58.0-alpha.16
188
+
189
+ ## 1.58.0-alpha.15
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies [[`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b), [`dc4a25d`](https://github.com/mastra-ai/mastra/commit/dc4a25d41af4e2fe97a816070eaec6aa963ab53b)]:
194
+ - @mastra/core@1.58.0-alpha.15
195
+
196
+ ## 1.58.0-alpha.14
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies [[`210cb7a`](https://github.com/mastra-ai/mastra/commit/210cb7a167998c7bbf72cb3b93e6eb0563330239), [`5f798b3`](https://github.com/mastra-ai/mastra/commit/5f798b3362e9bdf4d690f85245606e146eef60b9), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437), [`25ca73d`](https://github.com/mastra-ai/mastra/commit/25ca73d25dee7ce9f0ca72939e3a505c4db7257e), [`e1cead1`](https://github.com/mastra-ai/mastra/commit/e1cead17b5f3653cf00d2f90cc19b113119c02ba), [`01a2943`](https://github.com/mastra-ai/mastra/commit/01a2943a7d886edefdff072bfa51f055bab54437)]:
201
+ - @mastra/core@1.58.0-alpha.14
202
+
203
+ ## 1.58.0-alpha.13
204
+
205
+ ### Minor Changes
206
+
207
+ - Added native validation, authentication, streaming, and OpenAPI support for `createRoute()` routes configured through `server.apiRoutes`. ([#21184](https://github.com/mastra-ai/mastra/pull/21184))
208
+
209
+ ```ts
210
+ const route = createRoute({
211
+ method: 'POST',
212
+ path: '/items',
213
+ responseType: 'json',
214
+ bodySchema: z.object({ name: z.string() }),
215
+ handler: async ({ name }) => ({ name }),
216
+ });
217
+
218
+ const mastra = new Mastra({
219
+ server: { apiRoutes: [route] },
220
+ });
221
+ ```
222
+
223
+ ### Patch Changes
224
+
225
+ - Updated dependencies [[`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`d6c56f9`](https://github.com/mastra-ai/mastra/commit/d6c56f951db3213330b98b0abafa9778c8770e58), [`9571e3a`](https://github.com/mastra-ai/mastra/commit/9571e3a06ed2c5220196460bf82a2129255c3a8b), [`acc3513`](https://github.com/mastra-ai/mastra/commit/acc3513b19f79bf0a7ec2998694580edca54086c), [`94e7ae9`](https://github.com/mastra-ai/mastra/commit/94e7ae970b37c888cd1244ef013292639a2fe6d1), [`6a667b4`](https://github.com/mastra-ai/mastra/commit/6a667b4b7cd6a93fe41fcdd357b08c5a8c09b9ab), [`2440e09`](https://github.com/mastra-ai/mastra/commit/2440e096ea6c2def1ccc1eb2d0f3f5b88c4af940), [`a59049b`](https://github.com/mastra-ai/mastra/commit/a59049b1652a13efff66ac826326b5ed9a550342)]:
226
+ - @mastra/core@1.58.0-alpha.13
227
+
228
+ ## 1.58.0-alpha.12
229
+
230
+ ### Patch Changes
231
+
232
+ - Updated dependencies [[`2e4624e`](https://github.com/mastra-ai/mastra/commit/2e4624edb6917e61249cb60ee377735e7af7e4a9), [`e6534fa`](https://github.com/mastra-ai/mastra/commit/e6534fab031216f6cb48c4c9907cbfdce9d60bc6), [`7fdcaa6`](https://github.com/mastra-ai/mastra/commit/7fdcaa66105d64290f9b14432a12ec99f39c4d3a), [`cfd0d9e`](https://github.com/mastra-ai/mastra/commit/cfd0d9ec77ec3c69dd96f79cdb579e03d79f22ce), [`d9d93b2`](https://github.com/mastra-ai/mastra/commit/d9d93b25e4a65ad5fa153fa35be7ed149c8d587f)]:
233
+ - @mastra/core@1.58.0-alpha.12
234
+
235
+ ## 1.58.0-alpha.11
236
+
237
+ ### Patch Changes
238
+
239
+ - Updated dependencies [[`b8ce7ec`](https://github.com/mastra-ai/mastra/commit/b8ce7ec96e39343c6c2f36d12d68a9ad816c09f7), [`a3a3624`](https://github.com/mastra-ai/mastra/commit/a3a3624f646b98e409424d8defccbd334da9e8b8), [`6246914`](https://github.com/mastra-ai/mastra/commit/62469146636911f3cbbe0880bd011c6a897a59a7), [`3f73c07`](https://github.com/mastra-ai/mastra/commit/3f73c076727e8c36b4fff7a1b40290fb68957fa8), [`7c1ebb1`](https://github.com/mastra-ai/mastra/commit/7c1ebb15690c4b3f0eabb19077cf8af573311e57), [`32980a3`](https://github.com/mastra-ai/mastra/commit/32980a3e2413d0274ac244d32c37d910edc13f00), [`4bcdfaf`](https://github.com/mastra-ai/mastra/commit/4bcdfaf0eac3199d7cb171b0a19a92c9c341eea4), [`af4636a`](https://github.com/mastra-ai/mastra/commit/af4636a74463275d71c1d13a38f7d2b738f128bf), [`a463cdf`](https://github.com/mastra-ai/mastra/commit/a463cdf1c95c3059e70f0bff27959e8558bb899d), [`0ea6b80`](https://github.com/mastra-ai/mastra/commit/0ea6b8001408ce02b56e8be0536b0fd8cbaf8ad2)]:
240
+ - @mastra/core@1.58.0-alpha.11
241
+
242
+ ## 1.58.0-alpha.10
243
+
244
+ ### Patch Changes
245
+
246
+ - Report background failures on the agent controller message, steer, and follow-up routes instead of crashing the server. These routes acknowledge the request immediately and let the session finish the turn in the background, so a session that failed to start (for example when a signal cannot be submitted) previously produced an unhandled rejection that terminated the process. The failure is now logged and delivered to the session's subscribers as an `error` event, so clients streaming the session are told the turn did not start. ([#21093](https://github.com/mastra-ai/mastra/pull/21093))
247
+
248
+ - Updated dependencies [[`66bbfb5`](https://github.com/mastra-ai/mastra/commit/66bbfb5f05b473d39f88c0e4a481ccac41634f3a)]:
249
+ - @mastra/core@1.58.0-alpha.10
250
+
251
+ ## 1.58.0-alpha.9
252
+
253
+ ### Patch Changes
254
+
255
+ - Added an optional `reason` when declining a tool call, so the model and your UI can see _why_ a tool call was rejected instead of always showing "Tool call was not approved by the user". ([#21085](https://github.com/mastra-ai/mastra/pull/21085))
256
+
257
+ ```ts
258
+ // Before: the model only learned the call was declined
259
+ await agent.declineToolCall({ runId, toolCallId });
260
+
261
+ // After: give the model context it can act on
262
+ await agent.declineToolCall({
263
+ runId,
264
+ toolCallId,
265
+ reason: 'Reading other users personal data is not allowed, ask the user for their own email instead',
266
+ });
267
+ ```
268
+
269
+ The reason is retained with the tool call, so it is still there when the conversation is recalled later. It is supported by `declineToolCall`, `declineToolCallGenerate` and `declineNetworkToolCall`, on both regular and durable agents. Omitting `reason` keeps the previous default message.
270
+
271
+ Closes #20495
272
+
273
+ - Updated dependencies [[`86b7b77`](https://github.com/mastra-ai/mastra/commit/86b7b777980d30f66e1fd134a37d2af4c22e54cc), [`80a3324`](https://github.com/mastra-ai/mastra/commit/80a33245d3110204de6f56d61211523ffe338692), [`d9d2881`](https://github.com/mastra-ai/mastra/commit/d9d2881ede6dd6c023d144215fc812062aed0890), [`82e3365`](https://github.com/mastra-ai/mastra/commit/82e3365ef7c9bf7bee2e7a7029035ea262d68895), [`1b482c2`](https://github.com/mastra-ai/mastra/commit/1b482c2d89244dd758c41e5f927a2b44041388d2), [`e6a2860`](https://github.com/mastra-ai/mastra/commit/e6a2860649cc51f87d32d78b766ae2126446ba07), [`7bd85ea`](https://github.com/mastra-ai/mastra/commit/7bd85ea7588b71c25ce9f4019c88f8539be5dcbc)]:
274
+ - @mastra/core@1.58.0-alpha.9
275
+
3
276
  ## 1.58.0-alpha.8
4
277
 
5
278
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, n as __exportAll, t as __commonJSMin } from "./rolldown-runtime-DuvcJU0W.js";
2
- import { n as createRoute } from "./route-builder-CIk5k35M.js";
3
- import { r as convertInstructionsToString } from "./utils-BUK03Frl.js";
2
+ import { n as createRoute } from "./route-builder-YQ_gLIvW.js";
3
+ import { r as convertInstructionsToString } from "./utils-QXKhjIm6.js";
4
4
  import { getAgentFromSystem } from "./server/handlers/agents.js";
5
5
  import { TaskStoreVersionConflictError } from "./server/a2a/store.js";
6
6
  import { a as agentExecutionResponseSchema, i as agentExecutionBodySchema, r as agentCardResponseSchema, t as a2aAgentIdPathParams } from "./a2a-8C4O2dVJ.js";
@@ -1973,4 +1973,4 @@ const AGENT_EXECUTION_ROUTE = createRoute({
1973
1973
  //#endregion
1974
1974
  export { getAgentExecutionHandler as a, handleListTaskPushNotificationConfig as c, handleSetTaskPushNotificationConfig as d, handleTaskCancel as f, resolveA2AProtocolVersion as g, handleTaskResubscribe as h, getAgentCardByIdHandler as i, handleMessageSend as l, handleTaskList as m, GET_AGENT_CARD_ROUTE as n, handleDeleteTaskPushNotificationConfig as o, handleTaskGet as p, a2a_exports as r, handleGetTaskPushNotificationConfig as s, AGENT_EXECUTION_ROUTE as t, handleMessageStream as u };
1975
1975
 
1976
- //# sourceMappingURL=a2a-_D2EA4oa.js.map
1976
+ //# sourceMappingURL=a2a-CUkzkdTZ.js.map