DeepSeek Harness Plugin

mdktelmdktel/dsh-agent-status

Stars ★ 0 Category UI Enhancements Added 2026-11-02

Live step pill in the DSH session header: folds the durable session event stream into the agent's current action (tool name plus its argument summary), the step index inside the running turn, the elapsed turn time and the todo progress, polls it every 1.2 seconds, and renders blue pulse while working, green for a finished turn and red for a failed tool call; hides itself 9 seconds after a turn ends. On Windows it also opens an always-on-top desktop HUD (set DSH_AGENT_STATUS_HUD=0 to disable).

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:mdktelmdktel/dsh-agent-status

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

This plugin publishes its README in Chinese only.

给 DeepSeek Harness(dsh)用的一个小插件:在会话标题栏实时显示 agent 现在做到哪一步。

不用点开、不用翻记录,一眼就能看到它当前在干什么、做到第几步、这一轮跑了多久、待办推到第几项。

● 执行命令:pnpm test · 第 12 步 · 1:38 · 待办 3/7
● 修改文件:client.js · 第 8 步 · 0:42
✓ 上一轮完成 · 6 步 · 1:12          ← 空闲 9 秒后自动消失
  • ● 蓝点脉冲 = 正在干活
  • ✓ 绿点 = 刚结束的一轮
  • ✗ 红点 = 最近一次工具调用失败
  • 鼠标悬停 → 当前待办原文 + 最近 4 个动作(工具 / 目标 / 耗时 / 成败)

屏幕右下角常驻窗口(0.2.0)

除了标题栏胶囊,插件还会开一个独立的桌面窗口,钉在屏幕右下角、永远在最上层——DSH 最小化、被别的窗口盖住、切到别的软件,它都还在。

┌─────────────────────────────────┐
│ ● 执行命令:pnpm build          │
│ 第 16 步   ·   16:11            │
│ ████████████████░░░░            │
│ ✓ 修改文件 promo.html   ·  0:42 │
│ ✓ 执行命令 pnpm build   ·  1:08 │
│ ✗ 执行命令 pnpm test    ·  0:19 │
│ DSH Agent · 本轮运行中          │
└─────────────────────────────────┘
  • 真·窗口:Topmost、无边框、圆角、半透明卡片,不在任务栏占位
  • 脉冲点:蓝 = 运行中(呼吸),绿 = 刚结束,红 = 最近一次工具调用失败
  • 第二行:第 N 步 · 本轮耗时 · 待办 x/y,计时在本地每 240ms 自己走,不用等轮询
  • 细进度条 + 最近 3 个动作(工具 / 目标 / 耗时 / ✓✗)
  • 拖动卡片任意位置可移动;右键 = 关掉本次窗口
  • 数据来源与标题栏胶囊相同:轮询本机 /agent-status/api/state,端口自动发现
  • DSH 退出时窗口自动跟着退出;重复启动会自己检测单例

脚本是 desktop-hud.ps1(Windows PowerShell 5.1 + WPF,零依赖)。宿主在插件启动时拉起它; 不想用就设环境变量 DSH_AGENT_STATUS_HUD=0。

显示什么

字段 含义
当前动作 工具名翻译成人话:ops_bash → 执行命令,edit → 修改文件,ops_grep → 搜索代码,todo_write → 更新任务清单……并在后面附上参数摘要(命令描述、文件路径、搜索词、队友名)
第 N 步 这一轮里第几次模型请求(每批工具调用算一步)
本轮耗时 从 turn/start 到现在的实际时间
待办 x/y agent 调过 todo_write 时,取它自己的任务清单进度与当前项

前两个是"现在",后两个是"做到哪里"——这就是它要回答的问题。

安装

github:mdktelmdktel/dsh-agent-status

在 Plugin Manager 里装这个 bundle,或手工等价操作(profile 目录 ~/.dsh/profiles/<name>):

  1. package.json 的 dependencies 加 "dsh-agent-status": "github:mdktelmdktel/dsh-agent-status"
  2. package.json 的 dsh.profile.bundles 加 "dsh-agent-status"
  3. pnpm install,HMR 会当场激活新 bundle

装完刷新一次页面(Ctrl+R)就能看到胶囊。想关掉:插件行上 disabled: true。

npm 上有个同名包(dsh-agent-status,作者 r2s,2026-10-20 发布,做的是类似的事),不是这个插件。请认准 mdktelmdktel/dsh-agent-status。

原理

两个部分,一个数据源:

Host                                   Client
session/event ──折叠──> per-session state      1.2s 轮询
   turn/start          { phase, tool, detail,       │
   tool/call            step, turnMs, todo,        ▼
   tool/result          recent }            conversation.session.header.utilities
   assistant/message         │                 → 胶囊组件
   turn/end                  ▼
                    GET /agent-status/api/state
  • 只吃持久事件:turn/start / tool/call / tool/result / assistant/message / turn/end,所以状态可重建,也不依赖任何 per-agent 订阅。
  • 子 agent 自动覆盖:subagent 也是 session,同一个折叠器直接为其记账。
  • 内存态、无落盘:会话 15 分钟无事件即回收,最多保留 48 个会话。
  • 零配置。要改轮询间隔就改 client.js 里的 POLL_MS。

已知限制

  • 胶囊显示的是宿主内存里的当前状态:页面在某一轮中途打开时,第 N 步 从插件观察到的位置开始计,不会回溯这一轮此前的事件。
  • 宿主侧 index.js 改动不会热更(只有"新装 bundle"能被 HMR 激活),改宿主代码要重启应用;客户端 client.js 改动会经 client-hmr 自动下发。
  • /agent-status/api/state 只监听回环地址、不做鉴权,内容仅为工具名与参数摘要。

文件

index.js           宿主半:事件折叠 + JSON API
client.js          浏览器半:window.__ModuleLoader__ 手写模块 + 胶囊组件
cordis.patch.yml   bundle patch(插入一行 agent-status)
locale/{zh,en}.json  插件管理页的标题与描述
icon.svg           插件图标

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.