dsh-write-gate
Run the following command in DeepSeek Harness:
dsh plugin install couldbeme/dsh-write-gate
Paste the following prompt into your AI chat to install this plugin:
Install the write-gate plugin in DeepSeek Harness by running dsh plugin install couldbeme/dsh-write-gate; the full source is available at https://github.com/couldbeme/dsh-write-gate and requires a dsh version between 0.1.0-rc and 0.2.0.
About this plugin
In autonomous agent workflows, models can quietly attempt dangerous actions—a force-push to a shared branch, a mutating SQL statement against a production database, a write to a path that should stay read-only—without anyone noticing until after the fact. dsh-write-gate intercepts tool calls before they execute, enforcing operator-authored commitment statements such as "never force-push to main" or "stay read-only on the production database." Structurally decidable constraints are handled by deterministic checks (path globs, command regexes, scope filters); genuinely semantic constraints are judged by a local model against the operator's own wording. Every block is appended to a contradictions JSONL log that records which commitment fired, at which tier, and why, giving you a complete, explainable audit trail.
The plugin is built around explicit engineering guarantees: a monotonic guard that no allow-short-circuit listener can bypass; a fail-closed default when the judge is unreachable, timed out, or over budget; bounded judge cost with per-step budgets and verdict memoization; and an injection-fenced prompt that treats action content strictly as data, accepting only a rigid JSON verdict. An anti-self-justification clause prevents the model from talking the judge into clearing a real violation. A standalone dsh-write-gate check CLI lets you run tier-1 structural checks in CI, pre-commit hooks, or manually, with semanticized exit codes and optional JSON output that pipes cleanly into jq. The core is engine-agnostic with zero harness imports; a Claude Code adapter is on the roadmap.
It is for teams running DeepSeek Harness or similar frameworks in production: repositories with shared branches that must not be force-pushed, databases with strict read/write boundaries, and compliance requirements for explainable blocking. If you want to turn a spoken consensus like "we never do that" into a code-enforced gate, dsh-write-gate gives you a lightweight, testable, fully local write-gate that drops into an existing agent pipeline or CI workflow without requiring any cloud dependency.
Use Cases
- An agent attempts a force-push during a CI/CD step; the gate blocks the call before execution and logs the violation.
- A psql write to a production host is flagged as a semantic breach of a read-only commitment, triggering a block and audit entry.
- A team stores policy in COMMITMENTS.yaml; every agent session automatically enforces structural checks on shared branches.
Best For
- DevOps and security engineers running production-grade agents on DeepSeek Harness.
- Platform engineers who need structural security checks in CI or pre-commit pipelines.
- Agent application developers who want to codify team safety commitments into executable, auditable rules.
Related Plugins
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.
Packages all 87 SKILL.md files from upstream reverse-skill as a DeepSeek Harness plugin that auto-registers them for authorized reverse engineering, penetration testing, and security research.
Dockyard DSH is a native DeepSeek Harness plugin that unifies official OAuth/client sessions for Codex, Antigravity, Grok, Claude, and Cursor, providing account pool, model catalog, and quota status.