Commit Graph

310 Commits

Author SHA1 Message Date
yu
b18d5b1f0b docs: bun 1.4.4 本机冒烟通过(engine 37/37, exceljs/pdf 无差异),R6 部分缓解 2026-11-06 11:40:36 +08:00
yu
d99be8f4ab docs: ADR-R2 补记 A++ 检查点协议(两侧改动清单+落地节奏);标定阶段1已完成项 2026-11-06 11:36:10 +08:00
yu
1f804971f4 feat(engine): 补交 engine.execute 实现(A1 漏加文件) 2026-11-06 11:09:46 +08:00
yu
7fa1c4038c docs: 补记工作日志(迁移阶段1四项) 2026-11-06 11:09:14 +08:00
yu
9bb5a44b95 chore: rpa-cli 显式注册+engine.execute;V2 现状表同步阶段1修复状态 2026-11-06 11:09:12 +08:00
yu
5e8fc9686f fix(catalog): 修复重生成遗留的三类数据回归(迁移阶段1-T4)
- 昨日重生成用的对面旧版源数据缺 select 选项:从重生成前快照收割 782 个
  select/radio 字段的 options 进 overrides(含默认值落在选项内的校验)
- 移除实现不读的假字段:Excel_Cs_InsertColumnV3/InsertRowV3 的 direction
- 默认值修复:Time 系列 offset_unit_num 改数字 0(实现按 num 读取)、
  Mail_DoGetMailMessage_v2:attachment 恢复旧选项、Window_SizeWindow_v1:window_size
  恢复 text widget、Mobile_TouchSlideV1 无实现清空默认值
- app-system-tests 期望更新:12 号锁屏流程因假必填清理不再阻塞(有意变更)
- catalog-properties 13 项 + app-system 全过
2026-11-06 10:53:56 +08:00
yu
1a20dd72d1 feat: 视觉能力去 Electron 化,经 HostBridge.screen 注入(迁移阶段1-A9)
- HostBridge 新增可选 screen 服务(listDisplays/primaryDisplay/dipToScreenPoint/
  displayMatching/captureDisplay),vision 3 处、cv-vision 2 处动态 import(electron)
  全部改为 requireScreenService();未注入时抛稳定的 host_unavailable
- demo 宿主 src/main/index.ts 用 desktopCapturer/screen 实现 screen 服务
- check-deps.mjs 升级:新增动态 import()/require() 扫描(旧正则实测 0 命中的盲区),
  合成用例验证命中,升级后真实源码 0 违规
- 包依赖闭包:补声明 @cantoo/pdf-lib、@napi-rs/canvas、pdfjs-dist
- cv-vision 测试从 vi.mock(electron) 改为宿主桥注入,11/11 通过
2026-11-06 10:53:42 +08:00
yu
1da00827ac feat(engine): createEngine 注入参数 + 消除模块级 driver 捕获(迁移阶段1-A1)
- createEngine(options) 支持 driver 注入,新增 engine.setDriver;
  缺省保持按平台自动选择的行为
- desktop/common-final/system-extended/window-extended 四文件模块加载时
  捕获 defaultEngine.driver 改为惰性 getDriver():非 win32 import 不再抛错
  (此前 darwin 上 import 即炸),调用时才触发 platform_unsupported
- engine-driver.test 补注入/隔离/后置替换 4 例
2026-11-06 10:20:29 +08:00
yu
9b76dc6987 feat(engine): 取消贯通/超时真中止/重试门控/图校验(迁移阶段1-A3)
- 节点尝试级 AbortController:run 取消与节点超时汇聚到同一信号,
  handler 收到的 ctx.signal 即尝试信号,其内部 sleep/HTTP/子进程可被真正中止
- 超时中止底层后 handler 先抛 cancelled 的竞态归一为 timeout
- executeNode 取消映射 NodeState=cancelled:不适用 skipOnError、不进异常分支
- 重试门控:CapabilityMeta.idempotent===false 时无视 retryCount(防重复副作用)
- 新增 validateFlowGraph:重复ID/悬空边/自环/顶层环/孤儿节点/不可达节点,
  阻断性错误在 runFlow 内统一收口为 validation_error
- 新增 11 项测试;既有 error-route/integration 回归通过
2026-11-06 10:13:38 +08:00
yu
d972a18bda docs: V2 拍板 ADR-R2(方案A+两补丁),6 项 ADR 全部闭环 2026-11-06 10:01:51 +08:00
yu
b14ad0b89b docs: V2 拍板 R1/R4/R5,R2 留评审并备好 A/B 对比与待答问题清单 2026-11-06 09:52:11 +08:00
yu
b4aaba4dbe docs: V2 拍板 ADR-R3(C#桌面执行路线)与ADR-R6(按能力域拆分部署) 2026-11-06 09:43:46 +08:00
yu
93b79366f7 docs: 补记工作日志(迁入指南 V2 修订) 2026-11-06 09:09:47 +08:00
yu
7f5ef2f5df docs: 收录 RPA 项目技术审查与集成实施总方案(V2 修订的上游输入) 2026-11-06 09:09:46 +08:00
yu
a8f75c6a55 docs: 迁入指南 V2(基于双侧真实源码核查)与差异清单
- V2 核心:对面底座巨变(7 契约包 5 个已实现、windows-runner C# observe-only、
  browser-plugin 已接 Playwright),迁入本质从'填契约'变'接底座+让路'
- RPA 侧 24 项事实清单(已修/未修分明):createEngine 仍无注入参数、Registry 全局、
  超时不中止底层、5 处动态 electron import、依赖缺 3 项等 P0 未解
- 逐接入点七要素详单 A1-A10、模块对应关系表、0-6 阶段实施计划、10 项风险、10 条总验收
- 新增 6 项 ADR 待确认(桌面安全模型冲突、部署拓扑为 V1 未识别的新阻塞项)
- 差异清单含审查报告 12 条修正记录(以真实源码为准)
2026-11-06 09:09:26 +08:00
yu
0fcb1ecc0e test: 真桌面冒烟测试补 win32 平台守卫 + 平台判断收拢
迁移前置项(指南五件小事 #3/#4/#5):
- 键盘/鼠标/应用系统冒烟/回归/手工加密 5 个测试文件补 skipIf(非 win32),
  Mac/Linux CI 可跑纯逻辑部分
- 新增 driver/platform.ts 平台判断唯一入口(dev-conventions 规则 4 例外白名单),
  utility-extended 两处 process.platform 散写改引 isWindows
- 能力分组核查:COM 类能力(excelCom/word/wordExtended)在 DOMAINS 已是独立分组,可整组过滤
2026-11-05 18:03:06 +08:00
yu
51a6178bfc feat: 驱动按 process.platform 自动选择,非 win32 抛 platform_unsupported
迁移前置项(指南五件小事 #2):
- RpaEngine.driver 改惰性 getter:win32 惰性创建 WindowsDriver,其他平台访问时
  抛 RuntimeError(platform_unsupported),import 不再隐式绑定 Windows
- 错误码 platform_unsupported 登记 RUNTIME_ERROR_CODES
- engine-driver.test.ts 覆盖两条路径
2026-11-05 17:56:34 +08:00
yu
8414c4f355 feat: 平台标记单一源 PLATFORM_GROUPS + catalog 重生成 platformTag 生效
迁移前置项(指南五件小事 #1 + 第 0 步作业 #2):
- register-all.ts 新增 PLATFORM_GROUPS 单一权威表(33 域全标 win32,darwin/linux 仅类型占位)
- registerAll 逐域加载时把平台默认值落进 meta.platforms(能力显式声明优先);
  新增 buildDomainPlatformMap 供构建脚本与运行时共用同一张表
- build-catalog.mjs 删除 WIN32_GROUPS 硬编码,platformTag 从包内分组表派生(改 tsx 运行)
- 守卫测试 platform-groups.test.ts:域无缺行 / 不偷填非 win32 数据 / meta 派生一致
- catalog.json 重生成:687 个组件获得 platformTag=win32(此前从未生效)
- 源数据恢复:对面重构删了 shizai-catalog-data.js,从其历史 commit 7bc627c8 恢复到
  temp/catalog-source/(不入库)并作为回退路径
- catalog-overrides 增强 addFields 支持;把此前直接改 catalog.json 的 96 处假必填修正、
  label 修正、Screenlock 字段清理、12 个实现读取但源数据缺失的字段全部沉淀进 overrides,
  重生成后参数审计 A/B 类保持 0/0
2026-11-05 17:53:07 +08:00
yu
a7709aefbb docs: 补记工作日志(仓库完整性核查) 2026-11-05 17:31:27 +08:00
yu
dbe98947bc test: captcha 端到端测试图入库,脱离外部路径依赖
- 5 张 PIL 生成的验证码图(共 30KB)入 __fixtures__/captcha
- 测试路径从 D:/office-test2 硬编码改为 import.meta.dirname 仓库内解析
- fresh clone 后 npm test 即可跑全部 12 项(OCR 模型来自 npm 依赖)
2026-11-05 17:31:15 +08:00
yu
609c46e06f docs: 补记工作日志(模型移除与追踪审查) 2026-11-05 17:27:25 +08:00
yu
79bba4296f chore: 移除未使用的 ui-icon-detect 模型(80MB)
- webpage-element.onnx 为实测首选模型,运行时永远先命中;
  ui-icon-detect/model.onnx 仅作为老安装包兜底回退,无实际使用场景
- 删除模型目录(含无引用的 preprocessor_config.json),运行时去掉兜底候选
- 上一个提交给打包加的 ui-icon-detect 拷贝行随之移除
- 注:git 历史中该 blob 仍存在(不做历史改写),仅工作区与新 clone 不再需要下载该模型
2026-11-05 17:27:08 +08:00
yu
5a3d4cbdbd fix: 打包补拷 ui-icon-detect 模型
extraResources 此前只拷 ui-element-detect,打包后的应用缺少图标检测模型,
运行时兜底查找 resourcesPath/models/ui-icon-detect/model.onnx 会落空;
补一行与代码查找路径对齐。
2026-11-05 17:25:54 +08:00
yu
8fb3721b0f docs: 补记工作日志(项目清理) 2026-11-05 17:12:23 +08:00
yu
ec25db2207 chore: 清理历史规划文档与一次性调试脚本
- 删除 docs/ 8 份重构阶段规划文档(01~06 编号系列 + OCR 检测报告),git 历史可查
- 删除 scripts/ 4 个无引用调试脚本:spawn-test / cdp-probe / desktop-e2e / export-last-run
- README 同步:移除悬空链接,文档索引改为三份活跃文档
- 本地清理 temp/(415MB 模型选型实验产物,未入库)与根目录旧测试日志
- release/dist 打包产物按用户要求保留
2026-11-05 17:10:07 +08:00
yu
487b46420b docs: 补记工作日志(验证码专项与假必填参数清零) 2026-11-05 17:02:19 +08:00
yu
230e3c79ec docs: 平台标记单一源规则与迁移指南通俗版;补交 Word 报告流程生成脚本
- dev-conventions:平台标记收敛为注册分组表单一源,能力文件不得散写 process.platform
- rpa-core-migration-guide:重写为通俗版(现状/搬迁步骤/三端计划)
- gen-word-flow.py:Word 报告加工流程生成脚本(此前漏交)
2026-11-05 17:02:10 +08:00
yu
de6165e76e catalog: 96 个假必填参数改为选填并新增参数审计脚本
- 全量对比 catalog 字段与实现实际读取(audit-catalog-params.py),A 类假必填 74→0(96 个字段/72 组件)
- 最大族:web×31、designated_obj×23、accuracy2×3、emails×3 等
- Screenlock/ScreenUnlock 清掉无意义必填并补 label
- 隐藏参数(实现读取但目录未定义)审计为 0
2026-11-05 17:01:59 +08:00
yu
5ef797dcc0 feat: 添加算术验证码与字符验证码处理能力
新增算术验证码解析、字符清洗能力及测试文件,注册OCR_CalculationCode和OCR_CommonEnglishNumbersCode两个新能力,补充验证码处理逻辑
2026-11-05 16:48:20 +08:00
yu
902ee0cec4 File_File_Move 目标为已存在目录时自动移入该目录
此前 pathDest 被固定当作完整目标文件路径, 目标填分类目录时
rename(文件->目录)失败, fallback cp 报 ENOTDIR(cannot overwrite
directory with non-directory), 文件整理类流程无法用目录作目标。

现在目标存在且为目录时自动拼接源文件名(移入语义), 目标不存在
仍按完整文件路径处理。

附: 晨间助手全家桶测试流程生成脚本(30节点, 文件整理+记事本
键鼠+Excel加工+OCR/AI)
2026-11-05 16:05:07 +08:00
yu
b59d906161 Merge branch 'main' of http://43.140.215.244:7040/wangyukun/PRA-only-demo 2026-11-05 14:59:32 +08:00
yu
e25121660d 修复点击验证误报与相似元素列表全重复等运行时问题
- 点击可信验证增加两类生效旁证: 页面跳转/新开标签页(淘宝搜索按钮),
  点击后元素整体消失(关闭登录弹窗); 此前均被误报为"目标未收到可信点击"
  并在节点超时内反复重试, 造成"点击生效却等很久还报错"
- 相似元素列表引用增加 index 序号: 动态id泛化后各卡片选择器相同,
  46 条引用全部命中第一张卡导致抓取结果全重复;
  修复 NodeList 无 indexOf 的 TypeError 被静默吞掉导致序号从未写入
- 元素定位改为两段式: 先在当前附着页查找, 找不到才跟随前台标签页,
  避免多标签环境下被无条件切到 pages[0] 导致找错页面
- 新开标签页优先复用启动残留的 about:blank 空白页, 不再堆积空标签
- AI 能力输入识别增加 hint_word 字段(此前提示词读到的是空)
- try_catch 捕获子步骤失败时记录 warn 日志, 不再静默
- Excel 落盘遇 EBUSY(文件被打开占用)时自动另存为带时间戳的文件
- 新增 similar-list.test.ts 端到端回归(46 卡片动态 id 真实浏览器验证)
- 新增 export-last-run.js: 从运行记录导出比价 Excel
2026-11-05 14:57:33 +08:00
yu
9e12431db8 fix: notice dialog topmost - owner form pattern instead of invalid enum value
262144 (Win32 MB_TOPMOST) has no mapping in the .NET MessageBoxOptions enum, whose
only members are RightAlign/RtlReading/ServiceNotification etc., so PowerShell
rejected it: "cannot convert 262144 to MessageBoxOptions" (second failure of the
topmost attempt). Correct documented way is passing a TopMost invisible owner
form as the first argument of MessageBox.Show. Wrapped in try/catch that falls
back to a plain Show, so the dialog can no longer fail the node even if the
owner pattern misbehaves on some machine.
2026-11-05 13:48:49 +08:00
yu
124f11bd6b fix: Dialog_Notice/MsgBox MessageBox options arg - invalid HelpButton value
Previous topmost attempt passed 'HelpButton' in the MessageBoxOptions position of
MessageBox::Show, so PowerShell failed at runtime with "cannot convert value
HelpButton to type System.Windows.Forms.MessageBoxOptions" (reproduced in flow run:
notice node failed at char 196). Now passes the documented MB_TOPMOST flag
(MessageBoxOptions)262144 as the 6th argument, keeping the six-argument overload
(OK / Information / Button1 / topmost).
2026-11-05 13:43:44 +08:00
yu
0db3e59f75 fix: File_DecompressFile misleading "ADM-ZIP: Invalid filename" for missing archive
adm-zip throws "ADM-ZIP: Invalid filename" both for corrupt entries AND when the
archive file simply does not exist, which sent us chasing phantom filename issues.
Now the handler checks file existence first and reports "压缩包不存在:<path>" with a
recommendation pointing out that File_CompressFile appends .zip to the full source
name (a.txt -> a.txt.zip) and that the compress node's output variable should be
used to chain the real artifact path.
2026-11-05 13:40:29 +08:00
yu
624d13f2ef fix: StrUtil_Replace enum mapping - search select value was treated as literal text
Catalog contract: search is a select ("0"=content / "1"=digits / "2"=phone / "3"=email
/ "4"=ID card / "5"=custom regex) with the target in Config. Old implementation used
first(args, ["search","Config"]) so the enum value "0" was split on as literal text,
making content-replace never work (same family as W26-W33 enum mapping bugs).
Now implements all six modes with preset patterns, regex mode guarded by try/catch,
and falls back to legacy literal behavior when Config is empty.
2026-11-05 13:22:43 +08:00
yu
47b7a43be2 Merge branch 'main' of http://43.140.215.244:7040/wangyukun/PRA-only-demo 2026-11-05 13:04:49 +08:00
yu
36b268f74c 运行时元素操作跟随前台标签页\n\n- 点搜索/按钮常开新标签页, 此前运行时元素操作仍附着旧标签页,\n 导致新页上的拾取选择器找不到元素、相似元素列表抓到空\n- evaluate 入口增加前台标签页检查(400ms 节流), 变化时 activateTab 切换附着 2026-11-05 13:01:27 +08:00
yu
21a400e172 运行前校验识别循环容器注入的迭代变量\n\n- 数组/字典循环运行时注入 item/index/value, 计数循环注入自定义索引变量\n- 校验器原先只认 flow.variables 与节点输出变量, 对循环体内引用误报未定义变量警告 2026-11-05 12:47:01 +08:00
yu
4af6bd0693 修复模板字面量吃掉正则反斜杠: \\d{6,} 改为 [0-9]{6,}
- 引导脚本为 TS 模板字面量, 编译时 \\d 被当作无效转义吞掉反斜杠,
  运行时正则退化为字面量 d{6,} 永不匹配, 动态id泛化从未真正生效
- 此前端到端验证直接注入源码原文绕过了模板编译, 故未暴露
- 改用 [0-9] 从根源规避转义问题; 已用 bundle 提取的真实运行时脚本验证通过
2026-11-05 12:24:56 +08:00
yu
3e4ded9f5f 动态id泛化阈值放宽为命中1个即泛化, 修复渐进渲染期拾取仍生成唯一id
- 浏览器刚拉起页面渐进渲染时仅 1 张卡, 原 >1 阈值不满足而回退唯一 id
- 动态数字 id 模式下命中 1 个即泛化(与原 id 等价, 零风险), 后续渲染出的同类卡也能命中
2026-11-05 11:53:26 +08:00
yu
6a27ede6d9 元素拾取强制接管残留拾取器, 修复强杀应用后拾取永远走旧逻辑
- 根因: 应用被强杀时页面上残留 active 拾取器(__rpaPickerActive.active=true 永久为真),
  引导脚本防重入守卫直接 return, 之后每次拾取都由旧代码残留监听器响应, 选择器无法更新
- 引导脚本改为强制接管: 发现 active 残留先 cancelHard/cancel 并清状态再启动
- pickElement 注入前同步清理残留拾取器/宿主元素/结果变量
2026-11-05 11:41:41 +08:00
yu
20d224a46b fix: input dialog invisible - replace VB InputBox with topmost WinForms form
Root cause of second failure (120s timeout): VB InputBox has no topmost
flag and no taskbar presence, so it renders BEHIND the main window.
User never sees it, flow waits until node timeout (120000ms).

Fix:
- Dialog_InputBox now builds a WinForms form with TopMost=true,
  ShowInTaskbar=true, CenterScreen, OK/Cancel buttons
- MessageBox notice adds MB_TOPMOST via options param
- Flow updated: 3 sequential InputBox nodes replaced by ONE
  Dialog_GetConfigV7 form (topmost BrowserWindow via host bridge),
  3 fields filled in a single window, wait_time=10min
- Flow node timeout raised to 660s to exceed the 600s PS-level wait
- Fixed latent bug: Time_WeekDay node had empty outputVar, so
  the "星期几" variable never existed
2026-11-05 11:27:01 +08:00
yu
cf1e560802 元素拾取泛化动态记录id: 长数字结尾唯一id自动转为前缀匹配
- 淘宝等站点卡片根节点 id 为动态记录 id(如 item_id_1087512368188), 原样生成导致选择器只命中一张卡
- stable() 检测 id 以长数字(6位以上)结尾时, 若 [id^=前缀] 命中多个元素则优先采用, 使选择器覆盖所有同类卡片
- 拾取器与元素引用两处 cssPath 同步修改
2026-11-05 11:15:36 +08:00
yu
309898045c 元素拾取悬停0.3秒自动钻入子元素, 无需先锁定再调层级
- 进入新交互区域先吸附交互元素, 悬停300ms后自动钻入光标最深处
- 钻入后跟随光标在卡片内部移动; PageUp/PageDown 保留为手动上下调层(未锁定时直接锁定)
2026-11-05 11:11:03 +08:00
yu
15fcf66972 fix: dialog components killed at 30s, pass proper timeout to powershell
Root cause: Dialog_InputBox and other blocking dialogs wait for user
input, but powershell() default timeout 30000ms kills the still-waiting
dialog process, reporting generic "Command failed" (reproduced: run
failed at 30.08s).

Fix:
- InputBox/Notice default wait 600s, adjustable via wait_time arg
- File dialogs (OpenFile/OpenFiles/SaveFile) wait up to 30min
- InputBox timeout reports dialog_timeout with clear guidance instead
  of misleading command failure
2026-11-05 11:08:41 +08:00
yu
150d7ce9c9 元素拾取支持钻入子元素: PageDown 沿锁定元素向下进入卡片内部子节点
- 悬停时记录光标下最深元素, 锁定时把锁定元素到最深元素的子级路径并入调整链
- 场景: 淘宝搜索结果整卡为链接, 标题/价格是链接子元素, 此前只能沿祖先向上调层级选不到
2026-11-05 10:57:24 +08:00
yu
91d998b2ea 元素拾取跟随前台标签页: 点搜索等开新标签页后附着目标自动切换
- pickElement 轮询前经 /json/list 检查前台标签页, 变化时 activateTab 切换附着并重新注册/注入拾取脚本
- 结束时对所有已附着标签页清理拾取残留, 并移除全部 addScriptToEvaluateOnNewDocument 注入
2026-11-05 10:12:59 +08:00
yu
5250bf1e35 元素拾取支持页面跳转后继续拾取; 恢复 ws 根依赖声明修复启动崩溃
- pickElement 重构: 拾取脚本经 Page.addScriptToEvaluateOnNewDocument 随新文档自动重注入,
  主进程轮询 __rpaPickResult, 用户拾取期间可翻页/搜索/过滑块, 页面跳转不再使拾取失效
- 恢复 package.json ws 根依赖与 electron.vite.config include:[ws]
  (合并时被覆盖导致 dev 启动报 bufferutil 解析错误)
2026-11-05 10:07:48 +08:00
yu
2ae1010f67 Merge branch 'main' of http://43.140.215.244:7040/wangyukun/PRA-only-demo 2026-11-04 18:26:06 +08:00