apbigking-cell/dsh-plugin-square ↗★ 0
dsh-plugin-square
DeepSeek Harness 插件广场:实时同步 GitHub dsh-plugin topic,星标/最新/默认排序,关键词搜索,英文描述自动翻译成中文,事务化一键安装(解析验证/回滚/互斥锁/构建脚本授权),已安装插件一键启停与卸载。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:apbigking-cell/dsh-plugin-square说明文档
阅读完整 README ↗dsh-plugin-square(插件广场)
一个 DeepSeek Harness 插件:把 GitHub dsh-plugin topic(3300+ 插件)变成设置 → 插件 → 插件广场里的可搜索、可排序、中文化的卡片式插件市场,并提供可靠的安装器与启停管理。
功能
浏览
- 实时同步 — GitHub Search API
topic:dsh-plugin,分页 + 10 分钟缓存 + 定期刷新,新插件自动出现。 - 三种排序 — ⭐ 星标排序 / 🕐 最近更新 / 默认排序(GitHub best match)。
- 搜索 — 关键词走 GitHub 自己的
q,在整个 topic 里搜。 - 英文自动翻译中文 — 英文简介经 DeepSeek API 翻译成中文并持久化缓存;已含中文的跳过;翻译失败保留英文。
安装(事务化,杜绝假成功)
- 安装目标解析:
owner/repo先验证根package.json的dsh.bundle.patch; 无则递归查packages/*;都不是 → 明确拒绝"不是 DSH 插件"(普通仓库/文档/普通 npm 包都不会被安装)。 - monorepo 选择:仓库含多个 bundle 时展开候选列表(含聚合包识别),用户选定后按
github:owner/repo#path:subdir精确安装。 - 事务安装:profile 快照 → 互斥锁 → 安装 → 权威验证(node_modules 里 package.json
声明 dsh.bundle.patch 且 patch 文件存在 + 包名进
dsh.profile.bundles)→ 失败自动回滚并清理。 - 构建脚本授权:pnpm 拦截 build scripts 时列出精确包名,用户确认后仅授权这些包名。
- profile 安全:只操作当前进程的
DSH_HOME,找不到当前安装的 CLI 就报错, 绝不回退到 PATH 全局 dsh(不会把依赖写进错误的 profile)。 - 命令安全:
shell:false+ 参数数组,spec/包名拒绝 shell 元字符。
管理
- 已安装页:只显示真正的 DSH bundle(含 patch 文件验证);显示真实包名/版本/启用状态。
- 一键启停:停用只从
dsh.profile.bundles移除包名(保留依赖),启用加回;幂等; 插件广场自身不可停用/卸载(防丢失恢复入口)。 - 卸载:二次确认,dependencies + bundles 同步移除 + pnpm 清理,失败回滚。
- 权威状态刷新:卡片安装态一律来自 profile 重新读取,不用前端内存假状态。
Agent 工具
square_search / square_resolve / square_install / square_installed / square_toggle — 让 agent 也能自己搜、验证、安装、启停插件。
安装
dsh plugin --profile web add github:apbigking-cell/dsh-plugin-square