feat(#1106): split bash mcp into hive-bash-daemon + hive-bash-mcp bridge
- new hive-bash-mcp crate: daemon (subprocess runner, wake signals) +
stdio bridge (mcp tools). mirrors hive-matrix-mcp architecture
- hive-ag3nt: remove bash_runner.rs and bash_run/bash_status mcp tools;
get_loose_ends uses hive_bash_mcp:🏃:active_tasks() via crate dep
- harness-base.nix: add hive-bash-daemon systemd service + auto-inject
bash extraMcpServer into every agent (socket: /run/hive-bash/socket)
This commit is contained in:
parent
9aa624d310
commit
e86160820a
15 changed files with 811 additions and 373 deletions
32
hive-bash-mcp/src/main.rs
Normal file
32
hive-bash-mcp/src/main.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//! `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
|
||||
}
|
||||
Loading…
Reference in a new issue