pub struct Session {Show 14 fields
pub session_id: String,
pub task_id: String,
pub grite_issue_id: String,
pub role: SessionRole,
pub session_type: SessionType,
pub engine: String,
pub worktree: String,
pub pid: Option<u32>,
pub status: SessionStatus,
pub started_ts: i64,
pub last_heartbeat_ts: Option<i64>,
pub exit_code: Option<i32>,
pub exit_reason: Option<String>,
pub last_output_ref: Option<String>,
}Expand description
A parsed session from a task issue comment.
Sessions are stored as comments on task issues, not as separate issues.
This struct represents the parsed session state from a [session]...[/session] block.
Fields§
§session_id: StringBrat session ID (e.g., “s-20250117-7b3d”).
task_id: StringAssociated task ID.
grite_issue_id: StringGrit issue ID of the parent task.
role: SessionRoleRole executing the session.
session_type: SessionTypeSession type (polecat/crew).
engine: StringEngine name (e.g., “codex”, “claude”, “shell”).
worktree: StringPath to worktree (for polecat sessions).
pid: Option<u32>Process ID (if running).
status: SessionStatusSession status.
started_ts: i64Timestamp when session started (millis since epoch).
last_heartbeat_ts: Option<i64>Last heartbeat timestamp (millis since epoch).
exit_code: Option<i32>Exit code (if exited).
exit_reason: Option<String>Exit reason (signal, timeout, crash, user-stop, completed).
last_output_ref: Option<String>Reference to last output (sha256:
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