dsh-completion-gate

DSH PLUGIN模型与账号接入

仓库 AGSQ11/dsh-completion-gate

模型与账号接入 L5 · 运行验证通过 安全审查:低风险 可信度:金 可安装插件
安装这个插件

Completion Gate 是 DeepSeek Harness 插件,为编码代理设置生产就绪屏障:阻止未完成任务的提前停止,并要求机器证据与最终审查后才允许结束。

一句话选型结论

按资料字段整理

dsh-completion-gate 是模型与账号接入类的 DSH 可安装插件,验证等级 L5 · 运行验证通过,安全审查为低风险,列出 4 项功能,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类模型与账号接入 收录类型可安装插件 验证等级L5 · 运行验证通过 安全审查低风险
验证等级 L5 L5 · 运行验证通过
GitHub 星标 0 复刻 1 · 未关闭 issue 0
最近更新 2026-08-22 创建于 2026-08-22
README 15.8 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:AGSQ11/dsh-completion-gate
  1. 1
    确认版本与运行环境

    兼容的 DSH 版本为 0.2.0-rc.2 等 11 个;版本不匹配时安装会报错。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本0.2.0-rc.2 等 11 个版本版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

4 项功能
字段来自项目仓库与公开索引,中文说明由本站标注

dsh-completion-gate:DeepSeek Harness 的完成状态门控插件

  • 阻止代理过早停止
  • 要求机器证据
  • 绑定仓库指纹
  • 支持子代理门控

上游标签

dshdsh-plugindsh-plugin-marketdsh-plugins

验证等级与安全审查

L5 · 运行验证通过
自动化流程结论,不是人工审核
验证等级L5 · 运行验证通过在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度稳定按仓库活跃度与最近更新时间给出
可信度金综合仓库活跃度与验证结果

上面的结论来自上游最近一次自动化验证(2026-10-08): 同一套检查会在插件发新版后重跑,页面显示的是最新一次的逐项结果。

逐项检查结果

L1 · 已找到 ✓ 通过
  • L1.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L2 · 结构化 ✓ 通过
  • L2.0_DEFAULTED_FROM_L3 由 L3 推定 默认通过——L3 安装规范已通过(全库 L3 扫描策略)
L3 · 安装规范 ✓ 通过
  • L3.1_INSTALL_COMMAND_PARSED 安装命令已解析 方式:安装规范解析
  • L3.2_DSH_VERSION_DECLARED DSH 版本已声明 方式:DSH 版本声明
L4 · 安装已测 ✓ 通过
  • L4.1_INSTALL_EXECUTED_CONFINED 受限沙盒内执行安装 方式:沙盒安装执行
  • L4.2_INSTALL_SUCCESS 沙盒安装成功 方式:沙盒安装执行
  • L4.3_ARTIFACT_CONFIRMED 安装产物已确认 方式:沙盒安装执行
L5 · 运行已测 ✓ 通过
  • L5.1_INSTALL_PASSED_SANDBOXED 沙盒安装通过 方式:沙盒安装执行
  • L5.2_WEB_BOOT_READY Web 启动就绪 方式:Web 启动
  • L5.3_HTTP_SERVED HTTP 服务响应 方式:HTTP 请求
  • L5.4_PLUGIN_INVENTORY_ACTIVE 插件清单中已激活 方式:插件清单查询
— · 其它检查项
  • L4_0_SANDBOX 沙盒安装判定 方式:沙盒安装执行

风险详情

  • 审查结论 通过
  • 结论说明 vet 静态分析未发现可疑行为,判定为干净(clean)。
  • 风险计数 严重 0 / 高 0 / 中 0
  • 风险详情 未发现严重或警告级问题。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L5:安装和运行都在沙盒里跑通过,装完能直接用的概率高。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。
  • 标注了兼容的 DSH 版本(0.2.0-rc.2 等 11 个),按版本装不容易报错。
  • 列出了 4 项功能,能直接看出它解决什么问题。

