插件介绍
稳定可用 A context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).上下文压缩插件,兼顾小窗口(100k上下文足矣)省token(省5倍token)和超长会话(数月级别几十亿token单会话)。billion-context is all you need
项目详情摘要
billion-context English | 中文 Context-compression plugin — billion-context is all you need. small context windows (100K is enough) · 5× fewer tokens · month-long single sessions (billions of tokens) · high compression quality npm install -g billion-context --prefix=~/.local **Cache health at a glance:** a healthy session keeps a **95–97%** prefix-cache hit rate — compression itself costs ≤2%. Sustained lower? Check attribution with `/acp` or `/acp-cache` (see FAQ); usual causes, in order: upstream cache TTL expiry · model switch · a bili bug (please report) · other/unknown. Community QQ Group: 1056132097 (full) 1108730198 (open) 📄 Paper / Preprint **Model-Driven Incremental Hierarchical Compression: Training-Free Multi-Generational Context Management for Long-Lived Coding Agents** (English, v0.2) 📝 **The paper itself is open-sourced under the MIT License as part of the codebase (`paper/`). It is a living document — anyone may edit it; improvements are welcome via pull request.** A production-scale longitudinal study: 4.5 months, three hosts, 174,327 model calls, 18.76B cumulative input tokens (~24.7B across all hosts), zero window violations on 204,800-token models, marathon sessions of 8,584–12,049 calls. `billion-context` sits between **any** agent and its model API, rewriting Anthropic/OpenAI streams with acp-kernel compression. The model decides **when** and **what** to compress into high-fidelity summaries — not a hard truncation limit. Why Long coding sessions blow up context. Each provider charges per token, and once you pass the context window the session degrades or dies. `billion-context` compresses consumed c
摘自项目公开 README,可能随上游仓库更新。安装方法
建议先在测试 Profile 中安装,并检查权限、安装脚本和依赖。
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ranxianglei/billion-context
使用前检查
- 确认项目符合 DSH bundle 规范,而不只是相关仓库。
- 阅读许可证和安装脚本,检查网络、文件及执行权限。
- 备份配置,并确保插件能够安全卸载或回滚。
