@mastra/server 1.82.0-alpha.1 → 1.82.0-alpha.2
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 +1 -1
- 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 +1 -1
- 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-CIq9dtbC.cjs → a2a-CNfj0wRr.cjs} +2 -2
- package/dist/{a2a-CIq9dtbC.cjs.map → a2a-CNfj0wRr.cjs.map} +1 -1
- package/dist/{a2a-DULF2hBd.js → a2a-C_2w6OWn.js} +2 -2
- package/dist/{a2a-DULF2hBd.js.map → a2a-C_2w6OWn.js.map} +1 -1
- package/dist/{agent-builder-C1SGph1p.cjs → agent-builder-B7B1DSP9.cjs} +4 -4
- package/dist/{agent-builder-C1SGph1p.cjs.map → agent-builder-B7B1DSP9.cjs.map} +1 -1
- package/dist/{agent-builder-Cq-jo2FP.js → agent-builder-CrFZJ1mg.js} +4 -4
- package/dist/{agent-builder-Cq-jo2FP.js.map → agent-builder-CrFZJ1mg.js.map} +1 -1
- 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-SvkxJW48.cjs → agents-Cp4FBxQB.cjs} +107 -15
- package/dist/agents-Cp4FBxQB.cjs.map +1 -0
- package/dist/{agents-NRBk4JAs.js → agents-DPvMjiDf.js} +109 -17
- package/dist/agents-DPvMjiDf.js.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-BTfM-0md.js} +2 -2
- package/dist/{api-schema-manifest-C8E9EB-q.js.map → api-schema-manifest-BTfM-0md.js.map} +1 -1
- package/dist/{api-schema-manifest-CNjDZrQ8.cjs → api-schema-manifest-C55f0tmn.cjs} +2 -2
- package/dist/{api-schema-manifest-CNjDZrQ8.cjs.map → api-schema-manifest-C55f0tmn.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/{conversations-Ds6aiCMU.cjs → conversations-6DxLemUg.cjs} +2 -2
- package/dist/{conversations-Ds6aiCMU.cjs.map → conversations-6DxLemUg.cjs.map} +1 -1
- package/dist/{conversations-CVvZOu1K.js → conversations-DDMCe7th.js} +2 -2
- package/dist/{conversations-CVvZOu1K.js.map → conversations-DDMCe7th.js.map} +1 -1
- package/dist/{dist-Ch5YGldj.cjs → dist-CjEJaGGe.cjs} +1 -1
- package/dist/{dist-CPj7ZQaO.cjs → dist-CzWU4AmA.cjs} +9 -8
- package/dist/dist-CzWU4AmA.cjs.map +1 -0
- package/dist/{dist-DC2mND12.js → dist-DDo4vt34.js} +9 -8
- package/dist/dist-DDo4vt34.js.map +1 -0
- package/dist/dist-FafoYsHK.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-CcSeAW18.cjs → editor-builder-BO0Pebws.cjs} +3 -3
- package/dist/{editor-builder-CcSeAW18.cjs.map → editor-builder-BO0Pebws.cjs.map} +1 -1
- 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-BG38irXi.js → editor-builder-CuT_ltBK.js} +3 -3
- package/dist/{editor-builder-BG38irXi.js.map → editor-builder-CuT_ltBK.js.map} +1 -1
- 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-UPUTbvxx.cjs} +3 -3
- package/dist/{plans-Cq23qQ48.cjs.map → plans-UPUTbvxx.cjs.map} +1 -1
- package/dist/{plans-BRf1-Sch.js → plans-k4FuteiT.js} +3 -3
- package/dist/{plans-BRf1-Sch.js.map → plans-k4FuteiT.js.map} +1 -1
- package/dist/{probe-image-size-CSrQj2gm.cjs → probe-image-size-BRHrC0Va.cjs} +2 -2
- package/dist/{probe-image-size-CSrQj2gm.cjs.map → probe-image-size-BRHrC0Va.cjs.map} +1 -1
- package/dist/{probe-image-size-ssYltjkF.js → probe-image-size-BmIt3CH4.js} +2 -2
- package/dist/{probe-image-size-ssYltjkF.js.map → probe-image-size-BmIt3CH4.js.map} +1 -1
- package/dist/{responses-CGy87E_N.js → responses-C8HCkptA.js} +2 -2
- package/dist/{responses-CGy87E_N.js.map → responses-C8HCkptA.js.map} +1 -1
- package/dist/{responses-CPTdr5VE.cjs → responses-opDOcZYI.cjs} +2 -2
- package/dist/{responses-CPTdr5VE.cjs.map → responses-opDOcZYI.cjs.map} +1 -1
- package/dist/{routes-X0Gh3f3T.js → routes-BCoCimCB.js} +17 -16
- package/dist/routes-BCoCimCB.js.map +1 -0
- package/dist/{routes-DSBYmGyo.cjs → routes-FKc6a2N0.cjs} +17 -16
- package/dist/routes-FKc6a2N0.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-BZ0Iz_0O.cjs → scores-CNMXAquK.cjs} +2 -2
- package/dist/{scores-BZ0Iz_0O.cjs.map → scores-CNMXAquK.cjs.map} +1 -1
- package/dist/{scores-DqSDYRs0.js → scores-CrpJomkR.js} +2 -2
- package/dist/{scores-DqSDYRs0.js.map → scores-CrpJomkR.js.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.js +1 -1
- package/dist/server/handlers/agent-versions.cjs +1 -1
- package/dist/server/handlers/agent-versions.js +1 -1
- 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/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/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/responses.cjs +1 -1
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/scorer-versions.cjs +1 -1
- package/dist/server/handlers/scorer-versions.js +1 -1
- package/dist/server/handlers/scores.cjs +1 -1
- package/dist/server/handlers/scores.js +1 -1
- package/dist/server/handlers/stored-agent-favorites.cjs +2 -2
- package/dist/server/handlers/stored-agent-favorites.js +2 -2
- package/dist/server/handlers/stored-agents.cjs +29 -10
- 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 +29 -10
- package/dist/server/handlers/stored-agents.js.map +1 -1
- package/dist/server/handlers/stored-scorers.cjs +1 -1
- package/dist/server/handlers/stored-scorers.js +1 -1
- package/dist/server/handlers/stored-skill-favorites.cjs +1 -1
- package/dist/server/handlers/stored-skill-favorites.js +1 -1
- package/dist/server/handlers/stored-skills.cjs +1 -1
- package/dist/server/handlers/stored-skills.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/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/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 +1 -1
- package/dist/server/server-adapter/index.js +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/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/{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-DtRHH9Hr.cjs → tools-C6TLcPmD.cjs} +3 -3
- package/dist/{tools-DtRHH9Hr.cjs.map → tools-C6TLcPmD.cjs.map} +1 -1
- package/dist/{tools-CtELrYsA.js → tools-DP3yJsX7.js} +3 -3
- package/dist/{tools-CtELrYsA.js.map → tools-DP3yJsX7.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-DgSo-eBG.cjs → workflows-CJxQkruy.cjs} +2 -2
- package/dist/{workflows-DgSo-eBG.cjs.map → workflows-CJxQkruy.cjs.map} +1 -1
- package/dist/{workflows-ClfVyB1p.js → workflows-DrDssVnE.js} +2 -2
- package/dist/{workflows-ClfVyB1p.js.map → workflows-DrDssVnE.js.map} +1 -1
- package/package.json +5 -5
- 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/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/_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
|
import { r as __exportAll } from "./rolldown-runtime-CQI-hT2b.js";
|
|
2
2
|
import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
3
|
-
import { $ as toolCallResponseSchema, A as observeAgentBodySchema, B as sendAgentMessageBodySchema, C as generateResponseSchema, E as listSuspendedRunsResponseSchema, F as queueAgentSignalBodySchema, G as serializedAgentSchema, H as sendToolApprovalBodySchema, I as recoverBodySchema, L as reorderAgentModelListBodySchema, N as providersResponseSchema, O as modelConfigIdPathParams, P as queueAgentMessageBodySchema, Q as subscribeAgentThreadBodySchema, R as resumeStreamBodySchema, T as listSuspendedRunsQuerySchema, U as sendToolApprovalResponseSchema, V as sendAgentSignalBodySchema, X as streamResponseSchema, Z as streamUntilIdleBodySchema, _ as declineToolCallBodySchema, a as agentIdPathParams, c as agentRunPathParams, d as agentVersionQuerySchema, f as approveNetworkToolCallBodySchema, g as declineNetworkToolCallBodySchema, h as cancelPendingAgentSignalsResponseSchema, i as agentExecutionLegacyBodySchema, j as observeAgentResponseSchema, k as modelManagementResponseSchema, l as agentSkillPathParams, m as cancelPendingAgentSignalsBodySchema, n as abortAgentThreadResponseSchema, nt as updateAgentModelInModelListBodySchema, p as approveToolCallBodySchema, r as agentExecutionBodySchema, t as abortAgentThreadBodySchema, tt as updateAgentModelBodySchema, v as enhanceInstructionsBodySchema, w as listAgentsResponseSchema, y as enhanceInstructionsResponseSchema, z as resumeStreamUntilIdleBodySchema } from "./agents-
|
|
3
|
+
import { $ as toolCallResponseSchema, A as observeAgentBodySchema, B as sendAgentMessageBodySchema, C as generateResponseSchema, E as listSuspendedRunsResponseSchema, F as queueAgentSignalBodySchema, G as serializedAgentSchema, H as sendToolApprovalBodySchema, I as recoverBodySchema, L as reorderAgentModelListBodySchema, N as providersResponseSchema, O as modelConfigIdPathParams, P as queueAgentMessageBodySchema, Q as subscribeAgentThreadBodySchema, R as resumeStreamBodySchema, T as listSuspendedRunsQuerySchema, U as sendToolApprovalResponseSchema, V as sendAgentSignalBodySchema, X as streamResponseSchema, Z as streamUntilIdleBodySchema, _ as declineToolCallBodySchema, a as agentIdPathParams, c as agentRunPathParams, d as agentVersionQuerySchema, f as approveNetworkToolCallBodySchema, g as declineNetworkToolCallBodySchema, h as cancelPendingAgentSignalsResponseSchema, i as agentExecutionLegacyBodySchema, j as observeAgentResponseSchema, k as modelManagementResponseSchema, l as agentSkillPathParams, m as cancelPendingAgentSignalsBodySchema, n as abortAgentThreadResponseSchema, nt as updateAgentModelInModelListBodySchema, p as approveToolCallBodySchema, r as agentExecutionBodySchema, t as abortAgentThreadBodySchema, tt as updateAgentModelBodySchema, v as enhanceInstructionsBodySchema, w as listAgentsResponseSchema, y as enhanceInstructionsResponseSchema, z as resumeStreamUntilIdleBodySchema } from "./agents-BXqMKoOz.js";
|
|
4
4
|
import { n as standardSchemaToJSONSchema, r as toStandardSchema } from "./schema-Bf12g7KC-DBc4NSds.js";
|
|
5
5
|
import { n as createRoute } from "./route-builder-BxPrwNog.js";
|
|
6
|
-
import { c as toSlug, l as stringify } from "./utils-qaBKOShQ.js";
|
|
7
|
-
import { _ as resolveToolConfig, i as MASTRA_IS_STUDIO_KEY, m as WORKSPACE_TOOLS, s as MASTRA_RESOURCE_ID_KEY } from "./constants-CXAvBYcz.js";
|
|
6
|
+
import { c as toSlug, i as getStoredResourceScope, l as stringify, n as assertStoredResourceScope, s as scopeStoredResourceMetadata } from "./utils-qaBKOShQ.js";
|
|
7
|
+
import { _ as resolveToolConfig, d as MASTRA_USER_PERMISSIONS_KEY, i as MASTRA_IS_STUDIO_KEY, m as WORKSPACE_TOOLS, s as MASTRA_RESOURCE_ID_KEY } from "./constants-CXAvBYcz.js";
|
|
8
8
|
import { handleError } from "./server/handlers/error.js";
|
|
9
9
|
import { _ as MastraFGAPermissions, a as getEffectiveThreadId, c as mergeBodyRequestContext, d as requireEffectiveResourceId, f as sanitizeBody, g as validateThreadOwnership, h as validateRunOwnership, i as getEffectiveResourceId, m as validateBody, n as enforceThreadAccess, o as getHandlerFGAProvider, p as stripClientCredentialHeaders, r as getContextResourceId, t as applyEffectiveThreadId } from "./utils-B15w-1hm.js";
|
|
10
|
-
import { r as createStoredAgentResponseSchema } from "./stored-agents-
|
|
10
|
+
import { r as createStoredAgentResponseSchema } from "./stored-agents-DA8Zx6o9.js";
|
|
11
11
|
import { O as skillDisambiguationQuerySchema, h as getAgentSkillResponseSchema } from "./workspace-DBDA3UQl.js";
|
|
12
|
+
import { assertWriteAccess, getCallerAuthorId } from "./server/handlers/authorship.js";
|
|
12
13
|
import { stripInjectedToolOverrideFields } from "./server/handlers/tool-schema-overrides.js";
|
|
13
14
|
import { z } from "zod/v4";
|
|
14
15
|
import { zodToJsonSchema } from "@mastra/core/utils/zod-to-json";
|
|
15
16
|
import { ChunkFrom } from "@mastra/core/stream";
|
|
17
|
+
import { matchesPermission } from "@mastra/core/auth/ee";
|
|
16
18
|
import { Agent, isDurableAgentLike } from "@mastra/core/agent";
|
|
17
19
|
import { AGENT_STREAM_TOPIC, DurableStepIds } from "@mastra/core/agent/durable";
|
|
18
20
|
import { MASTRA_VERSIONS_KEY, mergeVersionOverrides } from "@mastra/core/di";
|
|
@@ -177,6 +179,50 @@ function ensureDefaultVersionStatus(ctx, versionOptions) {
|
|
|
177
179
|
function getIsStudioFromContext(requestContext) {
|
|
178
180
|
return requestContext.get(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 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 getStoredResourceScope(mastra, requestContext);
|
|
200
|
+
if (storedAgent) {
|
|
201
|
+
assertStoredResourceScope(storedAgent, scope);
|
|
202
|
+
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 = 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: 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 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(MASTRA_USER_PERMISSIONS_KEY);
|
|
725
|
+
if (Array.isArray(callerPermissions) && !callerPermissions.some((permission) => typeof permission === "string" ? matchesPermission(permission, "stored-agents:write") : false)) throw new HTTPException(403, { message: "Missing required permission: stored-agents:write" });
|
|
726
|
+
const storedAgent = await (await mastra.getStorage?.()?.getStore("agents"))?.getById(agentId);
|
|
727
|
+
if (storedAgent) {
|
|
728
|
+
assertStoredResourceScope(storedAgent, await getStoredResourceScope(mastra, requestContext));
|
|
729
|
+
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();
|
|
@@ -2747,16 +2823,24 @@ const REORDER_AGENT_MODEL_LIST_ROUTE = createRoute({
|
|
|
2747
2823
|
description: "Reorders the model list for agents with multiple model configurations",
|
|
2748
2824
|
tags: ["Agents", "Models"],
|
|
2749
2825
|
requiresAuth: true,
|
|
2750
|
-
handler: async ({ mastra, agentId, reorderedModelIds }) => {
|
|
2826
|
+
handler: async ({ mastra, agentId, reorderedModelIds, requestContext }) => {
|
|
2751
2827
|
try {
|
|
2752
|
-
const
|
|
2828
|
+
const mutableAgent = await getAgentForModelListMutation({
|
|
2753
2829
|
mastra,
|
|
2754
|
-
agentId
|
|
2830
|
+
agentId,
|
|
2831
|
+
requestContext
|
|
2755
2832
|
});
|
|
2756
|
-
if (typeof
|
|
2757
|
-
const modelList = await
|
|
2833
|
+
if (typeof mutableAgent.model === "function") throw new HTTPException(409, { message: "Agent model list is dynamic (model is a function) and cannot be edited" });
|
|
2834
|
+
const modelList = await mutableAgent.getModelList(requestContext);
|
|
2758
2835
|
if (!modelList || modelList.length === 0) throw new HTTPException(400, { message: "Agent model list is not found or empty" });
|
|
2759
|
-
if (
|
|
2836
|
+
if (mutableAgent.reorderModels(reorderedModelIds) === false) throw new HTTPException(400, { message: "Agent model list could not be reordered" });
|
|
2837
|
+
const reorderedModelList = await mutableAgent.getModelList(requestContext);
|
|
2838
|
+
if (reorderedModelList) await persistEditorOwnedModelList({
|
|
2839
|
+
mastra,
|
|
2840
|
+
agent: mutableAgent,
|
|
2841
|
+
modelList: reorderedModelList,
|
|
2842
|
+
requestContext
|
|
2843
|
+
});
|
|
2760
2844
|
return { message: "Model list reordered" };
|
|
2761
2845
|
} catch (error) {
|
|
2762
2846
|
return handleError(error, "error reordering model list");
|
|
@@ -2774,14 +2858,15 @@ const UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE = createRoute({
|
|
|
2774
2858
|
description: "Updates a specific model configuration in the agent model list",
|
|
2775
2859
|
tags: ["Agents", "Models"],
|
|
2776
2860
|
requiresAuth: true,
|
|
2777
|
-
handler: async ({ mastra, agentId, modelConfigId, model: bodyModel, maxRetries, enabled }) => {
|
|
2861
|
+
handler: async ({ mastra, agentId, modelConfigId, model: bodyModel, maxRetries, enabled, requestContext }) => {
|
|
2778
2862
|
try {
|
|
2779
|
-
const
|
|
2863
|
+
const mutableAgent = await getAgentForModelListMutation({
|
|
2780
2864
|
mastra,
|
|
2781
|
-
agentId
|
|
2865
|
+
agentId,
|
|
2866
|
+
requestContext
|
|
2782
2867
|
});
|
|
2783
|
-
if (typeof
|
|
2784
|
-
const modelList = await
|
|
2868
|
+
if (typeof mutableAgent.model === "function") throw new HTTPException(409, { message: "Agent model list is dynamic (model is a function) and cannot be edited" });
|
|
2869
|
+
const modelList = await mutableAgent.getModelList(requestContext);
|
|
2785
2870
|
if (!modelList || modelList.length === 0) throw new HTTPException(400, { message: "Agent model list is not found or empty" });
|
|
2786
2871
|
const modelConfig = modelList.find((config) => config.id === modelConfigId);
|
|
2787
2872
|
if (!modelConfig) throw new HTTPException(404, { message: `Model config with id ${modelConfigId} not found` });
|
|
@@ -2792,7 +2877,14 @@ const UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE = createRoute({
|
|
|
2792
2877
|
...maxRetries !== void 0 ? { maxRetries } : {},
|
|
2793
2878
|
...enabled !== void 0 ? { enabled } : {}
|
|
2794
2879
|
};
|
|
2795
|
-
if (
|
|
2880
|
+
if (mutableAgent.updateModelInModelList(updated) === false) throw new HTTPException(404, { message: `Model config with id ${modelConfigId} not found` });
|
|
2881
|
+
const updatedModelList = await mutableAgent.getModelList(requestContext);
|
|
2882
|
+
if (updatedModelList) await persistEditorOwnedModelList({
|
|
2883
|
+
mastra,
|
|
2884
|
+
agent: mutableAgent,
|
|
2885
|
+
modelList: updatedModelList,
|
|
2886
|
+
requestContext
|
|
2887
|
+
});
|
|
2796
2888
|
return { message: "Model updated in model list" };
|
|
2797
2889
|
} catch (error) {
|
|
2798
2890
|
return handleError(error, "error updating model in model list");
|
|
@@ -2983,4 +3075,4 @@ const GET_AGENT_SKILL_ROUTE = createRoute({
|
|
|
2983
3075
|
});
|
|
2984
3076
|
export { SEND_TOOL_APPROVAL_ROUTE as A, UPDATE_AGENT_MODEL_IN_MODEL_LIST_ROUTE as B, RECOVER_ROUTE as C, RESUME_STREAM_UNTIL_IDLE_ROUTE as D, RESUME_STREAM_ROUTE as E, STREAM_UI_MESSAGE_DEPRECATED_ROUTE as F, getAgentFromSystem as G, agents_exports as H, STREAM_UI_MESSAGE_VNEXT_DEPRECATED_ROUTE as I, getSerializedProcessors as J, getBrowserToolsFromAgent as K, STREAM_UNTIL_IDLE_GENERATE_ROUTE as L, STREAM_GENERATE_ROUTE as M, STREAM_GENERATE_VNEXT_DEPRECATED_ROUTE as N, SEND_AGENT_MESSAGE_ROUTE as O, STREAM_NETWORK_ROUTE as P, STREAM_VNEXT_DEPRECATED_ROUTE as R, QUEUE_AGENT_SIGNAL_ROUTE as S, RESET_AGENT_MODEL_ROUTE as T, buildProvidersList as U, UPDATE_AGENT_MODEL_ROUTE as V, extractVersionOptions as W, getWorkspaceToolsFromAgent as X, getSerializedSkillsFromAgent as Y, isProviderConnected as Z, GET_PROVIDERS_ROUTE as _, APPROVE_TOOL_CALL_ROUTE as a, OBSERVE_AGENT_STREAM_ROUTE as b, DECLINE_NETWORK_TOOL_CALL_ROUTE as c, ENHANCE_INSTRUCTIONS_ROUTE as d, GENERATE_AGENT_ROUTE as f, GET_AGENT_SKILL_ROUTE as g, GET_AGENT_BY_ID_ROUTE as h, APPROVE_TOOL_CALL_GENERATE_ROUTE as i, STREAM_GENERATE_LEGACY_ROUTE as j, SEND_AGENT_SIGNAL_ROUTE as k, DECLINE_TOOL_CALL_GENERATE_ROUTE as l, GENERATE_LEGACY_ROUTE as m, ABORT_AGENT_THREAD_ROUTE as n, CANCEL_AGENT_PENDING_SIGNALS_ROUTE as o, GENERATE_AGENT_VNEXT_ROUTE as p, getSerializedAgentTools as q, APPROVE_NETWORK_TOOL_CALL_ROUTE as r, CLONE_AGENT_ROUTE as s, ABORT_AGENT_RUN_ROUTE as t, DECLINE_TOOL_CALL_ROUTE as u, LIST_AGENTS_ROUTE as v, REORDER_AGENT_MODEL_LIST_ROUTE as w, QUEUE_AGENT_MESSAGE_ROUTE as x, LIST_SUSPENDED_RUNS_ROUTE as y, SUBSCRIBE_AGENT_THREAD_ROUTE as z };
|
|
2985
3077
|
|
|
2986
|
-
//# sourceMappingURL=agents-
|
|
3078
|
+
//# sourceMappingURL=agents-DPvMjiDf.js.map
|