//! `hive-bash-daemon` binary — long-running per-agent bash task runner. //! Spawns `sh -c` subprocesses, monitors completion, writes task state //! files, and fires hyperhive wake signals. Listens on a unix socket //! for tool-call requests from the `hive-bash-mcp` stdio bridge. use anyhow::Result; #[tokio::main] async fn main() -> Result<()> { tracing_subscriber::fmt() .with_env_filter( tracing_subscriber::EnvFilter::try_from_env("RUST_LOG") .unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")), ) .init(); let socket_path = hive_bash_mcp::paths::daemon_socket(); let wake_socket = hive_bash_mcp::paths::hyperhive_socket(); tracing::info!( socket = %socket_path.display(), wake = %wake_socket.display(), "hive-bash-daemon starting" ); // Start the background runner loop — scans for pending tasks and // spawns them, sends wake signals on completion. hive_bash_mcp::runner::spawn_loop(wake_socket); // Serve the unix socket forever. hive_bash_mcp::socket::serve(&socket_path).await }