From 881a0ce0e8bb98a81621e43c176f35b65c21accf Mon Sep 17 00:00:00 2001 From: Jerome Date: Mon, 16 Dec 2024 16:50:05 +0000 Subject: [PATCH 1/2] Destructured progress and total from notification params object --- src/shared/protocol.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/protocol.ts b/src/shared/protocol.ts index 42cec89a..f430b319 100644 --- a/src/shared/protocol.ts +++ b/src/shared/protocol.ts @@ -278,7 +278,7 @@ export abstract class Protocol< } private _onprogress(notification: ProgressNotification): void { - const { progress, total, progressToken } = notification.params; + const { progressToken, ...params } = notification.params; const handler = this._progressHandlers.get(Number(progressToken)); if (handler === undefined) { this._onerror( @@ -289,7 +289,7 @@ export abstract class Protocol< return; } - handler({ progress, total }); + handler(params); } private _onresponse(response: JSONRPCResponse | JSONRPCError): void { From 7865fcf4ed3585ee2edb6c2b3a96a55ba8626400 Mon Sep 17 00:00:00 2001 From: Jerome Date: Mon, 16 Dec 2024 16:51:51 +0000 Subject: [PATCH 2/2] Bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 63fb871d..790b5e1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@modelcontextprotocol/sdk", - "version": "1.0.3", + "version": "1.0.4", "description": "Model Context Protocol implementation for TypeScript", "license": "MIT", "author": "Anthropic, PBC (https://anthropic.com)",