pub struct DelegateRecord {Show 13 fields
pub sub_agent_id: String,
pub target_agent_id: String,
pub task: String,
pub context: String,
pub resolved_provider: String,
pub resolved_model: String,
pub usage: Usage,
pub succeeded: bool,
pub error: String,
pub first_party: bool,
pub grant_replays: Vec<GrantReplayClear>,
pub unattended_denials: Vec<UnattendedDenial>,
pub seeded_paths: Vec<String>,
}Expand description
One __delegate_to call this turn dispatched (#872) — the forensic
record of a worker sub-agent invocation.
Self::sub_agent_id is the identifier every forensic event for this
delegation is tagged with — the control plane’s subagent_spawn,
subagent_result, and subagent_model_call events all carry it, so a
reader can join a worker’s spawn, its determinism inputs, and its result
(and the visible tool_call/tool_result pair already in the transcript)
by that one identifier.
Fields§
§sub_agent_id: StringThe __delegate_to call’s provider-assigned tool-call id. Doubles as
the sub-agent identifier (see the struct docs).
target_agent_id: StringThe worker Agent resource name the model requested.
task: StringThe self-contained task text handed to the worker (the model’s task
argument).
context: StringThe model’s optional context argument, verbatim (forensic-fidelity
fix: part of what the worker actually saw — folded into its own
nested transcript, per task_text below — that the record used to
leave uncaptured). Empty when the call carried none.
resolved_provider: StringThe worker’s resolved provider selector. Empty when the call was refused before a worker was resolved (a malformed call or an unmatched target).
resolved_model: StringThe worker’s resolved model id. Empty under the same condition as
Self::resolved_provider.
usage: UsageToken usage the worker’s nested turn accumulated across its own provider calls. Zeroed when the call was refused before a worker ran.
succeeded: booltrue when the worker turn completed and produced an answer that
became the __delegate_to call’s tool result; false on a malformed
call, an unmatched target, a mid-stream provider failure, a worker
that produced no text, or (#871) an answer that never conformed to
result_schema after the one bounded retry.
error: StringPlain-language failure reason when Self::succeeded is false;
empty on success.
first_party: boolWhether this call’s result is first-party (untainted) content
(#873). Defaults to true — every synthetic/error result
run_delegate_call authors itself (a malformed call, an unmatched
target, an invalid result_schema, or a worker turn that never ran)
carries no worker content, so there is nothing to taint. For a call
that actually dispatched a worker, this is explicitly recomputed from
worker_ingested_untrusted_content over that worker’s own
transcript: false the moment the worker touched a taint-source
tool. The parent turn’s dispatch loop stamps this straight onto the
__delegate_to call’s own tool-result Message in place of the
static per-tool-name check every other tool result uses.
grant_replays: Vec<GrantReplayClear>Gate clears a remembered grant was solely responsible for INSIDE the
worker’s own nested turn (#594), carried out so the caller can fold
them into its own TurnResult::grant_replays — the SAME audit
pipeline a turn’s own grant replays already use. Empty unless the
worker actually dispatched a gated call a grant covered.
unattended_denials: Vec<UnattendedDenial>Gated calls the worker’s own unattended nested turn denied fail-closed
(#623), carried out so the caller can fold them into its own
TurnResult::unattended_denials — without this, the exact denials
the delegation design leans on for safety (every gated call inside a
worker denies fail-closed, since run_delegate_call always sets
unattended: true) were unauditable. Empty unless the worker actually
hit a denial.
seeded_paths: Vec<String>Workspace-relative parent files seeded into this worker’s own workspace
before its turn (#2295), in copy order. Empty when the call requested
no share-in, when the ceiling refused it (the reason is then in
Self::error), or when the executor owned no workspace to seed.
Recorded so a seed is attributable to the delegate call id that asked for it: this is the only durable evidence of which parent bytes a worker could see, and the worker’s own transcript is context-isolated from the parent’s.
Trait Implementations§
Source§impl Clone for DelegateRecord
impl Clone for DelegateRecord
Source§fn clone(&self) -> DelegateRecord
fn clone(&self) -> DelegateRecord
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 DelegateRecord
impl Debug for DelegateRecord
Source§impl Default for DelegateRecord
impl Default for DelegateRecord
impl Eq for DelegateRecord
Source§impl PartialEq for DelegateRecord
impl PartialEq for DelegateRecord
impl StructuralPartialEq for DelegateRecord
Auto Trait Implementations§
impl Freeze for DelegateRecord
impl RefUnwindSafe for DelegateRecord
impl Send for DelegateRecord
impl Sync for DelegateRecord
impl Unpin for DelegateRecord
impl UnsafeUnpin for DelegateRecord
impl UnwindSafe for DelegateRecord
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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