pub struct ComputerUseConfig {
pub enabled: bool,
pub allowed_action_types: Vec<String>,
pub mode: EnforcementMode,
pub blocked_domains: Vec<String>,
pub allowed_domains: Vec<String>,
pub screenshot_rate_per_second: Option<f64>,
pub screenshot_burst: Option<u32>,
}Expand description
Configuration for ComputerUseGuard.
Fields§
§enabled: boolEnable/disable the guard. When false, Guard::evaluate always
returns Allow.
allowed_action_types: Vec<String>Allowed CUA action-type strings (for remote.* / input.* flows).
mode: EnforcementModeEnforcement mode.
blocked_domains: Vec<String>Domain patterns (exact host match or *.suffix wildcard) that are
blocked for browser navigation.
allowed_domains: Vec<String>Optional allowlist of navigation hosts. When non-empty, navigation
to a host outside the allowlist is treated the same as a blocked
domain in FailClosed mode, warned in Guardrail, ignored in
Observe.
screenshot_rate_per_second: Option<f64>Maximum screenshots per second (token-bucket refill rate). None
disables rate limiting.
screenshot_burst: Option<u32>Token-bucket burst capacity for screenshot rate limiting. Defaults
to 5 when Self::screenshot_rate_per_second is set.
Trait Implementations§
Source§impl Clone for ComputerUseConfig
impl Clone for ComputerUseConfig
Source§fn clone(&self) -> ComputerUseConfig
fn clone(&self) -> ComputerUseConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputerUseConfig
impl Debug for ComputerUseConfig
Source§impl Default for ComputerUseConfig
impl Default for ComputerUseConfig
Source§impl<'de> Deserialize<'de> for ComputerUseConfig
impl<'de> Deserialize<'de> for ComputerUseConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ComputerUseConfig
impl RefUnwindSafe for ComputerUseConfig
impl Send for ComputerUseConfig
impl Sync for ComputerUseConfig
impl Unpin for ComputerUseConfig
impl UnsafeUnpin for ComputerUseConfig
impl UnwindSafe for ComputerUseConfig
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