pub trait Backend {
// Required methods
fn name(&self) -> &'static str;
fn spawn_command(&self, opts: &SpawnOpts) -> String;
fn plan_markers(&self) -> &'static [&'static str];
fn permission_markers(&self) -> &'static [&'static str];
fn trust_markers(&self) -> &'static [&'static str];
fn verified_versions(&self) -> &'static [&'static str];
fn installed_version(&self) -> Option<String>;
}Expand description
A driveable agent CLI.
Required Methods§
Sourcefn spawn_command(&self, opts: &SpawnOpts) -> String
fn spawn_command(&self, opts: &SpawnOpts) -> String
The shell command tmux execs in the new session (PoC §2.1 for claude).
Sourcefn plan_markers(&self) -> &'static [&'static str]
fn plan_markers(&self) -> &'static [&'static str]
capture-pane substrings that indicate a plan-approval gate is on screen (PoC §3.3).
Sourcefn permission_markers(&self) -> &'static [&'static str]
fn permission_markers(&self) -> &'static [&'static str]
capture-pane substrings that indicate a tool-permission gate is on screen.
Sourcefn trust_markers(&self) -> &'static [&'static str]
fn trust_markers(&self) -> &'static [&'static str]
capture-pane substrings for the one-time “trust this folder?” startup gate that claude
shows on a directory it has not seen before. Blocks the session until answered.
Sourcefn verified_versions(&self) -> &'static [&'static str]
fn verified_versions(&self) -> &'static [&'static str]
Backend versions the gate markers were live-verified on. Exact pins only — patch releases can change the TUI wording the markers match against.
Sourcefn installed_version(&self) -> Option<String>
fn installed_version(&self) -> Option<String>
Version of the backend CLI currently on PATH, or None if it can’t be determined. Probed
once at spawn (the binary is pinned for the session’s lifetime) — note this is the CLI
csd resolves, which tmux normally execs too, but a divergent tmux environment could
technically run a different copy.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".