Preface

The modular architecture of DeepSeek Harness (DSH) allows developers to extend features through code. During agent execution, sandbox privilege escalation typically requires users to manually click the “Allow once” button in the WebUI. The dsh-enter-approve plugin automates this step by listening to keyboard events, reducing manual intervention.

Plugin Introduction

dsh-enter-approve is a plugin for DeepSeek Harness, maintained by abcofabc. Its core value is as follows: when the WebUI displays an approval panel for sandbox privilege escalation, pressing the Enter key on the keyboard automatically triggers a click on the “Allow once” button, without requiring mouse input.

Core Features

The plugin implements the following capabilities:

  • Quick approval: While the approval panel is displayed, pressing the Enter key simulates a click on the “Allow once” button.
  • UI hint: A text hint is added below the approval panel button to inform users that the Enter key can be used.
  • Zero-interference design: The plugin only takes effect when an approval panel exists. It ignores Enter key presses during input, IME composition keys, and any combinations of modifier keys (Ctrl/Cmd/Shift/Alt) with Enter.

Installation and Enablement

Installing this plugin requires manual configuration. The steps are as follows:

  1. Link the package: Link the plugin to DSH’s Web configuration directory:
    ~/.dsh/profiles/web/node_modules/dsh-enter-approve
  1. Modify configuration:
    • Open ~/.dsh/profiles/web/package.json.
    • Add the following to dependencies:
        "dsh-enter-approve": "link:<绝对路径>"
*   Add the package to `dsh.profile.bundles`.
  1. Restart: Fully restart DeepSeek Harness to load the new plugin.

How It Works

The plugin uses the webServer.tapIndex() interface to inject a small browser script into index.html. The script listens for Enter key events on document (capture phase). Once it detects an approval panel in the page with the data-approval-key attribute, the script forwards the Enter keydown event to the “Allow once” button at the bottom of the panel, completing the approval process.

Suitable Scenarios and Notes

  • Suitable scenarios: Ideal for developers or testing scenarios that frequently trigger sandbox privilege escalation, improving efficiency through keyboard-driven operations.
  • Dependency requirements: The plugin depends on @deepseek-ai/cordis (version ^4.0.1).
  • Notes: After installation, DeepSeek Harness must be fully restarted for the plugin to take effect. Before use, it is recommended to review the plugin source code and MIT license.

Conclusion

dsh-enter-approve addresses the pain point of frequent mouse clicks required for sandbox approvals in the DSH environment. By binding the approval process to keyboard input, it makes development and debugging smoother. For more details, see GitHub.