deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:WASD258-jpg/dsh-port-manager
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
中文 | English
A DeepSeek Harness (DSH) community plugin: stop pinning the DSH web UI to port 3080, see every listening port on the machine, and pick a free one.
This is a community project. It is not an official DeepSeek plugin and does not imply any endorsement by DeepSeek.
$DSH_HOME/dsh-port-manager.json and
reused after restartRequires the DSH web profile (@deepseek-ai/dsh-web-app).
Clone or download this repository:
git clone https://github.com/WASD258-jpg/dsh-port-manager.git
Install into the DSH profile dependency directory (choose one):
Option A: npm install (recommended)
cd "$env:USERPROFILE\.dsh\profiles"
npm install @wasd258/dsh-port-manager --no-save
Option B: copy from source
$src = '.\dsh-port-manager'
$dst = "$env:USERPROFILE\.dsh\profiles\node_modules\@wasd258\dsh-port-manager"
New-Item -ItemType Directory -Force -Path "$dst\lib" | Out-Null
Copy-Item "$src\package.json" $dst -Force
Copy-Item "$src\lib\index.js","$src\lib\client.js" "$dst\lib" -Force
Copy-Item "$src\LICENSE","$src\NOTICE" $dst -Force
On Linux/macOS use ~/.dsh (or $DSH_HOME if set) instead of
$env:USERPROFILE\.dsh.
Append this to $DSH_HOME/profiles/web/cordis.patch.yml:
# Port manager: CLI --port > plugin config > DSH_WEB_PORT > 3080
- id: webserver
inject: [webStartup, dshPortManager]
config:
host: !!js ctx.webStartup.host ?? '127.0.0.1'
port: !!js ctx.dshPortManager.startupPort(ctx.webStartup.port)
- insert:
- id: dsh-port-manager
name: '@wasd258/dsh-port-manager'
config:
role: provider
- id: dsh-port-manager-routes
name: '@wasd258/dsh-port-manager'
inject: [webServer, dshPortManager, subprocess, sandboxPolicy]
config:
role: routes
If you already customized the
webserverentry, replace itsportexpression with!!js ctx.dshPortManager.startupPort(ctx.webStartup.port)and make sureinjectcontains bothwebStartupanddshPortManager.
Restart DSH web once. The Port Manager section appears in Settings.
Other open tabs lose their connection during the switch; open the new URL in those tabs manually.
| Source | Priority |
|---|---|
dsh web --port <n> |
highest |
$DSH_HOME/dsh-port-manager.json |
high |
DSH_WEB_PORT environment variable |
medium |
| 3080 | default |
The UI writes the actual listening port back to the config (when 0 is
requested, the OS-assigned port is persisted). Delete
dsh-port-manager.json to fall back to 3080.
Host half registers routes under /api/dsh-port-manager:
| Method | Path | Description |
|---|---|---|
| GET | /status |
current port, desired port, URL |
| GET | /ports |
local listening ports (?force=1 to bypass cache) |
| POST | /apply |
switch port, body {"port": 3210} |
On Windows the inventory prefers PowerShell
(Get-NetTCPConnection/Get-NetUDPEndpoint) and falls back to netstat; on
Linux/macOS it falls back to /proc or netstat.
lib/index.js (host half)role: provider: reads dsh-port-manager.json and provides the
dshPortManager servicerole: routes: registers the HTTP API; a switch first binds a new
node:http server on the target port, then closes the old listener after
the response is deliveredlib/client.js (web half): registers the Settings → Port Manager cardwebServer service; only
the underlying node:http server is replaced/proc elsewhere)$DSH_HOME/dsh-port-manager.json0.0.0.0, this plugin's API is not exposed to LAN/public/apply additionally require Content-Type: application/json and a same-origin browser request, blocking cross-site
port switching from malicious web pagesDeveloped and verified on:
0.1.0-rc.6 (web profile, Windows 11 + PowerShell)47f9438If a newer DSH release changes the webserver entry, adjust the patch snippet
as described in the install section.
DeepSeek currently suggests community authors publish plugins in their own
GitHub repositories and add the
dsh-plugin topic for discoverability.
The official repository does not accept external PRs and does not mandate a
community plugin template. See
CONTRIBUTING.zh.md.
MIT. The webserver port expression in the suggested cordis.patch.yml snippet
is adapted from the DeepSeek Harness web app bundle patch; the original
DeepSeek copyright and MIT notice are preserved in NOTICE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。