pub enum Event {
Ready {
version: u32,
capabilities: Vec<String>,
service_id: Uuid,
},
StateChange {
request_id: Option<Uuid>,
state: ServiceState,
timestamp: u64,
},
Log {
level: LogLevel,
message: String,
timestamp: u64,
request_id: Option<Uuid>,
},
TokenUsage {
request_id: Uuid,
tokens_used: u64,
tokens_remaining: Option<u64>,
},
ShellOutput {
request_id: Uuid,
stdout: Option<String>,
stderr: Option<String>,
exit_code: Option<i32>,
finished: bool,
},
ToolResult {
request_id: Uuid,
success: bool,
result: Value,
error: Option<String>,
},
HookResult {
request_id: Uuid,
action: HookAction,
},
GraphDelta {
request_id: Option<Uuid>,
nodes_added: Vec<GraphNode>,
edges_added: Vec<GraphEdge>,
nodes_removed: Vec<Uuid>,
edges_removed: Vec<Uuid>,
},
Error {
request_id: Option<Uuid>,
error_code: String,
message: String,
timestamp: u64,
},
}Expand description
Event emitted by the core service
Variants§
Ready
Service ready with capabilities
StateChange
State change notification
Log
Log message
TokenUsage
Token usage tracking
ShellOutput
Shell command output
Fields
ToolResult
Tool call result
HookResult
Hook execution result
GraphDelta
Graph/DAG state delta
Fields
Error
Service error
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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
Mutably borrows from an owned value. Read more