space-data-module-sdk 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -20
- package/bin/space-data-module.js +263 -0
- package/docs/.nojekyll +1 -0
- package/docs/AGENTS.md +34 -0
- package/docs/architecture.svg +141 -0
- package/docs/browser-wasmedge-isomorphic.md +179 -0
- package/docs/flatsql-streaming-standard.md +341 -0
- package/docs/gpu-module-abi.md +193 -0
- package/docs/index.html +125 -0
- package/docs/isomorphic-pthreads.md +188 -0
- package/docs/isomorphic-sdn-runtime-plan.md +167 -0
- package/docs/language-runtime-matrix.md +82 -0
- package/docs/manifest-structure.svg +114 -0
- package/docs/module-bundle-runtime-plan.md +19 -0
- package/docs/module-lifecycle.svg +70 -0
- package/docs/module-publication-standard.md +540 -0
- package/docs/node-red-default-node-parity.md +88 -0
- package/docs/protocol-installation.md +196 -0
- package/docs/secrets-capability.md +152 -0
- package/docs/styles.css +288 -0
- package/docs/testing-harness.md +408 -0
- package/docs/tri-runtime-parity.md +132 -0
- package/docs/wallet-callback.html +2 -0
- package/package.json +26 -6
- package/schemas/HttpRequestAbi.fbs +41 -0
- package/schemas/HttpResponseAbi.fbs +36 -0
- package/schemas/PluginManifest.fbs +2 -1
- package/src/AGENTS.md +1 -1
- package/src/app/codec.js +548 -0
- package/src/app/index.js +6 -0
- package/src/browser.js +5 -0
- package/src/bundle/constants.js +1 -0
- package/src/bundle/index.js +15 -0
- package/src/bundle/sigdomain.js +179 -0
- package/src/bundle/signing.js +767 -0
- package/src/bundle/wasm.js +3 -2
- package/src/capabilities.js +3 -0
- package/src/compat/index.js +7 -0
- package/src/compat/sdnLegacy.js +449 -0
- package/src/compiler/compileModule.js +556 -55
- package/src/compiler/flatcSupport.js +41 -27
- package/src/compiler/index.d.ts +2 -0
- package/src/compiler/index.js +18 -0
- package/src/compiler/invokeGlue.js +1212 -183
- package/src/compiler/pthreadArtifactGuard.js +910 -0
- package/src/compiler/sdnShimGenerator.js +323 -0
- package/src/compiler/wasiThreadsToolchain.js +150 -0
- package/src/compliance/index.js +11 -1
- package/src/compliance/legacyWildcardPorts.js +228 -0
- package/src/compliance/pluginCompliance.js +1000 -96
- package/src/field-stream/index.d.ts +31 -0
- package/src/field-stream/index.js +119 -0
- package/src/flow/dependencyStreamBridge.js +234 -0
- package/src/flow/flatsqlLinkShim.js +304 -0
- package/src/flow/flowCodec.js +107 -0
- package/src/flow/flowCompiler.js +2900 -0
- package/src/flow/flowRuntimeHost.js +877 -0
- package/src/flow/index.d.ts +117 -0
- package/src/flow/index.js +31 -0
- package/src/flow/isomorphicFlowHost.js +384 -0
- package/src/flow/jsFlowRuntime.js +275 -0
- package/src/flow/normalize.js +294 -0
- package/src/flow/runtime-src/flow_runtime.cpp +1699 -0
- package/src/flow/vendor/sdn-flow/MethodRegistry.js +400 -0
- package/src/flow/vendor/sdn-flow/constants.js +39 -0
- package/src/flow/vendor/sdn-flow/index.js +29 -0
- package/src/flow/vendor/sdn-flow/normalize.js +506 -0
- package/src/flow/vendor/sdn-flow/wasmCompatibility.js +189 -0
- package/src/generated/http/cpp/HttpRequestAbi_generated.h +285 -0
- package/src/generated/http/cpp/HttpResponseAbi_generated.h +192 -0
- package/src/generated/http/sdn/http/http-header.js +53 -0
- package/src/generated/http/sdn/http/http-header.ts +67 -0
- package/src/generated/http/sdn/http/http-request.js +132 -0
- package/src/generated/http/sdn/http/http-request.ts +179 -0
- package/src/generated/http/sdn/http/http-response.js +144 -0
- package/src/generated/http/sdn/http/http-response.ts +168 -0
- package/src/generated/http/sdn/http.js +11 -0
- package/src/generated/http/sdn/http.ts +4 -0
- package/src/generated/orbpro/flow/backpressure-policy.d.ts +12 -0
- package/src/generated/orbpro/flow/backpressure-policy.d.ts.map +1 -0
- package/src/generated/orbpro/flow/backpressure-policy.js +17 -0
- package/src/generated/orbpro/flow/backpressure-policy.js.map +1 -0
- package/src/generated/orbpro/flow/backpressure-policy.ts +15 -0
- package/src/generated/orbpro/flow/flow-bundle-manifest.d.ts +142 -0
- package/src/generated/orbpro/flow/flow-bundle-manifest.d.ts.map +1 -0
- package/src/generated/orbpro/flow/flow-bundle-manifest.js +304 -0
- package/src/generated/orbpro/flow/flow-bundle-manifest.js.map +1 -0
- package/src/generated/orbpro/flow/flow-bundle-manifest.ts +399 -0
- package/src/generated/orbpro/flow/flow-edge.d.ts +113 -0
- package/src/generated/orbpro/flow/flow-edge.d.ts.map +1 -0
- package/src/generated/orbpro/flow/flow-edge.js +221 -0
- package/src/generated/orbpro/flow/flow-edge.js.map +1 -0
- package/src/generated/orbpro/flow/flow-edge.ts +292 -0
- package/src/generated/orbpro/flow/flow-node.d.ts +80 -0
- package/src/generated/orbpro/flow/flow-node.d.ts.map +1 -0
- package/src/generated/orbpro/flow/flow-node.js +158 -0
- package/src/generated/orbpro/flow/flow-node.js.map +1 -0
- package/src/generated/orbpro/flow/flow-node.ts +202 -0
- package/src/generated/orbpro/flow/flow-program.d.ts +164 -0
- package/src/generated/orbpro/flow/flow-program.d.ts.map +1 -0
- package/src/generated/orbpro/flow/flow-program.js +350 -0
- package/src/generated/orbpro/flow/flow-program.js.map +1 -0
- package/src/generated/orbpro/flow/flow-program.ts +477 -0
- package/src/generated/orbpro/flow/flow-trigger.d.ts +108 -0
- package/src/generated/orbpro/flow/flow-trigger.d.ts.map +1 -0
- package/src/generated/orbpro/flow/flow-trigger.js +207 -0
- package/src/generated/orbpro/flow/flow-trigger.js.map +1 -0
- package/src/generated/orbpro/flow/flow-trigger.ts +276 -0
- package/src/generated/orbpro/flow/node-kind.d.ts +13 -0
- package/src/generated/orbpro/flow/node-kind.d.ts.map +1 -0
- package/src/generated/orbpro/flow/node-kind.js +16 -0
- package/src/generated/orbpro/flow/node-kind.js.map +1 -0
- package/src/generated/orbpro/{invoke.ts → flow/node-kind.ts} +12 -2
- package/src/generated/orbpro/flow/plugin-version-binding.d.ts +52 -0
- package/src/generated/orbpro/flow/plugin-version-binding.d.ts.map +1 -0
- package/src/generated/orbpro/flow/plugin-version-binding.js +85 -0
- package/src/generated/orbpro/flow/plugin-version-binding.js.map +1 -0
- package/src/generated/orbpro/flow/plugin-version-binding.ts +121 -0
- package/src/generated/orbpro/flow/schema-hash-binding.d.ts +70 -0
- package/src/generated/orbpro/flow/schema-hash-binding.d.ts.map +1 -0
- package/src/generated/orbpro/flow/schema-hash-binding.js +143 -0
- package/src/generated/orbpro/flow/schema-hash-binding.js.map +1 -0
- package/src/generated/orbpro/flow/schema-hash-binding.ts +189 -0
- package/src/generated/orbpro/flow/trigger-binding.d.ts +71 -0
- package/src/generated/orbpro/flow/trigger-binding.d.ts.map +1 -0
- package/src/generated/orbpro/flow/trigger-binding.js +142 -0
- package/src/generated/orbpro/flow/trigger-binding.js.map +1 -0
- package/src/generated/orbpro/flow/trigger-binding.ts +181 -0
- package/src/generated/orbpro/flow/trigger-kind.d.ts +14 -0
- package/src/generated/orbpro/flow/trigger-kind.d.ts.map +1 -0
- package/src/generated/orbpro/flow/trigger-kind.js +17 -0
- package/src/generated/orbpro/flow/trigger-kind.js.map +1 -0
- package/src/generated/orbpro/flow/trigger-kind.ts +17 -0
- package/src/generated/orbpro/flow.d.ts +21 -0
- package/src/generated/orbpro/flow.d.ts.map +1 -0
- package/src/generated/orbpro/flow.js +23 -0
- package/src/generated/orbpro/flow.js.map +1 -0
- package/src/generated/orbpro/flow.ts +24 -0
- package/src/generated/orbpro/manifest/capability-kind.d.ts +2 -1
- package/src/generated/orbpro/manifest/capability-kind.js +1 -0
- package/src/generated/orbpro/manifest/capability-kind.ts +1 -0
- package/src/generated/orbpro/plugin/stream-invoke-request.d.ts +93 -0
- package/src/generated/orbpro/plugin/stream-invoke-request.js +160 -0
- package/src/generated/orbpro/plugin/stream-invoke-request.ts +211 -0
- package/src/generated/orbpro/plugin/stream-invoke-response.d.ts +99 -0
- package/src/generated/orbpro/plugin/stream-invoke-response.js +175 -0
- package/src/generated/orbpro/plugin/stream-invoke-response.ts +226 -0
- package/src/generated/orbpro/plugin.js +8 -0
- package/src/generated/orbpro/stream.d.ts +12 -0
- package/src/generated/orbpro/stream.js +14 -0
- package/src/generated/orbpro/stream.ts +15 -0
- package/src/generated/spacedatastandards/plg/EntryFunction.d.ts +52 -0
- package/src/generated/spacedatastandards/plg/EntryFunction.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/EntryFunction.js +106 -0
- package/src/generated/spacedatastandards/plg/EntryFunction.ts +162 -0
- package/src/generated/spacedatastandards/plg/FlatBufferTypeRef.d.ts +90 -0
- package/src/generated/spacedatastandards/plg/FlatBufferTypeRef.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/FlatBufferTypeRef.js +189 -0
- package/src/generated/spacedatastandards/plg/FlatBufferTypeRef.ts +270 -0
- package/src/generated/spacedatastandards/plg/PLG.d.ts +492 -0
- package/src/generated/spacedatastandards/plg/PLG.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLG.js +1139 -0
- package/src/generated/spacedatastandards/plg/PLG.ts +1600 -0
- package/src/generated/spacedatastandards/plg/PLGAcceptedTypeSet.d.ts +63 -0
- package/src/generated/spacedatastandards/plg/PLGAcceptedTypeSet.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGAcceptedTypeSet.js +138 -0
- package/src/generated/spacedatastandards/plg/PLGAcceptedTypeSet.ts +189 -0
- package/src/generated/spacedatastandards/plg/PLGBuildArtifact.d.ts +41 -0
- package/src/generated/spacedatastandards/plg/PLGBuildArtifact.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGBuildArtifact.js +104 -0
- package/src/generated/spacedatastandards/plg/PLGBuildArtifact.ts +151 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdge.d.ts +68 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdge.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdge.js +124 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdge.ts +184 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdgeContract.d.ts +58 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdgeContract.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdgeContract.js +126 -0
- package/src/generated/spacedatastandards/plg/PLGFlowEdgeContract.ts +161 -0
- package/src/generated/spacedatastandards/plg/PLGFlowNode.d.ts +82 -0
- package/src/generated/spacedatastandards/plg/PLGFlowNode.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGFlowNode.js +164 -0
- package/src/generated/spacedatastandards/plg/PLGFlowNode.ts +244 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTrigger.d.ts +55 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTrigger.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTrigger.js +105 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTrigger.ts +162 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTriggerBinding.d.ts +42 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTriggerBinding.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTriggerBinding.js +83 -0
- package/src/generated/spacedatastandards/plg/PLGFlowTriggerBinding.ts +127 -0
- package/src/generated/spacedatastandards/plg/PLGHostCapability.d.ts +36 -0
- package/src/generated/spacedatastandards/plg/PLGHostCapability.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGHostCapability.js +90 -0
- package/src/generated/spacedatastandards/plg/PLGHostCapability.ts +127 -0
- package/src/generated/spacedatastandards/plg/PLGMethodManifest.d.ts +53 -0
- package/src/generated/spacedatastandards/plg/PLGMethodManifest.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGMethodManifest.js +153 -0
- package/src/generated/spacedatastandards/plg/PLGMethodManifest.ts +210 -0
- package/src/generated/spacedatastandards/plg/PLGPortManifest.d.ts +70 -0
- package/src/generated/spacedatastandards/plg/PLGPortManifest.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGPortManifest.js +149 -0
- package/src/generated/spacedatastandards/plg/PLGPortManifest.ts +212 -0
- package/src/generated/spacedatastandards/plg/PLGProtocolSpec.d.ts +73 -0
- package/src/generated/spacedatastandards/plg/PLGProtocolSpec.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGProtocolSpec.js +199 -0
- package/src/generated/spacedatastandards/plg/PLGProtocolSpec.ts +292 -0
- package/src/generated/spacedatastandards/plg/PLGTimerSpec.d.ts +40 -0
- package/src/generated/spacedatastandards/plg/PLGTimerSpec.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PLGTimerSpec.js +103 -0
- package/src/generated/spacedatastandards/plg/PLGTimerSpec.ts +148 -0
- package/src/generated/spacedatastandards/plg/PluginCapability.d.ts +41 -0
- package/src/generated/spacedatastandards/plg/PluginCapability.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PluginCapability.js +82 -0
- package/src/generated/spacedatastandards/plg/{plugin-capability.ts → PluginCapability.ts} +55 -18
- package/src/generated/spacedatastandards/plg/PluginDependency.d.ts +42 -0
- package/src/generated/spacedatastandards/plg/PluginDependency.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/PluginDependency.js +80 -0
- package/src/generated/spacedatastandards/plg/PluginDependency.ts +124 -0
- package/src/generated/spacedatastandards/plg/TAB.d.ts +85 -0
- package/src/generated/spacedatastandards/plg/TAB.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/TAB.js +173 -0
- package/src/generated/spacedatastandards/plg/TAB.ts +228 -0
- package/src/generated/spacedatastandards/plg/bufferMutability.d.ts +18 -0
- package/src/generated/spacedatastandards/plg/bufferMutability.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/bufferMutability.js +20 -0
- package/src/generated/spacedatastandards/plg/bufferMutability.ts +23 -0
- package/src/generated/spacedatastandards/plg/bufferOwnership.d.ts +18 -0
- package/src/generated/spacedatastandards/plg/bufferOwnership.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/bufferOwnership.js +20 -0
- package/src/generated/spacedatastandards/plg/bufferOwnership.ts +23 -0
- package/src/generated/spacedatastandards/plg/drainBehavior.d.ts +20 -0
- package/src/generated/spacedatastandards/plg/drainBehavior.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/drainBehavior.js +22 -0
- package/src/generated/spacedatastandards/plg/drainBehavior.ts +25 -0
- package/src/generated/spacedatastandards/plg/flowEdgeRoutePolicy.d.ts +10 -0
- package/src/generated/spacedatastandards/plg/flowEdgeRoutePolicy.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/flowEdgeRoutePolicy.js +12 -0
- package/src/generated/spacedatastandards/plg/flowEdgeRoutePolicy.ts +13 -0
- package/src/generated/spacedatastandards/plg/hostCapabilityKind.d.ts +51 -0
- package/src/generated/spacedatastandards/plg/hostCapabilityKind.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/hostCapabilityKind.js +53 -0
- package/src/generated/spacedatastandards/plg/hostCapabilityKind.ts +55 -0
- package/src/generated/spacedatastandards/plg/invokeSurfaceKind.d.ts +15 -0
- package/src/generated/spacedatastandards/plg/invokeSurfaceKind.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/invokeSurfaceKind.js +17 -0
- package/src/generated/spacedatastandards/plg/invokeSurfaceKind.ts +19 -0
- package/src/generated/spacedatastandards/plg/main.d.ts +29 -0
- package/src/generated/spacedatastandards/plg/main.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/main.js +30 -0
- package/src/generated/spacedatastandards/plg/main.ts +32 -0
- package/src/generated/spacedatastandards/plg/payloadWireFormat.d.ts +17 -0
- package/src/generated/spacedatastandards/plg/payloadWireFormat.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/payloadWireFormat.js +19 -0
- package/src/generated/spacedatastandards/plg/payloadWireFormat.ts +21 -0
- package/src/generated/spacedatastandards/plg/pluginCategory.d.ts +82 -0
- package/src/generated/spacedatastandards/plg/pluginCategory.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/pluginCategory.js +84 -0
- package/src/generated/spacedatastandards/plg/pluginCategory.ts +103 -0
- package/src/generated/spacedatastandards/plg/publicationState.d.ts +18 -0
- package/src/generated/spacedatastandards/plg/publicationState.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/publicationState.js +20 -0
- package/src/generated/spacedatastandards/plg/purchaseTier.d.ts +18 -0
- package/src/generated/spacedatastandards/plg/purchaseTier.d.ts.map +1 -0
- package/src/generated/spacedatastandards/plg/purchaseTier.js +20 -0
- package/src/host/AGENTS.md +2 -2
- package/src/host/abi.js +53 -66
- package/src/host/browserHost.js +355 -8
- package/src/host/cpp/keyslotClient.hpp +231 -0
- package/src/host/cpp/secretsClient.hpp +583 -0
- package/src/host/hostcallWire.js +183 -0
- package/src/host/index.js +2 -0
- package/src/host/isomorphicLoader.js +44 -7
- package/src/host/nodeHost.js +227 -8
- package/src/host/sabHostcallChannel.js +206 -0
- package/src/host/timerDriver.js +203 -0
- package/src/host/wasiShim.js +41 -1
- package/src/host/wasiThreadBrowserWorker.mjs +48 -0
- package/src/host/wasiThreadHost.js +393 -0
- package/src/host/wasiThreadWorker.mjs +32 -0
- package/src/host/wasiThreadWorkerRuntime.js +93 -0
- package/src/http/index.js +339 -0
- package/src/index.d.ts +716 -10
- package/src/index.js +4 -0
- package/src/invoke/codec.js +1202 -128
- package/src/invoke/index.js +5 -1
- package/src/licensing/index.d.ts +2 -0
- package/src/licensing/index.js +2 -0
- package/src/licensing/records.js +287 -8
- package/src/manifest/codec.js +62 -14
- package/src/manifest/index.js +2 -0
- package/src/manifest/legacyToPlg.js +164 -25
- package/src/manifest/normalize.js +1 -0
- package/src/manifest/plgCodec.js +1303 -62
- package/src/manifest/typeRefs.js +162 -24
- package/src/runtime/compiledRuntimeAbi.js +47 -0
- package/src/runtime/compiledRuntimeAbi.json +33 -0
- package/src/runtime/index.d.ts +32 -0
- package/src/runtime/index.js +1 -0
- package/src/runtime-host/index.js +3 -0
- package/src/runtime-host/methodRegistry.js +55 -0
- package/src/standards/index.js +200 -56
- package/src/standards/sharedCatalog.js +16 -0
- package/src/testing/browserModuleHarness.js +604 -31
- package/src/testing/docker/wasmedge-parity.Dockerfile +39 -0
- package/src/testing/index.d.ts +151 -0
- package/src/testing/index.js +21 -0
- package/src/testing/native/wasmedge_emscripten_pthread_runner.c +25 -1
- package/src/testing/parityBrowserRunner.js +138 -0
- package/src/testing/parityHarness.js +616 -0
- package/src/testing/parityLanes.js +537 -0
- package/src/testing/processInvoke.js +29 -21
- package/src/testing/streamInvokeCodec.js +10 -175
- package/src/testing/wasmedgePin.json +6 -0
- package/src/testing/workerModuleHarness.js +242 -0
- package/src/testing/workerModuleHarnessWorker.js +176 -0
- package/src/transport/index.js +3 -0
- package/src/transport/pki.js +299 -11
- package/src/transport/records.js +16 -7
- package/src/utils/ecdsaDer.js +106 -0
- package/src/utils/wasmCrypto.js +0 -43
- package/templates/gpu-module/README.md +48 -0
- package/templates/gpu-module/include/space_data_gpu_abi.h +122 -0
- package/templates/gpu-module/manifest.json +84 -0
- package/schemas/PluginInvokeRequest.fbs +0 -18
- package/schemas/PluginInvokeResponse.fbs +0 -30
- package/schemas/spacedatastandards/PLG.fbs +0 -191
- package/src/generated/orbpro/invoke/plugin-invoke-request.d.ts +0 -51
- package/src/generated/orbpro/invoke/plugin-invoke-request.d.ts.map +0 -1
- package/src/generated/orbpro/invoke/plugin-invoke-request.js +0 -131
- package/src/generated/orbpro/invoke/plugin-invoke-request.js.map +0 -1
- package/src/generated/orbpro/invoke/plugin-invoke-request.ts +0 -173
- package/src/generated/orbpro/invoke/plugin-invoke-response.d.ts +0 -76
- package/src/generated/orbpro/invoke/plugin-invoke-response.d.ts.map +0 -1
- package/src/generated/orbpro/invoke/plugin-invoke-response.js +0 -184
- package/src/generated/orbpro/invoke/plugin-invoke-response.js.map +0 -1
- package/src/generated/orbpro/invoke/plugin-invoke-response.ts +0 -243
- package/src/generated/orbpro/invoke.d.ts +0 -3
- package/src/generated/orbpro/invoke.js +0 -5
- package/src/generated/spacedatastandards/plg/entry-function.js +0 -86
- package/src/generated/spacedatastandards/plg/entry-function.ts +0 -119
- package/src/generated/spacedatastandards/plg/index.js +0 -16
- package/src/generated/spacedatastandards/plg/index.ts +0 -11
- package/src/generated/spacedatastandards/plg/plg.js +0 -657
- package/src/generated/spacedatastandards/plg/plg.ts +0 -924
- package/src/generated/spacedatastandards/plg/plugin-capability.js +0 -66
- package/src/generated/spacedatastandards/plg/plugin-category.js +0 -15
- package/src/generated/spacedatastandards/plg/plugin-category.ts +0 -53
- package/src/generated/spacedatastandards/plg/plugin-dependency.js +0 -63
- package/src/generated/spacedatastandards/plg/plugin-dependency.ts +0 -86
- package/src/generated/spacedatastandards/plg/publication-state.js +0 -9
- package/src/generated/spacedatastandards/plg/purchase-tier.js +0 -9
- /package/src/generated/spacedatastandards/plg/{publication-state.ts → publicationState.ts} +0 -0
- /package/src/generated/spacedatastandards/plg/{purchase-tier.ts → purchaseTier.ts} +0 -0
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
# Module Publication Standard
|
|
2
|
+
|
|
3
|
+
This document defines how a compliant Space Data module is published through the
|
|
4
|
+
language package ecosystems used around the SDK runtime surface:
|
|
5
|
+
|
|
6
|
+
- npm
|
|
7
|
+
- PyPI
|
|
8
|
+
- Maven Central
|
|
9
|
+
- NuGet
|
|
10
|
+
- Go modules
|
|
11
|
+
- crates.io
|
|
12
|
+
- Swift Package Manager
|
|
13
|
+
|
|
14
|
+
The goal is simple: a loader should be able to inspect a package, locate the
|
|
15
|
+
module artifact, and determine whether signatures or encrypted transport
|
|
16
|
+
metadata are appended as SDS publication records in the module delivery file or
|
|
17
|
+
shipped as sidecar FlatBuffers.
|
|
18
|
+
|
|
19
|
+
## Scope
|
|
20
|
+
|
|
21
|
+
This publication standard covers two release modes:
|
|
22
|
+
|
|
23
|
+
- `standalone`: the package's primary deliverable is the SDN module itself
|
|
24
|
+
- `attached`: the package primarily exists for another language runtime, but it
|
|
25
|
+
also ships one compliant SDN module build artifact
|
|
26
|
+
|
|
27
|
+
In both cases the module artifact remains the same canonical format already
|
|
28
|
+
defined by this repo:
|
|
29
|
+
|
|
30
|
+
- a runtime payload that is valid WebAssembly bytes once any SDS publication
|
|
31
|
+
trailer has been stripped and any encrypted delivery payload has been
|
|
32
|
+
decrypted
|
|
33
|
+
- embedded `PluginManifest.fbs`
|
|
34
|
+
- manifest accessors
|
|
35
|
+
- `plugin_get_manifest_flatbuffer`
|
|
36
|
+
- `plugin_get_manifest_flatbuffer_size`
|
|
37
|
+
- optional appended SDS `REC` trailer carrying `MBL`, `PNM`, and optional `ENC`
|
|
38
|
+
|
|
39
|
+
## Core Rules
|
|
40
|
+
|
|
41
|
+
1. A signed-only or unencrypted artifact payload before any publication trailer
|
|
42
|
+
MUST remain valid `.wasm`.
|
|
43
|
+
2. An encrypted binary delivery file MUST be encoded as encrypted payload bytes
|
|
44
|
+
followed by an appended SDS `REC` trailer. The bytes before the trailer are
|
|
45
|
+
ciphertext and are not required to validate as wasm until decrypted.
|
|
46
|
+
3. If bundle, signature, or encrypted-delivery metadata are carried in the same
|
|
47
|
+
file, they MUST be appended as an SDS `REC` trailer at the end of that file.
|
|
48
|
+
4. `REC` trailers MUST carry standards-sourced `MBL` metadata plus `PNM` and
|
|
49
|
+
optional `ENC` records where applicable.
|
|
50
|
+
5. Single-file bundle metadata MUST be read from the appended `REC` trailer,
|
|
51
|
+
not from an in-wasm custom section.
|
|
52
|
+
6. Sidecar FlatBuffers are allowed when a package chooses not to append those
|
|
53
|
+
metadata payloads to the module artifact.
|
|
54
|
+
7. Paths in publication metadata are package-relative, never absolute.
|
|
55
|
+
|
|
56
|
+
## Publication Record Extensions
|
|
57
|
+
|
|
58
|
+
Publication protection metadata is expressed as standards-backed FlatBuffer
|
|
59
|
+
extensions layered on top of the canonical module artifact.
|
|
60
|
+
|
|
61
|
+
- `REC.fbs` is the trailing collection wrapper with file identifier `$REC`
|
|
62
|
+
- `MBL.fbs` is the module bundle metadata record
|
|
63
|
+
- `PNM.fbs` is the signature/publication notice record
|
|
64
|
+
- `ENC.fbs` is the encrypted-delivery record
|
|
65
|
+
|
|
66
|
+
These records are not arbitrary bytes. Loaders and publishers are expected to
|
|
67
|
+
use the generated message classes from `spacedatastandards.org` and preserve the
|
|
68
|
+
standard file identifiers:
|
|
69
|
+
|
|
70
|
+
- `REC` => `$REC`
|
|
71
|
+
- `MBL` => `$MBL`
|
|
72
|
+
- `PNM` => `$PNM`
|
|
73
|
+
- `ENC` => `$ENC`
|
|
74
|
+
|
|
75
|
+
The runtime-facing rule stays strict:
|
|
76
|
+
|
|
77
|
+
1. Strip or decrypt the publication layer first.
|
|
78
|
+
2. Instantiate the remaining raw wasm module.
|
|
79
|
+
3. Read the embedded `PluginManifest.fbs`.
|
|
80
|
+
|
|
81
|
+
`MBL`, `PNM`, and `ENC` extend publication and transport handling only. They do
|
|
82
|
+
not change the canonical module ABI or manifest exports.
|
|
83
|
+
|
|
84
|
+
## Protected Binary Layout
|
|
85
|
+
|
|
86
|
+
The official same-file protection layout is:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
protected-payload-bytes || REC-flatbuffer-bytes || uint32le(REC length) || "$REC"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
For signed-only delivery, `protected-payload-bytes` are the wasm bytes. For
|
|
93
|
+
encrypted delivery, `protected-payload-bytes` are ciphertext and the appended
|
|
94
|
+
`REC` MUST contain an `ENC` record with the decryption parameters. Loaders MUST
|
|
95
|
+
decrypt those ciphertext bytes before attempting wasm validation, manifest
|
|
96
|
+
inspection, or bundle metadata parsing.
|
|
97
|
+
|
|
98
|
+
The `PNM` content identity applies to the protected payload bytes as stored in
|
|
99
|
+
the file. For encrypted delivery this means the `PNM.CID` identifies the
|
|
100
|
+
ciphertext payload, while the decrypted bytes remain the canonical wasm module
|
|
101
|
+
that is passed to the runtime.
|
|
102
|
+
|
|
103
|
+
### `PNM` digital-signature extension
|
|
104
|
+
|
|
105
|
+
`PNM` carries the publication notice for the module:
|
|
106
|
+
|
|
107
|
+
- file identity (`FILE_NAME`, `FILE_ID`)
|
|
108
|
+
- content identity (`CID`)
|
|
109
|
+
- publish timestamp
|
|
110
|
+
- signature and signature-type metadata
|
|
111
|
+
|
|
112
|
+
In practice this is the record a host inspects to determine what artifact was
|
|
113
|
+
published and which signer attested to it.
|
|
114
|
+
|
|
115
|
+
### MBL `signature` entry — domain separation (`statementDomain`)
|
|
116
|
+
|
|
117
|
+
The detached Ed25519 signature carried as the MBL bundle's `signature`-role
|
|
118
|
+
entry has two forms, and the ARTIFACT chooses which one applies — never the
|
|
119
|
+
verifier, never a policy:
|
|
120
|
+
|
|
121
|
+
| `statementDomain` | signature covers |
|
|
122
|
+
| ---------------------------- | --------------------------------------------------- |
|
|
123
|
+
| `SDN-MODULE-PUBLICATION-V1` | `"SDN-MODULE-PUBLICATION-V1" \|\| 0x00 \|\| sha256(portable)` |
|
|
124
|
+
| absent | the bare canonical module (or bundle) digest — legacy |
|
|
125
|
+
|
|
126
|
+
`portable` is the trailer-stripped payload: the exact bytes the runtime
|
|
127
|
+
instantiates and the node's capability policy identifies by content hash.
|
|
128
|
+
|
|
129
|
+
The domain prefix exists because the node's publisher key is the NODE key, and
|
|
130
|
+
that one bonded key signs several unrelated kinds of statement (dataset
|
|
131
|
+
publications, module artifacts, and — reserved — update manifests). If every
|
|
132
|
+
statement were a bare SHA-256 digest, a caller who could reach the node's
|
|
133
|
+
signing endpoint could submit the bytes of one kind of document and staple the
|
|
134
|
+
returned signature onto another. An ASCII domain label, a `NUL` that cannot
|
|
135
|
+
occur inside the label, and a fixed-width 32-byte tail put each statement kind
|
|
136
|
+
in a disjoint message space with no length ambiguity anywhere in the preimage.
|
|
137
|
+
|
|
138
|
+
The domain registry is **closed**: a verifier refuses any label that is not
|
|
139
|
+
registered, and a module verifier additionally refuses any registered label
|
|
140
|
+
other than `SDN-MODULE-PUBLICATION-V1` — so a signature minted for a signed
|
|
141
|
+
update can never be replayed into a module trailer. Adding a domain is a
|
|
142
|
+
reviewed change in every implementation at once
|
|
143
|
+
(`src/bundle/sigdomain.js` here; `internal/sigdomain` and its kubo twin in the
|
|
144
|
+
node), never a request parameter.
|
|
145
|
+
|
|
146
|
+
`statementDomain` and `algorithm` are compared after trimming **Go's**
|
|
147
|
+
whitespace set (`unicode.IsSpace` / Unicode `White_Space`), which is not
|
|
148
|
+
JavaScript's: Go trims U+0085 NEL and JS does not, JS trims U+FEFF BOM and Go
|
|
149
|
+
does not. Either mismatch is a "loads on the node, dies in the browser" split,
|
|
150
|
+
so both are pinned by vectors rather than left to each language's default.
|
|
151
|
+
|
|
152
|
+
Legacy artifacts that predate the field keep verifying unchanged. The forms,
|
|
153
|
+
the preimage bytes and every refusal reason are pinned as shared cross-language
|
|
154
|
+
vectors in `test/support/statement-domain-vectors.json`, byte-identical to the
|
|
155
|
+
node's copies, and asserted by the JS suite and both Go suites.
|
|
156
|
+
|
|
157
|
+
### `ENC` encrypted-delivery extension
|
|
158
|
+
|
|
159
|
+
`ENC` carries the decryption parameters for a transport-protected module:
|
|
160
|
+
|
|
161
|
+
- key exchange algorithm (`X25519`)
|
|
162
|
+
- symmetric algorithm (`AES_256_GCM`; wire enum value `1`)
|
|
163
|
+
- key-derivation function (`HKDF_SHA256`)
|
|
164
|
+
- ephemeral public key
|
|
165
|
+
- nonce start (the 12-byte AES-GCM IV)
|
|
166
|
+
- optional context, schema hash, recipient key id, and root type
|
|
167
|
+
|
|
168
|
+
Encrypted delivery is authenticated:
|
|
169
|
+
|
|
170
|
+
- The protected payload bytes are laid out as `ciphertext || 16-byte GCM tag`
|
|
171
|
+
(the `ENC` schema has no dedicated tag field).
|
|
172
|
+
- The encoded `ENC` FlatBuffer record itself is the GCM additional
|
|
173
|
+
authenticated data (AAD), so the context, schema hash, root type, recipient
|
|
174
|
+
key id, nonce, and ephemeral key are all bound to the ciphertext. Tampering
|
|
175
|
+
with either the payload or the `ENC` record MUST cause decryption to fail.
|
|
176
|
+
- Records labelled `AES_256_CTR` are rejected; the SDK neither produces nor
|
|
177
|
+
decrypts unauthenticated CTR payloads.
|
|
178
|
+
|
|
179
|
+
It describes how to decrypt the protected delivery payload. It does not imply a
|
|
180
|
+
different module file format after decryption.
|
|
181
|
+
|
|
182
|
+
## Aligned-Binary Type Refs
|
|
183
|
+
|
|
184
|
+
Aligned-binary payloads use the same schema identity as the canonical
|
|
185
|
+
FlatBuffer payload. They are advertised through the `FlatBufferTypeRef`
|
|
186
|
+
extension fields:
|
|
187
|
+
|
|
188
|
+
- `wireFormat: "aligned-binary"`
|
|
189
|
+
- `rootTypeName`
|
|
190
|
+
- `byteLength`
|
|
191
|
+
- `requiredAlignment`
|
|
192
|
+
|
|
193
|
+
Every aligned-binary declaration must be paired with the regular
|
|
194
|
+
`wireFormat: "flatbuffer"` type for the same schema and file identifier in the
|
|
195
|
+
same accepted type set. Publication protection applies to the artifact as a
|
|
196
|
+
whole; aligned-binary is an invoke/payload optimization layered inside the
|
|
197
|
+
manifest contract.
|
|
198
|
+
|
|
199
|
+
## Canonical Descriptor
|
|
200
|
+
|
|
201
|
+
The canonical publication descriptor is named `sdn-module`.
|
|
202
|
+
|
|
203
|
+
When represented as a standalone JSON file, the filename is
|
|
204
|
+
`sdn-module.json`.
|
|
205
|
+
|
|
206
|
+
The full object form is:
|
|
207
|
+
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"specVersion": 1,
|
|
211
|
+
"publicationMode": "attached",
|
|
212
|
+
"module": {
|
|
213
|
+
"path": "./dist/orbit-lib.module.wasm",
|
|
214
|
+
"packaging": "sds-bundled-wasm",
|
|
215
|
+
"mediaType": "application/wasm",
|
|
216
|
+
"manifestExportSymbol": "plugin_get_manifest_flatbuffer",
|
|
217
|
+
"manifestSizeSymbol": "plugin_get_manifest_flatbuffer_size",
|
|
218
|
+
"pluginId": "com.example.orbit-lib",
|
|
219
|
+
"version": "1.2.3"
|
|
220
|
+
},
|
|
221
|
+
"artifacts": {
|
|
222
|
+
"signature": {
|
|
223
|
+
"storage": "module-trailer",
|
|
224
|
+
"schemaName": "PNM.fbs",
|
|
225
|
+
"fileIdentifier": "$PNM"
|
|
226
|
+
},
|
|
227
|
+
"transport": {
|
|
228
|
+
"storage": "module-trailer",
|
|
229
|
+
"schemaName": "ENC.fbs",
|
|
230
|
+
"fileIdentifier": "$ENC"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"integrity": {
|
|
234
|
+
"moduleSha256": "2bff0d3d8f4f5aa1d0c7be3e54e15f9f8c9f3a62d5f0a4e8a8d80de28f4f0b31"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Required Fields
|
|
240
|
+
|
|
241
|
+
- `specVersion`: publication spec version, currently `1`
|
|
242
|
+
- `publicationMode`: `standalone` or `attached`
|
|
243
|
+
- `module.path`: relative path to the `.wasm` artifact
|
|
244
|
+
|
|
245
|
+
### Recommended Module Repo Build Layout
|
|
246
|
+
|
|
247
|
+
When authoring a module repo before publication packaging, keep the shared
|
|
248
|
+
compiled artifact at a stable runtime path:
|
|
249
|
+
|
|
250
|
+
- required: `dist/isomorphic/module.wasm`
|
|
251
|
+
|
|
252
|
+
If the repo also ships a browser-specific adapter or wrapper, place it beside
|
|
253
|
+
the browser runtime path:
|
|
254
|
+
|
|
255
|
+
- optional: `dist/browser/module.js`
|
|
256
|
+
- optional: `dist/browser/module.wasm`
|
|
257
|
+
|
|
258
|
+
The publication descriptor can still point anywhere, but the SDK standard for
|
|
259
|
+
checked-in module repos is that the exact shared browser/WasmEdge build lands at
|
|
260
|
+
`dist/isomorphic/module.wasm`.
|
|
261
|
+
|
|
262
|
+
### Recommended Fields
|
|
263
|
+
|
|
264
|
+
- `module.packaging`: `plain-wasm` or `sds-bundled-wasm`
|
|
265
|
+
- `module.mediaType`: normally `application/wasm`
|
|
266
|
+
- `module.manifestExportSymbol`
|
|
267
|
+
- `module.manifestSizeSymbol`
|
|
268
|
+
- `module.pluginId`
|
|
269
|
+
- `module.version`
|
|
270
|
+
- `integrity.moduleSha256`
|
|
271
|
+
|
|
272
|
+
### Artifact Descriptors
|
|
273
|
+
|
|
274
|
+
Each optional entry inside `artifacts` describes one metadata payload related to
|
|
275
|
+
the module:
|
|
276
|
+
|
|
277
|
+
- `authorization`
|
|
278
|
+
- `signature`
|
|
279
|
+
- `transport`
|
|
280
|
+
- `attestation`
|
|
281
|
+
|
|
282
|
+
An artifact descriptor has this shape:
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"storage": "module-trailer",
|
|
287
|
+
"path": "./dist/orbit-lib.signature.fb",
|
|
288
|
+
"schemaName": "PNM.fbs",
|
|
289
|
+
"fileIdentifier": "$PNM"
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Rules:
|
|
294
|
+
|
|
295
|
+
- `storage` MUST be `module-trailer` or `package-file`
|
|
296
|
+
- `module-trailer` means the loader scans the end of `module.path` for an
|
|
297
|
+
appended `REC` trailer and resolves the matching record from there
|
|
298
|
+
- `path` MUST be present when `storage` is `package-file`
|
|
299
|
+
- `schemaName` SHOULD name the SDS FlatBuffer schema
|
|
300
|
+
- `fileIdentifier` SHOULD name the FlatBuffer file identifier
|
|
301
|
+
|
|
302
|
+
## Minimal Shorthand
|
|
303
|
+
|
|
304
|
+
Package manifests that support arbitrary metadata MAY use a shorthand string
|
|
305
|
+
when all of the following are true:
|
|
306
|
+
|
|
307
|
+
- the package only needs to point to one module file
|
|
308
|
+
- the module uses the default manifest accessor exports
|
|
309
|
+
- all signature and transport metadata are either absent or appended through a
|
|
310
|
+
`REC` trailer
|
|
311
|
+
|
|
312
|
+
Example:
|
|
313
|
+
|
|
314
|
+
```json
|
|
315
|
+
{
|
|
316
|
+
"name": "@example/orbit-lib",
|
|
317
|
+
"version": "1.2.3",
|
|
318
|
+
"sdn-module": "./dist/orbit-lib.module.wasm"
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
`sdn-module.json` files MUST use the full object form, not the string
|
|
323
|
+
shorthand.
|
|
324
|
+
|
|
325
|
+
## Resolution Rules
|
|
326
|
+
|
|
327
|
+
A package consumer resolves publication metadata in this order:
|
|
328
|
+
|
|
329
|
+
1. Read the ecosystem-specific `sdn-module` carrier if one exists.
|
|
330
|
+
2. If that carrier is a string, treat it as `module.path`.
|
|
331
|
+
3. If that carrier is an object, use it directly.
|
|
332
|
+
4. If the package has no inline carrier, look for `sdn-module.json`.
|
|
333
|
+
5. For JVM artifacts, also look for `META-INF/sdn-module.json`.
|
|
334
|
+
6. Resolve `module.path` and any `package-file` sidecars relative to the
|
|
335
|
+
package root or archive root.
|
|
336
|
+
|
|
337
|
+
## Packaging By Ecosystem
|
|
338
|
+
|
|
339
|
+
| Ecosystem | Recommended carrier |
|
|
340
|
+
|---|---|
|
|
341
|
+
| npm | `package.json["sdn-module"]` |
|
|
342
|
+
| PyPI | `pyproject.toml [tool."sdn-module"]` |
|
|
343
|
+
| crates.io | `Cargo.toml [package.metadata."sdn-module"]` |
|
|
344
|
+
| Maven Central | `META-INF/sdn-module.json` inside the JAR, optionally mirrored by a POM property |
|
|
345
|
+
| NuGet | `sdn-module.json` at package root, optionally surfaced through build metadata |
|
|
346
|
+
| Go modules | `sdn-module.json` at module root |
|
|
347
|
+
| Swift Package Manager | `sdn-module.json` at package root |
|
|
348
|
+
|
|
349
|
+
### npm
|
|
350
|
+
|
|
351
|
+
Minimal attached example:
|
|
352
|
+
|
|
353
|
+
```json
|
|
354
|
+
{
|
|
355
|
+
"name": "@example/orbit-lib",
|
|
356
|
+
"version": "1.2.3",
|
|
357
|
+
"sdn-module": "./dist/orbit-lib.module.wasm"
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Full example:
|
|
362
|
+
|
|
363
|
+
```json
|
|
364
|
+
{
|
|
365
|
+
"name": "@example/orbit-lib",
|
|
366
|
+
"version": "1.2.3",
|
|
367
|
+
"sdn-module": {
|
|
368
|
+
"specVersion": 1,
|
|
369
|
+
"publicationMode": "attached",
|
|
370
|
+
"module": {
|
|
371
|
+
"path": "./dist/orbit-lib.module.wasm",
|
|
372
|
+
"packaging": "sds-bundled-wasm",
|
|
373
|
+
"mediaType": "application/wasm",
|
|
374
|
+
"manifestExportSymbol": "plugin_get_manifest_flatbuffer",
|
|
375
|
+
"manifestSizeSymbol": "plugin_get_manifest_flatbuffer_size"
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
### PyPI
|
|
382
|
+
|
|
383
|
+
```toml
|
|
384
|
+
[tool."sdn-module"]
|
|
385
|
+
specVersion = 1
|
|
386
|
+
publicationMode = "attached"
|
|
387
|
+
|
|
388
|
+
[tool."sdn-module".module]
|
|
389
|
+
path = "./dist/orbit-lib.module.wasm"
|
|
390
|
+
packaging = "sds-bundled-wasm"
|
|
391
|
+
mediaType = "application/wasm"
|
|
392
|
+
manifestExportSymbol = "plugin_get_manifest_flatbuffer"
|
|
393
|
+
manifestSizeSymbol = "plugin_get_manifest_flatbuffer_size"
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
### crates.io
|
|
397
|
+
|
|
398
|
+
```toml
|
|
399
|
+
[package.metadata."sdn-module"]
|
|
400
|
+
specVersion = 1
|
|
401
|
+
publicationMode = "attached"
|
|
402
|
+
|
|
403
|
+
[package.metadata."sdn-module".module]
|
|
404
|
+
path = "./dist/orbit-lib.module.wasm"
|
|
405
|
+
packaging = "sds-bundled-wasm"
|
|
406
|
+
mediaType = "application/wasm"
|
|
407
|
+
manifestExportSymbol = "plugin_get_manifest_flatbuffer"
|
|
408
|
+
manifestSizeSymbol = "plugin_get_manifest_flatbuffer_size"
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Maven Central And Kotlin
|
|
412
|
+
|
|
413
|
+
Ship a JSON descriptor in the archive:
|
|
414
|
+
|
|
415
|
+
```text
|
|
416
|
+
src/main/resources/META-INF/sdn-module.json
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
Optional POM property:
|
|
420
|
+
|
|
421
|
+
```xml
|
|
422
|
+
<properties>
|
|
423
|
+
<sdn.module.descriptor>META-INF/sdn-module.json</sdn.module.descriptor>
|
|
424
|
+
</properties>
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### NuGet
|
|
428
|
+
|
|
429
|
+
Ship the descriptor at package root:
|
|
430
|
+
|
|
431
|
+
```text
|
|
432
|
+
sdn-module.json
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
The `.nupkg` should also contain the module artifact at the relative path named
|
|
436
|
+
by `module.path`.
|
|
437
|
+
|
|
438
|
+
### Go Modules
|
|
439
|
+
|
|
440
|
+
Ship `sdn-module.json` at the module root next to `go.mod`.
|
|
441
|
+
|
|
442
|
+
### Swift Package Manager
|
|
443
|
+
|
|
444
|
+
Ship `sdn-module.json` at the package root. If the module artifact must be
|
|
445
|
+
available through a target at runtime, include the `.wasm` and sidecar files as
|
|
446
|
+
resources or through a binary-target wrapper.
|
|
447
|
+
|
|
448
|
+
## Standalone Publication Example
|
|
449
|
+
|
|
450
|
+
`sdn-module.json`
|
|
451
|
+
|
|
452
|
+
```json
|
|
453
|
+
{
|
|
454
|
+
"specVersion": 1,
|
|
455
|
+
"publicationMode": "standalone",
|
|
456
|
+
"module": {
|
|
457
|
+
"path": "./dist/catalog-query.bundle.wasm",
|
|
458
|
+
"packaging": "sds-bundled-wasm",
|
|
459
|
+
"mediaType": "application/wasm",
|
|
460
|
+
"manifestExportSymbol": "plugin_get_manifest_flatbuffer",
|
|
461
|
+
"manifestSizeSymbol": "plugin_get_manifest_flatbuffer_size",
|
|
462
|
+
"pluginId": "org.example.catalog-query",
|
|
463
|
+
"version": "0.2.0"
|
|
464
|
+
},
|
|
465
|
+
"artifacts": {
|
|
466
|
+
"signature": {
|
|
467
|
+
"storage": "module-trailer",
|
|
468
|
+
"schemaName": "PNM.fbs",
|
|
469
|
+
"fileIdentifier": "$PNM"
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
## Attached Publication Example
|
|
476
|
+
|
|
477
|
+
`sdn-module.json`
|
|
478
|
+
|
|
479
|
+
```json
|
|
480
|
+
{
|
|
481
|
+
"specVersion": 1,
|
|
482
|
+
"publicationMode": "attached",
|
|
483
|
+
"module": {
|
|
484
|
+
"path": "./dist/orbit-lib.module.wasm",
|
|
485
|
+
"packaging": "plain-wasm",
|
|
486
|
+
"mediaType": "application/wasm",
|
|
487
|
+
"manifestExportSymbol": "plugin_get_manifest_flatbuffer",
|
|
488
|
+
"manifestSizeSymbol": "plugin_get_manifest_flatbuffer_size",
|
|
489
|
+
"pluginId": "com.example.orbit-lib",
|
|
490
|
+
"version": "1.2.3"
|
|
491
|
+
},
|
|
492
|
+
"artifacts": {
|
|
493
|
+
"signature": {
|
|
494
|
+
"storage": "package-file",
|
|
495
|
+
"path": "./dist/orbit-lib.signature.fb",
|
|
496
|
+
"schemaName": "PNM.fbs",
|
|
497
|
+
"fileIdentifier": "$PNM"
|
|
498
|
+
},
|
|
499
|
+
"transport": {
|
|
500
|
+
"storage": "package-file",
|
|
501
|
+
"path": "./dist/orbit-lib.transport.fb",
|
|
502
|
+
"schemaName": "ENC.fbs",
|
|
503
|
+
"fileIdentifier": "$ENC"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
## Loader Expectations
|
|
510
|
+
|
|
511
|
+
A loader consuming this standard SHOULD:
|
|
512
|
+
|
|
513
|
+
1. locate the publication descriptor
|
|
514
|
+
2. read `module.path`
|
|
515
|
+
3. scan the artifact from the end for an appended SDS `REC` trailer
|
|
516
|
+
4. resolve `PNM` / `ENC` from that trailer before runtime startup
|
|
517
|
+
5. if `ENC` is present, decrypt the protected payload bytes before passing bytes
|
|
518
|
+
to WasmEdge or any other runtime
|
|
519
|
+
6. if `ENC` is absent, strip the trailer and use the remaining wasm payload
|
|
520
|
+
7. inspect the parsed `REC` trailer for `MBL`
|
|
521
|
+
8. resolve any `package-file` metadata through relative paths
|
|
522
|
+
9. validate manifest exports and any declared integrity hashes
|
|
523
|
+
|
|
524
|
+
If `module.packaging` is `sds-bundled-wasm`, loaders SHOULD treat the decrypted
|
|
525
|
+
or stripped wasm payload as the runtime artifact and the appended `REC` trailer
|
|
526
|
+
as the single-file bundle/publication metadata container.
|
|
527
|
+
|
|
528
|
+
## Relationship To Existing Bundle Format
|
|
529
|
+
|
|
530
|
+
This standard uses the appended `REC` trailer as the single-file publication
|
|
531
|
+
container. It explains how a package publishes and points to the module
|
|
532
|
+
artifact plus any appended SDS publication trailer.
|
|
533
|
+
|
|
534
|
+
- `REC` stays the appended single-file/publication record container
|
|
535
|
+
- `MBL` carries bundle metadata inside that trailer
|
|
536
|
+
- `sdn-module` is the package-discovery descriptor
|
|
537
|
+
|
|
538
|
+
Use the appended `REC` trailer when you want one self-describing protected
|
|
539
|
+
artifact. Use `sdn-module` when you want package managers and loaders to
|
|
540
|
+
discover that file reliably.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Node-RED Default Node Parity Matrix
|
|
2
|
+
|
|
3
|
+
This matrix defines the deployment intent for compiled hosted-runtime artifacts.
|
|
4
|
+
|
|
5
|
+
Use three buckets:
|
|
6
|
+
|
|
7
|
+
- `wasi`: strict standalone WASI with no wrapper requirement
|
|
8
|
+
- `wasmedge`: standard server-side deployment target for maximum WASI
|
|
9
|
+
compatibility
|
|
10
|
+
- `wrapper/delegated`: browser targets or features that still need host
|
|
11
|
+
mediation
|
|
12
|
+
|
|
13
|
+
The practical reason for `wasmedge` is simple: standalone WASI still does not
|
|
14
|
+
give us portable networking parity, while WasmEdge adds socket, DNS, and TLS
|
|
15
|
+
extensions that make guest-owned network services realistic.
|
|
16
|
+
|
|
17
|
+
## `wasi` Target
|
|
18
|
+
|
|
19
|
+
These should run as plain standalone WASI programs with no wrapper layer:
|
|
20
|
+
|
|
21
|
+
- `change`
|
|
22
|
+
- `switch`
|
|
23
|
+
- `range`
|
|
24
|
+
- `template`
|
|
25
|
+
- `json`
|
|
26
|
+
- `csv`
|
|
27
|
+
- `yaml`
|
|
28
|
+
- `xml`
|
|
29
|
+
- `html`
|
|
30
|
+
- `split`
|
|
31
|
+
- `join`
|
|
32
|
+
- `batch`
|
|
33
|
+
- `sort`
|
|
34
|
+
- `rbe`
|
|
35
|
+
- `link in`
|
|
36
|
+
- `link out`
|
|
37
|
+
- `link call`
|
|
38
|
+
- `debug`
|
|
39
|
+
- deterministic flow routing and payload transforms
|
|
40
|
+
- `file` and `file in` when limited to WASI preopen/file access
|
|
41
|
+
|
|
42
|
+
Notes:
|
|
43
|
+
|
|
44
|
+
- `inject` only fits this bucket for direct/manual triggering, not scheduling.
|
|
45
|
+
- `file` parity here excludes file watching.
|
|
46
|
+
|
|
47
|
+
## `wasmedge` Target
|
|
48
|
+
|
|
49
|
+
These should aim to run in guest logic on WasmEdge without an extra wrapper:
|
|
50
|
+
|
|
51
|
+
- outbound `http request`
|
|
52
|
+
- inbound `http in` plus `http response`
|
|
53
|
+
- guest-owned TCP client/server behavior
|
|
54
|
+
- guest-owned UDP behavior
|
|
55
|
+
- guest-owned TLS/HTTPS behavior
|
|
56
|
+
- direct protocol services built on sockets
|
|
57
|
+
- WebSocket logic implemented in guest libraries over sockets/TLS
|
|
58
|
+
- MQTT logic implemented in guest libraries over sockets/TLS
|
|
59
|
+
|
|
60
|
+
Notes:
|
|
61
|
+
|
|
62
|
+
- `websocket` and `mqtt` are guest-library targets, not direct WasmEdge runtime
|
|
63
|
+
APIs.
|
|
64
|
+
- prefer guest-owned protocol stacks over host wrappers whenever WasmEdge
|
|
65
|
+
sockets/TLS are sufficient.
|
|
66
|
+
|
|
67
|
+
## Wrapper Or Delegated Host Required
|
|
68
|
+
|
|
69
|
+
These still require wrappers, delegated services, or explicit runtime support
|
|
70
|
+
outside the guest:
|
|
71
|
+
|
|
72
|
+
- `watch`
|
|
73
|
+
- `exec`
|
|
74
|
+
- cron-style `inject`
|
|
75
|
+
- `delay` and `trigger` when they depend on wall-clock scheduling
|
|
76
|
+
- `complete`
|
|
77
|
+
- `catch`
|
|
78
|
+
- `status`
|
|
79
|
+
- browser-local inbound listeners
|
|
80
|
+
- browser-local durable filesystem behavior beyond browser storage adapters
|
|
81
|
+
- any feature that depends on OS process control or file watching
|
|
82
|
+
|
|
83
|
+
## Planning Rule
|
|
84
|
+
|
|
85
|
+
If a node can be implemented entirely inside guest code on top of standard WASI
|
|
86
|
+
or WasmEdge extensions, it should not be modeled as a host capability. Host
|
|
87
|
+
capabilities should be reserved for features that truly still need wrappers or
|
|
88
|
+
delegated services.
|