helloxkk/dsh-scope 预览 preview

helloxkk/dsh-scope

为DeepSeek Harness(dsh)提供上下文可见性及GitHub风格使用热力图——Codex风格的/context透镜加53周贡献图。

Project Overview项目介绍

dsh-scope is a native plugin built exclusively for DeepSeek Harness (DSH), the open-source AI agent environment from DeepSeek. It adds two UI components to the default DSH web interface that are missing from the stock install: a live context window occupancy lens in the conversation session header, and a 53-week rolling token usage heatmap in the sidebar footer. To install the plugin, you first need to have DSH version 0.1.0-rc.6 or newer installed and available on your system PATH. The standard one-line installation is dsh plugin --profile web add dsh-scope, after which you just restart DSH web to load the new plugin.

This plugin is designed for developers who use DSH regularly for AI agent development and long-form conversation work. It helps you keep track of your current context window usage in real time, breaking down total occupancy into system, tools, and user message buckets, plus showing you the current KV-cache hit rate for your active session. To view detailed breakdown data, you just click the colored occupancy ring trigger in the session header to open the details popover. You can also click the heatmap trigger in the sidebar to see historical daily token usage, per-model rankings, and session counts for any selected day.

dsh-scope is released under the open-source MIT license, and all token usage data processed by the plugin stays on your local machine, with no data sent to any external servers or third parties. The plugin stores its aggregated usage cache in ~/.dsh/storages/dsh-scope-cache.json, and incremental aggregation keeps steady-state processing cost at O(new events), even as your total usage history grows larger over time. Since DSH is still in active developer preview, the plugin notes that compatibility-breaking changes may occur as the core DSH platform iterates quickly. To uninstall fully, you need to remove the plugin directory, delete its entry from the DSH patch file, and optionally delete the cached historical usage data file.

dsh-scope 是专为 DeepSeek Harness (DSH) 开发的原生插件,用于填补 DSH 默认 Web UI 缺少上下文窗口占用实时显示和历史使用统计的空白。它提供两个核心 UI 功能:会话头部的上下文占用透镜,以及侧边栏底部的 GitHub 贡献图风格 53 周滚动令牌使用热力图,所有数据都基于 DSH 官方已计算的投影,无需额外 RPC 通信或自定义协议。

这款插件面向日常使用 DSH 进行大语言模型对话开发的用户,帮助开发者实时掌握当前会话的上下文窗口占用情况,区分系统、工具、用户消息不同模块的令牌占用占比,还能查看当前会话的 KV 缓存命中率。用户可以点击会话头部的占用环触发器打开弹窗查看详细数据,也能点击侧边栏的热力图触发器查看历史每日的令牌使用统计和模型排名。

该插件要求用户已安装版本不低于 0.1.0-rc.6 的 DSH,可通过 dsh plugin --profile web add dsh-scope 命令一键安装,也可从源码克隆编译后手动安装。代码基于 MIT 许可证开源,目前仅适配 DSH 开发者预览版,由于 DSH 仍在快速迭代,可能会遇到不兼容的变更,所有数据仅本地存储不会外传。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-scope

把 helloxkk/dsh-scope 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-scope

dsh.so security License: MIT

English · 简体中文

Context visibility for DeepSeek Harness (dsh) — a Codex-style /context lens for every session, plus a GitHub-style usage heatmap for your whole history.

Two UI contributions, one plugin:

  1. Context Lens (session header) — live context-window occupancy with a segmented system / tools / messages composition bar, per-bucket session totals, and KV-cache hit rate. All data flows through the official token-meter session projections via useProjection — no RPC, no custom wire protocol.
  2. Usage Heatmap (sidebar footer) — a GitHub-contribution-graph-style rolling 53-week token-usage grid. Click any day for the four token buckets, cache hit rate, session count, and per-model ranking. Fed by this plugin's own loopback-only aggregation endpoint.

Screenshots

usage heatmap

Why

DeepSeek Harness treats wording and context as first-class engineering concerns, yet the stock Web UI shows no context occupancy and no usage history. dsh-scope fills both gaps the harness-native way: reading the projections the platform already computes, styling with the platform's design tokens (--dsw-alias-*), and mounting through the platform's slot registry — light/dark themes both correct with zero media queries.

Install

Requires dsh ≥ 0.1.0-rc.6 on your PATH.

dsh plugin --profile web add dsh-scope
dsh web                             # restart dsh to load the plugin
Install from source
git clone https://github.com/helloxkk/dsh-scope.git
cd dsh-scope
npm install && npm run build
node scripts/install.mjs web        # or: node scripts/install.mjs <profile>
dsh web                             # restart dsh to load the plugin

The installer copies lib/, cordis.patch.yml, and package.json into the profile's node_modules and appends the bundle insert to the profile's cordis.patch.yml (idempotent — safe to re-run after every rebuild).

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-wordbox 下一个 Next DshDesktopShell →