dsh-plugin-publisher
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDSH 插件发布 · DSH Plugin Publisher
DSH 插件发布 · DSH Plugin Publisher
Publish one validated DSH plugin package to the DeepSeek Harness distribution
channels and verify each channel can load it. Input is the finished package
source produced by ; this skill owns everything after the
commit: validation, repo gates, per-channel release, and load verification.
dsh-plugin-creatorThere is no official DSH plugin marketplace. The three supported channels
are npm, git, and tarball; GitHub's topic is the discovery
mechanism. Publish the same plugin across as many channels as the user's
distribution intent needs, keep channel state out of canonical source, and
report evidence per channel.
dsh-plugin将一个经过验证的 DSH 插件包发布到 DeepSeek Harness 的分发渠道,并验证每个渠道都能加载该插件。输入是由 生成的已完成插件包源码;此 skill 负责提交之后的所有工作:验证、仓库门禁、按渠道发布以及加载验证。
dsh-plugin-creator目前没有官方 DSH 插件市场。支持的三个渠道是 npm、git 和 tarball;GitHub 的 topic 是发现机制。根据用户的分发意图,将同一插件发布到尽可能多的渠道,不要将渠道状态放入规范源代码中,并按渠道报告证据。
dsh-pluginTriggers
触发条件
Activate when
满足以下条件时启用
- 用户说“发布这个 DSH 插件”“上架插件”“推到 npm”“打个 release”“导出 tarball 给用户装”。
- The user asks to publish, release, distribute, upload, or package an existing DSH plugin.
- 用户说“发布这个 DSH 插件”“上架插件”“推到 npm”“打个 release”“导出 tarball 给用户装”。
- 用户要求发布、发行、分发、上传或打包现有的 DSH 插件。
Do not activate when
满足以下条件时不启用
- 用户要新建、实现或修改插件;交给 。
dsh-plugin-creator - 用户只是要本地验证插件可加载(),并没有发布意图。
dsh --profile demo --dump-config
- 用户要新建、实现或修改插件;交给 。
dsh-plugin-creator - 用户只是要本地验证插件可加载(),并没有发布意图。
dsh --profile demo --dump-config
Product boundary
产品边界
- Input is a local plugin package that already passes 's gates:
dsh-plugin-creatorinvariants hold,package.json(ordsh.bundle.patchfor the yoda-style registry channel) is present, and no stale build artifacts sit in the tree.dsh.plugin.json - Publishing updates only the target plugin's code, never the whole
harness. A plugin is often developed as a workspace member inside the
monorepo (e.g.
deepseek-harness) but published from its own repository (e.g.packages/client/ui-plugin-market; such members are listed inlovstudio/dsh-plugin-marketplaceasscripts/release/families.ts). In that case the release diff is the plugin's own files only: sync the changed plugin source plus its committed build artifacts to the standalone repo, and leave every other harness change (unrelated in-flight features, other packages, root manifests) untouched. Keep the standalone repo's self-referencing import style — monorepo-internal package references such asexternalRepositoryMembersmap to the plugin's own exports (@deepseek-ai/dsh-host-plugin-market-github) and must not be copied over.@lovstudio/dsh-plugin-marketplace/... - When the user does not name a channel, default to npm for plugins whose
@lovstudio/dsh-*ispublishConfig.access, and to git for plugins meant to be consumed from source. Do not ask a channel-selection question when the request omits channels.public - A request may select multiple channels in one run.
- Version, visibility, and target account are publishing inputs. Reuse the version from the source package; ask only when the user wants a bump that the current manifest does not imply.
- Keep channel metadata, credentials, staging files, and archives outside canonical source.
- Do not invent a registry or marketplace that does not exist. If the user
asks to "上架 DSH 市场", explain the three real channels and the
topic, then proceed on those.
dsh-plugin
Supported channels in this version:
- npm — publish a prebuilt (or plain
lib/) bundle soindex.jsinstalls ready-to-load code.dsh plugin add <pkg> - git — push the source repo, tag a release, and ship a script so
preparebuilds on install.dsh plugin --profile <name> add github:owner/repo#<sha> - tarball — a self-contained archive for offline / review installs.
pnpm pack - community mirror (optional) — register an out-of-tree plugin under
in the
packages/community/repo so it ships with the harness source tree.deepseek-ai/deepseek-harness - discovery topic — add the GitHub topic (and, for lovstudio plugins,
dsh-plugin,dsh) so the official discovery surface finds it.deepseek-harness
For any additional platform, follow and verify its
current official name, submission contract, public URL, and completion signal
before implementing an adapter. Never call an upload dialog a completed
publication.
references/publish-dsh.md- 输入是一个本地插件包,且已经通过 的门禁:
dsh-plugin-creator不变量均成立,存在package.json(或用于 yoda 风格注册表渠道的dsh.bundle.patch),且目录树中没有陈旧的构建制品。dsh.plugin.json - 发布只能更新目标插件的代码,绝不能更新整个 harness。 插件通常作为 monorepo 中的 workspace member 开发(例如
deepseek-harness),但会从其独立仓库发布(例如packages/client/ui-plugin-market);此类 member 列在lovstudio/dsh-plugin-marketplace的scripts/release/families.ts中。在这种情况下,发布差异仅包含插件自身的文件:将变更后的插件源码及其已提交的构建制品同步到独立仓库,同时保持所有其他 harness 变更(无关的进行中功能、其他包、根 manifest)不变。保持独立仓库的自引用 import 风格——monorepo 内部的包引用(如externalRepositoryMembers)应映射到插件自身的 exports(@deepseek-ai/dsh-host-plugin-market-github),不得直接覆盖过去。@lovstudio/dsh-plugin-marketplace/... - 当用户未指定渠道时,对于 为
publishConfig.access的public插件,默认使用 npm;对于 meant to be consumed from source 的插件,默认使用 git。当请求中省略渠道时,不要询问渠道选择问题。@lovstudio/dsh-* - 一次请求可以在一次运行中选择多个渠道。
- 版本、可见性和目标账户属于发布输入。沿用源包中的版本;仅当用户希望进行当前 manifest 未隐含的版本升级时才询问。
- 不要将渠道元数据、凭据、暂存文件和归档放入规范源代码中。
- 不要虚构不存在的注册表或市场。如果用户要求“上架 DSH 市场”,请说明三个真实渠道和 topic,然后基于这些渠道继续执行。
dsh-plugin
此版本支持的渠道:
- npm — 发布预构建的 (或纯
lib/)bundle,使index.js能够安装可直接加载的代码。dsh plugin add <pkg> - git — 推送源码仓库、标记 release tag,并提供 script,使
prepare能够在安装时完成构建。dsh plugin --profile <name> add github:owner/repo#<sha> - tarball — 使用 生成自包含归档,用于离线安装或评审安装。
pnpm pack - 社区镜像(可选) — 在 仓库的
deepseek-ai/deepseek-harness下注册一个树外插件,使其随 harness 源码树一起分发。packages/community/ - 发现 topic — 添加 GitHub topic;对于 lovstudio 插件,还需添加
dsh-plugin和dsh,以便官方发现入口找到该插件。deepseek-harness
对于任何其他平台,请遵循 ,并在实现适配器之前核实其当前官方名称、提交契约、公开 URL 和完成信号。绝不能将出现上传对话框视为发布已经完成。
references/publish-dsh.mdWorkflow (MANDATORY)
工作流(强制执行)
Step 0: Resolve roots and settings
第 0 步:解析根目录和设置
- Resolve this Skill as .
SKILL_DIR - Resolve the plugin source from an explicit path, current directory, or
conversation. Confirm it is a DSH plugin (has or
dsh.bundle).dsh.plugin.json - Distinguish the development tree from the publishing repository. All
lovstudio plugins are developed under , one standalone git repository per plugin (e.g.
~/lovstudio/dsh-plugins/); each is installed into the harness locally for testing and published from its own repository. When a plugin still lives inside the~/lovstudio/dsh-plugins/dsh-plugin-marketplacemonorepo as a workspace member, that member is only the source of the plugin's changes and the standalone repo is the release target. Confirm which one the user means before publishing.deepseek-harness - Resolve the DSH harness checkout (for gates and the optional community
mirror) from the repo where the plugin was authored, or
if set. When publishing from a standalone plugin repo, the gates run there — not from the harness root.
$DSH_HARNESS
- 将此 Skill 解析为 。
SKILL_DIR - 从显式路径、当前目录或对话中解析插件源码。确认它是 DSH 插件(包含 或
dsh.bundle)。dsh.plugin.json - 区分开发目录与发布仓库。 所有 lovstudio 插件都在 下开发,每个插件对应一个独立 git 仓库(例如
~/lovstudio/dsh-plugins/);插件会安装到本地 harness 中进行测试,并从其独立仓库发布。当插件仍位于~/lovstudio/dsh-plugins/dsh-plugin-marketplacemonorepo 中并作为 workspace member 存在时,该 member 仅是插件变更的来源,独立仓库才是发布目标。发布前确认用户指的是哪一个。deepseek-harness - 从插件编写所在的仓库或已设置的 中解析 DSH harness checkout(用于门禁和可选的社区镜像)。从独立插件仓库发布时,门禁应在该仓库中运行,而不是 harness 根目录。
$DSH_HARNESS
Step 1: Validate canonical source
第 1 步:验证规范源代码
Check that the source has no generated release artifacts, no platform
metadata, and no uncommitted surprises. Record: package name, version,
/ shape, files field, git state, and whether a
remote already exists.
dsh.bundledsh.plugin.jsonKey invariants (from the harness /
): ; entry points declared;
exact (no , maps, or stale root declarations);
in peer + dev deps at the same range; every dsh peer dep mirrored into devDeps.
A external plugin additionally sets
and including .
package.jsonpackages/AGENTS.mddocs/cookbook/adding-a-package.mdtype: modulefilessrc@deepseek-ai/cordis@lovstudio/dsh-*publishConfig.access: "public"keywordsdsh-plugin检查源码中不存在生成的发布制品、平台元数据或未提交的意外变更。记录:包名、版本、 / 结构、 字段、git 状态,以及是否已经存在 remote。
dsh.bundledsh.plugin.jsonfiles关键的 不变量(来自 harness 的 / ):设置 ;声明入口点;精确设置 (不得包含 、source map 或陈旧的根级声明); 在 peer deps 和 dev deps 中使用相同版本范围;每个 DSH peer dependency 都必须镜像到 devDeps。
package.jsonpackages/AGENTS.mddocs/cookbook/adding-a-package.mdtype: modulefilessrc@deepseek-ai/cordis@lovstudio/dsh-*publishConfig.access: "public"keywordsdsh-pluginStep 2: Run the repo gates
第 2 步:运行仓库门禁
Run the gates from the plugin's own publishing repository — the standalone
repo when the plugin publishes from one, otherwise the harness root. Never run
the whole-harness gate suite for a plugin that publishes from its own repo:
sh
undefined从插件自己的发布仓库运行门禁——从独立仓库发布时使用独立仓库,否则使用 harness 根目录。对于从自身仓库发布的插件,绝不能运行整个 harness 的门禁套件:
sh
undefinedStandalone plugin repo
Standalone plugin repo
pnpm install
pnpm run typecheck && pnpm run lint && pnpm run build
pnpm pack --dry-run # proves the publish payload packs
pnpm install
pnpm run typecheck && pnpm run lint && pnpm run build
pnpm pack --dry-run # proves the publish payload packs
Plugin developed inside the harness monorepo but publishing from its own repo:
Plugin developed inside the harness monorepo but publishing from its own repo:
validate only the plugin's changed surface (its package tests/build), not the
validate only the plugin's changed surface (its package tests/build), not the
harness-wide suite — unrelated in-flight harness changes must not block or
harness-wide suite — unrelated in-flight harness changes must not block or
leak into the plugin release.
leak into the plugin release.
Then run only the checks the changed surface reaches — do not default to the
full suite. Any failure blocks publication.
随后仅运行变更范围所涉及的检查,不要默认运行完整测试套件。任何失败都会阻止发布。Step 3: Decide channels and release model
第 3 步:确定渠道和发布模式
If channels are explicit, proceed. If none are named, select npm (for public
) and/or git (for source installs) and proceed without asking.
@lovstudio/*For each channel, resolve only required fields:
- version to publish (reuse the manifest version unless the user asked for a bump);
- npm package name, visibility, and dist-tag;
- git remote, tag name, and whether to pin installs to a commit;
- community mirror group under (default
packages/<group>/).community
Do not ask users to choose implementation details such as staging layout,
archive format, or adapter order.
如果用户明确指定了渠道,直接执行。如果没有指定渠道,则为公开的 插件选择 npm,为源码安装场景选择 git,并在不询问用户的情况下继续执行。
@lovstudio/*对于每个渠道,仅解析必需字段:
- 要发布的版本(沿用 manifest 版本,除非用户要求升级版本);
- npm 包名、可见性和 dist-tag;
- git remote、tag 名称,以及是否将安装固定到特定 commit;
- 下的社区镜像分组(默认为
packages/<group>/)。community
不要让用户选择暂存目录结构、归档格式或适配器执行顺序等实现细节。
Step 4: Build a per-channel plan
第 4 步:制定按渠道划分的发布计划
Read , then execute only the selected channels.
Keep independent state for each target so one failure does not masquerade as a
successful multi-channel release.
references/publish-dsh.mdBuild the release diff before touching any channel. The release diff is
the target plugin's own changes only. When the plugin is developed inside the
harness monorepo and published from a standalone repo:
- Compare the plugin's monorepo member tree against the standalone repo to find the functional delta (for example a one-line icon fix). Ignore monorepo-internal import-name differences — the standalone repo keeps its self-referencing style.
- Apply only that delta to the standalone repo: the changed source file(s),
the committed build artifacts they feed (e.g. ), the
lib/client.cjsversion bump, and thepackage.jsonentry.CHANGELOG.md - Do not copy over other harness files, unrelated in-flight features, or the
root manifests. in the standalone repo must show exactly the plugin release files before committing.
git status
读取 ,然后仅执行选定的渠道。为每个目标维护独立状态,避免将某个目标的失败伪装成多渠道发布成功。
references/publish-dsh.md在接触任何渠道之前先构建发布差异。 发布差异仅包含目标插件自身的变更。当插件在 harness monorepo 内开发、但从独立仓库发布时:
- 比较插件的 monorepo member 目录与独立仓库,找出功能差异(例如一行图标修复)。忽略 monorepo 内部的 import 名称差异——独立仓库应保持其自引用风格。
- 仅将该差异应用到独立仓库:变更的源文件、相应的已提交构建制品(例如 )、
lib/client.cjs版本升级,以及package.json条目。CHANGELOG.md - 不要复制其他 harness 文件、无关的进行中功能或根 manifest。提交前,独立仓库中的 必须恰好显示插件发布相关文件。
git status
Step 5: Publish to npm
第 5 步:发布到 npm
Read the npm section of . Ensure the build output is
in the published (run if the manifest
declares it). Then:
references/publish-dsh.mdfilesprepublishOnly: pnpm buildsh
pnpm publish --access public
git tag v<VERSION>
git push origin v<VERSION>Record the published version, dist-tag, and the package page URL. Verify with
that the exact version and expected files are live.
npm view <pkg>@<version>读取 中的 npm 部分。确保构建输出包含在发布的 中;如果 manifest 声明了 ,则运行它。然后:
references/publish-dsh.mdfilesprepublishOnly: pnpm buildsh
pnpm publish --access public
git tag v<VERSION>
git push origin v<VERSION>记录已发布版本、dist-tag 和包页面 URL。使用 验证准确版本和预期文件已经上线。
npm view <pkg>@<version>Step 6: Publish to git
第 6 步:发布到 git
Read the git section of . Ensure a self-contained
script exists (builds entry points from source; no sibling-monorepo
assumptions). Push the release commit and tag, then verify the git-install
path on a clean profile:
references/publish-dsh.mdpreparesh
dsh plugin --profile demo add github:<owner>/<repo>#<sha>If pnpm >= 10 blocks the script, record the exact package key the
allowlist needs ( in the profile's ) as a
follow-up for the user, not as a silent pass.
prepareallowBuildspnpm-workspace.yaml读取 中的 git 部分。确保存在自包含的 script(从源码构建入口点;不能依赖相邻 monorepo)。推送发布 commit 和 tag,然后在干净的 profile 上验证 git 安装路径:
references/publish-dsh.mdpreparesh
dsh plugin --profile demo add github:<owner>/<repo>#<sha>如果 pnpm >= 10 阻止了 script,请将 allowlist 所需的准确包键(profile 的 中的 )作为后续事项告知用户,不要静默判定为通过。
preparepnpm-workspace.yamlallowBuildsStep 7: Ship a tarball
第 7 步:交付 tarball
Read the tarball section of . Build a clean archive
outside canonical source:
references/publish-dsh.mdsh
pnpm pack --out /tmp/<pkg>-<version>.tgz
dsh plugin --profile demo add /tmp/<pkg>-<version>.tgzRecord the archive path, checksum, file count, and the successful .
add读取 中的 tarball 部分。在规范源代码之外构建干净的归档:
references/publish-dsh.mdsh
pnpm pack --out /tmp/<pkg>-<version>.tgz
dsh plugin --profile demo add /tmp/<pkg>-<version>.tgz记录归档路径、校验和、文件数量以及成功执行 的结果。
addStep 8: Community mirror and discovery topic (optional)
第 8 步:社区镜像和发现 topic(可选)
When the plugin should ship with the harness, mirror it under
(follow ), or run the
standard PR flow for the repo. Tag the
GitHub repo with the topic (and ). Record the
topic set and the PR/release state.
packages/community/docs/cookbook/adding-a-package.mddshdeepseek-ai/deepseek-harnessdsh-plugindeepseek-harness当插件需要随 harness 一起分发时,将其镜像到 下(遵循 ),或者对 仓库运行标准 PR 流程。为 GitHub 仓库添加 topic(以及 )。记录 topic 集合以及 PR/release 状态。
packages/community/docs/cookbook/adding-a-package.mddeepseek-ai/deepseek-harnessdshdsh-plugindeepseek-harnessStep 9: Verify load in the harness
第 9 步:在 harness 中验证加载
Whatever the channels, the final gate is that the plugin loads:
sh
dsh --profile demo --dump-config # expect a "# == <pkg>" layer
dsh --profile demo # boots without errorA parsed archive or a pushed tag is only ; the plugin is
only when the layer appears and the harness boots.
publishedlive无论使用哪些渠道,最终门禁都是插件能够加载:
sh
dsh --profile demo --dump-config # expect a "# == <pkg>" layer
dsh --profile demo # boots without error归档能够被解析或 tag 已经推送,只能算 ;只有对应 layer 出现且 harness 成功启动,插件才算 。
publishedliveStep 10: Multi-channel report
第 10 步:多渠道报告
Report each target separately:
| Channel | State | Version/artifact | Evidence | Follow-up |
|---|---|---|---|---|
| TARGET | prepared/published/live | VALUE | URL or local path | ACTION |
Use precise states. and represent different outcomes.
publishedlive分别报告每个目标:
| 渠道 | 状态 | 版本/制品 | 证据 | 后续操作 |
|---|---|---|---|---|
| TARGET | prepared/published/live | VALUE | URL 或本地路径 | ACTION |
使用准确的状态。 和 代表不同的结果。
publishedliveDependencies
依赖项
- Node.js >= 20, pnpm >= 10
- CLI on PATH (or run gates via
dshfrom the harness source)pnpm dsh - + GitHub CLI for git/topic/release operations
git - npm credentials for the npm channel
- Node.js >= 20、pnpm >= 10
- PATH 中包含 CLI(或通过 harness 源码中的
dsh运行门禁)pnpm dsh - 用于 git、topic 和 release 操作的 与 GitHub CLI
git - npm 渠道所需的 npm 凭据
Local development
本地开发
Validate this publisher Skill's own source with the harness gates, or inspect
for the grounded contract behind each step.
references/publish-dsh.md使用 harness 门禁验证此 publisher Skill 自身的源码,或检查 ,了解每个步骤背后的可靠契约。
references/publish-dsh.mdRuntime context (shared)
运行时上下文(共享)
运行前读取本 Skill 包的 ,由宿主提供 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
skill.yamlskill-runtime/v1- 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
- 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
required: true - 报错提供可复制的 、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。
context_id
运行前读取本 Skill 包的 ,由宿主提供 上下文。字段解析顺序为:当前请求、项目上下文、个人 Preferences、品牌 Profile、通用默认值。
skill.yamlskill-runtime/v1- 只使用 Manifest 声明的字段;Profile 保存公开品牌事实,Preferences 保存个人工作偏好。
- 字段缺失时,按 Manifest 的问题配置向用户提出一个聚焦问题;用户明确同意后再保存回答。
required: true - 报错提供可复制的 、字段路径与来源,诊断内容避开秘密、完整私人路径和原始配置。
context_id
References
参考资料
- — the grounded per-channel SOP with authoritative sources.
references/publish-dsh.md - — the companion skill that produces the validated package this skill publishes.
dsh-plugin-creator
- — 包含权威来源的分渠道标准操作流程。
references/publish-dsh.md - — 生成此 skill 所发布验证包的配套 skill。
dsh-plugin-creator
通用反馈闭环
通用反馈闭环
用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
- 先判断意见是 (仅本次)还是
task-specific(可跨任务复用)。reusable - 只修改当前任务,不改 Skill。
task-specific - 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
reusable - 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
- 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
reusable
用户在 Skill 驱动任务中提出修改意见时,继续当前产物前必须执行:
- 先判断意见是 (仅本次)还是
task-specific(可跨任务复用)。reusable - 只修改当前任务,不改 Skill。
task-specific - 先确定作用域:领域规则先更新对应 canonical Skill;适用于所有 Skill 的规则先更新共享规范。
reusable - 完成规则更新、版本、lint 与分发核验后,再把修改应用到当前任务。
- 修改会使此前的“确认”“继续”“发吧”失效;完成当前产物修改和回读后必须停下,等待用户下一步指示,不自动进入发布、提交或其他外部写入。
reusable