pub trait InteractionBackend: Send + Sync {
// Required method
fn ask<'life0, 'async_trait>(
&'life0 self,
req: InteractionRequest,
) -> Pin<Box<dyn Future<Output = InteractionResponse> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn log(&self, message: &str) { ... }
fn on_review_document(
&self,
tool_call_id: &str,
title: &str,
markdown: &str,
) { ... }
}Expand description
How a dynamically-requested interaction is dispatched and logged.
The background worker answers via the file-based IPC channel and logs to
the per-stage log file; the foreground path answers via stdin and prints
directly. Both share the exact same tool-argument parsing and response
formatting in dispatch_dynamic_interaction.
Required Methods§
Sourcefn ask<'life0, 'async_trait>(
&'life0 self,
req: InteractionRequest,
) -> Pin<Box<dyn Future<Output = InteractionResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ask<'life0, 'async_trait>(
&'life0 self,
req: InteractionRequest,
) -> Pin<Box<dyn Future<Output = InteractionResponse> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Block until the user answers req.
Provided Methods§
Sourcefn log(&self, message: &str)
fn log(&self, message: &str)
Record an operational log line. No-op by default (the foreground path has no per-stage log file to write to).
Sourcefn on_review_document(&self, tool_call_id: &str, title: &str, markdown: &str)
fn on_review_document(&self, tool_call_id: &str, title: &str, markdown: &str)
Called only for present_for_review, once, before asking: persist
or display the document. No-op by default.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".