pub struct RunMeta {
pub run_id: String,
pub agent_id: String,
pub client_id: String,
pub intent: String,
pub outcome_description: Option<String>,
pub started_at: DateTime<Utc>,
pub termination: Option<RunTermination>,
pub ended_at: Option<DateTime<Utc>>,
pub turns: Vec<RunRecord>,
}Expand description
Daemon-side record of a single agent run (agent run tracing, U1).
Keyed by run_id in the process-wide ServerState::runs registry
so the record survives the WS connection that produced it — needed
both for the disconnect grace window (R5) and so the disk store (U3)
can flush a run even after its session is gone. U1 keeps this purely
in memory; persistence is U3.
Fields§
§run_id: String§agent_id: StringOwning agent. Set at runs.start from the resolved id; used by
the read RPCs’ ownership check (U5/KTD10) and the disk key (U3).
client_id: StringWS client_id that called runs.start. Lets disconnect cleanup
find this run’s owning connection.
intent: String§outcome_description: Option<String>§started_at: DateTime<Utc>§termination: Option<RunTermination>None while the run is in progress; Some once a terminal
record (a reported outcome or an Incomplete marker) is
written. The presence of this field is the “is this run still
open?” signal the grace window checks.
ended_at: Option<DateTime<Utc>>When the terminal record was written, if any.
turns: Vec<RunRecord>The ordered per-turn trace recorded for this run (agent run
tracing, U2). Each entry is a car_proto::RunRecord::Turn
produced by the recorder from a submitted proposal + its
ActionResults. U1 leaves this empty; the U2 recorder appends to
it via ServerState::record_run_turns. U3 flushes this buffer
to disk and U4 broadcasts it — both read it through
ServerState::run_turns. The turn.index field is monotonic
across the run’s proposals, so this Vec is the clean ordered
stream those units consume.
Implementations§
Source§impl RunMeta
impl RunMeta
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
True once a terminal record (outcome or Incomplete) is set.
Sourcepub fn live_status(&self) -> RunLiveStatus
pub fn live_status(&self) -> RunLiveStatus
The coarse live status of this run for the U4 subscribe snapshot /
runs.trace.event (agent run tracing). Mirrors RunStore’s
RunStatus but reads off the in-memory RunMeta so the live path
never touches disk.
Sourcepub fn turn_cursor(&self) -> usize
pub fn turn_cursor(&self) -> usize
Count of RunRecord::Turn entries in this run’s buffer — the live
turn cursor. Equals turns.len() because the buffer holds only
Turn records (Started/Ended are not buffered here).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RunMeta
impl RefUnwindSafe for RunMeta
impl Send for RunMeta
impl Sync for RunMeta
impl Unpin for RunMeta
impl UnsafeUnpin for RunMeta
impl UnwindSafe for RunMeta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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