From 34523b36cb0ba48cee9d8dd9a6728ff2493a0560 Mon Sep 17 00:00:00 2001 From: Daniel Stojanovic Date: Fri, 15 May 2026 17:18:34 +0200 Subject: [PATCH] feat(acp): route session/setTitle to the new schema types Wires the SetSessionTitleRequest / SetSessionTitleResponse types into the agent-side JSON-RPC dispatch tables. Companion to https://github.com/agentclientprotocol/agent-client-protocol/pull/1199, which adds the schema definitions for session/setTitle. This PR is the Rust SDK half of the round trip: once the schema crate ships a release with the new types, ACP-backed agents can implement Agent::set_session_title and have it dispatched here. --- .../src/schema/client_to_agent/requests.rs | 6 ++++++ src/agent-client-protocol/src/schema/enum_impls.rs | 1 + 2 files changed, 7 insertions(+) diff --git a/src/agent-client-protocol/src/schema/client_to_agent/requests.rs b/src/agent-client-protocol/src/schema/client_to_agent/requests.rs index d9a9bfd..6c3a569 100644 --- a/src/agent-client-protocol/src/schema/client_to_agent/requests.rs +++ b/src/agent-client-protocol/src/schema/client_to_agent/requests.rs @@ -4,6 +4,7 @@ use crate::schema::{ LoadSessionRequest, LoadSessionResponse, NewSessionRequest, NewSessionResponse, PromptRequest, PromptResponse, ResumeSessionRequest, ResumeSessionResponse, SetSessionConfigOptionRequest, SetSessionConfigOptionResponse, SetSessionModeRequest, SetSessionModeResponse, + SetSessionTitleRequest, SetSessionTitleResponse, }; #[cfg(feature = "unstable_session_fork")] use crate::schema::{ForkSessionRequest, ForkSessionResponse}; @@ -30,6 +31,11 @@ impl_jsonrpc_request!( SetSessionConfigOptionResponse, "session/set_config_option" ); +impl_jsonrpc_request!( + SetSessionTitleRequest, + SetSessionTitleResponse, + "session/setTitle" +); #[cfg(feature = "unstable_session_model")] impl_jsonrpc_request!( diff --git a/src/agent-client-protocol/src/schema/enum_impls.rs b/src/agent-client-protocol/src/schema/enum_impls.rs index a38bc3b..80401a5 100644 --- a/src/agent-client-protocol/src/schema/enum_impls.rs +++ b/src/agent-client-protocol/src/schema/enum_impls.rs @@ -21,6 +21,7 @@ impl_jsonrpc_request_enum!(ClientRequest { CloseSessionRequest => "session/close", SetSessionModeRequest => "session/set_mode", SetSessionConfigOptionRequest => "session/set_config_option", + SetSessionTitleRequest => "session/setTitle", PromptRequest => "session/prompt", #[cfg(feature = "unstable_session_model")] SetSessionModelRequest => "session/set_model",