@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.
- 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
- package/dist/_types/{@internal_voice → @internal_voice@0.0.43}/dist/routes/index.d.ts +15 -15
- 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
- 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
- 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
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/anthropic.d.ts +2 -2
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/deepseek.d.ts +2 -2
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/google.d.ts +1 -1
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/meta.d.ts +2 -2
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/openai.d.ts +1 -1
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema.types.d.ts +4 -4
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/standard-schema/standard-schema.d.ts +2 -2
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/standard-schema/standard-schema.types.d.ts +1 -1
- package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/zod-to-json.d.ts +1 -1
- package/dist/{a2a-DULF2hBd.js → a2a-CoiG3TAj.js} +3 -3
- package/dist/{a2a-DULF2hBd.js.map → a2a-CoiG3TAj.js.map} +1 -1
- package/dist/{a2a-CIq9dtbC.cjs → a2a-DvqRdny6.cjs} +3 -3
- package/dist/{a2a-CIq9dtbC.cjs.map → a2a-DvqRdny6.cjs.map} +1 -1
- package/dist/{agent-builder-Cq-jo2FP.js → agent-builder-C_L1i2eE.js} +44 -41
- package/dist/agent-builder-C_L1i2eE.js.map +1 -0
- package/dist/{agent-builder-C1SGph1p.cjs → agent-builder-D0Up9Fw1.cjs} +44 -41
- package/dist/agent-builder-D0Up9Fw1.cjs.map +1 -0
- package/dist/{agent-versions-DX2rd6j_.cjs → agent-versions-BccL4mEW.cjs} +2 -2
- package/dist/{agent-versions-DX2rd6j_.cjs.map → agent-versions-BccL4mEW.cjs.map} +1 -1
- package/dist/{agent-versions-TUl6ky5W.js → agent-versions-DFJyxWY1.js} +2 -2
- package/dist/{agent-versions-TUl6ky5W.js.map → agent-versions-DFJyxWY1.js.map} +1 -1
- package/dist/{agents-B5kq2QEV.js → agents-BXqMKoOz.js} +3 -2
- package/dist/agents-BXqMKoOz.js.map +1 -0
- package/dist/{agents-NRBk4JAs.js → agents-CgcW6lHt.js} +112 -19
- package/dist/agents-CgcW6lHt.js.map +1 -0
- package/dist/{agents-SvkxJW48.cjs → agents-DOHGWXDa.cjs} +111 -18
- package/dist/agents-DOHGWXDa.cjs.map +1 -0
- package/dist/{agents-Cel1sffU.cjs → agents-DbnPZXIN.cjs} +3 -2
- package/dist/agents-DbnPZXIN.cjs.map +1 -0
- package/dist/{api-schema-manifest-C8E9EB-q.js → api-schema-manifest-Ci2qUYHc.js} +2 -2
- package/dist/{api-schema-manifest-C8E9EB-q.js.map → api-schema-manifest-Ci2qUYHc.js.map} +1 -1
- package/dist/{api-schema-manifest-CNjDZrQ8.cjs → api-schema-manifest-DCHOlOuJ.cjs} +2 -2
- package/dist/{api-schema-manifest-CNjDZrQ8.cjs.map → api-schema-manifest-DCHOlOuJ.cjs.map} +1 -1
- package/dist/{background-tasks-DhQ6upHK.js → background-tasks-BHhn4YZA.js} +42 -3
- package/dist/background-tasks-BHhn4YZA.js.map +1 -0
- package/dist/{background-tasks-Kcx2YtW0.cjs → background-tasks-Ci2tlxJC.cjs} +47 -2
- package/dist/background-tasks-Ci2tlxJC.cjs.map +1 -0
- package/dist/{builder-registry-CkPRx_vx.cjs → builder-registry-D1_hGKCJ.cjs} +2 -2
- package/dist/{builder-registry-CkPRx_vx.cjs.map → builder-registry-D1_hGKCJ.cjs.map} +1 -1
- package/dist/{builder-registry-6TFaV4oT.js → builder-registry-m_gHCe12.js} +2 -2
- package/dist/{builder-registry-6TFaV4oT.js.map → builder-registry-m_gHCe12.js.map} +1 -1
- package/dist/{conversations-Ds6aiCMU.cjs → conversations-Ch_VuVwY.cjs} +2 -2
- package/dist/{conversations-Ds6aiCMU.cjs.map → conversations-Ch_VuVwY.cjs.map} +1 -1
- package/dist/{conversations-CVvZOu1K.js → conversations-xS7yHuG1.js} +2 -2
- package/dist/{conversations-CVvZOu1K.js.map → conversations-xS7yHuG1.js.map} +1 -1
- package/dist/{dist-CPj7ZQaO.cjs → dist-BKNKucT9.cjs} +427 -290
- package/dist/dist-BKNKucT9.cjs.map +1 -0
- package/dist/{dist-DC2mND12.js → dist-CIYZuix4.js} +427 -290
- package/dist/dist-CIYZuix4.js.map +1 -0
- package/dist/{dist-Ch5YGldj.cjs → dist-DgKeISkr.cjs} +1 -1
- package/dist/dist-mNQb9_wX.js +1 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/reference-observability-tracing-advanced-queries.md +31 -11
- package/dist/{editor-builder-B8Mf4kJo.cjs → editor-builder-BaI8pttR.cjs} +2 -2
- package/dist/{editor-builder-B8Mf4kJo.cjs.map → editor-builder-BaI8pttR.cjs.map} +1 -1
- package/dist/{editor-builder-PKGDfYNc.js → editor-builder-Bln4Pg1U.js} +2 -2
- package/dist/{editor-builder-PKGDfYNc.js.map → editor-builder-Bln4Pg1U.js.map} +1 -1
- package/dist/{editor-builder-CcSeAW18.cjs → editor-builder-CKfy5eZY.cjs} +3 -3
- package/dist/{editor-builder-CcSeAW18.cjs.map → editor-builder-CKfy5eZY.cjs.map} +1 -1
- package/dist/{editor-builder-BG38irXi.js → editor-builder-Ceen28s8.js} +3 -3
- package/dist/{editor-builder-BG38irXi.js.map → editor-builder-Ceen28s8.js.map} +1 -1
- package/dist/{knowledge-DykIi0wH.js → knowledge-Ba74qr0v.js} +89 -2
- package/dist/knowledge-Ba74qr0v.js.map +1 -0
- package/dist/{knowledge-qu0om3W7.cjs → knowledge-urR7FFG8.cjs} +100 -1
- package/dist/knowledge-urR7FFG8.cjs.map +1 -0
- package/dist/{observability-dUv60Mzz.cjs → observability-BtdW6mjq.cjs} +2 -2
- package/dist/{observability-dUv60Mzz.cjs.map → observability-BtdW6mjq.cjs.map} +1 -1
- package/dist/{observability-BS5rmyEH.js → observability-DBtyAJnb.js} +2 -2
- package/dist/{observability-BS5rmyEH.js.map → observability-DBtyAJnb.js.map} +1 -1
- package/dist/{observability-new-endpoints-BORkWc9f.js → observability-new-endpoints-Di7m_-xc.js} +9 -9
- package/dist/observability-new-endpoints-Di7m_-xc.js.map +1 -0
- package/dist/{observability-new-endpoints-KJCQZLZr.cjs → observability-new-endpoints-jjCgXuTF.cjs} +8 -8
- package/dist/observability-new-endpoints-jjCgXuTF.cjs.map +1 -0
- package/dist/{plans-Cq23qQ48.cjs → plans-Djcp3C0d.cjs} +3 -3
- package/dist/{plans-Cq23qQ48.cjs.map → plans-Djcp3C0d.cjs.map} +1 -1
- package/dist/{plans-BRf1-Sch.js → plans-nHOnlGzr.js} +3 -3
- package/dist/{plans-BRf1-Sch.js.map → plans-nHOnlGzr.js.map} +1 -1
- package/dist/{probe-image-size-CSrQj2gm.cjs → probe-image-size-BAwk1h6w.cjs} +2 -2
- package/dist/{probe-image-size-CSrQj2gm.cjs.map → probe-image-size-BAwk1h6w.cjs.map} +1 -1
- package/dist/{probe-image-size-ssYltjkF.js → probe-image-size-DGTRKrgq.js} +2 -2
- package/dist/{probe-image-size-ssYltjkF.js.map → probe-image-size-DGTRKrgq.js.map} +1 -1
- package/dist/{responses-CPTdr5VE.cjs → responses-BdOStKtX.cjs} +2 -2
- package/dist/{responses-CPTdr5VE.cjs.map → responses-BdOStKtX.cjs.map} +1 -1
- package/dist/{responses-CGy87E_N.js → responses-CEet9y8G.js} +2 -2
- package/dist/{responses-CGy87E_N.js.map → responses-CEet9y8G.js.map} +1 -1
- package/dist/{routes-X0Gh3f3T.js → routes-5FpkkzND.js} +21 -18
- package/dist/routes-5FpkkzND.js.map +1 -0
- package/dist/{routes-DSBYmGyo.cjs → routes-DU_FlwJP.cjs} +21 -18
- package/dist/routes-DU_FlwJP.cjs.map +1 -0
- package/dist/{scorer-versions-DIcWTIgC.js → scorer-versions-BZ58s09W.js} +2 -2
- package/dist/{scorer-versions-DIcWTIgC.js.map → scorer-versions-BZ58s09W.js.map} +1 -1
- package/dist/{scorer-versions-BOjrlIcM.cjs → scorer-versions-vQVWyYWA.cjs} +2 -2
- package/dist/{scorer-versions-BOjrlIcM.cjs.map → scorer-versions-vQVWyYWA.cjs.map} +1 -1
- package/dist/{scores-DqSDYRs0.js → scores-BaDFGpmr.js} +2 -2
- package/dist/{scores-DqSDYRs0.js.map → scores-BaDFGpmr.js.map} +1 -1
- package/dist/{scores-BZ0Iz_0O.cjs → scores-Bw6Tuga5.cjs} +2 -2
- package/dist/{scores-BZ0Iz_0O.cjs.map → scores-Bw6Tuga5.cjs.map} +1 -1
- package/dist/server/handlers/a2a.cjs +1 -1
- package/dist/server/handlers/a2a.js +1 -1
- package/dist/server/handlers/agent-builder.cjs +1 -1
- package/dist/server/handlers/agent-builder.d.ts.map +1 -1
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/agent-versions.cjs +2 -2
- package/dist/server/handlers/agent-versions.js +2 -2
- package/dist/server/handlers/agents.cjs +1 -1
- package/dist/server/handlers/agents.d.ts +18 -0
- package/dist/server/handlers/agents.d.ts.map +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/background-tasks.cjs +2 -1
- package/dist/server/handlers/background-tasks.d.ts +89 -0
- package/dist/server/handlers/background-tasks.d.ts.map +1 -1
- package/dist/server/handlers/background-tasks.js +1 -1
- package/dist/server/handlers/builder-registry.cjs +1 -1
- package/dist/server/handlers/builder-registry.js +1 -1
- package/dist/server/handlers/conversations.cjs +1 -1
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/editor-builder.cjs +1 -1
- package/dist/server/handlers/editor-builder.js +1 -1
- package/dist/server/handlers/favorites-enrichment.cjs +1 -1
- package/dist/server/handlers/favorites-enrichment.js +1 -1
- package/dist/server/handlers/knowledge.cjs +3 -1
- package/dist/server/handlers/knowledge.d.ts +95 -0
- package/dist/server/handlers/knowledge.d.ts.map +1 -1
- package/dist/server/handlers/knowledge.js +1 -1
- package/dist/server/handlers/mcp-client-versions.cjs +1 -1
- package/dist/server/handlers/mcp-client-versions.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
- package/dist/server/handlers/observability-new-endpoints.d.ts +248 -244
- package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
- package/dist/server/handlers/observability-new-endpoints.js +1 -1
- package/dist/server/handlers/observability-shared.cjs +19 -16
- package/dist/server/handlers/observability-shared.cjs.map +1 -1
- package/dist/server/handlers/observability-shared.d.ts +3 -3
- package/dist/server/handlers/observability-shared.d.ts.map +1 -1
- package/dist/server/handlers/observability-shared.js +18 -14
- package/dist/server/handlers/observability-shared.js.map +1 -1
- package/dist/server/handlers/observability.cjs +2 -2
- package/dist/server/handlers/observability.js +2 -2
- package/dist/server/handlers/plans.cjs +1 -1
- package/dist/server/handlers/plans.js +1 -1
- package/dist/server/handlers/prompt-block-versions.cjs +1 -1
- package/dist/server/handlers/prompt-block-versions.js +1 -1
- package/dist/server/handlers/responses.cjs +1 -1
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +2 -2
- package/dist/server/handlers/scorer-versions.js +2 -2
- package/dist/server/handlers/scores.cjs +1 -1
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agent-favorites.cjs +3 -3
- package/dist/server/handlers/stored-agent-favorites.js +3 -3
- package/dist/server/handlers/stored-agents.cjs +30 -11
- package/dist/server/handlers/stored-agents.cjs.map +1 -1
- package/dist/server/handlers/stored-agents.d.ts +56 -0
- package/dist/server/handlers/stored-agents.d.ts.map +1 -1
- package/dist/server/handlers/stored-agents.js +30 -11
- package/dist/server/handlers/stored-agents.js.map +1 -1
- package/dist/server/handlers/stored-mcp-clients.cjs +1 -1
- package/dist/server/handlers/stored-mcp-clients.js +1 -1
- package/dist/server/handlers/stored-prompt-blocks.cjs +1 -1
- package/dist/server/handlers/stored-prompt-blocks.js +1 -1
- package/dist/server/handlers/stored-scorers.cjs +2 -2
- package/dist/server/handlers/stored-scorers.js +2 -2
- package/dist/server/handlers/stored-skill-favorites.cjs +2 -2
- package/dist/server/handlers/stored-skill-favorites.js +2 -2
- package/dist/server/handlers/stored-skills.cjs +2 -2
- package/dist/server/handlers/stored-skills.js +2 -2
- package/dist/server/handlers/stored-workspaces.cjs +1 -1
- package/dist/server/handlers/stored-workspaces.js +1 -1
- package/dist/server/handlers/system.cjs +2 -2
- package/dist/server/handlers/system.d.ts +2 -0
- package/dist/server/handlers/system.d.ts.map +1 -1
- package/dist/server/handlers/system.js +2 -2
- package/dist/server/handlers/tools.cjs +1 -1
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/validate-agent-instructions.cjs +1 -1
- package/dist/server/handlers/validate-agent-instructions.js +1 -1
- package/dist/server/handlers/workflow-builder.cjs +1 -1
- package/dist/server/handlers/workflow-builder.js +1 -1
- package/dist/server/handlers/workflows.cjs +1 -1
- package/dist/server/handlers/workflows.js +1 -1
- package/dist/server/handlers.cjs +10 -10
- package/dist/server/handlers.js +10 -10
- package/dist/server/schemas/agents.d.ts +4 -1
- package/dist/server/schemas/agents.d.ts.map +1 -1
- package/dist/server/schemas/background-tasks.d.ts +6 -0
- package/dist/server/schemas/background-tasks.d.ts.map +1 -1
- package/dist/server/schemas/feedback.d.ts +3 -3
- package/dist/server/schemas/index.cjs +7 -7
- package/dist/server/schemas/index.js +7 -7
- package/dist/server/schemas/knowledge.d.ts +29 -0
- package/dist/server/schemas/knowledge.d.ts.map +1 -1
- package/dist/server/schemas/stored-agents.d.ts +70 -0
- package/dist/server/schemas/stored-agents.d.ts.map +1 -1
- package/dist/server/schemas/system.d.ts +2 -0
- package/dist/server/schemas/system.d.ts.map +1 -1
- package/dist/server/server-adapter/api-schema-manifest.d.ts +1 -1
- package/dist/server/server-adapter/index.cjs +51 -3
- package/dist/server/server-adapter/index.cjs.map +1 -1
- package/dist/server/server-adapter/index.js +51 -3
- package/dist/server/server-adapter/index.js.map +1 -1
- package/dist/server/server-adapter/openapi-utils.d.ts +1 -1
- package/dist/server/server-adapter/routes/background-tasks.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/knowledge.d.ts +93 -0
- package/dist/server/server-adapter/routes/knowledge.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/observability.d.ts +124 -122
- package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
- package/dist/server/server-adapter/routes/system.d.ts +2 -0
- package/dist/server/server-adapter/routes/system.d.ts.map +1 -1
- package/dist/server/utils.d.ts +13 -7
- package/dist/server/utils.d.ts.map +1 -1
- package/dist/{stored-agents-C9zCintA.js → stored-agents-DA8Zx6o9.js} +10 -1
- package/dist/stored-agents-DA8Zx6o9.js.map +1 -0
- package/dist/{stored-agents-LCHZldYH.cjs → stored-agents-TQ2lIFbx.cjs} +10 -1
- package/dist/stored-agents-TQ2lIFbx.cjs.map +1 -0
- package/dist/{stored-scorers-Dz9vAQcr.js → stored-scorers-DhOq8ZQC.js} +2 -2
- package/dist/{stored-scorers-Dz9vAQcr.js.map → stored-scorers-DhOq8ZQC.js.map} +1 -1
- package/dist/{stored-scorers-DxQds4_y.cjs → stored-scorers-FJOs5774.cjs} +2 -2
- package/dist/{stored-scorers-DxQds4_y.cjs.map → stored-scorers-FJOs5774.cjs.map} +1 -1
- package/dist/{system-B0_hRqFE.js → system-DT0pqJSk.js} +2 -1
- package/dist/system-DT0pqJSk.js.map +1 -0
- package/dist/{system-iruN6xnj.cjs → system-eeBLPCu1.cjs} +2 -1
- package/dist/system-eeBLPCu1.cjs.map +1 -0
- package/dist/{tools-CtELrYsA.js → tools-BAmCNGM5.js} +4 -4
- package/dist/{tools-CtELrYsA.js.map → tools-BAmCNGM5.js.map} +1 -1
- package/dist/{tools-DtRHH9Hr.cjs → tools-CI5oeJWT.cjs} +4 -4
- package/dist/{tools-DtRHH9Hr.cjs.map → tools-CI5oeJWT.cjs.map} +1 -1
- package/dist/{utils-bQ6Jhog6.cjs → utils-BhBJHsqX.cjs} +45 -24
- package/dist/{utils-bQ6Jhog6.cjs.map → utils-BhBJHsqX.cjs.map} +1 -1
- package/dist/{utils-qaBKOShQ.js → utils-Dy_dQTlK.js} +45 -24
- package/dist/{utils-qaBKOShQ.js.map → utils-Dy_dQTlK.js.map} +1 -1
- package/dist/{workflow-builder-6I2HiKcF.js → workflow-builder-CaSfD6oL.js} +3 -3
- package/dist/{workflow-builder-6I2HiKcF.js.map → workflow-builder-CaSfD6oL.js.map} +1 -1
- package/dist/{workflow-builder-CQzvZvwC.cjs → workflow-builder-tr_D_ZDN.cjs} +3 -3
- package/dist/{workflow-builder-CQzvZvwC.cjs.map → workflow-builder-tr_D_ZDN.cjs.map} +1 -1
- package/dist/{workflows-ClfVyB1p.js → workflows-BxXS5AfE.js} +4 -4
- package/dist/workflows-BxXS5AfE.js.map +1 -0
- package/dist/{workflows-DgSo-eBG.cjs → workflows-Cdi6w8JW.cjs} +4 -4
- package/dist/workflows-Cdi6w8JW.cjs.map +1 -0
- package/package.json +9 -9
- package/dist/agent-builder-C1SGph1p.cjs.map +0 -1
- package/dist/agent-builder-Cq-jo2FP.js.map +0 -1
- package/dist/agents-B5kq2QEV.js.map +0 -1
- package/dist/agents-Cel1sffU.cjs.map +0 -1
- package/dist/agents-NRBk4JAs.js.map +0 -1
- package/dist/agents-SvkxJW48.cjs.map +0 -1
- package/dist/background-tasks-DhQ6upHK.js.map +0 -1
- package/dist/background-tasks-Kcx2YtW0.cjs.map +0 -1
- package/dist/dist-CPj7ZQaO.cjs.map +0 -1
- package/dist/dist-DC2mND12.js.map +0 -1
- package/dist/dist-DDpKEjMk.js +0 -1
- package/dist/knowledge-DykIi0wH.js.map +0 -1
- package/dist/knowledge-qu0om3W7.cjs.map +0 -1
- package/dist/observability-new-endpoints-BORkWc9f.js.map +0 -1
- package/dist/observability-new-endpoints-KJCQZLZr.cjs.map +0 -1
- package/dist/routes-DSBYmGyo.cjs.map +0 -1
- package/dist/routes-X0Gh3f3T.js.map +0 -1
- package/dist/stored-agents-C9zCintA.js.map +0 -1
- package/dist/stored-agents-LCHZldYH.cjs.map +0 -1
- package/dist/system-B0_hRqFE.js.map +0 -1
- package/dist/system-iruN6xnj.cjs.map +0 -1
- package/dist/workflows-ClfVyB1p.js.map +0 -1
- package/dist/workflows-DgSo-eBG.cjs.map +0 -1
- /package/dist/_types/{@internal_core → @internal_core@0.1.4}/dist/storage/index.d.ts +0 -0
- /package/dist/_types/{@internal_core → @internal_core@0.1.4}/package.json +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /package/dist/_types/{@internal_voice → @internal_voice@0.0.43}/package.json +0 -0
- /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
- /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
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/index.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/null-to-undefined.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/provider-compats/openai-reasoning.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema-compatibility-v3.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema-compatibility-v4.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema-compatibility.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/schema.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/standard-schema-compat.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/types.d.ts +0 -0
- /package/dist/_types/{@mastra_schema-compat → @mastra_schema-compat@1.3.17}/dist/utils.d.ts +0 -0
- /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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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
|
|
2829
|
+
const mutableAgent = await getAgentForModelListMutation({
|
|
2753
2830
|
mastra,
|
|
2754
|
-
agentId
|
|
2831
|
+
agentId,
|
|
2832
|
+
requestContext
|
|
2755
2833
|
});
|
|
2756
|
-
if (typeof
|
|
2757
|
-
const modelList = await
|
|
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 (
|
|
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
|
|
2864
|
+
const mutableAgent = await getAgentForModelListMutation({
|
|
2780
2865
|
mastra,
|
|
2781
|
-
agentId
|
|
2866
|
+
agentId,
|
|
2867
|
+
requestContext
|
|
2782
2868
|
});
|
|
2783
|
-
if (typeof
|
|
2784
|
-
const modelList = await
|
|
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 (
|
|
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-
|
|
3384
|
+
//# sourceMappingURL=agents-DOHGWXDa.cjs.map
|