Expand description
§Aura Agent - Layer 6: Runtime Composition
This crate provides runtime composition and effect system assembly for authority-based identity management in the Aura threshold identity platform.
§Purpose
Layer 6 runtime composition crate providing:
- Authority-first runtime assembly and lifecycle management
- Effect registry and builder infrastructure
- Context management for multi-threaded agent coordination
- Choreography adapter for protocol execution
- Production, testing, and simulation execution modes
§Architecture Constraints
This crate depends on:
- Layer 1-5: All lower layers (core, domain crates, effects, protocols, features)
- MUST NOT: Create new effect implementations (use aura-effects)
- MUST NOT: Implement multi-party coordination (use aura-protocol)
- MUST NOT: Be imported by Layer 1-5 crates (no circular dependencies)
§What Belongs Here
- Effect registry and builder infrastructure
- Runtime system composition and lifecycle
- Authority context management and tracking
- Execution mode implementation (production, testing, simulation)
- Choreography protocol adapter for protocol execution
- Receipt and flow budget management
- Public API for agent creation and operation
§What Does NOT Belong Here
- Effect handler implementations (belong in aura-effects)
- Effect composition rules (belong in aura-composition)
- Multi-party protocol logic (belong in aura-protocol)
- Feature protocol implementations (belong in Layer 5 crates)
- Testing harnesses and fixtures (belong in aura-testkit)
§Design Principles
- Authority-first design: all operations scoped to specific authorities
- Lazy composition: effects are assembled on-demand, not eagerly
- Stateless handlers: runtime delegates state to journals and contexts
- Mode-aware execution: production, testing, and simulation use same API
- Lifecycle management: resource cleanup and graceful shutdown
- Zero coupling to Layer 5: runtime is agnostic to specific protocols
§Key Components
- AgentBuilder: Fluent API for composing agents with authority context
- EffectRegistry: Dynamic registry of available effect handlers
- EffectSystemBuilder: Assembly infrastructure for effect combinations
- AuraAgent: Public API for agent operations
- RuntimeSystem: Internal runtime coordination
§Usage
ⓘ
use aura_agent::{AgentBuilder, AuthorityId};
// Production agent with authority-first design
let agent = AgentBuilder::new()
.with_authority(authority_id)
.build_production()
.await?;
// Testing agent
let agent = AgentBuilder::new()
.with_authority(authority_id)
.build_testing()?;Re-exports§
pub use core::AgentBuilder;pub use core::AgentConfig;pub use core::AgentError;pub use core::AgentResult;pub use core::AuraAgent;pub use core::AuthorityContext;pub use builder::BuildError;pub use builder::CliPresetBuilder;pub use builder::CustomPresetBuilder;pub use handlers::SessionHandle;pub use handlers::SessionServiceApi;pub use handlers::SessionStats;pub use handlers::AuthChallenge;pub use handlers::AuthMethod;pub use handlers::AuthResponse;pub use handlers::AuthResult;pub use handlers::AuthServiceApi;pub use handlers::AuthenticationStatus;pub use handlers::InvitationResult;pub use handlers::InvitationServiceApi;pub use handlers::GuardianApproval;pub use handlers::RecoveryOperation;pub use handlers::RecoveryRequest;pub use handlers::RecoveryResult;pub use handlers::RecoveryServiceApi;pub use handlers::RecoveryState;pub use handlers::ChannelResult;pub use handlers::RendezvousHandler;pub use handlers::RendezvousResult;pub use handlers::RendezvousServiceApi;pub use fact_registry::build_fact_registry;
Modules§
- adaptive_
privacy_ control - Telltale-native adaptive-privacy control-plane choreographies.
- builder
- Runtime Builder System
- core
- Layer 6: Agent Public API - Builder, Config, Context, Errors
- database
- Indexed Journal Handler - B-tree indexes, Bloom filters, and Merkle trees
- fact_
registry - Domain Fact Registry
- fact_
types - Central registry of domain fact type identifiers.
- handlers
- Agent Handlers - Domain-Specific Effect Handlers
- reactive
- Reactive Programming Infrastructure
Structs§
- Accountability
Witness - Runtime-local accountability witness shape.
- Aura
Choreo Engine - VM-backed choreography engine with explicit session lifecycle hooks.
- Aura
Effect System - Concrete effect system combining all effects for runtime usage
- Aura
Envelope Parity Policy - Aura policy for admissible cross-runtime envelope differences.
- Aura
Handler Adapter - Adapter for choreography integration
- Aura
Protocol Adapter - Runtime adapter used by generated Aura choreography runners.
- Aura
VmEffect Handler - Deterministic VM host effect handler for Aura integration work.
- Aura
VmProtocol Execution Policy - Canonical VM execution policy bound to one Aura protocol class.
- Aura
VmRuntime Selector - Concrete runtime-selection input for one admitted protocol fragment.
- Aura
VmScheduler Control Input - Host-side scheduler selection input for one admitted VM session.
- Aura
VmScheduler Execution Policy - Canonical scheduler decision selected by the host for one VM session.
- Authority
Id - Authority identifier - primary identifier for authorities in the new model
- Bootstrap
Broker Config - Broker configuration for mixed native/browser bootstrap discovery.
- Context
Id - Context identifier for RelationalContexts
- Cover
Traffic Generator - Cover
Traffic Generator Config - Effect
Context - Operation-scoped context threaded through effectful calls.
- Effect
Executor - Executor for effect operations
- Effect
Operation - Typed operation identifier for registry keys.
- Effect
Registry - Dynamic registry for effect handlers
- Effect
System Builder - Authority-first runtime system builder
- Effect
Trace Bundle - Fault-aware effect trace bundle used for replay/debug artifacts.
- Effect
Trace Capture - Trace-capture utility with canonicalization + granularity filtering.
- Effect
Trace Capture Options - Capture options used by
EffectTraceCapture. - Flow
Budget Manager - Flow budget manager service
- Hold
Budget Snapshot - Provider-budget snapshot updated only after witness verification.
- Hold
Deposit Outcome - Result of a hold deposit.
- Hold
GcOutcome - Result of local hold GC.
- Hold
Local Index Entry - Runtime-local local-index projection kept separate from held objects.
- Hold
Manager - Actor-owned shared hold substrate.
- Hold
Manager Config - Configuration for the shared
Holdsubstrate. - Hold
Projection - Summary projection for hold runtime state.
- Hold
Retrieval Outcome - Result of a hold retrieval.
- Hold
Selection Plan - Result of holder selection under bounded residency.
- Hold
Sync Batch - Sync-blended retrieval/reply window.
- Invitation
- Cached invitation record
- Lifecycle
Manager - Lifecycle manager for coordinating system startup and shutdown
- Local
Health Observer - Local
Health Observer Config - Message
Request - Request passed to dynamic message providers.
- Operation
Session Id - Operation-scoped session identity for
EffectContext. - Queued
Accountability Reply - Queue entry for sync-blended accountability replies.
- Queued
Sync Retrieval - Queue entry for sync-blended retrieval.
- Receipt
Manager - Receipt manager service
- Received
Message - Metadata captured for received choreography messages.
- Reconfiguration
Manager - Runtime-owned reconfiguration state and lifecycle methods.
- Rendezvous
Manager - Manager for rendezvous operations
- Rendezvous
Manager Config - Configuration for the rendezvous service manager
- Runtime
Choreography Session Id - Runtime choreography session identity bound to one active protocol execution.
- Runtime
Service Context - Shared runtime context provided to services during lifecycle operations.
- Selection
Manager - Selection
Manager Config - Service
Error - Error from a service operation
- Session
Delegation Outcome - Typed result for one successful runtime delegation.
- Session
Delegation Transfer - Typed runtime delegation request for one session ownership transfer.
- Session
Id - Session identifier for protocol sessions and coordination
- Shared
Transport - Shared transport state for multi-agent simulations.
- Social
Manager - Manager for social topology and related services
- Social
Manager Config - Configuration for the social topology manager
- Sync
Manager Config - Configuration for the sync service manager
- Sync
Service Manager - Manager for background journal synchronization
- Task
Supervisor - Threshold
Signing Service - Unified service for all threshold signing operations
- Verified
Service Witness - Verified witness token required before local budget or scoring changes.
Enums§
- Accountability
Witness Kind - Witness kinds handled by the hold/runtime accountability path.
- Aura
Choreo Engine Error - Errors raised by
AuraChoreoEngine. - Aura
Effect Trace Encoding - Trace payload encoding for persisted replay artifacts.
- Aura
Effect Trace Granularity - Capture granularity mapped to Telltale protocol-machine capture modes.
- Aura
Envelope Parity Error - Validation error for
AuraEnvelopeParityPolicy. - Aura
VmDeterminism Profile Error - Determinism profile parse/validation error.
- Aura
VmEffect Event - Structured event emitted by
AuraVmEffectHandlerfor debugging/replay hooks. - Aura
VmGuard Layer - Typed guard-layer identifiers reserved by Aura runtime profiles.
- Aura
VmHardening Profile - Profile-level VM hardening in Aura runtime contexts.
- Aura
VmParity Profile - Cross-target parity lane profile.
- Aura
VmRuntime Mode - Host-selected runtime execution mode for one admitted protocol.
- Aura
VmScheduler Envelope Class - Scheduler envelope class declared by Aura for one protocol runtime mode.
- Coherence
Status - Coherence result for session footprints.
- Effect
Registry Error - Errors that can occur during registry operations
- Effect
Trace Capture Error - File/serialization errors from trace capture and replay tooling.
- Effect
Type - Typed effect categories for registry keys.
- Execution
Mode - Execution mode controlling effect handler selection across all system layers
- Hold
Retrieval Status - Retrieval result classification.
- Invitation
Status - Invitation status
- Invitation
Type - Type of invitation
- Reconfiguration
Error - Reconfiguration controller errors.
- Reconfiguration
Manager Error - Typed runtime errors for reconfiguration and delegation.
- Runtime
Shutdown Error - Service
Error Kind - Error kinds for service operations
- Service
Health - Health status of a runtime service
- Session
Footprint Class - Target footprint class for lifecycle session updates.
- Session
Owner Capability Scope - Scope granted to one current runtime session owner capability.
- Social
Manager State - State of the social manager
- Sync
Manager State - State of the sync service manager
- Verifier
Role - Explicit verifier roles for accountability consequences.
Constants§
- AURA_
OUTPUT_ PREDICATE_ CHOICE - Output predicate used for choice/branch visibility.
- AURA_
OUTPUT_ PREDICATE_ GUARD_ ACQUIRE - Output predicate used for guard acquire visibility.
- AURA_
OUTPUT_ PREDICATE_ GUARD_ RELEASE - Output predicate used for guard release visibility.
- AURA_
OUTPUT_ PREDICATE_ OBSERVABLE - Default output predicate when no operation-specific hint is provided.
- AURA_
OUTPUT_ PREDICATE_ STEP - Output predicate used for invoke/step visibility.
- AURA_
OUTPUT_ PREDICATE_ TRANSPORT_ RECV - Output predicate used for transport receive visibility.
- AURA_
OUTPUT_ PREDICATE_ TRANSPORT_ SEND - Output predicate used for transport send visibility.
- AURA_
VM_ POLICY_ CONSENSUS_ FALLBACK - Production determinism policy reference for consensus fallback protocols.
- AURA_
VM_ POLICY_ CONSENSUS_ FAST_ PATH - Production determinism policy reference for consensus fast-path protocols.
- AURA_
VM_ POLICY_ DKG_ CEREMONY - Production determinism policy reference for DKG protocols.
- AURA_
VM_ POLICY_ PROD_ DEFAULT - Production determinism policy reference for generic short-running protocols.
- AURA_
VM_ POLICY_ RECOVERY_ GRANT - Production determinism policy reference for recovery-grant style protocols.
- AURA_
VM_ POLICY_ SYNC_ ANTI_ ENTROPY - Production determinism policy reference for sync/anti-entropy protocols.
- AURA_
VM_ SCHED_ PRIORITY_ AGING - Scheduler policy reference for contention/budget-constrained workloads.
- AURA_
VM_ SCHED_ PROGRESS_ AWARE - Scheduler policy reference for token-biased heavy workloads.
- AURA_
VM_ SCHED_ ROUND_ ROBIN - Scheduler policy reference for fair low-pressure workloads.
- CHOREO_
BACKEND - Selected choreography backend label.
Traits§
- Aura
VmScheduler Signals Provider - Host handlers that can surface scheduler-control signals at admission time.
- Effect
Registry Ext - Extension trait for EffectRegistry with convenience methods
- Runtime
Service - Trait for runtime services with unified lifecycle management
Functions§
- apply_
protocol_ execution_ policy - Apply the selected protocol execution policy onto a VM config.
- apply_
scheduler_ execution_ policy - Apply the selected scheduler execution policy onto a VM config.
- aura_
flow_ policy_ predicate - Serializable flow-policy predicate for Aura role/category constraints.
- aura_
output_ predicate_ allow_ list - Output predicates accepted by Aura hardening policies.
- build_
envelope_ diff_ artifact_ for_ policy - Build an envelope diff artifact from cooperative and threaded replay fragments.
- build_
vm_ config - Build a VM config with explicit hardening and parity profiles.
- configured_
guard_ capacity - Effective guard capacity available in this VM config.
- create_
production_ agent - Create a production agent (convenience function)
- create_
simulation_ agent - Create a simulation agent (convenience function)
- create_
testing_ agent - Create a testing agent (convenience function)
- parse_
communication_ replay_ mode - Parse
CommunicationReplayModefrom a stable textual identifier. - parse_
determinism_ mode - Parse
DeterminismModefrom a stable textual identifier. - parse_
effect_ determinism_ tier - Parse
EffectDeterminismTierfrom a stable textual identifier. - policy_
for_ protocol - Canonical execution policy for one protocol id plus optional manifest selector.
- policy_
for_ ref - Canonical execution policy for one stable policy selector.
- policy_
requires_ envelope_ artifact - Whether the selected policy requires an envelope-diff artifact.
- required_
runtime_ capabilities_ for_ policy - Derived runtime capabilities required by the selected runtime mode.
- scheduler_
control_ input_ for_ image - Compute scheduler-selection input for one admitted code image.
- scheduler_
control_ input_ for_ protocol_ machine_ image - Compute scheduler-selection input for one admitted protocol-machine code image.
- scheduler_
policy_ for_ input - Canonical scheduler policy for one admitted session.
- scheduler_
policy_ ref - Stable textual identifier for one scheduler policy.
- validate_
determinism_ profile - Validate determinism/profile requirements encoded in VM config.
- validate_
envelope_ artifact_ for_ policy - Validate that an envelope artifact stays within the policy-defined runtime envelope.
- validate_
protocol_ execution_ policy - Validate that a VM config matches the selected protocol execution policy.
- validate_
scheduler_ execution_ policy - Validate that a VM config matches the selected scheduler execution policy.
- vm_
config_ for_ profile - Build a VM config from hardening profile only.
Type Aliases§
- Aura
VmScheduler Signals - Runtime signals that influence scheduler selection without bypassing the VM scheduler.
- Service
Registry