feat: migrate JsonRpcMessage/Request/Response/Error/Notification from internal mcp crates to rmcp versions (#3564)

This commit is contained in:
Alex Hancock
2025-07-22 13:45:00 -04:00
committed by GitHub
parent 246ba19256
commit 3e5c9b8505
27 changed files with 256 additions and 246 deletions
+6 -7
View File
@@ -36,9 +36,7 @@ use goose::providers::pricing::initialize_pricing_cache;
use goose::session;
use input::InputResult;
use mcp_core::handler::ToolError;
use mcp_core::protocol::JsonRpcMessage;
use mcp_core::protocol::JsonRpcNotification;
use rmcp::model::PromptMessage;
use rmcp::model::{JsonRpcMessage, JsonRpcNotification, Notification, PromptMessage};
use rand::{distributions::Alphanumeric, Rng};
use rustyline::EditMode;
@@ -1025,10 +1023,11 @@ impl Session {
}
}
Some(Ok(AgentEvent::McpNotification((_id, message)))) => {
if let JsonRpcMessage::Notification(JsonRpcNotification{
method,
params: Some(Value::Object(o)),
..
if let JsonRpcMessage::Notification( JsonRpcNotification {
notification: Notification {
method,
params: o,..
},..
}) = message {
match method.as_str() {
"notifications/message" => {