space-data-module-sdk 0.8.15 → 0.8.17

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 (130) hide show
  1. package/bin/space-data-module.js +24 -6
  2. package/docs/_shell/consumer-assets.html +5 -0
  3. package/docs/browser-wasmedge-isomorphic.html +261 -0
  4. package/docs/byo-wasm-quickstart.html +226 -0
  5. package/docs/byo-wasm-quickstart.md +204 -0
  6. package/docs/conformance.html +162 -0
  7. package/docs/conformance.md +20 -4
  8. package/docs/emception-shared-memory-verdict.md +209 -0
  9. package/docs/events-abi.html +313 -0
  10. package/docs/events-abi.md +530 -0
  11. package/docs/families/analytics.html +178 -0
  12. package/docs/families/analytics.md +104 -0
  13. package/docs/families/attitude.html +157 -0
  14. package/docs/families/attitude.md +36 -0
  15. package/docs/families/behavior.html +157 -0
  16. package/docs/families/behavior.md +36 -0
  17. package/docs/families/breakup.html +157 -0
  18. package/docs/families/breakup.md +36 -0
  19. package/docs/families/conjunction.html +186 -0
  20. package/docs/families/conjunction.md +121 -0
  21. package/docs/families/data-source.html +323 -0
  22. package/docs/families/effects.html +157 -0
  23. package/docs/families/effects.md +36 -0
  24. package/docs/families/environment.html +170 -0
  25. package/docs/families/environment.md +73 -0
  26. package/docs/families/estimation.html +192 -0
  27. package/docs/families/estimation.md +158 -0
  28. package/docs/families/gnc.html +157 -0
  29. package/docs/families/gnc.md +36 -0
  30. package/docs/families/maneuver.html +209 -0
  31. package/docs/families/maneuver.md +206 -0
  32. package/docs/families/obstruction.html +191 -0
  33. package/docs/families/obstruction.md +96 -0
  34. package/docs/families/propagator.html +347 -0
  35. package/docs/families/propulsion.html +157 -0
  36. package/docs/families/propulsion.md +36 -0
  37. package/docs/families/reentry.html +157 -0
  38. package/docs/families/reentry.md +36 -0
  39. package/docs/families/rf.html +193 -0
  40. package/docs/families/rf.md +136 -0
  41. package/docs/families/scheduler.html +157 -0
  42. package/docs/families/scheduler.md +36 -0
  43. package/docs/families/sensor.html +157 -0
  44. package/docs/families/sensor.md +36 -0
  45. package/docs/families/signature.html +157 -0
  46. package/docs/families/signature.md +36 -0
  47. package/docs/flatsql-host-contract.html +176 -0
  48. package/docs/flatsql-streaming-standard.html +375 -0
  49. package/docs/gpu-module-abi.html +233 -0
  50. package/docs/harness-family-matrix.md +135 -0
  51. package/docs/index.html +216 -85
  52. package/docs/isomorphic-pthreads.html +228 -0
  53. package/docs/isomorphic-pthreads.md +84 -0
  54. package/docs/isomorphic-sdn-runtime-plan.html +274 -0
  55. package/docs/language-runtime-matrix.html +182 -0
  56. package/docs/llms.txt +86 -0
  57. package/docs/module-bundle-runtime-plan.html +146 -0
  58. package/docs/module-publication-standard.html +503 -0
  59. package/docs/node-red-default-node-parity.html +201 -0
  60. package/docs/propagator-abi.md +97 -12
  61. package/docs/protect-and-sign.html +181 -0
  62. package/docs/protect-and-sign.md +120 -0
  63. package/docs/protocol-installation.html +296 -0
  64. package/docs/provider-access-abi.md +25 -0
  65. package/docs/publication-submission.html +158 -0
  66. package/docs/publication-submission.md +78 -0
  67. package/docs/secrets-capability.html +206 -0
  68. package/docs/styles.css +860 -167
  69. package/docs/testing-harness.html +408 -0
  70. package/docs/tri-runtime-parity-gate.html +182 -0
  71. package/docs/tri-runtime-parity.html +203 -0
  72. package/include/orbpro/orbpro_estimation_abi.h +883 -0
  73. package/include/orbpro/orbpro_event_runner.h +951 -0
  74. package/include/orbpro/orbpro_events_abi.h +565 -0
  75. package/include/orbpro/orbpro_propagator_abi.h +75 -0
  76. package/package.json +13 -4
  77. package/schemas/orbpro/Estimation.fbs +244 -0
  78. package/schemas/orbpro/Events.fbs +501 -0
  79. package/schemas/orbpro/Propagator.fbs +136 -9
  80. package/schemas/orbpro/reference-frame-crosswalk.json +108 -0
  81. package/schemas/orbpro/reference-frame.lock.json +98 -0
  82. package/src/browser.js +13 -0
  83. package/src/conformance/estimationReference.js +81 -0
  84. package/src/conformance/estimationSuite.js +134 -0
  85. package/src/conformance/index.js +39 -2
  86. package/src/generated/orbpro/events-abi.js +206 -0
  87. package/src/generated/orbpro/events-abi.ts +319 -0
  88. package/src/generated/orbpro/propagator/reference-frame.js +17 -0
  89. package/src/generated/orbpro/propagator/reference-frame.ts +91 -1
  90. package/src/generated/orbpro/propagator-abi.js +38 -0
  91. package/src/generated/orbpro/propagator-abi.ts +67 -0
  92. package/src/generated/spacedatastandards/plg/CCT.d.ts +94 -0
  93. package/src/generated/spacedatastandards/plg/CCT.d.ts.map +1 -0
  94. package/src/generated/spacedatastandards/plg/CCT.js +208 -0
  95. package/src/generated/spacedatastandards/plg/CCT.ts +281 -0
  96. package/src/generated/spacedatastandards/plg/CCTCategory.d.ts +98 -0
  97. package/src/generated/spacedatastandards/plg/CCTCategory.d.ts.map +1 -0
  98. package/src/generated/spacedatastandards/plg/CCTCategory.js +177 -0
  99. package/src/generated/spacedatastandards/plg/CCTCategory.ts +269 -0
  100. package/src/generated/spacedatastandards/plg/CCTCategoryRollup.d.ts +54 -0
  101. package/src/generated/spacedatastandards/plg/CCTCategoryRollup.d.ts.map +1 -0
  102. package/src/generated/spacedatastandards/plg/CCTCategoryRollup.js +106 -0
  103. package/src/generated/spacedatastandards/plg/CCTCategoryRollup.ts +144 -0
  104. package/src/generated/spacedatastandards/plg/PLG.d.ts +46 -2
  105. package/src/generated/spacedatastandards/plg/PLG.d.ts.map +1 -1
  106. package/src/generated/spacedatastandards/plg/PLG.js +78 -5
  107. package/src/generated/spacedatastandards/plg/PLG.ts +90 -5
  108. package/src/generated/spacedatastandards/plg/capabilityClass.d.ts +181 -0
  109. package/src/generated/spacedatastandards/plg/capabilityClass.d.ts.map +1 -0
  110. package/src/generated/spacedatastandards/plg/capabilityClass.js +183 -0
  111. package/src/generated/spacedatastandards/plg/capabilityClass.ts +208 -0
  112. package/src/generated/spacedatastandards/plg/main.d.ts +4 -0
  113. package/src/generated/spacedatastandards/plg/main.d.ts.map +1 -1
  114. package/src/generated/spacedatastandards/plg/main.js +4 -0
  115. package/src/generated/spacedatastandards/plg/main.ts +4 -0
  116. package/src/generated/spacedatastandards/plg/pluginCategory.d.ts +40 -2
  117. package/src/generated/spacedatastandards/plg/pluginCategory.d.ts.map +1 -1
  118. package/src/generated/spacedatastandards/plg/pluginCategory.js +40 -2
  119. package/src/generated/spacedatastandards/plg/pluginCategory.ts +40 -2
  120. package/src/host/browserModuleHarness.js +8 -0
  121. package/src/host/wasiThreadHost.js +189 -14
  122. package/src/index.d.ts +18 -1
  123. package/src/standards/sharedCatalog.js +7 -0
  124. package/src/transport/index.js +16 -0
  125. package/src/transport/records.js +1015 -3
  126. package/templates/estimation-module/README.md +24 -0
  127. package/templates/estimation-module/build.mjs +32 -0
  128. package/templates/estimation-module/package.json +12 -0
  129. package/templates/estimation-module/plugin-manifest.json +34 -0
  130. package/templates/estimation-module/src/reference_estimation.cpp +53 -0
