前言¶
DeepSeek Harness (DSH) 的核心理念是「一切皆插件」。当智能体需要直接与网页交互、调试前端逻辑或验证真实环境时,仅依靠模拟数据往往无法满足需求。dsh-chrome-devtools 插件解决了这个问题,它将 Chrome DevTools MCP 安装为 Harness 的浏览器提供者,让 Agent 操作一个真实的 Chrome 窗口。
插件定位¶
- 维护者:DevTarlow
- 许可证:MIT
- 核心价值:为 DeepSeek Harness Agent 提供真实的 Chrome 浏览器驱动、截图、控制台读取、性能追踪及 Lighthouse 审计能力。
核心功能¶
该插件基于 Chrome DevTools MCP,提供以下能力:
1. 打开页面、读取内容、执行点击和输入操作。
2. 截取页面截图。
3. 读取控制台消息和网络请求。
4. 运行 JavaScript 脚本。
5. 记录性能追踪。
6. 运行 Lighthouse 审计。
安装与启用¶
- 在 Harness 左侧边栏打开 Plugins。
- 点击 Install。
- 粘贴仓库地址:
https://github.com/DevTarlow/dsh-chrome-devtools
- 完成安装后刷新页面。
- 开始新对话。插件会在对话开始时连接浏览器;已打开的旧对话在安装后不会自动获得浏览器。
典型用法¶
Agent 可以通过自然语言执行以下操作:
- “Open example.com, screenshot it, and tell me the console errors.”
- “Go to my app on localhost:3000, sign up with a test account, and tell me whether the confirmation step works.”
- “Record a performance trace on localhost:3000 and explain the largest contentful paint.”
- “Run a Lighthouse audit on localhost:3000 and tell me what fails accessibility.”
- “Screenshot that page at 375 pixels wide so I can check the mobile layout.”
- “Click the thing that is broken and tell me exactly what the network request returns.”
- “Open example.com and tell me its title and any console errors.”
限制与注意事项¶
- 单一插件:一个 Harness 只能安装一个浏览器插件,无法同时安装 Playwright 或 Stagehand。
- 浏览器范围:仅支持 Chromium。Firefox 和 WebKit 不提供支持。
- 对话绑定:启动的浏览器归属于开启该对话的会话。关闭会话会关闭浏览器;重新加载或恢复会话会重置浏览器状态(不保留 Cookie 或页面)。
- 环境要求:需要 Google Chrome(或 Chrome for Testing)的当前稳定版本,以及桌面会话(浏览器需要打开窗口)。在服务器或 CI 环境中必须使用无头模式。
- 沙箱问题:在容器、WSL 或较新的 Ubuntu 版本中,常会遇到 Chrome 沙箱权限问题。
- 文件系统限制:截图保存到文件受到限制,仅允许写入操作系统的临时目录。
- 不可逆操作:取消调用无法撤销已发生的导航或点击操作。
- 工具定义来源:工具定义来自插件内部固定的
chrome-devtools-mcp版本,而非 Harness 自身。
链接¶
- GitHub 仓库:https://github.com/DevTarlow/dsh-chrome-devtools
- 社区目录:https://www.skillhub.cn/plugins/DevTarlow/dsh-chrome-devtools