space-data-module-sdk 0.1.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 (102) hide show
  1. package/README.md +139 -0
  2. package/bin/space-data-module.js +230 -0
  3. package/package.json +40 -0
  4. package/schemas/PluginManifest.fbs +144 -0
  5. package/schemas/TypedArenaBuffer.fbs +78 -0
  6. package/src/auth/canonicalize.js +72 -0
  7. package/src/auth/index.js +10 -0
  8. package/src/auth/permissions.js +190 -0
  9. package/src/compiler/compileModule.js +237 -0
  10. package/src/compiler/index.js +7 -0
  11. package/src/compliance/index.js +56 -0
  12. package/src/compliance/pluginCompliance.js +574 -0
  13. package/src/embeddedManifest.js +124 -0
  14. package/src/generated/orbpro/manifest/accepted-type-set.d.ts +45 -0
  15. package/src/generated/orbpro/manifest/accepted-type-set.d.ts.map +1 -0
  16. package/src/generated/orbpro/manifest/accepted-type-set.js +100 -0
  17. package/src/generated/orbpro/manifest/accepted-type-set.js.map +1 -0
  18. package/src/generated/orbpro/manifest/accepted-type-set.ts +200 -0
  19. package/src/generated/orbpro/manifest/build-artifact.d.ts +41 -0
  20. package/src/generated/orbpro/manifest/build-artifact.d.ts.map +1 -0
  21. package/src/generated/orbpro/manifest/build-artifact.js +105 -0
  22. package/src/generated/orbpro/manifest/build-artifact.js.map +1 -0
  23. package/src/generated/orbpro/manifest/build-artifact.ts +193 -0
  24. package/src/generated/orbpro/manifest/capability-kind.d.ts +17 -0
  25. package/src/generated/orbpro/manifest/capability-kind.d.ts.map +1 -0
  26. package/src/generated/orbpro/manifest/capability-kind.js +20 -0
  27. package/src/generated/orbpro/manifest/capability-kind.js.map +1 -0
  28. package/src/generated/orbpro/manifest/capability-kind.ts +20 -0
  29. package/src/generated/orbpro/manifest/drain-policy.d.ts +9 -0
  30. package/src/generated/orbpro/manifest/drain-policy.d.ts.map +1 -0
  31. package/src/generated/orbpro/manifest/drain-policy.js +12 -0
  32. package/src/generated/orbpro/manifest/drain-policy.js.map +1 -0
  33. package/src/generated/orbpro/manifest/drain-policy.ts +12 -0
  34. package/src/generated/orbpro/manifest/host-capability.d.ts +36 -0
  35. package/src/generated/orbpro/manifest/host-capability.d.ts.map +1 -0
  36. package/src/generated/orbpro/manifest/host-capability.js +91 -0
  37. package/src/generated/orbpro/manifest/host-capability.js.map +1 -0
  38. package/src/generated/orbpro/manifest/host-capability.ts +161 -0
  39. package/src/generated/orbpro/manifest/method-manifest.d.ts +53 -0
  40. package/src/generated/orbpro/manifest/method-manifest.d.ts.map +1 -0
  41. package/src/generated/orbpro/manifest/method-manifest.js +154 -0
  42. package/src/generated/orbpro/manifest/method-manifest.js.map +1 -0
  43. package/src/generated/orbpro/manifest/method-manifest.ts +306 -0
  44. package/src/generated/orbpro/manifest/plugin-family.d.ts +17 -0
  45. package/src/generated/orbpro/manifest/plugin-family.d.ts.map +1 -0
  46. package/src/generated/orbpro/manifest/plugin-family.js +20 -0
  47. package/src/generated/orbpro/manifest/plugin-family.js.map +1 -0
  48. package/src/generated/orbpro/manifest/plugin-family.ts +20 -0
  49. package/src/generated/orbpro/manifest/plugin-manifest.d.ts +85 -0
  50. package/src/generated/orbpro/manifest/plugin-manifest.d.ts.map +1 -0
  51. package/src/generated/orbpro/manifest/plugin-manifest.js +268 -0
  52. package/src/generated/orbpro/manifest/plugin-manifest.js.map +1 -0
  53. package/src/generated/orbpro/manifest/plugin-manifest.ts +562 -0
  54. package/src/generated/orbpro/manifest/port-manifest.d.ts +70 -0
  55. package/src/generated/orbpro/manifest/port-manifest.d.ts.map +1 -0
  56. package/src/generated/orbpro/manifest/port-manifest.js +150 -0
  57. package/src/generated/orbpro/manifest/port-manifest.js.map +1 -0
  58. package/src/generated/orbpro/manifest/port-manifest.ts +284 -0
  59. package/src/generated/orbpro/manifest/protocol-spec.d.ts +41 -0
  60. package/src/generated/orbpro/manifest/protocol-spec.d.ts.map +1 -0
  61. package/src/generated/orbpro/manifest/protocol-spec.js +105 -0
  62. package/src/generated/orbpro/manifest/protocol-spec.js.map +1 -0
  63. package/src/generated/orbpro/manifest/protocol-spec.ts +205 -0
  64. package/src/generated/orbpro/manifest/timer-spec.d.ts +40 -0
  65. package/src/generated/orbpro/manifest/timer-spec.d.ts.map +1 -0
  66. package/src/generated/orbpro/manifest/timer-spec.js +104 -0
  67. package/src/generated/orbpro/manifest/timer-spec.js.map +1 -0
  68. package/src/generated/orbpro/manifest/timer-spec.ts +195 -0
  69. package/src/generated/orbpro/manifest.js +14 -0
  70. package/src/generated/orbpro/stream/buffer-mutability.d.ts +9 -0
  71. package/src/generated/orbpro/stream/buffer-mutability.d.ts.map +1 -0
  72. package/src/generated/orbpro/stream/buffer-mutability.js +12 -0
  73. package/src/generated/orbpro/stream/buffer-mutability.js.map +1 -0
  74. package/src/generated/orbpro/stream/buffer-mutability.ts +12 -0
  75. package/src/generated/orbpro/stream/buffer-ownership.d.ts +10 -0
  76. package/src/generated/orbpro/stream/buffer-ownership.d.ts.map +1 -0
  77. package/src/generated/orbpro/stream/buffer-ownership.js +13 -0
  78. package/src/generated/orbpro/stream/buffer-ownership.js.map +1 -0
  79. package/src/generated/orbpro/stream/buffer-ownership.ts +13 -0
  80. package/src/generated/orbpro/stream/flat-buffer-type-ref.d.ts +51 -0
  81. package/src/generated/orbpro/stream/flat-buffer-type-ref.d.ts.map +1 -0
  82. package/src/generated/orbpro/stream/flat-buffer-type-ref.js +115 -0
  83. package/src/generated/orbpro/stream/flat-buffer-type-ref.js.map +1 -0
  84. package/src/generated/orbpro/stream/flat-buffer-type-ref.ts +222 -0
  85. package/src/generated/orbpro/stream/typed-arena-buffer.d.ts +100 -0
  86. package/src/generated/orbpro/stream/typed-arena-buffer.d.ts.map +1 -0
  87. package/src/generated/orbpro/stream/typed-arena-buffer.js +215 -0
  88. package/src/generated/orbpro/stream/typed-arena-buffer.js.map +1 -0
  89. package/src/generated/orbpro/stream/typed-arena-buffer.ts +344 -0
  90. package/src/index.js +8 -0
  91. package/src/manifest/codec.js +40 -0
  92. package/src/manifest/index.js +9 -0
  93. package/src/manifest/normalize.js +275 -0
  94. package/src/runtime/bufferLike.js +28 -0
  95. package/src/runtime/constants.js +34 -0
  96. package/src/standards/index.js +153 -0
  97. package/src/standards/sharedCatalog.js +196 -0
  98. package/src/transport/index.js +8 -0
  99. package/src/transport/pki.js +140 -0
  100. package/src/utils/crypto.js +8 -0
  101. package/src/utils/encoding.js +54 -0
  102. package/src/utils/wasmCrypto.js +70 -0
