Skip to main content

SessionResumeParams

Struct SessionResumeParams 

Source
pub struct SessionResumeParams {
Show 17 fields pub command_id: String, pub recovery_mode: Option<RecoveryMode>, pub session_id: String, pub workspace_root: Option<String>, pub workspace_roots: Option<Vec<String>>, pub cursor: Option<String>, pub exclude_items: Option<bool>, pub history: Option<HistoryPreference>, pub permission_profile: Option<String>, pub model_id: Option<String>, pub config: Option<SessionConfig>, pub continue_paused_source: Option<ContinuePausedSource>, pub approval_rules: Option<Vec<ClientApprovalRule>>, pub missing_input_assets: Option<MissingInputAssets>, pub limits: Option<SessionLimitsChoice>, pub auto_recover: Option<bool>, pub worktree: Option<WorktreeStartRequest>,
}
Expand description

session/resume params.

Fields§

§command_id: String

The idempotency handle (UUIDv7). A resume that loads a session writes a durable SessionResumed record.

§recovery_mode: Option<RecoveryMode>

Cold-resume replacement choice; omission preserves the retained choice. A warm attach rejects a different or unestablished choice as invalidParams. Explicit null is invalid.

§session_id: String

The session to load.

§workspace_root: Option<String>

Relocate the resumed session to this folder. Same rules as session/start.workspaceRoot: absolute, existing, and when workspaceRoots is also present it names the same folder as workspaceRoots[0] (canonical forms). The session’s durable identity does not change; Project Trust is evaluated for the relocated folder. Omitted: the recorded root, as today. Experimental (session/resume.workspaceRoot).

§workspace_roots: Option<Vec<String>>

The resumed session’s runtime workspace-root set, with session/start.workspaceRoots’s rules (the first root is the working directory; explicit null is invalid params). Present, it relocates the session and later resumes keep it; omitted, the latest recorded set. Experimental (session/resume.workspaceRoots).

§cursor: Option<String>

A view cursor previously observed by this client — or an observed summarizedThrough compaction anchor. When it names an event the server still holds, the server returns only the suffix and history.mode is none. A cursor the server minted that names no event yet, such as the empty start cursor of a session that had no events, is treated as no cursor: the server serves what a resume without a cursor would. A cursor older than the earliest event the server still holds gets a snapshot, or -32040 viewTruncated when none fits. A cursor this session’s view never minted is refused with -32011 notFound, reason missingAnchor, and a compaction anchor naming a boundary the server has pruned is refused with -32042 boundaryPruned. Omitted and explicit null both mean “no cursor”.

§exclude_items: Option<bool>

Return only session metadata and live resume state; page history separately with view/page. Default false.

§history: Option<HistoryPreference>

History mode preference, default auto. A PREFERENCE, not a budget override: when the requested mode does not fit the history budget the server downgrades it and history.mode reports what was actually served. Ignored when cursor or excludeItems makes it moot.

§permission_profile: Option<String>

The launch permission-profile pick: a profile id the host catalog already admits. Select, never create. Omitted restores retained authority only, with no override. The host restores first, then applies the pick in the same pre-marker step; over a declared lost record the restore is the never-wider reset, committed before the pick, and where the reset cannot commit the pick is committed alone as that reset. A pick that fails admission refuses the resume commandRejected (-32030; permission_profile_unknown / permission_profile_unavailable) before any durable byte. Explicit null is invalid params (the same closed null-tolerant set as at start).

§model_id: Option<String>

The explicit MSP model override: a model string the caller supplies at resume time. When present it wins over the retained binding’s recorded origin — over a stamped label and over a stamped pin — and it recovers an otherwise-unresolved label binding by sending the override as the wire model instead of the unresolved refusal. Omitted preserves arm (2): the retained binding resolves by recorded origin exactly as without this member. Explicit null is invalid params (the same closed null-tolerant set as at start). The override changes the model within the retained provider; it never names a provider. A resume that loads the session records it as a resume --model records: nothing when it already is the session’s model, else one durable selection with the provider’s profile for that model. A resume that attaches to a loaded session switches the model live. A model the host refuses, a blank one included, leaves the session on its recorded model, which session.modelId reports; a connection that opted into experimentalApi also gets the reason in modelIdRefusal.

§config: Option<SessionConfig>

The same open construction-time extension object as session/start.

§continue_paused_source: Option<ContinuePausedSource>

the governing rules optional actor-bound explicit continuation object: the explicit user Resume action supplies it for a loaded paused source; absent or null keeps current resume behavior and does not release this feature’s loaded-source hold. Nullable. Standalone DTO (T-50280-074): the real effect is T-50280-084’s.

§approval_rules: Option<Vec<ClientApprovalRule>>

Client-supplied shell prefix allow-rules override: omitted reinstalls the session’s rules from the audit fact, present replaces with that set (an explicit empty array clears). Explicit null is invalid params. Until the served-handler slice, a host refuses any spelled approvalRules on session/start/fork/resume with -32602; clients omit it. Experimental (session/resume.approvalRules).

§missing_input_assets: Option<MissingInputAssets>

What a cold load does with a retained input image whose file is missing or corrupt. Omitted means fail; explicit null is invalid params. Only the resume that loads the session reads it; an attach ignores it. Experimental (session/resume.missingInputAssets).

§limits: Option<SessionLimitsChoice>

The trust ask for the session this resume loads: session/start.limits’s shape, of which a resume names only workspaceTrusted. Naming another axis is invalid params: a resumed session keeps its stored sandbox, write and shell limits. The ask takes the place of the session’s stored trust choice, made or not, for that load only: the host saves no trust choice, so a later load reads the stored one again; the host’s ceiling bounds it as it bounds a stored one (tightenedAxes names a clamp). Only the resume that loads the session reads it; an attach ignores it. Experimental, served only by the per-run host a TUI run starts (session/resume.limits; unopted callers are refused -32602, as are opted callers on every other host, where a session resumes with its saved trust choice, a fork or side-chat child included). Explicit null is invalid params.

§auto_recover: Option<bool>

This resume’s auto-recover choice (amendment 26387/68619, owner decision G-37): omitted or true follows the host’s resume_auto_recover gate, which stays the master switch; false holds a crash resume under the governing rules and reports autoRecovery refused with reason optedOut. Decided for this resume only: it is not saved. Only the resume that loads the session reads it; an attach ignores it. Explicit null is invalid params. Experimental (session/resume.autoRecover).

§worktree: Option<WorktreeStartRequest>

The session/start.worktree ask on a resume: a resume that loads a session whose log records no worktree creates or attaches it as a start does and runs the session there. A session whose log records a worktree keeps reattaching it, and an attach ignores the member. Experimental (session/resume.worktree; unopted callers are refused -32602). Absent means no worktree ask.

Trait Implementations§

Source§

impl Clone for SessionResumeParams

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 SessionResumeParams

Source§

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

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

impl<'de> Deserialize<'de> for SessionResumeParams

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 Eq for SessionResumeParams

Source§

impl PartialEq for SessionResumeParams

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 SessionResumeParams

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 SessionResumeParams

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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