Shared toolkit for authoring DeepSeek Harness plugins, published as @perrylink/dsh-plugin-kit: a pluggable provider registry seam, fail-closed approval and session-event gates, shared sanitize/pricing/judge modules and a new-plugin skeleton.
Install
# from npm (prebuilt)
dsh plugin --profile web add @perrylink/dsh-plugin-kit
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:PerryLink/dsh-plugin-kit
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
Moved: this project is now dsh-scaffold. This repository stays as a pointer/backup; new work happens in the new home. Old npm package
@perrylink/dsh-plugin-kitis deprecated.
Non-official companion tool. Part of the DSH standards family; not a certification, accreditation, security audit, or official endorsement. Standard: https://github.com/PerryLink/dsh-standards. The
dsh.standardsblock is anot-runplaceholder, not a pass.
dsh plugin --profile <name> add @perrylink/dsh-plugin-kit
Shared zero-runtime-dependency toolkit for the PerryLink DSH plugin repositories. The per-project audit found 20+ plugins hand-rolling the same Provider seam and duplicating the same sanitize/pricing/verdict shapes, so this package extracts all of it — the pluggable Provider seam, the fail-closed approval and adaptive session-event gates, the mechanical verify scripts, and the shared sanitize/pricing/judge pure modules — into one ESM + TypeScript package.
Package name. This project publishes to npm as
@perrylink/dsh-plugin-kit. The bare npm namedsh-plugin-kitbelongs to a different, unrelated project — installing it does not install this package.
- 1024 store channel:
npm i -g dsh1024once, thendsh1024 plugin --profile web add @perrylink/dsh-plugin-kit(counts toward the deepseek1024.com install ranking).
English | 简体中文 | Español | Português | हिन्दी
Shared zero-runtime-dependency toolkit for the PerryLink DSH plugin repositories. The per-project audit found 20+ plugins hand-rolling the same Provider seam and duplicating the same sanitize/pricing/verdict shapes, so this package extracts all of it — the pluggable Provider seam, the fail-closed approval and adaptive session-event gates, the mechanical verify scripts, and the shared sanitize/pricing/judge pure modules — into one ESM + TypeScript package.
Install & uninstall
As a library, install is pnpm add (see Quick start). The package also ships an
intentionally empty dsh.bundle.patch layer (cordis.patch.yml), so it flows
through the harness bundle channel when a profile wants the kit mounted as a
package:
# npm channel (published releases)
dsh plugin --profile web add @perrylink/dsh-plugin-kit
# git channel (latest master)
dsh plugin --profile web add github:PerryLink/dsh-plugin-kit
Remove with:
pnpm remove @perrylink/dsh-plugin-kit
Nothing registers global state: uninstall is exactly the reverse of install.
What is dsh-plugin-kit?
Shared zero-runtime-dependency toolkit for the PerryLink DSH plugin repositories. The per-project audit found 20+ plugins hand-rolling the same Provider seam and duplicating the same sanitize/pricing/verdict shapes, so this package extracts all of it — the pluggable Provider seam, the fail-closed approval and adaptive session-event gates, the mechanical verify scripts, and the shared sanitize/pricing/judge pure modules — into one ESM + TypeScript package.
Workflow overview: call → plugin → result. The examples below use the real command surface.
Compatibility
- DSH harness: the kit imports nothing from
@deepseek-ai/*at runtime.@deepseek-ai/cordis(^4.0.5-alpha.1),@deepseek-ai/schemastery(^3.18.5-alpha.1), and the@deepseek-ai/dsh-*packages are optional peer dependencies in the>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0band the PerryLink plugin repos share; they exist only for type interop. Verified 2026-09-11 against the dsh-v0.1.7-alpha.1 master checkout (full gate chain + profile install smoke), and re-verified 2026-10-05 against thedsh-v0.2.1-alpha.1checkout (full gate chain + profile install smoke). - Node:
^22.19.0 || >=24.0.0, ESM only. - Wire compatibility: names and shapes mirror
dsh-mask(sanitize),dsh-budget(pricing), anddsh-auto-review(judge and thefallbackPolicyvocabulary), so migration is mechanical.
What you get
- Zero runtime dependencies — the pure core (
seam,gates,shared) is browser-safe. - ESM + strict TypeScript — JSDoc contracts on every module;
strict,noUncheckedIndexedAccess,exactOptionalPropertyTypes. - Fail-closed and adaptive gates — approval never defaults to a grant; session-event appends degrade gracefully on hosts that reject unknown event types.
- A new-plugin skeleton —
template/withcordis.yml, a three-rolesrc/index.ts(Service Definition / Provider / Consumer), a test, and the shared Renovate preset.
Quick start
dsh plugin --profile web add github:PerryLink/dsh-plugin-kit
From npm:
pnpm add @perrylink/dsh-plugin-kit
From git (the prepare script builds lib/ using only production
dependencies):
pnpm add github:PerryLink/dsh-plugin-kit
Replace a hand-rolled registry in one step:
import { ProviderRegistry } from '@perrylink/dsh-plugin-kit/seam'
const registry = new ProviderRegistry<Detector>({
default: { name: 'regex', impl: new RegexDetector() },
})
ctx.effect(() => registry.register('ner', new NerDetector()))
const active = registry.use('ner') ?? registry.use()
Examples
These are the plugin's real entry points; install once, then call one.
Detailed example
Command
import { createStripper } from '@perrylink/dsh-plugin-kit/shared'
createStripper().strip('call 13800138000 or email a@b.com')
Output
call <PHONE_1> or email <EMAIL_1>
Observed from README.md:153 (shared sanitize); src/shared/sanitize.ts:268; test/sanitize.test.ts:8-19
Failure branch
Input
const r = new ProviderRegistry(); r.register('openai', impl); r.register('openai', impl) // second call
Output
Error: Provider "openai" is already registered
Observed from plugins/dsh-plugin-kit/lib/seam/provider.js:55-58; plugins/dsh-plugin-kit/test/seam.test.ts:27-30; plugins/dsh-plugin-kit/README.md:164
Brief examples
applyFailClosedparseVerdict
Configuration
No runtime configuration: the gates and helpers are pure functions. The only
configuration surface is cordis.patch.yml, the bundle-patch layer shipped
for harness profile composition; it mounts no plugin row (the kit is a
library) and documents how consuming plugins add their own rows.
Tools & surfaces
| Subpath | Purpose |
|---|---|
seam |
ProviderRegistry<T> — reversible, fail-loud named provider registry. |
gates |
applyFailClosed; makeEventGate / maybeAppendSessionEvent / probeIgnorableAppend. |
shared |
sanitize (Stripper, redactText, redactMapping, sanitizeText, sanitizeUrl), pricing (BUILTIN_PRICES, estimateUsageCost, tokenCarbon, latencyStats, formatMoney, formatTokens), judge (parseVerdict, VERDICT_SCHEMA, riskExceeds). |
verify |
Mechanical CI gates (verify-license, verify-readme-languages, verify-seam) with a VerifyReport and a non-zero-exit CLI: node lib/verify/cli.js all . |
template/ |
New-plugin skeleton (cordis.yml, three-role plugin, test, README, renovate.json5). |
| root barrel | Re-exports all of the above. |
Permissions & data
The kit performs no I/O, no network access, and no subprocess spawns on its
own. Stripper keeps placeholder→original mappings in memory only, and
stats()/redactMapping() never emit plaintext; a consumer that persists a
mapping owns that decision and its storage permissions.
Security boundaries
sanitize/redact*are display hygiene, not a security boundary: they reduce leakage into logs and results, they do not authenticate or authorize.- Approval gates are fail closed by default (
rejected); the only grant path is an explicitallow-onceopt-in. - Session-event appends the host refuses are skipped, never retried in a way that could break session resume.
- Report vulnerabilities via GitHub Security Advisories — see
SECURITY.md.
Known limitations
- Hosts whose
Session.appendthird argument is aSurfaceIntent(0.1.2-rc.1) throwvalidateNexton the ignorable-envelope probe; the gate degrades to skip-unknown, so audit events are dropped (fail closed) rather than logged on those hosts. - 0.1.2-rc.1 (adapted 2026-09-02): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged.
- The kit ships no browser UI half; it is a library consumed by the Host (and optionally Client) halves of other plugins.
Development
pnpm install
pnpm run typecheck # tsc --noEmit
pnpm run typecheck:ci # CI face: tsc -p tsconfig.ci.json --noEmit
pnpm test # vitest unit tests
pnpm run build # emit lib/ + declarations (also run by prepare)
pnpm run verify:self-contained
pnpm run verify:artifacts
Topics
This repository is also the maintenance hub for the ecosystem:
scripts/sync-peer-range.mjs re-pins the shared peer band across every repo in
the target directory in
one command, renovate/default.json5 is the shared Renovate preset every repo
extends, .github/workflows/npm-publish.yml is a reusable tag-triggered
publish workflow (needs only an NPM_TOKEN secret), and data/repos.json is
the ecosystem registry consumed by the portal. Read that file for the roster; the per-plugin READMEs carry the collapsed list. See
docs/ecosystem-tooling.md.
Keywords: dsh, dsh-plugin, deepseek-harness, deepseek, cordis, perrylink, provider, seam, approval, sanitize, pricing, judge.
Contributors
Maintained by PerryLink with contributions from the DSH plugin ecosystem.
PerryLink DSH Plugin Family
This project is part of the DeepSeek Harness plugin family from PerryLink. The roster stays collapsed below so every README keeps a short first screen; expand it to see every row and its status.
License
Apache-2.0 — see LICENSE.
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.