pub struct SessionMeta {
pub id: String,
pub working_dir: String,
pub created_at: u64,
pub updated_at: u64,
pub mode: AgentMode,
pub provider: String,
pub model: Option<String>,
pub name: Option<String>,
pub message_count: usize,
pub token_usage: Option<TokenUsage>,
pub total_tool_calls: u64,
pub total_tokens_used: u64,
}Expand description
Metadata about a session, stored as the first line of the JSONL file.
Fields§
§id: StringUnique session identifier (UUID v4).
working_dir: StringWorking directory when the session was created.
created_at: u64Unix timestamp (seconds) when the session was created.
updated_at: u64Unix timestamp (seconds) when the session was last updated.
mode: AgentModeThe agent mode used in this session.
provider: StringThe provider kind (e.g. “ollama”, “llama.cpp”, “vllm”).
model: Option<String>The model name.
name: Option<String>Optional user-defined name for the session.
message_count: usizeNumber of messages in the session.
token_usage: Option<TokenUsage>Last known token usage reported by the LLM provider. This is the prompt token count at the time of the last provider response, serialized so it survives restarts.
total_tool_calls: u64Cumulative tool calls made during this session (across all turns).
total_tokens_used: u64Cumulative total tokens consumed across all LLM calls in this session.
Trait Implementations§
Source§impl Clone for SessionMeta
impl Clone for SessionMeta
Source§impl Debug for SessionMeta
impl Debug for SessionMeta
Source§impl<'de> Deserialize<'de> for SessionMeta
impl<'de> Deserialize<'de> for SessionMeta
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 Forget for SessionMeta
impl Freeze for SessionMeta
impl RefUnwindSafe for SessionMeta
impl Send for SessionMeta
impl Sync for SessionMeta
impl Unpin for SessionMeta
impl UnsafeUnpin for SessionMeta
impl UnwindSafe for SessionMeta
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