精选
为什么选中它
待人工精选——以下事实来自源码仓库。
它能做什么
Zero-spawn CDP browser control plugin for DeepSeek Harness: screenshots, pixel assertions, page JS — no vision model, no per-use approval
适合谁
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
风险提示
- 未发现明显风险信号;安装前仍建议查看源码。
Zero-spawn CDP browser control plugin for DeepSeek Harness: screenshots, pixel assertions, page JS — no vision model, no per-use approval
待人工精选——以下事实来自源码仓库。
Zero-spawn CDP browser control plugin for DeepSeek Harness: screenshots, pixel assertions, page JS — no vision model, no per-use approval
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
dsh plugin --profile web add github:zaiwenJ/dsh-cdp-browser 作者没有声明支持的平台。
fetch + global WebSocket (Node ≥ 22) + zlib PNG decode. No child_process, no npm dependencies, no per-use approval. ## Why zero-spawn Plugins that spawn an engine and pipe its stdio (e.g. modlens) collide with the harness sandbox's pipe ban (EPERM/EINVAL) on every call. Connecting to a browser the user started themselves is plain network I/O — allowed in confined mode. The one manual step (launching the browser) happens outside the harness, so the model never needs approval again for visual checks. ## Setup (once) 1. Install into the profile (done via dsh plugin --profile web add file:<path>). 2. Start your browser with CDP (the provided edge-debug.cmd does this): msedge.exe --remote-debugging-port=9222 --remote-allow-origins=* --user-data-dir=<dir> <url> 3. Restart the Web GUI. The cdp_* tools appear in the next session. ## Tools | Tool | What it does | | --- | --- | | cdp_status | List tabs/targets of the CDP browser + browser version | | cdp_open | Open (or reuse) a tab for a url; returns target id | | cdp_eval | Evaluate JS in a page (awaitPromise, returnByValue) | | cdp_shot | Navigate + PNG screenshot, saved to an absolute path | | cdp_assert | Scripted interaction + deterministic checks (pixel / css / dom / js) with a pass/fail report | ## cdp_assert check shapes js checks: [ { type: 'pixel', x: 0.5, y: 0.96, color: '#245edb', tolerance: 16 }, // relative coords 0..1 or absolute px { type: 'css', selector: '#taskbar', property: 'background-color', equals: 'rgb(36, 94, 219)' }, { type: 'css', selector: '.xp-window', property: 'border-radius', matches: '^\\d+px' }, { type: 'dom', selector: '.xp-desk-icon', text: 'My Computer' }, { type: 'js', expression: 'window.__XP.selfTest()', equals: { ok: true } }, ] // every check accepts click: '#start-btn' | { selector } | { x, y } and waitMs ## Development bash node plugins/dsh-cdp-browser/test/e2e.mjs # needs dev server + CDP Edge, starts nothing Determinism notes (learned from the XP app's first plugin e2e): - Reload the page per test run. A long-lived tab accumulates state across scripted sweeps (windows, dialogs, menus) and can wedge openApp; a fresh navigate + skipBoot per suite is deterministic. probe-apps.mjs bisects per-app hangs when an app regresses. - Synthetic clicks toggle state. el.click() runs the real handlers — clicking a toggle twice flips it twice. One click per assertion. - Gradient surfaces need stop-aware sampling. Sample where a gradient stop dominates (flat zones or edges), not mid-gradient blends, or use tolerance-aware nearColor against computed-style values. The package exposes ./cdp (targets, openTarget, withPage, Cdp, decodePng, samplePixel, nearColor, runChecks, savePng) for reuse outside the harness.不看 Star,人工一条条挑的。
把 DSH 的 settings.yaml 做成可视化看板:所有已注册的 settings namespace——包括官方界面从未覆盖的第三方插件配置——都渲染成可编辑表单。项目还早,但方向很对:告别手改 YAML。
给 DSH 的 DIY 轨迹可视化:把 agent 的计划与执行画成图,不用翻原始日志也能看清它在干嘛。项目还早,但补上了「一眼看懂 agent 在做什么」这个真实缺口。
从 Claude Code / Codex 把活派给 DSH:在宿主内拉起带分级预设的 DSH agent 会话,看原生子代理进度,还能借它的多模态桥给纯文本的 DSH 补上视觉和生图。编排型插件,把 DSH 变成其他编码 agent 的后端。