pub enum TaskOutcome {
Success,
StoppedNoAction,
TurnLimitReached {
max_turns: usize,
actual_turns: usize,
},
BudgetLimitReached {
max_budget_usd: f64,
actual_cost_usd: f64,
},
ToolLoopLimitReached {
max_tool_loops: usize,
actual_tool_loops: usize,
},
LoopDetected,
Cancelled,
HandedOff {
target: String,
},
Escalated {
reason: String,
tool_name: String,
},
Refused {
reason: String,
},
Failed {
reason: String,
accomplished: Vec<String>,
recovery_suggestion: Option<String>,
checkpoint_path: Option<String>,
},
Unknown,
}Variants§
Success
StoppedNoAction
TurnLimitReached
BudgetLimitReached
ToolLoopLimitReached
Legacy outcome of the removed per-turn tool-loop budget, kept so older
serialized artifacts still deserialize. No longer produced by the
config-driven budget; a rate-limit safeguard halt may still construct
it with max_tool_loops: 0.
LoopDetected
Cancelled
HandedOff
Escalated
Refused
The provider declined the request (FinishReason::Refusal). Terminal
for the prompt: resending it is refused again. reason is the
user-facing notice from crate::core::agent::refusal::refusal_reason.
Failed
Fields
Unknown
Implementations§
Source§impl TaskOutcome
impl TaskOutcome
pub fn is_success(&self) -> bool
pub fn is_hard_block(&self) -> bool
pub fn description(&self) -> String
pub fn code(&self) -> &'static str
pub fn thread_completion_subtype(&self) -> ThreadCompletionSubtype
pub fn success() -> Self
pub fn turn_limit_reached(max_turns: usize, actual_turns: usize) -> Self
pub fn budget_limit_reached(max_budget_usd: f64, actual_cost_usd: f64) -> Self
Sourcepub fn tool_safeguard_halt(actual_tool_loops: usize) -> Self
pub fn tool_safeguard_halt(actual_tool_loops: usize) -> Self
Safeguard halt from a rate-limited tool (not the removed configured
budget): reuses the legacy loop-limit outcome with max_tool_loops: 0
so existing consumers keep one “tool safeguard stopped the run” shape.
pub fn failed( reason: String, accomplished: Vec<String>, recovery_suggestion: Option<String>, checkpoint_path: Option<String>, ) -> Self
pub fn escalated(reason: String, tool_name: String) -> Self
pub fn refused(reason: String) -> Self
pub fn handed_off(target: String) -> Self
Trait Implementations§
Source§impl Clone for TaskOutcome
impl Clone for TaskOutcome
Source§impl Debug for TaskOutcome
impl Debug for TaskOutcome
Source§impl<'de> Deserialize<'de> for TaskOutcome
impl<'de> Deserialize<'de> for TaskOutcome
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TaskOutcome
impl Display for TaskOutcome
Source§impl PartialEq for TaskOutcome
impl PartialEq for TaskOutcome
Source§impl Serialize for TaskOutcome
impl Serialize for TaskOutcome
impl StructuralPartialEq for TaskOutcome
Auto Trait Implementations§
impl Forget for TaskOutcome
impl Freeze for TaskOutcome
impl Move for TaskOutcome
impl RefUnwindSafe for TaskOutcome
impl Send for TaskOutcome
impl Sync for TaskOutcome
impl Unpin for TaskOutcome
impl UnsafeUnpin for TaskOutcome
impl UnwindSafe for TaskOutcome
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
impl<T> CacheValue for 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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> 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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PtyHandle for Twhere
T: Send,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more