DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

amd47802574 /

amd47802574/dsh-auto-full-permission

Topic repository only

DSH 插件:每个新创建的会话自动切换到指定权限预设(默认完全权限)

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@8208cdff

dsh-auto-full-permission

每个新创建的会话自动切换到指定权限预设(默认 danger-full-access:完全权限、无需审批)。适用于 DeepSeek Harness(DSH) 的 cordis 插件体系。

为什么需要它

DSH 的权限预设服务(dsh-permission-presets)在新会话创建时按"部署默认值"钉住权限;桌面端开新对话走的是带种子(seed)的创建路径,这类会话按设计不读取 permission.defaultPreset 设置,而是使用部署默认值(DSH_PERMISSION_MODE 环境变量,缺省 workspace-write)。

本插件在 session/created 事件之后调用 permissionPresets.set() 强制覆盖,因此无论会话是否带种子,新对话都以配置的预设起步。

安装

  1. 把本仓库克隆(或作为 file: / github: 依赖)放进 profile 的 node_modules:

    git clone https://github.com/amd47802574/dsh-auto-full-permission "$env:DSH_PROFILE_DIR\node_modules\dsh-auto-full-permission"
    
  2. 在 profile 的 cordis.patch.yml 末尾追加挂载行:

    - id: auto-full-permission
      name: dsh-auto-full-permission
      config:
        preset: danger-full-access
    
  3. 完全重启 DSH(环境变量与插件树都在进程启动时读取)。

配置

键 默认 说明
preset danger-full-access 每个新会话切换到的预设名:read-only / workspace-write / danger-full-access(可用预设由 permission 行的表决定)

停用:在挂载行加 disabled: true。

行为边界

  • 只影响插件挂载之后创建的会话;既有会话不受影响。
  • 用户随后在会话内手动切换权限仍然有效(插件只在创建时动作一次)。
  • 会话已处于目标预设时不追加任何事件。
  • 恢复/派生(restore/fork)的会话保持其继承的权限事实。

安全提示

danger-full-access 意味着新会话不受沙箱限制且不再弹审批确认。请确认这与你的使用场景匹配;临时需要受控模式时,在会话内手动切换即可(只影响当前会话)。

License

MIT

—/ 5

No ratings yet

Manifest verification required

Commit 8208cdffec51

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout