feat: revision-2025-03-26 without streamable http (#84)

1. Suppot revision 2025-03-26 data types
2. Support meta, progress tokne, and extensions in request/notification,
3. Remove `Message`, use `JsonRpcMessage` directly
This commit is contained in:
4t145 2025-04-07 09:47:39 +08:00 • committed by GitHub
commit 68375460df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,12 +37,22 @@ impl EmbeddedResource {
}
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RawAudioContent {
pub data: String,
pub mime_type: String,
}
pub type AudioContent = Annotated<RawAudioContent>;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "camelCase")]
pub enum RawContent {
Text(RawTextContent),
Image(RawImageContent),
Resource(RawEmbeddedResource),
Audio(AudioContent),
}
pub type Content = Annotated<RawContent>;