pe-graph 0.1.0

Graph execution engine for Potential Expectations — state graphs, Pregel model, ReAct topology, and builder DSL
Documentation
//! Node activation — tracks which nodes run and why.
//!
//! Used by the BSP engine to determine which nodes are active in each
//! superstep and to record the causal chain of execution.

use pe_core::node::ActivationReason;

/// A node scheduled to run in a superstep, with its activation reason.
///
/// The engine tracks activations (not just node names) so that:
/// - Debugging shows WHY a node ran ("activated by edge from chat")
/// - Streaming can emit activation events
/// - The optional matrix layer gets training data on routing paths
#[derive(Debug, Clone)]
pub struct Activation {
    /// Which node is activated.
    pub node_name: String,
    /// Why it was activated.
    pub reason: ActivationReason,
}