@mastra/server 1.85.0-alpha.3 → 1.85.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_types/@mastra_schema-compat@1.4.0/dist/provider-compats/anthropic.d.ts +1 -1
- package/dist/_types/@mastra_schema-compat@1.4.0/dist/provider-compats/deepseek.d.ts +1 -1
- package/dist/_types/@mastra_schema-compat@1.4.0/dist/provider-compats/meta.d.ts +1 -1
- package/dist/_types/@mastra_schema-compat@1.4.0/dist/schema.types.d.ts +3 -3
- package/dist/{a2a-CCYYdrZ1.cjs → a2a-BAjf7XaU.cjs} +3 -3
- package/dist/{a2a-CCYYdrZ1.cjs.map → a2a-BAjf7XaU.cjs.map} +1 -1
- package/dist/{a2a-By6Kef65.js → a2a-DtYL9fy1.js} +3 -3
- package/dist/{a2a-By6Kef65.js.map → a2a-DtYL9fy1.js.map} +1 -1
- package/dist/{agent-builder-2Ogqa9-3.cjs → agent-builder-CkFH7tUT.cjs} +4 -4
- package/dist/{agent-builder-2Ogqa9-3.cjs.map → agent-builder-CkFH7tUT.cjs.map} +1 -1
- package/dist/{agent-builder-Dc6cRAxh.js → agent-builder-rldc1tFe.js} +4 -4
- package/dist/{agent-builder-Dc6cRAxh.js.map → agent-builder-rldc1tFe.js.map} +1 -1
- package/dist/{agent-controller-ClowtXWO.cjs → agent-controller-BHJDvCaS.cjs} +3 -3
- package/dist/{agent-controller-ClowtXWO.cjs.map → agent-controller-BHJDvCaS.cjs.map} +1 -1
- package/dist/{agent-controller-DfMvkCq-.js → agent-controller-NRR6SK66.js} +3 -3
- package/dist/{agent-controller-DfMvkCq-.js.map → agent-controller-NRR6SK66.js.map} +1 -1
- package/dist/{agents-CEgQ1Sj5.js → agents-CSR862WA.js} +53 -6
- package/dist/agents-CSR862WA.js.map +1 -0
- package/dist/{agents-2HNpgTlJ.cjs → agents-DpvoAW1s.cjs} +53 -6
- package/dist/agents-DpvoAW1s.cjs.map +1 -0
- package/dist/{api-schema-manifest-O6FVicDA.js → api-schema-manifest-BVSGOULw.js} +2 -2
- package/dist/{api-schema-manifest-O6FVicDA.js.map → api-schema-manifest-BVSGOULw.js.map} +1 -1
- package/dist/{api-schema-manifest-BNx6COXa.cjs → api-schema-manifest-BYRdiEa6.cjs} +2 -2
- package/dist/{api-schema-manifest-BNx6COXa.cjs.map → api-schema-manifest-BYRdiEa6.cjs.map} +1 -1
- package/dist/{background-tasks-BqW1_VmH.cjs → background-tasks-4EZqzWvG.cjs} +2 -2
- package/dist/{background-tasks-BqW1_VmH.cjs.map → background-tasks-4EZqzWvG.cjs.map} +1 -1
- package/dist/{background-tasks-BKnoXtUN.js → background-tasks-xkwOZ9D_.js} +2 -2
- package/dist/{background-tasks-BKnoXtUN.js.map → background-tasks-xkwOZ9D_.js.map} +1 -1
- package/dist/{builder-registry-DPsdmtZG.cjs → builder-registry-BBI_5CBL.cjs} +2 -2
- package/dist/{builder-registry-DPsdmtZG.cjs.map → builder-registry-BBI_5CBL.cjs.map} +1 -1
- package/dist/{builder-registry-ByghMyfA.js → builder-registry-WYVRUCgJ.js} +2 -2
- package/dist/{builder-registry-ByghMyfA.js.map → builder-registry-WYVRUCgJ.js.map} +1 -1
- package/dist/{catalogue-sGhegm_8.js → catalogue-349v01Ua.js} +12 -12
- package/dist/{catalogue-sGhegm_8.js.map → catalogue-349v01Ua.js.map} +1 -1
- package/dist/{catalogue-LgV2WP2q.cjs → catalogue-Duj7llQ6.cjs} +12 -12
- package/dist/{catalogue-LgV2WP2q.cjs.map → catalogue-Duj7llQ6.cjs.map} +1 -1
- package/dist/{channels-k5dF1IBc.cjs → channels-DlsNzITQ.cjs} +2 -2
- package/dist/{channels-k5dF1IBc.cjs.map → channels-DlsNzITQ.cjs.map} +1 -1
- package/dist/{channels-DIE-lJkq.js → channels-bkX-zz9J.js} +2 -2
- package/dist/{channels-DIE-lJkq.js.map → channels-bkX-zz9J.js.map} +1 -1
- package/dist/{constants-0xZU_h4R.js → constants-C1ASuP4t.js} +2 -1
- package/dist/constants-C1ASuP4t.js.map +1 -0
- package/dist/{constants-1yTmKUZD.cjs → constants-CyNbINin.cjs} +2 -1
- package/dist/constants-CyNbINin.cjs.map +1 -0
- package/dist/{conversations-Cqyw1vjS.cjs → conversations-CCQijwPL.cjs} +3 -3
- package/dist/{conversations-Cqyw1vjS.cjs.map → conversations-CCQijwPL.cjs.map} +1 -1
- package/dist/{conversations-C9yLrQnn.js → conversations-KzKXe3OK.js} +3 -3
- package/dist/{conversations-C9yLrQnn.js.map → conversations-KzKXe3OK.js.map} +1 -1
- package/dist/{dist-BgMRdBmR.cjs → dist-BHtAU7L_.cjs} +11 -12
- package/dist/dist-BHtAU7L_.cjs.map +1 -0
- package/dist/{dist-BoE65ceB.js → dist-C3GiGAk8.js} +11 -12
- package/dist/dist-C3GiGAk8.js.map +1 -0
- package/dist/dist-CeQHkZ4E.js +1 -0
- package/dist/{dist-D4zWd2g_.cjs → dist-JYlv9Mel.cjs} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-agents-resumable-streams.md +2 -2
- package/dist/docs/references/reference-observability-tracing-advanced-queries.md +1 -1
- package/dist/{editor-builder-Dd10fik0.js → editor-builder-BOqUsHI9.js} +2 -2
- package/dist/{editor-builder-Dd10fik0.js.map → editor-builder-BOqUsHI9.js.map} +1 -1
- package/dist/{editor-builder-apReuKyj.cjs → editor-builder-vasNoMoK.cjs} +2 -2
- package/dist/{editor-builder-apReuKyj.cjs.map → editor-builder-vasNoMoK.cjs.map} +1 -1
- package/dist/{helpers-Dpdta8ai.cjs → helpers-Zu5ZVxSl.cjs} +2 -2
- package/dist/{helpers-Dpdta8ai.cjs.map → helpers-Zu5ZVxSl.cjs.map} +1 -1
- package/dist/{helpers-B56oH6qp.js → helpers-hFdKABRP.js} +2 -2
- package/dist/{helpers-B56oH6qp.js.map → helpers-hFdKABRP.js.map} +1 -1
- package/dist/{knowledge-BblTTH3z.js → knowledge-DAqUHFK5.js} +3 -3
- package/dist/{knowledge-BblTTH3z.js.map → knowledge-DAqUHFK5.js.map} +1 -1
- package/dist/{knowledge-2fms70NN.cjs → knowledge-DL03nbSW.cjs} +3 -3
- package/dist/{knowledge-2fms70NN.cjs.map → knowledge-DL03nbSW.cjs.map} +1 -1
- package/dist/{logs-Deoh0l4I.cjs → logs-B0dcn5iB.cjs} +2 -2
- package/dist/{logs-Deoh0l4I.cjs.map → logs-B0dcn5iB.cjs.map} +1 -1
- package/dist/{logs-D_hKQuvQ.js → logs-CqgT7AOV.js} +2 -2
- package/dist/{logs-D_hKQuvQ.js.map → logs-CqgT7AOV.js.map} +1 -1
- package/dist/{mcp-oWjcmsQb.cjs → mcp-C060MyHc.cjs} +2 -2
- package/dist/{mcp-oWjcmsQb.cjs.map → mcp-C060MyHc.cjs.map} +1 -1
- package/dist/{mcp-CSRuYaWN.js → mcp-DXvFogeV.js} +2 -2
- package/dist/{mcp-CSRuYaWN.js.map → mcp-DXvFogeV.js.map} +1 -1
- package/dist/{memory-DS2tEXzG.js → memory-03B4pe3w.js} +130 -8
- package/dist/memory-03B4pe3w.js.map +1 -0
- package/dist/{memory-HiP-vUvS.cjs → memory-4Izw-l6v.cjs} +130 -8
- package/dist/memory-4Izw-l6v.cjs.map +1 -0
- package/dist/{observability-CJpRP8-U.cjs → observability-Cn4P60P4.cjs} +2 -2
- package/dist/{observability-CJpRP8-U.cjs.map → observability-Cn4P60P4.cjs.map} +1 -1
- package/dist/{observability-new-endpoints-JU-OS7aM.cjs → observability-new-endpoints-iRwQxqwY.cjs} +2 -2
- package/dist/{observability-new-endpoints-JU-OS7aM.cjs.map → observability-new-endpoints-iRwQxqwY.cjs.map} +1 -1
- package/dist/{observability-new-endpoints-BUYXgPTJ.js → observability-new-endpoints-vj6FaEcm.js} +2 -2
- package/dist/{observability-new-endpoints-BUYXgPTJ.js.map → observability-new-endpoints-vj6FaEcm.js.map} +1 -1
- package/dist/{observability-CCh5zFpG.js → observability-zr7LDCQG.js} +2 -2
- package/dist/{observability-CCh5zFpG.js.map → observability-zr7LDCQG.js.map} +1 -1
- package/dist/{plans-ByaTWRem.js → plans-CF7WEUSe.js} +3 -3
- package/dist/{plans-ByaTWRem.js.map → plans-CF7WEUSe.js.map} +1 -1
- package/dist/{plans-CE83TVnK.cjs → plans-DWm5yfiR.cjs} +3 -3
- package/dist/{plans-CE83TVnK.cjs.map → plans-DWm5yfiR.cjs.map} +1 -1
- package/dist/{probe-image-size-CIvA48eX.cjs → probe-image-size-D_JBY0_J.cjs} +2 -2
- package/dist/{probe-image-size-CIvA48eX.cjs.map → probe-image-size-D_JBY0_J.cjs.map} +1 -1
- package/dist/{probe-image-size-Bu_nsmG7.js → probe-image-size-DvGj_A8O.js} +2 -2
- package/dist/{probe-image-size-Bu_nsmG7.js.map → probe-image-size-DvGj_A8O.js.map} +1 -1
- package/dist/{responses-kWHiEbrl.js → responses-C1T0-Hw8.js} +6 -3
- package/dist/responses-C1T0-Hw8.js.map +1 -0
- package/dist/{responses-3F7qAgFF.cjs → responses-vS2YsMlq.cjs} +6 -3
- package/dist/responses-vS2YsMlq.cjs.map +1 -0
- package/dist/{routes-Bbmy72xa.cjs → routes-CKAh_D4W.cjs} +25 -25
- package/dist/{routes-Bbmy72xa.cjs.map → routes-CKAh_D4W.cjs.map} +1 -1
- package/dist/{routes-Buua4C30.js → routes-DTSmgxZh.js} +25 -25
- package/dist/{routes-Buua4C30.js.map → routes-DTSmgxZh.js.map} +1 -1
- package/dist/{schedules-BRwhbppl.cjs → schedules-0ceTSdBB.cjs} +3 -3
- package/dist/{schedules-BRwhbppl.cjs.map → schedules-0ceTSdBB.cjs.map} +1 -1
- package/dist/{schedules-Zct_0ZwE.js → schedules-D_VfFdAH.js} +3 -3
- package/dist/{schedules-Zct_0ZwE.js.map → schedules-D_VfFdAH.js.map} +1 -1
- package/dist/{scores-BuAYv1Gi.cjs → scores-Cjq0cSLS.cjs} +2 -2
- package/dist/{scores-BuAYv1Gi.cjs.map → scores-Cjq0cSLS.cjs.map} +1 -1
- package/dist/{scores-B6h7rEBJ.js → scores-qNLVpqlb.js} +2 -2
- package/dist/{scores-B6h7rEBJ.js.map → scores-qNLVpqlb.js.map} +1 -1
- package/dist/server/auth/index.cjs +2 -2
- package/dist/server/auth/index.js +2 -2
- package/dist/server/constants.d.ts +1 -1
- package/dist/server/constants.d.ts.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-controller.cjs +1 -1
- package/dist/server/handlers/agent-controller.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.map +1 -1
- package/dist/server/handlers/agents.js +1 -1
- package/dist/server/handlers/auth.cjs +2 -2
- package/dist/server/handlers/auth.js +2 -2
- package/dist/server/handlers/authorship.cjs +1 -1
- package/dist/server/handlers/authorship.js +1 -1
- package/dist/server/handlers/background-tasks.cjs +1 -1
- package/dist/server/handlers/background-tasks.js +1 -1
- package/dist/server/handlers/builder-registry.cjs +1 -1
- package/dist/server/handlers/builder-registry.js +1 -1
- package/dist/server/handlers/channels.cjs +1 -1
- package/dist/server/handlers/channels.js +1 -1
- package/dist/server/handlers/conversations.cjs +1 -1
- package/dist/server/handlers/conversations.js +1 -1
- package/dist/server/handlers/datasets.cjs +1 -1
- package/dist/server/handlers/datasets.js +1 -1
- package/dist/server/handlers/editor-builder.cjs +1 -1
- package/dist/server/handlers/editor-builder.js +1 -1
- package/dist/server/handlers/favorites-enrichment.cjs +1 -1
- package/dist/server/handlers/favorites-enrichment.js +1 -1
- package/dist/server/handlers/knowledge.cjs +1 -1
- package/dist/server/handlers/knowledge.js +1 -1
- package/dist/server/handlers/logs.cjs +1 -1
- package/dist/server/handlers/logs.js +1 -1
- package/dist/server/handlers/mcp-client-versions.cjs +1 -1
- package/dist/server/handlers/mcp-client-versions.js +1 -1
- package/dist/server/handlers/mcp.cjs +1 -1
- package/dist/server/handlers/mcp.js +1 -1
- package/dist/server/handlers/memory.cjs +1 -1
- package/dist/server/handlers/memory.d.ts.map +1 -1
- package/dist/server/handlers/memory.js +1 -1
- package/dist/server/handlers/observability-new-endpoints.cjs +1 -1
- package/dist/server/handlers/observability-new-endpoints.js +1 -1
- package/dist/server/handlers/observability-signal-context.cjs +1 -1
- package/dist/server/handlers/observability-signal-context.js +1 -1
- package/dist/server/handlers/observability.cjs +2 -2
- package/dist/server/handlers/observability.js +2 -2
- package/dist/server/handlers/plans.cjs +1 -1
- package/dist/server/handlers/plans.js +1 -1
- package/dist/server/handlers/prompt-block-versions.cjs +1 -1
- package/dist/server/handlers/prompt-block-versions.js +1 -1
- package/dist/server/handlers/responses.cjs +1 -1
- package/dist/server/handlers/responses.d.ts.map +1 -1
- package/dist/server/handlers/responses.js +1 -1
- package/dist/server/handlers/responses.storage.cjs +1 -1
- package/dist/server/handlers/responses.storage.js +1 -1
- package/dist/server/handlers/schedules.cjs +1 -1
- package/dist/server/handlers/schedules.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 +2 -2
- package/dist/server/handlers/stored-agents.js +2 -2
- package/dist/server/handlers/stored-mcp-clients.cjs +1 -1
- package/dist/server/handlers/stored-mcp-clients.js +1 -1
- package/dist/server/handlers/stored-prompt-blocks.cjs +1 -1
- package/dist/server/handlers/stored-prompt-blocks.js +1 -1
- package/dist/server/handlers/stored-scorers.cjs +1 -1
- package/dist/server/handlers/stored-scorers.js +1 -1
- package/dist/server/handlers/stored-skill-favorites.cjs +2 -2
- package/dist/server/handlers/stored-skill-favorites.js +2 -2
- package/dist/server/handlers/stored-skills.cjs +2 -2
- package/dist/server/handlers/stored-skills.js +2 -2
- package/dist/server/handlers/stored-workspaces.cjs +1 -1
- package/dist/server/handlers/stored-workspaces.js +1 -1
- package/dist/server/handlers/system.cjs +1 -1
- package/dist/server/handlers/system.js +1 -1
- package/dist/server/handlers/tool-providers.cjs +1 -1
- package/dist/server/handlers/tool-providers.js +1 -1
- package/dist/server/handlers/tools.cjs +1 -1
- package/dist/server/handlers/tools.js +1 -1
- package/dist/server/handlers/utils.cjs +1 -1
- package/dist/server/handlers/utils.js +1 -1
- package/dist/server/handlers/validate-agent-instructions.cjs +1 -1
- package/dist/server/handlers/validate-agent-instructions.js +1 -1
- package/dist/server/handlers/voice.cjs +1 -1
- package/dist/server/handlers/voice.js +1 -1
- package/dist/server/handlers/workflow-builder.cjs +1 -1
- package/dist/server/handlers/workflow-builder.d.ts.map +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 +14 -14
- package/dist/server/handlers.js +14 -14
- package/dist/server/schemas/agents.d.ts +1 -1
- package/dist/server/server-adapter/index.cjs +5 -5
- package/dist/server/server-adapter/index.js +5 -5
- package/dist/{server-adapter-u3k0aPAt.js → server-adapter-DXR2PRrb.js} +6 -6
- package/dist/{server-adapter-u3k0aPAt.js.map → server-adapter-DXR2PRrb.js.map} +1 -1
- package/dist/{server-adapter-DV15oGyX.cjs → server-adapter-SsP0jBGq.cjs} +6 -6
- package/dist/{server-adapter-DV15oGyX.cjs.map → server-adapter-SsP0jBGq.cjs.map} +1 -1
- package/dist/{tools-C_6yXAww.cjs → tools-Cv7TwNHv.cjs} +4 -4
- package/dist/{tools-C_6yXAww.cjs.map → tools-Cv7TwNHv.cjs.map} +1 -1
- package/dist/{tools-BuFpB7Lk.js → tools-DqgYXmdT.js} +4 -4
- package/dist/{tools-BuFpB7Lk.js.map → tools-DqgYXmdT.js.map} +1 -1
- package/dist/{utils-BfySxdfF.js → utils-C2VRtQjI.js} +2 -2
- package/dist/{utils-BfySxdfF.js.map → utils-C2VRtQjI.js.map} +1 -1
- package/dist/{utils-Dv1D6ob-.js → utils-CvYihOoy.js} +2 -2
- package/dist/{utils-Dv1D6ob-.js.map → utils-CvYihOoy.js.map} +1 -1
- package/dist/{utils-Dn_OA_6N.cjs → utils-DQJOBnMo.cjs} +2 -2
- package/dist/{utils-Dn_OA_6N.cjs.map → utils-DQJOBnMo.cjs.map} +1 -1
- package/dist/{utils-DFhesFfA.cjs → utils-j29NB2ZJ.cjs} +2 -2
- package/dist/{utils-DFhesFfA.cjs.map → utils-j29NB2ZJ.cjs.map} +1 -1
- package/dist/{voice-ByiFiTmK.cjs → voice-BUAV_TGD.cjs} +2 -2
- package/dist/{voice-ByiFiTmK.cjs.map → voice-BUAV_TGD.cjs.map} +1 -1
- package/dist/{voice-DOV0tU_V.js → voice-D-iJiiSN.js} +2 -2
- package/dist/{voice-DOV0tU_V.js.map → voice-D-iJiiSN.js.map} +1 -1
- package/dist/{workflow-builder-D2fwGsLw.js → workflow-builder-BET96Cr_.js} +5 -2
- package/dist/workflow-builder-BET96Cr_.js.map +1 -0
- package/dist/{workflow-builder-BPUjAdaC.cjs → workflow-builder-DpL3Nq6T.cjs} +5 -2
- package/dist/workflow-builder-DpL3Nq6T.cjs.map +1 -0
- package/dist/{workflows-9Q28sHTz.js → workflows-D3QrUMfm.js} +3 -3
- package/dist/{workflows-9Q28sHTz.js.map → workflows-D3QrUMfm.js.map} +1 -1
- package/dist/{workflows-DhmriYvN.cjs → workflows-gIKukZ1O.cjs} +3 -3
- package/dist/{workflows-DhmriYvN.cjs.map → workflows-gIKukZ1O.cjs.map} +1 -1
- package/package.json +10 -10
- package/dist/agents-2HNpgTlJ.cjs.map +0 -1
- package/dist/agents-CEgQ1Sj5.js.map +0 -1
- package/dist/constants-0xZU_h4R.js.map +0 -1
- package/dist/constants-1yTmKUZD.cjs.map +0 -1
- package/dist/dist-BgMRdBmR.cjs.map +0 -1
- package/dist/dist-BoE65ceB.js.map +0 -1
- package/dist/dist-DLdEfrDl.js +0 -1
- package/dist/memory-DS2tEXzG.js.map +0 -1
- package/dist/memory-HiP-vUvS.cjs.map +0 -1
- package/dist/responses-3F7qAgFF.cjs.map +0 -1
- package/dist/responses-kWHiEbrl.js.map +0 -1
- package/dist/workflow-builder-BPUjAdaC.cjs.map +0 -1
- package/dist/workflow-builder-D2fwGsLw.js.map +0 -1
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/@internal_core@0.1.4/dist/request-context/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/@internal_core@0.1.4/dist/routes/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/@internal_core@0.1.4/dist/types/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/checks.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/coerce.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/compat.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/deep-partial.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/errors.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/external.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/from-json-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/in-out.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/iso.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/parse.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/classic/schemas.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/api.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/checks.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/compile.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/core.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/doc.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/errors.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/json-schema-generator.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/json-schema-processors.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/json-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/memoizer.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/parse.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/regexes.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/registries.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/schemas.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/standard-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/to-json-schema.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/util.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/core/versions.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/index.d.cts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ar.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/az.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/be.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/bg.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/bn.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ca.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ckb.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/cs.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/da.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/de.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/el.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/en.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/eo.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/es.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/fa.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/fi.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/fr-CA.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/fr.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/gu.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/he.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/hi.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/hr.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/hu.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/hy.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/id.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/is.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/it.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ja.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ka.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/kh.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/km.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/kn.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ko.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/lt.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/mk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ms.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ne.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/nl.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/nn.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/no.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ota.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/pl.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ps.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/pt-BR.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/pt.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ro.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ru.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/sk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/sl.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/sv.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ta.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/tg.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/th.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/tk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/tr.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ua.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/uk.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/ur.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/uz.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/vi.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/yo.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/zh-CN.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/_types/zod@4.6.7/v4/locales/zh-TW.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/dist/routes/index.d.ts +0 -0
- /package/dist/_types/{@internal_voice@0.0.46 → @internal_voice@0.0.47}/package.json +0 -0
- /package/dist/_types/@mastra_schema-compat@1.4.0/dist/_types/{@internal_ai-sdk-v4@0.0.97 → @internal_ai-sdk-v4@0.0.98}/dist/index.d.ts +0 -0
- /package/dist/_types/@mastra_schema-compat@1.4.0/dist/_types/{@internal_ai-sdk-v5@0.0.97 → @internal_ai-sdk-v5@0.0.98}/dist/index.d.ts +0 -0
- /package/dist/_types/@mastra_schema-compat@1.4.0/dist/_types/{@internal_ai-v6@0.0.97 → @internal_ai-v6@0.0.98}/dist/index.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-0xZU_h4R.js","names":[],"sources":["../src/server/constants.ts"],"sourcesContent":["/**\n * Constants inlined from @mastra/core to avoid import compatibility\n * issues with older core versions that don't export them yet.\n *\n * - Reserved RequestContext keys are inlined from @mastra/core/request-context.\n * - Workspace tool constants are inlined from @mastra/core/workspace.\n */\n\nexport const MASTRA_RESOURCE_ID_KEY = 'mastra__resourceId';\n\nexport const MASTRA_THREAD_ID_KEY = 'mastra__threadId';\n\n/**\n * Agent scopes set by trusted middleware. Never accepted from a request body.\n */\nexport const MASTRA_SCOPES_KEY = 'mastra__scopes';\n\n/**\n * The Knowledge principals the signed-in caller holds, for the Studio Knowledge routes: a `string[]` of\n * principal addresses, or `'all'` for an admin who may read the whole instance. Set it in\n * `auth.authorize` (after authentication). With auth configured, a caller without it is refused.\n */\nexport const MASTRA_KNOWLEDGE_PRINCIPALS_KEY = 'mastra__knowledgePrincipals';\n\nexport const MASTRA_USER_KEY = 'mastra__user';\n\n/**\n * Authenticated user normalized to the stable `MastraUser` shape via the auth\n * provider's `toMastraUser()`. Surfaced to `DynamicArgument` callbacks as the\n * optional `user` argument. The raw provider-specific user stays at\n * {@link MASTRA_USER_KEY}.\n */\nexport const MASTRA_NORMALIZED_USER_KEY = 'mastra__normalizedUser';\n\nexport const MASTRA_USER_PERMISSIONS_KEY = 'mastra__userPermissions';\n\nexport const MASTRA_USER_ROLES_KEY = 'mastra__userRoles';\n\nexport const MASTRA_AUTH_TOKEN_KEY = 'mastra__authToken';\n\nexport const MASTRA_IS_STUDIO_KEY = 'mastra__isStudio';\n\n/**\n * Carries a delegating agent's memory into a delegated sub-agent run. Set only\n * by the delegation path inside a single process.\n */\nexport const MASTRA_INHERITED_MEMORY_KEY = 'mastra__inheritedMemory';\n\n/**\n * Tracks which auth mode was used for the current request.\n * Set to 'studio' when studio auth was used, 'server' when server auth was used.\n * Used to determine which RBAC/FGA provider to use for permission checks.\n */\nexport const MASTRA_AUTH_MODE_KEY = 'mastra__authMode';\n\nexport type MastraAuthMode = 'studio' | 'server';\n\nexport const MASTRA_CLIENT_TYPE_HEADER = 'x-mastra-client-type';\n\n/**\n * Browser-facing host, set by a trusted proxy whose own `X-Forwarded-Host` does\n * not survive the hop to the app. Railway's gateway, for example, overwrites\n * `X-Forwarded-Host` with its internal domain, so an edge in front of it has no\n * other way to tell the app which hostname the user actually typed.\n *\n * Read by `getPublicOrigin()` ahead of `X-Forwarded-Host`. Carries the same\n * trust assumption as the other forwarded headers: meaningful only behind a\n * proxy that sets it, and it must be stripped from untrusted client requests.\n */\nexport const MASTRA_PUBLIC_HOST_HEADER = 'x-mastra-public-host';\n\nexport const MASTRA_STUDIO_CLIENT_TYPE = 'studio';\n\n/**\n * RequestContext keys only trusted server code may set. Request bodies and query\n * params can never supply them.\n */\nexport const RESERVED_REQUEST_CONTEXT_KEYS = [\n MASTRA_RESOURCE_ID_KEY,\n MASTRA_THREAD_ID_KEY,\n // Agent scopes decide memory identity and what the agent acts as; only\n // server middleware may set them.\n MASTRA_SCOPES_KEY,\n MASTRA_KNOWLEDGE_PRINCIPALS_KEY,\n MASTRA_USER_KEY,\n MASTRA_NORMALIZED_USER_KEY,\n MASTRA_USER_PERMISSIONS_KEY,\n MASTRA_USER_ROLES_KEY,\n MASTRA_AUTH_TOKEN_KEY,\n MASTRA_IS_STUDIO_KEY,\n MASTRA_AUTH_MODE_KEY,\n // Delegation stores a live memory instance here. A body-supplied value would\n // be handed to the agent as its memory and throw on the first memory call.\n MASTRA_INHERITED_MEMORY_KEY,\n // Factory stores the authoritative per-caller OM settings result here before\n // model-driven memory processors run. Client input must not spoof that result.\n 'mastra__factoryMemorySettings',\n // Tenant scope must be established server-side, never self-asserted by a\n // client. The trusted-actor FGA gate keys off `organizationId`, so a\n // body-supplied value must not be merged into the request context.\n 'organizationId',\n] as const;\n\nconst RESERVED_CONTEXT_KEYS: ReadonlySet<string> = new Set(RESERVED_REQUEST_CONTEXT_KEYS);\n\nexport function isReservedRequestContextKey(key: string): boolean {\n return RESERVED_CONTEXT_KEYS.has(key);\n}\n\nexport function isStudioClientTypeHeader(value: string | undefined): boolean {\n return value?.toLowerCase() === MASTRA_STUDIO_CLIENT_TYPE;\n}\n\nexport const WORKSPACE_TOOLS_PREFIX = 'mastra_workspace' as const;\n\nexport const WORKSPACE_TOOLS = {\n FILESYSTEM: {\n READ_FILE: `${WORKSPACE_TOOLS_PREFIX}_read_file` as const,\n WRITE_FILE: `${WORKSPACE_TOOLS_PREFIX}_write_file` as const,\n EDIT_FILE: `${WORKSPACE_TOOLS_PREFIX}_edit_file` as const,\n LIST_FILES: `${WORKSPACE_TOOLS_PREFIX}_list_files` as const,\n DELETE: `${WORKSPACE_TOOLS_PREFIX}_delete` as const,\n FILE_STAT: `${WORKSPACE_TOOLS_PREFIX}_file_stat` as const,\n MKDIR: `${WORKSPACE_TOOLS_PREFIX}_mkdir` as const,\n GREP: `${WORKSPACE_TOOLS_PREFIX}_grep` as const,\n },\n SANDBOX: {\n EXECUTE_COMMAND: `${WORKSPACE_TOOLS_PREFIX}_execute_command` as const,\n },\n SEARCH: {\n SEARCH: `${WORKSPACE_TOOLS_PREFIX}_search` as const,\n INDEX: `${WORKSPACE_TOOLS_PREFIX}_index` as const,\n },\n} as const;\n\nexport type WorkspaceToolName =\n | (typeof WORKSPACE_TOOLS.FILESYSTEM)[keyof typeof WORKSPACE_TOOLS.FILESYSTEM]\n | (typeof WORKSPACE_TOOLS.SEARCH)[keyof typeof WORKSPACE_TOOLS.SEARCH]\n | (typeof WORKSPACE_TOOLS.SANDBOX)[keyof typeof WORKSPACE_TOOLS.SANDBOX];\n\n/**\n * A tool config value that may be a static boolean or a dynamic function.\n * Inlined from @mastra/core/workspace for compatibility.\n *\n * Uses `(...args: any[]) => any` for the function branch so it stays\n * assignable from all core context variants (ToolConfigContext,\n * ToolConfigWithArgsContext) without importing them.\n */\n\ntype DynamicToolConfigValue = boolean | ((...args: any[]) => any);\n\n/**\n * Configuration for a single workspace tool.\n */\nexport interface WorkspaceToolConfig {\n enabled?: DynamicToolConfigValue;\n requireApproval?: DynamicToolConfigValue;\n requireReadBeforeWrite?: DynamicToolConfigValue;\n}\n\n/**\n * Configuration for workspace tools.\n */\nexport type WorkspaceToolsConfig = {\n enabled?: DynamicToolConfigValue;\n requireApproval?: DynamicToolConfigValue;\n} & Partial<Record<WorkspaceToolName, WorkspaceToolConfig>>;\n\n/**\n * Safely resolve a dynamic config value (boolean or async function) to a boolean.\n * Falls back to `safeDefault` when no context is available or the function throws.\n */\nasync function resolveDynamicValue(\n value: DynamicToolConfigValue | undefined,\n context: { workspace: object; requestContext: Record<string, unknown> } | undefined,\n safeDefault: boolean,\n): Promise<boolean> {\n if (value === undefined) return safeDefault;\n if (typeof value === 'boolean') return value;\n if (!context) return safeDefault;\n try {\n return await value(context);\n } catch (error) {\n console.warn('[Workspace Tools] Dynamic config function threw, using safe default:', error);\n return safeDefault;\n }\n}\n\n/**\n * Resolve the effective configuration for a workspace tool.\n * Inlined from @mastra/core/workspace for compatibility.\n *\n * Dynamic function values are resolved by calling them with the provided\n * workspace and requestContext. If a function throws, safe defaults are used\n * (enabled → false, requireApproval → true, requireReadBeforeWrite → true).\n */\nexport async function resolveToolConfig(\n toolsConfig: WorkspaceToolsConfig | undefined,\n toolName: WorkspaceToolName,\n context?: { workspace: object; requestContext: Record<string, unknown> },\n): Promise<{ enabled: boolean; requireApproval: boolean; requireReadBeforeWrite?: boolean }> {\n let enabled: DynamicToolConfigValue = true;\n let requireApproval: DynamicToolConfigValue = false;\n let requireReadBeforeWrite: DynamicToolConfigValue | undefined;\n\n if (toolsConfig) {\n if (toolsConfig.enabled !== undefined) {\n enabled = toolsConfig.enabled;\n }\n if (toolsConfig.requireApproval !== undefined) {\n requireApproval = toolsConfig.requireApproval;\n }\n\n const perToolConfig = toolsConfig[toolName];\n if (perToolConfig) {\n if (perToolConfig.enabled !== undefined) {\n enabled = perToolConfig.enabled;\n }\n if (perToolConfig.requireApproval !== undefined) {\n requireApproval = perToolConfig.requireApproval;\n }\n if (perToolConfig.requireReadBeforeWrite !== undefined) {\n requireReadBeforeWrite = perToolConfig.requireReadBeforeWrite;\n }\n }\n }\n\n return {\n enabled: await resolveDynamicValue(enabled, context, false),\n requireApproval: await resolveDynamicValue(requireApproval, context, true),\n requireReadBeforeWrite:\n requireReadBeforeWrite !== undefined\n ? await resolveDynamicValue(requireReadBeforeWrite, context, true)\n : undefined,\n };\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,yBAAyB;AAEtC,MAAa,uBAAuB;;;;AAKpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,kCAAkC;AAE/C,MAAa,kBAAkB;;;;;;;AAQ/B,MAAa,6BAA6B;AAE1C,MAAa,8BAA8B;AAE3C,MAAa,wBAAwB;AAErC,MAAa,wBAAwB;AAErC,MAAa,uBAAuB;;;;;AAMpC,MAAa,8BAA8B;;;;;;AAO3C,MAAa,uBAAuB;AAIpC,MAAa,4BAA4B;;;;;;;;;;;AAYzC,MAAa,4BAA4B;AAEzC,MAAa,4BAA4B;;;;;AAMzC,MAAa,gCAAgC;CAC3C;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CAGA;CAIA;AACF;AAEA,MAAM,wBAA6C,IAAI,IAAI,6BAA6B;AAExF,SAAgB,4BAA4B,KAAsB;CAChE,OAAO,sBAAsB,IAAI,GAAG;AACtC;AAEA,SAAgB,yBAAyB,OAAoC;CAC3E,OAAO,OAAO,YAAY,MAAM;AAClC;AAEA,MAAa,yBAAyB;AAEtC,MAAa,kBAAkB;CAC7B,YAAY;EACV,WAAW,GAAG,uBAAuB;EACrC,YAAY,GAAG,uBAAuB;EACtC,WAAW,GAAG,uBAAuB;EACrC,YAAY,GAAG,uBAAuB;EACtC,QAAQ,GAAG,uBAAuB;EAClC,WAAW,GAAG,uBAAuB;EACrC,OAAO,GAAG,uBAAuB;EACjC,MAAM,GAAG,uBAAuB;CAClC;CACA,SAAS,EACP,iBAAiB,GAAG,uBAAuB,kBAC7C;CACA,QAAQ;EACN,QAAQ,GAAG,uBAAuB;EAClC,OAAO,GAAG,uBAAuB;CACnC;AACF;;;;;AAuCA,eAAe,oBACb,OACA,SACA,aACkB;CAClB,IAAI,UAAU,KAAA,GAAW,OAAO;CAChC,IAAI,OAAO,UAAU,WAAW,OAAO;CACvC,IAAI,CAAC,SAAS,OAAO;CACrB,IAAI;EACF,OAAO,MAAM,MAAM,OAAO;CAC5B,SAAS,OAAO;EACd,QAAQ,KAAK,wEAAwE,KAAK;EAC1F,OAAO;CACT;AACF;;;;;;;;;AAUA,eAAsB,kBACpB,aACA,UACA,SAC2F;CAC3F,IAAI,UAAkC;CACtC,IAAI,kBAA0C;CAC9C,IAAI;CAEJ,IAAI,aAAa;EACf,IAAI,YAAY,YAAY,KAAA,GAC1B,UAAU,YAAY;EAExB,IAAI,YAAY,oBAAoB,KAAA,GAClC,kBAAkB,YAAY;EAGhC,MAAM,gBAAgB,YAAY;EAClC,IAAI,eAAe;GACjB,IAAI,cAAc,YAAY,KAAA,GAC5B,UAAU,cAAc;GAE1B,IAAI,cAAc,oBAAoB,KAAA,GACpC,kBAAkB,cAAc;GAElC,IAAI,cAAc,2BAA2B,KAAA,GAC3C,yBAAyB,cAAc;EAE3C;CACF;CAEA,OAAO;EACL,SAAS,MAAM,oBAAoB,SAAS,SAAS,KAAK;EAC1D,iBAAiB,MAAM,oBAAoB,iBAAiB,SAAS,IAAI;EACzE,wBACE,2BAA2B,KAAA,IACvB,MAAM,oBAAoB,wBAAwB,SAAS,IAAI,IAC/D,KAAA;CACR;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants-1yTmKUZD.cjs","names":[],"sources":["../src/server/constants.ts"],"sourcesContent":["/**\n * Constants inlined from @mastra/core to avoid import compatibility\n * issues with older core versions that don't export them yet.\n *\n * - Reserved RequestContext keys are inlined from @mastra/core/request-context.\n * - Workspace tool constants are inlined from @mastra/core/workspace.\n */\n\nexport const MASTRA_RESOURCE_ID_KEY = 'mastra__resourceId';\n\nexport const MASTRA_THREAD_ID_KEY = 'mastra__threadId';\n\n/**\n * Agent scopes set by trusted middleware. Never accepted from a request body.\n */\nexport const MASTRA_SCOPES_KEY = 'mastra__scopes';\n\n/**\n * The Knowledge principals the signed-in caller holds, for the Studio Knowledge routes: a `string[]` of\n * principal addresses, or `'all'` for an admin who may read the whole instance. Set it in\n * `auth.authorize` (after authentication). With auth configured, a caller without it is refused.\n */\nexport const MASTRA_KNOWLEDGE_PRINCIPALS_KEY = 'mastra__knowledgePrincipals';\n\nexport const MASTRA_USER_KEY = 'mastra__user';\n\n/**\n * Authenticated user normalized to the stable `MastraUser` shape via the auth\n * provider's `toMastraUser()`. Surfaced to `DynamicArgument` callbacks as the\n * optional `user` argument. The raw provider-specific user stays at\n * {@link MASTRA_USER_KEY}.\n */\nexport const MASTRA_NORMALIZED_USER_KEY = 'mastra__normalizedUser';\n\nexport const MASTRA_USER_PERMISSIONS_KEY = 'mastra__userPermissions';\n\nexport const MASTRA_USER_ROLES_KEY = 'mastra__userRoles';\n\nexport const MASTRA_AUTH_TOKEN_KEY = 'mastra__authToken';\n\nexport const MASTRA_IS_STUDIO_KEY = 'mastra__isStudio';\n\n/**\n * Carries a delegating agent's memory into a delegated sub-agent run. Set only\n * by the delegation path inside a single process.\n */\nexport const MASTRA_INHERITED_MEMORY_KEY = 'mastra__inheritedMemory';\n\n/**\n * Tracks which auth mode was used for the current request.\n * Set to 'studio' when studio auth was used, 'server' when server auth was used.\n * Used to determine which RBAC/FGA provider to use for permission checks.\n */\nexport const MASTRA_AUTH_MODE_KEY = 'mastra__authMode';\n\nexport type MastraAuthMode = 'studio' | 'server';\n\nexport const MASTRA_CLIENT_TYPE_HEADER = 'x-mastra-client-type';\n\n/**\n * Browser-facing host, set by a trusted proxy whose own `X-Forwarded-Host` does\n * not survive the hop to the app. Railway's gateway, for example, overwrites\n * `X-Forwarded-Host` with its internal domain, so an edge in front of it has no\n * other way to tell the app which hostname the user actually typed.\n *\n * Read by `getPublicOrigin()` ahead of `X-Forwarded-Host`. Carries the same\n * trust assumption as the other forwarded headers: meaningful only behind a\n * proxy that sets it, and it must be stripped from untrusted client requests.\n */\nexport const MASTRA_PUBLIC_HOST_HEADER = 'x-mastra-public-host';\n\nexport const MASTRA_STUDIO_CLIENT_TYPE = 'studio';\n\n/**\n * RequestContext keys only trusted server code may set. Request bodies and query\n * params can never supply them.\n */\nexport const RESERVED_REQUEST_CONTEXT_KEYS = [\n MASTRA_RESOURCE_ID_KEY,\n MASTRA_THREAD_ID_KEY,\n // Agent scopes decide memory identity and what the agent acts as; only\n // server middleware may set them.\n MASTRA_SCOPES_KEY,\n MASTRA_KNOWLEDGE_PRINCIPALS_KEY,\n MASTRA_USER_KEY,\n MASTRA_NORMALIZED_USER_KEY,\n MASTRA_USER_PERMISSIONS_KEY,\n MASTRA_USER_ROLES_KEY,\n MASTRA_AUTH_TOKEN_KEY,\n MASTRA_IS_STUDIO_KEY,\n MASTRA_AUTH_MODE_KEY,\n // Delegation stores a live memory instance here. A body-supplied value would\n // be handed to the agent as its memory and throw on the first memory call.\n MASTRA_INHERITED_MEMORY_KEY,\n // Factory stores the authoritative per-caller OM settings result here before\n // model-driven memory processors run. Client input must not spoof that result.\n 'mastra__factoryMemorySettings',\n // Tenant scope must be established server-side, never self-asserted by a\n // client. The trusted-actor FGA gate keys off `organizationId`, so a\n // body-supplied value must not be merged into the request context.\n 'organizationId',\n] as const;\n\nconst RESERVED_CONTEXT_KEYS: ReadonlySet<string> = new Set(RESERVED_REQUEST_CONTEXT_KEYS);\n\nexport function isReservedRequestContextKey(key: string): boolean {\n return RESERVED_CONTEXT_KEYS.has(key);\n}\n\nexport function isStudioClientTypeHeader(value: string | undefined): boolean {\n return value?.toLowerCase() === MASTRA_STUDIO_CLIENT_TYPE;\n}\n\nexport const WORKSPACE_TOOLS_PREFIX = 'mastra_workspace' as const;\n\nexport const WORKSPACE_TOOLS = {\n FILESYSTEM: {\n READ_FILE: `${WORKSPACE_TOOLS_PREFIX}_read_file` as const,\n WRITE_FILE: `${WORKSPACE_TOOLS_PREFIX}_write_file` as const,\n EDIT_FILE: `${WORKSPACE_TOOLS_PREFIX}_edit_file` as const,\n LIST_FILES: `${WORKSPACE_TOOLS_PREFIX}_list_files` as const,\n DELETE: `${WORKSPACE_TOOLS_PREFIX}_delete` as const,\n FILE_STAT: `${WORKSPACE_TOOLS_PREFIX}_file_stat` as const,\n MKDIR: `${WORKSPACE_TOOLS_PREFIX}_mkdir` as const,\n GREP: `${WORKSPACE_TOOLS_PREFIX}_grep` as const,\n },\n SANDBOX: {\n EXECUTE_COMMAND: `${WORKSPACE_TOOLS_PREFIX}_execute_command` as const,\n },\n SEARCH: {\n SEARCH: `${WORKSPACE_TOOLS_PREFIX}_search` as const,\n INDEX: `${WORKSPACE_TOOLS_PREFIX}_index` as const,\n },\n} as const;\n\nexport type WorkspaceToolName =\n | (typeof WORKSPACE_TOOLS.FILESYSTEM)[keyof typeof WORKSPACE_TOOLS.FILESYSTEM]\n | (typeof WORKSPACE_TOOLS.SEARCH)[keyof typeof WORKSPACE_TOOLS.SEARCH]\n | (typeof WORKSPACE_TOOLS.SANDBOX)[keyof typeof WORKSPACE_TOOLS.SANDBOX];\n\n/**\n * A tool config value that may be a static boolean or a dynamic function.\n * Inlined from @mastra/core/workspace for compatibility.\n *\n * Uses `(...args: any[]) => any` for the function branch so it stays\n * assignable from all core context variants (ToolConfigContext,\n * ToolConfigWithArgsContext) without importing them.\n */\n\ntype DynamicToolConfigValue = boolean | ((...args: any[]) => any);\n\n/**\n * Configuration for a single workspace tool.\n */\nexport interface WorkspaceToolConfig {\n enabled?: DynamicToolConfigValue;\n requireApproval?: DynamicToolConfigValue;\n requireReadBeforeWrite?: DynamicToolConfigValue;\n}\n\n/**\n * Configuration for workspace tools.\n */\nexport type WorkspaceToolsConfig = {\n enabled?: DynamicToolConfigValue;\n requireApproval?: DynamicToolConfigValue;\n} & Partial<Record<WorkspaceToolName, WorkspaceToolConfig>>;\n\n/**\n * Safely resolve a dynamic config value (boolean or async function) to a boolean.\n * Falls back to `safeDefault` when no context is available or the function throws.\n */\nasync function resolveDynamicValue(\n value: DynamicToolConfigValue | undefined,\n context: { workspace: object; requestContext: Record<string, unknown> } | undefined,\n safeDefault: boolean,\n): Promise<boolean> {\n if (value === undefined) return safeDefault;\n if (typeof value === 'boolean') return value;\n if (!context) return safeDefault;\n try {\n return await value(context);\n } catch (error) {\n console.warn('[Workspace Tools] Dynamic config function threw, using safe default:', error);\n return safeDefault;\n }\n}\n\n/**\n * Resolve the effective configuration for a workspace tool.\n * Inlined from @mastra/core/workspace for compatibility.\n *\n * Dynamic function values are resolved by calling them with the provided\n * workspace and requestContext. If a function throws, safe defaults are used\n * (enabled → false, requireApproval → true, requireReadBeforeWrite → true).\n */\nexport async function resolveToolConfig(\n toolsConfig: WorkspaceToolsConfig | undefined,\n toolName: WorkspaceToolName,\n context?: { workspace: object; requestContext: Record<string, unknown> },\n): Promise<{ enabled: boolean; requireApproval: boolean; requireReadBeforeWrite?: boolean }> {\n let enabled: DynamicToolConfigValue = true;\n let requireApproval: DynamicToolConfigValue = false;\n let requireReadBeforeWrite: DynamicToolConfigValue | undefined;\n\n if (toolsConfig) {\n if (toolsConfig.enabled !== undefined) {\n enabled = toolsConfig.enabled;\n }\n if (toolsConfig.requireApproval !== undefined) {\n requireApproval = toolsConfig.requireApproval;\n }\n\n const perToolConfig = toolsConfig[toolName];\n if (perToolConfig) {\n if (perToolConfig.enabled !== undefined) {\n enabled = perToolConfig.enabled;\n }\n if (perToolConfig.requireApproval !== undefined) {\n requireApproval = perToolConfig.requireApproval;\n }\n if (perToolConfig.requireReadBeforeWrite !== undefined) {\n requireReadBeforeWrite = perToolConfig.requireReadBeforeWrite;\n }\n }\n }\n\n return {\n enabled: await resolveDynamicValue(enabled, context, false),\n requireApproval: await resolveDynamicValue(requireApproval, context, true),\n requireReadBeforeWrite:\n requireReadBeforeWrite !== undefined\n ? await resolveDynamicValue(requireReadBeforeWrite, context, true)\n : undefined,\n };\n}\n"],"mappings":";;;;;;;;AAQA,MAAa,yBAAyB;AAEtC,MAAa,uBAAuB;;;;AAKpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,kCAAkC;AAE/C,MAAa,kBAAkB;;;;;;;AAQ/B,MAAa,6BAA6B;AAE1C,MAAa,8BAA8B;AAE3C,MAAa,wBAAwB;AAErC,MAAa,wBAAwB;AAErC,MAAa,uBAAuB;;;;;AAMpC,MAAa,8BAA8B;;;;;;AAO3C,MAAa,uBAAuB;AAIpC,MAAa,4BAA4B;;;;;;;;;;;AAYzC,MAAa,4BAA4B;AAEzC,MAAa,4BAA4B;;;;;AAMzC,MAAa,gCAAgC;CAC3C;CACA;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAGA;CAGA;CAIA;AACF;AAEA,MAAM,wBAA6C,IAAI,IAAI,6BAA6B;AAExF,SAAgB,4BAA4B,KAAsB;CAChE,OAAO,sBAAsB,IAAI,GAAG;AACtC;AAEA,SAAgB,yBAAyB,OAAoC;CAC3E,OAAO,OAAO,YAAY,MAAM;AAClC;AAEA,MAAa,yBAAyB;AAEtC,MAAa,kBAAkB;CAC7B,YAAY;EACV,WAAW,GAAG,uBAAuB;EACrC,YAAY,GAAG,uBAAuB;EACtC,WAAW,GAAG,uBAAuB;EACrC,YAAY,GAAG,uBAAuB;EACtC,QAAQ,GAAG,uBAAuB;EAClC,WAAW,GAAG,uBAAuB;EACrC,OAAO,GAAG,uBAAuB;EACjC,MAAM,GAAG,uBAAuB;CAClC;CACA,SAAS,EACP,iBAAiB,GAAG,uBAAuB,kBAC7C;CACA,QAAQ;EACN,QAAQ,GAAG,uBAAuB;EAClC,OAAO,GAAG,uBAAuB;CACnC;AACF;;;;;AAuCA,eAAe,oBACb,OACA,SACA,aACkB;CAClB,IAAI,UAAU,KAAA,GAAW,OAAO;CAChC,IAAI,OAAO,UAAU,WAAW,OAAO;CACvC,IAAI,CAAC,SAAS,OAAO;CACrB,IAAI;EACF,OAAO,MAAM,MAAM,OAAO;CAC5B,SAAS,OAAO;EACd,QAAQ,KAAK,wEAAwE,KAAK;EAC1F,OAAO;CACT;AACF;;;;;;;;;AAUA,eAAsB,kBACpB,aACA,UACA,SAC2F;CAC3F,IAAI,UAAkC;CACtC,IAAI,kBAA0C;CAC9C,IAAI;CAEJ,IAAI,aAAa;EACf,IAAI,YAAY,YAAY,KAAA,GAC1B,UAAU,YAAY;EAExB,IAAI,YAAY,oBAAoB,KAAA,GAClC,kBAAkB,YAAY;EAGhC,MAAM,gBAAgB,YAAY;EAClC,IAAI,eAAe;GACjB,IAAI,cAAc,YAAY,KAAA,GAC5B,UAAU,cAAc;GAE1B,IAAI,cAAc,oBAAoB,KAAA,GACpC,kBAAkB,cAAc;GAElC,IAAI,cAAc,2BAA2B,KAAA,GAC3C,yBAAyB,cAAc;EAE3C;CACF;CAEA,OAAO;EACL,SAAS,MAAM,oBAAoB,SAAS,SAAS,KAAK;EAC1D,iBAAiB,MAAM,oBAAoB,iBAAiB,SAAS,IAAI;EACzE,wBACE,2BAA2B,KAAA,IACvB,MAAM,oBAAoB,wBAAwB,SAAS,IAAI,IAC/D,KAAA;CACR;AACF"}
|