DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Plugin Template — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
P

@your-scope/dsh-plugin-template

Plugin Template

用于 DeepSeek Harness 的独立 Cordis 插件模板

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:omdsh-dev/plugin-template#2803a03858e914101be93a2f51558717af37303d
README兼容性版本

兼容性与来源证明

Plugin Template 以 @your-scope/dsh-plugin-template 发布,当前版本为 0.0.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/20

版本

0.0.1stable
2026/8/20
最新版
0.0.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
BSD-3-Clause
发布源
github
GitHub
★ 13
周下载
0
最近提交
2026/9/16
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

README

DeepSeek Harness Plugin Template

English | 中文

A self-contained standalone repository template for an ESM Cordis plugin. Every source file, compiler setting, test fixture, contributor instruction, skill, and build helper used by the repository is inside this directory; every development input resolves below this repository root.

Normal npm dependencies are resolved from the package registry. A DSH host is a runtime consumer of the finished package, not a source or build input.

Repository layout

.
├── .agents/skills/               # Repository-local plugin development workflow
│   ├── dsh-plugin-development/   # End-to-end coordinator
│   └── dsh-plugin-*/             # Plan, scaffold, implement, compose, test, release
├── docs/
│   └── dsh-plugin-contracts.md   # Shared local contract for all plugin skills
├── patches/
│   └── README.md                 # Dependency and DSH-host patch contract
├── scripts/
│   ├── extract-patch.mjs         # Config-driven host patch regeneration (see patches/README.md)
│   ├── patch.sh                  # Idempotent host patch application
│   └── verify-self-contained.mjs # Repository-boundary and skill metadata check
├── src/
│   ├── README.md                 # Growth rules for services and feature modules
│   ├── config.ts                 # Serializable schema and resolved defaults
│   ├── index.ts                  # Loader-facing function-plugin namespace
│   ├── invariant.ts              # Package-owned invariant companion
│   └── runtime.ts                # Fakeable host boundary and Cordis activation
├── tests/
│   ├── README.md                 # Harness, feature-test, and snapshot conventions
│   ├── harness.ts                # Shared real-Cordis test mount
│   ├── plugin.spec.ts            # Loader export and activation tests
│   └── snapshots/
│       └── README.md             # Optional product-visible fixture contract
├── .gitignore                    # Generated artifact exclusions
├── AGENTS.md                     # Repository-local contributor rules
├── LICENSE                       # Template license
├── README.md                     # Repository and usage contract
├── cordis.patch.yml              # Profile bundle contribution
├── package.json                  # Exports, peers, dsh.bundle.patch
├── pnpm-lock.yaml                # Reproducible registry dependency graph
├── pnpm-workspace.yaml           # Package-manager and optional patch policy
├── tsconfig.json                 # Strict no-emit typecheck project
├── tsconfig.vitest.json          # Source-plane test typecheck project
├── tsdown.config.ts              # Direct source-to-runtime/declaration build
└── vitest.config.ts              # Test runner configuration

Scalable source and test structure

The baseline mirrors the scalable first-level split used by larger DSH plugins while keeping product behavior minimal:

  • src/index.ts owns the Loader namespace;
  • src/config.ts owns the serializable schema and direct-call defaults;
  • src/runtime.ts owns fakeable host boundaries and Cordis activation;
  • tests/harness.ts owns the shared real-Cordis test mount;
  • cohesive production behavior grows under capability-named src/<feature>/ directories;
  • stable product-visible expected output belongs under tests/snapshots/;
  • dependency and DSH-host patches belong under patches/: pnpm patchedDependencies for exact registry versions, self-contained diffs against the DSH host when the plugin needs host source changes.

Directories such as Turtle UI's chat, components, and extension areas describe that product, not the DSH plugin contract. Create equivalent feature directories only when the new plugin owns those capabilities. See src/README.md, tests/README.md, tests/snapshots/README.md, and patches/README.md for the local rules.

Create your plugin

  1. Replace the package identity in package.json, src/index.ts, src/config.ts, src/runtime.ts, src/invariant.ts, tests/plugin.spec.ts, cordis.patch.yml, the TypeScript package metadata, README.md, and AGENTS.md.
  2. Replace the template package name @your-scope/dsh-plugin-template and plugin ids only in those identity owners. Do not perform a global replacement inside .agents/skills/; its generic examples and marker checks must remain reusable.
  3. Update description, LICENSE, and cordis.patch.yml.
  4. Add only the DSH host services used by the implementation to the package contract and composition patch. Keep source and build dependencies resolvable from this repository's node_modules.
  5. Replace the empty invariant installer when the package owns an authoritative event or mutable data relationship.
  6. Implement activation and host-boundary behavior in src/runtime.ts, moving cohesive capabilities into project-specific src/<feature>/ directories as needed. Keep src/index.ts limited to Loader metadata and public re-exports, and scope registrations through ctx.effect(), ctx.on(), or registry disposers.
  7. Keep every source, compiler, documentation, and project-reference path inside this repository. Describe files from the project root, for example docs/dsh-plugin-contracts.md. Do not add local-path link: or file: dependencies.
  8. Set private to false only when the package's public dependencies and distribution artifacts are ready.

