Where state is written and read

Where state is written and read A data-flow diagram generated by Archify. 01 / Producers 02 / Writers 03 / Stores 04 / Consumers You · /dave · dave config · 01 / Producers You /dave · dave config ConfigManager · transaction + backup · 02 / Writers ConfigManager transaction + backup config.json · global + project · 03 / Stores config.json global + project Runtime · reload live · 04 / Consumers Runtime reload live AgentLoop · turns + tool calls · 01 / Producers AgentLoop turns + tool calls sessions/*.jsonl · append-only · 03 / Stores sessions/*.jsonl append-only Resume picker · via SessionReplay · 04 / Consumers Resume picker via SessionReplay Checkpoints · per-turn snapshots · 03 / Stores Checkpoints per-turn snapshots /rewind · restore files · 04 / Consumers /rewind restore files RecordStore · sole vault writer · 02 / Writers RecordStore sole vault writer Vault records · Tasks · memory · time · 03 / Stores Vault records Tasks · memory · time Today · /brief · queues · Task recap · 04 / Consumers Today · /brief queues · Task recap Drive / folder · other devices · 01 / Producers Drive / folder other devices history/ · images, packed · 03 / Stores history/ images, packed approved edit atomic write load + validate append events validate · recover before writes restore dave_* tools transaction audit read sync Legend config path vault writes (DaveState only) checkpoints, sync data store data flow

Config

  • • ~/.config/hey-dave + .hey-dave/config.json
  • • A failed change rolls back files and live settings
  • • Secrets are env references, never values

Sessions

  • • <data>/sessions, one JSONL per session
  • • A torn last line is set aside as .corrupt
  • • Listings read first lines only (stage 38)

Vault

  • • <data>/vault or $DAVE_VAULT; schema 2 only, shared through Google Drive or a synced folder
  • • RecordStore locks, validates and publishes immutable before/after images (appends to a transcript segment record only the added bytes)
  • • Interrupted transactions recover or roll back; indexes rebuild
  • • Schema-1 or unknown vaults are refused unchanged (no migration)

Node-owned Task time

  • • Schema-2 intervals live with their node. Immutable revisions audit corrections; union slices count overlap once. Device owner leases stay local and export reservations remain portable.

Portable memory and sources

  • • Schema-2 state owns audited subject Markdown, neutral conversations and allowed attachment copies. Private execution caches hold grants separately. Bounded Project refresh versions documentation without replacing authored knowledge.

General and sidequests

  • • General uses ordinary permissions and isolated child memory/time. Reviewed promotion retains IDs and relocates owned data once.
  • • Sidequests offer Save or Save and switch. Busy switches wait/cancel; failed adoption restores old selection and manual pause.
  • • Missing-checkout returns offer attach or memory-only work; tool filtering and the gate both enforce the restriction.

Time compensation

  • • Each entry replacement is reviewed. Applying writes stay reserved across restart; all acknowledgements atomically revise interval and exports. Growth outside reserved ranges remains unexported.

Task sync (stage 74)

  • • CoreSyncEngine stages complete immutable bundles, validates graph and byte hashes, then commits data and exactly-once receipts together.
  • • Disjoint fields/prose merge. Conflicts keep both versions; reviewed local/incoming resolution retains history. Device-local ownership, mappings, caches and credentials stay out.