VincentJiang06/dsh-mp-automator
微信小程序自动化测试 dsh 插件 — 基于选择器寻址的操作、构建新鲜度检查门、面向纯文本模型的几何优先断言、视觉路径上的真实截图。
Project Overview项目介绍
dsh-mp-automator is a DeepSeek Harness (DSH) plugin purpose-built for automated testing of WeChat Mini Programs running inside WeChat DevTools. It exposes eight mp_* tools that let any DSH agent read pages, tap elements by selector, drive navigation, take screenshots, inspect the console, and run an escape-hatch eval in the AppService context. Instead of relying on prompt-level instructions, the plugin encodes discipline directly inside the tools: a freshness gate (G1) that refuses stale build artifacts, selector-addressed actions that never reuse a uid, byte-clamped results, sha256-deduplicated screenshots, and a per-session image budget. Installation is a two-step flow: first npm i -g vince-mp-cli to provide the JSON-contract CLI that owns the DevTools automation port, then dsh plugin --profile web add dsh-mp-automator to mount the plugin into a DSH profile.
The target audience is Mini Program QA engineers, frontend regression testers, and teams wiring DSH agents to UI automation. A typical session looks like the agent calling mp_query to confirm a button is fully-visible relative to the current scroll window, then mp_act to tap it, then mp_screenshot plus mp_console to verify the new route rendered without errors. The companion skill at skill/mp-testing/SKILL.md layers judgment on top of the tools by teaching the inspect→act→verify cadence, selector discipline, and honest eval rules, while the plugin enforces structural guarantees such as fail-closed parsing (ok === true is the only success), explicit <imageStatus> reporting so a text-only model cannot pretend to have seen an image, and remedies attached to every CLI error code.
Runtime dependencies are strict: Node 20 or above, macOS, DSH ≥ 0.1.0-rc.5, WeChat DevTools with the service port enabled under Settings → Security, and the bundled vince-mp CLI pinned to ≥0.2.0 and <0.3.0 — any out-of-window version triggers a NOT_INSTALLED-style refusal with upgrade guidance. Configuration is injected via cordis.patch.yml under the mp-automator block and accepts five keys: freshnessMode (block|warn|off, default block), enableEval (true/false, default true), imageBudget (clamped non-negative integer, default 3 per session), screenshotDir (constrained to the project tree, default captures), and binPath (absolute override when the CLI is not on PATH). The repository is MIT-licensed and ships 51/51 passing tests, but first-run users must launch DSH from the Mini Program project directory so tools can resolve project.config.json from the session's working directory.
dsh-mp-automator 是一个面向 DeepSeek Harness (dsh) 的微信小程序自动化测试原生扩展。它通过内置的八个 mp_* 工具集,让 dsh 智能体在真实运行的微信开发者工具中读取页面、点击元素、截图并查看控制台,工具内部固化了"选择器寻址、新鲜度门、字节预算、图片预算"等纪律,而非依赖提示词约束。安装时需全局安装 vince-mp-cli,再通过 dsh plugin 命令将 dsh-mp-automator 注入 dsh profile,之后在含有 project.config.json 的小程序目录里启动 dsh 会话即可自然语言下达测试任务。
该插件专为小程序 QA、前端回归测试以及 dsh 驱动 UI 自动化的开发者设计。典型流程是:智能体先以 mp_query 确认目标元素可见性,再用 mp_act 执行 tap、input、nav、scan 等动作,最后用 mp_screenshot 与 mp_console 验证视觉与控制台状态,全程拒绝过期的 uid 与陈旧的编译产物,并对每张截图输出几何事实表以便纯文本模型也能解析。它附带的 skill/mp-testing/SKILL.md 提供 inspect→act→verify 节奏与断言配方,是工具之上的判断力层。
运行时依赖 macOS、Node ≥ 20、开启服务端口的微信开发者工具,以及 ≥0.1.0-rc.5 版本的 dsh;底层 CLI vince-mp 必须落在 ≥0.2.0 与 <0.3.0 的版本窗口,否则工具会以错误码拒绝并附升级指引。配置通过 cordis.patch.yml 注入,支持 freshnessMode、enableEval、imageBudget、screenshotDir 与 binPath 五项键值;许可证为 MIT,配套技能可不装,但建议加装以保障测试质量,首次运行前必须先在小程序项目根目录打开 dsh 会话。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-mp-automator(VincentJiang06/dsh-mp-automator)
仓库:https://github.com/VincentJiang06/dsh-mp-automator
本站详情页:https://www.yhbd.top/plugins/vincentjiang06-dsh-mp-automator/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-16 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-mp-automator
把 VincentJiang06/dsh-mp-automator 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-mp-automator
微信小程序自动化测试 · DeepSeek Harness (dsh) 插件 WeChat Mini Program automated testing for dsh agents
让 dsh 智能体驱动微信开发者工具里真实运行的小程序:读页面、点元素、截图、看控制台。 你只需要在小程序项目目录里开一个 dsh 会话,然后用自然语言下测试任务:
你:测试首页的"立刻开始"按钮能进入扫码页 agent:(mp_query 确认按钮可见 → mp_act 点击 → 验证路由已跳转 → mp_console 确认无报错) ✅ 按钮可见、可点、路由跳转正确、无控制台错误
Eight mp_* tools let a dsh agent drive a real Mini Program in WeChat DevTools.
The correctness discipline is built into the tools — not into prompts the
model may ignore.
目录 · Contents
- 工作原理 · How it works
- 快速开始 · Quick start
- 八个工具 · The eight tools
- 为什么可信:三种静默失败与对应的门 · Why trust it
- 截图:双路径与图片经济 · Screenshots
- 配置 · Configuration
- 配套技能 · Companion skill
- 排障 · Troubleshooting
- 设计笔记 · Design notes
1. 工作原理 · How it works
dsh agent(任意模型;视觉能力可选)
│
│ 调用 mp_* 工具 —— 纪律层:新鲜度门、选择器寻址、字节预算、图片经济
▼
dsh-mp-automator(本插件)
│
│ 驱动 vince-mp CLI —— 全 JSON 契约,首次调用协商版本 >=0.2.0 <0.3.0
▼
微信开发者工具 自动化端口
▼
你的小程序(真实运行时、真实 WXML)
分层职责 · Layering:vince-mp-cli
拥有自动化事实(DevTools 连接、元素解析、路径策略);本插件拥有面向智能体的纪律
(什么时候拒绝执行、输出多少字节、图片何时该进上下文)。The CLI owns automation
truth; this plugin owns agent-facing discipline.
2. 快速开始 · Quick start
前置 · Prerequisites:macOS · 微信开发者工具 (在 设置 → 安全设置 里开启服务端口)· Node ≥ 20 · dsh ≥ 0.1.0-rc.5
# ① 安装本插件驱动的自动化 CLI(拥有 DevTools 连接)
npm i -g vince-mp-cli
# ② 把插件装进你的 dsh profile
dsh plugin --profile web add dsh-mp-automator
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
liustack/modlens
Clarklevis1995/dsh-mobile
ZSeven-W/dsh-crew
wsz987/dsh-channels
xiaoksio/dsh-solution-explorer
pan17/dsh-wechat
siegfly/dsh-deepseek-vision