Skip to main content

aither_agent/
checkpoint.rs

1//! Agent checkpoint bundles for restart-safe persistence.
2
3use serde::{Deserialize, Serialize};
4
5use crate::{ContextCheckpoint, ContextWindowSnapshot, TodoItem};
6
7/// Checkpoint payload exported by the agent runtime.
8#[derive(Debug, Clone, Serialize, Deserialize)]
9#[serde(deny_unknown_fields)]
10pub struct AgentCheckpoint {
11    /// Non-persistent runtime context managed by the agent.
12    pub context: ContextCheckpoint,
13    /// Current todo list state.
14    pub todo_items: Vec<TodoItem>,
15    /// Hash of the active tool surface for compatibility checks.
16    pub tool_surface_hash: String,
17    /// Structured snapshot of the current context window.
18    pub context_window: ContextWindowSnapshot,
19    /// Whether background work was still active when the checkpoint was exported.
20    pub has_background_tasks: bool,
21}