Lets the primary model ask an independent reviewer model to review a decision it has already made, with off, shadow and advisory modes. Requires your own service implementing POST /v1/decision.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ninetyhe-90/dsh-decision-review
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
[!NOTE] This bundle installs with
mode: offand makes no calls. Enabling it requires a compatiblePOST /v1/decisionservice plus an explicitmodelandbaseUrl.
Why this plugin
Asking one model to check its own answer usually repeats its own reasoning. A second opinion is useful only when the reviewer sees the question, the primary choice, the evidence, and the constraints without joining the original reasoning or holding tool permissions.
The primary model must commit to primaryChoice before review starts. The suggestion and its
confidence return to the primary model, which still decides whether to adopt, keep, or ask the user.
flowchart LR
A[Primary model picks primaryChoice] --> B[__decision_review tool]
B --> C[POST /v1/decision]
C --> D[choice + confidence]
D --> E{confidence}
E -->|>= minConfidence| F[ok: adoptable]
E -->|>= abstainBelow| G[not_adoptable]
E -->|< abstainBelow| H[abstained]
F --> I[Primary model decides]
G --> I
H --> I
Capabilities
| Capability | Behaviour |
|---|---|
| Three modes | off registers nothing; shadow logs only; advisory returns a suggestion |
| No decision hijack | Review returns advice and confidence; the primary model still chooses |
| Structured output | status, recommendation.choice, confidence, reasonCode |
| Confidence tiers | Adoptable, keep-but-not-recommended, or abstained |
| No retries | A failed review returns immediately; the primary judgement stands |
| Redacted logs | Point, status, reason code, model, HTTP status, request id, input fingerprint, latency |
| Permission isolation | Permissions, approvals, writes, network targets, and allowlists never reach the reviewer |
Protocol
POST {baseUrl}/v1/decision
Authorization: Bearer {DECISION_API_KEY}
The body has exactly three top-level fields: { model, state, questions }.
| Field | Source |
|---|---|
state.question |
Tool input question |
state.primaryChoice |
Tool input primaryChoice |
state.evidence |
Tool input evidence |
state.constraints |
Tool input constraints |
questions.recommendation.criteria |
Tool input options |
| Response | answers.recommendation.choice and confidence |
probabilities are informational only. baseUrl is the gateway root; an address already ending in
/v1 or the endpoint path is rejected at startup.
Install
dsh plugin --profile <name> add dsh-decision-review
dsh plugin --profile <name> add /path/to/dsh-decision-review
dsh plugin --profile <name> add github:ninetyhe-90/dsh-decision-review
Configuration
| Field | Type | Default | Description |
|---|---|---|---|
mode |
off | shadow | advisory |
off |
Run mode |
model |
string |
none | Required reviewer model name |
baseUrl |
string |
empty | Reviewer gateway root, without /v1 |
apiKeyEnv |
string |
DECISION_API_KEY |
Environment variable holding the credential |
allowedDecisionPoints |
string[] |
[] |
Decision point names allowed to call review |
timeoutMs |
number |
5000 |
Per-review timeout |
minConfidence |
number |
0.75 |
Adoptable threshold |
abstainBelow |
number |
0.5 |
Abstain threshold |
promptSection |
boolean |
true |
Inject the prompt section |
promptSectionOrder |
number |
30 |
Prompt section order |
systemExtra |
string |
empty | Extra domain constraints |
- insert:
- id: decision-review
name: dsh-decision-review
config:
mode: advisory
model: your-decision-model
baseUrl: https://your-gateway
Failure codes
reasonCode |
Meaning |
|---|---|
timeout / cancelled |
Local timeout or parent request cancelled |
upstream_timeout |
Upstream timeout reported by the gateway (HTTP 504) |
credential_unavailable |
Credential environment variable missing |
authentication_failed |
Credential missing or rejected (HTTP 401) |
model_not_authorized |
Credential cannot use the model (HTTP 403) |
model_unsupported |
Gateway does not know the model |
invalid_request |
Request body rejected (HTTP 400) |
route_unavailable |
HTTP 404; check baseUrl |
rate_limited / quota_exceeded |
Upstream limit or exhausted budget |
context_too_large |
HTTP 413 |
invalid_response / response_too_large |
Unparsable or oversized response |
provider_error |
Any other network or server failure |
Security boundaries
- The reviewer receives no tools, files, network access, or approval rights.
- Privilege escalation, user confirmation, writes, network targets, and allowlists stay outside review.
- Review output is advice; it cannot bypass the primary model or host confirmation.
- Logs omit request bodies and raw errors.
Compatibility
- Node.js 20.11+
- DeepSeek Harness 0.2.x (
ctx.tools,ctx.logger; optionalctx.systemPrompt) @deepseek-ai/schemastery3.18.x
Layout
src/decision-core.mjs config validation, input normalisation, prompt section, reason codes
src/decision-model.mjs tool registration, review request, result mapping
test/ config, protocol, and tool behaviour
cordis.patch.yml bundle layer, mode: off
Development
npm install --include=dev
npm test
npm run check
Roadmap
- Three modes and confidence tiers
- Structured failure codes and redacted logs
- Configurable decision point allowlist
- Bundle packaging
- npm release
- Minimal reference reviewer service
License
MIT
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 35014
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 5944
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 3709
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1141
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
sixtysevenlf/dsh-blender-plugin★ 1019
Lets a DSH agent drive a local Blender over a direct TCP channel with 16 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 186 ops across 28 families.
anysearch-team/anysearch-dsh★ 634
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.