@ai-sdk/mcp 1.0.44 → 1.0.45
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 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/tool/mcp-client.ts +9 -0
package/package.json
CHANGED
package/src/tool/mcp-client.ts
CHANGED
|
@@ -783,6 +783,15 @@ class DefaultMCPClient implements MCPClient {
|
|
|
783
783
|
|
|
784
784
|
private async onRequestMessage(request: JSONRPCRequest): Promise<void> {
|
|
785
785
|
try {
|
|
786
|
+
if (request.method === 'ping') {
|
|
787
|
+
await this.transport.send({
|
|
788
|
+
jsonrpc: '2.0',
|
|
789
|
+
id: request.id,
|
|
790
|
+
result: {},
|
|
791
|
+
});
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
|
|
786
795
|
if (request.method !== 'elicitation/create') {
|
|
787
796
|
await this.transport.send({
|
|
788
797
|
jsonrpc: '2.0',
|