keep.state¶
State store management for Keep.
Maintains .keep/state.json — a tool-owned record of each document’s last meaningful modification timestamp and frontmatter hashes. This is the single source of truth for staleness tracking.
The state store is never edited by humans or the LLM. It is rebuilt incrementally on each keep state run: unchanged documents are skipped, cosmetic edits update only the content hash, and meaningful edits reset the staleness clock.
Typical usage:
from keep.state import load, update, write
settings = Settings.load(workspace)
state = load(settings)
state = update(state, settings)
write(state, settings)