pub struct SessionManager;Expand description
Spawns a Claude/Codex session and streams parsed events back.
Implementations§
Source§impl SessionManager
impl SessionManager
Sourcepub fn spawn_session(
prompt: String,
resume_session_id: Option<String>,
working_dir: Option<PathBuf>,
model: Option<String>,
effort: Option<String>,
system_prompt: Option<String>,
mcp_config: Option<PathBuf>,
disable_builtin_tools: bool,
disable_all_tools: bool,
) -> (UnboundedReceiver<SessionUpdate>, SessionHandle)
pub fn spawn_session( prompt: String, resume_session_id: Option<String>, working_dir: Option<PathBuf>, model: Option<String>, effort: Option<String>, system_prompt: Option<String>, mcp_config: Option<PathBuf>, disable_builtin_tools: bool, disable_all_tools: bool, ) -> (UnboundedReceiver<SessionUpdate>, SessionHandle)
Start a new CLI session with the given prompt.
Returns a receiver of session updates and a handle that keeps the task alive. All sessions use –dangerously-skip-permissions because they’re automated. Safety is controlled via system prompts and –disallowedTools / –tools flags.
Auto Trait Implementations§
impl Freeze for SessionManager
impl RefUnwindSafe for SessionManager
impl Send for SessionManager
impl Sync for SessionManager
impl Unpin for SessionManager
impl UnsafeUnpin for SessionManager
impl UnwindSafe for SessionManager
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