subagents: fold hive-extra-mcp into hive-agent-sock per mara's rescoping

This commit is contained in:
damocles 2026-09-13 13:54:33 +02:00 committed by mara
commit 349f7096ba
12 changed files with 75 additions and 81 deletions

View file

@ -1,23 +1,31 @@
//! Wire types for the *in-agent* socket, served by the hive-agent harness
//! to the in-container producers. Matrix / bash MCP daemons and
//! `forge_notify` are the built-in ones today, but `subsystem` on the todo
//! ops below is a plain string, not a closed set: any user-configured MCP
//! server declared in an agent's `agent.nix` can dial this socket and push
//! its own todos the same way. Carries the loose-ends-v2 *todo* op family
//! plus the harness-local *reminder* op family; more in-agent request
//! families may be added over time (the socket is deliberately named for
//! the agent, not the todos).
//! Rescoped beyond its original name: what's common across the in-container
//! "agent plugins" (matrix/bash/subagent MCP daemons, `forge_notify`, and any
//! user-configured MCP server) — not just the in-agent socket wire types.
//!
//! **Wire types for the *in-agent* socket**, served by the hive-agent harness
//! to those producers. `subsystem` on the todo ops below is a plain string,
//! not a closed set: any user-configured MCP server declared in an agent's
//! `agent.nix` can dial this socket and push its own todos the same way.
//! Carries the loose-ends-v2 *todo* op family plus the harness-local
//! *reminder* op family; more in-agent request families may be added over
//! time (the socket is deliberately named for the agent, not the todos).
//!
//! Distinct from `hive-core-agent-sock`, the *host*-served core↔agent
//! protocol on `/run/hive/mcp.sock`: this socket never leaves the
//! container. The harness owns the todo + reminder stores locally and
//! signals its own turn loop directly, so hive-c0re is not in either path —
//! no broker round-trip, no long-poll, no marker files.
//!
//! **`extra_mcp`**: the `hyperhive.extraMcpServers` spec + parsing, shared by
//! `hive-agent` (the main session's `--mcp-config`) and `hive-subagent-mcp`
//! (the subagent-eligible subset) — not a socket protocol at all, but this
//! crate is the natural home since both consumers already depend on it.
use serde::{Deserialize, Serialize};
use hive_sh4re::inbox::LooseEnd;
pub mod extra_mcp;
pub mod paths;
/// In-container path of the harness-served in-agent socket. The harness