Skip to main content

khive_storage/
lib.rs

1//! Storage capability traits: `SqlAccess`, `VectorStore`, `TextSearch`,
2//! `GraphStore`, `NoteStore`, `EntityStore`, `EventStore`, `SparseStore`,
3//! `BlobStore`, and `AttachmentStore`.
4
5pub mod agent;
6pub mod attachment;
7pub mod blob;
8pub mod capability;
9pub mod entity;
10pub mod error;
11pub mod event;
12pub mod graph;
13pub mod note;
14pub mod request_context;
15pub mod sparse;
16pub mod sql;
17pub mod telemetry;
18pub mod text;
19pub mod tx_registry;
20pub mod types;
21pub mod usage;
22pub mod vectors;
23
24pub use agent::AgentStore;
25pub use attachment::{Attachment, AttachmentStore, AttachmentSubstrate, NewAttachment};
26pub use blob::{
27    BlobOrphanSweepConfig, BlobOrphanSweepResult, BlobStore, ContentRef, MAX_BLOB_WHOLE_BYTES,
28};
29pub use capability::StorageCapability;
30pub use entity::{Entity, EntityFilter, EntityStore};
31pub use error::{StorageError, WriterTaskRequestState};
32
33pub use event::{
34    Event, EventFilter, EventObservation, EventStore, EventView, ObservationRole, ReferentKind,
35};
36pub use graph::GraphStore;
37pub use note::{FilterOp, Note, NoteFilter, NoteStore, SortDir};
38pub use request_context::{
39    await_request_read_phase, capture_request_read_context, effective_request_read_deadline,
40    ensure_request_read_active, inherit_request_read_cancellation, inherit_request_read_context,
41    request_read_is_cancelled, request_read_timeout_from_env, scope_request_read_cancellation,
42    scope_request_read_deadline, scope_request_read_deadline_at,
43    wait_for_request_read_cancellation, RequestReadContext, RequestReadDeadline,
44    RequestReadStopReason, DEFAULT_REQUEST_READ_TIMEOUT_SECS,
45};
46pub use sparse::SparseStore;
47pub use sql::{AtomicUnitOp, BoxFuture, SqlAccess, SqlReader, SqlWriter};
48pub use telemetry::{
49    ChannelBackoffArmedPayload, ChannelBackoffResetPayload, ChannelHeartbeatPersistFailedPayload,
50    ChannelPollFailedPayload, ChannelPollStartedPayload, ChannelPollSucceededPayload,
51    CheckpointOutcomeRecordedPayload, ConfigLockedPayload, LifecycleEvent, PhaseCancelledPayload,
52    PhaseCompletedPayload, PhaseStartedPayload,
53};
54pub use text::TextSearch;
55pub use types::StorageResult;
56pub use vectors::VectorStore;
57
58pub use types::{
59    BatchWriteSummary, DeleteMode, DirectedNeighborHit, Direction, Edge, EdgeFilter, EdgeSeekPage,
60    EdgeSortField, GraphPath, GuardedBatchOutcome, GuardedBatchRefusal, GuardedWriteOutcome,
61    IndexRebuildScope, LinkId, MissingEndpoints, NeighborHit, NeighborQuery, OrphanSweepConfig,
62    OrphanSweepResult, Page, PageRequest, PathNode, PropertyFilter, PropertyOp, SeekCursor,
63    SeekPage, SortDirection, SortOrder, SparseRecord, SparseSearchHit, SparseSearchRequest,
64    SparseVector, SqlRow, SqlStatement, SqlValue, TextDocument, TextFilter, TextGatherMode,
65    TextIndexStats, TextQueryMode, TextSearchHit, TextSearchOptions, TextSearchRequest,
66    TextTermStats, TextTermStatsRequest, TimeRange, TraversalExecutionBudget, TraversalOptions,
67    TraversalRequest, VectorIndexKind, VectorMetadataFilter, VectorRecord, VectorSearchHit,
68    VectorSearchRequest, VectorStoreCapabilities, VectorStoreInfo, DEFAULT_TRAVERSAL_LIMIT,
69    MAX_SPARSE_SEARCH_TOP_K, MAX_TRAVERSAL_DEPTH, MAX_TRAVERSAL_LIMIT, MAX_TRAVERSAL_MILLIS,
70    MAX_TRAVERSAL_ROOTS, MAX_TRAVERSAL_WORK,
71};
72
73pub use khive_types::{
74    AgentRecord, AgentState, EdgeCategory, EdgeRelation, EventOutcome, SubstrateKind,
75    TerminalReason,
76};