get_logs: resolve machine name via container_name like every other verb
This commit is contained in:
parent
7ce3da1e21
commit
0a79912b67
4 changed files with 27 additions and 9 deletions
|
|
@ -750,7 +750,9 @@ pub struct RequestApplyCommitArgs {
|
|||
|
||||
#[derive(Debug, serde::Deserialize, schemars::JsonSchema)]
|
||||
pub struct GetLogsArgs {
|
||||
/// Logical name of the sub-agent container to fetch logs for.
|
||||
/// Logical agent name to fetch logs for (e.g. `gui`, `hm1nd`).
|
||||
/// hive-c0re maps it to the underlying machine name (`h-gui`)
|
||||
/// itself — pass the plain agent name, not the `h-` form.
|
||||
pub agent: String,
|
||||
/// How many journal lines to return (default: 50, max: 500).
|
||||
#[serde(default)]
|
||||
|
|
@ -1128,8 +1130,9 @@ impl ManagerServer {
|
|||
#[tool(
|
||||
description = "Fetch recent journal log lines for a sub-agent container. Useful \
|
||||
for diagnosing MCP server registration failures, startup crashes, plugin install \
|
||||
errors, or any harness issue you can't see from inside the container. `lines` \
|
||||
defaults to 50 (max capped at 500 on the host side)."
|
||||
errors, or any harness issue you can't see from inside the container. Pass the \
|
||||
plain logical agent name (e.g. `gui`) — hive-c0re resolves the machine name. \
|
||||
`lines` defaults to 50 (max capped at 500 on the host side)."
|
||||
)]
|
||||
async fn get_logs(&self, Parameters(args): Parameters<GetLogsArgs>) -> String {
|
||||
let log = format!("{args:?}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue