@mastra/client-js 0.17.0-alpha.4 → 0.17.1-alpha.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,97 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.17.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @mastra/core@0.24.8-alpha.0
9
+
10
+ ## 0.17.0
11
+
12
+ ### Minor Changes
13
+
14
+ - Add support for custom fetch function in MastraClient to enable environments like Tauri that require custom fetch implementations to avoid timeout errors. ([#10679](https://github.com/mastra-ai/mastra/pull/10679))
15
+
16
+ You can now pass a custom fetch function when creating a MastraClient:
17
+
18
+ ```typescript
19
+ import { MastraClient } from '@mastra/client-js';
20
+
21
+ // Before: Only global fetch was available
22
+ const client = new MastraClient({
23
+ baseUrl: 'http://your-api-url',
24
+ });
25
+
26
+ // After: Custom fetch can be passed
27
+ const client = new MastraClient({
28
+ baseUrl: 'http://your-api-url',
29
+ fetch: customFetch, // Your custom fetch implementation
30
+ });
31
+ ```
32
+
33
+ If no custom fetch is provided, it falls back to the global fetch function, maintaining backward compatibility.
34
+
35
+ Fixes #10673
36
+
37
+ ### Patch Changes
38
+
39
+ - The client-js package had its own simpler zodToJsonSchema implementation that was missing critical features from schema-compat. This could cause issues when users pass Zod schemas with `z.record()` or `z.date()` through the MastraClient. ([#10925](https://github.com/mastra-ai/mastra/pull/10925))
40
+
41
+ Now the client uses the same implementation as the rest of the codebase, which includes the Zod v4 `z.record()` bug fix, date-time format conversion for `z.date()`, and proper handling of unrepresentable types.
42
+
43
+ Also removes the now-unused `zod-to-json-schema` dependency from client-js.
44
+
45
+ - Add timeTravel APIs and add timeTravel feature to studio ([#10757](https://github.com/mastra-ai/mastra/pull/10757))
46
+
47
+ - feat: Add partial response support for agent and workflow list endpoints ([#10906](https://github.com/mastra-ai/mastra/pull/10906))
48
+
49
+ Add optional `partial` query parameter to `/api/agents` and `/api/workflows` endpoints to return minimal data without schemas, reducing payload size for list views:
50
+ - When `partial=true`: tool schemas (inputSchema, outputSchema) are omitted
51
+ - When `partial=true`: workflow steps are replaced with stepCount integer
52
+ - When `partial=true`: workflow root schemas (inputSchema, outputSchema) are omitted
53
+ - Maintains backward compatibility when partial parameter is not provided
54
+
55
+ ## Server Endpoint Usage
56
+
57
+ ```http
58
+ # Get partial agent data (no tool schemas)
59
+ GET /api/agents?partial=true
60
+
61
+ # Get full agent data (default behavior)
62
+ GET /api/agents
63
+
64
+ # Get partial workflow data (stepCount instead of steps, no schemas)
65
+ GET /api/workflows?partial=true
66
+
67
+ # Get full workflow data (default behavior)
68
+ GET /api/workflows
69
+ ```
70
+
71
+ ## Client SDK Usage
72
+
73
+ ```typescript
74
+ import { MastraClient } from '@mastra/client-js';
75
+
76
+ const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
77
+
78
+ // Get partial agent list (smaller payload)
79
+ const partialAgents = await client.listAgents({ partial: true });
80
+
81
+ // Get full agent list with tool schemas
82
+ const fullAgents = await client.listAgents();
83
+
84
+ // Get partial workflow list (smaller payload)
85
+ const partialWorkflows = await client.listWorkflows({ partial: true });
86
+
87
+ // Get full workflow list with steps and schemas
88
+ const fullWorkflows = await client.listWorkflows();
89
+ ```
90
+
91
+ - Updated dependencies [[`5cc85aa`](https://github.com/mastra-ai/mastra/commit/5cc85aa4329773cac8314f3aa0146227b6b158e4), [`c53f8e6`](https://github.com/mastra-ai/mastra/commit/c53f8e68df42464935f9a63eb0fc765a65aacb83), [`386ab43`](https://github.com/mastra-ai/mastra/commit/386ab4350cf2a814fb4ac0a5fc6983ca93158ffe), [`2b62302`](https://github.com/mastra-ai/mastra/commit/2b623027a9d65c1dbc963bf651e9e6a9d09da1fa), [`7d85da4`](https://github.com/mastra-ai/mastra/commit/7d85da42a5fab56009a959a9c20328558d14f4b5), [`3d7c5bd`](https://github.com/mastra-ai/mastra/commit/3d7c5bdbee1b2693cd45bf207b960dd9b7277680), [`31b381e`](https://github.com/mastra-ai/mastra/commit/31b381efb48e031c0ecc46bc6e410ae6e67b88e5), [`54cc99c`](https://github.com/mastra-ai/mastra/commit/54cc99cb99483b9e08ec41fa1502f43b71b4c351), [`e77a5f9`](https://github.com/mastra-ai/mastra/commit/e77a5f9718dc418e29e3c8a389299ed6dc0a6401), [`b685c9c`](https://github.com/mastra-ai/mastra/commit/b685c9c0b89f49e0d4542c4ac72569682db69794), [`b069af5`](https://github.com/mastra-ai/mastra/commit/b069af514c4dcfc4fdcb164303569bfff1c26e3d), [`7dc8304`](https://github.com/mastra-ai/mastra/commit/7dc830420296db516b86dcec663e54d0309b8fb8), [`6942109`](https://github.com/mastra-ai/mastra/commit/694210903c70e3c26b5ce8ca4f4637ca2d9eb369), [`62d13f4`](https://github.com/mastra-ai/mastra/commit/62d13f4d1db1c16742831f210fe4c2caf8a26d57), [`358ab98`](https://github.com/mastra-ai/mastra/commit/358ab98024c388e383aca15616e8988bf4a5b66e)]:
92
+ - @mastra/core@0.24.7
93
+ - @mastra/schema-compat@0.11.9
94
+
3
95
  ## 0.17.0-alpha.4
4
96
 
5
97
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "0.17.0-alpha.4",
3
+ "version": "0.17.1-alpha.0",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -38,8 +38,8 @@
38
38
  "@lukeed/uuid": "^2.0.1",
39
39
  "json-schema": "^0.4.0",
40
40
  "rxjs": "7.8.1",
41
- "@mastra/core": "0.24.7-alpha.4",
42
- "@mastra/schema-compat": "0.11.9-alpha.0"
41
+ "@mastra/schema-compat": "0.11.9",
42
+ "@mastra/core": "0.24.8-alpha.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "zod": "^3.25.0 || ^4.0.0"
@@ -57,8 +57,8 @@
57
57
  "tsup": "^8.5.0",
58
58
  "typescript": "^5.8.3",
59
59
  "vitest": "^3.2.4",
60
- "@internal/types-builder": "0.0.39",
61
- "@internal/lint": "0.0.64"
60
+ "@internal/lint": "0.0.65",
61
+ "@internal/types-builder": "0.0.40"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public",