#[repr(u8)]pub enum Capability {
LocalRead = 1,
LocalWrite = 2,
FixedConnectorRead = 4,
ArbitraryEgress = 8,
MutateExternal = 16,
GrantAccess = 32,
RevokeAccess = 64,
ManageAdmin = 128,
}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.
GrantAccess = 32
Grant a third party access to the system itself — the admin invite
(#700). Deliberately held OUT of Self::ALL, so
it is never in CapabilitySet::all, never in the default grant, and —
because Self::from_name only recognizes members of Self::ALL —
unnameable in operator config: no policy or wire input can ever seed it
into a granted set. A tool that requires it therefore always exceeds its
granted set and always escalates to a human, in every taint state and
policy mode. This is the structural mechanism behind “an access-grant is
never autonomous — a person always confirms the exact invitee”.
RevokeAccess = 64
Remove a third party’s access to the system itself — the admin
de-admission (#713), the offboarding sibling of Self::GrantAccess.
Held OUT of Self::ALL for the identical reason: never in
CapabilitySet::all, never in the default grant, and unnameable in
operator config (Self::from_name only recognizes Self::ALL
members), so a tool requiring it always exceeds its granted set and
always escalates to a human, in every taint state and policy mode. This
is the structural mechanism behind “a removal is never autonomous — a
person always confirms the exact person being removed”.
ManageAdmin = 128
Take away a persona’s ADMIN ROLE — the demote tool (#715), and the
sibling that completes the admin-management set alongside
Self::GrantAccess/Self::RevokeAccess. Held OUT of Self::ALL
for the identical reason: never in CapabilitySet::all, never in the
default grant, and unnameable in operator config (Self::from_name
only recognizes Self::ALL members), so a tool requiring it always
exceeds its granted set and always escalates to a human, in every
taint state and policy mode. This is the structural mechanism behind
“an admin’s role is never removed autonomously — a person always
confirms exactly whose role is being taken away”.
This occupies the last bit u8 can hold (1 << 7); the NEXT
never-granted marker added to this taxonomy needs CapabilitySet (and
this enum’s #[repr]) widened from u8 to u16 first.
Implementations§
Source§impl Capability
impl Capability
Sourcepub const ALL: [Self; 5]
pub const ALL: [Self; 5]
Every grantable member of the taxonomy, in declaration order.
Self::GrantAccess and Self::RevokeAccess are deliberately
absent: they are the never-granted markers (see their docs), so they
are excluded from CapabilitySet::all, the default grant, name
parsing (Self::from_name), and set iteration — everything driven
off this array operates only over the grantable set.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable kebab-case name, used in signed approval coverage and telemetry.
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 more