DeepSHPlugins
dsh-always-require-tools-approval 项目预览
GITHUB / COMMUNITY PROJECT

dsh-always-require-tools-approval

安全与运维TypeScriptMIT

在配置的工具(默认 bash、pwsh)执行前要求一次性用户审批:受控工具暂停并询问,其余委托执行,缺少审批渠道时默认拒绝。

3 StarsJ0ss077 更新时间 2026-09-06
访问 GitHub 仓库
dsh-always-require-tools-approval 项目预览

项目介绍

中文

在配置的工具(默认 bash、pwsh)执行前要求一次性用户审批:受控工具暂停并询问,其余委托执行,缺少审批渠道时默认拒绝。

English

Requires one-shot user approval before configured tools (default bash, pwsh) execute — gated tools pause and ask, everything else delegates, and a missing approval channel fails closed.

项目信息与收录信号

快照 2026-09-11
作者 / 组织
J0ss077
仓库
J0ss077/dsh-always-require-tools-approval
GitHub Stars
3
Forks
0
开发语言
TypeScript
许可证
MIT
最近推送
2026-09-06
Manifest
数据中检测到声明

公开仓库不自动等于可商用;许可证与当前兼容性以原项目文档为准。Manifest 和数据评分不构成安装安全认证。

数据评分

60/ 100
维护活跃
97
文档与实用信息
85
生态关注度
17
安装便捷信号
100
项目声明信号
100

近 5 天仍在更新;README 含完整安装与使用说明;关注度尚低(3)。

评分来自已有数据快照的五维模型,仅作浏览参考,不是实际使用评测或安全检测结论。

安装与使用

所有项目资料与许可均以对应 GitHub 仓库为准。

dsh plugin --profile web add github:J0ss077/dsh-always-require-tools-approval

复制命令不会自动执行。请先阅读仓库文档,确认环境要求与许可证。

项目截图

仓库 README

GitHub 原文

已保存的仓库文档快照;文档抓取时间未记录,可能与上方目录介绍处于不同版本。安装前请核对当前仓库说明。

@j0ss077/dsh-always-require-tools-approval

Stop. Confirm. Run. A DeepSeek Harness plugin that pauses the tools on your watchlist and waits for your explicit approval before every execution.

npm version license: MIT [node: >=22.19]()

What it does

DSH runs your agent in a sandbox that blocks file writes — but not commands. bash can still read files, launch programs, and reach the network.

This plugin puts an approval gate between a tool and its execution. When the agent calls a tool on the watchlist, the harness pauses and asks before anything runs.

  • Default watchlist: bash and pwsh.
  • One approval = one execution. The next call asks again.
  • Reject, cancel, or no approval channel → the tool is blocked.
  • Every other tool is left untouched.

Requirements

  • A DSH profile with an approval service — the standard web (GUI) profile ships one.
  • Node.js >= 22.19.

Install

One command installs and activates the plugin (it ships as a bundle layer):

dsh plugin --profile web add @j0ss077/dsh-always-require-tools-approval

Then restart the GUI. Use a different --profile if you run under another one.

Configure

One option: tools — the watchlist.

KeyTypeDefaultMeaning
toolsstring[]["bash", "pwsh"]Tool names that require approval before they run.

Override it at runtime without reinstalling. Edit ~/.dsh/settings.yaml ($DSH_HOME/settings.yaml when set):

always-require-tools-approval:
    tools: ["bash", "pwsh", "node"]

This file takes precedence over the value baked into the bundle.

What you'll see

  1. The agent calls a watched tool, e.g. bash.
  2. Execution pauses: "Approve this tool execution?"
  3. Approve → that single call runs. Reject → denied, and the agent is told you rejected it.

Every call prompts again — approving once never grants a blank check. The prompt text is fixed by design.

Subagents are covered too. The harness normally rejects a delegated child's approval asks automatically, so when a watched tool runs inside a subagent this plugin forwards the question to the top-level (user-facing) session instead, where you approve or reject it as usual. Because the subagent's call card is not part of the top-level conversation, the prompt is explicit about what is happening:

Subagent approval: run "bash" · Why: clean the build output · Command: rm -rf dist

Why: is the tool call's own description and Command: the exact command about to run; the fields are separated by · so the prompt stays readable in the single-line approval headline.

Safety model

  • One-shot. One approval authorizes exactly one execution.
  • Fail closed. No approval channel (headless run, unmounted service) → the tool is denied, never silently allowed.
  • No auto-approve. For a watched tool the plugin only asks; it never approves on its own.
  • No interference. Unwatched tools delegate to the next plugin.

See SECURITY.md for the security posture and how to report a vulnerability.

Update & remove

dsh plugin --profile web update @j0ss077/dsh-always-require-tools-approval
dsh plugin --profile web remove @j0ss077/dsh-always-require-tools-approval

Restart the GUI after updating.

Development

pnpm install
pnpm build      # compile and normalize .d.ts
pnpm typecheck  # type-check source + tests
pnpm test       # node --test

The plugin is four modules — src/contracts.ts (harness types), src/gate.ts (the gate policy), src/subagent.ts (the subagent lineage rules), src/index.ts (wiring). See ADR 0001 for why the harness types are self-declared and ADR 0002 for why subagent approvals are routed to the root session.

License

MIT

使用前核对

安装步骤、兼容版本与授权范围以原项目当前文档为准。Stars 和评分是快照中的导航信号。

安装与排错 · 项目问题反馈

同类项目