Expand description
§Aura Effects - Layer 3: Implementation (Stateless Effect Handlers)
Purpose: Production-grade stateless effect handlers that delegate to OS services.
This crate provides the Implementation Layer of the Aura architecture, containing context-free, single-operation effect handlers that work in ANY execution context (production, testing, simulation, choreographic).
§Architecture Constraints
Layer 3 depends only on aura-core and external libraries (foundation + libraries).
- MUST implement infrastructure effect traits defined in aura-core
- MUST be stateless (no shared mutable state between calls)
- MUST be single-party (each handler works independently)
- MUST be context-free (no assumptions about caller’s context)
- MUST NOT depend on other Aura crates (domain crates, aura-protocol, etc.)
- MUST NOT do multi-handler coordination
- MUST NOT do multi-party protocol logic
§Stateful Boundary (compile-fail example)
Handlers in Layer 3 are stateless. Stateful caches belong in Layer 6 services.
use std::sync::RwLock;
struct BadHandler {
cache: RwLock<Vec<u8>>,
}
compile_error!("Stateful caches must live in Layer 6 handlers, not aura-effects.");§Required Infrastructure Effects
This crate MUST provide handlers for:
- CryptoEffects: Ed25519 signing, hashing, key derivation
- NetworkEffects: TCP connections, message sending
- StorageEffects: File I/O, chunk operations
- TimeEffects: Current time, delays
- RandomEffects: Cryptographically secure randomness
§What Belongs Here
Basic effect implementations (RealCryptoHandler, ProductionLeakageHandler) Storage backends (FilesystemStorageHandler, EncryptedStorage) Network transports (TcpTransportHandler, WebSocketTransportHandler) Time providers (RealTimeHandler), System handlers (LoggingSystemHandler)
§What Does NOT Belong Here
✗ Multi-handler coordination (→ aura-protocol) ✗ Choreographic bridges (→ aura-protocol) ✗ Stateful orchestration (→ aura-protocol) ✗ Complete protocols (→ feature crates)
§Usage
use aura_effects::crypto::RealCryptoHandler;
use aura_effects::storage::FilesystemStorageHandler;
use aura_core::effects::{CryptoEffects, StorageEffects};
// Use handlers directly for single operations
let crypto = RealCryptoHandler::new();
let signature = crypto.sign(&key, &message).await?;
// Or compose into a runtime (done by aura-agent or aura-protocol)
let runtime = EffectSystemBuilder::production()
.with_crypto(crypto)
.with_storage(storage)
.build();Re-exports§
pub use crate::storage::FilesystemStorageHandler;pub use biometric::FallbackBiometricHandler;pub use console::RealConsoleHandler;pub use context::StandardContextHandler;pub use crypto::RealCryptoHandler;pub use database::query::AuraQuery;pub use database::query::FactTerm;pub use database::query::QueryError;pub use database::query::QueryResult;pub use encrypted_storage::EncryptedStorage;pub use encrypted_storage::EncryptedStorageConfig;pub use error::Layer3Error;pub use guard_interpreter::ProductionEffectInterpreter;pub use identifiers::new_account_id;pub use identifiers::new_context_id;pub use identifiers::new_device_id;pub use identifiers::new_event_id;pub use identifiers::new_guardian_id;pub use identifiers::new_operation_id;pub use identifiers::new_session_id;pub use leakage::ProductionLeakageHandler;pub use network_monitor::NetworkMonitorHandler;pub use noise::RealNoiseHandler;pub use query::format_rule;pub use query::format_value;pub use query::parse_arg_to_value;pub use query::parse_fact_to_row;pub use query::CapabilityPolicy;pub use query::QueryHandler;pub use random::RealRandomHandler;pub use reactive::ReactiveHandler;pub use reactive::SignalGraph;pub use reactive::SignalGraphStats;pub use route_crypto::RealRouteCryptoHandler;pub use runtime_capability::RuntimeCapabilityHandler;pub use secure::RealSecureStorageHandler;pub use time::LogicalClockHandler;Deprecated pub use time::OrderClockHandler;pub use time::PhysicalTimeHandler;pub use time::TimeComparisonHandler;pub use udp::RealUdpEffectsHandler;pub use system::LoggingSystemHandler;pub use system::MetricsSystemHandler;pub use system::MonitoringSystemHandler;pub use transport_effects::FramingHandler;pub use transport_effects::RealTransportHandler;pub use transport_effects::TcpTransportHandler;pub use transport_effects::TransportError;pub use transport_effects::WebSocketTransportHandler;
Modules§
- agent
- Agent-Specific Effect Traits
- amp
- AMP channel lifecycle effect traits (Layer 1 interface)
- authority
- Authority Effects Trait
- authorization
- Authorization Effects
- availability
- Layer 1: Data Availability Effect Trait Definitions
- biometric
- Layer 3: Biometric Authentication Effect Handlers
- bloom
- Bloom Filter Data Structures
- capability
- Capability Token Effects Trait Definitions
- choreographic
- Choreographic effect interface
- console
- Console effect handlers
- context
- Context propagation handlers
- crypto
- Cryptographic effect handlers for signing, verification, and key derivation Cryptographic Effect Handlers
- database
- Indexed journal handler with B-tree indexes, Bloom filters, and Merkle trees Query Layer - Datalog queries using Biscuit’s engine
- encrypted_
storage - Unified encrypted storage wrapper for transparent encryption at rest Layer 3: Unified Encrypted Storage Handler
- error
- Error types for Layer 3 handler implementations. Error types for Layer 3 effect handlers.
- fact
- Fact Effect Traits
- flood
- Layer 1: Rendezvous Flooding Effect Trait Definitions
- flow
- Layer 1: Flow Budget Effect Trait Definitions
- guard
- Pure guard evaluation with effect commands
- guard_
interpreter - Guard Effect Interpreter
- guardian
- Guardian relationship effect trait
- identifiers
- Effect-backed identifier generation helpers.
- indexed
- Indexed Journal Effects - Extension trait for efficient fact lookups
- intent
- Intent Effect Traits
- journal
- Journal effect interface for CRDT operations
- leakage
- Layer 3: Leakage Effect Handlers
- ledger
- Effect API interface
- network
- Network effects trait definitions
- network_
monitor - Debounced network-change monitoring handler.
- noise
- Noise Protocol Implementation
- query
- Query Effect Handler
- random
- Random effect handlers
- reactive
- Reactive Effect Handlers
- registry
- Canonical operation mappings for effect types.
- relay
- Layer 1: Relay Selection Effect Trait Definitions
- reliability
- Reliability Effects
- route_
crypto - Route-layer hop crypto implementation.
- runtime_
capability - Runtime capability inventory handler.
- secure
- Layer 3: Secure Storage Effect Handlers - Production Only
- storage
- Layer 3: Storage Effect Handlers - Production Only
- supertraits
- Sealed supertraits for common effect combinations
- sync
- Sync Metrics - Shared types for synchronization operations
- system
- Layer 3: System Effect Handlers - Logging, Metrics, Monitoring
- task
- Runtime-agnostic task spawning traits.
- terminal
- Terminal effect interface for deterministic TUI/CLI testing
- threshold
- Threshold Signing Effects
- time
- Domain time handlers (Layer 3).
- trace
- Trace effect handler implementations.
- transport
- Layer 3: Transport Effect Handlers - Production Only
- transport_
effects - Transport effect implementations - Layer 3 stateless handlers
- tree
- Tree Operations Effects for Commitment Tree Operations
- udp
- UDP effect handlers (Layer 3)
- vm_
bridge - Session-local bridge effects for the Aura and Telltale runtime boundary.
Structs§
- Agent
Health Status - Agent health status information
- AmpCiphertext
- Result of a send operation (ciphertext + header)
- AmpHeader
- AMP message header (additional authenticated data)
- Authentication
Result - Authentication result from device unlock
- Authorization
Decision - Authorization decision result
- Biometric
Capability - Information about available biometric capabilities
- Biometric
Config - Configuration for biometric enrollment and verification
- Biometric
Enrollment Result - Result of biometric enrollment operation
- Biometric
Statistics - Statistics about biometric authentication usage
- Biometric
Verification Result - Result of biometric verification operation
- Bloom
Config - Configuration for Bloom filter parameters
- Bloom
Filter - Bloom filter data structure
- Capability
Config - Configuration for capability token operations
- Capability
Key - Stable key for a runtime capability contract.
- Capability
Statistics - Statistics about capability token usage
- Capability
Token Info - Information about a capability token
- Capability
Token Request - Capability token creation request
- Capability
Verification Result - Result of capability token verification
- Cell
- A single cell in the terminal
- Channel
Close Params - Channel close parameters
- Channel
Create Params - Optional parameters for channel creation
- Channel
Join Params - Channel join parameters
- Channel
Leave Params - Channel leave parameters
- Channel
Send Params - Send parameters (plaintext provided by caller)
- Checkpoint
Info - Information about a checkpoint
- Choreographic
Role - Role in a choreographic protocol
- Choreography
Metrics - Performance metrics for choreography execution
- Config
Validation Error - Configuration validation error
- Credential
Backup - Credential backup structure
- Cursor
Position - Cursor position and state
- Cut
- Defines a cut point for snapshotting (effect interface version)
- Device
Config - Device configuration structure
- Device
Info - Device information structure
- Effect
Context - Operation-scoped context threaded through effectful calls.
- FactId
- A fact identifier for indexing purposes.
- Flood
Budget - Budget for rendezvous packet flooding.
- Flow
Budget View - Read-only view of flow budgets
- Flow
Hint - Hint describing which flow bucket should be charged before a send.
- Guard
Outcome - Outcome of pure guard evaluation
- Guard
Snapshot - Immutable snapshot of state for pure guard evaluation
- Guardian
Accept Input - Consensus inputs required to finalize a guardian binding
- Guardian
Request Input - Input for requesting or cancelling a guardian relationship
- Handshake
State - Opaque wrapper for implementation-specific handshake state (e.g., snow::HandshakeState)
- Index
Stats - Statistics about the journal index.
- Indexed
Fact - An indexed fact entry containing both the key and value.
- Journal
Entry - Journal entry for effect commands
- KeyEvent
- Keyboard event
- Layered
Budget - Layered budget for the progressive disclosure model.
- Leakage
Budget - Leakage budget state
- Leakage
Event - Leakage event for privacy tracking
- Metadata
View - Read-only view of metadata
- Modifiers
- Key modifiers (bitflags-style)
- Mouse
Event - Mouse event
- Network
Address - Network address for peer communication
- Network
Change - Network change signal with monotonic generation.
- Noise
Params - Parameters for initializing a Noise handshake
- Partial
- Partial signature share for snapshot approval (effect interface version)
- Proposal
Id - Unique identifier for a snapshot proposal.
- Query
Subscription - A subscription to query results that updates when facts change.
- Rate
Limit - Rate limit for a specific context
- Rate
Limit Config - Rate limiter configuration
- Rate
Limiter - Rate limiter for operations
- Rate
Limiter Statistics - Rate limiter statistics
- Relay
Candidate - A candidate relay peer.
- Relay
Context - Context for relay selection decisions.
- Rendezvous
Packet - Rendezvous packet for flooding through the network.
- Retry
Context - Context for tracking retry state
- Retry
Policy - Retry policy configuration
- Retry
Result - Result of a retry operation with statistics
- Route
HopKey Material - Per-hop route-layer key material.
- Secure
Storage Location - Location within secure storage
- Session
Handle - Session handle for ongoing operations
- Session
Info - Session information
- Session
Message - Message within a session
- Signal
- A typed signal representing a time-varying value.
- Signal
Id - Unique identifier for a signal.
- Signal
Stream - A stream of signal value changes.
- Snapshot
- Immutable snapshot containing compacted tree state (effect interface version)
- Storage
Location - Storage location wrapper (kept for backwards compatibility)
- Storage
Stats - Storage statistics
- Style
- Text style modifiers (bitflags-style)
- Sync
Metrics - Metrics returned from a sync operation
- Temporal
Fact - A fact with temporal metadata for query results.
- Terminal
Frame - A captured terminal frame - the output of a render cycle
- Trace
Event - Structured trace event payload.
- Trace
Span Id - Opaque span identifier returned from
trace_span. - Transport
Envelope - Envelope containing the actual message data and metadata for transport
- Transport
Receipt - Receipt produced by successful guard chain execution
- Transport
State - Opaque wrapper for implementation-specific transport state (e.g., snow::TransportState)
- Transport
Stats - Statistics about transport layer operations
- UdpEndpoint
- Opaque UDP endpoint wrapper to keep core effects runtime-agnostic.
- VmBridge
Blocked Edge - One blocked receive edge observed at the synchronous VM boundary.
- VmBridge
Lease Metadata Snapshot - Snapshot of lease-related metadata visible at the bridge boundary.
- VmBridge
Pending Send - One pending outbound send emitted by the synchronous VM boundary.
- VmBridge
Scheduler Signals - Host-visible scheduler pressure and contention signals for one VM fragment.
- VmBridge
Transfer Metadata Snapshot - Snapshot of transfer-related metadata visible at the bridge boundary.
Enums§
- Adaptive
Mode - Adaptive rate limiting mode
- Admission
Error - Admission errors for theorem-pack/runtime capability checks.
- AmpChannel
Error - AMP channel error
- Aura
Error - Unified error type for all Aura operations
- Auth
Method - Available authentication methods
- Authorization
Error - Errors that can occur during authorization operations
- Authorization
Level - Authorization levels for intent dispatch.
- Availability
Error - Error type for data availability operations.
- Backoff
Strategy - Backoff strategy for retry delays
- Biometric
Security Level - Security level classification for biometric authentication
- Biometric
Type - Types of biometric authentication supported
- Capability
Token Format - Types of capability token formats supported
- Choreography
Error - Choreography-related errors
- Choreography
Event - Choreography events for debugging and visualization
- Color
- Terminal colors
- Config
Error - Configuration operation error
- Cursor
Shape - Cursor shape
- Decision
- Decision from guard evaluation
- Effect
ApiError - Effect API-related errors
- Effect
ApiEvent - Effect API events
- Effect
Command - Minimal, domain-agnostic effect commands
- Effect
Type - Effect type enumeration for all effects in the Aura system
- Execution
Mode - Execution mode controlling effect handler selection across all system layers
- Fact
Error - Error type for fact operations
- Flood
Action - Action to take after receiving a flooded packet.
- Flood
Error - Error type for flood operations.
- Health
Status - Intent
Dispatch Error - Base error type for intent dispatch.
- Jitter
Mode - Jitter mode for retry delays
- KeyCode
- Key code - matches crossterm/iocraft key codes
- KeyEvent
Kind - Key event kind
- Mouse
Button - Mouse button
- Mouse
Event Kind - Mouse event kind
- Network
Error - Network operation errors
- Network
Usability - Network usability signal emitted by platform monitors.
- Observer
Class - Observer classes for privacy leakage analysis
- Peer
Event - Peer connection events
- Rate
Limit Result - Result of a rate limit check
- Reactive
Error - Error type for reactive operations.
- Relay
Error - Error type for relay operations.
- Relay
Relationship - How we know a potential relay peer.
- Reliability
Error - Errors that can occur during reliability operations
- Secure
Storage Capability - Capabilities required for secure storage operations
- Session
Role - Role in a session
- Session
Status - Session status
- Session
Type - Types of sessions the agent can participate in
- Simulation
Event - Simulation events for deterministic replay
- Storage
Error - Storage operation errors
- System
Error - System effect operations error
- Terminal
Error - Terminal operation error
- Terminal
Event - Terminal event - the input to the TUI state machine
- Time
Error - Error type for time operations.
- Token
Status - Status of a capability token
- Verification
Level - Capability token verification level
- Wake
Condition - Wake conditions for cooperative scheduling.
Traits§
- Agent
Effects - High-level agent effects that compose core system capabilities into device-specific workflows
- AmpChannel
Effects - Anti
Entropy Effects - Sealed supertrait for anti-entropy synchronization
- Authentication
Effects - Authentication effects for device unlock and biometric operations
- Authority
Effects - Effect trait for authority management operations
- Authority
Relational Effects - Combined authority and relational effects
- Authorization
Effects - Authorization operations for capability-based access control
- Biometric
Effects - Biometric effects interface
- Biscuit
Authorization Effects - Biscuit token-based authorization effects
- Capability
Effects - Capability token effects interface
- Choreographic
Effects - Choreographic effects for distributed protocol coordination
- Choreography
Effects - Sealed supertrait for choreography coordination
- Configuration
Effects - Configuration management effects for device settings
- Console
Effects - Pure trait for console/logging operations
- Crdt
Effects - Sealed supertrait for CRDT synchronization operations
- Crypto
Core Effects - Core cryptographic effects interface
- Crypto
Effects - Combined cryptographic effects surface (core + extended).
- Crypto
Extended Effects - Optional cryptographic effects that build on the core interface.
- Data
Availability - Effect trait for data availability within a replication unit.
- Device
Storage Effects - Device-specific secure storage effects that enhance core storage with biometric protection and device-specific security features
- Effect
ApiEffects - Effect API effects for event sourcing and audit trails
- Effect
Interpreter - Asynchronous effect interpreter trait
- Fact
Effects - Effects for temporal database mutations.
- Flow
Budget Effects - Effect trait for flow budget management operations.
- Guardian
Effects - Indexed
Journal Effects - Extension trait for indexed journal lookups.
- Intent
Effects - Effect trait for dispatching intents.
- Intent
Metadata - Metadata about an intent for authorization and auditing.
- Journal
Effects - Pure trait for journal/CRDT operations
- Leakage
Choreography Ext - Extension trait for choreography integration
- Leakage
Effects - Effect trait for leakage tracking
- Logical
Clock Effects - Minimal
Effects - Sealed supertrait for minimal effect operations
- Network
Change Effects - Optional network change subscription surface.
- Network
Change Stream - Runtime-agnostic stream of network change notifications.
- Network
Core Effects - Core network effects interface for communication operations.
- Network
Effects - Combined network effects surface (core + extended).
- Network
Extended Effects - Optional network effects that build on the core interface.
- Noise
Effects - Noise Protocol Effects Trait
- Order
Clock Effects - Physical
Time Effects - Query
Effects - Effects for executing typed Datalog queries.
- Random
Core Effects - Core random effects for generating random values.
- Random
Effects - Combined random effects surface (core + extended).
- Random
Extended Effects - Optional random effects that build on the core RNG.
- Reactive
Derive Effects - Extension trait for derived signals.
- Reactive
Effects - Reactive effects for FRP-style state management.
- Relational
Effects - Effect trait for relational context operations
- Relay
Selector - Strategy for selecting relay nodes.
- Reliability
Effects - Reliability operations for fault tolerance and graceful degradation
- Rendezvous
Flooder - Effect trait for rendezvous packet flooding.
- Route
Crypto Effects - Stateless route-layer hop cryptography.
- Runtime
Capability Effects - Runtime capability query/admission interface.
- Secure
Storage Effects - Secure storage effects interface
- Session
Management Effects - Session management effects for device-side session coordination
- Signing
Effects - Sealed supertrait for FROST threshold signing operations
- Simple
Intent Effects - Simplified intent effects trait with a fixed error type.
- Snapshot
Effects - Sealed supertrait for snapshot coordination
- Storage
Core Effects - Core storage effects interface for key-value operations.
- Storage
Effects - Combined storage effects surface (core + extended).
- Storage
Extended Effects - Optional storage effects that build on core storage.
- System
Effects - System effects interface for logging, monitoring, and configuration
- Terminal
Effects - Combined terminal effects
- Terminal
Input Effects - Terminal input effects - abstracts reading events from terminal
- Terminal
Output Effects - Terminal output effects - abstracts rendering to terminal
- Threshold
Signing Effects - Threshold signing effects interface
- Time
Comparison - Time
Effects - Convenience trait for common timestamp accessors.
- Trace
Effects - Transport
Effects - Transport effects trait for network packet emission
- Tree
Effects - Sealed supertrait for tree operations
- Tree
Operation Effects - Tree operations effect interface
- UdpEffects
- UDP effect surface for binding sockets.
- UdpEndpoint
Effects - UDP endpoint operations for Aura effects.
- VmBridge
Effects - Synchronous session-local bridge operations used by the Telltale host boundary.
Type Aliases§
- Biometric
Error - Biometric authentication operation error
- Bloom
Error - Bloom filter operation error
- Capability
Error - Capability token operation error
- Crypto
Error - Cryptographic operation error
- Effect
ApiEvent Stream - Stream of effect_api events
- Noise
Error - Error type for Noise operations
- Peer
Event Stream - Stream type for peer connection events
- Public
KeyPackage - Public key package bytes (serialized FROST group public key)
- Route
Crypto Error - Error type for route-layer cryptographic operations.
- Secure
Storage Error - Secure storage operation error
- Threshold
Signing Error - Threshold signing operation error
- Timeout
Handle - Handle for timeout operations.