pub trait SessionHost: Send {
// Required methods
fn prepare_round<'a>(
&'a mut self,
round: u64,
) -> HostFuture<'a, RoundPreparation>;
fn record<'a>(&'a mut self, event: SessionEvent) -> HostFuture<'a, ()>;
fn execute_tool<'a>(
&'a mut self,
call: Result<ToolCall>,
provider_operation_id: Uuid,
) -> HostFuture<'a, SessionToolOutcome>;
fn complete_capture<'a>(
&'a mut self,
capture: Value,
contents: String,
) -> HostFuture<'a, SessionControl>;
fn complete_round<'a>(
&'a mut self,
completion: RoundCompletion,
) -> HostFuture<'a, SessionControl>;
}Expand description
Application-owned semantics invoked by the primary agent runtime.
Required Methods§
Sourcefn prepare_round<'a>(
&'a mut self,
round: u64,
) -> HostFuture<'a, RoundPreparation>
fn prepare_round<'a>( &'a mut self, round: u64, ) -> HostFuture<'a, RoundPreparation>
Prepares the complete context and runtime selection for one provider round.
Sourcefn record<'a>(&'a mut self, event: SessionEvent) -> HostFuture<'a, ()>
fn record<'a>(&'a mut self, event: SessionEvent) -> HostFuture<'a, ()>
Records one provider-protocol fact and durably checkpoints its effects.
Sourcefn execute_tool<'a>(
&'a mut self,
call: Result<ToolCall>,
provider_operation_id: Uuid,
) -> HostFuture<'a, SessionToolOutcome>
fn execute_tool<'a>( &'a mut self, call: Result<ToolCall>, provider_operation_id: Uuid, ) -> HostFuture<'a, SessionToolOutcome>
Executes and durably projects one parsed or invalid application tool call.
Sourcefn complete_capture<'a>(
&'a mut self,
capture: Value,
contents: String,
) -> HostFuture<'a, SessionControl>
fn complete_capture<'a>( &'a mut self, capture: Value, contents: String, ) -> HostFuture<'a, SessionControl>
Completes an opaque freeform capture requested by a prior tool result.
Sourcefn complete_round<'a>(
&'a mut self,
completion: RoundCompletion,
) -> HostFuture<'a, SessionControl>
fn complete_round<'a>( &'a mut self, completion: RoundCompletion, ) -> HostFuture<'a, SessionControl>
Applies the terminal provider answer and decides whether another round is needed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".