dengpeihua/dsh-browser-use ↗★ 2
dsh-browser-plugin
Native DeepSeek Harness browser-agent plugin with Session-isolated Chromium, CDP, and DOM tools 适合需要原生、会话隔离的浏览器自动化控制任务,需Node.js环境。
Other repositories with this package name
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:dengpeihua/dsh-browser-useREADME
Read the full README ↗快速配置(可选)
默认配置可以直接使用。在本地打包前,可以修改本仓库的 cordis.patch.yml。安装完成后,把下面的条目合并进 $DSH_HOME/profiles/web/cordis.patch.yml(DSH_HOME 默认是 ~/.dsh)已有的 YAML 列表;不要覆盖文件中的其他 profile 条目。该层会覆盖 bundle 默认值。
DSH 的 profile patch 会替换目标条目的整个 config,因此覆盖时要重述需要保留的字段:
- id: dsh-browser
config:
headless: true
noSandbox: false
approvalMode: mutating
viewportWidth: 1280
viewportHeight: 900
toolTimeoutMs: 120000
maxWaitSeconds: 300
maxContextDeltas: 8
scriptMaxLines: 100
scriptMaxBytes: 8192
修改后重启 DSH,并用 npx @deepseek-ai/dsh@0.1.2-alpha.2 --profile web --dump-config 检查最终配置。
| 需求 | 配置项 | 默认值 | 常用改法 |
|---|---|---|---|
| 后台无界面运行 | headless | false | 改为 true |
| 指定浏览器程序 | chromePath | 自动探测 | 填入 Chrome/Chromium 绝对路径 |
| 调整操作审批 | approvalMode | mutating | off、mutating 或 always |
| 调整浏览器窗口 | viewportWidth / viewportHeight | 1280 / 900 | 改为所需正整数 |
| 限制单次工具时长 | toolTimeoutMs | 120000 | 填写正整数毫秒数 |
| 限制等待时长 | maxWaitSeconds | 300 | 填写正整数秒数 |
| 限制 DOM 增量链长 | maxContextDeltas | 8 | 正整数;达到后生成完整检查点 |
| 限制脚本可见输出 | scriptMaxLines / scriptMaxBytes | 100 / 8192 | 改为所需正整数 |
| 保存完整脚本结果 | outputDir | 系统临时目录 | 填入目标目录绝对路径 |
只有受控容器确有兼容性需要时才应设置 noSandbox: true。
使用示例
安装后,直接在 DSH 中使用自然语言描述任务:
信息提取
打开 Hugging Face 热门模型页面,整理排名前三的模型名称、机构、参数规模和下载量,并给出来源页面。
表单填写
打开联系表单,填写我提供的字段,检查必填项和格式校验,但不要最终提交。
多步骤调研
调查一篇论文的官方代码仓库、依赖、最近维护状态和常见复现问题,最后判断复现难度。
涉及登录、购买、发布、删除或最终提交等高风险动作时,应明确限制任务边界并保留 approval。
首次使用或依赖变化后安装
npm install
Quick configuration (optional)
The defaults work out of the box. Before packing locally, you can edit this repository's cordis.patch.yml. After installation, merge the entry below into the existing YAML list in $DSH_HOME/profiles/web/cordis.patch.yml (DSH_HOME defaults to ~/.dsh); do not overwrite unrelated profile entries. This user layer overrides the bundle defaults.
A DSH profile patch replaces the matched entry's entire config, so restate every field that must be retained:
- id: dsh-browser
config:
headless: true
noSandbox: false
approvalMode: mutating
viewportWidth: 1280
viewportHeight: 900
toolTimeoutMs: 120000
maxWaitSeconds: 300
maxContextDeltas: 8
scriptMaxLines: 100
scriptMaxBytes: 8192
Restart DSH after editing, then inspect the effective config with npx @deepseek-ai/dsh@0.1.2-alpha.2 --profile web --dump-config.
| Need | Setting | Default | Common change |
|---|---|---|---|
| Run without a visible window | headless | false | Set to true |
| Select a browser executable | chromePath | Auto-detect | Set an absolute Chrome/Chromium path |
| Change approval behavior | approvalMode | mutating | off, mutating, or always |
| Resize the viewport | viewportWidth / viewportHeight | 1280 / 900 | Set positive integers |
| Limit one tool call | toolTimeoutMs | 120000 | Set positive milliseconds |
| Limit explicit waits | maxWaitSeconds | 300 | Set positive seconds |
| Bound DOM delta chains | maxContextDeltas | 8 | Positive integer; then produce a full checkpoint |
| Bound visible script output | scriptMaxLines / scriptMaxBytes | 100 / 8192 | Set positive integers |
| Store complete script results | outputDir | System temp directory | Set an absolute directory path |
Set noSandbox: true only when a controlled container has a demonstrated compatibility requirement.
Usage examples
After installation, describe the task in natural language:
Information extraction
Open the Hugging Face trending models page, collect the top three model names, organizations, parameter counts, and download counts, and include the source page.
Form filling
Open the contact form, fill the fields I provide, and check required-field and format validation, but do not submit it.
Multi-step research
Investigate a paper's official code repository, dependencies, maintenance status, and common reproduction issues, then rate its reproduction difficulty.
For login, purchase, publish, delete, or final-submit operations, keep approval enabled and state the task boundary explicitly.