证据快照复核于 2026-09-16GitHub 数据核对日期: 2026-08-21
证据已验证Plugin Bundle开发工具deepseek-harness Profilecordis Profile

DeepSeek Harness Plugin Template

用于构建和打包 DeepSeek Harness Bundle 的独立 ESM Cordis 插件模板。

快速了解

它能做什么

用于构建和打包 DeepSeek Harness Bundle 的独立 ESM Cordis 插件模板。

本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。

使用场景
开发工具配置编码测试
适配技术
deepseek-harnesscordisschemasterypnpm
兼容性

deepseek-harness Profile, cordis Profile
Not declared in supplied evidence

可信度与状态

证据已验证
核对日期 2026/9/16 UTC 14:31

有代码证据的贡献

它为 DSH 增加什么

DSH 插件开发

用于独立 DSH Cordis 插件的规划、脚手架搭建、实现、组合、测试与发布就绪检查的仓库内工作流。

机制证据
DSH 插件脚手架

指导基于此模板创建新的独立插件仓库,并验证初始包配置、构建、测试和打包设置。

机制证据

选择前先看

此仓库适合作为新 DSH 插件的起点,包含包清单、TypeScript 构建与测试配置、Cordis Bundle 补丁,以及仓库内开发技能。接入 Profile 前,需将示例包名、插件 ID、描述和补丁配置替换为真实插件的标识与行为。

适合谁

创建或规范化独立 DeepSeek Harness Cordis 插件的开发者。

常见任务

  • 以现成的 ESM、TypeScript、pnpm、静态检查、测试和构建结构创建新的 DSH/Cordis 插件仓库。
  • 添加将插件插入 DSH 组合配置的 Profile Bundle 补丁。
  • 使用内置的规划、实现、组合、测试和发布就绪指导开发插件。

权限与数据

现有证据仅描述本地开发模板与 Profile 组合元数据,未能确认运行时数据访问行为。

权限
  • 在使用方环境中需要 Cordis 和 Schemastery 对等依赖。
  • 其 Bundle 补丁会向选定的 DSH Profile 插入插件行。
数据处理
  • 提供的证据未说明数据收集、存储、传输或保留行为。
凭据
  • 提供的证据未声明凭据要求。

局限

  • 这是模板,不是功能完整的终端用户插件。
  • 清单和补丁仍含有 @your-scope/dsh-plugin-template 与 plugin-template 等占位标识。
  • 未找到对应的 npm Registry 包版本。
  • 尚未执行或验证 Profile 激活和运行时行为。

DSHub 已核对

  • 已验证固定 Git 源和 Bundle 结构。
  • package.json 声明了 DSH Bundle 补丁及构建后的 lib 导出。
  • 清单声明 Node ^22.19.0 或 >=24.0.0,以及 Cordis 和 Schemastery 对等依赖。

DSHub 未核对

  • 在 DSH Profile 中的安装。
  • 构建、静态检查、测试、包归档内容和运行时激活。
  • 与特定 DeepSeek Harness 版本的兼容性。

固定版本安装

安装 DeepSeek Harness Plugin Template

这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。

访问源码项目

维护者原文

项目 README

查看 commit 8c678e1 对应的 README
维护者编写的上游内容原文于 2026/9/16README.md 获取,正文和仓库相对媒体固定到 commit 8c678e13d085,内容哈希为 7facfb5f0134。以下是未经 DSHub 翻译的上游原文,语言可能与当前页面不同;第三方托管的 badge 可能独立更新。

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

.
├── .oxlintrc.json                 # Type-aware Oxlint configuration
├── .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
├── 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                 # Compiler and type-aware lint project
├── tsdown.config.ts              # Direct source-to-runtime/declaration build
└── vitest.config.ts              # Test runner configuration

Scalable source and test structure

A package may be host-only, client-only, or split across host and browser faces. Keep Loader metadata, configuration, runtime/service boundaries, browser behavior, shared contracts, and tests in the owners appropriate to the package; the template does not require every plugin to copy one fixed directory layout.

