Skip to content

Tyan66666/billion-context-dsh

152Last commit Aug 16, 2026

billion-context-dsh DSH plugin

Billion-Context DSH is a plugin that replaces the default compaction backend in DeepSeek Harness. It gives the model a compress tool to write high-fidelity summaries of old messages, reclaiming context space without hard truncation. The plugin is in early beta and should not be used in production.

How to install the billion-context-dsh DSH plugin

dsh plugin --profile web add billion-context-dsh

Copying does not run this command. Review the repository and version before installing the billion-context-dsh DSH plugin.

billion-context-dsh DSH plugin data source

billion-context-dsh DSH plugin snapshot date: Aug 16, 2026

discovered

What the billion-context-dsh DSH plugin can do

  • Provides four model tools: compress, decompress, search_context, and acp_status
  • Supports `/acp` command for manual compression management
  • Auto-nudge when context usage exceeds thresholds, letting the model decide whether to compress
  • Persists compressed blocks in the append-only session log, with original text recoverable
  • Supports layered distillation (tier 2/3) by re-compressing summary nodes

Where the billion-context-dsh DSH plugin fits

  • Extending conversation length in agent sessions without losing earlier context
  • Reducing token usage during long-running coding or research tasks
  • Enabling the model to manage its own context window proactively
  • Recovering compressed content through decompress or search_context when needed

Who the billion-context-dsh DSH plugin is for

  • Developers using DeepSeek Harness for building agent applications
  • Users who need finer-grained control over context compression than the default compaction-basic

billion-context-dsh DSH plugin limitations

  • Both this plugin (v0.2.1) and DeepSeek Harness are in public beta; do not use in production
  • Requires disabling the built-in compaction-basic backend to avoid conflicts
  • Depends on acp-kernel and billion-context-pi upstream projects; may inherit their limitations
  • Nudge thresholds and prompts are configurable but require understanding of the ACP design

billion-context-dsh DSH plugin: from the repository README

Quoted from the Tyan66666/billion-context-dsh README, the upstream source of the billion-context-dsh DSH plugin. Copyright remains with the original authors.

> **⚠️ 测试版声明——请勿用于生产环境** > 本项目(**v0.2.1**)仍处于开发中的测试版。[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 本身也处于**公开测试版**阶段。**请勿将两者用于工程化 / 生产环境**——预期会有破坏性变更与粗糙之处。 <p align="center"> <strong>衷心感谢以下项目——请给它们一个 ⭐:</strong> <br /> <a href="https://github.com/deepseek-ai/deepseek-harness">DeepSeek Harness</a> · <a href="https://github.com/ranxianglei/billion-context-pi">billion-context-pi</a> · <a href="https://github.com/ranxianglei/acp-kernel">acp-kernel</a> · <a href="https://github.com/ranxianglei/opencode-acp">opencode-acp</a> </p> <p align="center"> <strong>Billion-Context</strong> for <a href="https://github.com/deepseek-ai/deepseek-harness">DeepSeek Harness</a> <br /> 由模型决定<em>何时</em>压缩、<em>压缩什么</em>——而不是一个硬性上限。 </p> --- <p align="center"> <a href="https://www.npmjs.com/package/billion-context-dsh"><img src="https://img.shields.io/npm/v/billion-context-dsh.svg?style=flat-square" alt="npm"></a> <a href="https://github.com/Tyan66666/billion-context-dsh/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/billion-context-dsh.svg?style=flat-square" alt="license"></a> <a href="https://github.com/Tyan66666/billion-context-dsh"><img src="https://img.shields.io/bad

Read the full READMERepository license: MIT

billion-context-dsh DSH plugin questions

How do I install billion-context-dsh?

Run `npm install billion-context-dsh` in your project. Alternatively, use `dsh plugin --profile web add billion-context-dsh` for automatic bundle installation. After installation, disable the default compaction-basic backend in your profile to avoid conflicts.

What does the compress tool do?

The compress tool allows the model to replace a range of conversation history with a concise summary written by the model itself. The original text is preserved in the append-only session log and can be recovered later via decompress. This helps reclaim context space without losing information.

Can I customize the compression prompts?

Yes, you can provide custom prompts via the `config.prompts` field in the plugin configuration. You can override nudge text, tool descriptions, and system prompt segments. Template placeholders like `{pct}` are supported. If not configured, the plugin uses the default prompts from acp-kernel.

Does it work with all models?

The plugin is designed to work with any model supported by DeepSeek Harness. It automatically detects the model's context window size via `agent.ctx.llm.resolveModelInfo`. You can also manually set `modelContextLimit` in the config. However, the plugin's effectiveness depends on the model's ability to follow instructions for compression.

How is billion-context-dsh different from the built-in compaction-basic?

The built-in compaction-basic uses automatic truncation with a hard limit. Billion-context-dsh is model-driven: the LLM decides when and what to compress using a compress tool. It also provides decompress, search_context, and acp_status tools, and preserves the original text in the session log, unlike the hard truncation approach.