pub trait CommandSessionControlContext {
Show 16 methods
// Required methods
fn transition_blocked(&self) -> bool;
fn relay_projection(&self) -> RelayProjection;
fn open_resume_picker(&mut self);
fn resolve_resume_source(
&mut self,
raw: &str,
) -> Result<ResumeSource, String>;
fn import_session_file(
&mut self,
path: PathBuf,
) -> Result<ResumeImportReceipt, String>;
fn sanitize_session_title(&self, raw_title: &str) -> String;
fn rename_session(
&mut self,
title: &str,
) -> Result<SessionTitleReceipt, String>;
fn title_report(&self) -> TitleReport;
fn set_window_title(&mut self, title: String) -> Result<(), String>;
fn clear_window_title(&mut self) -> Result<(), String>;
fn remote_status(&self) -> String;
fn remote_link(&self) -> Option<RemoteLink>;
fn remote_browser_open(&self) -> RemoteOpenOutcome;
fn remote_start_info(&self) -> RemoteStartInfo;
fn remote_stop_refusal(&self) -> Option<String>;
fn resolve_hosted_work_target(&self) -> Option<HostedWorkTarget>;
}Expand description
Control authority for the session command slice (FEAT-024 D2/D5).
Operation-granular synchronous delegates over the exact minimum host work
the six control commands consume. Delegates reproduce the baseline
check/mutation order (transition gate before resume I/O, save before
publication, single-attempt browser launch) and return portable receipts/
projections or the exact host-error text the baseline surfaces. No
SessionManager, saved-session/container type, SessionPickerView,
remote-control service, Git wrapper, configuration, model/history type,
lock, or host callback crosses the facet.
Required Methods§
Sourcefn transition_blocked(&self) -> bool
fn transition_blocked(&self) -> bool
Live transition gate consulted by /resume before any picker or I/O.
Sourcefn relay_projection(&self) -> RelayProjection
fn relay_projection(&self) -> RelayProjection
/relay: authoritative semantic snapshot (workspace/mode/model/goal/
to-do/plan/compact-template). Unavailable sources are represented as
explicit states, never panics.
Sourcefn open_resume_picker(&mut self)
fn open_resume_picker(&mut self)
Bare /resume: push the existing picker without preselection.
Sourcefn resolve_resume_source(&mut self, raw: &str) -> Result<ResumeSource, String>
fn resolve_resume_source(&mut self, raw: &str) -> Result<ResumeSource, String>
/resume <raw>: resolve direct-path, workspace-relative, session
id/prefix, and inline-container routes in the established order; a
recognized inline container is imported atomically here.
Sourcefn import_session_file(
&mut self,
path: PathBuf,
) -> Result<ResumeImportReceipt, String>
fn import_session_file( &mut self, path: PathBuf, ) -> Result<ResumeImportReceipt, String>
/resume <file>: read, parse, persist, and apply a foreign session
file (container or plain saved session). Errors are the exact baseline
read/parse/import text.
Sourcefn sanitize_session_title(&self, raw_title: &str) -> String
fn sanitize_session_title(&self, raw_title: &str) -> String
Apply the authoritative session-title character policy before the
portable /rename and /title handlers validate and compose output.
Sourcefn rename_session(&mut self, title: &str) -> Result<SessionTitleReceipt, String>
fn rename_session(&mut self, title: &str) -> Result<SessionTitleReceipt, String>
/rename <title>: recover first-snapshot state, sync live state,
persist, and publish with baseline order. The handler already applied
sanitization plus blank and 100-character validation.
Sourcefn title_report(&self) -> TitleReport
fn title_report(&self) -> TitleReport
Bare /title: effective prefix and its source.
Sourcefn set_window_title(&mut self, title: String) -> Result<(), String>
fn set_window_title(&mut self, title: String) -> Result<(), String>
/title <title>: persist an already sanitized and validated window
title with baseline save/publication/redraw semantics.
Sourcefn clear_window_title(&mut self) -> Result<(), String>
fn clear_window_title(&mut self) -> Result<(), String>
/title off|clear|none: clear the session window title with the same
baseline persistence/redraw semantics.
Sourcefn remote_status(&self) -> String
fn remote_status(&self) -> String
/rc status: current remote-control status line.
Sourcefn remote_link(&self) -> Option<RemoteLink>
fn remote_link(&self) -> Option<RemoteLink>
/rc link: live session link plus optional computer-management URL.
Sourcefn remote_browser_open(&self) -> RemoteOpenOutcome
fn remote_browser_open(&self) -> RemoteOpenOutcome
/rc open: synchronous single browser attempt over the authoritative
URL-opening helper; outcome carries the URL for exact message text.
Sourcefn remote_start_info(&self) -> RemoteStartInfo
fn remote_start_info(&self) -> RemoteStartInfo
/rc start: whether the active-turn copy applies.
Sourcefn remote_stop_refusal(&self) -> Option<String>
fn remote_stop_refusal(&self) -> Option<String>
/rc stop: refusal reason while a remote turn/envelope is active.
Sourcefn resolve_hosted_work_target(&self) -> Option<HostedWorkTarget>
fn resolve_hosted_work_target(&self) -> Option<HostedWorkTarget>
/remote-env open: validate the hosted-work Git target host-side and
return the encoded URL plus raw repo/branch echoes; None reproduces
the unavailable-target error. Credentials never appear in values or
errors.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".