pub struct Session {
pub name: String,
pub session_id: String,
pub cwd: String,
pub backend: String,
pub jsonl_path: PathBuf,
pub permission_mode: Option<String>,
pub created: u64,
}Expand description
Persisted identity of one driven session.
Fields§
§name: Stringtmux session name (also the sidecar filename stem).
session_id: StringPinned --session-id UUID; makes the transcript path deterministic.
cwd: StringWorking directory the agent was spawned in.
backend: StringBackend that drives this session (claude, later codex).
jsonl_path: PathBufPath to the session transcript JSONL.
permission_mode: Option<String>--permission-mode the session was spawned with, if any.
created: u64Unix epoch seconds at spawn — used to correlate plan files (which live in a global dir).
Implementations§
Source§impl Session
impl Session
Sourcepub fn sidecar_path(name: &str) -> Result<PathBuf>
pub fn sidecar_path(name: &str) -> Result<PathBuf>
Where this session’s sidecar lives on disk. Validates name first so a hostile value
(path separators, ..) can never escape the sessions directory on save/load/delete.
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 UnsafeUnpin 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