@@ -83,18 +83,19 @@ export class AgentSideConnection {
8383 return agent . unstable_forkSession ( validatedParams ) ;
8484 }
8585 case schema . AGENT_METHODS . session_resume : {
86- if ( ! agent . unstable_resumeSession ) {
86+ if ( ! agent . resumeSession ) {
8787 throw RequestError . methodNotFound ( method ) ;
8888 }
8989 const validatedParams = validate . zResumeSessionRequest . parse ( params ) ;
90- return agent . unstable_resumeSession ( validatedParams ) ;
90+ return agent . resumeSession ( validatedParams ) ;
9191 }
9292 case schema . AGENT_METHODS . session_close : {
93- if ( ! agent . unstable_closeSession ) {
93+ if ( ! agent . closeSession ) {
9494 throw RequestError . methodNotFound ( method ) ;
9595 }
9696 const validatedParams = validate . zCloseSessionRequest . parse ( params ) ;
97- return agent . unstable_closeSession ( validatedParams ) ;
97+ const result = await agent . closeSession ( validatedParams ) ;
98+ return result ?? { } ;
9899 }
99100 case schema . AGENT_METHODS . session_set_mode : {
100101 if ( ! agent . setSessionMode ) {
@@ -791,10 +792,6 @@ export class ClientSideConnection implements Agent {
791792 }
792793
793794 /**
794- * **UNSTABLE**
795- *
796- * This capability is not part of the spec yet, and may be removed or changed at any point.
797- *
798795 * Resumes an existing session without returning previous messages.
799796 *
800797 * This method is only available if the agent advertises the `session.resume` capability.
@@ -804,10 +801,8 @@ export class ClientSideConnection implements Agent {
804801 *
805802 * The request may include `additionalDirectories` to set the complete list of
806803 * additional workspace roots for the resumed session.
807- *
808- * @experimental
809804 */
810- async unstable_resumeSession (
805+ async resumeSession (
811806 params : schema . ResumeSessionRequest ,
812807 ) : Promise < schema . ResumeSessionResponse > {
813808 return await this . connection . sendRequest (
@@ -817,20 +812,14 @@ export class ClientSideConnection implements Agent {
817812 }
818813
819814 /**
820- * **UNSTABLE**
821- *
822- * This capability is not part of the spec yet, and may be removed or changed at any point.
823- *
824815 * Closes an active session and frees up any resources associated with it.
825816 *
826817 * This method is only available if the agent advertises the `session.close` capability.
827818 *
828819 * The agent must cancel any ongoing work (as if `session/cancel` was called)
829820 * and then free up any resources associated with the session.
830- *
831- * @experimental
832821 */
833- async unstable_closeSession (
822+ async closeSession (
834823 params : schema . CloseSessionRequest ,
835824 ) : Promise < schema . CloseSessionResponse > {
836825 return await this . connection . sendRequest (
@@ -1910,10 +1899,6 @@ export interface Agent {
19101899 params : schema . ListSessionsRequest ,
19111900 ) : Promise < schema . ListSessionsResponse > ;
19121901 /**
1913- * **UNSTABLE**
1914- *
1915- * This capability is not part of the spec yet, and may be removed or changed at any point.
1916- *
19171902 * Resumes an existing session without returning previous messages.
19181903 *
19191904 * This method is only available if the agent advertises the `session.resume` capability.
@@ -1923,29 +1908,21 @@ export interface Agent {
19231908 *
19241909 * The request may include `additionalDirectories` to set the complete list of
19251910 * additional workspace roots for the resumed session.
1926- *
1927- * @experimental
19281911 */
1929- unstable_resumeSession ?(
1912+ resumeSession ?(
19301913 params : schema . ResumeSessionRequest ,
19311914 ) : Promise < schema . ResumeSessionResponse > ;
19321915 /**
1933- * **UNSTABLE**
1934- *
1935- * This capability is not part of the spec yet, and may be removed or changed at any point.
1936- *
19371916 * Closes an active session and frees up any resources associated with it.
19381917 *
19391918 * This method is only available if the agent advertises the `session.close` capability.
19401919 *
19411920 * The agent must cancel any ongoing work (as if `session/cancel` was called)
19421921 * and then free up any resources associated with the session.
1943- *
1944- * @experimental
19451922 */
1946- unstable_closeSession ?(
1923+ closeSession ?(
19471924 params : schema . CloseSessionRequest ,
1948- ) : Promise < schema . CloseSessionResponse > ;
1925+ ) : Promise < schema . CloseSessionResponse | void > ;
19491926 /**
19501927 * Sets the operational mode for a session.
19511928 *
0 commit comments