update_meta_inputs: require operator approval, rename to request_update_meta_inputs

This commit is contained in:
damocles 2026-05-22 09:26:09 +02:00 committed by Mara
parent 597e4ba03a
commit 3e098c56ff
7 changed files with 94 additions and 28 deletions

View file

@ -105,6 +105,11 @@ pub enum ApprovalKind {
/// template but does NOT create the container - that requires a
/// subsequent `RequestSpawn` approval.
InitConfig,
/// Run `nix flake update [inputs...]` on the meta flake and commit
/// the resulting lock changes. The `commit_ref` field stores the
/// JSON-encoded inputs array (`"[]"` = all inputs). Agent field is
/// set to `hm1nd` (the requesting manager).
UpdateMetaInputs,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
@ -842,16 +847,18 @@ pub enum ManagerRequest {
/// message into the manager's own broker inbox. `from` is caller-
/// chosen; `body` becomes the wake prompt body.
Wake { from: String, body: String },
/// Run `nix flake update [inputs...]` on the meta flake and commit
/// the resulting `flake.lock` changes. `inputs` is the list of
/// named inputs to update (e.g. `["bitburner-agent", "nixpkgs"]`).
/// Pass an empty list to update ALL inputs (equivalent to bare
/// `nix flake update`). Blocks until the lock step completes;
/// does NOT trigger a rebuild — call `update` on each affected
/// agent separately after the lock settles.
UpdateMetaInputs {
/// Queue an approval to run `nix flake update [inputs...]` on the
/// meta flake. `inputs` is the list of named inputs to update
/// (e.g. `["bitburner-agent", "nixpkgs"]`). Pass an empty list to
/// update ALL inputs. On operator approval hive-c0re runs the lock
/// update and commits the result. The `UpdateMetaInputs` approval
/// resolves with `ApprovalResolved` in the manager inbox.
RequestUpdateMetaInputs {
#[serde(default)]
inputs: Vec<String>,
/// Optional description shown on the dashboard approval card.
#[serde(default, skip_serializing_if = "Option::is_none")]
description: Option<String>,
},
}