35#include <neograph/runtime_interposition_consumer.h>
37#include <asio/awaitable.hpp>
44namespace neograph {
class RuntimeInterpositionController; }
45namespace neograph::graph {
211 std::string
get_name()
const override {
return name_; }
218 std::shared_ptr<Provider> provider_;
220 std::vector<Tool*> tools_;
222 std::string instructions_;
252 std::string
get_name()
const override {
return name_; }
257 std::vector<Tool*> tools_;
282 const std::string& prompt,
283 std::vector<std::string> valid_routes);
290 std::string
get_name()
const override {
return name_; }
297 std::shared_ptr<Provider> provider_;
300 std::vector<std::string> valid_routes_;
304 std::vector<ChannelWrite> route_from(
const std::string& intent)
const;
354 std::shared_ptr<GraphEngine> subgraph,
355 std::map<std::string, std::string> input_map = {},
356 std::map<std::string, std::string> output_map = {},
357 SubgraphPersistence persistence = SubgraphPersistence::Legacy);
359 SubgraphPersistence persistence() const noexcept {
return persistence_; }
360 const GraphEngine& child_engine() const noexcept {
return *subgraph_; }
364 const std::string& parent_thread_id,
int parent_step,
365 std::string_view task_id,
366 std::string_view graph_invocation_id = {})
const;
375 std::string
get_name()
const override {
return name_; }
379 std::shared_ptr<GraphEngine> subgraph_;
380 std::map<std::string, std::string> input_map_;
381 std::map<std::string, std::string> output_map_;
383 std::mutex active_mutex_;
384 std::set<std::string> active_per_thread_;
386 json build_subgraph_input(
const GraphState& state)
const;
387 std::vector<ChannelWrite> map_output_writes(
388 const std::vector<ChannelWrite>& child_writes)
const;
NEOGRAPH_API export/import macro for shared-library builds.
Additive opt-in for built-in provider-calling runtime components.
Abstract base class for all graph nodes.
virtual std::string get_name() const =0
Get the node's unique name within the graph.
virtual asio::awaitable< NodeOutput > run(NodeInput in)=0
Unified dispatch entry for sync work, async work, and streaming.
Thread-safe container for all graph state channels.
Node that classifies user intent via LLM and routes execution.
std::string get_name() const override
Get the node's unique name within the graph.
asio::awaitable< NodeOutput > run(NodeInput in) override
v0.4 PR 9a: unified run — calls the LLM with the classification prompt, parses the result against val...
IntentClassifierNode(const std::string &name, const NodeContext &ctx, const std::string &prompt, std::vector< std::string > valid_routes)
Construct an intent classifier node.
bool has_provider() const noexcept
False when built from a NodeContext without a provider; run() then fails.
Node that makes LLM completion calls.
LLMCallNode(const std::string &name, const NodeContext &ctx)
Construct an LLM call node.
std::string get_name() const override
Get the node's unique name within the graph.
bool has_provider() const noexcept
False when built from a NodeContext without a provider; run() then fails.
asio::awaitable< NodeOutput > run(NodeInput in) override
Dispatch the owned typed request and retain every ordered returned message.
Node that runs a compiled GraphEngine as a single node (hierarchical composition).
SubgraphNode(const std::string &name, std::shared_ptr< GraphEngine > subgraph, std::map< std::string, std::string > input_map={}, std::map< std::string, std::string > output_map={}, SubgraphPersistence persistence=SubgraphPersistence::Legacy)
Construct a subgraph node.
std::string get_name() const override
Get the node's unique name within the graph.
asio::awaitable< NodeOutput > run(NodeInput in) override
v0.4 PR 9a: unified run — drives the child engine via run_async (or run_stream_async when in....
std::string checkpoint_thread_id(const std::string &parent_thread_id, int parent_step, std::string_view task_id, std::string_view graph_invocation_id={}) const
Reconstruct an inspection namespace from its parent path and invocation.
Adapter for CPU-light synchronous custom nodes.
asio::awaitable< NodeOutput > run(NodeInput in) final
Unified dispatch entry for sync work, async work, and streaming.
std::string get_name() const final
Get the node's unique name within the graph.
Graph engine type definitions: channels, edges, nodes, events, and control flow.
std::function< void(const GraphEvent &)> GraphStreamCallback
Callback for receiving graph execution events.
SubgraphPersistence
A subgraph's checkpoint lifetime. Legacy preserves the pre-#238 wire identity.
@ Legacy
Existing parent-thread/step/task namespace (compatibility default).
@ Stateless
No child checkpoint or child interrupt/resume.
@ PerThread
Retain channel state across parent runs on the same thread.
@ PerInvocation
Fresh namespace for each parent run; durable across its resume.
Per-run metadata exposed to graph nodes.
Thread-safe mutable graph state management.
Typed per-call controls translated into the selected SDK provider family.
Portable request controls remain the SDK's declared, family-specific fields.
Dependency injection context passed to nodes during construction.
Extended result returned by node execution.
Per-run dispatch metadata threaded through the engine and executor.