推进 INI 面板 launch manifest compatibility predicate

This commit is contained in:
2026-06-15 07:05:53 +08:00
parent 6b5999930a
commit 01d168e247
8 changed files with 121 additions and 1 deletions

View File

@@ -1410,3 +1410,74 @@ host_wasm_opfs_browser_smokes=ok
compatibility helper例如 `isSupportedIniPanelLaunchApiManifest()` 或等价只读 predicate让外部
shell 可以用 schema/version 判断 manifest 是否可消费,并由 Node/browser gate 校验;仍保持只读,
不新增控制按钮,不解析 G-code。
十八、2026-06-15 继续执行记录INI panel launch manifest compatibility predicate
本轮按“第一原则:加快实质性推进”继续推进 SDK/API surface为 launch manifest 增加只读
compatibility predicate让外部 shell 能用 schema/version 和必需字段判断 manifest 是否可消费。
完成内容:
- `wasm-port/runtime/ui/ini-panel/ui-shell.js` 新增
`isSupportedIniPanelLaunchApiManifest()`
- `launch.html` 的 `window.linuxCncIniPanelLaunchApi` 新增
`isSupportedLaunchApiManifest()`
- `createIniPanelLaunchApiManifest().methods` 新增 `isSupportedLaunchApiManifest`
- predicate 固定校验:
- manifest 是对象;
- `apiName` 匹配 schema
- `manifestVersion` 匹配 schema
- schema fields 全部存在;
- `verify_ini_panel_launch_api_manifest.mjs` 覆盖 supported、错误 version、错误 apiName、
缺少字段和 null 输入;
- `ini_panel_launch_smoke.html` 在真实 launch iframe 中校验支持当前 manifest并拒绝错误
`manifestVersion`
- `verify_ini_panel_ui_shell.mjs`、`verify_ini_panel_entry_docs.mjs` 与 `docs/panel-entry.md`
记录并校验 predicate 入口;
- 未新增控制按钮;
- 未解析 G-code
- 未解释 canonical events
- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或
LinuxCNC-owned runtime semantics。
验证已通过:
```bash
git diff --check
wasm-port/tests/ui/node/verify_ini_panel_launch_api_manifest.sh
wasm-port/tests/ui/node/verify_ini_panel_ui_shell.sh
wasm-port/tests/ui/node/verify_ini_panel_entry_docs.sh
wasm-port/tests/ui/node/verify_ui_node_smokes.sh
SKIP_INI_BUILD=1 SKIP_INTERP_BUILD=1 wasm-port/tests/browser/verify_ini_panel_browser.sh
wasm-port/tools/verify_vendor_sync.sh
wasm-port/tools/verify_no_standalone_cnc_semantics.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_interp_wasm.sh
SKIP_INTERP_BUILD=1 wasm-port/tests/wasm/node/verify_sim_configs_inventory_wasm.sh
wasm-port/tests/host/verify_host_smokes.sh
```
关键输出:
```text
ini_panel_launch_api_manifest_node_smoke=ok
ini_panel_ui_shell_node_smoke=ok
ini_panel_entry_docs_node_smoke=ok
ui_node_smokes=ok
browser_ini_opfs_smoke=ok
browser_ini_control_page_smoke=ok
browser_ini_launch_smoke=ok
vendor sync up to date
standalone CNC semantics guard complete
interp_wasm_node_smoke=ok
sim_configs_wasm_node_inventory_executed=28
sim_configs_wasm_node_inventory_passed=28
sim_configs_wasm_node_inventory_skipped=131
sim_configs_wasm_node_inventory_unexpected_fail=0
host_wasm_opfs_browser_smokes=ok
```
下一步建议:
继续推进 browser/UI workflow。下一批建议把 control-page browser API 也补齐 schema/version 与
compatibility predicate使 launch API 和 control-page API 具备一致的外部 shell 接入模型;仍保持
只读,不新增控制按钮,不解析 G-code。