Skip to main content

braid_model/
event.rs

1use serde::{Deserialize, Serialize};
2
3use crate::SessionId;
4
5#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
6pub struct Event {
7    pub session_id: SessionId,
8    pub kind: EventKind,
9}
10
11#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
12pub enum EventKind {
13    SessionStarted,
14    ToolCalled {
15        tool_name: String,
16    },
17    ToolCompleted {
18        tool_name: String,
19    },
20    ProviderResponded,
21    SessionCompleted,
22    /// Explicit marker for events that could not be normalized by an ingester.
23    /// This variant is only produced by code that explicitly constructs it;
24    /// unrecognized JSONL lines are silently skipped during loading.
25    Unknown {
26        raw: String,
27    },
28}