先想清楚的地方

  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在模型与账号接入场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-completion-gate当前 L5 · 运行验证通过 低风险 0 0.2.0-rc.2 等 11 个 有
archify L4 · 沙盒安装通过 低风险 8.0 万 未标注 有
DeepSeek-Reasonix L4 · 沙盒安装通过 低风险 3.6 万 未标注 有
nocobase L3 · 安装规范通过 低风险 2.5 万 0.1.1-rc.2 无
learn-harness-engineering L4 · 沙盒安装通过 低风险 2.0 万 未标注 有
dsh-our-free-model 未做沙盒验证 未标注 8,064 未标注 无

仓库档案

模型与账号接入
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方AGSQ11仓库 dsh-completion-gate · 默认分支 main
分类模型与账号接入ai
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言JavaScript仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 1 / 0收录时的数值,非实时
创建 / 更新2026-08-22 · 2026-08-22最后推送 2026-08-22
本站收录2026-08-22首次进入本站目录的时间

README 全文

15.8 KB
作者原文,中文版优先;只做安全转义,不改内容

dsh-completion-gate

Completion Gate is a DeepSeek Harness plugin that prevents a coding agent from successfully ending a changed task until there is evidence that the work is actually ready.

It combines two related safeguards:

  1. Premature Stop Guard — if a model naturally stops while its own latest output clearly says that work is still pending, the plugin schedules a fresh DSH follow-up turn that resumes the unfinished task.
  2. Production Readiness Gate — once code has changed, the root agent must produce machine evidence and a structured final review before the turn is allowed to close normally.

The goal is not to make the model say that tests passed. The goal is to make DSH execute the available checks, bind the result to the current repository state, and reject stale or incomplete completion evidence.


Why this plugin exists

LLM coding agents frequently stop in one of these states:

"Now I need to inspect the call site..."
→ tool call
→ reasoning
→ model naturally stops

or:

"Implemented. Looks good."

without having actually run the repository's tests, build, lint, typecheck, or reviewed every changed file.

Completion Gate adds a host-side boundary around those failure modes.

Agent works
│
├── model stops while clearly unfinished
│       └── Premature Stop Guard → continue
│
└── model appears genuinely finished
│
└── Completion Gate
├── repository changed?
├── tests
├── build
├── lint
├── typecheck
├── TODO/FIXME regression scan
├── security regression tripwires
├── changed-file review
└── acceptance criteria → evidence
│
PASS ─┴─ BLOCK

Core behavior

1. Premature Stop Guard

DSH exposes agent/turn-stopping when a model has naturally stopped and no tool call or queued continuation is still keeping the turn alive.

Completion Gate inspects the latest turn for strong evidence that the model itself said work remained, for example:

  • Now I need to inspect...
  • Next I will run...
  • I still need to...
  • Let me trace...
  • ...and in parallel...
  • reasoning-only output after tool work with no user-facing completion

When detected, the plugin queues a waking agent.followup() for a fresh turn such as:

PREMATURE STOP RECOVERY:
Continue the unfinished task.
Execute the pending investigation or implementation now.
Do not summarize or claim completion yet.

The recovery chain is bounded by prematureStopMaxContinuations, so repeated premature/empty recovery turns cannot create an infinite follow-up loop.

Generic phrases such as Let me know if you want changes are not treated as unfinished work.

2. Root-agent completion authority

By default:

gateSubagents: false

Only the root agent owns final production readiness. Spawned DSH subagents are allowed to complete their delegated jobs normally.

This is the recommended setting when using autonomous orchestration, Phoenix/model failover, AI Council, critics, or large subagent teams. The root agent remains responsible for integrating the work and passing the final gate.

You can explicitly enable subagent gating from the control center if a project really needs it.

3. Workspace fingerprint

Completion evidence is tied to a SHA-256 fingerprint of the current repository state.

The fingerprint accounts for:

  • session baseline Git HEAD;
  • commits created during the agent session;
  • staged changes;
  • unstaged changes;
  • untracked files.

