xiayuhkust/dsh-visual-probe ↗★ 0
dsh-plugin-browser-probe
Visual-verification tools for DeepSeek Harness: flicker_detect, visual_diff, and contrast_probe turn UI checks into numbers, so a text-only agent can verify flicker, regressions, and WCAG contrast by reading metrics instead of seeing the page.
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-plugin-browser-probe
English | 中文
给 DeepSeek Harness(dsh)的视觉验收工具。它跑一个无头浏览器,把三类 UI 检查转成数值,让纯文本 agent 靠读指标验证,而不必"看"页面:
| 工具 | 回答的问题 | 返回 |
|---|---|---|
flicker_detect | 页面闪不闪? | 有多少帧对在变、变多少 |
visual_diff | 我的改动动到了不该动的地方吗? | 差异多少、在哪个屏幕分区 |
contrast_probe | 有没有文字太浅看不清? | 每个文字元素的 WCAG 对比度、哪些不达标 |
每个都返回数据而非图片——agent 读数值自己判断。基于 Playwright + pngjs。
运行环境:dsh 0.1.x 开发者预览,接口可能随 dsh 迭代变动。
安装
依赖重(Playwright 会下载浏览器),故独立成一个包。
dsh plugin --profile web add -w dsh-plugin-browser-probe
npx playwright install chromium-headless-shell # 一次性下载浏览器
在 profile 的 cordis.patch.yml 挂载(用 - insert: 插入新行,不是裸 - id:):
- insert:
- id: browser-probe
name: dsh-plugin-browser-probe
config:
frames: 10 # flicker:采集帧数,默认 10
intervalMs: 150 # flicker:帧间隔毫秒,默认 150
settleMs: 400 # 加载后、截帧前的等待,默认 400
重启 dsh web 生效。dsh --profile web --dump-config 可确认插件行已在。
工具
flicker_detect
采集页面连续帧,量帧间变化的像素比例。判定为 FLICKER 需变化反复出现(≥2 个帧对超阈)——单个变化帧对是一次性的加载过渡,不算闪烁。
| 参数 | 说明 |
|---|---|
url | 要检查的页面(file:// 或 http://)。 |
frames | 采集帧数。默认 10。 |
intervalMs | 帧间隔毫秒。默认 150。 |
settleMs | 加载后、首帧前的等待。默认 400。 |