pub struct ViewerSession {Show 37 fields
pub id: String,
pub workspace_id: String,
pub title: String,
pub harness_kind: String,
pub profile_id: String,
pub bundle_id: String,
pub target_id: String,
pub state: String,
pub created_at: String,
pub updated_at: String,
pub has_error: bool,
pub preview: Vec<String>,
pub queued_prompts: Vec<ViewerQueuedPrompt>,
pub active_user_shells: Vec<ViewerUserShell>,
pub pending_elicitations: Vec<ElicitationRequest>,
pub conversation_available: bool,
pub prompt_images_supported: bool,
pub incompatible_resume_targets: Vec<String>,
pub compatible_resume_targets: Vec<String>,
pub project_label: String,
pub project_key: String,
pub display_location: String,
pub lifecycle: ViewerLifecycleCategory,
pub transitioning: bool,
pub latest_event_ordinal: u64,
pub last_activity_at_ms: Option<i64>,
pub activity_details: Option<ViewerActivityDetails>,
pub operation: Option<ViewerOperation>,
pub move_recovery: Option<ViewerMoveRecovery>,
pub chat_phase: ViewerChatPhase,
pub is_idle: bool,
pub activity: String,
pub config_options: Vec<ViewerConfigOption>,
pub plan_mode_active: Option<bool>,
pub turn_review: Option<ViewerTurnReview>,
pub available_commands: Vec<ViewerMjCommand>,
pub capabilities: ViewerSessionCapabilities,
}Fields§
§id: String§workspace_id: String§title: String§harness_kind: String§profile_id: String§bundle_id: String§target_id: String§state: String§created_at: String§updated_at: String§has_error: bool§preview: Vec<String>§queued_prompts: Vec<ViewerQueuedPrompt>§active_user_shells: Vec<ViewerUserShell>§pending_elicitations: Vec<ElicitationRequest>Form questions the session is blocked on, published so a phone can answer them. These are the agent’s own questions, already visible in the transcript, so they travel whole rather than redacted.
conversation_available: bool§prompt_images_supported: boolWhether this session’s agent advertised support for image content in prompts. The viewer offers the image controls only when it did, and the server refuses images for a session that did not.
incompatible_resume_targets: Vec<String>Target ids this session cannot resume on. Only the ids travel: the controller’s reasons name project paths and SSH hosts, which this projection deliberately keeps on the controller.
Retained beside compatible_resume_targets so a viewer cached from
before that field existed keeps working through a deployment.
compatible_resume_targets: Vec<String>Target ids this session can resume on, so the browser never has to subtract one set from another to find out.
project_label: StringThe canonical short source label for this session: a bundle name, path leaf, or repository name, never a source path itself.
project_key: StringA stable key for grouping sessions by project. The controller’s own source identity stays private, so what travels is a digest of it: enough to group by, and nothing to read.
display_location: StringThe configured target’s human-facing project location. This is the same target projection the terminal uses while a session is running.
lifecycle: ViewerLifecycleCategory§transitioning: boolA lifecycle transition temporarily owns this session’s conversation.
This remains separate from the coarse lifecycle category so Move can
hide the old transcript while its durable record is still Running.
latest_event_ordinal: u64How far the controller’s projection of this session has advanced. A phone compares it against its own read frontier to know what is unread, without fetching a transcript to find out.
last_activity_at_ms: Option<i64>Durable relay receipt watermark from the materialized projection. It remains absent when the background snapshot pipeline has not yet delivered a projection for this session.
activity_details: Option<ViewerActivityDetails>Structured live activity, absent when no operational relay snapshot is available for this session.
operation: Option<ViewerOperation>§move_recovery: Option<ViewerMoveRecovery>Safe recovery choices for a failed or cancelled Move. Diagnostics and checkpoint paths remain on the controller; this contains only the settings a person may choose again.
chat_phase: ViewerChatPhase§is_idle: boolKnown live activity is idle: no foreground turn, tool, or background work. Missing operational state must not be presented as confirmed idle.
activity: StringWhat this session is doing, in the words the dashboard row uses:
Turn 43m36s Step 12s, BG 43m36s, or [idle].
config_options: Vec<ViewerConfigOption>The settings the harness advertised, with the values it accepts.
plan_mode_active: Option<bool>Whether plan mode is on, or None when this harness has no plan mode.
turn_review: Option<ViewerTurnReview>The review the daemon is running for this session, if any. A phone renders the same review the terminal does and resolves it the same way.
available_commands: Vec<ViewerMjCommand>The Mjolnir commands this session accepts, published rather than hardcoded
in the browser: a command list kept in two places is a command list that
drifts, which is how /review went missing from the phone.
capabilities: ViewerSessionCapabilitiesImplementations§
Source§impl ViewerSession
impl ViewerSession
Sourcepub fn set_project_source(&mut self, source: &ProjectSourceIdentity)
pub fn set_project_source(&mut self, source: &ProjectSourceIdentity)
Apply a resolved controller source while keeping paths and remotes out of the public projection.
Trait Implementations§
Source§impl Clone for ViewerSession
impl Clone for ViewerSession
Source§fn clone(&self) -> ViewerSession
fn clone(&self) -> ViewerSession
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 ViewerSession
impl Debug for ViewerSession
Source§impl<'de> Deserialize<'de> for ViewerSession
impl<'de> Deserialize<'de> for ViewerSession
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 PartialEq for ViewerSession
impl PartialEq for ViewerSession
Source§impl Serialize for ViewerSession
impl Serialize for ViewerSession
impl StructuralPartialEq for ViewerSession
Auto Trait Implementations§
impl Freeze for ViewerSession
impl RefUnwindSafe for ViewerSession
impl Send for ViewerSession
impl Sync for ViewerSession
impl Unpin for ViewerSession
impl UnsafeUnpin for ViewerSession
impl UnwindSafe for ViewerSession
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