pub enum SubagentOutcome {
Success,
Suspended {
interrupt_ids: Option<Vec<String>>,
},
}Expand description
How a subagent invocation’s stream segment closed for this run.
Mirrors RunOutcome one level down. The
field is optional on SUBAGENT_FINISHED, and absent reads as success —
but an explicit null is rejected, because the field is newer than the
fix that made every official producer omit valueless fields.
Variants§
Success
The work completed.
Suspended
The workflow is paused awaiting outside input — a human approval
raised inside the subagent, say. The run then ends with an interrupt
outcome, and because every started subagent closes before
RUN_FINISHED, the paused one still emits SUBAGENT_FINISHED — with
this outcome, so a UI can show “waiting” rather than “done”.
Fields
interrupt_ids: Option<Vec<String>>The run-level interrupts this subagent directly owns; each such
Interrupt carries subagent_run_id
back. May be empty or absent: an ancestor suspended because a
descendant interrupted owns no interrupt itself. Absent or a
list, never null, like every other field on this surface.
Implementations§
Source§impl SubagentOutcome
impl SubagentOutcome
Sourcepub fn suspended(interrupt_ids: impl Into<Vec<String>>) -> Self
pub fn suspended(interrupt_ids: impl Into<Vec<String>>) -> Self
Builds a suspended outcome naming the interrupts the subagent owns.
Sourcepub const fn is_suspended(&self) -> bool
pub const fn is_suspended(&self) -> bool
Whether the subagent is waiting rather than done.
Sourcepub fn interrupt_ids(&self) -> &[String]
pub fn interrupt_ids(&self) -> &[String]
The interrupts a suspended subagent owns, or an empty slice.
Trait Implementations§
Source§impl Clone for SubagentOutcome
impl Clone for SubagentOutcome
Source§fn clone(&self) -> SubagentOutcome
fn clone(&self) -> SubagentOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for SubagentOutcome
impl ComposeSchema for SubagentOutcome
Source§impl Debug for SubagentOutcome
impl Debug for SubagentOutcome
Source§impl<'de> Deserialize<'de> for SubagentOutcome
impl<'de> Deserialize<'de> for SubagentOutcome
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SubagentOutcome
impl JsonSchema for SubagentOutcome
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for SubagentOutcome
impl PartialEq for SubagentOutcome
Source§fn eq(&self, other: &SubagentOutcome) -> bool
fn eq(&self, other: &SubagentOutcome) -> bool
self and other values to be equal, and is used by ==.