Skip to main content

SpawnPayload

Struct SpawnPayload 

Source
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: String

The 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: IntelConfig

How 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: u32

Supervisor-minted tree depth (0 = root).

§warm: bool

Run 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: Role

agentd 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).

Trait Implementations§

Source§

impl Clone for SpawnPayload

Source§

fn clone(&self) -> SpawnPayload

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SpawnPayload

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SpawnPayload

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SpawnPayload

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more