lxzy-7/dsh-plugin-guard 预览 preview

lxzy-7/dsh-plugin-guard

DeepSeek Harness 插件安装安全网:安装前快照、一键/自动回滚、守护启动,以及自动触发代理分析的事故报告。

Project Overview项目介绍

This is a native DSH bundle plugin built exclusively for DeepSeek Harness, designed to add a safety net for plugin installation that catches broken plugins before they break your whole setup. It prevents bad plugin installs from leaving your DSH instance unbootable by automating pre-install snapshots, automatic rollbacks, post-install health checks, and triggered incident analysis for failed boots. You can install it directly via the DSH plugin CLI using the command dsh plugin --profile web add github:lxzy-7/dsh-plugin-guard, and it is strongly recommended that you launch DSH through the provided guarded boot script to access all of its core features.

It is intended for all DeepSeek Harness users who install third-party plugins, especially developers who test new or experimental community plugins regularly. Even if you only install one or two plugins a month, this guard gives you peace of mind that a broken plugin will not leave you manually editing config files to fix your setup. The core workflow starts with an automatic in-process snapshot of your core 5 configuration files before any plugin install completes. After installation, the guarded boot process starts DSH, runs a full health check to confirm the app boots correctly with the new plugin loaded, and automatically rolls back to the last working snapshot if a boot failure is detected.

This plugin is released under the open source MIT license, and has no runtime dependencies. It supports all major desktop platforms including Windows, macOS, and Linux, with platform-specific guarded boot scripts for PowerShell on Windows and bash on macOS/Linux respectively. All snapshots and incident reports created by the plugin are stored locally on your machine, and the plugin only reads and writes your DSH profile configuration files, never executes untrusted third-party code. It only handles boot failures caused by bad plugins, and does not attempt to repair corrupted session logs or other unrelated data issues.

这是一个专为 DeepSeek Harness 开发的原生 DSH 安全插件,用于防止错误插件安装导致 DSH 应用无法启动,给 DSH 的插件安装机制加上安全网。它提供安装前自动快照、一键/自动回退、守护启动、启动失败后自动触发事故分析等功能,可通过 DSH 插件命令行直接从 GitHub 仓库安装,需要通过插件提供的启动脚本启用守护启动才能获得完整功能。

适合所有使用 DSH 插件生态的用户,尤其是经常测试新插件、安装第三方社区插件的开发者。典型工作流为:用户安装任意插件前,插件自动对核心配置文件创建快照;安装完成后通过守护启动脚本启动 DSH 并进行健康检查;如果检测到启动异常,会自动回滚到上一个可用快照并重试。

该插件采用 MIT 许可证开源,无运行时依赖,支持 Windows、macOS 和 Linux 平台,所有快照和事故报告都存储在本地,不收集用户凭据。它仅读写配置文件和快照,不会执行第三方代码,边界清晰,只处理启动失败类事故,会话日志损坏等数据问题不在其处理范围内。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 42 stars - an early-stage project星标 42,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:lxzy-7/dsh-plugin-guard

把 lxzy-7/dsh-plugin-guard 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-plugin-guard

Install safety net for DeepSeek Harness: pre-install snapshots, one-click / automatic rollback, guarded boot, and incident reports that auto-trigger agent analysis.

DeepSeek Harness 的插件安装安全网:安装前自动快照、一键/自动回退、守护启动、事故报告自动触发 Agent 分析。


English

What it does

A bad plugin install can leave the app unable to boot, and fixing it by hand usually means digging through config files. This plugin automates the whole chain:

Install a plugin (any method)
   │  tools.guard hook: automatic snapshot BEFORE the install (in-process)
   ▼
Guarded boot (boot-guard script)
   │  snapshot before boot → start dsh web → health check
   ├─ healthy ─────────────────────────────► passes through untouched
   └─ unhealthy ─► auto-rollback to last good snapshot → retry once
                   → write an incident report + set a pending marker
                   → the next session's prompt tells the agent to analyze it
                   → after fixing, call `incident_resolved` to clear the marker

How it detects problems (important to understand)

The guard does not statically inspect plugin code, and it does not try to "test" a plugin in isolation. Detection works at three levels:

  1. Snapshots are pure file copies. Taking a snapshot just copies 5 config files (package.json, pnpm-lock.yaml, pnpm-workspace.yaml, cordis.yml, cordis.patch.yml). No plugin is run, no behavior is evaluated.

  2. Boot-level detection does run the harness — with your plugin loaded. The boot-guard script starts the whole dsh web process (which loads every installed plugin, including the one you just added) and then health-checks HTTP / within a timeout. If a plugin breaks boot — load error, startup crash, unresponsive server — the check fails, and the guard automatically kills the tree, rolls back to the last good snapshot, and retries once. So yes: to catch a boot-breaking plugin, the harness (and therefore that plugin) has to actually start. That is the one moment where "running the plugin" is part of detection. Since v0.3.1 the check also confirms the web client actually rendered (a plugin crash that black-screens the page with an error leaves HTTP 200 up — the guard's client reports render crashes, and the boot-guard rolls back instead of calling a black screen "healthy"); incident reports additionally record the dsh version per snapshot and flag when a boot failure follows a harness update that a profile rollback cannot undo. Since v0.3.2, when rollback and the retry both fail (a DSH update made a plugin incompatible), the boot-guard diagnoses the offending plugin from the boot logs, quarantines it (appends disabled: true to cordis.patch.yml), boots without it, and clearly reports which plugin was pulled out and how to restore it (dsh-guard quarantine --undo <id>).

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-chatgpt-subscription 下一个 Next DeepSeek-Harness-Desktop →