OpenPay (1 crate, 3751 LOC, 83 tests)
op-crypto-extra Extended crypto rails. Stablecoin catalog (USDC, USDT,
PYUSD, DAI, RLUSD, EURC, FDUSD — 26 deployments). L2
catalog (12 chains incl. Optimism, Arbitrum, Base,
zkSync Era, Polygon zkEVM, Linea, Scroll, Starknet).
CCTP v2 BurnMessage encode/decode + domain ids +
attestation. ERC-4337 UserOperation v0.7 +
PackedUserOperation. EIP-7702 set-EOA-code with RLP
signing preimage. Uniswap Permit2 single + batch
transfer EIP-712 hashes. EIP-2612 ERC-20 permit.
BOLT-11 bech32 invoices + LNURL decode. Bitcoin
PSBT v2 (BIP-370). Atomic-swap HTLC. Solana SPL /
Aleo / Aztec confidential-transfer sketches.
Smart Byte (1 crate, 2304 LOC, 30 tests)
smart-byte-acdc Authentic Chained Data Containers (KERI ecosystem).
Acdc + AcdcBuilder (targeted + untargeted) with SAID
derivation. JSON Schema 2020-12 validator with
oneOf partial-disclosure. TEL (RIP/VRT/ISS/REV)
with hash-chained verification. IPEX (apply/offer/
agree/grant/admit/spurn) chained by SAID. Edge
records (I2I/NI2I/DI2I) + EdgeGraph BFS traversal
with cycle detection. Selective disclosure with
full/none/subset plans + compact packing.
CredentialRegistry trait + InMemoryRegistry over
TEL. Composes with smart-byte-core + smart-byte-keri-witness.
EOC (1 crate, 1764 LOC, 16 tests)
eoc-memory Long-term memory primitives. Memory trait + MemoryKind +
EpisodeId. Episodic event log with TimeIndex range
queries. RDF-style Triple store with S/P/O indices.
Bounded attention-budget Scratchpad with
salience-weighted eviction. Rolling SummaryBuffer +
FIFO SlidingWindow. Dream-cycle consolidate()
(episodic → semantic). Ebbinghaus forgetting curve
with reinforcement. Retriever blending cosine
similarity + recency + saturating frequency.
MemGpt three-tier shape (Main/Recall/Archival).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
53 lines
1.5 KiB
Rust
53 lines
1.5 KiB
Rust
//! Errors raised by `eoc-memory`.
|
|
|
|
use thiserror::Error;
|
|
|
|
/// Memory-subsystem error.
|
|
#[derive(Debug, Error)]
|
|
pub enum MemoryError {
|
|
/// The requested episode / item id was not found.
|
|
#[error("not found: {0}")]
|
|
NotFound(String),
|
|
|
|
/// The configuration is invalid (e.g. zero capacity, negative
|
|
/// decay constant).
|
|
#[error("invalid config: {0}")]
|
|
Config(String),
|
|
|
|
/// The supplied embedding has the wrong dimensionality for this
|
|
/// memory store.
|
|
#[error("embedding dim mismatch: expected {expected}, got {got}")]
|
|
Dim {
|
|
/// The configured embedding dimensionality.
|
|
expected: usize,
|
|
/// The dimensionality of the incoming vector.
|
|
got: usize,
|
|
},
|
|
|
|
/// A clock supplied a timestamp that runs backwards relative to
|
|
/// the previously-observed event.
|
|
#[error("non-monotonic timestamp: {got_ms} < {last_ms}")]
|
|
NonMonotonic {
|
|
/// The newly-supplied timestamp in ms.
|
|
got_ms: u64,
|
|
/// The most recent timestamp on record in ms.
|
|
last_ms: u64,
|
|
},
|
|
|
|
/// An attention budget overflowed (working memory full).
|
|
#[error("attention budget exhausted: {used}/{cap} tokens")]
|
|
BudgetExhausted {
|
|
/// Tokens currently held in the budget.
|
|
used: u32,
|
|
/// Configured token cap.
|
|
cap: u32,
|
|
},
|
|
|
|
/// Backing-store IO or serialization failure (string for
|
|
/// determinism).
|
|
#[error("store: {0}")]
|
|
Store(String),
|
|
}
|
|
|
|
/// Convenience result alias.
|
|
pub type MemoryResult<T> = std::result::Result<T, MemoryError>;
|