@@ -8,5 +8,95 @@ export enum ReferenceFrame {
8
8
  ICRF = 2,
9
9
  ECEF = 3,
10
10
  MCI = 4,
11
- MCMF = 5
11
+ MCMF = 5,
12
+
13
+ /**
14
+ * Mean ecliptic and equinox of J2000. (The mean EQUATOR and equinox of
15
+ * J2000 is J2000 = 1 and is not repeated here.)
16
+ */
17
+ MJ2000EC = 6,
18
+
19
+ /**
20
+ * Mean equator of date.
21
+ */
22
+ MOD = 7,
23
+
24
+ /**
25
+ * True equator of date.
26
+ */
27
+ TOD = 8,
28
+
29
+ /**
30
+ * Mean ecliptic of date.
31
+ */
32
+ MOE = 9,
33
+
34
+ /**
35
+ * True ecliptic of date.
36
+ */
37
+ TOE = 10,
38
+
39
+ /**
40
+ * Axes rotating with a named body, per its published rotation elements.
41
+ */
42
+ BODY_FIXED = 11,
43
+
44
+ /**
45
+ * Non-rotating axes on a named body's equator and prime meridian.
46
+ */
47
+ BODY_INERTIAL = 12,
48
+
49
+ /**
50
+ * Axes built from the relative geometry of two named objects. The three
51
+ * live RTN triads — RIC, RSW and RTN — are THIS member with an axes spec,
52
+ * not three members; so are LVLH and VVLH.
53
+ */
54
+ OBJECT_REFERENCED = 13,
55
+
56
+ /**
57
+ * Axes built by aligning one vector and constraining a second.
58
+ */
59
+ LOCAL_ALIGNED_CONSTRAINED = 14,
60
+
61
+ /**
62
+ * A named body's equatorial plane at the epoch.
63
+ */
64
+ EQUATOR = 15,
65
+
66
+ /**
67
+ * Solar-ecliptic magnetospheric (GSE).
68
+ */
69
+ GSE = 16,
70
+
71
+ /**
72
+ * Solar magnetospheric (GSM).
73
+ */
74
+ GSM = 17,
75
+
76
+ /**
77
+ * Local horizon axes at a surface site.
78
+ */
79
+ TOPOCENTRIC = 18,
80
+
81
+ /**
82
+ * Axes fixed by a body's spin axis and its direction to the Sun.
83
+ */
84
+ BODY_SPIN_SUN = 19,
85
+
86
+ /**
87
+ * Axes declared by a loaded ephemeris/orientation kernel.
88
+ */
89
+ SPICE_DEFINED = 20,
90
+
91
+ /**
92
+ * LEGACY, retained and NAMED rather than left implicit: mean equator of
93
+ * date on the IAU-76/FK5 theory. Differs from MOD at the milliarcsecond
94
+ * level; the two are not interchangeable.
95
+ */
96
+ MOD_FK5 = 21,
97
+
98
+ /**
99
+ * LEGACY, retained and NAMED: true equator of date on IAU-76/FK5.
100
+ */
101
+ TOD_FK5 = 22
12
102
  }
