Plugin template repo (based on the official turtle-ui repo).
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:omdsh-dev/plugin-template
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
A self-contained standalone repository template for an ESM Cordis plugin targeting DeepSeek Harness 0.2.2-rc.1. Every source file, compiler setting, test fixture, contributor instruction, skill, and build helper used by the repository lives below this root. A DSH host is a runtime consumer of the finished package, not a development input.
Documentation map
| Need | Read |
|---|---|
| Contract rules: plugin forms, manifest, dependencies, display, lifecycle, composition, client, distribution | docs/dsh-plugin-contracts.md |
| End-to-end workflow and stage routing | .agents/skills/dsh-plugin-development/SKILL.md |
| Source, test, and patch layout | src/LAYOUT.md, tests/LAYOUT.md, patches/LAYOUT.md |
| Commands, CI, and release flow | this README and .github/workflows |
Repository layout
.
├── .agents/skills/ # Repository-local plugin development workflow
│ ├── dsh-plugin-development/ # End-to-end coordinator
│ └── dsh-plugin-*/ # Stage skills
├── docs/
│ └── dsh-plugin-contracts.md # Authoritative package and integration contract
├── patches/
│ └── LAYOUT.md # Dependency and DSH-host patch contract
├── scripts/
│ ├── extract-patch.mjs # Host patch regeneration
│ └── patch.sh # Idempotent host patch application
├── src/
│ ├── assets/
│ │ ├── icon.svg # Plugin icon exported through `./icon`
│ │ └── locale/
│ │ ├── en.json # Display metadata
│ │ └── zh.json
│ ├── LAYOUT.md # Growth rules for source modules
│ ├── config.ts # Schemastery schema and defaults
│ ├── index.ts # Loader-facing function-plugin namespace
│ └── runtime.ts # Host boundary and activation
├── tests/
│ ├── LAYOUT.md # Test conventions
│ ├── harness.ts # Shared real-Cordis mount
│ ├── plugin.test.ts # Loader and activation tests
│ └── snapshots/
│ └── LAYOUT.md # Optional visible-output fixtures
├── .oxlintrc.json # Type-aware Oxlint configuration
├── AGENTS.md # Contributor standing orders and navigation
├── cordis.patch.yml # Profile bundle contribution
├── package.json # Exports, peers, engines, bundle metadata
├── pnpm-lock.yaml # Reproducible dependency graph
├── pnpm-workspace.yaml # Package-manager policy
├── tsconfig.json # Compiler and type-aware lint project
├── tsdown.config.ts # Source-to-runtime/declaration build
└── vitest.config.ts # Test runner configuration
Package contract
docs/dsh-plugin-contracts.md owns the full contract. The orientation points are:
- A function plugin exports
name,inject,Config, andapplyas one ESM namespace and has no default export. engines.nodeis>=24.9.0;engines.dshdeclares the supported DSH range;dsh.manifestVersionanddsh.bundle.patchdescribe the public bundle layer.- Display metadata reaches Plugin Manager through the exported
./locale/*.jsonand./iconresources. This template stores their physical files undersrc/assets/and lists them infiles. @deepseek-ai/cordisand@deepseek-ai/schemasteryare host-supplied peers, duplicated indevDependenciesfor local checks. See dependencies.- A browser face declares
dsh.clientand exports its built bundle at./client.
Create your plugin
- Replace package identity in
package.json, the Loader owner, configuration/runtime owners, focused tests, bundle metadata, TypeScript metadata, both READMEs,AGENTS.md, andsrc/assets/. - Choose the exact npm package name. It may be scoped or unscoped; do not assume the template's
@your-scope/dsh-prefix. Replace it only in identity owners, never globally inside.agents/skills/. - Set
engines.dshto the range you support. Keepengines.nodeat Node 24 LTS or newer unless a different host contract is deliberate. - Update
keywords,LICENSE,cordis.patch.yml, and the display title, description, and icon. - Add only the DSH host services the implementation uses. Apply dependencies when placing each package.
- Implement activation and host-boundary behavior in the runtime/service owners, keeping registrations fiber-owned and disposing them in tests.
- Keep every source, compiler, documentation, and project-reference path inside this repository. Do not add
link:orfile:dependencies. - Set
privatetofalseonly 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 inject, Config, and apply.
Bundled development skills
Start with dsh-plugin-development for the complete sequence, or invoke one stage directly:
| Skill | Purpose |
|---|---|
| plan | Decide form, dependencies, configuration, compatibility, display, composition, evidence, and distribution. |
| scaffold | Instantiate and baseline-verify a new repository from this template. |
| align | Migrate an existing repository to this toolchain without changing behavior. |
| implement | Implement lifecycle-safe behavior, configuration, metadata, docs, and tests. |
| client | Add a dsh.client browser face, slots, settings forms, and ModuleLoader checks. |
| i18n | Localize browser UI with typed dictionaries and disposal evidence. |
| compose | Install the bundle into a profile and prove activation and compatibility. |
| test | Select the smallest evidence for Loader, behavior, disposal, composition, and artifacts. |
| release | Check packed, Git, or npm release readiness without publishing. |
Keep these directories when copying the template.
Independent development
Run from this repository root:
pnpm install
pnpm run fmt:check
pnpm run lint
pnpm test
pnpm run build
pnpm pack --dry-run --json
lint is the type-aware static-analysis gate. test uses the Vitest forks pool; a restricted host that rejects child-process forks can run vitest run --pool=threads locally. build emits the ready-to-pack lib/ runtime and declarations without an install-time build.
CI
- check.yml: runs checks on
mainpushes, pull requests, and manual dispatch, and both build workflows call it. - test-build.yml: manually builds a test package.
- release-build.yml: builds a release package from a
v*.*.*tag or a manual dispatch. - npm-publish.yml: verifies SHA256 and publishes a successful test or release build to npm through OIDC trusted publishing.
A plain main push runs checks only. Test and release builds lead to npm publication when the package's trusted publisher is configured.
For npm setup, version rules, and provenance limits, read release skill.
Profile activation
Install through the plugin channel:
dsh plugin --profile <profile> add <package-or-tarball>
Profile startup checks engines.dsh, applies dsh.bundle.patch in bundle order, and reads display metadata without activating the plugin. See manifest and compatibility and bundle composition.
Plugin forms
export const name = 'plugin-template'
export const inject: string[] = []
export { Config } from './config.ts'
export { apply } from './runtime.ts'
// src/config.ts
import Schema from '@deepseek-ai/schemastery'
export interface PluginConfig { /* serializable fields */ }
export const Config: Schema<PluginConfig> = Schema.object({ /* validation and defaults */ })
// src/runtime.ts
export function apply(ctx: Context, config: PluginConfig): void { /* effects */ }
Config is the schema value Cordis Loader validates; PluginConfig is the public TypeScript shape. Keeping the names distinct avoids the declaration-merge false positive in no-redeclare. A service provider instead default-exports its Service subclass; do not mix the two forms.
Distribution
Build before packing and inspect the archive:
pnpm run build
pnpm pack --dry-run --json
The archive must contain every file promised by main, types, exports, and files, plus the bundle patch and the physical display assets. See build and distribution. Git installs fetch sources; only add a self-contained prepare build when you deliberately distribute that way and document the consumer's build-script approval.
Testing
The baseline tests prove 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 also need a real Loader/profile composition test in the consuming DSH application; see tests/LAYOUT.md and evidence.
Links
More in this category
yjh051108/dsh-routing-suite★ 6994
One repository, three parts: a runtime injector for DSH plugin packages (inject, hot-reload, unload, promote a dev staging tool to the front, route self-heal, plus a settings-page plugin manager that lists, unloads and drags folders in to internalize), a task-aware reasoning-mode router agent preset (router-standard / router-spec / router-react), and a graded two-level task protocol whose six tools (commit_star, lock_stage, revise_do, edit_plan, mark_task, redteam_verdict) pin task state to disk. The injector implementation ships in-tree, so the install carries its own behaviour rather than a dependency list.
strukto-ai/mirage#dsh★ 3762
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
first-fluke/oh-my-agent#dsh★ 1357
Runs project OMA checks before and after tool execution and when a turn tries to finish. Installs its OMA CLI dependency and initializes unconfigured projects on first use. Requires Node.js 22+; initial setup needs network access and project write access.
MichengAI/dsh-skills-manager★ 444
Manages local DeepSeek Harness skills in Settings and shows shared Agent skills as read-only.
hust-open-atom-club/oh-dsh★ 324
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
Fishquito7/dsh-skill-mcp-panel★ 248
Manages DSH skills and MCP servers from the web settings: skill cards with hot enable/disable, workspace scopes, groups, batch migration and drag-and-drop import, plus stdio/HTTP MCP CRUD with connection tests, secret redaction and the unified dsh-panel CLI.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.