pub mod backend;
pub mod billing;
pub mod blind;
pub mod crypto;
pub mod debrief;
pub mod embedding;
pub mod fingerprint;
pub mod hotcache;
pub mod lsh;
pub mod protobuf;
pub mod relay;
pub mod reranker;
pub mod search;
pub mod setup;
pub mod stemmer;
pub mod store;
pub mod userop;
pub mod wallet;
pub use backend::{MemoryCategory, MemoryEntry, TotalReclawConfig, TotalReclawMemory};
pub use totalreclaw_core::claims::{
Claim, ClaimCategory, ClaimStatus, EntityRef, EntityType, ResolutionAction, SkipReason,
TIE_ZONE_SCORE_TOLERANCE, is_pinned_claim, is_pinned_json, respect_pin_in_resolution,
};
pub use totalreclaw_core::claims::{
MemoryClaimV1, MemoryEntityV1, MemorySource, MemoryScope, MemoryTypeV1,
MemoryVolatility, MEMORY_CLAIM_V1_SCHEMA_VERSION,
};
pub use totalreclaw_core::contradiction::{
Contradiction, ResolutionOutcome, ResolutionWeights, ScoreComponents,
resolve_with_candidates, resolve_pair, detect_contradictions, default_weights,
DEFAULT_LOWER_THRESHOLD, DEFAULT_UPPER_THRESHOLD,
};
pub use totalreclaw_core::decision_log::{
DecisionLogEntry, DECISION_LOG_MAX_LINES, CONTRADICTION_CANDIDATE_CAP,
find_loser_claim_in_decision_log, find_decision_for_pin,
build_feedback_from_decision, append_decision_entry,
};
pub use store::ContradictionStoreResult;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("crypto error: {0}")]
Crypto(String),
#[error("invalid mnemonic: {0}")]
InvalidMnemonic(String),
#[error("embedding error: {0}")]
Embedding(String),
#[error("reranker error: {0}")]
Reranker(String),
#[error("LSH error: {0}")]
Lsh(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("HTTP error: {0}")]
Http(String),
#[error("quota exceeded: {0}")]
QuotaExceeded(String),
}
impl From<totalreclaw_core::Error> for Error {
fn from(e: totalreclaw_core::Error) -> Self {
match e {
totalreclaw_core::Error::Crypto(msg) => Error::Crypto(msg),
totalreclaw_core::Error::InvalidMnemonic(msg) => Error::InvalidMnemonic(msg),
totalreclaw_core::Error::Lsh(msg) => Error::Lsh(msg),
totalreclaw_core::Error::Reranker(msg) => Error::Reranker(msg),
}
}
}
pub type Result<T> = std::result::Result<T, Error>;