dsh-airpod-control: Answer DSH approvals and questions with AirPods via head gestures

Preface

When running agents in DeepSeek Harness (DSH), permission approval cards and model questions to the user (ask_user_question) frequently interrupt your workflow: you have to switch windows, find the button, click “Allow” or select an option. If you are already using AirPods with head tracking support, you can treat “nodding / shaking head” as fixed mappings to minimize mouse interaction. The following is an introduction to the community plugin dsh-airpod-control (maintainer: fishcg, Category: Client): it uses the local menu bar app HeadOrbit to recognize gestures, sends answers back to DSH via loopback HTTP, and includes a one-click installation guide for HeadOrbit.

What is this

dsh-airpod-control is a client-side plugin for DSH. The npm package name is dsh-airpod-control, the current version is 0.3.0, and the license is MIT. It does not handle headphone motion recognition itself but works in conjunction with HeadOrbit (a macOS menu bar App for AirPods head tracking). HeadOrbit polls the plugin’s status and POSTs gestures. The plugin only claims to be the responder for approvals or questions when “there is actually a request waiting, and HeadOrbit is online.”

The same set of gestures corresponds to two types of scenarios:

Scenario Nod (Head Nod) Shake (Head Shake)
Permission Approval Allow (allowed-once) Deny
Model Question (ask_user_question, 3+ options) Confirm Current Item Switch to Next Item

Gestures and web page buttons are valid simultaneously; the first one submitted takes effect. DSH remains fail-closed when there is no responder, and this plugin does not change that.

Core Features

The plugin mainly does four things within the host (all derived from the project README):

  1. Auto-install HeadOrbit: Includes an installer. A card in the bottom right corner of the session allows downloading, installing, writing configuration, starting, and waiting for heartbeats. Target path: ~/Applications/HeadOrbit.app. Port and shared token are written by the installation flow without manual input.
  2. Approval Responder: Takes over only when there is a pending approval and HeadOrbit is online; Nod corresponds to Allow, Shake corresponds to Deny.
  3. Question Responder: Nod confirms the current option; Shake switches to the next option in multi-option questions. The session will highlight the “button that will be selected by nodding” with an outline.
  4. Browser Half-area Card Retraction: After the gesture is settled, processed approval/question cards on the page are collapsed to avoid the situation where “Allowed by nodding but the card is still hanging”; and outputs Allowed <tool> / Denied <tool> / Selected <option> (if dsh-whale-widget is installed, it displays in the whale bubble; otherwise, it shows as a top toast bar).

Additionally, the browser half-area supports holding ← and → simultaneously to start recording and releasing to end and transcribe, if the official voice input plugin dsh-experimental-voice-input-bundle is installed; ⌃Space can be kept as a backup. Arrow keys are not intercepted when the official voice plugin is not installed.

HTTP routes are mounted under the /dsh-airpod-control prefix of the host webServer, listening only on 127.0.0.1, without opening a separate port. If the shared token is left blank, it is automatically generated in ~/.dsh-airpod-control/token (permissions 0600), and requests must carry X-HeadOrbit-Token.

Installation and Enablement

Execute in the terminal (replace --profile with the profile you actually use; the desktop version defaults to desktop, dsh web is web):

dsh plugin --profile desktop add dsh-airpod-control

npm package: https://www.npmjs.com/package/dsh-airpod-control. DSH restart is required after installation. Engine requirements: node >= 20, dsh >= 0.2.1-rc.1 < 0.3.0-0 (see package.json).

Install from source (as provided in README, follow the documentation if not using a path other than git clone):

git clone https://github.com/fishcg/dsh-airpod-control.git ~/dsh-airpod-control
dsh plugin --profile desktop add link:~/dsh-airpod-control

After installation, open any session, and a “Answer DSH with Nod / Shake” card will appear in the bottom right corner. Click it to run the four steps of the installer: Download HeadOrbit (MIT, build derived from fishcg/HeadOrbit-dsh) → Write DSH port and token → Start and wait for polling → Guide authorization for HeadOrbit in “System Settings → Privacy & Security → Motion & Fitness” (System popup required, user click needed).

If you don’t want to click the card, you can POST to the local GUI port (replace <port> with the port printed by dsh web):

curl -s -X POST "http://127.0.0.1:<port>/dsh-airpod-control/setup/run" | jq

Before first use, please wear AirPods with head tracking support (Pro / 3 / 4 / Beats, etc.) and confirm they are connected in HeadOrbit.

Typical Usage

  1. Put on your headphones; HeadOrbit menu bar icon shows connected.
  2. When an approval or question card appears in the session, observe the highlight: the button triggered by nodding will light up with an outline.
  3. Nod: Approval is Allow, Question is Confirm Current Item; Shake: Approval is Deny, Multi-option Question is Next Item.
  4. After the gesture settles, the card collapses; pay attention to the settlement text in the bubble or top notification.

To check if the link is healthy (requires token configuration, example from README):

curl -s -H "X-HeadOrbit-Token: $TOKEN" http://127.0.0.1:$DSH_WEB_PORT/dsh-airpod-control/health

The response contains fields like headOrbitAlive, hasApprovalAnswerer, hasQuestionAnswerer, etc., to facilitate confirming whether the plugin and HeadOrbit are online.

Settings → “AirPods Control” in the left sidebar allows adjusting nod/shake sensitivity, voice input keys, highlighting current option, UI language, etc. Changes take effect immediately without restarting DSH. Advanced configuration can override keys like enabled, token, nodAllows, claimQuestions, timeoutMs in the profile’s cordis.patch.yml (defaults exist, see README configuration table).

Use Cases and Notes

Who is it for: Users who use DSH Desktop/Web GUI on macOS long-term, already wear AirPods with head tracking support, and want to complete approvals and multi-select questions with fewer window switches.

Boundaries and Risks (stated in README):

  • Supports macOS only; if no headphones or HeadOrbit is offline, the plugin does not claim requests, behavior is similar to not being installed.
  • The plugin runs with the current DSH process permissions; please check the GitHub source code and MIT license yourself before installation to confirm acceptance of the HeadOrbit build downloaded by the installer (ad-hoc signed, not notarized, quarantine removed after installation).
  • Installer-related /setup* endpoints are token-free but restrict loopback Host and same-site requests; still recommended to use only in trusted local environments.
  • When DSH changes GUI ports, the plugin writes to ~/.dsh-airpod-control/endpoint.json; HeadOrbit polling will re-read this file, generally no manual App configuration changes are needed.

For troubleshooting, check: whether curl /dsh-airpod-control/setup returns 200 (if 404, check if cordis.patch.yml disabled the plugin); App log ~/Library/Logs/HeadOrbit-DSHBridge.log; frontend half-area status GET /dsh-airpod-control/client-state.

Conclusion

dsh-airpod-control connects AirPods head actions to DSH’s approval and question channels, reducing HeadOrbit configuration costs with a one-click installer; gestures work in parallel with web buttons, suitable for macOS users who want to “nod to allow, shake to deny or switch options”. Plugin directory page: https://www.skillhub.cn/plugins/fishcg/dsh-airpod-control; source code and complete API/configuration instructions: https://github.com/fishcg/dsh-airpod-control. The DSH community plugin directory is an independent site with no official affiliation with DeepSeek / High-Flyer; stars and versions are subject to the repository and npm.

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

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

Xiaoye