11import { ZodType , z } from 'zod' ;
2- import { ClientCapabilities , ErrorCode , McpError , Notification , Request , Result , ServerCapabilities } from '../types.js' ;
2+ import { ClientCapabilities , ErrorCode , McpError , NotificationGeneric , RequestGeneric , Result , ServerCapabilities } from '../types.js' ;
33import { Protocol , mergeCapabilities } from './protocol.js' ;
44import { Transport } from './transport.js' ;
55import { MockInstance } from 'vitest' ;
@@ -18,14 +18,14 @@ class MockTransport implements Transport {
1818}
1919
2020describe ( 'protocol tests' , ( ) => {
21- let protocol : Protocol < Request , Notification , Result > ;
21+ let protocol : Protocol < RequestGeneric , NotificationGeneric , Result > ;
2222 let transport : MockTransport ;
2323 let sendSpy : MockInstance ;
2424
2525 beforeEach ( ( ) => {
2626 transport = new MockTransport ( ) ;
2727 sendSpy = vi . spyOn ( transport , 'send' ) ;
28- protocol = new ( class extends Protocol < Request , Notification , Result > {
28+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
2929 protected assertCapabilityForMethod ( ) : void { }
3030 protected assertNotificationCapability ( ) : void { }
3131 protected assertRequestHandlerCapability ( ) : void { }
@@ -479,7 +479,7 @@ describe('protocol tests', () => {
479479
480480 it ( 'should NOT debounce a notification that has parameters' , async ( ) => {
481481 // ARRANGE
482- protocol = new ( class extends Protocol < Request , Notification , Result > {
482+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
483483 protected assertCapabilityForMethod ( ) : void { }
484484 protected assertNotificationCapability ( ) : void { }
485485 protected assertRequestHandlerCapability ( ) : void { }
@@ -500,7 +500,7 @@ describe('protocol tests', () => {
500500
501501 it ( 'should NOT debounce a notification that has a relatedRequestId' , async ( ) => {
502502 // ARRANGE
503- protocol = new ( class extends Protocol < Request , Notification , Result > {
503+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
504504 protected assertCapabilityForMethod ( ) : void { }
505505 protected assertNotificationCapability ( ) : void { }
506506 protected assertRequestHandlerCapability ( ) : void { }
@@ -519,7 +519,7 @@ describe('protocol tests', () => {
519519
520520 it ( 'should clear pending debounced notifications on connection close' , async ( ) => {
521521 // ARRANGE
522- protocol = new ( class extends Protocol < Request , Notification , Result > {
522+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
523523 protected assertCapabilityForMethod ( ) : void { }
524524 protected assertNotificationCapability ( ) : void { }
525525 protected assertRequestHandlerCapability ( ) : void { }
@@ -543,7 +543,7 @@ describe('protocol tests', () => {
543543
544544 it ( 'should debounce multiple synchronous calls when params property is omitted' , async ( ) => {
545545 // ARRANGE
546- protocol = new ( class extends Protocol < Request , Notification , Result > {
546+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
547547 protected assertCapabilityForMethod ( ) : void { }
548548 protected assertNotificationCapability ( ) : void { }
549549 protected assertRequestHandlerCapability ( ) : void { }
@@ -570,7 +570,7 @@ describe('protocol tests', () => {
570570
571571 it ( 'should debounce calls when params is explicitly undefined' , async ( ) => {
572572 // ARRANGE
573- protocol = new ( class extends Protocol < Request , Notification , Result > {
573+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
574574 protected assertCapabilityForMethod ( ) : void { }
575575 protected assertNotificationCapability ( ) : void { }
576576 protected assertRequestHandlerCapability ( ) : void { }
@@ -595,7 +595,7 @@ describe('protocol tests', () => {
595595
596596 it ( 'should send non-debounced notifications immediately and multiple times' , async ( ) => {
597597 // ARRANGE
598- protocol = new ( class extends Protocol < Request , Notification , Result > {
598+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
599599 protected assertCapabilityForMethod ( ) : void { }
600600 protected assertNotificationCapability ( ) : void { }
601601 protected assertRequestHandlerCapability ( ) : void { }
@@ -628,7 +628,7 @@ describe('protocol tests', () => {
628628
629629 it ( 'should handle sequential batches of debounced notifications correctly' , async ( ) => {
630630 // ARRANGE
631- protocol = new ( class extends Protocol < Request , Notification , Result > {
631+ protocol = new ( class extends Protocol < RequestGeneric , NotificationGeneric , Result > {
632632 protected assertCapabilityForMethod ( ) : void { }
633633 protected assertNotificationCapability ( ) : void { }
634634 protected assertRequestHandlerCapability ( ) : void { }
0 commit comments