refactor(#2285): drop coordinator 1:1 path accessors, callers use paths:: directly

This commit is contained in:
damocles 2026-07-10 20:18:27 +02:00 committed by mara
commit cfb84b420a
13 changed files with 38 additions and 56 deletions

View file

@ -99,7 +99,7 @@ pub fn start(agent: &str, socket_path: &Path, coord: Arc<Coordinator>) -> Result
/// standard per-agent runtime dir + socket, with no dedicated helpers.
pub fn start_manager(coord: Arc<Coordinator>) -> Result<()> {
use std::os::unix::fs::PermissionsExt as _;
let dir = Coordinator::agent_dir(crate::lifecycle::MANAGER_NAME);
let dir = crate::paths::agent_runtime_dir(crate::lifecycle::MANAGER_NAME);
std::fs::create_dir_all(&dir)
.with_context(|| format!("create manager dir {}", dir.display()))?;
let socket = Coordinator::socket_path(crate::lifecycle::MANAGER_NAME);
@ -1026,7 +1026,7 @@ pub(crate) fn handle_send(
};
}
if resolved != hive_sh4re::OPERATOR_RECIPIENT {
let state_root = crate::coordinator::Coordinator::agent_state_root(&resolved);
let state_root = crate::paths::agent_state_dir(&resolved);
if !state_root.exists() {
return AgentResponse::Err {
message: format!(