DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-acceptance-gate

C

dsh-acceptance-gate

Manifest valid

DSH Acceptance Closed-Loop Plugin: Changes must be registered on an acceptance form first; the plugin runs the evidence itself, and you can't wrap up until it's cleared to zero.

hasBundlePatch

dsh-acceptance-gate

License: MIT Tests: 31 passing DSH plugin Evidence: plugin-run

Turn "it should be fixed now" into evidence. A DeepSeek Harness plugin that registers an acceptance gate before a change, runs the checks itself after the change, and refuses to let the turn end while anything is still failing.

中文说明


The problem

An agent says "done" because the code looks right. The claim is self-reported, the check is whatever the agent remembered to run, and nothing compares the result against the original request. This plugin makes the three failure modes impossible:

Failure modeWhat the gate does
The agent marks its own homeworkChecks are executed by the plugin, and the evidence carries exit code, stdout, SHA-256 and duration
The check does not answer the questionThe quality gate rejects vague requirements, unexecutable checks, and non-asserting commands at registration time
The work stops half-verifiedWhen the turn goes idle with an open gate, the plugin nudges the agent back with agent.followup()

Features

  • Acceptance ledger per session — accept_gate op=open records requirement, human-readable check, severity and an optional machine-executable auto spec.
  • Plugin-run evidence — accept_run executes shell / http / file checks concurrently (default 4), records exit code, output tail, SHA-256 and timing. Manual verdicts are labelled UNSIGNED and never outrank AUTO.
  • Baseline diff — mode=baseline before the fix, mode=verify after. Unchanged output on a "fix" item is flagged as suspicious, because it usually means nothing changed.
  • Flake detection — a failure is retried once; passing only on retry is marked FLAKY, never silently green.
  • Quality gate — refuses requirements like "works fine", checks with no command/URL/path, and auto specs with no expectation.
  • Impact scan — op=scope reads git diff and lists downstream files and sibling tests that must enter the regression set.
  • Turn watchdog — up to 3 nudges with cooldown; a gate that is still open after that is reported, not silently dropped.
  • Reports — ACCEPTANCE.md, acceptance.json, ACCEPTANCE.html on close, with absolute paths and host names scrubbed.
  • Secret scan — accept_secrets finds API keys, PEM blocks, phone/ID numbers, hard-coded home directories, chat history, credential files and databases; op=purge deletes the files it proves are sensitive.

Two test tracks

Every change is verified on up to two tracks. The gate refuses a job that only ran one of them.

Trackauto.kindProvesRequired when
Codeshell / http / filelogic, API contract, file contentalways
Interactiveuia real person-facing flow: open the page, click, type, and the expected result actually shows upthe change touches a UI, buttons, forms, terminal input or any GUI

Enforced by accept_gate op=open with interactive: true|false:

  • interactive: true requires at least one ui item, otherwise the gate rejects the whole sheet.
  • A ui item must carry both cmd (a real interaction script) and artifact (screenshot / recording / log path). Missing or empty artifact = not verified.
  • interactive: false (pure backend, pure logic, pure config) skips the interactive track; the code track still applies.
{ "kind": "ui", "cmd": "node tests/live-browser-test.mjs",
  "expectStdout": "LIVE_REPLY_OK", "artifact": "tests/_live-shot.png" }

Why: an endpoint returning 200 proves the endpoint works — not that the button is wired, the render path is intact, or the reply reaches the screen.

Install

DSH host plugin: mounts inside the DSH web server, no extra port, no child process.

  1. Link the folder into your DSH profile:

    # Windows (junction, no admin needed)
    mklink /J "%USERPROFILE%\.dsh\profiles\desktop\node_modules\dsh-acceptance-gate" "<path-to-repo>\dsh-acceptance-gate"
    # macOS / Linux
    ln -s "<path-to-repo>/dsh-acceptance-gate" ~/.dsh/profiles/desktop/node_modules/dsh-acceptance-gate
    
  2. Add it to the profile patch layer (~/.dsh/profiles/desktop/cordis.patch.yml):

    - insert:
        - id: dsh-acceptance-gate
          name: dsh-acceptance-gate
          config:
            strictMode: true
            strictPass: true
            allowManualPass: false
            autoClose: true
            runConcurrency: 4
    
  3. Restart DSH. The tools accept_gate, accept_run and accept_secrets become available and the protocol text is injected every turn.

Quick start

# 1. register before touching code
accept_gate { op: "open", kind: "fix", severity: "P0", title: "login retry",
  items: [{ requirement: "Retry after a 500 shows the second response",
            check: "node test/login.mjs",
            auto: { kind: "shell", cmd: "node test/login.mjs", expectExit: 0, expectStdout: "RECEIVED 2" } }] }

# 2. record the broken state (optional but recommended)
accept_run { mode: "baseline" }

# 3. after the fix, run the same check
accept_run {}                      # -> pass/fail with plugin-produced evidence

# 4. reports are written on close
accept_gate { op: "report" }

Check kinds

auto.kindFieldsPasses when
shellcmd, expectExit, expectStdout, expectStderr, timeoutMsexit code matches and stdout/stderr contain the expected text
httpurl, method, headers, body, expectStatus, expectBodystatus and body match
filepath, expectExists, expectMatchfile exists/absent and content matches

Tools

accept_gate

opPurpose
openStart a ledger (title, kind, severity, items[])
statusShow the current ledger and progress
baselineRecord the pre-fix symptom manually
verifyManual verdict (needs evidence; refused for auto items unless allowManualPass)
add / dropExtend or remove items
scopeImpact scan from git diff
reportWrite ACCEPTANCE.md / .json / .html
closeClose the ledger (refused while items are pending)
stats / historyKPI and past ledgers
resetArchive and clear

