microclaw-engine 0.5.0

Channel-independent Agent Engine and default services for MicroClaw
Documentation
1
2
3
4
5
6
7
8
9
10
11
use super::*;

pub(crate) fn test_db() -> (Database, std::path::PathBuf) {
    let dir = std::env::temp_dir().join(format!("microclaw_test_{}", uuid::Uuid::new_v4()));
    let db = Database::new(dir.to_str().unwrap()).unwrap();
    (db, dir)
}

pub(crate) fn cleanup(dir: &std::path::Path) {
    let _ = std::fs::remove_dir_all(dir);
}