@mastra/client-js 1.33.0-alpha.4 → 1.33.0-alpha.9

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,58 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.33.0-alpha.9
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`0a2c22c`](https://github.com/mastra-ai/mastra/commit/0a2c22c902604439ec490319e14c17f331e0c84c), [`3a8024c`](https://github.com/mastra-ai/mastra/commit/3a8024ce615f8aa89479c0d71fe61d10bb0040be)]:
8
+ - @mastra/core@1.52.0-alpha.9
9
+
10
+ ## 1.33.0-alpha.8
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`3b77e77`](https://github.com/mastra-ai/mastra/commit/3b77e7704936522e4769d29de1b5ea6901f302bd), [`6b1bf3b`](https://github.com/mastra-ai/mastra/commit/6b1bf3b9494bd51aa8f654c68c9355d6046fa2a1), [`72e437c`](https://github.com/mastra-ai/mastra/commit/72e437c515942c80b9def5b026e0bdee61b469d9)]:
15
+ - @mastra/core@1.52.0-alpha.8
16
+
17
+ ## 1.33.0-alpha.7
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`b7e79c3`](https://github.com/mastra-ai/mastra/commit/b7e79c3c02ac5cd415db34ba0975ceafc1464333), [`b75d749`](https://github.com/mastra-ai/mastra/commit/b75d749621ff5d17e86bcb4ee809d301fb4f7cf3), [`a8799bb`](https://github.com/mastra-ai/mastra/commit/a8799bb8e44f4a60d01e4e2acd3448ff80bf14f8)]:
22
+ - @mastra/core@1.52.0-alpha.7
23
+
24
+ ## 1.33.0-alpha.6
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [[`a40adeb`](https://github.com/mastra-ai/mastra/commit/a40adeb222b961a56a58af56a106106525721b74), [`821648b`](https://github.com/mastra-ai/mastra/commit/821648bf2871ef840100c7bacbecf676010bd12a), [`11f6cd9`](https://github.com/mastra-ai/mastra/commit/11f6cd96fe42582403416608beb212cc1a2cc79e)]:
29
+ - @mastra/core@1.52.0-alpha.6
30
+
31
+ ## 1.33.0-alpha.5
32
+
33
+ ### Patch Changes
34
+
35
+ - Replace `any` with `unknown` in generated route types so clients get real type errors instead of silently unchecked values. Route-types generation now deduplicates shared schemas into reusable type aliases, shrinking the generated `route-types.generated.ts` from ~94K to ~22K lines (77% smaller). The memory config response now types `workingMemory` (enabled, scope, template, schema, version) instead of `unknown`. ([#19573](https://github.com/mastra-ai/mastra/pull/19573))
36
+
37
+ If your code read fields from responses that were previously typed `any`, TypeScript now requires you to narrow them before use:
38
+
39
+ ```ts
40
+ // Before: `metadata` was `any`, so this compiled even when unsafe
41
+ const value = response.metadata.someField;
42
+
43
+ // After: `metadata` is `unknown` — narrow it first
44
+ const metadata = response.metadata;
45
+ if (metadata && typeof metadata === 'object' && 'someField' in metadata) {
46
+ const value = metadata.someField;
47
+ }
48
+ // ...or cast if you know the shape: (metadata as MyMetadata).someField
49
+ ```
50
+
51
+ Code that reads `workingMemory` from the memory config response no longer needs casts — `config.workingMemory?.enabled`, `scope`, `template`, `schema`, and `version` are now typed directly.
52
+
53
+ - Updated dependencies [[`ec857fc`](https://github.com/mastra-ai/mastra/commit/ec857fc79c264b53b38e16478c789b7177f2ad59), [`e1f2fae`](https://github.com/mastra-ai/mastra/commit/e1f2faebaf048c3d4c2e2c01d293767c195d5794), [`63aa799`](https://github.com/mastra-ai/mastra/commit/63aa799c6b44eacc7806cda6846b7c5bbee06b37), [`73db8db`](https://github.com/mastra-ai/mastra/commit/73db8db90d69ab6153c7942749f624db0d96952d), [`73db8db`](https://github.com/mastra-ai/mastra/commit/73db8db90d69ab6153c7942749f624db0d96952d), [`76b7181`](https://github.com/mastra-ai/mastra/commit/76b71810366e6d90b9d3973149d1c7ba3659ffb9), [`0c0e8d7`](https://github.com/mastra-ai/mastra/commit/0c0e8d7becd4d1445c656b78d5d845f606c1ff9d), [`9f7c67a`](https://github.com/mastra-ai/mastra/commit/9f7c67abeeb52c41c51a9b5edee60b62afe7cd8d), [`3b65e68`](https://github.com/mastra-ai/mastra/commit/3b65e68d7f1c771c7a70eea42d83fefdd28cad88), [`e3868e2`](https://github.com/mastra-ai/mastra/commit/e3868e22babfffd0133771669ca724501c2dd58e)]:
54
+ - @mastra/core@1.52.0-alpha.5
55
+
3
56
  ## 1.33.0-alpha.4
4
57
 
5
58
  ### Patch Changes
@@ -2415,9 +2468,7 @@
2415
2468
  await client.storedAgents.unfavorite(agent.id);
2416
2469
 
2417
2470
  // Versioning + publish
2418
- const draft = await client.storedSkills.create({
2419
- /* ... */
2420
- });
2471
+ const draft = await client.storedSkills.create({/* ... */});
2421
2472
  const published = await client.storedSkills.publish(draft.id);
2422
2473
  await client.storedSkills.restore(draft.id, { version: 1 });
2423
2474
  ```
@@ -2589,9 +2640,7 @@
2589
2640
  await client.storedAgents.unfavorite(agent.id);
2590
2641
 
2591
2642
  // Versioning + publish
2592
- const draft = await client.storedSkills.create({
2593
- /* ... */
2594
- });
2643
+ const draft = await client.storedSkills.create({/* ... */});
2595
2644
  const published = await client.storedSkills.publish(draft.id);
2596
2645
  await client.storedSkills.restore(draft.id, { version: 1 });
2597
2646
  ```
@@ -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.33.0-alpha.4"
6
+ version: "1.33.0-alpha.9"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.33.0-alpha.4",
2
+ "version": "1.33.0-alpha.9",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {
5
5
  "RequestContext": {
@@ -57,9 +57,7 @@ import { Mastra } from '@mastra/core'
57
57
  import { MastraEditor } from '@mastra/editor'
58
58
 
59
59
  export const mastra = new Mastra({
60
- agents: {
61
- /* your existing agents */
62
- },
60
+ agents: {/* your existing agents */},
63
61
  editor: new MastraEditor(),
64
62
  })
65
63
  ```
@@ -84,9 +82,7 @@ import { Mastra } from '@mastra/core'
84
82
  import { MastraEditor } from '@mastra/editor'
85
83
 
86
84
  export const mastra = new Mastra({
87
- agents: {
88
- /* your existing agents */
89
- },
85
+ agents: {/* your existing agents */},
90
86
  editor: new MastraEditor({
91
87
  source: 'code',
92
88
  }),