space-data-module-sdk 0.8.27 → 0.9.0

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.
Files changed (118) hide show
  1. package/README.md +5 -4
  2. package/docs/assembly.js +0 -18
  3. package/docs/assets/ai-credits/ai-credits.js +116 -0
  4. package/docs/assets/sdn-chrome/sdn-chrome.css +434 -0
  5. package/docs/assets/sdn-chrome/sdn-chrome.js +236 -0
  6. package/docs/browser-wasmedge-isomorphic.html +29 -41
  7. package/docs/byo-wasm-quickstart.html +29 -41
  8. package/docs/conformance.html +29 -41
  9. package/docs/events-abi.html +29 -41
  10. package/docs/families/analytics.html +29 -41
  11. package/docs/families/attitude.html +29 -41
  12. package/docs/families/behavior.html +29 -41
  13. package/docs/families/breakup.html +29 -41
  14. package/docs/families/conjunction.html +29 -41
  15. package/docs/families/data-source.html +29 -41
  16. package/docs/families/effects.html +29 -41
  17. package/docs/families/environment.html +29 -41
  18. package/docs/families/estimation.html +29 -41
  19. package/docs/families/gnc.html +29 -41
  20. package/docs/families/maneuver.html +29 -41
  21. package/docs/families/obstruction.html +29 -41
  22. package/docs/families/propagator.html +29 -41
  23. package/docs/families/propulsion.html +29 -41
  24. package/docs/families/reentry.html +29 -41
  25. package/docs/families/rf.html +29 -41
  26. package/docs/families/scheduler.html +29 -41
  27. package/docs/families/sensor.html +29 -41
  28. package/docs/families/signature.html +29 -41
  29. package/docs/flatsql-host-contract.html +29 -41
  30. package/docs/flatsql-streaming-standard.html +29 -41
  31. package/docs/gpu-module-abi.html +29 -41
  32. package/docs/index.html +43 -47
  33. package/docs/isomorphic-pthreads.html +29 -41
  34. package/docs/isomorphic-sdn-runtime-plan.html +29 -41
  35. package/docs/language-runtime-matrix.html +29 -41
  36. package/docs/media/module-sdk-reel-poster.webp +0 -0
  37. package/docs/media/module-sdk-reel.mp4 +0 -0
  38. package/docs/media/module-sdk-reel.webm +0 -0
  39. package/docs/media/reel/reel.css +53 -0
  40. package/docs/media/reel/reel.js +272 -0
  41. package/docs/module-bundle-runtime-plan.html +29 -41
  42. package/docs/module-publication-standard.html +29 -41
  43. package/docs/node-red-default-node-parity.html +29 -41
  44. package/docs/protect-and-sign.html +29 -41
  45. package/docs/protocol-installation.html +29 -41
  46. package/docs/publication-submission.html +29 -41
  47. package/docs/secrets-capability.html +29 -41
  48. package/docs/styles.css +89 -157
  49. package/docs/testing-harness.html +29 -41
  50. package/docs/tri-runtime-parity-gate.html +29 -41
  51. package/docs/tri-runtime-parity.html +29 -41
  52. package/package.json +5 -3
  53. package/schemas/runtime/FlowNotice.fbs +39 -0
  54. package/schemas/runtime/HostOps.fbs +453 -0
  55. package/schemas/runtime/HttpRequest.fbs +25 -0
  56. package/schemas/runtime/HttpResponse.fbs +24 -0
  57. package/schemas/runtime/IngestRequest.fbs +58 -0
  58. package/schemas/runtime/IngestResult.fbs +23 -0
  59. package/schemas/runtime/ModuleConfig.fbs +41 -0
  60. package/schemas/runtime/RuntimeCommon.fbs +33 -0
  61. package/schemas/runtime/TimerTick.fbs +18 -0
  62. package/src/compiler/compileModule.js +20 -2
  63. package/src/generated/runtime/aligned/HostOps_aligned.js +3924 -0
  64. package/src/generated/runtime/aligned/HostOps_aligned.ts +4620 -0
  65. package/src/generated/runtime/aligned/HostOps_enums.js +14 -0
  66. package/src/generated/runtime/aligned/HostOps_enums.ts +7 -0
  67. package/src/generated/runtime/cpp/FlowNotice_generated.h +367 -0
  68. package/src/generated/runtime/cpp/HostOps_aligned.h +3547 -0
  69. package/src/generated/runtime/cpp/HttpRequest_generated.h +317 -0
  70. package/src/generated/runtime/cpp/HttpResponse_generated.h +315 -0
  71. package/src/generated/runtime/cpp/IngestRequest_generated.h +764 -0
  72. package/src/generated/runtime/cpp/IngestResult_generated.h +319 -0
  73. package/src/generated/runtime/cpp/ModuleConfig_generated.h +604 -0
  74. package/src/generated/runtime/cpp/RuntimeCommon_generated.h +410 -0
  75. package/src/generated/runtime/cpp/TimerTick_generated.h +229 -0
  76. package/src/generated/runtime/sdn/runtime/ArchiveTarget.js +78 -0
  77. package/src/generated/runtime/sdn/runtime/ArchiveTarget.ts +104 -0
  78. package/src/generated/runtime/sdn/runtime/ConfigEntry.js +202 -0
  79. package/src/generated/runtime/sdn/runtime/ConfigEntry.ts +251 -0
  80. package/src/generated/runtime/sdn/runtime/ConfigTable.js +80 -0
  81. package/src/generated/runtime/sdn/runtime/ConfigTable.ts +97 -0
  82. package/src/generated/runtime/sdn/runtime/FlowNotice.js +196 -0
  83. package/src/generated/runtime/sdn/runtime/FlowNotice.ts +254 -0
  84. package/src/generated/runtime/sdn/runtime/Header.js +79 -0
  85. package/src/generated/runtime/sdn/runtime/Header.ts +100 -0
  86. package/src/generated/runtime/sdn/runtime/HttpRequest.js +216 -0
  87. package/src/generated/runtime/sdn/runtime/HttpRequest.ts +265 -0
  88. package/src/generated/runtime/sdn/runtime/HttpResponse.js +216 -0
  89. package/src/generated/runtime/sdn/runtime/HttpResponse.ts +267 -0
  90. package/src/generated/runtime/sdn/runtime/IngestRequest.js +121 -0
  91. package/src/generated/runtime/sdn/runtime/IngestRequest.ts +155 -0
  92. package/src/generated/runtime/sdn/runtime/IngestResult.js +184 -0
  93. package/src/generated/runtime/sdn/runtime/IngestResult.ts +235 -0
  94. package/src/generated/runtime/sdn/runtime/ModuleConfig.js +92 -0
  95. package/src/generated/runtime/sdn/runtime/ModuleConfig.ts +114 -0
  96. package/src/generated/runtime/sdn/runtime/Provenance.js +288 -0
  97. package/src/generated/runtime/sdn/runtime/Provenance.ts +368 -0
  98. package/src/generated/runtime/sdn/runtime/SourceTags.js +181 -0
  99. package/src/generated/runtime/sdn/runtime/SourceTags.ts +253 -0
  100. package/src/generated/runtime/sdn/runtime/TimerTick.js +119 -0
  101. package/src/generated/runtime/sdn/runtime/TimerTick.ts +148 -0
  102. package/src/generated/runtime/sdn/runtime/configValueKind.js +12 -0
  103. package/src/generated/runtime/sdn/runtime/configValueKind.ts +19 -0
  104. package/src/generated/runtime/sdn/runtime/flowNoticeKind.js +11 -0
  105. package/src/generated/runtime/sdn/runtime/flowNoticeKind.ts +34 -0
  106. package/src/generated/runtime/sdn/runtime/reconcileMode.js +9 -0
  107. package/src/generated/runtime/sdn/runtime/reconcileMode.ts +23 -0
  108. package/src/generated/runtime/sdn/runtime.js +16 -0
  109. package/src/generated/runtime/sdn/runtime.ts +17 -0
  110. package/src/host/abi.js +20 -3
  111. package/src/host/browserHost.js +2 -0
  112. package/src/host/cpp/typedHostcall.hpp +201 -0
  113. package/src/host/hostWorkerBundleSources.js +3 -3
  114. package/src/host/nodeHost.js +1 -0
  115. package/src/host/typedDispatch.js +230 -0
  116. package/src/invoke/codec.js +3 -2
  117. package/src/standards/runtimeContracts.js +536 -0
  118. package/src/standards/sharedCatalog.js +27 -0
@@ -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) {