pub enum Capability {
FileRead,
FileWrite,
FileDelete,
NetworkOutbound,
NetworkInbound,
TerminalExec,
McpTool(String),
Model(String),
AgentSpawn,
}Expand description
A discrete action category that policy can allow or deny for an agent.
Variants§
FileRead
Read access to the filesystem.
FileWrite
Write access to the filesystem.
FileDelete
Delete/unlink access to the filesystem.
A distinct verb from Capability::FileWrite so a policy can allow
writes while denying deletes (and vice versa). See AAASM-4103.
NetworkOutbound
Outbound network connections.
NetworkInbound
Inbound network connections.
TerminalExec
Execute commands in a terminal/shell.
McpTool(String)
Use a named MCP tool.
Model(String)
Use a named AI model.
AgentSpawn
Spawn child agents.
Implementations§
Source§impl Capability
impl Capability
Sourcepub fn is_enforceable(&self) -> bool
pub fn is_enforceable(&self) -> bool
Whether declaring this capability in a policy actually governs anything.
A capability is enforceable only if some crate::GovernanceAction
maps to it via action_to_capability — otherwise no action ever routes
to it, so a declared allow/deny is silently inert and gives the operator a
false sense of security (AAASM-4099).
Currently inert (no corresponding action variant): Capability::Model,
Capability::NetworkInbound, and Capability::AgentSpawn. This
predicate is the single source of truth policy validation uses to warn
loudly when a policy references one of them; keep it in lock-step with
action_to_capability — when a new action lands that maps to one of
these, wire the mapping there and drop it from the inert arm below.
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 moreSource§impl Debug for Capability
impl Debug for Capability
Source§impl Display for Capability
impl Display for Capability
impl Eq for Capability
Source§impl FromStr for Capability
impl FromStr for Capability
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§impl PartialOrd for Capability
impl PartialOrd for Capability
impl StructuralPartialEq for Capability
Auto Trait Implementations§
impl Freeze for Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.