@mastra/server 1.13.0-alpha.0 → 1.13.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,33 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 1.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added `@mastra/server/schemas` export with utility types that infer path params, query params, request body, and response types from any route in `SERVER_ROUTES`. When you add a new route via `createRoute()`, it automatically appears in the `RouteMap` type — no manual contract needed. ([#14008](https://github.com/mastra-ai/mastra/pull/14008))
8
+
9
+ ```ts
10
+ import type { RouteMap, RouteContract, InferPathParams, InferBody, InferResponse } from '@mastra/server/schemas';
11
+
12
+ type GetAgentParams = InferPathParams<RouteMap['GET /agents/:agentId']>;
13
+ // => { agentId: string }
14
+
15
+ type GenerateBody = InferBody<RouteMap['POST /agents/:agentId/generate']>;
16
+ // => { messages: CoreMessage[], ... }
17
+
18
+ type AgentResponse = InferResponse<RouteMap['GET /agents/:agentId']>;
19
+ // => { name: string, tools: ..., ... }
20
+ ```
21
+
22
+ ### Patch Changes
23
+
24
+ - Fixed OpenAPI spec for custom route paths. Custom routes registered via `registerApiRoute` are served at the root path (e.g. `/health`), not under `/api`. The OpenAPI spec now correctly represents this so that API tools and clients using the spec will resolve them to the correct URL. ([#13930](https://github.com/mastra-ai/mastra/pull/13930))
25
+
26
+ - Fixed an unnecessary runtime dependency in `@mastra/server`, reducing install size for consumers. Moved `@mastra/schema-compat` from dependencies to devDependencies since it is only needed at build time. ([#14223](https://github.com/mastra-ai/mastra/pull/14223))
27
+
28
+ - Updated dependencies [[`ea86967`](https://github.com/mastra-ai/mastra/commit/ea86967449426e0a3673253bd1c2c052a99d970d), [`db21c21`](https://github.com/mastra-ai/mastra/commit/db21c21a6ae5f33539262cc535342fa8757eb359), [`11f5dbe`](https://github.com/mastra-ai/mastra/commit/11f5dbe9a1e7ad8ef3b1ea34fb4a9fa3631d1587), [`6751354`](https://github.com/mastra-ai/mastra/commit/67513544d1a64be891d9de7624d40aadc895d56e), [`c958cd3`](https://github.com/mastra-ai/mastra/commit/c958cd36627c1eea122ec241b2b15492977a263a), [`86f2426`](https://github.com/mastra-ai/mastra/commit/86f242631d252a172d2f9f9a2ea0feb8647a76b0), [`950eb07`](https://github.com/mastra-ai/mastra/commit/950eb07b7e7354629630e218d49550fdd299c452)]:
29
+ - @mastra/core@1.13.0
30
+
3
31
  ## 1.13.0-alpha.0
4
32
 
5
33
  ### Minor Changes
@@ -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.13.0-alpha.0"
6
+ version: "1.13.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.13.0-alpha.0",
2
+ "version": "1.13.0",
3
3
  "package": "@mastra/server",
4
4
  "exports": {},
5
5
  "modules": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/server",
3
- "version": "1.13.0-alpha.0",
3
+ "version": "1.13.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -102,13 +102,13 @@
102
102
  "typescript": "^5.9.3",
103
103
  "vitest": "4.0.18",
104
104
  "zod": "^4.3.6",
105
- "@internal/lint": "0.0.68",
106
- "@internal/storage-test-utils": "0.0.64",
107
- "@mastra/agent-builder": "1.0.13-alpha.0",
108
- "@internal/test-utils": "0.0.4",
109
- "@internal/types-builder": "0.0.43",
110
- "@mastra/core": "1.13.0-alpha.0",
111
- "@mastra/schema-compat": "1.2.2-alpha.0"
105
+ "@internal/test-utils": "0.0.5",
106
+ "@internal/lint": "0.0.69",
107
+ "@internal/storage-test-utils": "0.0.65",
108
+ "@mastra/core": "1.13.0",
109
+ "@mastra/agent-builder": "1.0.13",
110
+ "@mastra/schema-compat": "1.2.2",
111
+ "@internal/types-builder": "0.0.44"
112
112
  },
113
113
  "homepage": "https://mastra.ai",
114
114
  "repository": {