Skip to main content

ViewerSession

Struct ViewerSession 

Source
pub struct ViewerSession {
Show 64 fields pub subagents: SubagentPolicy, pub at: Option<String>, pub branch: Option<String>, pub base: Option<String>, pub targeted_turn_control_supported: bool, pub native_subagents: Vec<NativeAgent>, pub steering: Option<SteeringOperation>, pub active_prompt_id: Option<String>, pub cancelling_prompt_id: Option<String>, pub capacity_retry: Option<CapacityRetry>, pub retry_assessment_pending: bool, pub quota_recovery: Option<QuotaRecovery>, pub id: String, pub publication_state: Option<PublicationState>, pub managed_checkout_kind: Option<ManagedCheckoutKind>, pub workspace_id: String, pub title: String, pub subagent_parent_id: Option<String>, pub subagent_task_name: Option<String>, pub subagent_session_ids: Vec<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 has_checkpoint: bool, pub configuration_issue: Option<String>, pub launch_error: Option<String>, pub preview: Vec<String>, pub queued_prompts: Vec<ViewerQueuedPrompt>, pub active_user_shells: Vec<ViewerUserShell>, pub background_tasks: Vec<ViewerBackgroundTask>, pub pending_elicitations: Vec<ElicitationRequest>, pub conversation_available: bool, pub prompt_images_supported: bool, pub incompatible_resume_targets: Vec<String>, pub resume_refusals: BTreeMap<String, String>, pub compatible_resume_targets: Vec<String>, pub project_label: String, pub project_key: String, pub display_location: String, pub container_cpus: Option<String>, pub container_memory: Option<String>, pub additional_mounts: Vec<AdditionalMount>, pub lifecycle: ViewerLifecycleCategory, pub transitioning: bool, pub latest_event_ordinal: u64, pub last_activity_at_ms: Option<i64>, pub last_message_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_state: Option<ActivityState>, 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§

§subagents: SubagentPolicy§at: Option<String>

Commit the workspace started checked out at, when one was named.

§branch: Option<String>

Branch created at at, or the existing branch checked out without it.

§base: Option<String>

Diff base the session was started with; at unless another was named.

§targeted_turn_control_supported: bool§native_subagents: Vec<NativeAgent>§steering: Option<SteeringOperation>§active_prompt_id: Option<String>§cancelling_prompt_id: Option<String>§capacity_retry: Option<CapacityRetry>§retry_assessment_pending: bool§quota_recovery: Option<QuotaRecovery>§id: String§publication_state: Option<PublicationState>§managed_checkout_kind: Option<ManagedCheckoutKind>§workspace_id: String§title: String§subagent_parent_id: Option<String>

Parent ownership for a borrowed-target child session.

§subagent_task_name: Option<String>

The stable task label chosen by the parent when it spawned this child.

§subagent_session_ids: Vec<String>

Direct children of this parent. Children are deliberately never nested.

§harness_kind: String§profile_id: String§bundle_id: String§target_id: String§state: String§created_at: String§updated_at: String§has_error: bool§has_checkpoint: bool

Whether the session has a checkpoint to resume from. A resume restores a checkpoint and nothing else, so a session without one, such as a launch that failed before its first, cannot be resumed (launch finding R6-1). Only the fact travels; the archive’s path stays on the controller.

§configuration_issue: Option<String>

Public identifiers and repair guidance only; never raw runtime errors.

§launch_error: Option<String>

Why a launch failed, for a session that ended in the error state. This is the same provisioning error text last_error already publishes through mj events, surfaced here so mj sessions/mj wait can show the reason instead of a bare “failed to launch”.

§preview: Vec<String>§queued_prompts: Vec<ViewerQueuedPrompt>§active_user_shells: Vec<ViewerUserShell>§background_tasks: Vec<ViewerBackgroundTask>§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: bool

Whether 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.

§resume_refusals: BTreeMap<String, String>

The controller’s reason for each id in incompatible_resume_targets. It names project paths and SSH hosts, so it is never serialized: only in-process validation reads it, to tell the caller why a resume or move was refused.

§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: String

The canonical short source label for this session: a bundle name, path leaf, or repository name, never a source path itself.

§project_key: String

A 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: String

The configured target’s human-facing project location. This is the same target projection the terminal uses while a session is running.

§container_cpus: Option<String>

Per-session container CPU limit overriding the target template’s. It is applied the next time the session’s container is created.

§container_memory: Option<String>

Per-session container memory limit overriding the target template’s. It is applied the next time the session’s container is created.

§additional_mounts: Vec<AdditionalMount>

Extra directories attached to this session’s container, in the same persisted shape the terminal’s container dialog edits.

§lifecycle: ViewerLifecycleCategory§transitioning: bool

A 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: u64

How 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.

§last_message_at_ms: Option<i64>

When the newest top-level user or agent message in the browser transcript was recorded, in epoch milliseconds. Tool calls and status lines do not move it. Absent when the transcript holds no such message with a recording time.

§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: bool

Known live activity is idle: no foreground turn, tool, or background work. Missing operational state must not be presented as confirmed idle.

§activity_state: Option<ActivityState>

What this session is doing, in the shared vocabulary every part of Mjolnir now uses. Richer than chat_phase, which has only four values and must keep them: this can also say that the daemon cannot see the worker and report what was last known about it.

§activity: String

What 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: ViewerSessionCapabilities

Implementations§

Source§

impl ViewerSession

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ViewerSession

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ViewerSession

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&ViewerSession> for ApiSession

Source§

fn from(session: &ViewerSession) -> Self

Converts to this type from the input type.
Source§

impl FromIterator<ViewerSession> for ViewerSessions

Source§

fn from_iter<T: IntoIterator<Item = ViewerSession>>(rows: T) -> Self

Creates a value from an iterator. Read more
Source§

impl PartialEq for ViewerSession

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ViewerSession

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ViewerSession

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> IntoMaybeUndefined<T> for T

Source§

fn into_maybe_undefined(self) -> MaybeUndefined<T>

Converts this value into a three-state builder argument.
Source§

impl<T> IntoOption<T> for T

Source§

fn into_option(self) -> Option<T>

Converts this value into an optional builder argument.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more