Public declaration syntax from forge-rs/crates/forge-sdk/src/adapters.rs Original source SHA-256: ef118fa135b2f0bebb9a3f4e6a874e13540e9dc1a1ccdced65eff2603a253827 Function bodies and constant values are omitted. This is not the complete implementation. Source line 14 pub trait IdentityAdapter: Send + Sync { /// Creates a new human root identity. fn create_hmr_identity( &self, namespace: &str, identifier: &str, ) -> ForgeIdentityResult; /// Creates a new machine root identity. fn create_mhr_identity( &self, namespace: &str, identifier: &str, ) -> ForgeIdentityResult; /// Derives a child agent identity from a parent identity. fn derive_agent_identity( &self, parent: &ForgeAgentIdentity, name: &str, namespace: &str, ) -> ForgeIdentityResult; } Source line 40 #[derive(Debug, Default, Clone, Copy)] pub struct OasIdentityAdapter; Source line 70 pub trait AuthorizationAdapter: Send + Sync { /// Verifies that an ACT is structurally and temporally valid. fn verify_act(&self, act: &AgentCapabilityToken) -> ForgeAuthResult<()>; /// Extracts the scopes granted by an ACT. fn extract_scopes(&self, act: &AgentCapabilityToken) -> Vec; /// Authorizes a tool invocation against the active ACT. fn authorize_tool_invocation( &self, request: &ToolAuthorizationRequest<'_>, ) -> ForgeAuthResult; /// Delegates a narrowed capability set to a child agent. fn delegate_capabilities( &self, request: &DelegationRequest<'_>, ) -> ForgeAuthResult; } Source line 92 #[derive(Debug, Default, Clone, Copy)] pub struct ArsenalAuthorizationAdapter; Source line 120 #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum DocumentRevocationState { Active, Revoked, Suspended, Expired, Unknown, } Source line 130 #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum HumanRootLivenessState { Active, Warning, Stale, Unknown, } Source line 139 #[derive(Debug, Clone, PartialEq, Eq)] pub struct DocumentVerification { pub did: String, pub signature_valid: bool, pub lineage_valid: bool, pub lineage_depth: u32, pub human_root: Option, pub revocation_state: DocumentRevocationState, pub liveness_state: HumanRootLivenessState, pub conformance_level: u8, pub warnings: Vec, pub verified_at: Timestamp } Source line 154 #[derive(Debug, Error)] pub enum VerificationAdapterError { #[cfg(not(target_arch = "wasm32"))] #[error(transparent)] Aegis(#[from] aegis_core::VerificationError), #[error("verification backend unavailable: {reason}")] BackendUnavailable { reason: String }, } Source line 164 pub type VerificationAdapterResult = Result; Source line 168 #[async_trait] pub trait VerificationAdapter: Send + Sync { /// Verifies a DID through the configured verification backend. async fn verify_did(&self, did: &str) -> VerificationAdapterResult; } Source line 175 #[derive(Clone)] pub struct ForgePlatformAdapters { } Source line 183 pub fn new( identity: Arc, authorization: Arc, verification: Arc, ) -> Self; Source line 196 pub fn identity(&self) -> &dyn IdentityAdapter; Source line 201 pub fn authorization(&self) -> &dyn AuthorizationAdapter; Source line 206 pub fn verification(&self) -> &dyn VerificationAdapter; Source line 212 #[cfg(not(target_arch = "wasm32"))] pub fn production( registry: Arc, config: aegis_core::VerificationConfig, ) -> Self; Source line 269 #[cfg(not(target_arch = "wasm32"))] pub struct AegisVerificationAdapter { } Source line 276 #[cfg(not(target_arch = "wasm32"))] pub fn new( registry: Arc, config: aegis_core::VerificationConfig, ) -> Self; Source line 286 #[cfg(not(target_arch = "wasm32"))] pub fn from_pipeline(pipeline: aegis_verify::VerificationPipeline) -> Self;