Skip to main content

ProcessEngine

Trait ProcessEngine 

Source
pub trait ProcessEngine: Send + Sync {
    // Required methods
    fn kind(&self) -> &'static str;
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: ProcessEngineRunContext<'life1>,
        payload: Value,
    ) -> Pin<Box<dyn Future<Output = ProcessAwaitOutput> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn validate_start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        _context: ProcessEngineValidationContext<'life1>,
        _payload: &'life2 Value,
        _env_spec: Option<&'life3 ProcessExecutionEnvSpec>,
    ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
    fn identity(&self, payload: &Value) -> ProcessIdentity { ... }
}
Expand description

Deployment extension point for non-kernel process runtimes.

Core built-ins (ToolCall, SessionTurn, and External) are intentionally not registered here; they are kernel primitives with direct orchestration support. Implement ProcessEngine for process kinds stored as ProcessInput::Engine.

Required Methods§

Source

fn kind(&self) -> &'static str

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, context: ProcessEngineRunContext<'life1>, payload: Value, ) -> Pin<Box<dyn Future<Output = ProcessAwaitOutput> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn validate_start<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _context: ProcessEngineValidationContext<'life1>, _payload: &'life2 Value, _env_spec: Option<&'life3 ProcessExecutionEnvSpec>, ) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn identity(&self, payload: &Value) -> ProcessIdentity

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§