pub struct SpawnPayload {Show 14 fields
pub instruction: String,
pub output_contract: Option<String>,
pub context_seed: Vec<SeedMessage>,
pub intelligence: IntelConfig,
pub mcp_servers: Vec<McpServerSpec>,
pub a2a_peers: Vec<A2aPeerSpec>,
pub tls_ca: Option<String>,
pub aauth: Option<AAuthSettings>,
pub limits: Limits,
pub telemetry: Telemetry,
pub depth: u32,
pub warm: bool,
pub role: Role,
pub turn: Option<Box<TurnSpec>>,
}Expand description
Everything a subagent needs to run, minted by the supervisor. The child
trusts none of this from its own request — depth in particular is
minted by the supervisor from the caller’s handle (RFC 0009).
Fields§
§instruction: StringThe task. For a delegated child this is the parent’s instruction
argument; see also output_contract.
output_contract: Option<String>Objective + required output format + boundaries — a real delegation contract, not a bare string (RFC 0009 §spawn-payload).
context_seed: Vec<SeedMessage>The narrowed context the parent chose to share — never the full transcript (context hygiene + injection firewall, RFC 0012).
intelligence: IntelConfigHow to reach the LLM (env/flag-sourced; never logged).
mcp_servers: Vec<McpServerSpec>The child’s scoped MCP server subset (⊆ parent’s; RFC 0009).
a2a_peers: Vec<A2aPeerSpec>Declared remote-A2A delegation peers (RFC 0020 §3). Inherited by children
like mcp_servers so a subagent can also delegate over A2A; the
a2a.delegate self-tool dials these. #[serde(default)] keeps older
frames (and non-a2a peers, which simply send an empty vec) parseable.
tls_ca: Option<String>Extra PEM CA file path for outbound TLS trust (--tls-ca, the
private/in-cluster PKI anchor). PUBLIC material — a path to a CA
certificate, never key bytes — so it may ride the payload; the child
installs it process-wide before its first dial and passes it on to its
own children. #[serde(default)] keeps older frames parseable.
aauth: Option<AAuthSettings>AAuth [DRAFT] agent-identity settings (RFC 0023): inherited by every
subagent so the whole process tree signs MCP requests under ONE identity.
The key file is a shared-fs path (like tls_ca); no secret rides here
(the enrollment token is a {{secret:…}} template). #[serde(default)]
keeps older frames parseable.
limits: Limits§telemetry: Telemetry§depth: u32Supervisor-minted tree depth (0 = root).
warm: boolRun as a warm continue-session: after each turn, stay alive and wait
for the next injected event (ControlMsg::Inject) instead of exiting,
continuing the same transcript (RFC 0008 §spawn-vs-continue). Default
(false) = a one-shot per-event run. #[serde(default)] keeps older frames
parseable.
role: Roleagentd 2.0 (RFC 0026 §2): the child’s role. agent (default) is the
RFC 0009 subagent (ReAct loop / workflow driver); turn is a turn
worker driven by turn below. #[serde(default)] keeps older frames
parseable.
turn: Option<Box<TurnSpec>>The turn worker’s input (role: turn).
Implementations§
Source§impl SpawnPayload
impl SpawnPayload
Sourcepub fn narrow_tools(&mut self, allow: &[String])
pub fn narrow_tools(&mut self, allow: &[String])
Narrow this child’s tool grant to allow (RFC 0009). Any allow-list entry
already in the seed is dropped first, so the SUPERVISOR’s mint is the only
grant the child sees — a caller-supplied context array cannot forge or
widen one. An empty allow is a real narrowing to nothing, not “no
narrowing”; leave the marker off entirely for the unnarrowed case.
Sourcepub fn allowed_tools(&self) -> Option<Vec<String>>
pub fn allowed_tools(&self) -> Option<Vec<String>>
The narrowed grant this payload carries (None = unnarrowed: the full
catalogue the granted servers publish). Reads back what
SpawnPayload::narrow_tools minted — including after a restore, which
re-spawns from the stored payload.
Trait Implementations§
Source§impl Clone for SpawnPayload
impl Clone for SpawnPayload
Source§fn clone(&self) -> SpawnPayload
fn clone(&self) -> SpawnPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more