diff --git a/codex-rs/core/src/protocol.rs b/codex-rs/core/src/protocol.rs index f32d9ccf53..0767ccdb95 100644 --- a/codex-rs/core/src/protocol.rs +++ b/codex-rs/core/src/protocol.rs @@ -46,6 +46,33 @@ pub enum Op { items: Vec, }, + /// Similar to [`Op::UserInput`], but contains additional context required + /// for a turn of a [`crate::codex_conversation::CodexConversation`]. + UserTurn { + /// User input items, see `InputItem` + items: Vec, + + /// `cwd` to use with the [`SandboxPolicy`] and potentially tool calls + /// such as `local_shell`. + cwd: PathBuf, + + /// Policy to use for command approval. + approval_policy: AskForApproval, + + /// Policy to use for tool calls such as `local_shell`. + sandbox_policy: SandboxPolicy, + + /// Must be a valid model slug for the [`crate::client::ModelClient`] + /// associated with this conversation. + model: String, + + /// Will only be honored if the model is configured to use reasoning. + effort: ReasoningEffortConfig, + + /// Will only be honored if the model is configured to use reasoning. + summary: ReasoningSummaryConfig, + }, + /// Approve a command execution ExecApproval { /// The id of the submission we are approving