Skip to main content

EventKind

Enum EventKind 

Source
pub enum EventKind {
    AgentSpawned,
    AgentDiscovered,
    AgentInit {
        model: String,
        tools: Vec<String>,
        session_id: String,
    },
    StatusChanged {
        from: AgentStatus,
        to: AgentStatus,
    },
    Output {
        stream: OutputStream,
        chunk: String,
    },
    ToolStarted {
        id: String,
        name: String,
        input: Value,
    },
    ToolFinished {
        id: String,
        name: String,
        ok: bool,
    },
    AgentFinished {
        outcome: String,
        cost_usd: f64,
        turns: u32,
    },
    AgentGone,
    StorePersistFailed {
        lost_seq: u64,
        detail: String,
    },
    RepoHealth {
        state: WorkspaceHealth,
    },
}
Expand description

The semantic payload of a fleet event.

Variants§

§

AgentSpawned

Prospero asked caliband to spawn this agent.

§

AgentDiscovered

A poll discovered an agent Prospero had not seen before.

§

AgentInit

The agent’s stream emitted its init frame.

Fields

§model: String

Model the agent is running.

§tools: Vec<String>

Tools available to the agent.

§session_id: String

Caliban session id.

§

StatusChanged

A poll observed a lifecycle transition.

Fields

§from: AgentStatus

Prior status.

§to: AgentStatus

New status.

§

Output

A chunk of streamed output.

Fields

§stream: OutputStream

Which stream the chunk belongs to.

§chunk: String

The text chunk.

§

ToolStarted

A tool call started.

Fields

§id: String

Caliban’s tool_use_id, correlating this start with its [ToolFinished]. #[serde(default)] for pre-#106 stored events, which predate this field (they carry only name).

§name: String

Tool name (e.g. “Read”).

§input: Value

Tool input (opaque JSON).

§

ToolFinished

A tool call finished.

Fields

§id: String

Caliban’s tool_use_id, correlating this finish with its [ToolStarted]. Caliban’s ToolCallEnd carries the id but not the name, so consumers pair on the id. #[serde(default)] for pre-#106 stored events.

§name: String

Tool name. Empty in practice — caliban’s ToolCallEnd omits it; the name is on the matching [ToolStarted]. Kept for wire compatibility.

§ok: bool

Whether the tool succeeded.

§

AgentFinished

The agent finished; carries the final accounting.

Fields

§outcome: String

Result subtype (e.g. “success”, “max_turns”, “budget_exceeded”).

§cost_usd: f64

Total run cost in USD.

§turns: u32

Number of turns taken.

§

AgentGone

A poll observed the agent disappear from caliband’s registry.

§

StorePersistFailed

A durable-store append failed, so the event with lost_seq reached the live bus but is absent from durable history. This marker is itself persisted (best-effort) so a history reader — not just a log scraper — sees that the live and durable views diverged here. See ADR-0004.

Fields

§lost_seq: u64

The seq of the event that could not be persisted.

§detail: String

Rendered append error, for diagnosis.

§

RepoHealth

A workspace’s caliband health changed. (Variant name kept as RepoHealth for event-store wire compatibility; the payload type is the renamed WorkspaceHealth, whose serialization is unchanged.)

Fields

§state: WorkspaceHealth

The new health state.

Trait Implementations§

Source§

impl Clone for EventKind

Source§

fn clone(&self) -> EventKind

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 EventKind

Source§

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

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

impl<'de> Deserialize<'de> for EventKind

Source§

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 PartialEq for EventKind

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for EventKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for EventKind

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,