@@ -0,0 +1,562 @@
1
+ // automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
4
+
5
+ import * as flatbuffers from "flatbuffers";
6
+
7
+ import {
8
+ BuildArtifact,
9
+ BuildArtifactT,
10
+ } from "../../orbpro/manifest/build-artifact.js";
11
+ import {
12
+ HostCapability,
13
+ HostCapabilityT,
14
+ } from "../../orbpro/manifest/host-capability.js";
15
+ import {
16
+ MethodManifest,
17
+ MethodManifestT,
18
+ } from "../../orbpro/manifest/method-manifest.js";
19
+ import { PluginFamily } from "../../orbpro/manifest/plugin-family.js";
20
+ import {
21
+ ProtocolSpec,
22
+ ProtocolSpecT,
23
+ } from "../../orbpro/manifest/protocol-spec.js";
24
+ import { TimerSpec, TimerSpecT } from "../../orbpro/manifest/timer-spec.js";
25
+ import {
26
+ FlatBufferTypeRef,
27
+ FlatBufferTypeRefT,
28
+ } from "../../orbpro/stream/flat-buffer-type-ref.js";
29
+
30
+ /**
31
+ * Canonical plugin manifest.
32
+ */
33
+ export class PluginManifest implements flatbuffers.IUnpackableObject<PluginManifestT> {
34
+ bb: flatbuffers.ByteBuffer | null = null;
35
+ bb_pos = 0;
36
+ __init(i: number, bb: flatbuffers.ByteBuffer): PluginManifest {
37
+ this.bb_pos = i;
38
+ this.bb = bb;
39
+ return this;
40
+ }
41
+
42
+ static getRootAsPluginManifest(
43
+ bb: flatbuffers.ByteBuffer,
44
+ obj?: PluginManifest,
45
+ ): PluginManifest {
46
+ return (obj || new PluginManifest()).__init(
47
+ bb.readInt32(bb.position()) + bb.position(),
48
+ bb,
49
+ );
50
+ }
51
+
52
+ static getSizePrefixedRootAsPluginManifest(
53
+ bb: flatbuffers.ByteBuffer,
54
+ obj?: PluginManifest,
55
+ ): PluginManifest {
56
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
57
+ return (obj || new PluginManifest()).__init(
58
+ bb.readInt32(bb.position()) + bb.position(),
59
+ bb,
60
+ );
61
+ }
62
+
63
+ static bufferHasIdentifier(bb: flatbuffers.ByteBuffer): boolean {
64
+ return bb.__has_identifier("PMAN");
65
+ }
66
+
67
+ pluginId(): string | null;
68
+ pluginId(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
69
+ pluginId(optionalEncoding?: any): string | Uint8Array | null {
70
+ const offset = this.bb!.__offset(this.bb_pos, 4);
71
+ return offset
72
+ ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
73
+ : null;
74
+ }
75
+
76
+ name(): string | null;
77
+ name(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
78
+ name(optionalEncoding?: any): string | Uint8Array | null {
79
+ const offset = this.bb!.__offset(this.bb_pos, 6);
80
+ return offset
81
+ ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
82
+ : null;
83
+ }
84
+
85
+ version(): string | null;
86
+ version(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
87
+ version(optionalEncoding?: any): string | Uint8Array | null {
88
+ const offset = this.bb!.__offset(this.bb_pos, 8);
89
+ return offset
90
+ ? this.bb!.__string(this.bb_pos + offset, optionalEncoding)
91
+ : null;
92
+ }
93
+
94
+ pluginFamily(): PluginFamily {
95
+ const offset = this.bb!.__offset(this.bb_pos, 10);
96
+ return offset
97
+ ? this.bb!.readUint8(this.bb_pos + offset)
98
+ : PluginFamily.ANALYSIS;
99
+ }
100
+
101
+ methods(index: number, obj?: MethodManifest): MethodManifest | null {
102
+ const offset = this.bb!.__offset(this.bb_pos, 12);
103
+ return offset
104
+ ? (obj || new MethodManifest()).__init(
105
+ this.bb!.__indirect(
106
+ this.bb!.__vector(this.bb_pos + offset) + index * 4,
107
+ ),
108
+ this.bb!,
109
+ )
110
+ : null;
111
+ }
112
+
113
+ methodsLength(): number {
114
+ const offset = this.bb!.__offset(this.bb_pos, 12);
115
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
116
+ }
117
+
118
+ capabilities(index: number, obj?: HostCapability): HostCapability | null {
119
+ const offset = this.bb!.__offset(this.bb_pos, 14);
120
+ return offset
121
+ ? (obj || new HostCapability()).__init(
122
+ this.bb!.__indirect(
123
+ this.bb!.__vector(this.bb_pos + offset) + index * 4,
124
+ ),
125
+ this.bb!,
126
+ )
127
+ : null;
128
+ }
129
+
130
+ capabilitiesLength(): number {
131
+ const offset = this.bb!.__offset(this.bb_pos, 14);
132
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
133
+ }
134
+
135
+ timers(index: number, obj?: TimerSpec): TimerSpec | null {
136
+ const offset = this.bb!.__offset(this.bb_pos, 16);
137
+ return offset
138
+ ? (obj || new TimerSpec()).__init(
139
+ this.bb!.__indirect(
140
+ this.bb!.__vector(this.bb_pos + offset) + index * 4,
141
+ ),
142
+ this.bb!,
143
+ )
144
+ : null;
145
+ }
146
+
147
+ timersLength(): number {
148
+ const offset = this.bb!.__offset(this.bb_pos, 16);
149
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
150
+ }
151
+
152
+ protocols(index: number, obj?: ProtocolSpec): ProtocolSpec | null {
153
+ const offset = this.bb!.__offset(this.bb_pos, 18);
154
+ return offset
155
+ ? (obj || new ProtocolSpec()).__init(
156
+ this.bb!.__indirect(
157
+ this.bb!.__vector(this.bb_pos + offset) + index * 4,
158
+ ),
159
+ this.bb!,
160
+ )
161
+ : null;
162
+ }
163
+
164
+ protocolsLength(): number {
165
+ const offset = this.bb!.__offset(this.bb_pos, 18);
166
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
167
+ }
168
+
169
+ schemasUsed(
170
+ index: number,
171
+ obj?: FlatBufferTypeRef,
172
+ ): FlatBufferTypeRef | null {
173
+ const offset = this.bb!.__offset(this.bb_pos, 20);
174
+ return offset
175
+ ? (obj || new FlatBufferTypeRef()).__init(
176
+ this.bb!.__indirect(
177
+ this.bb!.__vector(this.bb_pos + offset) + index * 4,
178
+ ),
179
+ this.bb!,
180
+ )
181
+ : null;
182
+ }
183
+
184
+ schemasUsedLength(): number {
185
+ const offset = this.bb!.__offset(this.bb_pos, 20);
186
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
187
+ }
188
+
189
+ buildArtifacts(index: number, obj?: BuildArtifact): BuildArtifact | null {
190
+ const offset = this.bb!.__offset(this.bb_pos, 22);
191
+ return offset
192
+ ? (obj || new BuildArtifact()).__init(
193
+ this.bb!.__indirect(
194
+ this.bb!.__vector(this.bb_pos + offset) + index * 4,
195
+ ),
196
+ this.bb!,
197
+ )
198
+ : null;
199
+ }
200
+
201
+ buildArtifactsLength(): number {
202
+ const offset = this.bb!.__offset(this.bb_pos, 22);
203
+ return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0;
204
+ }
205
+
206
+ abiVersion(): number {
207
+ const offset = this.bb!.__offset(this.bb_pos, 24);
208
+ return offset ? this.bb!.readUint32(this.bb_pos + offset) : 1;
209
+ }
210
+
211
+ static startPluginManifest(builder: flatbuffers.Builder) {
212
+ builder.startObject(11);
213
+ }
214
+
215
+ static addPluginId(
216
+ builder: flatbuffers.Builder,
217
+ pluginIdOffset: flatbuffers.Offset,
218
+ ) {
219
+ builder.addFieldOffset(0, pluginIdOffset, 0);
220
+ }
221
+
222
+ static addName(builder: flatbuffers.Builder, nameOffset: flatbuffers.Offset) {
223
+ builder.addFieldOffset(1, nameOffset, 0);
224
+ }
225
+
226
+ static addVersion(
227
+ builder: flatbuffers.Builder,
228
+ versionOffset: flatbuffers.Offset,
229
+ ) {
230
+ builder.addFieldOffset(2, versionOffset, 0);
231
+ }
232
+
233
+ static addPluginFamily(
234
+ builder: flatbuffers.Builder,
235
+ pluginFamily: PluginFamily,
236
+ ) {
237
+ builder.addFieldInt8(3, pluginFamily, PluginFamily.ANALYSIS);
238
+ }
239
+
240
+ static addMethods(
241
+ builder: flatbuffers.Builder,
242
+ methodsOffset: flatbuffers.Offset,
243
+ ) {
244
+ builder.addFieldOffset(4, methodsOffset, 0);
245
+ }
246
+
247
+ static createMethodsVector(
248
+ builder: flatbuffers.Builder,
249
+ data: flatbuffers.Offset[],
250
+ ): flatbuffers.Offset {
251
+ builder.startVector(4, data.length, 4);
252
+ for (let i = data.length - 1; i >= 0; i--) {
253
+ builder.addOffset(data[i]!);
254
+ }
255
+ return builder.endVector();
256
+ }
257
+
258
+ static startMethodsVector(builder: flatbuffers.Builder, numElems: number) {
259
+ builder.startVector(4, numElems, 4);
260
+ }
261
+
262
+ static addCapabilities(
263
+ builder: flatbuffers.Builder,
264
+ capabilitiesOffset: flatbuffers.Offset,
265
+ ) {
266
+ builder.addFieldOffset(5, capabilitiesOffset, 0);
267
+ }
268
+
269
+ static createCapabilitiesVector(
270
+ builder: flatbuffers.Builder,
271
+ data: flatbuffers.Offset[],
272
+ ): flatbuffers.Offset {
273
+ builder.startVector(4, data.length, 4);
274
+ for (let i = data.length - 1; i >= 0; i--) {
275
+ builder.addOffset(data[i]!);
276
+ }
277
+ return builder.endVector();
278
+ }
279
+
280
+ static startCapabilitiesVector(
281
+ builder: flatbuffers.Builder,
282
+ numElems: number,
283
+ ) {
284
+ builder.startVector(4, numElems, 4);
285
+ }
286
+
287
+ static addTimers(
288
+ builder: flatbuffers.Builder,
289
+ timersOffset: flatbuffers.Offset,
290
+ ) {
291
+ builder.addFieldOffset(6, timersOffset, 0);
292
+ }
293
+
294
+ static createTimersVector(
295
+ builder: flatbuffers.Builder,
296
+ data: flatbuffers.Offset[],
297
+ ): flatbuffers.Offset {
298
+ builder.startVector(4, data.length, 4);
299
+ for (let i = data.length - 1; i >= 0; i--) {
300
+ builder.addOffset(data[i]!);
301
+ }
302
+ return builder.endVector();
303
+ }
304
+
305
+ static startTimersVector(builder: flatbuffers.Builder, numElems: number) {
306
+ builder.startVector(4, numElems, 4);
307
+ }
308
+
309
+ static addProtocols(
310
+ builder: flatbuffers.Builder,
311
+ protocolsOffset: flatbuffers.Offset,
312
+ ) {
313
+ builder.addFieldOffset(7, protocolsOffset, 0);
314
+ }
315
+
316
+ static createProtocolsVector(
317
+ builder: flatbuffers.Builder,
318
+ data: flatbuffers.Offset[],
319
+ ): flatbuffers.Offset {
320
+ builder.startVector(4, data.length, 4);
321
+ for (let i = data.length - 1; i >= 0; i--) {
322
+ builder.addOffset(data[i]!);
323
+ }
324
+ return builder.endVector();
325
+ }
326
+
327
+ static startProtocolsVector(builder: flatbuffers.Builder, numElems: number) {
328
+ builder.startVector(4, numElems, 4);
329
+ }
330
+
331
+ static addSchemasUsed(
332
+ builder: flatbuffers.Builder,
333
+ schemasUsedOffset: flatbuffers.Offset,
334
+ ) {
335
+ builder.addFieldOffset(8, schemasUsedOffset, 0);
336
+ }
337
+
338
+ static createSchemasUsedVector(
339
+ builder: flatbuffers.Builder,
340
+ data: flatbuffers.Offset[],
341
+ ): flatbuffers.Offset {
342
+ builder.startVector(4, data.length, 4);
343
+ for (let i = data.length - 1; i >= 0; i--) {
344
+ builder.addOffset(data[i]!);
345
+ }
346
+ return builder.endVector();
347
+ }
348
+
349
+ static startSchemasUsedVector(
350
+ builder: flatbuffers.Builder,
351
+ numElems: number,
352
+ ) {
353
+ builder.startVector(4, numElems, 4);
354
+ }
355
+
356
+ static addBuildArtifacts(
357
+ builder: flatbuffers.Builder,
358
+ buildArtifactsOffset: flatbuffers.Offset,
359
+ ) {
360
+ builder.addFieldOffset(9, buildArtifactsOffset, 0);
361
+ }
362
+
363
+ static createBuildArtifactsVector(
364
+ builder: flatbuffers.Builder,
365
+ data: flatbuffers.Offset[],
366
+ ): flatbuffers.Offset {
367
+ builder.startVector(4, data.length, 4);
368
+ for (let i = data.length - 1; i >= 0; i--) {
369
+ builder.addOffset(data[i]!);
370
+ }
371
+ return builder.endVector();
372
+ }
373
+
374
+ static startBuildArtifactsVector(
375
+ builder: flatbuffers.Builder,
376
+ numElems: number,
377
+ ) {
378
+ builder.startVector(4, numElems, 4);
379
+ }
380
+
381
+ static addAbiVersion(builder: flatbuffers.Builder, abiVersion: number) {
382
+ builder.addFieldInt32(10, abiVersion, 1);
383
+ }
384
+
385
+ static endPluginManifest(builder: flatbuffers.Builder): flatbuffers.Offset {
386
+ const offset = builder.endObject();
387
+ builder.requiredField(offset, 4); // plugin_id
388
+ return offset;
389
+ }
390
+
391
+ static finishPluginManifestBuffer(
392
+ builder: flatbuffers.Builder,
393
+ offset: flatbuffers.Offset,
394
+ ) {
395
+ builder.finish(offset, "PMAN");
396
+ }
397
+
398
+ static finishSizePrefixedPluginManifestBuffer(
399
+ builder: flatbuffers.Builder,
400
+ offset: flatbuffers.Offset,
401
+ ) {
402
+ builder.finish(offset, "PMAN", true);
403
+ }
404
+
405
+ static createPluginManifest(
406
+ builder: flatbuffers.Builder,
407
+ pluginIdOffset: flatbuffers.Offset,
408
+ nameOffset: flatbuffers.Offset,
409
+ versionOffset: flatbuffers.Offset,
410
+ pluginFamily: PluginFamily,
411
+ methodsOffset: flatbuffers.Offset,
412
+ capabilitiesOffset: flatbuffers.Offset,
413
+ timersOffset: flatbuffers.Offset,
414
+ protocolsOffset: flatbuffers.Offset,
415
+ schemasUsedOffset: flatbuffers.Offset,
416
+ buildArtifactsOffset: flatbuffers.Offset,
417
+ abiVersion: number,
418
+ ): flatbuffers.Offset {
419
+ PluginManifest.startPluginManifest(builder);
420
+ PluginManifest.addPluginId(builder, pluginIdOffset);
421
+ PluginManifest.addName(builder, nameOffset);
422
+ PluginManifest.addVersion(builder, versionOffset);
423
+ PluginManifest.addPluginFamily(builder, pluginFamily);
424
+ PluginManifest.addMethods(builder, methodsOffset);
425
+ PluginManifest.addCapabilities(builder, capabilitiesOffset);
426
+ PluginManifest.addTimers(builder, timersOffset);
427
+ PluginManifest.addProtocols(builder, protocolsOffset);
428
+ PluginManifest.addSchemasUsed(builder, schemasUsedOffset);
429
+ PluginManifest.addBuildArtifacts(builder, buildArtifactsOffset);
430
+ PluginManifest.addAbiVersion(builder, abiVersion);
431
+ return PluginManifest.endPluginManifest(builder);
432
+ }
433
+
434
+ unpack(): PluginManifestT {
435
+ return new PluginManifestT(
436
+ this.pluginId(),
437
+ this.name(),
438
+ this.version(),
439
+ this.pluginFamily(),
440
+ this.bb!.createObjList<MethodManifest, MethodManifestT>(
441
+ this.methods.bind(this),
442
+ this.methodsLength(),
443
+ ),
444
+ this.bb!.createObjList<HostCapability, HostCapabilityT>(
445
+ this.capabilities.bind(this),
446
+ this.capabilitiesLength(),
447
+ ),
448
+ this.bb!.createObjList<TimerSpec, TimerSpecT>(
449
+ this.timers.bind(this),
450
+ this.timersLength(),
451
+ ),
452
+ this.bb!.createObjList<ProtocolSpec, ProtocolSpecT>(
453
+ this.protocols.bind(this),
454
+ this.protocolsLength(),
455
+ ),
456
+ this.bb!.createObjList<FlatBufferTypeRef, FlatBufferTypeRefT>(
457
+ this.schemasUsed.bind(this),
458
+ this.schemasUsedLength(),
459
+ ),
460
+ this.bb!.createObjList<BuildArtifact, BuildArtifactT>(
461
+ this.buildArtifacts.bind(this),
462
+ this.buildArtifactsLength(),
463
+ ),
464
+ this.abiVersion(),
465
+ );
466
+ }
467
+
468
+ unpackTo(_o: PluginManifestT): void {
469
+ _o.pluginId = this.pluginId();
470
+ _o.name = this.name();
471
+ _o.version = this.version();
472
+ _o.pluginFamily = this.pluginFamily();
473
+ _o.methods = this.bb!.createObjList<MethodManifest, MethodManifestT>(
474
+ this.methods.bind(this),
475
+ this.methodsLength(),
476
+ );
477
+ _o.capabilities = this.bb!.createObjList<HostCapability, HostCapabilityT>(
478
+ this.capabilities.bind(this),
479
+ this.capabilitiesLength(),
480
+ );
481
+ _o.timers = this.bb!.createObjList<TimerSpec, TimerSpecT>(
482
+ this.timers.bind(this),
483
+ this.timersLength(),
484
+ );
485
+ _o.protocols = this.bb!.createObjList<ProtocolSpec, ProtocolSpecT>(
486
+ this.protocols.bind(this),
487
+ this.protocolsLength(),
488
+ );
489
+ _o.schemasUsed = this.bb!.createObjList<
490
+ FlatBufferTypeRef,
491
+ FlatBufferTypeRefT
492
+ >(this.schemasUsed.bind(this), this.schemasUsedLength());
493
+ _o.buildArtifacts = this.bb!.createObjList<BuildArtifact, BuildArtifactT>(
494
+ this.buildArtifacts.bind(this),
495
+ this.buildArtifactsLength(),
496
+ );
497
+ _o.abiVersion = this.abiVersion();
498
+ }
499
+ }
500
+
501
+ export class PluginManifestT implements flatbuffers.IGeneratedObject {
502
+ constructor(
503
+ public pluginId: string | Uint8Array | null = null,
504
+ public name: string | Uint8Array | null = null,
505
+ public version: string | Uint8Array | null = null,
506
+ public pluginFamily: PluginFamily = PluginFamily.ANALYSIS,
507
+ public methods: MethodManifestT[] = [],
508
+ public capabilities: HostCapabilityT[] = [],
509
+ public timers: TimerSpecT[] = [],
510
+ public protocols: ProtocolSpecT[] = [],
511
+ public schemasUsed: FlatBufferTypeRefT[] = [],
512
+ public buildArtifacts: BuildArtifactT[] = [],
513
+ public abiVersion: number = 1,
514
+ ) {}
515
+
516
+ pack(builder: flatbuffers.Builder): flatbuffers.Offset {
517
+ const pluginId =
518
+ this.pluginId !== null ? builder.createString(this.pluginId!) : 0;
519
+ const name = this.name !== null ? builder.createString(this.name!) : 0;
520
+ const version =
521
+ this.version !== null ? builder.createString(this.version!) : 0;
522
+ const methods = PluginManifest.createMethodsVector(
523
+ builder,
524
+ builder.createObjectOffsetList(this.methods),
525
+ );
526
+ const capabilities = PluginManifest.createCapabilitiesVector(
527
+ builder,
528
+ builder.createObjectOffsetList(this.capabilities),
529
+ );
530
+ const timers = PluginManifest.createTimersVector(
531
+ builder,
532
+ builder.createObjectOffsetList(this.timers),
533
+ );
534
+ const protocols = PluginManifest.createProtocolsVector(
535
+ builder,
536
+ builder.createObjectOffsetList(this.protocols),
537
+ );
538
+ const schemasUsed = PluginManifest.createSchemasUsedVector(
539
+ builder,
540
+ builder.createObjectOffsetList(this.schemasUsed),
541
+ );
542
+ const buildArtifacts = PluginManifest.createBuildArtifactsVector(
543
+ builder,
544
+ builder.createObjectOffsetList(this.buildArtifacts),
545
+ );
546
+
547
+ return PluginManifest.createPluginManifest(
548
+ builder,
549
+ pluginId,
550
+ name,
551
+ version,
552
+ this.pluginFamily,
553
+ methods,
554
+ capabilities,
555
+ timers,
556
+ protocols,
557
+ schemasUsed,
558
+ buildArtifacts,
559
+ this.abiVersion,
560
+ );
561
+ }
562
+ }
@@ -0,0 +1,70 @@
1
+ import * as flatbuffers from 'flatbuffers';
2
+ import { AcceptedTypeSet, AcceptedTypeSetT } from '../../orbpro/manifest/accepted-type-set.js';
3
+ /**
4
+ * One input or output port on a method.
5
+ */
6
+ export declare class PortManifest implements flatbuffers.IUnpackableObject<PortManifestT> {
7
+ bb: flatbuffers.ByteBuffer | null;
8
+ bb_pos: number;
9
+ __init(i: number, bb: flatbuffers.ByteBuffer): PortManifest;
10
+ static getRootAsPortManifest(bb: flatbuffers.ByteBuffer, obj?: PortManifest): PortManifest;
11
+ static getSizePrefixedRootAsPortManifest(bb: flatbuffers.ByteBuffer, obj?: PortManifest): PortManifest;
12
+ /**
13
+ * Stable port identifier within the method.
14
+ */
15
+ portId(): string | null;
16
+ portId(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
17
+ /**
18
+ * Human-readable name for UIs.
19
+ */
20
+ displayName(): string | null;
21
+ displayName(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
22
+ /**
23
+ * Type sets accepted on this port.
24
+ */
25
+ acceptedTypeSets(index: number, obj?: AcceptedTypeSet): AcceptedTypeSet | null;
26
+ acceptedTypeSetsLength(): number;
27
+ /**
28
+ * Minimum number of streams that must be connected.
29
+ */
30
+ minStreams(): number;
31
+ /**
32
+ * Maximum number of streams that may be connected.
33
+ */
34
+ maxStreams(): number;
35
+ /**
36
+ * Whether the port must be connected for invocation.
37
+ */
38
+ required(): boolean;
39
+ /**
40
+ * Optional human-readable description.
41
+ */
42
+ description(): string | null;
43
+ description(optionalEncoding: flatbuffers.Encoding): string | Uint8Array | null;
44
+ static startPortManifest(builder: flatbuffers.Builder): void;
45
+ static addPortId(builder: flatbuffers.Builder, portIdOffset: flatbuffers.Offset): void;
46
+ static addDisplayName(builder: flatbuffers.Builder, displayNameOffset: flatbuffers.Offset): void;
47
+ static addAcceptedTypeSets(builder: flatbuffers.Builder, acceptedTypeSetsOffset: flatbuffers.Offset): void;
48
+ static createAcceptedTypeSetsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
49
+ static startAcceptedTypeSetsVector(builder: flatbuffers.Builder, numElems: number): void;
50
+ static addMinStreams(builder: flatbuffers.Builder, minStreams: number): void;
51
+ static addMaxStreams(builder: flatbuffers.Builder, maxStreams: number): void;
52
+ static addRequired(builder: flatbuffers.Builder, required: boolean): void;
53
+ static addDescription(builder: flatbuffers.Builder, descriptionOffset: flatbuffers.Offset): void;
54
+ static endPortManifest(builder: flatbuffers.Builder): flatbuffers.Offset;
55
+ static createPortManifest(builder: flatbuffers.Builder, portIdOffset: flatbuffers.Offset, displayNameOffset: flatbuffers.Offset, acceptedTypeSetsOffset: flatbuffers.Offset, minStreams: number, maxStreams: number, required: boolean, descriptionOffset: flatbuffers.Offset): flatbuffers.Offset;
56
+ unpack(): PortManifestT;
57
+ unpackTo(_o: PortManifestT): void;
58
+ }
59
+ export declare class PortManifestT implements flatbuffers.IGeneratedObject {
60
+ portId: string | Uint8Array | null;
61
+ displayName: string | Uint8Array | null;
62
+ acceptedTypeSets: (AcceptedTypeSetT)[];
63
+ minStreams: number;
64
+ maxStreams: number;
65
+ required: boolean;
66
+ description: string | Uint8Array | null;
67
+ constructor(portId?: string | Uint8Array | null, displayName?: string | Uint8Array | null, acceptedTypeSets?: (AcceptedTypeSetT)[], minStreams?: number, maxStreams?: number, required?: boolean, description?: string | Uint8Array | null);
68
+ pack(builder: flatbuffers.Builder): flatbuffers.Offset;
69
+ }
70
+ //# sourceMappingURL=port-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"port-manifest.d.ts","sourceRoot":"","sources":["../../../../../../../../Users/tj/software/OrbPro/packages/plugin-sdk/src/generated/orbpro/manifest/port-manifest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAG/F;;GAEG;AACH,qBAAa,YAAa,YAAW,WAAW,CAAC,iBAAiB,CAAC,aAAa,CAAC;IAC/E,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,YAAY;IAM1D,MAAM,CAAC,qBAAqB,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,YAAY,GAAE,YAAY;IAIvF,MAAM,CAAC,iCAAiC,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,YAAY,GAAE,YAAY;IAKnG;;OAEG;IACH,MAAM,IAAG,MAAM,GAAC,IAAI;IACpB,MAAM,CAAC,gBAAgB,EAAC,WAAW,CAAC,QAAQ,GAAE,MAAM,GAAC,UAAU,GAAC,IAAI;IAMpE;;OAEG;IACH,WAAW,IAAG,MAAM,GAAC,IAAI;IACzB,WAAW,CAAC,gBAAgB,EAAC,WAAW,CAAC,QAAQ,GAAE,MAAM,GAAC,UAAU,GAAC,IAAI;IAMzE;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAC,eAAe,GA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