DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
C

dsh-cookie-guard

Cookie Guard

DSH login cookie leak self-check: A floating panel on the homepage displays the number of dsh-auth-* cookies and request-header usage in real time, automatically saves one snapshot each day, and turns red to remind you to clean up when approaching the 16 KiB limit.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:3150481853/dsh-cookie-guard#4e94cc7f52de3a5bb363d862ce5d0d6ba9de52c3
READMECompatibilityVersions
卡片截图清理菜单

Compatibility and provenance

Cookie Guard is published as dsh-cookie-guard and currently resolves to version 1.0.1. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/29/2026

Versions

1.0.1stable
10/29/2026
1.0.0stable
10/29/2026

Related plugins

Loading related plugins…

Latest
1.0.1
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 2
Weekly downloads
0
Last push
10/29/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in security-access.

Cc Safety Netcc-safety-netA coding agent CLI hook - block destructive commands and secret file accessDoctor@linxin666/dsh-doctorTransactional rescue mode for DSH profiles with a supervised launcher, isolated recovery capsule, deterministic repairs, health monitoring, and a local Web recovery consolePocketdsh-pocketPut DeepSeek Harness in your pocket: one package, one settings page, and scan a QR code on your phone to access DSH on your computer in sync (LAN + public network, real-time screen mirroring).Plugin Subscriptionsdsh-plugin-subscriptionsUse ChatGPT (Codex), Claude, Grok (X Premium), GitHub Copilot, and Google Antigravity subscriptions as DeepSeek Harness LLM providers, with OAuth login from the web Settings page

README

Cookie 守护 · dsh-cookie-guard

卡片截图

DeepSeek Harness 桌面版的一个小浮窗插件:实时显示登录 cookie 攒了多少条、请求头占了 16 KiB 上限的百分之几、还能再启动几次。每天自动留一次快照,接近上限就变黄变红提醒清理。

  • 只读,不碰 cookie 内容,不发网络请求,不清理任何东西。
  • 浮窗可拖动、可折叠成小胶囊,位置会记住。

它解决什么问题

DSH 桌面版每次启动都会打开一个随机端口的本地 Host(--port 0),Host 在根请求上用 303 + Set-Cookie 发一条名为 dsh-auth-<sha256("127.0.0.1:<端口>")> 的登录 cookie。桌面外壳用 Chromium 的持久 cookie jar 收下它,并且从不删除。

于是:

项目数值
每条 cookie 在请求头里占dsh-auth- + 43 字符名 + = + 173 字符值 + ; = 228 字节
Node 默认 maxHeaderSize16384 字节
攒到第几条就爆16384 / 228 ≈ 71.86 → 第 72 次启动

到那时 Host 的根请求在 Node 层就被 431 Request Header Fields Too Large 挡掉,桌面上表现为启动时弹 desktop welcome: Web authentication failed,也就是常说的「DSH 打不开了」。数据不会丢,清掉 cookie 库重新登录即可恢复。

这个插件就是给这条曲线装了个仪表盘:不用等到打不开,随时能看到自己离 72 还有多远。

安装

在 DSH 里(推荐):设置 → 插件 → 安装,填 github:3150481853/dsh-cookie-guard。

命令行:

dsh plugin --profile desktop add github:3150481853/dsh-cookie-guard

装好后 DSH 窗口右下角会出现浮窗。没出现就刷新一下页面(客户端包是懒加载的)。

界面

  • 环形仪表:请求头占用百分比。低于 50% 绿、50%~71 黄、71 及以上红。
  • 三格数字:cookie 条数 / 请求头字节 / 还能启动几次。
  • 立即检测:立刻重新读一次库(平时 60 秒内复用缓存,避免反复扫全机句柄表)。
  • 收起:折叠成胶囊,只留一个百分比。胶囊也能拖,点一下展开。
  • 拖动:按住标题栏拖到任意位置,位置记在 localStorage,重新打开还在原处。

数据每 10 分钟自检一次;每个本地日期只保留一条快照,历史留 90 条,落在:

%USERPROFILE%\.dsh\cookie-guard\state.json

它怎么读到被锁的库

