pub struct AgentOutput {
pub text: String,
pub exit_code: Option<i32>,
pub timed_out: bool,
pub duration_ms: u64,
pub artifacts: Vec<String>,
pub quota: Option<Quota>,
pub dropped: Option<Dropped>,
}Expand description
Result of an agent invocation.
Fields§
§text: StringThe agent’s final message, extracted from whatever the CLI printed.
exit_code: Option<i32>Exit status code.
timed_out: boolDid the invocation hit its timeout?
duration_ms: u64Wall-clock duration.
artifacts: Vec<String>Artifact file names, relative to the run’s artifacts/ directory.
quota: Option<Quota>Rate-limit / quota exhaustion, when it can be told apart from a normal
failure. None for a normal failure, a timeout, or a CLI we cannot
read — the conservative default.
dropped: Option<Dropped>The CLI hung up on its own stream after the agent had done billed
work. None unless that exact shape was recognised — see
[dropped_stream].
Implementations§
Source§impl AgentOutput
impl AgentOutput
Sourcepub fn quota_exhausted(&self) -> bool
pub fn quota_exhausted(&self) -> bool
Did this invocation run out of the CLI’s rate limit / quota?
Sourcepub fn work_undelivered(&self) -> bool
pub fn work_undelivered(&self) -> bool
Did the agent work and the CLI fail to deliver it?
Worth re-asking, unlike AgentOutput::quota_exhausted: the answer is
in a conversation this process can resume.
Trait Implementations§
Source§impl Clone for AgentOutput
impl Clone for AgentOutput
Source§fn clone(&self) -> AgentOutput
fn clone(&self) -> AgentOutput
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 AgentOutput
impl Debug for AgentOutput
Source§impl<'de> Deserialize<'de> for AgentOutput
impl<'de> Deserialize<'de> for AgentOutput
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>,
Auto Trait Implementations§
impl Freeze for AgentOutput
impl RefUnwindSafe for AgentOutput
impl Send for AgentOutput
impl Sync for AgentOutput
impl Unpin for AgentOutput
impl UnsafeUnpin for AgentOutput
impl UnwindSafe for AgentOutput
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
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> 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