@mastra/fastify 1.5.8-alpha.5 → 1.5.8-alpha.7

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 -50
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -5,7 +5,7 @@ Fastify server adapter for Mastra, enabling you to run Mastra with the [Fastify]
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @mastra/fastify fastify
8
+ npm install @mastra/fastify
9
9
  ```
10
10
 
11
11
  ## Usage
@@ -29,57 +29,14 @@ app.listen({ port: 3000 }, (err, address) => {
29
29
  });
30
30
  ```
31
31
 
32
- ## Adding Custom Routes
32
+ ## Documentation
33
33
 
34
- Add routes directly to the Fastify app with access to Mastra context:
34
+ - [Fastify adapter reference](https://mastra.ai/reference/server/fastify-adapter)
35
35
 
36
- ```typescript
37
- // Routes added after init() have access to Mastra context
38
- app.get('/health', async request => {
39
- const mastraInstance = request.mastra;
40
- const agents = Object.keys(mastraInstance.listAgents());
41
- return { status: 'ok', agents };
42
- });
43
- ```
44
-
45
- ## Configuration Options
46
-
47
- ```typescript
48
- const server = new MastraServer({
49
- app,
50
- mastra,
51
- prefix: '/api/v2', // Route prefix
52
- openapiPath: '/openapi.json', // OpenAPI spec endpoint
53
- bodyLimitOptions: {
54
- maxSize: 10 * 1024 * 1024, // 10MB
55
- onError: err => ({ error: 'Payload too large' }),
56
- },
57
- streamOptions: { redact: true }, // Redact sensitive data from streams
58
- });
59
- ```
36
+ ## Changelog
60
37
 
61
- ## Context Variables
62
-
63
- Access these in route handlers via `request`:
64
-
65
- | Key | Description |
66
- | ---------------- | --------------------------- |
67
- | `mastra` | Mastra instance |
68
- | `requestContext` | Request context map |
69
- | `abortSignal` | Request cancellation signal |
70
- | `tools` | Available tools |
71
-
72
- ## Multipart File Uploads
73
-
74
- For multipart file uploads, register `@fastify/multipart`:
75
-
76
- ```typescript
77
- import multipart from '@fastify/multipart';
78
-
79
- await app.register(multipart);
80
- ```
38
+ See the [package changelog](https://github.com/mastra-ai/mastra/blob/main/server-adapters/fastify/CHANGELOG.md) for version history and release notes.
81
39
 
82
- ## Related Links
40
+ ## Support
83
41
 
84
- - [Server Adapters Documentation](https://mastra.ai/docs/server/server-adapters)
85
- - [Fastify Documentation](https://fastify.dev/docs/latest/)
42
+ 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/fastify",
3
- "version": "1.5.8-alpha.5",
3
+ "version": "1.5.8-alpha.7",
4
4
  "description": "Mastra Fastify 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.5"
24
+ "@mastra/server": "1.64.0-alpha.7"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@ai-sdk/openai": "^2.0.115",
@@ -38,11 +38,11 @@
38
38
  "@internal/server-adapter-test-utils": "0.0.29",
39
39
  "@internal/storage-test-utils": "0.0.125",
40
40
  "@internal/types-builder": "0.0.104",
41
- "@mastra/evals": "1.10.0-alpha.0",
42
- "@mastra/libsql": "1.22.3-alpha.1",
43
- "@mastra/memory": "1.28.2-alpha.1",
44
- "@mastra/core": "1.64.0-alpha.5",
45
- "@mastra/observability": "1.17.5-alpha.0"
41
+ "@mastra/evals": "1.10.0-alpha.1",
42
+ "@mastra/libsql": "1.22.3-alpha.3",
43
+ "@mastra/core": "1.64.0-alpha.7",
44
+ "@mastra/memory": "1.28.2-alpha.2",
45
+ "@mastra/observability": "1.17.5-alpha.1"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@mastra/core": ">=1.50.0-0 <2.0.0-0",