dsh-openai-bridge: Control Desktop DSH Sessions on Mobile with Chatbox

DeepSeek Harness (DSH) is a locally running agentic development environment. If you need to view conversations, insert messages, or control sessions from your phone, using the desktop client alone can be inconvenient. The dsh-openai-bridge plugin provides an OpenAI-compatible HTTP interface, allowing the Chatbox app running on your phone to directly operate local DSH sessions.

The plugin is named dsh-openai-bridge and is located in the repository github.com/AprilCrystal/dsh-remote. It encapsulates DSH’s capabilities into the standard OpenAI API format and comes with a lightweight mobile control panel.

Core Features

  1. OpenAI-compatible Interface: Provides /v1/models and /v1/chat/completions endpoints, supporting both streaming and non-streaming requests.
  2. Mobile Control: Allows mobile devices to drive desktop DSH sessions via Chatbox, providing panel functions such as thinking, copying, stopping messages, and inserting messages.
  3. Session Management: Supports viewing records of any session, switching models, monitoring, and compressing context.
  4. Files and Sandbox: Supports browsing and staging files, and allows changing sandbox presets via code displayed on the desktop.
  5. Approval Forwarding: When a session attempts to write to a file or execute sensitive operations, approval requests are forwarded to the connected browser client.

Installation and Enablement

Before installation, please ensure you have configured your DeepSeek Harness profile.

  1. Run the following command to install the plugin:
    dsh plugin --profile <your-profile> add github:AprilCrystal/dsh-remote
The plugin requires no compilation, and the installation process will not force the execution of build scripts.
  1. Configure Token: The plugin requires a random secret as an access credential. You can set it via an environment variable or configuration file:
    DSH_OPENAI_BRIDGE_TOKEN=<a-long-random-secret>
It can also be configured in the profile's `cordis.patch.yml`.

Typical Usage

1. Get Configuration Information
On first use, visit http://127.0.0.1:19387/setup in a local browser (this route is restricted to local machine access; other network requests will return 403). The page will display the local LAN IP, port number, and how to generate the Token.

2. Configure Chatbox
In the mobile Chatbox app, set up a custom OpenAI-compatible provider:

Configuration Item Enter Value
API Key $DSH_HOME/openai-bridge.token (or the Token value from the environment variable)
API Host http://<this-machine-lan-ip>:19387/v1/
Model ID dsh-agent

3. API Call Examples
After installation, /v1/models will return a model named dsh-agent, as well as a list of all current DSH sessions (formatted as <title> · <sessionId>). The /v1/chat/completions endpoint is used to send conversation requests.

Security and Notes

  1. Default Binding Address: By default, the plugin binds to 127.0.0.1 (loopback address). To allow access from other devices on the LAN, you must manually modify the DSH webserver configuration to 0.0.0.0.
  2. Session Permissions: Sessions driven via this plugin run under the read-only permission preset by default (sandbox read-only + approval inquiry). This means the plugin can only read files, not write directly; any write attempt will be blocked by the sandbox and converted into an approval request.
  3. Privacy Protection Scope: This plugin primarily protects data integrity, not confidentiality. The sandbox does not prevent reading files, executing commands, or network outbound requests. Anyone holding the Token can read session records.
  4. Approval Mechanism: Approval requests must be responded to by a GUI client (such as a desktop browser) that has the session open; otherwise, the request will hang indefinitely.
  5. Network Transmission: The plugin uses plaintext HTTP to transmit Tokens and Cookies. Do not use it on untrusted public Wi-Fi networks.

Summary

dsh-openai-bridge solves the pain point of operating local DSH sessions on mobile devices. By using the standard OpenAI API protocol combined with local sandbox control, it ensures operational flexibility while retaining an approval mechanism for sensitive operations like file writing. If you are looking for a way to let your mobile device intervene in or monitor DeepSeek Harness sessions on your desktop, this is a ready-to-use solution.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye