Skip to main content

Capability

Enum Capability 

Source
pub enum Capability {
    WireV2,
    JwsAgentCard,
    CardEtag,
    A2ABridge,
    EtereCitizenTrust,
    SafeHttp,
    ClockSkew60s,
    StreamingTransfer,
    DeferredDecision,
}
Expand description

A protocol capability advertised by an agent.

Adding a variant:

  1. Append at the end — never insert in the middle.
  2. Pick the next free as_bit() discriminant.
  3. Pick a stable lowercase-kebab-case as_str() name.
  4. Add to Capability::ALL.
  5. Document the semantics in docs/protocol-v2.md.

Variants§

§

WireV2

Sender and recipient speak wire v2 (aex-*:v2 prefix). Required for any v2 transfer; absence implies v1-only.

§

JwsAgentCard

Agent publishes a JWS-signed /.well-known/agent-card.json per ADR-0025. Required for did:web binding.

§

CardEtag

Agent supports the cache freshness protocol (If-None-Match conditional GET on agent card; ADR-0046).

§

A2ABridge

Agent supports A2A delegation chain receive (bridge adapter from Google A2A v1.0 task protocol). Optional, v2.1+ in most deployments.

§

EtereCitizenTrust

Agent’s identity is verified by EtereCitizen reputation index on Base L2 (ADR-0040). Present only on did:ethr agent cards whose key is registered on-chain.

§

SafeHttp

Agent supports SSRF-resistant outbound HTTP via aex-net::safe_http (ADR-0045) — relevant when this agent itself acts as a resolver for downstream did:web fetches.

§

ClockSkew60s

Agent rejects clock skew > 60s on inbound messages (ADR-0044). Absence means v1-style 300s window is still accepted.

§

StreamingTransfer

Agent supports the streaming transfer mode (chunked uploads with intermediate ack). Reserved for v2.2.

§

DeferredDecision

Agent’s responses to inbound intents may be deferred — the recipient takes time to decide before approving or rejecting a transfer. Senders observing this bit MUST handle an HTTP 202 Accepted response and wait for an aex-decision-response:v2 signed message before considering the transfer settled.

The protocol takes no position on who the decider is (human prompt, secondary AI model, policy engine, consensus of multiple agents). The bit only signals “I do not answer synchronously”.

ADR-0049.

Implementations§

Source§

impl Capability

Source

pub const ALL: &'static [Capability]

All capabilities known to this build, in stable order.

Source

pub const fn as_bit(self) -> u8

Stable bit position in CapabilitySet. Never renumber.

Source

pub const fn as_str(self) -> &'static str

Stable wire-string name. Never rename.

Source

pub fn parse(s: &str) -> Option<Self>

Parse from the stable wire-string name. Returns None for unknown names — callers that read agent cards must tolerate forward-incompat capability names per ADR-0018, so unknown names are silently dropped rather than errored.

Trait Implementations§

Source§

impl Clone for Capability

Source§

fn clone(&self) -> Capability

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Capability

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Capability

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Capability

Source§

fn eq(&self, other: &Capability) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Capability

Source§

impl Eq for Capability

Source§

impl StructuralPartialEq for Capability

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.