@@ -1004,6 +1004,26 @@ impl From<RootsListChangedNotification> for NotificationFromClient {
10041004 Self :: ClientNotification ( value. into ( ) )
10051005 }
10061006}
1007+ impl From < CancelledNotification > for ClientJsonrpcNotification {
1008+ fn from ( value : CancelledNotification ) -> Self {
1009+ Self :: new ( value. into ( ) )
1010+ }
1011+ }
1012+ impl From < InitializedNotification > for ClientJsonrpcNotification {
1013+ fn from ( value : InitializedNotification ) -> Self {
1014+ Self :: new ( value. into ( ) )
1015+ }
1016+ }
1017+ impl From < ProgressNotification > for ClientJsonrpcNotification {
1018+ fn from ( value : ProgressNotification ) -> Self {
1019+ Self :: new ( value. into ( ) )
1020+ }
1021+ }
1022+ impl From < RootsListChangedNotification > for ClientJsonrpcNotification {
1023+ fn from ( value : RootsListChangedNotification ) -> Self {
1024+ Self :: new ( value. into ( ) )
1025+ }
1026+ }
10071027impl From < Result > for ResultFromClient {
10081028 fn from ( value : Result ) -> Self {
10091029 Self :: ClientResult ( value. into ( ) )
@@ -1093,6 +1113,41 @@ impl From<LoggingMessageNotification> for NotificationFromServer {
10931113 Self :: ServerNotification ( value. into ( ) )
10941114 }
10951115}
1116+ impl From < CancelledNotification > for ServerJsonrpcNotification {
1117+ fn from ( value : CancelledNotification ) -> Self {
1118+ Self :: new ( value. into ( ) )
1119+ }
1120+ }
1121+ impl From < ProgressNotification > for ServerJsonrpcNotification {
1122+ fn from ( value : ProgressNotification ) -> Self {
1123+ Self :: new ( value. into ( ) )
1124+ }
1125+ }
1126+ impl From < ResourceListChangedNotification > for ServerJsonrpcNotification {
1127+ fn from ( value : ResourceListChangedNotification ) -> Self {
1128+ Self :: new ( value. into ( ) )
1129+ }
1130+ }
1131+ impl From < ResourceUpdatedNotification > for ServerJsonrpcNotification {
1132+ fn from ( value : ResourceUpdatedNotification ) -> Self {
1133+ Self :: new ( value. into ( ) )
1134+ }
1135+ }
1136+ impl From < PromptListChangedNotification > for ServerJsonrpcNotification {
1137+ fn from ( value : PromptListChangedNotification ) -> Self {
1138+ Self :: new ( value. into ( ) )
1139+ }
1140+ }
1141+ impl From < ToolListChangedNotification > for ServerJsonrpcNotification {
1142+ fn from ( value : ToolListChangedNotification ) -> Self {
1143+ Self :: new ( value. into ( ) )
1144+ }
1145+ }
1146+ impl From < LoggingMessageNotification > for ServerJsonrpcNotification {
1147+ fn from ( value : LoggingMessageNotification ) -> Self {
1148+ Self :: new ( value. into ( ) )
1149+ }
1150+ }
10961151impl From < PingRequest > for RequestFromServer {
10971152 fn from ( value : PingRequest ) -> Self {
10981153 Self :: ServerRequest ( value. into ( ) )
@@ -1223,9 +1278,5 @@ mod tests {
12231278 ) ;
12241279 let result = detect_message_type ( & json ! ( message) ) ;
12251280 assert ! ( matches!( result, MessageTypes :: Error ) ) ;
1226-
1227- // default
1228- let result = detect_message_type ( & json ! ( { } ) ) ;
1229- assert ! ( matches!( result, MessageTypes :: Request ) ) ;
12301281 }
12311282}
0 commit comments