dsh-katt-browser: Delegating the DSH Sidebar Browser to Agents with Structure-First Page Reading

Introduction

When performing online tasks in DeepSeek Harness (DSH), a common approach is to open a separate system browser or rely solely on screenshots fed to the model. Screenshot bandwidth is high, and coordinates are prone to drift; SPA and Canvas pages are even harder to reproduce stably. DSH desktop version has a right-side sidebar browser, but without a unified driver layer, it is difficult for agents to read the page in a “clickable reference + text + network” manner.

Below is an introduction to the community plugin dsh-katt-browser (maintainer: Kattentions, category: Network Tool). It attaches the sidebar webview via Chrome DevTools Protocol (CDP), falling back to an in-page bridge when CDP is unavailable; reading the page focuses on the accessibility tree, DOM, Worker messages, and network layer, with screenshots as a fallback. Resources can be found in the GitHub repository and SkillHub directory page.

What is this

dsh-katt-browser is a DSH desktop plugin: turning the built-in sidebar browser into a toolset callable by agents. The README describes it as “Structure first, screenshots last” — page state is primarily read from the accessibility tree, DOM, Workers, and network; multi-account state is saved locally in the form of encrypted snapshots.

Running environment requirements:

  • DSH desktop app (Electron, Windows / macOS / Linux), and with a sidebar browser.
  • Recommend starting with the DevTools port, e.g., --remote-debugging-port=9222; the plugin can also use the DOM bridge when CDP is unavailable, but CDP is the primary path.

License is MIT (README); current version number in package.json is 0.9.17. The community directory and GitHub are independent sources and do not equal DeepSeek / Hypothesis official app stores.

Architecture Overview

The tool layer connects to a mixed driver: connects via WebSocket to --remote-debugging-port, attaches to the sidebar guest webview; falls back to in-page bridge on failure. Account snapshots and the driver are stored side-by-side, static encryption (AES-256-GCM, key located at ~/.dsh/katt-browser/profile.key).

Core Capabilities (Agent Tools)

Read Page (Does not rely on screenshots by default)

Capability Description
browser_snapshot Accessibility tree, with eN references; detail=compact for interactive elements only
browser_text Readable body (titles, body text, links)
browser_table Table parsed as header + rows
browser_evaluate Execute JS within the page
browser_console Console logs and uncaught exceptions
browser_network Request history (method, URL, status, MIME, duration), filterable
browser_instrument Worker messages, fetch/XHR/WebSocket, storage writes, etc. (Canvas game states are often read from this)

Interaction

Navigation: browser_open / back / forward / reload, supports waitFor / waitMs to wait for SPA hydration.
Input: browser_click (ref or coordinate), browser_type, browser_press_key, browser_scroll, browser_hover, browser_upload. browser_zoom adjusts page zoom (0.25–5). browser_tabs supports listing, switching, creating, closing tabs.

Accounts and Local Pages

browser_cookies supports list / save / load / clear etc.; snapshots cover cookies, localStorage / sessionStorage, IndexedDB, Cache Storage. Same workspace partitions default to sharing login state; loading another snapshot can switch accounts. file:// cannot be opened directly in the sidebar, requires browser_serve to map to http://127.0.0.1:<port>/..., or call browser_open_file. The shell disables native downloads; use browser_download to pull from the page and write to disk.

Installation and Enablement

The README states “Easiest install”: no extra startup parameters or configuration needed after installation (CDP port is still recommended to be explicitly enabled in complex scenarios).

Method 1: Plugin Market Index (Recommended)

  1. In DSH, open Plugins → Discover → Index sources, add:
https://cdn.jsdelivr.net/gh/Kattentions/dsh-katt-browser@main/index.json

The index lists two plugins (sidebar browser + mobile bridge), click Install.
2. Restart DSH.
3. Let the agent open a page; if the right sidebar has never been expanded, the first operation will automatically expand it.

Method 2: Command Line Install Release Package (No git required)

dsh plugin --profile desktop add https://cdn.jsdelivr.net/gh/Kattentions/dsh-katt-browser@main/dist/dsh-katt-browser-latest.tgz

