Skip to main content

EventKind

Enum EventKind 

Source
pub enum EventKind {
Show 13 variants 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, result: Option<String>, truncated: bool, }, AgentFinished { outcome: String, cost_usd: f64, turns: u32, }, AgentGone, StorePersistFailed { lost_seq: u64, detail: String, }, DeadlineSet { deadline: String, }, AgentTimedOut { deadline: 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.

§result: Option<String>

What the tool returned, as display text: caliban’s result_text, the head of the result, bounded (see prospero_core::caliband::stream::TOOL_RESULT_CAP). None for events stored before #236 or a frame that carried no result.

§truncated: bool

true when result is only the head of a longer result.

§

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.

§

DeadlineSet

The spawn carried a wall-clock timeout; this is the deadline it implies (#221), recorded at spawn so it outlives the replica that set it.

The durable log is the storage: a local timer dies with its replica, while any replica taking the agent over can read this back.

Fields

§deadline: String

When the agent must be killed, RFC-3339.

§

AgentTimedOut

The agent hit its wall-clock deadline and prospero killed it (#221).

Emitted before the kill, so the log says why the killed that follows happened. A distinct kind rather than a new AgentStatus: the status enum is matched exhaustively by clients (Ariel, the dashboard) and by caliban’s own vocabulary, whereas event kinds are the log’s established extension point.

Fields

§deadline: String

The deadline it passed, RFC-3339 — the same value the spawn recorded, so the log explains itself without a join.

§

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

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for EventKind

Source§

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

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

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

Inequality operator !=. Read more
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

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

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.