@mastra/mcp-docs-server 1.2.5-alpha.1 → 1.2.5-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/.docs/docs/agent-builder/deploying.md +1 -1
  2. package/.docs/docs/agent-controller/overview.md +1 -1
  3. package/.docs/docs/agent-controller/session.md +1 -1
  4. package/.docs/docs/agents/overview.md +1 -1
  5. package/.docs/docs/agents/processors.md +1 -1
  6. package/.docs/docs/agents/supervisor-agents.md +3 -3
  7. package/.docs/docs/agents/using-tools.md +1 -1
  8. package/.docs/docs/{agents → long-running-agents}/background-tasks.md +2 -2
  9. package/.docs/docs/{agents → long-running-agents}/durable-agents.md +2 -2
  10. package/.docs/docs/{agents → long-running-agents}/goals.md +1 -1
  11. package/.docs/docs/{agents → long-running-agents}/heartbeats.md +5 -5
  12. package/.docs/docs/{agents → long-running-agents}/signal-providers.md +4 -4
  13. package/.docs/docs/memory/working-memory.md +1 -1
  14. package/.docs/docs/observability/config.md +1 -2
  15. package/.docs/docs/server/pubsub.md +2 -2
  16. package/.docs/docs/voice/overview.md +3 -3
  17. package/.docs/docs/voice/speech-to-speech.md +81 -1
  18. package/.docs/docs/voice/speech-to-text.md +19 -1
  19. package/.docs/docs/voice/text-to-speech.md +21 -1
  20. package/.docs/docs/workflows/control-flow.md +1 -1
  21. package/.docs/docs/workflows/error-handling.md +1 -1
  22. package/.docs/docs/workflows/human-in-the-loop.md +1 -1
  23. package/.docs/docs/workflows/overview.md +1 -1
  24. package/.docs/docs/workflows/snapshots.md +1 -1
  25. package/.docs/docs/workflows/suspend-and-resume.md +1 -1
  26. package/.docs/docs/workflows/time-travel.md +1 -1
  27. package/.docs/docs/workflows/workflow-state.md +1 -1
  28. package/.docs/guides/build-your-ui/copilotkit/channels.md +76 -0
  29. package/.docs/guides/build-your-ui/copilotkit/generative-ui.md +174 -0
  30. package/.docs/guides/build-your-ui/copilotkit/overview.md +411 -0
  31. package/.docs/guides/concepts/streaming.md +1 -1
  32. package/.docs/guides/deployment/vercel.md +1 -2
  33. package/.docs/guides/guide/signal-provider.md +5 -5
  34. package/.docs/models/environment-variables.md +1 -0
  35. package/.docs/models/index.md +1 -1
  36. package/.docs/models/providers/alibaba-cn.md +2 -1
  37. package/.docs/models/providers/friendli.md +1 -2
  38. package/.docs/models/providers/tencent-token-plan.md +7 -7
  39. package/.docs/models/providers/tencent-tokenhub.md +5 -4
  40. package/.docs/models/providers.md +1 -0
  41. package/.docs/reference/acp/acp-agent.md +5 -5
  42. package/.docs/reference/acp/create-acp-tool.md +5 -5
  43. package/.docs/reference/agent-controller/agent-controller-class.md +27 -27
  44. package/.docs/reference/agents/agent.md +34 -34
  45. package/.docs/reference/agents/channels.md +19 -19
  46. package/.docs/reference/agents/createSkill.md +2 -2
  47. package/.docs/reference/agents/durable-agent.md +22 -22
  48. package/.docs/reference/agents/generate.md +10 -10
  49. package/.docs/reference/agents/generateLegacy.md +12 -12
  50. package/.docs/reference/agents/getMetadata.md +1 -1
  51. package/.docs/reference/agents/getVoice.md +1 -1
  52. package/.docs/reference/agents/inngest-agent.md +9 -9
  53. package/.docs/reference/agents/network.md +1 -1
  54. package/.docs/reference/ai-sdk/chat-route.md +4 -4
  55. package/.docs/reference/ai-sdk/handle-chat-stream.md +6 -6
  56. package/.docs/reference/ai-sdk/handle-network-stream.md +3 -3
  57. package/.docs/reference/ai-sdk/handle-workflow-stream.md +1 -1
  58. package/.docs/reference/ai-sdk/network-route.md +4 -4
  59. package/.docs/reference/ai-sdk/to-ai-sdk-messages.md +1 -1
  60. package/.docs/reference/ai-sdk/to-ai-sdk-stream.md +1 -1
  61. package/.docs/reference/ai-sdk/with-mastra.md +2 -2
  62. package/.docs/reference/ai-sdk/workflow-route.md +2 -2
  63. package/.docs/reference/ai-sdk/workflow-snapshot-to-stream.md +1 -1
  64. package/.docs/reference/auth/google.md +10 -10
  65. package/.docs/reference/auth/okta.md +11 -11
  66. package/.docs/reference/auth/workos.md +3 -3
  67. package/.docs/reference/channels/slack-provider.md +15 -15
  68. package/.docs/reference/cli/mastra.md +145 -0
  69. package/.docs/reference/client-js/agents.md +9 -9
  70. package/.docs/reference/client-js/mastra-client.md +5 -5
  71. package/.docs/reference/client-js/responses.md +3 -3
  72. package/.docs/reference/configuration.md +1 -1
  73. package/.docs/reference/core/getAgentById.md +3 -3
  74. package/.docs/reference/core/getWorkflow.md +1 -1
  75. package/.docs/reference/core/listWorkflows.md +1 -1
  76. package/.docs/reference/core/mastra-class.md +3 -3
  77. package/.docs/reference/core/removeWorkspace.md +2 -2
  78. package/.docs/reference/datasets/compareExperiments.md +1 -1
  79. package/.docs/reference/datasets/getItemHistory.md +1 -1
  80. package/.docs/reference/datasets/list.md +5 -5
  81. package/.docs/reference/datasets/listExperimentResults.md +4 -4
  82. package/.docs/reference/datasets/listExperiments.md +4 -4
  83. package/.docs/reference/datasets/listItems.md +5 -5
  84. package/.docs/reference/datasets/listVersions.md +3 -3
  85. package/.docs/reference/datasets/startExperiment.md +8 -8
  86. package/.docs/reference/datasets/startExperimentAsync.md +1 -1
  87. package/.docs/reference/editor/agent-builder/agent-builder-options.md +4 -4
  88. package/.docs/reference/editor/agent-builder/builder-agent-defaults.md +7 -7
  89. package/.docs/reference/editor/agent-builder/builder-models.md +4 -4
  90. package/.docs/reference/editor/blob-store-provider.md +2 -2
  91. package/.docs/reference/editor/browser-provider.md +2 -2
  92. package/.docs/reference/editor/filesystem-provider.md +2 -2
  93. package/.docs/reference/editor/mastra-editor.md +2 -2
  94. package/.docs/reference/editor/processor-provider.md +4 -4
  95. package/.docs/reference/editor/sandbox-provider.md +2 -2
  96. package/.docs/reference/editor/storage-browser-ref.md +2 -2
  97. package/.docs/reference/editor/storage-workspace-ref.md +7 -7
  98. package/.docs/reference/evals/create-scorer.md +8 -8
  99. package/.docs/reference/evals/rubric.md +1 -1
  100. package/.docs/reference/evals/run-evals.md +7 -7
  101. package/.docs/reference/evals/trajectory-accuracy.md +1 -1
  102. package/.docs/reference/index.md +2 -2
  103. package/.docs/reference/logging/pino-logger.md +4 -4
  104. package/.docs/reference/memory/cloneThread.md +35 -4
  105. package/.docs/reference/memory/memory-class.md +5 -5
  106. package/.docs/reference/memory/observational-memory.md +43 -43
  107. package/.docs/reference/memory/recall.md +4 -4
  108. package/.docs/reference/memory/serialized-memory-config.md +6 -6
  109. package/.docs/reference/observability/tracing/configuration.md +4 -4
  110. package/.docs/reference/processors/language-detector.md +1 -1
  111. package/.docs/reference/processors/moderation-processor.md +1 -1
  112. package/.docs/reference/processors/pii-detector.md +1 -1
  113. package/.docs/reference/processors/processor-interface.md +20 -20
  114. package/.docs/reference/processors/prompt-injection-detector.md +1 -1
  115. package/.docs/reference/processors/response-cache.md +6 -6
  116. package/.docs/reference/processors/unicode-normalizer.md +1 -1
  117. package/.docs/reference/pubsub/base.md +7 -7
  118. package/.docs/reference/pubsub/caching-pubsub.md +1 -1
  119. package/.docs/reference/pubsub/event-emitter.md +2 -2
  120. package/.docs/reference/pubsub/google-cloud-pubsub.md +1 -1
  121. package/.docs/reference/pubsub/lease-provider.md +3 -3
  122. package/.docs/reference/pubsub/redis-streams.md +6 -6
  123. package/.docs/reference/pubsub/unix-socket-pubsub.md +1 -1
  124. package/.docs/reference/rag/chunk.md +2 -2
  125. package/.docs/reference/server/create-route.md +3 -3
  126. package/.docs/reference/server/express-adapter.md +4 -4
  127. package/.docs/reference/server/fastify-adapter.md +4 -4
  128. package/.docs/reference/server/hono-adapter.md +4 -4
  129. package/.docs/reference/server/koa-adapter.md +4 -4
  130. package/.docs/reference/server/mastra-server.md +1 -1
  131. package/.docs/reference/server/nestjs-adapter.md +3 -3
  132. package/.docs/reference/server/register-api-route.md +3 -3
  133. package/.docs/reference/signals/create-notification-inbox-tool.md +3 -3
  134. package/.docs/reference/signals/signal-provider.md +7 -7
  135. package/.docs/reference/signals/webhook-signal-provider.md +2 -2
  136. package/.docs/reference/storage/clickhouse.md +7 -7
  137. package/.docs/reference/storage/composite.md +2 -2
  138. package/.docs/reference/storage/duckdb.md +1 -1
  139. package/.docs/reference/storage/dynamodb.md +1 -1
  140. package/.docs/reference/storage/libsql.md +1 -1
  141. package/.docs/reference/storage/postgresql.md +2 -2
  142. package/.docs/reference/storage/redis.md +2 -2
  143. package/.docs/reference/storage/retention.md +5 -5
  144. package/.docs/reference/storage/spanner.md +6 -6
  145. package/.docs/reference/streaming/ChunkType.md +3 -3
  146. package/.docs/reference/streaming/agents/stream.md +14 -14
  147. package/.docs/reference/streaming/agents/streamLegacy.md +10 -10
  148. package/.docs/reference/streaming/agents/streamUntilIdle.md +1 -1
  149. package/.docs/reference/streaming/workflows/resumeStream.md +1 -1
  150. package/.docs/reference/templates/overview.md +1 -140
  151. package/.docs/reference/tools/brightdata.md +4 -4
  152. package/.docs/reference/tools/create-code-mode.md +5 -5
  153. package/.docs/reference/tools/create-tool.md +15 -15
  154. package/.docs/reference/tools/graph-rag-tool.md +1 -1
  155. package/.docs/reference/tools/mcp-client.md +2 -2
  156. package/.docs/reference/tools/mcp-server.md +12 -12
  157. package/.docs/reference/tools/perplexity.md +3 -3
  158. package/.docs/reference/tools/tavily.md +1 -1
  159. package/.docs/reference/tools/vector-query-tool.md +1 -1
  160. package/.docs/reference/vectors/chroma.md +1 -1
  161. package/.docs/reference/vectors/mongodb.md +1 -1
  162. package/.docs/reference/vectors/pg.md +1 -1
  163. package/.docs/reference/vectors/s3vectors.md +4 -4
  164. package/.docs/reference/voice/google-gemini-live.md +3 -3
  165. package/.docs/reference/voice/inworld-realtime.md +12 -12
  166. package/.docs/reference/voice/inworld.md +2 -2
  167. package/.docs/reference/voice/voice.on.md +1 -1
  168. package/.docs/reference/workflows/run-methods/resume.md +1 -1
  169. package/.docs/reference/workflows/run-methods/timeTravel.md +1 -1
  170. package/.docs/reference/workspace/agentcore-runtime-sandbox.md +4 -4
  171. package/.docs/reference/workspace/agentfs-filesystem.md +1 -1
  172. package/.docs/reference/workspace/apple-container-sandbox.md +5 -5
  173. package/.docs/reference/workspace/archil-filesystem.md +5 -5
  174. package/.docs/reference/workspace/blaxel-sandbox.md +1 -1
  175. package/.docs/reference/workspace/daytona-sandbox.md +1 -1
  176. package/.docs/reference/workspace/docker-sandbox.md +2 -2
  177. package/.docs/reference/workspace/e2b-sandbox.md +2 -2
  178. package/.docs/reference/workspace/files-sdk-filesystem.md +1 -1
  179. package/.docs/reference/workspace/filesystem.md +1 -1
  180. package/.docs/reference/workspace/local-filesystem.md +3 -3
  181. package/.docs/reference/workspace/local-sandbox.md +1 -1
  182. package/.docs/reference/workspace/mesa-filesystem.md +3 -3
  183. package/.docs/reference/workspace/modal-sandbox.md +1 -1
  184. package/.docs/reference/workspace/railway-sandbox.md +1 -1
  185. package/.docs/reference/workspace/s3-filesystem.md +4 -4
  186. package/.docs/reference/workspace/sandbox.md +1 -1
  187. package/.docs/reference/workspace/{vercel-microvm-sandbox.md → vercel-sandbox.md} +21 -15
  188. package/.docs/reference/workspace/{vercel.md → vercel-serverless.md} +21 -14
  189. package/.docs/reference/workspace/workspace-class.md +15 -15
  190. package/CHANGELOG.md +8 -0
  191. package/package.json +5 -5
  192. package/.docs/docs/agents/adding-voice.md +0 -383
  193. package/.docs/docs/community/contributing-templates.md +0 -5
  194. package/.docs/docs/community/discord.md +0 -11
  195. package/.docs/guides/build-your-ui/copilotkit.md +0 -291
  196. package/LICENSE.md +0 -30
  197. /package/.docs/docs/{community/licensing.md → license.md} +0 -0
  198. /package/.docs/docs/{agents → long-running-agents}/signals.md +0 -0
