DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Port Guard — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
P

dsh-port-guard

Port Guard

Triage port conflicts: reuse your own live server, switch ports for others, precisely kill zombies

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-port-guard@0.1.0
READMECompatibilityVersions

Compatibility and provenance

Port Guard is published as dsh-port-guard and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
npm
Registry updated
8/21/2026

Versions

0.1.0stable
8/21/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
4.3 kB
Files
5
Surface
any
License
MIT
Source
npm
GitHub
★ 0
Weekly downloads
0
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseSubagent Codex@deepseek-ai/dsh-subagent-codexOne-shot Codex subagent provider over the official app-server protocol

README

dsh-port-guard

DeepSeek Harness 插件 · 端口占用处置 / DSH plugin for triaging port conflicts

dev server 启动报 EADDRINUSE: address already in use——最常见的前置障碍。但不是所有 EADDRINUSE 都该 kill。

The classic blocker before any dev server starts. But not every EADDRINUSE should be killed.

核心洞察:EADDRINUSE 有三条路,不是只有"杀"

情况占端口的是谁正确动作
A. 自己的、还在正常服务的 dev server上次会话遗留的同项目 dev server复用,比重启快
B. 别人的项目 / 不该杀的进程另一个项目 / 系统服务换端口绕开,不抢杀
C. 确认是僵尸/残留进程已死但端口没释放 / 重复拉起的精确 PID kill

先判断属于哪种,再决定动作。不无脑 kill。

定位 + 取证 Identify & investigate

./scripts/port-guard.sh 8080

脚本会打印占用进程的完整身份信息:

# 定位
lsof -nP -iTCP:8080 -sTCP:LISTEN
# 身份:启动时刻/运行时长/有无控制终端
ps -o pid,ppid,lstart,etime,tty,%cpu,rss,command -p "$PID"
# 工作目录 → 属于哪个项目
lsof -a -p "$PID" -d cwd -Fn | grep '^n' | sed 's/^n//'
# 子进程(有子进程的别直接杀父,先看树)
pgrep -P "$PID"

判读组合:

观察含义
PPID=1父进程已退出,被 launchd 收养 —— 孤儿
tty=??没有控制终端,不是人在终端里跑的
fd0 → /dev/null,fd1/fd2 → 某个 .lognohup cmd > log 2>&1 & 指纹 → agent/脚本起的
tty=ttys00X人在终端窗口起的,杀之前更该问一声
etime 好几天 + %cpu 0.0 + rss 极小挂了很久的僵尸 watcher(可能 watch 源码目录,某天突然醒来写产物)

三种处置 Three paths

# A. 复用:确认进程还活着(kill -0 只检测不杀)
kill -0 "$PID" && echo alive

# B. 换端口绕开,不杀别人的
PORT=18080 node index.js

# C. 精确 kill(先 SIGTERM 给优雅退出机会,不行再 SIGKILL)
./scripts/port-guard.sh 8080 --kill

安全红线 Safety rules

  1. 先判断该不该杀——EADDRINUSE 不等于该杀(复用 > 重启)。
  2. 绝不 killall node / pkill -f node——精确 PID,不误伤其他正常服务。
  3. PID < 100 绝不杀——系统进程。
  4. 别人的进程不杀——换端口绕开。
  5. 命令行看不懂 / 不确定是什么——停下报告用户,不擅自杀。

安装 Install

# 发布到 npm 后
dsh plugin --profile demo add dsh-port-guard

# 或从 GitHub 安装
dsh plugin --profile demo add github:PangYiMing/dsh-port-guard

许可证 License

MIT