DeepSeek Harness plugin

dsh-plugin-dedup

Review duplicate dynamic Cordis plugins and produce merge plans for DeepSeek Harness (DSH). Detects content-similar packages (token Jaccard/containment), clusters duplicates, and yields safe merge

Jump to install

Source facts

Repository
lordship12138-crypto/dsh-plugin-dedup
Latest update
Aug 14, 2026
Category
Security & Permissions
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/lordship12138-crypto/dsh-plugin-dedup
Plugin: dsh-plugin-dedup
Author: lordship12138-crypto

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-plugin-dedup

> ## ⚠️ AI 生成声明(AI-Generated Disclosure) > > 本仓库全部内容均由 AI(DeepSeek)生成——包括全部代码、文档、技能、配置与提交信息。 > 仓库所有者仅提供思路与发布,未手写任何实现细节;所有者对生成内容保留仓库所声明的许可权利。 > 使用前请自行审阅:本插件注册模型工具与技能,代码未经人工逐行审查。

DeepSeek Harness(DSH)repository 插件:审查动态 Cordis 插件是否重复生成(内容相似),并产出合并方案

功能

注册一个模型工具 plugin_dedup_review 和一个同名用途的运行时技能 plugin-dedup-review

  • action=review:对每对插件包计算归一化源码的 token Jaccard / 包含度(剔除 JS 关键字与噪声 token)+ 名称/用途文本相似度,判定四档:

- duplicate —— 跨插件内容重复(Jaccard ≥0.5,或包含度 ≥0.9,或元相似 ≥0.6 且 Jaccard ≥0.3); - overlapping —— 部分重叠(Jaccard ≥0.25 或元相似 ≥0.5); - version-duplicate —— 同一插件内的旧版本(历史版本,永不建议删除); - distinct —— 无关。 并把 duplicate 对聚成集群(union-find)。

  • action=merge-plan:对指定集群给出:

- inject 并集、跨成员共享代码行、各成员独有段(合并素材); - droppedAudit:被丢弃成员未被覆盖的 token 清单,合并前核对不丢功能; - 安全超集合并:保留包 token 覆盖其余成员 ≥90% 时,直接返回 finalMergedSource(最终合并源码); - steps:可执行的 cordis 操作序列(cordis_define / cordis_run / cordis_stop / cordis_undefine)。

  • 可选 write_report: true 把完整报告落盘到 workspace 的 .plugin-dedup-report.json

安装

dsh plugin --profile web add github:<owner>/dsh-plugin-dedup

纯 ESM JavaScript,零构建、无 prepare 脚本,安装即用。若 pnpm 提示 allowBuilds,本插件不需要构建许可(无构建脚本)。

使用

1. cordis_inspect_self 列出插件,再逐包取源码; 2. 组装描述符数组传给 plugin_dedup_reviewaction=review; 3. 有重复集群时,同一输入 action=merge-plan + cluster=<索引>; 4. 按 mergePlan.steps 执行合并。

完整口径见 [SKILL.md](./SKILL.md)(与运行时技能内容一致)。

边界(设计决策)

  • 工具无状态:merge-plan 需要重新传入同一组描述符;
  • 工具不能自行枚举插件:DSH 未向插件暴露动态插件注册表服务,描述符必须由 cordis_inspect_self 采集;
  • 同插件旧包不可单独删除(cordis_undefine 作用于整个插件),因此旧版本只标记不合并。

目录

index.js          插件主体:注册工具 + 技能
skill.js          运行时技能注册内容(与 SKILL.md 一致)
cordis.patch.yml  bundle patch(mount 行)
SKILL.md          使用文档
AGENTS.md         面向 agent 的仓库说明

许可

MIT(见 [LICENSE](./LICENSE))。代码为 AI 生成,所有者按本声明保留权利。