#[non_exhaustive]pub struct DelegateRequest {Show 17 fields
pub prompt: String,
pub description: Option<String>,
pub agent_type: Option<String>,
pub model: Option<String>,
pub provider: Option<String>,
pub tools: ToolSelector,
pub deny_rules: Vec<PermissionRule>,
pub grants: Vec<Grant>,
pub writes: Option<Vec<String>>,
pub output_schema: Option<Value>,
pub workdir: Workdir,
pub stops_with: StopsWith,
pub called_from: Option<CallSite>,
pub asks: AskRoute,
pub tag: Option<String>,
pub spend: Option<Arc<SpendNode>>,
pub mode: DelegateMode,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.prompt: String§description: Option<String>§agent_type: Option<String>§model: Option<String>Over the agent type’s model, or the parent’s.
provider: Option<String>The provider its calls go to first, over the agent type’s.
tools: ToolSelectorNarrows what the delegate would otherwise have; never widens it.
deny_rules: Vec<PermissionRule>Only their deny takes effect: a delegate can be refused more than
its parent, never permitted more.
grants: Vec<Grant>Turn grants that hold in the delegate’s own session and are not handed back to the parent.
writes: Option<Vec<String>>The only places its file tools write, as globs from its working directory or absolute; its sandboxed commands write only under their fixed prefixes. Held by every delegate it starts in turn.
output_schema: Option<Value>§workdir: Workdir§stops_with: StopsWith§called_from: Option<CallSite>§asks: AskRoute§tag: Option<String>The caller’s own label, carried on the delegate’s task untouched.
spend: Option<Arc<SpendNode>>The turn the delegate spends into and judges its budget by; None
gives each of its turns a spend of its own.
mode: DelegateModeImplementations§
Source§impl DelegateRequest
impl DelegateRequest
Sourcepub fn new(
prompt: impl Into<String>,
mode: DelegateMode,
stops_with: StopsWith,
) -> Self
pub fn new( prompt: impl Into<String>, mode: DelegateMode, stops_with: StopsWith, ) -> Self
prompt run in mode until stops_with says stop, with nothing else
narrowed: the parent’s tools and working directory, questions asked
of the host.
Sourcepub fn started_by(&mut self, ctx: &ToolContext)
pub fn started_by(&mut self, ctx: &ToolContext)
Started by the tool call of ctx: called from it, spending into its turn.