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
StatusChanged
A poll observed a lifecycle transition.
Output
A chunk of streamed output.
ToolStarted
A tool call started.
Fields
ToolFinished
A tool call finished.
Fields
id: StringCaliban’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: StringTool name. Empty in practice — caliban’s ToolCallEnd omits it; the
name is on the matching [ToolStarted]. Kept for wire compatibility.
AgentFinished
The agent finished; carries the final accounting.
Fields
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
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.
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
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: WorkspaceHealthThe new health state.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventKind
impl<'de> Deserialize<'de> for EventKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for EventKind
impl JsonSchema for EventKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for EventKind
impl Serialize for EventKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for EventKind
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnsafeUnpin for EventKind
impl UnwindSafe for EventKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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