Skip to main content

ActivityEvent

Struct ActivityEvent 

Source
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: String

Unique 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: String

Provider operation identity within the attempt.

§input: Option<String>

Bounded command or argument preview, when reported by the provider.

§kind: ActivityKind

Provider-independent operation category.

§name: String

Bounded tool, MCP server/tool, or skill identity suitable for display.

§observed_at: SystemTime

Time 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: ActivityStatus

Latest lifecycle state the provider reported; see Self::outcome for the state to display.

Implementations§

Source§

impl ActivityEvent

Source

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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ActivityEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ActivityEvent

Source§

impl PartialEq for ActivityEvent

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ActivityEvent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.