Keeps DSH agents from forgetting your requirements during long tasks. It saves important conditions and completion evidence locally, brings them back after context compaction or session resume, and stops partial work from being reported as the whole task done.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-completion-guard
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:GreenLv/dsh-completion-guard
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
DSH Completion Guard is a DeepSeek Harness plugin for long or resumed tasks. It keeps track of what you asked for, what you ruled out, and what still needs checking.
If you ask DSH to edit a file and run its tests, Guard looks for a saved result for that file and those tests before certifying completion.

Install or upgrade
Guard 0.13.0 requires DSH 0.2.2-rc.1, Node.js 24.9.0, Cordis 4.1.0 and pnpm 11 or later. Web, Headless and Desktop each have their own profile. The reviewed setup uses DSH 0.2.2-rc.1 and Cordis 4.1.0. Other versions that meet the minimum still need to pass the host checks.
- First installation. Stop the host and follow the installation guide for the profile you use. Install Guard, write the host lock that records the packages and locations the profile loads, then verify the resulting configuration before starting DSH.
- Upgrade with existing Guard sessions. Stop the processes that write session data. Before replacing DSH or Guard, keep the old installation and the settings or records that establish each session's mode. Follow the migration guide to check the active storage directory and freeze the session inventory. After installing, rebuild and verify the host lock, then adopt and verify the old modes for the intended sessions before restarting.
The official DSH host still ships affected versions of Undici and Zod. The dependency advisories list the affected components. Three temporary Undici exceptions for 0.13.0 run through 2026-11-30.
Start a task or return to one
When reopening a session, wait for “载入历史” (loading history) to finish if it appears. DSH reads the saved history and Guard rebuilds its checklist, which can take time even on a later visit. Then run /context-guard status.
- A new session started from scratch normally shows
armed. Guard waits for your first message or attachment, then starts tracking requirements in that same step. This default is calledalways. - With explicit
activation: opt-in, run/context-guard onto start tracking. - An existing session keeps its verified initial mode and its saved on/off state. If the settings disagree with its saved mode, or the binding is missing or damaged, Guard reports the problem and withholds certification. Follow the configuration guide to change the default for new sessions.
Ask DSH to do your task as usual. When a result is missing or refers to the wrong file, command, or other target, Guard leaves that check open. Use /context-guard status to see what remains, /context-guard diagnose to understand a completion verdict, and /context-guard off or on to change protection for the current session. See the command reference for the other controls.
What Guard can verify
Guard checks recorded results, and can hold open the Goal completion path it guards while required evidence is missing. If a task asks you to inspect an image, a successful tool call alone cannot establish what appeared. An investigation can end with a written answer even when Guard has no way to certify its findings.
DSH runs the tools and controls permissions. Guard starts with its standard policy. For stricter verification or an explicit release contract, see completion policies. Guard keeps size-limited, redacted records. See privacy and stored data for what those records contain.
Documentation
- Installation and first load, old-session migration and rollback
- Changelog, host compatibility, distribution
- Documentation index for architecture, tests, acceptance records and the relationship to Codex Context Guard
npm download history
The chart separates the two npm package names and marks the August 2026 rename. Counts measure registry downloads. See the source data and collection status.
Links
More in this category
kenryu42/cc-safety-net★ 1900
Pre-execution guard that blocks destructive Git and filesystem commands and access to secrets such as SSH keys and .env files before a tool call runs.
ADWMC/helm-d#helmd★ 984
Security-analysis plugin for DeepSeek Harness: 33 tools spanning six security domains, evidence/reporting and toolbox, plus the case lifecycle, routing and tool ledger; a session-bound case workflow with an evidence chain, E-id validation and reproducible findings; 362 on-demand references; three hot-swappable persona profiles; and a four-tab workbench (armor / case / intercept / about) with case-state recovery after context compaction.
toby-bridges/api-relay-audit★ 904
Runs local security audits of AI API relays and LLM proxies from DeepSeek Harness, producing Markdown reports for prompt injection, model substitution signals, tool-call rewriting, error leakage, stream integrity, and profile-gated Web3 risks.
SeaOf0/dsh-redteam-model★ 807
Authorized-security DSH collection: nine work modes (redteam coordinator, pentest, code audit, binary analysis, attack-defense, AV evasion, incident response, cloud security, CTF solving) and fifteen runtime plugins, managed from a settings page with one-click deploy, install, update and uninstall.
howmp/dsh-pentest★ 616
Authorized pentest mode for DeepSeek Harness — exploration chain, assets and findings with a Web view.
PerryLink/dsh-auto-review★ 244
Second-model auto-review on the approval answerer chain: a read-only reviewer subagent returns structured allow/deny verdicts with reasons, fail-closed by default.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.