Skip to main content

ThreadExecutionHost

Trait ThreadExecutionHost 

Source
pub trait ThreadExecutionHost: Send + Sync {
    // Required methods
    fn artifact<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        owner_id: &'life1 str,
        artifact_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<AgentArtifact>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn history<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread: &'life1 AgentThread,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn check_admission<'life0, 'life1, 'async_trait>(
        &'life0 self,
        policy: &'life1 ThreadPolicy,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn execute<'life0, 'async_trait>(
        &'life0 self,
        turn: HostedThreadTurn,
    ) -> Pin<Box<dyn Future<Output = Result<AgentThreadResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Required bridge to the trusted shared-kernel host. There are no default methods: an adapter cannot silently skip binding, budget, or execution work.

Required Methods§

Source

fn artifact<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_id: &'life1 str, artifact_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<AgentArtifact>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolve the exact registered artifact or fail; never substitute a default.

Source

fn history<'life0, 'life1, 'async_trait>( &'life0 self, thread: &'life1 AgentThread, ) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read canonical history for this host-resolved thread, not a client ID.

Source

fn check_admission<'life0, 'life1, 'async_trait>( &'life0 self, policy: &'life1 ThreadPolicy, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check frozen executable bindings and sandbox enforcement. The service independently checks the captured root budget before admission and turns.

Source

fn execute<'life0, 'async_trait>( &'life0 self, turn: HostedThreadTurn, ) -> Pin<Box<dyn Future<Output = Result<AgentThreadResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Run the same turn kernel, including root approvals and per-call budgets. Cancellation must unwind local/remote work before this method returns.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§