Skip to main content

TaskRequest

Struct TaskRequest 

Source
pub struct TaskRequest {
Show 24 fields pub description: String, pub subagent_type: Option<String>, pub role: Option<String>, pub profile: Option<String>, pub model: Option<String>, pub model_strength: Option<String>, pub thinking: Option<String>, pub cwd: Option<String>, pub worktree: bool, pub write_authority: Option<String>, pub write_roots: Vec<String>, pub exact_files: Vec<String>, pub coordination_contracts: Vec<String>, pub dependencies: Vec<String>, pub acceptance: Vec<String>, pub allowed_tools: Option<Vec<String>>, pub disallowed_tools: Vec<String>, pub max_depth: Option<u32>, pub token_budget: Option<u64>, pub max_steps: Option<u32>, pub wall_time_secs: Option<u64>, pub response_schema: Option<Value>, pub label: Option<String>, pub phase: Option<String>,
}
Expand description

One task() invocation, fully resolved and validated on the VM side.

Field semantics mirror the agent tool’s spawn options.

Step identity is fleet role (preferred) and/or profile (#4177). Both tokens are normalized (trimmed + lowercased) with the same rule as crates/workflow leaf profiles. Roster membership is resolved by the driver (tui) at spawn time — this crate never sees the saved Fleet roster. Provider/model remain optional overrides, not required identity fields.

Fields§

§description: String

The child prompt (JS prompt, falling back to description; required).

§subagent_type: Option<String>

Subagent type (JS subagentType or type); None lets the driver apply its default (general).

§role: Option<String>

Fleet role name (JS role), e.g. scout / implementer (#4177).

§profile: Option<String>

Fleet profile token, normalized (trimmed, lowercased) and validated. Explicit profile wins over role mapping at spawn time.

§model: Option<String>

Explicit model override; always wins over model_strength.

§model_strength: Option<String>

Relative model strength (same/faster, plus driver-side aliases).

§thinking: Option<String>

Reasoning effort (inherit/off/low/medium/high/max).

§cwd: Option<String>

Optional existing working directory, relative to the parent workspace. The host validates that it exists and remains inside the workspace.

§worktree: bool

Run the child in a fresh git worktree for parallel edits.

§write_authority: Option<String>

Explicit child mutation authority. A write-capable value remains fail-closed unless at least one bounded scope below is declared.

§write_roots: Vec<String>

Repo-relative directory trees the child expects to mutate.

§exact_files: Vec<String>

Repo-relative exact files the child expects to mutate.

§coordination_contracts: Vec<String>

Named shared contracts owned by this child while active.

§dependencies: Vec<String>

Bounded prerequisite facts relevant to this child.

§acceptance: Vec<String>

Bounded observable checks for child completion.

§allowed_tools: Option<Vec<String>>

Explicit tool allowlist; required by the driver for custom roles.

§disallowed_tools: Vec<String>

Host-imposed tool deny list. Deny always wins over allow, including over allowed_tools and over the role posture.

Deliberately not settable from a workflow script: it is how a host enforces a ceiling it derived (an exact Fleet member’s network_tool = false, for instance) on the child that actually runs. A script that could write it could also clear it.

§max_depth: Option<u32>

Per-call spawn-depth override (driver clamps to its ceiling).

§token_budget: Option<u64>

Explicit token budget: forks an isolated pool on the driver side. Omit it so the child inherits (and debits) the shared run pool.

§max_steps: Option<u32>

Maximum model turns for this child (driver clamps to its ceiling).

§wall_time_secs: Option<u64>

Hard wall-clock limit for this child in seconds.

§response_schema: Option<Value>

JSON schema the reply must satisfy; validated in the VM after the driver returns the raw text (see crate docs for decode rules).

§label: Option<String>

Short human label for progress surfaces.

§phase: Option<String>

Phase name this task belongs to, for progress grouping.

Trait Implementations§

Source§

impl Clone for TaskRequest

Source§

fn clone(&self) -> TaskRequest

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 TaskRequest

Source§

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

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

impl<'de> Deserialize<'de> for TaskRequest

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 TaskRequest

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for TaskRequest

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 TaskRequest

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

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

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.