pub struct StandaloneAdapter { /* private fields */ }Expand description
RuntimeAdapter for standalone (webui) mode without tmux.
Agents are tracked via an internal registry populated by hook events.
Synthetic targets use the format standalone:0.{id} to satisfy
the session:window.pane pattern used throughout the codebase.
Implementations§
Source§impl StandaloneAdapter
impl StandaloneAdapter
Sourcepub fn register_agent(
&self,
session_id: &str,
cwd: &str,
title: &str,
command: &str,
pid: u32,
) -> String
pub fn register_agent( &self, session_id: &str, cwd: &str, title: &str, command: &str, pid: u32, ) -> String
Register an agent from a hook SessionStart event.
Creates a synthetic PaneInfo with a standalone:0.{id} target.
Returns the generated target identifier.
Sourcepub fn unregister_agent(&self, session_id: &str)
pub fn unregister_agent(&self, session_id: &str)
Unregister an agent (hook SessionEnd event).
Sourcepub fn update_agent(
&self,
session_id: &str,
cwd: Option<&str>,
title: Option<&str>,
)
pub fn update_agent( &self, session_id: &str, cwd: Option<&str>, title: Option<&str>, )
Update agent metadata (cwd, title) from hook events.
Sourcepub fn target_for_session(&self, session_id: &str) -> Option<String>
pub fn target_for_session(&self, session_id: &str) -> Option<String>
Look up the synthetic target for a session_id.
Sourcepub fn agent_count(&self) -> usize
pub fn agent_count(&self) -> usize
Get a reference to the agent registry (for testing).
Trait Implementations§
Source§impl Default for StandaloneAdapter
impl Default for StandaloneAdapter
Source§impl RuntimeAdapter for StandaloneAdapter
impl RuntimeAdapter for StandaloneAdapter
Source§fn list_all_panes(&self) -> Result<Vec<PaneInfo>>
fn list_all_panes(&self) -> Result<Vec<PaneInfo>>
List all panes/agents across all sessions (including detached).
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the runtime backend is available and operational.
Source§fn capture_pane(&self, _target: &str) -> Result<String>
fn capture_pane(&self, _target: &str) -> Result<String>
Capture pane content with ANSI escape codes (for preview rendering).
Source§fn capture_pane_plain(&self, _target: &str) -> Result<String>
fn capture_pane_plain(&self, _target: &str) -> Result<String>
Capture pane content as plain text (for detection analysis).
Source§fn send_keys(&self, _target: &str, _keys: &str) -> Result<()>
fn send_keys(&self, _target: &str, _keys: &str) -> Result<()>
Send interpreted keys to a pane (e.g., “Enter”, “C-c”).
Source§fn send_keys_literal(&self, _target: &str, _keys: &str) -> Result<()>
fn send_keys_literal(&self, _target: &str, _keys: &str) -> Result<()>
Send literal text to a pane (no key interpretation).
Source§fn send_text_and_enter(&self, _target: &str, _text: &str) -> Result<()>
fn send_text_and_enter(&self, _target: &str, _text: &str) -> Result<()>
Send literal text followed by Enter.
Source§fn focus_pane(&self, _target: &str) -> Result<()>
fn focus_pane(&self, _target: &str) -> Result<()>
Focus on a pane (bring to foreground in the runtime).
Source§fn capture_pane_full(&self, target: &str) -> Result<String>
fn capture_pane_full(&self, target: &str) -> Result<String>
Capture full scrollback with ANSI escape codes (all history).
Source§fn get_cursor_position(&self, _target: &str) -> Result<Option<(u32, u32)>>
fn get_cursor_position(&self, _target: &str) -> Result<Option<(u32, u32)>>
Get terminal cursor position (col, row) for a pane, both 0-indexed.
Returns None if the runtime does not support cursor queries.
Source§fn create_session(
&self,
_name: &str,
_cwd: &str,
_window_name: Option<&str>,
) -> Result<()>
fn create_session( &self, _name: &str, _cwd: &str, _window_name: Option<&str>, ) -> Result<()>
Create a new session. Not all runtimes support this.
Source§fn new_window(
&self,
_session: &str,
_cwd: &str,
_window_name: Option<&str>,
) -> Result<String>
fn new_window( &self, _session: &str, _cwd: &str, _window_name: Option<&str>, ) -> Result<String>
Create a new window in a session. Returns the new pane target.
Source§fn split_window(&self, _session: &str, _cwd: &str) -> Result<String>
fn split_window(&self, _session: &str, _cwd: &str) -> Result<String>
Split a window to create a new pane. Returns the new pane target.
Source§fn split_window_tiled(&self, session: &str, cwd: &str) -> Result<String>
fn split_window_tiled(&self, session: &str, cwd: &str) -> Result<String>
Split a window and apply tiled layout for balanced pane sizes.
Source§fn select_layout(&self, _target: &str, _layout: &str) -> Result<()>
fn select_layout(&self, _target: &str, _layout: &str) -> Result<()>
Apply a layout to the window containing the target (e.g. “tiled”).
Source§fn count_panes(&self, _target: &str) -> Result<usize>
fn count_panes(&self, _target: &str) -> Result<usize>
Count panes in the window containing the target.
Source§fn run_command(&self, _target: &str, _command: &str) -> Result<()>
fn run_command(&self, _target: &str, _command: &str) -> Result<()>
Run a command in a pane (send text + Enter).
Auto Trait Implementations§
impl !Freeze for StandaloneAdapter
impl !RefUnwindSafe for StandaloneAdapter
impl Send for StandaloneAdapter
impl Sync for StandaloneAdapter
impl Unpin for StandaloneAdapter
impl UnsafeUnpin for StandaloneAdapter
impl !UnwindSafe for StandaloneAdapter
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
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.