DSH HUB
HomePlugin StoreRankingsPublish Guide
Plugin source
Back to catalog

lordship12138-crypto /

dsh-plugin-dedup

Verified

This repository has no description yet.

★ 1 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@21105566

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_review,action=review;
  3. 有重复集群时,同一输入 action=merge-plan + cluster=<索引>;
  4. 按 mergePlan.steps 执行合并。

完整口径见 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)。代码为 AI 生成,所有者按本声明保留权利。

—/ 5

No ratings yet

Verified DSH bundle

Commit 211055668e43

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

APIPublish GuideAbout