feat(#2659): serve hive-bash-mcp over persistent streamable-http, drop stdio bridge

This commit is contained in:
damocles 2026-07-23 17:34:02 +02:00 committed by mara
commit c4fcf7fbf1
26 changed files with 376 additions and 574 deletions

View file

@ -206,7 +206,7 @@ pub struct HiveStats {
pub model_mix: Vec<KeyCount>,
/// Most-run normalised bash-command heads ("favorite tools") across
/// the whole swarm, busiest first, capped to 10. Empty until the
/// hive-bash-mcp capture has recorded `bash_commands` rows on at
/// hive-bash-daemon capture has recorded `bash_commands` rows on at
/// least one active agent.
pub bash_mix: Vec<KeyCount>,
}
@ -221,7 +221,7 @@ struct AgentAgg {
cost: f64,
models: HashMap<String, u64>,
/// Normalised bash-command head → invocation count, from the agent's
/// `bash_commands` table (written by hive-bash-mcp). Empty when that
/// `bash_commands` table (written by hive-bash-daemon). Empty when that
/// capture hasn't run for this agent (table absent).
bash: HashMap<String, u64>,
}
@ -286,7 +286,7 @@ fn read_agent(path: &Path, from: i64, prices: &PriceTable) -> rusqlite::Result<A
}
/// Tally normalised bash-command heads from the agent's `bash_commands`
/// table (`ts INTEGER, head TEXT`, written by hive-bash-mcp) over
/// table (`ts INTEGER, head TEXT`, written by hive-bash-daemon) over
/// `[from, now]`. Best-effort + isolated from `read_agent`'s error path:
/// a missing table (capture hasn't run for this agent) or any read error
/// yields an empty map rather than propagating, so the favorite-tools