zdddrszj985/dsh-browser-cdp ↗★ 1

dsh-browser-cdp

DSH plugin: open a URL in your local Chromium (Edge/Chrome) over CDP and get the rendered page back — the fallback for pages the built-in fetcher cannot handle.

包名
dsh-browser-cdp
兼容性
待验证
版本
0.1.0
许可证
MIT
最近更新
2026年11月22日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zdddrszj985/dsh-browser-cdp

Usage

Once loaded, the agent can call browser_open:

{
  "url": "https://github.com/owner/repo/blob/main/README.md",
  "waitForSelector": "article.markdown-body",   // optional
  "screenshot": true                            // optional
}

Returns:

{
  "url": "https://example.com/",       // final URL after redirects
  "title": "Example Domain",
  "text": "Example Domain\nThis domain is for use ...",  // visible innerText
  "chars": 129,
  "data": "",                          // value of the evaluate expression
  "screenshot": "C:\\Users\\you\\.dsh\\browser-cdp-shots\\shot-1712.png",
  "browser": "Edg/157.0.4341.60",
  "elapsedMs": 3115
}

Parameters

ParameterTypeDefaultMeaning
urlstring— (required)Absolute http(s) URL
waitForSelectorstring—Wait until this CSS selector matches before extracting
clickstring—Click this element after load, then re-settle
evaluatestring—JS expression evaluated in the page; value returned as data
settleMsinteger1200Extra wait after load before extracting
timeoutMsinteger30000Navigation budget and per-CDP-call budget
htmlbooleanfalseReturn outerHTML instead of visible text
screenshotbooleanfalseSave a PNG and return its path
headfulbooleanfalseShow a real window (needed to log in by hand)
keepOpenbooleanfalseLeave the tab open afterwards
closebooleanfalseShut the shared browser instance down

Configuration

All optional, via environment variables:

VariableDefaultMeaning
DSH_BROWSER_PATHauto-detectedPath to msedge.exe / chrome.exe / chromium binary (also accepts BROWSER_PATH)
DSH_BROWSER_CDP_PORT9333DevTools port
DSH_BROWSER_CDP_PROFILE$DSH_HOME/browser-cdp-profileBrowser user-data dir
DSH_BROWSER_CDP_SHOTS$DSH_HOME/browser-cdp-shotsScreenshot output dir
DSH_HOME~/.dshBase dir for the two above

Auto-detection looks at the standard install locations for Edge and Chrome on Windows, macOS, and Linux (including LOCALAPPDATA installs, /snap/bin/chromium, /opt/google/chrome/chrome).

Configuration

All optional, via environment variables:

VariableDefaultMeaning
DSH_BROWSER_PATHauto-detectedPath to msedge.exe / chrome.exe / chromium binary (also accepts BROWSER_PATH)
DSH_BROWSER_CDP_PORT9333DevTools port
DSH_BROWSER_CDP_PROFILE$DSH_HOME/browser-cdp-profileBrowser user-data dir
DSH_BROWSER_CDP_SHOTS$DSH_HOME/browser-cdp-shotsScreenshot output dir
DSH_HOME~/.dshBase dir for the two above

Auto-detection looks at the standard install locations for Edge and Chrome on Windows, macOS, and Linux (including LOCALAPPDATA installs, /snap/bin/chromium, /opt/google/chrome/chrome).