FengLingYaaa/dsh-gpt-perm-strip
DSH插件:移除当前会话权限并非严格更宽的残留GPT沙箱权限。
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness, and it only operates on GPT-family models. Its core purpose is to resolve a common error triggered when GPT sends duplicate sandbox permission fields that are not strictly wider than the current session’s permission level. Before the sandbox escalation check runs, the plugin strips unnecessary sandbox_permissions and justification fields while leaving genuine permission escalation requests untouched. It works by wrapping each tool’s execute method to modify a cloned copy of the call arguments, so the original tool call record stored by DSH still shows the full output the model generated.
Any developer using GPT-family models with DeepSeek Harness will benefit from this plugin, as GPT commonly adds permission fields even when they are not needed for a new tool call. Without this plugin, calls that include duplicate permission fields fail immediately with an error about the escalation not being strictly wider. The plugin fixes this failure case automatically without requiring any manual changes to how you write prompts or configure tools. It only activates for matching GPT models, so all other models you use with DSH will not be affected by the plugin’s logic.
Installing the plugin is straightforward, and you can add it directly from GitHub with the single command dsh plugin --profile web add github:FengLingYaaa/dsh-gpt-perm-strip. If you prefer to modify the plugin or install it from a local clone, you can run git clone, install dependencies with pnpm, run tests, build, then add it to your DSH profile from the local directory. The plugin offers several configuration options, including toggling logging of stripped fields, adding custom model patterns, and toggling a GPT-specific context prompt. It is released under the open source MIT license, so you can use, modify, and distribute it freely for any purpose.
这是一款专为 DeepSeek Harness 开发的原生插件,仅针对 GPT 系列模型生效。它的核心功能是在 DSH 的沙箱权限升级检查执行前,移除参数中权限宽度不超过当前会话的 sandbox_permissions 和 justification 字段,避免 GPT 习惯性发送重复权限导致调用失败。它通过包装工具执行逻辑修改参数,同时保留原始调用记录,不会影响真实需要的权限升级流程。
GPT 系列模型(包括 OpenAI 兼容网关托管的 GPT 模型,默认也包含 o1/o3/o4 这类推理模型)会触发本插件的处理逻辑,非 GPT 模型如 Grok、DeepSeek 则不会触发,除非你手动配置额外模型匹配规则。当你使用 GPT 模型在 DSH 中调用带沙箱权限的工具时,插件会自动运行,过滤掉不必要的权限字段,让原本失败的调用可以正常执行。
你可以通过 dsh plugin --profile web add github:FengLingYaaa/dsh-gpt-perm-strip 命令一键安装,也可以克隆本地仓库后,通过 pnpm 编译安装。插件支持多项自定义配置,包括是否包含 OpenAI 推理模型、额外模型匹配正则、是否注入提示、是否记录日志等。本项目采用 MIT 许可证开源,完全免费供用户使用和修改。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-gpt-perm-strip(FengLingYaaa/dsh-gpt-perm-strip)
仓库:https://github.com/FengLingYaaa/dsh-gpt-perm-strip
本站详情页:https://www.yhbd.top/plugins/fenglingyaaa-dsh-gpt-perm-strip/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-08-17 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:FengLingYaaa/dsh-gpt-perm-strip
把 FengLingYaaa/dsh-gpt-perm-strip 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-gpt-perm-strip
A DeepSeek Harness plugin that runs only for GPT-family models. Before a tool body hits DSH's sandbox escalation check, it removes sandbox_permissions / justification that are not strictly wider than the current session.
Why
DSH requires sandbox_permissions to be strictly wider than the session. The same (or a narrower) mode fails immediately:
sandbox escalation to "danger-full-access" is not strictly wider than this call's current "danger-full-access" mode
GPT-family models habitually send a permission field even when the session already has that access. This plugin drops those leftover fields and leaves real escalations (workspace-write → danger-full-access) untouched.
tools/pre-execute cannot rewrite frozen arguments. The plugin wraps each tool's execute and passes a cloned argument object with the unnecessary fields removed. The durable tool/call record still shows what the model emitted.
GPT-only
Matching is by model id, not provider (OpenAI-compatible gateways often host GPT, Grok, and DeepSeek under one provider):
gpt-4o,gpt-5.6-sol,chatgpt-4o-latest,openai/gpt-4.1,ft:gpt-4o:…- optional:
o1/o3/o4(includeOpenAiReasoning, default on)
Grok and DeepSeek are ignored unless you add extraModelPatterns.
Repo: https://github.com/FengLingYaaa/dsh-gpt-perm-strip
Install
dsh plugin --profile web add github:FengLingYaaa/dsh-gpt-perm-strip
Or from a local checkout:
git clone https://github.com/FengLingYaaa/dsh-gpt-perm-strip.git
cd dsh-gpt-perm-strip
pnpm install
pnpm test
pnpm build
dsh plugin --profile web add .
Config
| Field | Default | Meaning |
|---|---|---|
includeOpenAiReasoning |
true |
Treat o1/o3/o4 as GPT-family |
extraModelPatterns |
[] |
Extra regexes against provider, model, or provider/model |
injectPrompt |
true |
GPT-only runtime-context reminder |
logStrips |
true |
Log each strip as [gpt-perm-strip] stripped … |
Behavior
| Session | GPT argument | Result |
|---|---|---|
danger-full-access |
sandbox_permissions: danger-full-access |
stripped, call runs |
workspace-write |
sandbox_permissions: workspace-write |
stripped |
workspace-write |
sandbox_permissions: danger-full-access |
kept (real escalation) |
read-only |
sandbox_permissions: workspace-write |
kept |
| non-GPT model | any permission | unchanged |
permission / permissions are treated as sandbox fields only when the value is a known sandbox mode.
wenbin-wb/dsh-bridge
PerryLink/dsh-permission-rules
MichengAI/dsh-archive-manager
eri64/dsh-claude-ux
lsz-asd/dsh-plugin-session-delete
10086ggqq/dsh_theme_terraria
king-bcolor/dsh-multi-tenant-projects