๐Ÿค– dsh-auto-review

September 1, 2026 ยท View on GitHub

๐Ÿค– dsh-auto-review

Gitee

Second-model AI approval for DeepSeek Harness โ€” a read-only reviewer subagent decides allow/deny on the approval chain, fail-closed by default.

When an action crosses the sandbox boundary, a second model reads the evidence and returns a verdict with a reason โ€” so humans approve nothing while nothing unsafe slips through.

Official repository. This is the only official repository of dsh-auto-review, maintained by PerryLink. Same-name repositories under other accounts are not affiliated.

License DSH plugin Node CI Version npm version npm downloads

English ยท ็ฎ€ไฝ“ไธญๆ–‡ ยท Espaรฑol ยท Portuguรชs ยท เคนเคฟเคจเฅเคฆเฅ€


Compatibility

SurfaceStatus
HarnessDeepSeek Harness 0.1.1-rc.2 (dependencies pinned to 0.1.1-rc.2; peers >=0.1.0-rc.8 <0.2.0)
Node^22.19.0 || >=24.0.0
PlatformsAll (host answerer; optional Web review panel via the session-projection capability)
ModelAny (the reviewer inherits the session agent's route; reviewerModel overrides)

What you get

dsh-auto-review puts a second model on the approval/request answerer chain:

  1. Official seam โ€” an answerer that claims only the requests it owns (ai policy) and delegates everything else via next(); the human approval flow is never short-circuited.
  2. Read-only reviewer subagent โ€” a one-shot fork with a read/glob/grep tool allow-list returns a structured verdict { decision, reason, riskLevel }. Reviewer asks are recognized by identity and delegated; maxDepth + the allow-list keep the reviewer non-delegating.
  3. Fail closed โ€” reviewer crash, timeout, or schema mismatch resolves through fallbackPolicy (default rejected); a deny verdict feeds its reason back to the calling model.
  4. Config-driven routing โ€” per-tool policies (ai/human/never) plus regex risk rules, all changeable from cordis.yml.
  5. Deny reasons reach the model โ€” the reviewer's reason is injected into the denied tool result (callId-linked); fallback and never-policy rejections inject auditable markers too ([auto-review] / [auto-review-fallback] / [auto-review-never]).
  6. Full audit trail โ€” log-only autoReview/verdict + autoReview/rejection session events (envelope ignorable: true) plus an optional invariant companion enforcing marker โŸบ event.
  7. Safety knobs โ€” a rejection circuit breaker (3 consecutive denials, or 6 of the last 10 verdicts, per turn), a risk-level policy, a one-shot /auto-review approve override, and a never-policy hard disable that explains itself to the model.
  8. Optional reviewer context โ€” a bounded compact transcript (contextBudget) plus a Codex-style Markdown ruling policy (reviewerPolicyText).

Every decision reconstructs from the session log: approval/asked โ†’ autoReview/verdict (or autoReview/rejection) โ†’ approval/decided.

Why a second model instead of rules?

Pattern-based auto-approvers decide before dispatch, with no evidence. dsh-auto-review gives the decision to a reviewer subagent that reads the actual workspace (through its read-only tool face), the already-streamed tool-call arguments (sensitive values redacted), the request reason, and your risk rules โ€” then returns a structured verdict. A deny verdict feeds its reason back to the calling model, so the agent learns why instead of retrying blindly.

Quick start

# 1. install the bundle into your profile
dsh plugin --profile web add "github:PerryLink/dsh-auto-review#main"

# or from npm (published releases)
dsh plugin --profile web add dsh-auto-review

# 2. restart and verify the row
dsh --profile web --dump-config | grep -A4 'id: auto-review'

Out of the box the shipped patch AI-reviews bash and write; every other tool (including edit โ€” in-place modification) delegates to the human chain. Add edit: ai explicitly if you accept in-place edits without a human in the loop.

Install & uninstall

  • git channel (latest main): dsh plugin --profile web add "github:PerryLink/dsh-auto-review#main" โ€” the isolated prepare build needs the single allowBuilds: { esbuild: true } key the dsh CLI prints for dsh-auto-review.
  • npm channel (published releases): dsh plugin --profile web add dsh-auto-review.
  • 1024 store channel: npm i -g dsh1024 once, then dsh1024 plugin --profile web add dsh-auto-review (counts toward the deepseek1024.com install ranking).
  • tarball channel: pnpm pack in this repo, then dsh plugin --profile web add ./dsh-auto-review-<version>.tgz.
  • uninstall: dsh plugin --profile web remove dsh-auto-review (or remove the row from the profile patch).
  • native build scripts: when dsh plugin add stops at ERR_PNPM_IGNORED_BUILDS for koffi / node-pty (pulled in by the eval harness), run pnpm approve-builds to approve those build scripts.

Configuration

All tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row โ€” restate every key you need.

KeyDefaultMeaning
enableByDefaulttrueSessions start with auto-review enabled; /auto-review on|off writes a durable override that beats this
toolsPolicy.defaulthumanPolicy for unlisted tools (delegate to the human answerer)
toolsPolicy.overrides{}Per-tool policy: ai / human / never
riskRules[]{pattern, policy, field?} matched before the tool table; field selects reason (default), toolName, or arguments
reviewerProviderforkSubagent provider for the reviewer (in-process fork backend)
reviewerModel(inherit)Reviewer model id; unset inherits the session agent's route
reviewerTimeoutMs60000Verdict deadline; on expiry the fallback policy applies
reviewerTools[read, glob, grep]The reviewer child's tool allow-list (must be non-empty)
fallbackPolicyrejectedReviewer failure: rejected (fail closed) / delegate / allow-once
maxReviewsPerTurn10Real AI-verdict budget per open turn; beyond it, requests delegate
maxFailuresPerTurn10Reviewer-failure budget per open turn
reasonMaxChars2000Cap for reviewer reasons and the redacted argument preview
reviewerGuidance(none)Optional advisory guidance appended to the reviewer prompt
reviewerPolicyText(none)Markdown ruling policy injected into the reviewer prompt (Codex-style)
denyGuidance(anti-circumvention text)Guidance appended to every injected deny reason
contextBudget{turns: 2, maxChars: 4000}Compact transcript budget for the reviewer prompt (the open turn plus the one before it); turns: 0 disables the section โ€” and a blind reviewer denies user-authorized actions, so the runtime warns when 0 meets an ai policy. The character budget is spent on the most recent lines
riskPolicy{maxAutoAllow: high, onHighRisk: delegate}allow verdicts above maxAutoAllow delegate or deny
circuitBreaker{consecutiveDenies: 3, windowDenies: 6, windowSize: 10, action: delegate}Rejection circuit breaker
overrideTtlMs300000How long a /auto-review approve override stays usable
verdictCacheTtlMs60000Reuse a recent verdict for an identical tool + arguments fingerprint; 0 disables the cache. Only applies with contextBudget.turns: 0 โ€” a transcript-dependent verdict is not replayable from tool + arguments alone
verdictCacheMaxEntries256Maximum cached fingerprints before oldest-eviction
languageenUI language of the /auto-review command output (en | zh)
allowUnmarkedAuditfalseForce session-log audit on hosts that drop the ignorable marker or fail-closed on unknown event types (host 0.1.2-alpha.3+) (dangerous: unmarked events make sessions unresumable elsewhere); default is detect-and-degrade 0.1.2-alpha.3 (adapted 2026-09-01): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged.

Example (annotated full form: fixtures/config/config-full.yaml):

- insert:
    - id: auto-review
      name: dsh-auto-review
      config:
        toolsPolicy:
          overrides: { bash: ai, write: ai }
        riskRules:
          - pattern: '(?i)(rm\s+(-[a-z]+\s+)*/|git\s+push\s+--force)'
            policy: never
          - pattern: 'write'
            policy: never
            field: toolName
        reviewerTimeoutMs: 30000
        fallbackPolicy: delegate
        riskPolicy: { maxAutoAllow: medium, onHighRisk: delegate }
        circuitBreaker: { consecutiveDenies: 3, windowDenies: 6, windowSize: 10, action: delegate }

Where the config actually comes from

~/.dsh/settings.yaml is NOT a config source for this plugin. An auto-review: block there has no effect and produces no warning: like every DSH function plugin, dsh-auto-review receives its Config from the row the loader mounts it with โ€” the profile's cordis patch layer. (Some other DSH plugins additionally read the settings service, so the inconsistency is easy to trip over, and the symptom is indistinguishable from the reviewer simply denying.)

Put the configuration in your profile's cordis.patch.yml. An id-targeted override replaces the whole config row, so restate every key you need โ€” dropping toolsPolicy silently returns bash/write to the schema default human and the reviewer stops running at all:

- id: auto-review
  config:
    toolsPolicy:
      overrides: { bash: ai, write: ai }
    contextBudget: { turns: 4, maxChars: 8000 }

Tools & surfaces

SurfaceKindNotes
auto-reviewanswererapproval/request waterfall answerer โ€” claims ai-policy requests, delegates the rest via next()
/auto-reviewcommandon|off|status|approve [n] โ€” durable per-session override, budgets, and cumulative statistics
deny-reason injectionlistenertools/post-execute โ€” verdict / fallback / never reasons fed back to the denied tool result
autoReviewsession projectionFolded from the log-only autoReview/* events
Web review panelclientSession-header action: switch, budgets, statistics, recent verdicts, one-shot approve
dsh-evalCLIYAML-driven agent evaluation engine (bin/dsh-eval.mjs)
invariant companioninvariantdsh-auto-review/invariant (optional; needs the invariants service)

Session command

/auto-review on|off|status|approve [n]

on/off append the durable autoReview/state override (the fold survives restart/resume โ€” replay IS the state) and inject a switch notice the model sees (logged as a user/message event). status reports the effective state, both per-turn budgets (AI verdicts and reviewer failures), a tripped circuit breaker when one is active, and the session's cumulative statistics (allows/denies/fallbacks/never rejects, mean duration, recent verdicts). approve [n] records a single-use autoReview/override for the n-th most recent denial (1 = most recent): the next same-tool review within overrideTtlMs carries the authorization as reviewer context โ€” the reviewer still decides, and the override is consumed by that review regardless of its outcome.

Web review panel

In the Web GUI (web profile), the package contributes a session-header action (AI Review) that opens a panel with the session's auto-review state: the switch with on/off buttons (they execute /auto-review on|off), both per-turn budgets, cumulative statistics (including hard-disable rejections and cache hits), the circuit trip, the recent verdicts, and one-shot approve buttons for recent denials (they execute /auto-review approve [n]).

How it is wired:

  • The host registers an autoReview session projection (folded from the log-only autoReview/* events) and serves it through the session-projection channel.
  • The browser half is a client module (auto-discovered from the dsh.client declaration) registered on the conversation.session.header.actions seat.
  • No extra patch rows are needed: the panel loads whenever the plugin is installed in a profile whose web build provides the session-projection capability (the web profile does). Without that capability the panel reports itself unavailable; the answerer is unaffected.

The panel reads only whole projection values โ€” it never receives the raw session event stream.

How it works

                       approval/request waterfall (answerer chain)
                        โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ dsh-auto-review answerer                     โ”‚
โ”‚  ยท session enabled?  ยท policy = ai?         โ”‚   no โ”€โ”€ next() โ”€โ”€โ–ถ human answerer (UI)
โ”‚  ยท risk rules โ†’ toolsPolicy โ†’ default       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚ yes
                        โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ reviewer subagent (fork, one-shot)โ”‚
        โ”‚  ยท toolFilter: read/glob/grep     โ”‚
        โ”‚  ยท outputSchema: {decision,       โ”‚
        โ”‚    reason, riskLevel}             โ”‚
        โ”‚  ยท timeout + req.signal abort     โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚ verdict / failure (fail-closed fallback)
                        โ–ผ
 allow โ†’ allowed-once        deny โ†’ rejected + reason injected into the
                                       denied tool result (callId-linked)
                        โ”‚   never โ†’ rejected + [auto-review-never] feedback
                        โ”‚            (hard disable, no reviewer runs)
                        โ–ผ
 audit: approval/asked โ†’ autoReview/verdict | autoReview/rejection
        โ†’ approval/decided (session events, log-only, invariant-checked)

Composition order. The answerer runs at its registration position in the waterfall: if a human UI answerer is composed BEFORE the auto-review row, humans answer first and the reviewer only sees what is delegated downstream. Verify with dsh --profile <name> --dump-config and place the auto-review row before your human answerer rows when you want ai-policy tools routed to the reviewer first.

dsh-eval โ€” agent evaluation engine

Beyond the approval reviewer, dsh-auto-review ships dsh-eval: a YAML-driven agent evaluation platform that runs real headless DSH sessions (one isolated agent + scratch workspace per case, the official Minimal persona as the baseline system prompt), collects the tool-call trace from the session event log, and evaluates structured assertions plus an optional second-model review โ€” the same reviewer seam as the approval answerer.

# eval/cases/demo.yaml (abridged)
suite:
  name: my-suite
  cases:
    - id: math-output
      input: Solve 17 ร— 24 and reply with only the final number, nothing else.
      expect:
        output: { contains: "408" }
    - id: glob-trace
      seedFrom: '.'
      input: Use the glob tool with pattern "src/**" to list the source filesโ€ฆ
      expect:
        toolCalls: [{ tool: glob, arguments: { contains: { pattern: "src" } } }]
        results: [{ tool: glob, contains: "index.ts" }]

Run it (a DeepSeek API key must be in the environment):

dsh-eval eval/cases --model deepseek-v4-flash --timeout-ms 240000 --out .eval-reports

Assertion families

The expect block supports six assertion families; each assertion is evaluated independently and reports its own pass/fail with expected/actual values, so a failing case explains itself without a rerun.

FamilyDSL keysWhat it gates
Tool tracetoolCalls, toolCallsExact, noToolCalls, resultsordered tool-call sequence (subsequence with skips), exact name sequence, per-tool result (isError/contains/regex)
Output & budgetoutput, turnEnds, maxTokensfinal-output substring/regex, turn outcome, token budget
Prompt regressionpromptthe rendered system prompt must match a committed baseline (or a baselineFrom file); any drift is reported as a side-by-side diff, with allowedChanges regexes to whitelist intended edits
Stress metricsstressP99 step latency (maxP99Ms), worst time-to-first-token (maxTtftMs), aggregate token generation speed (minTokensPerSecond)
Fairnessbiasbias radar over the final output: per-category regex counts (categories), hard forbid patterns, maxHits/maxCategoryHits caps
Second-model reviewreviewa supplementary pass/fail verdict from the reviewer subagent (a separate layer, same seam as the approval reviewer)
- id: regression-gate
  input: Answer in one sentence.
  expect:
    prompt:
      baseline: "You are a helpful software engineer assistant."
      allowedChanges: ["copyright-year"]
    stress:
      maxP99Ms: 8000
      maxTtftMs: 3000
      minTokensPerSecond: 20
    bias:
      categories: { gender: ["[Hh]e is (un)?stable"] }
      forbid: ["[Ss]crew that"]
      maxCategoryHits: 0

CI gate: the process exits 0 only when every case of every suite passed โ€” failing evaluations fail the build. Each case leaves a replayable session JSONL and a trace JSON beside report.md/report.json; assertion results (including the prompt side-by-side diff), token usage, stress/bias metrics, and the review verdict are all written into the report files.

- name: dsh-eval
  run: npx dsh-eval eval/cases --model deepseek-v4-flash --timeout-ms 240000 --out .eval-reports
  env:
    DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}

dsh-eval differs from openai/codex-research: codex-research scores agent trajectories for research comparison; dsh-eval is a declarative pass/fail regression harness โ€” YAML cases, structured trace/prompt/stress/bias assertions, an optional second-model review, and a CI exit code โ€” for gating any DSH agent, not research ranking.

MCP server (standalone)

dsh-auto-review also ships a stdio MCP server (dsh-auto-review-mcp) so external MCP clients (Claude, Codex, โ€ฆ) can consume a deterministic review path without a harness. It speaks JSON-RPC 2.0 over newline-delimited JSON (NDJSON) โ€” one JSON object per line, no Content-Length framing.

Boundary. The full reviewer needs the harness subagent seam and a second model, which a separate stdio process cannot reach. The standalone server is therefore deterministic rules + cache, no model review:

  • review_action reuses the same-fingerprint verdict cache (src/cache.ts) and the risk-rule / tool-policy resolution (src/config.ts): a never rule โ†’ deny; a cache hit on an identical tool + arguments fingerprint replays that verdict; anything else (ai needs a model, human needs a human) โ†’ fail-closed deny with reason: "standalone path, no model". It never allows an action a model did not already allow.
  • cache_stats reports hit/store counts and the TTL status.
ToolPurpose
review_action{tool, args?, reason?} โ†’ {decision, reason, riskLevel} โ€” deterministic deny / cache replay
cache_stats{} โ†’ {hits, stores, size, ttlMs, enabled}

Run it directly:

# risk rules come from environment variables
export DSH_AUTO_REVIEW_RISK_RULES='[{"pattern":"rm -rf","policy":"never","field":"arguments"}]'
node bin/dsh-auto-review-mcp.mjs
# or, after npm install: npx dsh-auto-review-mcp

Environment config: DSH_AUTO_REVIEW_RISK_RULES (JSON array of {pattern, policy, field?}), DSH_AUTO_REVIEW_TOOLS_POLICY (JSON {default?, overrides?}), DSH_AUTO_REVIEW_CACHE_TTL_MS, DSH_AUTO_REVIEW_CACHE_MAX_ENTRIES.

Claude Desktop (claude_desktop_config.json) example:

{
  "mcpServers": {
    "dsh-auto-review": {
      "command": "npx",
      "args": ["-y", "dsh-auto-review-mcp"],
      "env": {
        "DSH_AUTO_REVIEW_RISK_RULES": "[{\"pattern\":\"rm -rf\",\"policy\":\"never\",\"field\":\"arguments\"}]"
      }
    }
  }
}

The server is read-only and deterministic: no network, no model, no writes.

Permissions & data

  • Permissions: the workshop manifest declares session:append, approval:answer, subagent:spawn, command:register, and tools:observe.
  • Data: nothing is stored on disk; the report ring buffer is in-memory and bounded. No network requests of its own.
  • Session log: autoReview/* events carry reviewer identity, verdict, reason, risk, and duration โ€” appended with the envelope's ignorable: true marker so any build loads the log. Hosts whose Session.append predates the marker (every released rc line through 0.1.1-rc.2 โ€” no release stamps it yet) are detected before the first append (peer-version pre-check); host 0.1.2-alpha.3 keeps the ignorable field on the envelope but Session.append offers no way to stamp it (its third parameter is SurfaceIntent for surface events only), and the persistence read path refuses unmarked unknown event types, so those lines โ€” and unresolvable versions โ€” also fail closed before any append. Audit then degrades to an in-memory mirror with marker-free feedback, so sessions stay loadable everywhere.

Security boundaries

  • The reviewer is a model. Its verdicts are advisory policy, not a security kernel; prefer human/never rules for irreversible operations.
  • Fail closed. Every abnormal path (provider missing, capability gaps, start rejection, timeout, non-completed stop reason, missing/malformed verdict, audit-correlation failure) resolves through fallbackPolicy, default rejected โ€” and the rejection feeds an auditable reason back to the model. allow-once grants unconditionally; it exists only for unattended deployments whose admin accepts that risk.
  • Read-only reviewer. The reviewer's toolFilter allow-list (read/glob/grep) cannot write, edit, run bash, fetch the network, or delegate (maxDepth = its own depth). Its session log is persisted and auditable.
  • Context-isolated reviewer. The reviewer child's steps are filtered on the documented agent/pre-step seam: only its own prompt and its own read-only tool results enter them. Workspace instruction files (AGENTS.md / CLAUDE.md), the harness runtime-context snapshot, and any context-injecting plugin are dropped before the loop appends them, so repository-controlled text never reaches the component that decides whether a call is allowed. This holds under EITHER subagent provider โ€” those producers inject fresh into any new agent session, so the filter, not the provider choice, is what closes them. The filter is an allow-list over message SOURCES, so a plugin that declares a new source kind is dropped too.
  • Sensitive arguments are redacted (key-name matching: token, password, api_key, Authorization, credentials, private keys โ€ฆ) before entering the reviewer prompt; the plugin never executes the reviewed arguments. Redaction is key-based, not content-based โ€” do not AI-review tools whose argument values you cannot afford to show a model.
  • Hard disables explain themselves. A never tool or risk rule rejects deterministically AND records a log-only autoReview/rejection event, then injects a [auto-review-never] marker into the denied tool result โ€” the model learns the action is hard-disabled instead of retrying it (invariant-checked: marker โŸบ event).
  • Rejection circuit breaker. A run of denials in one turn trips the breaker (consecutiveDenies / windowDenies inside windowSize), recorded as a log-only autoReview/circuit event; later requests follow its action (delegate / reject / abort-turn).
  • Reviewer context is presented transcript. contextBudget feeds already-presented session content to the reviewer. With the default same-route reviewer model that content stays inside one provider; configure reviewerModel to a different provider only if you accept presenting that transcript to it.
  • never is one-way at this layer. A never tool or risk rule rejects before the human chain sees the request โ€” a lockdown knob, not a default.

Known limitations

  • Two different exposures, two different answers โ€” neither substitutes for the other. Injected context (workspace instruction files, the runtime-context snapshot, third-party plugin injections) is injected fresh into any new agent session, so it reaches the reviewer identically under reviewerProvider: fork and reviewerProvider: spawn โ€” measured byte-identical across both on the same request. The agent/pre-step source filter is what closes it, under either provider; spawn alone does NOT keep workspace instructions out of the reviewer. Separately, fork seeds the child with the delegating session's completed turns: that history is already the child's own log rather than a message entering a step, so the filter cannot touch it and only spawn avoids it, with the reviewer prompt's untrusted-transcript fence as the mitigation in between. In the two traces above the seeding produced no additional messages, so its practical impact is unquantified.
  • The reviewer needs a working LLM route (inherited by default); without one every review falls back per fallbackPolicy โ€” never a silent grant.
  • reviewerTools names must exist as global tools in the profile; an unknown name fails the reviewer child loudly at the earliest point and falls back.
  • Risk rules match the request reason, the toolName, or the redacted call arguments per their field; other conditions belong in toolsPolicy.overrides.
  • The /auto-review approve override authorizes the next same-tool review, not the exact historical call; a different action on the same tool consumes it.
  • The verdict events are log-only; the Web review panel reads the folded autoReview projection (the raw event stream never reaches browser plugins).
  • autoReview/state and autoReview/verdict are appended with the envelope's ignorable: true marker on hosts that honor it, so any harness build loads the log โ€” readers that do not know the out-of-repo types simply skip those records. On released rc hosts (rc.1โ€“rc.8) the runtime detects the dropped marker and never writes these events (the in-memory mirror keeps the command, budgets, breaker, and approve working for the session); sessions already polluted by pre-0.5.1 versions can be repaired with scripts/repair-session-logs.mjs from dsh-permission-rules (its default target set covers all five autoReview/* event types).
  • The git channel needs the single allowBuilds key the dsh CLI prints for dsh-auto-review itself. The repo ships its own pnpm-workspace.yaml with allowBuilds: { esbuild: true }; typescript + tsdown are regular dependencies.
  • The optional invariant companion needs the invariants service (agent-spine compositions such as headless/ACP); the plain web profile does not provide it, so the row ships commented out in the bundle patch.
  • Andy8647/dsh-auto-approval โ€” two-state allow/deny classifier on the tools/pre-execute waterfall with file-log audit. dsh-auto-review deliberately differs: official answerer chain, always delegates what it does not own, read-only second model with a structured verdict, deny reasons fed back to the model, session-log audit.
  • ACP automation bridge โ€” one-shot machine decisions for its own ACP-owned agents. dsh-auto-review is session- and tool-policy-scoped for the interactive harness; it never infers durable grants.

Development

pnpm install                # node ^22.19 || >=24
pnpm run typecheck          # tsc: src + tests against the local harness checkout
pnpm test                   # vitest: 233 tests, 20 files
pnpm run build              # tsc declarations + tsdown bundles (lib/, incl. the client bundle)
pnpm run verify:self-contained
pnpm pack                   # the published tarball

Repository layout: src/index.ts (plugin contract) ยท src/config.ts (Schemastery schema + resolution) ยท src/runtime.ts (answerer, command, deny-reason injection) ยท src/review.ts (reviewer orchestration, prompt, sanitization) ยท src/events.ts (session-event vocabulary + folds) ยท src/audit.ts (host ignorable-marker capability detection) ยท src/projection.ts + src/projection-types.ts (the autoReview session projection) ยท src/invariant.ts (invariant companion) ยท src/eval/ (the dsh-eval engine) ยท eval/ (shipped evaluation composition) ยท bin/dsh-eval.mjs (CLI launcher) ยท src/client/ (browser half) ยท test/ ยท fixtures/.

Topics

deepseek-harness, dsh, dsh-plugin, cordis, approval, auto-review, second-model, ai-safety, sandbox, subagent

Contributors

  • @PerryLink โ€” creator and maintainer: the approval answerer, the reviewer subagent, risk policy and circuit breaker, the session-projection review panel, the invariant companion, dsh-eval, and the five-language docs.
  • @weipeng1999 โ€” proposed independent reviewer provider/model routing (#11, discussion #12), which shipped as reviewerProvider / reviewerModel.
  • @alexchenzl โ€” listed the plugin on the DSH plugin directory (#10).

This project is one of the 33 DeepSeek Harness plugins maintained by PerryLink. If this one helps you, the others likely will too:

PluginOne-liner
dsh-dsh-background-agentsDurable background child agents with a Web UI sidebar, messaging and interrupt
dsh-dsh-budgetCost governance for DeepSeek Harness: budgets, carbon, and latency in one panel.
dsh-dsh-checkpoint-rewindClaude Code /rewind-equivalent: snapshots, session forks, one-shot restore
dsh-dsh-claude-moveMigrate Claude Code sessions, memory, skills and CLAUDE.md into DSH
dsh-dsh-clickCross-platform native desktop control for DeepSeek Harness โ€” Windows first.
dsh-dsh-composer-historyTerminal-style input history for the web composer: arrows, Ctrl+R search
dsh-dsh-data-qualityDataset quality checks and citation cross-checks (the optional numeric bridge consumed here)
dsh-dsh-defendPrompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness.
dsh-dsh-doublecheckEngineering-discipline guard: requirements grill, test gates, adversary review
dsh-dsh-drawUnified static-image generation routing for DeepSeek Harness.
dsh-dsh-fastRead-only performance diagnostics for DeepSeek Harness.
dsh-dsh-fund-researchDeterministic research reports for Chinese public mutual funds
dsh-dsh-githubGitHub PR/issues integration for DSH, every write gated by approval
dsh-dsh-industry-researchIndustry research orchestration that seals its deliverables through this plugin's ctx.researchReport.assemble
dsh-dsh-libraryLocal document knowledge base for DeepSeek Harness.
dsh-dsh-local-aiLocal-model (Ollama) integration for DeepSeek Harness.
dsh-dsh-lsp-actionsLSP diagnostics, formatting, completion, code actions and rename over language servers
dsh-dsh-maskPII masking middleware: anonymize at the model boundary, restore at the display layer
dsh-dsh-mcp-panelRead-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors
dsh-dsh-mementoApproval-gated cross-session memory: ctx.memory seam + SQLite + memory tool
dsh-dsh-observeOpenTelemetry and Langfuse observability exporter for DeepSeek Harness.
dsh-dsh-output-stylesClaude Code outputStyles-equivalent runtime style switching
dsh-dsh-permission-rulesClaude Code-style declarative allow/deny/ask permission rules with audit
dsh-dsh-plugin-guidePlugin-development knowledge base as an on-demand agent skill
dsh-dsh-research-reportVerifiable research-report engine: content-addressed evidence ledger and sealed versions
dsh-dsh-scoreMulti-dimensional quality scoring for DeepSeek Harness plugins.
dsh-dsh-session-pinPin sessions in the Web sidebar with durable ordering
dsh-dsh-session-syncCross-device session sync for DeepSeek Harness โ€” a dedicated git mirror of your session store.
dsh-dsh-skill-pack-securitySecurity-audit skill pack: secret scan, dependency and supply-chain review
dsh-dsh-talkVoice-first session loop for DeepSeek Harness: talk to it, hear it answer.
dsh-dsh-test-driveIsolated install-and-smoke test drives for DeepSeek Harness plugins.
dsh-dsh-translateVendor parameter translation and deterministic JSON repair for DeepSeek Harness.

License

Apache License 2.0 ยฉ 2026 dsh-auto-review contributors