ai 6.0.0-beta.32 → 6.0.0-beta.34
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 +12 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -7
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/dist/mcp-stdio/index.js +5 -1
- package/dist/mcp-stdio/index.js.map +1 -1
- package/dist/mcp-stdio/index.mjs +5 -1
- package/dist/mcp-stdio/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -192,10 +192,14 @@ var MCPClientError = class extends AISDKError5 {
|
|
|
192
192
|
constructor({
|
|
193
193
|
name: name17 = "MCPClientError",
|
|
194
194
|
message,
|
|
195
|
-
cause
|
|
195
|
+
cause,
|
|
196
|
+
data,
|
|
197
|
+
code
|
|
196
198
|
}) {
|
|
197
199
|
super({ name: name17, message, cause });
|
|
198
200
|
this[_a5] = true;
|
|
201
|
+
this.data = data;
|
|
202
|
+
this.code = code;
|
|
199
203
|
}
|
|
200
204
|
static isInstance(error) {
|
|
201
205
|
return AISDKError5.hasMarker(error, marker5);
|
|
@@ -716,7 +720,7 @@ import {
|
|
|
716
720
|
} from "@ai-sdk/provider-utils";
|
|
717
721
|
|
|
718
722
|
// src/version.ts
|
|
719
|
-
var VERSION = true ? "6.0.0-beta.
|
|
723
|
+
var VERSION = true ? "6.0.0-beta.34" : "0.0.0-test";
|
|
720
724
|
|
|
721
725
|
// src/util/download/download.ts
|
|
722
726
|
var download = async ({ url }) => {
|
|
@@ -2782,17 +2786,21 @@ async function generateText({
|
|
|
2782
2786
|
steps,
|
|
2783
2787
|
totalUsage
|
|
2784
2788
|
}));
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
resolvedOutput: await (output == null ? void 0 : output.parseOutput(
|
|
2789
|
+
let resolvedOutput;
|
|
2790
|
+
if (lastStep.finishReason === "stop") {
|
|
2791
|
+
resolvedOutput = await (output == null ? void 0 : output.parseOutput(
|
|
2789
2792
|
{ text: lastStep.text },
|
|
2790
2793
|
{
|
|
2791
2794
|
response: lastStep.response,
|
|
2792
2795
|
usage: lastStep.usage,
|
|
2793
2796
|
finishReason: lastStep.finishReason
|
|
2794
2797
|
}
|
|
2795
|
-
))
|
|
2798
|
+
));
|
|
2799
|
+
}
|
|
2800
|
+
return new DefaultGenerateTextResult({
|
|
2801
|
+
steps,
|
|
2802
|
+
totalUsage,
|
|
2803
|
+
resolvedOutput
|
|
2796
2804
|
});
|
|
2797
2805
|
}
|
|
2798
2806
|
});
|
|
@@ -9560,6 +9568,8 @@ var DefaultMCPClient = class {
|
|
|
9560
9568
|
handler(
|
|
9561
9569
|
"result" in response ? response : new MCPClientError({
|
|
9562
9570
|
message: response.error.message,
|
|
9571
|
+
code: response.error.code,
|
|
9572
|
+
data: response.error.data,
|
|
9563
9573
|
cause: response.error
|
|
9564
9574
|
})
|
|
9565
9575
|
);
|