Repository navigation
afk-compact 0.1.13
afk-compact 0.1.13 adds a prompt cache meter for your status line, with a /afk-compact:settings step that prints its snippet, keeps a status line quiet once the plugin's folder is gone, and stops a false copy-mismatch warning for Claude Code's trailer. The one-line install needs 2.1.292 or newer. Requires Claude Code 2.1.287 or newer; tested against 2.1.325.
Added
- A cache meter for your status line:
cache --stdin --barprints██████░░░░░░ 30m, 12 cells filling as the cache nears expiry (blue, yellow from half its lifetime, red from 90%) and the cache's age. Before the first response, or with an unknown lifetime, it prints nothing. - The meter reads
↻3/7in cyan while keep-warm runs,cold 1h02morcold missin magenta for a cold cache, andcompactedafter a compaction. Its flags are stable but its text may change, so use--jsonif you parse the output. - Meter options:
--leftshows time left instead of age,--shortdrops the cells,--asciidraws#and-, and--color auto|always|neverfollowsNO_COLORandTERM=dumb. A locale that is not UTF-8 turns on--ascii, and aCOLUMNSbelow 60 turns on--short. - Where the plugin's helper cannot run,
--barprints nothing and exits 0 instead ofREFUSED: helper-runtime. A plugin copy older than 0.1.13 does not know--barand shows nothing until you update. /afk-compact:settingshas a "Status line meter" step that reads which status line your user, project and local settings run (only the name of what it runs, never the full command), previews the meter and prints a snippet for your case to paste. It changes no file.- The snippet is a settings entry, a script adding the meter as a second line under your own, or values for a ccstatusline Custom Command widget. It runs the meter only once the plugin's fixed path exists, so before the plugin's first session the line stays empty, not an error.
Fixed
- A status line that calls
~/.local/state/afk-compact/bin/afk-compact-storeno longer printssherrors after an uninstall, a prune or a failed update: with the installed copy gone it now prints nothing and exits 0. - The file at that path is rewritten at the next session start if an earlier version wrote it, and is now also written when the plugin folder's path contains a
'. - After a downgrade to 0.1.12 or earlier, that file keeps running the 0.1.13 copy while it exists, as older versions leave it alone; once that copy is gone the segment stays blank. Delete the file and the older version writes its own at its next session start (without
--bar). - When the installed summary differed from the saved copy only by lines Claude Code added after the end marker, a complete copy got a false
copy-mismatchtoast and anescalations:count in/afk-compact:status. Not any more; a real difference is still shown and counted.