@@ -54,41 +54,59 @@ pub trait Client {
5454 args : ReadTextFileRequest ,
5555 ) -> impl Future < Output = Result < ReadTextFileResponse , Error > > ;
5656
57+ /// Handles session update notifications from the agent.
58+ ///
59+ /// This is a notification endpoint (no response expected) that receives
60+ /// real-time updates about session progress, including message chunks,
61+ /// tool calls, and execution plans.
62+ ///
63+ /// Note: Clients SHOULD continue accepting tool call updates even after
64+ /// sending a `session/cancel` notification, as the agent may send final
65+ /// updates before responding with the cancelled stop reason.
66+ ///
67+ /// See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
68+ fn session_notification (
69+ & self ,
70+ args : SessionNotification ,
71+ ) -> impl Future < Output = Result < ( ) , Error > > ;
72+
73+ // Experimental terminal support
74+
75+ /// **UNSTABLE**
76+ ///
77+ /// This method is not part of the spec, and may be removed or changed at any point.
78+ #[ doc( hidden) ]
5779 fn create_terminal (
5880 & self ,
5981 args : CreateTerminalRequest ,
6082 ) -> impl Future < Output = Result < CreateTerminalResponse , Error > > ;
6183
84+ /// **UNSTABLE**
85+ ///
86+ /// This method is not part of the spec, and may be removed or changed at any point.
87+ #[ doc( hidden) ]
6288 fn terminal_output (
6389 & self ,
6490 args : TerminalOutputRequest ,
6591 ) -> impl Future < Output = Result < TerminalOutputResponse , Error > > ;
6692
93+ /// **UNSTABLE**
94+ ///
95+ /// This method is not part of the spec, and may be removed or changed at any point.
96+ #[ doc( hidden) ]
6797 fn release_terminal (
6898 & self ,
6999 args : ReleaseTerminalRequest ,
70100 ) -> impl Future < Output = Result < ( ) , Error > > ;
71101
102+ /// **UNSTABLE**
103+ ///
104+ /// This method is not part of the spec, and may be removed or changed at any point.
105+ #[ doc( hidden) ]
72106 fn wait_for_terminal_exit (
73107 & self ,
74108 args : WaitForTerminalExitRequest ,
75109 ) -> impl Future < Output = Result < WaitForTerminalExitResponse , Error > > ;
76-
77- /// Handles session update notifications from the agent.
78- ///
79- /// This is a notification endpoint (no response expected) that receives
80- /// real-time updates about session progress, including message chunks,
81- /// tool calls, and execution plans.
82- ///
83- /// Note: Clients SHOULD continue accepting tool call updates even after
84- /// sending a `session/cancel` notification, as the agent may send final
85- /// updates before responding with the cancelled stop reason.
86- ///
87- /// See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
88- fn session_notification (
89- & self ,
90- args : SessionNotification ,
91- ) -> impl Future < Output = Result < ( ) , Error > > ;
92110}
93111
94112// Session updates
@@ -277,7 +295,7 @@ impl std::fmt::Display for TerminalId {
277295}
278296
279297#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
280- #[ schemars( extend( "x-side" = "client" , "x-method " = "terminal/create" ) ) ]
298+ #[ schemars( extend( "x-docs-ignore " = true ) ) ]
281299#[ serde( rename_all = "camelCase" ) ]
282300pub struct CreateTerminalRequest {
283301 pub session_id : SessionId ,
@@ -293,22 +311,22 @@ pub struct CreateTerminalRequest {
293311}
294312
295313#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
296- #[ schemars( extend( "x-side" = "client" , "x-method " = "terminal/create" ) ) ]
314+ #[ schemars( extend( "x-docs-ignore " = true ) ) ]
297315#[ serde( rename_all = "camelCase" ) ]
298316pub struct CreateTerminalResponse {
299317 pub terminal_id : TerminalId ,
300318}
301319
302320#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
303- #[ schemars( extend( "x-side" = "client" , "x-method " = "terminal/output" ) ) ]
321+ #[ schemars( extend( "x-docs-ignore " = true ) ) ]
304322#[ serde( rename_all = "camelCase" ) ]
305323pub struct TerminalOutputRequest {
306324 pub session_id : SessionId ,
307325 pub terminal_id : TerminalId ,
308326}
309327
310328#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
311- #[ schemars( extend( "x-side" = "client" , "x-method " = "terminal/output" ) ) ]
329+ #[ schemars( extend( "x-docs-ignore " = true ) ) ]
312330#[ serde( rename_all = "camelCase" ) ]
313331pub struct TerminalOutputResponse {
314332 pub output : String ,
@@ -317,30 +335,31 @@ pub struct TerminalOutputResponse {
317335}
318336
319337#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
320- #[ schemars( extend( "x-side" = "client" , "x-method " = "terminal/release" ) ) ]
338+ #[ schemars( extend( "x-docs-ignore " = true ) ) ]
321339#[ serde( rename_all = "camelCase" ) ]
322340pub struct ReleaseTerminalRequest {
323341 pub session_id : SessionId ,
324342 pub terminal_id : TerminalId ,
325343}
326344
327345#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
328- #[ schemars( extend( "x-side" = "client" , "x-method " = "terminal/wait_for_exit" ) ) ]
346+ #[ schemars( extend( "x-docs-ignore " = true ) ) ]
329347#[ serde( rename_all = "camelCase" ) ]
330348pub struct WaitForTerminalExitRequest {
331349 pub session_id : SessionId ,
332350 pub terminal_id : TerminalId ,
333351}
334352
335353#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
336- #[ schemars( extend( "x-side" = "client" , "x-method " = "terminal/wait_for_exit" ) ) ]
354+ #[ schemars( extend( "x-docs-ignore " = true ) ) ]
337355#[ serde( rename_all = "camelCase" ) ]
338356pub struct WaitForTerminalExitResponse {
339357 #[ serde( flatten) ]
340358 pub exit_status : TerminalExitStatus ,
341359}
342360
343361#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
362+ #[ schemars( extend( "x-docs-ignore" = true ) ) ]
344363#[ serde( rename_all = "camelCase" ) ]
345364pub struct TerminalExitStatus {
346365 pub exit_code : Option < u32 > ,
@@ -362,7 +381,12 @@ pub struct ClientCapabilities {
362381 /// Determines which file operations the agent can request.
363382 #[ serde( default ) ]
364383 pub fs : FileSystemCapability ,
384+
385+ /// **UNSTABLE**
386+ ///
387+ /// This capability is not part of the spec yet, and may be removed or changed at any point.
365388 #[ serde( default ) ]
389+ #[ doc( hidden) ]
366390 pub terminal : bool ,
367391}
368392
0 commit comments