This layout is frozen as of Phase 4 so the future native iOS client (Phase 5) can read/write the same files without chasing a moving target.
<dataDir>/
memory/
log/<YYYY-MM-DD>.jsonl # append-only daily event log
facts/personal/<YYYY-MM-DD>.json
facts/work/<YYYY-MM-DD>.json
facts/<ns>/<YYYY-MM-DD>.lock # transient single-distiller lock
knowledge/ # hand-imported + pinned markdown
sessions/ # meeting JSONL (existing)
<dataDir> is configurable (Settings → Memory → Data location):
- Local (default): the OS userData dir
(
~/Library/Application Support/Unseenon macOS). - iCloud:
~/Library/Mobile Documents/com~apple~CloudDocs/Unseen/. A second Mac that signs into the same iCloud sees the same data after sync.
settings.json— read at startup to learndataDir, so it can't itself live underdataDir(chicken-and-egg). Each device keeps its own settings.secrets.json— API keys, keychain-encrypted. Never leaves the device.
This is a deliberate, documented deviation from the roadmap's §7.3 sketch (which placed
settings.jsonin the synced dir): the bootstrap ordering and the secrets-stay-local rule make local settings the correct call.
- Append-only JSONL → two devices appending the same day rarely truly
conflict. The merge is
sort by t+dedupe by (t, kind, text)(mergeLogEvents), applied on every read. - Facts are produced by an idempotent merge (
mergeFacts, stable key), so re-distilling a day — or distilling on either device — never duplicates. - Single-distiller lock:
facts/<ns>/<day>.lockcarries a device id + timestamp. A peer skips a day another device is actively distilling; a stale lock (>1h, e.g. a crashed run) is reclaimed automatically. - Consistency is eventual, not real-time — iCloud Drive does the syncing.
{ "t": 1750000000000, "kind": "dictation|meeting|note", "ns": "personal|work", "app": "Slack", "text": "...", "sessionId": "..." }