The template's sample skeleton still uses src/index.ts, src/config.ts, src/runtime.ts, src/invariant.ts, tests/harness.ts, and tests/plugin.spec.ts; retain those owners when they fit the package, and document any deliberate replacement. Stable product-visible expected output belongs under the package's actual snapshot owner. Dependency and DSH-host patches use the optional patches/ contract when needed.

Create your plugin

  1. Replace package identity in package.json, the Loader owner, configuration/runtime/invariant owners, focused test owners, bundle metadata, TypeScript metadata, README.md, and AGENTS.md as applicable. The sample skeleton names these owners explicitly; a deliberate replacement must update the package's local documentation and static-analysis configuration too.
  2. Choose and record the exact npm package name before replacing identity. It may be scoped or unscoped (for example, comem); do not assume the template's @your-scope/dsh- prefix. Use the selected name verbatim in package.json, bundle rows, invariant registration, exports, tests, and documentation. 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, keywords, 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; host-provided runtime APIs remain consumer-supplied peers.
  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 the actual runtime/service owners, moving cohesive capabilities into project-specific modules as needed. Keep src/index.ts limited to Loader metadata and public re-exports when that matches the package, 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:

Skill Purpose
dsh-plugin-plan Decide plugin form, dependencies, configuration, invariant, composition, and evidence.
dsh-plugin-scaffold Instantiate and baseline-verify a new repository from this template.
dsh-plugin-align Migrate an existing non-template repository to this toolchain without replacing product behavior.
dsh-plugin-implement Implement lifecycle-safe Cordis behavior, metadata, docs, and invariants.
dsh-plugin-i18n Localize browser UI with typed dictionaries, locale seats, fallback, and disposal evidence.
dsh-plugin-compose Install the bundle into an isolated profile and prove effective activation.
dsh-plugin-test Verify Loader exports, behavior, disposal, composition, snapshots, and artifacts.
dsh-plugin-release Check 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 lint
pnpm test
pnpm run build

lint runs Oxlint with type-aware analysis and denies warnings for the configured source and test projects. build runs the configured source-to-artifact pipeline, including any declaration assembly or final artifact verifier owned by the package, and emits ready-to-pack output; it does not run an install-time lifecycle build. Extra arguments are passed through to tsdown, so pnpm run build --sourcemap emits source maps for local debugging; the default build emits none.

The release artifact is built from the configured source owners 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, Oxlint static analysis, tests, and build.
  • .github/workflows/release.yml — every push to main: runs Oxlint, tests, builds, packs the ready-made tarball (pnpm pack), and follows the repository's configured GitHub Release policy.

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 an invariants-enabled DSH profile. Insert its bundle row only when the consuming profile provides that service; ordinary dsh-base/dsh-web-app profiles should omit the row.

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 lint
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.

有意识地管理

安装与管理

前置条件与目标 Profile

目标 deepseek-harness Profile, cordis Profile

交付方式 Git Bundle — omdsh-dev/plugin-template#8c678e13d085bb2deefd53a5f0105186896f1ea4

验证、更新与移除

显示生命周期命令
验证
dsh plugin --profile deepseek-harness list

兼容性与访问范围

DSH bundle with Cordis and Schemastery peer dependencies Not declared in supplied evidence

检查兼容性证据

风险事实

template-placeholders

Contains placeholder package and plugin identity

证据
license

BSD-3-Clause license

证据
证据与编辑审查Manifest、Bundle patch、分发与新鲜度

不可变证据

审查状态与源码活动

AI 已审查

请将其视为开发模板;在分发或生产使用前,应审查并替换全部占位标识和组合配置。

AI 审查于 2026/9/16 UTC 14:32GitHub 事实核对日期: 2026/9/16 UTC 14:32

自当前证据基线以来,没有记录到重要源码变化。

下一步

按 Plugin 安装流程操作

订阅重要变化: DeepSeek Harness Plugin Template