DeepSeek Harness Plugin

mervin1944/dsh-version-badge

Stars ★ 0 Downloads (30d) 0 Category UI Enhancements Added 2026-09-02 npm dsh-version-badge

Version badge above the sidebar settings button: shows the current dsh version, expands to list every core package version, and checks npm for updates with one-click deploy.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-version-badge

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:mervin1944/dsh-version-badge

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

A DSH (DeepSeek Harness) version badge that sits above the sidebar settings button. It always shows the current dsh version and lets you expand to see every core package version (CLI / base / web-app / web-frontend / agent). A Check for updates button beside it queries npm and offers one-click deploy when a newer build is out.

Features

  • 🏷️ Persistent badge — above the sidebar settings button (part of the layout, not a floating widget), showing DSH v<major-version>
  • 📋 Click to expand — lists each @deepseek-ai core package version; click outside or ✕ to close
  • 🔄 Check for updates — queries the npm registry and compares against the latest (60s cache)
  • 🚀 One-click deploy — upgrades the global dsh CLI (@deepseek-ai/dsh@latest) and auto-restarts from a detached process
  • 🔒 Security model — write operations only accept same-origin loopback requests (loopback address + Origin matches Host + rejects forwarding headers)
  • Zero dependencies — plain host plugin with inline script injection (same mechanism as dsh-whale-widget), no client build

Install

dsh plugin --profile web add dsh-version-badge

Restart dsh web and refresh the browser; the badge appears above the settings button.

Configure (optional)

One-click deploy is enabled by default. To disable it (e.g. when the dsh process is managed by a supervisor), add to the profile's cordis.patch.yml:

- id: dsh-version-badge
  name: dsh-version-badge
  config:
    allowRestart: false

The update panel then notes that deploy is disabled.

Uninstall

dsh plugin --profile web remove dsh-version-badge

Verify

curl http://127.0.0.1:3080/dsh-version/version.json
curl http://127.0.0.1:3080/dsh-version/check-update.json
curl http://127.0.0.1:3080/dsh-version/widget.js

Deploy status (if any):

curl http://127.0.0.1:3080/dsh-version/deploy-status.json

Security notes

  • Read-only endpoints (version.json / check-update.json / deploy-status.json): loopback address + no forwarding headers; if an Origin is present it must match Host
  • Write endpoint (deploy-update.json POST): loopback address + no forwarding headers + Origin must be present and match Host (rejects curl / cross-site, Origin-less requests)
  • Deploy always uses the npm dist-tag latest; any client-supplied tag/version is ignored
  • The deploy result is written to $DSH_HOME/dsh-update-deploy.result.txt and queryable via the status endpoint; if npm fails the current version stays unchanged

Structure

dsh-version-badge/
├── package.json          # DSH bundle plugin metadata
├── README.md             # this file (Chinese)
├── README.en.md          # English version
├── cordis.patch.yml      # plugin mount declaration
└── lib/
    └── index.js          # host plugin body (with inline browser script)

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.