fix: add approval kind to cancel_loose_end docs; drop stale role comment in mcp.rs; fix system.md approval-cancel description
This commit is contained in:
parent
78a00d1258
commit
9c1c4f62fb
3 changed files with 19 additions and 21 deletions
|
|
@ -383,7 +383,7 @@ fn loose_end_kind_label(kind: hive_sh4re::CancelLooseEndKind) -> &'static str {
|
|||
}
|
||||
|
||||
/// Format helper for `get_agent_meta`: renders an agent's identity +
|
||||
/// current status as a short human-readable block. `name`, `role`,
|
||||
/// current status as a short human-readable block. `name`,
|
||||
/// `hyperhive_rev`, and `running` are always shown; `status` only
|
||||
/// appears when one is set, otherwise the line reads `status: <none>`.
|
||||
/// When `running` is false the host has already cleared `status_text`
|
||||
|
|
@ -978,12 +978,10 @@ impl AgentServer {
|
|||
// IMPORTANT: this tool is only available when the `lifecycle` tool group
|
||||
// is granted to this agent. hive-c0re enforces the topology check
|
||||
// server-side: the call is rejected unless `name` is a direct child.
|
||||
#[tool(
|
||||
description = "Stop a direct child sub-agent container (graceful). \
|
||||
#[tool(description = "Stop a direct child sub-agent container (graceful). \
|
||||
Only succeeds if `name` is a direct child of this agent in the topology \
|
||||
tree — the server enforces this. No approval required. \
|
||||
State dir is kept; recreating the agent reuses prior config + credentials."
|
||||
)]
|
||||
State dir is kept; recreating the agent reuses prior config + credentials.")]
|
||||
async fn kill(&self, Parameters(args): Parameters<KillArgs>) -> String {
|
||||
let log = format!("{args:?}");
|
||||
let name = args.name.clone();
|
||||
|
|
@ -1012,7 +1010,10 @@ impl AgentServer {
|
|||
let (resp, retries) = self
|
||||
.dispatch(hive_sh4re::Request::Update { name: args.name })
|
||||
.await;
|
||||
annotate_retries(format_ack(resp, "update", format!("updated {name}")), retries)
|
||||
annotate_retries(
|
||||
format_ack(resp, "update", format!("updated {name}")),
|
||||
retries,
|
||||
)
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
|
@ -1029,9 +1030,7 @@ impl AgentServer {
|
|||
)]
|
||||
async fn list_containers(&self) -> String {
|
||||
run_tool_envelope("list_containers", String::new(), async move {
|
||||
let (resp, retries) = self
|
||||
.dispatch(hive_sh4re::Request::ListDescendants)
|
||||
.await;
|
||||
let (resp, retries) = self.dispatch(hive_sh4re::Request::ListDescendants).await;
|
||||
let body = match resp {
|
||||
Ok(SocketReply::Containers(containers)) => {
|
||||
if containers.is_empty() {
|
||||
|
|
@ -1176,11 +1175,9 @@ impl AgentServer {
|
|||
// IMPORTANT: this tool is only available when the `lifecycle` tool group
|
||||
// is granted to this agent. hive-c0re enforces the topology check
|
||||
// server-side: the call is rejected unless `name` is a direct child.
|
||||
#[tool(
|
||||
description = "Start a stopped direct child sub-agent container. \
|
||||
#[tool(description = "Start a stopped direct child sub-agent container. \
|
||||
Only succeeds if `name` is a direct child of this agent in the topology \
|
||||
tree — the server enforces this. No approval required."
|
||||
)]
|
||||
tree — the server enforces this. No approval required.")]
|
||||
async fn start(&self, Parameters(args): Parameters<StartArgs>) -> String {
|
||||
let log = format!("{args:?}");
|
||||
let name = args.name.clone();
|
||||
|
|
@ -1188,12 +1185,14 @@ impl AgentServer {
|
|||
let (resp, retries) = self
|
||||
.dispatch(hive_sh4re::Request::Start { name: args.name })
|
||||
.await;
|
||||
annotate_retries(format_ack(resp, "start", format!("started {name}")), retries)
|
||||
annotate_retries(
|
||||
format_ack(resp, "start", format!("started {name}")),
|
||||
retries,
|
||||
)
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
|
||||
#[tool(
|
||||
description = "Fetch recent journal log lines for a sub-agent container. Useful \
|
||||
for diagnosing MCP server registration failures, startup crashes, plugin install \
|
||||
|
|
@ -1406,9 +1405,7 @@ impl AgentServer {
|
|||
)]
|
||||
async fn list_schedules(&self) -> String {
|
||||
run_tool_envelope("list_schedules", String::new(), async move {
|
||||
let (resp, retries) = self
|
||||
.dispatch(hive_sh4re::Request::ListSchedules)
|
||||
.await;
|
||||
let (resp, retries) = self.dispatch(hive_sh4re::Request::ListSchedules).await;
|
||||
let body = match resp {
|
||||
Ok(SocketReply::Schedules(schedules)) => serde_json::to_string(&schedules)
|
||||
.unwrap_or_else(|e| format!("list_schedules: serialise: {e:#}")),
|
||||
|
|
|
|||
Loading…
Reference in a new issue