Skip to main content

SpawnSpec

Struct SpawnSpec 

pub struct SpawnSpec {
Show 14 fields pub label: Option<String>, pub frontmatter_path: Option<PathBuf>, pub initial_prompt: String, pub model: Option<String>, pub provider: Option<String>, pub tool_allowlist: Option<Vec<String>>, pub isolation_worktree: bool, pub inherit_hooks: bool, pub interactive: bool, pub inherited_hooks_config: Option<String>, pub source: Option<String>, pub resume_session: Option<PathBuf>, pub permission_posture: PermissionPosture, pub drive_protocol: DriveProtocol,
}
Expand description

Parameters for a new sub-agent spawn. The supervisor stores this so respawn can reuse it.

Fields§

§label: Option<String>

Optional human-readable name for the agent.

§frontmatter_path: Option<PathBuf>

Path to the frontmatter markdown file (if any).

§initial_prompt: String

Initial prompt handed to the sub-agent.

§model: Option<String>

Optional model override.

§provider: Option<String>

Optional provider override (e.g. “anthropic”, “openai”, “google”). The worker parses this to select the provider; without it the worker uses caliban’s default (anthropic). (#93)

§tool_allowlist: Option<Vec<String>>

Optional tool allowlist.

§isolation_worktree: bool

True iff the sub-agent should run in an isolated worktree.

§inherit_hooks: bool

Whether to inherit parent hooks (config-serializable portion only).

§interactive: bool

When true, the worker runs in interactive mode: at each end-of-run boundary it awaits inbound operator messages over the per-agent socket instead of finishing (ADR 0047 / #81).

§inherited_hooks_config: Option<String>

Opaque JSON-serialized parent permission config, inherited by the worker when inherit_hooks is true (#84). The supervisor shuttles this verbatim; only the caliban worker interprets it.

§source: Option<String>

Which workspace source (checkout) this agent runs against. None means the workspace root (single-source back-compat). (#281)

§resume_session: Option<PathBuf>

Resume from a prior agent’s persisted session (#651, ADR 0057). When Some, the worker loads session.json from this directory (a resume reference returned by a Drain) and continues that conversation instead of replaying initial_prompt. None starts fresh (the default).

§permission_posture: PermissionPosture

Per-session permission posture (ADR 0059). supervised (default) runs the normal permission gate — an Ask rule is denied non-interactively when no human is attached (a drive adapter surfaces it to a human when one is); unattended runs under a bypass profile (no permission gate). Choosing unattended is privileged and authorized upstream (prospero / the operator Workspace policy, caliban-operator#80); the worker only honors + audits it. Default is fail-closed (supervised).

§drive_protocol: DriveProtocol

Which protocol drives this agent over its per-agent network listener (ADR 0059, #675). ndjson (default) is the live-attach session plane; acp makes the worker speak the Agent Client Protocol on the same TLS + bearer-token listener (Option 2 — a per-spawn flag, not per-socket negotiation). One protocol per agent; the driver (prospero) chooses.

Trait Implementations§

§

impl Clone for SpawnSpec

§

fn clone(&self) -> SpawnSpec

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
§

impl Debug for SpawnSpec

§

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

Formats the value using the given formatter. Read more
§

impl<'de> Deserialize<'de> for SpawnSpec

§

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

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

impl Serialize for SpawnSpec

§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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