wip(#1970): github-token injection path (priv wire + hive-priv handler + priv_client + hivectl github set-token)
This commit is contained in:
parent
5fb4b9f4b0
commit
80ef7d8151
4 changed files with 102 additions and 0 deletions
|
|
@ -411,6 +411,21 @@ pub enum PrivRequest {
|
|||
homeserver: Option<String>,
|
||||
},
|
||||
|
||||
/// Write `github-token` into `AGENT_STATE_ROOT/<agent_name>/state/github-token`.
|
||||
///
|
||||
/// The operator-supplied GitHub personal access token (PAT) for the
|
||||
/// agent's `hyperhive.githubAccount`. Same write semantics as
|
||||
/// `WriteAgentForgeToken` — validates `agent_name`, creates the state dir
|
||||
/// if absent, writes the file 0600, and chowns it to the agent so the
|
||||
/// `gh` wrapper / git credential helper can read it. No account suffix
|
||||
/// (single GitHub account per agent).
|
||||
WriteAgentGithubToken {
|
||||
/// Logical agent name (validated by `validate_agent_name`).
|
||||
agent_name: String,
|
||||
/// PAT value. hive-priv appends a trailing newline before writing.
|
||||
token: String,
|
||||
},
|
||||
|
||||
/// Restart `hive-matrix-daemon.service` inside an agent container via
|
||||
/// `systemctl --machine=h-<agent_name> restart hive-matrix-daemon.service`.
|
||||
/// Used by hive-c0re to kick the daemon after a successful token write
|
||||
|
|
|
|||
Loading…
Reference in a new issue