hyperhive/hive-subagent-mcp/src/paths.rs

15 lines
562 B
Rust

//! The one per-agent path this daemon needs.
use std::path::PathBuf;
/// The harness-served in-agent todo socket (loose-ends v2). This daemon
/// pushes exactly one todo per subagent lifetime — the completion summary,
/// once its background turn finishes. Override via `HIVE_AGENT_SOCKET`;
/// same resolution as `hive-bash-mcp`'s own `paths::agent_socket`.
#[must_use]
pub fn agent_socket() -> PathBuf {
std::env::var_os("HIVE_AGENT_SOCKET").map_or_else(
|| PathBuf::from(hive_agent_sock::DEFAULT_AGENT_SOCKET),
PathBuf::from,
)
}