# 发布与上架指南 / Publishing & Marketplace Guide ## 结论 - dsh(本机为 `@deepseek-ai/dsh-root@0.1.0-rc.5` Developer Preview)**没有内置官方“插件市场”页面**。官方分发方式只有三类:npm 包、Git 仓库、本地 tarball,统一通过 `dsh plugin --profile add ` 安装(文档:`docs/user/develop/basic/publish.md`)。 - “插件市场”都是**社区项目**:它们本质上是 GitHub 插件目录/索引,安装时仍回到 `dsh plugin add` 命令行。主流入口见下文。 - 本插件已从“本地 `file:` 补丁插件”改造成**可发布的组合包(bundle)**,并已生成可分发 tarball;离真正“上架”只差外部账号和提交动作。 ## 本包已满足的发布条件 - [x] `package.json` 声明 `dsh.bundle.patch = ./cordis.patch.yml`(安装后 dsh 自动激活本层,用户无需手改 profile patch) - [x] `cordis.patch.yml` 按**包名** `dsh-ambiguity-handling` 引用插件行(Node 可解析已安装包) - [x] `index.js` 为预构建 JS 入口(`index.ts` 保留为源码),`main` 指向 `index.js` - [x] `files` 只包含运行时发布物:`index.js`、`cordis.patch.yml`、README - [x] MIT `LICENSE` - [x] 中英文 README - [x] `npm pack --dry-run` 通过,并已生成 `dsh-ambiguity-handling-1.0.0.tgz` - [x] npm 包名 `dsh-ambiguity-handling` 经查询当前可用(404 = 未占用) ## 尚缺的外部条件(需要你提供/授权) | 项目 | 状态 | 需要做什么 | |---|---|---| | GitHub 公开仓库 | 本机未登录(`gh auth status` 失败) | `gh auth login`,或提供 push 权限的 token;创建一个公开仓库并把本目录作为仓库根推上去 | | npm 账号 | 本机未登录(`npm whoami` 返回 `ENEEDAUTH`) | `npm login --registry=https://registry.npmjs.org/`;注意本机默认 registry 是 npmmirror,发布时需显式指定官方 registry | | 市场提交 | 未提交 | 任选下面一个或多个市场,按其规则提交;需要先有上面的 GitHub 仓库 URL | ## 安装方式(仓库发布后) ```sh # GitHub(推荐;用户首次安装可能需要按提示授权该包的 prepare/build) dsh plugin --profile web add github:changlianxiya-139/dsh-ambiguity-handling # headless 也要用则再装一次 dsh plugin --profile headless add github:changlianxiya-139/dsh-ambiguity-handling # npm(发布后) dsh plugin --profile web add dsh-ambiguity-handling # 本地 tarball(无需仓库/账号,直接交付) dsh plugin --profile web add ./dsh-ambiguity-handling-1.0.0.tgz ``` 安装为组合包后,dsh 会按 `dsh.bundle` 自动把本包的 patch 层加入 profile;**不需要**再手动编辑该 profile 的 `cordis.patch.yml`。 ## 社区市场入口(截至 2026-08-17 搜索核实) 1. **dsh-market(可视化市场,装进 Settings 里)** - 仓库:`nanshan1995/DSH-Plugin-Market` - 安装:`dsh plugin --profile web add github:nanshan1995/DSH-Plugin-Market` - 重启 dsh 后进入 Settings → Plugin Market;其目录来自 `awesome-dsh-plugin` 精选清单。 2. **DSH Hub** - 提交页:https://dshhub.dev/submit - 收录条件:公开仓库 + GitHub topic `dsh-plugin` + README 写明安装命令 + 明确 License。 3. **dsh.pub** - 提交页:https://dsh.pub/en/submit - 粘贴仓库 URL,它自动读取根目录 package.json、校验 bundle 合约并自动创建 PR。 4. **dshplug.com / dshplugin.market / awesome-dsh-plugin** - 收录 GitHub `dsh-plugin` topic;部分站点按小时自动抓取,部分需要到对应仓库提 PR。 5. **GitHub topic 本身** - 给仓库添加 topic:`dsh-plugin`、`deepseek-harness`。这是多数目录/市场的自动收录前提。 ## 市场提交模板(可直接复制) ```text Plugin name: dsh-ambiguity-handling GitHub: https://github.com/changlianxiya-139/dsh-ambiguity-handling Install command: npx @deepseek-ai/dsh plugin --profile web add github:changlianxiya-139/dsh-ambiguity-handling Category: Workflow One-liner: Appends ambiguity-handling rules to the dsh system prompt so the agent asks A/B/C/D clarification options instead of guessing. License: MIT ``` > 分类可据目标市场调整;本插件属于系统提示词行为约束,最接近的常见分类是 `Workflow`(或个别市场的 `Skills`)。 ## npm 发布步骤(可选,需要 npm 账号) ```sh cd ~/.dsh/plugins/dsh-ambiguity-handling npm login --registry=https://registry.npmjs.org/ npm publish --registry=https://registry.npmjs.org/ ``` - 本机 `~/.npmrc` 当前指向 `https://registry.npmmirror.com`,不要向镜像站发布,务必加 `--registry=https://registry.npmjs.org/`。 - 如改用 scope 名(`@yourname/dsh-ambiguity-handling`),需要同步修改 `package.json` 的 `name` 和 `cordis.patch.yml` 中的 `name`,并重建 tarball。 - 仓库发布(GitHub)不需要 npm 账号,通常比 npm 更快被社区市场收录。 ## 立即能做的替代方案 在获得 GitHub/npm 账号之前,可以直接交付 tarball: ```sh cd ~/.dsh/plugins/dsh-ambiguity-handling npm pack # 已生成 dsh-ambiguity-handling-1.0.0.tgz ``` 对方执行 `dsh plugin --profile web add ./dsh-ambiguity-handling-1.0.0.tgz` 即可安装。