dshbase

插件目录 / Developer / dsh-stage-gate

dsh-stage-gate

已验证 · 实测可装 changingwang

✓ 持续维护 2 位贡献者 基于 4 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
—语言
2026-08-17最近推送
跨平台平台

功能简介

Developer 类别的 DeepSeek Harness 插件。

✅
我们的评价
可用 — 实测通过,早期项目

Developer 类别的 DeepSeek Harness 插件。 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-stage-gate

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)
  • status on the gate is the lifecycle state machine.
  • conclusion on the latest gate/check records 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

Architecture diagram

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

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-stage-gate」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:changingwang/dsh-stage-gate

Headless(CLI)profile:

dsh plugin --profile headless add github:changingwang/dsh-stage-gate

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →