asurada 0.2.0

Asurada — a memory + cognition daemon that grows with the user. Local-first, BYOK, shared by Devist/Webchemist Core/etc.
#![allow(dead_code)]

use anyhow::{Context, Result};
use std::path::PathBuf;

/// `~/.asurada/`
pub fn config_dir() -> Result<PathBuf> {
    let home = dirs::home_dir().context("locate home directory")?;
    Ok(home.join(".asurada"))
}

/// `~/.asurada/brain.db` — Asurada의 뇌 SQLite 파일.
pub fn brain_db() -> Result<PathBuf> {
    Ok(config_dir()?.join("brain.db"))
}

/// `~/.asurada/config.toml` — 비밀 아닌 설정.
pub fn config_file() -> Result<PathBuf> {
    Ok(config_dir()?.join("config.toml"))
}