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
|
|
@ -113,8 +113,8 @@ fn finish_weather_request(
|
|||
}
|
||||
|
||||
impl ServerHandler for WeatherServer {
|
||||
fn get_info(&self) -> InitializeResult {
|
||||
let mut info = InitializeResult::new(ServerCapabilities::builder().enable_tools().build());
|
||||
fn get_info(&self) -> ServerConfig {
|
||||
let mut info = ServerConfig::new(ServerCapabilities::builder().enable_tools().build());
|
||||
// MRTR requires 2026-07-28 or newer.
|
||||
info.protocol_version = ProtocolVersion::V_2026_07_28;
|
||||
info
|
||||
|
|
@ -173,8 +173,8 @@ impl ServerHandler for WeatherServer {
|
|||
struct InteractiveClient;
|
||||
|
||||
impl ClientHandler for InteractiveClient {
|
||||
fn get_info(&self) -> InitializeRequestParams {
|
||||
InitializeRequestParams::new(
|
||||
fn get_info(&self) -> ClientConfig {
|
||||
ClientConfig::new(
|
||||
ClientCapabilities::builder().enable_elicitation().build(),
|
||||
Implementation::new("mrtr-example-client", env!("CARGO_PKG_VERSION")),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue