shujiTech/dsh-plugin-wepre ↗★ 1
dsh-plugin-wepre
DeepSeek Harness plugin: publish single-screen content cards to WePre Next straight from a dsh agent session
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:shujiTech/dsh-plugin-wepre说明文档
阅读完整 README ↗dsh-plugin-wepre
English | 中文
DeepSeek Harness(dsh)插件:让 agent 在对话中把单屏内容卡片直接发布到 WePre Next —— 一个在 AI 生成的等待时间向用户推送单屏离线卡片的平台。
装上这个插件后,一次对话就能走完「写卡片 → 发布上线」的全流程:
你: 做一张番茄钟卡片,发到 WePre
agent:
agent: 质检门禁拦下了——390x600 视口 OVERFLOW_Y,我来修……
agent: 已发布。contentId=cnt_xxx,版本 v1(质检:通过)
安装
dsh plugin --profile web add dsh-plugin-wepre
验证配置层已组合,然后启动:
dsh --profile web --dump-config # 能看到 "# == dsh-plugin-wepre" 层
dsh --profile web
插件是纯 ESM JavaScript、无构建步骤,也支持直接从 git 安装:
dsh plugin --profile web add github:shujiTech/dsh-plugin-wepre
agent 获得的能力
注册到 ctx.tools 的五个模型可见工具:
| 工具 | 作用 |
|---|---|
wepre_request_code | 发送登录验证码(短信 / 邮箱) |
wepre_login | 用验证码登录,会话 Cookie 持久化到本机 |
wepre_whoami | 查询当前登录状态 |
wepre_publish | 把 index.html / .zip 卡片通过服务端质检门禁发布上线 |
wepre_qa_report | 查询某个内容的完整质检报告(各视口 issue) |
工具描述里内置了 WePre 的内容规则(单屏布局、禁网络请求、禁外部资源、wepre-next:execute 消息约定)和质检修复闭环:门禁返回 QA_GATE_FAILED 时,agent 会逐条阅读结构化的分视口 issue、修复卡片、带同一个 contentId 重新发布——全程无需人工介入。
鉴权
wepre_publish / wepre_qa_report 按以下顺序取凭证:
- 配置项
token—— WePre 发布页签发的短时发布令牌 WEPRE_PUBLISH_TOKEN环境变量- 持久化登录会话 —— 由
wepre_login创建,写入sessionFile(默认~/.dsh/wepre-session.json,权限 0600)
交互使用直接让 agent 登录即可:「用 13800138000 登录 WePre」——它会发验证码、向你要码、存好会话。CI / headless 场景(dsh --profile headless "…")请配置 token。
配置
在 profile 的 cordis.patch.yml 中覆盖插件行(patch 会该行的 config,保留的键要全部重写):