feat(#2628): migrate bash producer to the in-agent todo socket (keyed active + keyless done, not wakes)

This commit is contained in:
damocles 2026-07-21 23:51:35 +02:00
commit 17a9a156c2
6 changed files with 167 additions and 123 deletions

View file

@ -1,7 +1,8 @@
//! `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.
//! files, and surfaces task state to the agent as todos on the harness's
//! in-agent socket. Listens on a unix socket for tool-call requests from
//! the `hive-bash-mcp` stdio bridge.
use anyhow::Result;
@ -15,17 +16,17 @@ async fn main() -> Result<()> {
.init();
let socket_path = hive_bash_mcp::paths::daemon_socket();
let wake_socket = hive_bash_mcp::paths::hyperhive_socket();
let todo_socket = hive_bash_mcp::paths::agent_socket();
tracing::info!(
socket = %socket_path.display(),
wake = %wake_socket.display(),
todo = %todo_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);
// spawns them, pushing todos to the harness on task transitions.
hive_bash_mcp::runner::spawn_loop(todo_socket);
// Serve the unix socket forever.
hive_bash_mcp::socket::serve(&socket_path).await