Functions§
- cleanup_
daemon_ files - Cleanup PID file and IPC endpoint on shutdown.
- daemon_
addr - daemon_
pid_ path - daemon_
status - init_
foreground_ daemon - Initialize the foreground-daemon process. Commits the XDG layout pin (and
drains a residual
~/.lean-ctx) before the daemon writes anything, so this long-running, possibly launchd/systemd-autostarted writer can never re-collapse config/data/state/cache onto a stray legacy dir (GL #623). The MCP server pins on its own start; the daemon is the other independent entry point (e.g.serve --_foreground-daemon), so it must heal too.heal()is idempotent and cheap — a no-op once pinned and when no residual dir exists. - is_
daemon_ running - is_
foreground_ daemon - Whether this process is the long-lived foreground daemon.
- mark_
foreground_ daemon - Mark this process as the foreground daemon. Called once at daemon init.
- read_
daemon_ pid - start_
daemon - stop_
daemon