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: StringThe 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: boolRun the child in a fresh git worktree for parallel edits.
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
impl Clone for TaskRequest
Source§fn clone(&self) -> TaskRequest
fn clone(&self) -> TaskRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more