aiguard 0.1.0

CLI entry point for aiguard
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// Resolve the path to the SQLite audit database.
///
/// Uses the platform-appropriate data directory (via `directories`) with a
/// fallback to `~/.local/share/aiguard/audit.db`.
pub fn resolve_db_path() -> String {
    if let Some(dirs) = directories::ProjectDirs::from("", "", "aiguard") {
        dirs.data_dir()
            .join("audit.db")
            .to_string_lossy()
            .to_string()
    } else {
        "~/.local/share/aiguard/audit.db".to_string()
    }
}