ang-XWBWZ/dsh-approval-ai1

@llangtop/dsh-approval-ai

AI 审批决策插件:使用统一的 ctx.llm 路由,结合本地失败关闭(fail-closed)安全策略,自动对工具调用请求进行评估。

AI 分析

核心用途是实现工具调用的智能自动化审批。适合希望解放双手、让 AI 自动评估其他 Agent 工具调用安全性的用户,支持纯 AI、AI+人工或纯人工模式,默认安全策略在超时或失败时自动拒绝。

套件
@llangtop/dsh-approval-ai
版本
0.1.0-rc.5
授權
MIT
最近更新
2026年8月14日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ang-XWBWZ/dsh-approval-ai

Configuration

- 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 approval request should exist. human-only delegates every request. ai-only maps valid allow assessments to allowed-once; deny, high/critical risk, review, malformed output, missing routes, cancellation, timeout, and provider errors fail closed. ai-then-human maps review to the configured reviewOutcome because listener order is not a priority mechanism.

The model receives the DSH approval request fields plus explicitly configured background: the current path, architecture summaries, mounted AGENTS.md guidance, and the security-approval prompt. These are configuration values, not files the plugin reads. The plugin never reads the project, session history, tool schemas, credentials, or the main system prompt, and does not write the model request or response to the agent session. Arguments and response reasons are byte-bounded and model output is runtime-validated JSON.