DeepSeek Harness Plugin

publieople/dsh-plugin-autoupdate

Stars ★ 0 Downloads (30d) 998 Category Plugin Markets & Managers Added 2026-10-17 npm dsh-plugin-autoupdate

Plugin updater for DeepSeek Harness that delegates every version decision to the dsh CLI, so the pnpm release-age policy still decides what is eligible; it snapshots before applying, can roll back, keeps a lock list, and can check or auto-apply on a schedule the user turns on.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-plugin-autoupdate

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

dsh plugin --profile web add github:publieople/dsh-plugin-autoupdate

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

Well-behaved plugin updates for DeepSeek Harness profiles: it only offers versions that pnpm's supply-chain minimum-release-age policy lets through, snapshots the profile before touching anything, can roll back - and ships a full main-column page you can actually click.

status: early · license: MIT · dsh: 0.2.0-rc.x

The problem

DSH plugins live in a profile and are managed by dsh plugin. Doing it by hand hides four traps:

Trap Why it bites
The Latest column of pnpm outdated is not the newest publish pnpm's supply-chain policy holds back versions that are too fresh; that column is the newest installable one
^0.59.2-style ranges are narrow on 0.x cross-minor updates simply do not resolve; same-minor ones do
Updates need a DSH restart host plugins only reload then; browser plugins also need a page refresh
Bad update? you are on your own getting back

This plugin automates the check, the apply, the rollback and the reminder, and hands the restart decision back to you.

Install

dsh plugin --profile <your profile> add dsh-plugin-autoupdate

Quit DSH completely and reopen it afterwards. Host plugins are loaded when the process starts - refreshing the page only swaps the browser half.

Use it as a page: "插件更新" (Plugin updates)

The sidebar gains an icon; it opens a full main-column page next to the conversation, with five tabs:

Tab Contents
可用更新 / Updates what each profile can update, with per-row selection, "update selected", "update all", and a per-row "lock". Rows whose new version exceeds the recorded range are marked "out of range", and a banner says why "update all" cannot move them
已安装 / Installed the dependencies recorded in each profile, their ranges and sources, plus "roll back the last update"
发现 / Discover the plugin market's official catalog: search, filter by category, install in one click (below)
已锁定 / Locked packages whose updates are no longer offered, with an unlock button
自动更新 / Auto-update scheduled checks, and updates that apply themselves once the conditions are met (off by default, you turn it on - below); one block of switches and last-run facts per profile

Toolbar: reload · update selected · update all · ignore ranges (--latest) · rollback · export CSV. Two buttons in the top right:

  • Refresh UI - location.reload(). Only the browser half is replaced (a freshly installed client plugin takes effect); host plugins do not reload that way.
  • Restart DSH - capability-gated. The official Desktop shell owns its own process lifecycle, so the page explains who owns the restart and refuses; CLI/service deployments really do restart: with systemd / pm2 / launchd the process just exits and the supervisor brings it back, otherwise a detached helper waits for this process to release its port and relaunches the same command. It never app.relaunches Electron.

Use it as a tool: dsh_plugin_updates

action What it does
check (default) lists updatable plugins per profile (exactly what pnpm outdated reports)
apply snapshots the profile, then updates, reporting which ranges moved
rollback restores the newest snapshot (or the one named by snapshot=) and reinstalls
settings reads or writes a profile's auto-update switches (checkOnStart / checkEveryMinutes / applyUpdates) and can forget past failures
lock / unlock stop offering updates for a package / offer them again
  • profiles: comma-separated profile names; defaults to the profile this instance runs
  • latest: equivalent to --latest, ignoring the recorded semver ranges - still bounded by the release-age policy
  • the tool never restarts DSH for you; its report carries restartRequired

Note: dsh plugin add <pkg>@<version-or-range> records the resolved exact version (measured pnpm behaviour, not the dsh wrapper). Plain apply will correctly leave such a pin alone, and the tool says so - "updates are offered and blocked by the recorded range". A 0.x range such as ^0.24.1 admits only 0.24.x, so 0.26.0 counts as out of range too; those rows are marked "out of range" on the page (the verdict comes from wanted in dsh plugin outdated --json - the CLI own call, not ours). latest=true moves it (still bounded by the release-age policy).

Discover reads the plugin market's official catalog

  • Source: https://awesome-dsh-plugin.com/plugins.json - the same file dsh-market uses (thousands of plugins with category, bilingual description, npm name, stars, downloads and capability annotations).
  • The host downloads it and caches it at $DSH_HOME/.plugin-autoupdate-catalog.json with a 12-hour TTL. A failed refresh keeps serving the last good copy and says so, instead of showing you an empty page.
  • Only packages listed in the catalog can be installed, by npm name, never with a version. A spec like pkg@1.2.3 is rejected - that is the one form that writes minimumReleaseAgeExclude and bypasses the age policy.

