#[non_exhaustive]pub struct DelegateRequest {Show 16 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 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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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.
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.
Auto Trait Implementations§
impl !RefUnwindSafe for DelegateRequest
impl !UnwindSafe for DelegateRequest
impl Forget for DelegateRequest
impl Freeze for DelegateRequest
impl Move for DelegateRequest
impl Send for DelegateRequest
impl Sync for DelegateRequest
impl Unpin for DelegateRequest
impl UnsafeUnpin for DelegateRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more