pub trait ActionBackend: ActionExecutor + SessionHandle {
// Required methods
fn format(&self) -> ActionFormat;
fn render_fates(
&self,
actions: &[Action],
fates: &[ActionOutcome],
) -> Vec<ChatMessage>;
}Expand description
The kernel’s mount face for one runtime’s injected action backend (T10c). The built-in tool-call backend keeps its own flow; this face serves any other action format one session can interleave with it (envelope turns go to tools, text turns go here).
Supertraits are the M3a seam contracts. The extra methods are the two
things the kernel needs to route a session around a backend — its format
(checkpoint pin / resume affinity, T5) and its history shape for a batch
that produced no observation (dangling-batch synthesis at resume, OV-4;
Err(ExecError) fates, D15). The kernel pushes the rendered messages
verbatim, same as Observation::history_messages.
Required Methods§
Sourcefn format(&self) -> ActionFormat
fn format(&self) -> ActionFormat
This backend’s action format. Must not be ActionFormat::ToolCall —
the built-in tool-call backend owns that format and its flow.
Sourcefn render_fates(
&self,
actions: &[Action],
fates: &[ActionOutcome],
) -> Vec<ChatMessage>
fn render_fates( &self, actions: &[Action], fates: &[ActionOutcome], ) -> Vec<ChatMessage>
Render one batch’s history from per-action fates in this backend’s own
protocol shape — the messages ride ActionOutcomes’ summaries
(including INTERRUPTED_SUMMARY) and are pushed as-is.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".