@@ -49,13 +49,13 @@ export const mastra = new Mastra({
49
49
 
50
50
  ## Parameters
51
51
 
52
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass \`'v5'\` for the existing default behavior. Pass \`'v6'\` when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
52
+ **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
53
53
 
54
- **path** (`string`): The route path (e.g., \`/network\` or \`/network/:agentId\`). Include \`:agentId\` for dynamic agent routing. (Default: `'/network/:agentId'`)
54
+ **path** (`string`): The route path (e.g., /network or /network/:agentId). Include :agentId for dynamic agent routing. (Default: `'/network/:agentId'`)
55
55
 
56
- **agent** (`string`): The ID of the routing agent to use for this network route. Required if the path doesn't include \`:agentId\`.
56
+ **agent** (`string`): The ID of the routing agent to use for this network route. Required if the path doesn't include :agentId.
57
57
 
58
- **agentVersion** (`{ versionId: string } | { status?: 'draft' | 'published' }`): Selects a specific agent version. Pass \`{ versionId: '\<id>' }\` to target an exact version, or \`{ status: 'draft' }\` / \`{ status: 'published' }\` to resolve by status. When the route is called, query parameters \`?versionId=\<id>\` or \`?status=draft|published\` take precedence over this static value. Requires the \[Editor]\(/docs/editor/overview) to be configured.
58
+ **agentVersion** (`{ versionId: string } | { status?: 'draft' | 'published' }`): Selects a specific agent version. Pass { versionId: '\<id>' } to target an exact version, or { status: 'draft' } / { status: 'published' } to resolve by status. When the route is called, query parameters ?versionId=\<id> or ?status=draft|published take precedence over this static value. Requires the Editor to be configured.
59
59
 
60
60
  **defaultOptions** (`AgentExecutionOptions`): Default options passed to agent execution. These can include instructions, memory configuration, maxSteps, and other execution settings.
61
61
 
@@ -44,7 +44,7 @@ export default function Chat() {
44
44
 
45
45
  **messages** (`MessageListInput`): Messages to convert. Can be a string, array of strings, a single message object, or an array of message objects in any supported format.
46
46
 
47
- **options.version** (`'v5' | 'v6'`): Selects the AI SDK message type to return. Omit it or pass \`'v5'\` for the existing default behavior. Pass \`'v6'\` when your app is typed against AI SDK v6 \`useChat()\` message types.
47
+ **options.version** (`'v5' | 'v6'`): Selects the AI SDK message type to return. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 useChat() message types.
48
48
 
49
49
  ## Returns
50
50
 
@@ -64,7 +64,7 @@ The first parameter is the Mastra stream to convert. It can be one of:
64
64
 
65
65
  The second parameter is an options object:
66
66
 
67
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass \`'v5'\` for the existing default behavior. Pass \`'v6'\` when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
67
+ **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
68
68
 
69
69
  **from** (`'agent' | 'network' | 'workflow'`): The type of Mastra stream being converted. (Default: `'agent'`)
70
70
 
@@ -32,7 +32,7 @@ const { text } = await generateText({
32
32
 
33
33
  ## Parameters
34
34
 
35
- **model** (`LanguageModelV2 | LanguageModelV3`): Any AI SDK v5 or v6 language model (e.g., \`openai('gpt-5.4')\`, \`anthropic('claude-opus-4-6')\`).
35
+ **model** (`LanguageModelV2 | LanguageModelV3`): Any AI SDK v5 or v6 language model (e.g., openai('gpt-5.4'), anthropic('claude-opus-4-6')).
36
36
 
37
37
  **options** (`WithMastraOptions`): Configuration object for processors and memory.
38
38
 
@@ -42,7 +42,7 @@ const { text } = await generateText({
42
42
 
43
43
  **options.memory** (`WithMastraMemoryOptions`): Memory configuration - enables automatic message history persistence.
44
44
 
45
- **options.memory.storage** (`MemoryStorage`): Memory storage domain for message persistence. Get it from a composite store using \`await storage.getStore('memory')\`.
45
+ **options.memory.storage** (`MemoryStorage`): Memory storage domain for message persistence. Get it from a composite store using await storage.getStore('memory').
46
46
 
47
47
  **options.memory.threadId** (`string`): Thread ID for conversation persistence.
48
48
 
@@ -51,9 +51,9 @@ export const mastra = new Mastra({
51
51
 
52
52
  ## Parameters
53
53
 
54
- **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass \`'v5'\` for the existing default behavior. Pass \`'v6'\` when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
54
+ **version** (`'v5' | 'v6'`): Selects the AI SDK stream contract to emit. Omit it or pass 'v5' for the existing default behavior. Pass 'v6' when your app is typed against AI SDK v6 response helpers. (Default: `'v5'`)
55
55
 
56
- **path** (`string`): The route path (e.g., \`/workflow\` or \`/workflow/:workflowId\`). Include \`:workflowId\` for dynamic workflow routing. (Default: `'/api/workflows/:workflowId/stream'`)
56
+ **path** (`string`): The route path (e.g., /workflow or /workflow/:workflowId). Include :workflowId for dynamic workflow routing. (Default: `'/api/workflows/:workflowId/stream'`)
57
57
 
58
58
  **workflow** (`string`): Fixed workflow ID when not using dynamic routing. (Default: `undefined`)
59
59
 
@@ -32,7 +32,7 @@ export async function GET(req: Request) {
32
32
 
33
33
  ## Parameters
34
34
 
35
- **workflowRun** (`WorkflowState`): The workflow run state object, as returned by \`getWorkflowRunById()\` or the workflow runs API. Contains \`runId\`, \`workflowName\`, \`status\`, and \`steps\`.
35
+ **workflowRun** (`WorkflowState`): The workflow run state object, as returned by getWorkflowRunById() or the workflow runs API. Contains runId, workflowName, status, and steps.
36
36
 
37
37
  ## Returns
38
38
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # MastraAuthGoogle & MastraRBACGoogle class
3
+ # MastraAuthGoogle and MastraRBACGoogle class
4
4
 
5
5
  ## MastraAuthGoogle class
6
6
 
@@ -36,9 +36,9 @@ export const mastra = new Mastra({
36
36
 
37
37
  **scopes** (`string[]`): OAuth scopes requested during the login flow. (Default: `['openid', 'profile', 'email']`)
38
38
 
39
- **allowedDomains** (`string | string[]`): Allowed Google Workspace hosted domains. Mastra validates these against the verified \`hd\` claim. (Default: `process.env.GOOGLE_ALLOWED_DOMAINS`)
39
+ **allowedDomains** (`string | string[]`): Allowed Google Workspace hosted domains. Mastra validates these against the verified hd claim. (Default: `process.env.GOOGLE_ALLOWED_DOMAINS`)
40
40
 
41
- **hostedDomain** (`string`): Hosted-domain login hint passed to Google as \`hd\`. This is a hint only and is not used for authorization. (Default: `process.env.GOOGLE_HOSTED_DOMAIN or the single allowed domain`)
41
+ **hostedDomain** (`string`): Hosted-domain login hint passed to Google as hd. This is a hint only and is not used for authorization. (Default: `process.env.GOOGLE_HOSTED_DOMAIN or the single allowed domain`)
42
42
 
43
43
  **session** (`GoogleSessionOptions`): Session cookie configuration.
44
44
 
@@ -48,7 +48,7 @@ export const mastra = new Mastra({
48
48
 
49
49
  **session.cookiePassword** (`string`): Password for encrypting session cookies. Must be at least 32 characters. If not set, an auto-generated value is used in development that does not survive restarts.
50
50
 
51
- **session.secureCookies** (`boolean`): Set the \`Secure\` flag on session cookies.
51
+ **session.secureCookies** (`boolean`): Set the Secure flag on session cookies.
52
52
 
53
53
  **name** (`string`): Custom name for the auth provider instance. (Default: `'google'`)
54
54
 
@@ -123,7 +123,7 @@ Returns: `Promise<GoogleUser | null>`
123
123
 
124
124
  The `GoogleUser` type extends the base `EEUser` interface with Google-specific fields:
125
125
 
126
- **id** (`string`): Mastra user ID. Uses the Google \`sub\` claim.
126
+ **id** (`string`): Mastra user ID. Uses the Google sub claim.
127
127
 
128
128
  **googleId** (`string`): Google Account subject identifier.
129
129
 
@@ -133,7 +133,7 @@ The `GoogleUser` type extends the base `EEUser` interface with Google-specific f
133
133
 
134
134
  **avatarUrl** (`string`): URL to the user's Google profile picture.
135
135
 
136
- **hostedDomain** (`string`): Google Workspace hosted domain from the verified \`hd\` claim.
136
+ **hostedDomain** (`string`): Google Workspace hosted domain from the verified hd claim.
137
137
 
138
138
  **expiresAt** (`Date`): Verified ID token expiration time, when available.
139
139
 
@@ -204,7 +204,7 @@ export const mastra = new Mastra({
204
204
 
205
205
  ### Constructor parameters
206
206
 
207
- **roleMapping** (`RoleMapping`): Maps Google Workspace group role IDs to arrays of Mastra permission strings. Use \`'\_default'\` to assign permissions to users who do not match any group. Supports wildcards like \`'\*'\` (full access) and \`'agents:\*'\` (all agent actions).
207
+ **roleMapping** (`RoleMapping`): Maps Google Workspace group role IDs to arrays of Mastra permission strings. Use '\_default' to assign permissions to users who do not match any group. Supports wildcards like '\*' (full access) and 'agents:\*' (all agent actions).
208
208
 
209
209
  **accessToken** (`string`): Pre-obtained Workspace Directory API access token.
210
210
 
@@ -214,7 +214,7 @@ export const mastra = new Mastra({
214
214
 
215
215
  **serviceAccount.clientEmail** (`string`): Google service account email.
216
216
 
217
- **serviceAccount.privateKey** (`string`): PEM-encoded private key. Escaped \`\n\` values from .env files are supported.
217
+ **serviceAccount.privateKey** (`string`): PEM-encoded private key. Escaped \n values from .env files are supported.
218
218
 
219
219
  **serviceAccount.privateKeyId** (`string`): Optional private key ID.
220
220
 
@@ -222,9 +222,9 @@ export const mastra = new Mastra({
222
222
 
223
223
  **serviceAccount.scopes** (`string[]`): OAuth scopes for the service account token.
224
224
 
225
- **getUserKey** (`(user: unknown) => string | undefined`): Extract the Directory API \`userKey\` from an authenticated user. Defaults to \`user.email\`.
225
+ **getUserKey** (`(user: unknown) => string | undefined`): Extract the Directory API userKey from an authenticated user. Defaults to user.email.
226
226
 
227
- **mapGroupToRoles** (`(group: GoogleWorkspaceGroup) => string[]`): Map a Google Workspace group to role IDs. Defaults to \`\[group.email]\`.
227
+ **mapGroupToRoles** (`(group: GoogleWorkspaceGroup) => string[]`): Map a Google Workspace group to role IDs. Defaults to \[group.email].
228
228
 
229
229
  **cache** (`PermissionCacheOptions`): Configure the LRU cache for group lookups.
230
230
 
@@ -1,6 +1,6 @@
1
1
  > Discover all available pages from the documentation index: https://mastra.ai/llms.txt
2
2
 
3
- # MastraAuthOkta & MastraRBACOkta class
3
+ # MastraAuthOkta and MastraRBACOkta class
4
4
 
5
5
  ## MastraAuthOkta class
6
6
 
@@ -28,7 +28,7 @@ export const mastra = new Mastra({
28
28
 
29
29
  ### Constructor parameters
30
30
 
31
- **domain** (`string`): Your Okta domain (e.g., \`dev-123456.okta.com\`). Used to construct the issuer URL and API endpoints. (Default: `process.env.OKTA_DOMAIN`)
31
+ **domain** (`string`): Your Okta domain (e.g., dev-123456.okta.com). Used to construct the issuer URL and API endpoints. (Default: `process.env.OKTA_DOMAIN`)
32
32
 
33
33
  **clientId** (`string`): The OAuth client ID from your Okta application. (Default: `process.env.OKTA_CLIENT_ID`)
34
34
 
@@ -40,7 +40,7 @@ export const mastra = new Mastra({
40
40
 
41
41
  **scopes** (`string[]`): OAuth scopes to request during the login flow. (Default: `['openid', 'profile', 'email', 'groups']`)
42
42
 
43
- **apiToken** (`string`): Okta API token for user lookups via the Users API. Required for \`getUser()\` to return user data by ID. (Default: `process.env.OKTA_API_TOKEN`)
43
+ **apiToken** (`string`): Okta API token for user lookups via the Users API. Required for getUser() to return user data by ID. (Default: `process.env.OKTA_API_TOKEN`)
44
44
 
45
45
  **session** (`OktaSessionOptions`): Session cookie configuration.
46
46
 
@@ -50,7 +50,7 @@ export const mastra = new Mastra({
50
50
 
51
51
  **session.cookiePassword** (`string`): Password for encrypting session cookies. Must be at least 32 characters. If not set, an auto-generated value is used that does not survive restarts.
52
52
 
53
- **session.secureCookies** (`boolean`): Set the \`Secure\` flag on session cookies.
53
+ **session.secureCookies** (`boolean`): Set the Secure flag on session cookies.
54
54
 
55
55
  **name** (`string`): Custom name for the auth provider instance. (Default: `'okta'`)
56
56
 
@@ -58,13 +58,13 @@ export const mastra = new Mastra({
58
58
 
59
59
  The following environment variables are automatically used when constructor options aren't provided:
60
60
 
61
- **OKTA\_DOMAIN** (`string`): Your Okta domain (e.g., \`dev-123456.okta.com\`). Found in your Okta admin console.
61
+ **OKTA\_DOMAIN** (`string`): Your Okta domain (e.g., dev-123456.okta.com). Found in your Okta admin console.
62
62
 
63
63
  **OKTA\_CLIENT\_ID** (`string`): The OAuth client ID from your Okta application.
64
64
 
65
65
  **OKTA\_CLIENT\_SECRET** (`string`): The OAuth client secret from your Okta application.
66
66
 
67
- **OKTA\_ISSUER** (`string`): Token issuer URL. Defaults to \`https\://{domain}/oauth2/default\` if not set.
67
+ **OKTA\_ISSUER** (`string`): Token issuer URL. Defaults to https\://{domain}/oauth2/default if not set.
68
68
 
69
69
  **OKTA\_REDIRECT\_URI** (`string`): OAuth redirect URI for the SSO callback.
70
70
 
@@ -85,9 +85,9 @@ After authentication, `authorizeUser` checks that the user has a valid `oktaId`.
85
85
 
86
86
  The `OktaUser` type extends the base `EEUser` interface with Okta-specific fields:
87
87
 
88
- **id** (`string`): User identifier (maps to the \`sub\` claim).
88
+ **id** (`string`): User identifier (maps to the sub claim).
89
89
 
90
- **oktaId** (`string`): Okta user ID (same as \`id\`).
90
+ **oktaId** (`string`): Okta user ID (same as id).
91
91
 
92
92
  **email** (`string`): User email address.
93
93
 
@@ -95,7 +95,7 @@ The `OktaUser` type extends the base `EEUser` interface with Okta-specific field
95
95
 
96
96
  **avatarUrl** (`string`): URL to the user's profile picture.
97
97
 
98
- **groups** (`string[]`): Okta groups the user belongs to, populated from the \`groups\` claim.
98
+ **groups** (`string[]`): Okta groups the user belongs to, populated from the groups claim.
99
99
 
100
100
  ## MastraRBACOkta class
101
101
 
@@ -149,13 +149,13 @@ export const mastra = new Mastra({
149
149
 
150
150
  ### Constructor parameters
151
151
 
152
- **roleMapping** (`RoleMapping`): Maps Okta group names to arrays of Mastra permission strings. Use \`'\_default'\` to assign permissions to users who do not match any group. Supports wildcards like \`'\*'\` (full access) and \`'agents:\*'\` (all agent actions).
152
+ **roleMapping** (`RoleMapping`): Maps Okta group names to arrays of Mastra permission strings. Use '\_default' to assign permissions to users who do not match any group. Supports wildcards like '\*' (full access) and 'agents:\*' (all agent actions).
153
153
 
154
154
  **domain** (`string`): Your Okta domain. Used to initialize the Okta management SDK. (Default: `process.env.OKTA_DOMAIN`)
155
155
 
156
156
  **apiToken** (`string`): Okta API token for the management SDK. Required to fetch user groups from the Okta API. (Default: `process.env.OKTA_API_TOKEN`)
157
157
 
158
- **getUserId** (`(user: unknown) => string | undefined`): Extract the Okta user ID from a user object. Use this when combining Okta RBAC with a different auth provider. If not provided, falls back to \`oktaId\` or \`id\` on the user object.
158
+ **getUserId** (`(user: unknown) => string | undefined`): Extract the Okta user ID from a user object. Use this when combining Okta RBAC with a different auth provider. If not provided, falls back to oktaId or id on the user object.
159
159
 
160
160
  **cache** (`PermissionCacheOptions`): Configure the LRU cache for group lookups.
161
161
 
@@ -32,11 +32,11 @@ export const mastra = new Mastra({
32
32
 
33
33
  **redirectUri** (`string`): OAuth redirect URI used by WorkOS AuthKit. Set this when you use the built-in WorkOS sign-in flow. (Default: `process.env.WORKOS_REDIRECT_URI`)
34
34
 
35
- **fetchMemberships** (`boolean`): Loads organization memberships during authentication. Set this to \`true\` when you use \`MastraFGAWorkos\` so FGA checks can resolve the correct organization membership ID. (Default: `false`)
35
+ **fetchMemberships** (`boolean`): Loads organization memberships during authentication. Set this to true when you use MastraFGAWorkos so FGA checks can resolve the correct organization membership ID. (Default: `false`)
36
36
 
37
- **trustJwtClaims** (`boolean`): Trusts verified bearer-token claims enough to construct a \`WorkOSUser\` even when \`workos.userManagement.getUser()\` does not apply. Use this for service-account or machine-to-machine tokens backed by a WorkOS custom JWT template. (Default: `false`)
37
+ **trustJwtClaims** (`boolean`): Trusts verified bearer-token claims enough to construct a WorkOSUser even when workos.userManagement.getUser() does not apply. Use this for service-account or machine-to-machine tokens backed by a WorkOS custom JWT template. (Default: `false`)
38
38
 
39
- **jwtClaims** (`{ userId?: string; workosId?: string; email?: string; name?: string; organizationId?: string; organizationMembershipId?: string }`): Maps verified bearer JWT claims into the authenticated \`WorkOSUser\`. Useful for custom JWT templates that include \`organizationMembershipId\` or other FGA-specific claims.
39
+ **jwtClaims** (`{ userId?: string; workosId?: string; email?: string; name?: string; organizationId?: string; organizationMembershipId?: string }`): Maps verified bearer JWT claims into the authenticated WorkOSUser. Useful for custom JWT templates that include organizationMembershipId or other FGA-specific claims.
40
40
 
41
41
  ## Environment variables
42
42
 
@@ -37,31 +37,31 @@ await slack.configure({
37
37
 
38
38
  `SlackProviderConfig` combines Slack-specific fields, Slack-adapter overrides (`toolDisplay`, `streaming`, `typingStatus`), and a curated subset of [`ChannelConfig`](https://mastra.ai/reference/agents/channels) options (such as `handlers`, `inlineMedia`, and `state`) forwarded to every connected agent. All fields are optional.
39
39
 
40
- **refreshToken** (`string`): Slack App Configuration refresh token, used for automatic token rotation. Single-use; each rotation returns a new pair. Can also be provided later via \`configure()\`. If omitted, the provider starts unconfigured and cannot create apps until \`configure()\` is called or tokens are loaded from storage. Generate it under "Your App Configuration Tokens" at api.slack.com/apps.
40
+ **refreshToken** (`string`): Slack App Configuration refresh token, used for automatic token rotation. Single-use; each rotation returns a new pair. Can also be provided later via configure(). If omitted, the provider starts unconfigured and cannot create apps until configure() is called or tokens are loaded from storage. Generate it under "Your App Configuration Tokens" at api.slack.com/apps.
41
41
 
42
- **token** (`string`): Slack App Configuration access token for programmatic app creation. Optional, because the provider rotates to a fresh token on startup using \`refreshToken\`.
42
+ **token** (`string`): Slack App Configuration access token for programmatic app creation. Optional, because the provider rotates to a fresh token on startup using refreshToken.
43
43
 
44
- **baseUrl** (`string`): Public base URL for webhook and OAuth callbacks. Required when calling \`connect()\` to create apps. Can also be set via \`setBaseUrl()\` or auto-detected from the Mastra server config. For local development, use a tunnel such as \`cloudflared\`.
44
+ **baseUrl** (`string`): Public base URL for webhook and OAuth callbacks. Required when calling connect() to create apps. Can also be set via setBaseUrl() or auto-detected from the Mastra server config. For local development, use a tunnel such as cloudflared.
45
45
 
46
- **encryptionKey** (`string`): Encryption key for sensitive stored data (client secret, signing secret, bot token). Use a 32+ character random string. Can be set via the \`MASTRA\_ENCRYPTION\_KEY\` env var. If omitted, secrets are stored in plaintext (not recommended for production).
46
+ **encryptionKey** (`string`): Encryption key for sensitive stored data (client secret, signing secret, bot token). Use a 32+ character random string. Can be set via the MASTRA\_ENCRYPTION\_KEY env var. If omitted, secrets are stored in plaintext (not recommended for production).
47
47
 
48
- **storage** (`ChannelsStorage`): Custom storage for installations. Defaults to Mastra's \`ChannelsStorage\` from the global storage. Throws if no persistent storage is available.
48
+ **storage** (`ChannelsStorage`): Custom storage for installations. Defaults to Mastra's ChannelsStorage from the global storage. Throws if no persistent storage is available.
49
49
 
50
50
  **redirectPath** (`string`): Path to redirect to after OAuth completion. (Default: `"/"`)
51
51
 
52
52
  **onInstall** (`(installation: SlackInstallation) => Promise<void>`): Called when a workspace successfully installs the app.
53
53
 
54
- **streaming** (`StreamingConfig | false`): Stream agent text deltas to Slack as they're generated. Pass \`{ updateIntervalMs }\` to customize the post-and-edit interval, or \`false\` to buffer text until step-finish. Disabling streaming restricts \`toolDisplay\` to static modes. (Default: `true`)
54
+ **streaming** (`StreamingConfig | false`): Stream agent text deltas to Slack as they're generated. Pass { updateIntervalMs } to customize the post-and-edit interval, or false to buffer text until step-finish. Disabling streaming restricts toolDisplay to static modes. (Default: `true`)
55
55
 
56
- **toolDisplay** (`ToolDisplay`): How tool calls are rendered in Slack: \`'cards'\`, \`'text'\`, \`'timeline'\`, \`'grouped'\`, \`'hidden'\`, or a function. \`'hidden'\` suppresses tool call/result rendering entirely. \`'timeline'\` and \`'grouped'\` require streaming. With \`streaming: false\`, only static modes are available and the default is \`'cards'\`. (Default: `'grouped'`)
56
+ **toolDisplay** (`ToolDisplay`): How tool calls are rendered in Slack: 'cards', 'text', 'timeline', 'grouped', 'hidden', or a function. 'hidden' suppresses tool call/result rendering entirely. 'timeline' and 'grouped' require streaming. With streaming: false, only static modes are available and the default is 'cards'. (Default: `'grouped'`)
57
57
 
58
- **typingStatus** (`boolean | TypingStatusFn`): Show a typing indicator while the agent works. Set \`false\` to disable, or pass a function to return custom status text per stream chunk (return \`undefined\` to fall back to the default for that chunk). (Default: `true`)
58
+ **typingStatus** (`boolean | TypingStatusFn`): Show a typing indicator while the agent works. Set false to disable, or pass a function to return custom status text per stream chunk (return undefined to fall back to the default for that chunk). (Default: `true`)
59
59
 
60
- **waitUntil** (`WaitUntilFn`): Returns a \`waitUntil\` for the current Slack webhook request. Required on serverless runtimes where Hono can't bridge the platform's \`ExecutionContext\` (Vercel, AWS Lambda). Without it, the invocation freezes after the 200 ack and kills the run mid-flight. Pass the bare \`waitUntil(promise)\` from your platform SDK (for example, \`@vercel/functions\`). Cloudflare Workers and Netlify users typically don't need this.
60
+ **waitUntil** (`WaitUntilFn`): Returns a waitUntil for the current Slack webhook request. Required on serverless runtimes where Hono can't bridge the platform's ExecutionContext (Vercel, AWS Lambda). Without it, the invocation freezes after the 200 ack and kills the run mid-flight. Pass the bare waitUntil(promise) from your platform SDK (for example, @vercel/functions). Cloudflare Workers and Netlify users typically don't need this.
61
61
 
62
- **resolveWaitUntil** (`WaitUntilResolver`): Resolve \`waitUntil\` from the request's Hono \`Context\` when the runtime exposes it through the request and core's default doesn't cover it. Resolution order: \`waitUntil\`\`resolveWaitUntil\` → core default.
62
+ **resolveWaitUntil** (`WaitUntilResolver`): Resolve waitUntil from the request's Hono Context when the runtime exposes it through the request and core's default doesn't cover it. Resolution order: waitUntil → resolveWaitUntil → core default.
63
63
 
64
- **handlers** (`ChannelHandlers`): Override built-in event handlers (\`onDirectMessage\`, \`onMention\`). Forwarded to \`AgentChannels\` for every agent connected via this provider.
64
+ **handlers** (`ChannelHandlers`): Override built-in event handlers (onDirectMessage, onMention). Forwarded to AgentChannels for every agent connected via this provider.
65
65
 
66
66
  **inlineMedia** (`ChannelConfig['inlineMedia']`): Which media types to send inline to the model.
67
67
 
@@ -69,13 +69,13 @@ await slack.configure({
69
69
 
70
70
  **threadContext** (`ChannelConfig['threadContext']`): Fetch recent thread messages from Slack when the agent joins mid-conversation.
71
71
 
72
- **tools** (`ChannelConfig['tools']`): Whether to include channel tools (\`add\_reaction\`, \`remove\_reaction\`).
72
+ **tools** (`ChannelConfig['tools']`): Whether to include channel tools (add\_reaction, remove\_reaction).
73
73
 
74
- **state** (`ChannelConfig['state']`): State adapter for message deduplication, locking, and subscriptions. Defaults to the \`MastraStateAdapter\` backed by the Mastra instance's configured storage, so subscriptions persist across restarts.
74
+ **state** (`ChannelConfig['state']`): State adapter for message deduplication, locking, and subscriptions. Defaults to the MastraStateAdapter backed by the Mastra instance's configured storage, so subscriptions persist across restarts.
75
75
 
76
76
  **chatOptions** (`ChannelConfig['chatOptions']`): Additional options passed directly to the Chat SDK.
77
77
 
78
- **logger** (`SlackAdapterConfig['logger']`): Logger forwarded to the underlying \`SlackAdapter\`. Defaults to the adapter's \`ConsoleLogger\`.
78
+ **logger** (`SlackAdapterConfig['logger']`): Logger forwarded to the underlying SlackAdapter. Defaults to the adapter's ConsoleLogger.
79
79
 
80
80
  ## Methods
81
81
 
@@ -113,7 +113,7 @@ interface ChannelConnectResult {
113
113
 
114
114
  **manifest** (`(defaults: SlackAppManifest) => SlackAppManifest`): Customize the Slack app manifest before it is sent to the Manifest API. Receives the default manifest and returns the final one. Use it for custom scopes, additional events, or interactivity settings.
115
115
 
116
- **redirectUrl** (`string`): URL to redirect to after successful OAuth completion. Defaults to the provider's \`redirectPath\` or \`/\`.
116
+ **redirectUrl** (`string`): URL to redirect to after successful OAuth completion. Defaults to the provider's redirectPath or /.
117
117
 
118
118
  #### `disconnect(agentId)`
119
119
 
@@ -193,8 +193,151 @@ Path to a JSON file containing named [request context](https://mastra.ai/docs/se
193
193
  mastra studio --request-context-presets ./presets.json
194
194
  ```
195
195
 
196
+ ## `mastra deploy`
197
+
198
+ Builds and deploys your project to a named environment on Mastra platform. This is the recommended command for all new deploys and replaces both [`mastra studio deploy`](#mastra-studio-deploy) and [`mastra server deploy`](#mastra-server-deploy), which continue to work but should no longer be used for new setups.
199
+
200
+ Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
201
+
202
+ ```bash
203
+ mastra deploy
204
+ mastra deploy --env staging
205
+ mastra deploy --env production --region eu
206
+ ```
207
+
208
+ The command runs `mastra build`, zips the output, uploads it to the selected environment, and then polls the deploy status while streaming build logs until the deploy reaches a terminal state.
209
+
210
+ Organization, project, and environment are resolved in order from: environment variable (`MASTRA_ORG_ID`, `MASTRA_PROJECT_ID`), CLI flag (`--org`, `--project`, `--env`), `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved org and project IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
211
+
212
+ If the project doesn't exist yet, the CLI creates it from the `package.json` `name` field after confirmation. If the target environment doesn't exist, the CLI creates it (defaulting to `type: staging` for anything other than `production`) after confirmation. Combined with `--yes`, this creates and deploys everything in one non-interactive command:
213
+
214
+ ```bash
215
+ mastra deploy --env staging --yes
216
+ ```
217
+
218
+ When `--env <name>` is set and `--env-file` is not, the CLI auto-selects `.env.<name>` from the project directory if present (for example `.env.staging`). The `<name>` value is validated against a strict allowlist before being interpolated into a file path.
219
+
220
+ ### Arguments
221
+
222
+ #### `[dir]`
223
+
224
+ Project directory. Defaults to the current directory.
225
+
226
+ ### Flags
227
+
228
+ #### `--env`
229
+
230
+ Target environment name. Defaults to `production`. Auto-selects `.env.<name>` from the project directory when `--env-file` is not set. If the environment doesn't exist, the CLI creates it after confirmation.
231
+
232
+ #### `--org`
233
+
234
+ Organization ID. Can also be set via the `MASTRA_ORG_ID` environment variable.
235
+
236
+ #### `--project`
237
+
238
+ Project ID, slug, or name. Can also be set via the `MASTRA_PROJECT_ID` environment variable. If no project matches, the value is used as the name of a new project to create on deploy.
239
+
240
+ #### `-y, --yes`
241
+
242
+ Auto-accept defaults without confirmation prompts, including creating projects and environments.
243
+
244
+ #### `-c, --config`
245
+
246
+ Path to the project config file. Defaults to `.mastra-project.json`.
247
+
248
+ #### `--env-file`
249
+
250
+ Path to the env file to bundle with the deploy (relative to the project directory). When set, disables the `.env.<name>` auto-selection based on `--env`.
251
+
252
+ ```bash
253
+ mastra deploy --env staging --env-file .env.staging.local
254
+ ```
255
+
256
+ #### `--region`
257
+
258
+ Region for a newly created environment (for example `eu`). Applied only when the CLI creates the environment.
259
+
260
+ #### `--skip-build`
261
+
262
+ Skip the build step and deploy the existing `.mastra/output` directory. The CLI warns if the existing build is stale relative to the current source.
263
+
264
+ #### `--skip-preflight`
265
+
266
+ Skip the pre-upload validation of the built output.
267
+
268
+ #### `--debug`
269
+
270
+ Enable debug logs during the build step.
271
+
272
+ ### CI/CD usage
273
+
274
+ Set `MASTRA_API_TOKEN`, `MASTRA_ORG_ID`, and `MASTRA_PROJECT_ID` as environment variables for headless deploys. Interactive prompts are skipped automatically when `MASTRA_API_TOKEN` is set. Combine with `--yes` to auto-accept environment creation.
275
+
276
+ ```bash
277
+ export MASTRA_API_TOKEN="..."
278
+ export MASTRA_ORG_ID="..."
279
+ export MASTRA_PROJECT_ID="..."
280
+ mastra deploy --env staging --yes
281
+ ```
282
+
283
+ ## `mastra env`
284
+
285
+ Manages environments on Mastra platform. Environments are named deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. Every subcommand takes a `<project>` argument (name, slug, or ID) and resolves the current organization from stored credentials.
286
+
287
+ ### `mastra env list`
288
+
289
+ Lists environments for a project.
290
+
291
+ ```bash
292
+ mastra env list <project>
293
+ ```
294
+
295
+ #### `--json`
296
+
297
+ Emit machine-readable JSON. Only non-sensitive metadata (id, name, slug, type, region, branch, and URLs) is included so the output is safe to log in CI.
298
+
299
+ ### `mastra env create`
300
+
301
+ Creates a new environment for a project.
302
+
303
+ ```bash
304
+ mastra env create <project> --name staging --type staging --region eu
305
+ ```
306
+
307
+ #### `-n, --name`
308
+
309
+ Environment name (required).
310
+
311
+ #### `-t, --type`
312
+
313
+ Environment type. One of `production`, `staging`, or `preview`. Defaults to `staging`.
314
+
315
+ #### `-r, --region`
316
+
317
+ Region for the environment (for example `eu`).
318
+
319
+ #### `--json`
320
+
321
+ Emit machine-readable JSON. Sensitive fields are omitted, as with [`mastra env list`](#mastra-env-list).
322
+
323
+ ### `mastra env delete`
324
+
325
+ Deletes an environment.
326
+
327
+ ```bash
328
+ mastra env delete <project> <env>
329
+ ```
330
+
331
+ `<env>` can be an environment name, slug, or ID. The CLI prompts for confirmation unless `--yes` is passed.
332
+
333
+ #### `-y, --yes`
334
+
335
+ Skip the confirmation prompt.
336
+
196
337
  ## `mastra studio deploy`
197
338
 
339
+ > **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports named environments (`--env staging`, `--env production`) on a single project. New setups should use `mastra deploy`.
340
+
198
341
  Builds and deploys your project to Mastra platform. Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
199
342
 
200
343
  ```bash
@@ -311,6 +454,8 @@ Creates a new project through an interactive prompt. This command doesn't accept
311
454
 
312
455
  ## `mastra server deploy`
313
456
 
457
+ > **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple named environments instead of separate Studio and Server commands. New setups should use `mastra deploy`.
458
+
314
459
  Builds and deploys your project to Server on Mastra platform. Works the same as [`mastra studio deploy`](#mastra-studio-deploy) with the same flags, arguments, and resolution logic.
315
460
 
316
461
  The deploy command auto-loads the project's `.env` file. If `MASTRA_PROJECT_ID` points to a project that was provisioned for Observability, the deploy links to that project instead of creating a new one. Deploying Server to an observability-only project converts it into a Server project on the platform side.
@@ -237,21 +237,21 @@ await agent.sendSignal({
237
237
 
238
238
  Returns `{ accepted: true, runId: string }`.
239
239
 
240
- **signal** (`{ type: 'user' | 'reactive' | 'notification' | string; tagName?: string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata }`): Lower-level signal payload. Use \`type\` for the semantic signal category and \`tagName\` for the XML tag shown to the model. \`providerOptions\` is attached to the resulting prompt turn and persisted on the stored signal message.
240
+ **signal** (`{ type: 'user' | 'reactive' | 'notification' | string; tagName?: string; contents: string | Array<TextPart | FilePart>; attributes?: Record<string, JSONValue>; metadata?: Record<string, unknown>; providerOptions?: ProviderMetadata }`): Lower-level signal payload. Use type for the semantic signal category and tagName for the XML tag shown to the model. providerOptions is attached to the resulting prompt turn and persisted on the stored signal message.
241
241
 
242
242
  **runId** (`string`): Run ID to target directly.
243
243
 
244
- **resourceId** (`string`): Resource ID for the memory thread. Use with \`threadId\` for thread-targeted signals.
244
+ **resourceId** (`string`): Resource ID for the memory thread. Use with threadId for thread-targeted signals.
245
245
 
246
- **threadId** (`string`): Thread ID to target. Use with \`resourceId\` for thread-targeted signals.
246
+ **threadId** (`string`): Thread ID to target. Use with resourceId for thread-targeted signals.
247
247
 
248
- **ifActive.behavior** (`'deliver' | 'persist' | 'discard'`): Controls what happens when the target thread is active. Defaults to \`deliver\`.
248
+ **ifActive.behavior** (`'deliver' | 'persist' | 'discard'`): Controls what happens when the target thread is active. Defaults to deliver.
249
249
 
250
250
  **ifActive.attributes** (`Record<string, string | number | boolean>`): Attributes merged into the signal when Mastra accepts it while the target thread is active.
251
251
 
252
- **ifIdle.behavior** (`'wake' | 'persist' | 'discard'`): Controls what happens when the target thread is idle. Defaults to \`wake\`.
252
+ **ifIdle.behavior** (`'wake' | 'persist' | 'discard'`): Controls what happens when the target thread is idle. Defaults to wake.
253
253
 
254
- **ifIdle.streamOptions** (`Omit<AgentExecutionOptions, 'messages'>`): Options for the stream that starts when \`ifIdle.behavior\` is \`wake\`.
254
+ **ifIdle.streamOptions** (`Omit<AgentExecutionOptions, 'messages'>`): Options for the stream that starts when ifIdle.behavior is wake.
255
255
 
256
256
  **ifIdle.attributes** (`Record<string, string | number | boolean>`): Attributes merged into the signal when Mastra accepts it while the target thread is idle.
257
257
 
@@ -281,11 +281,11 @@ await subscription.processDataStream({
281
281
 
282
282
  **threadId** (`string`): Thread ID to subscribe to.
283
283
 
284
- **processDataStream().reconnect** (`boolean | { maxRetries?: number; delayMs?: number }`): Reconnects the subscription stream after it closes or a reconnect request fails. \`true\` retries indefinitely with a one-second delay.
284
+ **processDataStream().reconnect** (`boolean | { maxRetries?: number; delayMs?: number }`): Reconnects the subscription stream after it closes or a reconnect request fails. true retries indefinitely with a one-second delay.
285
285
 
286
286
  ### `streamUntilIdle()`
287
287
 
288
- Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `stream()`.
288
+ Stream a response and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. The server re-enters the agentic loop on each task completion so the LLM can react to results in the same call. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `stream()`.
289
289
 
290
290
  ```typescript
291
291
  const response = await agent.streamUntilIdle('Research solana for me', {
@@ -307,7 +307,7 @@ response.processDataStream({
307
307
 
308
308
  ### `resumeStreamUntilIdle()`
309
309
 
310
- Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `resumeStream()`:
310
+ Resume a suspended agent stream with custom data and keep the stream open until every [background task](https://mastra.ai/docs/long-running-agents/background-tasks) dispatched during the run completes. Use this to continue execution after a suspension point, such as a workflow suspend within an agent. Requires background tasks to be [enabled on the Mastra instance](https://mastra.ai/reference/configuration) and a memory thread; otherwise the call falls through to a plain `resumeStream()`:
311
311
 
312
312
  ```typescript
313
313
  const response = await agent.resumeStreamUntilIdle(
@@ -57,7 +57,7 @@ You can also pass `requestContext` as a `Record<string, any>`.
57
57
 
58
58
  **getAgent(agentId)** (`Agent`): Retrieves a specific agent instance by ID.
59
59
 
60
- **listMemoryThreads(params)** (`Promise<StorageThreadType[]>`): Retrieves memory threads for the specified resource and agent. Requires a \`resourceId\` and an \`agentId\`.
60
+ **listMemoryThreads(params)** (`Promise<StorageThreadType[]>`): Retrieves memory threads for the specified resource and agent. Requires a resourceId and an agentId.
61
61
 
62
62
  **createMemoryThread(params)** (`Promise<MemoryThread>`): Creates a new memory thread with the given parameters.
63
63
 
@@ -75,13 +75,13 @@ You can also pass `requestContext` as a `Record<string, any>`.
75
75
 
76
76
  **getWorkflow(workflowId)** (`Workflow`): Retrieves a specific workflow instance by ID.
77
77
 
78
- **getAgentBuilderActions()** (`Promise<Record<string, WorkflowInfo>>`): Returns all available Agent Builder actions. See \[Agent Builder API]\(/reference/client-js/agent-builder).
78
+ **getAgentBuilderActions()** (`Promise<Record<string, WorkflowInfo>>`): Returns all available Agent Builder actions. See Agent Builder API.
79
79
 
80
- **getAgentBuilderAction(actionId)** (`AgentBuilder`): Retrieves an Agent Builder action by ID. See \[Agent Builder API]\(/reference/client-js/agent-builder).
80
+ **getAgentBuilderAction(actionId)** (`AgentBuilder`): Retrieves an Agent Builder action by ID. See Agent Builder API.
81
81
 
82
- **responses** (`Responses`): Provides OpenAI-style Responses API helpers with \`create()\`, \`retrieve()\`, \`stream()\`, and \`delete()\`.
82
+ **responses** (`Responses`): Provides OpenAI-style Responses API helpers with create(), retrieve(), stream(), and delete().
83
83
 
84
- **conversations** (`Conversations`): Provides conversation helpers with \`create()\`, \`retrieve()\`, \`delete()\`, and \`items.list()\`.
84
+ **conversations** (`Conversations`): Provides conversation helpers with create(), retrieve(), delete(), and items.list().
85
85
 
86
86
  **getVector(vectorName)** (`MastraVector`): Returns a vector store instance by name.
87
87
 
@@ -196,15 +196,15 @@ The returned response object includes:
196
196
 
197
197
  ## Parameters
198
198
 
199
- **agent\_id** (`string`): Required on initial requests. Selects the Mastra agent that executes the request. Stored follow-up turns can omit it when continuing with \`previous\_response\_id\`.
199
+ **agent\_id** (`string`): Required on initial requests. Selects the Mastra agent that executes the request. Stored follow-up turns can omit it when continuing with previous\_response\_id.
200
200
 
201
- **model** (`string`): Optional model override for this request, such as \`openai/gpt-5\`. If omitted, Mastra uses the model configured on the selected agent.
201
+ **model** (`string`): Optional model override for this request, such as openai/gpt-5. If omitted, Mastra uses the model configured on the selected agent.
202
202
 
203
203
  **input** (`string | Array<{ role: 'system' | 'developer' | 'user' | 'assistant'; content: string | Array<{ type: 'input_text' | 'text' | 'output_text'; text: string }> }>`): Required. Input text or message array for the response.
204
204
 
205
205
  **instructions** (`string`): Optional instruction override for this request.
206
206
 
207
- **text** (`{ format: { type: 'json_object' } | { type: 'json_schema'; name: string; schema: Record<string, unknown>; description?: string; strict?: boolean } }`): Optional text output format. Use \`json\_object\` for JSON mode or \`json\_schema\` for schema-constrained structured output.
207
+ **text** (`{ format: { type: 'json_object' } | { type: 'json_schema'; name: string; schema: Record<string, unknown>; description?: string; strict?: boolean } }`): Optional text output format. Use json\_object for JSON mode or json\_schema for schema-constrained structured output.
208
208
 
209
209
  **providerOptions** (`Record<string, Record<string, unknown> | undefined>`): Optional provider-specific options passed through to the underlying model call.
210
210
 
@@ -44,7 +44,7 @@ export const mastra = new Mastra({
44
44
 
45
45
  Enables and configures the background task manager. When enabled, agents can dispatch long-running tool calls (including subagent invocations) to run asynchronously while the agentic loop continues. Tasks are persisted, so a configured `storage` backend is required.
46
46
 
47
- Visit the [Background tasks documentation](https://mastra.ai/docs/agents/background-tasks) to learn more.
47
+ Visit the [Background tasks documentation](https://mastra.ai/docs/long-running-agents/background-tasks) to learn more.
48
48
 
49
49
  ```typescript
50
50
  import { Mastra } from '@mastra/core'