pub struct SessionRecord {
pub org: String,
pub project: String,
pub label: String,
pub session_id: Option<String>,
pub charter: Option<String>,
pub kick: Option<String>,
pub resume_kick: Option<String>,
pub interactive: Option<bool>,
pub seat_state: Option<SeatState>,
pub is_git_repo: Option<bool>,
pub mcp_families: Option<Vec<String>>,
pub cwd: Option<String>,
}Expand description
One session’s identity, plus the worker fields a re-spawn needs.
session_id is absent on a worker row the sweep creates, because
dynamic_workers never stored one; every other field is worker-only,
so a lead’s row carries none of them.
The identity is the row’s key: the three fields are here because a caller building a record has to name the row it writes, but they are not stored in the body - every reader fills them from the key, and a body that carried them anyway (written before this change) is ignored.
Fields§
§org: String§project: String§label: String§session_id: Option<String>§charter: Option<String>§kick: Option<String>§resume_kick: Option<String>§interactive: Option<bool>§seat_state: Option<SeatState>Whether the seat is open and whether a turn was in flight. None
is a row written before the field existed; the boot migration seeds
those Idle once, so from then on the state is explicit.
is_git_repo: Option<bool>Whether the worker runs in a worktree, which fixes the directory
its session starts in: worker_tag_dir reads it to compose the
path. Absent on a row written before the field existed, and the
spawn probes for it then - the row is what lets the launchpad and
the boot wave ask the same question without a git probe of their
own.
mcp_families: Option<Vec<String>>The MCP families the spawn’s allowlist restricted this worker to,
canonicalised by the tool that wrote it (wire order, no
duplicates - both agents__spawn and agents__update validate).
None means every family, so a row written before the field
existed keeps its full surface.
cwd: Option<String>The tree the worker runs in, when the spawn pointed it somewhere
other than the project’s own directory: the resolved repo root,
which is the only handle on where its JSONL lives once the session
is not live. None is the project root, so a row written before
the field existed reads as today.
Trait Implementations§
Source§impl Clone for SessionRecord
impl Clone for SessionRecord
Source§impl Debug for SessionRecord
impl Debug for SessionRecord
Source§impl<'de> Deserialize<'de> for SessionRecord
impl<'de> Deserialize<'de> for SessionRecord
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>,
impl Eq for SessionRecord
Source§impl PartialEq for SessionRecord
impl PartialEq for SessionRecord
Source§impl Serialize for SessionRecord
impl Serialize for SessionRecord
impl StructuralPartialEq for SessionRecord
Auto Trait Implementations§
impl Freeze for SessionRecord
impl RefUnwindSafe for SessionRecord
impl Send for SessionRecord
impl Sync for SessionRecord
impl Unpin for SessionRecord
impl UnsafeUnpin for SessionRecord
impl UnwindSafe for SessionRecord
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more