v0.1.1
Bug-fix release from real long-session testing (the Rectangle project acp session) — the full ACP loop now works end-to-end at scale: compress 583 messages / ~139K tokens, context 129% → 20%, ledger reports real reclaimed tokens.
Fixes
- Ledger recorded 0 reclaimed tokens — compress and /acp compress now estimate tokens from the actually shadowed messages (was hardcoded 0).
- Nudge showed absurd usage (230%) — switched from token-meter
totalTokens(request+response pressure) tosurfaceTokens; displayed percentage capped at 100. - Flat 4-char/token estimation — moved to acp-kernel's CJK-aware
defaultCountTokens(1 char/token for CJK, 4 for ASCII), matching billion-context-pi. - Lone tool results could not be compressed — resolveSurfaceRange now expands outward to the smallest balanced tool-call/result pair when the inward pass collapses.
- Large tool results hidden from the nudge range table — kernel ref map drifts after surface replacements in long sessions; the range table is now computed from the surface directly (skips protected tail + checkpoint nodes), so big consumed outputs always surface.
- Legacy blocks backfilled — ledger entries written as 0 are re-estimated from the shadowed originals still in the log.
Verified live
acp_status: blocks: 16 | tokens compressed: 145305 | estimated context: 26165 / 128000 (20%) after a 583-message compress (seqs 64757..265056, ~139200 tokens reclaimed).
28 tests pass; typecheck and build clean. npm: billion-context-dsh@0.1.1