@mastra/client-js 0.0.0-fix-cloud-peer-deps-loggers-20250929204101 → 0.0.0-fix-network-silence-20250930164151

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,6 +1,6 @@
1
1
  # @mastra/client-js
2
2
 
3
- ## 0.0.0-fix-cloud-peer-deps-loggers-20250929204101
3
+ ## 0.0.0-fix-network-silence-20250930164151
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -10,10 +10,14 @@
10
10
 
11
11
  - Fix duplicate messages being created using clientTools with client-js sdk ([#8187](https://github.com/mastra-ai/mastra/pull/8187))
12
12
 
13
+ - Fix hanging stream for non-self executing client-tools ([#8272](https://github.com/mastra-ai/mastra/pull/8272))
14
+
15
+ - Support passing tracing options for start/resume workflows for server APIs and client sdk ([#8277](https://github.com/mastra-ai/mastra/pull/8277))
16
+
13
17
  - Add server apis to get scores by span ([#8237](https://github.com/mastra-ai/mastra/pull/8237))
14
18
 
15
- - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`504438b`](https://github.com/mastra-ai/mastra/commit/504438b961bde211071186bba63a842c4e3db879), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`7fceb0a`](https://github.com/mastra-ai/mastra/commit/7fceb0a327d678e812f90f5387c5bc4f38bd039e), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`809eea0`](https://github.com/mastra-ai/mastra/commit/809eea092fa80c3f69b9eaf078d843b57fd2a88e), [`623ffaf`](https://github.com/mastra-ai/mastra/commit/623ffaf2d969e11e99a0224633cf7b5a0815c857), [`9fc1613`](https://github.com/mastra-ai/mastra/commit/9fc16136400186648880fd990119ac15f7c02ee4), [`61f62aa`](https://github.com/mastra-ai/mastra/commit/61f62aa31bc88fe4ddf8da6240dbcfbeb07358bd), [`db1891a`](https://github.com/mastra-ai/mastra/commit/db1891a4707443720b7cd8a260dc7e1d49b3609c), [`e8f379d`](https://github.com/mastra-ai/mastra/commit/e8f379d390efa264c4e0874f9ac0cf8839b07777), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5)]:
16
- - @mastra/core@0.0.0-fix-cloud-peer-deps-loggers-20250929204101
19
+ - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`504438b`](https://github.com/mastra-ai/mastra/commit/504438b961bde211071186bba63a842c4e3db879), [`b342a68`](https://github.com/mastra-ai/mastra/commit/b342a68e1399cf1ece9ba11bda112db89d21118c), [`7fceb0a`](https://github.com/mastra-ai/mastra/commit/7fceb0a327d678e812f90f5387c5bc4f38bd039e), [`303a9c0`](https://github.com/mastra-ai/mastra/commit/303a9c0d7dd58795915979f06a0512359e4532fb), [`370f8a6`](https://github.com/mastra-ai/mastra/commit/370f8a6480faec70fef18d72e5f7538f27004301), [`809eea0`](https://github.com/mastra-ai/mastra/commit/809eea092fa80c3f69b9eaf078d843b57fd2a88e), [`bbf6157`](https://github.com/mastra-ai/mastra/commit/bbf615725917bce0a8d1084aea934c326bd16a27), [`623ffaf`](https://github.com/mastra-ai/mastra/commit/623ffaf2d969e11e99a0224633cf7b5a0815c857), [`9fc1613`](https://github.com/mastra-ai/mastra/commit/9fc16136400186648880fd990119ac15f7c02ee4), [`61f62aa`](https://github.com/mastra-ai/mastra/commit/61f62aa31bc88fe4ddf8da6240dbcfbeb07358bd), [`db1891a`](https://github.com/mastra-ai/mastra/commit/db1891a4707443720b7cd8a260dc7e1d49b3609c), [`e8f379d`](https://github.com/mastra-ai/mastra/commit/e8f379d390efa264c4e0874f9ac0cf8839b07777), [`3e292ba`](https://github.com/mastra-ai/mastra/commit/3e292ba00837886d5d68a34cbc0d9b703c991883), [`418c136`](https://github.com/mastra-ai/mastra/commit/418c1366843d88e491bca3f87763899ce855ca29), [`c2a4919`](https://github.com/mastra-ai/mastra/commit/c2a4919ba6797d8bdb1509e02287496eef69303e), [`c84b7d0`](https://github.com/mastra-ai/mastra/commit/c84b7d093c4657772140cbfd2b15ef72f3315ed5), [`0130986`](https://github.com/mastra-ai/mastra/commit/0130986fc62d0edcc626dd593282661dbb9af141)]:
20
+ - @mastra/core@0.0.0-fix-network-silence-20250930164151
17
21
 
18
22
  ## 0.14.0-alpha.0
19
23
 
package/dist/index.cjs CHANGED
@@ -1040,9 +1040,11 @@ var Agent = class extends BaseResource {
1040
1040
  if (toolCall) {
1041
1041
  toolCalls.push(toolCall);
1042
1042
  }
1043
+ let shouldExecuteClientTool = false;
1043
1044
  for (const toolCall2 of toolCalls) {
1044
1045
  const clientTool = processedParams.clientTools?.[toolCall2.toolName];
1045
1046
  if (clientTool && clientTool.execute) {
1047
+ shouldExecuteClientTool = true;
1046
1048
  const result = await clientTool.execute(
1047
1049
  {
1048
1050
  context: toolCall2?.args,
@@ -1091,6 +1093,11 @@ var Agent = class extends BaseResource {
1091
1093
  });
1092
1094
  }
1093
1095
  }
1096
+ if (!shouldExecuteClientTool) {
1097
+ setTimeout(() => {
1098
+ writable.close();
1099
+ }, 0);
1100
+ }
1094
1101
  } else {
1095
1102
  setTimeout(() => {
1096
1103
  writable.close();
@@ -1703,10 +1710,20 @@ var Workflow = class extends BaseResource {
1703
1710
  return {
1704
1711
  runId,
1705
1712
  start: async (p) => {
1706
- return this.start({ runId, inputData: p.inputData, runtimeContext: p.runtimeContext });
1713
+ return this.start({
1714
+ runId,
1715
+ inputData: p.inputData,
1716
+ runtimeContext: p.runtimeContext,
1717
+ tracingOptions: p.tracingOptions
1718
+ });
1707
1719
  },
1708
1720
  startAsync: async (p) => {
1709
- return this.startAsync({ runId, inputData: p.inputData, runtimeContext: p.runtimeContext });
1721
+ return this.startAsync({
1722
+ runId,
1723
+ inputData: p.inputData,
1724
+ runtimeContext: p.runtimeContext,
1725
+ tracingOptions: p.tracingOptions
1726
+ });
1710
1727
  },
1711
1728
  watch: async (onRecord) => {
1712
1729
  return this.watch({ runId }, onRecord);
@@ -1715,10 +1732,22 @@ var Workflow = class extends BaseResource {
1715
1732
  return this.stream({ runId, inputData: p.inputData, runtimeContext: p.runtimeContext });
1716
1733
  },
1717
1734
  resume: async (p) => {
1718
- return this.resume({ runId, step: p.step, resumeData: p.resumeData, runtimeContext: p.runtimeContext });
1735
+ return this.resume({
1736
+ runId,
1737
+ step: p.step,
1738
+ resumeData: p.resumeData,
1739
+ runtimeContext: p.runtimeContext,
1740
+ tracingOptions: p.tracingOptions
1741
+ });
1719
1742
  },
1720
1743
  resumeAsync: async (p) => {
1721
- return this.resumeAsync({ runId, step: p.step, resumeData: p.resumeData, runtimeContext: p.runtimeContext });
1744
+ return this.resumeAsync({
1745
+ runId,
1746
+ step: p.step,
1747
+ resumeData: p.resumeData,
1748
+ runtimeContext: p.runtimeContext,
1749
+ tracingOptions: p.tracingOptions
1750
+ });
1722
1751
  },
1723
1752
  resumeStreamVNext: async (p) => {
1724
1753
  return this.resumeStreamVNext({
@@ -1739,7 +1768,7 @@ var Workflow = class extends BaseResource {
1739
1768
  const runtimeContext = parseClientRuntimeContext(params.runtimeContext);
1740
1769
  return this.request(`/api/workflows/${this.workflowId}/start?runId=${params.runId}`, {
1741
1770
  method: "POST",
1742
- body: { inputData: params?.inputData, runtimeContext }
1771
+ body: { inputData: params?.inputData, runtimeContext, tracingOptions: params.tracingOptions }
1743
1772
  });
1744
1773
  }
1745
1774
  /**
@@ -1751,6 +1780,7 @@ var Workflow = class extends BaseResource {
1751
1780
  step,
1752
1781
  runId,
1753
1782
  resumeData,
1783
+ tracingOptions,
1754
1784
  ...rest
1755
1785
  }) {
1756
1786
  const runtimeContext = parseClientRuntimeContext(rest.runtimeContext);
@@ -1759,7 +1789,8 @@ var Workflow = class extends BaseResource {
1759
1789
  body: {
1760
1790
  step,
1761
1791
  resumeData,
1762
- runtimeContext
1792
+ runtimeContext,
1793
+ tracingOptions
1763
1794
  }
1764
1795
  });
1765
1796
  }
@@ -1776,7 +1807,7 @@ var Workflow = class extends BaseResource {
1776
1807
  const runtimeContext = parseClientRuntimeContext(params.runtimeContext);
1777
1808
  return this.request(`/api/workflows/${this.workflowId}/start-async?${searchParams.toString()}`, {
1778
1809
  method: "POST",
1779
- body: { inputData: params.inputData, runtimeContext }
1810
+ body: { inputData: params.inputData, runtimeContext, tracingOptions: params.tracingOptions }
1780
1811
  });
1781
1812
  }
1782
1813
  /**
@@ -1940,7 +1971,8 @@ var Workflow = class extends BaseResource {
1940
1971
  body: {
1941
1972
  step: params.step,
1942
1973
  resumeData: params.resumeData,
1943
- runtimeContext
1974
+ runtimeContext,
1975
+ tracingOptions: params.tracingOptions
1944
1976
  }
1945
1977
  });
1946
1978
  }
@@ -1956,7 +1988,8 @@ var Workflow = class extends BaseResource {
1956
1988
  body: {
1957
1989
  step: params.step,
1958
1990
  resumeData: params.resumeData,
1959
- runtimeContext
1991
+ runtimeContext,
1992
+ tracingOptions: params.tracingOptions
1960
1993
  }
1961
1994
  });
1962
1995
  }