@mastra/client-js 1.13.4-alpha.2 → 1.13.4

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,20 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.13.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`87df955`](https://github.com/mastra-ai/mastra/commit/87df955c028660c075873fd5d74af28233ce32eb), [`8fad147`](https://github.com/mastra-ai/mastra/commit/8fad14759804179c8e080ce4d9dec6ef1a808b31), [`582644c`](https://github.com/mastra-ai/mastra/commit/582644c4a87f83b4f245a84d72b9e8590585012e), [`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`4ba3bb1`](https://github.com/mastra-ai/mastra/commit/4ba3bb1e465ad2ddaba3bbf2bc47e0faec32985e), [`5d84914`](https://github.com/mastra-ai/mastra/commit/5d84914e0e520c642a40329b210b413fcd139898), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fd2f314`](https://github.com/mastra-ai/mastra/commit/fd2f31473d3449b6b97e837ef8641264377f41a7), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`e80fead`](https://github.com/mastra-ai/mastra/commit/e80fead1412cc0d1b2f7d6a1ce5017d9e0098ff7), [`0287b64`](https://github.com/mastra-ai/mastra/commit/0287b644a5c3272755cf3112e71338106664103b), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`075e91a`](https://github.com/mastra-ai/mastra/commit/075e91a4549baf46ad7a42a6a8ac8dfa78cc09e6), [`2a69802`](https://github.com/mastra-ai/mastra/commit/2a69802a0fc6d8a25a77fa6a42276e9d59a83914), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
8
+ - @mastra/core@1.25.0
9
+ - @mastra/schema-compat@1.2.8
10
+
11
+ ## 1.13.4-alpha.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [[`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
16
+ - @mastra/core@1.25.0-alpha.3
17
+
3
18
  ## 1.13.4-alpha.2
4
19
 
5
20
  ### 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.13.4-alpha.2"
6
+ version: "1.13.4"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.13.4-alpha.2",
2
+ "version": "1.13.4",
3
3
  "package": "@mastra/client-js",
4
4
  "exports": {},
5
5
  "modules": {}
@@ -6,6 +6,21 @@ This is useful when building custom streaming endpoints outside Mastra's provide
6
6
 
7
7
  `toAISdkStream()` keeps the existing AI SDK v5/default behavior. If your app is typed against AI SDK v6, pass `version: 'v6'` in the options object.
8
8
 
9
+ ## Structured output in UI streams
10
+
11
+ When the source agent stream includes a final structured output object, `toAISdkStream()` emits it as a custom AI SDK UI data part:
12
+
13
+ ```json
14
+ {
15
+ "type": "data-structured-output",
16
+ "data": {
17
+ "object": {}
18
+ }
19
+ }
20
+ ```
21
+
22
+ The `object` field contains your full structured output value. This maps Mastra's final structured output chunk into the AI SDK UI stream. Partial structured output chunks are not emitted.
23
+
9
24
  ## Usage example
10
25
 
11
26
  Next.js App Router example:
package/dist/index.cjs CHANGED
@@ -341,6 +341,8 @@ var AgentVoice = class extends BaseResource {
341
341
  this.version = version;
342
342
  this.agentId = agentId;
343
343
  }
344
+ agentId;
345
+ version;
344
346
  getQueryString(requestContext, delimiter = "?") {
345
347
  const searchParams = new URLSearchParams(requestContextQueryString(requestContext).slice(1));
346
348
  if (this.version) {
@@ -410,6 +412,8 @@ var Agent = class extends BaseResource {
410
412
  this.version = version;
411
413
  this.voice = new AgentVoice(options, this.agentId, this.version);
412
414
  }
415
+ agentId;
416
+ version;
413
417
  voice;
414
418
  getQueryString(requestContext, delimiter = "?") {
415
419
  const searchParams = new URLSearchParams(requestContextQueryString(requestContext).slice(1));
@@ -1723,6 +1727,8 @@ var MemoryThread = class extends BaseResource {
1723
1727
  this.threadId = threadId;
1724
1728
  this.agentId = agentId;
1725
1729
  }
1730
+ threadId;
1731
+ agentId;
1726
1732
  /**
1727
1733
  * Builds the query string for agentId (if provided)
1728
1734
  */
@@ -1827,6 +1833,7 @@ var Vector = class extends BaseResource {
1827
1833
  super(options);
1828
1834
  this.vectorName = vectorName;
1829
1835
  }
1836
+ vectorName;
1830
1837
  /**
1831
1838
  * Retrieves details about a specific vector index
1832
1839
  * @param indexName - Name of the index to get details for
@@ -1899,6 +1906,7 @@ var Tool = class extends BaseResource {
1899
1906
  super(options);
1900
1907
  this.toolId = toolId;
1901
1908
  }
1909
+ toolId;
1902
1910
  /**
1903
1911
  * Retrieves details about the tool
1904
1912
  * @param requestContext - Optional request context to pass as query parameter
@@ -1934,6 +1942,7 @@ var Processor = class extends BaseResource {
1934
1942
  super(options);
1935
1943
  this.processorId = processorId;
1936
1944
  }
1945
+ processorId;
1937
1946
  /**
1938
1947
  * Retrieves details about the processor
1939
1948
  * @param requestContext - Optional request context to pass as query parameter
@@ -2015,6 +2024,8 @@ var Run = class extends BaseResource {
2015
2024
  this.workflowId = workflowId;
2016
2025
  this.runId = runId;
2017
2026
  }
2027
+ workflowId;
2028
+ runId;
2018
2029
  /**
2019
2030
  * Creates a transform stream that parses RECORD_SEPARATOR-delimited JSON chunks
2020
2031
  */
@@ -2382,6 +2393,7 @@ var Workflow = class extends BaseResource {
2382
2393
  super(options);
2383
2394
  this.workflowId = workflowId;
2384
2395
  }
2396
+ workflowId;
2385
2397
  /**
2386
2398
  * Retrieves details about the workflow
2387
2399
  * @param requestContext - Optional request context to pass as query parameter
@@ -2535,6 +2547,7 @@ var A2A = class extends BaseResource {
2535
2547
  super(options);
2536
2548
  this.agentId = agentId;
2537
2549
  }
2550
+ agentId;
2538
2551
  /**
2539
2552
  * Get the agent card with metadata about the agent
2540
2553
  * @returns Promise containing the agent card information
@@ -2657,6 +2670,7 @@ var AgentBuilder = class extends BaseResource {
2657
2670
  super(options);
2658
2671
  this.actionId = actionId;
2659
2672
  }
2673
+ actionId;
2660
2674
  // Helper function to transform workflow result to action result
2661
2675
  transformWorkflowResult(result) {
2662
2676
  if (result.status === "success") {
@@ -3331,6 +3345,7 @@ var StoredAgent = class extends BaseResource {
3331
3345
  super(options);
3332
3346
  this.storedAgentId = storedAgentId;
3333
3347
  }
3348
+ storedAgentId;
3334
3349
  /**
3335
3350
  * Retrieves details about the stored agent
3336
3351
  * @param requestContext - Optional request context to pass as query parameter
@@ -3484,6 +3499,7 @@ var StoredPromptBlock = class extends BaseResource {
3484
3499
  super(options);
3485
3500
  this.storedPromptBlockId = storedPromptBlockId;
3486
3501
  }
3502
+ storedPromptBlockId;
3487
3503
  /**
3488
3504
  * Retrieves details about the stored prompt block
3489
3505
  * @param requestContext - Optional request context to pass as query parameter
@@ -3637,6 +3653,7 @@ var StoredMCPClient = class extends BaseResource {
3637
3653
  super(options);
3638
3654
  this.storedMCPClientId = storedMCPClientId;
3639
3655
  }
3656
+ storedMCPClientId;
3640
3657
  /**
3641
3658
  * Retrieves details about the stored MCP client
3642
3659
  * @param requestContext - Optional request context to pass as query parameter
@@ -3683,6 +3700,7 @@ var StoredScorer = class extends BaseResource {
3683
3700
  super(options);
3684
3701
  this.storedScorerId = storedScorerId;
3685
3702
  }
3703
+ storedScorerId;
3686
3704
  /**
3687
3705
  * Retrieves details about the stored scorer definition
3688
3706
  * @param requestContext - Optional request context to pass as query parameter
@@ -3837,6 +3855,7 @@ var ToolProvider = class extends BaseResource {
3837
3855
  super(options);
3838
3856
  this.providerId = providerId;
3839
3857
  }
3858
+ providerId;
3840
3859
  /**
3841
3860
  * Lists available toolkits from this provider
3842
3861
  * @returns Promise containing list of toolkits
@@ -3886,6 +3905,7 @@ var ProcessorProvider = class extends BaseResource {
3886
3905
  super(options);
3887
3906
  this.providerId = providerId;
3888
3907
  }
3908
+ providerId;
3889
3909
  /**
3890
3910
  * Gets details about this processor provider and its available processors
3891
3911
  * @returns Promise containing provider info and processor list
@@ -3905,6 +3925,9 @@ var WorkspaceSkillResource = class extends BaseResource {
3905
3925
  this.basePath = `/workspaces/${encodeURIComponent(this.workspaceId)}/skills/${encodeURIComponent(this.skillName)}`;
3906
3926
  this.pathQuery = this.skillPath ? `?path=${encodeURIComponent(this.skillPath)}` : "";
3907
3927
  }
3928
+ workspaceId;
3929
+ skillName;
3930
+ skillPath;
3908
3931
  basePath;
3909
3932
  pathQuery;
3910
3933
  /**
@@ -4124,6 +4147,7 @@ var StoredSkill = class extends BaseResource {
4124
4147
  super(options);
4125
4148
  this.storedSkillId = storedSkillId;
4126
4149
  }
4150
+ storedSkillId;
4127
4151
  /**
4128
4152
  * Retrieves details about the stored skill
4129
4153
  * @param requestContext - Optional request context to pass as query parameter
@@ -4220,6 +4244,7 @@ var ResponsesStream = class {
4220
4244
  constructor(response) {
4221
4245
  this.response = response;
4222
4246
  }
4247
+ response;
4223
4248
  asResponse() {
4224
4249
  return this.response;
4225
4250
  }