@@ -469,55 +469,16 @@ server_request_definitions! {
469469 /// DEPRECATED APIs below
470470 /// Request to approve a patch.
471471 ApplyPatchApproval {
472- params: ApplyPatchApprovalParams ,
473- response: ApplyPatchApprovalResponse ,
472+ params: v1 :: ApplyPatchApprovalParams ,
473+ response: v1 :: ApplyPatchApprovalResponse ,
474474 } ,
475475 /// Request to exec a command.
476476 ExecCommandApproval {
477- params: ExecCommandApprovalParams ,
478- response: ExecCommandApprovalResponse ,
477+ params: v1 :: ExecCommandApprovalParams ,
478+ response: v1 :: ExecCommandApprovalResponse ,
479479 } ,
480480}
481481
482- #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq , JsonSchema , TS ) ]
483- #[ serde( rename_all = "camelCase" ) ]
484- pub struct ApplyPatchApprovalParams {
485- pub conversation_id : ConversationId ,
486- /// Use to correlate this with [codex_core::protocol::PatchApplyBeginEvent]
487- /// and [codex_core::protocol::PatchApplyEndEvent].
488- pub call_id : String ,
489- pub file_changes : HashMap < PathBuf , FileChange > ,
490- /// Optional explanatory reason (e.g. request for extra write access).
491- pub reason : Option < String > ,
492- /// When set, the agent is asking the user to allow writes under this root
493- /// for the remainder of the session (unclear if this is honored today).
494- pub grant_root : Option < PathBuf > ,
495- }
496-
497- #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq , JsonSchema , TS ) ]
498- #[ serde( rename_all = "camelCase" ) ]
499- pub struct ExecCommandApprovalParams {
500- pub conversation_id : ConversationId ,
501- /// Use to correlate this with [codex_core::protocol::ExecCommandBeginEvent]
502- /// and [codex_core::protocol::ExecCommandEndEvent].
503- pub call_id : String ,
504- pub command : Vec < String > ,
505- pub cwd : PathBuf ,
506- pub reason : Option < String > ,
507- pub risk : Option < SandboxCommandAssessment > ,
508- pub parsed_cmd : Vec < ParsedCommand > ,
509- }
510-
511- #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq , JsonSchema , TS ) ]
512- pub struct ExecCommandApprovalResponse {
513- pub decision : ReviewDecision ,
514- }
515-
516- #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq , JsonSchema , TS ) ]
517- pub struct ApplyPatchApprovalResponse {
518- pub decision : ReviewDecision ,
519- }
520-
521482#[ derive( Serialize , Deserialize , Debug , Clone , PartialEq , JsonSchema , TS ) ]
522483#[ serde( rename_all = "camelCase" ) ]
523484#[ ts( rename_all = "camelCase" ) ]
@@ -660,7 +621,7 @@ mod tests {
660621 #[ test]
661622 fn serialize_server_request ( ) -> Result < ( ) > {
662623 let conversation_id = ConversationId :: from_string ( "67e55044-10b1-426f-9247-bb680e5fe0c8" ) ?;
663- let params = ExecCommandApprovalParams {
624+ let params = v1 :: ExecCommandApprovalParams {
664625 conversation_id,
665626 call_id : "call-42" . to_string ( ) ,
666627 command : vec ! [ "echo" . to_string( ) , "hello" . to_string( ) ] ,
0 commit comments