推进 SDK API surface exports and smoke
This commit is contained in:
@@ -24,10 +24,40 @@ Use `src/index.js` for stable imports:
|
||||
```js
|
||||
import {
|
||||
analyzeIniRuntimeBoundaries,
|
||||
createIniPanelLaunchApiManifest,
|
||||
createIniPanelShellViewModel,
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomContract,
|
||||
createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness,
|
||||
createLinuxCncIniSdk,
|
||||
createLinuxCncInterpSdk,
|
||||
createMachineSessionSnapshotPayload,
|
||||
createSessionSnapshot,
|
||||
defaultMachinePaths,
|
||||
gcodeFilenameFromProgramPath,
|
||||
gcodeProgramPath,
|
||||
getOpfsRoot,
|
||||
isSupportedIniPanelLaunchApiManifest,
|
||||
loadMachineSessionFromOpfs,
|
||||
loadMachineSessionSnapshot,
|
||||
loadMachineTextFiles,
|
||||
loadMachineToolTableFromOpfs,
|
||||
loadTextFile,
|
||||
machineFilePaths,
|
||||
machineIniPath,
|
||||
mountIniPanelShellWorkflowOverviewEmbeddingMountState,
|
||||
normalizeOpfsPath,
|
||||
parameterFilePath,
|
||||
planIniFileContextStaging,
|
||||
planSimConfigStaging,
|
||||
renderIniPanelShellWorkflowOverviewEmbeddingMountState,
|
||||
restoreMachineParametersFromOpfs,
|
||||
saveMachineSessionSnapshot,
|
||||
saveMachineTextFiles,
|
||||
saveSessionSnapshot,
|
||||
saveTextFile,
|
||||
sessionSnapshotPath,
|
||||
toolTablePath,
|
||||
validateSessionSnapshot,
|
||||
} from "./src/index.js";
|
||||
```
|
||||
|
||||
@@ -123,3 +153,49 @@ change interpreter semantics.
|
||||
path but keeps the runner loop going after LinuxCNC reports an error, matching
|
||||
upstream `rs274 -n 0` regression tests such as `tests/interp/oword-unwind`.
|
||||
It does not implement or reinterpret LinuxCNC error semantics.
|
||||
|
||||
## OPFS/session persistence exports
|
||||
|
||||
The SDK entrypoint re-exports the OPFS/session persistence helpers used by the
|
||||
browser panel so external callers can stage the same files without importing
|
||||
private module paths:
|
||||
|
||||
- `getOpfsRoot()`, `saveTextFile()`, and `loadTextFile()` for browser OPFS text
|
||||
persistence.
|
||||
- `machineIniPath()`, `toolTablePath()`, `parameterFilePath()`,
|
||||
`gcodeProgramPath()`, `sessionSnapshotPath()`, `defaultMachinePaths()`, and
|
||||
`normalizeOpfsPath()` for stable OPFS path construction.
|
||||
- `createMachineSessionSnapshotPayload()`, `createSessionSnapshot()`,
|
||||
`saveSessionSnapshot()`, `saveMachineSessionSnapshot()`,
|
||||
`loadMachineSessionSnapshot()`, and `validateSessionSnapshot()` for session
|
||||
snapshot persistence.
|
||||
- `machineFilePaths()`, `saveMachineTextFiles()`, `loadMachineTextFiles()`, and
|
||||
`gcodeFilenameFromProgramPath()` for machine-file and G-code file helpers.
|
||||
- `restoreMachineParametersFromOpfs()`, `loadMachineToolTableFromOpfs()`, and
|
||||
`loadMachineSessionFromOpfs()` for loading OPFS machine state into the
|
||||
LinuxCNC-backed interpreter SDK.
|
||||
|
||||
These helpers only move and validate host files. Parameter and tool-table
|
||||
effects still come from the LinuxCNC-backed interpreter SDK methods they call.
|
||||
|
||||
## INI panel shell handoff exports
|
||||
|
||||
The SDK entrypoint also re-exports the stable INI panel shell handoff surface
|
||||
for external browser shells:
|
||||
|
||||
- `createIniPanelLaunchApiManifest()` and
|
||||
`isSupportedIniPanelLaunchApiManifest()` for launch API negotiation.
|
||||
- `createIniPanelShellViewModel()` for a complete read-only shell integration
|
||||
bundle.
|
||||
- `createIniPanelShellWorkflowOverviewEmbeddingMountDomContract()` and
|
||||
`createIniPanelShellWorkflowOverviewEmbeddingMountDomReadiness()` for
|
||||
workflow overview embedding mount DOM checks.
|
||||
- `renderIniPanelShellWorkflowOverviewEmbeddingMountState()` for rendering a
|
||||
mount render-state into caller-owned DOM.
|
||||
- `mountIniPanelShellWorkflowOverviewEmbeddingMountState()` for a non-throwing
|
||||
workflow overview embedding mount wrapper that returns structured blocked
|
||||
results when DOM nodes are missing.
|
||||
|
||||
The workflow overview embedding helpers are UI/runtime boundary helpers only.
|
||||
They render status and rows already produced by the shell view-model; they do
|
||||
not parse G-code, execute action plans, or implement CNC semantics.
|
||||
|
||||
Reference in New Issue
Block a user