dsh-chrome: Drive background tabs for DSH in the current Chrome

Preface

When performing web-related tasks in DeepSeek Harness, the common practice is to launch a separate headless browser or a standalone window, and then provide screenshots to the model via CDP. This often creates a disconnect from the login state of the Chrome instance used daily, and bringing the window to the foreground interrupts current workflows. The dsh-chrome (repository yueyexiayu/dsh-chrome) introduced below takes a different path: it opens background tabs within the local, current Chrome instance, organizes them into a collapsed DSH tab group, does not open new windows, does not steal Chrome to the foreground, and reuses the login status of the current profile. The tools start with chrome_, and screenshots can be returned as formal attachments when the model supports images; the extension also supports selecting elements on the page, which can be written to the DSH input draft via a confirmation page.

What is this

dsh-chrome is a desktop (client) plugin for DeepSeek Harness, maintained by yueyexiayu. The plugin version in the source code is 0.2.3, paired with Chrome extension 0.2.4. It communicates via a local Chrome extension and Native Host, operating pages in a headed / borrowed-connection mode: it only allows http / https and explicitly treats page content as untrusted data rather than instructions. Community directory page: https://www.skillhub.cn/plugins/yueyexiayu/dsh-chrome.

Unlike the “independent visible Chrome window + pure CDP” representation, the backend emphasized by the README is headed / borrowed-connection, not headless; explicit headless requests will be rejected before connection or tab creation. For scenarios requiring automatic DOM, screenshot acceptance, or anonymous isolation, the documentation suggests switching to a dedicated headless backend.

Core Features

Session and Tab Isolation

Each DSH conversation corresponds to a collapsed tab group, with the title displayed as DSH plus the last 6 digits of the session ID; full session ownership is recorded separately, preventing the misuse of tabs from other conversations due to identical titles, and avoiding calls to Page.bringToFront. The plugin only operates on tabs within the current conversation’s tab group and does not list or switch to other tabs you are viewing. chrome_close only closes the current conversation’s tab group; it does not quit Chrome or close groups belonging to other conversations.

Browser Tools and Screenshots

  • chrome_browsers: The list action performs a real extension handshake and health check, reporting connected only on success; it avoids false disconnection reports when no browser operations have occurred since startup.
  • chrome_resize: Does not change window size to avoid activating Chrome on macOS.
  • chrome_screenshot: Saves PNG to disk; returns the image to the model via formal attachment references when confirmed that the current model supports images; can be previewed in the current conversation when combined with zhanshi.
  • Element refs come from the most recent chrome_snapshot / chrome_query / chrome_find / chrome_a11y and are renumbered for each call.
  • Does not automatically accept alert / confirm / prompt; if a dialog blocks operations, chrome_dialog must be called first.
  • Queries can merge accessible frame contexts, supporting open shadow roots, same-origin iframes, and cross-origin frames exposed by the debugger; operations with refs are routed by ownership, treating frame refs as non-top-level elements.
  • Password field default values do not enter default snapshots, element details, HTML, or accessibility tree outputs.

Page Annotation (Extension UI)

Click the Chrome toolbar DSH Chrome to select elements on the current http / https page (up to 12 items). The overlay only collects element data; after clicking “Edit Requests”, the extension checks the original tab and URL, takes a screenshot, and opens a standalone confirmation page (it switches to the confirmation page, but background browsing tools do not steal focus). On the confirmation page, select “Change” or “Query” for each item and fill in the Request, then click “Put into DSH Draft”. The annotation enters the current DSH input box; it does not automatically submit the conversation. chrome:// and extension pages cannot be selected.

Shortcut Steps and File Policy

chrome_shortcut’s list / save / run uses $DSH_HOME/cache/chrome-shortcuts.json, saving with an exclusive .lock and atomic writes. Screenshots, GIFs, and other outputs follow the calling session’s DSH file policy; read-only mode prohibits saving to disk. chrome_downloads reports UNSUPPORTED_BROWSER_CAPABILITY for the current extension capabilities and does not fake an empty download list. Cookie / storage values are not returned by default; items with names resembling tokens or passwords are masked.

Installation and Enablement

