-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathws.yaml
More file actions
342 lines (342 loc) · 7.79 KB
/
Copy pathws.yaml
File metadata and controls
342 lines (342 loc) · 7.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
asyncapi: 3.0.0
channels:
ws:
address: /ws
components:
messages:
AgentMessage:
contentType: application/json
name: AgentMessage
payload:
properties:
from_agent_id:
type: string
message:
description: Arbitrary JSON value (opaque to the protocol)
message_id:
type: string
scope:
$ref: "#/components/schemas/MessageScope"
server_received_at:
type: string
type:
const: et-agent-message
type: string
required:
- type
- message_id
- from_agent_id
- scope
- server_received_at
- message
title: WsAgentMessage
type: object
title: AgentMessage
Alive:
contentType: application/json
name: Alive
payload:
properties:
timestamp:
type: string
type:
const: et-alive
type: string
required:
- type
- timestamp
title: WsAlive
type: object
title: Alive
BroadcastMessage:
contentType: application/json
name: BroadcastMessage
payload:
properties:
message:
description: Arbitrary JSON value (opaque to the protocol)
type:
const: et-broadcast-message
type: string
required:
- type
- message
title: WsBroadcastMessage
type: object
title: BroadcastMessage
ClientEvent:
contentType: application/json
name: ClientEvent
payload:
properties:
action:
type: string
capability:
type: string
details:
description: Arbitrary JSON value (opaque to the protocol)
type:
const: et-client-event
type: string
required:
- type
- capability
- action
- details
title: WsClientEvent
type: object
title: ClientEvent
Connect:
contentType: application/json
name: Connect
payload:
properties:
agent_id:
type:
- string
- "null"
type:
const: et-connect
type: string
required:
- type
title: WsConnect
type: object
title: Connect
ConnectAck:
contentType: application/json
name: ConnectAck
payload:
properties:
agent_id:
type: string
status:
$ref: "#/components/schemas/ConnectStatus"
type:
const: et-connect-ack
type: string
required:
- type
- agent_id
- status
title: WsConnectAck
type: object
title: ConnectAck
Invalid:
contentType: application/json
name: Invalid
payload:
properties:
detail:
type: string
message_id:
type:
- string
- "null"
type:
const: et-invalid
type: string
required:
- type
- detail
title: WsInvalid
type: object
title: Invalid
ListAgents:
contentType: application/json
name: ListAgents
payload:
properties:
type:
const: et-list-agents
type: string
required:
- type
title: WsListAgents
type: object
title: ListAgents
ListAgentsResponse:
contentType: application/json
name: ListAgentsResponse
payload:
properties:
agents:
items:
$ref: "#/components/schemas/AgentSummary"
type: array
type:
const: et-list-agents-response
type: string
required:
- type
- agents
title: WsListAgentsResponse
type: object
title: ListAgentsResponse
MessageAck:
contentType: application/json
name: MessageAck
payload:
properties:
message_id:
type: string
type:
const: et-message-ack
type: string
required:
- type
- message_id
title: WsMessageAck
type: object
title: MessageAck
MessageStatus:
contentType: application/json
name: MessageStatus
payload:
properties:
detail:
type: string
message_id:
type:
- string
- "null"
status:
$ref: "#/components/schemas/MessageDeliveryStatus"
type:
const: et-message-status
type: string
required:
- type
- status
- detail
title: WsMessageStatus
type: object
title: MessageStatus
RelayBinary:
contentType: application/json
name: RelayBinary
payload:
properties:
content:
description: Byte array (uint8)
items:
format: uint8
maximum: 255
minimum: 0
type: integer
type: array
type:
const: et-relay-binary
type: string
required:
- type
- content
title: WsServerRelayBinary
type: object
title: RelayBinary
RelayText:
contentType: application/json
name: RelayText
payload:
properties:
content:
type: string
type:
const: et-relay-text
type: string
required:
- type
- content
title: WsServerRelayText
type: object
title: RelayText
Response:
contentType: application/json
name: Response
payload:
properties:
message:
type: string
type:
const: et-response
type: string
required:
- type
- message
title: WsResponse
type: object
title: Response
SendAgentMessage:
contentType: application/json
name: SendAgentMessage
payload:
properties:
message:
description: Arbitrary JSON value (opaque to the protocol)
to_agent_id:
type: string
type:
const: et-send-agent-message
type: string
required:
- type
- to_agent_id
- message
title: WsSendAgentMessage
type: object
title: SendAgentMessage
schemas:
AgentConnectionState:
enum:
- connected
- disconnected
type: string
AgentSummary:
properties:
agent_id:
type: string
last_known_ip:
type:
- string
- "null"
state:
$ref: "#/components/schemas/AgentConnectionState"
required:
- agent_id
- state
type: object
ConnectStatus:
enum:
- assigned
- reconnected
type: string
MessageDeliveryStatus:
enum:
- delivered
- queued
- acknowledged
- broadcast
type: string
MessageScope:
enum:
- direct
- broadcast
type: string
info:
description: Edge Toolkit WS protocol -- typed et-* messages plus relay envelopes for foreign frames.
title: Edge Toolkit WebSocket Protocol
version: 0.1.0
operations:
receiveWsMessage:
action: receive
channel:
$ref: "#/channels/ws"
sendWsMessage:
action: send
channel:
$ref: "#/channels/ws"
servers:
local:
description: Default ws-server bind address (mise run ws-server)
host: localhost:8080
protocol: ws