Skip to main content

oxibrain_core/
lib.rs

1//! oxibrain-core: the engine. Knows nothing of MCP/HTTP/CLI (ARCHITECTURE.md P6).
2
3#![cfg_attr(test, allow(clippy::unwrap_used))]
4
5pub mod canonical;
6pub mod id;
7pub mod interval;
8pub mod types;
9
10pub use interval::{Interval, clip, merge_overlapping, overlaps};
11
12pub mod knowledge;
13pub mod registry;
14
15pub use canonical::{canonical_bytes, canonical_json_value, canonicalize_value};
16pub use id::{
17    Id, assertion_id, chunk_id, content_hash, entity_id, entity_key_id, entity_merge_id,
18    episode_id, mention_id, normalize_content, statement_id,
19};
20pub use knowledge::{
21    Assertion, Belief, BeliefStatus, Entity, EntityKey, EntityMerge, KeyOrigin, Mention,
22    MentionRole, MergeDecision, Object, Polarity, ResolutionMethod, Statement, Support, TypedValue,
23    claim_repr, object_repr,
24};
25pub use types::{ContentHash, Episode, EpisodeKind, SourceRef, Space, TrustTier};
26
27pub use registry::{
28    CORE_V1_MAJOR, CORE_V1_MINOR, Cardinality, Invalidation, LiteralType, ObjectKind, PredicateDef,
29    Temporality, core_v1,
30};
31pub mod resolution;
32
33pub mod fold;
34pub use fold::{StatementEntry, fold};
35
36pub mod confidence;
37pub mod context;
38pub mod eval;
39pub mod extraction;
40pub mod lifecycle;
41pub mod rank;
42pub mod retrieval;
43pub mod security;
44pub mod uncertainty;
45pub use uncertainty::{Uncertainty, UncertaintyInput, compute as compute_uncertainty};
46pub mod pipeline;
47pub use pipeline::{Outcome as PipelineOutcome, Stage as PipelineStage, step as pipeline_step};
48pub use rank::{
49    Channel, ChannelRank, ChannelResult, DropReason, DroppedItem, Filters, Fusion, LexIndex,
50    RankedItem, RankingResult, Rerank, Retrieval, RetrievalInput, SeedPolicy, TargetFacts,
51    TargetId, TargetSet, TrustPolicy, VecSpace, explain_item, rank,
52};
53pub mod pack;
54pub use pack::{
55    BeliefForm, ContextInput, EpisodeExcerpt, PackPolicy, ProfileFact, RenderedBelief,
56    RenderedEdge, Reserve, SummaryWithUncertainty, pack,
57};
58pub mod chunking;
59pub use chunking::{Chunk, ChunkPolicy, render_context_prefix, short_ts, split_into_chunks};
60pub mod stats;
61pub mod sync;
62pub use security::{
63    AuditEntry, Capability, CapabilitySet, RedactTarget, RedactionClosure, RedactionResult, Scope,
64    TokenInfo,
65};
66pub use sync::{KnownNotes, SyncAction, SyncFile, classify as classify_sync};
67
68pub use context::{ContextBudget, ContextLayer, ContextResult, LayerKind, estimate_tokens_rough};
69pub use lifecycle::{CompactionConfig, DecayConfig, SalienceEntry, salience};
70pub use retrieval::{
71    Direction, PredicateFilter, Query, QueryMode, SearchHit, SearchTarget, Strategy, TraversalEdge,
72    TraversalNode, TraversalResult, TraversalSpec,
73};
74pub use stats::SpaceStats;