In DeepSeek Harness (DSH) usage scenarios, debugging agent-driven browser behavior or remotely monitoring headless processes is a common need. Embedding an external browser directly in the Web UI usually involves permission and rendering complexity. dsh-sidebar-cdp-browser, as a DSH sidebar plugin, displays an external Chromium instance in real time via CDP and provides controlled interaction capabilities.
The plugin was developed by chendefine. Its core purpose is to render the JPEG pixel stream of an external Chromium instance in the DSH Web GUI sidebar and relay keyboard and mouse operations back to the host process over a strict allowlist protocol.
Features¶
CDP Live View¶
The plugin registers a tab named dsh-sidebar-cdp-browser:live in the sidebar. It uses Page.startScreencast to obtain JPEG frames from the external Chromium instance and draws them to a canvas, supporting device pixel ratio scaling and contain-fit rendering.
Target Management¶
The top toolbar lists all current page targets. You can switch pages, create new pages, or close pages. The target list is refreshed once per second using a Target.getTargets snapshot.
Interaction Control¶
The plugin supports mouse clicks, dragging, wheel scrolling, and keyboard input (IME). For security, all interaction commands are sent over a strict allowlist protocol; arbitrary CDP pass-through is not supported. Interaction mode requires both the “Interaction Input” master switch and the “Keyboard and Mouse Control” checkbox to be enabled.
Security¶
Interaction control uses two-level gating (the Interaction Input master switch + the header checkbox) and a 30-second TTL ticket system. The external browser side only holds the CDP connection, does not discover the CDP address, and cannot execute arbitrary CDP commands.
Settings Panel¶
In the “Sidebar Content -> CDP Live View” card on the DSH Web settings page, you can configure the CDP address, the Interaction Input switch, and the frame capture parameters (quality, interval, resolution).
Installation¶
This plugin requires dsh-better-sidebar >= 0.17.1 for the sidebar tab to be displayed.
dsh plugin --profile web add dsh-better-sidebar dsh-sidebar-cdp-browser
After installation, restart dsh web to load the plugin.
Usage Flow¶
1. Start External Chromium¶
Start a Chromium instance with a debugging port on the host.
chromium --remote-debugging-address=127.0.0.1 --remote-debugging-port=9222
2. Configure the CDP Address¶
Open the settings page of the DSH Web GUI, go to the “Sidebar Content -> CDP Live View” card, and click the gear icon. Enter the address in the “CDP Address” field (defaults to 127.0.0.1:9222). After saving, the plugin will connect automatically.
3. Start Interacting¶
On the CDP Live View tab in the sidebar, first click the canvas to give it focus. Ensure that the “Interaction Input” master switch is enabled in the settings, and check the “Keyboard and Mouse Control” checkbox at the top of the view. You can then use mouse clicks, wheel scrolling, or keyboard input.
Notes¶
- Dependency requirement: You must install
dsh-better-sidebar>= 0.17.1; otherwise, the sidebar tab will not appear. - Security: Interaction mode requires both the “Interaction Input” master switch in the settings and the top “Keyboard and Mouse Control” checkbox to be enabled.
- Feature limitations: Copy and paste (Ctrl+C) are not currently supported; IME input is submitted only after composition is completed.
- Persistence: The CDP address is stored in the preferences document of
dsh-better-sidebar.