mastra 1.20.3 → 1.21.0-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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # mastra
2
2
 
3
+ ## 1.21.0-alpha.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added contextual board actions that appear on hover or keyboard focus and remain visible on touch devices. Selecting the action opens an inline composer, and successful submissions add the work item to the selected column. ([#20337](https://github.com/mastra-ai/mastra/pull/20337))
8
+
9
+ For example, open **Work**, select **Create work item in Planning**, enter a title, and submit it to add the new card to **Planning** without leaving the board.
10
+
11
+ If Factory rules reject the move from Intake, the composer keeps the error visible and retries the same work item instead of creating a duplicate.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`3f472b4`](https://github.com/mastra-ai/mastra/commit/3f472b468892a1ff14ccb43cc0343b86f7d8fd7d), [`35b929b`](https://github.com/mastra-ai/mastra/commit/35b929b7abc3d20d85c7985880960ac2d04a6c86), [`9b3626a`](https://github.com/mastra-ai/mastra/commit/9b3626aeb1d16fcd34b0a8e94c114ddb80a3b240)]:
16
+ - @mastra/core@1.55.0-alpha.0
17
+ - @mastra/deployer@1.55.0-alpha.0
18
+
3
19
  ## 1.20.3
4
20
 
5
21
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra
3
3
  description: Documentation for mastra. Use when working with mastra APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "mastra"
6
- version: "1.20.3"
6
+ version: "1.21.0-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.20.3",
2
+ "version": "1.21.0-alpha.0",
3
3
  "package": "mastra",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -32,7 +32,7 @@ Comma-separated list of custom arguments to pass to the Node.js process, e.g. `-
32
32
 
33
33
  #### `--request-context-presets`
34
34
 
35
- Path to a JSON file containing named [request context](https://mastra.ai/docs/server/request-context) presets. When provided, a dropdown displays in Studio's request context editor, letting you quickly switch between preset configurations.
35
+ Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. When provided, a dropdown displays in Studio's request context editor, letting you quickly switch between preset configurations.
36
36
 
37
37
  ```bash
38
38
  mastra dev --request-context-presets ./presets.json
@@ -49,7 +49,7 @@ The file must be a JSON object where each key is a preset name and each value is
49
49
 
50
50
  ### Configs
51
51
 
52
- You can set certain environment variables to modify the behavior of `mastra dev`.
52
+ You can set environment variables to modify the behavior of `mastra dev`.
53
53
 
54
54
  #### Skip peer dependency check
55
55
 
@@ -121,7 +121,7 @@ Under the hood Mastra's Rollup server locates your Mastra entry file and bundles
121
121
 
122
122
  The output in `.mastra` can be deployed to any cloud server using [`mastra start`](#mastra-start).
123
123
 
124
- If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer in order to receive the correct output in `.mastra`.
124
+ If you're deploying to a [serverless platform](https://mastra.ai/docs/deployment/cloud-providers) you need to install the correct deployer to receive the correct output in `.mastra`.
125
125
 
126
126
  It accepts [common flags](#common-flags).
127
127
 
@@ -133,7 +133,7 @@ Bundle the Studio UI with the build.
133
133
 
134
134
  ### Configs
135
135
 
136
- You can set certain environment variables to modify the behavior of `mastra build`.
136
+ You can set environment variables to modify the behavior of `mastra build`.
137
137
 
138
138
  #### Skip peer dependency check
139
139
 
@@ -199,7 +199,7 @@ The API route prefix of the Mastra API server. Defaults to `/api`.
199
199
 
200
200
  #### `--request-context-presets`
201
201
 
202
- Path to a JSON file containing named [request context](https://mastra.ai/docs/server/request-context) presets. Works the same as the [`mastra dev` flag](#--request-context-presets).
202
+ Path to a JSON file containing [request context](https://mastra.ai/docs/server/request-context) presets. Works the same as the [`mastra dev` flag](#--request-context-presets).
203
203
 
204
204
  ```bash
205
205
  mastra studio --request-context-presets ./presets.json
@@ -207,7 +207,7 @@ mastra studio --request-context-presets ./presets.json
207
207
 
208
208
  ## `mastra deploy`
209
209
 
210
- 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.
210
+ Builds and deploys your project to the Mastra platform environment selected by `--env`. 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.
211
211
 
212
212
  Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
213
213
 
@@ -217,7 +217,7 @@ mastra deploy --env staging
217
217
  mastra deploy --env production --region eu
218
218
  ```
219
219
 
220
- 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.
220
+ The command runs `mastra build` and zips the output before uploading it to the selected environment. It then polls the deploy status while streaming build logs until the deploy reaches a terminal state.
221
221
 
222
222
  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.
223
223
 
@@ -294,9 +294,9 @@ mastra deploy --env staging --yes
294
294
 
295
295
  ## `mastra env`
296
296
 
297
- Manages environments on Mastra platform. Environments are named deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. The current organization is resolved from stored credentials.
297
+ Manages environments on Mastra platform. Environments are deploy targets (for example `production`, `staging`, `preview-42`) that belong to a project. The current organization is resolved from stored credentials.
298
298
 
299
- Every subcommand resolves its project from, in order: the `MASTRA_PROJECT_ID` environment variable, the `--project <name|slug|id>` flag, or the `.mastra-project.json` file written by [`mastra deploy`](#mastra-deploy) in the current directory. Run from your project directory and you never need to name the project.
299
+ Every subcommand resolves its project in a fixed order. It first checks the `MASTRA_PROJECT_ID` environment variable and the `--project <name|slug|id>` flag. It then reads the `.mastra-project.json` file written by [`mastra deploy`](#mastra-deploy) in the current directory. Run from your project directory and you never need to name the project.
300
300
 
301
301
  ### `mastra env list`
302
302
 
@@ -356,7 +356,7 @@ mastra env restart <env>
356
356
 
357
357
  ### `mastra env vars pull`
358
358
 
359
- Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set a deploy actually runs with: vars stored on the environment (for example, added in the dashboard's environment editor) plus project-level vars, with project values winning on conflict. Managed vars injected by attached databases are listed as comments (names only) since their values are platform-managed secrets.
359
+ Pulls an environment's env vars into a local env file (default: `.env`). The file contains the merged set used by a deploy. It combines vars stored on the environment (for example, added in the dashboard's environment editor) with project-level vars. Project values win on conflict. Managed vars injected by attached databases are listed as comments (names only) since their values are platform-managed secrets.
360
360
 
361
361
  ```bash
362
362
  mastra env vars pull
@@ -373,7 +373,7 @@ File to write. Defaults to `.env`.
373
373
 
374
374
  Manages databases attached to a project on Mastra platform. Databases are provisioned from a managed provider (for example Turso or Neon) and inject their connection env vars into deploys automatically.
375
375
 
376
- A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create` — pass an environment argument, or let the CLI pick or prompt for one. Pass `--shared` on create to attach a shared database instead. For other subcommands (`list`, `delete`, `keys`), pass the environment argument to work with environment-scoped databases and omit it for shared databases.
376
+ A database is either **environment-scoped** (its env vars only go to one environment) or **shared** (project-scoped: its env vars go to all environments). Environment-scoped is the default for `mastra env db create`: pass an environment argument, or let the CLI pick or prompt for one. Pass `--shared` on create to attach a shared database instead. For other subcommands (`list`, `delete`, `keys`), pass the environment argument to work with environment-scoped databases and omit it for shared databases.
377
377
 
378
378
  Creating and deleting databases requires the `admin` role in the organization.
379
379
 
@@ -392,7 +392,7 @@ Emit machine-readable JSON.
392
392
 
393
393
  ### `mastra env db create`
394
394
 
395
- Provisions a managed database, attaches it, and polls until it's ready. Provisioning errors are printed with the provider's error detail.
395
+ Provisions and attaches a managed database, then polls until it's ready. Provisioning errors are printed with the provider's error detail.
396
396
 
397
397
  By default the database is scoped to a single environment: pass an environment argument to pick it, or omit the argument to have the CLI pick for you. When the project has one environment, that environment is used. When it has several, the CLI prompts you to select one interactively; in non-interactive contexts (CI, `--json`) an environment argument is required. Pass `--shared` to attach a project-scoped database that's shared by every environment instead.
398
398
 
@@ -419,7 +419,7 @@ Provider region ID for shared databases. Ignored for environment-scoped database
419
419
 
420
420
  #### `--shared`
421
421
 
422
- Attach as a project-scoped database that's shared by every environment. Cannot be combined with an environment argument.
422
+ Attach as a project-scoped database that's shared by every environment. Can't be combined with an environment argument.
423
423
 
424
424
  #### `--no-wait`
425
425
 
@@ -475,7 +475,7 @@ Emit machine-readable JSON.
475
475
 
476
476
  ## `mastra studio deploy`
477
477
 
478
- > **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`.
478
+ > **Info:** `mastra studio deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which supports environments (`--env staging`, `--env production`) on a single project. New setups should use `mastra deploy`.
479
479
 
480
480
  Builds and deploys your project to Mastra platform. Requires authentication via [`mastra auth login`](#mastra-auth-login) or a `MASTRA_API_TOKEN` environment variable.
481
481
 
@@ -483,11 +483,11 @@ Builds and deploys your project to Mastra platform. Requires authentication via
483
483
  mastra studio deploy
484
484
  ```
485
485
 
486
- The command runs `mastra build`, zips the output, reads an env file from the project directory, and uploads everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
486
+ The command runs `mastra build` and zips the output. It reads an env file from the project directory before uploading everything to the platform. After uploading, it polls the deploy status and streams build logs until the deploy reaches a terminal state.
487
487
 
488
488
  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 Studio to an observability-only project converts it into a Studio project on the platform side.
489
489
 
490
- The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`); pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
490
+ The CLI requires at least one `.env` or `.env.*` file (excluding `.env.example`) in the project directory and fails with `Error: No env file found for deploy.` if none exists. When multiple env files are present, the CLI prompts you to pick one (defaulting to `.env.production`). Pass `--env-file` to choose explicitly. With `--yes` and multiple env files, you must pass `--env-file` or the deploy errors.
491
491
 
492
492
  Organization and project are resolved in order from: Environment variable flag, `.mastra-project.json` config file, current org from credentials, and lastly interactive prompt. On first deploy, the CLI saves the resolved IDs to `.mastra-project.json` so subsequent deploys skip the prompts.
493
493
 
@@ -581,7 +581,7 @@ Shows diagnosis results and suggested fixes for a failed Studio deploy.
581
581
  mastra studio deploy suggestions [deploy-id]
582
582
  ```
583
583
 
584
- If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
584
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
585
585
 
586
586
  ### `mastra studio projects`
587
587
 
@@ -593,7 +593,7 @@ Creates a new project through an interactive prompt. This command doesn't accept
593
593
 
594
594
  ## `mastra server deploy`
595
595
 
596
- > **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`.
596
+ > **Info:** `mastra server deploy` continues to work but is superseded by [`mastra deploy`](#mastra-deploy), which deploys a single project to multiple environments instead of separate Studio and Server commands. New setups should use `mastra deploy`.
597
597
 
598
598
  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.
599
599
 
@@ -611,7 +611,7 @@ Shows diagnosis results and suggested fixes for a failed Server deploy.
611
611
  mastra server deploy suggestions [deploy-id]
612
612
  ```
613
613
 
614
- If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. If the deploy is healthy, no suggestions are shown.
614
+ If you omit `deploy-id`, the command uses the latest deploy for the linked project. If a diagnosis doesn't exist yet, the command starts one and polls until results are ready. Suggestions appear only when the diagnosis finds a problem.
615
615
 
616
616
  ## `mastra server pause`
617
617
 
@@ -649,7 +649,7 @@ Same flags as [`mastra server pause`](#mastra-server-pause): **`--org`**, **`--p
649
649
  mastra server restart
650
650
  ```
651
651
 
652
- Fails if a deployment is still active for this project (running, building, deploying, etc.); that's a platform restriction so you can't restart while another deploy is in progress.
652
+ Fails if a deployment is still active for this project (running, building, deploying, etc.). That's a platform restriction so you can't restart while another deploy is in progress.
653
653
 
654
654
  ## `mastra server env`
655
655
 
@@ -892,7 +892,7 @@ Configure your code editor with Mastra's MCP server. Choose from: `"cursor" | "c
892
892
 
893
893
  #### `--observability`
894
894
 
895
- Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one, writes the required environment variables, and configures the observability exporters.
895
+ Enable Observability on the Mastra platform. The CLI prompts you to select an existing platform project or create a new one. It then writes the required environment variables and configures the observability exporters.
896
896
 
897
897
  #### `--no-observability`
898
898
 
@@ -906,7 +906,7 @@ Set the platform project name to use when Mastra Observability is enabled.
906
906
 
907
907
  Runs database migrations to update your storage schema. This command is useful when upgrading Mastra versions that include storage schema changes.
908
908
 
909
- The command bundles your project, connects to your configured storage backend, and executes any pending migrations. Currently supports:
909
+ The command bundles your project and connects to your configured storage backend. It then executes any pending migrations. Currently supports:
910
910
 
911
911
  - **Duplicate spans migration**: Removes duplicate `(traceId, spanId)` entries and adds a unique constraint to ensure data integrity.
912
912
  - **ClickHouse legacy-to-vNext span migration**: Copies historical spans from the legacy `mastra_ai_spans` table to the vNext `mastra_span_events` schema. Runs in batches to stay within memory limits. See the [ClickHouse storage reference](https://mastra.ai/reference/storage/clickhouse) for details.
@@ -1417,7 +1417,7 @@ curl -sS "https://observability.mastra.ai/api/observability/traces/<trace-id>/sp
1417
1417
 
1418
1418
  #### `mastra api score create`
1419
1419
 
1420
- Creates an observability score. The input uses the server score body shape; inspect it with `--schema`.
1420
+ Creates an observability score. The input uses the server score body shape. Inspect it with `--schema`.
1421
1421
 
1422
1422
  ```bash
1423
1423
  mastra api score create <input>
@@ -1 +1 @@
1
- import{J as t}from"./index-C7yi2LB9.js";import{c as p,d as i}from"./index-C7yi2LB9.js";function n(){const e={cache:new Map,regexConstructor:()=>{throw new Error("JavaScriptRawEngine: only support precompiled grammar")}};return{createScanner(r){return new t(r,e)},createString(r){return{content:r}}}}export{t as JavaScriptScanner,n as createJavaScriptRawEngine,p as createJavaScriptRegexEngine,i as defaultJavaScriptRegexConstructor};
1
+ import{J as t}from"./index-ByTtbmYh.js";import{c as p,d as i}from"./index-ByTtbmYh.js";function n(){const e={cache:new Map,regexConstructor:()=>{throw new Error("JavaScriptRawEngine: only support precompiled grammar")}};return{createScanner(r){return new t(r,e)},createString(r){return{content:r}}}}export{t as JavaScriptScanner,n as createJavaScriptRawEngine,p as createJavaScriptRegexEngine,i as defaultJavaScriptRegexConstructor};