@mastra/client-js 1.10.0-alpha.5 → 1.10.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,75 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added new observability API endpoints and client methods for logs, scores, feedback, metrics (aggregate, breakdown, time series, percentiles), and discovery (metric names, label keys/values, entity types/names, service names, environments, tags) ([#14470](https://github.com/mastra-ai/mastra/pull/14470))
8
+
9
+ ### Patch Changes
10
+
11
+ - Added client SDK methods for dataset experiments and item generation. ([#14470](https://github.com/mastra-ai/mastra/pull/14470))
12
+ - Added `triggerExperiment()` method to dataset resources for running experiments with configurable target type and ID
13
+ - Added `generateItems()` method for LLM-powered test data generation
14
+ - Added `clusterFailures()` method for analyzing experiment failures
15
+ - Added TypeScript types for new dataset and experiment API payloads
16
+
17
+ - Added agent version support for experiments. When triggering an experiment, you can now pass an `agentVersion` parameter to pin which agent version to use. The agent version is stored with the experiment and returned in experiment responses. ([#14562](https://github.com/mastra-ai/mastra/pull/14562))
18
+
19
+ ```ts
20
+ const client = new MastraClient();
21
+
22
+ await client.triggerDatasetExperiment({
23
+ datasetId: 'my-dataset',
24
+ targetType: 'agent',
25
+ targetId: 'my-agent',
26
+ version: 3, // pin to dataset version 3
27
+ agentVersion: 'ver_abc123', // pin to a specific agent version
28
+ });
29
+ ```
30
+
31
+ - Add optional `?path=` query param to workspace skill routes for disambiguating same-named skills. ([#14430](https://github.com/mastra-ai/mastra/pull/14430))
32
+
33
+ Skill routes continue to use `:skillName` in the URL path (no breaking change). When two skills share the same name (e.g. from different directories), pass the optional `?path=` query parameter to select the exact skill:
34
+
35
+ ```
36
+ GET /workspaces/:workspaceId/skills/:skillName?path=skills/brand-guidelines
37
+ ```
38
+
39
+ `SkillMetadata` now includes a `path` field, and the `list()` method returns all same-named skills for disambiguation. The client SDK's `getSkill()` accepts an optional `skillPath` parameter for disambiguation.
40
+
41
+ - Updated skill search result types and query parameters to use `skillName`/`skillNames` instead of `skillPath`/`skillPaths` for consistency with the name-based public API. ([#14430](https://github.com/mastra-ai/mastra/pull/14430))
42
+
43
+ - Added storage type detection to the Metrics Dashboard. The `/system/packages` endpoint now returns `observabilityStorageType`, identifying the observability storage backend. The dashboard shows an empty state when the storage does not support metrics (e.g. PostgreSQL, LibSQL), and displays a warning when using in-memory storage since metrics are not persisted across server restarts. Also added a docs link button to the Metrics page header. ([#14620](https://github.com/mastra-ai/mastra/pull/14620))
44
+
45
+ ```ts
46
+ import { MastraClient } from '@mastra/client-js';
47
+
48
+ const client = new MastraClient();
49
+ const system = await client.getSystemPackages();
50
+
51
+ // system.observabilityStorageType contains the class name of the observability store:
52
+ // - 'ObservabilityInMemory' → metrics work but are not persisted across restarts
53
+ // - 'ObservabilityPG', 'ObservabilityLibSQL', etc. → metrics not supported
54
+
55
+ if (system.observabilityStorageType === 'ObservabilityInMemory') {
56
+ console.warn('Metrics are not persisted — data will be lost on server restart.');
57
+ }
58
+
59
+ const SUPPORTED = new Set(['ObservabilityInMemory']);
60
+ if (!SUPPORTED.has(system.observabilityStorageType ?? '')) {
61
+ console.error('Metrics require in-memory observability storage.');
62
+ }
63
+ ```
64
+
65
+ - Fix Zod v3 and Zod v4 compatibility across public structured-output APIs. ([#14464](https://github.com/mastra-ai/mastra/pull/14464))
66
+
67
+ Mastra agent and client APIs accept schemas from either `zod/v3` or `zod/v4`, matching the documented peer dependency range and preserving TypeScript compatibility for both Zod versions.
68
+
69
+ - Updated dependencies [[`68ed4e9`](https://github.com/mastra-ai/mastra/commit/68ed4e9f118e8646b60a6112dabe854d0ef53902), [`085c1da`](https://github.com/mastra-ai/mastra/commit/085c1daf71b55a97b8ebad26623089e40055021c), [`be37de4`](https://github.com/mastra-ai/mastra/commit/be37de4391bd1d5486ce38efacbf00ca51637262), [`7dbd611`](https://github.com/mastra-ai/mastra/commit/7dbd611a85cb1e0c0a1581c57564268cb183d86e), [`f14604c`](https://github.com/mastra-ai/mastra/commit/f14604c7ef01ba794e1a8d5c7bae5415852aacec), [`4a75e10`](https://github.com/mastra-ai/mastra/commit/4a75e106bd31c283a1b3fe74c923610dcc46415b), [`f3ce603`](https://github.com/mastra-ai/mastra/commit/f3ce603fd76180f4a5be90b6dc786d389b6b3e98), [`423aa6f`](https://github.com/mastra-ai/mastra/commit/423aa6fd12406de6a1cc6b68e463d30af1d790fb), [`f21c626`](https://github.com/mastra-ai/mastra/commit/f21c6263789903ab9720b4d11373093298e97f15), [`41aee84`](https://github.com/mastra-ai/mastra/commit/41aee84561ceebe28bad1ecba8702d92838f67f0), [`2871451`](https://github.com/mastra-ai/mastra/commit/2871451703829aefa06c4a5d6eca7fd3731222ef), [`47358d9`](https://github.com/mastra-ai/mastra/commit/47358d960bb2b931321de7e798f341ab0df81f44), [`085c1da`](https://github.com/mastra-ai/mastra/commit/085c1daf71b55a97b8ebad26623089e40055021c), [`4bb5adc`](https://github.com/mastra-ai/mastra/commit/4bb5adc05c88e3a83fe1ea5ecb9eae6e17313124), [`4bb5adc`](https://github.com/mastra-ai/mastra/commit/4bb5adc05c88e3a83fe1ea5ecb9eae6e17313124), [`e06b520`](https://github.com/mastra-ai/mastra/commit/e06b520bdd5fdef844760c5e692c7852cbc5c240), [`d3930ea`](https://github.com/mastra-ai/mastra/commit/d3930eac51c30b0ecf7eaa54bb9430758b399777), [`dd9c4e0`](https://github.com/mastra-ai/mastra/commit/dd9c4e0a47962f1413e9b72114fcad912e19a0a6)]:
70
+ - @mastra/core@1.16.0
71
+ - @mastra/schema-compat@1.2.7
72
+
3
73
  ## 1.10.0-alpha.5
4
74
 
5
75
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-client-js
3
3
  description: Documentation for @mastra/client-js. Use when working with @mastra/client-js APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/client-js"
6
- version: "1.10.0-alpha.5"
6
+ version: "1.10.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.10.0-alpha.5",
2
+ "version": "1.10.0",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {},
5
5
  "modules": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "1.10.0-alpha.5",
3
+ "version": "1.10.0",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -37,8 +37,8 @@
37
37
  "@ai-sdk/ui-utils": "^1.2.11",
38
38
  "@lukeed/uuid": "^2.0.1",
39
39
  "json-schema": "^0.4.0",
40
- "@mastra/core": "1.16.0-alpha.5",
41
- "@mastra/schema-compat": "1.2.7-alpha.1"
40
+ "@mastra/core": "1.16.0",
41
+ "@mastra/schema-compat": "1.2.7"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "zod": "^3.25.0 || ^4.0.0"
@@ -53,10 +53,10 @@
53
53
  "typescript": "^5.9.3",
54
54
  "vitest": "4.0.18",
55
55
  "zod": "^4.3.6",
56
- "@internal/ai-sdk-v5": "0.0.20",
57
- "@internal/lint": "0.0.73",
58
- "@internal/types-builder": "0.0.48",
59
- "@internal/ai-sdk-v4": "0.0.20"
56
+ "@internal/ai-sdk-v5": "0.0.21",
57
+ "@internal/ai-sdk-v4": "0.0.21",
58
+ "@internal/lint": "0.0.74",
59
+ "@internal/types-builder": "0.0.49"
60
60
  },
61
61
  "engines": {
62
62
  "node": ">=22.13.0"