pub struct RuntimeGraphNodeHandler { /* private fields */ }Expand description
Production GraphNodeHandler wrapping the durable graph executor.
Tool dispatch goes straight through the shared ExtensionRuntime via
dispatch_tool_call.
Implementations§
Source§impl RuntimeGraphNodeHandler
impl RuntimeGraphNodeHandler
Sourcepub fn from_parts(
graphs: Arc<dyn GraphConfigSource>,
checkpoint: Arc<dyn CheckpointStore>,
state_store: Arc<dyn AgentStateStore>,
ext_runtime: Arc<ExtensionRuntime>,
llm: Arc<dyn LlmBackend>,
telemetry: Arc<dyn Telemetry>,
token_meter: Arc<dyn TokenMeter>,
ledger: Arc<dyn ToolLedger>,
audit_sink: Option<AuditSink>,
) -> RuntimeGraphNodeHandler
pub fn from_parts( graphs: Arc<dyn GraphConfigSource>, checkpoint: Arc<dyn CheckpointStore>, state_store: Arc<dyn AgentStateStore>, ext_runtime: Arc<ExtensionRuntime>, llm: Arc<dyn LlmBackend>, telemetry: Arc<dyn Telemetry>, token_meter: Arc<dyn TokenMeter>, ledger: Arc<dyn ToolLedger>, audit_sink: Option<AuditSink>, ) -> RuntimeGraphNodeHandler
Build a handler from the runtime’s constituent parts.
Deviation from the Task-7 from_runtime(runtime: Arc<AgentRuntime>, …)
signature: AgentRuntime’s inner Arcs (ext_runtime, llm,
telemetry, token_meter, ledger) are pub(crate) and cannot be
extracted from an Arc<AgentRuntime> outside the greentic-aw-runtime
crate, so a per-visit runtime cannot be reconstructed from a shared
AgentRuntime. The task explicitly allows this: “an acceptable
alternative is a from_parts(...) constructor taking those Arcs
directly.” The pack loader (Task 8) already holds these Arcs when it
would otherwise build an AgentRuntime, so it wires them here instead.
Trait Implementations§
Source§impl GraphNodeHandler for RuntimeGraphNodeHandler
impl GraphNodeHandler for RuntimeGraphNodeHandler
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,
RuntimeGraphNodeHandler: 'async_trait,
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,
RuntimeGraphNodeHandler: 'async_trait,
flow_input
expects {"user_text": "..."}; returns
{"reply", "trail", "terminated_by"} — the same envelope as DwAgent.Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeGraphNodeHandler
impl !UnwindSafe for RuntimeGraphNodeHandler
impl Freeze for RuntimeGraphNodeHandler
impl Send for RuntimeGraphNodeHandler
impl Sync for RuntimeGraphNodeHandler
impl Unpin for RuntimeGraphNodeHandler
impl UnsafeUnpin for RuntimeGraphNodeHandler
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request