rsclaw 0.0.1-alpha.1

rsclaw: High-performance AI agent (BETA). Optimized for M4 Max and 2GB VPS. 100% compatible with openclaw
Documentation
#[allow(unused_imports)]
pub mod browser;
#[allow(unused_imports)]
pub mod memory;
#[allow(unused_imports)]
pub mod token;

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

/// Get the default skills directory path.
pub fn skills_dir() -> Result<PathBuf> {
    let home = dirs::home_dir().context("Cannot determine home directory")?;
    Ok(home.join(".rsclaw").join("skills"))
}

/// Ensure the skills directory exists.
pub fn ensure_skills_dir() -> Result<PathBuf> {
    let dir = skills_dir()?;
    if !dir.exists() {
        std::fs::create_dir_all(&dir).context("Failed to create skills directory")?;
    }
    Ok(dir)
}

/// Get the default plugins directory path.
pub fn plugins_dir() -> Result<PathBuf> {
    let home = dirs::home_dir().context("Cannot determine home directory")?;
    Ok(home.join(".rsclaw").join("plugins"))
}

/// Ensure the plugins directory exists.
pub fn ensure_plugins_dir() -> Result<PathBuf> {
    let dir = plugins_dir()?;
    if !dir.exists() {
        std::fs::create_dir_all(&dir).context("Failed to create plugins directory")?;
    }
    Ok(dir)
}