NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::graph::NodeInput Struct Reference

Per-call input bundle for the v0.4 unified run() virtual. More...

#include <node.h>

Collaboration diagram for neograph::graph::NodeInput:
[legend]

Public Attributes

const RunContextctx
 Per-run metadata threaded by the engine — cancel token, deadline, trace_id, thread_id, current super-step, stream mode.
 
const GraphStatestate
 Snapshot of the channel state visible to this node.
 
const GraphStreamCallbackstream_cb = nullptr
 Streaming sink.
 

Detailed Description

Per-call input bundle for the v0.4 unified run() virtual.

Replaces the (state[, cb]) parameter pair that the legacy 8- virtual cross-product passed around. New nodes override GraphNode::run(NodeInput) -> awaitable<NodeOutput> and read everything they need (state, per-run metadata, optional streaming sink) from this struct. Trivially constructed at the dispatch site; cheap to pass by const reference.

PR 2 (v0.4.0): run() is additive — the default body forwards to the legacy 8-virtual chain, so existing C++ subclasses continue to compile and work unchanged. PR 4 marks the legacy virtuals [[deprecated]]; v1.0 deletes them.

See also
ROADMAP_v1.md "Execution plan" → PR 2

Definition at line 72 of file node.h.

Member Data Documentation

◆ ctx

const RunContext& neograph::graph::NodeInput::ctx

Per-run metadata threaded by the engine — cancel token, deadline, trace_id, thread_id, current super-step, stream mode.

PR 1 plumbed this through every dispatch hop; PR 2 is the first place a user-overridable virtual receives it.

Definition at line 80 of file node.h.

◆ stream_cb

const GraphStreamCallback* neograph::graph::NodeInput::stream_cb = nullptr

Streaming sink.

nullptr for non-streaming runs (the engine passes a pointer to its callback only when the caller used run_stream / run_stream_async and StreamMode requests events). New nodes that emit LLM_TOKEN events dereference this when non-null and ignore it otherwise.

Definition at line 87 of file node.h.


The documentation for this struct was generated from the following file: