Debounced flush: persists at most once per FLUSH_INTERVAL_SECS.
Call from post_dispatch on every tool call to bound data loss
on abrupt MCP termination to at most 2 seconds of events.
The dashboard body without the trailing footer (tips / Context OS / hints).
Used to compose gain --deep, where the extra themed sections must appear
before the footer instead of in the middle of the output.
Loads stats for display, summing across every auto-resolved data dir that
holds a stats.json (#500). When the MCP server process and the CLI resolve
different XDG dirs — the documented #408/#414 split, common when an agent host
(e.g. a containerised Hermes) launches the MCP server with a different HOME
or XDG_* than the user’s shell — the bulk of the savings can land in a
sibling tree. Reading only the primary dir then makes gain report 0 while
the real data sits one directory over. Folding the siblings in keeps the
headline honest regardless of which process wrote where.