@mastra/client-js 0.0.0-fix-zod-to-json-schema-ref-strategy-20250910193441 → 0.0.0-fix-bundle-cleanup-20250911062914
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 +6 -4
- package/dist/index.cjs +43 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +43 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/agent.d.ts +7 -2
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/types.d.ts +8 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts +5 -1
- package/dist/utils/process-mastra-stream.d.ts.map +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
-
## 0.0.0-fix-
|
|
3
|
+
## 0.0.0-fix-bundle-cleanup-20250911062914
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Update peerdep of @mastra/core ([`01fa4aa`](https://github.com/mastra-ai/mastra/commit/01fa4aaa634303fca93a8834160c69aeb71c400d))
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
9
|
+
- Change SchemaCompat zodToJsonSchema ref strategy from none to relative, leading to less schema warnings and smaller converted schema sizes ([#7697](https://github.com/mastra-ai/mastra/pull/7697))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`b4379f7`](https://github.com/mastra-ai/mastra/commit/b4379f703fd74474f253420e8c3a684f2c4b2f8e), [`dd9119b`](https://github.com/mastra-ai/mastra/commit/dd9119b175a8f389082f75c12750e51f96d65dca), [`d34aaa1`](https://github.com/mastra-ai/mastra/commit/d34aaa1da5d3c5f991740f59e2fe6d28d3e2dd91), [`ce1e580`](https://github.com/mastra-ai/mastra/commit/ce1e580f6391e94a0c6816a9c5db0a21566a262f), [`b2babfa`](https://github.com/mastra-ai/mastra/commit/b2babfa9e75b22f2759179e71d8473f6dc5421ed), [`d8c3ba5`](https://github.com/mastra-ai/mastra/commit/d8c3ba516f4173282d293f7e64769cfc8738d360), [`3863c52`](https://github.com/mastra-ai/mastra/commit/3863c52d44b4e5779968b802d977e87adf939d8e), [`6424c7e`](https://github.com/mastra-ai/mastra/commit/6424c7ec38b6921d66212431db1e0958f441b2a7), [`db94750`](https://github.com/mastra-ai/mastra/commit/db94750a41fd29b43eb1f7ce8e97ba8b9978c91b), [`a66a371`](https://github.com/mastra-ai/mastra/commit/a66a3716b00553d7f01842be9deb34f720b10fab), [`69fc3cd`](https://github.com/mastra-ai/mastra/commit/69fc3cd0fd814901785bdcf49bf536ab1e7fd975), [`0dcfeec`](https://github.com/mastra-ai/mastra/commit/0dcfeec18c35e7a0f5b82757599d2c12eed54400)]:
|
|
12
|
+
- @mastra/core@0.0.0-fix-bundle-cleanup-20250911062914
|
|
11
13
|
|
|
12
14
|
## 0.12.2
|
|
13
15
|
|
package/dist/index.cjs
CHANGED
|
@@ -65,7 +65,7 @@ function processClientTools(clientTools) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
// src/utils/process-mastra-stream.ts
|
|
68
|
-
async function
|
|
68
|
+
async function sharedProcessMastraStream({
|
|
69
69
|
stream,
|
|
70
70
|
onChunk
|
|
71
71
|
}) {
|
|
@@ -99,6 +99,24 @@ async function processMastraStream({
|
|
|
99
99
|
reader.releaseLock();
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
+
async function processMastraNetworkStream({
|
|
103
|
+
stream,
|
|
104
|
+
onChunk
|
|
105
|
+
}) {
|
|
106
|
+
return sharedProcessMastraStream({
|
|
107
|
+
stream,
|
|
108
|
+
onChunk
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async function processMastraStream({
|
|
112
|
+
stream,
|
|
113
|
+
onChunk
|
|
114
|
+
}) {
|
|
115
|
+
return sharedProcessMastraStream({
|
|
116
|
+
stream,
|
|
117
|
+
onChunk
|
|
118
|
+
});
|
|
119
|
+
}
|
|
102
120
|
|
|
103
121
|
// src/resources/base.ts
|
|
104
122
|
var BaseResource = class {
|
|
@@ -1064,6 +1082,30 @@ var Agent = class extends BaseResource {
|
|
|
1064
1082
|
}
|
|
1065
1083
|
return response;
|
|
1066
1084
|
}
|
|
1085
|
+
async network(params) {
|
|
1086
|
+
const response = await this.request(`/api/agents/${this.agentId}/network`, {
|
|
1087
|
+
method: "POST",
|
|
1088
|
+
body: params,
|
|
1089
|
+
stream: true
|
|
1090
|
+
});
|
|
1091
|
+
if (!response.body) {
|
|
1092
|
+
throw new Error("No response body");
|
|
1093
|
+
}
|
|
1094
|
+
const streamResponse = new Response(response.body, {
|
|
1095
|
+
status: response.status,
|
|
1096
|
+
statusText: response.statusText,
|
|
1097
|
+
headers: response.headers
|
|
1098
|
+
});
|
|
1099
|
+
streamResponse.processDataStream = async ({
|
|
1100
|
+
onChunk
|
|
1101
|
+
}) => {
|
|
1102
|
+
await processMastraNetworkStream({
|
|
1103
|
+
stream: streamResponse.body,
|
|
1104
|
+
onChunk
|
|
1105
|
+
});
|
|
1106
|
+
};
|
|
1107
|
+
return streamResponse;
|
|
1108
|
+
}
|
|
1067
1109
|
async streamVNext(params) {
|
|
1068
1110
|
const processedParams = {
|
|
1069
1111
|
...params,
|