Skip to main content

ProvisionSpec

Struct ProvisionSpec 

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

Which execution engine this actor runs (worker maps it via its factory).

§fabric_dir: String

Tier-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: bool

When 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: Placement

Where 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: Capabilities

Capabilities 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

Source

pub fn new( identity: ChildIdentity, executor: ExecutorSpec, fabric_dir: String, ) -> Self

Source

pub fn to_json(&self) -> Result<String>

Source

pub fn from_json(s: &str) -> Result<Self>

Source

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

Source§

fn clone(&self) -> ProvisionSpec

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 ProvisionSpec

Source§

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

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

impl<'de> Deserialize<'de> for ProvisionSpec

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 PartialEq for ProvisionSpec

Source§

fn eq(&self, other: &ProvisionSpec) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ProvisionSpec

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
Source§

impl StructuralPartialEq for ProvisionSpec

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, 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> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V