dsh-context-guard
长会话越跑越贵,平台到点还会把上下文压掉。这个插件做三件事:在会话标题旁显示当前上下文占了多少,鼠标停上去能看到这个数是怎么来的;过 45% 时往工作目录的 HANDOVER.md 写一份交接草稿,记下改过哪些文件、花了多少钱、最近几轮在聊什么;到 60% 提醒你一次该收尾了。平台压缩发生时,它把压缩前的数字记一行,事后还查得到。不调用模型,也不改动对话内容。它不阻止压缩,拿不回已经被压掉的部分。
- 形态
- Plugin 插件
- 安装
- npm 包安装
- 需要密钥
- 否
- 近月下载
- 2,921
- 最近推送
- 13 天前更新
项目说明
From README
dsh-context-guard npm package: @2jumpsina/dsh-context-guard · 中文 A DeepSeek Harness plugin that tells you to wrap up and start a new session before the session gets too long .
It consumes the contextPressure projection that the official dsh-token-meter has already computed, and after a turn has ended it speaks up on two thresholds: "write the handoff into a document first, then start a new session.
" It then helps turn that sentence into an action — once the threshold is crossed it drafts a handoff block into the session working directory.Context tax = 0 : it registers no model-facing tool, injects no prompt section, and sends no extra request.
The host does the arithmetic, the UI does the talking.🆕 Current release is live on npm latest (0.7.x) : 45% silently drafts the handoff, 60% is the only reminder; the compaction point shows up in the badge tooltip and in the banner body (compute
Original description
A DeepSeek Harness plugin that tells you to wrap up and start a new session before the session gets too long: badge + one-shot banner from the official contextPressure projection, and from 45% occupancy it auto-drafts a machine-facts handoff block into your working directory. Zero context tax, bilingual zh/en.
安装方式
npm 包安装 · 安装无需配置
dsh plugin --profile web add @2jumpsina/dsh-context-guarddsh plugin --profile web add git+ssh://git@github.com/2JumpSinA/dsh-context-guard.gitnpm i @2jumpsina/dsh-context-guard安全能力
静态扫描源码得到的权限画像 —— 回答的是「它要动什么」,而不是「它好不好」
- 写入文件
- 读取文件
- 访问网络
- 读取环境变量
未发现已知红线(明文传输、安装期执行代码、凭据外传等)。
能力与红线来自 awesome-dsh-plugin 的静态扫描结果(CC0 公有领域),本站未逐行复核源码; 它只覆盖能被静态识别的模式,不等于安全审计结论。
为什么是这个分数
近 13 天内有提交;README 给出了可直接复制的安装命令;装完即可用,无需额外配置;近月 npm 下载 2921 次,star 不多但真在被使用。
- 维护活跃
- 86
- 实用度
- 94
- 生态热度
- 69
- 上手便捷
- 100
- 信号质量
- 100
- 数据置信度
- 100%
相关插件
dsh-compact-relay
cfanzx/dsh-compact-relay
DeepSeek Harness 输入框上下文指示器:分段显示会话占用、压缩判断点与 DSH 原生自动压缩线(越线红闪)。支持预览后确认压缩(/bc)、无痕交接(旧会话归档为「历史 N」、新会话继承原名,输入框上方接力条可回看完整交接链并双向跳转)、锁定消息防压缩与失效标注。设置里可配阈值、配色与交接后自动归档开关。
tool-guardian
LuminariSoftwares/tool-guardian
用三个路由工具(list_capabilities、describe_tool、call_tool)代理 stdio MCP 服务器,schema 按需加载,不再随每次请求发送;所有工具结果经过确定性输出阶梯压缩,有损处理前先归档原文(retrieve_spill 可读回);按 token 为工具分组标价,并可按 agent 隐藏内置分组。桥接到纯标准库的 Python 路由器,需要 Python 3.9+。
dsh-agent-frugality
gongyijie85/dsh-agent-frugality
多智能体防内耗防御插件:读取台账去重度量、免疫压缩规则区、完成机械门禁、低成本审查 lane。