whoami: new mcp tool returning name/role/pronouns/hyperhive_rev on both surfaces

This commit is contained in:
damocles 2026-05-17 23:31:23 +02:00
parent 4ec401a6c7
commit 3c66cb6707
9 changed files with 142 additions and 14 deletions

View file

@ -188,6 +188,12 @@ async fn dispatch(req: &AgentRequest, agent: &str, coord: &Arc<Coordinator>) ->
},
}
}
AgentRequest::Whoami => AgentResponse::Whoami {
name: agent.to_owned(),
role: "agent".to_owned(),
operator_pronouns: coord.operator_pronouns.clone(),
hyperhive_rev: crate::auto_update::current_flake_rev(&coord.hyperhive_flake),
},
}
}

View file

@ -343,6 +343,12 @@ async fn dispatch(req: &ManagerRequest, coord: &Arc<Coordinator>) -> ManagerResp
},
}
}
ManagerRequest::Whoami => ManagerResponse::Whoami {
name: MANAGER_AGENT.to_owned(),
role: "manager".to_owned(),
operator_pronouns: coord.operator_pronouns.clone(),
hyperhive_rev: crate::auto_update::current_flake_rev(&coord.hyperhive_flake),
},
}
}