DeepSeek Harness plugin

dsh-mchose-battery

Mchose wireless mouse battery + connection-mode indicator in the DSH sidebar (WebHID)

Jump to install

Source facts

Repository
Fransice/dsh-mchose-battery
Latest update
Aug 18, 2026
Category
UI Enhancements
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Fransice/dsh-mchose-battery
Plugin: dsh-mchose-battery
Author: Fransice

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.en.mdSource · read only
README language

dsh-mchose-battery

简体中文 | English

A DSH (DeepSeek Harness) client plugin that shows the real-time battery level and connection mode (2.4G / USB) of an Mchose (迈从) wireless mouse in the sidebar, just above the settings button.

<table> <tr> <td align="center"> <img src="./image/screenshot-1.png" alt="screenshot 1" width="360" /><br/> <em>2.4G 模式效果</em> </td> <td align="center"> <img src="./image/screenshot-2.png" alt="screenshot 2" width="360" /><br/> <em>USB 接线模式效果</em> </td> </tr> </table>

It talks to the mouse directly from the browser via WebHID — no companion app, no driver, no daemon. It refreshes every 5 seconds, and automatically follows the mouse as it switches between wired USB and the 2.4G receiver.

> Requires a DSH Web GUI (http://127.0.0.1:3080), profile web.

Features

  • 🪫 Real-time battery percentage (updates every 5s)
  • 🔌 Connection mode: 2.4G / USB
  • ⚡ Charging indicator
  • 🎯 Sidebar widget injected right above the settings button (no background bar, gray icon + text)
  • 🔄 Auto-detects wired ↔ wireless switching (5s polling + disconnect events)

How it works

The plugin reads the device's HID config interface (usagePage 0xFF01, VID 0x3837):

  • Sends a profile-reload command on report 0x11
  • The mouse pushes an E2 status report on input report 0x13
  • The report is XOR-decoded into battery % / charging / device name
  • Wired USB = PID 0x4018, 2.4G receiver = PID 0x100A

Prerequisites

  • A DSH installation with the web profile (Web GUI)
  • A browser with WebHID support: Chrome / Edge (desktop). Firefox and Safari do not support WebHID.
  • An authorized mouse on first use: the browser will show the WebHID device-picker prompt — you must select the Mchose mouse and click Connect.

---

Installation

This package is a profile bundle (it declares dsh.bundle.patch), so it installs with the built-in DSH plugin command — no manual patch editing required. The bundle patch auto-registers the plugin as a host entry, which in turn makes DSH serve its WebHID client bundle to the browser.

Option A — via dsh plugin (recommended)

# from the registry where dsh-mchose-battery is published
dsh plugin --profile web add dsh-mchose-battery

That's it. dsh plugin add runs pnpm add, detects the dsh.bundle declaration, and adds the package to the profile's bundle layer. Restart DSH and hard-refresh (Ctrl+Shift+R).

> If testing from a local checkout instead of a registry, a path spec works too: > dsh plugin --profile web add ./publish/dsh-mchose-battery

Option B — manual copy

For machines where dsh plugin/pnpm isn't convenient:

# put the whole folder where DSH can resolve it
git clone <your-repo> "$USERPROFILE\.dsh\node_modules\dsh-mchose-battery"

and register a row in ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: mchose-battery
      name: dsh-mchose-battery

Then restart DSH and hard-refresh the Web GUI (Ctrl+Shift+R). Open the console and you should see:

[mchose] loaded v4 (polling, no auto-flip)

> ⚠️ Because DSH caches the client bundle revision at startup, you generally need to restart DSH (not just refresh) after installing/upgrading.

Full step-by-step instructions for colleagues: [INSTALL.md](INSTALL.md).

---

WebHID authorization (first run)

The first time (and after the browser "forget"s the device), DSH will show the WebHID device picker. Make sure:

1. The mouse is connected (wired or via 2.4G receiver). 2. Select the Mchose device from the list. 3. Click Connect.

The sidebar widget will then show e.g. 78% · 2.4G or USB · 100% · ⚡.

Troubleshooting

SymptomWhat to check
Sidebar shows "连接迈从鼠标" foreverWebHID picker not approved — click the widget / allow the device
"WebHID 不可用"Not Chrome/Edge, or WebHID blocked
Battery stuck at --Device not on the expected interface; check console for raw= hex
Stale mode after unplugShould self-correct within ~5s (polling); if not, restart DSH

Developing

The plugin is a plain npm package:

  • lib/index.js — host half (no-op)
  • lib/client.js — browser client (WebHID), served by DSH's client-bundle mechanism
  • package.jsondsh.client metadata (platform: "web", immediately: true)
node --check lib/client.js   # syntax check

License

MIT