Watch
0
0
Fork
You've already forked hyperhive
0

swarm: merge a re-create into the stored agent permissions instead of overwriting them

This commit is contained in:
atlas 2026-10-27 11:48:54 +01:00 • committed by mara
commit ae8b2d39ec

View file

@ -76,13 +76,15 @@ pub struct CreateAgentRequest {
/// /api/agents/{name}/inference` takes them. Absent as `limits`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inference: Option<InferenceSettings>,
/// The agent's permissions, stored before the job is queued. Left out, the
/// agent holds the default set.
/// The agent's permissions, stored before the job is queued. Left out, an
/// existing record keeps its list and otherwise the agent holds the default
/// set.
#[serde(default, skip_serializing_if = "Option::is_none")]
#[cfg_attr(feature = "schema", schema(value_type = Option<Vec<String>>))]
pub permissions: Option<Vec<Permission>>,
/// Whether the agent's traffic leaves the host unfiltered. Left out, the
/// agent is created with `false`.
/// Whether the agent's traffic leaves the host unfiltered. Left out, an
/// agent with no stored value is created with `false`, and one that has a
/// record (a re-create) keeps its value.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub unrestricted_internet: Option<bool>,
/// The archetype to build the agent from, one `GET /api/archetypes`