pub struct CodexSessionConfig {
pub cwd: PathBuf,
pub mcp_servers: Value,
pub mode_id: Option<String>,
}Expand description
Session create parameters (session/new + optional mode).
codex-acp modes (see adapter docs): read-only | agent | agent-full-access.
Fields§
§cwd: PathBufSession working directory.
mcp_servers: ValueMCP servers (opaque JSON; usually empty).
mode_id: Option<String>Mode after create via session/set_mode.
Implementations§
Source§impl CodexSessionConfig
impl CodexSessionConfig
Sourcepub fn with_read_only_mode(self) -> Self
pub fn with_read_only_mode(self) -> Self
Read-only mode (plan / review style).
Sourcepub fn with_agent_mode(self) -> Self
pub fn with_agent_mode(self) -> Self
Default agent mode (workspace write sandbox typical).
Sourcepub fn with_agent_full_access_mode(self) -> Self
pub fn with_agent_full_access_mode(self) -> Self
Full-access agent mode (elevated sandbox; test sandboxes only).
Trait Implementations§
Source§impl Clone for CodexSessionConfig
impl Clone for CodexSessionConfig
Source§fn clone(&self) -> CodexSessionConfig
fn clone(&self) -> CodexSessionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CodexSessionConfig
impl RefUnwindSafe for CodexSessionConfig
impl Send for CodexSessionConfig
impl Sync for CodexSessionConfig
impl Unpin for CodexSessionConfig
impl UnsafeUnpin for CodexSessionConfig
impl UnwindSafe for CodexSessionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more