Create a new checkpoint state for a fresh install.
Target directory where the state file will be written.
Git tag of the version being installed (e.g., "v5.1.0").
ISO 8601 timestamp when the install was started.
Git tag of the version being installed.
Delete the checkpoint state file from disk. Silently succeeds if the file doesn't exist.
Get the current status of a phase.
Phase identifier to query.
The phase's status, defaulting to 'pending' if not yet recorded.
Mark a phase as successfully completed.
Phase identifier to mark as completed.
Mark a phase as failed with an error message.
Phase identifier to mark as failed.
Error message describing the failure.
Mark a phase as skipped (excluded by plan flags).
Phase identifier to mark as skipped.
Return a deep clone of the internal state data for serialization or inspection without exposing the mutable internal reference.
A deep copy of the InstallStateData.
StaticExistsCheck whether a checkpoint state file exists at the given directory.
Directory to check.
true if .mj-install-state.json exists and is accessible.
StaticLoadLoad checkpoint state from disk.
Directory containing the .mj-install-state.json file.
The loaded state, or null if the file doesn't exist or is malformed.
Checkpoint state manager for the MJ installer.
Tracks per-phase completion status and persists it to a JSON file in the install target directory. The engine writes checkpoint state after each phase so that interrupted installs can be resumed from the last completed phase.
Example