//! Storage abstraction layer for multi-backend task orchestration
//!
//! This module provides a trait-based abstraction for different storage
//! backends:
//! - Filesystem-based storage (JSON files)
//! - SurrealDB embedded storage (RocksDB engine)
//! - SurrealDB server storage (WebSocket connection)
//!
//! The abstraction maintains compatibility with the existing TaskQueue
//! interface while enabling pluggable storage backends with advanced features
//! like:
//! - Real-time task subscriptions
//! - Built-in authentication and RBAC
//! - Graph-based task dependencies
//! - Time-series metrics collection
//! - Comprehensive audit logging

pub mod factory;
pub mod filesystem;
pub mod traits;

// SurrealDB implementation (feature-gated)
#[cfg(feature = "surrealdb")]
pub mod surrealdb;

// Re-export key types for easy access
pub use factory::{
    available_storage_types, create_storage, create_storage_from_args, storage_help_text,
    DefaultStorageFactory, StorageConfig, StorageFactory,
};
pub use filesystem::FilesystemStorage;
#[cfg(feature = "surrealdb")]
pub use surrealdb::{StorageMode, SurrealConfig, SurrealStorage};
pub use traits::{
    AuditEntry, AuthToken, Metric, StorageError, StorageResult, StorageStatistics, TaskEvent,
    TaskEventType, TaskStorage, TimeRange,
};

// Test modules
#[cfg(test)]
#[cfg(feature = "surrealdb")]
mod test_surrealdb;
