pub struct DelegateDescriptor {
pub agent_id: String,
pub instructions: Option<String>,
pub provider: Arc<DynProvider>,
pub provider_name: String,
pub model: String,
pub tool_specs: Vec<ToolSpec>,
pub max_steps: usize,
pub native_search_allowed: bool,
}Expand description
A resolved, self-contained worker configuration for one can_delegate_to
target (#870).
Built by the control plane at turn dispatch — NEVER by this crate — and
threaded down through the wire (TurnInput.delegate_descriptors) and the
harness’s tool-executor composition
(polyc_turn_runner::resolve_delegate_descriptors) into
crate::RunTurnOptions::delegate_descriptors. See
crates/control-plane/src/delegate.rs for how the fields here are
resolved (provider/model fallback, connector-scope intersection, the
read-only-by-default built-in allowlist).
Fields§
§agent_id: StringThe target Agent resource name — matched (trailing-name, mirroring
crate::HandoffRequest::child_agent_id’s resolution) against the
model’s __delegate_to(target_agent_id, ...) argument to pick this
descriptor. See find_descriptor.
instructions: Option<String>System instructions for the worker’s nested turn. None ⇒ no
agent-specific instructions.
provider: Arc<DynProvider>The worker’s resolved backend, already picked from the deployment’s registered providers — this crate never resolves a provider selector string itself.
provider_name: StringThe registry key of Self::provider (e.g. "vertex", "stub") —
carried alongside the erased backend so a forensic record (#872,
DelegateRecord::resolved_provider) can name the provider without
this crate needing a Debug/name accessor on DynProvider itself.
model: StringThe worker’s resolved model id.
tool_specs: Vec<ToolSpec>The worker’s advertised tool specs. Never includes
DELEGATE_TOOL_NAME — this is what caps delegation depth at one,
since crate::run_turn_with only advertises the delegate tool when
its OWN delegate_descriptors option is non-empty, and a nested turn
always runs with that option empty.
max_steps: usizeThe worker’s step budget, applied to the nested turn’s
RunTurnOptions::max_steps.
native_search_allowed: boolWhether the worker’s nested turn may ground on the provider’s native
web-search primitive (RunTurnOptions::native_search_allowed).
Derived the same way the parent turn’s own scoping is (#1226): the
resolved descriptor’s builtin_tools named
polyc_tools::web::NATIVE_SEARCH_GROUNDING — never hardcoded true,
since that would hand every worker a capability its own agent
manifest never granted.
Trait Implementations§
Source§impl Clone for DelegateDescriptor
impl Clone for DelegateDescriptor
Source§fn clone(&self) -> DelegateDescriptor
fn clone(&self) -> DelegateDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DelegateDescriptor
impl Debug for DelegateDescriptor
Auto Trait Implementations§
impl !RefUnwindSafe for DelegateDescriptor
impl !UnwindSafe for DelegateDescriptor
impl Freeze for DelegateDescriptor
impl Send for DelegateDescriptor
impl Sync for DelegateDescriptor
impl Unpin for DelegateDescriptor
impl UnsafeUnpin for DelegateDescriptor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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