refactor(#2352): route hivectl forge create-user through a daemon wire command

This commit is contained in:
damocles 2026-07-14 21:51:15 +02:00 committed by mara
commit a3c916813b
3 changed files with 88 additions and 30 deletions

View file

@ -147,6 +147,17 @@ pub enum HostRequest {
#[serde(default)]
room: Option<String>,
},
/// Create or refresh a forge account + API token for `name`. Daemon-side
/// equivalent of `hivectl forge create-user`: for an existing agent it
/// provisions the account and persists the token to `<notes>/forge-token`;
/// for a non-agent (operator/human) it mints a user and returns the token
/// in [`HostResponse::messages`]. `password` is resolved client-side
/// (inline flag or stdin) and only meaningful for non-agent accounts.
ForgeCreateUser {
name: String,
#[serde(default)]
password: Option<String>,
},
}
/// Selects which container classes a hive-wide [`HostRequest::Stop`] /