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
|
|
@ -18,7 +18,7 @@ use std::time::Duration;
|
|||
use futures::StreamExt;
|
||||
use rmcp::{
|
||||
RoleServer, ServerHandler,
|
||||
model::{Implementation, InitializeResult, ServerCapabilities, ToolsCapability},
|
||||
model::{Implementation, ServerCapabilities, ServerConfig, ToolsCapability},
|
||||
service::NotificationContext,
|
||||
transport::streamable_http_server::{
|
||||
StreamableHttpServerConfig, StreamableHttpService, session::local::LocalSessionManager,
|
||||
|
|
@ -45,8 +45,8 @@ impl TestServer {
|
|||
}
|
||||
|
||||
impl ServerHandler for TestServer {
|
||||
fn get_info(&self) -> InitializeResult {
|
||||
InitializeResult::new(
|
||||
fn get_info(&self) -> ServerConfig {
|
||||
ServerConfig::new(
|
||||
ServerCapabilities::builder()
|
||||
.enable_tools_with({
|
||||
let mut tools = ToolsCapability::default();
|
||||
|
|
|
|||
Loading…
Reference in a new issue