Expand description
FileStore: file storage with write-through cache + background flusher. Port of Goโs pkg/filestore/blockstore.go, blockstore_cache.go, blockstore_dbops.go.
- Separate SQLite DB from Store (matching Go).
- 64KB parts for efficient partial reads/writes.
- Write-through cache with periodic flush (5s default).
- Background flusher via
tokio::spawn+tokio::time::interval.
Re-exportsยง
pub use core::FileStore;pub use core::DEFAULT_FLUSH_SECS;pub use core::MAX_CACHE_BYTES;pub use types::FileMeta;pub use types::FileOpts;pub use types::MuxFile;pub use zone_txn::ZoneTxn;pub use counter::normalized_records;pub use counter::AppendPos;pub use counter::Counted;pub use counter::CountedAppend;pub use counter::LineState;pub use replace::DerivedSnapshot;pub use replace::DerivedView;pub use replace::SnapshotFile;pub use replace::SnapshotReader;
Modulesยง
- cache ๐
- Internal cache structs for FileStore.
- checkpointer ๐
- Background WAL checkpoints for a file-backed [
FileStore] (Phase 5a-3, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7 item 5). - core ๐
- FileStore struct and CRUD operations.
- counter ๐
- Per-file line counter and generation (Phase 5a-2, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7).
- ijson ๐
- FileStore IJson (incremental JSON) operations.
- lines ๐
- The transcript line rule, shared by the
output.idxindexer and the per-file line counter (Phase 5a-2, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7). - offset_
ops ๐ - FileStore offset-based read/write operations.
- replace ๐
- Multi-file replace and delete in one transaction (Phase 5a-2b, SPEC_AGENT_PANE_BOUNDED_LIVE_WINDOW_MIGRATION_2026_09_23.md ยง6.3.7 item 4).
- types ๐
- Wire types matching Goโs wshrpc types for file storage.
- zone_
txn ๐ - Read-modify-write of small files in one zone, as one transaction across processes (SPEC_MEMORY_FOLLOWS_THE_AGENT_2026_09_24.md ยง2.1.1).