Snapshots and rollback

  • Before every apply, package.json / pnpm-workspace.yaml / pnpm-lock.yaml / cordis.patch.yml are copied into <profile>/.plugin-backup-auto-<stamp>/; the newest five are kept.
  • rollback restores the snapshot files and runs dsh plugin --profile <p> install so node_modules matches the manifest again.

Locking

  • A lock means "stop offering updates for this package"; it lives in <profile>/.plugin-autoupdate.json, a file this plugin owns.
  • It never touches the manifest and never pins a version. A lock suppresses the offer, not the resolution: the package still updates within the range you recorded.
  • A locked package moves from "Updates" to "Locked" - the offer is hidden, the fact is not.

Auto-update (scheduled checks)

"Check on a schedule, and update itself when the conditions are met" - the switches live under the 自动更新 tab, are stored per profile in <profile>/.plugin-autoupdate.json, and the host re-reads them every minute, so flipping one takes effect within a beat instead of needing a restart.

All three switches default to off. A profile that was just installed, or one whose page was never opened, runs no checks by itself, writes nothing to the profile, and never touches a plugin on its own - turn it on here if you want it. This plugin does not decide that for you.

Switch Meaning
Check once after DSH starts one check about a minute after the host starts (so it does not race startup), once per process
Check on a schedule every 1 / 3 / 6 / 12 / 24 hours; off means never
Apply updates it finds snapshot first, then run dsh plugin update (identical to doing it by hand)

Two hard boundaries:

  • A locked plugin is never auto-applied - locked rows leave the plan before anything can be applied;
  • a package@version that failed is not retried in a loop (remembered in the same state file, the newest 50). A newer version is a fresh attempt, and "Forget past failures" retries at once.

Auto-apply still only runs dsh plugin update - it never touches add pkg@version - so pnpm's minimum-release-age policy and the ranges recorded in the profile keep deciding. An updated host plugin loads on the next DSH start; not restarting now is fine.

HTTP surface (used by the page)

The page talks to nine exact routes on the host:

GET  /plugin-autoupdate/status     GET  /plugin-autoupdate/catalog
POST /plugin-autoupdate/apply      POST /plugin-autoupdate/rollback
POST /plugin-autoupdate/install    POST /plugin-autoupdate/restart
POST /plugin-autoupdate/lock       POST /plugin-autoupdate/unlock
POST /plugin-autoupdate/settings
  • Reads (status / catalog) are unfenced, so deployments reached by a name keep working.
  • Writes require a loopback Host or one you declared (PLUGIN_AUTOUPDATE_TRUSTED_HOSTS=host1,host2). apply / rollback / install / restart also require confirm: true in the body; lock / unlock / settings do not - they install no code, they are reversible, and all they write is this plugin's own state file.
  • /status reports features (the routes this build registered) and version: the browser half is re-read from disk on every page load while the host half only loads at process start, so the page compares the two and says "the host plugin is older - quit DSH and reopen".

Safety model

Each of these is deliberate:

  1. It never pins a version. pnpm add pkg@x.y.z is not used anywhere: pnpm records such a request in minimumReleaseAgeExclude, which would silently bypass the age gate the user relies on.
  2. Every version decision is delegated to the DSH CLI. The plugin never queries a registry to pick a version, so its answers match a manual update exactly.
  3. A snapshot is taken before every apply, the newest five are kept, and rollback is a first-class action.
  4. It never restarts DSH behind your back. The agent tool only reports that a restart is required; the page's restart button is capability-gated and refuses on Desktop, saying who owns the lifecycle instead.
  5. It writes only inside the profile directory ($DSH_HOME/profiles/<name>) and its own cache under $DSH_HOME: no user code, no agent configuration.
  6. Discover installs only catalog packages, and never with a version.
  7. The timer only runs the command a human would run. Auto-apply means snapshot + dsh plugin update, never add pkg@version; locked packages and versions that already failed leave the plan before it can apply anything.
  8. On Windows it builds the command line itself before handing it to cmd.exe - Node's shell: true does not escape arguments (DEP0190) and cmd.exe swallows ^.

What it is not

  • Not a harness updater: updating the DSH application itself is a different kind of plugin.
  • It does not bypass the minimum-release-age policy. That is a feature, not a limitation.

Development

npm install
npm test        # node --test, offline, no network

On this machine (Windows + DSH Desktop) the bundled Node works too:

$env:ELECTRON_RUN_AS_NODE = '1'
& 'D:\DSH\DeepSeek Harness.exe' --test

Use a bare --test: that Node (v24 inside the asar) does not expand a directory argument, so --test test/ fails with Cannot find module …\test and reads like a broken test.

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.