refactor(#1825): drop manager_dir/manager_socket_path, use the per-agent fns

This commit is contained in:
damocles 2026-07-04 12:05:14 +02:00 committed by mara
commit 77a9492a3f
2 changed files with 4 additions and 15 deletions

View file

@ -75,14 +75,14 @@ pub fn start(agent: &str, socket_path: &Path, coord: Arc<Coordinator>) -> Result
/// no authority of its own — it just serves requests as `agent = MANAGER_AGENT`
/// ("ruth"), and ruth's reach comes entirely from being the topology root
/// (`is_descendant_of` covers every agent) plus the capabilities / tool-groups
/// it holds, identical to connecting on a per-agent socket. (The redundant
/// path — ruth using the standard per-agent socket — is collapsed in a follow-up.)
/// it holds, identical to connecting on a per-agent socket — ruth uses the
/// 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::manager_dir();
let dir = Coordinator::agent_dir(crate::lifecycle::MANAGER_NAME);
std::fs::create_dir_all(&dir)
.with_context(|| format!("create manager dir {}", dir.display()))?;
let socket = Coordinator::manager_socket_path();
let socket = Coordinator::socket_path(crate::lifecycle::MANAGER_NAME);
if socket.exists() {
std::fs::remove_file(&socket).context("remove stale manager socket")?;
}