#[repr(u8)]pub enum Capability {
LocalRead = 1,
LocalWrite = 2,
FixedConnectorRead = 4,
ArbitraryEgress = 8,
MutateExternal = 16,
}Expand description
One thing a tool call can do — the unit of the containment model.
The taxonomy is deliberately small and rarely changes. Adding a member
means extending this enum and the two derivation functions
(required_capabilities, granted_capabilities); the decision engine
(decide) operates on sets generically and never needs to change (a
pinned test demonstrates this).
Variants§
LocalRead = 1
Read state confined to the conversation’s sandbox (workspace files).
LocalWrite = 2
Mutate state confined to the conversation’s sandbox (workspace writes, sandboxed shell). Destructive inside the box is still local.
FixedConnectorRead = 4
Call an operator-registered connector endpoint (or a first-party control-plane service) — a fixed destination the operator vouched for, carrying only model-authored arguments. Taint never revokes this.
ArbitraryEgress = 8
Send bytes to a model-controlled external destination — the built-in web/paid fetchers. The classic exfiltration channel.
MutateExternal = 16
Perform a side effect outside the sandbox: mutate external state, send a message, file an issue, spend money. An external mutation carries model-authored bytes to destinations an attacker may read, so it is an egress channel in effect even when the destination is fixed.
Implementations§
Source§impl Capability
impl Capability
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable kebab-case name, used on the wire (the harness turn input), in
the Agent custom resource’s taint-resilient list, and as a telemetry
label. Inverse of Self::from_name.
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Capability
Source§impl Debug for Capability
impl Debug for Capability
impl Eq for Capability
Source§impl FromIterator<Capability> for CapabilitySet
impl FromIterator<Capability> for CapabilitySet
Source§fn from_iter<I: IntoIterator<Item = Capability>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Capability>>(iter: I) -> Self
Source§impl Hash for Capability
impl Hash for Capability
Source§impl Ord for Capability
impl Ord for Capability
Source§fn cmp(&self, other: &Capability) -> Ordering
fn cmp(&self, other: &Capability) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Capability
impl PartialEq for Capability
Source§fn eq(&self, other: &Capability) -> bool
fn eq(&self, other: &Capability) -> bool
self and other values to be equal, and is used by ==.