Skip to main content

CommandSessionControlContext

Trait CommandSessionControlContext 

Source
pub trait CommandSessionControlContext {
Show 19 methods // Required methods fn transition_blocked(&self) -> bool; fn transition_blockers(&self) -> Vec<String>; 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 composer_color(&self) -> Option<String>; fn set_composer_color( &mut self, color: Option<String>, ) -> 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 seven 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§

Source

fn transition_blocked(&self) -> bool

Live transition gate consulted by /resume before any picker or I/O.

Source

fn transition_blockers(&self) -> Vec<String>

Why the transition gate is closed, in operator terms; empty means the transition is allowed. Consulted only after Self::transition_blocked reports a block.

Display projection, not a data source: the strings are pre-rendered for a refusal message and carry no stable shape. A caller that needs ids, durations, or owners should add a structured method instead of parsing these back out.

Source

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.

Source

fn open_resume_picker(&mut self)

Bare /resume: push the existing picker without preselection.

Source

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.

Source

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.

Source

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.

Source

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.

Source

fn title_report(&self) -> TitleReport

Bare /title: effective prefix and its source.

Source

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.

Source

fn clear_window_title(&mut self) -> Result<(), String>

/title off|clear|none: clear the session window title with the same baseline persistence/redraw semantics.

Source

fn composer_color(&self) -> Option<String>

Source

fn set_composer_color(&mut self, color: Option<String>) -> Result<(), String>

Source

fn remote_status(&self) -> String

/rc status: current remote-control status line.

/rc link: live session link plus optional computer-management URL.

Source

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.

Source

fn remote_start_info(&self) -> RemoteStartInfo

/rc start: whether the active-turn copy applies.

Source

fn remote_stop_refusal(&self) -> Option<String>

/rc stop: refusal reason while a remote turn/envelope is active.

Source

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

Implementors§