Skip to content

ang-XWBWZ/dsh-approval-ai

30Last commit Aug 14, 2026

dsh-approval-ai DSH plugin

This plugin listens to DSH's approval/request events and uses a configured LLM provider (default deepseek-official with deepseek-v4-flash) to assess and answer approval requests. It does not add any paths, workspaces, shell, sandbox, or risk triggers. Three modes are available: ai-only (auto-approve low risk), ai-then-human (review flagged requests), and human-only (delegate all to human). It provides a Web settings card (subject to host allowlist) and a /approval-ai slash command for runtime configuration.

How to install the dsh-approval-ai DSH plugin

dsh plugin --profile approval-ai-local add /mnt/data/demo/dsh插件/approval-ai

Copying does not run this command. Review the repository and version before installing the dsh-approval-ai DSH plugin.

dsh-approval-ai DSH plugin data source

dsh-approval-ai DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-approval-ai DSH plugin can do

  • Configurable LLM provider and model for approval assessment (e.g., deepseek-official, deepseek-v4-flash).
  • Three operation modes: ai-only, ai-then-human, human-only.
  • Web settings card (Settings → Plugins → AI Approval) and slash command /approval-ai for live configuration changes.
  • Fail-closed on errors, high/critical risk, malformed output, timeout, provider errors, and cancellation.
  • Does not read project files, session history, tool schemas, credentials, or main system prompt.
  • Installable via `dsh plugin add` without modifying DSH source code; supports npm and local tarball installation.

Where the dsh-approval-ai DSH plugin fits

  • Automate approval of low-risk requests (e.g., file reads, simple commands) using AI-only mode.
  • Use AI-then-human mode to let AI review moderate-risk requests and escalate to human when needed.
  • Delegate all approval decisions to a human with human-only mode.
  • Configure different LLM providers or models for approval assessment without changing the main DSH configuration.

Who the dsh-approval-ai DSH plugin is for

  • DSH users who want to automate approval workflows with AI.
  • Teams that need to integrate AI-based risk assessment into their approval pipeline.

dsh-approval-ai DSH plugin limitations

  • No approval-result cache, permanent authorization, or multi-model arbitration provided.
  • Web settings card may be hidden if the host allowlist does not include the 'approval-ai' namespace; the /approval-ai command remains the supported control surface.
  • Current ApprovalRequest does not carry a provider-specific workspace resolver; callers must provide optional context when available.
  • Human review handoff is represented by reviewOutcome; a separate human answerer remains responsible for interactive handling.

dsh-approval-ai DSH plugin: from the repository README

Quoted from the ang-XWBWZ/dsh-approval-ai README, the upstream source of the dsh-approval-ai DSH plugin. Copyright remains with the original authors.

English | [中文](README.zh.md) AI approval answerer for `approval/request`. DSH creates and routes the approval request; this plugin only answers that already-created request with a minimal `ctx.llm` assessment. It adds no path, workspace, shell, sandbox, or risk trigger of its own. The default route is provider `deepseek-official` with model `deepseek-v4-flash`; the adapter owns credentials and provider protocol. ## Configuration ```yaml - id: approval-ai name: '@llangtop/dsh-approval-ai' config: provider: deepseek-official model: deepseek-v4-flash mode: ai-only currentPath: /workspace/project projectArchitecture: 'Configuration-supplied summary; the plugin never reads project files.' implementationArchitecture: 'Approval policy plugin over approval/request and ctx.llm.' agentsMd: 'Configuration-supplied guidance; the plugin never reads AGENTS.md.' securityApprovalPrompt: 'Assess only this approval request; do not read files or call tools.' timeoutMs: 3000 failClosed: true ``` `mode` is `ai-only`, `ai-then-human`, or `human-only`. The plugin receives every approval request that reaches its listener; it does not decide whether an approv

Read the full READMERepository license: MIT

dsh-approval-ai DSH plugin questions

How do I install @llangtop/dsh-approval-ai?

Use the DSH CLI: `cd /path/to/deepseek-harness` then `pnpm dsh plugin --profile <name> add @llangtop/dsh-approval-ai@next`. This adds the package to your profile and applies the cordis patch. You can also install from a local tarball by running `pnpm dsh plugin --profile <name> add /absolute/path/to/package.tgz`.

Why is the plugin's settings card not showing up in the Web UI?

The DSH Web host filters settings namespaces through a fixed allowlist. The 'approval-ai' namespace is registered by this plugin but may not be in the host allowlist, so the card is absent. Use the `/approval-ai` slash command instead to configure the plugin. This is a known host API limitation; a third-party package cannot add a namespace to the allowlist by itself.

How do I switch between ai-only, ai-then-human, and human-only modes?

You can change the mode via the `/approval-ai` command. For example, `/approval-ai mode ai-only` sets the mode to AI-only. You can also use `/approval-ai enable` to enable automatic AI approval (ai-only) and `/approval-ai disable` to delegate to human (human-only). Changes take effect live without restarting DSH.

Does the plugin read my project files or session history?

No. The plugin explicitly avoids reading the project, session history, tool schemas, credentials, or the main system prompt. It only uses the configuration values you provide (current path, architecture summaries, AGENTS.md guidance, and security-approval prompt) and the DSH approval request fields. The model request and response are not written to the agent session.

What happens if the AI assessment fails or times out?

The plugin is configured to fail closed on errors, high/critical risk, malformed output, missing routes, cancellation, timeout, and provider errors. This means the approval request will be denied (not allowed) unless the AI returns a valid 'allow' assessment. You can adjust the timeout with the `timeoutMs` configuration (default 3000 ms).