DeepSeek Harness 的受控浏览器自动化:agent_browser 工具与 BrowserAutomationService 通过 agent-browser CLI 驱动真实 Chromium / Chrome 页面(或指定 CDP 端点),支持 allowedDomains 域名收敛与单次调用输出上限。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:KasenRi/dsh-browser
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
This repository is an installable release mirror for @kasenri/dsh-browser 0.1.0. Canonical source: https://github.com/KasenRi/dsh-orbit-browser-plugins/tree/main/packages/browser Do not develop features here; publish changes from the canonical source monorepo. Community plugin for DeepSeek Harness (DSH). Not affiliated with or endorsed by DeepSeek.
让 AI 真正操作浏览器完成任务。 支持打开网页、点击、输入、翻页、读取内容和下载文件等操作,可用于网页测试、信息采集和自动化流程,并提供域名限制等安全控制。
Technical integration:
- a
BrowserAutomationServiceonctx.browserAutomation - a model-facing
agent_browsertool that drives theagent-browserCLI
Harness native infrastructure (agents, tools, sessions)
│
▼
@kasenri/dsh-browser
│ BrowserAutomationService + agent_browser tool
▼
agent-browser CLI → Chromium / Chrome (or an explicit CDP endpoint)
Requirements
| Component | Tested with |
|---|---|
@deepseek-ai/dsh |
0.1.5-rc.2 |
@deepseek-ai/cordis |
4.0.2 |
agent-browser |
0.33.2 (must be on PATH) |
| Node.js | >= 22.19.0 |
| Browser | Chromium / Google Chrome (or an Electron/CDP debug endpoint) |
DSH is in developer preview and evolves quickly; this package is tested with the versions above, not with every future DSH release.
Install
The package is published to the npm Registry; the dedicated Git distribution mirror remains available when a Git source is preferred:
dsh plugin --profile web add @kasenri/dsh-browser
# Git source alternative, tracks the mirror repository HEAD:
# dsh plugin --profile web add github:KasenRi/dsh-browser
The package declares a dsh.bundle patch, so dsh plugin add registers it as a
profile layer automatically. Restart the profile (or start a new session) after
installing.
The canonical source is maintained in the
source monorepo.
The source monorepo's versioned Release tarballs remain available for manual or
offline fallback, but the Market uses this dedicated Git repository so updates
can compare the locked commit with HEAD.
If agent-browser is not on PATH, point the plugin at an executable with the
command config key, the executablePath config key, or the
DSH_BROWSER_EXECUTABLE_PATH environment variable.
Tool input modes
agent_browser accepts exactly one of:
| Mode | Purpose |
|---|---|
args |
Raw agent-browser argv (e.g. ["open", "https://…"], ["snapshot", "-i"]). |
semanticAction |
Stable target: action + locator/role/name/selector. |
job |
Short deterministic multi-step batch (steps, failFast). |
qa |
Page QA preset (url or attached, expected text/selector, diagnostics). |
electron |
Explicit CDP attach: `{ action: "connect", port |
sourceLookup |
Candidate source locations from DOM/React evidence + bounded workspace scan. |
networkSourceLookup |
Failed-request evidence + candidate source/workspace hints. |
Standard workflow: open → snapshot -i → use the current @refs →
click/fill/select → snapshot -i again after the page changes.
Other options: stdin (only for batch, eval --stdin,
auth save --password-stdin), outputPath (atomic 0600 write of the
structured result), timeoutMs, sessionMode (auto | fresh).
What it protects
- Stale refs — refs are page-scoped; mutations against refs that are not in the latest snapshot of the same target are blocked before any browser call.
- Tab drift — an unexpected active-target change (including
about:blank) invalidates refs and triggers exactly one deterministic recovery viatab list+tab <id>; ambiguity fails astab-driftinstead of guessing. - Artifacts — screenshots, downloads, PDFs, HAR/trace/record files are verified on disk (existence, size, type) before success is reported.
- Secrets and protected state —
.agent-browserstate, password stores and cookie databases are blocked; credential-shaped values are redacted from all tool output. - Domain containment — when
allowedDomainsis configured, known URLs are preflighted, the managed context launches with upstream--allowed-domains, and the final URL is verified. CDP attach (electron/connect) is refused while containment is enabled, because it cannot be enforced on an existing browser context. - Human verification — CAPTCHA, OTP, passkey, WebAuthn and 2FA are never bypassed; the tool reports what it saw and stops.
Large outputs are compacted into a bounded preview plus a spill file instead of being pushed into the model context.
Configuration
| Key | Default | Meaning |
|---|---|---|
command |
agent-browser |
Executable to invoke. |
namespace |
— | Optional agent-browser namespace. |
executablePath |
DSH_BROWSER_EXECUTABLE_PATH |
Chromium/Chrome executable for the managed context. |
timeoutMs |
35000 |
Default per-call subprocess timeout. |
maxOutputChars |
8000 |
Inline output budget before spilling. |
maxOutputLines |
120 |
Inline line budget before spilling. |
spillDir |
~/.dsh/browser-artifacts |
Where compacted outputs are written. |
allowedDomains |
[] |
Domain allowlist for strict containment. |
registerTool |
true |
Register the agent_browser tool. |
License
MIT
链接
同类插件
Tencent/BrowserSkill#dsh-plugin-browserskill★ 9785
BrowserSkill 的 DeepSeek Harness 浏览器自动化桥接插件,通过原生浏览器工具控制可见的 Chrome 和 Edge Agent Window,支持可访问性与 VOM 页面观察、截图、隔离的多会话控制和 Web UI 实时观察浮层。
omdsh-dev/dsh-browser#packages/browser/bridge-browser★ 941
Chrome 侧边栏扩展,让 DSH 直接操控你的浏览器,无需视觉能力。
liustack/modsearch★ 875
纯文本 agent 的联网搜索桥:搜索网页与 X,返回结构化 JSON 证据(search/fetch/引用)。
DDDMUC/dsh-free-search★ 742
DSH 免费搜索插件:7 个引擎(DuckDuckGo/Bing/SearXNG 免费 + Exa/Perplexity/DeepSeek 付费)、自动回退、设置页 UI(API key 输入 + 官网链接)、web_fetch、引擎测试工具。
Fisfzy/dsh-ego-browser★ 358
用 35 个结构化工具从 DeepSeek Harness 驱动真实 Chrome/Chromium:导航、语义快照、点击、表单、JavaScript/CDP、截图、下载与标签页管理;右侧边栏实时镜像页面,并支持鼠标键盘直接接管。插件自带受管 CDP 运行时,跨调用保留登录状态,并可通过配套 Chrome 扩展从日常浏览器导入 cookie。
wqty123/dsh-browser★ 154
共享真实浏览器:用户可观看并随时接管的原生 Electron 窗口,agent 通过 CDP 驱动,内置 20 个 browser_* 工具(打开/快照/执行/填表/截图/下载/登录态);任务级会话隔离、登录态持久化、人机验证识别,纯 `dsh web` 无需桌面外壳即可自托管。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。