4fe2fecf54
A dedicated /context (alias /ctx) gateway slash command that gives a full context-window view with: - Usage gauge: visual bar + fraction + percentage + headroom - Auto-compression threshold and how far away it is - Compression count and how much the last one freed - Cumulative session throughput (explicitly labelled as throughput, NOT context size — each call re-sends the window) - Cascading fallback: running agent → cached agent → SessionStore metadata → rough transcript estimate Not included (per current-main design): - Cache reporting removed: commit 446b8e239 intentionally removed cache reporting from user-facing surfaces because providers that omit cached-token details produce misleading values - Sync DB calls replaced with async_session_store (current main requires AsyncSessionStore with await) Also rewords the /status tokens line from 'Cumulative API tokens (re-sent each call)' to 'Lifetime tokens billed: ... (not your current context size; use /context)' to reduce the recurring confusion that the cumulative figure is the current context window. Fixes salvation of PR #52184 (salvage commit replaces a 12K-commit-behind fork branch with a fresh implementation against current main, incorporating reviewer feedback from @whoislikemiha and the hermes-sweeper).