Tyan66666/billion-context-dsh 预览 preview

Tyan66666/billion-context-dsh

Plugin插件 Native原生 ⭐ 123 MIT Sessions & Context会话与上下文

面向DeepSeek Harness的模型驱动上下文管理(主动上下文修剪/ACP)——由模型自行决定压缩时机与内容。移植自billion-context-pi(ranxianglei);acp-kernel原样复用。采用CompactionEngine后端,提供压缩/解压/上下文搜索/acp状态工具。

Project Overview项目介绍

This is a native DSH plugin for dynamic session context management, built specifically for DeepSeek Harness. It enables LLM-driven context compression, letting the large language model decide when and which parts of the context to compress, instead of relying on hard truncation that discards old content. The plugin generates high-fidelity summaries to free up context space while retaining the original conversation in an append-only log, and it supports decompression and in-context search. It can be installed in one click via the DSH plugin store or the dsh plugin command line, and works globally out of the box after installation.

It is targeted at DSH users who work on long-running development tasks or extended conversations, which often run into context limit issues with default hard truncation. The typical workflow starts with the plugin nudging the model to compress when the token usage crosses a pre-configured preset threshold. The model then calls the compression tool to generate a summary, and the original content remains stored in the append-only session log. Users can restore the original content any time with the decompress tool, or search directly for keywords within compressed blocks.

This plugin is currently a beta test version (v0.2.23) and is not recommended for production use. It only supports DSH version 0.1.5 and above, so users running older DSH versions need to upgrade their DSH installation first. It is released under the open-source MIT license, which allows free use, modification, and distribution. It supports three installation methods: one-click install via the DSH plugin store, npm install, and install from the official git source, and it works out of the box with no extra build steps required for most users.

这是DeepSeek Harness(DSH)的原生会话上下文管理插件,核心功能是提供模型驱动的动态上下文压缩。它把压缩工具暴露给LLM,由模型自主决定何时压缩、压缩哪些内容,生成高保真摘要回收上下文空间,同时保留原始会话在日志中,支持解压恢复和上下文内搜索。可通过DSH插件商店或dsh plugin命令行一键安装,安装后默认对目标配置文件的所有会话模式生效。

主要面向需要处理超长对话、长周期开发任务的DSH用户,解决常规上下文硬截断悄悄丢失关键信息的问题。典型工作流是:随着对话token用量增长,插件会基于预设阈值提醒模型主动压缩,模型调用压缩工具生成摘要替换原内容,原始内容仍保存在追加式会话日志中。需要恢复原始内容时可随时调用解压工具,也可直接在压缩后的块内搜索目标关键字。

本插件当前是v0.2.23测试版,禁止用于生产环境,仅支持DSH 0.1.5及以上版本,旧版本需要先升级DSH再安装。代码以MIT许可证开源,可免费使用、修改和分发。依赖DSH核心的五个接缝包,安装方式支持插件商店一键安装、npm安装和git源码安装,开箱即用无需额外构建。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 no risk signal found未发现风险信号
  • This site's static screen found no obvious risk signal (stars, license, activity, manifest)本站静态筛查没发现明显风险信号(星标、许可证、更新活跃度、清单完整度)
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

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

把 Tyan66666/billion-context-dsh 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

billion-context-dsh

中文 | English

⚠️ 测试版声明——请勿用于生产环境 本项目(v0.2.26)仍处于开发中的测试版。DeepSeek Harness 本身也处于公开测试版阶段。请勿将两者用于工程化 / 生产环境——预期会有破坏性变更与粗糙之处。

衷心感谢以下项目——请给它们一个 ⭐:
DeepSeek Harness · billion-context-pi · acp-kernel · opencode-acp

Billion-Context for DeepSeek Harness
由模型决定何时压缩、压缩什么——而不是一个硬性上限。


npm license GitHub dsh-plugin

npm install billion-context-dsh


为什么?

当对话变长,模型会耗尽上下文。多数工具直接硬截断——悄悄丢弃早期消息。billion-context-dsh 给模型一个 compress 工具:由 LLM 决定何时、压缩什么,写成高保真摘要,保留关键细节(文件路径、决策、错误信息)的同时回收上下文空间。

与 DSH 内置的自动压缩(用自动生成的摘要替换一段范围)不同,billion-context-dsh:

  • 模型驱动 —— 摘要由模型自己书写,没有第二次 LLM 摘要调用
  • 只建议、不强令 —— 自动策略只 nudge(提醒),是否压缩、何时压缩由模型决定(唯一的例外:provider 确认的上下文超窗会让引擎自己抢救一次——见配置表的 maxOverflowRetries)
  • 持久且可恢复 —— 压缩范围成为 checkpoint 节点,原文保留在 append-only 会话日志中;decompress 可恢复,search_context 可在块内查找
  • 长任务稳得住 —— 每一步都接着前面的成果走,关键结论持续可用、不断叠加,超长任务更容易跑完
  • 上下文始终精简 —— 每次请求都只用少量、精炼的上下文,只保留关键信息;不做大段统一压缩,细节不随之衰失,token 消耗自然更低

这是 billion-context-pi(Pi 编码代理适配器)在 DeepSeek Harness 上的移植:压缩内核(acp-kernel)原样复用,适配层针对 DSH 的 durable-surface 模型重写——经过验证的映射关系见 docs。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev baro 下一个 Next DSH-EasyRewrite →