mitao-su/dsh-playwright-cli
DeepSeek Harness(DSH)宿主插件,封装了 Playwright CLI:安装浏览器、运行测试、在代理循环中打开 HTML 报告。
Project Overview项目介绍
This is a native DSH host plugin that wraps the official Playwright CLI into a collection of tools that DeepSeek Harness agents can invoke directly without manual command input. It ships with a DSH bundle manifest and is installed directly via the DSH plugin command: you can run dsh plugin --profile web add github:mitao-su/dsh-playwright-cli to add it to your web profile. Because all build artifacts are committed directly to the Git repository, no build scripts are triggered during installation, and you do not need to configure allowBuilds for it to work properly. It requires DSH version 0.1.0-rc.6 or newer, and that your target profile already has the shell executor mounted, which is standard for default DSH web and headless profiles.
This plugin is built for developers who want to integrate Playwright end-to-end testing into their DSH agent workflow. A typical agent session starts with running playwright_version to confirm that Playwright CLI is available in the current session working directory. Next, the agent runs playwright_test with specified options to run the target test suite and generate an HTML report. Finally, the agent calls playwright_show_report to get a URL or file path to the report, which the user can then open directly in their browser. All commands run in the session working directory by default, and non-zero exits are reported not treated as errors, leaving the agent to decide next steps.
This plugin is released under the open source MIT license, and has several key constraints users should note before installation and use. All commands go through the DSH shell executor sandbox, so operations like downloading browser binaries or forking worker processes may be blocked by file sandbox rules. If a command is blocked, the plugin will prompt the user to approve wider permissions and retry with the narrowest possible access that works. It also notes that you should point your working directory to a project that has a local installation of @playwright/test to avoid duplicate copy conflicts. Other caveats include avoiding paths with single quotes and that test commands cannot run concurrently.
这是一个专为DeepSeek Harness(DSH)打造的原生主机插件,将Playwright CLI封装成DSH代理可一键调用的工具集,支持探测版本、安装浏览器、运行测试、打开HTML报告,全程无需手动输入npx playwright ...命令。它仅在主机侧运行,无客户端包和Web依赖,复用DSH官方shell执行器,继承了其沙箱策略、环境变量和超时处理机制。
该插件面向需要在DSH代理工作流中集成Playwright测试的开发者,典型工作流程为:先调用playwright_version确认当前工作区Playwright CLI可用,再调用playwright_test运行指定测试用例并生成HTML报告,最后调用playwright_show_report获取报告地址,用户即可直接在浏览器打开查看。所有命令默认在会话工作区执行,非零退出仅报告结果不报错,由模型自行判断下一步操作。
该插件使用MIT许可证,要求DSH版本不低于0.1.0-rc.6,且目标配置文件已挂载shell执行器,安装可通过dsh plugin --profile web add github:mitao-su/dsh-playwright-cli命令完成,无需构建脚本,零交互安装。使用时需注意沙箱权限、双副本冲突、路径引号和并发限制等问题,符合约束即可正常调用所有工具。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-playwright-cli(mitao-su/dsh-playwright-cli)
仓库:https://github.com/mitao-su/dsh-playwright-cli
本站详情页:https://www.yhbd.top/plugins/mitao-su-dsh-playwright-cli/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-13 · 主语言 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 github:mitao-su/dsh-playwright-cli
把 mitao-su/dsh-playwright-cli 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-playwright-cli
DeepSeek Harness(DSH)host 插件:把 Playwright CLI 封装成 Agent 可一键调用的工具集 —— 探测版本、安装浏览器、跑测试、打开 HTML 报告,全程无需手敲 npx playwright ...。
- 运行面:host-only(无 client bundle,无 Web 依赖)。
- 执行缝:复用官方 shell 执行器(
ctx.shell,与bash/pwsh工具同源),因此 sandbox 策略、DSH_*环境变量、输出截断、超时/中止分类全部由组合提供。 - 分发:
lib/已提交进 Git,安装不触发任何构建脚本,零交互。
工具
| 工具 | 作用 | 底层命令 |
|---|---|---|
playwright_version |
探测目标项目里 CLI 是否可用并打印版本 | npx --no-install playwright --version |
playwright_install |
安装浏览器(默认 chromium);CLI 缺失且 autoInstallPackage 开启时先用 npm 脚手架 @playwright/test |
npx --no-install playwright install [browsers...] |
playwright_test |
运行测试套件,支持 --config/--project/--grep/--workers/--reporter/--headed/--trace/--retries/--list 等常用选项 |
npx --no-install playwright test ... |
playwright_show_report |
定位 HTML 报告:有 web server 时注册回环路由并返回 URL;否则返回文件绝对路径 | playwright-report/index.html 静态服务 |
所有命令默认在会话工作区(session cwd)中执行,非零退出报告而非报错,由模型自行判断下一步。
安装
要求:目标 profile 已挂载 shell 执行器(标准 web/headless 组合自带;DSH ≥ 0.1.0-rc.6)。
dsh plugin --profile web add github:mitao-su/dsh-playwright-cli
走 Git 分发:本仓库把构建产物
lib/提交进 Git,pnpm 不会执行任何 prepare 脚本,因此无需配置allowBuilds。安装成功后重启目标 profile(dsh plugin会自动把包加入dsh.profile.bundles)。
受限网络备选(github: 依赖需要本机 git 可访问 GitHub):也可直接用 GitHub tarball URL 安装,效果相同:
dsh plugin --profile web add https://github.com/mitao-su/dsh-playwright-cli/archive/refs/heads/main.tar.gz
本地路径/开发安装:
dsh plugin --profile web add ./dsh-playwright-cli # 或 file: 前缀
使用示例
Agent 侧一次典型会话:
playwright_version(workdir 默认会话工作区)→ 确认 CLI 就绪;playwright_test(files: ["tests/login.spec.ts"],reporter: "html")→ 跑测试,得到reportDir;playwright_show_report→ 拿到url,用户直接在浏览器打开报告。
配置(profile cordis.patch.yml 按 id: playwright-cli 整段覆盖):
- insert:
- id: playwright-cli
name: dsh-playwright-cli
config:
timeoutMs: 600000 # 每次 CLI 调用的默认超时
reportDir: playwright-report
reportRoute: /playwright-report
autoInstallPackage: true # CLI 缺失时自动 npm install -D @playwright/test
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Tencent/BrowserSkill
anbeime/skill
csyangwen/dsh-memory-evolve
Nagi-ovo/dsh-find-plugins
justlovemaki/PrismFlowAgent
YunTaiHua/illusion-agent