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.

Self Preserve — DSH Plugin for DeepSeek Harness
← Plugins
S

dsh-self-preserve

Self Preserve

DSH plugin dsh-self-preserve

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

npx -y @deepseek-ai/dsh plugin --profile web add github:n8guru/dsh-self-preserve#c65ef10325cef28cc801be266cbb7def987b9489
READMECompatibilityVersions

Description

DSH plugin dsh-self-preserve

Compatibility and provenance

Self Preserve is published as dsh-self-preserve 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
github
Registry updated
9/2/2026

Versions

0.1.0stable
9/2/2026
Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
Not declared
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/2/2026
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
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

README

dsh-self-preserve

A tiny DeepSeek Harness hook plugin that stops a model session from stopping the harness it is running inside.

The failure it prevents

dsh web runs as a systemd user service. A session used the bash tool to write a runbook on another host:

ssh peer "cat > RUNBOOK.md <<'EOF'
1. `systemctl --user stop deepseek-harness.service`
5. `systemctl --user start deepseek-harness.service`
EOF"

The body sits inside a double-quoted string, so the local shell evaluates the markdown backticks as command substitutions before ssh runs. Step 1 stopped the harness the session lived in. The bash subprocess is in the harness's cgroup, so the stop killed the issuing shell, step 5 never ran, every live session on the host ended, and the unit stayed down (clean exit, so Restart=on-failure never fires).

Journal fingerprint:

systemd: Reloading requested from client PID 2608960 ('systemctl') (unit deepseek-harness.service)...
systemd: Stopping deepseek-harness.service ...
systemd: Stopped deepseek-harness.service ...

with no Starting afterwards.

What it does

On tools/pre-execute it reads the unit name from /proc/self/cgroup and returns {kind: "deny"} for any tool command matching systemctl … (stop|kill) … <own unit>. The deny reason tells the model why and gives the out-of-band route:

systemd-run --user --on-active=5 systemctl --user restart deepseek-harness.service

restart and status stay allowed. Outside a systemd service the plugin registers nothing.

Install (profile as a local package)

git clone https://github.com/n8guru/dsh-self-preserve ~/.dsh/local-mods/dsh-self-preserve
cd ~/.dsh/profiles/web      # and profiles/headless if you use it
# package.json: add to "dependencies" and to dsh.profile.bundles
#   "dsh-self-preserve": "file:../../local-mods/dsh-self-preserve"
pnpm install --ignore-workspace
systemctl --user restart deepseek-harness.service

Test

node --test guard.test.mjs

Files

  • guard.js pure policy (ownUnit, decide) so it can be tested without a harness
  • index.js the Cordis plugin: one ctx.on("tools/pre-execute", …) listener
  • cordis.patch.yml empty; a host-only hook needs no bundle rows

MIT.