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];
}
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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§