address review: drop backwards-compat request/response aliases, use canonical names
This commit is contained in:
parent
d0beec8a40
commit
144912f8e0
14 changed files with 183 additions and 229 deletions
|
|
@ -1,7 +1,7 @@
|
|||
//! Embedded MCP server. Claude Code (running inside the agent container)
|
||||
//! connects to this over streamable-HTTP via `--mcp-config` (the long-lived
|
||||
//! `hive-mcp-http` daemon); tool calls land here and are translated to
|
||||
//! `AgentRequest::*` / `ManagerRequest::*` against hyperhive's own
|
||||
//! `Request::*` against hyperhive's own
|
||||
//! per-container unix socket at `/run/hive/mcp.sock`.
|
||||
//!
|
||||
//! Two protocols, two surfaces:
|
||||
|
|
@ -99,11 +99,9 @@ where
|
|||
|
||||
/// Unified MCP tool surface for both sub-agent and manager roles.
|
||||
///
|
||||
/// `AgentRequest = ManagerRequest = Request` and `AgentResponse =
|
||||
/// ManagerResponse = Response` are type aliases in hive-sh4re, so a single
|
||||
/// Both sockets speak the same `Request` / `Response` wire, so a single
|
||||
/// `dispatch` call covers both sockets — the only real difference is which
|
||||
/// socket path is used and which tools the flavor enables.
|
||||
///
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct AgentServer {
|
||||
socket: PathBuf,
|
||||
|
|
@ -119,8 +117,8 @@ impl AgentServer {
|
|||
/// `Response` plus the retry count so tool handlers can annotate their
|
||||
/// result (see `annotate_retries`).
|
||||
///
|
||||
/// `AgentRequest` / `ManagerRequest` / `Request` are all the same type
|
||||
/// (hive-sh4re type aliases), so this single method covers both sockets.
|
||||
/// Both sockets speak the same `Request` type, so this single method
|
||||
/// covers both.
|
||||
async fn dispatch(
|
||||
&self,
|
||||
req: hive_agent_sock::Request,
|
||||
|
|
|
|||
Loading…
Reference in a new issue