You can also specify a version from GitHub Releases, for example 0.9.9 in the README:

dsh plugin --profile desktop add https://github.com/Kattentions/dsh-katt-browser/releases/download/v0.9.9/dsh-katt-browser-0.9.9.tgz

For Mainland China network, you can choose the jsDelivr mirror:

dsh plugin --profile desktop add https://cdn.jsdelivr.net/gh/Kattentions/dsh-katt-browser@main/dist/dsh-katt-browser-0.9.9.tgz

The npm path is marked as available after release in README: dsh plugin --profile desktop add dsh-katt-browser. You can also use github:Kattentions/dsh-katt-browser (requires local git, not the primary installation method for this task).

It is recommended to browse the repository source code and LICENSE before installing; the plugin runs with the current DSH process permissions, and snapshots contain login state, so you need to evaluate host and disk security boundaries yourself.

Configuration Items

In DSH plugin configuration, you can set (fields from README):

- id: katt-browser
  config:
    driver: webview        # webview (default) | headless (legacy)
    cdpPort: 9222          # Desktop app DevTools port
    idbLimit: 50           # Number of rows per page when snapshotting IndexedDB (max 500 per DB)
    downloadDir: ''        # Default directory for browser_download
    allowedHosts: []       # If non-empty, only allows listed domains and subdomains
    revealPanel: false     # When true, tool calls can expand the sidebar (default does not steal focus)
    cdpIdleDetachMs: 45000 # Disconnect CDP after this long idle (0 means keep connection)
    instrument: true       # false can disable in-page hooks for heavy sites

Under multiple workspaces, tools will not automatically open or switch the right sidebar by default; reading pages and navigation still work when the sidebar is collapsed, but real keyboard/mouse input requires the panel to be visible, otherwise it will return a panelHidden prompt. If you want the tool to actively expand the panel, set revealPanel: true.

Typical Usage

The walkthrough in the README can be reproduced as follows.

1. Read page with structure, interact with ref

browser_open   url=https://quotes.toscrape.com/
browser_snapshot detail=compact
  [e1] link "Quotes to Scrape"   [e2] link "Login"   [e3] link "(about)" ...

2. Click ref and read body again

browser_click  ref=43            -> https://quotes.toscrape.com/page/2/
browser_text   maxChars=400      -> title, body, links

3. Check console when rendering errors occur

browser_console  level=error     -> uncaught exceptions

Local HTML: The document preview header has a Katt browser button, which maps to a local HTTP one-click and opens in the sidebar; or can be completed in one step by the agent calling browser_open_file.

Performance and Known Limitations

Idle for about 45 seconds without a browser call will disconnect CDP (cdpIdleDetachMs), reconnecting on the next call to avoid the debugger staying attached for too long and causing the page not to render according to throttling strategies. Short-term focus simulation is enabled before and after click/input; heartbeat is 8 seconds and can be skipped when data hasn’t changed or the window is hidden. instrument: false can reduce hook overhead for heavy sites.

Known limitations (README):

  • Cannot open file://, use browser_serve.
  • Native downloads are intercepted by the shell, use browser_download.
  • Service Worker registration itself cannot be restored from snapshots (Cache Storage content can).
  • Login walls, CAPTCHAs, rate limiting, etc., will give barriers prompts, requiring users to manually complete them within the sidebar.

Use Cases

Suitable for developers who need to complete the “open link → read structured page → click ref → view network/console” loop within a DSH session; especially suitable for table sites, documentation sites, and Canvas-type pages where DOM does not expose state but Workers have messages.

Not suitable for scenarios expecting to completely bypass CAPTCHAs or strong login walls without human intervention; also not suitable for placing unreviewed third-party pages and sensitive snapshots together on a shared machine without allowedHosts constraints.

Conclusion

dsh-katt-browser turns the DSH sidebar into a CDP-driven programmable browser: structure-first page reading, encrypted multi-account snapshots, and a panel strategy coexisting with DSH workspaces, reducing the agent’s reliance on screenshots for online tasks.

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

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

Xiaoye