|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
Serialized snapshot of graph execution state at a single super-step. More...
#include <checkpoint.h>
Static Public Member Functions | |
| static std::string | generate_id () |
| Generate a new UUID v4 string. | |
Public Attributes | |
| std::map< std::string, std::set< std::string > > | barrier_state |
| Per-barrier accumulator: each entry maps a declared barrier node to the set of upstreams that have signaled it so far. | |
| json | channel_values |
| Serialized channel data. | |
| json | channel_versions |
| Per-channel version counters. | |
| std::string | current_node |
| Node that was active at checkpoint time. | |
| std::string | id |
| Unique checkpoint ID (UUID v4). | |
| CheckpointPhase | interrupt_phase = CheckpointPhase::Completed |
| Phase at which this cp was produced. | |
| json | metadata |
| User-defined metadata. | |
| std::vector< std::string > | next_nodes |
| Nodes to execute on resume. | |
| std::string | parent_id |
| Previous checkpoint ID (for time-travel chain). | |
| std::uint32_t | schema_version = CHECKPOINT_SCHEMA_VERSION |
| Layout version of this record. | |
| int64_t | step |
| Super-step number. | |
| std::string | thread_id |
| Conversation/session identifier. | |
| int64_t | timestamp |
| Unix epoch milliseconds. | |
Serialized snapshot of graph execution state at a single super-step.
Each checkpoint captures the complete state of a graph execution, including all channel values, the active node, and the next node to execute. Checkpoints form a linked list via parent_id for time-travel navigation.
Definition at line 83 of file checkpoint.h.
|
static |
Generate a new UUID v4 string.
| std::map<std::string, std::set<std::string> > neograph::graph::Checkpoint::barrier_state |
Per-barrier accumulator: each entry maps a declared barrier node to the set of upstreams that have signaled it so far.
Persists across super-steps for barriers that haven't yet reached their wait_for set. The Scheduler clears an entry when its barrier fires, so this map only ever contains in-flight (partial) state.
Shape matches BarrierState from scheduler.h; kept as raw map here to avoid pulling the scheduler header into every checkpoint consumer.
Definition at line 105 of file checkpoint.h.
| std::vector<std::string> neograph::graph::Checkpoint::next_nodes |
Nodes to execute on resume.
With signal dispatch, a super-step can end with multiple nodes ready simultaneously (parallel fan-out, multiple conditional branches activating together); storing only one would silently drop siblings.
Definition at line 94 of file checkpoint.h.
| std::uint32_t neograph::graph::Checkpoint::schema_version = CHECKPOINT_SCHEMA_VERSION |
Layout version of this record.
Persistent CheckpointStore impls should write it and inspect it on load: a value of 0 on a deserialized blob means "pre-versioned format" and may require migration (e.g. promoting a single next_node field into a one- element next_nodes vector). In-memory checkpoints created through the engine always carry CHECKPOINT_SCHEMA_VERSION.
Definition at line 115 of file checkpoint.h.