use PathBuf;
use ;
/// Returns the claudex state directory, creating it if missing.
///
/// Defaults to `~/.claudex`. Override with the `CLAUDEX_DIR` environment
/// variable — useful for sandboxed CI, read-only `$HOME`, or parallel
/// databases during development. The env var wins unconditionally when set.
// Env-var override tests live in tests/cli_tests.rs — they spawn a subprocess
// with `CLAUDEX_DIR` set, which avoids racing with other lib-level tests that
// call `claudex_dir()` in the same process.