DSH Hub
dsh-task-control cover

p2coder/dsh-task-control

dsh-task-control

UIPlay4 GitHub stars· updated 2026-08-16

dsh-task-control is a community DeepSeek Harness plugin. Read the repository README before installing.

Install

npx @deepseek-ai/dsh plugin --profile web add github:p2coder/dsh-task-control

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-task-control DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-task-control.svg)](https://dshhub.dev/plugins/dsh-task-control)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from p2coder/dsh-task-control, cleaned of badges and images.

dsh-task-control

English | 中文

为 DSH Web 增加任务暂停、恢复和取消能力。支持安全暂停与强制暂停,恢复时从暂停点继续,不重复已完成的工作。

安装

dsh plugin --profile web add github:p2coder/dsh-task-control

安装后请完整重启 dsh web,然后刷新浏览器页面。

快速使用

任务运行时,输入框旁会显示三个常驻按钮:

按钮作用可用状态
⏸ 暂停按默认粒度暂停任务运行中
▶ 恢复从暂停点继续已暂停
⏹ 取消立即终止当前回合运行中或已暂停

灰色按钮表示当前不可用,黑色按钮表示可点击。

暂停模式

模式行为适合场景
safe wait(默认)等待推理和工具自然完成后暂停长任务、迁移、测试
safe stop工具完成后暂停;可中断当前推理希望更快暂停
force立即中断推理及在途工具紧急停止

在「设置 → 任务控制」中修改默认模式,保存后立即生效:

命令

命令说明
/pause按设置中的默认模式暂停
/pause force强制暂停
/pause safe wait安全暂停,不中断推理
/pause safe stop安全暂停,可中断推理
/resume恢复任务
/resume confirm rerun重新执行被中断或未派发的工具后恢复
/resume confirm skip跳过该工具后恢复
/cancel取消当前回合

供其他插件调用

通过 ctx.get("taskControl") 获取服务:

API作用
pause(sessionId, options?)暂停任务
resume(sessionId, options?)恢复任务
cancel(sessionId)取消任务
state(sessionId)查询 idlerunningoffline 状态及暂停信息

暂停状态保存在 ~/.dsh/task-control/,重启后不会丢失。测试时可用 DSH_TASK_CONTROL_STATE_DIR 修改存储目录。

注意事项

情况说明
强制暂停工具可能已产生部分副作用;恢复前可选择重新执行、跳过或保持暂停
safe wait 的未派发工具恢复时需要选择重新执行或跳过
暂停期间发送新消息会开启新回合;暂停只控制当前回合
定时提醒dsh-schedule 到期后仍会唤醒
子代理已派发的子代理不会被父任务暂停
状态同步浏览器每 2 秒轮询一次,修改插件后需重启 dsh web

测试

node test/host-smoke.mjs

Related plugins