pub trait EnginePort: Send + Sync {
// Required methods
fn start<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 Task,
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn resume<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
prompt: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn dump<'life0, 'life1, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ConversationDump>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn wire_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
mailbox: &'life2 Mailbox,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn extract_result(
&self,
dump: &ConversationDump,
) -> Result<StructuredResult>;
fn capabilities(&self) -> EngineCapabilities;
}Expand description
Drives a concrete agent engine (a CLI such as forge, or an SDK).
Lifecycle: start launches a run and yields a
[Session]. dump exports the raw conversation, which
extract_result normalizes into a
StructuredResult.
Required Methods§
Sourcefn start<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 Task,
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start<'life0, 'life1, 'async_trait>(
&'life0 self,
task: &'life1 Task,
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start a new run for task, returning a live session handle.
Sourcefn resume<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
prompt: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resume<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
prompt: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resume an existing conversation with a follow-up prompt.
Sourcefn dump<'life0, 'life1, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ConversationDump>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dump<'life0, 'life1, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ConversationDump>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Export the raw conversation for conv_id.
Sourcefn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel a running conversation.
Sourcefn wire_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
mailbox: &'life2 Mailbox,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn wire_mailbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conv_id: &'life1 str,
mailbox: &'life2 Mailbox,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Attach a mailbox so the engine can emit/consume A2A messages.
Sourcefn extract_result(&self, dump: &ConversationDump) -> Result<StructuredResult>
fn extract_result(&self, dump: &ConversationDump) -> Result<StructuredResult>
Normalize a raw dump into a StructuredResult. Pure transform;
implementations must not perform IO here.
Sourcefn capabilities(&self) -> EngineCapabilities
fn capabilities(&self) -> EngineCapabilities
Advertise static capabilities.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".