pub struct ApiSession {Show 21 fields
pub background_work: Option<ApiBackgroundWork>,
pub id: String,
pub workspace_id: String,
pub title: String,
pub harness_kind: String,
pub profile_id: String,
pub target_id: String,
pub bundle_id: String,
pub state: String,
pub lifecycle: ViewerLifecycleCategory,
pub chat_phase: ViewerChatPhase,
pub is_idle: bool,
pub activity_state: Option<ActivityState>,
pub has_error: bool,
pub error: Option<String>,
pub created_at: String,
pub updated_at: String,
pub last_turn_outcome: Option<MaterializedTurnOutcome>,
pub last_turn_diagnostic: Option<TurnDiagnostic>,
pub config_options: Vec<ViewerConfigOption>,
pub pending_elicitations: Vec<ElicitationRequest>,
}Expand description
One session as the API presents it. This is a narrower, more stable shape than the viewer’s own session projection, which changes whenever the browser needs something new.
Fields§
§background_work: Option<ApiBackgroundWork>§id: String§workspace_id: String§title: String§harness_kind: String§profile_id: String§target_id: String§bundle_id: String§state: String§lifecycle: ViewerLifecycleCategory§chat_phase: ViewerChatPhase§is_idle: bool§activity_state: Option<ActivityState>What this session is doing, in more detail than chat_phase’s four
values allow: in particular it can say that the daemon cannot see the
worker and report what it last knew, rather than claiming idleness it
cannot prove.
has_error: bool§error: Option<String>Why a launch failed, for a session in the error state. Absent
otherwise: raw runtime error text is deliberately not published for a
running session. Why a turn failed travels in last_turn_diagnostic,
which a single-session query fills.
created_at: String§updated_at: String§last_turn_outcome: Option<MaterializedTurnOutcome>How the last finished prompt ended. Absent unless the caller asked for one session by id or waited on it, because the dashboard projection the list is built from does not carry turn identity.
last_turn_diagnostic: Option<TurnDiagnostic>§config_options: Vec<ViewerConfigOption>§pending_elicitations: Vec<ElicitationRequest>Trait Implementations§
Source§impl Clone for ApiSession
impl Clone for ApiSession
Source§fn clone(&self) -> ApiSession
fn clone(&self) -> ApiSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ApiSession
impl Debug for ApiSession
Source§impl<'de> Deserialize<'de> for ApiSession
impl<'de> Deserialize<'de> for ApiSession
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>,
Source§impl From<&ViewerSession> for ApiSession
impl From<&ViewerSession> for ApiSession
Source§fn from(session: &ViewerSession) -> Self
fn from(session: &ViewerSession) -> Self
Source§impl PartialEq for ApiSession
impl PartialEq for ApiSession
Source§impl Serialize for ApiSession
impl Serialize for ApiSession
impl StructuralPartialEq for ApiSession
Auto Trait Implementations§
impl Freeze for ApiSession
impl RefUnwindSafe for ApiSession
impl Send for ApiSession
impl Sync for ApiSession
impl Unpin for ApiSession
impl UnsafeUnpin for ApiSession
impl UnwindSafe for ApiSession
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
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>,
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