跳到主要内容
Plugin

dsh-context-guard

2JumpSinA/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 包安装 · 安装无需配置

README 解析
shell
dsh plugin --profile web add @2jumpsina/dsh-context-guard
shell
dsh plugin --profile web add git+ssh://git@github.com/2JumpSinA/dsh-context-guard.git
shell
npm i @2jumpsina/dsh-context-guard

安全能力

静态扫描源码得到的权限画像 —— 回答的是「它要动什么」,而不是「它好不好」

  • 写入文件
  • 读取文件
  • 访问网络
  • 读取环境变量

未发现已知红线(明文传输、安装期执行代码、凭据外传等)。

能力与红线来自 awesome-dsh-plugin 的静态扫描结果(CC0 公有领域),本站未逐行复核源码; 它只覆盖能被静态识别的模式,不等于安全审计结论。

为什么是这个分数

近 13 天内有提交;README 给出了可直接复制的安装命令;装完即可用,无需额外配置;近月 npm 下载 2921 次,star 不多但真在被使用。

维护活跃
86
实用度
94
生态热度
69
上手便捷
100
信号质量
100
数据置信度
100%
评分怎么算