accept_run

{ id?: "3" | "all", mode?: "baseline" | "verify" } — runs the auto checks of the selected items and writes back evidence, verdict, delta-vs-baseline and flake flag.

accept_secrets

{ op: "scan" | "purge", roots?: string[], limit?: number, dryRun?: boolean } — scans source and data directories; purge deletes sensitive files (history, credentials, keys, databases) while content hits are reported with masked previews so you fix the code instead of shredding it.

Configuration

All keys are optional; defaults shown.

KeyDefaultMeaning
enabledtrueMaster switch
sectionOrder70Order of the injected prompt section
sectionNameacceptance-gatePrompt section name
strictModetrueQuality gate on registration
strictPasstrueManual verdict must carry evidence
allowManualPassfalseAllow manual pass on items that have an auto
requireAutofalseRequire every item to declare auto
autoRunVerifytrueaccept_run defaults to mode=verify
autoClosetrueClose automatically when everything passes
writeReportOnClosetrueWrite reports on close
kpitrueAppend to the KPI log
watchdogtrueTurn-end nudge while the gate is open
watchdogMax3Maximum nudges per gate
watchdogCooldownMs15000Minimum gap between nudges
watchdogDelayMs400Delay after idle before nudging
watchdogFreshMs600000Ignore gates older than this
shellTimeoutMs120000Per-command timeout
httpTimeoutMs30000Per-request timeout
maxOutputChars8000Output retained as evidence
runConcurrency4Parallel auto checks
retryOnFail1Retries used to detect flakiness

How it works

system prompt ──▶ accept_gate(open) ──▶ accept_run ──▶ evidence ──▶ verdict ──▶ report
      ▲                                   │                                     │
      └──── watchdog (agent.followup) ◀───┴──── pending items stay visible ◀──────┘
FileRole
lib/index.jsTools, config, prompt section, close/report wiring
lib/checks.jsshell / http / file runners, SHA-256, timeouts
lib/quality.jsRegistration-time quality gate
lib/store.jsLedger persistence, history, KPI
lib/protocol.jsInjected protocol text and live ledger block
lib/watchdog.jsTurn-end nudge
lib/impact.jsgit diff → regression candidates
lib/report.jsMarkdown / JSON / HTML reports (scrubbed)
lib/secrets.jsSecret and sensitive-file scanning, path scrubbing

State lives in ~/.dsh/acceptance/: <sessionId>.json for the live ledger, history.jsonl for closed ones, kpi.jsonl for stats.

Development

node tests/smoke.mjs                                  # 31 assertions, temp dirs
node tests/publish-check.mjs .                        # GitHub-release gate
node tests/scan-once.mjs                              # secret scan, read-only

publish-check fails the build on absolute paths, local user names, host names, API keys, phone numbers and ID numbers — the same class of leak that a report can carry.

Limitations

  • Evidence quality is bounded by the check: a wrong expectStdout still "passes" honestly.
  • impact needs a git work tree; outside git it returns an empty set.
  • The watchdog needs a host that supports agent.followup(); without it the gate is still enforced by the prompt section.
  • Reports contain command output (masked), not a sandbox trace.

License

MIT

Comments

Loading…

Similar plugins

dsh-plugin-verification

by bbaz123

DSH Verification Gate: a host-plane plugin that runs Change -> Memory -> Regression -> Assertion -> Review before an Agent turn is allowed to close, records confirmed findings in a task error ledger, forces an OpenViking retrieval before any repair, and hands the finalization back to the Agent's existing global rules

Tools & CapabilitiesManifest valid

★ 0

Apache-2.0

JavaScript

Oct 22, 2026

dsh plugin --profile web add dsh-plugin-verification

by victorzhong0110

DeepSeek Harness (DSH) 任务结果账本与验收插件:机械证据验收、默认零额外 token、数据本地持有。Local-first task outcome ledger & acceptance plugin: evidence-backed verification, zero extra model cost, user-owned sidecar data.

Workflow & AutomationModels & ProvidersManifest valid

★ 3

MIT

TypeScript

Sep 6, 2026

dsh plugin --profile web add dsh-outcome-loop

by nekorc

DSH Auto review 中文 wait-what 解释插件:把拒绝理由改成背景→原因→选择,不改风险判定。

Manifest valid

★ 0

MIT

JavaScript

Nov 13, 2026

dsh plugin --profile web add dsh-auto-review-zh

by Knot-chord

DSH 插件:让多个自动化插件不抢同一窗口——同一目标一回合一个动手类,决策写入 JSONL 审计。

Manifest valid

★ 0

MIT

JavaScript

Nov 15, 2026

dsh plugin --profile web add @local/dsh-capability-policy

by zhangyy0423

dsh plugin: per-turn receipts (todo counts, goal id, fail-closed plan verdict) that survive the next turn, plus a read-only veripipe_receipt tool.

Sessions & MessagesManifest valid

★ 0

MIT

JavaScript

Oct 8, 2026

dsh plugin --profile web add dsh-veripipe

by xyrrrrr-r

Host-side DSH evaluation control plugin for aeval:一次评测试次的配置注入、预算封顶与证据归属

Workflow & AutomationDevelopment & InfrastructureManifest valid

★ 29

↓ 185/wk

Apache-2.0

TypeScript

Oct 26, 2026

dsh plugin --profile web add dsh-eval-control