@mastra/client-js 0.15.2 → 0.16.0-alpha.1

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,25 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.16.0-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`1ed9670`](https://github.com/mastra-ai/mastra/commit/1ed9670d3ca50cb60dc2e517738c5eef3968ed27), [`158381d`](https://github.com/mastra-ai/mastra/commit/158381d39335be934b81ef8a1947bccace492c25), [`fb703b9`](https://github.com/mastra-ai/mastra/commit/fb703b9634eeaff1a6eb2b5531ce0f9e8fb04727), [`37a2314`](https://github.com/mastra-ai/mastra/commit/37a23148e0e5a3b40d4f9f098b194671a8a49faf), [`05a9dee`](https://github.com/mastra-ai/mastra/commit/05a9dee3d355694d28847bfffb6289657fcf7dfa), [`e3c1077`](https://github.com/mastra-ai/mastra/commit/e3c107763aedd1643d3def5df450c235da9ff76c), [`1bccdb3`](https://github.com/mastra-ai/mastra/commit/1bccdb33eb90cbeba2dc5ece1c2561fb774b26b6), [`5ef944a`](https://github.com/mastra-ai/mastra/commit/5ef944a3721d93105675cac2b2311432ff8cc393), [`d6b186f`](https://github.com/mastra-ai/mastra/commit/d6b186fb08f1caf1b86f73d3a5ee88fb999ca3be), [`65493b3`](https://github.com/mastra-ai/mastra/commit/65493b31c36f6fdb78f9679f7e1ecf0c250aa5ee), [`a998b8f`](https://github.com/mastra-ai/mastra/commit/a998b8f858091c2ec47683e60766cf12d03001e4), [`8a37bdd`](https://github.com/mastra-ai/mastra/commit/8a37bddb6d8614a32c5b70303d583d80c620ea61)]:
8
+ - @mastra/core@0.21.0-alpha.1
9
+
10
+ ## 0.16.0-alpha.0
11
+
12
+ ### Minor Changes
13
+
14
+ - support model router in structured output and client-js ([#8686](https://github.com/mastra-ai/mastra/pull/8686))
15
+
16
+ ### Patch Changes
17
+
18
+ - Make sure to convert the agent instructions when showing them ([#8702](https://github.com/mastra-ai/mastra/pull/8702))
19
+
20
+ - Updated dependencies [[`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`ee68e82`](https://github.com/mastra-ai/mastra/commit/ee68e8289ea4408d29849e899bc6e78b3bd4e843), [`228228b`](https://github.com/mastra-ai/mastra/commit/228228b0b1de9291cb8887587f5cea1a8757ebad), [`ea33930`](https://github.com/mastra-ai/mastra/commit/ea339301e82d6318257720d811b043014ee44064), [`b5a66b7`](https://github.com/mastra-ai/mastra/commit/b5a66b748a14fc8b3f63b04642ddb9621fbcc9e0), [`135d6f2`](https://github.com/mastra-ai/mastra/commit/135d6f22a326ed1dffff858700669dff09d2c9eb), [`59d036d`](https://github.com/mastra-ai/mastra/commit/59d036d4c2706b430b0e3f1f1e0ee853ce16ca04)]:
21
+ - @mastra/core@0.21.0-alpha.0
22
+
3
23
  ## 0.15.2
4
24
 
5
25
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -703,7 +703,7 @@ var Agent = class extends BaseResource {
703
703
  clientTools: processClientTools(params.clientTools)
704
704
  };
705
705
  const { readable, writable } = new TransformStream();
706
- const response = await this.processStreamResponse(processedParams, writable);
706
+ const response = await this.processStreamResponseLegacy(processedParams, writable);
707
707
  const streamResponse = new Response(readable, {
708
708
  status: response.status,
709
709
  statusText: response.statusText,
@@ -978,7 +978,7 @@ var Agent = class extends BaseResource {
978
978
  });
979
979
  onFinish?.({ message, finishReason, usage });
980
980
  }
981
- async processStreamResponse_vNext(processedParams, writable) {
981
+ async processStreamResponse(processedParams, writable) {
982
982
  const response = await this.request(`/api/agents/${this.agentId}/stream`, {
983
983
  method: "POST",
984
984
  body: processedParams,
@@ -1072,7 +1072,7 @@ var Agent = class extends BaseResource {
1072
1072
  toolInvocation.result = result;
1073
1073
  }
1074
1074
  const updatedMessages = lastMessage != null ? [...messages.filter((m) => m.id !== lastMessage.id), lastMessage] : [...messages];
1075
- this.processStreamResponse_vNext(
1075
+ this.processStreamResponse(
1076
1076
  {
1077
1077
  ...processedParams,
1078
1078
  messages: updatedMessages
@@ -1148,7 +1148,7 @@ var Agent = class extends BaseResource {
1148
1148
  } : void 0
1149
1149
  };
1150
1150
  const { readable, writable } = new TransformStream();
1151
- const response = await this.processStreamResponse_vNext(processedParams, writable);
1151
+ const response = await this.processStreamResponse(processedParams, writable);
1152
1152
  const streamResponse = new Response(readable, {
1153
1153
  status: response.status,
1154
1154
  statusText: response.statusText,
@@ -1167,7 +1167,7 @@ var Agent = class extends BaseResource {
1167
1167
  /**
1168
1168
  * Processes the stream response and handles tool calls
1169
1169
  */
1170
- async processStreamResponse(processedParams, writable) {
1170
+ async processStreamResponseLegacy(processedParams, writable) {
1171
1171
  const response = await this.request(`/api/agents/${this.agentId}/stream-legacy`, {
1172
1172
  method: "POST",
1173
1173
  body: processedParams,
@@ -1252,7 +1252,7 @@ var Agent = class extends BaseResource {
1252
1252
  } finally {
1253
1253
  writer.releaseLock();
1254
1254
  }
1255
- this.processStreamResponse(
1255
+ this.processStreamResponseLegacy(
1256
1256
  {
1257
1257
  ...processedParams,
1258
1258
  messages: [...messages.filter((m) => m.id !== lastMessage.id), lastMessage]