checkpoint: extract the persistent contract to api/checkpoint

main

Commit

Soph3mo ago

Move the persistent-checkpoint contract — the persisted document types (Metadata, CheckpointSummary, Summary, Attribution, ...), the option types (WriteOptions/UpdateOptions/PrecomputedTranscriptBlobs), the reader/writer interfaces, the Write request union, the sentinel errors, and the CheckpointVersionBranchV1 const — into a new github.com/entireio/cli/api/checkpoint package, born with the persistent vocabulary.

The contract depends only on leaf packages (agent/types, checkpoint/id, redact, go-git plumbing), so a storage backend can implement it without the CLI's agent/TUI/git machinery. The git implementation (GitStore, Open, the Stores facade, AuthorReader, and the ephemeral shadow-branch surface) stays in cmd/entire/cli/checkpoint, which imports the contract and re-exports every moved symbol via aliases (aliases.go) — all existing call sites compile unchanged.

Notes:

  • PrecomputedTranscriptBlobs.isUsable is now exported (IsUsable); its one caller is across the new package boundary.
  • The Write union is sealed to api/checkpoint, so the impl-package unknown-request test was removed (no longer expressible); per-request dispatch coverage remains.
  • normalizeCheckpointSummary stays in the impl (read-time normalization).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: a808b47c0633

Checkpoints

Review Checkpoint Commit f16b7101

CodexGPT-5.5
View session
Checkpoint 1

Review GitStore Temporary Store Split

CodexGPT-5.5
View session
Checkpoint 1

Review InitialAttribution Rename Commit

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Committed Types Rename

CodexGPT-5.5
View session
Checkpoint 1

Review Persistent Reads Collapse Commit

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Write API Changes

CodexGPT-5.5
View session
Checkpoint 1

Review Ephemeral Vocabulary Renaming Changes

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Ephemeral Reads/Lists Collapse

CodexGPT-5.5
View session
Checkpoint 1

Review Ephemeral Writes Unification Commit

CodexGPT-5.5
View session
Checkpoint 1

Code Review for Stores Architecture Reshape

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Store Rename Refactoring

CodexGPT-5.5
View session
Checkpoint 1

Review Checkpoint Vocabulary Commit

CodexGPT-5.5
View session
Checkpoint 1