@mastra/client-js 0.0.0-extract-tool-ui-inp-playground-ui-20251023135343 → 0.0.0-extract-tool-ui-inp-playground-ui-20251024041825
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 +5 -3
- package/dist/index.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/resources/agent.d.ts.map +1 -1
- package/dist/utils/process-mastra-stream.d.ts.map +1 -1
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
-
## 0.0.0-extract-tool-ui-inp-playground-ui-
|
|
3
|
+
## 0.0.0-extract-tool-ui-inp-playground-ui-20251024041825
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
9
|
+
- Fix error handling and serialization in agent streaming to ensure errors are consistently exposed and preserved. ([#9144](https://github.com/mastra-ai/mastra/pull/9144))
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394), [`6c049d9`](https://github.com/mastra-ai/mastra/commit/6c049d94063fdcbd5b81c4912a2bf82a92c9cc0b), [`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`c576fc0`](https://github.com/mastra-ai/mastra/commit/c576fc0b100b2085afded91a37c97a0ea0ec09c7), [`d36cfbb`](https://github.com/mastra-ai/mastra/commit/d36cfbbb6565ba5f827883cc9bb648eb14befdc1), [`2c4438b`](https://github.com/mastra-ai/mastra/commit/2c4438b87817ab7eed818c7990fef010475af1a3)]:
|
|
12
|
+
- @mastra/core@0.0.0-extract-tool-ui-inp-playground-ui-20251024041825
|
|
11
13
|
|
|
12
14
|
## 0.16.4
|
|
13
15
|
|
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var uiUtils = require('@ai-sdk/ui-utils');
|
|
4
4
|
var uuid = require('@lukeed/uuid');
|
|
5
|
+
var error = require('@mastra/core/error');
|
|
5
6
|
var runtimeContext = require('@mastra/core/runtime-context');
|
|
6
7
|
var isVercelTool = require('@mastra/core/tools/is-vercel-tool');
|
|
7
8
|
var zod = require('zod');
|
|
@@ -100,11 +101,15 @@ async function sharedProcessMastraStream({
|
|
|
100
101
|
console.info("\u{1F3C1} Stream finished");
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
104
|
+
let json;
|
|
103
105
|
try {
|
|
104
|
-
|
|
105
|
-
await onChunk(json);
|
|
106
|
+
json = JSON.parse(data);
|
|
106
107
|
} catch (error) {
|
|
107
108
|
console.error("\u274C JSON parse error:", error, "Data:", data);
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (json) {
|
|
112
|
+
await onChunk(json);
|
|
108
113
|
}
|
|
109
114
|
}
|
|
110
115
|
}
|
|
@@ -951,7 +956,10 @@ var Agent = class extends BaseResource {
|
|
|
951
956
|
break;
|
|
952
957
|
}
|
|
953
958
|
case "error": {
|
|
954
|
-
throw
|
|
959
|
+
throw error.getErrorFromUnknown(chunk.payload.error, {
|
|
960
|
+
fallbackMessage: "Unknown error in stream",
|
|
961
|
+
supportSerialization: false
|
|
962
|
+
});
|
|
955
963
|
}
|
|
956
964
|
case "data": {
|
|
957
965
|
data.push(...chunk.payload.data);
|