pub struct ProvisionSpec {Show 13 fields
pub version: u32,
pub identity: ChildIdentity,
pub executor: ExecutorSpec,
pub fabric_dir: String,
pub storage_dir: Option<String>,
pub workspace: Option<String>,
pub model: Option<ModelRefSpec>,
pub disabled_tools: Option<Vec<String>>,
pub limits: Limits,
pub secrets: SecretsEnvelope,
pub reusable: bool,
pub placement: Placement,
pub capabilities: Capabilities,
}Expand description
Everything a worker needs to become a functioning actor. Parent-resolved, flat, complete.
Fields§
§version: u32§identity: ChildIdentity§executor: ExecutorSpecWhich execution engine this actor runs (worker maps it via its factory).
fabric_dir: StringTier-1 fabric directory the worker self-registers into.
storage_dir: Option<String>Isolated storage root for this actor’s own session/mailbox files.
workspace: Option<String>Working directory for the actor’s file operations.
model: Option<ModelRefSpec>Final, parent-resolved model (explicit pin > per-type routing > defaults).
disabled_tools: Option<Vec<String>>Tool names to hide from the child (already resolved from the profile policy).
limits: Limits§secrets: SecretsEnvelope§reusable: boolWhen true the worker serves connection-after-connection (a warm, reusable
actor) instead of exiting after one run. The parent pools such workers and
reuses an idle one for the next assignment with a matching fingerprint
(role/provider/model/workspace/tools), so N sibling sub-agents no longer
mean N processes. Each run still gets a fresh session rehydrated from the
run’s messages, so context stays isolated across reuses.
placement: PlacementWhere this actor runs. Local (default) — the parent spawns a local
subprocess. Remote{endpoint} — connect to an already-running wss://
worker. Schedulable{pool} — a control plane assigns an endpoint.
Forward-compatible: an older spec without this field defaults to Local,
so behavior is unchanged until a placement is set.
capabilities: CapabilitiesCapabilities synced from the orchestrator so a deployed worker matches its toolset (MCP servers + user skills). Empty for plain actor children (no behavior change); a deployed broker-agent fills these.
Implementations§
Source§impl ProvisionSpec
impl ProvisionSpec
pub fn new( identity: ChildIdentity, executor: ExecutorSpec, fabric_dir: String, ) -> Self
pub fn to_json(&self) -> Result<String>
pub fn from_json(s: &str) -> Result<Self>
Sourcepub async fn read_from_stdin() -> Result<Self>
pub async fn read_from_stdin() -> Result<Self>
Read a spec from the process’s stdin (the parent writes one JSON document and
closes the pipe). Used by worker main.
Defense in depth: the read is capped at MAX_SPEC_BYTES — the pipe is
trusted (our own parent), but a runaway writer must not OOM the worker.
Trait Implementations§
Source§impl Clone for ProvisionSpec
impl Clone for ProvisionSpec
Source§fn clone(&self) -> ProvisionSpec
fn clone(&self) -> ProvisionSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProvisionSpec
impl Debug for ProvisionSpec
Source§impl<'de> Deserialize<'de> for ProvisionSpec
impl<'de> Deserialize<'de> for ProvisionSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ProvisionSpec
impl PartialEq for ProvisionSpec
Source§fn eq(&self, other: &ProvisionSpec) -> bool
fn eq(&self, other: &ProvisionSpec) -> bool
self and other values to be equal, and is used by ==.