@@ -37,6 +37,19 @@ pub trait Client {
3737 args : RequestPermissionRequest ,
3838 ) -> Result < RequestPermissionResponse , Error > ;
3939
40+ /// Handles session update notifications from the agent.
41+ ///
42+ /// This is a notification endpoint (no response expected) that receives
43+ /// real-time updates about session progress, including message chunks,
44+ /// tool calls, and execution plans.
45+ ///
46+ /// Note: Clients SHOULD continue accepting tool call updates even after
47+ /// sending a `session/cancel` notification, as the agent may send final
48+ /// updates before responding with the cancelled stop reason.
49+ ///
50+ /// See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
51+ async fn session_notification ( & self , args : SessionNotification ) -> Result < ( ) , Error > ;
52+
4053 /// Writes content to a text file in the client's file system.
4154 ///
4255 /// Only available if the client advertises the `fs.writeTextFile` capability.
@@ -45,8 +58,10 @@ pub trait Client {
4558 /// See protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)
4659 async fn write_text_file (
4760 & self ,
48- args : WriteTextFileRequest ,
49- ) -> Result < WriteTextFileResponse , Error > ;
61+ _args : WriteTextFileRequest ,
62+ ) -> Result < WriteTextFileResponse , Error > {
63+ Err ( Error :: method_not_found ( ) )
64+ }
5065
5166 /// Reads content from a text file in the client's file system.
5267 ///
@@ -56,21 +71,10 @@ pub trait Client {
5671 /// See protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)
5772 async fn read_text_file (
5873 & self ,
59- args : ReadTextFileRequest ,
60- ) -> Result < ReadTextFileResponse , Error > ;
61-
62- /// Handles session update notifications from the agent.
63- ///
64- /// This is a notification endpoint (no response expected) that receives
65- /// real-time updates about session progress, including message chunks,
66- /// tool calls, and execution plans.
67- ///
68- /// Note: Clients SHOULD continue accepting tool call updates even after
69- /// sending a `session/cancel` notification, as the agent may send final
70- /// updates before responding with the cancelled stop reason.
71- ///
72- /// See protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)
73- async fn session_notification ( & self , args : SessionNotification ) -> Result < ( ) , Error > ;
74+ _args : ReadTextFileRequest ,
75+ ) -> Result < ReadTextFileResponse , Error > {
76+ Err ( Error :: method_not_found ( ) )
77+ }
7478
7579 /// Executes a command in a new terminal
7680 ///
@@ -88,8 +92,10 @@ pub trait Client {
8892 /// See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)
8993 async fn create_terminal (
9094 & self ,
91- args : CreateTerminalRequest ,
92- ) -> Result < CreateTerminalResponse , Error > ;
95+ _args : CreateTerminalRequest ,
96+ ) -> Result < CreateTerminalResponse , Error > {
97+ Err ( Error :: method_not_found ( ) )
98+ }
9399
94100 /// Gets the terminal output and exit status
95101 ///
@@ -99,8 +105,10 @@ pub trait Client {
99105 /// See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)
100106 async fn terminal_output (
101107 & self ,
102- args : TerminalOutputRequest ,
103- ) -> Result < TerminalOutputResponse , Error > ;
108+ _args : TerminalOutputRequest ,
109+ ) -> Result < TerminalOutputResponse , Error > {
110+ Err ( Error :: method_not_found ( ) )
111+ }
104112
105113 /// Releases a terminal
106114 ///
@@ -116,16 +124,20 @@ pub trait Client {
116124 /// See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)
117125 async fn release_terminal (
118126 & self ,
119- args : ReleaseTerminalRequest ,
120- ) -> Result < ReleaseTerminalResponse , Error > ;
127+ _args : ReleaseTerminalRequest ,
128+ ) -> Result < ReleaseTerminalResponse , Error > {
129+ Err ( Error :: method_not_found ( ) )
130+ }
121131
122132 /// Waits for the terminal command to exit and return its exit status
123133 ///
124134 /// See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)
125135 async fn wait_for_terminal_exit (
126136 & self ,
127- args : WaitForTerminalExitRequest ,
128- ) -> Result < WaitForTerminalExitResponse , Error > ;
137+ _args : WaitForTerminalExitRequest ,
138+ ) -> Result < WaitForTerminalExitResponse , Error > {
139+ Err ( Error :: method_not_found ( ) )
140+ }
129141
130142 /// Kills the terminal command without releasing the terminal
131143 ///
@@ -141,8 +153,10 @@ pub trait Client {
141153 /// See protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)
142154 async fn kill_terminal_command (
143155 & self ,
144- args : KillTerminalCommandRequest ,
145- ) -> Result < KillTerminalCommandResponse , Error > ;
156+ _args : KillTerminalCommandRequest ,
157+ ) -> Result < KillTerminalCommandResponse , Error > {
158+ Err ( Error :: method_not_found ( ) )
159+ }
146160
147161 /// Handles extension method requests from the agent.
148162 ///
@@ -151,7 +165,9 @@ pub trait Client {
151165 /// protocol compatibility.
152166 ///
153167 /// See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
154- async fn ext_method ( & self , args : ExtRequest ) -> Result < ExtResponse , Error > ;
168+ async fn ext_method ( & self , _args : ExtRequest ) -> Result < ExtResponse , Error > {
169+ Ok ( RawValue :: NULL . to_owned ( ) . into ( ) )
170+ }
155171
156172 /// Handles extension notifications from the agent.
157173 ///
@@ -160,7 +176,9 @@ pub trait Client {
160176 /// while maintaining protocol compatibility.
161177 ///
162178 /// See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)
163- async fn ext_notification ( & self , args : ExtNotification ) -> Result < ( ) , Error > ;
179+ async fn ext_notification ( & self , _args : ExtNotification ) -> Result < ( ) , Error > {
180+ Ok ( ( ) )
181+ }
164182}
165183
166184#[ async_trait:: async_trait( ?Send ) ]
0 commit comments