space-data-module-sdk 0.8.27 → 0.9.1
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 +5 -4
- package/docs/assembly.js +0 -18
- package/docs/assets/ai-credits/ai-credits.js +116 -0
- package/docs/assets/sdn-chrome/sdn-chrome.css +434 -0
- package/docs/assets/sdn-chrome/sdn-chrome.js +236 -0
- package/docs/browser-wasmedge-isomorphic.html +29 -41
- package/docs/byo-wasm-quickstart.html +29 -41
- package/docs/conformance.html +29 -41
- package/docs/events-abi.html +29 -41
- package/docs/families/analytics.html +29 -41
- package/docs/families/attitude.html +29 -41
- package/docs/families/behavior.html +29 -41
- package/docs/families/breakup.html +29 -41
- package/docs/families/conjunction.html +29 -41
- package/docs/families/data-source.html +29 -41
- package/docs/families/effects.html +29 -41
- package/docs/families/environment.html +29 -41
- package/docs/families/estimation.html +29 -41
- package/docs/families/gnc.html +29 -41
- package/docs/families/maneuver.html +29 -41
- package/docs/families/obstruction.html +29 -41
- package/docs/families/propagator.html +29 -41
- package/docs/families/propulsion.html +29 -41
- package/docs/families/reentry.html +29 -41
- package/docs/families/rf.html +29 -41
- package/docs/families/scheduler.html +29 -41
- package/docs/families/sensor.html +29 -41
- package/docs/families/signature.html +29 -41
- package/docs/flatsql-host-contract.html +29 -41
- package/docs/flatsql-streaming-standard.html +29 -41
- package/docs/gpu-module-abi.html +29 -41
- package/docs/index.html +43 -47
- package/docs/isomorphic-pthreads.html +29 -41
- package/docs/isomorphic-sdn-runtime-plan.html +29 -41
- package/docs/language-runtime-matrix.html +29 -41
- package/docs/media/module-sdk-reel-poster.webp +0 -0
- package/docs/media/module-sdk-reel.mp4 +0 -0
- package/docs/media/module-sdk-reel.webm +0 -0
- package/docs/media/reel/reel.css +53 -0
- package/docs/media/reel/reel.js +272 -0
- package/docs/module-bundle-runtime-plan.html +29 -41
- package/docs/module-publication-standard.html +29 -41
- package/docs/node-red-default-node-parity.html +29 -41
- package/docs/protect-and-sign.html +29 -41
- package/docs/protocol-installation.html +29 -41
- package/docs/publication-submission.html +29 -41
- package/docs/secrets-capability.html +29 -41
- package/docs/styles.css +89 -157
- package/docs/testing-harness.html +29 -41
- package/docs/tri-runtime-parity-gate.html +29 -41
- package/docs/tri-runtime-parity.html +29 -41
- package/package.json +5 -3
- package/schemas/runtime/FlowNotice.fbs +39 -0
- package/schemas/runtime/HostOps.fbs +455 -0
- package/schemas/runtime/HttpRequest.fbs +25 -0
- package/schemas/runtime/HttpResponse.fbs +24 -0
- package/schemas/runtime/IngestRequest.fbs +61 -0
- package/schemas/runtime/IngestResult.fbs +23 -0
- package/schemas/runtime/ModuleConfig.fbs +41 -0
- package/schemas/runtime/RuntimeCommon.fbs +33 -0
- package/schemas/runtime/TimerTick.fbs +18 -0
- package/src/capabilities.js +3 -0
- package/src/compiler/compileModule.js +20 -2
- package/src/generated/runtime/aligned/HostOps_aligned.js +3913 -0
- package/src/generated/runtime/aligned/HostOps_aligned.ts +4605 -0
- package/src/generated/runtime/aligned/HostOps_enums.js +12 -0
- package/src/generated/runtime/aligned/HostOps_enums.ts +6 -0
- package/src/generated/runtime/cpp/FlowNotice_generated.h +367 -0
- package/src/generated/runtime/cpp/HostOps_aligned.h +3540 -0
- package/src/generated/runtime/cpp/HttpRequest_generated.h +317 -0
- package/src/generated/runtime/cpp/HttpResponse_generated.h +315 -0
- package/src/generated/runtime/cpp/IngestRequest_generated.h +829 -0
- package/src/generated/runtime/cpp/IngestResult_generated.h +319 -0
- package/src/generated/runtime/cpp/ModuleConfig_generated.h +604 -0
- package/src/generated/runtime/cpp/RuntimeCommon_generated.h +410 -0
- package/src/generated/runtime/cpp/TimerTick_generated.h +229 -0
- package/src/generated/runtime/sdn/runtime/ArchiveTarget.js +78 -0
- package/src/generated/runtime/sdn/runtime/ArchiveTarget.ts +104 -0
- package/src/generated/runtime/sdn/runtime/ConfigEntry.js +202 -0
- package/src/generated/runtime/sdn/runtime/ConfigEntry.ts +251 -0
- package/src/generated/runtime/sdn/runtime/ConfigTable.js +80 -0
- package/src/generated/runtime/sdn/runtime/ConfigTable.ts +97 -0
- package/src/generated/runtime/sdn/runtime/FlowNotice.js +196 -0
- package/src/generated/runtime/sdn/runtime/FlowNotice.ts +254 -0
- package/src/generated/runtime/sdn/runtime/Header.js +79 -0
- package/src/generated/runtime/sdn/runtime/Header.ts +100 -0
- package/src/generated/runtime/sdn/runtime/HttpRequest.js +216 -0
- package/src/generated/runtime/sdn/runtime/HttpRequest.ts +265 -0
- package/src/generated/runtime/sdn/runtime/HttpResponse.js +216 -0
- package/src/generated/runtime/sdn/runtime/HttpResponse.ts +267 -0
- package/src/generated/runtime/sdn/runtime/IngestRequest.js +121 -0
- package/src/generated/runtime/sdn/runtime/IngestRequest.ts +155 -0
- package/src/generated/runtime/sdn/runtime/IngestResult.js +184 -0
- package/src/generated/runtime/sdn/runtime/IngestResult.ts +235 -0
- package/src/generated/runtime/sdn/runtime/ModuleConfig.js +92 -0
- package/src/generated/runtime/sdn/runtime/ModuleConfig.ts +114 -0
- package/src/generated/runtime/sdn/runtime/Provenance.js +320 -0
- package/src/generated/runtime/sdn/runtime/Provenance.ts +405 -0
- package/src/generated/runtime/sdn/runtime/SourceTags.js +181 -0
- package/src/generated/runtime/sdn/runtime/SourceTags.ts +253 -0
- package/src/generated/runtime/sdn/runtime/TimerTick.js +119 -0
- package/src/generated/runtime/sdn/runtime/TimerTick.ts +148 -0
- package/src/generated/runtime/sdn/runtime/configValueKind.js +12 -0
- package/src/generated/runtime/sdn/runtime/configValueKind.ts +19 -0
- package/src/generated/runtime/sdn/runtime/flowNoticeKind.js +11 -0
- package/src/generated/runtime/sdn/runtime/flowNoticeKind.ts +34 -0
- package/src/generated/runtime/sdn/runtime/reconcileMode.js +9 -0
- package/src/generated/runtime/sdn/runtime/reconcileMode.ts +23 -0
- package/src/generated/runtime/sdn/runtime.js +16 -0
- package/src/generated/runtime/sdn/runtime.ts +17 -0
- package/src/host/abi.js +32 -6
- package/src/host/adapterOperations.js +79 -0
- package/src/host/browserHost.js +65 -2
- package/src/host/cpp/typedHostcall.hpp +252 -0
- package/src/host/hostWorkerBundleSources.js +3 -3
- package/src/host/nodeHost.js +50 -0
- package/src/host/typedDispatch.js +582 -0
- package/src/index.d.ts +25 -2
- package/src/invoke/codec.js +3 -2
- package/src/standards/runtimeContracts.js +596 -0
- package/src/standards/sharedCatalog.js +27 -0
package/src/capabilities.js
CHANGED
|
@@ -17,6 +17,8 @@ export const RecommendedCapabilityIds = Object.freeze([
|
|
|
17
17
|
"protocol_handle",
|
|
18
18
|
"protocol_dial",
|
|
19
19
|
"p2p_read",
|
|
20
|
+
"node_status_read",
|
|
21
|
+
"node_activity_read",
|
|
20
22
|
"database",
|
|
21
23
|
"storage_adapter",
|
|
22
24
|
"storage_query",
|
|
@@ -24,6 +26,7 @@ export const RecommendedCapabilityIds = Object.freeze([
|
|
|
24
26
|
"storage_ingest",
|
|
25
27
|
"context_read",
|
|
26
28
|
"context_write",
|
|
29
|
+
"secrets",
|
|
27
30
|
"process_exec",
|
|
28
31
|
"crypto_hash",
|
|
29
32
|
"crypto_sign",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
mkdtemp,
|
|
7
7
|
mkdir,
|
|
8
8
|
readFile,
|
|
9
|
+
readdir,
|
|
9
10
|
rm,
|
|
10
11
|
writeFile,
|
|
11
12
|
} from "node:fs/promises";
|
|
@@ -658,12 +659,29 @@ function createGuestLinkBundleEntries(guestLink) {
|
|
|
658
659
|
];
|
|
659
660
|
}
|
|
660
661
|
|
|
662
|
+
// The typed module runtime for C++ guests, staged in every compile: `#include "typedHostcall.hpp"` (sdm_piv::call,
|
|
663
|
+
// the SDS $PIV hostcall) with the HostOps aligned records it sends and reads, and the runtime types a module's
|
|
664
|
+
// ports carry (HttpRequest_generated.h, IngestRequest_generated.h, FlowNotice_generated.h, ...).
|
|
665
|
+
const RUNTIME_CPP_DIR = new URL("../generated/runtime/cpp/", import.meta.url);
|
|
666
|
+
const HOSTCALL_HPP = new URL("../host/cpp/typedHostcall.hpp", import.meta.url);
|
|
667
|
+
let hostcallCppHeaders = null;
|
|
668
|
+
async function getHostcallCppHeaders() {
|
|
669
|
+
hostcallCppHeaders ??= (async () => {
|
|
670
|
+
const names = (await readdir(RUNTIME_CPP_DIR)).filter((name) => name.endsWith(".h")).sort();
|
|
671
|
+
const headers = { "typedHostcall.hpp": await readFile(HOSTCALL_HPP, "utf8") };
|
|
672
|
+
for (const name of names) headers[name] = await readFile(new URL(name, RUNTIME_CPP_DIR), "utf8");
|
|
673
|
+
return headers;
|
|
674
|
+
})();
|
|
675
|
+
return hostcallCppHeaders;
|
|
676
|
+
}
|
|
677
|
+
|
|
661
678
|
async function getInvokeCppSupportFiles() {
|
|
662
|
-
const [runtimeHeaders, schemaHeaders] = await Promise.all([
|
|
679
|
+
const [runtimeHeaders, schemaHeaders, hostcallHeaders] = await Promise.all([
|
|
663
680
|
getFlatbuffersCppRuntimeHeaders(),
|
|
664
681
|
getInvokeCppSchemaHeaders(),
|
|
682
|
+
getHostcallCppHeaders(),
|
|
665
683
|
]);
|
|
666
|
-
return { runtimeHeaders, schemaHeaders };
|
|
684
|
+
return { runtimeHeaders, schemaHeaders: { ...schemaHeaders, ...hostcallHeaders } };
|
|
667
685
|
}
|
|
668
686
|
|
|
669
687
|
async function writeFilesToEmception(emception, rootDir, files) {
|