This matters because a clean worktree does not prove the agent made no changes: the agent may already have committed them.

If the code changes after a successful check or attestation, the fingerprint changes and the old evidence is no longer valid.

4. Machine evidence

Completion Gate can auto-detect and execute common project checks.

Ecosystem Detection / checks
Node.js package scripts such as test, build, lint, typecheck
npm / pnpm / Yarn / Bun package manager selected from project lockfiles
Python pytest when tests/config are present; Ruff and Mypy when configured
Go go test ./..., go vet ./...
Rust cargo test --all-targets, cargo check --all-targets
Composer / PHP composer test, composer lint when scripts exist
Any project operator-defined custom checks

When requireTests is enabled, a project with no executable test command detected is considered blocked rather than silently treated as tested.

Successful machine results are cached for the exact workspace fingerprint. This avoids rerunning a ten-minute suite merely because the agent needs one extra turn to submit its final review.

5. Added-code tripwires

The gate can inspect newly added lines for:

TODO
FIXME
HACK
XXX

and a deliberately narrow set of obvious security-regression patterns such as:

  • likely hard-coded credentials;
  • disabled TLS certificate verification;
  • eval(...) / dynamic Function construction;
  • chmod 777;
  • shell execution enablement requiring review;
  • raw HTML injection surfaces.

This is a regression tripwire, not a replacement for dedicated SAST/security tooling.

6. Completion attestation

Machine checks cannot prove every requirement. Before final completion, the agent can be required to call the completion_gate tool with an attestation bound to the current workspace fingerprint.

Example:

{
"action": "attest",
"reviewed_files": [
"src/engine.ts",
"tests/engine.test.ts"
],
"review_summary": "Reviewed the complete diff, error paths, state transitions and backwards compatibility.",
"acceptance_criteria": [
{
"criterion": "Risk sizing uses ATR",
"evidence": "Unit tests cover ATR-derived risk sizing and the full test suite passes."
},
{
"criterion": "Existing behavior remains compatible",
"evidence": "Regression tests and typecheck pass; changed call sites were reviewed."
}
],
"unresolved_issues": []
}

In strict mode the gate verifies that:

  • every changed file is listed in reviewed_files;
  • a changed-file review summary exists;
  • at least one acceptance criterion is supplied;
  • every criterion has concrete evidence;
  • unresolved_issues is empty;
  • the attestation fingerprint still matches the repository.

Control Center

Open:

Settings → Completion Gate

The control center is both a runtime dashboard and a persistent configuration editor.

Behavior

  • Enable Completion Gate — master switch.
  • Mode
  • Strict: a failed gate steers the agent back and prevents normal completion.
  • Advisory: evidence is collected, but failure does not force another step.
  • Gate subagents — include DSH child/subagent stop boundaries. Off is recommended for autonomous teams.
  • Premature-stop guard — recover natural stops that clearly leave pending work by scheduling a fresh follow-up turn.
  • Max recovery follow-ups — safety cap across one consecutive premature-stop recovery chain.

Machine evidence

  • Auto-detect checks
  • Require tests
  • Require build when available
  • Require lint when available
  • Require typecheck when available
  • Block new TODO/FIXME markers
  • Security regression scan

Completion evidence

  • Require final attestation
  • Gate only changed workspaces
  • Maximum changed files

Execution limits

  • Check timeout — maximum time per individual command.
  • Stored command output — maximum sanitized failure output retained per check.

Custom checks

The UI can add arbitrary operator-defined checks:

Name: integration-tests
Category: test
Command: npm run test:integration
Required: yes

Custom commands execute in the project's workspace on the DSH host. Only configure commands you trust.

Saving settings

Save settings applies changes immediately and persists them across dsh web restarts.

Configuration precedence is:

built-in defaults
↓
profile / cordis.patch.yml configuration
↓
settings saved from the Completion Gate UI

Whenever gate policy changes, cached machine evidence, attestations, and operator overrides are invalidated. A previous PASS is never reused under a newly changed policy.

Reset to profile defaults removes the saved UI overlay and immediately returns to the plugin configuration supplied by the active DSH profile.

The host-side settings file is intentionally not exposed in the browser UI or gate reports.


Commands

/gate

Run the gate immediately for the active root session.

/gate

Useful when you want to inspect readiness before the model tries to finish.

/gate-status

Show the latest report for the active session.

/gate-status

/gate-reset

Discard cached machine evidence, attestation, and operator override for the active session.

/gate-reset

/gate-override

Explicit operator override for the exact current workspace fingerprint.

/gate-override accepted temporary compatibility risk

If any file or commit changes afterward, the override no longer applies.

This is intended for the human operator, not as an escape hatch for the agent.


Agent tool

The plugin registers:

completion_gate

Actions:

  • run — execute readiness checks now;
  • status — return the latest/current report;
  • attest — submit the final changed-file and acceptance-criteria review.

Completion Gate also adds a system-prompt section telling coding agents that the gate is authoritative before they claim completion.


Header status

The conversation header shows a compact status:

Gate · ready
Gate · 1 blocked
Gate · off

This is only an operator summary. The authoritative result remains the workspace-bound gate report.


Default configuration

The bundled profile patch starts with:

- insert:
- id: completion-gate
name: dsh-completion-gate
config:
enabled: true
mode: strict
gateSubagents: false
preventPrematureStops: true
prematureStopMaxContinuations: 3
autoDetectChecks: true
requireTests: true
requireBuildWhenAvailable: true
requireLintWhenAvailable: true
requireTypecheckWhenAvailable: true
blockNewTodos: true
securityScan: true
requireAttestation: true
gateOnlyChangedWorkspaces: true
commandTimeoutMs: 600000
maxOutputChars: 12000
maxChangedFiles: 500
customChecks: []

Everything above can be changed from the control center. Profile configuration remains the baseline that Reset to profile defaults returns to.


Installation

  1. Extract or clone the source repository to a permanent local directory.
  2. Add that source directory to the DSH Web profile.
  3. Restart DSH Web.

Example from the parent directory containing the plugin source:

dsh plugin --profile web add .\dsh-completion-gate
dsh web

Then open Settings → Completion Gate and review the defaults before relying on strict mode for a production repository.

No dependency installation is required by this plugin.


Updating

Replace the plugin source with the newer source revision and restart dsh web.

UI-saved Completion Gate settings are stored separately from the plugin source, so replacing the source directory does not intentionally reset operator preferences. Use Reset to profile defaults if you want the new profile defaults instead.


Interaction with model failover / Phoenix

Completion Gate is session/workspace scoped, not model scoped.

If a model fails:

Model A
↓ 429 / timeout / provider failure
Phoenix / DSH failover
↓
Model B continues same session
↓
Completion Gate still owns the same baseline and workspace evidence

A replacement model can continue remediation without restarting the task. If the replacement changes code, the workspace fingerprint changes and stale gate evidence is invalidated naturally.

gateSubagents: false is recommended with autonomous failover/team orchestration so child jobs are not unnecessarily blocked by the root production-readiness policy.


What happens when the gate blocks

In strict mode DSH receives a steering message similar to:

COMPLETION GATE BLOCKED. Do not claim completion.

- Node test: test failed.
- Changed files not reviewed: src/engine.ts
- Acceptance-criteria evidence is missing.

Fix the failures, review every changed file, then call completion_gate
with action=attest and concrete acceptance-criteria evidence.

The agent continues from the existing task/workspace state.


Important limits

Premature recovery uses a fresh turn

The Premature Stop Guard intentionally uses agent.followup() rather than agent.steer(). A follow-up lets the naturally stopped turn close and immediately wakes a new turn with the unfinished-work instruction. This composes better with provider retry/failover and avoids same-turn recovery steps that can visibly inject context and then fall idle.

