DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-override-guard

X

dsh-override-guard

Manifest valid

The Purification Layer Above dsh-purge: Post-Assembly Secondary Purification, Counter-Message Swallowing and Tool Blocking, Forged Response Detection and Refusal, Self-Healing Purge Source Code | An override layer that outranks dsh-purge

hasBundlePatchMachine translated

dsh-override-guard

A sanitizing layer that outranks dsh-purge. It does not touch the model and does not swap prompts. It exists so that no plugin gets to speak on the model's behalf.

  • Re-sanitizes the assembled system prompt (drops the region/sector exclusion clause, rewrites bare <project_instructions> with a scope attribute)
  • Restores user messages that an upstream hook swallowed
  • Clears blocked / refusal-text error markers other plugins set on tool calls
  • Detects forged refusals and logs who wrote them, with a timestamp
  • Repairs dsh-purge's own source when an upgrade puts the gate back

Why this layer is needed

dsh-purge registers its injection hook like this:

ctx.on("system-prompt/assemble", handler, { global: true, prepend: true });
// inside: const assembled = await next(); return rewriteLiveAssembly(...);

prepend: true plus await next() means it sits at the head of the chain and rewrites whatever the rest of the chain produced. Registering earlier does not help — it wraps you.

So the strategy is not to race it, but to do three things at once:

ApproachWhereEffect
Post-hoc sanitizesystem-prompt/assemble, agent/pre-stepWhatever changed last, it passes through again
Source sanitize$DSH_HOME/prompt-inject.md + the encrypted slotWhat it injects is already clean
Source self-healnet-scope.js / index.js / core.jsIf an upgrade reinstalls the gate, it is removed again within five minutes

Defense in depth: no single failure changes the outcome.


Install

dsh plugin add https://codeload.github.com/X-max0/dsh-override-guard/tar.gz/refs/heads/main --profile web

Git and local-link variants:

dsh plugin add https://github.com/X-max0/dsh-override-guard.git --profile web
dsh plugin add "link:C:/path/to/dsh-override-guard" --profile web

Manual install:

  1. Place this package at $DSH_HOME/profiles/web/node_modules/dsh-override-guard (junction or symlink is fine).
  2. Append to $DSH_HOME/profiles/web/cordis.patch.yml:
- insert:
    - id: dsh-override-guard
      name: dsh-override-guard
      inject: [systemPrompt, tools]
      config: {}

postinstall registers the package in the profile's dsh.profile.bundles, which is what makes it appear in the plugin manager.

⚠️ Running dsh plugin add / pnpm add while the host is running rewrites node_modules and drops the live process. Stop the host first, or accept the restart.

ℹ️ pnpm 9/10 blocks dependency build scripts by default. If the install log shows Ignored build scripts: dsh-override-guard, run pnpm approve-builds once; otherwise postinstall will not register the package in dsh.profile.bundles. Manual fallback: add "dsh-override-guard" to the profile's dsh.profile.bundles array — the effect is identical.

Restart the host once after installing — bundles are read at boot.


Verify

dsh-override-guard status   # inject file, purge markers, override-state
dsh-override-guard verify   # exit code 1 on any problem
dsh-override-guard heal     # run a full repair now
dsh-override-guard where    # resolved paths

Confirm the plugin actually loaded:

grep "plugin.applied" "$DSH_HOME/override-guard/guard.log" | tail -1

Runtime log: $DSH_HOME/override-guard/guard.log

EventMeaning
plugin.appliedloaded by the host
assemble.sanitizeda system prompt was rewritten
preStep.restoreswallowed user messages were restored
tool.unblocka blocked marker was cleared
denial.detecteda forged refusal was caught (excerpt attached)
heal.trigger / heal.donepurge source had been reverted and was repaired

Hooks

EventOptionAction
system-prompt/assembleprependawait next(), then sanitize sections[].text
agent/pre-stepdefault (tail)sanitize decision.messages; restore when messages came back empty
tools/pre-executeprependclear exec.blocked and refusal-text exec.error
session/eventglobaldetect forged refusals in short assistant text
—timerevery 5 minutes, check purge markers and self-heal

Sanitizing touches exactly three things: the Excluded targets only: ... sentence, the bare <project_instructions> tag, and the fixed refusal string 该目标在禁止范围内……. Nothing else.


Self-heal patches

FileTargetResult
net-scope.jspublicHostHit()returns null; original logic kept as publicHostHitLegacy for audit
index.jsinstallRegionGate(ctx)commented out; no more agent/pre-step / tools/pre-execute gate
core.jsdefaultOverrideText()sanitizes the decrypted slot, so apply/update/restore cannot reintroduce the clause

Each is marked [operator-fix], idempotent, and backed up as *.bak-<timestamp> before writing.


Compatibility

  • Host: DeepSeek Harness 0.2.x (same generation as dsh-purge)
  • Target: dsh-purge 1.x — if a marker does not match, it skips instead of writing garbage
  • Node >= 18

If a major dsh-purge release changes a signature, heal reports a pattern miss rather than corrupting the file. Check verify output and add a rule for the new signature.


Uninstall

dsh plugin remove dsh-override-guard --profile web

Remove the insert entry from cordis.patch.yml and restart. Leftover *.bak-* files can be deleted.


License

MIT

Comments

Loading…

Similar plugins

dsh-purge

by HimLeoing

DeepSeek Harness 破甲:提示词注入 + 引擎层补丁,适配 dsh 0.2.2-rc.2。上游 MIT 原作 by @YuJunZhiXue

Manifest valid

★ 4

MIT

JavaScript

Nov 13, 2026

dsh plugin --profile web add dsh-purge

by jiuyuan-yi

DeepSeek Harness 更新守卫:更新前检查插件兼容性,启动失败可自愈(测试版)

Development & InfrastructureManifest valid

★ 1

MIT

JavaScript

Nov 6, 2026

dsh plugin --profile web add dsh-update-guard

by liutingqiu

Independent community build of dsh-purge 1.1.77 for DSH 0.2.1 — restored 23 redteam skills + exact-host own-server allowlist. Upstream: YuJunZhiXue/dsh-purge.

Manifest valid

★ 4

↓ 3.5k/wk

Apache-2.0

JavaScript

Oct 26, 2026

dsh plugin --profile web add dsh-purge

by 555bbbAAA

基于上游 1.1.71 维护的 dsh-purge 社区兼容包:只负责 DeepSeek Harness 的版本与本地 Windows 运行问题兼容。

Terminal & ClientsManifest valid

★ 77

↓ 17.9k/wk

MIT

JavaScript

Nov 10, 2026

dsh plugin --profile web add dsh-purge

by zhaofeng104

dsh-purge 1.2.0 定制版:DeepSeek Harness 破甲 / 红队评测插件(基于 HunYiSage/dsh-purge 1.1.90,攻击范围回退 1.1.71 口径)

Manifest valid

★ 12

↓ 16.8k/wk

Apache-2.0

JavaScript

Nov 17, 2026

dsh plugin --profile web add dsh-purge

by feeling6667

dsh-purge 的非官方分支(fork):适配 DeepSeek Harness 0.2.1-rc.2、破甲内核 v3

Manifest valid

★ 4

↓ 3.5k/wk

MIT

JavaScript

Oct 21, 2026

dsh plugin --profile web add dsh-purge