推进 SDK API surface exports and smoke
This commit is contained in:
105
text14.txt
105
text14.txt
@@ -894,3 +894,108 @@ host_wasm_opfs_browser_smokes=ok
|
||||
`wasm-port/runtime/sdk/README.md`,确认外部调用方可复用的稳定 API 是否覆盖 INI panel shell
|
||||
handoff、workflow overview embedding、OPFS/session persistence 与 sim-config staging;优先补
|
||||
SDK export/README 说明和 Node smoke,不扩大 CNC 语义边界,不新增解释器语义。
|
||||
|
||||
十二、2026-06-15 继续执行记录:SDK/API surface exports and smoke
|
||||
|
||||
本轮按 `text14.txt` 执行,进入 SDK/API surface consolidation。审计并扩展
|
||||
`wasm-port/runtime/sdk/src/index.js`,让外部调用方可以从 SDK stable entrypoint 直接使用核心
|
||||
LinuxCNC WASM wrappers、sim-config staging、OPFS/session persistence,以及 INI panel shell
|
||||
handoff / workflow overview embedding helper。
|
||||
|
||||
完成内容:
|
||||
|
||||
- `runtime/sdk/src/index.js` 保留既有 core exports:
|
||||
- `createLinuxCncIniSdk()`;
|
||||
- `createLinuxCncInterpSdk()`;
|
||||
- `planIniFileContextStaging()`;
|
||||
- `planSimConfigStaging()`;
|
||||
- `analyzeIniRuntimeBoundaries()`;
|
||||
- SDK stable entrypoint 新增 OPFS/path/file/session exports:
|
||||
- `getOpfsRoot()`;
|
||||
- `saveTextFile()`;
|
||||
- `loadTextFile()`;
|
||||
- `machineIniPath()`;
|
||||
- `toolTablePath()`;
|
||||
- `parameterFilePath()`;
|
||||
- `gcodeProgramPath()`;
|
||||
- `sessionSnapshotPath()`;
|
||||
- `defaultMachinePaths()`;
|
||||
- `normalizeOpfsPath()`;
|
||||
- session snapshot helpers;
|
||||
- machine text/G-code file helpers;
|
||||
- parameter/tool-table OPFS bridge helpers;
|
||||
- `loadMachineSessionFromOpfs()`;
|
||||
- SDK stable entrypoint 新增 INI panel shell/workflow overview helper exports:
|
||||
- launch API manifest/schema helpers;
|
||||
- shell integration manifest/readiness/schema/workflow helpers;
|
||||
- shell session handoff summary/package/mount helpers;
|
||||
- workflow overview contract/readiness helpers;
|
||||
- workflow overview embedding report/display/render/DOM/mount helpers;
|
||||
- `mountIniPanelShellWorkflowOverviewEmbeddingMountState()`;
|
||||
- 新增 `wasm-port/tests/sdk/node/verify_sdk_surface.mjs`;
|
||||
- 新增 `wasm-port/tests/sdk/node/verify_sdk_surface.sh`;
|
||||
- SDK surface smoke 覆盖:
|
||||
- core exports;
|
||||
- OPFS/session persistence exports;
|
||||
- workflow overview embedding mount wrapper exports;
|
||||
- path helper runtime shape;
|
||||
- launch manifest compatibility;
|
||||
- shell view-model method exposure;
|
||||
- README/tracker 文档记录;
|
||||
- `wasm-port/tests/host/verify_host_smokes.sh` 纳入
|
||||
`wasm-port/tests/sdk/node/verify_sdk_surface.sh`;
|
||||
- `wasm-port/runtime/sdk/README.md` 增补 stable imports、OPFS/session persistence exports、
|
||||
INI panel shell handoff exports、workflow overview embedding helper说明与边界说明;
|
||||
- `PROJECT_COMPLETION_TRACKER.md` 同步当前完成批次与下一步 OPFS/session persistence
|
||||
project-level summary / release-gate docs;
|
||||
- 未新增控制按钮;
|
||||
- 未执行 action-plan;
|
||||
- 未解析 G-code;
|
||||
- 未解释 canonical events;
|
||||
- 未新增 JS CNC 语义;
|
||||
- 未改变 LinuxCNC interpreter、tool、parameter、planner 或 LinuxCNC-owned runtime semantics。
|
||||
|
||||
验证已通过:
|
||||
|
||||
```bash
|
||||
git diff --check
|
||||
wasm-port/tests/sdk/node/verify_sdk_surface.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
|
||||
sdk_surface_node_smoke=ok
|
||||
ini_panel_ui_shell_node_smoke=ok
|
||||
ini_panel_launch_api_manifest_node_smoke=ok
|
||||
ini_panel_shell_integration_manifest_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_workflow_overview_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
|
||||
```
|
||||
|
||||
下一步工作计划:
|
||||
|
||||
继续推进 OPFS/session persistence 与 release-gate 文档收口。下一批建议新增项目级
|
||||
OPFS/session persistence summary 或 release workflow 文档,串联 SDK stable imports、browser
|
||||
OPFS smoke、session snapshot/machine-file helpers、host gate 命令和 blocked runtime family 说明;
|
||||
优先让新接手者能按文档复现支持面与验证入口,不扩大 CNC 语义边界。
|
||||
|
||||
Reference in New Issue
Block a user