pub struct ConfirmationPolicy {
pub enabled: bool,
pub default_timeout_ms: u64,
pub timeout_action: TimeoutAction,
pub yolo_lanes: HashSet<SessionLane>,
}Expand description
Confirmation policy configuration
Controls the runtime behavior of HITL confirmation flow.
The decision of whether to ask is made by PermissionPolicy (permissions.rs).
This policy controls how the confirmation works: timeouts, YOLO lanes.
Fields§
§enabled: boolWhether HITL is enabled (default: false, all tools auto-approved)
default_timeout_ms: u64Default timeout in milliseconds (default: 30000 = 30s)
timeout_action: TimeoutActionAction to take on timeout (default: Reject)
yolo_lanes: HashSet<SessionLane>YOLO mode: lanes that auto-approve without confirmation.
When a lane is in this set, tools in that lane skip confirmation
even if PermissionPolicy returns Ask.
Implementations§
Source§impl ConfirmationPolicy
impl ConfirmationPolicy
Sourcepub fn with_yolo_lanes(
self,
lanes: impl IntoIterator<Item = SessionLane>,
) -> Self
pub fn with_yolo_lanes( self, lanes: impl IntoIterator<Item = SessionLane>, ) -> Self
Enable YOLO mode for specific lanes
Sourcepub fn with_timeout(self, timeout_ms: u64, action: TimeoutAction) -> Self
pub fn with_timeout(self, timeout_ms: u64, action: TimeoutAction) -> Self
Set timeout
Sourcepub fn is_yolo(&self, tool_name: &str) -> bool
pub fn is_yolo(&self, tool_name: &str) -> bool
Check if a tool should skip confirmation (YOLO lane check)
Returns true if the tool’s lane is in YOLO mode, meaning it should
be auto-approved even when PermissionPolicy returns Ask.
Sourcepub fn requires_confirmation(&self, tool_name: &str) -> bool
pub fn requires_confirmation(&self, tool_name: &str) -> bool
Check if a tool requires confirmation
This is the inverse of is_yolo() — returns true when HITL is enabled
and the tool’s lane is NOT in YOLO mode.
Trait Implementations§
Source§impl Clone for ConfirmationPolicy
impl Clone for ConfirmationPolicy
Source§fn clone(&self) -> ConfirmationPolicy
fn clone(&self) -> ConfirmationPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more