@@ -18,6 +18,23 @@ export const ReferenceFrame = Object.freeze({
18
18
  ECEF: 3,
19
19
  MCI: 4,
20
20
  MCMF: 5,
21
+ MJ2000EC: 6,
22
+ MOD: 7,
23
+ TOD: 8,
24
+ MOE: 9,
25
+ TOE: 10,
26
+ BODY_FIXED: 11,
27
+ BODY_INERTIAL: 12,
28
+ OBJECT_REFERENCED: 13,
29
+ LOCAL_ALIGNED_CONSTRAINED: 14,
30
+ EQUATOR: 15,
31
+ GSE: 16,
32
+ GSM: 17,
33
+ TOPOCENTRIC: 18,
34
+ BODY_SPIN_SUN: 19,
35
+ SPICE_DEFINED: 20,
36
+ MOD_FK5: 21,
37
+ TOD_FK5: 22,
21
38
  });
22
39
 
23
40
  export const StateFlags = Object.freeze({
@@ -30,6 +47,27 @@ export const StateFlags = Object.freeze({
30
47
  HAS_COVARIANCE: 32,
31
48
  });
32
49
 
50
+ export const ErrorCode = Object.freeze({
51
+ OK: 0,
52
+ NOT_INITIALIZED: -1,
53
+ BAD_ENTITY_INDEX: -2,
54
+ NULL_OUTPUT: -3,
55
+ BAD_INPUT: -4,
56
+ NOT_CONVERGED: -5,
57
+ UNPHYSICAL: -6,
58
+ UNSUPPORTED_FORMAT: -7,
59
+ EPOCH_OUT_OF_RANGE: -8,
60
+ });
61
+
62
+ export const EphemerisFormat = Object.freeze({
63
+ AUTO: 0,
64
+ CCSDS_OEM_KVN: 1,
65
+ SPK_DAF: 2,
66
+ CODE500: 3,
67
+ STK_EPHEMERIS: 4,
68
+ SP3_D: 5,
69
+ });
70
+
33
71
  export const ORBPRO_STATE_VECTOR = Object.freeze({
34
72
  name: "StateVector",
35
73
  cName: "OrbProStateVector",
@@ -19,6 +19,23 @@ export enum ReferenceFrame {
19
19
  ECEF = 3,
20
20
  MCI = 4,
21
21
  MCMF = 5,
22
+ MJ2000EC = 6,
23
+ MOD = 7,
24
+ TOD = 8,
25
+ MOE = 9,
26
+ TOE = 10,
27
+ BODY_FIXED = 11,
28
+ BODY_INERTIAL = 12,
29
+ OBJECT_REFERENCED = 13,
30
+ LOCAL_ALIGNED_CONSTRAINED = 14,
31
+ EQUATOR = 15,
32
+ GSE = 16,
33
+ GSM = 17,
34
+ TOPOCENTRIC = 18,
35
+ BODY_SPIN_SUN = 19,
36
+ SPICE_DEFINED = 20,
37
+ MOD_FK5 = 21,
38
+ TOD_FK5 = 22,
22
39
  }
23
40
 
24
41
  /**
@@ -36,6 +53,56 @@ export enum StateFlags {
36
53
  HAS_COVARIANCE = 32,
37
54
  }
38
55
 
56
+ /**
57
+ * The negative return codes every propagator export shares.
58
+ *
59
+ * These were documented in docs/propagator-abi.md and declared NOWHERE, so
60
+ * every module hand-typed them as literals and the contract lived only in
61
+ * prose. A propagator that returns -1 for everything is unconformable — the
62
+ * host cannot tell a bad entity index from an uninitialized module, so it
63
+ * cannot place the failure on the degradation ladder — and the cheapest way
64
+ * to end up there is having no names to return.
65
+ *
66
+ * VALUES ARE FROZEN. New classes are appended downward.
67
+ */
68
+ export enum ErrorCode {
69
+ OK = 0,
70
+ NOT_INITIALIZED = -1,
71
+ BAD_ENTITY_INDEX = -2,
72
+ NULL_OUTPUT = -3,
73
+ BAD_INPUT = -4,
74
+ NOT_CONVERGED = -5,
75
+ UNPHYSICAL = -6,
76
+ UNSUPPORTED_FORMAT = -7,
77
+ EPOCH_OUT_OF_RANGE = -8,
78
+ }
79
+
80
+ /**
81
+ * The container an ephemeris-driven propagator was handed on
82
+ * `plugin_init_ephemeris`. A format is DATA, not identity: one ephemeris
83
+ * provider reads every member below behind this discriminator rather than
84
+ * shipping one artifact per container, because the interpolation, the time
85
+ * scale handling and the frame rotation are shared and splitting them
86
+ * re-creates the five-mirror drift this file exists to end.
87
+ *
88
+ * AUTO is the honest default: every container here is self-identifying in its
89
+ * first bytes (`DAF/SPK ` / `NAIF/DAF`, the OEM version keyword, the STK
90
+ * `stk.v.` banner, the SP3 `#d` line, the Code-500 fixed header block), so a
91
+ * caller that does not know what it fetched says so rather than guessing. A
92
+ * module that cannot identify the bytes returns UNSUPPORTED_FORMAT; it never
93
+ * falls back to a default container.
94
+ *
95
+ * VALUES ARE FROZEN AND ARE NEVER RENUMBERED. New containers are APPENDED.
96
+ */
97
+ export enum EphemerisFormat {
98
+ AUTO = 0,
99
+ CCSDS_OEM_KVN = 1,
100
+ SPK_DAF = 2,
101
+ CODE500 = 3,
102
+ STK_EPHEMERIS = 4,
103
+ SP3_D = 5,
104
+ }
105
+
39
106
  /** One field's placement inside an ABI struct. */
40
107
  export interface AbiField {
41
108
  readonly offset: number;
@@ -0,0 +1,94 @@
1
+ import * as flatbuffers from 'flatbuffers';
2
+ import { CCTCategory, CCTCategoryT } from './CCTCategory.js';
3
+ import { CCTCategoryRollup, CCTCategoryRollupT } from './CCTCategoryRollup.js';
4
+ /**
5
+ * $CCT — Capability Category Taxonomy.
6
+ *
7
+ * The ratified set of capability classes that distributable units (modules,
8
+ * applications, composed flows) are classified under, together with the labels
9
+ * and routes every consuming surface renders. One published $CCT is the single
10
+ * source of truth shared by a storefront, a library, a search index and the
11
+ * unit manifests themselves.
12
+ *
13
+ * Division of labour: `$CCT` = the category vocabulary and its presentation;
14
+ * `$PLG` = one module's listing, which cites categories by code; `$APP` = one
15
+ * application's manifest, which cites categories by code; `$PMM` = which
16
+ * modules a provider serves; `$STO`/`$STF` = commerce.
17
+ */
18
+ export declare class CCT implements flatbuffers.IUnpackableObject<CCTT> {
19
+ bb: flatbuffers.ByteBuffer | null;
20
+ bb_pos: number;
21
+ __init(i: number, bb: flatbuffers.ByteBuffer): CCT;
22
+ static getRootAsCCT(bb: flatbuffers.ByteBuffer, obj?: CCT): CCT;
23
+ static getSizePrefixedRootAsCCT(bb: flatbuffers.ByteBuffer, obj?: CCT): CCT;
24
+ static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean;
25
+ /**
26
+ * Stable identifier of this taxonomy publication.
27
+ */
28
+ TAXONOMY_ID(): string;
29
+ TAXONOMY_ID(optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
30
+ /**
31
+ * SemVer 2.0.0 version of the taxonomy content.
32
+ */
33
+ VERSION(): string;
34
+ VERSION(optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
35
+ /**
36
+ * Unix seconds when this taxonomy revision was issued.
37
+ */
38
+ ISSUED_AT(): bigint;
39
+ /**
40
+ * Human-readable title of the taxonomy.
41
+ */
42
+ TITLE(): string | null;
43
+ TITLE(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
44
+ /**
45
+ * The ratified categories. Every capabilityClass member a consumer may
46
+ * encounter SHOULD appear exactly once; a code appearing twice is invalid.
47
+ */
48
+ CATEGORIES(index: number, obj?: CCTCategory): CCTCategory | null;
49
+ categoriesLength(): number;
50
+ /**
51
+ * Optional per-category item counts as observed over a named catalogue.
52
+ * Absent means counts are computed by the consumer.
53
+ */
54
+ ROLLUPS(index: number, obj?: CCTCategoryRollup): CCTCategoryRollup | null;
55
+ rollupsLength(): number;
56
+ /**
57
+ * Signature from the publishing node key over the canonical taxonomy bytes.
58
+ */
59
+ SIGNATURE(index: number): number | null;
60
+ signatureLength(): number;
61
+ signatureArray(): Uint8Array | null;
62
+ static startCCT(builder: flatbuffers.Builder): void;
63
+ static addTaxonomyId(builder: flatbuffers.Builder, TAXONOMY_IDOffset: flatbuffers.Offset): void;
64
+ static addVersion(builder: flatbuffers.Builder, VERSIONOffset: flatbuffers.Offset): void;
65
+ static addIssuedAt(builder: flatbuffers.Builder, ISSUED_AT: bigint): void;
66
+ static addTitle(builder: flatbuffers.Builder, TITLEOffset: flatbuffers.Offset): void;
67
+ static addCategories(builder: flatbuffers.Builder, CATEGORIESOffset: flatbuffers.Offset): void;
68
+ static createCategoriesVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
69
+ static startCategoriesVector(builder: flatbuffers.Builder, numElems: number): void;
70
+ static addRollups(builder: flatbuffers.Builder, ROLLUPSOffset: flatbuffers.Offset): void;
71
+ static createRollupsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
72
+ static startRollupsVector(builder: flatbuffers.Builder, numElems: number): void;
73
+ static addSignature(builder: flatbuffers.Builder, SIGNATUREOffset: flatbuffers.Offset): void;
74
+ static createSignatureVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
75
+ static startSignatureVector(builder: flatbuffers.Builder, numElems: number): void;
76
+ static endCCT(builder: flatbuffers.Builder): flatbuffers.Offset;
77
+ static finishCCTBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
78
+ static finishSizePrefixedCCTBuffer(builder: flatbuffers.Builder, offset: flatbuffers.Offset): void;
79
+ static createCCT(builder: flatbuffers.Builder, TAXONOMY_IDOffset: flatbuffers.Offset, VERSIONOffset: flatbuffers.Offset, ISSUED_AT: bigint, TITLEOffset: flatbuffers.Offset, CATEGORIESOffset: flatbuffers.Offset, ROLLUPSOffset: flatbuffers.Offset, SIGNATUREOffset: flatbuffers.Offset): flatbuffers.Offset;
80
+ unpack(): CCTT;
81
+ unpackTo(_o: CCTT): void;
82
+ }
83
+ export declare class CCTT implements flatbuffers.IGeneratedObject {
84
+ TAXONOMY_ID: string | Uint8Array | null;
85
+ VERSION: string | Uint8Array | null;
86
+ ISSUED_AT: bigint;
87
+ TITLE: string | Uint8Array | null;
88
+ CATEGORIES: (CCTCategoryT)[];
89
+ ROLLUPS: (CCTCategoryRollupT)[];
90
+ SIGNATURE: (number)[];
91
+ constructor(TAXONOMY_ID?: string | Uint8Array | null, VERSION?: string | Uint8Array | null, ISSUED_AT?: bigint, TITLE?: string | Uint8Array | null, CATEGORIES?: (CCTCategoryT)[], ROLLUPS?: (CCTCategoryRollupT)[], SIGNATURE?: (number)[]);
92
+ pack(builder: flatbuffers.Builder): flatbuffers.Offset;
93
+ }
94
+ //# sourceMappingURL=CCT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CCT.d.ts","sourceRoot":"","sources":["../../../ts/PLG/CCT.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAG/E;;;;;;;;;;;;;GAaG;AACH,qBAAa,GAAI,YAAW,WAAW,CAAC,iBAAiB,CAAC,IAAI,CAAC;IAC7D,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,GAAG;IAMjD,MAAM,CAAC,YAAY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YAAY,CAAC,EAAO,EACjC,OAAO,GAAE,CAAC,kBAAkB,CAAC,EAAO,EACpC,SAAS,GAAE,CAAC,MAAM,CAAC,EAAO;IAInC,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAkBpD"}
@@ -0,0 +1,208 @@
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
+ import * as flatbuffers from 'flatbuffers';
4
+ import { CCTCategory } from './CCTCategory.js';
5
+ import { CCTCategoryRollup } from './CCTCategoryRollup.js';
6
+ /**
7
+ * $CCT — Capability Category Taxonomy.
8
+ *
9
+ * The ratified set of capability classes that distributable units (modules,
10
+ * applications, composed flows) are classified under, together with the labels
11
+ * and routes every consuming surface renders. One published $CCT is the single
12
+ * source of truth shared by a storefront, a library, a search index and the
13
+ * unit manifests themselves.
14
+ *
15
+ * Division of labour: `$CCT` = the category vocabulary and its presentation;
16
+ * `$PLG` = one module's listing, which cites categories by code; `$APP` = one
17
+ * application's manifest, which cites categories by code; `$PMM` = which
18
+ * modules a provider serves; `$STO`/`$STF` = commerce.
19
+ */
20
+ export class CCT {
21
+ constructor() {
22
+ this.bb = null;
23
+ this.bb_pos = 0;
24
+ }
25
+ __init(i, bb) {
26
+ this.bb_pos = i;
27
+ this.bb = bb;
28
+ return this;
29
+ }
30
+ static getRootAsCCT(bb, obj) {
31
+ return (obj || new CCT()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
32
+ }
33
+ static getSizePrefixedRootAsCCT(bb, obj) {
34
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
35
+ return (obj || new CCT()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
36
+ }
37
+ static bufferHasIdentifier(bb) {
38
+ return bb.__has_identifier('$CCT');
39
+ }
40
+ TAXONOMY_ID(optionalEncoding) {
41
+ const offset = this.bb.__offset(this.bb_pos, 4);
42
+ return this.bb.__string(this.bb_pos + offset, optionalEncoding);
43
+ }
44
+ VERSION(optionalEncoding) {
45
+ const offset = this.bb.__offset(this.bb_pos, 6);
46
+ return this.bb.__string(this.bb_pos + offset, optionalEncoding);
47
+ }
48
+ /**
49
+ * Unix seconds when this taxonomy revision was issued.
50
+ */
51
+ ISSUED_AT() {
52
+ const offset = this.bb.__offset(this.bb_pos, 8);
53
+ return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
54
+ }
55
+ TITLE(optionalEncoding) {
56
+ const offset = this.bb.__offset(this.bb_pos, 10);
57
+ return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null;
58
+ }
59
+ /**
60
+ * The ratified categories. Every capabilityClass member a consumer may
61
+ * encounter SHOULD appear exactly once; a code appearing twice is invalid.
62
+ */
63
+ CATEGORIES(index, obj) {
64
+ const offset = this.bb.__offset(this.bb_pos, 12);
65
+ return offset ? (obj || new CCTCategory()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
66
+ }
67
+ categoriesLength() {
68
+ const offset = this.bb.__offset(this.bb_pos, 12);
69
+ return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
70
+ }
71
+ /**
72
+ * Optional per-category item counts as observed over a named catalogue.
73
+ * Absent means counts are computed by the consumer.
74
+ */
75
+ ROLLUPS(index, obj) {
76
+ const offset = this.bb.__offset(this.bb_pos, 14);
77
+ return offset ? (obj || new CCTCategoryRollup()).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null;
78
+ }
79
+ rollupsLength() {
80
+ const offset = this.bb.__offset(this.bb_pos, 14);
81
+ return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
82
+ }
83
+ /**
84
+ * Signature from the publishing node key over the canonical taxonomy bytes.
85
+ */
86
+ SIGNATURE(index) {
87
+ const offset = this.bb.__offset(this.bb_pos, 16);
88
+ return offset ? this.bb.readUint8(this.bb.__vector(this.bb_pos + offset) + index) : 0;
89
+ }
90
+ signatureLength() {
91
+ const offset = this.bb.__offset(this.bb_pos, 16);
92
+ return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0;
93
+ }
94
+ signatureArray() {
95
+ const offset = this.bb.__offset(this.bb_pos, 16);
96
+ return offset ? new Uint8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null;
97
+ }
98
+ static startCCT(builder) {
99
+ builder.startObject(7);
100
+ }
101
+ static addTaxonomyId(builder, TAXONOMY_IDOffset) {
102
+ builder.addFieldOffset(0, TAXONOMY_IDOffset, 0);
103
+ }
104
+ static addVersion(builder, VERSIONOffset) {
105
+ builder.addFieldOffset(1, VERSIONOffset, 0);
106
+ }
107
+ static addIssuedAt(builder, ISSUED_AT) {
108
+ builder.addFieldInt64(2, ISSUED_AT, BigInt('0'));
109
+ }
110
+ static addTitle(builder, TITLEOffset) {
111
+ builder.addFieldOffset(3, TITLEOffset, 0);
112
+ }
113
+ static addCategories(builder, CATEGORIESOffset) {
114
+ builder.addFieldOffset(4, CATEGORIESOffset, 0);
115
+ }
116
+ static createCategoriesVector(builder, data) {
117
+ builder.startVector(4, data.length, 4);
118
+ for (let i = data.length - 1; i >= 0; i--) {
119
+ builder.addOffset(data[i]);
120
+ }
121
+ return builder.endVector();
122
+ }
123
+ static startCategoriesVector(builder, numElems) {
124
+ builder.startVector(4, numElems, 4);
125
+ }
126
+ static addRollups(builder, ROLLUPSOffset) {
127
+ builder.addFieldOffset(5, ROLLUPSOffset, 0);
128
+ }
129
+ static createRollupsVector(builder, data) {
130
+ builder.startVector(4, data.length, 4);
131
+ for (let i = data.length - 1; i >= 0; i--) {
132
+ builder.addOffset(data[i]);
133
+ }
134
+ return builder.endVector();
135
+ }
136
+ static startRollupsVector(builder, numElems) {
137
+ builder.startVector(4, numElems, 4);
138
+ }
139
+ static addSignature(builder, SIGNATUREOffset) {
140
+ builder.addFieldOffset(6, SIGNATUREOffset, 0);
141
+ }
142
+ static createSignatureVector(builder, data) {
143
+ builder.startVector(1, data.length, 1);
144
+ for (let i = data.length - 1; i >= 0; i--) {
145
+ builder.addInt8(data[i]);
146
+ }
147
+ return builder.endVector();
148
+ }
149
+ static startSignatureVector(builder, numElems) {
150
+ builder.startVector(1, numElems, 1);
151
+ }
152
+ static endCCT(builder) {
153
+ const offset = builder.endObject();
154
+ builder.requiredField(offset, 4); // TAXONOMY_ID
155
+ builder.requiredField(offset, 6); // VERSION
156
+ builder.requiredField(offset, 12); // CATEGORIES
157
+ return offset;
158
+ }
159
+ static finishCCTBuffer(builder, offset) {
160
+ builder.finish(offset, '$CCT');
161
+ }
162
+ static finishSizePrefixedCCTBuffer(builder, offset) {
163
+ builder.finish(offset, '$CCT', true);
164
+ }
165
+ static createCCT(builder, TAXONOMY_IDOffset, VERSIONOffset, ISSUED_AT, TITLEOffset, CATEGORIESOffset, ROLLUPSOffset, SIGNATUREOffset) {
166
+ CCT.startCCT(builder);
167
+ CCT.addTaxonomyId(builder, TAXONOMY_IDOffset);
168
+ CCT.addVersion(builder, VERSIONOffset);
169
+ CCT.addIssuedAt(builder, ISSUED_AT);
170
+ CCT.addTitle(builder, TITLEOffset);
171
+ CCT.addCategories(builder, CATEGORIESOffset);
172
+ CCT.addRollups(builder, ROLLUPSOffset);
173
+ CCT.addSignature(builder, SIGNATUREOffset);
174
+ return CCT.endCCT(builder);
175
+ }
176
+ unpack() {
177
+ return new CCTT(this.TAXONOMY_ID(), this.VERSION(), this.ISSUED_AT(), this.TITLE(), this.bb.createObjList(this.CATEGORIES.bind(this), this.categoriesLength()), this.bb.createObjList(this.ROLLUPS.bind(this), this.rollupsLength()), this.bb.createScalarList(this.SIGNATURE.bind(this), this.signatureLength()));
178
+ }
179
+ unpackTo(_o) {
180
+ _o.TAXONOMY_ID = this.TAXONOMY_ID();
181
+ _o.VERSION = this.VERSION();
182
+ _o.ISSUED_AT = this.ISSUED_AT();
183
+ _o.TITLE = this.TITLE();
184
+ _o.CATEGORIES = this.bb.createObjList(this.CATEGORIES.bind(this), this.categoriesLength());
185
+ _o.ROLLUPS = this.bb.createObjList(this.ROLLUPS.bind(this), this.rollupsLength());
186
+ _o.SIGNATURE = this.bb.createScalarList(this.SIGNATURE.bind(this), this.signatureLength());
187
+ }
188
+ }
189
+ export class CCTT {
190
+ constructor(TAXONOMY_ID = null, VERSION = null, ISSUED_AT = BigInt('0'), TITLE = null, CATEGORIES = [], ROLLUPS = [], SIGNATURE = []) {
191
+ this.TAXONOMY_ID = TAXONOMY_ID;
192
+ this.VERSION = VERSION;
193
+ this.ISSUED_AT = ISSUED_AT;
194
+ this.TITLE = TITLE;
195
+ this.CATEGORIES = CATEGORIES;
196
+ this.ROLLUPS = ROLLUPS;
197
+ this.SIGNATURE = SIGNATURE;
198
+ }
199
+ pack(builder) {
200
+ const TAXONOMY_ID = (this.TAXONOMY_ID !== null ? builder.createString(this.TAXONOMY_ID) : 0);
201
+ const VERSION = (this.VERSION !== null ? builder.createString(this.VERSION) : 0);
202
+ const TITLE = (this.TITLE !== null ? builder.createString(this.TITLE) : 0);
203
+ const CATEGORIES = CCT.createCategoriesVector(builder, builder.createObjectOffsetList(this.CATEGORIES));
204
+ const ROLLUPS = CCT.createRollupsVector(builder, builder.createObjectOffsetList(this.ROLLUPS));
205
+ const SIGNATURE = CCT.createSignatureVector(builder, this.SIGNATURE);
206
+ return CCT.createCCT(builder, TAXONOMY_ID, VERSION, this.ISSUED_AT, TITLE, CATEGORIES, ROLLUPS, SIGNATURE);
207
+ }
208
+ }