Mastra 1.64.0
Last reviewed Sep 20, 2026
Prompt Details
Prompt Composition
4prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Node.js 24101 lines · 5.3K tokens
- TypeScript 746 lines · 1.5K tokens
- Mastra 1.64.0164 lines · 5.7K tokens
Total413 lines · 15.6K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 200
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 306
- 319
- 323
- 330
- 338
- 345
- 346
- 347
- 352
- 354
- 362
- 367
- 377
- 426
- 444
- 459
- 471
- 488
- 494
- 502
- 522
- 524
- 532
- 552
- 598
- 602
- 613
- 639
- 653
- 732
- 754
- 770
- 772
- 778
- 807
- 829
- 837
- 838
- 841
- 862
- 863
- 908
- 915
- 916
- 918
- 922
- 942
- 943
- 1004
- 1321
- 1333
- 1427
Prompt Preview
Apply the Node.js 24 and TypeScript 7 prompts first. These rules cover @mastra/core 1.64.0 and the companion packages documented at that release. Core requires Node.js >=22.13.0, accepts Zod ^3.25.0 or ^4.0.0, and provides both ESM and CommonJS exports. Companion packages have independent version numbers.
Server exposure and authentication
- Configure
server.authbefore anyone else can reach the process: with no auth provider every built-in route, custom route, and Studio session is public. - Update
server.auth.protectedandserver.auth.publicwhenever you set a customserver.apiPrefix, because the defaults only match/api/*and stop covering built-in routes. - Keep
SimpleAuthout of production: its tokens live in memory, never expire, are compared without cryptographic verification, and are also read fromX-Playground-Access. - Verify JWT signatures with
MastraJwtAuthorverifyJwks, and enforce expected algorithms, issuer, audience, and expiry in the authentication implementation;decodeTokenproves none of these. - Write
authorizeUseras a real policy decision instead of an existence check such as!!user.id, because it is the last gate before the route handler runs. - Review every custom route marked
requiresAuth: false, since Mastra skips both route auth and userserver.middlewareon those paths. - Configure an auth provider before splitting workers out, or
/api/workflows/:workflowId/runs/:runId/steps/executeand/api/workflows/eventsaccept any caller. - Give each worker type its own credential in
MASTRA_WORKER_AUTH_TOKEN, carry