Skip to main content

zeroclaw_config/
autonomy.rs

1use serde::{Deserialize, Serialize};
2
3/// How much autonomy the agent has.
4///
5/// Variants are ordered from least to most autonomous so that
6/// [`Ord`] / [`PartialOrd`] compare a child's level against a
7/// parent's during SubAgent escalation checks (`child <= parent`).
8#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)]
9#[cfg_attr(feature = "schema-export", derive(schemars::JsonSchema))]
10#[serde(rename_all = "lowercase")]
11pub enum AutonomyLevel {
12    /// Read-only: can observe but not act
13    ReadOnly,
14    /// Supervised: acts but requires approval for risky operations
15    #[default]
16    Supervised,
17    /// Full: autonomous execution within policy bounds
18    Full,
19}