OpenAgentID documentation
Source referencesRust module referenceopenagent-capability

openagent-capability · crate

Declared module signatures, types, configuration, and source documentation.

Source: openagents/openagent.id/crates/openagent-capability/src/lib.rs. SHA-256: b24b099555e8f3131cecb5682e0bfe244cce4064305779bd6f0dadf79d2efebd.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

pub use agent_capability_token::{

claims_to_signing_payload, envelope_from_parts, verify, ActClaims, ActEnvelope, ActError, ActResult, Confirmation, Delegation, PublicKeyBytes, Scope, Verifier, ALGORITHM_ED25519, FORMAT_VERSION, MAX_ACT_BYTES, SCOPE_SEGMENTS, WILDCARD, };

pub use agent_capability_token::{
    claims_to_signing_payload, envelope_from_parts, verify, ActClaims, ActEnvelope, ActError,
    ActResult, Confirmation, Delegation, PublicKeyBytes, Scope, Verifier, ALGORITHM_ED25519,
    FORMAT_VERSION, MAX_ACT_BYTES, SCOPE_SEGMENTS, WILDCARD,
};

Source line: 43.

pub use agent_capability_token::sign;

#[cfg(feature = "sign")]
pub use agent_capability_token::sign;

Source line: 50.

::require_scopes

Asserts that claims grants every scope in required.

Convenience over [Scope::covers], kept because scope presence checks are the most common thing a verifier does after [verify] and the spelling is easy to get wrong: wildcards expand in a grant and are literal in a request, so a holder must not be able to widen its own authority by requesting *.

Errors

Returns [ActError::MissingScope] with the first required scope the token does not cover.

pub fn require_scopes(claims: &ActClaims, required: &[Scope]) -> ActResult<()>;

Source line: 63.

On this page