Skip to main content

AgentBindingProvider

Trait AgentBindingProvider 

Source
pub trait AgentBindingProvider: Send + Sync {
    // Required method
    fn bind<'life0, 'life1, 'async_trait>(
        &'life0 self,
        requests: &'life1 [BindRequest],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<BindOutcome>, BindingProviderError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn pinned_to_session(
        &self,
        _session_id: &str,
    ) -> Option<Arc<dyn AgentBindingProvider>> { ... }
}
Expand description

Execution-environment provider for effective agent capabilities.

Required Methods§

Source

fn bind<'life0, 'life1, 'async_trait>( &'life0 self, requests: &'life1 [BindRequest], ) -> Pin<Box<dyn Future<Output = Result<Vec<BindOutcome>, BindingProviderError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Resolve all requested bindings as one launch-time transaction.

The provider returns exactly one BindOutcome per requested agent — Bound with an (untrusted) receipt Core still validates, or Unbound when the execution environment currently offers no matching capability. Returning fewer, extra, or duplicate outcomes is rejected by Core in attest_bound_agents. Whether an Unbound outcome fails the launch is the caller’s strict decision, not the provider’s.

Provided Methods§

Source

fn pinned_to_session( &self, _session_id: &str, ) -> Option<Arc<dyn AgentBindingProvider>>

Launch-scoped variant of this provider, resolved against one pinned execution session id instead of whatever session currently holds the request’s logical binding_target.

A launch may pin the execution session it routes to (the server’s operator_sid launch field). Two drivers sharing one process claim the same logical role over time, so “the role’s current holder” and “the session this launch is bound to” are different facts — this hook lets a provider resolve manifests through the second one.

The default returns None: a provider with no session concept (the manifest reference provider, an embed-mode adapter) is unaffected and the caller keeps using the unpinned provider, byte-for-byte.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§