p2coder/dsh-task-control
在输入区暂停/恢复/取消正在运行的对话任务:强制暂停立即中断并记住被中断的工具,安全暂停等工具/推理完成后再落地,恢复时需确认;默认暂停粒度可在设置中配置(出厂 safe wait)。
Project Overview项目介绍
This is a native plugin built exclusively for DSH Web. It adds core task control capabilities: pausing, resuming, and canceling in-progress tasks. It supports multiple pause modes including safe wait, safe stop, and force pause, and resumes execution from the exact pause point to avoid redoing completed work. The current release is built and tested for DSH v0.1.1-rc.2, the latest stable DSH Web version at time of release. To install the plugin, run the command dsh plugin --profile web add github:p2coder/dsh-task-control via the DSH CLI, then fully restart the DSH Web server and refresh your browser page after installation completes.
After installation, three permanent control buttons will appear next to the input bar when a task is running. The buttons are for pause, resume, and cancel respectively, and change color to indicate whether they are available for click. You can trigger controls via buttons or use slash commands for specific pause modes, including /pause force for immediate interrupt and /resume to continue. You can also adjust your default pause mode in the DSH settings panel under "Task Control", and changes take effect immediately after saving. This plugin also exposes an API for other DSH plugins to consume, letting third-party plugins check task state and control task flow.
All task pause state is stored by default in the ~/.dsh/task-control/ directory, so state persists across DSH restarts and will not be lost when you close the app. You can change the storage directory by setting the DSH_TASK_CONTROL_STATE_DIR environment variable if needed. The plugin is released under the open source MIT license, so it is free to use, modify, and distribute. There are several important caveats to note: force pause can leave partial side effects from in-progress tools, pause only applies to the current task round, and dispatched sub-agents will not be paused by a parent task pause. The UI polls for state updates every 2 seconds, and you need to restart DSH Web after modifying the plugin code.
dsh-task-control 是专为 DSH Web 开发的原生插件,为 DSH 任务增加了暂停、恢复和取消能力,支持安全暂停与强制暂停等多种暂停模式,恢复任务时可从断点处继续执行,不会重复已完成的工作。该插件当前适配最新的 DSH v0.1.1-rc.2 版本,可通过 DSH CLI 执行 dsh plugin --profile web add github:p2coder/dsh-task-control 安装,安装后需完整重启 dsh web 并刷新浏览器页面生效。
安装完成后,任务运行时输入框旁会显示三个常驻控制按钮,分别对应暂停、恢复、取消功能,灰色按钮表示当前不可用,黑色按钮可点击触发操作。除可视化按钮操作外,用户也可以通过斜杠命令调用不同模式的暂停、恢复、取消操作,还能在设置面板中修改默认暂停模式,保存后立即生效。该插件还开放了API供其他DSH插件调用,支持第三方插件获取任务状态、控制任务流转。
任务暂停状态默认保存在 ~/.dsh/task-control/ 目录,重启 DSH 后状态也不会丢失,用户可通过环境变量 DSH_TASK_CONTROL_STATE_DIR 修改存储目录。该插件采用 MIT 许可证开源免费使用,使用中需要注意不同暂停模式的限制:比如强制暂停可能导致工具产生部分副作用,暂停仅控制当前回合,发送新消息会开启新回合。子代理不会被父任务暂停,状态同步每2秒轮询一次,修改插件后需重启dsh web。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-task-control(p2coder/dsh-task-control)
仓库:https://github.com/p2coder/dsh-task-control
本站详情页:https://www.yhbd.top/plugins/p2coder-dsh-task-control/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 6 · 最近提交 2026-08-30 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
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 github:p2coder/dsh-task-control
把 p2coder/dsh-task-control 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-task-control
English | 中文
为 DSH Web 增加任务暂停、恢复和取消能力。支持安全暂停与强制暂停,恢复时从暂停点继续,不重复已完成的工作。
当前适配 DSH v0.1.1-rc.2(最新版本)。
安装
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) |
查询 idle、running 或 offline 状态及暂停信息 |
暂停状态保存在 ~/.dsh/task-control/,重启后不会丢失。测试时可用 DSH_TASK_CONTROL_STATE_DIR 修改存储目录。
注意事项
| 情况 | 说明 |
|---|---|
| 强制暂停 | 工具可能已产生部分副作用;恢复前可选择重新执行、跳过或保持暂停 |
safe wait 的未派发工具 |
恢复时需要选择重新执行或跳过 |
| 暂停期间发送新消息 | 会开启新回合;暂停只控制当前回合 |
| 定时提醒 | dsh-schedule 到期后仍会唤醒 |
| 子代理 | 已派发的子代理不会被父任务暂停 |
| 状态同步 | 浏览器每 2 秒轮询一次,修改插件后需重启 dsh web |
测试
node test/host-smoke.mjs
wenbin-wb/dsh-bridge
jigjoy-ai/baro
PerryLink/dsh-permission-rules
MichengAI/dsh-archive-manager
eri64/dsh-claude-ux
PlutoKeating/dsh-lark-bot