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
B

dsh-block-hanging-commands

Block Hanging Commands

DeepSeek Harness 插件会阻止可能使一轮操作卡住的 shell 命令(编辑器、REPL、分页器、监视模式、开发服务器、tail -f、交互式登录、未使用 -m 的 git commit),并告知模型非交互式替代方案。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:acus9345/dsh-block-hanging-commands#ab82d9936f604fda0603c8f7bde6efb7f5f9b473
README兼容性版本

兼容性与来源证明

Block Hanging Commands 以 dsh-block-hanging-commands 发布,当前版本为 0.2.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.2.3stable
2026/10/17

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题
Block Hanging Commands — DeepSeek Harness 插件(DSH Plugin)

相关插件

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

Web App@deepseek-ai/dsh-web-appdsh 浏览器界面捆绑包:位于 dsh-base 之上的 Web 补丁层,加上运行时粘合插件(提供前端 dist、Web 界面提示符、bash 运行时变量和 URL 行)Sdk App@deepseek-ai/dsh-sdk-appdsh SDK 配置包:基于 dsh-base 提供 stdio JSON-RPC 服务和进程生命周期管理Experimental Inspector@deepseek-ai/dsh-experimental-inspector用于 Host 调试和 Client Runtime 检查的实验性跨 realm CDP hubExperimental Inspector Profile@deepseek-ai/dsh-experimental-inspector-profile用于原始 Session 日志和 Chat 节点检查的可选 Web 捆绑包

README

dsh-block-hanging-commands

English | 中文

If you've used an agent for a while you've probably seen this. It runs git commit without -m, or npm run dev, or python3 with nothing after it, and the turn just sits there. The command is waiting for a keyboard nobody is typing on. Usually the tool times out, the model learns nothing, and then it tries something just as bad.

This plugin for DeepSeek Harness reads each shell command before it runs. If the command would wait for input or never exit, it doesn't run it. The model gets told why and what to run instead, so it can fix the call in the same step.

dsh-block-hanging-commands stopped `git commit` before it ran, because `git commit`
without a message opens an editor, so the tool call would just sit there until it timed out.
Instead: pass the message: `git commit -m "<message>"` (or `--no-edit` when amending).
(rule: git-editor)

Install

dsh plugin --profile web add dsh-block-hanging-commands

That's the web profile, the browser UI you start with dsh web. If you run DSH another way, use headless (scripts and CI) or acp (editor integrations) instead. Each profile keeps its own plugin list, so add it to every profile you use. That's all the setup there is. The plugin ships its own patch layer, so it's on as soon as it's installed.

To remove it: dsh plugin --profile web remove dsh-block-hanging-commands.

From a clone

To try local changes, build a tarball and install that:

git clone https://github.com/acus9345/dsh-block-hanging-commands
cd dsh-block-hanging-commands
npm install
npm pack
dsh plugin --profile web add ./dsh-block-hanging-commands-0.2.0.tgz

What it catches

RuleExamplesWhat the model is told to do instead
editorvim, nano, emacs, code --wait, subl -wuse the edit tools or sed -i
git-editorgit commit or git tag -a without -mpass -m / --no-edit
git-interactivegit rebase -i, git add -pa plain rebase or --autosquash with GIT_SEQUENCE_EDITOR=:; git add <path>
replpython, node, psql mydb, redis-cli, sqlite3 db-c "...", a script file, or a heredoc
servernpm run dev, vite, next dev, flask run, rails srun_in_background: true, or timeout
watchjest --watch, tsc -w, cargo watch, nodemonrun once without the watch flag
followtail -f, journalctl -f, kubectl logs -f, docker logs -ftail -n 200, --since
remote-shellssh host with no commandpass the command; -o BatchMode=yes
container-ttydocker run -it, docker exec -it, kubectl exec -itdrop -it
tuihtop, top, lazygit, tig, ncduthe batch version (top -bn1, git log)
prompt / loginnpm init without -y, crontab -e, gh auth login, aws configurethe non-interactive flags, or ask the user
pager, tty-promptless file, sudo asking for a passwordonly on a PTY shell, see below

It looks through the usual wrappers (sudo, env, nohup, npx, pnpm exec, uv run, bash -c '...') and handles pipes, && chains, heredocs and redirects. So cd app && npm run dev is caught, but echo q | python3 and python3 < script.py are not, because their input is already there. timeout 30 npm run dev gets through, and so does any call made with run_in_background: true. In both cases the command is going to end or detach anyway. A dev server, watcher or tail -f called with the shell tool's own timeoutMs also gets through, since that bounds it the same way. An editor or prompt still doesn't, because a timeout just leaves it waiting in the background.

It works on Windows too, where DSH runs commands through PowerShell (pwsh) instead of bash. There it also knows npm.cmd, full paths like C:\Python312\python.exe, the & call operator and Get-Content -Wait.

I tried hard to keep false positives down. psql -c "select 1", node script.js, vim -es, git commit -F msg.txt, top -bn1, ssh host uptime and --help / --version on anything all pass.

Settings

The easy way: open Plugins in DSH's sidebar, click dsh-block-hanging-commands, change what you want and press Save. It applies to the next tool call, no restart needed.

Or put a row like this in ~/.dsh/profiles/<profile>/cordis.patch.yml, or in ~/.dsh/cordis.patch.yml to cover every profile. Keys you leave out keep their defaults.

- id: block-hanging-commands
  config:
    mode: deny             # or `ask` to get an approval prompt instead of a refusal
    tools: [bash, pwsh]    # shell tool names to inspect (pwsh is the Windows shell)
    pty: false             # set true if your shell tool runs on a PTY (dsh-tool-bash-persistent)
    disabledRules: []      # e.g. [server] if you really want the model starting dev servers
    allowPatterns: []      # regexes, e.g. ['^make serve$']

pty matters because without a terminal, less and git log don't page, and sudo fails instead of prompting. So those rules only switch on when the shell really is a PTY.

How it works

The plugin hooks tools/pre-execute. It tokenises the command itself (no shell is spawned), checks each simple command against the rules, and returns deny with the reason text if one matches. Nothing runs and nothing is rewritten. The model still decides what to do next. It's just deciding with better information.

Development

npm install
npm test           # unit tests for the command parser and rules
npm run test:e2e   # boots real dsh against a scripted local model, no API key needed

The install test runs dsh plugin add, which needs pnpm on your PATH.

The e2e suite also packs the plugin and installs it with dsh plugin add, the same way a user would, to make sure the published package actually loads.

MIT licensed. Written by acus9345. Bug reports and ideas are welcome in the issues.