@ai-sdk/mcp 2.0.78 → 2.0.79
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 +9 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp-stdio/index.d.ts +1 -0
- package/dist/mcp-stdio/index.d.ts.map +1 -1
- package/dist/mcp-stdio/index.js +1 -1
- package/dist/mcp-stdio/index.js.map +1 -1
- package/package.json +3 -3
- package/src/tool/mcp-sse-transport.ts +5 -1
- package/src/tool/mcp-stdio/create-child-process.ts +1 -1
- package/src/tool/mcp-stdio/mcp-stdio-transport.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @ai-sdk/mcp
|
|
2
2
|
|
|
3
|
+
## 2.0.79
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fce9210: fix(mcp): support shell option in stdio transport and extract response body in SSE transport errors
|
|
8
|
+
- Updated dependencies [60cc252]
|
|
9
|
+
- @ai-sdk/provider@4.0.30
|
|
10
|
+
- @ai-sdk/provider-utils@5.0.63
|
|
11
|
+
|
|
3
12
|
## 2.0.78
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -526,7 +526,7 @@ function createManagedMCPEvents(operations, list) {
|
|
|
526
526
|
}
|
|
527
527
|
//#endregion
|
|
528
528
|
//#region src/version.ts
|
|
529
|
-
const VERSION = "2.0.
|
|
529
|
+
const VERSION = "2.0.79";
|
|
530
530
|
//#endregion
|
|
531
531
|
//#region src/tool/oauth-types.ts
|
|
532
532
|
/**
|
|
@@ -1537,9 +1537,15 @@ var SseMCPTransport = class {
|
|
|
1537
1537
|
return establishConnection(true);
|
|
1538
1538
|
}
|
|
1539
1539
|
if (!response.ok || !response.body) {
|
|
1540
|
-
|
|
1540
|
+
const text = await response.text().catch(() => null);
|
|
1541
|
+
let errorMessage = `MCP SSE Transport Error: ${response.status} ${response.statusText}${text ? `: ${text}` : ""}`;
|
|
1541
1542
|
if (response.status === 405) errorMessage += ". This server does not support SSE transport. Try using `http` transport instead";
|
|
1542
|
-
const error = new MCPClientError({
|
|
1543
|
+
const error = new MCPClientError({
|
|
1544
|
+
message: errorMessage,
|
|
1545
|
+
statusCode: response.status,
|
|
1546
|
+
url: this.url.href,
|
|
1547
|
+
responseBody: text ?? void 0
|
|
1548
|
+
});
|
|
1543
1549
|
this.onerror?.(error);
|
|
1544
1550
|
return reject(error);
|
|
1545
1551
|
}
|