@mastra/server 1.82.0-alpha.1 → 1.82.0-alpha.3

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 (382) hide show
  1. package/dist/_types/{@internal_voice/dist/_types/@internal_core → @internal_voice@0.0.43/dist/_types/@internal_core@0.1.4}/dist/routes/index.d.ts +1 -1
  2. package/dist/_types/{@internal_voice → @internal_voice@0.0.43}/dist/routes/index.d.ts +15 -15
  3. package/dist/_types/{@mastra_schema-compat/dist/_types/@internal_ai-sdk-v4 → @mastra_schema-compat@1.3.17/dist/_types/@internal_ai-sdk-v4@0.0.94}/dist/index.d.ts +1 -1
  4. package/dist/_types/{@mastra_schema-compat/dist/_types/@internal_ai-sdk-v5 → @mastra_schema-compat@1.3.17/dist/_types/@internal_ai-sdk-v5@0.0.94}/dist/index.d.ts +2 -2
  5. package/dist/_types/{@mastra_schema-compat/dist/_types/@internal_ai-v6 → @mastra_schema-compat@1.3.17/dist/_types/@internal_ai-v6@0.0.94}/dist/index.d.ts +4 -4
  6. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/anthropic.d.ts +2 -2
  7. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/deepseek.d.ts +2 -2
  8. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/google.d.ts +1 -1
  9. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/meta.d.ts +2 -2
  10. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/openai.d.ts +1 -1
  11. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema.types.d.ts +4 -4
  12. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/standard-schema/standard-schema.d.ts +2 -2
  13. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/standard-schema/standard-schema.types.d.ts +1 -1
  14. package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/zod-to-json.d.ts +1 -1
  15. package/dist/{a2a-DULF2hBd.js → a2a-CoiG3TAj.js} +3 -3
  16. package/dist/{a2a-DULF2hBd.js.map → a2a-CoiG3TAj.js.map} +1 -1
  17. package/dist/{a2a-CIq9dtbC.cjs → a2a-DvqRdny6.cjs} +3 -3
  18. package/dist/{a2a-CIq9dtbC.cjs.map → a2a-DvqRdny6.cjs.map} +1 -1
  19. package/dist/{agent-builder-Cq-jo2FP.js → agent-builder-C_L1i2eE.js} +44 -41
  20. package/dist/agent-builder-C_L1i2eE.js.map +1 -0
  21. package/dist/{agent-builder-C1SGph1p.cjs → agent-builder-D0Up9Fw1.cjs} +44 -41
  22. package/dist/agent-builder-D0Up9Fw1.cjs.map +1 -0
  23. package/dist/{agent-versions-DX2rd6j_.cjs → agent-versions-BccL4mEW.cjs} +2 -2
  24. package/dist/{agent-versions-DX2rd6j_.cjs.map → agent-versions-BccL4mEW.cjs.map} +1 -1
  25. package/dist/{agent-versions-TUl6ky5W.js → agent-versions-DFJyxWY1.js} +2 -2
  26. package/dist/{agent-versions-TUl6ky5W.js.map → agent-versions-DFJyxWY1.js.map} +1 -1
  27. package/dist/{agents-B5kq2QEV.js → agents-BXqMKoOz.js} +3 -2
  28. package/dist/agents-BXqMKoOz.js.map +1 -0
  29. package/dist/{agents-NRBk4JAs.js → agents-CgcW6lHt.js} +112 -19
  30. package/dist/agents-CgcW6lHt.js.map +1 -0
  31. package/dist/{agents-SvkxJW48.cjs → agents-DOHGWXDa.cjs} +111 -18
  32. package/dist/agents-DOHGWXDa.cjs.map +1 -0
  33. package/dist/{agents-Cel1sffU.cjs → agents-DbnPZXIN.cjs} +3 -2
  34. package/dist/agents-DbnPZXIN.cjs.map +1 -0
  35. package/dist/{api-schema-manifest-C8E9EB-q.js → api-schema-manifest-Ci2qUYHc.js} +2 -2
  36. package/dist/{api-schema-manifest-C8E9EB-q.js.map → api-schema-manifest-Ci2qUYHc.js.map} +1 -1
  37. package/dist/{api-schema-manifest-CNjDZrQ8.cjs → api-schema-manifest-DCHOlOuJ.cjs} +2 -2
  38. package/dist/{api-schema-manifest-CNjDZrQ8.cjs.map → api-schema-manifest-DCHOlOuJ.cjs.map} +1 -1
  39. package/dist/{background-tasks-DhQ6upHK.js → background-tasks-BHhn4YZA.js} +42 -3
  40. package/dist/background-tasks-BHhn4YZA.js.map +1 -0
  41. package/dist/{background-tasks-Kcx2YtW0.cjs → background-tasks-Ci2tlxJC.cjs} +47 -2
  42. package/dist/background-tasks-Ci2tlxJC.cjs.map +1 -0
  43. package/dist/{builder-registry-CkPRx_vx.cjs → builder-registry-D1_hGKCJ.cjs} +2 -2
  44. package/dist/{builder-registry-CkPRx_vx.cjs.map → builder-registry-D1_hGKCJ.cjs.map} +1 -1
  45. package/dist/{builder-registry-6TFaV4oT.js → builder-registry-m_gHCe12.js} +2 -2
  46. package/dist/{builder-registry-6TFaV4oT.js.map → builder-registry-m_gHCe12.js.map} +1 -1
  47. package/dist/{conversations-Ds6aiCMU.cjs → conversations-Ch_VuVwY.cjs} +2 -2
  48. package/dist/{conversations-Ds6aiCMU.cjs.map → conversations-Ch_VuVwY.cjs.map} +1 -1
  49. package/dist/{conversations-CVvZOu1K.js → conversations-xS7yHuG1.js} +2 -2
  50. package/dist/{conversations-CVvZOu1K.js.map → conversations-xS7yHuG1.js.map} +1 -1
  51. package/dist/{dist-CPj7ZQaO.cjs → dist-BKNKucT9.cjs} +427 -290
  52. package/dist/dist-BKNKucT9.cjs.map +1 -0
  53. package/dist/{dist-DC2mND12.js → dist-CIYZuix4.js} +427 -290
  54. package/dist/dist-CIYZuix4.js.map +1 -0
  55. package/dist/{dist-Ch5YGldj.cjs → dist-DgKeISkr.cjs} +1 -1
  56. package/dist/dist-mNQb9_wX.js +1 -0
  57. package/dist/docs/SKILL.md +1 -1
  58. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  59. package/dist/docs/references/reference-observability-tracing-advanced-queries.md +31 -11
  60. package/dist/{editor-builder-B8Mf4kJo.cjs → editor-builder-BaI8pttR.cjs} +2 -2
  61. package/dist/{editor-builder-B8Mf4kJo.cjs.map → editor-builder-BaI8pttR.cjs.map} +1 -1
  62. package/dist/{editor-builder-PKGDfYNc.js → editor-builder-Bln4Pg1U.js} +2 -2
  63. package/dist/{editor-builder-PKGDfYNc.js.map → editor-builder-Bln4Pg1U.js.map} +1 -1
  64. package/dist/{editor-builder-CcSeAW18.cjs → editor-builder-CKfy5eZY.cjs} +3 -3
  65. package/dist/{editor-builder-CcSeAW18.cjs.map → editor-builder-CKfy5eZY.cjs.map} +1 -1
  66. package/dist/{editor-builder-BG38irXi.js → editor-builder-Ceen28s8.js} +3 -3
  67. package/dist/{editor-builder-BG38irXi.js.map → editor-builder-Ceen28s8.js.map} +1 -1
  68. package/dist/{knowledge-DykIi0wH.js → knowledge-Ba74qr0v.js} +89 -2
  69. package/dist/knowledge-Ba74qr0v.js.map +1 -0
  70. package/dist/{knowledge-qu0om3W7.cjs → knowledge-urR7FFG8.cjs} +100 -1
  71. package/dist/knowledge-urR7FFG8.cjs.map +1 -0
  72. package/dist/{observability-dUv60Mzz.cjs → observability-BtdW6mjq.cjs} +2 -2
  73. package/dist/{observability-dUv60Mzz.cjs.map → observability-BtdW6mjq.cjs.map} +1 -1
  74. package/dist/{observability-BS5rmyEH.js → observability-DBtyAJnb.js} +2 -2
  75. package/dist/{observability-BS5rmyEH.js.map → observability-DBtyAJnb.js.map} +1 -1
  76. package/dist/{observability-new-endpoints-BORkWc9f.js → observability-new-endpoints-Di7m_-xc.js} +9 -9
  77. package/dist/observability-new-endpoints-Di7m_-xc.js.map +1 -0
  78. package/dist/{observability-new-endpoints-KJCQZLZr.cjs → observability-new-endpoints-jjCgXuTF.cjs} +8 -8
  79. package/dist/observability-new-endpoints-jjCgXuTF.cjs.map +1 -0
  80. package/dist/{plans-Cq23qQ48.cjs → plans-Djcp3C0d.cjs} +3 -3
  81. package/dist/{plans-Cq23qQ48.cjs.map → plans-Djcp3C0d.cjs.map} +1 -1
  82. package/dist/{plans-BRf1-Sch.js → plans-nHOnlGzr.js} +3 -3
  83. package/dist/{plans-BRf1-Sch.js.map → plans-nHOnlGzr.js.map} +1 -1
  84. package/dist/{probe-image-size-CSrQj2gm.cjs → probe-image-size-BAwk1h6w.cjs} +2 -2
  85. package/dist/{probe-image-size-CSrQj2gm.cjs.map → probe-image-size-BAwk1h6w.cjs.map} +1 -1
  86. package/dist/{probe-image-size-ssYltjkF.js → probe-image-size-DGTRKrgq.js} +2 -2
  87. package/dist/{probe-image-size-ssYltjkF.js.map → probe-image-size-DGTRKrgq.js.map} +1 -1
  88. package/dist/{responses-CPTdr5VE.cjs → responses-BdOStKtX.cjs} +2 -2
  89. package/dist/{responses-CPTdr5VE.cjs.map → responses-BdOStKtX.cjs.map} +1 -1
  90. package/dist/{responses-CGy87E_N.js → responses-CEet9y8G.js} +2 -2
  91. package/dist/{responses-CGy87E_N.js.map → responses-CEet9y8G.js.map} +1 -1
  92. package/dist/{routes-X0Gh3f3T.js → routes-5FpkkzND.js} +21 -18
  93. package/dist/routes-5FpkkzND.js.map +1 -0
  94. package/dist/{routes-DSBYmGyo.cjs → routes-DU_FlwJP.cjs} +21 -18
  95. package/dist/routes-DU_FlwJP.cjs.map +1 -0
  96. package/dist/{scorer-versions-DIcWTIgC.js → scorer-versions-BZ58s09W.js} +2 -2
  97. package/dist/{scorer-versions-DIcWTIgC.js.map → scorer-versions-BZ58s09W.js.map} +1 -1
  98. package/dist/{scorer-versions-BOjrlIcM.cjs → scorer-versions-vQVWyYWA.cjs} +2 -2
  99. package/dist/{scorer-versions-BOjrlIcM.cjs.map → scorer-versions-vQVWyYWA.cjs.map} +1 -1
  100. package/dist/{scores-DqSDYRs0.js → scores-BaDFGpmr.js} +2 -2
  101. package/dist/{scores-DqSDYRs0.js.map → scores-BaDFGpmr.js.map} +1 -1
  102. package/dist/{scores-BZ0Iz_0O.cjs → scores-Bw6Tuga5.cjs} +2 -2
  103. package/dist/{scores-BZ0Iz_0O.cjs.map → scores-Bw6Tuga5.cjs.map} +1 -1
  104. package/dist/server/handlers/a2a.cjs +1 -1
  105. package/dist/server/handlers/a2a.js +1 -1
  106. package/dist/server/handlers/agent-builder.cjs +1 -1
  107. package/dist/server/handlers/agent-builder.d.ts.map +1 -1
  108. package/dist/server/handlers/agent-builder.js +1 -1
  109. package/dist/server/handlers/agent-versions.cjs +2 -2
  110. package/dist/server/handlers/agent-versions.js +2 -2
  111. package/dist/server/handlers/agents.cjs +1 -1
  112. package/dist/server/handlers/agents.d.ts +18 -0
  113. package/dist/server/handlers/agents.d.ts.map +1 -1
  114. package/dist/server/handlers/agents.js +1 -1
  115. package/dist/server/handlers/background-tasks.cjs +2 -1
  116. package/dist/server/handlers/background-tasks.d.ts +89 -0
  117. package/dist/server/handlers/background-tasks.d.ts.map +1 -1
  118. package/dist/server/handlers/background-tasks.js +1 -1
  119. package/dist/server/handlers/builder-registry.cjs +1 -1
  120. package/dist/server/handlers/builder-registry.js +1 -1
  121. package/dist/server/handlers/conversations.cjs +1 -1
  122. package/dist/server/handlers/conversations.js +1 -1
  123. package/dist/server/handlers/editor-builder.cjs +1 -1
  124. package/dist/server/handlers/editor-builder.js +1 -1
  125. package/dist/server/handlers/favorites-enrichment.cjs +1 -1
  126. package/dist/server/handlers/favorites-enrichment.js +1 -1
  127. package/dist/server/handlers/knowledge.cjs +3 -1
  128. package/dist/server/handlers/knowledge.d.ts +95 -0
  129. package/dist/server/handlers/knowledge.d.ts.map +1 -1
  130. package/dist/server/handlers/knowledge.js +1 -1
  131. package/dist/server/handlers/mcp-client-versions.cjs +1 -1
  132. package/dist/server/handlers/mcp-client-versions.js +1 -1
  133. package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
  134. package/dist/server/handlers/observability-new-endpoints.d.ts +248 -244
  135. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  136. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  137. package/dist/server/handlers/observability-shared.cjs +19 -16
  138. package/dist/server/handlers/observability-shared.cjs.map +1 -1
  139. package/dist/server/handlers/observability-shared.d.ts +3 -3
  140. package/dist/server/handlers/observability-shared.d.ts.map +1 -1
  141. package/dist/server/handlers/observability-shared.js +18 -14
  142. package/dist/server/handlers/observability-shared.js.map +1 -1
  143. package/dist/server/handlers/observability.cjs +2 -2
  144. package/dist/server/handlers/observability.js +2 -2
  145. package/dist/server/handlers/plans.cjs +1 -1
  146. package/dist/server/handlers/plans.js +1 -1
  147. package/dist/server/handlers/prompt-block-versions.cjs +1 -1
  148. package/dist/server/handlers/prompt-block-versions.js +1 -1
  149. package/dist/server/handlers/responses.cjs +1 -1
  150. package/dist/server/handlers/responses.js +1 -1
  151. package/dist/server/handlers/scorer-versions.cjs +2 -2
  152. package/dist/server/handlers/scorer-versions.js +2 -2
  153. package/dist/server/handlers/scores.cjs +1 -1
  154. package/dist/server/handlers/scores.js +1 -1
  155. package/dist/server/handlers/stored-agent-favorites.cjs +3 -3
  156. package/dist/server/handlers/stored-agent-favorites.js +3 -3
  157. package/dist/server/handlers/stored-agents.cjs +30 -11
  158. package/dist/server/handlers/stored-agents.cjs.map +1 -1
  159. package/dist/server/handlers/stored-agents.d.ts +56 -0
  160. package/dist/server/handlers/stored-agents.d.ts.map +1 -1
  161. package/dist/server/handlers/stored-agents.js +30 -11
  162. package/dist/server/handlers/stored-agents.js.map +1 -1
  163. package/dist/server/handlers/stored-mcp-clients.cjs +1 -1
  164. package/dist/server/handlers/stored-mcp-clients.js +1 -1
  165. package/dist/server/handlers/stored-prompt-blocks.cjs +1 -1
  166. package/dist/server/handlers/stored-prompt-blocks.js +1 -1
  167. package/dist/server/handlers/stored-scorers.cjs +2 -2
  168. package/dist/server/handlers/stored-scorers.js +2 -2
  169. package/dist/server/handlers/stored-skill-favorites.cjs +2 -2
  170. package/dist/server/handlers/stored-skill-favorites.js +2 -2
  171. package/dist/server/handlers/stored-skills.cjs +2 -2
  172. package/dist/server/handlers/stored-skills.js +2 -2
  173. package/dist/server/handlers/stored-workspaces.cjs +1 -1
  174. package/dist/server/handlers/stored-workspaces.js +1 -1
  175. package/dist/server/handlers/system.cjs +2 -2
  176. package/dist/server/handlers/system.d.ts +2 -0
  177. package/dist/server/handlers/system.d.ts.map +1 -1
  178. package/dist/server/handlers/system.js +2 -2
  179. package/dist/server/handlers/tools.cjs +1 -1
  180. package/dist/server/handlers/tools.js +1 -1
  181. package/dist/server/handlers/validate-agent-instructions.cjs +1 -1
  182. package/dist/server/handlers/validate-agent-instructions.js +1 -1
  183. package/dist/server/handlers/workflow-builder.cjs +1 -1
  184. package/dist/server/handlers/workflow-builder.js +1 -1
  185. package/dist/server/handlers/workflows.cjs +1 -1
  186. package/dist/server/handlers/workflows.js +1 -1
  187. package/dist/server/handlers.cjs +10 -10
  188. package/dist/server/handlers.js +10 -10
  189. package/dist/server/schemas/agents.d.ts +4 -1
  190. package/dist/server/schemas/agents.d.ts.map +1 -1
  191. package/dist/server/schemas/background-tasks.d.ts +6 -0
  192. package/dist/server/schemas/background-tasks.d.ts.map +1 -1
  193. package/dist/server/schemas/feedback.d.ts +3 -3
  194. package/dist/server/schemas/index.cjs +7 -7
  195. package/dist/server/schemas/index.js +7 -7
  196. package/dist/server/schemas/knowledge.d.ts +29 -0
  197. package/dist/server/schemas/knowledge.d.ts.map +1 -1
  198. package/dist/server/schemas/stored-agents.d.ts +70 -0
  199. package/dist/server/schemas/stored-agents.d.ts.map +1 -1
  200. package/dist/server/schemas/system.d.ts +2 -0
  201. package/dist/server/schemas/system.d.ts.map +1 -1
  202. package/dist/server/server-adapter/api-schema-manifest.d.ts +1 -1
  203. package/dist/server/server-adapter/index.cjs +51 -3
  204. package/dist/server/server-adapter/index.cjs.map +1 -1
  205. package/dist/server/server-adapter/index.js +51 -3
  206. package/dist/server/server-adapter/index.js.map +1 -1
  207. package/dist/server/server-adapter/openapi-utils.d.ts +1 -1
  208. package/dist/server/server-adapter/routes/background-tasks.d.ts.map +1 -1
  209. package/dist/server/server-adapter/routes/knowledge.d.ts +93 -0
  210. package/dist/server/server-adapter/routes/knowledge.d.ts.map +1 -1
  211. package/dist/server/server-adapter/routes/observability.d.ts +124 -122
  212. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  213. package/dist/server/server-adapter/routes/system.d.ts +2 -0
  214. package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
  215. package/dist/server/utils.d.ts +13 -7
  216. package/dist/server/utils.d.ts.map +1 -1
  217. package/dist/{stored-agents-C9zCintA.js → stored-agents-DA8Zx6o9.js} +10 -1
  218. package/dist/stored-agents-DA8Zx6o9.js.map +1 -0
  219. package/dist/{stored-agents-LCHZldYH.cjs → stored-agents-TQ2lIFbx.cjs} +10 -1
  220. package/dist/stored-agents-TQ2lIFbx.cjs.map +1 -0
  221. package/dist/{stored-scorers-Dz9vAQcr.js → stored-scorers-DhOq8ZQC.js} +2 -2
  222. package/dist/{stored-scorers-Dz9vAQcr.js.map → stored-scorers-DhOq8ZQC.js.map} +1 -1
  223. package/dist/{stored-scorers-DxQds4_y.cjs → stored-scorers-FJOs5774.cjs} +2 -2
  224. package/dist/{stored-scorers-DxQds4_y.cjs.map → stored-scorers-FJOs5774.cjs.map} +1 -1
  225. package/dist/{system-B0_hRqFE.js → system-DT0pqJSk.js} +2 -1
  226. package/dist/system-DT0pqJSk.js.map +1 -0
  227. package/dist/{system-iruN6xnj.cjs → system-eeBLPCu1.cjs} +2 -1
  228. package/dist/system-eeBLPCu1.cjs.map +1 -0
  229. package/dist/{tools-CtELrYsA.js → tools-BAmCNGM5.js} +4 -4
  230. package/dist/{tools-CtELrYsA.js.map → tools-BAmCNGM5.js.map} +1 -1
  231. package/dist/{tools-DtRHH9Hr.cjs → tools-CI5oeJWT.cjs} +4 -4
  232. package/dist/{tools-DtRHH9Hr.cjs.map → tools-CI5oeJWT.cjs.map} +1 -1
  233. package/dist/{utils-bQ6Jhog6.cjs → utils-BhBJHsqX.cjs} +45 -24
  234. package/dist/{utils-bQ6Jhog6.cjs.map → utils-BhBJHsqX.cjs.map} +1 -1
  235. package/dist/{utils-qaBKOShQ.js → utils-Dy_dQTlK.js} +45 -24
  236. package/dist/{utils-qaBKOShQ.js.map → utils-Dy_dQTlK.js.map} +1 -1
  237. package/dist/{workflow-builder-6I2HiKcF.js → workflow-builder-CaSfD6oL.js} +3 -3
  238. package/dist/{workflow-builder-6I2HiKcF.js.map → workflow-builder-CaSfD6oL.js.map} +1 -1
  239. package/dist/{workflow-builder-CQzvZvwC.cjs → workflow-builder-tr_D_ZDN.cjs} +3 -3
  240. package/dist/{workflow-builder-CQzvZvwC.cjs.map → workflow-builder-tr_D_ZDN.cjs.map} +1 -1
  241. package/dist/{workflows-ClfVyB1p.js → workflows-BxXS5AfE.js} +4 -4
  242. package/dist/workflows-BxXS5AfE.js.map +1 -0
  243. package/dist/{workflows-DgSo-eBG.cjs → workflows-Cdi6w8JW.cjs} +4 -4
  244. package/dist/workflows-Cdi6w8JW.cjs.map +1 -0
  245. package/package.json +9 -9
  246. package/dist/agent-builder-C1SGph1p.cjs.map +0 -1
  247. package/dist/agent-builder-Cq-jo2FP.js.map +0 -1
  248. package/dist/agents-B5kq2QEV.js.map +0 -1
  249. package/dist/agents-Cel1sffU.cjs.map +0 -1
  250. package/dist/agents-NRBk4JAs.js.map +0 -1
  251. package/dist/agents-SvkxJW48.cjs.map +0 -1
  252. package/dist/background-tasks-DhQ6upHK.js.map +0 -1
  253. package/dist/background-tasks-Kcx2YtW0.cjs.map +0 -1
  254. package/dist/dist-CPj7ZQaO.cjs.map +0 -1
  255. package/dist/dist-DC2mND12.js.map +0 -1
  256. package/dist/dist-DDpKEjMk.js +0 -1
  257. package/dist/knowledge-DykIi0wH.js.map +0 -1
  258. package/dist/knowledge-qu0om3W7.cjs.map +0 -1
  259. package/dist/observability-new-endpoints-BORkWc9f.js.map +0 -1
  260. package/dist/observability-new-endpoints-KJCQZLZr.cjs.map +0 -1
  261. package/dist/routes-DSBYmGyo.cjs.map +0 -1
  262. package/dist/routes-X0Gh3f3T.js.map +0 -1
  263. package/dist/stored-agents-C9zCintA.js.map +0 -1
  264. package/dist/stored-agents-LCHZldYH.cjs.map +0 -1
  265. package/dist/system-B0_hRqFE.js.map +0 -1
  266. package/dist/system-iruN6xnj.cjs.map +0 -1
  267. package/dist/workflows-ClfVyB1p.js.map +0 -1
  268. package/dist/workflows-DgSo-eBG.cjs.map +0 -1
  269. /package/dist/_types/{@internal_core → @internal_core@0.1.4}/dist/storage/index.d.ts +0 -0
  270. /package/dist/_types/{@internal_core → @internal_core@0.1.4}/package.json +0 -0
  271. /package/dist/_types/{@internal_voice/dist/_types/@internal_core → @internal_voice@0.0.43/dist/_types/@internal_core@0.1.4}/dist/request-context/index.d.ts +0 -0
  272. /package/dist/_types/{@internal_voice/dist/_types/@internal_core → @internal_voice@0.0.43/dist/_types/@internal_core@0.1.4}/dist/types/index.d.ts +0 -0
  273. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/checks.d.ts +0 -0
  274. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/coerce.d.ts +0 -0
  275. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/compat.d.ts +0 -0
  276. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/deep-partial.d.ts +0 -0
  277. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/errors.d.ts +0 -0
  278. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/external.d.ts +0 -0
  279. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/from-json-schema.d.ts +0 -0
  280. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/in-out.d.ts +0 -0
  281. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/index.d.ts +0 -0
  282. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/iso.d.ts +0 -0
  283. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/parse.d.ts +0 -0
  284. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/classic/schemas.d.ts +0 -0
  285. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/api.d.ts +0 -0
  286. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/checks.d.ts +0 -0
  287. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/compile.d.ts +0 -0
  288. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/core.d.ts +0 -0
  289. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/doc.d.ts +0 -0
  290. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/errors.d.ts +0 -0
  291. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/index.d.ts +0 -0
  292. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/json-schema-generator.d.ts +0 -0
  293. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/json-schema-processors.d.ts +0 -0
  294. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/json-schema.d.ts +0 -0
  295. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/memoizer.d.ts +0 -0
  296. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/parse.d.ts +0 -0
  297. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/regexes.d.ts +0 -0
  298. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/registries.d.ts +0 -0
  299. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/schemas.d.ts +0 -0
  300. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/standard-schema.d.ts +0 -0
  301. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/to-json-schema.d.ts +0 -0
  302. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/util.d.ts +0 -0
  303. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/core/versions.d.ts +0 -0
  304. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/index.d.cts +0 -0
  305. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ar.d.ts +0 -0
  306. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/az.d.ts +0 -0
  307. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/be.d.ts +0 -0
  308. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/bg.d.ts +0 -0
  309. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/bn.d.ts +0 -0
  310. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ca.d.ts +0 -0
  311. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ckb.d.ts +0 -0
  312. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/cs.d.ts +0 -0
  313. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/da.d.ts +0 -0
  314. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/de.d.ts +0 -0
  315. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/el.d.ts +0 -0
  316. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/en.d.ts +0 -0
  317. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/eo.d.ts +0 -0
  318. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/es.d.ts +0 -0
  319. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/fa.d.ts +0 -0
  320. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/fi.d.ts +0 -0
  321. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/fr-CA.d.ts +0 -0
  322. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/fr.d.ts +0 -0
  323. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/gu.d.ts +0 -0
  324. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/he.d.ts +0 -0
  325. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/hi.d.ts +0 -0
  326. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/hr.d.ts +0 -0
  327. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/hu.d.ts +0 -0
  328. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/hy.d.ts +0 -0
  329. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/id.d.ts +0 -0
  330. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/index.d.ts +0 -0
  331. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/is.d.ts +0 -0
  332. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/it.d.ts +0 -0
  333. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ja.d.ts +0 -0
  334. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ka.d.ts +0 -0
  335. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/kh.d.ts +0 -0
  336. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/km.d.ts +0 -0
  337. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/kn.d.ts +0 -0
  338. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ko.d.ts +0 -0
  339. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/lt.d.ts +0 -0
  340. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/mk.d.ts +0 -0
  341. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ms.d.ts +0 -0
  342. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ne.d.ts +0 -0
  343. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/nl.d.ts +0 -0
  344. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/nn.d.ts +0 -0
  345. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/no.d.ts +0 -0
  346. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ota.d.ts +0 -0
  347. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/pl.d.ts +0 -0
  348. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ps.d.ts +0 -0
  349. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/pt-BR.d.ts +0 -0
  350. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/pt.d.ts +0 -0
  351. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ro.d.ts +0 -0
  352. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ru.d.ts +0 -0
  353. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/sk.d.ts +0 -0
  354. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/sl.d.ts +0 -0
  355. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/sv.d.ts +0 -0
  356. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ta.d.ts +0 -0
  357. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/tg.d.ts +0 -0
  358. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/th.d.ts +0 -0
  359. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/tk.d.ts +0 -0
  360. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/tr.d.ts +0 -0
  361. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ua.d.ts +0 -0
  362. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/uk.d.ts +0 -0
  363. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/ur.d.ts +0 -0
  364. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/uz.d.ts +0 -0
  365. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/vi.d.ts +0 -0
  366. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/yo.d.ts +0 -0
  367. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/zh-CN.d.ts +0 -0
  368. /package/dist/_types/{@internal_voice/dist/_types/zod → @internal_voice@0.0.43/dist/_types/zod@4.6.7}/v4/locales/zh-TW.d.ts +0 -0
  369. /package/dist/_types/{@internal_voice → @internal_voice@0.0.43}/package.json +0 -0
  370. /package/dist/_types/{@mastra_schema-compat/dist/_types/@standard-schema_spec → @mastra_schema-compat@1.3.17/dist/_types/@standard-schema_spec@1.1.0}/dist/index.d.ts +0 -0
  371. /package/dist/_types/{@mastra_schema-compat/dist/_types/@types_json-schema → @mastra_schema-compat@1.3.17/dist/_types/@types_json-schema@7.0.15}/index.d.ts +0 -0
  372. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/index.d.ts +0 -0
  373. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/null-to-undefined.d.ts +0 -0
  374. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/openai-reasoning.d.ts +0 -0
  375. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema-compatibility-v3.d.ts +0 -0
  376. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema-compatibility-v4.d.ts +0 -0
  377. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema-compatibility.d.ts +0 -0
  378. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema.d.ts +0 -0
  379. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/standard-schema-compat.d.ts +0 -0
  380. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/types.d.ts +0 -0
  381. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/utils.d.ts +0 -0
  382. /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/package.json +0 -0
@@ -1,18 +1,20 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-10nMEhjP.cjs");
2
2
  const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
3
- const require_agents = require("./agents-Cel1sffU.cjs");
3
+ const require_agents = require("./agents-DbnPZXIN.cjs");
4
4
  const require_schema_Bf12g7KC = require("./schema-Bf12g7KC-plP4Ir6h.cjs");
5
5
  const require_route_builder = require("./route-builder-CvARmqnA.cjs");
6
- const require_utils = require("./utils-bQ6Jhog6.cjs");
6
+ const require_utils = require("./utils-BhBJHsqX.cjs");
7
7
  const require_constants = require("./constants-DMg8hUOR.cjs");
8
8
  const require_server_handlers_error = require("./server/handlers/error.cjs");
9
9
  const require_utils$1 = require("./utils-9PRHHTGC.cjs");
10
- const require_stored_agents = require("./stored-agents-LCHZldYH.cjs");
10
+ const require_stored_agents = require("./stored-agents-TQ2lIFbx.cjs");
11
11
  const require_workspace = require("./workspace-C5BBUatQ.cjs");
12
+ const require_server_handlers_authorship = require("./server/handlers/authorship.cjs");
12
13
  const require_server_handlers_tool_schema_overrides = require("./server/handlers/tool-schema-overrides.cjs");
