pub enum EscalationViolation {
Show 13 variants
AutonomyAboveParent {
child: AutonomyLevel,
parent: AutonomyLevel,
},
ReadWriteRootNotInParent {
path: PathBuf,
},
ReadOnlyRootNotInParent {
path: PathBuf,
},
WriteOnlyRootNotInParent {
path: PathBuf,
},
CommandNotInParent {
command: String,
},
WorkspaceOnlyDisabledByChild,
ForbiddenPathDroppedByChild {
path: String,
},
ShellEnvPassthroughExpanded {
variable: String,
},
MaxActionsExceeded {
child: u32,
parent: u32,
},
MaxCostExceeded {
child: u32,
parent: u32,
},
ShellTimeoutExceeded {
child: u64,
parent: u64,
},
BlockHighRiskCommandsDisabledByChild,
RequireApprovalDisabledByChild,
}Expand description
Specific kind of escalation violation returned by
SecurityPolicy::ensure_no_escalation_beyond. Each variant names
the field that violated subset semantics so the SubAgent spawn path
can produce a precise error to the caller.
Variants§
AutonomyAboveParent
Child raises autonomy above the parent (e.g. parent
Supervised, child Full). The autonomy level gates the
entire can_act and approval flow, so silent escalation here
would bypass every other guard.
ReadWriteRootNotInParent
child.allowed_roots contains a path the parent cannot rw.
ReadOnlyRootNotInParent
child.allowed_roots_read_only contains a path the parent
cannot read at all (not in parent rw or read-only lists).
WriteOnlyRootNotInParent
child.allowed_roots_write_only contains a path the parent
cannot write at all (not in parent rw or write-only lists).
CommandNotInParent
child.allowed_commands contains a shell command the parent
has no allowance for.
WorkspaceOnlyDisabledByChild
Parent enforces workspace_only but the child override tries to turn it off.
ForbiddenPathDroppedByChild
Child drops a forbidden_paths entry the parent enforces. Subset semantics on forbidden lists run the opposite direction from allowlists: parent ⊆ child, so the child can ADD entries but never DROP them.
ShellEnvPassthroughExpanded
Child raises shell_env_passthrough to leak env vars the
parent declined to forward.
MaxActionsExceeded
Child override raises max_actions_per_hour above the
parent’s ceiling.
MaxCostExceeded
Child override raises max_cost_per_day_cents above the
parent’s ceiling.
ShellTimeoutExceeded
Child override raises shell_timeout_secs above the parent’s
ceiling. The shell budget is a runaway-process guard; raising
it on the child side defeats the parent’s intent.
BlockHighRiskCommandsDisabledByChild
Child flips block_high_risk_commands from true (parent) to
false, opening the high-risk command surface the parent
closed.
RequireApprovalDisabledByChild
Child flips require_approval_for_medium_risk from true
(parent) to false, bypassing the human-in-the-loop step the
parent required.
Trait Implementations§
Source§impl Clone for EscalationViolation
impl Clone for EscalationViolation
Source§fn clone(&self) -> EscalationViolation
fn clone(&self) -> EscalationViolation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EscalationViolation
impl Debug for EscalationViolation
Source§impl Display for EscalationViolation
impl Display for EscalationViolation
Source§impl Error for EscalationViolation
impl Error for EscalationViolation
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for EscalationViolation
impl PartialEq for EscalationViolation
impl Eq for EscalationViolation
impl StructuralPartialEq for EscalationViolation
Auto Trait Implementations§
impl Freeze for EscalationViolation
impl RefUnwindSafe for EscalationViolation
impl Send for EscalationViolation
impl Sync for EscalationViolation
impl Unpin for EscalationViolation
impl UnsafeUnpin for EscalationViolation
impl UnwindSafe for EscalationViolation
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.