Do not add a default export to a function plugin. Cordis Loader unwraps exports.default ?? exports; a stray default export discards namespace exports such as inject, Config, and apply.

Bundled development skills

DSH discovers the repository-local workflow under .agents/skills/. Start with dsh-plugin-development for the complete sequence, or invoke one stage directly:

SkillPurpose
dsh-plugin-planDecide plugin form, dependencies, configuration, invariant, composition, and evidence.
dsh-plugin-scaffoldInstantiate and baseline-verify a new repository from this template.
dsh-plugin-implementImplement lifecycle-safe Cordis behavior, metadata, docs, and invariants.
dsh-plugin-composeInstall the bundle into an isolated profile and prove effective activation.
dsh-plugin-testVerify Loader exports, behavior, disposal, composition, snapshots, and artifacts.
dsh-plugin-releaseCheck local, Git, or npm distribution readiness without publishing implicitly.

Keep these directories when copying the template so future sessions rooted in the plugin repository retain the same workflow.

Independent development

Run every command from this directory:

pnpm install
pnpm run verify:self-contained
pnpm run typecheck
pnpm test
pnpm run build

pnpm install resolves only the dependencies declared by this package. verify:self-contained rejects filesystem dependency specs, compiler paths that leave the repository, external or broken Markdown links, absolute workstation paths, and malformed bundled skill metadata. typecheck checks both the source project in tsconfig.json and the source-plane tests in tsconfig.vitest.json against the local strict compiler baseline. build compiles the host entries directly from src/ and emits ready-to-pack runtime JavaScript plus declarations into lib/; it does not run an install-time lifecycle build.

The release artifact is built from src/ before packing. Profile or consumer installation uses the ready-made lib/ output and does not run prepare; pnpm pack --dry-run --json verifies the final archive contents.

CI

Two GitHub Actions workflows ship with the template:

  • .github/workflows/ci.yml — every push to main and every pull request: install with the frozen lockfile, verify:self-contained, typecheck, tests, and build.
  • .github/workflows/release.yml — every push to main: verifies, typechecks, tests, builds, packs the ready-made tarball (pnpm pack), and publishes it to a GitHub Release tagged v<version> from package.json. Bump version to cut a new release; re-pushing the same version refreshes that release's artifact.

Profile activation

The package manifest declares the bundle patch:

{
  "dsh": {
    "bundle": {
      "patch": "./cordis.patch.yml"
    }
  }
}

A DSH host may install this package into a profile and apply cordis.patch.yml over its own runtime composition. That host integration is intentionally outside this repository's build and test inputs. The patch composes plugins; it does not alter host source, compiler settings, build scripts, or catalogs.

The invariant companion uses a narrow local interface for the host's invariants service. This keeps the package build independent of the host's private source package while preserving the runtime registration used by a DSH profile.

Plugin forms

This template demonstrates a function plugin and therefore named exports:

// src/index.ts
export const name = 'plugin-template'
export const inject: string[] = []
export { Config } from './config.ts'
export { apply } from './runtime.ts'

// src/config.ts
export interface Config { /* serializable fields */ }
export const Config: z<Config> = z.object({ /* validation and defaults */ })

// src/runtime.ts
export function apply(ctx: Context, config: Config): void { /* effects */ }

A service provider instead normally default-exports its Service subclass. Do not mix the two forms.

Distribution checks

Before considering packed or GitHub Release distribution, build and inspect the final archive:

pnpm run verify:self-contained
pnpm run typecheck
pnpm test
pnpm run build
pnpm pack --dry-run --json

The final package must contain every runtime and declaration file named by main, types, exports, and files. Keep private: true until the package's DSH host peers are available through the selected distribution channel.

Testing guidance

The included test proves Loader-safe ESM exports and schema-resolved activation. Replace the activation assertions with observable behavior and disposal assertions for every registry contribution. Product-visible plugins should add a real Loader/profile composition test in the consuming DSH application rather than relying only on hand-mounted unit tests.