use std::env; use std::path::PathBuf; pub fn agent_rw_paths() -> Vec { let home = match env::var("HOME") { Ok(h) => PathBuf::from(h), Err(_) => return vec![], }; let candidates = [ env::var("CLAUDE_CONFIG_DIR") .map(PathBuf::from) .unwrap_or_else(|_| home.join(".claude")), env::var("CODEX_HOME") .map(PathBuf::from) .unwrap_or_else(|_| home.join(".codex")), home.join(".pi"), home.join(".claude.json"), ]; candidates.into_iter().filter(|p| p.exists()).collect() }