Preface¶
When performing screen casting and automation for Android or HarmonyOS devices within DSH, implementing separate menus, tabs, decoding, and AI tools for each platform leads to issues such as duplicate registration on the session side, inconsistent permission standards, and difficulties in unifying “which device is currently being operated.” DeepSeek Harness’s plugin model allows capabilities to be split into multiple packages for collaboration; the positioning of dsh-scrcpy-core is that scrcpy screen casting has only this single facade for both users and AI—the interface, device list, casting panel, and AI tools are centralized in this package, while the specific device connection and streaming methods for each platform are delegated to their respective providers.
The following sections introduce what this plugin is, what it can do, how to install and use it, and points to note when working with providers. Facts are subject to the repository README; the maintainer is ns-zzj, and the npm package name is @nszzj/dsh-scrcpy-core (version 1.0.2 in materials, MIT license).
What is this¶
dsh-scrcpy-core is the shared scrcpy core under the DSH client category. It does not recognize HarmonyOS or Android itself; it is only responsible for:
- Screen casting panel UI, one tab per device
- jmuxer decoding
- AI tools, prompts, permission gating
- Device and focus state, command routing
Each platform is provided by an independent provider offering “how to speak to this type of device”:
| Package | Role |
|---|---|
@nszzj/dsh-scrcpy-core (this package) |
The shared capabilities listed above |
dsh-hos-scrcpy |
HarmonyOS: hdc transport + Java sidecar (HOScrcpy SDK) |
dsh-android-scrcpy |
Android: adb transport + official scrcpy-server |
The materials explicitly state: providers do not register UI, do not register AI tools, do not write AI prompts, and do not care about which device is currently focused—all of these are handled in the core.
Core Features¶
In-Session Casting Experience¶
- The “scrcpy menu” in the top right of the session displays a device list grouped by platform (HarmonyOS / Android). Each group includes environment detection (the HarmonyOS group shows Java +
hdc, the Android group showsadb). - Click “Start” on a device row: starts the service and opens a casting tab for that device (one tab per machine, interfering neither with others).
- On the casting panel: mouse click/drag maps to touch,
Back/Home/Volume, text injection into the focused input box, “Add Screenshot to Chat”, and “Logs” when supported by the platform. - Switching to other tabs does not interrupt the stream: video broadcast pauses to save decoding and memory, and playback resumes when returning to the tab.
Tools for AI (Neutral Names, Registered Only Once)¶
| Tool | Function | Permission Required |
|---|---|---|
scrcpy_devices |
List connected devices, current focused device, status of four permissions | None |
scrcpy_screenshot |
Screenshot + built-in visual model recognition | Allow Screenshot |
scrcpy_locate |
Read control list (relative coordinates 0..1, etc.) | Allow Control |
scrcpy_tap / scrcpy_longpress |
Tap / Long press by relative coordinates (confirm before execution and flash green dot on screen) | Allow Control |
scrcpy_key |
Keys declared available by provider (e.g., back / home for Android provider) |
Allow Keys |
scrcpy_input |
Inject text into current focused input box (supports Chinese) | Allow Input |
All operation-type tools act only on the device the user is currently viewing in the casting panel; if there is no focused device, it will explicitly error out rather than automatically selecting one.
Each device has independent four sets of permission toggles, each with three states: Forbidden / Ask / Ask Never. “Allow Control”, “Allow Keys”, and “Allow Input” depend on “Allow Screenshot”; turning off screenshot will turn them off as well.
Version and Provider Compatibility¶
The three packages are released and installed independently. Providers declare coreCompat upon registration (e.g., "1.0.0", "^1.0.0", ">=1.0.0"); the decision power lies with the core. If there is a mismatch, the provider is marked as disabled, devices do not enter the list, actions are not routed, the menu group shows “Disabled” and the reason, while other providers remain unaffected.
Installation and Activation¶
You need to install two packages: core + the provider for your target platform. The core must be installed as a direct dependency of the profile; if only the provider is installed, the core is merely a transitive dependency, the bundle layer does not mount it, and there will be no warning (README 2026-09-25 comparison note). If only the provider is installed without the core, the status is pending (waiting for service: scrcpyProviders); it does not error out but is unusable, which is by design.
Desktop (Described as the current main force in 0.1.7 scenarios)¶
dsh plugin --profile desktop … will be rejected by the CLI:
error: profile "desktop" is managed exclusively by the Electron application
You must use the in-app plugin panel, where you can fill in:
- npm package name (Core:
@nszzj/dsh-scrcpy-core; HarmonyOS:@nszzj/dsh-hos-scrcpy; Android:@nszzj/dsh-android-scrcpy) - Local tgz path
github:spec (e.g.,github:ns-zzj/dsh-scrcpy-core)
Disable / Enable: README tests show enabling takes effect hot; disabling removes the package from the profile’s dsh.profile.bundles (dependencies are retained, no reinstallation needed for recovery), but loaded instances are not unloaded during runtime, requiring a restart to truly disappear.
Command Line (web and other profiles)¶
dsh plugin --profile <profile> add dsh-scrcpy-core dsh-hos-scrcpy
Or replace dsh-hos-scrcpy with dsh-android-scrcpy. Then restart dsh web; the appearance of the “scrcpy menu” in the top right of the session indicates successful installation.
Support Scope¶
The main force is the Desktop (Electron). dsh web is largely usable (the client half is browser code, RPC goes through host HTTP), but the README notes it has not been fully validated; in case of issues, treat the desktop version as the standard. The Origin validation for WS handshake allows dsh-app:// and local loopback; the web version generally is not blocked by Origin; external web pages will receive a 403.
Typical Usage¶
- After installing the core and the corresponding provider, open a DSH session, click the “scrcpy menu” in the top right, and confirm that the environment detection for the platform group passes.
- Click “Start” on the target device row and operate the device within the casting tab; when AI intervention is needed, configure the four permissions and Recognition Model in the “Settings” of the casting panel for each device.
- Connection parameters (Java path,
hdc,adb, etc.) are filled in the “Connection Settings” in the top right of each platform group in the menu—fields and detection are provided by the provider, and the core only renders the form. - In the conversation, ask the AI to call
scrcpy_devicesto understand the focused device and permissions, then use tools like screenshot, locate, tap, key, and input as needed; inAskmode, the user can refuse, and the AI should not blindly retry after a refusal.
The recognition model dropdown lists all models from all providers (not filtered by image support); if a model that does not support images is selected, the upstream API will report an error.
Scenarios and Notes¶
Who it is for: Teams or individuals already developing and debugging in DSH Desktop or web profiles who need a unified casting UI and AI control entry; actual device connection and streaming require installing dsh-hos-scrcpy or dsh-android-scrcpy separately.
Operation and Trust: The plugin runs under the permissions of the current DSH process and can access local adb/hdc, device screens, and input. Please read the GitHub Source Code and MIT license before installation, and evaluate whether to include it in your workflow.
Known Limitations (Excerpt from README): The Android provider currently has no log stream; the HarmonyOS SDK may have no frames when the screen is static, and the interface will prompt the user to slide the phone (Android has no such prompt); casting is change-driven, so it is normal for frame counts not to increase when static; the Android side has implemented UHID external keyboard (after clicking the screen once, PC input is handled by the device IME), the “Input” button goes through direct text injection; whether uinput on the HarmonyOS side can feed the IME is marked as untested in the README.
The community directory skillhub.cn plugin page is an independent site with no official affiliation to DeepSeek / High-Flyer; the DSH ecosystem philosophy is “everything is a plugin,” and this package is the shared layer of the casting stack, not a monolithic plugin that completes all-platform casting alone.
Conclusion¶
dsh-scrcpy-core brings the casting interface, multi-device tabs, decoding, permissions, and AI tools into one place, sinking platform differences down to providers, avoiding duplicate registration and routing chaos. In usage, remember to install both core and provider, and the core must be a direct dependency. Use the in-app plugin panel for Desktop, and the official add command plus a web restart for CLI profiles.
- Directory Page: https://www.skillhub.cn/plugins/ns-zzj/dsh-scrcpy-core
- Repository: https://github.com/ns-zzj/dsh-scrcpy-core