Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

1.8 KB
Raw Blame
//! RAGFS - Rust implementation of AGFS (Aggregated File System)
//!
//! RAGFS provides a unified filesystem abstraction that allows multiple
//! filesystem implementations (plugins) to be mounted at different paths.
//! It is consumed in-process through the Rust binding (`ragfs-python`).
//!
//! # Architecture
//!
//! - **Core**: Fundamental traits and types (FileSystem, ServicePlugin, etc.)
//! - **Plugins**: Filesystem implementations (MemFS, KVFS, QueueFS, etc.)
//!
//! # Example
//!
//! ```rust,no_run
//! use ragfs::core::{PluginRegistry, FileSystem};
//!
//! #[tokio::main]
//! async fn main() -> ragfs::core::Result<()> {
//!     // Create a plugin registry
//!     let mut registry = PluginRegistry::new();
//!
//!     // Register plugins
//!     // registry.register(MemFSPlugin);
//!
//!     Ok(())
//! }
//! ```

#![warn(missing_docs)]
#![warn(clippy::all)]

#[cfg(feature = "cache")]
pub mod cache;
#[cfg(feature = "cache")]
pub mod cache_runtime;
pub mod core;
pub mod crypto;
pub mod git;
#[cfg(feature = "cache")]
pub mod leader;
pub mod lock;
pub mod metrics;
pub mod multibackend;
pub mod plugins;
pub mod privacy_extractor;
pub mod privacy_matcher;
pub mod shape;

// Re-export core types for convenience
pub use core::{
    ConfigParameter, ConfigValue, Error, FileInfo, FileSystem, FilesystemStats, FsOperation,
    GlobEntry, GlobPage, HealthStatus, MountableFS, OperationStats, OperationTimer, PluginConfig,
    PluginRegistry, Result, ServicePlugin, StatsCollector, StatsWrappedFS, WriteFlag,
};

/// Version of RAGFS
pub const VERSION: &str = env!("CARGO_PKG_VERSION");

/// Name of the package
pub const NAME: &str = env!("CARGO_PKG_NAME");

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_version() {
        assert!(!VERSION.is_empty());
        assert_eq!(NAME, "ragfs");
    }
}