# kcode-k1-chat-persistence-store 0.4.0
Caller-rooted, per-session newline-JSON filesystem projection for K1 chat persistence. The concrete `kcode-k1-chat-persistence-records` 0.3.0 leaf owns codec-v2 records, current `cN` tool-envelope validation, recovery validation, and exact-predecessor reconciliation; Store publicly reexports its promised record surface, including `ChatBox`.
Store preserves its filesystem API and behavior. It owns only its `sessions` directory and provides strict loading, atomic append with file synchronization, exact-predecessor truncation, and discard behavior. JSONL uses Records codec version 2: generic boxes carry open `type`, `contents`, `hidden_type`, and `hidden_contents` strings, so unknown types and hidden fields round-trip unchanged. There is no version-1 reader, migration, reset effect, legacy tool-envelope compatibility, or compatibility mode.