subagents: fold hive-extra-mcp into hive-agent-sock per mara's rescoping
This commit is contained in:
parent
670e0ccad3
commit
349f7096ba
12 changed files with 75 additions and 81 deletions
|
|
@ -13,7 +13,6 @@ axum.workspace = true
|
|||
clap.workspace = true
|
||||
hive-agent-sock.workspace = true
|
||||
hive-claude.workspace = true
|
||||
hive-extra-mcp.workspace = true
|
||||
hive-sock-client.workspace = true
|
||||
hive-types.workspace = true
|
||||
rmcp.workspace = true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//! Builds a subagent's own filtered `--mcp-config`: only
|
||||
//! `hyperhive.extraMcpServers` entries with `availableToSubagents = true`
|
||||
//! (see `hive_extra_mcp::ExtraMcpServer::available_to_subagents`) ever reach
|
||||
//! (see `hive_agent_sock::extra_mcp::ExtraMcpServer::available_to_subagents`) ever reach
|
||||
//! a subagent's claude invocation. Everything else — the built-in hyperhive
|
||||
//! surface (todos/messaging), the automatically injected `bash` and `subagent`
|
||||
//! entries — stays unreachable by construction: none of those default to
|
||||
|
|
@ -24,11 +24,12 @@ const CONFIG_FILE: &str = "subagent-mcp-config.json";
|
|||
#[must_use]
|
||||
pub fn build() -> Option<PathBuf> {
|
||||
let state_dir = crate::paths::state_dir();
|
||||
let servers: serde_json::Map<String, serde_json::Value> = hive_extra_mcp::load_extra_mcp()
|
||||
.into_iter()
|
||||
.filter(|(_, spec)| spec.available_to_subagents())
|
||||
.map(|(name, spec)| (name, spec.to_json_entry(&state_dir)))
|
||||
.collect();
|
||||
let servers: serde_json::Map<String, serde_json::Value> =
|
||||
hive_agent_sock::extra_mcp::load_extra_mcp()
|
||||
.into_iter()
|
||||
.filter(|(_, spec)| spec.available_to_subagents())
|
||||
.map(|(name, spec)| (name, spec.to_json_entry(&state_dir)))
|
||||
.collect();
|
||||
if servers.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue