Expand description
Single source of truth for the ~/.innate directory layout.
~/.innate/
settings.json ← user config (root)
settings.schema.jsonc ← schema for settings.json (root)
data/ ← databases + runtime state
personal.db (+ -shm, -wal)
daemon_state.sqlite
daemon.pid
logs/ ← operational logs
daemon.log
mcp.log
sessions/ ← agent session traces (watched by the daemon)
session.logAll callers must go through these helpers rather than re-deriving paths, so
the layout stays consistent. ensure_layout() creates the subdirectories and
relocates files from the older flat layout on first run.
Functions§
- backup_
state_ path - Local cache of the last backup time.
- daemon_
log_ path - daemon_
pid_ path - daemon_
state_ path - data_
dir ~/.innate/data— databases and runtime state.- default_
db_ path - ensure_
layout - Create the standard subdirectories and migrate any files left over from the
older flat layout (
~/.innate/<file>) into their new homes. Idempotent and best-effort: a single failed move never aborts startup. - ensure_
layout_ at - Layout logic against an explicit base directory (testable without touching
the real
$HOME). Database sidecars (-shm/-wal) ride along with the main db so SQLite stays consistent. - innate_
home - Root
~/.innatedirectory (falls back to./.innateif home is unknown). - llm_
trace_ path ~/.innate/logs/llm_trace.log— JSONL trace of every LLM/embedding HTTP call (request/response previews, latency, retries, errors) for agent debugging.- logs_
dir ~/.innate/logs— operational logs.- mcp_
log_ path - session_
log_ path - sessions_
dir ~/.innate/sessions— agent session traces watched by the daemon.- settings_
path - tmp_dir
- Ephemeral working directory (e.g. backup VACUUM temp copies).