Skip to main content

Backend

Trait Backend 

Source
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§

Source

fn name(&self) -> &'static str

Stable identifier persisted in the sidecar (claude, codex).

Source

fn spawn_command(&self, opts: &SpawnOpts) -> String

The shell command tmux execs in the new session (PoC §2.1 for claude).

Source

fn plan_markers(&self) -> &'static [&'static str]

capture-pane substrings that indicate a plan-approval gate is on screen (PoC §3.3).

Source

fn permission_markers(&self) -> &'static [&'static str]

capture-pane substrings that indicate a tool-permission gate is on screen.

Source

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.

Source

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.

Source

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

Implementors§