dsh-sandbox-noop-escalation

去掉那些不会让当前沙箱模式变宽的 sandbox_permissions / justification 参数,避免调用报错「sandbox escalation to "workspace-write" is not strictly wider than this call's current "danger-full-access" mode」。GPT 系列模型往往每次调用都会填这两个可选参数,并选 workspace-write,而它比 danger-full-access 更窄。插件在 tools/pre-execute 阶段把请求的模式和会话沙箱策略给出的当前模式做比较:相同或更窄时去掉这两个字段(只有 justification 时也会去掉)。同时兼容 GPT 从 Codex shell 工具带过来的取值:null、空值和 use_default 视为没有请求;会话已经是 danger-full-access 时,任何取值(包括 require_escalated)都会去掉,因为不存在更宽的模式。真正的升权请求、无法识别的模式值,以及没有声明 DSH 升权参数的工具,都原样交给 DSH 处理。不会放宽任何权限。监控的工具列表可配置(默认 bash、pwsh、write、edit、run_code)。零依赖。

插件介绍

去掉那些不会让当前沙箱模式变宽的 sandbox_permissions / justification 参数,避免调用报错「sandbox escalation to "workspace-write" is not strictly wider than this call's current "danger-full-access" mode」。GPT 系列模型往往每次调用都会填这两个可选参数,并选 workspace-write,而它比 danger-full-access 更窄。插件在 tools/pre-execute 阶段把请求的模式和会话沙箱策略给出的当前模式做比较:相同或更窄时去掉这两个字段(只有 justification 时也会去掉)。同时兼容 GPT 从 Codex shell 工具带过来的取值:null、空值和 use_default 视为没有请求;会话已经是 danger-full-access 时,任何取值(包括 require_escalated)都会去掉,因为不存在更宽的模式。真正的升权请求、无法识别的模式值,以及没有声明 DSH 升权参数的工具,都原样交给 DSH 处理。不会放宽任何权限。监控的工具列表可配置(默认 bash、pwsh、write、edit、run_code)。零依赖。

安装方式

通过 npm 安装

dsh plugin --profile web add dsh-sandbox-noop-escalation

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

从 GitHub 安装

dsh plugin --profile web add github:zzstar101/dsh-sandbox-noop-escalation

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

版本兼容情况

兼容性待确认。可前往项目文档查看支持版本。

安装提示

  • 可能调用终端命令