feat: switch from mcp_core::Role to rmcp::model::Role (#3488)

This commit is contained in:
Alex Hancock
2025-07-18 12:30:23 -04:00
committed by GitHub
parent af872b1794
commit 76da3a9724
42 changed files with 105 additions and 69 deletions

View File

@@ -8,6 +8,7 @@ workspace = true
[dependencies]
async-trait = "0.1"
rmcp = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"

View File

@@ -1,7 +1,7 @@
/// Content sent around agents, extensions, and LLMs
/// The various content types can be display to humans but also understood by models
/// They include optional annotations used to help inform agent usage
use super::role::Role;
use super::Role;
use crate::resource::ResourceContents;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};

View File

@@ -1,10 +1,3 @@
/// Roles to describe the origin/ownership of content
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)]
#[serde(rename_all = "lowercase")]
pub enum Role {
User,
Assistant,
}
// passthrough, which will be deleted with the rest of the mcp-core crate after it is no longer used
// needed because it has internal references in this crate which leak out to usages used in goose etc crates
pub use rmcp::model::Role;