DSH-Approval-AI: AI-Assisted Response Plugin for DSH Approval Requests

Preface

DSH emphasizes that “everything is a plugin,” and approvals, routing, and tool execution in agent workflows can all be integrated via plugins. Approval requests typically appear before operations that require additional confirmation; if you want the model to provide an initial assessment first, without allowing it to create new approval triggers, read project files, or access credentials, you need a plugin with a narrower boundary.

dsh-approval-ai is designed for this scenario: it responds to approval/request events already created by DSH, uses the unified ctx.llm routing for a minimal assessment, and fails closed under abnormal conditions. The community directory is an independent site and has no official affiliation with DeepSeek / High-Flyer.

The following introduces this plugin’s positioning, features, installation, and usage.

What This Is

dsh-approval-ai is a DSH plugin that adds AI-assisted responses to existing approval workflows. The repository is named ang-XWBWZ/dsh-approval-ai, the npm package is @llangtop/dsh-approval-ai, and it is licensed under MIT.

It does not create approval triggers; it only processes approval events that DSH has already created and delivered to it. This plugin is suitable for DSH use cases where you want to confine the approval assessment to the request itself without introducing additional data reads.

Core Features

  • Uses ctx.llm routing to respond to already-created DSH approval/request events.
  • The default route is provider deepseek-official, model deepseek-v4-flash; other provider routes currently registered in DSH can also be used.
  • Supports three modes: ai-only, ai-then-human, and human-only.
  • Fails closed on deny results, high/critical risk, review, malformed output, missing routes, cancellation, timeouts, or provider errors.
  • Registers the DSH /approval-ai command to display status, switch provider/model/mode, enable, disable, and reset user override configurations.
  • Registers the approval-ai settings namespace; when the DSH host exposes this namespace, it can provide a web settings card.
  • Does not read project files, session history, tool schemas, credentials, or the main system prompt.
  • The model must return decision, risk, and reason; no tool calls are available.
  • Does not provide approval result caching, permanent authorization, or multi-model arbitration.

Installation and Enablement

Install into a specified DSH profile using the @next tag of the npm package @llangtop/dsh-approval-ai:

pnpm dsh plugin --profile approval-ai add @llangtop/dsh-approval-ai@next

After completing the above steps, the plugin will register the approval-ai settings namespace and the /approval-ai command. To enable automatic AI approval, run:

/approval-ai enable

This enables ai-only mode. To handle requests manually only, run:

/approval-ai disable

disable does not uninstall the plugin; it switches the plugin to human-only mode, leaving approval requests to human handling.

Typical Usage

Use the following commands in DSH:

/approval-ai
/approval-ai enable
/approval-ai disable
/approval-ai mode ai-only
/approval-ai mode ai-then-human
/approval-ai mode human-only
/approval-ai provider <id>
/approval-ai model <id>
/approval-ai reset

The functions of each command are as follows:

  1. /approval-ai: Displays the current provider, model, mode, and failClosed.
  2. /approval-ai enable: Enables automatic AI approval, corresponding to ai-only.
  3. /approval-ai disable: Disables AI approval, corresponding to human-only.
  4. /approval-ai mode <mode>: Switches to ai-only, ai-then-human, or human-only.
  5. /approval-ai provider <id>: Selects an LLM provider route currently registered in DSH.
  6. /approval-ai model <id>: Selects a model provided by that provider route.
  7. /approval-ai reset: Clears the plugin’s user override configuration.

When selecting a provider and model, the provider must be a route currently registered in DSH, and the model must be provided by that route.

Applicable Scenarios and Notes

It is suitable for the following scenarios:

  • You already have DSH approval requests and want the model to provide an initial auxiliary assessment.
  • You do not want the plugin to create approval triggers on its own or expand the scope of data reads.
  • You want to fail closed automatically under abnormal conditions rather than allowing requests through.
  • You want to quickly adjust provider, model, and mode via the /approval-ai command.

Notes:

  • The plugin runs with the permissions of the current dsh process. Inspect the source code and license before installation; this plugin is licensed under MIT.
  • The web settings card may not appear, as the DSH web host may filter settings namespaces through a fixed allowlist; before the host provides an extensible settings registration mechanism, use the /approval-ai command for configuration.
  • disable does not uninstall the plugin; it only switches to human-only mode.
  • The plugin does not provide approval result caching, permanent authorization, or multi-model arbitration.
  • The default provider is deepseek-official, and the default model is deepseek-v4-flash; switching still requires satisfying DSH route registration and model availability requirements.

Links

  • GitHub repository: https://github.com/ang-XWBWZ/dsh-approval-ai
  • npm package name: @llangtop/dsh-approval-ai
  • The community directory can be queried by the plugin name dsh-approval-ai; the directory is an independent site and has no official affiliation with DeepSeek / High-Flyer.
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye