fix: use rustdoc comments for manager-only variant markers

This commit is contained in:
damocles 2026-06-01 09:34:33 +02:00 committed by mara
commit 4263fd25f5

View file

@ -296,8 +296,8 @@ pub enum CancelLooseEndKind {
}
/// Unified request enum for both agent and manager sockets. The agent's
/// identity is the socket it arrived on. Manager-only variants are tagged
/// `// privileged` — an agent socket returns `Err` for them server-side.
/// identity is the socket it arrived on. Manager-only variants are marked
/// `*(manager only)*` — an agent socket returns `Err` for them server-side.
///
/// `AgentRequest` and `ManagerRequest` are type aliases for this enum;
/// existing callers continue to compile unchanged.
@ -428,57 +428,57 @@ pub enum Request {
/// `docs/conventions.md::Broker delivery + ack cycle`.
RequeueInflight,
// ---- privileged: manager socket only -----------------------------------
// ---- manager socket only ------------------------------------------------
/// Initialise a brand-new agent's proposed config repo and queue an
/// approval for the operator to review. // privileged
/// *(manager only)* Initialise a brand-new agent's proposed config repo
/// and queue an approval for the operator to review.
RequestInitConfig {
name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
description: Option<String>,
},
/// Stop a sub-agent (graceful). // privileged
/// *(manager only)* Stop a sub-agent (graceful).
Kill { name: String },
/// Start a previously-stopped sub-agent container. // privileged
/// *(manager only)* Start a previously-stopped sub-agent container.
Start { name: String },
/// Restart a sub-agent container (stop + start). // privileged
/// *(manager only)* Restart a sub-agent container (stop + start).
Restart { name: String },
/// Rebuild a sub-agent against the current hyperhive flake + agent.nix.
/// No approval required. // privileged
/// *(manager only)* Rebuild a sub-agent against the current hyperhive
/// flake + agent.nix. No approval required.
Update { name: String },
/// Submit a config commit for the operator to approve. // privileged
/// *(manager only)* Submit a config commit for the operator to approve.
RequestApplyCommit {
agent: String,
commit_ref: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
description: Option<String>,
},
/// Fetch recent journal lines for a sub-agent container. // privileged
/// *(manager only)* Fetch recent journal lines for a sub-agent container.
GetLogs {
agent: String,
#[serde(default)]
lines: Option<u32>,
},
/// Queue an approval to run `nix flake update [inputs...]`. // privileged
/// *(manager only)* Queue an approval to run `nix flake update [inputs...]`.
RequestUpdateMetaInputs {
#[serde(default)]
inputs: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
description: Option<String>,
},
/// Queue an approval to add a scheduled prompt. // privileged
/// *(manager only)* Queue an approval to add a scheduled prompt.
RequestSchedulePrompt(SchedulePromptPayload),
/// Cancel a scheduled prompt. // privileged
/// *(manager only)* Cancel a scheduled prompt.
CancelSchedule {
id: i64,
#[serde(default, skip_serializing_if = "Option::is_none")]
targets: Option<Vec<String>>,
},
/// List every schedule in the queue. // privileged
/// *(manager only)* List every schedule in the queue.
ListSchedules,
/// Fire a scheduled prompt out of band immediately. // privileged
/// *(manager only)* Fire a scheduled prompt out of band immediately.
FireScheduleNow { id: i64 },
/// Edit an existing schedule's mutable fields. // privileged
/// *(manager only)* Edit an existing schedule's mutable fields.
EditSchedule {
id: i64,
#[serde(default, skip_serializing_if = "Option::is_none")]