@@ -111,6 +111,13 @@ pub trait Client {
111111 & self ,
112112 args : WaitForTerminalExitRequest ,
113113 ) -> impl Future < Output = Result < WaitForTerminalExitResponse , Error > > ;
114+
115+ /// **UNSTABLE**
116+ ///
117+ /// This method is not part of the spec, and may be removed or changed at any point.
118+ #[ doc( hidden) ]
119+ #[ cfg( feature = "unstable" ) ]
120+ fn kill_terminal ( & self , args : KillTerminalRequest ) -> impl Future < Output = Result < ( ) , Error > > ;
114121}
115122
116123// Session updates
@@ -353,6 +360,15 @@ pub struct ReleaseTerminalRequest {
353360 pub terminal_id : TerminalId ,
354361}
355362
363+ #[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
364+ #[ schemars( extend( "x-docs-ignore" = true ) ) ]
365+ #[ serde( rename_all = "camelCase" ) ]
366+ #[ cfg( feature = "unstable" ) ]
367+ pub struct KillTerminalRequest {
368+ pub session_id : SessionId ,
369+ pub terminal_id : TerminalId ,
370+ }
371+
356372#[ derive( Debug , Clone , Serialize , Deserialize , JsonSchema ) ]
357373#[ schemars( extend( "x-docs-ignore" = true ) ) ]
358374#[ serde( rename_all = "camelCase" ) ]
@@ -445,6 +461,9 @@ pub struct ClientMethodNames {
445461 /// Method for waiting for a terminal to finish.
446462 #[ cfg( feature = "unstable" ) ]
447463 pub terminal_wait_for_exit : & ' static str ,
464+ /// Method for killing a terminal.
465+ #[ cfg( feature = "unstable" ) ]
466+ pub terminal_kill : & ' static str ,
448467}
449468
450469/// Constant containing all client method names.
@@ -461,6 +480,8 @@ pub const CLIENT_METHOD_NAMES: ClientMethodNames = ClientMethodNames {
461480 terminal_release : TERMINAL_RELEASE_METHOD_NAME ,
462481 #[ cfg( feature = "unstable" ) ]
463482 terminal_wait_for_exit : TERMINAL_WAIT_FOR_EXIT_METHOD_NAME ,
483+ #[ cfg( feature = "unstable" ) ]
484+ terminal_kill : TERMINAL_KILL_METHOD_NAME ,
464485} ;
465486
466487/// Notification name for session updates.
@@ -483,6 +504,9 @@ pub(crate) const TERMINAL_RELEASE_METHOD_NAME: &str = "terminal/release";
483504/// Method for waiting for a terminal to finish.
484505#[ cfg( feature = "unstable" ) ]
485506pub ( crate ) const TERMINAL_WAIT_FOR_EXIT_METHOD_NAME : & str = "terminal/wait_for_exit" ;
507+ /// Method for killing a terminal.
508+ #[ cfg( feature = "unstable" ) ]
509+ pub ( crate ) const TERMINAL_KILL_METHOD_NAME : & str = "terminal/kill" ;
486510
487511/// All possible requests that an agent can send to a client.
488512///
@@ -505,6 +529,8 @@ pub enum AgentRequest {
505529 ReleaseTerminalRequest ( ReleaseTerminalRequest ) ,
506530 #[ cfg( feature = "unstable" ) ]
507531 WaitForTerminalExitRequest ( WaitForTerminalExitRequest ) ,
532+ #[ cfg( feature = "unstable" ) ]
533+ KillTerminalRequest ( KillTerminalRequest ) ,
508534}
509535
510536/// All possible responses that a client can send to an agent.
@@ -528,6 +554,8 @@ pub enum ClientResponse {
528554 ReleaseTerminalResponse ,
529555 #[ cfg( feature = "unstable" ) ]
530556 WaitForTerminalExitResponse ( WaitForTerminalExitResponse ) ,
557+ #[ cfg( feature = "unstable" ) ]
558+ KillTerminalResponse ,
531559}
532560
533561/// All possible notifications that an agent can send to a client.
0 commit comments