23#include <neograph/graph/registry.h>
32#include <neograph/tool_set.h>
33#include <neograph/provider.h>
35#include <asio/awaitable.hpp>
36#include <asio/thread_pool.hpp>
50class RuntimeInterpositionController;
52namespace neograph::graph {
54class ValidatedTopology;
56struct SubgraphWriteJournal;
64 std::exception_ptr release_error)
66 std::move(execution_error)),
67 release_error_(std::move(release_error)) {}
68 const std::exception_ptr& release_error()
const noexcept {
return release_error_; }
70 std::exception_ptr release_error_;
150 std::shared_ptr<sp::NativeArchive> native_history_archive;
173 std::shared_ptr<const GraphRegistry> registry;
184 std::shared_ptr<CheckpointStore> checkpoint_store;
185 std::shared_ptr<Store> store;
209 std::string node_name;
216struct NestedCheckpoint {
217 std::vector<std::string> graph_path;
218 std::string thread_id;
232 std::shared_ptr<sp::NativeArchive> native_history_archive;
233 std::function<void(
const sp::Event&)> on_provider_event;
234 std::shared_ptr<ProviderOutcomes> provider_outcomes;
235 std::shared_ptr<ProviderLoopHistory> provider_loop_history;
256 std::shared_ptr<UsageAccumulator>
usage;
315 auto used = used_.load(std::memory_order_relaxed);
316 while (used < limit_) {
317 if (used_.compare_exchange_weak(used, used + 1, std::memory_order_acq_rel,
318 std::memory_order_relaxed))
323 std::uint64_t used() const noexcept {
return used_.load(std::memory_order_acquire); }
324 std::uint64_t limit() const noexcept {
return limit_; }
327 std::uint64_t limit_;
328 std::atomic<std::uint64_t> used_{0};
342 std::optional<std::chrono::steady_clock::time_point> deadline;
343 std::string trace_id;
461 std::vector<sp::Message> native_messages;
462 std::vector<sp::runtime::Result> provider_outcomes;
478 if (!
output.is_object())
return false;
479 const auto metadata =
output[
"_neograph"];
480 return metadata.is_object() && metadata.value(
"max_steps_exhausted",
false);
485 if (!
output.is_object())
return false;
486 const auto metadata =
output[
"_neograph"];
487 return metadata.is_object() && metadata.value(
"safe_point",
false);
495 if (!
output.is_object())
return false;
496 const auto metadata =
output[
"_neograph"];
497 return metadata.is_object() && metadata.contains(
"barrier_stalled");
504 if (!
output.is_object())
return false;
505 const auto metadata =
output[
"_neograph"];
506 return metadata.is_object() && metadata.contains(
"failure_exit");
516 return RunStatus::Completed;
535 template <
typename T>
541 template <
typename T>
543 return channel<T>(key.name());
547 template <
typename T>
563 if (
output.contains(
"channels") &&
output[
"channels"].contains(name)) {
564 const auto wrapped =
output[
"channels"][name];
565 if (wrapped.contains(
"value"))
return wrapped[
"value"];
568 throw json::out_of_range(
569 "RunResult::channel: no such channel '" + name +
"' in output "
570 "(checked output[\"channels\"][\"" + name +
"\"][\"value\"] and output[\"" + name +
"\"])");
580 if (
output.contains(
"channels") &&
output[
"channels"].contains(name)
581 &&
output[
"channels"][name].contains(
"value")) {
584 return output.contains(name);
656 void set_native_history_archive(std::shared_ptr<sp::NativeArchive> archive) {
657 native_history_archive_ = std::move(archive);
693 static std::unique_ptr<GraphEngine>
link(
730 static std::unique_ptr<GraphEngine>
build(
const json& definition,
742 static std::unique_ptr<GraphEngine>
build_strict(
const json& definition,
746 static std::unique_ptr<GraphEngine>
build_strict(
const json& definition,
766 const json& definition,
768 std::shared_ptr<CheckpointStore> store =
nullptr);
847 std::shared_ptr<GraphSafePointRequest> request,
850 RunResources resources = {});
868 const json& resume_value = json(),
878 const json& resume_value = json(),
885 const json& resume_value,
894 const std::string& thread_id,
895 const json& resume_value = json(),
900 json resume_value = json(),
925 std::string checkpoint_id,
926 json resume_value = {},
928 RunMetadata metadata = {},
929 RunResources resources = {});
934 std::string checkpoint_id,
935 json resume_value = {},
937 RunMetadata metadata = {},
938 RunResources resources = {});
943 std::string checkpoint_id,
944 std::shared_ptr<GraphSafePointRequest> request,
945 json resume_value = {},
947 RunMetadata metadata = {},
948 RunResources resources = {});
960 std::optional<json> get_state(const std::
string& thread_id) const;
968 std::vector<
Checkpoint> get_state_history(const std::
string& thread_id,
969 int limit = 100) const;
975 std::optional<NestedCheckpoint> inspect_nested_checkpoint(
976 const std::
string& root_thread_id,
991 const json& channel_writes,
992 const std::string& as_node =
"");
1001 const std::vector<ChannelWrite>& channel_writes,
1002 const std::string& as_node =
"");
1024 std::string
fork(
const std::string& source_thread_id,
1025 const std::string& new_thread_id,
1026 const std::string& checkpoint_id =
"");
1080 std::shared_ptr<ToolExecutionController> controller) {
1081 tool_execution_controller_ = std::move(controller);
1092 hook_runtime_ = std::move(runtime);
1098 std::shared_ptr<::neograph::RuntimeInterpositionController> controller);
1133 return get_retry_policy(node_name);
1258 struct SubgraphRunResult {
1260 std::vector<ChannelWrite> writes;
1263 struct RuntimeResources {
1264 std::optional<std::shared_ptr<CheckpointStore>> checkpoint_store;
1265 std::optional<std::shared_ptr<Store>> store;
1266 std::optional<ToolGate> parent_tool_gate;
1267 std::shared_ptr<ToolExecutionController> tool_execution_controller;
1268 std::shared_ptr<ProviderCallBroker> provider_call_broker;
1269 std::shared_ptr<ToolEffectBroker> tool_effect_broker;
1271 std::shared_ptr<::neograph::HookRuntime> hook_runtime;
1274 std::shared_ptr<::neograph::HookRuntime> parent_hook_runtime;
1275 std::shared_ptr<detail::SubgraphWriteJournal> subgraph_write_journal;
1276 std::shared_ptr<GraphSafePointRequest> safe_point_request;
1279 GraphEngine() =
default;
1280 std::shared_ptr<sp::NativeArchive> native_history_archive_;
1282 static std::unique_ptr<GraphEngine> link_impl(CompiledGraph graph,
1283 EngineConfig config,
1284 EngineResources resources,
1289 ToolGate tool_gate_;
1293 std::shared_ptr<ToolExecutionController> tool_execution_controller_;
1297 std::shared_ptr<::neograph::HookRuntime> hook_runtime_;
1301 std::shared_ptr<::neograph::RuntimeInterpositionController> runtime_interposition_;
1304 void enter_execution();
1305 void leave_execution() noexcept;
1306 void enter_administration() const;
1307 void leave_administration() const noexcept;
1308 struct ExecutionGuard {
1309 explicit ExecutionGuard(GraphEngine& engine);
1310 ExecutionGuard(
const ExecutionGuard&) =
delete;
1311 ExecutionGuard& operator=(
const ExecutionGuard&) =
delete;
1313 GraphEngine& engine;
1315 struct AdministrationGuard {
1316 explicit AdministrationGuard(
const GraphEngine& engine);
1317 AdministrationGuard(
const AdministrationGuard&) =
delete;
1318 AdministrationGuard& operator=(
const AdministrationGuard&) =
delete;
1319 ~AdministrationGuard();
1320 const GraphEngine& engine;
1323 void init_state(GraphState& state)
const;
1324 void apply_input(GraphState& state,
const json& input)
const;
1326 asio::awaitable<RunResult> resume_execute_async(
1329 GraphStreamCallback cb,
1330 RunMetadata metadata,
1331 RuntimeResources resources,
1332 std::optional<std::string> checkpoint_id);
1334 asio::awaitable<RunResult> run_async_with_runtime(
1336 GraphStreamCallback cb,
1337 RunMetadata metadata,
1338 RuntimeResources resources);
1340 asio::awaitable<RunResult> resume_async_with_runtime(
1343 GraphStreamCallback cb,
1344 RunMetadata metadata,
1345 RuntimeResources resources,
1346 std::optional<std::string> checkpoint_id = std::nullopt);
1348 asio::awaitable<SubgraphRunResult> run_subgraph_async(
1350 const RunContext& parent,
1351 GraphStreamCallback cb,
1352 SubgraphPersistence persistence);
1359 asio::awaitable<RunResult> execute_graph_async(
1360 const RunConfig& config,
1361 const GraphStreamCallback& cb,
1362 std::optional<ResumeContext> resume_context = std::nullopt,
1363 const json* resume_value =
nullptr,
1364 const RunMetadata& metadata = {},
1365 const RuntimeResources* resources =
nullptr);
1367 RetryPolicy get_retry_policy(
const std::string& node_name)
const;
1368 const GraphGenerationIdentity* bound_generation_identity() const noexcept;
1369 std::
string managed_budget_graph_identity() const;
1373 std::
string budget_graph_identity_;
1377 std::vector<ChannelDef> channel_defs_;
1381 std::vector<std::unique_ptr<Tool>> owned_tools_;
1382 std::map<std::
string, std::unique_ptr<GraphNode>> nodes_;
1384 bool has_stateful_subgraph_ = false;
1385 std::vector<Edge> edges_;
1386 std::vector<ConditionalEdge> conditional_edges_;
1392 std::unique_ptr<Scheduler> scheduler_;
1398 std::unique_ptr<NodeExecutor> executor_;
1400 std::set<std::
string> interrupt_before_;
1401 std::set<std::
string> interrupt_after_;
1403 std::shared_ptr<CheckpointStore> checkpoint_store_;
1404 std::shared_ptr<Store> store_;
1407 RetryPolicy default_retry_policy_;
1408 std::map<std::
string, RetryPolicy> node_retry_policies_;
1411 std::map<std::
string, NodeRetryPolicySpec> sealed_retry_policies_;
1414 std::shared_ptr<const detail::FailureRouting> failure_routing_;
1417 std::map<std::
string,
int> node_attempt_timeouts_;
1426 std::unique_ptr<asio::thread_pool> pool_;
1430 bool stderr_notices_ = true;
1435 NodeCache node_cache_;
1436 std::atomic<std::uint64_t> next_cache_execution_id_{1};
1443 mutable std::atomic<int> active_runs_{0};
1447 std::shared_ptr<detail::AttemptQuiescence> attempt_quiescence_;
Borrowed state-administration facade for GraphEngine.
NEOGRAPH_API export/import macro for shared-library builds.
Cooperative cancellation primitive for graph runs.
Typed names for JSON-backed graph state channels.
Checkpoint system for graph execution state persistence and time-travel.
Post-dispatch host failure retaining the exact drained provider outcome.
Bind a channel name to its expected C++ value type.
Abstract interface for checkpoint persistence backends.
State inspection and mutation separated from graph execution calls.
Super-step loop execution engine for graph-based agent workflows.
void set_hook_runtime(std::shared_ptr<::neograph::HookRuntime > runtime)
Set the host-owned lifecycle runtime: checkpoint publication, and the BeforeToolExecution/AfterToolEx...
asio::awaitable< RunResult > resume_async(RunConfig config, json resume_value, GraphStreamCallback cb, RunMetadata metadata)
Async resume peer with caller-supplied execution metadata.
static std::unique_ptr< GraphEngine > build_strict(const json &definition, EngineConfig config, EngineResources resources)
Strict build overload with owned tools and a local registry.
RunResult run_stream(const RunConfig &config, const GraphStreamCallback &cb, const RunMetadata &metadata)
Streaming execution with optional C++ deadline and trace metadata.
void set_node_retry_policy(const std::string &node_name, const RetryPolicy &policy)
Set a retry policy for a specific node (overrides default).
std::string fork(const std::string &source_thread_id, const std::string &new_thread_id, const std::string &checkpoint_id="")
Fork a thread, creating a new thread from an existing checkpoint.
void set_tool_execution_controller(std::shared_ptr< ToolExecutionController > controller)
Set the shared host resource-admission boundary for tools.
RunResult resume_from(RunConfig config, std::string checkpoint_id, json resume_value={}, GraphStreamCallback cb={}, RunMetadata metadata={}, RunResources resources={})
Resume from one exact checkpoint ID.
static std::unique_ptr< GraphEngine > link(ValidatedTopology topology, EngineConfig config, EngineResources resources)
Validated topology link with owned resources and local registry.
RunResult run_stream(const RunConfig &config, const GraphStreamCallback &cb)
Execute the graph with streaming event callbacks.
static std::unique_ptr< GraphEngine > build(const json &definition, EngineConfig config)
Build a ready-to-run engine from one construction-time config.
asio::awaitable< RunResult > resume_from_until_safe_point_async(RunConfig config, std::string checkpoint_id, std::shared_ptr< GraphSafePointRequest > request, json resume_value={}, GraphStreamCallback cb={}, RunMetadata metadata={}, RunResources resources={})
Exact resume peer that may stop at the next requested safe point.
const std::string & get_graph_name() const
Get the graph name (from the JSON definition).
static std::unique_ptr< GraphEngine > build(const json &definition, EngineConfig config, EngineResources resources)
Build with owned tools and a local-first registry.
const NodeCache & node_cache() const
Borrow the engine's NodeCache for stats inspection.
GraphAdmin admin() noexcept
Borrow the state-administration facade for this engine.
static std::unique_ptr< GraphEngine > build_strict(const json &definition, EngineConfig config)
Build using strict topology validation when schema_version is missing or zero.
static std::unique_ptr< GraphEngine > link(CompiledGraph graph, EngineConfig config, EngineResources resources)
Link with owned tools and a per-engine registry overlay.
void clear_node_cache()
Drop all cached entries (per-node enable state preserved).
void set_runtime_interposition(std::shared_ptr<::neograph::RuntimeInterpositionController > controller)
Opt into controlled LLM dispatch for built-in LLMCallNode instances.
~GraphEngine()
A node attempt that ignored its cancellation past its stop deadline (#364) can outlive its run and th...
void set_store(std::shared_ptr< Store > store)
Set the cross-thread shared memory store.
asio::awaitable< RunResult > run_stream_async(RunConfig config, GraphStreamCallback cb, RunMetadata metadata)
Async streaming peer that preserves the supplied C++ run metadata.
void set_checkpoint_store(std::shared_ptr< CheckpointStore > store)
Set the checkpoint persistence store.
void set_worker_count(std::size_t n)
Resize (or install) the engine-owned worker pool for parallel fan-out.
static std::unique_ptr< GraphEngine > link(CompiledGraph graph, EngineConfig config={})
Link an already compiled graph into a configured runtime.
RunResult resume(const std::string &thread_id, const json &resume_value=json(), const GraphStreamCallback &cb=nullptr)
Resume execution from a HITL interrupt.
void set_tool_gate(ToolGate gate)
Intercept every tool call before it runs (issue #89).
RetryPolicy resolved_retry_policy(const std::string &node_name) const
The retry timing node_name runs with after the per-field resolution described at set_node_retry_polic...
RunResult run(const RunConfig &config)
Execute the graph synchronously (blocking).
void update_state(const std::string &thread_id, const json &channel_writes, const std::string &as_node="")
Update the state for a thread by applying channel writes.
RunResult resume(const RunConfig &config, const json &resume_value=json(), const GraphStreamCallback &cb=nullptr)
Resume while preserving caller cancellation settings.
static std::unique_ptr< GraphEngine > link(CompiledGraph graph, EngineConfig config, EngineResources resources, GraphGenerationIdentity generation)
Link an engine permanently bound to one exact host generation.
asio::awaitable< RunResult > resume_from_async(RunConfig config, std::string checkpoint_id, json resume_value={}, GraphStreamCallback cb={}, RunMetadata metadata={}, RunResources resources={})
Async exact-checkpoint resume. Every argument is owned by its coroutine.
static std::unique_ptr< GraphEngine > link(ValidatedTopology topology, EngineConfig config={})
Instantiate and link a topology already proven semantically valid.
asio::awaitable< RunResult > run_async(RunConfig config)
Async peer of run() — returns an awaitable yielding the result.
void set_retry_policy(const RetryPolicy &policy)
Set the default retry policy for all nodes.
static std::unique_ptr< GraphEngine > compile(const json &definition, const NodeContext &default_context, std::shared_ptr< CheckpointStore > store=nullptr)
Compile a graph from a JSON definition.
void set_node_attempt_timeout_ms(const std::string &node_name, std::optional< int > timeout_ms)
Set or clear a host attempt timeout for one node (#364).
void set_node_cache_max_entries(std::size_t max_entries)
Set the global NodeCache entry bound.
void set_node_cache_enabled(const std::string &node_name, bool enabled, CacheKeyPolicy policy)
Enable or disable caching with an explicit identity policy.
asio::awaitable< RunResult > run_stream_async(RunConfig config, GraphStreamCallback cb)
Async peer of run_stream — non-blocking coroutine surface.
asio::awaitable< RunResult > resume_async(const std::string &thread_id, const json &resume_value=json(), const GraphStreamCallback &cb=nullptr)
Async peer of resume — non-blocking coroutine surface.
asio::awaitable< RunResult > run_stream_async(RunConfig config, GraphStreamCallback cb, RunMetadata metadata, RunResources resources)
Async streaming peer with per-operation persistence overrides.
void update_state_writes(const std::string &thread_id, const std::vector< ChannelWrite > &channel_writes, const std::string &as_node="")
Update state with ordered writes that preserve ChannelWrite modes.
void set_worker_count_auto()
Opt into a hardware_concurrency()-sized worker pool.
asio::awaitable< RunResult > run_async(RunConfig config, RunMetadata metadata, RunResources resources)
Async non-streaming run with invocation-scoped persistence and provider policy.
std::optional< int > resolved_attempt_timeout_ms(const std::string &node_name) const
The attempt timeout node_name runs with, in milliseconds, after the resolution described at set_node_...
asio::awaitable< RunResult > resume_async(RunConfig config, json resume_value=json(), GraphStreamCallback cb=nullptr)
Async peer of the RunConfig-preserving resume overload.
asio::awaitable< RunResult > run_until_safe_point_async(RunConfig config, std::shared_ptr< GraphSafePointRequest > request, GraphStreamCallback cb={}, RunMetadata metadata={}, RunResources resources={})
Execute normally until a one-shot host request captures a safe point.
RunResult resume(const RunConfig &config, const json &resume_value, const GraphStreamCallback &cb, const RunMetadata &metadata)
Resume with metadata for this new execution attempt.
asio::awaitable< RunResult > resume_async(RunConfig config, json resume_value, GraphStreamCallback cb, RunMetadata metadata, RunResources resources)
Async resume peer with metadata and invocation-scoped resources.
asio::awaitable< RunResult > run_async(RunConfig config, RunMetadata metadata)
Async peer that preserves the supplied C++ run metadata.
RunResult run(const RunConfig &config, const RunMetadata &metadata)
Execute with optional C++ deadline and trace metadata.
void set_node_cache_enabled(const std::string &node_name, bool enabled)
Enable or disable per-node result caching.
std::shared_ptr< Store > get_store() const
Get the cross-thread shared memory store.
Both execution evidence and the failed durable disposition remain visible.
A run-level ceiling on node retries (#364).
bool try_take() noexcept
Take one retry. False, and nothing taken, when the ceiling is reached.
Node that runs a compiled GraphEngine as a single node (hierarchical composition).
Topology proven free of static semantic errors.
CheckpointCoordinator — owns the super-step checkpoint lifecycle.
RunStatus
Normal, paused, or step-limited outcome of a successful run call.
@ BarrierStalled
Nothing was ready, end was never reached, and a barrier still held partial signals: the join can no l...
NodeExecutor — owns per-super-step node invocation.
JSON → declarative topology parsing and runtime node linking.
Cross-thread shared memory store (LangGraph Store equivalent).
Graph engine type definitions: channels, edges, nodes, events, and control flow.
std::function< void(const GraphEvent &)> GraphStreamCallback
Callback for receiving graph execution events.
std::function< std::string(const NodeFailure &failure)> FailureTextRedactor
Decides the free text a failure record may carry (#364).
StreamMode
Bitfield flags for selecting which events to stream during execution.
Graph node implementations: base class and built-in node types.
Per-node result cache (opt-in).
Host-owned, invocation-scoped boundary for built-in Core provider calls.
Per-run metadata exposed to graph nodes.
Host-owned capture of one durably completed graph super-step.
Pure routing / next-step-planning logic extracted from GraphEngine.
Thread-safe mutable graph state management.
Explicit cache identity policy for one node.
Serialized snapshot of graph execution state at a single super-step.
Parsed graph definition, ready for the engine to run.
Construction-time configuration for a GraphEngine.
std::map< std::string, RetryPolicy > node_retry_policies
Per-node retry overrides applied before the first run.
std::size_t worker_count
Fan-out worker count. One preserves the historical no-pool fast path.
std::map< std::string, CacheKeyPolicy > node_cache_policies
Explicit per-node cache policy.
std::optional< RetryPolicy > retry_policy
Optional override for the topology's default retry policy.
std::shared_ptr<::neograph::HookRuntime > hook_runtime
Optional host-owned lifecycle runtime retained across every run and resume: checkpoint Hooks,...
ValidationOptions validation
Rules build() and link() validate the topology with.
bool stderr_notices
Print engine notices to stderr: validation lint from build() and link(), and the one-time "fan-out is...
FailureTextRedactor failure_text_redactor
#364: the free text a failure record may carry, for nodes whose retry policy opts in with error_text:...
NodeContext node_context
Provider, tools, model, and instructions used while factories create nodes.
std::set< std::string > cached_nodes
Pure, context-independent nodes whose results may be reused across executions.
std::shared_ptr< Store > store
Optional cross-thread long-term memory exposed as RunContext::store.
std::shared_ptr<::neograph::RuntimeInterpositionController > runtime_interposition
Controlled provider dispatch for built-in LLMCallNode instances.
std::shared_ptr< CheckpointStore > checkpoint_store
Optional durable execution-state backend.
ToolGate tool_gate
Engine-wide tool policy, preserved across run() and resume().
std::size_t node_cache_max_entries
Global NodeCache entry bound. Zero preserves unbounded behavior.
std::shared_ptr< ToolExecutionController > tool_execution_controller
Shared host admission boundary for every tool call made by this engine.
Owned construction resources layered beside EngineConfig.
#364: a node whose completion ends the run as failed.
Exact host-supplied identity permanently bound to one linked engine.
Dependency injection context passed to nodes during construction.
Retry policy for node execution with exponential backoff.
Configuration for a graph execution run.
int max_steps
Safety limit for maximum super-steps per run.
StreamMode stream_mode
Which event types to emit during streaming.
std::string thread_id
Thread ID for checkpoint association.
std::shared_ptr< std::atomic_bool > budget_exhausted
Set by a node that crossed model_token_budget so the enclosing runtime can classify it.
bool resume_if_exists
Auto-resume from latest checkpoint for thread_id (v0.3.1+).
json input
Initial channel writes (e.g., {"messages": [...]}).
std::shared_ptr< UsageAccumulator > usage
Token accounting for this run (issue #88).
std::shared_ptr< CancelToken > cancel_token
Optional cooperative cancel handle (v0.3+).
std::optional< std::vector< sp::Message > > provider_messages
Full history input; when set, replaces only the messages channel.
std::uint64_t model_token_budget
Optional hard model-token ceiling enforced by budget-aware nodes.
Optional persistence resources scoped to one run or resume call.
std::shared_ptr< ToolEffectBroker > tool_effect_broker
Host broker for mediated Tool effects in this invocation and subgraphs.
std::shared_ptr< ToolExecutionController > tool_execution_controller
Optional invocation-scoped execution policy, including resume calls.
ToolEffectGrantIdentity tool_effect_grant
Exact grant identity attached to this invocation's mediated Tool calls.
std::optional< ToolGate > tool_gate
Optional invocation-scoped gate composed before the engine gate.
std::shared_ptr< ProviderCallBroker > provider_call_broker
Host broker for built-in provider calls in this invocation and subgraphs.
std::shared_ptr<::neograph::HookRuntime > hook_runtime
Optional lifecycle runtime for the tool Hooks of this invocation and its subgraphs.
Result of a graph execution run.
T channel(const ChannelKey< T > &key) const
Read a channel using a reusable typed key.
bool max_steps_exhausted() const noexcept
True only when execution stopped at RunConfig::max_steps while work remained ready.
std::string interrupt_node
Name of the node that triggered the interrupt.
json channel_raw(const std::string &name) const
Read a channel value as a raw json node (issue #25).
std::optional< T > try_channel(const ChannelKey< T > &key) const
Read a typed channel when present, preserving conversion errors.
bool interrupted
True if execution was interrupted (HITL).
std::vector< PendingInterrupt > interrupts
#388: every NodeInterrupt of the paused step, in ready order and then Send order; the first is the on...
sp::Usage usage
Token usage for the whole run, subgraphs included (issue #88).
RunStatus status() const noexcept
Return a typed outcome without changing the legacy result layout.
std::string interrupt_id
#388: the id of the NodeInterrupt this result reports (interrupt_node, interrupt_value): the first pe...
bool safe_point_reached() const noexcept
True only when a host-owned request stopped the run at a durable boundary.
bool has_channel(const std::string &name) const noexcept
Test whether a channel value exists in either shape.
bool failure_exited() const noexcept
True when a failure-exit node completed (#364).
std::string checkpoint_id
ID of the last checkpoint saved.
json interrupt_value
Value associated with the interrupt.
json output
Final serialized graph state. See struct docstring for shape details.
bool barrier_stalled() const noexcept
True when the run stopped with nothing ready and end never reached while a barrier still held partial...
std::vector< std::string > execution_trace
One entry per node execution that completed, in the order the engine applied the results.
T channel(const std::string &name) const
Read a channel value as type T (issue #25).
One edge in a nested checkpoint lookup.
std::string parent_checkpoint_id
Pin a historical parent checkpoint rather than its latest checkpoint.
Rule selection for GraphValidator.
Static semantic analysis over declarative or compiled topology.