@mastra/client-js 0.10.6-alpha.4 → 0.10.6-alpha.5

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @mastra/client-js@0.10.6-alpha.4 build /home/runner/work/mastra/mastra/client-sdks/client-js
2
+ > @mastra/client-js@0.10.6-alpha.5 build /home/runner/work/mastra/mastra/client-sdks/client-js
3
3
  > tsup src/index.ts --format esm,cjs --dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,11 +9,11 @@
9
9
  CLI Cleaning output folder
10
10
  ESM Build start
11
11
  CJS Build start
12
- ESM dist/index.js 66.22 KB
13
- ESM ⚡️ Build success in 2601ms
14
- CJS dist/index.cjs 66.51 KB
15
- CJS ⚡️ Build success in 2613ms
12
+ ESM dist/index.js 66.19 KB
13
+ ESM ⚡️ Build success in 2323ms
14
+ CJS dist/index.cjs 66.48 KB
15
+ CJS ⚡️ Build success in 2324ms
16
16
  DTS Build start
17
- DTS ⚡️ Build success in 19250ms
17
+ DTS ⚡️ Build success in 18285ms
18
18
  DTS dist/index.d.ts 39.17 KB
19
19
  DTS dist/index.d.cts 39.17 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 0.10.6-alpha.5
4
+
5
+ ### Patch Changes
6
+
7
+ - bee3fe4: Fix client side tool calling
8
+ - @mastra/core@0.10.7-alpha.5
9
+
3
10
  ## 0.10.6-alpha.4
4
11
 
5
12
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -702,7 +702,7 @@ var Agent = class extends BaseResource {
702
702
  });
703
703
  streamResponse.processDataStream = async (options = {}) => {
704
704
  await uiUtils.processDataStream({
705
- stream: readable,
705
+ stream: streamResponse.body,
706
706
  ...options
707
707
  });
708
708
  };
@@ -725,9 +725,7 @@ var Agent = class extends BaseResource {
725
725
  let finishReasonToolCalls = false;
726
726
  let messages = [];
727
727
  let hasProcessedToolCalls = false;
728
- response.clone().body.pipeTo(writable, {
729
- preventClose: true
730
- });
728
+ response.clone().body.pipeTo(writable);
731
729
  await this.processChatResponse({
732
730
  stream: response.clone().body,
733
731
  update: ({ message }) => {
package/dist/index.js CHANGED
@@ -696,7 +696,7 @@ var Agent = class extends BaseResource {
696
696
  });
697
697
  streamResponse.processDataStream = async (options = {}) => {
698
698
  await processDataStream({
699
- stream: readable,
699
+ stream: streamResponse.body,
700
700
  ...options
701
701
  });
702
702
  };
@@ -719,9 +719,7 @@ var Agent = class extends BaseResource {
719
719
  let finishReasonToolCalls = false;
720
720
  let messages = [];
721
721
  let hasProcessedToolCalls = false;
722
- response.clone().body.pipeTo(writable, {
723
- preventClose: true
724
- });
722
+ response.clone().body.pipeTo(writable);
725
723
  await this.processChatResponse({
726
724
  stream: response.clone().body,
727
725
  update: ({ message }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/client-js",
3
- "version": "0.10.6-alpha.4",
3
+ "version": "0.10.6-alpha.5",
4
4
  "description": "The official TypeScript library for the Mastra Client API",
5
5
  "author": "",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "rxjs": "7.8.1",
34
34
  "zod": "^3.25.67",
35
35
  "zod-to-json-schema": "^3.24.5",
36
- "@mastra/core": "0.10.7-alpha.4"
36
+ "@mastra/core": "0.10.7-alpha.5"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "zod": "^3.0.0"
@@ -574,7 +574,7 @@ export class Agent extends BaseResource {
574
574
  // Add the processDataStream method to the response
575
575
  streamResponse.processDataStream = async (options = {}) => {
576
576
  await processDataStream({
577
- stream: readable as ReadableStream<Uint8Array>,
577
+ stream: streamResponse.body as ReadableStream<Uint8Array>,
578
578
  ...options,
579
579
  });
580
580
  };
@@ -604,10 +604,7 @@ export class Agent extends BaseResource {
604
604
  let messages: UIMessage[] = [];
605
605
  let hasProcessedToolCalls = false;
606
606
 
607
- // If no tool calls or they've been processed, pipe the original response
608
- response.clone().body!.pipeTo(writable, {
609
- preventClose: true,
610
- });
607
+ response.clone().body!.pipeTo(writable);
611
608
 
612
609
  await this.processChatResponse({
613
610
  stream: response.clone().body!,