Stage-gate governance tools: model-callable gate_open / gate_check / gate_list / gate_close for in-memory, per-session acceptance checks with PASS/BLOCK conclusions.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:changingwang/dsh-stage-gate
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
Stage-gate governance tools for DeepSeek Harness.
Model-callable stage gates: create an acceptance checklist, verify it with evidence, and get a clear PASS / BLOCK conclusion — a governance layer for agents that run multi-phase work. State is in-memory, scoped per session.
English | 中文
What it does
Registers four tools on ctx.tools:
| Tool | Purpose |
|---|---|
gate_open(gateId, title, stage?, items) |
Create a stage gate with its full acceptance checklist (status open). |
gate_check(gateId, items) |
Verify the gate: send the ENTIRE item list (whole-value replacement); each item carries met/unmet/n/a and optional evidence. The gate is blocked while any item is unmet, passed when all are met/n/a. |
gate_list() |
List every gate in the session with its lifecycle status. |
gate_close(gateId, reason?) |
Close a gate (closed). A closed gate rejects further gate_check unless allowReopen is set. |
Lifecycle
open → in_review → passed (all items met/n/a)
│ │
│ └── blocked (any item unmet) → (allowReopen) → open
└────────────────────────────→ closed (gate_close)
statuson the gate is the lifecycle state machine.conclusionon the latestgate/checkrecords the most recent verification result.
Install
dsh plugin --profile web add dsh-stage-gate
dsh web
The tools become model-visible in the Web UI. Model keys and a DeepSeek provider must already be configured (see the DeepSeek Harness Web UI guide).
Configuration
allowReopen (default true): whether a gate_check on a closed gate is accepted. When false, checking a closed gate throws Error: gate "<id>" is closed.
Override in your profile's cordis.patch.yml:
- id: tool-stage-gate
config:
allowReopen: false
How it works
Gate state is kept in memory, scoped per agent session (gate_open /
gate_check / gate_close mutate an in-memory map keyed by session + gate id).
This package deliberately does not write custom session events
(gate/*). DeepSeek Harness's session persistence refuses to reload a log
containing an event type outside its known-event whitelist unless the event is
marked ignorable, and Session.append has no API to set that marker. Custom
plugin events would make sessions unloadable after restart — see
docs/BUG-2026-08-17-session-log-pollution.md.
Trade-off: gate state resets when the harness restarts. This is the correct cost for an out-of-repo plugin until the harness opens a registration surface for downstream plugin events.
Development
pnpm install
pnpm test # vitest (14 tests)
pnpm typecheck # strict tsc
pnpm build # emit lib/
Compatibility
- Requires DeepSeek Harness
>=0.1.0-rc.5. - Web profile only (tools are model-facing).
- Gate state is in-memory and resets on harness restart (see How it works).
License
MIT © 2026 changingwang
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 31680
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 3995
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1130
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
gitroomhq/postiz-agent#dsh-postiz★ 499
Connects DeepSeek Harness to Postiz over MCP: list connected social media channels, fetch per-platform posting rules, and schedule, draft, or publish posts to X, LinkedIn, Instagram, Facebook, Threads, TikTok, YouTube, Reddit, Bluesky, Mastodon, Discord, Slack, Telegram and more; adds a postiz workflow skill.
EthanYoQ/Invoice-Downloader#dsh-invoice-downloader★ 477
Local IMAP invoice download, OCR, archive, and Excel reimbursement summaries for DeepSeek Harness.
anysearch-team/anysearch-dsh★ 443
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.