sdn-flow 0.2.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.
- package/.claude/SKILLS.md +7 -0
- package/.claude/skills/sdn-plugin-abi-compliance/SKILL.md +56 -0
- package/.claude/todo/001-js-host-startup-and-deno.md +85 -0
- package/LICENSE +21 -0
- package/README.md +223 -0
- package/bin/sdn-flow-host.js +169 -0
- package/docs/.nojekyll +0 -0
- package/docs/ARCHITECTURE.md +200 -0
- package/docs/HOST_CAPABILITY_MODEL.md +317 -0
- package/docs/PLUGIN_ARCHITECTURE.md +145 -0
- package/docs/PLUGIN_COMPATIBILITY.md +61 -0
- package/docs/PLUGIN_COMPLIANCE_CHECKS.md +82 -0
- package/docs/PLUGIN_MANIFEST.md +94 -0
- package/docs/css/style.css +465 -0
- package/docs/index.html +218 -0
- package/docs/js/app.mjs +751 -0
- package/docs/js/editor-panel.mjs +203 -0
- package/docs/js/flow-canvas.mjs +515 -0
- package/docs/js/flow-model.mjs +391 -0
- package/docs/js/workers/emception.worker.js +146 -0
- package/docs/js/workers/pyodide.worker.js +134 -0
- package/native/flow_source_generator.cpp +1958 -0
- package/package.json +67 -0
- package/schemas/FlowRuntimeAbi.fbs +91 -0
- package/src/auth/canonicalize.js +5 -0
- package/src/auth/index.js +11 -0
- package/src/auth/permissions.js +8 -0
- package/src/compiler/CppFlowSourceGenerator.js +475 -0
- package/src/compiler/EmceptionCompilerAdapter.js +244 -0
- package/src/compiler/SignedArtifactCatalog.js +152 -0
- package/src/compiler/index.js +8 -0
- package/src/compiler/nativeFlowSourceGeneratorTool.js +144 -0
- package/src/compliance/index.js +13 -0
- package/src/compliance/pluginCompliance.js +11 -0
- package/src/deploy/FlowDeploymentClient.js +532 -0
- package/src/deploy/index.js +8 -0
- package/src/designer/FlowDesignerSession.js +158 -0
- package/src/designer/index.js +2 -0
- package/src/designer/requirements.js +184 -0
- package/src/generated/runtimeAbiLayouts.js +544 -0
- package/src/host/appHost.js +105 -0
- package/src/host/autoHost.js +113 -0
- package/src/host/browserHostAdapters.js +108 -0
- package/src/host/compiledFlowRuntimeHost.js +703 -0
- package/src/host/constants.js +55 -0
- package/src/host/dependencyRuntime.js +227 -0
- package/src/host/descriptorAbi.js +351 -0
- package/src/host/fetchService.js +237 -0
- package/src/host/httpHostAdapters.js +280 -0
- package/src/host/index.js +91 -0
- package/src/host/installedFlowHost.js +885 -0
- package/src/host/invocationAbi.js +440 -0
- package/src/host/normalize.js +372 -0
- package/src/host/packageManagers.js +369 -0
- package/src/host/profile.js +134 -0
- package/src/host/runtimeAbi.js +106 -0
- package/src/host/workspace.js +895 -0
- package/src/index.js +8 -0
- package/src/runtime/FlowRuntime.js +273 -0
- package/src/runtime/MethodRegistry.js +295 -0
- package/src/runtime/constants.js +44 -0
- package/src/runtime/index.js +19 -0
- package/src/runtime/normalize.js +377 -0
- package/src/transport/index.js +7 -0
- package/src/transport/pki.js +7 -0
- package/src/utils/crypto.js +7 -0
- package/src/utils/encoding.js +65 -0
- package/src/utils/wasmCrypto.js +69 -0
- package/tools/run-plugin-compliance-check.mjs +153 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ExternalInterfaceDirection,
|
|
3
|
+
ExternalInterfaceKind,
|
|
4
|
+
TriggerKind,
|
|
5
|
+
normalizeManifest,
|
|
6
|
+
normalizeProgram,
|
|
7
|
+
} from "../runtime/index.js";
|
|
8
|
+
|
|
9
|
+
function canonicalInterfaceKey(externalInterface) {
|
|
10
|
+
return [
|
|
11
|
+
externalInterface.kind,
|
|
12
|
+
externalInterface.direction,
|
|
13
|
+
externalInterface.capability,
|
|
14
|
+
externalInterface.resource,
|
|
15
|
+
externalInterface.protocolId,
|
|
16
|
+
externalInterface.topic,
|
|
17
|
+
externalInterface.path,
|
|
18
|
+
]
|
|
19
|
+
.map((value) => value ?? "")
|
|
20
|
+
.join("::");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function mergeInterfaces(targetMap, interfaces, owner) {
|
|
24
|
+
for (const externalInterface of interfaces) {
|
|
25
|
+
const key = canonicalInterfaceKey(externalInterface);
|
|
26
|
+
const existing = targetMap.get(key);
|
|
27
|
+
if (existing) {
|
|
28
|
+
existing.owners.add(owner);
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
targetMap.set(key, {
|
|
32
|
+
...externalInterface,
|
|
33
|
+
owners: new Set([owner]),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function triggerToExternalInterface(trigger) {
|
|
39
|
+
switch (trigger.kind) {
|
|
40
|
+
case TriggerKind.TIMER:
|
|
41
|
+
return {
|
|
42
|
+
interfaceId: trigger.triggerId,
|
|
43
|
+
kind: ExternalInterfaceKind.TIMER,
|
|
44
|
+
direction: ExternalInterfaceDirection.INPUT,
|
|
45
|
+
capability: "timers",
|
|
46
|
+
resource: trigger.source ?? trigger.triggerId,
|
|
47
|
+
description: trigger.description,
|
|
48
|
+
required: true,
|
|
49
|
+
acceptedTypes: trigger.acceptedTypes,
|
|
50
|
+
properties: {
|
|
51
|
+
defaultIntervalMs: trigger.defaultIntervalMs,
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
case TriggerKind.PUBSUB_SUBSCRIPTION:
|
|
55
|
+
return {
|
|
56
|
+
interfaceId: trigger.triggerId,
|
|
57
|
+
kind: ExternalInterfaceKind.PUBSUB,
|
|
58
|
+
direction: ExternalInterfaceDirection.INPUT,
|
|
59
|
+
capability: "pubsub",
|
|
60
|
+
resource: trigger.source ?? trigger.triggerId,
|
|
61
|
+
topic: trigger.source ?? null,
|
|
62
|
+
description: trigger.description,
|
|
63
|
+
required: true,
|
|
64
|
+
acceptedTypes: trigger.acceptedTypes,
|
|
65
|
+
properties: {},
|
|
66
|
+
};
|
|
67
|
+
case TriggerKind.PROTOCOL_REQUEST:
|
|
68
|
+
return {
|
|
69
|
+
interfaceId: trigger.triggerId,
|
|
70
|
+
kind: ExternalInterfaceKind.PROTOCOL,
|
|
71
|
+
direction: ExternalInterfaceDirection.INPUT,
|
|
72
|
+
capability: "protocol_handle",
|
|
73
|
+
resource: trigger.protocolId ?? trigger.source ?? trigger.triggerId,
|
|
74
|
+
protocolId: trigger.protocolId,
|
|
75
|
+
description: trigger.description,
|
|
76
|
+
required: true,
|
|
77
|
+
acceptedTypes: trigger.acceptedTypes,
|
|
78
|
+
properties: {},
|
|
79
|
+
};
|
|
80
|
+
case TriggerKind.HTTP_REQUEST:
|
|
81
|
+
return {
|
|
82
|
+
interfaceId: trigger.triggerId,
|
|
83
|
+
kind: ExternalInterfaceKind.HTTP,
|
|
84
|
+
direction: ExternalInterfaceDirection.INPUT,
|
|
85
|
+
capability: "http",
|
|
86
|
+
resource: trigger.source ?? trigger.triggerId,
|
|
87
|
+
path: trigger.source ?? null,
|
|
88
|
+
description: trigger.description,
|
|
89
|
+
required: true,
|
|
90
|
+
acceptedTypes: trigger.acceptedTypes,
|
|
91
|
+
properties: {},
|
|
92
|
+
};
|
|
93
|
+
default:
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function summarizeProgramRequirements({
|
|
99
|
+
program,
|
|
100
|
+
registry = null,
|
|
101
|
+
manifests = [],
|
|
102
|
+
} = {}) {
|
|
103
|
+
const normalizedProgram = normalizeProgram(program);
|
|
104
|
+
const interfaceMap = new Map();
|
|
105
|
+
const capabilities = new Set();
|
|
106
|
+
const pluginSummaries = [];
|
|
107
|
+
const seenPluginIds = new Set();
|
|
108
|
+
|
|
109
|
+
mergeInterfaces(interfaceMap, normalizedProgram.externalInterfaces, "program");
|
|
110
|
+
for (const trigger of normalizedProgram.triggers) {
|
|
111
|
+
const externalInterface = triggerToExternalInterface(trigger);
|
|
112
|
+
if (externalInterface) {
|
|
113
|
+
mergeInterfaces(interfaceMap, [externalInterface], `trigger:${trigger.triggerId}`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const availableManifests = new Map();
|
|
118
|
+
for (const manifest of manifests) {
|
|
119
|
+
const normalizedManifest = normalizeManifest(manifest);
|
|
120
|
+
availableManifests.set(normalizedManifest.pluginId, normalizedManifest);
|
|
121
|
+
}
|
|
122
|
+
if (registry && typeof registry.listPlugins === "function") {
|
|
123
|
+
for (const pluginRecord of registry.listPlugins()) {
|
|
124
|
+
availableManifests.set(pluginRecord.pluginId, pluginRecord.manifest);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
for (const pluginId of normalizedProgram.requiredPlugins) {
|
|
129
|
+
seenPluginIds.add(pluginId);
|
|
130
|
+
}
|
|
131
|
+
for (const node of normalizedProgram.nodes) {
|
|
132
|
+
seenPluginIds.add(node.pluginId);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
for (const pluginId of seenPluginIds) {
|
|
136
|
+
const manifest = availableManifests.get(pluginId);
|
|
137
|
+
if (!manifest) {
|
|
138
|
+
pluginSummaries.push({
|
|
139
|
+
pluginId,
|
|
140
|
+
resolved: false,
|
|
141
|
+
capabilities: [],
|
|
142
|
+
externalInterfaces: [],
|
|
143
|
+
});
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
pluginSummaries.push({
|
|
147
|
+
pluginId,
|
|
148
|
+
resolved: true,
|
|
149
|
+
capabilities: manifest.capabilities,
|
|
150
|
+
externalInterfaces: manifest.externalInterfaces,
|
|
151
|
+
});
|
|
152
|
+
for (const capability of manifest.capabilities) {
|
|
153
|
+
capabilities.add(capability);
|
|
154
|
+
}
|
|
155
|
+
mergeInterfaces(interfaceMap, manifest.externalInterfaces, `plugin:${pluginId}`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
for (const dependency of normalizedProgram.artifactDependencies) {
|
|
159
|
+
for (const capability of dependency.requiredCapabilities) {
|
|
160
|
+
capabilities.add(capability);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
return {
|
|
165
|
+
programId: normalizedProgram.programId,
|
|
166
|
+
capabilities: Array.from(capabilities).sort(),
|
|
167
|
+
externalInterfaces: Array.from(interfaceMap.values())
|
|
168
|
+
.map((externalInterface) => ({
|
|
169
|
+
...externalInterface,
|
|
170
|
+
owners: Array.from(externalInterface.owners).sort(),
|
|
171
|
+
}))
|
|
172
|
+
.sort((left, right) =>
|
|
173
|
+
`${left.kind}:${left.direction}:${left.resource ?? ""}`.localeCompare(
|
|
174
|
+
`${right.kind}:${right.direction}:${right.resource ?? ""}`,
|
|
175
|
+
),
|
|
176
|
+
),
|
|
177
|
+
artifactDependencies: normalizedProgram.artifactDependencies,
|
|
178
|
+
plugins: pluginSummaries.sort((left, right) =>
|
|
179
|
+
left.pluginId.localeCompare(right.pluginId),
|
|
180
|
+
),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export default summarizeProgramRequirements;
|
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
// Auto-generated from schemas/FlowRuntimeAbi.fbs - DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
export const FlowFrameDescriptorLayout = Object.freeze({
|
|
4
|
+
schema: "sdn.flow.abi.FlowFrameDescriptor",
|
|
5
|
+
schemaPath: "schemas/FlowRuntimeAbi.fbs",
|
|
6
|
+
size: 48,
|
|
7
|
+
alignment: 8,
|
|
8
|
+
ingressIndexOffset: 0,
|
|
9
|
+
typeDescriptorIndexOffset: 4,
|
|
10
|
+
portIdPointerOffset: 8,
|
|
11
|
+
alignmentOffset: 12,
|
|
12
|
+
offsetOffset: 16,
|
|
13
|
+
sizeOffset: 20,
|
|
14
|
+
streamIdOffset: 24,
|
|
15
|
+
sequenceOffset: 28,
|
|
16
|
+
traceTokenOffset: 32,
|
|
17
|
+
endOfStreamOffset: 40,
|
|
18
|
+
occupiedOffset: 41,
|
|
19
|
+
fields: Object.freeze({
|
|
20
|
+
ingressIndex: Object.freeze({
|
|
21
|
+
schemaField: "ingress_index",
|
|
22
|
+
offset: 0,
|
|
23
|
+
size: 4,
|
|
24
|
+
alignment: 4,
|
|
25
|
+
scalarType: "uint32",
|
|
26
|
+
}),
|
|
27
|
+
typeDescriptorIndex: Object.freeze({
|
|
28
|
+
schemaField: "type_descriptor_index",
|
|
29
|
+
offset: 4,
|
|
30
|
+
size: 4,
|
|
31
|
+
alignment: 4,
|
|
32
|
+
scalarType: "uint32",
|
|
33
|
+
}),
|
|
34
|
+
portIdPointer: Object.freeze({
|
|
35
|
+
schemaField: "port_id_pointer",
|
|
36
|
+
offset: 8,
|
|
37
|
+
size: 4,
|
|
38
|
+
alignment: 4,
|
|
39
|
+
scalarType: "uint32",
|
|
40
|
+
}),
|
|
41
|
+
alignment: Object.freeze({
|
|
42
|
+
schemaField: "alignment",
|
|
43
|
+
offset: 12,
|
|
44
|
+
size: 4,
|
|
45
|
+
alignment: 4,
|
|
46
|
+
scalarType: "uint32",
|
|
47
|
+
}),
|
|
48
|
+
offset: Object.freeze({
|
|
49
|
+
schemaField: "offset",
|
|
50
|
+
offset: 16,
|
|
51
|
+
size: 4,
|
|
52
|
+
alignment: 4,
|
|
53
|
+
scalarType: "uint32",
|
|
54
|
+
}),
|
|
55
|
+
size: Object.freeze({
|
|
56
|
+
schemaField: "size",
|
|
57
|
+
offset: 20,
|
|
58
|
+
size: 4,
|
|
59
|
+
alignment: 4,
|
|
60
|
+
scalarType: "uint32",
|
|
61
|
+
}),
|
|
62
|
+
streamId: Object.freeze({
|
|
63
|
+
schemaField: "stream_id",
|
|
64
|
+
offset: 24,
|
|
65
|
+
size: 4,
|
|
66
|
+
alignment: 4,
|
|
67
|
+
scalarType: "uint32",
|
|
68
|
+
}),
|
|
69
|
+
sequence: Object.freeze({
|
|
70
|
+
schemaField: "sequence",
|
|
71
|
+
offset: 28,
|
|
72
|
+
size: 4,
|
|
73
|
+
alignment: 4,
|
|
74
|
+
scalarType: "uint32",
|
|
75
|
+
}),
|
|
76
|
+
traceToken: Object.freeze({
|
|
77
|
+
schemaField: "trace_token",
|
|
78
|
+
offset: 32,
|
|
79
|
+
size: 8,
|
|
80
|
+
alignment: 8,
|
|
81
|
+
scalarType: "uint64",
|
|
82
|
+
}),
|
|
83
|
+
endOfStream: Object.freeze({
|
|
84
|
+
schemaField: "end_of_stream",
|
|
85
|
+
offset: 40,
|
|
86
|
+
size: 1,
|
|
87
|
+
alignment: 1,
|
|
88
|
+
scalarType: "bool",
|
|
89
|
+
}),
|
|
90
|
+
occupied: Object.freeze({
|
|
91
|
+
schemaField: "occupied",
|
|
92
|
+
offset: 41,
|
|
93
|
+
size: 1,
|
|
94
|
+
alignment: 1,
|
|
95
|
+
scalarType: "bool",
|
|
96
|
+
}),
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export const FlowInvocationDescriptorLayout = Object.freeze({
|
|
101
|
+
schema: "sdn.flow.abi.FlowInvocationDescriptor",
|
|
102
|
+
schemaPath: "schemas/FlowRuntimeAbi.fbs",
|
|
103
|
+
size: 24,
|
|
104
|
+
alignment: 4,
|
|
105
|
+
nodeIndexOffset: 0,
|
|
106
|
+
dispatchDescriptorIndexOffset: 4,
|
|
107
|
+
pluginIdPointerOffset: 8,
|
|
108
|
+
methodIdPointerOffset: 12,
|
|
109
|
+
framesPointerOffset: 16,
|
|
110
|
+
frameCountOffset: 20,
|
|
111
|
+
fields: Object.freeze({
|
|
112
|
+
nodeIndex: Object.freeze({
|
|
113
|
+
schemaField: "node_index",
|
|
114
|
+
offset: 0,
|
|
115
|
+
size: 4,
|
|
116
|
+
alignment: 4,
|
|
117
|
+
scalarType: "uint32",
|
|
118
|
+
}),
|
|
119
|
+
dispatchDescriptorIndex: Object.freeze({
|
|
120
|
+
schemaField: "dispatch_descriptor_index",
|
|
121
|
+
offset: 4,
|
|
122
|
+
size: 4,
|
|
123
|
+
alignment: 4,
|
|
124
|
+
scalarType: "uint32",
|
|
125
|
+
}),
|
|
126
|
+
pluginIdPointer: Object.freeze({
|
|
127
|
+
schemaField: "plugin_id_pointer",
|
|
128
|
+
offset: 8,
|
|
129
|
+
size: 4,
|
|
130
|
+
alignment: 4,
|
|
131
|
+
scalarType: "uint32",
|
|
132
|
+
}),
|
|
133
|
+
methodIdPointer: Object.freeze({
|
|
134
|
+
schemaField: "method_id_pointer",
|
|
135
|
+
offset: 12,
|
|
136
|
+
size: 4,
|
|
137
|
+
alignment: 4,
|
|
138
|
+
scalarType: "uint32",
|
|
139
|
+
}),
|
|
140
|
+
framesPointer: Object.freeze({
|
|
141
|
+
schemaField: "frames_pointer",
|
|
142
|
+
offset: 16,
|
|
143
|
+
size: 4,
|
|
144
|
+
alignment: 4,
|
|
145
|
+
scalarType: "uint32",
|
|
146
|
+
}),
|
|
147
|
+
frameCount: Object.freeze({
|
|
148
|
+
schemaField: "frame_count",
|
|
149
|
+
offset: 20,
|
|
150
|
+
size: 4,
|
|
151
|
+
alignment: 4,
|
|
152
|
+
scalarType: "uint32",
|
|
153
|
+
}),
|
|
154
|
+
}),
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
export const FlowNodeDispatchDescriptorLayout = Object.freeze({
|
|
158
|
+
schema: "sdn.flow.abi.FlowNodeDispatchDescriptor",
|
|
159
|
+
schemaPath: "schemas/FlowRuntimeAbi.fbs",
|
|
160
|
+
size: 60,
|
|
161
|
+
alignment: 4,
|
|
162
|
+
nodeIdPointerOffset: 0,
|
|
163
|
+
nodeIndexOffset: 4,
|
|
164
|
+
dependencyIdPointerOffset: 8,
|
|
165
|
+
dependencyIndexOffset: 12,
|
|
166
|
+
pluginIdPointerOffset: 16,
|
|
167
|
+
methodIdPointerOffset: 20,
|
|
168
|
+
dispatchModelPointerOffset: 24,
|
|
169
|
+
entrypointPointerOffset: 28,
|
|
170
|
+
manifestBytesSymbolPointerOffset: 32,
|
|
171
|
+
manifestSizeSymbolPointerOffset: 36,
|
|
172
|
+
initSymbolPointerOffset: 40,
|
|
173
|
+
destroySymbolPointerOffset: 44,
|
|
174
|
+
mallocSymbolPointerOffset: 48,
|
|
175
|
+
freeSymbolPointerOffset: 52,
|
|
176
|
+
streamInvokeSymbolPointerOffset: 56,
|
|
177
|
+
fields: Object.freeze({
|
|
178
|
+
nodeIdPointer: Object.freeze({
|
|
179
|
+
schemaField: "node_id_pointer",
|
|
180
|
+
offset: 0,
|
|
181
|
+
size: 4,
|
|
182
|
+
alignment: 4,
|
|
183
|
+
scalarType: "uint32",
|
|
184
|
+
}),
|
|
185
|
+
nodeIndex: Object.freeze({
|
|
186
|
+
schemaField: "node_index",
|
|
187
|
+
offset: 4,
|
|
188
|
+
size: 4,
|
|
189
|
+
alignment: 4,
|
|
190
|
+
scalarType: "uint32",
|
|
191
|
+
}),
|
|
192
|
+
dependencyIdPointer: Object.freeze({
|
|
193
|
+
schemaField: "dependency_id_pointer",
|
|
194
|
+
offset: 8,
|
|
195
|
+
size: 4,
|
|
196
|
+
alignment: 4,
|
|
197
|
+
scalarType: "uint32",
|
|
198
|
+
}),
|
|
199
|
+
dependencyIndex: Object.freeze({
|
|
200
|
+
schemaField: "dependency_index",
|
|
201
|
+
offset: 12,
|
|
202
|
+
size: 4,
|
|
203
|
+
alignment: 4,
|
|
204
|
+
scalarType: "uint32",
|
|
205
|
+
}),
|
|
206
|
+
pluginIdPointer: Object.freeze({
|
|
207
|
+
schemaField: "plugin_id_pointer",
|
|
208
|
+
offset: 16,
|
|
209
|
+
size: 4,
|
|
210
|
+
alignment: 4,
|
|
211
|
+
scalarType: "uint32",
|
|
212
|
+
}),
|
|
213
|
+
methodIdPointer: Object.freeze({
|
|
214
|
+
schemaField: "method_id_pointer",
|
|
215
|
+
offset: 20,
|
|
216
|
+
size: 4,
|
|
217
|
+
alignment: 4,
|
|
218
|
+
scalarType: "uint32",
|
|
219
|
+
}),
|
|
220
|
+
dispatchModelPointer: Object.freeze({
|
|
221
|
+
schemaField: "dispatch_model_pointer",
|
|
222
|
+
offset: 24,
|
|
223
|
+
size: 4,
|
|
224
|
+
alignment: 4,
|
|
225
|
+
scalarType: "uint32",
|
|
226
|
+
}),
|
|
227
|
+
entrypointPointer: Object.freeze({
|
|
228
|
+
schemaField: "entrypoint_pointer",
|
|
229
|
+
offset: 28,
|
|
230
|
+
size: 4,
|
|
231
|
+
alignment: 4,
|
|
232
|
+
scalarType: "uint32",
|
|
233
|
+
}),
|
|
234
|
+
manifestBytesSymbolPointer: Object.freeze({
|
|
235
|
+
schemaField: "manifest_bytes_symbol_pointer",
|
|
236
|
+
offset: 32,
|
|
237
|
+
size: 4,
|
|
238
|
+
alignment: 4,
|
|
239
|
+
scalarType: "uint32",
|
|
240
|
+
}),
|
|
241
|
+
manifestSizeSymbolPointer: Object.freeze({
|
|
242
|
+
schemaField: "manifest_size_symbol_pointer",
|
|
243
|
+
offset: 36,
|
|
244
|
+
size: 4,
|
|
245
|
+
alignment: 4,
|
|
246
|
+
scalarType: "uint32",
|
|
247
|
+
}),
|
|
248
|
+
initSymbolPointer: Object.freeze({
|
|
249
|
+
schemaField: "init_symbol_pointer",
|
|
250
|
+
offset: 40,
|
|
251
|
+
size: 4,
|
|
252
|
+
alignment: 4,
|
|
253
|
+
scalarType: "uint32",
|
|
254
|
+
}),
|
|
255
|
+
destroySymbolPointer: Object.freeze({
|
|
256
|
+
schemaField: "destroy_symbol_pointer",
|
|
257
|
+
offset: 44,
|
|
258
|
+
size: 4,
|
|
259
|
+
alignment: 4,
|
|
260
|
+
scalarType: "uint32",
|
|
261
|
+
}),
|
|
262
|
+
mallocSymbolPointer: Object.freeze({
|
|
263
|
+
schemaField: "malloc_symbol_pointer",
|
|
264
|
+
offset: 48,
|
|
265
|
+
size: 4,
|
|
266
|
+
alignment: 4,
|
|
267
|
+
scalarType: "uint32",
|
|
268
|
+
}),
|
|
269
|
+
freeSymbolPointer: Object.freeze({
|
|
270
|
+
schemaField: "free_symbol_pointer",
|
|
271
|
+
offset: 52,
|
|
272
|
+
size: 4,
|
|
273
|
+
alignment: 4,
|
|
274
|
+
scalarType: "uint32",
|
|
275
|
+
}),
|
|
276
|
+
streamInvokeSymbolPointer: Object.freeze({
|
|
277
|
+
schemaField: "stream_invoke_symbol_pointer",
|
|
278
|
+
offset: 56,
|
|
279
|
+
size: 4,
|
|
280
|
+
alignment: 4,
|
|
281
|
+
scalarType: "uint32",
|
|
282
|
+
}),
|
|
283
|
+
}),
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
export const SignedArtifactDependencyDescriptorLayout = Object.freeze({
|
|
287
|
+
schema: "sdn.flow.abi.SignedArtifactDependencyDescriptor",
|
|
288
|
+
schemaPath: "schemas/FlowRuntimeAbi.fbs",
|
|
289
|
+
size: 72,
|
|
290
|
+
alignment: 4,
|
|
291
|
+
dependencyIdPointerOffset: 0,
|
|
292
|
+
pluginIdPointerOffset: 4,
|
|
293
|
+
versionPointerOffset: 8,
|
|
294
|
+
sha256PointerOffset: 12,
|
|
295
|
+
signaturePointerOffset: 16,
|
|
296
|
+
signerPublicKeyPointerOffset: 20,
|
|
297
|
+
entrypointPointerOffset: 24,
|
|
298
|
+
manifestBytesSymbolPointerOffset: 28,
|
|
299
|
+
manifestSizeSymbolPointerOffset: 32,
|
|
300
|
+
initSymbolPointerOffset: 36,
|
|
301
|
+
destroySymbolPointerOffset: 40,
|
|
302
|
+
mallocSymbolPointerOffset: 44,
|
|
303
|
+
freeSymbolPointerOffset: 48,
|
|
304
|
+
streamInvokeSymbolPointerOffset: 52,
|
|
305
|
+
wasmBytesPointerOffset: 56,
|
|
306
|
+
wasmSizeOffset: 60,
|
|
307
|
+
manifestBytesPointerOffset: 64,
|
|
308
|
+
manifestSizeOffset: 68,
|
|
309
|
+
fields: Object.freeze({
|
|
310
|
+
dependencyIdPointer: Object.freeze({
|
|
311
|
+
schemaField: "dependency_id_pointer",
|
|
312
|
+
offset: 0,
|
|
313
|
+
size: 4,
|
|
314
|
+
alignment: 4,
|
|
315
|
+
scalarType: "uint32",
|
|
316
|
+
}),
|
|
317
|
+
pluginIdPointer: Object.freeze({
|
|
318
|
+
schemaField: "plugin_id_pointer",
|
|
319
|
+
offset: 4,
|
|
320
|
+
size: 4,
|
|
321
|
+
alignment: 4,
|
|
322
|
+
scalarType: "uint32",
|
|
323
|
+
}),
|
|
324
|
+
versionPointer: Object.freeze({
|
|
325
|
+
schemaField: "version_pointer",
|
|
326
|
+
offset: 8,
|
|
327
|
+
size: 4,
|
|
328
|
+
alignment: 4,
|
|
329
|
+
scalarType: "uint32",
|
|
330
|
+
}),
|
|
331
|
+
sha256Pointer: Object.freeze({
|
|
332
|
+
schemaField: "sha256_pointer",
|
|
333
|
+
offset: 12,
|
|
334
|
+
size: 4,
|
|
335
|
+
alignment: 4,
|
|
336
|
+
scalarType: "uint32",
|
|
337
|
+
}),
|
|
338
|
+
signaturePointer: Object.freeze({
|
|
339
|
+
schemaField: "signature_pointer",
|
|
340
|
+
offset: 16,
|
|
341
|
+
size: 4,
|
|
342
|
+
alignment: 4,
|
|
343
|
+
scalarType: "uint32",
|
|
344
|
+
}),
|
|
345
|
+
signerPublicKeyPointer: Object.freeze({
|
|
346
|
+
schemaField: "signer_public_key_pointer",
|
|
347
|
+
offset: 20,
|
|
348
|
+
size: 4,
|
|
349
|
+
alignment: 4,
|
|
350
|
+
scalarType: "uint32",
|
|
351
|
+
}),
|
|
352
|
+
entrypointPointer: Object.freeze({
|
|
353
|
+
schemaField: "entrypoint_pointer",
|
|
354
|
+
offset: 24,
|
|
355
|
+
size: 4,
|
|
356
|
+
alignment: 4,
|
|
357
|
+
scalarType: "uint32",
|
|
358
|
+
}),
|
|
359
|
+
manifestBytesSymbolPointer: Object.freeze({
|
|
360
|
+
schemaField: "manifest_bytes_symbol_pointer",
|
|
361
|
+
offset: 28,
|
|
362
|
+
size: 4,
|
|
363
|
+
alignment: 4,
|
|
364
|
+
scalarType: "uint32",
|
|
365
|
+
}),
|
|
366
|
+
manifestSizeSymbolPointer: Object.freeze({
|
|
367
|
+
schemaField: "manifest_size_symbol_pointer",
|
|
368
|
+
offset: 32,
|
|
369
|
+
size: 4,
|
|
370
|
+
alignment: 4,
|
|
371
|
+
scalarType: "uint32",
|
|
372
|
+
}),
|
|
373
|
+
initSymbolPointer: Object.freeze({
|
|
374
|
+
schemaField: "init_symbol_pointer",
|
|
375
|
+
offset: 36,
|
|
376
|
+
size: 4,
|
|
377
|
+
alignment: 4,
|
|
378
|
+
scalarType: "uint32",
|
|
379
|
+
}),
|
|
380
|
+
destroySymbolPointer: Object.freeze({
|
|
381
|
+
schemaField: "destroy_symbol_pointer",
|
|
382
|
+
offset: 40,
|
|
383
|
+
size: 4,
|
|
384
|
+
alignment: 4,
|
|
385
|
+
scalarType: "uint32",
|
|
386
|
+
}),
|
|
387
|
+
mallocSymbolPointer: Object.freeze({
|
|
388
|
+
schemaField: "malloc_symbol_pointer",
|
|
389
|
+
offset: 44,
|
|
390
|
+
size: 4,
|
|
391
|
+
alignment: 4,
|
|
392
|
+
scalarType: "uint32",
|
|
393
|
+
}),
|
|
394
|
+
freeSymbolPointer: Object.freeze({
|
|
395
|
+
schemaField: "free_symbol_pointer",
|
|
396
|
+
offset: 48,
|
|
397
|
+
size: 4,
|
|
398
|
+
alignment: 4,
|
|
399
|
+
scalarType: "uint32",
|
|
400
|
+
}),
|
|
401
|
+
streamInvokeSymbolPointer: Object.freeze({
|
|
402
|
+
schemaField: "stream_invoke_symbol_pointer",
|
|
403
|
+
offset: 52,
|
|
404
|
+
size: 4,
|
|
405
|
+
alignment: 4,
|
|
406
|
+
scalarType: "uint32",
|
|
407
|
+
}),
|
|
408
|
+
wasmBytesPointer: Object.freeze({
|
|
409
|
+
schemaField: "wasm_bytes_pointer",
|
|
410
|
+
offset: 56,
|
|
411
|
+
size: 4,
|
|
412
|
+
alignment: 4,
|
|
413
|
+
scalarType: "uint32",
|
|
414
|
+
}),
|
|
415
|
+
wasmSize: Object.freeze({
|
|
416
|
+
schemaField: "wasm_size",
|
|
417
|
+
offset: 60,
|
|
418
|
+
size: 4,
|
|
419
|
+
alignment: 4,
|
|
420
|
+
scalarType: "uint32",
|
|
421
|
+
}),
|
|
422
|
+
manifestBytesPointer: Object.freeze({
|
|
423
|
+
schemaField: "manifest_bytes_pointer",
|
|
424
|
+
offset: 64,
|
|
425
|
+
size: 4,
|
|
426
|
+
alignment: 4,
|
|
427
|
+
scalarType: "uint32",
|
|
428
|
+
}),
|
|
429
|
+
manifestSize: Object.freeze({
|
|
430
|
+
schemaField: "manifest_size",
|
|
431
|
+
offset: 68,
|
|
432
|
+
size: 4,
|
|
433
|
+
alignment: 4,
|
|
434
|
+
scalarType: "uint32",
|
|
435
|
+
}),
|
|
436
|
+
}),
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
export const FlowIngressRuntimeStateLayout = Object.freeze({
|
|
440
|
+
schema: "sdn.flow.abi.FlowIngressRuntimeState",
|
|
441
|
+
schemaPath: "schemas/FlowRuntimeAbi.fbs",
|
|
442
|
+
size: 24,
|
|
443
|
+
alignment: 8,
|
|
444
|
+
totalReceivedOffset: 0,
|
|
445
|
+
totalDroppedOffset: 8,
|
|
446
|
+
queuedFramesOffset: 16,
|
|
447
|
+
fields: Object.freeze({
|
|
448
|
+
totalReceived: Object.freeze({
|
|
449
|
+
schemaField: "total_received",
|
|
450
|
+
offset: 0,
|
|
451
|
+
size: 8,
|
|
452
|
+
alignment: 8,
|
|
453
|
+
scalarType: "uint64",
|
|
454
|
+
}),
|
|
455
|
+
totalDropped: Object.freeze({
|
|
456
|
+
schemaField: "total_dropped",
|
|
457
|
+
offset: 8,
|
|
458
|
+
size: 8,
|
|
459
|
+
alignment: 8,
|
|
460
|
+
scalarType: "uint64",
|
|
461
|
+
}),
|
|
462
|
+
queuedFrames: Object.freeze({
|
|
463
|
+
schemaField: "queued_frames",
|
|
464
|
+
offset: 16,
|
|
465
|
+
size: 4,
|
|
466
|
+
alignment: 4,
|
|
467
|
+
scalarType: "uint32",
|
|
468
|
+
}),
|
|
469
|
+
}),
|
|
470
|
+
});
|
|
471
|
+
|
|
472
|
+
export const FlowNodeRuntimeStateLayout = Object.freeze({
|
|
473
|
+
schema: "sdn.flow.abi.FlowNodeRuntimeState",
|
|
474
|
+
schemaPath: "schemas/FlowRuntimeAbi.fbs",
|
|
475
|
+
size: 32,
|
|
476
|
+
alignment: 8,
|
|
477
|
+
invocationCountOffset: 0,
|
|
478
|
+
consumedFramesOffset: 8,
|
|
479
|
+
queuedFramesOffset: 16,
|
|
480
|
+
backlogRemainingOffset: 20,
|
|
481
|
+
lastStatusOffset: 24,
|
|
482
|
+
readyOffset: 28,
|
|
483
|
+
yieldedOffset: 29,
|
|
484
|
+
fields: Object.freeze({
|
|
485
|
+
invocationCount: Object.freeze({
|
|
486
|
+
schemaField: "invocation_count",
|
|
487
|
+
offset: 0,
|
|
488
|
+
size: 8,
|
|
489
|
+
alignment: 8,
|
|
490
|
+
scalarType: "uint64",
|
|
491
|
+
}),
|
|
492
|
+
consumedFrames: Object.freeze({
|
|
493
|
+
schemaField: "consumed_frames",
|
|
494
|
+
offset: 8,
|
|
495
|
+
size: 8,
|
|
496
|
+
alignment: 8,
|
|
497
|
+
scalarType: "uint64",
|
|
498
|
+
}),
|
|
499
|
+
queuedFrames: Object.freeze({
|
|
500
|
+
schemaField: "queued_frames",
|
|
501
|
+
offset: 16,
|
|
502
|
+
size: 4,
|
|
503
|
+
alignment: 4,
|
|
504
|
+
scalarType: "uint32",
|
|
505
|
+
}),
|
|
506
|
+
backlogRemaining: Object.freeze({
|
|
507
|
+
schemaField: "backlog_remaining",
|
|
508
|
+
offset: 20,
|
|
509
|
+
size: 4,
|
|
510
|
+
alignment: 4,
|
|
511
|
+
scalarType: "uint32",
|
|
512
|
+
}),
|
|
513
|
+
lastStatus: Object.freeze({
|
|
514
|
+
schemaField: "last_status",
|
|
515
|
+
offset: 24,
|
|
516
|
+
size: 4,
|
|
517
|
+
alignment: 4,
|
|
518
|
+
scalarType: "uint32",
|
|
519
|
+
}),
|
|
520
|
+
ready: Object.freeze({
|
|
521
|
+
schemaField: "ready",
|
|
522
|
+
offset: 28,
|
|
523
|
+
size: 1,
|
|
524
|
+
alignment: 1,
|
|
525
|
+
scalarType: "bool",
|
|
526
|
+
}),
|
|
527
|
+
yielded: Object.freeze({
|
|
528
|
+
schemaField: "yielded",
|
|
529
|
+
offset: 29,
|
|
530
|
+
size: 1,
|
|
531
|
+
alignment: 1,
|
|
532
|
+
scalarType: "bool",
|
|
533
|
+
}),
|
|
534
|
+
}),
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
export const RuntimeAbiLayouts = Object.freeze({
|
|
538
|
+
FlowFrameDescriptor: FlowFrameDescriptorLayout,
|
|
539
|
+
FlowInvocationDescriptor: FlowInvocationDescriptorLayout,
|
|
540
|
+
FlowNodeDispatchDescriptor: FlowNodeDispatchDescriptorLayout,
|
|
541
|
+
SignedArtifactDependencyDescriptor: SignedArtifactDependencyDescriptorLayout,
|
|
542
|
+
FlowIngressRuntimeState: FlowIngressRuntimeStateLayout,
|
|
543
|
+
FlowNodeRuntimeState: FlowNodeRuntimeStateLayout,
|
|
544
|
+
});
|