@mastra/server 1.59.0-alpha.0 → 1.59.0-alpha.2

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.
@@ -3,7 +3,7 @@ name: mastra-server
3
3
  description: Documentation for @mastra/server. Use when working with @mastra/server APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/server"
6
- version: "1.59.0-alpha.0"
6
+ version: "1.59.0-alpha.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.59.0-alpha.0",
2
+ "version": "1.59.0-alpha.2",
3
3
  "package": "@mastra/server",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -2,7 +2,7 @@
2
2
 
3
3
  # A2A (Agent-to-Agent)
4
4
 
5
- Mastra supports version 0.3.0 of the [Agent-to-Agent (A2A) protocol](https://a2a-protocol.org/latest/) for cross-platform multi-agent systems. Use A2A to expose Mastra agents as remote agents, consume remote A2A agents as Mastra subagents, or call A2A endpoints with the JavaScript client SDK.
5
+ Mastra supports version 0.3.0 of the [Agent-to-Agent (A2A) protocol](https://a2a-protocol.org/latest/) for cross-platform multi-agent systems. Use A2A to expose Mastra agents as remote agents or consume remote A2A agents as Mastra subagents. You can also call A2A endpoints with the JavaScript client SDK.
6
6
 
7
7
  A2A is an open protocol for delegating work to agents across network, framework, vendor, and language boundaries. A remote agent keeps its own tools, prompts, memory, workflows, and infrastructure private while exposing a protocol endpoint that other systems can discover and call.
8
8
 
@@ -176,7 +176,7 @@ async getParams(
176
176
 
177
177
  ### `sendResponse()`
178
178
 
179
- Send the response back to the client based on the route's response type. Mastra routes can return different response types: JSON for most API responses, streams for agent generation, and special types for MCP transports. Your implementation should handle each type appropriately for your framework.
179
+ Send the response back to the client based on the route's response type. Mastra routes can return different response types: JSON for most API responses and streams for agent generation, plus special types for MCP transports. Your implementation should handle each type appropriately for your framework.
180
180
 
181
181
  ```typescript
182
182
  async sendResponse(
@@ -211,7 +211,7 @@ async sendResponse(
211
211
 
212
212
  ### `stream()`
213
213
 
214
- Handle streaming responses for agent generation. When an agent generates a response, it produces a stream of chunks that should be sent to the client as they become available. This method reads from the stream, optionally applies redaction to hide sensitive data, and writes chunks to the response in the appropriate format (SSE or newline-delimited JSON).
214
+ Handle streaming responses for agent generation. When an agent generates a response, it produces a stream of chunks that should be sent to the client as they become available. This method reads from the stream and optionally applies redaction to hide sensitive data before writing chunks to the response in the appropriate format (SSE or newline-delimited JSON).
215
215
 
216
216
  ```typescript
217
217
  async stream(
@@ -37,7 +37,7 @@ Each route's handler receives the Hono `Context`. Within the handler you can acc
37
37
 
38
38
  ## Schema validation
39
39
 
40
- Use [`createRoute()`](https://mastra.ai/reference/server/create-route) in `apiRoutes` to parse and validate path parameters, query parameters, and request bodies with Zod. The schemas also infer the handler parameters and generate OpenAPI metadata.
40
+ Use [`createRoute()`](https://mastra.ai/reference/server/create-route) in `apiRoutes` to parse and validate path and query parameters, along with request bodies, using Zod. The schemas also infer the handler parameters and generate OpenAPI metadata.
41
41
 
42
42
  ```typescript
43
43
  import { Mastra } from '@mastra/core'