Skip to main content

Module paths

Module paths 

Source
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.log

All 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 ~/.innate directory (falls back to ./.innate if 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).