pub struct Session {
pub id: Uuid,
pub tool: String,
pub tool_version: Option<String>,
pub started_at: DateTime<Utc>,
pub ended_at: Option<DateTime<Utc>>,
pub model: Option<String>,
pub working_directory: String,
pub git_branch: Option<String>,
pub source_path: Option<String>,
pub message_count: i32,
pub machine_id: Option<String>,
}Expand description
A Session represents a complete human-AI collaboration. This is the primary unit of reasoning history.
Fields§
§id: UuidUnique identifier for this session
tool: StringWhich tool created this session (e.g., “claude-code”, “cursor”)
tool_version: Option<String>Tool version (e.g., “2.0.72”)
started_at: DateTime<Utc>When the session started
ended_at: Option<DateTime<Utc>>When the session ended (None if ongoing)
model: Option<String>The AI model used (may change during session, this is the primary one)
working_directory: StringWorking directory when session started
git_branch: Option<String>Git branch when session started (if in a git repo)
source_path: Option<String>Original source file path (for re-import detection)
message_count: i32Number of messages in this session
machine_id: Option<String>Machine identifier (hostname) where the session was captured. Used for cloud sync to identify which machine created the session. Optional for backwards compatibility with existing sessions.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Session
impl<'de> Deserialize<'de> for Session
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 Session
impl RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnwindSafe for Session
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