The actual Production Readiness Gate still uses agent.steer() because blocking a failed readiness check must veto the current natural completion boundary.

DSH records assistant output before the final stop hook

DSH can record an assistant/message before agent/turn-stopping runs. Therefore Completion Gate can prevent the turn from closing and force another step, but it cannot retroactively erase premature prose already emitted by a non-compliant model.

The Premature Stop Guard and system-prompt instructions are intended to make the normal path continue before the task is treated as complete.

Tests are only as good as the project

Passing tests do not prove correctness. The gate proves that configured checks passed for a specific repository fingerprint.

Attestation is structured model evidence

The gate verifies completeness and freshness of the attestation structure; it cannot mathematically prove that an LLM's semantic review was insightful. Independent review plugins, Council, security tooling, and human review still add value.

Security scanning is intentionally narrow

The built-in scanner catches obvious newly added risky patterns. It is not a comprehensive vulnerability scanner.

Custom checks execute shell commands

A custom check is operator-controlled code execution on the DSH host. Treat it with the same care as adding a command to a CI configuration.


Recommended configuration for an autonomous developer team

enabled: true
mode: strict
gateSubagents: false
preventPrematureStops: true
prematureStopMaxContinuations: 3
autoDetectChecks: true
requireTests: true
requireBuildWhenAvailable: true
requireLintWhenAvailable: true
requireTypecheckWhenAvailable: true
blockNewTodos: true
securityScan: true
requireAttestation: true
gateOnlyChangedWorkspaces: true

This leaves implementation freedom to subagents and model failover while keeping one hard readiness boundary at the root agent.


Privacy and security

  • Gate reports expose the repository/workspace basename, not the absolute local filesystem path.
  • Captured command output is sanitized before it is retained or displayed.
  • Common credential/token patterns and absolute local paths are redacted from stored failure output.
  • Browser settings endpoints require same-origin requests.
  • UI-saved settings are persisted host-side; the persistence path itself is not sent to the browser.
  • The model cannot add custom check commands through the completion_gate attestation tool.

See SECURITY.md for the concise security model.


License

MIT. See LICENSE.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
dsh-completion-gate 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:AGSQ11/dsh-completion-gate` 即可。

dsh-completion-gate 的验证等级是什么意思?

L5 · 运行验证通过。在 dsh 沙盒中完成安装与运行冒烟——装得上、跑得起来

dsh-completion-gate 安全吗?

低风险。vet 静态分析未发现可疑行为,判定为干净(clean)。

dsh-completion-gate 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-completion-gate 支持哪些 DSH 版本?

上游记录的兼容版本包括 0.2.0-rc.2、0.1.7-rc.2、0.1.7-alpha.2、0.1.6-alpha.2、0.1.6-alpha.1、0.1.5-rc.2、0.1.3-alpha.2、0.1.3-alpha.1。版本较多,只列出前 8 个。

dsh-completion-gate 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

dsh-completion-gate 有哪些功能?

阻止代理过早停止、要求机器证据、绑定仓库指纹、支持子代理门控。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

模型与账号接入
按星标排序,可作替代方案

archify

archify

从仓库或系统描述生成经过校验的自包含交互式架构图、流程图、时序图、数据流图和生命周期图。

L4 · 沙盒安装通过 8.0 万 星

nocobase

nocobase

L3 · 安装规范通过 2.5 万 星

dsh-our-free-model

dsh-our-free-model

为 DeepSeek Harness 挂载免登录、免 API Key 的免费前沿模型通道,装完即用,并附用量看板与 OpenAI 兼容本地转

未标注验证等级 8,064 星

dsh-purge

dsh-purge

dsh-purge 是一款 DeepSeek Harness 设置插件,可修改默认副本、权限策略和工具限制,并添加规则卡片以分组应用补丁,支

L5 · 运行验证通过 4,573 星

AGSQ11 的其它插件

3 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 2026-10-08。