lstalu/dsh-bundle-dedup-guard
Catches duplicate loader entry ids in DSH profile bundle lists on every plugin load, and audits the vendor tree, plugin junctions and known conflict pairs.
Prevents a specific class of boot crash that ordinary plugin hygiene does not catch. If a profile's dsh.profile.bundles lists an aggregate bundle — one whose patch inserts all of its sub-plugins, for example @linxin666/dsh-web-ui-all — and also lists those sub-plugins individually, the loader inserts every id twice and dies on the first collision with duplicate loader entry id. The README documents two real incidents: on 2026-08-18 a web profile listed an aggregate plus all 13 of its sub-plugins, and fixing the bundles list alone was not enough because reconcile re-appended them an hour later; on 2026-08-21 a bulk plugin update wiped node_modules, a repair npm install followed an @deepseek-ai junction into the vendor tree and corrupted it, and further failures followed once dependencies were restored. So the guard reports duplicates with the colliding ids, and adds a predictive reconcile warning for a dependencies entry that declares dsh.bundle but is not yet in bundles — naming the covered ids, because that is the state that re-creates the crash on the next install or update. It also surfaces the whole environment health picture, so a corrupted vendor tree is diagnosed as corruption rather than chased as a mystery Cannot find package.
Install
dsh plugin --profile web add dsh-bundle-dedup-guardThe npm line from the README's Installation section; pnpm then links it into the profile's node_modules as it does for any dsh plugin add. The README's Fixing duplicates section is the part that saves a second incident: removing the extra entries from bundles is not enough, because dsh plugin's reconcile re-appends every dependencies entry that declares dsh.bundle after each pnpm operation — so the sub-plugins must also be moved from dependencies to devDependencies (reconcile only reads dependencies).
Compatibility
Node.js >= 22.13, stated as a badge. It is a loader-time guard, so it works on every plugin load rather than when you remember to run it, and it watches the profile directory with fs.watch so a package.json or cordis.patch.yml change — dsh plugin add, a marketplace install, or a hand edit — warns immediately, before the next restart. The checks span site-level health too: vendor-tree integrity compares every @deepseek-ai/ package against resources/vendor/dsh/node_modules/.package-lock.json for missing or empty directories, package.json name mismatches and version mismatches, plus .name- temp-dir leftovers; junction integrity flags plugins whose runtime code imports @deepseek-ai/* but whose package/node_modules/@deepseek-ai junction is missing, wrong or dangling. The README lists one known limitation rather than pretending the audit is complete.
Details
- Repo: lstalu/dsh-bundle-dedup-guard
- Category: Development & Runtime
- Stars: 1
- Version: 0.1.0 (npm)
Alternatives
Tang-mm95/dsh-single-instance-guard · bigclawd/dsh-security-guard · SaiSenBox/dsh-boot-guard