pub struct ActivityEvent {
pub attempt_id: String,
pub exit_code: Option<i64>,
pub facts: Box<ActivityFacts>,
pub id: String,
pub input: Option<String>,
pub kind: ActivityKind,
pub name: String,
pub observed_at: SystemTime,
pub output: Option<String>,
pub parent_id: Option<String>,
pub status: ActivityStatus,
}Expand description
A bounded display snapshot of one observed provider operation.
Match updates by (attempt_id, id). Retries use new attempt identities.
Names describe tools, MCP server/tool pairs, or explicitly invoked
skills, never inferred file reads. Optional input and output previews are
display-only: they must not be replayed to providers or implicitly exported
as telemetry.
Fields§
§attempt_id: StringUnique provider attempt identity, including retries and repairs.
exit_code: Option<i64>Process exit code when the provider reports one.
facts: Box<ActivityFacts>Structured, display-only facts the provider reported about the operation, boxed to keep events small.
id: StringProvider operation identity within the attempt.
input: Option<String>Bounded command or argument preview, when reported by the provider.
kind: ActivityKindProvider-independent operation category.
name: StringBounded tool, MCP server/tool, or skill identity suitable for display.
observed_at: SystemTimeTime this snapshot was observed by the adapter.
output: Option<String>Bounded result preview, updated as output arrives when supported. An adapter may fill it only for failed operations, with the result’s last lines.
parent_id: Option<String>Provider parent operation identity, scoped to the same attempt.
status: ActivityStatusLatest lifecycle state the provider reported; see Self::outcome
for the state to display.
Implementations§
Source§impl ActivityEvent
impl ActivityEvent
Sourcepub fn outcome(&self) -> ActivityStatus
pub fn outcome(&self) -> ActivityStatus
Returns the state to display: the provider’s Self::status, except
that a completed operation whose own exit status is nonzero, or that
a signal terminated, failed.
A ActivityKind::Search that exits with 1 found no match and stays
completed. Every other exit status, including 1 from a search run as
an ActivityKind::Command, is judged as is.
Sourcepub fn effective_exit_code(&self) -> Option<i64>
pub fn effective_exit_code(&self) -> Option<i64>
Returns the operation’s own exit status: the first nonzero status of
its final pipeline’s stages, so cargo test | tail reports the
status of cargo test, else Self::exit_code. A stage before the
last that exited with 141 (SIGPIPE) only stopped because a later
stage stopped reading, so it is skipped.
Trait Implementations§
Source§impl Clone for ActivityEvent
impl Clone for ActivityEvent
Source§impl Debug for ActivityEvent
impl Debug for ActivityEvent
impl Eq for ActivityEvent
Source§impl PartialEq for ActivityEvent
impl PartialEq for ActivityEvent
impl StructuralPartialEq for ActivityEvent
Auto Trait Implementations§
impl Forget for ActivityEvent
impl Freeze for ActivityEvent
impl Move for ActivityEvent
impl RefUnwindSafe for ActivityEvent
impl Send for ActivityEvent
impl Sync for ActivityEvent
impl Unpin for ActivityEvent
impl UnsafeUnpin for ActivityEvent
impl UnwindSafe for ActivityEvent
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,
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.