feat(model): add ServerConfig and ClientConfig (#1266)
This commit is contained in:
parent
fbfc5cc96e
commit
165ff92df1
1 changed files with 331 additions and 303 deletions
|
|
@ -6,7 +6,7 @@ use common::handlers::TestServer;
|
|||
use rmcp::{
|
||||
ServerHandler, ServiceExt,
|
||||
model::{
|
||||
ClientJsonRpcMessage, InitializeResult, ProtocolVersion, ServerCapabilities,
|
||||
ClientJsonRpcMessage, ProtocolVersion, ServerCapabilities, ServerConfig,
|
||||
ServerJsonRpcMessage, ServerResult,
|
||||
},
|
||||
transport::{IntoTransport, Transport},
|
||||
|
|
@ -281,8 +281,8 @@ async fn server_falls_back_when_client_protocol_version_unknown() {
|
|||
struct PinnedServer;
|
||||
|
||||
impl ServerHandler for PinnedServer {
|
||||
fn get_info(&self) -> InitializeResult {
|
||||
InitializeResult::new(ServerCapabilities::builder().build())
|
||||
fn get_info(&self) -> ServerConfig {
|
||||
ServerConfig::new(ServerCapabilities::builder().build())
|
||||
.with_protocol_version(ProtocolVersion::V_2025_06_18)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue