codetether-agent 4.7.0-a-002.4

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Shared helpers for memory tool tests.

use super::MemoryTool;
use std::sync::atomic::Ordering;

pub fn initialized_tool() -> MemoryTool {
    let tool = MemoryTool::new();
    tool.initialized.store(true, Ordering::SeqCst);
    tool
}

pub fn isolate_data_dir() -> tempfile::TempDir {
    let dir = tempfile::tempdir().expect("tempdir");
    // SAFETY: test-only; each test gets a unique temp path.
    unsafe { std::env::set_var("CODETETHER_DATA_DIR", dir.path()) };
    dir
}