Skip to content

Commit

Permalink
Merge pull request #98 from modelcontextprotocol/jerome/fix/propagate…
Browse files Browse the repository at this point in the history
…-notification-params

fix: propagate notification params
  • Loading branch information
jerome3o-anthropic authored Dec 16, 2024
2 parents 2a3cab2 + 7865fcf commit 422a535
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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)",
Expand Down
4 changes: 2 additions & 2 deletions src/shared/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -289,7 +289,7 @@ export abstract class Protocol<
return;
}

handler({ progress, total });
handler(params);
}

private _onresponse(response: JSONRPCResponse | JSONRPCError): void {
Expand Down

0 comments on commit 422a535

Please sign in to comment.