建立ToolDbProcessPort合约层

结论:已新增ToolDbProcessPort合约、OPFS tool DB flat-file/transcript store和Node/WASM gates,baseline保持28/28/131/0且promotion继续锁定。
This commit is contained in:
2026-06-19 06:36:26 +08:00
parent d9ac3770a7
commit d8e0196c61
13 changed files with 711 additions and 0 deletions

View File

@@ -13,6 +13,9 @@ import {
parameterFilePath,
previewCachePath,
sessionSnapshotPath,
toolDbFilePath,
toolDbRootPath,
toolDbTranscriptPath,
toolTablePath,
} from "../../../runtime/opfs/path-model.js";
import {
@@ -205,6 +208,12 @@ assert.equal(await getOpfsRoot(storage), root);
assert.equal(normalizeOpfsPath("linuxcnc/machines/xyzab.ini"), "linuxcnc/machines/xyzab.ini");
assert.equal(machineIniPath("xyzab-tdr"), "linuxcnc/machines/xyzab-tdr/machine.ini");
assert.equal(toolTablePath("xyzab-tdr"), "linuxcnc/machines/xyzab-tdr/tool.tbl");
assert.equal(toolDbRootPath("xyzab-tdr"), "linuxcnc/machines/xyzab-tdr/tool-db");
assert.equal(toolDbFilePath("xyzab-tdr"), "linuxcnc/machines/xyzab-tdr/tool-db/db_nonran_file");
assert.equal(
toolDbTranscriptPath("xyzab-tdr", "run-1"),
"linuxcnc/machines/xyzab-tdr/tool-db/transcripts/run-1/transcript.json",
);
assert.equal(parameterFilePath("xyzab-tdr"), "linuxcnc/machines/xyzab-tdr/linuxcnc.var");
assertGcodeProgramStoragePath("fixture.ngc", gcodeProgramPath("fixture.ngc"));
assertGcodeProgramStoragePath(