pub struct AutonomyConfig {Show 13 fields
pub level: AutonomyLevel,
pub workspace_only: bool,
pub allowed_commands: Vec<String>,
pub forbidden_paths: Vec<String>,
pub max_actions_per_hour: u32,
pub max_cost_per_day_cents: u32,
pub require_approval_for_medium_risk: bool,
pub block_high_risk_commands: bool,
pub shell_env_passthrough: Vec<String>,
pub auto_approve: Vec<String>,
pub always_ask: Vec<String>,
pub allowed_roots: Vec<String>,
pub non_cli_excluded_tools: Vec<String>,
}Expand description
Autonomy and security policy configuration ([autonomy] section).
Controls what the agent is allowed to do: shell commands, filesystem access, risk approval gates, and per-policy budgets.
Fields§
§level: AutonomyLevelAutonomy level: read_only, supervised (default), or full.
workspace_only: boolRestrict absolute filesystem paths to workspace-relative references. Default: true.
Resolved paths outside the workspace still require allowed_roots.
allowed_commands: Vec<String>Allowlist of executable names permitted for shell execution.
forbidden_paths: Vec<String>Explicit path denylist. Default includes system-critical paths and sensitive dotdirs.
max_actions_per_hour: u32Maximum actions allowed per hour per policy. Default: 100.
max_cost_per_day_cents: u32Maximum cost per day in cents per policy. Default: 1000.
require_approval_for_medium_risk: boolRequire explicit approval for medium-risk shell commands.
block_high_risk_commands: boolBlock high-risk shell commands even if allowlisted.
shell_env_passthrough: Vec<String>Additional environment variables allowed for shell tool subprocesses.
These names are explicitly allowlisted and merged with the built-in safe
baseline (PATH, HOME, etc.) after env_clear().
auto_approve: Vec<String>Tools that never require approval (e.g. read-only tools).
always_ask: Vec<String>Tools that always require interactive approval, even after “Always”.
allowed_roots: Vec<String>Extra directory roots the agent may read/write outside the workspace.
Supports absolute, ~/..., and workspace-relative entries.
Resolved paths under any of these roots pass is_resolved_path_allowed.
non_cli_excluded_tools: Vec<String>Tools to exclude from non-CLI channels (e.g. Telegram, Discord).
When a tool is listed here, non-CLI channels will not expose it to the model in tool specs.
Implementations§
Source§impl AutonomyConfig
impl AutonomyConfig
Sourcepub fn ensure_default_auto_approve(&mut self)
pub fn ensure_default_auto_approve(&mut self)
Merge the built-in default auto_approve entries into the current
list, preserving any user-supplied additions.
Trait Implementations§
Source§impl Clone for AutonomyConfig
impl Clone for AutonomyConfig
Source§fn clone(&self) -> AutonomyConfig
fn clone(&self) -> AutonomyConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AutonomyConfig
impl Debug for AutonomyConfig
Source§impl Default for AutonomyConfig
impl Default for AutonomyConfig
Source§impl<'de> Deserialize<'de> for AutonomyConfigwhere
AutonomyConfig: Default,
impl<'de> Deserialize<'de> for AutonomyConfigwhere
AutonomyConfig: Default,
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>,
Source§impl JsonSchema for AutonomyConfig
impl JsonSchema for AutonomyConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for AutonomyConfig
impl RefUnwindSafe for AutonomyConfig
impl Send for AutonomyConfig
impl Sync for AutonomyConfig
impl Unpin for AutonomyConfig
impl UnsafeUnpin for AutonomyConfig
impl UnwindSafe for AutonomyConfig
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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