From 776e6714e4c2c260bd6774eee0a31922e7ba16f3 Mon Sep 17 00:00:00 2001 From: PureTensor Date: Fri, 11 Sep 2026 21:39:49 +0100 Subject: [PATCH] v3.30.0: adopt rmcp 3.3.0 for initialize negotiation rmcp 3.3.0 (2026-09-10) extracts protocol-version negotiation into ServerHandler::negotiate_initialize and the default initialize now calls it. Pin the MCP server on that line and cover the new path. --- Cargo.lock | 22 +++++++++++----------- Cargo.toml | 16 ++++++++-------- crates/ptask-server/src/mcp.rs | 30 ++++++++++++++++++++++++++++++ docs/gen/pt.1 | 4 ++-- 4 files changed, 51 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e845f9cf..b0cecd44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2649,7 +2649,7 @@ dependencies = [ [[package]] name = "ptask-bot" -version = "3.29.0" +version = "3.30.0" dependencies = [ "anyhow", "jiff", @@ -2665,7 +2665,7 @@ dependencies = [ [[package]] name = "ptask-cli" -version = "3.29.0" +version = "3.30.0" dependencies = [ "anyhow", "axum", @@ -2693,7 +2693,7 @@ dependencies = [ [[package]] name = "ptask-core" -version = "3.29.0" +version = "3.30.0" dependencies = [ "hex", "interim", @@ -2714,7 +2714,7 @@ dependencies = [ [[package]] name = "ptask-distill" -version = "3.29.0" +version = "3.30.0" dependencies = [ "anyhow", "candle-core", @@ -2737,7 +2737,7 @@ dependencies = [ [[package]] name = "ptask-notify" -version = "3.29.0" +version = "3.30.0" dependencies = [ "lettre", "ptask-core", @@ -2750,7 +2750,7 @@ dependencies = [ [[package]] name = "ptask-server" -version = "3.29.0" +version = "3.30.0" dependencies = [ "anyhow", "axum", @@ -2777,7 +2777,7 @@ dependencies = [ [[package]] name = "ptask-tui" -version = "3.29.0" +version = "3.30.0" dependencies = [ "anyhow", "crossterm", @@ -3285,9 +3285,9 @@ dependencies = [ [[package]] name = "rmcp" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b6914fac0be956fe704a38239c3f44a9f841d1b06a5713d2f638065593f5b5" +checksum = "b88db56b8ae316560e9e868b6b978ea940f27cb883323fc90e07435e44158f5c" dependencies = [ "async-trait", "base64 0.23.1", @@ -3317,9 +3317,9 @@ dependencies = [ [[package]] name = "rmcp-macros" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf1c49bd4d52014b94db0877410db273c2008f01628b0252a2e9460ad9b7fda" +checksum = "873b730df6f0a9b74b13eb514e0dca4c2db0d8b68b74af98a2e9bf3f9d436585" dependencies = [ "darling 0.24.1", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 2a3fe6de..5bd50ca5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ resolver = "2" [workspace.package] -version = "3.29.0" +version = "3.30.0" edition = "2024" license-file = "LICENSE" authors = ["PureTensor, Inc. "] @@ -48,16 +48,16 @@ reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-feature axum = "0.8" tower-http = { version = "0.6", features = ["trace", "cors"] } base64 = "0.22" -rmcp = { version = "3.2.0", features = ["server", "macros", "schemars", "transport-streamable-http-server", "transport-streamable-http-server-session", "transport-io", "tower"] } +rmcp = { version = "3.3.0", features = ["server", "macros", "schemars", "transport-streamable-http-server", "transport-streamable-http-server-session", "transport-io", "tower"] } futures-util = { version = "0.3", default-features = false } # Internal crates -ptask-core = { path = "crates/ptask-core", version = "3.29.0" } -ptask-tui = { path = "crates/ptask-tui", version = "3.29.0" } -ptask-server = { path = "crates/ptask-server", version = "3.29.0" } -ptask-bot = { path = "crates/ptask-bot", version = "3.29.0" } -ptask-distill = { path = "crates/ptask-distill", version = "3.29.0" } -ptask-notify = { path = "crates/ptask-notify", version = "3.29.0" } +ptask-core = { path = "crates/ptask-core", version = "3.30.0" } +ptask-tui = { path = "crates/ptask-tui", version = "3.30.0" } +ptask-server = { path = "crates/ptask-server", version = "3.30.0" } +ptask-bot = { path = "crates/ptask-bot", version = "3.30.0" } +ptask-distill = { path = "crates/ptask-distill", version = "3.30.0" } +ptask-notify = { path = "crates/ptask-notify", version = "3.30.0" } # HMAC for outbound webhook signing (v0.3.5). sha2 = "0.10" diff --git a/crates/ptask-server/src/mcp.rs b/crates/ptask-server/src/mcp.rs index b4bedd19..33fd69a5 100644 --- a/crates/ptask-server/src/mcp.rs +++ b/crates/ptask-server/src/mcp.rs @@ -608,6 +608,36 @@ pub async fn serve_stdio(db: Db, actor: String) -> anyhow::Result<()> { mod tests { use super::*; + #[test] + fn negotiate_initialize_advertises_tools_on_a_supported_protocol() { + // rmcp 3.3.0 (2026-09-10) extracted protocol-version negotiation out of + // the default initialize body into ServerHandler::negotiate_initialize + // so a server that overrides initialize does not have to restate the + // rule (modelcontextprotocol/rust-sdk#1247). pTask uses the default + // initialize; this call is the new path that handshake now takes. + let dir = tempfile::tempdir().unwrap(); + let db = Db::open(dir.path().join("mcp.db")).unwrap(); + let mcp = PtaskMcp::new(db, "test-agent".into()); + let request = InitializeRequestParams::new( + ClientCapabilities::default(), + Implementation::from_build_env(), + ); + let result = mcp + .negotiate_initialize(&request) + .expect("negotiate_initialize"); + assert!( + result.capabilities.tools.is_some(), + "pTask is a tools server; initialize must advertise tools" + ); + let supported = mcp.supported_protocol_versions(); + assert!( + supported.contains(&result.protocol_version), + "negotiated {:?} is not in supported {:?}", + result.protocol_version, + supported + ); + } + #[tokio::test] async fn task_add_rejects_invalid_provenance_before_creating() { let dir = tempfile::tempdir().unwrap(); diff --git a/docs/gen/pt.1 b/docs/gen/pt.1 index f6ca2e0e..93d09859 100644 --- a/docs/gen/pt.1 +++ b/docs/gen/pt.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH pt 1 "pt 3.29.0" +.TH pt 1 "pt 3.30.0" .SH NAME pt \- Sovereign task manager for PureTensor .SH SYNOPSIS @@ -166,4 +166,4 @@ Generate shell completions (bash/zsh/fish) to stdout pt\-help(1) Print this message or the help of the given subcommand(s) .SH VERSION -v3.29.0 +v3.30.0