推进 INI 面板 shell handoff snapshot API

This commit is contained in:
2026-06-15 09:42:43 +08:00
parent 01817f6493
commit 5c951ab9bc
11 changed files with 1272 additions and 10 deletions

View File

@@ -2086,3 +2086,88 @@ host_wasm_opfs_browser_smokes=ok
继续推进 SDK/API surface。下一批建议为 shell/session handoff summary 增加 focused compatibility
predicate 或 versioned summary schema例如 `createIniPanelShellSessionHandoffSummarySchema()`
让外部 shell 能独立判断 summary shape 是否可消费;仍保持只读,不新增控制按钮,不解析 G-code。
二十六、2026-06-15 继续执行记录INI panel shell session handoff summary schema gate
本轮按“第一原则:加快实质性推进”继续推进 SDK/API surface为 shell/session handoff
summary 增加 versioned schema 与 focused compatibility predicate并暴露到真实 launch browser
API让外部 shell 能在消费 summary 前独立判断 shape 是否可支持。
完成内容:
- `ui-shell.js` 新增 `createIniPanelShellSessionHandoffSummarySchema()`
- `ui-shell.js` 新增 `isSupportedIniPanelShellSessionHandoffSummary()`
- `createIniPanelShellSessionHandoffSummary()` 新增:
- `apiName: "ini-panel-shell-session-handoff-summary"`
- `summaryVersion: 1`
- `createIniPanelLaunchApiManifest().methods` 新增:
- `getShellSessionHandoffSummarySchema`
- `isSupportedShellSessionHandoffSummary`
- `launch.html` 的 `window.linuxCncIniPanelLaunchApi` 新增:
- `getShellSessionHandoffSummarySchema()`
- `isSupportedShellSessionHandoffSummary()`
- `ini_panel_launch_smoke.html` 在真实 launch iframe 中校验:
- summary schema version
- 当前 summary 可支持;
- 错误 summary version 被拒绝;
- `ini_panel_shell_integration_workflow_smoke.html` 在 browser shell handoff workflow 中校验:
- launch API 暴露 summary schema 与 predicate
- 当前 handoff summary 可支持;
- `verify_ini_panel_shell_integration_manifest.mjs` 覆盖:
- summary schema 完整 shape
- valid summary 支持;
- 错误 version、错误 apiName、缺字段、null 被拒绝;
- `verify_ini_panel_launch_api_manifest.mjs`、`verify_ini_panel_ui_shell.mjs`、
`verify_ini_panel_entry_docs.mjs` 与 `docs/panel-entry.md` 同步记录和校验新 API
- 未新增控制按钮;
- 未解析 G-code
- 未解释 canonical events
- 未新增 JS CNC 语义;
- 未改变 OPFS/session persistence、LinuxCNC interpreter、tool、parameter、planner 或
LinuxCNC-owned runtime semantics。
验证已通过:
```bash
git diff --check
wasm-port/tests/ui/node/verify_ini_panel_shell_integration_manifest.sh
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_shell_integration_manifest_node_smoke=ok
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
browser_ini_shell_integration_workflow_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
```
下一步建议:
继续推进 SDK/API surface 与 browser/UI workflow 的交界。下一批建议增加一个
`createIniPanelShellSessionHandoffCompatibilityReport()` 或等价 helper把 summary schema
支持状态、缺失字段、version/apiName mismatch 与 blocking reasons 合并成可显示报告,便于外部
shell 在 UI 中解释为什么不能消费 handoff summary仍保持只读不新增控制按钮不解析 G-code。