Network/Cookies 是 Chromium 的 SQLite 库,运行期间被 DSH 以独占方式打开——直接 open() 会拿到 ERROR_SHARING_VIOLATION,esentutl、复制、SQLite backup API 全部失败。

插件走的是 Windows 句柄表这条路:

  1. CreateToolhelp32Snapshot 找到 deepseek harness.exe 的进程;
  2. NtQuerySystemInformation(SystemExtendedHandleInformation) 枚举全局句柄表(这台机器上约 137 万个句柄,需要 64 MB 缓冲);
  3. 对目标进程 OpenProcess(PROCESS_DUP_HANDLE) + DuplicateHandle 复制每个候选句柄;
  4. GetFinalPathNameByHandleW 比对路径,认准 \network\cookies(排除 partitions\ 下平台登录用的那份);
  5. 在副本句柄上 SetFilePointer(0) + ReadFile,把库的字节读出来,再正则数 dsh-auth-<43 位> 去重。

一次约 240 ms,所以外面套了 60 秒缓存。

Node 本身没有 FFI,DSH 桌面版自带 koffi(app.asar.unpacked/dsh/node_modules/koffi,3.1.1),插件用 createRequire 直接加载它,不需要额外依赖、不需要编译。DSH 没在运行时则直接读文件,更快。

注意:Cookie 请求头里数不出来。桌面外壳通过 IPC 转发页面请求时只注入当前这一次启动的那一条 cookie,jar 里历史积累的那些从不出现在渲染进程中——所以只能读库。

桌面版自查工具(desktop/)

同一套读库逻辑的独立版本,不依赖 DSH,双击就能用:360×520 无边框圆角窗口、环形仪表。

  • 源码:desktop/dsh_cookie_ui.py(Python 3.10 + tkinter + Pillow),desktop/make_icon.py 生成图标
  • 清理脚本:desktop/dsh-cookie-clean-menu.ps1 —— 带菜单的交互面板,已内嵌进 exe,也可以用管理员 PowerShell 单独跑
  • 现成 exe(8.2 MB,无需 Python):DSH-Cookie-Check-1.0.1.exe

清理要在【管理员】终端里跑。 点「复制清理命令」会复制一条启动命令,同时弹窗提醒:Win + X → 终端(管理员) → 右键粘贴 → 回车。DSH 只要还有一个进程在跑,Chromium 就独占锁着 Network\Cookies,删除必然失败——所以菜单里第 [1] 项会先结束 DSH 进程、备份到桌面、再删、再逐个 Test-Path 复核。

菜单长这样(assets/screenshot-clean-menu.png):

清理菜单

数据与隐私

  • 只用 probe.js 读本地 cookie 库的字节流,不对内容做任何解析或外发;计数用的正则只看名字。
  • 服务端的接口是本地路由 /dsh-cookie-guard/api,委托给宿主的 connection.requestRejection 做同源/loopback 校验,跨站拿不到。
  • 状态文件只有日期、条数、字节数。

兼容性 / 限制

  • 仅 Windows:句柄表这套是 Win32 API。
  • 只读 DSH 桌面版的库(%APPDATA%\@deepseek-ai\dsh-desktop\Network\Cookies)。
  • 读不到就是读不到:借句柄失败时界面显示「读不到 cookie 库:<原因>」,不会猜一个数字糊弄过去。

开发

dsh plugin --profile desktop add github:3150481853/dsh-cookie-guard     # 从仓库装

改完源码后 Host 会热加载服务端;客户端 client.js 的改动也会自动热更新,一般不用重启。

English

A floating health meter for DeepSeek Harness desktop. Every launch spawns the local Host on a random port and mints one more dsh-auth-<hash> cookie; each costs 228 bytes of request header and nothing ever deletes them, so around the 72nd launch the header crosses Node's 16 KiB maxHeaderSize, the Host answers 431, and the app dies with desktop welcome: Web authentication failed.

The plugin reads the Chromium cookie jar while DSH is running — by duplicating an already-open file handle through NtQuerySystemInformation + DuplicateHandle, using the koffi FFI that ships inside DSH — and shows the count, header bytes, and launches remaining, with a daily snapshot and a red warning as you approach the limit.

Read-only, Windows only, no network calls.

MIT.