remove the list_containers and request_update_meta_inputs MCP tools
Both agent-facing tools go away end to end, with no replacement. This is an intentional capability removal: agents can no longer enumerate their own subtree, and can no longer queue a meta-flake input bump. The system prompt and docs/tools/lifecycle.md land in this same commit on purpose. A tool named in the prompt but absent from the server makes agents confidently call something that doesn't exist, and the failure then surfaces far from its cause. Removed: - MCP registrations and bodies (hive-agent-mcp), plus the now-unused UpdateMetaInputsArgs. - Wire variants Request::ListDescendants, Request::RequestUpdateMetaInputs and Response::Containers, plus ContainerInfo, whose only consumer was that response. - hive-c0re's handle_list_descendants (its whole module) and handle_request_update_meta_inputs, the two dispatch arms, and the require_group(agent, "approvals", ...) gate on the meta-inputs verb. - The stream_enrich emoji entry and argument formatter. - docs/tools/lifecycle.md (both tools it documented are gone), its two referrers, the tool-group tables and the agent-hierarchy prose. Tool groups are kept, deliberately. ToolGroup::Lifecycle listed exactly one tool and now lists none — it is vestigial, but the variant stays so existing meta/capabilities.json grants still parse; retiring it is a separate decision. ToolGroup::Approvals also listed exactly one tool, but the group is NOT dead: check_can_cancel_approval still gates cancel_loose_end's approval-cancel arm on it server-side. ApprovalKind::UpdateMetaInputs stays too. Nothing in production code produces it any more, but pre-existing approval rows may still carry it, and the operator's own path to a meta update is unaffected — the dashboard's POST /api/meta-update inserts the meta_update job directly, bypassing approvals entirely. The two format_ack tests in hive-agent-mcp that named request_update_meta_inputs were only using it as a label string while exercising the generic OkWarn/Ok renderer, so they are retargeted to a surviving tool rather than deleted. Note hive-c0re's priv_client::list_containers is a different thing (the host-side privileged container listing behind hive-priv) and is untouched. Closes #4591
This commit is contained in:
parent
8614cb2613
commit
b88a5b2430
18 changed files with 74 additions and 356 deletions
|
|
@ -1,19 +1,10 @@
|
|||
//! Container/agent-roster wire shapes: what `ListDescendants` and
|
||||
//! `HostRequest::AgentStatus` return, plus the per-account matrix
|
||||
//! identity shape surfaced by `GetAgentMeta`.
|
||||
//! Container/agent-roster wire shapes: what `HostRequest::AgentStatus`
|
||||
//! returns, plus the per-account matrix identity shape surfaced by
|
||||
//! `GetAgentMeta`.
|
||||
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// One entry in a `ListDescendants` result.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct ContainerInfo {
|
||||
/// Logical agent name (no `h-` prefix).
|
||||
pub name: String,
|
||||
/// Whether the container is currently running.
|
||||
pub running: bool,
|
||||
}
|
||||
|
||||
/// One row in a `HostRequest::AgentStatus` result — the operator-CLI
|
||||
/// projection of the dashboard's per-agent `ContainerView`. Carries the
|
||||
/// agent's running/health flags plus the technical state an operator
|
||||
|
|
|
|||
|
|
@ -152,9 +152,15 @@ pub enum ToolGroup {
|
|||
Meta,
|
||||
/// `get_loose_ends`, `cancel_loose_end`, `remind`
|
||||
Inbox,
|
||||
/// `list_containers` - *(privileged)*
|
||||
/// Gates no tool today — `list_containers`, its only member, was
|
||||
/// removed with no replacement. Kept so existing
|
||||
/// `meta/capabilities.json` grants still parse; `tools()` returns
|
||||
/// `&[]`.
|
||||
Lifecycle,
|
||||
/// `request_update_meta_inputs` - *(privileged)*
|
||||
/// Grants no MCP tool today — `request_update_meta_inputs`, its only
|
||||
/// member, was removed with no replacement. Still a live
|
||||
/// server-side gate: `cancel_loose_end`'s approval-cancel arm
|
||||
/// requires it (`socket_server::check_can_cancel_approval`).
|
||||
Approvals,
|
||||
/// `request_schedule_prompt`, `fire_schedule_now`, `cancel_schedule`,
|
||||
/// `edit_schedule`, `list_schedules` - *(privileged)*
|
||||
|
|
@ -215,16 +221,15 @@ impl ToolGroup {
|
|||
}
|
||||
|
||||
/// The MCP tool names (without the `mcp__hyperhive__` prefix) in this group.
|
||||
/// Returns `&[]` for `WebTools` — it enables Claude built-in tools,
|
||||
/// not MCP tools; see `builtin_tools()`.
|
||||
/// Returns `&[]` for `WebTools` (it enables Claude built-in tools, not MCP
|
||||
/// tools — see `builtin_tools()`) and for `Lifecycle` / `Approvals`
|
||||
/// (their tools were removed); see each variant's doc comment.
|
||||
#[must_use]
|
||||
pub fn tools(self) -> &'static [&'static str] {
|
||||
match self {
|
||||
Self::Messaging => &["send", "recv", "ack_until"],
|
||||
Self::Meta => &["get_agent_meta"],
|
||||
Self::Inbox => &["get_loose_ends", "cancel_loose_end", "remind"],
|
||||
Self::Lifecycle => &["list_containers"],
|
||||
Self::Approvals => &["request_update_meta_inputs"],
|
||||
Self::Scheduling => &[
|
||||
"request_schedule_prompt",
|
||||
"fire_schedule_now",
|
||||
|
|
@ -233,16 +238,22 @@ impl ToolGroup {
|
|||
"list_schedules",
|
||||
],
|
||||
Self::Forge => &["create_repo"],
|
||||
// Both empty, for different reasons — see each variant's own
|
||||
// doc comment above. `Execution` grants the out-of-process
|
||||
// `bash` MCP server (`mcp__bash__run`/`status`/`kill`), gated
|
||||
// at config-render time by `extra_server_required_group` in
|
||||
// All four empty, for four different reasons — see each
|
||||
// variant's own doc comment above. `Execution` grants the
|
||||
// out-of-process `bash` MCP server
|
||||
// (`mcp__bash__run`/`status`/`kill`), gated at config-render
|
||||
// time by `extra_server_required_group` in
|
||||
// `hive-agent/src/mcp_config.rs`, not by this list — an
|
||||
// out-of-process server has no later enforcement point, so
|
||||
// that gate is the actual security boundary. `WebTools`
|
||||
// grants Claude built-in tools, not MCP ones; see
|
||||
// `builtin_tools()`.
|
||||
Self::Execution | Self::WebTools => &[],
|
||||
// `builtin_tools()`. `Lifecycle` and `Approvals` each listed
|
||||
// exactly one tool — `list_containers` and
|
||||
// `request_update_meta_inputs` respectively — and both tools
|
||||
// were removed outright; the variants stay so existing
|
||||
// grants parse, and `Approvals` still gates
|
||||
// `cancel_loose_end`'s approval-cancel arm server-side.
|
||||
Self::Lifecycle | Self::Approvals | Self::Execution | Self::WebTools => &[],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -324,9 +335,9 @@ impl ToolGroup {
|
|||
"get_agent_meta — identity introspection (set_status is always available)"
|
||||
}
|
||||
Self::Inbox => "get_loose_ends, cancel_loose_end, remind — self-scheduling",
|
||||
Self::Lifecycle => "list_containers — own-subtree container listing (privileged)",
|
||||
Self::Lifecycle => "no tools — vestigial since list_containers was removed",
|
||||
Self::Approvals => {
|
||||
"request_update_meta_inputs — operator-approved meta-flake input bumps (privileged)"
|
||||
"no tools — grants cancel_loose_end's approval-cancel arm (privileged)"
|
||||
}
|
||||
Self::Scheduling => {
|
||||
"request_schedule_prompt and related — operator-visible scheduled prompts (privileged)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue