@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
|
@@ -3,11 +3,11 @@ const require_http_exception = require("./http-exception-Co3MbFUf.cjs");
|
|
|
3
3
|
const require_common = require("./common-D5XxSuvu.cjs");
|
|
4
4
|
const require_workflows = require("./workflows-CKcjXfXk.cjs");
|
|
5
5
|
const require_agent_builder = require("./agent-builder-DSKjD22s.cjs");
|
|
6
|
-
const require_agents = require("./agents-
|
|
6
|
+
const require_agents = require("./agents-DbnPZXIN.cjs");
|
|
7
7
|
const require_route_builder = require("./route-builder-CvARmqnA.cjs");
|
|
8
8
|
const require_utils = require("./utils-bQ6Jhog6.cjs");
|
|
9
9
|
const require_server_handlers_error = require("./server/handlers/error.cjs");
|
|
10
|
-
const require_workflows$1 = require("./workflows-
|
|
10
|
+
const require_workflows$1 = require("./workflows-CJxQkruy.cjs");
|
|
11
11
|
// src/server/handlers/agent-builder.ts
|
|
12
12
|
var agent_builder_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
13
13
|
CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE: () => CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE,
|
|
@@ -29,7 +29,7 @@ var agent_builder_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll
|
|
|
29
29
|
});
|
|
30
30
|
let agentBuilderWorkflowsPromise;
|
|
31
31
|
async function loadAgentBuilderWorkflows() {
|
|
32
|
-
agentBuilderWorkflowsPromise ??= Promise.resolve().then(() => require("./dist-
|
|
32
|
+
agentBuilderWorkflowsPromise ??= Promise.resolve().then(() => require("./dist-CzWU4AmA.cjs")).then((mod) => mod.agentBuilderWorkflows);
|
|
33
33
|
return agentBuilderWorkflowsPromise;
|
|
34
34
|
}
|
|
35
35
|
async function registerAgentBuilderWorkflows(mastra) {
|
|
@@ -724,4 +724,4 @@ Object.defineProperty(exports, "agent_builder_exports", {
|
|
|
724
724
|
}
|
|
725
725
|
});
|
|
726
726
|
|
|
727
|
-
//# sourceMappingURL=agent-builder-
|
|
727
|
+
//# sourceMappingURL=agent-builder-B7B1DSP9.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-builder-C1SGph1p.cjs","names":["createRoute","listWorkflowsResponseSchema","handleError","actionIdPathParams","workflowInfoSchema","WorkflowRegistry","HTTPException","listWorkflowRunsQuerySchema","workflowRunsResponseSchema","actionRunPathParams","workflowRunResultQuerySchema","workflowRunResultSchema","optionalRunIdSchema","createWorkflowRunResponseSchema","runIdSchema","streamAgentBuilderBodySchema","streamResponseSchema","startAsyncAgentBuilderBodySchema","workflowExecutionResultSchema","workflowControlResponseSchema","resumeAgentBuilderBodySchema","streamLegacyAgentBuilderBodySchema"],"sources":["../src/server/handlers/agent-builder.ts"],"sourcesContent":["import type { agentBuilderWorkflows as agentBuilderWorkflowsType } from '@mastra/agent-builder';\nimport { HTTPException } from '../http-exception';\nimport {\n actionIdPathParams,\n actionRunPathParams,\n createWorkflowRunResponseSchema,\n listWorkflowRunsQuerySchema,\n resumeAgentBuilderBodySchema,\n streamAgentBuilderBodySchema,\n startAsyncAgentBuilderBodySchema,\n workflowExecutionResultSchema,\n workflowControlResponseSchema,\n workflowRunsResponseSchema,\n workflowInfoSchema,\n listWorkflowsResponseSchema,\n streamLegacyAgentBuilderBodySchema,\n workflowRunResultSchema,\n workflowRunResultQuerySchema,\n} from '../schemas/agent-builder';\nimport { streamResponseSchema } from '../schemas/agents';\nimport { optionalRunIdSchema, runIdSchema } from '../schemas/common';\nimport { createRoute } from '../server-adapter/routes/route-builder';\nimport { WorkflowRegistry } from '../utils';\nimport { handleError } from './error';\nimport * as workflows from './workflows';\n\ntype AgentBuilderWorkflows = typeof agentBuilderWorkflowsType;\n\nlet agentBuilderWorkflowsPromise: Promise<AgentBuilderWorkflows> | undefined;\n\nasync function loadAgentBuilderWorkflows(): Promise<AgentBuilderWorkflows> {\n agentBuilderWorkflowsPromise ??= import('@mastra/agent-builder').then(mod => mod.agentBuilderWorkflows);\n return agentBuilderWorkflowsPromise;\n}\n\nasync function registerAgentBuilderWorkflows(\n mastra: Parameters<typeof WorkflowRegistry.registerTemporaryWorkflows>[1],\n) {\n const agentBuilderWorkflows = await loadAgentBuilderWorkflows();\n WorkflowRegistry.registerTemporaryWorkflows(agentBuilderWorkflows, mastra);\n return agentBuilderWorkflows;\n}\n\n// ============================================================================\n// Route Definitions (handlers call workflow route handlers with transformed parameters)\n// ============================================================================\n\nexport const LIST_AGENT_BUILDER_ACTIONS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder',\n responseType: 'json',\n responseSchema: listWorkflowsResponseSchema,\n summary: 'List agent-builder actions',\n description: 'Returns a list of all available agent-builder actions',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n logger.info('Listing agent builder actions');\n\n // Call workflow list handler\n return await workflows.LIST_WORKFLOWS_ROUTE.handler(ctx);\n } catch (error) {\n logger.error('Error listing agent builder actions', { error });\n return handleError(error, 'Error getting agent builder workflows');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n responseSchema: workflowInfoSchema,\n summary: 'Get action by ID',\n description: 'Returns details for a specific agent-builder action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n const agentBuilderWorkflows = await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, {\n message: `Invalid agent-builder action: ${actionId}. Valid actions are: ${Object.keys(agentBuilderWorkflows).join(', ')}`,\n });\n }\n\n logger.info('Getting agent builder action by ID', { actionId });\n\n return await workflows.GET_WORKFLOW_BY_ID_ROUTE.handler({ ...ctx, workflowId: actionId });\n } catch (error) {\n logger.error('Error getting agent builder action by ID', { error, actionId });\n return handleError(error, 'Error getting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const LIST_AGENT_BUILDER_ACTION_RUNS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: listWorkflowRunsQuerySchema,\n responseSchema: workflowRunsResponseSchema,\n summary: 'List action runs',\n description: 'Returns a paginated list of execution runs for the specified action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Listing agent builder action runs', { actionId });\n\n return await workflows.LIST_WORKFLOW_RUNS_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error listing agent builder action runs', { error, actionId });\n return handleError(error, 'Error getting agent builder action runs');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_RUN_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs/:runId',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n queryParamSchema: workflowRunResultQuerySchema,\n responseSchema: workflowRunResultSchema,\n summary: 'Get action run by ID',\n description:\n 'Returns details for a specific action run with metadata and processed execution state. Use the fields query parameter to reduce payload size.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Getting agent builder action run by ID', { actionId, runId });\n\n return await workflows.GET_WORKFLOW_RUN_BY_ID_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error getting agent builder action run', { error, actionId, runId });\n return handleError(error, 'Error getting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CREATE_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/create-run',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Create action run',\n description: 'Creates a new action execution instance with an optional custom run ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Creating agent builder action run', { actionId, runId });\n\n return await workflows.CREATE_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error creating agent builder action run', { error, actionId });\n return handleError(error, 'Error creating agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Stream action execution',\n description: 'Executes an action and streams the results in real-time',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action', { actionId, runId });\n\n return await workflows.STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Start action asynchronously',\n description: 'Starts an action execution asynchronously without streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting agent builder action asynchronously', { actionId, runId });\n\n return await workflows.START_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error starting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Start specific action run',\n description: 'Starts execution of a specific action run by ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting specific agent builder action run', { actionId, runId });\n\n return await workflows.START_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action run', { error, actionId });\n return handleError(error, 'Error starting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: 'Observe action stream',\n description: 'Observes and streams updates from an already running action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Resume action asynchronously',\n description: 'Resumes a suspended action execution asynchronously without streaming',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action asynchronously', { actionId, runId, step });\n\n return await workflows.RESUME_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n/**\n * Fire-and-forget resume for agent-builder actions: returns immediately with the runId without\n * waiting for completion. Delegates to the workflows `resume-no-wait` route.\n *\n * TODO(v2): fold this behavior into the `resume-async` route in Mastra v2 and remove this route.\n * Kept separate in v1 to avoid breaking the existing `resume-async` response contract.\n */\nexport const RESUME_NO_WAIT_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-no-wait',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Resume action without waiting',\n description:\n 'Resumes a suspended action execution without waiting (fire-and-forget) and returns immediately with the runId. The action continues executing in the background.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action without waiting', { actionId, runId, step });\n\n return await workflows.RESUME_NO_WAIT_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action without waiting', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Resume action',\n description: 'Resumes a suspended action execution from a specific step',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action', { actionId, runId, step });\n\n return await workflows.RESUME_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Resume action stream',\n description: 'Resumes a suspended action execution and continues streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action stream', { actionId, runId, step });\n\n return await workflows.RESUME_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action stream', { error, actionId });\n return handleError(error, 'Error resuming agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/runs/:runId/cancel',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Cancel action run',\n description: 'Cancels an in-progress action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Cancelling agent builder action run', { actionId, runId });\n\n return await workflows.CANCEL_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error cancelling agent builder action run', { error, actionId });\n return handleError(error, 'Error cancelling agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n// Legacy routes (deprecated)\nexport const STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamLegacyAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Stream agent-builder action with legacy format',\n description:\n 'Legacy endpoint for streaming agent-builder action execution. Use /agent-builder/:actionId/stream instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action (legacy)', { actionId, runId });\n\n return await workflows.STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action (legacy)', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe-stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Observe agent-builder action stream with legacy format',\n description:\n 'Legacy endpoint for observing agent-builder action stream. Use /agent-builder/:actionId/observe instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream (legacy)', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream (legacy)', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAI;AAEJ,eAAe,4BAA4D;CACzE,iCAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAiC,qBAAA,CAAA,CAAA,CAAgC,MAAK,QAAO,IAAI,qBAAqB;CACtG,OAAO;AACT;AAEA,eAAe,8BACb,QACA;CACA,MAAM,wBAAwB,MAAM,0BAA0B;CAC9D,cAAA,iBAAiB,2BAA2B,uBAAuB,MAAM;CACzE,OAAO;AACT;AAMA,MAAa,mCAAmCA,sBAAAA,YAAY;CAC1D,QAAQ;CACR,MAAM;CACN,cAAc;CACd,gBAAgBC,kBAAAA;CAChB,SAAS;CACT,aAAa;CACb,MAAM,CAAC,eAAe;CACtB,cAAc;CACd,SAAS,OAAM,QAAO;EACpB,MAAM,EAAE,WAAW;EACnB,MAAM,SAAS,OAAO,UAAU;EAChC,IAAI;GACF,MAAM,8BAA8B,MAAM;GAC1C,OAAO,KAAK,+BAA+B;GAG3C,OAAO,MAAA,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AAA,iBAAiB,QAAQ;EAC3B;CACF;AACF,CAAC;AAED,MAAa,mDAAmDF,sBAAAA,YAAY;CAC1E,QAAQ;CACR,MAAM;CACN,cAAc;CACd,iBAAiBG,sBAAAA;CACjB,kBAAkBW,eAAAA;CAClB,gBAAgBE,eAAAA;CAChB,SAAS;CACT,aACE;CACF,MAAM,CAAC,iBAAiB,QAAQ;CAChC,cAAc;CACd,SAAS,OAAM,QAAO;EACpB,MAAM,EAAE,QAAQ,UAAU,UAAU;EACpC,MAAM,SAAS,OAAO,UAAU;EAChC,IAAI;GACF,MAAM,8BAA8B,MAAM;GAE1C,IAAI,YAAY,CAACX,cAAAA,iBAAiB,uBAAuB,QAAQ,GAC/D,MAAM,IAAIC,uBAAAA,cAAc,KAAK,EAAE,SAAS,iCAAiC,WAAW,CAAC;GAGvF,OAAO,KAAK,kDAAkD;IAAE;IAAU;GAAM,CAAC;GAEjF,OAAO,MAAA,oBAAA,qCAAqD,QAAQ;IAClE,GAAG;IACH,YAAY;GACd,CAAC;EACH,SAAS,OAAO;GACd,OAAO,MAAM,wDAAwD;IAAE;IAAO;GAAS,CAAC;GACxF,OAAOJ,8BAAAA,YAAY,OAAO,6CAA6C;EACzE,UAAU;GACR,cAAA,iBAAiB,QAAQ;EAC3B;CACF;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"agent-builder-B7B1DSP9.cjs","names":["createRoute","listWorkflowsResponseSchema","handleError","actionIdPathParams","workflowInfoSchema","WorkflowRegistry","HTTPException","listWorkflowRunsQuerySchema","workflowRunsResponseSchema","actionRunPathParams","workflowRunResultQuerySchema","workflowRunResultSchema","optionalRunIdSchema","createWorkflowRunResponseSchema","runIdSchema","streamAgentBuilderBodySchema","streamResponseSchema","startAsyncAgentBuilderBodySchema","workflowExecutionResultSchema","workflowControlResponseSchema","resumeAgentBuilderBodySchema","streamLegacyAgentBuilderBodySchema"],"sources":["../src/server/handlers/agent-builder.ts"],"sourcesContent":["import type { agentBuilderWorkflows as agentBuilderWorkflowsType } from '@mastra/agent-builder';\nimport { HTTPException } from '../http-exception';\nimport {\n actionIdPathParams,\n actionRunPathParams,\n createWorkflowRunResponseSchema,\n listWorkflowRunsQuerySchema,\n resumeAgentBuilderBodySchema,\n streamAgentBuilderBodySchema,\n startAsyncAgentBuilderBodySchema,\n workflowExecutionResultSchema,\n workflowControlResponseSchema,\n workflowRunsResponseSchema,\n workflowInfoSchema,\n listWorkflowsResponseSchema,\n streamLegacyAgentBuilderBodySchema,\n workflowRunResultSchema,\n workflowRunResultQuerySchema,\n} from '../schemas/agent-builder';\nimport { streamResponseSchema } from '../schemas/agents';\nimport { optionalRunIdSchema, runIdSchema } from '../schemas/common';\nimport { createRoute } from '../server-adapter/routes/route-builder';\nimport { WorkflowRegistry } from '../utils';\nimport { handleError } from './error';\nimport * as workflows from './workflows';\n\ntype AgentBuilderWorkflows = typeof agentBuilderWorkflowsType;\n\nlet agentBuilderWorkflowsPromise: Promise<AgentBuilderWorkflows> | undefined;\n\nasync function loadAgentBuilderWorkflows(): Promise<AgentBuilderWorkflows> {\n agentBuilderWorkflowsPromise ??= import('@mastra/agent-builder').then(mod => mod.agentBuilderWorkflows);\n return agentBuilderWorkflowsPromise;\n}\n\nasync function registerAgentBuilderWorkflows(\n mastra: Parameters<typeof WorkflowRegistry.registerTemporaryWorkflows>[1],\n) {\n const agentBuilderWorkflows = await loadAgentBuilderWorkflows();\n WorkflowRegistry.registerTemporaryWorkflows(agentBuilderWorkflows, mastra);\n return agentBuilderWorkflows;\n}\n\n// ============================================================================\n// Route Definitions (handlers call workflow route handlers with transformed parameters)\n// ============================================================================\n\nexport const LIST_AGENT_BUILDER_ACTIONS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder',\n responseType: 'json',\n responseSchema: listWorkflowsResponseSchema,\n summary: 'List agent-builder actions',\n description: 'Returns a list of all available agent-builder actions',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n logger.info('Listing agent builder actions');\n\n // Call workflow list handler\n return await workflows.LIST_WORKFLOWS_ROUTE.handler(ctx);\n } catch (error) {\n logger.error('Error listing agent builder actions', { error });\n return handleError(error, 'Error getting agent builder workflows');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n responseSchema: workflowInfoSchema,\n summary: 'Get action by ID',\n description: 'Returns details for a specific agent-builder action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n const agentBuilderWorkflows = await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, {\n message: `Invalid agent-builder action: ${actionId}. Valid actions are: ${Object.keys(agentBuilderWorkflows).join(', ')}`,\n });\n }\n\n logger.info('Getting agent builder action by ID', { actionId });\n\n return await workflows.GET_WORKFLOW_BY_ID_ROUTE.handler({ ...ctx, workflowId: actionId });\n } catch (error) {\n logger.error('Error getting agent builder action by ID', { error, actionId });\n return handleError(error, 'Error getting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const LIST_AGENT_BUILDER_ACTION_RUNS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: listWorkflowRunsQuerySchema,\n responseSchema: workflowRunsResponseSchema,\n summary: 'List action runs',\n description: 'Returns a paginated list of execution runs for the specified action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Listing agent builder action runs', { actionId });\n\n return await workflows.LIST_WORKFLOW_RUNS_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error listing agent builder action runs', { error, actionId });\n return handleError(error, 'Error getting agent builder action runs');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_RUN_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs/:runId',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n queryParamSchema: workflowRunResultQuerySchema,\n responseSchema: workflowRunResultSchema,\n summary: 'Get action run by ID',\n description:\n 'Returns details for a specific action run with metadata and processed execution state. Use the fields query parameter to reduce payload size.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Getting agent builder action run by ID', { actionId, runId });\n\n return await workflows.GET_WORKFLOW_RUN_BY_ID_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error getting agent builder action run', { error, actionId, runId });\n return handleError(error, 'Error getting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CREATE_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/create-run',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Create action run',\n description: 'Creates a new action execution instance with an optional custom run ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Creating agent builder action run', { actionId, runId });\n\n return await workflows.CREATE_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error creating agent builder action run', { error, actionId });\n return handleError(error, 'Error creating agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Stream action execution',\n description: 'Executes an action and streams the results in real-time',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action', { actionId, runId });\n\n return await workflows.STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Start action asynchronously',\n description: 'Starts an action execution asynchronously without streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting agent builder action asynchronously', { actionId, runId });\n\n return await workflows.START_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error starting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Start specific action run',\n description: 'Starts execution of a specific action run by ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting specific agent builder action run', { actionId, runId });\n\n return await workflows.START_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action run', { error, actionId });\n return handleError(error, 'Error starting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: 'Observe action stream',\n description: 'Observes and streams updates from an already running action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Resume action asynchronously',\n description: 'Resumes a suspended action execution asynchronously without streaming',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action asynchronously', { actionId, runId, step });\n\n return await workflows.RESUME_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n/**\n * Fire-and-forget resume for agent-builder actions: returns immediately with the runId without\n * waiting for completion. Delegates to the workflows `resume-no-wait` route.\n *\n * TODO(v2): fold this behavior into the `resume-async` route in Mastra v2 and remove this route.\n * Kept separate in v1 to avoid breaking the existing `resume-async` response contract.\n */\nexport const RESUME_NO_WAIT_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-no-wait',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Resume action without waiting',\n description:\n 'Resumes a suspended action execution without waiting (fire-and-forget) and returns immediately with the runId. The action continues executing in the background.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action without waiting', { actionId, runId, step });\n\n return await workflows.RESUME_NO_WAIT_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action without waiting', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Resume action',\n description: 'Resumes a suspended action execution from a specific step',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action', { actionId, runId, step });\n\n return await workflows.RESUME_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Resume action stream',\n description: 'Resumes a suspended action execution and continues streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action stream', { actionId, runId, step });\n\n return await workflows.RESUME_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action stream', { error, actionId });\n return handleError(error, 'Error resuming agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/runs/:runId/cancel',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Cancel action run',\n description: 'Cancels an in-progress action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Cancelling agent builder action run', { actionId, runId });\n\n return await workflows.CANCEL_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error cancelling agent builder action run', { error, actionId });\n return handleError(error, 'Error cancelling agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n// Legacy routes (deprecated)\nexport const STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamLegacyAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Stream agent-builder action with legacy format',\n description:\n 'Legacy endpoint for streaming agent-builder action execution. Use /agent-builder/:actionId/stream instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action (legacy)', { actionId, runId });\n\n return await workflows.STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action (legacy)', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe-stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Observe agent-builder action stream with legacy format',\n description:\n 'Legacy endpoint for observing agent-builder action stream. Use /agent-builder/:actionId/observe instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream (legacy)', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream (legacy)', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAI;AAEJ,eAAe,4BAA4D;CACzE,iCAAA,QAAA,QAAA,CAAA,CAAA,WAAA,QAAiC,qBAAA,CAAA,CAAA,CAAgC,MAAK,QAAO,IAAI,qBAAqB;CACtG,OAAO;AACT;AAEA,eAAe,8BACb,QACA;CACA,MAAM,wBAAwB,MAAM,0BAA0B;CAC9D,cAAA,iBAAiB,2BAA2B,uBAAuB,MAAM;CACzE,OAAO;AACT;AAMA,MAAa,mCAAmCA,sBAAAA,YAAY;CAC1D,QAAQ;CACR,MAAM;CACN,cAAc;CACd,gBAAgBC,kBAAAA;CAChB,SAAS;CACT,aAAa;CACb,MAA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AA,6BAA6C,QAAQ;IAC1D,GAAG;IACH,YAAY;IACZ;GACF,CAAC;EACH,SAAS,OAAO;GACd,OAAO,MAAM,iDAAiD;IAAE;IAAO;GAAS,CAAC;GACjF,OAAOJ,8BAAAA,YAAY,OAAO,sCAAsC;EAClE,UAAU;GACR,cAAA,iBAAiB,QAAQ;EAC3B;CACF;AACF,CAAC;AAED,MAAa,mDAAmDF,sBAAAA,YAAY;CAC1E,QAAQ;CACR,MAAM;CACN,cAAc;CACd,iBAAiBG,sBAAAA;CACjB,kBAAkBW,eAAAA;CAClB,gBAAgBE,eAAAA;CAChB,SAAS;CACT,aACE;CACF,MAAM,CAAC,iBAAiB,QAAQ;CAChC,cAAc;CACd,SAAS,OAAM,QAAO;EACpB,MAAM,EAAE,QAAQ,UAAU,UAAU;EACpC,MAAM,SAAS,OAAO,UAAU;EAChC,IAAI;GACF,MAAM,8BAA8B,MAAM;GAE1C,IAAI,YAAY,CAACX,cAAAA,iBAAiB,uBAAuB,QAAQ,GAC/D,MAAM,IAAIC,uBAAAA,cAAc,KAAK,EAAE,SAAS,iCAAiC,WAAW,CAAC;GAGvF,OAAO,KAAK,kDAAkD;IAAE;IAAU;GAAM,CAAC;GAEjF,OAAO,MAAA,oBAAA,qCAAqD,QAAQ;IAClE,GAAG;IACH,YAAY;GACd,CAAC;EACH,SAAS,OAAO;GACd,OAAO,MAAM,wDAAwD;IAAE;IAAO;GAAS,CAAC;GACxF,OAAOJ,8BAAAA,YAAY,OAAO,6CAA6C;EACzE,UAAU;GACR,cAAA,iBAAiB,QAAQ;EAC3B;CACF;AACF,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { t as HTTPException } from "./http-exception-CzaWkxMl.js";
|
|
|
3
3
|
import { o as optionalRunIdSchema, u as runIdSchema } from "./common-J-yUnHk9.js";
|
|
4
4
|
import { b as workflowRunResultSchema, g as workflowInfoSchema, i as listWorkflowsResponseSchema, m as workflowExecutionResultSchema, n as createWorkflowRunResponseSchema, p as workflowControlResponseSchema, r as listWorkflowRunsQuerySchema, x as workflowRunsResponseSchema, y as workflowRunResultQuerySchema } from "./workflows-DTxiWG6x.js";
|
|
5
5
|
import { a as streamAgentBuilderBodySchema, i as startAsyncAgentBuilderBodySchema, n as actionRunPathParams, o as streamLegacyAgentBuilderBodySchema, r as resumeAgentBuilderBodySchema, t as actionIdPathParams } from "./agent-builder-CSnA_l6K.js";
|
|
6
|
-
import { X as streamResponseSchema } from "./agents-
|
|
6
|
+
import { X as streamResponseSchema } from "./agents-BXqMKoOz.js";
|
|
7
7
|
import { n as createRoute } from "./route-builder-BxPrwNog.js";
|
|
8
8
|
import { t as WorkflowRegistry } from "./utils-qaBKOShQ.js";
|
|
9
9
|
import { handleError } from "./server/handlers/error.js";
|
|
10
|
-
import { C as STREAM_LEGACY_WORKFLOW_ROUTE, S as START_WORKFLOW_RUN_ROUTE, _ as RESUME_ASYNC_WORKFLOW_ROUTE, a as GET_WORKFLOW_BY_ID_ROUTE, b as RESUME_WORKFLOW_ROUTE, c as LIST_WORKFLOW_RUNS_ROUTE, d as OBSERVE_STREAM_WORKFLOW_ROUTE, n as CREATE_WORKFLOW_RUN_ROUTE, o as GET_WORKFLOW_RUN_BY_ID_ROUTE, s as LIST_WORKFLOWS_ROUTE, t as CANCEL_WORKFLOW_RUN_ROUTE, u as OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE, v as RESUME_NO_WAIT_WORKFLOW_ROUTE, w as STREAM_WORKFLOW_ROUTE, x as START_ASYNC_WORKFLOW_ROUTE, y as RESUME_STREAM_WORKFLOW_ROUTE } from "./workflows-
|
|
10
|
+
import { C as STREAM_LEGACY_WORKFLOW_ROUTE, S as START_WORKFLOW_RUN_ROUTE, _ as RESUME_ASYNC_WORKFLOW_ROUTE, a as GET_WORKFLOW_BY_ID_ROUTE, b as RESUME_WORKFLOW_ROUTE, c as LIST_WORKFLOW_RUNS_ROUTE, d as OBSERVE_STREAM_WORKFLOW_ROUTE, n as CREATE_WORKFLOW_RUN_ROUTE, o as GET_WORKFLOW_RUN_BY_ID_ROUTE, s as LIST_WORKFLOWS_ROUTE, t as CANCEL_WORKFLOW_RUN_ROUTE, u as OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE, v as RESUME_NO_WAIT_WORKFLOW_ROUTE, w as STREAM_WORKFLOW_ROUTE, x as START_ASYNC_WORKFLOW_ROUTE, y as RESUME_STREAM_WORKFLOW_ROUTE } from "./workflows-DrDssVnE.js";
|
|
11
11
|
// src/server/handlers/agent-builder.ts
|
|
12
12
|
var agent_builder_exports = /* @__PURE__ */ __exportAll({
|
|
13
13
|
CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE: () => CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE,
|
|
@@ -29,7 +29,7 @@ var agent_builder_exports = /* @__PURE__ */ __exportAll({
|
|
|
29
29
|
});
|
|
30
30
|
let agentBuilderWorkflowsPromise;
|
|
31
31
|
async function loadAgentBuilderWorkflows() {
|
|
32
|
-
agentBuilderWorkflowsPromise ??= import("./dist-
|
|
32
|
+
agentBuilderWorkflowsPromise ??= import("./dist-DDo4vt34.js").then((mod) => mod.agentBuilderWorkflows);
|
|
33
33
|
return agentBuilderWorkflowsPromise;
|
|
34
34
|
}
|
|
35
35
|
async function registerAgentBuilderWorkflows(mastra) {
|
|
@@ -623,4 +623,4 @@ const OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({
|
|
|
623
623
|
});
|
|
624
624
|
export { agent_builder_exports as _, LIST_AGENT_BUILDER_ACTIONS_ROUTE as a, OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE as c, RESUME_NO_WAIT_AGENT_BUILDER_ACTION_ROUTE as d, RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE as f, STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE as g, STREAM_AGENT_BUILDER_ACTION_ROUTE as h, GET_AGENT_BUILDER_ACTION_RUN_BY_ID_ROUTE as i, RESUME_AGENT_BUILDER_ACTION_ROUTE as l, START_ASYNC_AGENT_BUILDER_ACTION_ROUTE as m, CREATE_AGENT_BUILDER_ACTION_RUN_ROUTE as n, LIST_AGENT_BUILDER_ACTION_RUNS_ROUTE as o, START_AGENT_BUILDER_ACTION_RUN_ROUTE as p, GET_AGENT_BUILDER_ACTION_BY_ID_ROUTE as r, OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE as s, CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE as t, RESUME_ASYNC_AGENT_BUILDER_ACTION_ROUTE as u };
|
|
625
625
|
|
|
626
|
-
//# sourceMappingURL=agent-builder-
|
|
626
|
+
//# sourceMappingURL=agent-builder-CrFZJ1mg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-builder-Cq-jo2FP.js","names":[],"sources":["../src/server/handlers/agent-builder.ts"],"sourcesContent":["import type { agentBuilderWorkflows as agentBuilderWorkflowsType } from '@mastra/agent-builder';\nimport { HTTPException } from '../http-exception';\nimport {\n actionIdPathParams,\n actionRunPathParams,\n createWorkflowRunResponseSchema,\n listWorkflowRunsQuerySchema,\n resumeAgentBuilderBodySchema,\n streamAgentBuilderBodySchema,\n startAsyncAgentBuilderBodySchema,\n workflowExecutionResultSchema,\n workflowControlResponseSchema,\n workflowRunsResponseSchema,\n workflowInfoSchema,\n listWorkflowsResponseSchema,\n streamLegacyAgentBuilderBodySchema,\n workflowRunResultSchema,\n workflowRunResultQuerySchema,\n} from '../schemas/agent-builder';\nimport { streamResponseSchema } from '../schemas/agents';\nimport { optionalRunIdSchema, runIdSchema } from '../schemas/common';\nimport { createRoute } from '../server-adapter/routes/route-builder';\nimport { WorkflowRegistry } from '../utils';\nimport { handleError } from './error';\nimport * as workflows from './workflows';\n\ntype AgentBuilderWorkflows = typeof agentBuilderWorkflowsType;\n\nlet agentBuilderWorkflowsPromise: Promise<AgentBuilderWorkflows> | undefined;\n\nasync function loadAgentBuilderWorkflows(): Promise<AgentBuilderWorkflows> {\n agentBuilderWorkflowsPromise ??= import('@mastra/agent-builder').then(mod => mod.agentBuilderWorkflows);\n return agentBuilderWorkflowsPromise;\n}\n\nasync function registerAgentBuilderWorkflows(\n mastra: Parameters<typeof WorkflowRegistry.registerTemporaryWorkflows>[1],\n) {\n const agentBuilderWorkflows = await loadAgentBuilderWorkflows();\n WorkflowRegistry.registerTemporaryWorkflows(agentBuilderWorkflows, mastra);\n return agentBuilderWorkflows;\n}\n\n// ============================================================================\n// Route Definitions (handlers call workflow route handlers with transformed parameters)\n// ============================================================================\n\nexport const LIST_AGENT_BUILDER_ACTIONS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder',\n responseType: 'json',\n responseSchema: listWorkflowsResponseSchema,\n summary: 'List agent-builder actions',\n description: 'Returns a list of all available agent-builder actions',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n logger.info('Listing agent builder actions');\n\n // Call workflow list handler\n return await workflows.LIST_WORKFLOWS_ROUTE.handler(ctx);\n } catch (error) {\n logger.error('Error listing agent builder actions', { error });\n return handleError(error, 'Error getting agent builder workflows');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n responseSchema: workflowInfoSchema,\n summary: 'Get action by ID',\n description: 'Returns details for a specific agent-builder action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n const agentBuilderWorkflows = await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, {\n message: `Invalid agent-builder action: ${actionId}. Valid actions are: ${Object.keys(agentBuilderWorkflows).join(', ')}`,\n });\n }\n\n logger.info('Getting agent builder action by ID', { actionId });\n\n return await workflows.GET_WORKFLOW_BY_ID_ROUTE.handler({ ...ctx, workflowId: actionId });\n } catch (error) {\n logger.error('Error getting agent builder action by ID', { error, actionId });\n return handleError(error, 'Error getting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const LIST_AGENT_BUILDER_ACTION_RUNS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: listWorkflowRunsQuerySchema,\n responseSchema: workflowRunsResponseSchema,\n summary: 'List action runs',\n description: 'Returns a paginated list of execution runs for the specified action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Listing agent builder action runs', { actionId });\n\n return await workflows.LIST_WORKFLOW_RUNS_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error listing agent builder action runs', { error, actionId });\n return handleError(error, 'Error getting agent builder action runs');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_RUN_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs/:runId',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n queryParamSchema: workflowRunResultQuerySchema,\n responseSchema: workflowRunResultSchema,\n summary: 'Get action run by ID',\n description:\n 'Returns details for a specific action run with metadata and processed execution state. Use the fields query parameter to reduce payload size.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Getting agent builder action run by ID', { actionId, runId });\n\n return await workflows.GET_WORKFLOW_RUN_BY_ID_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error getting agent builder action run', { error, actionId, runId });\n return handleError(error, 'Error getting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CREATE_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/create-run',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Create action run',\n description: 'Creates a new action execution instance with an optional custom run ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Creating agent builder action run', { actionId, runId });\n\n return await workflows.CREATE_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error creating agent builder action run', { error, actionId });\n return handleError(error, 'Error creating agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Stream action execution',\n description: 'Executes an action and streams the results in real-time',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action', { actionId, runId });\n\n return await workflows.STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Start action asynchronously',\n description: 'Starts an action execution asynchronously without streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting agent builder action asynchronously', { actionId, runId });\n\n return await workflows.START_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error starting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Start specific action run',\n description: 'Starts execution of a specific action run by ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting specific agent builder action run', { actionId, runId });\n\n return await workflows.START_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action run', { error, actionId });\n return handleError(error, 'Error starting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: 'Observe action stream',\n description: 'Observes and streams updates from an already running action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Resume action asynchronously',\n description: 'Resumes a suspended action execution asynchronously without streaming',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action asynchronously', { actionId, runId, step });\n\n return await workflows.RESUME_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n/**\n * Fire-and-forget resume for agent-builder actions: returns immediately with the runId without\n * waiting for completion. Delegates to the workflows `resume-no-wait` route.\n *\n * TODO(v2): fold this behavior into the `resume-async` route in Mastra v2 and remove this route.\n * Kept separate in v1 to avoid breaking the existing `resume-async` response contract.\n */\nexport const RESUME_NO_WAIT_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-no-wait',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Resume action without waiting',\n description:\n 'Resumes a suspended action execution without waiting (fire-and-forget) and returns immediately with the runId. The action continues executing in the background.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action without waiting', { actionId, runId, step });\n\n return await workflows.RESUME_NO_WAIT_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action without waiting', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Resume action',\n description: 'Resumes a suspended action execution from a specific step',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action', { actionId, runId, step });\n\n return await workflows.RESUME_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Resume action stream',\n description: 'Resumes a suspended action execution and continues streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action stream', { actionId, runId, step });\n\n return await workflows.RESUME_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action stream', { error, actionId });\n return handleError(error, 'Error resuming agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/runs/:runId/cancel',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Cancel action run',\n description: 'Cancels an in-progress action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Cancelling agent builder action run', { actionId, runId });\n\n return await workflows.CANCEL_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error cancelling agent builder action run', { error, actionId });\n return handleError(error, 'Error cancelling agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n// Legacy routes (deprecated)\nexport const STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamLegacyAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Stream agent-builder action with legacy format',\n description:\n 'Legacy endpoint for streaming agent-builder action execution. Use /agent-builder/:actionId/stream instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action (legacy)', { actionId, runId });\n\n return await workflows.STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action (legacy)', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe-stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Observe agent-builder action stream with legacy format',\n description:\n 'Legacy endpoint for observing agent-builder action stream. Use /agent-builder/:actionId/observe instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream (legacy)', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream (legacy)', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAI;AAEJ,eAAe,4BAA4D;CACzE,iCAAiC,OAAO,qBAAwB,CAAC,MAAK,QAAO,IAAI,qBAAqB;CACtG,OAAO;AACT;AAEA,eAAe,8BACb,QACA;CACA,MAAM,wBAAwB,MAAM,0BAA0B;CAC9D,iBAAiB,2BAA2B,uBAAuB,MAAM;CACzE,OAAO;AACT;AAMA,MAAa,mCAAmC,YAAY;CAC1D,QAAQ;CACR,MAAM;CACN,cAAc;CACd,gBAAgB;CAChB,SAAS;CACT,aAAa;CACb,MAAM,CAAC,eAAe;CACtB,cAAc;CACd,SAAS,OAAM,QAAO;EACpB,MAAM,EAAE,WAAW;EACnB,MAAM,SAAS,OAAO,UAAU;EAChC,IAAI;GACF,MAAM,8BAA8B,MAAM;GAC1C,OAAO,KAAK,+BAA+B;GAG3C,OAAO,MAAA,qBAAqC,QAAQ,GAAG;EACzD,SAAS,OAAO;GACd,OAAO,MAAM,uCAAuC,EAAE,MAAM,CAAC;GAC7D,OAAO,YAAY,OAAO,uCAAuC;EACnE,UAAU;GACR,iBAAiB,QAAQ;EAC3B;CACF;AACF,CAAC;AAED,MAAa,uCAAuC,YAAY;CAC9D,QAAQ;CACR,MAAM;CACN,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,SAAS;CACT,aAAa;CACb,MAAM,CAAC,eAAe;CACtB,cAAc;CACd,SAAS,OAAM,QAAO;EACpB,MAAM,EAAE,QAAQ,aAAa;EAC7B,MAAM,SAAS,OAAO,UAAU;EAChC,IAAI;GACF,MAAM,wBAAwB,MAAM,8BAA8B,MAAM;GAExE,IAAI,YAAY,CAAC,iBAAiB,uBAAuB,QAAQ,GAC/D,MAAM,IAAI,cAAc,KA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AkD;IAAE;IAAU;GAAM,CAAC;GAEjF,OAAO,MAAA,qCAAqD,QAAQ;IAClE,GAAG;IACH,YAAY;GACd,CAAC;EACH,SAAS,OAAO;GACd,OAAO,MAAM,wDAAwD;IAAE;IAAO;GAAS,CAAC;GACxF,OAAO,YAAY,OAAO,6CAA6C;EACzE,UAAU;GACR,iBAAiB,QAAQ;EAC3B;CACF;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"agent-builder-CrFZJ1mg.js","names":[],"sources":["../src/server/handlers/agent-builder.ts"],"sourcesContent":["import type { agentBuilderWorkflows as agentBuilderWorkflowsType } from '@mastra/agent-builder';\nimport { HTTPException } from '../http-exception';\nimport {\n actionIdPathParams,\n actionRunPathParams,\n createWorkflowRunResponseSchema,\n listWorkflowRunsQuerySchema,\n resumeAgentBuilderBodySchema,\n streamAgentBuilderBodySchema,\n startAsyncAgentBuilderBodySchema,\n workflowExecutionResultSchema,\n workflowControlResponseSchema,\n workflowRunsResponseSchema,\n workflowInfoSchema,\n listWorkflowsResponseSchema,\n streamLegacyAgentBuilderBodySchema,\n workflowRunResultSchema,\n workflowRunResultQuerySchema,\n} from '../schemas/agent-builder';\nimport { streamResponseSchema } from '../schemas/agents';\nimport { optionalRunIdSchema, runIdSchema } from '../schemas/common';\nimport { createRoute } from '../server-adapter/routes/route-builder';\nimport { WorkflowRegistry } from '../utils';\nimport { handleError } from './error';\nimport * as workflows from './workflows';\n\ntype AgentBuilderWorkflows = typeof agentBuilderWorkflowsType;\n\nlet agentBuilderWorkflowsPromise: Promise<AgentBuilderWorkflows> | undefined;\n\nasync function loadAgentBuilderWorkflows(): Promise<AgentBuilderWorkflows> {\n agentBuilderWorkflowsPromise ??= import('@mastra/agent-builder').then(mod => mod.agentBuilderWorkflows);\n return agentBuilderWorkflowsPromise;\n}\n\nasync function registerAgentBuilderWorkflows(\n mastra: Parameters<typeof WorkflowRegistry.registerTemporaryWorkflows>[1],\n) {\n const agentBuilderWorkflows = await loadAgentBuilderWorkflows();\n WorkflowRegistry.registerTemporaryWorkflows(agentBuilderWorkflows, mastra);\n return agentBuilderWorkflows;\n}\n\n// ============================================================================\n// Route Definitions (handlers call workflow route handlers with transformed parameters)\n// ============================================================================\n\nexport const LIST_AGENT_BUILDER_ACTIONS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder',\n responseType: 'json',\n responseSchema: listWorkflowsResponseSchema,\n summary: 'List agent-builder actions',\n description: 'Returns a list of all available agent-builder actions',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n logger.info('Listing agent builder actions');\n\n // Call workflow list handler\n return await workflows.LIST_WORKFLOWS_ROUTE.handler(ctx);\n } catch (error) {\n logger.error('Error listing agent builder actions', { error });\n return handleError(error, 'Error getting agent builder workflows');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n responseSchema: workflowInfoSchema,\n summary: 'Get action by ID',\n description: 'Returns details for a specific agent-builder action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n const agentBuilderWorkflows = await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, {\n message: `Invalid agent-builder action: ${actionId}. Valid actions are: ${Object.keys(agentBuilderWorkflows).join(', ')}`,\n });\n }\n\n logger.info('Getting agent builder action by ID', { actionId });\n\n return await workflows.GET_WORKFLOW_BY_ID_ROUTE.handler({ ...ctx, workflowId: actionId });\n } catch (error) {\n logger.error('Error getting agent builder action by ID', { error, actionId });\n return handleError(error, 'Error getting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const LIST_AGENT_BUILDER_ACTION_RUNS_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: listWorkflowRunsQuerySchema,\n responseSchema: workflowRunsResponseSchema,\n summary: 'List action runs',\n description: 'Returns a paginated list of execution runs for the specified action',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Listing agent builder action runs', { actionId });\n\n return await workflows.LIST_WORKFLOW_RUNS_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error listing agent builder action runs', { error, actionId });\n return handleError(error, 'Error getting agent builder action runs');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const GET_AGENT_BUILDER_ACTION_RUN_BY_ID_ROUTE = createRoute({\n method: 'GET',\n path: '/agent-builder/:actionId/runs/:runId',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n queryParamSchema: workflowRunResultQuerySchema,\n responseSchema: workflowRunResultSchema,\n summary: 'Get action run by ID',\n description:\n 'Returns details for a specific action run with metadata and processed execution state. Use the fields query parameter to reduce payload size.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Getting agent builder action run by ID', { actionId, runId });\n\n return await workflows.GET_WORKFLOW_RUN_BY_ID_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error getting agent builder action run', { error, actionId, runId });\n return handleError(error, 'Error getting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CREATE_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/create-run',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Create action run',\n description: 'Creates a new action execution instance with an optional custom run ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Creating agent builder action run', { actionId, runId });\n\n return await workflows.CREATE_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error creating agent builder action run', { error, actionId });\n return handleError(error, 'Error creating agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Stream action execution',\n description: 'Executes an action and streams the results in real-time',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action', { actionId, runId });\n\n return await workflows.STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: optionalRunIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Start action asynchronously',\n description: 'Starts an action execution asynchronously without streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting agent builder action asynchronously', { actionId, runId });\n\n return await workflows.START_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error starting agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const START_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/start',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: startAsyncAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Start specific action run',\n description: 'Starts execution of a specific action run by ID',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Starting specific agent builder action run', { actionId, runId });\n\n return await workflows.START_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error starting agent builder action run', { error, actionId });\n return handleError(error, 'Error starting agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: 'Observe action stream',\n description: 'Observes and streams updates from an already running action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_ASYNC_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-async',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowExecutionResultSchema,\n summary: 'Resume action asynchronously',\n description: 'Resumes a suspended action execution asynchronously without streaming',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action asynchronously', { actionId, runId, step });\n\n return await workflows.RESUME_ASYNC_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action asynchronously', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n/**\n * Fire-and-forget resume for agent-builder actions: returns immediately with the runId without\n * waiting for completion. Delegates to the workflows `resume-no-wait` route.\n *\n * TODO(v2): fold this behavior into the `resume-async` route in Mastra v2 and remove this route.\n * Kept separate in v1 to avoid breaking the existing `resume-async` response contract.\n */\nexport const RESUME_NO_WAIT_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-no-wait',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: createWorkflowRunResponseSchema,\n summary: 'Resume action without waiting',\n description:\n 'Resumes a suspended action execution without waiting (fire-and-forget) and returns immediately with the runId. The action continues executing in the background.',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action without waiting', { actionId, runId, step });\n\n return await workflows.RESUME_NO_WAIT_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action without waiting', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume',\n responseType: 'json',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: workflowControlResponseSchema,\n summary: 'Resume action',\n description: 'Resumes a suspended action execution from a specific step',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action', { actionId, runId, step });\n\n return await workflows.RESUME_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action', { error, actionId });\n return handleError(error, 'Error resuming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/resume-stream',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: resumeAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: 'Resume action stream',\n description: 'Resumes a suspended action execution and continues streaming results',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, step, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Resuming agent builder action stream', { actionId, runId, step });\n\n return await workflows.RESUME_STREAM_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error resuming agent builder action stream', { error, actionId });\n return handleError(error, 'Error resuming agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/runs/:runId/cancel',\n responseType: 'json',\n pathParamSchema: actionRunPathParams,\n responseSchema: workflowControlResponseSchema,\n summary: 'Cancel action run',\n description: 'Cancels an in-progress action execution',\n tags: ['Agent Builder'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Cancelling agent builder action run', { actionId, runId });\n\n return await workflows.CANCEL_WORKFLOW_RUN_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error cancelling agent builder action run', { error, actionId });\n return handleError(error, 'Error cancelling agent builder action run');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\n// Legacy routes (deprecated)\nexport const STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n bodySchema: streamLegacyAgentBuilderBodySchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Stream agent-builder action with legacy format',\n description:\n 'Legacy endpoint for streaming agent-builder action execution. Use /agent-builder/:actionId/stream instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId, requestContext } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Streaming agent builder action (legacy)', { actionId, runId });\n\n return await workflows.STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n requestContext,\n });\n } catch (error) {\n logger.error('Error streaming agent builder action (legacy)', { error, actionId });\n return handleError(error, 'Error streaming agent builder action');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n\nexport const OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = createRoute({\n method: 'POST',\n path: '/agent-builder/:actionId/observe-stream-legacy',\n responseType: 'stream',\n pathParamSchema: actionIdPathParams,\n queryParamSchema: runIdSchema,\n responseSchema: streamResponseSchema,\n summary: '[DEPRECATED] Observe agent-builder action stream with legacy format',\n description:\n 'Legacy endpoint for observing agent-builder action stream. Use /agent-builder/:actionId/observe instead.',\n tags: ['Agent Builder', 'Legacy'],\n requiresAuth: true,\n handler: async ctx => {\n const { mastra, actionId, runId } = ctx;\n const logger = mastra.getLogger();\n try {\n await registerAgentBuilderWorkflows(mastra);\n\n if (actionId && !WorkflowRegistry.isAgentBuilderWorkflow(actionId)) {\n throw new HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });\n }\n\n logger.info('Observing agent builder action stream (legacy)', { actionId, runId });\n\n return await workflows.OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE.handler({\n ...ctx,\n workflowId: actionId,\n });\n } catch (error) {\n logger.error('Error observing agent builder action stream (legacy)', { error, actionId });\n return handleError(error, 'Error observing agent builder action stream');\n } finally {\n WorkflowRegistry.cleanup();\n }\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAI;AAEJ,eAAe,4BA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R,iBAAiB,QAAQ;EAC3B;CACF;AACF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_default_options = require("./default-options-DRN81WEQ.cjs");
|
|
2
|
-
const require_stored_agents = require("./stored-agents-
|
|
2
|
+
const require_stored_agents = require("./stored-agents-TQ2lIFbx.cjs");
|
|
3
3
|
const require_version_common = require("./version-common-Cc0STXl9.cjs");
|
|
4
4
|
let zod_v4 = require("zod/v4");
|
|
5
5
|
// src/server/schemas/agent-versions.ts
|
|
@@ -117,4 +117,4 @@ Object.defineProperty(exports, "versionIdPathParams", {
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
|
|
120
|
-
//# sourceMappingURL=agent-versions-
|
|
120
|
+
//# sourceMappingURL=agent-versions-BccL4mEW.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-versions-
|
|
1
|
+
{"version":3,"file":"agent-versions-BccL4mEW.cjs","names":["z","toolConfigSchema","instructionsSchema","conditionalFieldSchema","modelConfigSchema","toolsConfigSchema","defaultOptionsSchema","storedProcessorGraphSchema","storedMemoryRefSchema","scorerConfigSchema","createListVersionsResponseSchema","createCompareVersionsResponseSchema"],"sources":["../src/server/schemas/agent-versions.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { defaultOptionsSchema } from './default-options';\nimport { storedMemoryRefSchema } from './memory-config';\nimport {\n scorerConfigSchema,\n instructionsSchema,\n conditionalFieldSchema,\n modelConfigSchema,\n toolConfigSchema,\n toolsConfigSchema,\n storedProcessorGraphSchema,\n} from './stored-agents';\nimport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n createListVersionsResponseSchema,\n createCompareVersionsResponseSchema,\n} from './version-common';\n\nconst mcpClientToolsConfigSchema = z.object({\n tools: z.record(z.string(), toolConfigSchema).optional(),\n});\n\n// Re-export shared schemas for backwards compat\nexport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n};\n\n// ============================================================================\n// Path Parameter Schemas\n// ============================================================================\n\n/**\n * Path parameters for agent version routes\n */\nexport const agentVersionPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n});\n\n/**\n * Path parameters for specific version routes\n */\nexport const versionIdPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n versionId: z.string().describe('Unique identifier for the version (UUID)'),\n});\n\n// ============================================================================\n// Response Schemas\n// ============================================================================\n\n/**\n * Agent version object schema (full response)\n * Config fields are top-level on the version (no nested snapshot object).\n * Extends StorageAgentSnapshotType fields.\n */\nexport const agentVersionSchema = z.object({\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n // Top-level config fields (from StorageAgentSnapshotType)\n name: z.string().describe('Name of the agent'),\n description: z.string().optional().describe('Description of the agent'),\n instructions: instructionsSchema,\n model: conditionalFieldSchema(modelConfigSchema).describe(\n 'Model configuration — static value or array of conditional variants',\n ),\n tools: conditionalFieldSchema(toolsConfigSchema)\n .optional()\n .describe('Tool keys mapped to per-tool config — static or conditional'),\n defaultOptions: conditionalFieldSchema(defaultOptionsSchema)\n .optional()\n .describe('Default options for generate/stream calls — static or conditional'),\n workflows: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Workflow keys with optional per-workflow config — static or conditional'),\n agents: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Agent keys with optional per-agent config — static or conditional'),\n integrationTools: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of tool provider IDs to their tool configurations — static or conditional'),\n mcpClients: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of stored MCP client IDs to their tool configurations — static or conditional'),\n inputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Input processor graph — static or conditional'),\n outputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Output processor graph — static or conditional'),\n memory: conditionalFieldSchema(storedMemoryRefSchema)\n .optional()\n .describe('Memory: registered memory reference or inline config — static or conditional'),\n scorers: conditionalFieldSchema(z.record(z.string(), scorerConfigSchema))\n .optional()\n .describe('Scorer keys with optional sampling config — static or conditional'),\n requestContextSchema: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('JSON Schema defining valid request context variables'),\n // Version metadata fields\n changedFields: z.array(z.string()).optional().describe('Array of field names that changed from the previous version'),\n changeMessage: z.string().optional().describe('Optional message describing the changes'),\n createdAt: z.coerce.date().describe('When this version was created'),\n});\n\n/**\n * Response for GET /stored/agents/:agentId/versions\n */\nexport const listVersionsResponseSchema = createListVersionsResponseSchema(agentVersionSchema);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/:versionId\n */\nexport const getVersionResponseSchema = agentVersionSchema;\n\n/**\n * Response for POST /stored/agents/:agentId/versions\n */\nexport const createVersionResponseSchema = agentVersionSchema.partial().merge(\n z.object({\n // These fields are always present in a version response\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n createdAt: z.coerce.date().describe('When this version was created'),\n }),\n);\n\n/**\n * Response for POST /stored/agents/:agentId/versions/:versionId/restore\n */\nexport const restoreVersionResponseSchema = agentVersionSchema.describe(\n 'The newly created version from the restored configuration',\n);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/compare\n */\nexport const compareVersionsResponseSchema: ReturnType<\n typeof createCompareVersionsResponseSchema<typeof agentVersionSchema>\n> = createCompareVersionsResponseSchema(agentVersionSchema);\n"],"mappings":";;;;;AAuBA,MAAM,6BAA6BA,OAAAA,EAAE,OAAO,EAC1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kBAAkB;;;;AAK7F,MAAa,2BAA2B;;;;AAKxC,MAAa,8BAA8B,mBAAmB,QAAQ,CAAC,CAAC,MACtEV,OAAAA,EAAE,OAAO;CAEP,IAAIA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,SAASA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACtE,eAAeA,OAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAC7E,WAAWA,OAAAA,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS,+BAA+B;AACrE,CAAC,CACH;;;;AAKA,MAAa,+BAA+B,mBAAmB,SAC7D,2DACF;;;;AAKA,MAAa,gCAETW,uBAAAA,oCAAoC,kBAAkB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as defaultOptionsSchema } from "./default-options-Dir6CKnE.js";
|
|
2
|
-
import { D as toolsConfigSchema, E as toolConfigSchema, I as storedMemoryRefSchema, T as storedProcessorGraphSchema, f as modelConfigSchema, l as instructionsSchema, t as conditionalFieldSchema, x as scorerConfigSchema } from "./stored-agents-
|
|
2
|
+
import { D as toolsConfigSchema, E as toolConfigSchema, I as storedMemoryRefSchema, T as storedProcessorGraphSchema, f as modelConfigSchema, l as instructionsSchema, t as conditionalFieldSchema, x as scorerConfigSchema } from "./stored-agents-DA8Zx6o9.js";
|
|
3
3
|
import { i as createListVersionsResponseSchema, r as createCompareVersionsResponseSchema } from "./version-common-BLTDO88f.js";
|
|
4
4
|
import { z } from "zod/v4";
|
|
5
5
|
// src/server/schemas/agent-versions.ts
|
|
@@ -70,4 +70,4 @@ const restoreVersionResponseSchema = agentVersionSchema.describe("The newly crea
|
|
|
70
70
|
const compareVersionsResponseSchema = createCompareVersionsResponseSchema(agentVersionSchema);
|
|
71
71
|
export { getVersionResponseSchema as a, versionIdPathParams as c, createVersionResponseSchema as i, agentVersionSchema as n, listVersionsResponseSchema as o, compareVersionsResponseSchema as r, restoreVersionResponseSchema as s, agentVersionPathParams as t };
|
|
72
72
|
|
|
73
|
-
//# sourceMappingURL=agent-versions-
|
|
73
|
+
//# sourceMappingURL=agent-versions-DFJyxWY1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-versions-
|
|
1
|
+
{"version":3,"file":"agent-versions-DFJyxWY1.js","names":[],"sources":["../src/server/schemas/agent-versions.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { defaultOptionsSchema } from './default-options';\nimport { storedMemoryRefSchema } from './memory-config';\nimport {\n scorerConfigSchema,\n instructionsSchema,\n conditionalFieldSchema,\n modelConfigSchema,\n toolConfigSchema,\n toolsConfigSchema,\n storedProcessorGraphSchema,\n} from './stored-agents';\nimport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n createListVersionsResponseSchema,\n createCompareVersionsResponseSchema,\n} from './version-common';\n\nconst mcpClientToolsConfigSchema = z.object({\n tools: z.record(z.string(), toolConfigSchema).optional(),\n});\n\n// Re-export shared schemas for backwards compat\nexport {\n listVersionsQuerySchema,\n compareVersionsQuerySchema,\n createVersionBodySchema,\n activateVersionResponseSchema,\n deleteVersionResponseSchema,\n versionDiffEntrySchema,\n};\n\n// ============================================================================\n// Path Parameter Schemas\n// ============================================================================\n\n/**\n * Path parameters for agent version routes\n */\nexport const agentVersionPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n});\n\n/**\n * Path parameters for specific version routes\n */\nexport const versionIdPathParams = z.object({\n agentId: z.string().describe('Unique identifier for the stored agent'),\n versionId: z.string().describe('Unique identifier for the version (UUID)'),\n});\n\n// ============================================================================\n// Response Schemas\n// ============================================================================\n\n/**\n * Agent version object schema (full response)\n * Config fields are top-level on the version (no nested snapshot object).\n * Extends StorageAgentSnapshotType fields.\n */\nexport const agentVersionSchema = z.object({\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n // Top-level config fields (from StorageAgentSnapshotType)\n name: z.string().describe('Name of the agent'),\n description: z.string().optional().describe('Description of the agent'),\n instructions: instructionsSchema,\n model: conditionalFieldSchema(modelConfigSchema).describe(\n 'Model configuration — static value or array of conditional variants',\n ),\n tools: conditionalFieldSchema(toolsConfigSchema)\n .optional()\n .describe('Tool keys mapped to per-tool config — static or conditional'),\n defaultOptions: conditionalFieldSchema(defaultOptionsSchema)\n .optional()\n .describe('Default options for generate/stream calls — static or conditional'),\n workflows: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Workflow keys with optional per-workflow config — static or conditional'),\n agents: conditionalFieldSchema(z.record(z.string(), toolConfigSchema))\n .optional()\n .describe('Agent keys with optional per-agent config — static or conditional'),\n integrationTools: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of tool provider IDs to their tool configurations — static or conditional'),\n mcpClients: conditionalFieldSchema(z.record(z.string(), mcpClientToolsConfigSchema))\n .optional()\n .describe('Map of stored MCP client IDs to their tool configurations — static or conditional'),\n inputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Input processor graph — static or conditional'),\n outputProcessors: conditionalFieldSchema(storedProcessorGraphSchema)\n .optional()\n .describe('Output processor graph — static or conditional'),\n memory: conditionalFieldSchema(storedMemoryRefSchema)\n .optional()\n .describe('Memory: registered memory reference or inline config — static or conditional'),\n scorers: conditionalFieldSchema(z.record(z.string(), scorerConfigSchema))\n .optional()\n .describe('Scorer keys with optional sampling config — static or conditional'),\n requestContextSchema: z\n .record(z.string(), z.unknown())\n .optional()\n .describe('JSON Schema defining valid request context variables'),\n // Version metadata fields\n changedFields: z.array(z.string()).optional().describe('Array of field names that changed from the previous version'),\n changeMessage: z.string().optional().describe('Optional message describing the changes'),\n createdAt: z.coerce.date().describe('When this version was created'),\n});\n\n/**\n * Response for GET /stored/agents/:agentId/versions\n */\nexport const listVersionsResponseSchema = createListVersionsResponseSchema(agentVersionSchema);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/:versionId\n */\nexport const getVersionResponseSchema = agentVersionSchema;\n\n/**\n * Response for POST /stored/agents/:agentId/versions\n */\nexport const createVersionResponseSchema = agentVersionSchema.partial().merge(\n z.object({\n // These fields are always present in a version response\n id: z.string().describe('Unique identifier for the version (UUID)'),\n agentId: z.string().describe('ID of the agent this version belongs to'),\n versionNumber: z.number().describe('Sequential version number (1, 2, 3, ...)'),\n createdAt: z.coerce.date().describe('When this version was created'),\n }),\n);\n\n/**\n * Response for POST /stored/agents/:agentId/versions/:versionId/restore\n */\nexport const restoreVersionResponseSchema = agentVersionSchema.describe(\n 'The newly created version from the restored configuration',\n);\n\n/**\n * Response for GET /stored/agents/:agentId/versions/compare\n */\nexport const compareVersionsResponseSchema: ReturnType<\n typeof createCompareVersionsResponseSchema<typeof agentVersionSchema>\n> = createCompareVersionsResponseSchema(agentVersionSchema);\n"],"mappings":";;;;;AAuBA,MAAM,6BAA6B,EAAE,OAAO,EAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAAC,CAAC,SAAS,EACzD,CAAC;;;;AAmBD,MAAa,yBAAyB,EAAE,OAAO,EAC7C,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC,EACvE,CAAC;;;;AAKD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CACrE,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;AAC3E,CAAC;;;;;;AAWD,MAAa,qBAAqB,EAAE,OAAO;CACzC,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACtE,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAE7E,MAAM,EAAE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AAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,6DAA6D;CACpH,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,yCAAyC;CACvF,WAAW,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS,+BAA+B;AACrE,CAAC;;;;AAKD,MAAa,6BAA6B,iCAAiC,kBAAkB;;;;AAK7F,MAAa,2BAA2B;;;;AAKxC,MAAa,8BAA8B,mBAAmB,QAAQ,CAAC,CAAC,MACtE,EAAE,OAAO;CAEP,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAClE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC;CACtE,eAAe,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C;CAC7E,WAAW,EAAE,OAAO,KAAK,CAAC,CAAC,SAAS,+BAA+B;AACrE,CAAC,CACH;;;;AAKA,MAAa,+BAA+B,mBAAmB,SAC7D,2DACF;;;;AAKA,MAAa,gCAET,oCAAoC,kBAAkB"}
|
|
@@ -152,7 +152,8 @@ const serializedSkillSchema = z.object({
|
|
|
152
152
|
});
|
|
153
153
|
const agentEditorConfigSchema = z.union([z.literal(false), z.object({
|
|
154
154
|
instructions: z.boolean().optional(),
|
|
155
|
-
tools: z.union([z.boolean(), z.object({ description: z.boolean().optional() })]).optional()
|
|
155
|
+
tools: z.union([z.boolean(), z.object({ description: z.boolean().optional() })]).optional(),
|
|
156
|
+
model: z.boolean().optional()
|
|
156
157
|
})]);
|
|
157
158
|
/**
|
|
158
159
|
* Main schema for serialized agent representation
|
|
@@ -564,4 +565,4 @@ const abortAgentThreadResponseSchema = z.object({ aborted: z.boolean() });
|
|
|
564
565
|
const observeAgentResponseSchema = z.unknown();
|
|
565
566
|
export { toolCallResponseSchema as $, observeAgentBodySchema as A, sendAgentMessageBodySchema as B, generateResponseSchema as C, listToolsResponseSchema as D, listSuspendedRunsResponseSchema as E, queueAgentSignalBodySchema as F, serializedAgentSchema as G, sendToolApprovalBodySchema as H, recoverBodySchema as I, serializedToolSchema as J, serializedAgentWithIdSchema as K, reorderAgentModelListBodySchema as L, providerSchema as M, providersResponseSchema as N, modelConfigIdPathParams as O, queueAgentMessageBodySchema as P, subscribeAgentThreadBodySchema as Q, resumeStreamBodySchema as R, executeToolResponseSchema as S, listSuspendedRunsQuerySchema as T, sendToolApprovalResponseSchema as U, sendAgentSignalBodySchema as V, serializedAgentDefinitionSchema as W, streamResponseSchema as X, serializedWorkflowSchema as Y, streamUntilIdleBodySchema as Z, declineToolCallBodySchema as _, agentIdPathParams as a, executeToolBodySchema as b, agentRunPathParams as c, agentVersionQuerySchema as d, toolIdPathParams as et, approveNetworkToolCallBodySchema as f, declineNetworkToolCallBodySchema as g, cancelPendingAgentSignalsResponseSchema as h, agentExecutionLegacyBodySchema as i, observeAgentResponseSchema as j, modelManagementResponseSchema as k, agentSkillPathParams as l, cancelPendingAgentSignalsBodySchema as m, abortAgentThreadResponseSchema as n, updateAgentModelInModelListBodySchema as nt, agentPlanQuerySchema as o, approveToolCallBodySchema as p, serializedProcessorSchema as q, agentExecutionBodySchema as r, agentPlanResponseSchema as s, abortAgentThreadBodySchema as t, updateAgentModelBodySchema as tt, agentToolPathParams as u, enhanceInstructionsBodySchema as v, listAgentsResponseSchema as w, executeToolContextBodySchema as x, enhanceInstructionsResponseSchema as y, resumeStreamUntilIdleBodySchema as z };
|
|
566
567
|
|
|
567
|
-
//# sourceMappingURL=agents-
|
|
568
|
+
//# sourceMappingURL=agents-BXqMKoOz.js.map
|