guo6x/dsh-pilot

Give your DSH agent hands: drive a real browser (Edge/Chrome over CDP) from the chat โ€” ref-driven clicking, per-session browsers, and a live cockpit panel. Zero runtime deps, no API key.

Bundle verified MIT JavaScript Unknown
Bundle verified

Listed

4

Browser

Bundle verified

โ˜… 4 View on GitHub
VersionUnknown
LanguageJavaScript
LicenseMIT
View on GitHub

What it does

Zero-dependency browser control: drive a real headless Edge/Chrome over CDP with 8 `pilot_*` tools (navigate/click/type/keys/eval/screenshot) plus a live draggable cockpit panel in the Web GUI - text-first snapshots for text-only models, no Playwright, no API key.

Best for

  • Text-only agents that need to navigate, read, and interact with web pages through structured DOM snapshots.
  • Local browser automation where users want an observable cockpit and per-session browser isolation.
  • Workflows needing ref-based clicking and typing without Playwright, a vision model, or an API key.

Not ideal for

  • Machines without Node 22 or later and an installed Edge or Chrome browser.
  • Multi-tab workflows; each session supports one tab.
  • Tasks that must reuse the user's existing signed-in browser profile; the plugin launches an isolated headless profile.

README

๐Ÿ›ฉ๏ธ dsh-pilot โ€” give your DSH agent hands

Awesome DSH Plugin dsh-recommend dsh score ci ไธญๆ–‡่ฏดๆ˜Ž ยท DeepSeek Harness plugin

Drive a real browser from the DeepSeek Harness chat: the agent opens pages, reads them as structured text with a numbered element list, clicks and types by ref (no CSS guessing), presses keys, navigates back/reload, waits, evaluates JS, and takes screenshots โ€” while you watch a live draggable cockpit panel in the Web GUI and can take over at any time.

  • ๐Ÿš€ One command install โ€” dsh plugin --profile web add github:guo6x/dsh-pilot
  • โšก Zero runtime dependencies โ€” talks CDP over the native Node โ‰ฅ 22 WebSocket, uses the Edge/Chrome already on your machine
  • ๐Ÿ”‘ No API key โ€” nothing leaves your machine; no vision model required
  • ๐Ÿ“– Text-first by design โ€” the agent reads DOM snapshots (title/URL/text/links + numbered elements), so text-only models browse without burning vision tokens
  • ๐ŸŽฏ Ref-driven interaction โ€” every click/type targets a snapshot ref, not a guessed selector; stale refs fail loudly with a hint
  • ๐Ÿงญ Full navigation set โ€” back, reload, and wait tools for real browsing flows, with page-settling waits built in
  • ๐Ÿ‘€ Human in the loop โ€” live screenshot, URL bar, action log, and a session indicator in the cockpit; you see everything the agent does
  • ๐Ÿงฉ Per-session isolation โ€” every agent session gets its own browser instance; parallel sessions never fight over one page

Install

dsh plugin --profile web add dsh-pilot
# or straight from GitHub (same code, pinned to a commit):
# dsh plugin --profile web add github:guo6x/dsh-pilot

Restart dsh web, refresh the page. A โœˆ๏ธ button appears at the sidebar foot โ€” that opens the cockpit.

Requirements: DeepSeek Harness web profile, Node โ‰ฅ 22, and Edge or Chrome installed.

demo

What the agent gets

Tool What it does
pilot_open Open a URL (launches the browser on first use), return title/URL/text snapshot
pilot_snapshot Read the current page as text: title, URL, visible text (8k chars), links, a numbered element list (refs), and a change summary vs the previous snapshot
pilot_diff Report ONLY what changed since the last snapshot (URL/title/text delta, elements added/removed) โ€” judge whether an action worked without re-reading the page
pilot_click Click an element by its snapshot ref (or CSS selector); scrolls into view first
pilot_type Type into an input by its snapshot ref (or selector) via the native value setter โ€” React/Vue forms observe it
pilot_press Press a key (Enter/Tab/Escape/arrows/single chars)
pilot_back Go back in history, waits for the page to settle, returns URL/title
pilot_reload Reload the current page, waits for it to settle
pilot_wait Wait N ms (1โ€“30000) for async content before the next action
pilot_screenshot Save a PNG and return its path (for vision-capable models or the human)
pilot_download Download a resource (default: current page) through the pageโ€™s own fetch โ€” inherits session cookies; cap 20 MB
pilot_eval Evaluate JS in the page, get JSON back
pilot_close Stop the browser; the next call relaunches it

The agent just says what it needs: โ€œopen the login page, fill the form, click submit, and read the resultโ€ โ€” the tools are the same verbs.

What the human gets

A draggable cockpit overlay: live screenshot (2 s refresh), current URL + title, ๅฏๅŠจ/ๅ…ณ้—ญ buttons, an address bar, the recent action log, and a session indicator when several sessions are browsing. Everything the agent does is visible; close the browser or take over whenever you like.

Known limitations

  • One tab per session. Refs are pinned to the current page, so a tab switcher would invalidate them. Need a second context? Spawn a subagent โ€” each agent session gets its own browser.
  • Headless only. The cockpit shows the headless view; there is no headed mode (a human driving the same browser is a different product).
  • The panel shows the most recently used sessionโ€™s browser. Each session still owns its own instance โ€” the panel just follows the last one that acted.

How it works

DSH chat โ”€โ”€pilot_* toolsโ”€โ”€โ–ถ host plugin โ”€โ”€CDP (native WebSocket)โ”€โ”€โ–ถ headless Edge/Chrome
    โ–ฒ                              โ”‚
    โ””โ”€โ”€ structured text snapshots โ—€โ”˜
GUI cockpit โ—€โ”€โ”€/dsh-pilot/state + /dsh-pilot/shot.png (loopback)โ”€โ”€โ”˜
  • Launches msedge/chrome headless with an isolated --user-data-dir under the OS temp dir and a dynamically picked debugging port (9222+); the whole tree is killed and the profile removed on stop.
  • The host registers 8 tools plus a loopback-only HTTP API (/dsh-pilot/*, 403 for non-loopback clients).
  • The client is a small overlay panel registered in sidebar.footer.action + shell.overlay.

Security

  • Browser runs headless with an isolated profile; it never touches your real browser session.
  • The HTTP API binds to the DSH server (loopback by default) and rejects non-loopback clients explicitly.
  • pilot_open accepts http(s) URLs only; pilot_eval runs page-context JS (same trust as opening DevTools yourself โ€” do not point the agent at pages you donโ€™t trust).
  • No telemetry, no network calls to third parties, no API keys.

Develop

pnpm install
node build.mjs        # esbuild โ†’ lib/index.js (host ESM) + lib/client.js (ModuleLoader bundle)
node tests/smoke.mjs  # real-headless-Edge end-to-end smoke test

MIT licensed. Found a bug or an idea? Open an issue.

Frequently Asked QuestionsFAQ

Use the verified command dsh plugin --profile default add github:guo6x/dsh-pilot in a DSH-enabled shell. The command resolves the public package metadata and keeps the plugin attached to the catalog identity shown on this page.