jiaererw/dsh-plugin-chrome1

dsh-plugin-chrome

DeepSeek Harness 浏览器可视化插件:为每个会话打开一个可见的真实 Chrome 窗口,Agent 通过 chrome_* 工具集操作浏览器,用户在 Web GUI 的「Chrome」标签页实时观看画面流并手动接管控制。

包名
dsh-plugin-chrome
版本
0.1.0
许可证
MIT
最近更新
2026年8月21日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jiaererw/dsh-plugin-chrome

Usage

For the agent (tools)

The agent gets the chrome_* suite automatically. Just ask it:

Open Chrome, go to https://example.com, take a screenshot, then click the "Login" button and fill in the username.

The agent will: chrome_openchrome_navigatechrome_screenshot (sees the image) → chrome_snapshot (gets uids) → chrome_click / chrome_fill.

For you (visualization)

  1. Open the Chrome tab at the top of the conversation:
    • Live view: continuously shows the window. Native screencast frames flow while the page changes; a heartbeat fallback force-captures idle pages so the picture never freezes.
    • Tab management: switch or close tabs from the side list, in sync with the real window.
    • Manual takeover: click around in the Chrome window yourself at any time — the agent sees your changes on its next tool call.
  2. Screenshot history: every chrome_screenshot is stored in the panel; click a thumbnail to enlarge.

Window lifecycle & resilience

  • Lazy start: Chrome launches only on the first chrome_* call (or the panel's Open button).
  • Orphan adoption: if DSH died and left a Chrome behind (profile locked), the plugin reconnects through DevToolsActivePort and takes the window over instead of failing (the same autoConnect idea as chrome-devtools-mcp).
  • Idle reaping: a window idle past idleTimeoutMs (default 10 min) closes automatically — never while a Web UI viewer is watching.
  • Auto tab recovery: every operation makes sure a usable tab exists, so a window full of chrome:// internal pages never dead-ends.

Configuration

Override the plugin row in the profile's cordis.patch.yml (config is replaced wholesale):

- id: dsh-plugin-chrome
  config:
    headless: false            # keep false — a visible window is the point
    executablePath: ''         # empty auto-detects Chrome/Edge; or set an absolute path
    idleTimeoutMs: 600000      # idle auto-close (0 disables)
    windowWidth: 1280
    windowHeight: 900
    screencastFrameSkip: 4     # live-view frame decimation (1 = smoothest)
    screencastQuality: 70      # JPEG quality 1-100
    maxSnapshotText: 60000     # max chars per snapshot
    maxTabs: 16
    autoScreenshot: false      # capture after every action
    extraArgs: ''              # extra Chrome launch flags

Data directory (browser profiles & screenshots): ~/.dsh/data/dsh-plugin-chrome/sessions// (override with dataRoot).