pub struct AgentProcess { /* private fields */ }Expand description
Wraps the agent subprocess and its compat-wrapped pipes.
On Windows, spawns via wsl kiro-cli acp; on Linux, runs kiro-cli acp directly.
Implementations§
Source§impl AgentProcess
impl AgentProcess
Sourcepub fn spawn(agent: Option<&str>) -> Result<Self>
pub fn spawn(agent: Option<&str>) -> Result<Self>
Spawn the kiro-cli ACP subprocess and return compat-wrapped stdin/stdout
suitable for passing to ClientSideConnection::new.
On Windows, runs via wsl kiro-cli acp; on Linux, runs kiro-cli acp directly.
If agent is provided, passes --agent <name> to kiro-cli.
Sourcepub fn take_stdin(&mut self) -> Result<CompatStdin>
pub fn take_stdin(&mut self) -> Result<CompatStdin>
Take the stdin pipe (can only be called once).
Sourcepub fn take_stdout(&mut self) -> Result<CompatStdout>
pub fn take_stdout(&mut self) -> Result<CompatStdout>
Take the stdout pipe (can only be called once).
Sourcepub fn drain_stderr(&mut self) -> String
pub fn drain_stderr(&mut self) -> String
Drain any stderr output collected so far.
Sourcepub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
pub fn try_wait(&mut self) -> Result<Option<ExitStatus>>
Check if the process has already exited (non-blocking).
Sourcepub async fn check_startup(&mut self) -> Result<()>
pub async fn check_startup(&mut self) -> Result<()>
Wait briefly for the process to start, returning an error if it exits immediately (e.g. due to auth failure).
Auto Trait Implementations§
impl Freeze for AgentProcess
impl !RefUnwindSafe for AgentProcess
impl Send for AgentProcess
impl Sync for AgentProcess
impl Unpin for AgentProcess
impl UnsafeUnpin for AgentProcess
impl !UnwindSafe for AgentProcess
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