use crate::graph::command::Interrupt;
use crate::harness::ids::NodeId;
#[derive(Clone, Debug)]
pub struct Checkpoint<State> {
pub thread_id: String,
pub checkpoint_id: String,
pub parent_checkpoint_id: Option<String>,
pub namespace: Vec<String>,
pub state: State,
pub next_nodes: Vec<NodeId>,
pub completed_tasks: Vec<NodeId>,
pub pending_writes: Vec<PendingWrite>,
pub interrupts: Vec<Interrupt>,
pub metadata: serde_json::Value,
}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct PendingWrite {
pub node: NodeId,
pub payload: serde_json::Value,
}
#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
pub struct CheckpointMetadata {
pub thread_id: String,
pub checkpoint_id: String,
pub parent_checkpoint_id: Option<String>,
pub namespace: Vec<String>,
pub next_nodes: Vec<NodeId>,
pub has_interrupts: bool,
pub source: String,
pub step: usize,
}