Package ai.mindconnect.cli
Class CliStateStore
java.lang.Object
ai.mindconnect.cli.CliStateStore
Reads and writes
CliState to ~/.mindconnect-cli/state.json.
Failure-tolerant: a missing file, malformed JSON, or any IO error returns
CliState.empty() and logs a warning. Writes are best-effort — if the
file cannot be written the CLI continues to work, the user just won't be
resumed on the next start.
Writes are atomic: data goes to state.json.tmp first and is then
moved over state.json with StandardCopyOption.ATOMIC_MOVE
so a crash mid-write can never leave a half-written state file.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CliStateStore
public CliStateStore(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
load
-
save
-