space-data-module-sdk 0.8.4 → 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 +25 -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,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publication visibility for the plugin listing
|
|
3
|
+
*/
|
|
4
|
+
export declare enum publicationState {
|
|
5
|
+
/**
|
|
6
|
+
* Discoverable in public storefront listings
|
|
7
|
+
*/
|
|
8
|
+
Public = 0,
|
|
9
|
+
/**
|
|
10
|
+
* Addressable directly but hidden from public browse surfaces
|
|
11
|
+
*/
|
|
12
|
+
Unlisted = 1,
|
|
13
|
+
/**
|
|
14
|
+
* No longer offered for new installs or purchases
|
|
15
|
+
*/
|
|
16
|
+
Retired = 2
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=publicationState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicationState.d.ts","sourceRoot":"","sources":["../../../ts/PLG/publicationState.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,oBAAY,gBAAgB;IAC1B;;OAEG;IACH,MAAM,IAAI;IAEV;;OAEG;IACH,QAAQ,IAAI;IAEZ;;OAEG;IACH,OAAO,IAAI;CACZ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
/**
|
|
4
|
+
* Publication visibility for the plugin listing
|
|
5
|
+
*/
|
|
6
|
+
export var publicationState;
|
|
7
|
+
(function (publicationState) {
|
|
8
|
+
/**
|
|
9
|
+
* Discoverable in public storefront listings
|
|
10
|
+
*/
|
|
11
|
+
publicationState[publicationState["Public"] = 0] = "Public";
|
|
12
|
+
/**
|
|
13
|
+
* Addressable directly but hidden from public browse surfaces
|
|
14
|
+
*/
|
|
15
|
+
publicationState[publicationState["Unlisted"] = 1] = "Unlisted";
|
|
16
|
+
/**
|
|
17
|
+
* No longer offered for new installs or purchases
|
|
18
|
+
*/
|
|
19
|
+
publicationState[publicationState["Retired"] = 2] = "Retired";
|
|
20
|
+
})(publicationState || (publicationState = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Storefront payment model for the plugin listing
|
|
3
|
+
*/
|
|
4
|
+
export declare enum purchaseTier {
|
|
5
|
+
/**
|
|
6
|
+
* No payment required
|
|
7
|
+
*/
|
|
8
|
+
Free = 0,
|
|
9
|
+
/**
|
|
10
|
+
* Single one-time purchase
|
|
11
|
+
*/
|
|
12
|
+
OneTime = 1,
|
|
13
|
+
/**
|
|
14
|
+
* Recurring subscription purchase
|
|
15
|
+
*/
|
|
16
|
+
Subscription = 2
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=purchaseTier.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purchaseTier.d.ts","sourceRoot":"","sources":["../../../ts/PLG/purchaseTier.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,oBAAY,YAAY;IACtB;;OAEG;IACH,IAAI,IAAI;IAER;;OAEG;IACH,OAAO,IAAI;IAEX;;OAEG;IACH,YAAY,IAAI;CACjB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
3
|
+
/**
|
|
4
|
+
* Storefront payment model for the plugin listing
|
|
5
|
+
*/
|
|
6
|
+
export var purchaseTier;
|
|
7
|
+
(function (purchaseTier) {
|
|
8
|
+
/**
|
|
9
|
+
* No payment required
|
|
10
|
+
*/
|
|
11
|
+
purchaseTier[purchaseTier["Free"] = 0] = "Free";
|
|
12
|
+
/**
|
|
13
|
+
* Single one-time purchase
|
|
14
|
+
*/
|
|
15
|
+
purchaseTier[purchaseTier["OneTime"] = 1] = "OneTime";
|
|
16
|
+
/**
|
|
17
|
+
* Recurring subscription purchase
|
|
18
|
+
*/
|
|
19
|
+
purchaseTier[purchaseTier["Subscription"] = 2] = "Subscription";
|
|
20
|
+
})(purchaseTier || (purchaseTier = {}));
|
package/src/host/AGENTS.md
CHANGED
|
@@ -5,7 +5,7 @@ host/runtime boundary that compliant modules can rely on.
|
|
|
5
5
|
|
|
6
6
|
## What Authors Should Take From This Directory
|
|
7
7
|
|
|
8
|
-
- The portable shared path is standalone WASI, optionally plus `
|
|
8
|
+
- The portable shared path is standalone WASI, optionally plus `space_data_module_host`.
|
|
9
9
|
- Browser helpers here are host-side shims and harnesses, not proof that raw
|
|
10
10
|
WasmEdge-native guest imports are browser-portable.
|
|
11
11
|
- The isomorphic loader and browser harness show how the same artifact is meant
|
|
@@ -14,7 +14,7 @@ host/runtime boundary that compliant modules can rely on.
|
|
|
14
14
|
## Host Rules Authors Should Follow
|
|
15
15
|
|
|
16
16
|
- Shared browser/WasmEdge artifacts must stay within standalone WASI plus the
|
|
17
|
-
optional `
|
|
17
|
+
optional `space_data_module_host` bridge. Raw WasmEdge-native extension imports are not
|
|
18
18
|
browser-isomorphic.
|
|
19
19
|
- Browser shims are host-side replacements, not a promise that the guest can
|
|
20
20
|
import WasmEdge-native sockets, TLS, or filesystem extensions directly.
|
package/src/host/abi.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
attachBinaryValues,
|
|
3
|
+
decodeHostcallEnvelope,
|
|
4
|
+
detachBinaryValues,
|
|
5
|
+
encodeHostcallEnvelope,
|
|
6
|
+
} from "./hostcallWire.js";
|
|
2
7
|
|
|
3
8
|
const textDecoder = new TextDecoder();
|
|
4
|
-
const textEncoder = new TextEncoder();
|
|
5
9
|
|
|
6
|
-
export const DEFAULT_HOSTCALL_IMPORT_MODULE = "
|
|
10
|
+
export const DEFAULT_HOSTCALL_IMPORT_MODULE = "space_data_module_host";
|
|
7
11
|
export const HOSTCALL_STATUS_OK = 0;
|
|
8
12
|
export const HOSTCALL_STATUS_ERROR = 1;
|
|
9
13
|
|
|
@@ -152,15 +156,12 @@ function writeMemoryBytes(getMemory, ptr, bytes, maxLen) {
|
|
|
152
156
|
return bytesToCopy;
|
|
153
157
|
}
|
|
154
158
|
|
|
155
|
-
function
|
|
159
|
+
function parseHostcallParams(bytes) {
|
|
156
160
|
if (bytes.length === 0) {
|
|
157
161
|
return null;
|
|
158
162
|
}
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
return null;
|
|
162
|
-
}
|
|
163
|
-
return JSON.parse(text);
|
|
163
|
+
const { meta, segments } = decodeHostcallEnvelope(bytes);
|
|
164
|
+
return attachBinaryValues(meta, segments);
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
function serializeHostcallError(error, operation = null) {
|
|
@@ -190,47 +191,6 @@ function assertSyncHostcallResult(value, operation) {
|
|
|
190
191
|
return value;
|
|
191
192
|
}
|
|
192
193
|
|
|
193
|
-
function encodeHostcallValue(value) {
|
|
194
|
-
if (value === undefined) {
|
|
195
|
-
return undefined;
|
|
196
|
-
}
|
|
197
|
-
if (
|
|
198
|
-
value instanceof Uint8Array ||
|
|
199
|
-
value instanceof ArrayBuffer ||
|
|
200
|
-
ArrayBuffer.isView(value)
|
|
201
|
-
) {
|
|
202
|
-
const bytes =
|
|
203
|
-
value instanceof Uint8Array
|
|
204
|
-
? value
|
|
205
|
-
: new Uint8Array(
|
|
206
|
-
value.buffer ?? value,
|
|
207
|
-
value.byteOffset ?? 0,
|
|
208
|
-
value.byteLength ?? value.byteLength,
|
|
209
|
-
);
|
|
210
|
-
return {
|
|
211
|
-
__type: "bytes",
|
|
212
|
-
base64: bytesToBase64(bytes),
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
if (value instanceof Date) {
|
|
216
|
-
return value.toISOString();
|
|
217
|
-
}
|
|
218
|
-
if (typeof value === "bigint") {
|
|
219
|
-
return value.toString();
|
|
220
|
-
}
|
|
221
|
-
if (Array.isArray(value)) {
|
|
222
|
-
return value.map((entry) => encodeHostcallValue(entry));
|
|
223
|
-
}
|
|
224
|
-
if (value && typeof value === "object") {
|
|
225
|
-
return Object.fromEntries(
|
|
226
|
-
Object.entries(value)
|
|
227
|
-
.filter(([, entry]) => entry !== undefined)
|
|
228
|
-
.map(([key, entry]) => [key, encodeHostcallValue(entry)]),
|
|
229
|
-
);
|
|
230
|
-
}
|
|
231
|
-
return value;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
194
|
export function dispatchHostSyncOperation(host, operation, params = null) {
|
|
235
195
|
const normalized = assertNonEmptyString(operation, "Hostcall operation");
|
|
236
196
|
switch (normalized) {
|
|
@@ -300,6 +260,25 @@ export function dispatchHostSyncOperation(host, operation, params = null) {
|
|
|
300
260
|
),
|
|
301
261
|
normalized,
|
|
302
262
|
);
|
|
263
|
+
case "crypto.secp256k1.publicKeyFromPrivate":
|
|
264
|
+
return assertSyncHostcallResult(
|
|
265
|
+
host.crypto.secp256k1.publicKeyFromPrivate(params?.privateKey),
|
|
266
|
+
normalized,
|
|
267
|
+
);
|
|
268
|
+
case "crypto.secp256k1.sign":
|
|
269
|
+
return assertSyncHostcallResult(
|
|
270
|
+
host.crypto.secp256k1.sign(params?.message, params?.privateKey),
|
|
271
|
+
normalized,
|
|
272
|
+
);
|
|
273
|
+
case "crypto.secp256k1.verify":
|
|
274
|
+
return assertSyncHostcallResult(
|
|
275
|
+
host.crypto.secp256k1.verify(
|
|
276
|
+
params?.message,
|
|
277
|
+
params?.signature,
|
|
278
|
+
params?.publicKey,
|
|
279
|
+
),
|
|
280
|
+
normalized,
|
|
281
|
+
);
|
|
303
282
|
case "crypto.ed25519.publicKeyFromSeed":
|
|
304
283
|
return assertSyncHostcallResult(
|
|
305
284
|
host.crypto.ed25519.publicKeyFromSeed(params?.seed),
|
|
@@ -379,10 +358,18 @@ export function createAsyncHostDispatcher(host) {
|
|
|
379
358
|
dispatchHostOperation(host, operation, params);
|
|
380
359
|
}
|
|
381
360
|
|
|
382
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Synchronous hostcall bridge using the binary hostcall wire format.
|
|
363
|
+
*
|
|
364
|
+
* Modules import `space_data_module_host.call` with a binary envelope
|
|
365
|
+
* payload (length-prefixed meta JSON + raw byte segments — see
|
|
366
|
+
* hostcallWire.js). Binary values never round-trip through base64/JSON;
|
|
367
|
+
* the JSON meta document carries only small control metadata.
|
|
368
|
+
*/
|
|
369
|
+
export function createHostcallBridge(options = {}) {
|
|
383
370
|
const dispatch = options.dispatch;
|
|
384
371
|
if (typeof dispatch !== "function") {
|
|
385
|
-
throw new TypeError("
|
|
372
|
+
throw new TypeError("createHostcallBridge requires a dispatch function.");
|
|
386
373
|
}
|
|
387
374
|
|
|
388
375
|
const getMemory = options.getMemory;
|
|
@@ -392,17 +379,19 @@ export function createJsonHostcallBridge(options = {}) {
|
|
|
392
379
|
);
|
|
393
380
|
const maxRequestBytes = Number.isInteger(options.maxRequestBytes)
|
|
394
381
|
? options.maxRequestBytes
|
|
395
|
-
:
|
|
382
|
+
: 16 * 1024 * 1024;
|
|
396
383
|
const maxResponseBytes = Number.isInteger(options.maxResponseBytes)
|
|
397
384
|
? options.maxResponseBytes
|
|
398
|
-
: 1024 * 1024;
|
|
385
|
+
: 64 * 1024 * 1024;
|
|
399
386
|
|
|
400
387
|
let lastStatusCode = HOSTCALL_STATUS_OK;
|
|
401
388
|
let lastEnvelope = { ok: true, result: null };
|
|
402
|
-
let lastResponseBytes =
|
|
389
|
+
let lastResponseBytes = encodeHostcallEnvelope(lastEnvelope, []);
|
|
403
390
|
|
|
404
391
|
function setEnvelope(statusCode, envelope) {
|
|
405
|
-
const
|
|
392
|
+
const segments = [];
|
|
393
|
+
const meta = detachBinaryValues(envelope, segments);
|
|
394
|
+
const encoded = encodeHostcallEnvelope(meta, segments);
|
|
406
395
|
if (encoded.length > maxResponseBytes) {
|
|
407
396
|
throw new Error(
|
|
408
397
|
`Hostcall response exceeds ${maxResponseBytes} byte limit.`,
|
|
@@ -413,7 +402,7 @@ export function createJsonHostcallBridge(options = {}) {
|
|
|
413
402
|
lastResponseBytes = encoded;
|
|
414
403
|
}
|
|
415
404
|
|
|
416
|
-
function
|
|
405
|
+
function call(operationPtr, operationLen, payloadPtr, payloadLen) {
|
|
417
406
|
try {
|
|
418
407
|
if (payloadLen > maxRequestBytes) {
|
|
419
408
|
throw new Error(
|
|
@@ -423,7 +412,7 @@ export function createJsonHostcallBridge(options = {}) {
|
|
|
423
412
|
const operation = textDecoder.decode(
|
|
424
413
|
readMemoryBytes(getMemory, operationPtr, operationLen, "Operation"),
|
|
425
414
|
);
|
|
426
|
-
const params =
|
|
415
|
+
const params = parseHostcallParams(
|
|
427
416
|
readMemoryBytes(getMemory, payloadPtr, payloadLen, "Payload"),
|
|
428
417
|
);
|
|
429
418
|
const result = dispatch(operation, params);
|
|
@@ -434,7 +423,7 @@ export function createJsonHostcallBridge(options = {}) {
|
|
|
434
423
|
}
|
|
435
424
|
setEnvelope(HOSTCALL_STATUS_OK, {
|
|
436
425
|
ok: true,
|
|
437
|
-
result:
|
|
426
|
+
result: result === undefined ? null : result,
|
|
438
427
|
});
|
|
439
428
|
return HOSTCALL_STATUS_OK;
|
|
440
429
|
} catch (error) {
|
|
@@ -477,7 +466,7 @@ export function createJsonHostcallBridge(options = {}) {
|
|
|
477
466
|
moduleName,
|
|
478
467
|
imports: {
|
|
479
468
|
[moduleName]: {
|
|
480
|
-
|
|
469
|
+
call,
|
|
481
470
|
response_len: responseLen,
|
|
482
471
|
read_response: readResponse,
|
|
483
472
|
clear_response: clearResponse,
|
|
@@ -490,11 +479,9 @@ export function createJsonHostcallBridge(options = {}) {
|
|
|
490
479
|
getLastResponseBytes() {
|
|
491
480
|
return new Uint8Array(lastResponseBytes);
|
|
492
481
|
},
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
getLastResponseJson() {
|
|
497
|
-
return JSON.parse(this.getLastResponseText());
|
|
482
|
+
getLastResponseEnvelope() {
|
|
483
|
+
const { meta, segments } = decodeHostcallEnvelope(lastResponseBytes);
|
|
484
|
+
return attachBinaryValues(meta, segments);
|
|
498
485
|
},
|
|
499
486
|
};
|
|
500
487
|
}
|
|
@@ -507,7 +494,7 @@ export function createNodeHostSyncHostcallBridge(options = {}) {
|
|
|
507
494
|
);
|
|
508
495
|
}
|
|
509
496
|
|
|
510
|
-
return
|
|
497
|
+
return createHostcallBridge({
|
|
511
498
|
...options,
|
|
512
499
|
dispatch: createNodeHostSyncDispatcher(host),
|
|
513
500
|
});
|