masquerator-coder/dsh-permission-gate ↗★ 1

dsh-permission-gate

AI 裁决的智能审批模式:安全操作自动放行,其余转人工确认。 适合希望减少审批弹窗、又保留人工兜底的用户。

套件
dsh-permission-gate
相容性
待驗證
Harness 依賴範圍
>=0.1.0-rc.8 <0.2.0
Cordis 依賴範圍
^4.0.2
版本
0.1.0
最近更新
2026年9月8日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:masquerator-coder/dsh-permission-gate

Configuration

All keys are Schemastery-validated and changeable from cordis.yml/--patch. Example:

- insert:
    - id: permission-gate
      name: dsh-permission-gate
      config:
        provider: deepseek      # explicit provider route; must pair with model.
        model: deepseek-chat    # explicit judge model.
        judgeTimeoutMs: 15000   # deadline for one judge call before falling back to human.
        maxTokens: 256          # judge output-token cap.
        minConfidence: 0.85     # min confidence for an allow to auto-release.
        # Optional override of the built-in safety-adjudication system prompt.
        systemPrompt: "..."
        # Deterministic-danger rules evaluated before any LLM call. A match → human.
        dangerRules:
          - label: secrets
            patterns: ["ssh", ".env", "api.key"]
          - label: destructive
            patterns: ["rm -rf", "format "]
  • provider / model: if omitted, the judge uses the session's last logged model route (request/header). If neither an explicit pair nor a logged route is available, the request is treated as an internal-exception fallback (human decides) — fail-safe.
  • dangerRules: substring patterns, case-insensitive, matched against toolName and reason. Set to [] to disable the local gate entirely.