Skip to main content

TeamLifecycleHook

Trait TeamLifecycleHook 

Source
pub trait TeamLifecycleHook: Send + Sync {
    // Required method
    fn name(&self) -> &str;

    // Provided methods
    fn priority(&self) -> i32 { ... }
    fn before<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _context: &'life1 TeamLifecycleContext,
    ) -> Pin<Box<dyn Future<Output = Result<TeamLifecycleDecision, AdkError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait { ... }
    fn after<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _context: &'life1 TeamLifecycleContext,
        _outcome: &'life2 TeamLifecycleOutcome,
    ) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait { ... }
}
Available on crate feature agents only.
Expand description

Async team execution hook.

Runner’s ordinary plugins still wrap the complete agent run. This hook adds the team-specific relationship boundary that generic plugins cannot infer.

Required Methods§

Source

fn name(&self) -> &str

Stable hook name used in diagnostics and telemetry.

Provided Methods§

Source

fn priority(&self) -> i32

Lower values run first before an operation and last after it.

Source

fn before<'life0, 'life1, 'async_trait>( &'life0 self, _context: &'life1 TeamLifecycleContext, ) -> Pin<Box<dyn Future<Output = Result<TeamLifecycleDecision, AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Runs immediately before the described operation.

Source

fn after<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _context: &'life1 TeamLifecycleContext, _outcome: &'life2 TeamLifecycleOutcome, ) -> Pin<Box<dyn Future<Output = Result<(), AdkError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Runs after success, failure, or policy termination.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§