13
14
  let zod_v4 = require("zod/v4");
14
15
  let _mastra_core_utils_zod_to_json = require("@mastra/core/utils/zod-to-json");
15
16
  let _mastra_core_stream = require("@mastra/core/stream");
17
+ let _mastra_core_auth_ee = require("@mastra/core/auth/ee");
16
18
  let _mastra_core_agent = require("@mastra/core/agent");
17
19
  let _mastra_core_agent_durable = require("@mastra/core/agent/durable");
18
20
  let _mastra_core_di = require("@mastra/core/di");
@@ -177,6 +179,50 @@ function ensureDefaultVersionStatus(ctx, versionOptions) {
177
179
  function getIsStudioFromContext(requestContext) {
178
180
  return requestContext.get(require_constants.MASTRA_IS_STUDIO_KEY) === true;
179
181
  }
182
+ function toStoredModelList(modelList) {
183
+ return modelList.map((model) => ({
184
+ id: model.id,
185
+ provider: model.model.provider,
186
+ modelId: model.model.modelId,
187
+ enabled: model.enabled,
188
+ maxRetries: model.maxRetries
189
+ }));
190
+ }
191
+ async function persistEditorOwnedModelList({ mastra, agent, modelList, requestContext }) {
192
+ const editorConfig = agent.__getEditorConfig?.();
193
+ if (!editorConfig || editorConfig.model !== true) return false;
194
+ const editorAgent = mastra.getEditor?.()?.agent;
195
+ const agentsStore = await (mastra.getStorage?.())?.getStore("agents");
196
+ if (!editorAgent || !agentsStore) throw new require_http_exception.HTTPException(500, { message: "Editor and agent storage are required for Editor-owned model lists" });
197
+ const storedModelList = toStoredModelList(modelList);
198
+ const storedAgent = await agentsStore.getById(agent.id);
199
+ const scope = await require_utils.getStoredResourceScope(mastra, requestContext);
200
+ if (storedAgent) {
201
+ require_utils.assertStoredResourceScope(storedAgent, scope);
202
+ require_server_handlers_authorship.assertWriteAccess({
203
+ requestContext,
204
+ resource: "stored-agents",
205
+ resourceId: agent.id,
206
+ action: "edit",
207
+ record: storedAgent
208
+ });
209
+ await editorAgent.update({
210
+ id: agent.id,
211
+ modelList: storedModelList
212
+ });
213
+ } else {
214
+ const authorId = require_server_handlers_authorship.getCallerAuthorId(requestContext) ?? void 0;
215
+ await editorAgent.create({
216
+ id: agent.id,
217
+ name: agent.name,
218
+ authorId,
219
+ visibility: authorId ? "private" : "public",
220
+ metadata: require_utils.scopeStoredResourceMetadata(void 0, scope),
221
+ modelList: storedModelList
222
+ });
223
+ }
224
+ return true;
225
+ }
180
226
  function normalizePublicExecutionOptions(options, serverRequestContext) {
181
227
  if (!options || typeof options !== "object" || Array.isArray(options)) return void 0;
182
228
  const { actor: _actor, scopes: _scopes, requestContext, ...normalized } = options;
@@ -666,6 +712,36 @@ async function getAgentFromSystem({ mastra, agentId, versionOptions, requestCont
666
712
  if (!agent) throw new require_http_exception.HTTPException(404, { message: `Agent with id ${agentId} not found` });
667
713
  return agent;
668
714
  }
715
+ async function getAgentForModelListMutation({ mastra, agentId, requestContext }) {
716
+ const publishedAgent = await getAgentFromSystem({
717
+ mastra,
718
+ agentId,
719
+ requestContext,
720
+ versionOptions: { status: "published" }
721
+ });
722
+ const editorConfig = publishedAgent.__getEditorConfig?.();
723
+ if (editorConfig === false || editorConfig?.model !== true) return publishedAgent;
724
+ const callerPermissions = requestContext.get(require_constants.MASTRA_USER_PERMISSIONS_KEY);
725
+ if (Array.isArray(callerPermissions) && !callerPermissions.some((permission) => typeof permission === "string" ? (0, _mastra_core_auth_ee.matchesPermission)(permission, "stored-agents:write") : false)) throw new require_http_exception.HTTPException(403, { message: "Missing required permission: stored-agents:write" });
726
+ const storedAgent = await (await mastra.getStorage?.()?.getStore("agents"))?.getById(agentId);
727
+ if (storedAgent) {
728
+ require_utils.assertStoredResourceScope(storedAgent, await require_utils.getStoredResourceScope(mastra, requestContext));
729
+ require_server_handlers_authorship.assertWriteAccess({
730
+ requestContext,
731
+ resource: "stored-agents",
732
+ resourceId: agentId,
733
+ action: "edit",
734
+ record: storedAgent
735
+ });
736
+ }
737
+ const draftAgent = await getAgentFromSystem({
738
+ mastra,
739
+ agentId,
740
+ requestContext,
741
+ versionOptions: { status: "draft" }
742
+ });
743
+ return draftAgent === publishedAgent ? draftAgent.__fork() : draftAgent;
744
+ }
669
745
  async function formatAgent({ mastra, agent, requestContext, isStudio }) {
670
746
  const logger = mastra.getLogger();
671
747
  const description = agent.getDescription();
@@ -1707,12 +1783,13 @@ const ABORT_AGENT_THREAD_ROUTE = require_route_builder.createRoute({
1707
1783
  effectiveResourceId,
1708
1784
  permission: require_utils$1.MastraFGAPermissions.MEMORY_WRITE
1709
1785
  });
1710
- return { aborted: await agent.abortThreadStream({
1786
+ const abortOptions = {
1711
1787
  resourceId: effectiveResourceId,
1712
1788
  threadId: effectiveThreadId,
1713
1789
  ...clearPendingSignals === void 0 ? {} : { clearPendingSignals },
1714
1790
  expectedRunId
1715
- }) };
1791
+ };
1792
+ return { aborted: typeof agent.__abortThreadStreamAcrossProcesses === "function" ? await agent.__abortThreadStreamAcrossProcesses(abortOptions) : await agent.abortThreadStream(abortOptions) };
1716
1793
  } catch (error) {
1717
1794
  return require_server_handlers_error.handleError(error, "error aborting agent thread");
1718
1795
  }
@@ -2747,16 +2824,24 @@ const REORDER_AGENT_MODEL_LIST_ROUTE = require_route_builder.createRoute({
2747
2824
  description: "Reorders the model list for agents with multiple model configurations",
2748
2825
  tags: ["Agents", "Models"],
2749
2826
  requiresAuth: true,
2750
- handler: async ({ mastra, agentId, reorderedModelIds }) => {
2827
+ handler: async ({ mastra, agentId, reorderedModelIds, requestContext }) => {
2751
2828
  try {
2752
- const agent = await getAgentFromSystem({
2829
+ const mutableAgent = await getAgentForModelListMutation({
2753
2830
  mastra,
2754
- agentId
2831
+ agentId,
2832
+ requestContext
2755
2833
  });
2756
- if (typeof agent.model === "function") throw new require_http_exception.HTTPException(409, { message: "Agent model list is dynamic (model is a function) and cannot be edited" });
2757
- const modelList = await agent.getModelList();
2834
+ if (typeof mutableAgent.model === "function") throw new require_http_exception.HTTPException(409, { message: "Agent model list is dynamic (model is a function) and cannot be edited" });
2835
+ const modelList = await mutableAgent.getModelList(requestContext);
2758
2836
  if (!modelList || modelList.length === 0) throw new require_http_exception.HTTPException(400, { message: "Agent model list is not found or empty" });
2759
- if (agent.reorderModels(reorderedModelIds) === false) throw new require_http_exception.HTTPException(400, { message: "Agent model list could not be reordered" });
2837
+ if (mutableAgent.reorderModels(reorderedModelIds) === false) throw new require_http_exception.HTTPException(400, { message: "Agent model list could not be reordered" });
2838
+ const reorderedModelList = await mutableAgent.getModelList(requestContext);
2839
+ if (reorderedModelList) await persistEditorOwnedModelList({
2840
+ mastra,
2841
+ agent: mutableAgent,
2842
+ modelList: reorderedModelList,
2843
+ requestContext
2844
+ });
2760
2845
  return { message: "Model list reordered" };
2761
2846
  } catch (error) {
2762
2847
  return require_server_handlers_error.handleError(error, "error reordering model list");
@@ -2774,14 +2859,15 @@ const UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE = require_route_builder.createRoute
2774
2859
  description: "Updates a specific model configuration in the agent model list",
2775
2860
  tags: ["Agents", "Models"],
2776
2861
  requiresAuth: true,
2777
- handler: async ({ mastra, agentId, modelConfigId, model: bodyModel, maxRetries, enabled }) => {
2862
+ handler: async ({ mastra, agentId, modelConfigId, model: bodyModel, maxRetries, enabled, requestContext }) => {
2778
2863
  try {
2779
- const agent = await getAgentFromSystem({
2864
+ const mutableAgent = await getAgentForModelListMutation({
2780
2865
  mastra,
2781
- agentId
2866
+ agentId,
2867
+ requestContext
2782
2868
  });
2783
- if (typeof agent.model === "function") throw new require_http_exception.HTTPException(409, { message: "Agent model list is dynamic (model is a function) and cannot be edited" });
2784
- const modelList = await agent.getModelList();
2869
+ if (typeof mutableAgent.model === "function") throw new require_http_exception.HTTPException(409, { message: "Agent model list is dynamic (model is a function) and cannot be edited" });
2870
+ const modelList = await mutableAgent.getModelList(requestContext);
2785
2871
  if (!modelList || modelList.length === 0) throw new require_http_exception.HTTPException(400, { message: "Agent model list is not found or empty" });
2786
2872
  const modelConfig = modelList.find((config) => config.id === modelConfigId);
2787
2873
  if (!modelConfig) throw new require_http_exception.HTTPException(404, { message: `Model config with id ${modelConfigId} not found` });
@@ -2792,7 +2878,14 @@ const UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE = require_route_builder.createRoute
2792
2878
  ...maxRetries !== void 0 ? { maxRetries } : {},
2793
2879
  ...enabled !== void 0 ? { enabled } : {}
2794
2880
  };
2795
- if (agent.updateModelInModelList(updated) === false) throw new require_http_exception.HTTPException(404, { message: `Model config with id ${modelConfigId} not found` });
2881
+ if (mutableAgent.updateModelInModelList(updated) === false) throw new require_http_exception.HTTPException(404, { message: `Model config with id ${modelConfigId} not found` });
2882
+ const updatedModelList = await mutableAgent.getModelList(requestContext);
2883
+ if (updatedModelList) await persistEditorOwnedModelList({
2884
+ mastra,
2885
+ agent: mutableAgent,
2886
+ modelList: updatedModelList,
2887
+ requestContext
2888
+ });
2796
2889
  return { message: "Model updated in model list" };
2797
2890
  } catch (error) {
2798
2891
  return require_server_handlers_error.handleError(error, "error updating model in model list");
@@ -3288,4 +3381,4 @@ Object.defineProperty(exports, "isProviderConnected", {
3288
3381
  }
3289
3382
  });
3290
3383
 
3291
- //# sourceMappingURL=agents-SvkxJW48.cjs.map
3384
+ //# sourceMappingURL=agents-DOHGWXDa.cjs.map