UNPKG

6.21 kBJSONView Raw
1{
2 "title": "Runtime protocol",
3 "description": "When a client connects to a FBP procotol it may choose to discover the capabilities and other information about the runtime.",
4 "input": {
5 "error": {
6 "description": "Runtime error"
7 },
8 "getruntime": {
9 "description": "Request the information about the runtime. When receiving this message the runtime should response with a runtime message."
10 },
11 "packet": {
12 "description": "Runtimes that can be used as remote subgraphs (i.e. ones that have reported supporting the protocol:runtime capability) need to be able to receive and transmit information packets at their exposed ports.\nThese packets can be send from the client to the runtime's input ports, or from runtime's output ports to the client.",
13 "properties": {
14 "port": {
15 "type": "string",
16 "description": "port name for the input or output port"
17 },
18 "event": {
19 "type": "string",
20 "enum": [
21 "connect",
22 "begingroup",
23 "data",
24 "endgroup",
25 "disconnect"
26 ],
27 "description": "packet event"
28 },
29 "graph": {
30 "type": "string",
31 "description": "graph the action targets"
32 },
33 "payload": {
34 "type": "object",
35 "description": "(optional) payload for the packet. Used only with begingroup (for group names) and data packets"
36 }
37 }
38 }
39 },
40 "output": {
41 "error": {
42 "description": "Runtime error"
43 },
44 "ports": {
45 "description": "Message sent by the runtime to signal its available ports. The runtime is responsible for sending the up-to-date list of available ports back to client whenever it changes.",
46 "properties": {
47 "graph": {
48 "type": "string",
49 "description": "ID of the currently configured main graph running on the runtime"
50 },
51 "inPorts": {
52 "description": "list of input ports",
53 "properties": {
54 "addressable": {
55 "type": "boolean",
56 "description": "boolean telling whether the port is an ArrayPort"
57 },
58 "id": {
59 "type": "string",
60 "description": "port name"
61 },
62 "type": {
63 "description": "port datatype, for example boolean",
64 "type": "string"
65 },
66 "required": {
67 "description": "boolean telling whether the port needs to be connected for the component to work",
68 "type": "boolean"
69 },
70 "description": {
71 "type": "string",
72 "description": "textual description of the port"
73 }
74 },
75 "type": "array"
76 },
77 "outPorts": {
78 "type": "array",
79 "description": "list of output ports",
80 "properties": {
81 "description": {
82 "type": "string",
83 "description": "textual description of the port"
84 },
85 "required": {
86 "type": "boolean",
87 "description": "boolean telling whether the port needs to be connected for the component to work"
88 },
89 "type": {
90 "description": "port datatype, for example boolean",
91 "type": "string"
92 },
93 "id": {
94 "description": "port name",
95 "type": "string"
96 },
97 "addressable": {
98 "description": "boolean telling whether the port is an ArrayPort",
99 "type": "boolean"
100 }
101 }
102 }
103 }
104 },
105 "runtime": {
106 "description": "Response from the runtime to the getruntime request.",
107 "properties": {
108 "id": {
109 "required": false,
110 "type": "string",
111 "description": "(optional) runtime ID used with Flowhub Registry"
112 },
113 "label": {
114 "description": "(optional) Human-readable description of the runtime",
115 "type": "string",
116 "required": false
117 },
118 "version": {
119 "description": "version of the runtime protocol that the runtime supports, for example 0.4",
120 "type": "string"
121 },
122 "capabilities": {
123 "type": "array",
124 "items": {
125 "protocol:network": {
126 "description": "the runtime is able to control and introspect its running networks using the Network protocol"
127 },
128 "protocol:component": {
129 "description": "the runtime is able to list and modify its components using the Component protocol"
130 },
131 "protocol:runtime": {
132 "description": "the runtime is able to expose the ports of its main graph using the Runtime protocol and transmit packet information to/from them"
133 },
134 "component:getsource": {
135 "description": "runtime is able to read and send component source code back to client"
136 },
137 "network:persist": {
138 "description": "runtime is able to *flash* a running graph setup into itself, making it persistent across reboots"
139 },
140 "protocol:graph": {
141 "description": "the runtime is able to modify its graphs using the Graph protocol"
142 },
143 "component:setsource": {
144 "description": "runtime is able to compile and run custom components sent as source code strings"
145 }
146 },
147 "description": "array of capability strings for things the runtime is able to do\nIf the runtime is currently running a graph and it is able to speak the full Runtime protocol, it should follow up with a ports message."
148 },
149 "graph": {
150 "description": "(optional) ID of the currently configured main graph running on the runtime, if any",
151 "type": "string",
152 "required": false
153 },
154 "type": {
155 "description": "type of the runtime, for example noflo-nodejs or microflo",
156 "type": "string",
157 "title": "Type"
158 }
159 }
160 }
161 }
162}