|
NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
|
Per-run dispatch metadata threaded through the engine and executor. More...
#include <run_context.h>
Public Attributes | |
| std::shared_ptr< CancelToken > | budget_cancel_token |
| Shared sibling-cancellation scope for budget-aware nodes. | |
| std::uint64_t | cache_execution_id = 0 |
| Engine-assigned identity for this run or resume call. | |
| std::shared_ptr< CancelToken > | cancel_token |
| Operation-scoped cooperative cancellation handle. | |
| std::optional< std::chrono::steady_clock::time_point > | deadline |
| Absolute monotonic-clock deadline supplied through RunMetadata, when set. | |
| asio::any_io_executor | dispatch_executor |
| RunMetadata::dispatch_executor: where a node attempt that needs its own worker runs. | |
| std::shared_ptr< OwnedManagedBudgetLease > | managed_budget_lease |
| Host-only standalone currency; never recovered from caller JSON. | |
| std::uint64_t | model_token_budget = 0 |
| Program-supplied token ceiling and terminal signal. Zero/null leave generic Core runs unchanged. | |
| std::string | resume_interrupt_id |
| #406: the interrupt resume_value answers, when it answers this invocation's own NodeInterrupt: its PendingInterrupt::id, the task id that RunResult::interrupt_id and RunResult::interrupts report, whether the resume named it (RunMetadata::resume_interrupt_id) or answered the first one. | |
| std::optional< json > | resume_value |
| Value supplied to GraphEngine::resume(), for the one invocation the resume answers, in the step it re-enters (#388, #393): the node or Send whose NodeInterrupt it answers, or the node an interrupt_before gate held. | |
| std::string | run_id |
| Durable Program run identity used by host-brokered journal effects. | |
| bool | shared_scheduler = false |
| RunMetadata::shared_scheduler: blocking node bodies should not hold the calling executor, which other runs and host timers share. | |
| int | step = 0 |
| Current super-step index. | |
| std::shared_ptr< Store > | store |
| Optional cross-thread shared memory. | |
| StreamMode | stream_mode = StreamMode::ALL |
| Mirrors RunConfig::stream_mode. | |
| std::string | thread_id |
| Mirrors RunConfig::thread_id. | |
| std::shared_ptr< ToolExecutionController > | tool_execution_controller |
| Shared host admission boundary for every tool call in this run. | |
| ToolExecutionIdentity | tool_execution_identity |
| Stable host/Program identity copied to each dispatched tool call. | |
| ToolGate | tool_gate |
| Effective tool policy for this invocation. | |
| std::string | trace_id |
| Per-run trace correlator supplied through RunMetadata. | |
| std::shared_ptr< UsageAccumulator > | usage |
| Shared token accounting sink for this run and its subgraphs. | |
Per-run dispatch metadata threaded through the engine and executor.
GraphNode::run(NodeInput) consumes this through NodeInput::ctx. Workers that need an isolated copy take it by value; the common path takes it by const reference.
Definition at line 71 of file run_context.h.
| std::uint64_t neograph::graph::RunContext::cache_execution_id = 0 |
Engine-assigned identity for this run or resume call.
Used only for execution-local cache isolation; it is not derived from user data.
Definition at line 112 of file run_context.h.
| asio::any_io_executor neograph::graph::RunContext::dispatch_executor |
RunMetadata::dispatch_executor: where a node attempt that needs its own worker runs.
Empty: the process-wide attempt pool.
Definition at line 102 of file run_context.h.
| std::string neograph::graph::RunContext::resume_interrupt_id |
#406: the interrupt resume_value answers, when it answers this invocation's own NodeInterrupt: its PendingInterrupt::id, the task id that RunResult::interrupt_id and RunResult::interrupts report, whether the resume named it (RunMetadata::resume_interrupt_id) or answered the first one.
Empty when resume_value is the approval of the interrupt_before gate that held this node (#393, #396), and whenever resume_value is empty. A node behind a gate that also asks its own question tells the gate's approval from the answer to its question by this field.
Definition at line 137 of file run_context.h.
| std::optional<json> neograph::graph::RunContext::resume_value |
Value supplied to GraphEngine::resume(), for the one invocation the resume answers, in the step it re-enters (#388, #393): the node or Send whose NodeInterrupt it answers, or the node an interrupt_before gate held.
Every other invocation sees it empty, as does every invocation of a later step and of a fresh run, so a node that asks pauses the run again instead of taking an answer to another question.
Definition at line 126 of file run_context.h.
| ToolGate neograph::graph::RunContext::tool_gate |
Effective tool policy for this invocation.
It includes any inherited parent policy and this engine's own policy, so a subgraph cannot weaken a parent gate by using a different GraphEngine instance.
Definition at line 145 of file run_context.h.