DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-token-watch

Token Watch

DeepSeek Harness 插件:监控会话令牌使用量,并在达到阈值时弹出鲸鱼风格的桌面提醒。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-token-watch@0.1.1
README兼容性版本

兼容性与来源证明

Token Watch 以 dsh-token-watch 发布,当前版本为 0.1.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/11/4

版本

0.1.1stable
2026/10/22

相关插件

正在加载相关插件…

最新版
0.1.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
276.8 kB
文件数
8
Surface
any
许可证
MIT
发布源
npm
周下载
59
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Experimental Cot Translation Bundle@deepseek-ai/dsh-experimental-cot-translation-bundle扩展推理的实验性机器翻译Our Free Model@ebony-vinyl/dsh-our-free-modelOur Free Model — 在 dsh 里装上这个插件即可,无需登录、注册或填 API Key,就能使用包括 DeepSeek V4.1 Flash、Kimi K3 在内的前沿模型,桌面端另有 EAC 协付渠道;2.0 起接入 LobsterAI、Qoder、TRAE、Cline、Loomy、Raccoon、MiniMax、ZCode、Gemini 十个账号渠道(原有匿名免费通道保留)(登录、账号池、积分领取、本地 OpenAI 网关与局域网转发、数据看板与运行日志),六页毛玻璃界面统一呈现。Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片Connect Workbuddydsh-connect-workbuddy把本机登录的 WorkBuddy 模型(国内版与国际版)接入 DeepSeek Harness:每次刷新按上游目录自动读取每个模型的积分倍率,支持逐模型图片输入开关、多账号切换与账号池自动换号,并提供每日签到、卡片与输入框里的胶囊积分读数等只读积分概览。

README

dsh-token-watch

A DeepSeek Harness plugin that watches every session's token usage and pops a whale-styled desktop alert when a threshold is crossed — a small white speech bubble with a dark-navy outline and the whale mascot, in the corner of your screen.

It rides the host's own session/event stream, so there is no log tailing, no startup script and no second process to keep alive. Every workspace, every new session, is covered automatically.

Windows only for the desktop alert. On other platforms the plugin still logs and keeps running; it just skips the popup.

What it watches

RuleDefaultMeaning
singleCost¥0.30a single message costs more than this
singleTokens300,000a single message carries more than this many tokens
win5mCost¥1.00spend in the last 5 minutes
win1hCost¥3.00spend in the last hour
win10mMsgs12assistant messages in the last 10 minutes (runaway tool loops)
cacheRatio98%cacheRead / total above this, for messages ≥ 500k tokens

The same rule alerts at most once every cooldownMs (default 10 minutes), so a busy loop does not turn into a notification storm.

Cost is an estimate: prices are USD per 1M tokens from the host's providers/data/deepseek.json, converted with usdCny. It is not a bill.

Install

Client (Electron app): 插件 → + 添加插件, paste the package name (or a local directory path while developing), install, then 立即启用.

CLI profiles can use the normal plugin command:

dsh plugin --profile web add dsh-token-watch

The desktop profile is owned by the Electron app and refuses the CLI (profile "desktop" is managed exclusively by the Electron application), so use the UI there.

Fresh releases: npm needs a few minutes to propagate a brand-new package to its CDN. Until then pnpm add fails with ERR_PNPM_FETCH_404 ... .tgz even though the metadata page already renders. The China mirror (registry.npmmirror.com) syncs later still — pick npm 官方源 in the install dialog, wait a few minutes, then retry.

Do not uninstall a link: install while keeping it as your working copy. The client's plugin manager deletes the linked directory when the plugin is removed. Recover it from the published tarball (npm pack dsh-token-watch) or from git.

Configure

Thresholds and behaviour are plugin config, set in your profile's cordis.patch.yml:

- id: dsh-token-watch
  name: dsh-token-watch
  config:
    notify: true
    usdCny: 7.2
    thresholds:
      singleCost: 0.3
      singleTokens: 300000
      win5mCost: 1.0
      win1hCost: 3.0
      win10mMsgs: 12
      cacheRatio: 0.98
      cacheMinTokens: 500000
    cooldownMs: 600000
    # Extra or overridden prices, USD per 1M tokens:
    # prices:
    #   my-model: { input: 0.3, output: 1.2, cacheRead: 0.006 }
OptionDefaultNotes
enabledtrueset to false to load the plugin but do nothing
notifytruefalse keeps logging only
restoreStatetruerestore today's totals from state.json on reload
usdCny7.2exchange rate for the estimate
logDir$DSH_HOME/logs/token-watchone file per day
pricesbuilt-in tableper-model overrides / additions

Unknown models are counted for tokens and message rate but cost nothing, so the estimate never silently invents a price.

Why there is no historical replay

The session logs are multi-frame zstd. The Node bundled with the Electron host (24.21) only decodes the first frame, so replaying them from inside the plugin would silently undercount. The plugin persists a small state.json and restores today's totals from it instead; a fresh install starts counting from zero at load time.

Output

  • Log: ~/.dsh/logs/token-watch/token-watch-YYYY-MM-DD.log, one line per message plus a minute heartbeat. Same format as the standalone token-watch.mjs this plugin replaces.
  • State: ~/.dsh/token-watch/state.json — today's totals, so a host restart does not reset the daily counter.
  • Desktop alert: assets/notify.ps1, a borderless WPF window (white bubble, #2A3A6B outline, circular whale avatar). It falls back to a WinRT toast, then to a tray balloon.

Clicking the bubble opens today's log in Notepad. It closes itself after 10 seconds.

Self-test

npm run selftest

Drives the plugin with a fake context and one synthetic expensive message, so you can see the alert immediately without waiting for a real threshold. It uses a temporary DSH_HOME, so your real log and totals are untouched — the popup is real.

Notes

  • The plugin reads only usage numbers from session events; it never stores message text.
  • It lives inside the host process, so it only runs while DeepSeek Harness is running. If you also want monitoring with the app closed, keep the standalone daemon instead.
  • assets/notify.ps1 must stay UTF-8 with BOM — PowerShell 5.1 reads a BOM-less file as GBK and mangles the Chinese strings.

License

MIT