Skip to main content

GraphNodeHandler

Trait GraphNodeHandler 

Source
pub trait GraphNodeHandler: Send + Sync {
    // Required method
    fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
        &'life0 self,
        tenant_id: &'life1 str,
        env_id: &'life2 str,
        graph_id: &'life3 str,
        session_id: &'life4 str,
        flow_input: &'life5 Value,
    ) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait,
             'life4: 'async_trait,
             'life5: 'async_trait,
             Self: 'async_trait;
}
Expand description

Bridges a DwAgentGraph flow node into the graph executor.

The concrete impl (constructed in the runner binary / pack loader, Task 8) wraps greentic_aw_runtime::graph::GraphExecutor. The engine holds it as a trait object so engine.rs stays free of AW-runtime construction details — mirroring super::agent_node::AgentNodeHandler.

Required Methods§

Source

fn execute<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, tenant_id: &'life1 str, env_id: &'life2 str, graph_id: &'life3 str, session_id: &'life4 str, flow_input: &'life5 Value, ) -> Pin<Box<dyn Future<Output = Result<Value, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, Self: 'async_trait,

Execute (or resume) a graph run for this session. flow_input expects {"user_text": "..."}; returns {"reply", "trail", "terminated_by"} — the same envelope as DwAgent.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§