dsh-plugin-publisher
Manifest validPublishes a local DSH plugin folder to GitHub: runs a local preflight, pushes a snapshot through the Git Data API, adds the dsh-plugin topic, and opens the awesome-dsh-plugin listing pull request. Its
插件发布器 · dsh-plugin-publisher
在 DSH 里把本地插件一键发布到 GitHub,并可以顺手提交到 awesome-dsh-plugin 插件市场。
安装后打开 设置 → 发布(settings.section id 为 publisher,排在插件管理之后),四步走完即可发布:
- 令牌:粘贴 GitHub Personal Access Token(classic,勾
public_repo);令牌存进本机 DSH 凭据库,页面只显示"已配置"。 - 选插件:选目录或让插件扫描上一级目录,自动列出所有含
dsh.bundle.patch的插件包。 - 体检:18 项本地检查(manifest、patch、入口、README/LICENSE/图标、体积、敏感信息与本机路径扫描);有
fail项时按钮不可用。 - 仓库 + 市场:填仓库名/可见性/简介/Topics,一键发布;需要时自动建仓、推快照、加
dsh-plugintopic,并 fork 市场仓库开收录 PR。
它做了什么
- 发布:走 GitHub REST(Git Data API)建 blob → tree → commit → ref,不依赖本机的
git。 - 体检:全部在本地完成,不会上传任何文件;扫描
ghp_/私钥/sk-等敏感串与本机绝对路径。 - 市场 PR:只新增一个
data/plugins/<owner>__<repo>.yml(单引号包裹 YAML),fork 后建分支、按市场 PR 模板生成正文并开 PR。 - 幂等:仓库已存在时不静默覆盖,会要求再确认一次,然后追加一个提交。
需要的权限
GitHub Personal Access Token(classic),scope:
public_repo—— 建/写公开仓库、fork 市场仓库并开 PR- 私有仓库发布需要
repo
令牌保存在 DSH 凭据库里的 DSH_GITHUB_TOKEN 引用;也可以用环境变量 DSH_GITHUB_TOKEN 提供。
接口
Host 侧注册在 /dsh-publisher/api:
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /status | 令牌状态、当前账号、市场分类 |
| POST / DELETE | /token | 校验并保存 / 删除令牌 |
| POST | /scan | 列出目录下的插件包 |
| POST | /preflight | 本地体检 |
| GET | /remote | 远端仓库是否存在、是否私有、创建时间 |
| GET | /listing | 市场是否已收录 |
| POST | /publish | 建仓 + 推送 + topic + 可选市场 PR |
| POST | /market | 只提交市场 PR |
写请求(POST / PUT / PATCH)必须带 Content-Type: application/json,否则返回 415。
访问控制
这些路由只接受来自本机 Harness 界面的请求:请求的 Host 必须是回环地址(127.0.0.1/localhost/::1),
Sec-Fetch-Site: cross-site 一律拒绝,带 Origin 时必须与 Host 同源;随后再交给 DSH 自己的
connection.requestRejection() 复核(桌面宿主没有这道检查时只保留上面的本地校验)。
校验不通过返回 400/403,错误码见 error.* 文案。这样浏览器里随便一个网页无法借你的令牌触发发布、
扫描本地目录或读取目录信息。
限制
- 市场只收录公开仓库,且仓库需满 1 天(CI 会自动重跑,无需重复提交)。
- 单个文件上限 20 MB,整体上传上限 80 MB,最多 4000 个文件;
node_modules、.git、.env、私钥文件等默认跳过。 - 首次发布前建议先跑一遍体检,特别是"本机路径"这类警告:硬编码
D:\...的插件换台机器就失效。
License
MIT
Comments
Loading…
Similar plugins
by Gty2408
Publish or update a DSH plugin on GitHub in one command: validates the manifest and bundle identifiers, creates or reuses the repo, uploads the tree as one commit, honours .gitignore, and sets the req
★ 0
MIT
JavaScript
Oct 1, 2026
dsh plugin --profile web add dsh-plugin-publishby Gty2408
Publish a DSH plugin to GitHub and submit it to the plugin marketplace from a settings page. Validates the manifest against the listing requirements, creates the repository, uploads the tree, and open
★ 0
MIT
JavaScript
Oct 6, 2026
dsh plugin --profile web add dsh-plugin-publisherby Charlestam218
DSH 插件发布器:把本地做好的插件一键推送到 GitHub 仓库(凭据 → 建仓 → 提交 → 推送 → 可选 Release)
★ 0
JavaScript
Oct 2, 2026
dsh plugin --profile web add dsh-github-publishby tingaidehua
DSH plugin: publish /app/<slug>/ and /demo/<slug>/ static or proxy sites
★ 0
JavaScript
Oct 12, 2026
dsh plugin --profile web add dsh-deploy-webby LvsH13
专为 DeepSeek Harness 打造的一键发布工具:一条命令即可把本地插件发布到 GitHub,自动添加 dsh-plugin 话题并生成中英双语 README。| One-command publishing for DeepSeek Harness: publish local plugins to GitHub with a single command, including the
★ 0
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add dsh-githubby tangyixiao
DSH plugin: a read-only PR and release workspace inside the sidebar — grouped PR lists, diffs, comments, local review notes, and six independent release facts.
★ 1
MIT
JavaScript
Nov 7, 2026
dsh plugin --profile web add dsh-pr-release-workspace