dsh-chrome-operation
DSH desktop plugin — local Chrome bridge exposing browser actions as DSH tools
- Stars
- 1
- Language
- JavaScript
- Created
- Oct 5, 2026
- Updated
- Oct 5, 2026
Introduction
dsh-chrome-operation
A DSH plugin that turns your local Chrome browser into a set of DSH tools. It pairs with the chrome operation (chrome-operation) MV3 Chrome extension, which runs a WebSocket bridge inside your browser. The DSH plugin dials that bridge over loopback and exposes browser actions as DSH tools, so DSH agents can drive a real local Chrome browser.
How it works
- The chrome-operation extension (MV3) runs a background service worker that listens on
ws://127.0.0.1:18765/ext/bridge(with a 15-second keep-alive ping so the Chrome service worker doesn't go idle and drop the connection). - The dsh-chrome-operation DSH plugin starts, connects to that WS bridge, and registers the
browser_*tools. - When DSH calls a
browser_*tool, the request flows over the bridge and the extension performs the action in a real Chrome tab.
Installation
1. Load the Chrome extension
- Open
chrome://extensions. - Enable Developer mode (top-right).
- Click Load unpacked and select the
chrome-operationextension directory. - A token is written to
chrome.storage.local.token(managed by the extension /issue-tokendev script).
2. Install the DSH plugin
The plugin is distributed on npm as dsh-chrome-operation.
dsh plugin add dsh-chrome-operation
3. Restart DSH
The plugin activates on a profile restart. Restart DSH desktop, then confirm the connection (the plugin logs bridge ready / extension connected).
Tools exposed
browser_snapshot, browser_get_text, browser_navigate, browser_open_tab, browser_list_tabs, browser_close_tab, browser_click, browser_type, browser_press, browser_scroll, browser_wait, browser_back, browser_forward, browser_reload.
Configuration
- The bridge listens on loopback only (
127.0.0.1) — local use only. - The extension reads the
tokenfromchrome.storage.local. - The default WS
pingIntervalMsis15000(configurable via the bridge config endpoint/ext/bridge-config). Chrome's service worker goes idle ~30s; the 15s ping keeps it awake.
Notes
- Requires Chrome (the extension is MV3 and uses a service worker).
- On complex pages
browser_snapshotmay return empty; preferbrowser_get_text+ navigation for reading content. - If DSH ever complains about the
dshWorkshopblock, delete that top-level key — the plugin still loads viacordis.patch.yml.
License
MIT