@mastra/server 1.34.0-alpha.3 → 1.34.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,53 @@
1
1
  # @mastra/server
2
2
 
3
+ ## 1.34.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added optional `metadata` to code-defined agents. Pass a `metadata` record to `new Agent({...})`, read it back with `agent.getMetadata()`, and clients can filter on it from the existing `/agents` and `/agents/:agentId` responses without encoding the data into IDs or names. ([#16603](https://github.com/mastra-ai/mastra/pull/16603))
8
+
9
+ Metadata supports the same `DynamicArgument` form as other agent config fields, so it can also be resolved per request from the request context.
10
+
11
+ Stored agents loaded via the editor also expose their metadata through `agent.getMetadata()`, so clients can filter these agents as well. Cloning a runtime agent via `editor.agent.clone()` now carries the source agent's metadata over to the stored clone when the caller does not provide one explicitly.
12
+
13
+ ```ts
14
+ // Static
15
+ const supportAgent = new Agent({
16
+ id: 'support-agent',
17
+ name: 'Support Agent',
18
+ instructions: 'You help customers with support requests.',
19
+ model: 'openai/gpt-5',
20
+ metadata: { type: 'support' },
21
+ });
22
+
23
+ supportAgent.getMetadata(); // { type: 'support' }
24
+
25
+ // Dynamic
26
+ const tenantAgent = new Agent({
27
+ id: 'tenant-agent',
28
+ name: 'Tenant Agent',
29
+ instructions: 'You help customers with tenant-specific tasks.',
30
+ model: 'openai/gpt-5',
31
+ metadata: ({ requestContext }) => ({
32
+ type: 'support',
33
+ tenant: requestContext.get('tenant'),
34
+ }),
35
+ });
36
+
37
+ await tenantAgent.getMetadata({ requestContext }); // { type: 'support', tenant: 'acme' }
38
+ ```
39
+
40
+ ### Patch Changes
41
+
42
+ - Expose `GET /observability/traces/light` and storage support for fetching paginated trace-list rows without span payload data. ([#16608](https://github.com/mastra-ai/mastra/pull/16608))
43
+
44
+ - `GET /api/observability/discovery/metric-names` and `GET /api/observability/discovery/metric-label-values` now accept `limit` as a URL query parameter without pre-parsing. Previously, passing `?limit=10` was rejected as a validation error; callers can now use these endpoints directly from HTTP clients, consistent with other query endpoints (e.g. pagination). ([#16489](https://github.com/mastra-ai/mastra/pull/16489))
45
+
46
+ - Fixed agent signal wakeups so idle runs receive request context values while preserving server-owned resource identifiers. ([#16557](https://github.com/mastra-ai/mastra/pull/16557))
47
+
48
+ - Updated dependencies [[`20787de`](https://github.com/mastra-ai/mastra/commit/20787de5965234a1af28fe35f49437c537dbfa0d), [`784ad98`](https://github.com/mastra-ai/mastra/commit/784ad989549de91dc5d33ab8ef36caa6f7dcd34e), [`fceae1f`](https://github.com/mastra-ai/mastra/commit/fceae1f5f5db4722cb078a663c6eb4bd22944123), [`090a647`](https://github.com/mastra-ai/mastra/commit/090a647ba5a66d36f203f9f49457e03a1ff4e6fb), [`bf02acb`](https://github.com/mastra-ai/mastra/commit/bf02acbb8a6110f638ac844e89f1ebf04cb7fe74), [`090a647`](https://github.com/mastra-ai/mastra/commit/090a647ba5a66d36f203f9f49457e03a1ff4e6fb), [`bdb4cbf`](https://github.com/mastra-ai/mastra/commit/bdb4cbf8ba4b685d7481f28bb9dc3de6c79c9ed2), [`0fd3fbe`](https://github.com/mastra-ai/mastra/commit/0fd3fbe40fb63657aedd72f6e7b38c8e8ee6940d), [`f84447d`](https://github.com/mastra-ai/mastra/commit/f84447d6c80f3471836a9b300d246b331fb47e0d), [`a1a5b3e`](https://github.com/mastra-ai/mastra/commit/a1a5b3e42ab2ca5161ea21db59ebf28442680fa7), [`af84f57`](https://github.com/mastra-ai/mastra/commit/af84f571ed762e92e8e61c5f9a72363520914274), [`8b3c6f9`](https://github.com/mastra-ai/mastra/commit/8b3c6f90f7879833ba7d1bc70937e1d8f69d0804), [`fed0475`](https://github.com/mastra-ai/mastra/commit/fed0475ccfea31e4fc251469ac05640d0742c1f0), [`0d53730`](https://github.com/mastra-ai/mastra/commit/0d53730c1ed87ef80c87caa5701c4170ea8028e6), [`522f44d`](https://github.com/mastra-ai/mastra/commit/522f44d947214bfc06cff50599bae1ef3494880d)]:
49
+ - @mastra/core@1.34.0
50
+
3
51
  ## 1.34.0-alpha.3
4
52
 
5
53
  ### 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.34.0-alpha.3"
6
+ version: "1.34.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.34.0-alpha.3",
2
+ "version": "1.34.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.34.0-alpha.3",
3
+ "version": "1.34.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -115,13 +115,13 @@
115
115
  "zod": "^4.3.6",
116
116
  "zod-to-ts": "^2.0.0",
117
117
  "@internal/core": "0.0.0",
118
- "@internal/storage-test-utils": "0.0.90",
119
- "@internal/test-utils": "0.0.30",
120
- "@internal/lint": "0.0.94",
121
- "@internal/types-builder": "0.0.69",
122
- "@mastra/agent-builder": "1.0.35-alpha.0",
123
- "@mastra/schema-compat": "1.2.10",
124
- "@mastra/core": "1.34.0-alpha.3"
118
+ "@internal/lint": "0.0.95",
119
+ "@internal/test-utils": "0.0.31",
120
+ "@internal/storage-test-utils": "0.0.91",
121
+ "@internal/types-builder": "0.0.70",
122
+ "@mastra/agent-builder": "1.0.35",
123
+ "@mastra/core": "1.34.0",
124
+ "@mastra/schema-compat": "1.2.10"
125
125
  },
126
126
  "homepage": "https://mastra.ai",
127
127
  "repository": {