pub enum CapsSource {
AgentScopeSeal,
Acdc,
}Expand description
The authoritative source of a grant’s capabilities + role for a policy decision.
There are two on-chain encodings of a capability/role grant, and they serve different decision grades:
CapsSource::AgentScopeSeal— the Epic-Eagentscope:Seal::Digestanchored in the delegator’sixn. It is commit-time advisory: the offline fast path a verifier can read straight off the KEL without a live presentation. It is the low-latency convenience source, not an authority of record.CapsSource::Acdc— the F.4 capability credential. It is the authoritative caps/role source for credential-grade decisions, and authority derived from it is honored only through a holder-verified presentation (F.8) at the policy seam (context_from_credential).
Anti-divergence rule: the same grant MUST NOT be authored into both encodings with
diverging caps/role. When both exist for one grant, CapsSource::governing selects
the ACDC — the credential governs the credential-grade decision. The agentscope seal
remains valid only as the advisory commit-time fast path. (Full ADR text is F.7.)
Variants§
AgentScopeSeal
The Epic-E agentscope: delegator-anchored scope seal (commit-time advisory).
Acdc
The F.4 ACDC capability credential (authoritative for credential-grade decisions).
Implementations§
Source§impl CapsSource
impl CapsSource
Sourcepub fn governing(
agentscope_present: bool,
acdc_present: bool,
) -> Option<CapsSource>
pub fn governing( agentscope_present: bool, acdc_present: bool, ) -> Option<CapsSource>
Select the source that governs a credential-grade decision when both encodings exist for one grant: the ACDC always wins.
Args:
agentscope_present: Whether anagentscope:seal exists for the grant.acdc_present: Whether an F.4 ACDC credential exists for the grant.
Usage:
assert_eq!(CapsSource::governing(true, true), CapsSource::Acdc);Trait Implementations§
Source§impl Clone for CapsSource
impl Clone for CapsSource
Source§fn clone(&self) -> CapsSource
fn clone(&self) -> CapsSource
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 CapsSource
Source§impl Debug for CapsSource
impl Debug for CapsSource
impl Eq for CapsSource
Source§impl PartialEq for CapsSource
impl PartialEq for CapsSource
Source§fn eq(&self, other: &CapsSource) -> bool
fn eq(&self, other: &CapsSource) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CapsSource
Auto Trait Implementations§
impl Freeze for CapsSource
impl RefUnwindSafe for CapsSource
impl Send for CapsSource
impl Sync for CapsSource
impl Unpin for CapsSource
impl UnsafeUnpin for CapsSource
impl UnwindSafe for CapsSource
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> 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.