//! Dirigent Archivist
//!
//! Persistent storage for all agentic interactions in Dirigent.
//!
//! The Archivist provides file-based archival storage using NDJSON, JSON, and TSV
//! formats for durability and human-readability. It implements an archive-first
//! architecture with connector API fallback for session data.
//!
//! # Key Features
//!
//! - File-based storage for easy curation and grep-ability
//! - Content-addressable file storage for attachments
//! - Session lineage tracking (splits, continuations, mutations)
//! - Connector registry with UID coordination
//! - Real-time event streaming for archive updates
//!
//! # Architecture
//!
//! See `docs/building/05_archivist/vision.md` for detailed design.

pub mod accumulator;
pub mod backend;
pub mod backends;
pub mod backfill;
pub mod coordinator;
pub mod error;
pub mod events;
pub mod import;
pub mod registry;
pub mod session;
pub mod storage;
pub mod types;

// Re-export commonly used types
pub use accumulator::{MessageAccumulator, ToolCallData};
pub use backend::{
    ArchiveBackend, ArchiveCapability, CapabilitySet, ConnectorRegistryBackend,
    DagBackend, HealthStatus, MetaEventsBackend, SearchBackend, SessionMappingBackend,
};
pub use backends::JsonlBackend;
pub use backfill::{backfill_from_sessions, convert_message_to_record, BackfillStats};
pub use coordinator::{ArchiveInfo, ArchiveMetadata, Archivist};
pub use error::{ArchivistError, Result};
pub use events::EventHandler;
pub use types::*;
