← Back to home@alenjdl

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
GitHub repo

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

  1. 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).
  2. The dsh-chrome-operation DSH plugin starts, connects to that WS bridge, and registers the browser_* tools.
  3. 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

  1. Open chrome://extensions.
  2. Enable Developer mode (top-right).
  3. Click Load unpacked and select the chrome-operation extension directory.
  4. A token is written to chrome.storage.local.token (managed by the extension / issue-token dev 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 token from chrome.storage.local.
  • The default WS pingIntervalMs is 15000 (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_snapshot may return empty; prefer browser_get_text + navigation for reading content.
  • If DSH ever complains about the dshWorkshop block, delete that top-level key — the plugin still loads via cordis.patch.yml.

License

MIT