Repository navigation
v2.4.0 — the badge finally sees hcat
Statusline counts hcat (the v2.4 headline)
Every hcat run leaves a receipt in the transcript (── hcat: … ~18899 tok → ~9351 tok (50.5% saved)). The badge now parses those receipts and folds them into the token count, the dollar figure, the N× counter, the 60s green flash, and the all-time total. Before this, a session that saved everything via hcat still read "idle (not compressing yet)".
- Receipts are matched at any line start — persisted big outputs bury the header after a preview banner, and those count too (negative-control tested).
- Passthrough receipts (no
→, hcat couldn't shrink the file) count as nothing. - A big receipt is never a "missed" blob — it is the compression.
compute()consolidated from 4 jq passes to 1: ~47ms cold on a 548K transcript.
Dangi hardening
- Ignores
WebFetch/WebSearch(prose) and image tool_responses (base64, not compressible text). - Sizes outputs in bytes, not codepoints — multibyte content no longer undercounts.
- Best-effort
mkdirlock so parallel tool batches don't double-nudge (stale locks stolen after 5s; never blocks).
Gate hardening
- Also catches a bare single-file
cat <path>via Bash (pipes, redirects, and boundedhead/tailpeeks still pass — those are real processing).
95/95 checks green. Manifests bumped to 2.4.0.