Refer to the repository README for installation methods: copy the plugin to the local DSH plugin directory, modify the Cordis patch for the desktop profile, install Node dependencies, and load the Chrome extension.

  1. Place the repository content in $DSH_HOME/plugins/chrome (default $DSH_HOME is ~/.dsh).

  2. Write the following to $DSH_HOME/profiles/desktop/cordis.patch.yml:

- insert:
    - id: chrome
      name: ../../plugins/chrome/lib/index.js
  1. Install dependencies in the plugin directory (requires pnpm 11):
cd "$DSH_HOME/plugins/chrome"
pnpm install --frozen-lockfile

Note: This command installs the locked JPEG decoding dependency and the official browser-policy local build archive carried by the repository; it does not perform native compilation; the execution contract subpath does not load Cordis. After completion, fully quit DeepSeek Harness (macOS: ⌘Q) and then reopen it; the plugin writes the Chrome local communication host manifest upon startup.

  1. Load the extension in the same profile of the Chrome you are using:

  2. Open chrome://extensions

  3. Enable “Developer mode” in the top right corner
  4. Click “Load unpacked” and select the directory $DSH_HOME/plugins/chrome/extension
  5. Allow debugging prompts; the “Debugging” indicator on controlled tabs is a fixed prompt for extension debugging and will not bring the window to the foreground

After modifying extension/, click “Reload” on the extension card. After modifying the Host or Client, you must fully quit DSH and reopen it.

Typical Usage

Model-side Tool Invocation

During a conversation, the model can call tools starting with chrome_, such as health checks, opening pages, snapshots, queries, screenshots, and closing the current conversation’s tab group. Annotations are placed into the current session input box by the Client; if the reception is interrupted and the draft status cannot be confirmed, the interface will display a recovery prompt.

A recommended sequence could be: first use chrome_browsers to confirm connected, then navigate or snapshot, and use chrome_screenshot when visual evidence is needed; before operating on specific elements, refer to the refs obtained from the most recent snapshot / query / find / a11y.

Manual Annotation to Draft

  1. Click the extension icon on the target webpage and select up to 12 elements.
  2. Verify the screenshot and page information on the confirmation page, and fill in the Request for each item.
  3. Click “Put into DSH Draft”, return to DSH to check the input box, and send it manually.

If disconnected or unconfirmed, the same review session will not blindly resend; you can first check the DSH draft or sent messages, and use the “Put into draft again” recovery process described in the README to supplement images or confirm if necessary.

Applicable Scenarios and Notes

Suitable for: Desktop DSH users who want DSH to reuse the current Chrome login state, perform http/https automation or screenshots for the model in background tabs, and do not want the Chrome window to be repeatedly activated.

Not suitable for or requires a different backend: Anonymous isolation, independent download directories, headless batch acceptance, disabling user global downloads, etc.—the README explicitly states that these should not be faked by this plugin.

Permissions and Security: The plugin runs with the permissions of the current DSH process; you should review the source code and license before installation. Page content and HTML/styles in annotations are treated as data, not system instructions. Only http/https is allowed.

Environment and Conflicts:

  • Only one Chrome profile’s extension communication host and one DSH control connection are supported simultaneously for the same $DSH_HOME; for other profiles, disable the extension and reload it in the target profile.
  • When upgrading from the old fixed endpoint ~/.dsh/cache/dsh-chrome.sock, you need to fully quit Chrome and DSH, confirm the old communication host has exited before deleting the old endpoint (do not delete the entire cache), and then load the new extension.
  • If Chrome has no normal window, it will report CHROME_NORMAL_WINDOW_REQUIRED and will not secretly create a GUI window.

Version: The extension worker must match the adapter’s paired 0.2.4; a mismatch will report CHROME_EXTENSION_VERSION_MISMATCH; after changing files, you need to reload the extension and fully restart the Host, and verify the actual version in a new session.

Conclusion

dsh-chrome binds DSH’s browser capabilities to the Chrome you use daily: background tabs, session-level tab groups, screenshots viewable by the model, and element annotations via the extension side into the draft. Refer to the GitHub README for installation and behavior details.

The community directory is an independent site and has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem follows “Everything is a Plugin”, please judge whether to adopt this plugin based on the source code and your own environment.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye