@@ -12,6 +12,8 @@ use agent_client_protocol_schema::{ForkSessionRequest, ForkSessionResponse};
1212use agent_client_protocol_schema:: { ListSessionsRequest , ListSessionsResponse } ;
1313#[ cfg( feature = "unstable_session_resume" ) ]
1414use agent_client_protocol_schema:: { ResumeSessionRequest , ResumeSessionResponse } ;
15+ #[ cfg( feature = "unstable_session_config_options" ) ]
16+ use agent_client_protocol_schema:: { SetSessionConfigOptionRequest , SetSessionConfigOptionResponse } ;
1517#[ cfg( feature = "unstable_session_model" ) ]
1618use agent_client_protocol_schema:: { SetSessionModelRequest , SetSessionModelResponse } ;
1719use serde_json:: value:: RawValue ;
@@ -132,6 +134,25 @@ pub trait Agent {
132134 Err ( Error :: method_not_found ( ) )
133135 }
134136
137+ /// **UNSTABLE**
138+ ///
139+ /// This capability is not part of the spec yet, and may be removed or changed at any point.
140+ ///
141+ /// Sets the current value for a session configuration option.
142+ ///
143+ /// Configuration options allow agents to expose arbitrary selectors (like model choice,
144+ /// reasoning level, etc.) that clients can display and modify.
145+ ///
146+ /// The response returns the full list of configuration options with their current values,
147+ /// as changing one option may affect others.
148+ #[ cfg( feature = "unstable_session_config_options" ) ]
149+ async fn set_session_config_option (
150+ & self ,
151+ _args : SetSessionConfigOptionRequest ,
152+ ) -> Result < SetSessionConfigOptionResponse > {
153+ Err ( Error :: method_not_found ( ) )
154+ }
155+
135156 /// **UNSTABLE**
136157 ///
137158 /// This capability is not part of the spec yet, and may be removed or changed at any point.
@@ -225,6 +246,13 @@ impl<T: Agent> Agent for Rc<T> {
225246 ) -> Result < SetSessionModelResponse > {
226247 self . as_ref ( ) . set_session_model ( args) . await
227248 }
249+ #[ cfg( feature = "unstable_session_config_options" ) ]
250+ async fn set_session_config_option (
251+ & self ,
252+ args : SetSessionConfigOptionRequest ,
253+ ) -> Result < SetSessionConfigOptionResponse > {
254+ self . as_ref ( ) . set_session_config_option ( args) . await
255+ }
228256 #[ cfg( feature = "unstable_session_list" ) ]
229257 async fn list_sessions ( & self , args : ListSessionsRequest ) -> Result < ListSessionsResponse > {
230258 self . as_ref ( ) . list_sessions ( args) . await
@@ -278,6 +306,13 @@ impl<T: Agent> Agent for Arc<T> {
278306 ) -> Result < SetSessionModelResponse > {
279307 self . as_ref ( ) . set_session_model ( args) . await
280308 }
309+ #[ cfg( feature = "unstable_session_config_options" ) ]
310+ async fn set_session_config_option (
311+ & self ,
312+ args : SetSessionConfigOptionRequest ,
313+ ) -> Result < SetSessionConfigOptionResponse > {
314+ self . as_ref ( ) . set_session_config_option ( args) . await
315+ }
281316 #[ cfg( feature = "unstable_session_list" ) ]
282317 async fn list_sessions ( & self , args : ListSessionsRequest ) -> Result < ListSessionsResponse > {
283318 self . as_ref ( ) . list_sessions ( args) . await
0 commit comments