Introduction¶
In DeepSeek Harness (DSH), tools such as writing files or running commands often need to pop up official approval cards one by one. Write/command tools are also exclusively scheduled: if the first card hasn’t been processed, subsequent calls will all be blocked. The Agent cannot “wait until all approvals are done and then execute together” — it can only interrupt you over and over.
The community plugin dsh-approval-ledger (maintainer yingcai233333, npm package name dsh-approval-ledger) targets the same kind of scenario: it first declares a batch of operations as a plan, reviews and approves them once, then performs risk gating on each actual invocation, and records automatic/manual decisions into an auditable ledger. It does not replace DSH’s built-in plan cards, approval cards, or question cards; instead, it wires itself on top of the official UI. When it cannot read, cannot recognize, or encounters exceptions, it always falls back to official approval (fail-closed).
What This Is¶
In one sentence: A Cordis plugin that provides batch approval, risk gating, and a traceable decision ledger for DSH.
- Directory page: skillhub.cn/plugins/yingcai233333/dsh-approval-ledger (Category: admin-security)
- Source code and documentation: github.com/yingcai233333/dsh-approval-ledger
- License: MIT; requires Node.js ≥ 22; DSH version
>=0.2.1-rc.2 <0.3.0-0(seepackage.json) - npm
latestis 1.1.1 (as stated in the README;nextis still0.2.0-beta.15)
The external capabilities are clearly documented in the directory metadata: the Host side provides the tool request_approvals and the command /approvals.
Core Features¶
One Plan per Batch, Not Pop-ups One by One¶
The Agent calls request_approvals to submit a batch of operations as a manifest, going through the official plan-review card; after approval, it uses the official multi-select where you only authorize the items you want, leaving unchecked items as manual. Plan items can declare dependsOn, and downstream items are only unlocked after dependencies are consumed.
The default is observe-only: plans are reviewed, but each actual invocation still goes through the official approval card; grants are only simulated and recorded as would-allow, without returning actual allowed-once. To auto-approve medium risk within the plan scope, you must explicitly set mode: active in the config — this is not the default behavior.
Risk Gating¶
Each real tool invocation re-evaluates risk (assessRisk is a deterministic recommendation, not a final decision for you):
| Level | Auto-approval policy (when mode: active and scope matches) |
|---|---|
| medium | Configurable auto-approval |
| high | Manual by default; requires opt-in (allowHighRiskGrants) and secondary confirmation |
| critical | Never automatic |
| unknown | Always manual |
Auto-approval goes through two gates: plan scope match and invocation risk level allowed. Path matching resolves the real target of symlinks/junctions; hard links are treated as high risk (manual). Commands containing shell metacharacters, interpreters, scripts, and similar features do not participate in auto-matching. Grants exist only in memory, per session, per turn; they become invalid at turn end, unload, or restart.
Decision Ledger and Audit¶
/approvals audit (can add --json) lists approvals, plans, denials, and attributions clearly; audit format v1 is frozen, see docs/audit.md in the repository. The ledger does not record complete parameters, commands, reasons, or secrets; missing records are derived from persistent facts and marked, not guessed.
There are also /approvals grants, /approvals sessions (read-only display of authorization counts per session, no cross-session authorization reuse).
ask_choices and Reminders¶
ask_choices uses the official question card for structured single/multi-select; options and supplementary content are passed back to the model verbatim (not just returning “received selections for N questions”).
On Windows, you can have taskbar flashing and synthesized sound alerts for plan cards, question cards, approval cards, and turn completion events; completion alerts can also include a green taskbar overlay badge. Sub-agent internal turns do not trigger completion alerts. Each reminder can be individually disabled in YAML or DSH settings (see below).
Settings Panel (1.1.0+)¶
DSH Settings → “Approval & Reminders” (entry id approval-ledger) provides 10 toggles, click-to-save, atomically writing to the current profile’s cordis.patch.yml via configForms and hot-applying. Policy items like mode, allowHighRiskGrants, and audit retention period are still only maintained in YAML, not in the panel, to avoid accidental weakening of approval policies.
Installation and Activation¶
Installation commands should follow the README (don’t use github:owner/repo to concatenate yourself):
dsh plugin --profile <profile> add dsh-approval-ledger@1.1.1
To explicitly enable medium auto-approval, add configuration for this plugin row in the corresponding profile’s cordis.patch.yml:
# In cordis.patch.yml, this plugin row
- id: approval-ledger
config:
mode: active
high still requires opt-in + secondary confirmation; critical is never automatic; unknown remains manual.
Reminder-related configuration example (can be merged with mode in the same block):
- id: approval-ledger
config:
mode: active
notifications: true
notifyOnPlan: true
notifyOnQuestion: true
notifyOnApproval: true
notifyOnTurnEnd: true
turnEndOnlyWhenAway: true
flashWindow: true
soundAlert: true
notifyRepeatSeconds: 0
turnBadgeSeconds: 120
Reminders are best-effort: if a window can’t be found, PowerShell/EDR denies, or the system is muted, it silently skips without affecting the approval itself.
Typical Usage¶
1. Let the Agent submit a batch plan
The model calls the Host tool request_approvals at the appropriate time (parameter structure see repository design docs). You see each operation, risk, dependency, and phase in the plan review card, and after approval, check the items you want to authorize.
2. Check the ledger
Execute in the DSH session:
/approvals audit
For machine-readable output:
/approvals audit --json
3. Structured questioning (doesn’t execute, doesn’t change authorization)
The Agent calls ask_choices; you select in the official question card, and the selected text goes back to the model context.
4. Observe only, no auto-approval
When not configured with mode: active or keeping the default, the plugin still organizes plans and keeps records, but each real invocation still goes through the official approval card, and grants are recorded as would-allow.
Use Cases and Notes¶
Who it’s for
- People who often let the Agent modify multiple files and run multiple commands consecutively, wanting to see the whole batch before approving.
- People who need controllable auto-approval for medium risk under
mode: active, while keeping manual or stronger constraints for high/critical/unknown. - People who want to use
/approvals auditto verify “who approved what, automatic or manual” afterwards.
Must be aware
- The plugin runs with the current DSH process’s permissions; before installation, please read the source code, threat model, and MIT license, and judge for yourself whether to use it in your environment.
- This is an unofficial community plugin, not affiliated with DeepSeek; the SkillHub directory site also has no official affiliation with DeepSeek / Hithink RoyalFlush.
- The security model emphasizes fail-closed: any exception, parse failure, or mismatch falls back to official approval; don’t expect the plugin to “guess for you” in ambiguous situations.
Conclusion¶
dsh-approval-ledger connects “a batch of operations → one plan review → execution with risk gating → traceable ledger” into a configurable pipeline, while preserving the DSH native approval and question card experience. If you want to try it or verify versions, you can go to the directory page for instructions, or install 1.1.1 directly from npm.