rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:wodaimnd/winpilot
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
把 winpilot CLI 注册成一个模型工具 winpilot,用于在 Windows 上驱动微信开发者工具;
同时提供一块微信小程序控制台面板(侧栏入口「小程序」),用于配置、看状态、按需截一张图。
dsh plugin --profile web add G:\AI PGRM\DSH\winpilot\dsh-plugin
或把本目录链接到 DSH 的本地插件目录(本工作区是 G:\AI PGRM\DSH\plugins\)。
{
"operation": "tap", // 必填,见下
"params": { "reference": "%2" } // 操作参数
}
返回固定形状(DSH 会按 output.schema 校验):
{ "ok": true, "exitCode": 0, "data": { ... }, "text": "已点击 %2 <button.submit> \"提交订单\"" }
render() 只把 text 交给模型,data 留给程序消费。
| operation | params |
|---|---|
start |
projectPath?, cliPath?, appid?, autoPort?, timeoutMs? |
connect |
ws? |
disconnect / status / doctor / back / reload |
— |
view |
full?, depth?, limit? |
find |
query(必填), all?, limit? |
wait |
reference(必填), timeoutMs? |
tap / read |
reference(必填) |
type |
reference, text |
scroll |
reference, direction(up/down) |
assert |
reference, expected, contains? |
state |
path?, full? |
shot |
path?, base64? |
peek |
noShot?, noData?, path?, base64? —— 一次连接取「端点 + 当前页 + 页面数据 + 一张图」,只读:不分配 %N、不写 session.json |
goto |
route(必填) |
run / wx |
js / method + args?(需要 enableJsEval: true) |
reference 接受 %3、3、"3" 三种写法。
侧栏入口「小程序」(sidebar.panellist order 32),主区 key: 'winpilot'。正面只留三块:
| 区块 | 内容 |
|---|---|
| ① 开发者工具 | 连接状态 + 启动 / 重连 / 断开 +「端口没开」的分步指引 |
| ② 项目 | 项目目录(可浏览 / 最近使用)、AppID 只读回显、%N 新鲜度 |
| ③ 截图 | 按需截一张(不自动刷新),显示宽高与页面路径 |
| ④ 高级(默认折叠) | 截图/状态目录、run/wx 开关状态、诊断与复制 |
| ⑤ 数据说明 | 存了什么、存在哪、一键清除界面偏好 |
面板是配置台,不是操作台:tap/type/scroll/assert/goto 等页面操作不在面板白名单里,
全部交给 AI 用工具执行。面板与工具共用同一个串行队列,面板刷新不会打乱模型手里的 %N。
Host 半的路由是 /api/winpilot(loopback-only、POST-only、body ≤ 256 KB、白名单);
- insert:
- id: winpilot
name: '@local/winpilot'
config:
cliPath: '' # 默认自动定位 ../bin/winpilot.js
stateDir: '' # 空 = 用 CLI 自己的目录(%LOCALAPPDATA%\winpilot)
shotsDir: '' # 空 = <状态目录>\shots
timeoutMs: 120000
autoPort: 9420
enableJsEval: false # run / wx 的总开关,默认关
cordis.patch.yml 里的 config 与 index.js 的 DEFAULTS 必须逐字一致。
不用 !!js 条件修饰开关行 —— 插件管理器启停会把行改写成 disabled: false,覆盖条件并导致安装回滚。
# 1. 从 profile 清单里去掉依赖与 bundles 条目
# C:\Users\<你>\.dsh\profiles\desktop\package.json
# - dependencies["@local/winpilot"]
# - dsh.profile.bundles 里的 "@local/winpilot"
# 2. 删掉 node_modules 下的链接:
Remove-Item "C:\Users\<你>\.dsh\profiles\desktop\node_modules\@local\winpilot" -Force
# 3. 重启 DSH 后工具与面板消失(侧栏条目、主区、路由、样式全部经 ctx.effect 回收)
插件只是把 CLI 注册成工具 + 挂一块面板,卸载不会删除 G:\AI PGRM\DSH\winpilot 本身,也不会动开发者工具。
ctx.inject(['tools']),面板块 ctx.inject(['webServer'])。
不写模块级全有列表 —— 那是「缺一个服务,整块一起消失」的闸门。**:手写 raw JSON Schema 注册工具,link:` 方式加载也不会解析失败。EPERM,文件句柄到处都能用。view 分配的 %N 是后续操作的输入,并发会互相踩踏。apply,不释放就会 tool already registered。color-mix 派生,零硬编码色值(契约测试把关)。en.json,不做双语字典。CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。