Foreword¶
When doing mobile automation or joint debugging in DSH, the common practice is to install Android / iOS plugins separately and use adb screen capture or simulator MJPEG to pump the frames into the workspace. The community already has solutions like dsh-android and dsh-ios, but frame acquisition is typically a whole-frame PNG loop—each 1080p frame costs hundreds of KB, and measured frame rates are only on the order of about 1.8fps. The bottleneck is not adb, but the transfer of a complete bitmap for every frame.
mobilecli is a device-control CLI covering both iOS and Android. It supports streaming frame acquisition such as H.264 / MJPEG and also has screencapture, but its output can only be written to stdout, with no clickable panel. The following introduces the client plugin dsh-sidebar-mobile by maintainer j62268781-alt (npm package @j62268781-alt/dsh-sidebar-mobile, current version 0.1.0, MIT license): it wraps mobilecli into DSH’s right sidebar, provides a real-time view with direct click/drag support, covers both platforms with a single API, and also registers mobilecli’s built-in skill for the model.
What Is This¶
dsh-sidebar-mobile is a web client plugin for DeepSeek Harness (category: client). It does not connect directly to device ports from the browser; instead, it forwards mobilecli’s stream and interaction through DSH’s own web routes. It provides a “Mobile device” sidebar panel for humans, 11 curated tools for the model, and can optionally register the upstream mobilecli playbook skill.
The plugin declares zero runtime dependencies in package.json: React uses the host’s version, and the client build output is committed, so installers do not need to run the frontend toolchain locally (see the upstream README for development builds).
Core Features¶
Real-Time View and Sidebar Operations¶
- Android uses mobilecli’s AVC/H.264 (the README reports a measured 104fps); the iOS simulator uses MJPEG (measured 131fps). Compared with PNG-loop screen capture, the stream size differs by about two orders of magnitude.
- Clicks and drags on the view are converted back to device physical coordinates according to the display scale.
- Devices are grouped by physical device / simulator in the dropdown; offline simulators can be started first (a cold start may take several minutes), while offline physical devices can only be selected, not started.
- The panel provides controls such as Home, Back (Android only), Rotate, Reconnect token, and appearance switching; the status bar shows whether streaming is active, the platform, and the stream format (
H.264orMJPEG).
One API, the Same Path for iOS and Android¶
Physical devices, simulators, and emulators all go through the same mobilecli path; the plugin side does not fork implementations by platform.
11 Tools for the Model¶
Only the tools listed in the README are registered (thin wrappers such as coordinate tap, swipe, and input have been removed—instead, mobilecli commands are run directly via the shell and documented in the skill):
| Tool | Purpose |
|---|---|
mobile_devices |
List devices (should be run first to obtain the device id) |
mobile_boot |
Boot a device and start streaming |
mobile_ui_tree |
Read the UI tree (structured, preferred) |
mobile_screenshot |
Take a screenshot (for humans or multimodal models) |
mobile_tap_element |
Tap elements by identifier/text |
mobile_list_apps |
List installed apps |
mobile_find_text / mobile_tap_text |
Find text / tap text via OCR (fallback) |
mobile_wait_for |
Wait for text to appear or disappear |
mobile_logs |
Read device logs |
mobile_open_panel |
Open the sidebar mobile-device panel for the user to see (not for the model to read the interface) |
The costs of each observation method are documented in the tool descriptions: mobile_ui_tree takes about 100–300ms, mobile_screenshot about 200–400ms, and mobile_find_text about 1s.
Bundled mobilecli Skill¶
The upstream SKILL.md and reference.md are packaged and registered; the configuration option registerSkills defaults to true. There is no need to manually copy the playbook into .agents/.
Security and Dependency Boundaries¶
The browser never touches the mobilecli port listening on localhost; frames go through DSH routes such as /_dsh/dsh-sidebar-mobile/stream/<token>, with signed tokens and a loopback fence (see the upstream “Security model” section for details).
Installation and Activation¶
The plugin runs with the permissions of the current dsh process; before installing, it is recommended to review the GitHub repository source code and the MIT license. Engine requirements: Node >= 20, dsh >= 0.2.0-0 (the README badge notes DSH 0.2.0-rc.2 as tested).
Prerequisite: mobilecli¶
npm install -g mobilecli@latest
mobilecli devices # Confirm devices can be seen
Prerequisite: adb (required for Android)¶
mobilecli calls the external adb; when adb is missing, mobilecli devices may still return an empty list with exit code 0. You need to install platform-tools and configure PATH or ANDROID_HOME. After installing, restart DSH and run mobilecli daemon stop so the daemon can re-read the environment (the daemon caches the environment from when it was started).
Prerequisite: iOS agent¶
Both iOS physical devices and simulators require an agent; this plugin will not install it automatically:
mobilecli agent status --device <udid>
mobilecli agent install --device <udid> # Physical devices require a provisioning profile
Installing the Plugin¶
Web profile:
dsh plugin --profile web add @j62268781-alt/dsh-sidebar-mobile@latest
dsh web
Or as a profile package dependency:
pnpm add @j62268781-alt/dsh-sidebar-mobile
After installation, refresh the page and a “Mobile device” entry will appear on the right sidebar’s “Get started” page. Keyboard shortcuts: desktop Ctrl+Shift+M (⌘⇧M on macOS), browser Ctrl+Alt+M (⌘⌥M on macOS); these can be modified under Settings → Keyboard shortcuts. For the desktop edition, install it via Settings → Plugin marketplace (the desktop profile is not added by the CLI dsh plugin --profile desktop).
Configuration¶
In the profile’s cordis.patch.yml, keys are mounted under dsh-sidebar-mobile. Common options include:
| Key | Default | Description |
|---|---|---|
enabled |
true |
Master switch |
binaryPath |
null |
mobilecli path; when null, it is resolved through four levels: environment variable, PATH, and the in-package platform package |
homeDir |
null |
MOBILECLI_HOME |
routePrefix |
/_dsh/dsh-sidebar-mobile |
Route prefix |
registerSkills |
true |
Whether to register the mobilecli skill |
stream.idleStopSeconds |
300 |
Time to stop streaming after there are no consumers |
stream.restartDelayMs |
5000 |
Delay before restarting after a stream crash |
stream.defaultScale |
1.0 |
Scale (e.g., 0.5 can reduce bitrate on iOS) |
useDaemonRpc |
true |
Prefer the daemon’s unix socket for interaction |
trustedAuthorities |
[] |
Explicit authorities for reverse proxies |
Typical Usage¶
Humans Operate in the Panel¶
Right sidebar → “Mobile device” → select a device → click or drag on the view. If the view freezes, click reconnect (to request a new token).
Model-Driven Devices¶
- First run
mobile_devicesto get the device id. - Use
mobile_ui_treewhen you need to see the interface structure; usemobile_tap_elementto tap elements; if the tree cannot be read, fall back tomobile_find_text/mobile_tap_text. - Before launching an app, run
mobile_list_appsfirst; do not guess package names. - For coordinate taps, swipes, input, key presses, launching apps, and so on, call mobilecli directly in the shell (equivalent to the removed tools), for example:
mobilecli io tap --device <id> 540,1200
mobilecli io swipe --device <id> --duration 250 540,1800,540,700
mobilecli io text --device <id> "hello"
mobilecli io button --device <id> BACK
mobilecli apps launch --device <id> com.example.app
Note: io swipe must pass --duration; coordinates are in physical pixels; the target must be focused before input.
When the User Needs to See the Screen¶
The model can call mobile_open_panel to open the sidebar panel; the panel contents are not part of the model context—its purpose is for humans to view the real-time view.
Use Cases and Caveats¶
Suitable for: scenarios where you write code in a DSH session, let the model read the UI tree/logs, and preview Android / iOS (including simulators) in the sidebar with low latency; and where you want one set of tools to cover both platforms with built-in mobilecli usage instructions.
Caveats:
- Flutter apps’ accessibility trees often consist only of anonymous Views, so widget semantics cannot be read; this is a limitation of the Flutter rendering model, not a defect specific to mobilecli. For widget-level trees, you need the Dart VM Service or
integration_test/ Patrol within the project; this plugin does not providemobile_flutter_tree(it has been removed upstream). - When the “Get started” page has more than 4 capsules, DSH disables all capsule subtitles; after installing this plugin, the display of other entry subtitles may be affected—this is a host rule, and the plugin cannot be exempted on its own.
- The community directory SkillHub plugin page and GitHub are independent sources of information and have no official affiliation with DeepSeek / HF (幻方); star counts and other data are based on what the page shows at the time (in the materials, GitHub shows 1 star).
Conclusion¶
dsh-sidebar-mobile brings mobilecli’s streaming frame acquisition and device control into DSH’s right sidebar, and exposes the capabilities to both humans and models through 11 tools plus a bundled skill. Based on the frame-rate comparison given in the README, it is more suitable than traditional PNG screen-capture solutions for Harness workflows that need smooth previewing and structured interface reading.
- Directory page: https://www.skillhub.cn/plugins/j62268781-alt/dsh-sidebar-mobile
- Repository: https://github.com/j62268781-alt/dsh-sidebar-mobile