style: fmt the project (#54)
add rustfmt.toml Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
parent
59bfb6e748
commit
0a2f13a1f4
36 changed files with 158 additions and 132 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -41,11 +41,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust fmt
|
||||||
uses: dtolnay/rust-toolchain@stable
|
run: rustup toolchain install nightly --component rustfmt
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
run: cargo fmt --all -- --check
|
run: cargo +nightly fmt --all -- --check
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: Lint with Clippy
|
name: Lint with Clippy
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
cargo-features = ["edition2024"]
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = ["crates/rmcp", "crates/rmcp-macros", "examples/*"]
|
members = ["crates/rmcp", "crates/rmcp-macros", "examples/*"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
@ -12,7 +14,7 @@ version = "0.1.5"
|
||||||
authors = ["4t145 <u4t145@163.com>"]
|
authors = ["4t145 <u4t145@163.com>"]
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
repository = "https://github.com/modelcontextprotocol/rust-sdk/"
|
repository = "https://github.com/modelcontextprotocol/rust-sdk/"
|
||||||
description = "Rust SDK for the Model Context Protocol"
|
description = "Rust SDK for Model Context Protocol"
|
||||||
keywords = ["mcp", "sdk", "tokio", "modelcontextprotocol"]
|
keywords = ["mcp", "sdk", "tokio", "modelcontextprotocol"]
|
||||||
homepage = "https://github.com/modelcontextprotocol/rust-sdk"
|
homepage = "https://github.com/modelcontextprotocol/rust-sdk"
|
||||||
categories = [
|
categories = [
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
|
cargo-features = ["edition2024"]
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "rmcp-macros"
|
name = "rmcp-macros"
|
||||||
license.workspace = true
|
license = { workspace = true }
|
||||||
version.workspace = true
|
version = { workspace = true }
|
||||||
edition.workspace = true
|
edition = { workspace = true }
|
||||||
repository.workspace = true
|
repository = { workspace = true }
|
||||||
homepage.workspace = true
|
homepage = { workspace = true }
|
||||||
readme.workspace = true
|
readme = { workspace = true }
|
||||||
description = "Rust SDK for Model Context Protocol macros library"
|
description = "Rust SDK for Model Context Protocol macros library"
|
||||||
documentation = "https://docs.rs/rmcp-macros"
|
documentation = "https://docs.rs/rmcp-macros"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
|
cargo-features = ["edition2024"]
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "rmcp"
|
name = "rmcp"
|
||||||
license.workspace = true
|
license = { workspace = true }
|
||||||
version.workspace = true
|
version = { workspace = true }
|
||||||
edition.workspace = true
|
edition = { workspace = true }
|
||||||
repository.workspace = true
|
repository = { workspace = true }
|
||||||
homepage.workspace = true
|
homepage = { workspace = true }
|
||||||
readme.workspace = true
|
readme = { workspace = true }
|
||||||
description = "Rust SDK for Model Context Protocol"
|
description = "Rust SDK for Model Context Protocol"
|
||||||
documentation = "https://docs.rs/rmcp"
|
documentation = "https://docs.rs/rmcp"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
use crate::error::Error as McpError;
|
use crate::{
|
||||||
use crate::model::*;
|
error::Error as McpError,
|
||||||
use crate::service::{Peer, RequestContext, RoleClient, Service, ServiceRole};
|
model::*,
|
||||||
|
service::{Peer, RequestContext, RoleClient, Service, ServiceRole},
|
||||||
|
};
|
||||||
|
|
||||||
impl<H: ClientHandler> Service<RoleClient> for H {
|
impl<H: ClientHandler> Service<RoleClient> for H {
|
||||||
async fn handle_request(
|
async fn handle_request(
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
use crate::error::Error as McpError;
|
use crate::{
|
||||||
use crate::model::*;
|
error::Error as McpError,
|
||||||
use crate::service::{Peer, RequestContext, RoleServer, Service, ServiceRole};
|
model::*,
|
||||||
|
service::{Peer, RequestContext, RoleServer, Service, ServiceRole},
|
||||||
|
};
|
||||||
|
|
||||||
mod resource;
|
mod resource;
|
||||||
pub mod tool;
|
pub mod tool;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,10 @@ pub use error::Error;
|
||||||
pub mod model;
|
pub mod model;
|
||||||
#[cfg(any(feature = "client", feature = "server"))]
|
#[cfg(any(feature = "client", feature = "server"))]
|
||||||
pub mod service;
|
pub mod service;
|
||||||
|
#[cfg(feature = "client")]
|
||||||
|
pub use handler::client::ClientHandler;
|
||||||
|
#[cfg(feature = "server")]
|
||||||
|
pub use handler::server::ServerHandler;
|
||||||
#[cfg(any(feature = "client", feature = "server"))]
|
#[cfg(any(feature = "client", feature = "server"))]
|
||||||
pub use service::{Peer, Service, ServiceError, ServiceExt};
|
pub use service::{Peer, Service, ServiceError, ServiceExt};
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
|
|
@ -13,21 +17,15 @@ pub use service::{RoleClient, serve_client};
|
||||||
#[cfg(feature = "server")]
|
#[cfg(feature = "server")]
|
||||||
pub use service::{RoleServer, serve_server};
|
pub use service::{RoleServer, serve_server};
|
||||||
|
|
||||||
#[cfg(feature = "client")]
|
|
||||||
pub use handler::client::ClientHandler;
|
|
||||||
#[cfg(feature = "server")]
|
|
||||||
pub use handler::server::ServerHandler;
|
|
||||||
|
|
||||||
pub mod handler;
|
pub mod handler;
|
||||||
pub mod transport;
|
pub mod transport;
|
||||||
|
|
||||||
#[cfg(all(feature = "macros", feature = "server"))]
|
|
||||||
pub use rmcp_macros::tool;
|
|
||||||
|
|
||||||
// re-export
|
// re-export
|
||||||
#[cfg(all(feature = "macros", feature = "server"))]
|
#[cfg(all(feature = "macros", feature = "server"))]
|
||||||
pub use paste::paste;
|
pub use paste::paste;
|
||||||
#[cfg(all(feature = "macros", feature = "server"))]
|
#[cfg(all(feature = "macros", feature = "server"))]
|
||||||
|
pub use rmcp_macros::tool;
|
||||||
|
#[cfg(all(feature = "macros", feature = "server"))]
|
||||||
pub use schemars;
|
pub use schemars;
|
||||||
#[cfg(feature = "macros")]
|
#[cfg(feature = "macros")]
|
||||||
pub use serde;
|
pub use serde;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ pub use capabilities::*;
|
||||||
pub use content::*;
|
pub use content::*;
|
||||||
pub use prompt::*;
|
pub use prompt::*;
|
||||||
pub use resource::*;
|
pub use resource::*;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
pub use tool::*;
|
pub use tool::*;
|
||||||
|
|
@ -964,9 +963,10 @@ impl From<CancelledNotification> for ClientNotification {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_notification_serde() {
|
fn test_notification_serde() {
|
||||||
let raw = json!( {
|
let raw = json!( {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
|
use chrono::{DateTime, Utc};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawResourceTemplate,
|
RawContent, RawEmbeddedResource, RawImageContent, RawResource, RawResourceTemplate,
|
||||||
RawTextContent, Role,
|
RawTextContent, Role,
|
||||||
};
|
};
|
||||||
use chrono::{DateTime, Utc};
|
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Default)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
use super::JsonObject;
|
use std::{collections::BTreeMap, marker::PhantomData};
|
||||||
|
|
||||||
use paste::paste;
|
use paste::paste;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use std::collections::BTreeMap;
|
|
||||||
use std::marker::PhantomData;
|
use super::JsonObject;
|
||||||
pub type ExperimentalCapabilities = BTreeMap<String, JsonObject>;
|
pub type ExperimentalCapabilities = BTreeMap<String, JsonObject>;
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Default)]
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
//! Content sent around agents, extensions, and LLMs
|
//! Content sent around agents, extensions, and LLMs
|
||||||
//! The various content types can be display to humans but also understood by models
|
//! The various content types can be display to humans but also understood by models
|
||||||
//! They include optional annotations used to help inform agent usage
|
//! They include optional annotations used to help inform agent usage
|
||||||
use super::resource::ResourceContents;
|
|
||||||
use super::{AnnotateAble, Annotated};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
|
use super::{AnnotateAble, Annotated, resource::ResourceContents};
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct RawTextContent {
|
pub struct RawTextContent {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
use super::content::{EmbeddedResource, ImageContent};
|
|
||||||
use super::resource::ResourceContents;
|
|
||||||
use super::{AnnotateAble, Annotations, RawEmbeddedResource, RawImageContent};
|
|
||||||
use base64::engine::{Engine, general_purpose::STANDARD as BASE64_STANDARD};
|
use base64::engine::{Engine, general_purpose::STANDARD as BASE64_STANDARD};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
use super::{
|
||||||
|
AnnotateAble, Annotations, RawEmbeddedResource, RawImageContent,
|
||||||
|
content::{EmbeddedResource, ImageContent},
|
||||||
|
resource::ResourceContents,
|
||||||
|
};
|
||||||
|
|
||||||
/// A prompt that can be used to generate text from a model
|
/// A prompt that can be used to generate text from a model
|
||||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
use crate::error::Error as McpError;
|
|
||||||
use crate::model::{
|
|
||||||
CancelledNotification, CancelledNotificationParam, JsonRpcMessage, Message, RequestId,
|
|
||||||
};
|
|
||||||
use crate::transport::IntoTransport;
|
|
||||||
use futures::future::BoxFuture;
|
use futures::future::BoxFuture;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
error::Error as McpError,
|
||||||
|
model::{
|
||||||
|
CancelledNotification, CancelledNotificationParam, JsonRpcMessage, Message, RequestId,
|
||||||
|
},
|
||||||
|
transport::IntoTransport,
|
||||||
|
};
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
mod client;
|
mod client;
|
||||||
#[cfg(feature = "client")]
|
#[cfg(feature = "client")]
|
||||||
|
|
@ -15,10 +18,9 @@ mod server;
|
||||||
pub use server::*;
|
pub use server::*;
|
||||||
#[cfg(feature = "tower")]
|
#[cfg(feature = "tower")]
|
||||||
mod tower;
|
mod tower;
|
||||||
|
use tokio_util::sync::CancellationToken;
|
||||||
#[cfg(feature = "tower")]
|
#[cfg(feature = "tower")]
|
||||||
pub use tower::*;
|
pub use tower::*;
|
||||||
|
|
||||||
use tokio_util::sync::CancellationToken;
|
|
||||||
use tracing::instrument;
|
use tracing::instrument;
|
||||||
#[derive(Error, Debug)]
|
#[derive(Error, Debug)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
|
|
@ -189,11 +191,12 @@ impl<R: ServiceRole, S: Service<R>> DynService<R> for S {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::{
|
||||||
use std::ops::Deref;
|
collections::HashMap,
|
||||||
use std::sync::Arc;
|
ops::Deref,
|
||||||
use std::sync::atomic::AtomicU32;
|
sync::{Arc, atomic::AtomicU32},
|
||||||
use std::time::Duration;
|
time::Duration,
|
||||||
|
};
|
||||||
|
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
use futures::{SinkExt, StreamExt};
|
||||||
|
|
||||||
|
use super::*;
|
||||||
use crate::model::{
|
use crate::model::{
|
||||||
CallToolRequest, CallToolRequestParam, CallToolResult, CancelledNotification,
|
CallToolRequest, CallToolRequestParam, CallToolResult, CancelledNotification,
|
||||||
CancelledNotificationParam, ClientInfo, ClientMessage, ClientNotification, ClientRequest,
|
CancelledNotificationParam, ClientInfo, ClientMessage, ClientNotification, ClientRequest,
|
||||||
|
|
@ -12,9 +15,6 @@ use crate::model::{
|
||||||
UnsubscribeRequest, UnsubscribeRequestParam,
|
UnsubscribeRequest, UnsubscribeRequestParam,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::*;
|
|
||||||
use futures::{SinkExt, StreamExt};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||||
pub struct RoleClient;
|
pub struct RoleClient;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
use futures::{SinkExt, StreamExt};
|
||||||
|
|
||||||
|
use super::*;
|
||||||
use crate::model::{
|
use crate::model::{
|
||||||
CancelledNotification, CancelledNotificationParam, ClientInfo, ClientNotification,
|
CancelledNotification, CancelledNotificationParam, ClientInfo, ClientNotification,
|
||||||
ClientRequest, ClientResult, CreateMessageRequest, CreateMessageRequestParam,
|
ClientRequest, ClientResult, CreateMessageRequest, CreateMessageRequestParam,
|
||||||
|
|
@ -8,9 +11,6 @@ use crate::model::{
|
||||||
ServerResult, ToolListChangedNotification,
|
ServerResult, ToolListChangedNotification,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::*;
|
|
||||||
use futures::{SinkExt, StreamExt};
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
||||||
pub struct RoleServer;
|
pub struct RoleServer;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,8 @@ use tokio::{
|
||||||
process::{ChildStdin, ChildStdout},
|
process::{ChildStdin, ChildStdout},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::service::{RxJsonRpcMessage, ServiceRole, TxJsonRpcMessage};
|
|
||||||
|
|
||||||
use super::IntoTransport;
|
use super::IntoTransport;
|
||||||
|
use crate::service::{RxJsonRpcMessage, ServiceRole, TxJsonRpcMessage};
|
||||||
|
|
||||||
pub(crate) fn child_process(
|
pub(crate) fn child_process(
|
||||||
mut child: tokio::process::Child,
|
mut child: tokio::process::Child,
|
||||||
|
|
|
||||||
|
|
@ -4,16 +4,14 @@ use std::marker::PhantomData;
|
||||||
use futures::{Sink, SinkExt, Stream, StreamExt};
|
use futures::{Sink, SinkExt, Stream, StreamExt};
|
||||||
use serde::{Serialize, de::DeserializeOwned};
|
use serde::{Serialize, de::DeserializeOwned};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
use tokio::io::{AsyncRead, AsyncWrite};
|
use tokio::io::{AsyncRead, AsyncWrite};
|
||||||
use tokio_util::{
|
use tokio_util::{
|
||||||
bytes::{Buf, BufMut, BytesMut},
|
bytes::{Buf, BufMut, BytesMut},
|
||||||
codec::{Decoder, Encoder, FramedRead, FramedWrite},
|
codec::{Decoder, Encoder, FramedRead, FramedWrite},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::service::{RxJsonRpcMessage, ServiceRole, TxJsonRpcMessage};
|
|
||||||
|
|
||||||
use super::IntoTransport;
|
use super::IntoTransport;
|
||||||
|
use crate::service::{RxJsonRpcMessage, ServiceRole, TxJsonRpcMessage};
|
||||||
|
|
||||||
#[cfg(feature = "transport-io")]
|
#[cfg(feature = "transport-io")]
|
||||||
/// # StdIO Transport
|
/// # StdIO Transport
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
//! reference: https://html.spec.whatwg.org/multipage/server-sent-events.html
|
//! reference: https://html.spec.whatwg.org/multipage/server-sent-events.html
|
||||||
use crate::model::{ClientJsonRpcMessage, ServerJsonRpcMessage};
|
use std::{collections::VecDeque, sync::Arc, time::Duration};
|
||||||
|
|
||||||
use futures::{FutureExt, Sink, Stream, StreamExt, future::BoxFuture, stream::BoxStream};
|
use futures::{FutureExt, Sink, Stream, StreamExt, future::BoxFuture, stream::BoxStream};
|
||||||
use reqwest::{
|
use reqwest::{
|
||||||
Client as HttpClient, IntoUrl, Url,
|
Client as HttpClient, IntoUrl, Url,
|
||||||
header::{ACCEPT, HeaderValue},
|
header::{ACCEPT, HeaderValue},
|
||||||
};
|
};
|
||||||
use sse_stream::{Error as SseError, Sse, SseStream};
|
use sse_stream::{Error as SseError, Sse, SseStream};
|
||||||
use std::{collections::VecDeque, sync::Arc, time::Duration};
|
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
|
||||||
|
use crate::model::{ClientJsonRpcMessage, ServerJsonRpcMessage};
|
||||||
const MIME_TYPE: &str = "text/event-stream";
|
const MIME_TYPE: &str = "text/event-stream";
|
||||||
const HEADER_LAST_EVENT_ID: &str = "Last-Event-ID";
|
const HEADER_LAST_EVENT_ID: &str = "Last-Event-ID";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
use crate::{
|
use std::{collections::HashMap, net::SocketAddr, sync::Arc};
|
||||||
RoleServer, Service,
|
|
||||||
model::ClientJsonRpcMessage,
|
|
||||||
service::{RxJsonRpcMessage, TxJsonRpcMessage},
|
|
||||||
};
|
|
||||||
use axum::{
|
use axum::{
|
||||||
Json, Router,
|
Json, Router,
|
||||||
extract::{Query, State},
|
extract::{Query, State},
|
||||||
|
|
@ -14,13 +11,16 @@ use axum::{
|
||||||
routing::{get, post},
|
routing::{get, post},
|
||||||
};
|
};
|
||||||
use futures::{Sink, SinkExt, Stream, StreamExt};
|
use futures::{Sink, SinkExt, Stream, StreamExt};
|
||||||
use std::{collections::HashMap, net::SocketAddr};
|
use tokio::io;
|
||||||
use tokio_stream::wrappers::ReceiverStream;
|
use tokio_stream::wrappers::ReceiverStream;
|
||||||
use tokio_util::sync::{CancellationToken, PollSender};
|
use tokio_util::sync::{CancellationToken, PollSender};
|
||||||
use tracing::Instrument;
|
use tracing::Instrument;
|
||||||
|
|
||||||
use std::sync::Arc;
|
use crate::{
|
||||||
use tokio::io;
|
RoleServer, Service,
|
||||||
|
model::ClientJsonRpcMessage,
|
||||||
|
service::{RxJsonRpcMessage, TxJsonRpcMessage},
|
||||||
|
};
|
||||||
type SessionId = Arc<str>;
|
type SessionId = Arc<str>;
|
||||||
type TxStore =
|
type TxStore =
|
||||||
Arc<tokio::sync::RwLock<HashMap<SessionId, tokio::sync::mpsc::Sender<ClientJsonRpcMessage>>>>;
|
Arc<tokio::sync::RwLock<HashMap<SessionId, tokio::sync::mpsc::Sender<ClientJsonRpcMessage>>>>;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
use rmcp::{ServerHandler, handler::server::tool::ToolCallContext, tool};
|
use rmcp::{ServerHandler, handler::server::tool::ToolCallContext, tool};
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, JsonSchema)]
|
#[derive(Serialize, Deserialize, JsonSchema)]
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue