pub struct MonitorConfig {
pub timeout: Duration,
pub check_interval: Duration,
pub kill_config: KillConfig,
pub required_idle_confirmations: u32,
pub check_child_processes: bool,
}Expand description
Configuration for the idle timeout monitor.
Fields§
§timeout: DurationTimeout duration.
check_interval: DurationCheck interval for the monitor loop.
kill_config: KillConfigKill configuration for process termination.
required_idle_confirmations: u32Number of consecutive idle observations required before killing the process.
Requiring more than one confirmation prevents false kills when the agent is
transiently quiet (e.g., waiting for an LLM API response, running a slow
compilation, or transitioning between work phases). Each additional
confirmation adds one check_interval of grace time before enforcement.
Default: 2 (one extra check_interval of confirmation before kill).
check_child_processes: boolWhether to check for active child processes before declaring the agent idle.
When true (the default), the monitor queries the ProcessExecutor for
active child processes of the agent. If any are found the idle counter is
reset, preventing false kills when the agent is running a long subprocess
(e.g. cargo test, npm install, cargo build).
Set to false in tests that deliberately do not want this check to run.
Trait Implementations§
Source§impl Clone for MonitorConfig
impl Clone for MonitorConfig
Source§fn clone(&self) -> MonitorConfig
fn clone(&self) -> MonitorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MonitorConfig
impl Debug for MonitorConfig
Source§impl Default for MonitorConfig
impl Default for MonitorConfig
impl Copy for MonitorConfig
Auto Trait Implementations§
impl Freeze for MonitorConfig
impl RefUnwindSafe for MonitorConfig
impl Send for MonitorConfig
impl Sync for MonitorConfig
impl Unpin for MonitorConfig
impl UnsafeUnpin for MonitorConfig
impl UnwindSafe for MonitorConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more