Note: JSONL sync is not implemented yet. This document captures the design so future implementation is consistent with cass's storage model.
- Primary: SQLite (agent_search.db)
- JSONL: one-way export snapshot for backup/inspection (not used at runtime)
- Rationale: search/indexing requires SQLite + Tantivy; JSONL is audit/recovery
- On command: planned
cass export-jsonl --out <data_dir>/sessions.jsonl - On exit: none (manual only)
- Timer/throttle: none (manual only)
- DB marker: meta keys
jsonl_last_export_msandjsonl_last_export_hash - JSONL marker: first line
_metarecord with export_ms/record_count/db_hash
- Lock file path: <data_dir>/sync.lock
- Busy timeout: 5s for sync routines; no concurrent syncs
- DB locked: retry with busy timeout; fail with non-zero if still locked
- JSONL parse error: keep prior JSONL and report; re-export required
- Git commit error: warn and continue; JSONL remains on disk