Skip to main content

Crate aura_store

Crate aura_store 

Source
Expand description

§Aura Store - Layer 2: Specification (Domain Crate)

Purpose: Define storage domain types, semantics, and fact-based state management.

This crate provides storage domain types, semantics, and pure logic for the Aura platform. Storage operations are recorded as immutable facts for journal integration.

§Architecture Constraints

Layer 2 depends only on aura-core (foundation).

  • ✓ Storage domain types and semantics
  • ✓ Fact types for journal integration (StorageFact)
  • ✓ Content-addressed storage abstraction
  • ✓ CRDT types for distributed storage state
  • ✓ Capability metadata types (not authorization logic)
  • ✗ NO effect handler implementations (use StorageEffects from aura-effects)
  • ✗ NO handler composition (that’s aura-composition)
  • ✗ NO multi-party protocol logic (that’s aura-protocol)

§Core Concepts

  • Content Addressing: Content-addressed storage with cryptographic chunk IDs
  • Fact-Based State: Storage changes recorded as StorageFact for journals
  • CRDT Storage State: Distributed storage state with join-semilattice merge
  • Authority Model: Operations attributed to AuthorityId, not devices
  • Search Domain Types: Query types and result filtering logic

§Authorization

Storage capability types (StorageCapability, StorageResource) are metadata describing required access levels. Actual authorization is performed via Biscuit tokens - see aura-authorization for the authorization implementation.

§What’s NOT in this crate

  • Effect handlers (belong in aura-effects)
  • Coordination logic (belongs in aura-protocol)
  • Choreographic protocols (belong in feature crates)
  • Async execution (pure synchronous domain logic)

Re-exports§

pub use capabilities::AccessDecision;
pub use capabilities::StorageCapability;
pub use capabilities::StoragePermission;
pub use capabilities::StorageResource;
pub use chunk::compute_chunk_layout;
pub use chunk::plan_chunk_layout_from_size;
pub use chunk::ChunkLayout;
pub use chunk::ChunkManifest;
pub use chunk::ContentManifest;
pub use chunk::ErasureConfig;
pub use crdt::StorageIndex;
pub use crdt::StorageOpLog;
pub use crdt::StorageOpType;
pub use crdt::StorageOperation;
pub use crdt::StorageState;
pub use errors::StorageError;
pub use facts::StorageFact;
pub use facts::StorageFactDelta;
pub use facts::StorageFactReducer;
pub use facts::STORAGE_FACT_TYPE_ID;
pub use search::SearchIndexEntry;
pub use search::SearchQuery;
pub use search::SearchResults;
pub use search::SearchScope;
pub use types::ByteSize;
pub use types::ChunkCount;
pub use types::ChunkIndex;
pub use types::NodeId;

Modules§

capabilities
Storage capability metadata types Storage capability types and access control metadata
chunk
Content addressing and chunk management types Content addressing and chunk management types
crdt
Storage-specific CRDT types and operations Storage-specific CRDT types and operations
errors
Unified storage error types Unified storage error handling using macro-generated error types.
facts
Storage domain facts for journal integration Storage domain facts for journal integration
search
Search query types and result filtering logic Search query types and result filtering logic
types
Strongly typed identifiers and size wrappers Strongly typed storage identifiers and size wrappers.

Structs§

ChunkId
Chunk identifier for storage-layer blocks
ContentId
Content identifier for high-level blobs
ContentSize
Content size in bytes