dsh-auto-review-default: Enforce Auto Permission Preset

Introduction

The DeepSeek Harness (DSH) official documentation explicitly states that the auto permission preset cannot be the default and only appears in the contribution of the current session. This means that every time a new session is created or an old one is resumed, permissions must be switched manually. This plugin aims to resolve this cumbersome operation by modifying the session initialization process to make the auto preset the default behavior.

Plugin Introduction

dsh-auto-review-default is a plugin maintained by devil233-ui. Its core function is to place sessions into the built-in auto permission preset. Specifically, new sessions enter it automatically upon creation, and existing root sessions switch to it automatically when reopened (resumed).

Core Features

  1. Default Auto for New Sessions: New sessions enter the auto permission preset upon creation.
  2. Default Auto for Resumed Sessions: Existing root sessions switch to the auto permission preset when reopened (resumed).
  3. No Modification of Delegated Sub-sessions: The permissions of sub-sessions generated by delegation to sub-agents remain unchanged.
  4. No Modification of Scheduled Tasks: Running sessions starting with dsh-automation-session-* are not intervened with.
  5. Automatic Fallback: Automatically falls back and does not modify permissions if auto is unavailable.

Installation and Activation

Please ensure that @deepseek-ai/dsh-experimental-auto-review is enabled before installation.

dsh plugin --profile web add github:devil233-ui/dsh-auto-review-default

Please replace web with the profile name you are using (DSH Desktop uses desktop). The host will hot-reload after installation; no restart is required.

How It Works

The plugin wraps the host’s internal PermissionPresetService#pinInitialPermission method. The host calls this method when handling the session/created event. This plugin intercepts the execution of this method: if the session is not a delegated sub-session and is not currently in auto, it calls the official permissionPresets.set to switch permissions. Sessions that were already alive during loading will not be modified automatically until they are reopened.

Cautions and Limitations

  1. Resuming Old Sessions Overwrites Settings: Resuming an old session will switch it to auto unconditionally, including sessions where you had explicitly set specific permissions. This will relax the sandbox to danger-full-access (accompanied by per-call review).
  2. Auto is an Experimental Feature: It may incorrectly allow unsafe actions or reject useful operations, and it adds one extra model request for every tool call (no caching, no retries).
  3. Reliance on Internal Wrapping: The plugin relies on the host’s internal method names. If DSH upgrades and renames this method, the plugin will silently fail.
  4. Dependency on Experimental Layer: It depends on @deepseek-ai/dsh-experimental-auto-review being enabled.
  5. No Granular Rules: It does not implement granular rules based on workspace or Agent.

Uninstallation

dsh plugin --profile web remove dsh-auto-review-default
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye