fix(catalog): build-catalog 白名单归一化 platformTag,清洗上游 3 条数字脏值(重派生 win32)

This commit is contained in:
yu committed 2026-11-06 13:06:54 +08:00
1 parent 4b5c73b752
commit 2bcda3a558
3 files changed
+8 -6

No files matched your search

+4 -4
View File
@@ -59,7 +59,7 @@
| 17 | HostBridge/SubflowSource 模块级单例 | 属实(ADR-R1 范畴;screen 服务已并入 HostBridge) | host-bridge.ts | | 17 | HostBridge/SubflowSource 模块级单例 | 属实(ADR-R1 范畴;screen 服务已并入 HostBridge) | host-bridge.ts |
| 18 | AI ChatCompletionOptions 无 signal 参数 | 属实(未修,P2) | ai-service.ts | | 18 | AI ChatCompletionOptions 无 signal 参数 | 属实(未修,P2) | ai-service.ts |
| 19 | 桌面拾取无 AbortSignal(热键+轮询+deadline 自有机制)| 属实(未修,P1) | desktop-pick.ts | | 19 | 桌面拾取无 AbortSignal(热键+轮询+deadline 自有机制)| 属实(未修,P1) | desktop-pick.ts |
| 20 | catalog platformTag:win32=687 / null=326 / 数字 1=3(脏值未清洗) | 部分实现(T4 待清洗) | build-catalog.mjs 对 truthy 旧值透传 | | 20 | catalog platformTag:win32=687 / null=326 / 数字 1=3(脏值未清洗) | ✅ 已清洗(2026-11-06) | build-catalog.mjs 增白名单归一化(非 win32/darwin/linux 字符串一律重派生),3 条脏值重派生为 win32,全字段 diff 仅 3 条变化 |
| 21 | catalog overrides(fields/removeFields/addFields) | 已实现(+782 个 options 收割修复重生成回归) | catalog-overrides.mjs | | 21 | catalog overrides(fields/removeFields/addFields) | 已实现(+782 个 options 收割修复重生成回归) | catalog-overrides.mjs |
| 22 | 能力 719 个 / 目录组件 1016(vendor 997 + native 16 + trigger 3)/ fields 4299 / 34 域 | 实测 | platform-groups.test.ts;catalog.json counts | | 22 | 能力 719 个 / 目录组件 1016(vendor 997 + native 16 + trigger 3)/ fields 4299 / 34 域 | 实测 | platform-groups.test.ts;catalog.json counts |
| 23 | 平台守卫测试 5 文件 + driver/platform.ts 唯一入口 | 已实现 | capabilities/*.test.ts;driver/platform.ts | | 23 | 平台守卫测试 5 文件 + driver/platform.ts 唯一入口 | 已实现 | capabilities/*.test.ts;driver/platform.ts |
@@ -95,7 +95,7 @@
| 包现状描述(719 能力、34 域、宿主桥 4 方法、Driver 五域) | **保留**(微调) | 仍准确;宿主桥维持 4 方法不变 | | 包现状描述(719 能力、34 域、宿主桥 4 方法、Driver 五域) | **保留**(微调) | 仍准确;宿主桥维持 4 方法不变 |
| "完全不依赖 Electron、check:deps 天天检查" | **过时/不实** | 5 处动态 import 逃过护栏;改为"静态依赖已清、动态残留待清",护栏必须升级 | | "完全不依赖 Electron、check:deps 天天检查" | **过时/不实** | 5 处动态 import 逃过护栏;改为"静态依赖已清、动态残留待清",护栏必须升级 |
| 第 -1 步对面契约包全部空壳的叙事 | **过时** | 按 §3 改写:5/7 已实现,"填契约"变"接底座" | | 第 -1 步对面契约包全部空壳的叙事 | **过时** | 按 §3 改写:5/7 已实现,"填契约"变"接底座" |
| 第 0 步三件作业(bun 冒烟 / catalog 重生成 / 注册方式决策) | **部分保留** | catalog 重生成已完成(platformTag 687 生效,3 个脏值待清洗);bun 冒烟仍未做;注册方式决策并入 ADR-R1 | | 第 0 步三件作业(bun 冒烟 / catalog 重生成 / 注册方式决策) | ✅ 全部完成 | catalog 重生成完成且脏值已清洗(platformTag win32=690 / null=326,数字脏值归零);bun 1.4.4 本机冒烟 37/37;注册方式决策并入 ADR-R1 |
| 第 1 步搬包(git subtree → code/backend/packages/rpa-core、改名 @agent-worker/rpa-core、demo 侧不双活) | **保留** | 双侧命名与 workspace 布局核实无误 | | 第 1 步搬包(git subtree → code/backend/packages/rpa-core、改名 @agent-worker/rpa-core、demo 侧不双活) | **保留** | 双侧命名与 workspace 布局核实无误 |
| 第 2 步 A 类契约对齐表 | **需要修改** | capability-gateway/workflow-engine 从"对照后改对面"变"按已实现接口写 adapter";新增 plugin-contract/registry/worker 三层对接 | | 第 2 步 A 类契约对齐表 | **需要修改** | capability-gateway/workflow-engine 从"对照后改对面"变"按已实现接口写 adapter";新增 plugin-contract/registry/worker 三层对接 |
| 第 2 步 B 类宿主注入表(浏览器=最大变数) | **需要修改** | 浏览器变数已收敛:对面有 Playwright 实现;变数改为"双路径取舍"(ADR-R4) | | 第 2 步 B 类宿主注入表(浏览器=最大变数) | **需要修改** | 浏览器变数已收敛:对面有 Playwright 实现;变数改为"双路径取舍"(ADR-R4) |
@@ -250,10 +250,10 @@
### A8 平台适配(Windows / Linux / macOS) ### A8 平台适配(Windows / Linux / macOS)
- **RPA 位置**:`register-all.ts` PLATFORM_GROUPS(34 域全 win32)、`driver/platform.ts`、`engine/engine.ts:47-61`、5 个 skipIf 测试;catalog 687 win32 / 326 null / **3 个数字 1 脏值**。 - **RPA 位置**:`register-all.ts` PLATFORM_GROUPS(34 域全 win32)、`driver/platform.ts`、`engine/engine.ts:47-61`、5 个 skipIf 测试;catalog **win32=690 / null=326,数字脏值已归零(2026-11-06 白名单归一化)**。
- **AE 位置**:`plugin-contract` Platform 类型;windows-runner 明确"留在宿主、不进 Linux 容器"(README)。 - **AE 位置**:`plugin-contract` Platform 类型;windows-runner 明确"留在宿主、不进 Linux 容器"(README)。
- **兼容性**:兼容(两边都是 win32-first 务实路线)。 - **兼容性**:兼容(两边都是 win32-first 务实路线)。
- **问题**:①catalog 3 个 `platformTag: 1` 脏值透传(build-catalog.mjs:246 对 truthy 不清洗);②对面 CapabilityDefinition 未见 platform 字段(**待确认**:插件清单如何表达平台限制)。 - **问题**:①~~catalog 3 个 `platformTag: 1` 脏值透传~~ **已修复(2026-11-06)**:build-catalog.mjs 白名单归一化,上游 shizai 的数字 1 重派生为 win32(三条均为包内真实现,语义正确);②对面 CapabilityDefinition 未见 platform 字段(**待确认**:插件清单如何表达平台限制)。
- **改哪侧**:RPA(清洗);对面(清单平台字段,待确认后)。 - **改哪侧**:RPA(清洗);对面(清单平台字段,待确认后)。
- **方案**:build-catalog 归一化——源值不在 `win32|darwin|linux|null` 白名单的一律重派生;三端扩展节奏沿用 V1 第三节(Linux xdotool/AT-SPI、Mac AX/CGEvent/TCC、Office 分端实现),驱动实现统一走 ADR-R3 的原生进程通道。 - **方案**:build-catalog 归一化——源值不在 `win32|darwin|linux|null` 白名单的一律重派生;三端扩展节奏沿用 V1 第三节(Linux xdotool/AT-SPI、Mac AX/CGEvent/TCC、Office 分端实现),驱动实现统一走 ADR-R3 的原生进程通道。
- **验收**:catalog 全量过 schema 校验(1016/1016);非 win32 上 Core 可加载、桌面能力明确报 platform_unsupported;Mac/Linux CI 跑纯逻辑子集。 - **验收**:catalog 全量过 schema 校验(1016/1016);非 win32 上 Core 可加载、桌面能力明确报 platform_unsupported;Mac/Linux CI 跑纯逻辑子集。
+1 -1
View File
@@ -1 +1 @@
{"schemaVersion":1,"generatedAt":"2026-11-06T02:53:08.830Z","source":{"catalog":"shizai-catalog-data.js","componentsNew":"componentsNew.json"},"counts":{"total":1016,"vendor":997,"native":16,"triggers":3,"fields":4297},"groups":[{"id":"control","label":"编排控制","icon":"branch","count":16},{"id":"trigger","label":"流程触发","icon":"trigger","count":3},{"id":"app","label":"应用与系统","icon":"app","count":60},{"id":"web","label":"网页自动化","icon":"web","count":187},{"id":"office","label":"Office 与文档","icon":"table","count":230},{"id":"data","label":"数据处理","icon":"database","count":167},{"id":"file","label":"文件与传输","icon":"file","count":46},{"id":"desktop","label":"桌面与键鼠","icon":"mouse","count":79},{"id":"vision","label":"图像与 OCR","icon":"scan","count":100},{"id":"message","label":"网络与消息","icon":"send","count":82},{"id":"mobile","label":"移动端与设备","icon":"mobile","count":46}],"components":[{"id":"Trigger.Manual","name":"人工发起","kind":"trigger","group":"trigger","categories":["trigger"],"categorySignature":"trigger","description":"由用户在运行页手动发起流程。","messageTemplate":"","baseType":"Trigger","functionName":"Trigger.Manual","functionCalls":[],"version":"","tags":["触发","人工发起"],"platformTag":null,"icon":"trigger","risk":"low","fields":[{"key":"entryName","label":"入口名称","widget":"text","type":"string","displayType":"text-expression","required":false,"defaultValue":"立即执行","placeholder":"","description":"","advanced":false,"valueTypes":[]}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":[]},{"id":"Trigger.Schedule","name":"定时触发","kind":"trigger","group":"trigger","categories":["trigger"],"categorySignature":"trigger","description":"按工作日或时间计划创建运行请求。","messageTemplate":"","baseType":"Trigger","functionName":"Trigger.Schedule","functionCalls":[],"version":"","tags":["触发","定时触发"],"platformTag":null,"icon":"trigger","risk":"low","fields":[{"key":"mode","label":"计划方式","widget":"select","type":"string","displayType":"dropDownSelect","required":true,"defaultValue":"工作日","placeholder":"","description":"","advanced":false,"valueTypes":[],"options":["工作日","每天","每周","Cron 表达式"]},{"key":"time","label":"执行时间","widget":"text","type":"string","displayType":"text-expression","required":true,"defaultValue":"08:30","placeholder":"","description":"","advanced":false,"valueTypes":[]},{"key":"timezone","label":"时区","widget":"text","type":"string","displayType":"text-expression","required":false,"defaultValue":"Asia/Shanghai","placeholder":"","description":"","advanced":false,"valueTypes":[]}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":[]},{"id":"Trigger.FileArrival","name":"文件到达触发","kind":"trigger","group":"trigger","categories":["trigger"],"categorySignature":"trigger","description":"监听指定目录的新文件事件。","messageTemplate":"","baseType":"Trigger","functionName":"Trigger.FileArrival","functionCalls":[],"version":"","tags":["触发","文件到达触发"],"platformTag":null,"icon":"trigger","risk":"low","fields":[{"key":"folder","label":"监听目录","widget":"folder","type":"object","displayType":"selectFile","required":true,"defaultValue":"D:\\业务文件\\待处理","placeholder":"","description":"","advanced":false,"valueTypes":[]},{"key":"pattern","label":"文件匹配","widget":"text","type":"string","displayType":"text-expression","required":true,"defaultValue":"*.xlsx","placeholder":"","description":"","advanced":false,"valueTypes":[]},{"key":"stableSeconds","label":"文件稳定等待","widget":"number","type":"number","displayType":"number","required":false,"defaultValue":"3","placeholder":"","description":"","advanced":false,"valueTypes":[],"unit":"秒"}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":[]},{"id":"logic_control_if_else","name":"IF 条件分支","kind":"native","group":"control","categories":["judgment"],"categorySignature":"judgment","description":"definition.args1/args3 保存两个 input_statement 子树,代码生成器输出 if/else。","messageTemplate":"","baseType":"logic_control_if_else","functionName":"logic_control_if_else","functionCalls":[],"version":"","tags":["judgment","container"],"platformTag":null,"icon":"branch","risk":"low","fields":[{"key":"condition","label":"条件表达式","widget":"text","type":"string","displayType":"text-expression","required":true,"defaultValue":"","placeholder":"","description":"","advanced":false,"valueTypes":[]}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":["statement_if","statement_else"],"nodeKind":"container"},{"id":"logic_control_var","name":"设置变量","kind":"native","group":"control","categories":["base_command"],"categorySignatLine truncated {"schemaVersion":1,"generatedAt":"2026-11-06T05:05:45.453Z","source":{"catalog":"shizai-catalog-data.js","componentsNew":"componentsNew.json"},"counts":{"total":1016,"vendor":997,"native":16,"triggers":3,"fields":4297},"groups":[{"id":"control","label":"编排控制","icon":"branch","count":16},{"id":"trigger","label":"流程触发","icon":"trigger","count":3},{"id":"app","label":"应用与系统","icon":"app","count":60},{"id":"web","label":"网页自动化","icon":"web","count":187},{"id":"office","label":"Office 与文档","icon":"table","count":230},{"id":"data","label":"数据处理","icon":"database","count":167},{"id":"file","label":"文件与传输","icon":"file","count":46},{"id":"desktop","label":"桌面与键鼠","icon":"mouse","count":79},{"id":"vision","label":"图像与 OCR","icon":"scan","count":100},{"id":"message","label":"网络与消息","icon":"send","count":82},{"id":"mobile","label":"移动端与设备","icon":"mobile","count":46}],"components":[{"id":"Trigger.Manual","name":"人工发起","kind":"trigger","group":"trigger","categories":["trigger"],"categorySignature":"trigger","description":"由用户在运行页手动发起流程。","messageTemplate":"","baseType":"Trigger","functionName":"Trigger.Manual","functionCalls":[],"version":"","tags":["触发","人工发起"],"platformTag":null,"icon":"trigger","risk":"low","fields":[{"key":"entryName","label":"入口名称","widget":"text","type":"string","displayType":"text-expression","required":false,"defaultValue":"立即执行","placeholder":"","description":"","advanced":false,"valueTypes":[]}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":[]},{"id":"Trigger.Schedule","name":"定时触发","kind":"trigger","group":"trigger","categories":["trigger"],"categorySignature":"trigger","description":"按工作日或时间计划创建运行请求。","messageTemplate":"","baseType":"Trigger","functionName":"Trigger.Schedule","functionCalls":[],"version":"","tags":["触发","定时触发"],"platformTag":null,"icon":"trigger","risk":"low","fields":[{"key":"mode","label":"计划方式","widget":"select","type":"string","displayType":"dropDownSelect","required":true,"defaultValue":"工作日","placeholder":"","description":"","advanced":false,"valueTypes":[],"options":["工作日","每天","每周","Cron 表达式"]},{"key":"time","label":"执行时间","widget":"text","type":"string","displayType":"text-expression","required":true,"defaultValue":"08:30","placeholder":"","description":"","advanced":false,"valueTypes":[]},{"key":"timezone","label":"时区","widget":"text","type":"string","displayType":"text-expression","required":false,"defaultValue":"Asia/Shanghai","placeholder":"","description":"","advanced":false,"valueTypes":[]}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":[]},{"id":"Trigger.FileArrival","name":"文件到达触发","kind":"trigger","group":"trigger","categories":["trigger"],"categorySignature":"trigger","description":"监听指定目录的新文件事件。","messageTemplate":"","baseType":"Trigger","functionName":"Trigger.FileArrival","functionCalls":[],"version":"","tags":["触发","文件到达触发"],"platformTag":null,"icon":"trigger","risk":"low","fields":[{"key":"folder","label":"监听目录","widget":"folder","type":"object","displayType":"selectFile","required":true,"defaultValue":"D:\\业务文件\\待处理","placeholder":"","description":"","advanced":false,"valueTypes":[]},{"key":"pattern","label":"文件匹配","widget":"text","type":"string","displayType":"text-expression","required":true,"defaultValue":"*.xlsx","placeholder":"","description":"","advanced":false,"valueTypes":[]},{"key":"stableSeconds","label":"文件稳定等待","widget":"number","type":"number","displayType":"number","required":false,"defaultValue":"3","placeholder":"","description":"","advanced":false,"valueTypes":[],"unit":"秒"}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":[]},{"id":"logic_control_if_else","name":"IF 条件分支","kind":"native","group":"control","categories":["judgment"],"categorySignature":"judgment","description":"definition.args1/args3 保存两个 input_statement 子树,代码生成器输出 if/else。","messageTemplate":"","baseType":"logic_control_if_else","functionName":"logic_control_if_else","functionCalls":[],"version":"","tags":["judgment","container"],"platformTag":null,"icon":"branch","risk":"low","fields":[{"key":"condition","label":"条件表达式","widget":"text","type":"string","displayType":"text-expression","required":true,"defaultValue":"","placeholder":"","description":"","advanced":false,"valueTypes":[]}],"output":{"label":"","key":"","suggestedName":"","valueTypes":[],"fields":[]},"slots":["statement_if","statement_else"],"nodeKind":"container"},{"id":"logic_control_var","name":"设置变量","kind":"native","group":"control","categories":["base_command"],"categorySignatLine truncated
+3 -1
View File
@@ -243,7 +243,9 @@ function normalizeVendorComponent(component, vendorMap) {
// 任务 3.4(决策点 7)+ 五件小事 #1:platformTag 从包内 PLATFORM_GROUPS 单一源派生 // 任务 3.4(决策点 7)+ 五件小事 #1:platformTag 从包内 PLATFORM_GROUPS 单一源派生
// (能力 id 命中包内注册 → win32;未实现的能力与宿主原生节点 → null 跨平台占位)。 // (能力 id 命中包内注册 → win32;未实现的能力与宿主原生节点 → null 跨平台占位)。
const platforms = domainPlatformMap.get(component.id) || component.platforms; const platforms = domainPlatformMap.get(component.id) || component.platforms;
const platformTag = component.platformTag || (platforms?.includes("win32") ? "win32" : null); // A8 归一化:源值仅接受 win32|darwin|linux 白名单字符串,其余(含上游 shizai 的数字 1 脏值)一律重派生
const sourcePlatform = ["win32", "darwin", "linux"].includes(component.platformTag) ? component.platformTag : null;
const platformTag = sourcePlatform || (platforms?.includes("win32") ? "win32" : null);
return { return {
id: component.id, id: component.id,
name: component.name, name: component.name,