← 返回列表
⚠ 装前注意
DSHDeepSeek Harness插件:向系统提示词注入 sandboxpermissions…
基本兼容但装前注意:未发布到 npm registry,仅可从源码安装 · 最近上游提交 2026/9/16 · 已提供中文文档
DSH(DeepSeek Harness)插件:向系统提示词注入 sandbox_permissions 提权纪律,避免同级提权、无提权却带 justification 等偏差
综合分
29.3
GitHub 分
29.3
用户评分
—
★ Stars
0
周下载量
—
安装插件(需先安装 dsh CLI 引擎:npm install -g @deepseek-ai/dsh)
dsh plugin --profile web add zhanxin-xu/dsh-sandbox-escalation-prompt未发布到 npm registry,仅可从源码安装,改用 GitHub 源安装
信任档位:已验证本站已于 1 天前真实安装成功
- 是什么
- dsh 原生插件 · other
- 装得上吗
- 本站已真实安装成功(非静态推断)
- 安全吗
- 本站尚未对该插件做风险分级(暂未覆盖,不等同于无风险)
- 还在维护吗
- 活跃:最近一次提交在 9 天前
档位由下列信号合成:本站实装验证(真实安装,当前最高到 L4)· 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。下方各区块是它的证据明细。 验证判据与等级说明 →
🟢实装验证通过· 2026/9/25
由本站实装验证器在真实 dsh 环境安装成功,非静态推断。
数据截至 2026/9/22(元数据每日更新 · 实装验证按队列轮转,单条结论的验证时间见上方)
安装兼容性检查⚠ 装前注意
以下结论由程序自动检查 npm 包、engines 声明与入口文件得出,未做人工实机验证——能装不等于用着没问题。
✗npm 包dsh-sandbox-escalation-prompt(未发布到 npm,仅可源码安装)
✓Node 引擎要求 >=20 · 基线 Node 22.19 满足
✓dsh CLI 依赖未声明 dsh 版本约束
✓入口文件main/exports/bin 已声明
未发布到 npm registry,仅可从源码安装
验证方式:npm registry 存在性 + package.json 静态校验 · 最后验证 2026/9/22 21:39:44
用户评分
还没有人投票,来当第一个
订阅周报,不错过优质插件更新
每周一封 · 高评分插件 + 新用户活动
README
由 DeepSeek 最新模型翻译生成dsh-sandbox-escalation-prompt 仓库: 往 DSH 的系统提示词里注入一条沙箱提权纪律(sandbox_permissions 的使用规则), 让 bash / fs / pwsh 等工具在提权请求上不再出现「当前模式本来就允许却仍然申请」 或「只给 justification 却不提权」这类偏差。 注入的文本(默认可通过 text 覆盖) Only set sandbox_permissions when the current sandbox mode is insufficient and a strictly higher permission level is required. If the current sandbox mode already permits the operation, omit sandbox_permissions entirely. Never request the same permission level as the current sandbox mode. Only include justification together with a real permission escalation. 它是什么 / 不是什么 - 是一条静态的 system-prompt section,对所有 agent(含子代理、所有预设)生效; - 注册的是 section(提示词正文),不是 context(每轮动态运行时快照): dsh 自带 sandbox:policy / approval:policy 两个动态 context 会随会话模式变化 (例如 approval=never 时会说「不要请求提权」),本插件不与之冲突,也不复制它们; 静态注册还有个好处:文本不变则提示词前缀稳定,KV cache 不受影响; - 不使用 complete: true,因此不会顶掉别的人格、工具指引或运行时快照; - 不 import 任何包,只依赖 ctx.systemPrompt 服务,放在 ~/.dsh/plugins/ 下的裸目录即可加载。 配置(挂载行的 config) | 字段 | 默认 | 说明 | |---|---|---| | enabled | true | false(或 'false'/'no'/0)时不注入任何 section,用于临时关闭 | | text | 上面四行原文 | 注入文本;纯空白视为不注入 | | order | 9990 | section 排序位,越小越靠前 | | sectionName | user:sandbox-escalation-policy | section 名,必须全局唯一(重名会抛 duplicate 错误) | order 的常见选择: | order | 位置 | |---|---| | 700 | 紧随 PLAN_POLICY(500) / TEAM_POLICY(600) 的策略带 | | 1050 | 紧随 TOOL_BASH(1000) / TOOL_PWSH(1010) 的 shell 工具带 | | 9990(默认) | 末尾环境事实之前(STRUCTURED_OUTPUT(9900) 之后),作为收尾性纪律,遵循度最好 | 安装到 web profile(本机已按此配置) 1. 链接到 profile 的 node_modules ln -s ../../../plugins/dsh-sandbox-escalation-prompt \ ~/.dsh/profiles/web/node_modules/dsh-sandbox-escalation-prompt 2. profile package.json 的 dependencies 里登记(让 pnpm install 不再丢掉链接) "dsh-sandbox-escalation-prompt": "link:../../plugins/dsh-sandbox-escalation-prompt" 3. ~/.dsh/profiles/web/cordis.patch.yml 里挂载 - insert: - id: sandbox-escalation-prompt name: dsh-sandbox-escalation-prompt config: enabled: true web profile 的 patchReload 是 live:改完 cordis.patch.yml 无需重启 dsh web, Host 会热应用补丁;首次在 node_modules 里放链接建议先做,改动补丁文件即可生效。 其它 profile(headless/acp 等)= startup,需要重启进程。 验证 cd ~/.dsh/plugins/dsh-sandbox-escalation-prompt node scripts/smoke.mjs # 假 ctx:注册/覆盖/开关分支 node scripts/integration.mjs # 真 cordis + 真 dsh-system-prompt:装配后提示词确实含四行 热加载/重启后还可以这样确认运行中的 Host 真的注入了:读当前会话日志里最近一条 system/message 事件(就是渲染后的完整系统提示词): zstd -dc ~/.dsh/sessions/--Users-user-.dsh--/session-*/session.v3.jsonl.zstd \ | grep -c "Never request the same permission level as the current sandbox mode" 关闭与卸载 - 临时关闭:把挂载行 config.enabled 改成 false(热加载立即生效); - 彻底移除:删掉 cordis.patch.yml 里的挂载行,再删 node_modules 链接与 package.json 里的依赖登记,最后删除本目录。 目录结构 dsh-sandbox-escalation-prompt/ ├── package.json # 声明 dsh.bundle.patch(供 dsh plugin add 安装时自挂载) ├── cordis.patch.yml # 自挂载补丁;已手工挂载时用 !!js 守卫自动退让,避免重复挂载 ├── lib/index.js # 插件本体:注册 system-prompt section ├── scripts/smoke.mjs # 离线单元 smoke 测试 ├── scripts/integration.mjs # 真 cordis + 真 systemPrompt 集成测试 └── README.md