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
T

dsh-token-attention

Token Attention

Token Check(词元管理)— token 注意力管理面板(DSH 插件)

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

npx -y @deepseek-ai/dsh plugin --profile web add github:Young4ever33/dsh-token-attention#f0f3e90b32f04655e0f5388baa603ec62b8cfe40
README兼容性版本
OverviewSession cardTasksCostSettings

兼容性与来源证明

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

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/8/28

版本

0.2.1stable
2026/8/28
0.2.0stable
2026/8/22

相关插件

正在加载相关插件…

最新版
0.2.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 2
周下载
0
最近提交
2026/8/28
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Experimental Session Titles Bundle@deepseek-ai/dsh-experimental-session-titles-bundle新的用户提示到达时刷新会话标题。Personalized Recommendations@deepseek-ai/dsh-personalized-recommendations回答下方以卡片形式提供个性化页面和内置插件推荐Experimental Agent Team Web Profile@deepseek-ai/dsh-experimental-agent-team-web-profile用于 Agent Teams Remote 和 UI 插件的实验性 Web 配置层

README

dsh-token-attention — Token Check for DeepSeek Harness

English | 中文说明

Token Check is a token-attention management panel for DeepSeek Harness (DSH). It records every conversation's token usage and estimated cost by task / day / week / month, recognizes task types, and — combined with DeepSeek's peak/off-peak pricing and DSH's context mechanics — tells you when to run a task, whether to switch sessions, and whether to write a hand-off file.

It is not a money-saving tool: it never throttles or cancels requests. It presents facts and advice; you decide.

Features

  • Five views in DSH Settings — Overview / Sessions / Tasks / Cost / Settings
  • Per-task ledger — token consumption (input hit / miss / output / reasoning) and estimated cost, rolled up by day / week / month
  • Task-type recognition & advice engine — best execution window, switch-session, hand-off, context, cost and model suggestions
  • Attention KPI — attention score, hit rate, context occupancy, compaction count per session
  • Peak/off-peak pricing — DeepSeek off-peak half-price windows (peak 9:00–12:00 / 14:00–18:00), estimated cost breakdown by bucket
  • Multi-model breakdown — cost and hit rate per model (e.g. deepseek-v4-flash / pro / grok)
  • Ledger export — Markdown / CSV download, one-click hand-off template
  • Editable settings — pricing table, peak hours, advice thresholds; new records are priced immediately
  • Zero runtime dependencies — local SQLite via node:sqlite; no network calls

Screenshots

Overview — today's usage, cost, hit rate, attention score, model mix, advice card, and trend

Overview

Session card — per-session model breakdown and attention metrics

Session card

Tasks — task ledger with Markdown / CSV export

Tasks

Cost — peak split, cost leverage breakdown, and model comparison

Cost

Settings — pricing table, peak hours, and advice thresholds

Settings

Install

Once published to npm:

dsh plugin --profile web add dsh-token-attention

Restart DSH, then open Settings → 词元管理 (Token Check). Data is stored at DSH_HOME/token-attention/token_records.db.

Development install (link)

npm install && npm run build

Then register the plugin in the web profile (%APPDATA%\dsh-desktop\harness\profiles\web\package.json):

{
  "dependencies": { "dsh-token-attention": "link:/path/to/dsh-token-attention" },
  "dsh": { "profile": { "bundles": ["...", "dsh-token-attention"] } }
}

Run pnpm install inside profiles\web, restart DSH, and verify:

curl http://127.0.0.1:<port>/token-attention/api/health   # → {"ok":true,...}

How it works

  • Collection: the node half subscribes to DSH's session/event stream (usage, goal, subagent, compaction, turn) and writes normalized records to SQLite; a startup backfill replays existing sessions with an idempotent last_seq cursor.
  • Aggregation: hourly incremental rollups into daily_agg, with a daily full rebuild for correction.
  • Official projection adapter (optional): when the base layer mounts session-projection + token-meter + session-stats, the session card reads context occupancy from contextPressure.projectedTokens (compaction-reactive, official capacity) and turn/step/LLM/tool/decode stats from sessionStats (same source as DSH's built-in stats bar); it falls back to its own computation when those units are absent — no extra dependencies.
  • Advice: src/shared/advice.ts evaluates context occupancy, turns, hit rate, cost and model mix against your thresholds and suggests concrete actions.

Configuration

Settings are editable in the panel and saved to SQLite:

SettingDefault
Model pricing (¥ / million tokens, off-peak)flash: hit 0.05 / miss 1.5 / output 4.5
Peak hours (24h, start-inclusive)9–12, 14–18
Context-occupancy advice threshold70%
Turn-count advice threshold40
Hit-rate advice threshold40%

Development

npm run typecheck   # tsc --noEmit
npm run check       # node --check src/client/index.js
npm run build       # tsc → dist/
npm run selftest    # collection-layer self-test (idempotency / peak pricing / aggregation assertions)
npm pack            # build the publish tarball

Uninstall

Uninstall in DSH Settings → Plugins, or remove the dependency and the bundles entry from the profile's package.json. The data directory DSH_HOME\token-attention\ can be deleted manually; dispose cleans up timers and the SQLite connection.

License

MIT © 2026 Young4ever33