@mastra/express 1.5.8-alpha.6 → 1.5.8-alpha.8

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 (2) hide show
  1. package/README.md +7 -40
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -5,7 +5,7 @@ Express server adapter for Mastra, enabling you to run Mastra with the [Express]
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @mastra/express express
8
+ npm install @mastra/express
9
9
  ```
10
10
 
11
11
  ## Usage
@@ -25,47 +25,14 @@ app.listen(3000, () => {
25
25
  });
26
26
  ```
27
27
 
28
- ## Adding Custom Routes
28
+ ## Documentation
29
29
 
30
- Add routes directly to the Express app with access to Mastra context:
30
+ - [Express adapter reference](https://mastra.ai/reference/server/express-adapter)
31
31
 
32
- ```typescript
33
- // Routes added after init() have access to Mastra context
34
- app.get('/health', (req, res) => {
35
- const mastraInstance = res.locals.mastra;
36
- const agents = Object.keys(mastraInstance.listAgents());
37
- res.json({ status: 'ok', agents });
38
- });
39
- ```
40
-
41
- ## Configuration Options
42
-
43
- ```typescript
44
- const server = new MastraServer({
45
- app,
46
- mastra,
47
- prefix: '/api/v2', // Route prefix
48
- openapiPath: '/openapi.json', // OpenAPI spec endpoint
49
- bodyLimitOptions: {
50
- maxSize: 10 * 1024 * 1024, // 10MB
51
- onError: err => ({ error: 'Payload too large' }),
52
- },
53
- streamOptions: { redact: true }, // Redact sensitive data from streams
54
- });
55
- ```
56
-
57
- ## Context Variables
58
-
59
- Access these in route handlers via `res.locals`:
32
+ ## Changelog
60
33
 
61
- | Key | Description |
62
- | ---------------- | --------------------------- |
63
- | `mastra` | Mastra instance |
64
- | `requestContext` | Request context map |
65
- | `abortSignal` | Request cancellation signal |
66
- | `tools` | Available tools |
34
+ See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/server-adapters/express/CHANGELOG.md) for version history and release notes.
67
35
 
68
- ## Related Links
36
+ ## Support
69
37
 
70
- - [Server Adapters Documentation](https://mastra.ai/docs/server/server-adapters)
71
- - [Express Documentation](https://expressjs.com)
38
+ We have an [open community Discord](https://discord.gg/mastra-ai). Come and say hello and let us know if you have any questions or need any help getting things running.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/express",
3
- "version": "1.5.8-alpha.6",
3
+ "version": "1.5.8-alpha.8",
4
4
  "description": "Mastra Express adapter for the server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
23
  "@fastify/busboy": "^3.2.0",
24
- "@mastra/server": "1.64.0-alpha.6"
24
+ "@mastra/server": "1.64.0-alpha.8"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@ai-sdk/openai": "^2.0.115",
@@ -39,14 +39,14 @@
39
39
  "zod": "^4.4.3",
40
40
  "@internal/lint": "0.0.129",
41
41
  "@internal/server-adapter-test-utils": "0.0.29",
42
- "@internal/types-builder": "0.0.104",
43
42
  "@internal/storage-test-utils": "0.0.125",
44
- "@mastra/ai-sdk": "1.10.1-alpha.0",
45
- "@mastra/evals": "1.10.0-alpha.0",
46
- "@mastra/core": "1.64.0-alpha.6",
47
- "@mastra/libsql": "1.22.3-alpha.2",
48
- "@mastra/observability": "1.17.5-alpha.0",
49
- "@mastra/memory": "1.28.2-alpha.1"
43
+ "@mastra/ai-sdk": "1.10.1-alpha.1",
44
+ "@mastra/libsql": "1.22.3-alpha.3",
45
+ "@mastra/core": "1.64.0-alpha.8",
46
+ "@mastra/evals": "1.10.0-alpha.1",
47
+ "@mastra/observability": "1.17.5-alpha.2",
48
+ "@internal/types-builder": "0.0.104",
49
+ "@mastra/memory": "1.28.2-alpha.3"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "@mastra/core": ">=1.50.0-0 <2.0.0-0",