@volter/twin-livekit 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 (99) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +106 -0
  3. package/dist/src/cli.d.ts +2 -0
  4. package/dist/src/cli.js +23 -0
  5. package/dist/src/egress-service-cli.d.ts +2 -0
  6. package/dist/src/egress-service-cli.js +101 -0
  7. package/dist/src/index.d.ts +14 -0
  8. package/dist/src/index.js +53 -0
  9. package/dist/src/livekit-budget.d.ts +57 -0
  10. package/dist/src/livekit-budget.js +131 -0
  11. package/dist/src/livekit-capabilities.d.ts +3 -0
  12. package/dist/src/livekit-capabilities.js +728 -0
  13. package/dist/src/livekit-conformance.d.ts +8 -0
  14. package/dist/src/livekit-conformance.js +13 -0
  15. package/dist/src/livekit-connector.d.ts +130 -0
  16. package/dist/src/livekit-connector.js +382 -0
  17. package/dist/src/livekit-data.d.ts +86 -0
  18. package/dist/src/livekit-data.js +246 -0
  19. package/dist/src/livekit-perform-harness.d.ts +5 -0
  20. package/dist/src/livekit-perform-harness.js +17 -0
  21. package/dist/src/livekit-server.d.ts +23 -0
  22. package/dist/src/livekit-server.js +45 -0
  23. package/dist/src/livekit-service-cli.d.ts +2 -0
  24. package/dist/src/livekit-service-cli.js +88 -0
  25. package/dist/src/livekit-token.d.ts +68 -0
  26. package/dist/src/livekit-token.js +76 -0
  27. package/dist/src/livekit-twin.d.ts +4 -0
  28. package/dist/src/livekit-twin.js +1161 -0
  29. package/dist/src/livekit-types.d.ts +203 -0
  30. package/dist/src/livekit-types.js +1 -0
  31. package/dist/src/livekit-webhook.d.ts +26 -0
  32. package/dist/src/livekit-webhook.js +79 -0
  33. package/dist/src/redis-service-cli.d.ts +2 -0
  34. package/dist/src/redis-service-cli.js +35 -0
  35. package/dist/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
  36. package/dist/test-fixtures/livekit-openapi-operations.json +442 -0
  37. package/dist/test-fixtures/protobufs/cloud_replay.proto +82 -0
  38. package/dist/test-fixtures/protobufs/livekit_agent.proto +185 -0
  39. package/dist/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
  40. package/dist/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
  41. package/dist/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
  42. package/dist/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
  43. package/dist/test-fixtures/protobufs/livekit_analytics.proto +312 -0
  44. package/dist/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
  45. package/dist/test-fixtures/protobufs/livekit_connector.proto +41 -0
  46. package/dist/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
  47. package/dist/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
  48. package/dist/test-fixtures/protobufs/livekit_egress.proto +641 -0
  49. package/dist/test-fixtures/protobufs/livekit_ingress.proto +222 -0
  50. package/dist/test-fixtures/protobufs/livekit_internal.proto +228 -0
  51. package/dist/test-fixtures/protobufs/livekit_metrics.proto +103 -0
  52. package/dist/test-fixtures/protobufs/livekit_models.proto +992 -0
  53. package/dist/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
  54. package/dist/test-fixtures/protobufs/livekit_room.proto +312 -0
  55. package/dist/test-fixtures/protobufs/livekit_rtc.proto +673 -0
  56. package/dist/test-fixtures/protobufs/livekit_sip.proto +1000 -0
  57. package/dist/test-fixtures/protobufs/livekit_token_source.proto +49 -0
  58. package/dist/test-fixtures/protobufs/livekit_webhook.proto +62 -0
  59. package/package.json +58 -0
  60. package/src/cli.ts +22 -0
  61. package/src/egress-service-cli.ts +111 -0
  62. package/src/index.ts +103 -0
  63. package/src/livekit-budget.ts +158 -0
  64. package/src/livekit-capabilities.ts +789 -0
  65. package/src/livekit-conformance.ts +15 -0
  66. package/src/livekit-connector.ts +406 -0
  67. package/src/livekit-data.ts +278 -0
  68. package/src/livekit-perform-harness.ts +17 -0
  69. package/src/livekit-server.ts +67 -0
  70. package/src/livekit-service-cli.ts +93 -0
  71. package/src/livekit-token.ts +133 -0
  72. package/src/livekit-twin.ts +1162 -0
  73. package/src/livekit-types.ts +211 -0
  74. package/src/livekit-webhook.ts +91 -0
  75. package/src/redis-service-cli.ts +39 -0
  76. package/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
  77. package/test-fixtures/livekit-openapi-operations.json +442 -0
  78. package/test-fixtures/protobufs/cloud_replay.proto +82 -0
  79. package/test-fixtures/protobufs/livekit_agent.proto +185 -0
  80. package/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
  81. package/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
  82. package/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
  83. package/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
  84. package/test-fixtures/protobufs/livekit_analytics.proto +312 -0
  85. package/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
  86. package/test-fixtures/protobufs/livekit_connector.proto +41 -0
  87. package/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
  88. package/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
  89. package/test-fixtures/protobufs/livekit_egress.proto +641 -0
  90. package/test-fixtures/protobufs/livekit_ingress.proto +222 -0
  91. package/test-fixtures/protobufs/livekit_internal.proto +228 -0
  92. package/test-fixtures/protobufs/livekit_metrics.proto +103 -0
  93. package/test-fixtures/protobufs/livekit_models.proto +992 -0
  94. package/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
  95. package/test-fixtures/protobufs/livekit_room.proto +312 -0
  96. package/test-fixtures/protobufs/livekit_rtc.proto +673 -0
  97. package/test-fixtures/protobufs/livekit_sip.proto +1000 -0
  98. package/test-fixtures/protobufs/livekit_token_source.proto +49 -0
  99. package/test-fixtures/protobufs/livekit_webhook.proto +62 -0
@@ -0,0 +1,442 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "livekit (operation inventory converted from the protobuf service definitions) (spec-census scoped subset)",
5
+ "version": "2026-09-02",
6
+ "description": "A scope-filtered SUBSET of the upstream spec (https://github.com/livekit/protocol), derived by scripts/spec-census-bootstrap.ts: every operation under the committed scopePaths, operation metadata only (operationId, summary, tags, servers) \u2014 schemas AND response codes dropped, which makes this an operation INVENTORY in OpenAPI's shape rather than a valid OpenAPI document: it says which operations exist and nothing about what they answer. It carried the FIRST response code per operation, which reads as the whole set \u2014 diff status codes against the freshly fetched spec instead. It is ONLY the operation-inventory denominator for ../livekit-spec-census.json; see livekit-openapi-operations.SOURCE.md for provenance."
7
+ },
8
+ "x-source": {
9
+ "vendor": "livekit",
10
+ "upstream": "https://github.com/livekit/protocol",
11
+ "upstreamFile": "the 22 top-level .proto files of livekit/protocol@09c9697b",
12
+ "vendored": "derived by scripts/spec-census-bootstrap.ts from the 22 top-level .proto files of livekit/protocol@09c9697b fetched 2026-09-02 \u2014 scope-filtered to scopePaths, schemas and response codes dropped",
13
+ "curatedOn": "2026-09-02",
14
+ "scope": "/twirp/livekit.RoomService/, /twirp/livekit.Egress/, /twirp/livekit.Ingress/, /twirp/livekit.SIP/, /twirp/livekit.AgentDispatchService/"
15
+ },
16
+ "paths": {
17
+ "/twirp/livekit.AgentDispatchService/CreateDispatch": {
18
+ "post": {
19
+ "operationId": "AgentDispatchService.CreateDispatch",
20
+ "summary": "",
21
+ "tags": [
22
+ "AgentDispatchService"
23
+ ]
24
+ }
25
+ },
26
+ "/twirp/livekit.AgentDispatchService/DeleteDispatch": {
27
+ "post": {
28
+ "operationId": "AgentDispatchService.DeleteDispatch",
29
+ "summary": "",
30
+ "tags": [
31
+ "AgentDispatchService"
32
+ ]
33
+ }
34
+ },
35
+ "/twirp/livekit.AgentDispatchService/ListDispatch": {
36
+ "post": {
37
+ "operationId": "AgentDispatchService.ListDispatch",
38
+ "summary": "",
39
+ "tags": [
40
+ "AgentDispatchService"
41
+ ]
42
+ }
43
+ },
44
+ "/twirp/livekit.Egress/ListEgress": {
45
+ "post": {
46
+ "operationId": "Egress.ListEgress",
47
+ "summary": "List available egress",
48
+ "tags": [
49
+ "Egress"
50
+ ]
51
+ }
52
+ },
53
+ "/twirp/livekit.Egress/StartEgress": {
54
+ "post": {
55
+ "operationId": "Egress.StartEgress",
56
+ "summary": "Unified StartEgress RPC",
57
+ "tags": [
58
+ "Egress"
59
+ ]
60
+ }
61
+ },
62
+ "/twirp/livekit.Egress/StartParticipantEgress": {
63
+ "post": {
64
+ "operationId": "Egress.StartParticipantEgress",
65
+ "summary": "",
66
+ "tags": [
67
+ "Egress"
68
+ ]
69
+ }
70
+ },
71
+ "/twirp/livekit.Egress/StartRoomCompositeEgress": {
72
+ "post": {
73
+ "operationId": "Egress.StartRoomCompositeEgress",
74
+ "summary": "TODO: deprecate",
75
+ "tags": [
76
+ "Egress"
77
+ ]
78
+ }
79
+ },
80
+ "/twirp/livekit.Egress/StartTrackCompositeEgress": {
81
+ "post": {
82
+ "operationId": "Egress.StartTrackCompositeEgress",
83
+ "summary": "",
84
+ "tags": [
85
+ "Egress"
86
+ ]
87
+ }
88
+ },
89
+ "/twirp/livekit.Egress/StartTrackEgress": {
90
+ "post": {
91
+ "operationId": "Egress.StartTrackEgress",
92
+ "summary": "",
93
+ "tags": [
94
+ "Egress"
95
+ ]
96
+ }
97
+ },
98
+ "/twirp/livekit.Egress/StartWebEgress": {
99
+ "post": {
100
+ "operationId": "Egress.StartWebEgress",
101
+ "summary": "",
102
+ "tags": [
103
+ "Egress"
104
+ ]
105
+ }
106
+ },
107
+ "/twirp/livekit.Egress/StopEgress": {
108
+ "post": {
109
+ "operationId": "Egress.StopEgress",
110
+ "summary": "Stop a recording or stream",
111
+ "tags": [
112
+ "Egress"
113
+ ]
114
+ }
115
+ },
116
+ "/twirp/livekit.Egress/UpdateLayout": {
117
+ "post": {
118
+ "operationId": "Egress.UpdateLayout",
119
+ "summary": "Update url/template or stream outputs",
120
+ "tags": [
121
+ "Egress"
122
+ ]
123
+ }
124
+ },
125
+ "/twirp/livekit.Egress/UpdateStream": {
126
+ "post": {
127
+ "operationId": "Egress.UpdateStream",
128
+ "summary": "",
129
+ "tags": [
130
+ "Egress"
131
+ ]
132
+ }
133
+ },
134
+ "/twirp/livekit.Ingress/CreateIngress": {
135
+ "post": {
136
+ "operationId": "Ingress.CreateIngress",
137
+ "summary": "Create a new Ingress",
138
+ "tags": [
139
+ "Ingress"
140
+ ]
141
+ }
142
+ },
143
+ "/twirp/livekit.Ingress/DeleteIngress": {
144
+ "post": {
145
+ "operationId": "Ingress.DeleteIngress",
146
+ "summary": "",
147
+ "tags": [
148
+ "Ingress"
149
+ ]
150
+ }
151
+ },
152
+ "/twirp/livekit.Ingress/ListIngress": {
153
+ "post": {
154
+ "operationId": "Ingress.ListIngress",
155
+ "summary": "",
156
+ "tags": [
157
+ "Ingress"
158
+ ]
159
+ }
160
+ },
161
+ "/twirp/livekit.Ingress/UpdateIngress": {
162
+ "post": {
163
+ "operationId": "Ingress.UpdateIngress",
164
+ "summary": "Update an existing Ingress",
165
+ "tags": [
166
+ "Ingress"
167
+ ]
168
+ }
169
+ },
170
+ "/twirp/livekit.RoomService/CreateRoom": {
171
+ "post": {
172
+ "operationId": "RoomService.CreateRoom",
173
+ "summary": "Creates a room with settings",
174
+ "tags": [
175
+ "RoomService"
176
+ ]
177
+ }
178
+ },
179
+ "/twirp/livekit.RoomService/DeleteRoom": {
180
+ "post": {
181
+ "operationId": "RoomService.DeleteRoom",
182
+ "summary": "Deletes an existing room by name or id",
183
+ "tags": [
184
+ "RoomService"
185
+ ]
186
+ }
187
+ },
188
+ "/twirp/livekit.RoomService/ForwardParticipant": {
189
+ "post": {
190
+ "operationId": "RoomService.ForwardParticipant",
191
+ "summary": "Cloud-only Forward a connected participant's track(s) to another room",
192
+ "tags": [
193
+ "RoomService"
194
+ ]
195
+ }
196
+ },
197
+ "/twirp/livekit.RoomService/GetParticipant": {
198
+ "post": {
199
+ "operationId": "RoomService.GetParticipant",
200
+ "summary": "Get information on a specific participant, Requires `roomAdmin`",
201
+ "tags": [
202
+ "RoomService"
203
+ ]
204
+ }
205
+ },
206
+ "/twirp/livekit.RoomService/ListParticipants": {
207
+ "post": {
208
+ "operationId": "RoomService.ListParticipants",
209
+ "summary": "Lists participants in a room, Requires `roomAdmin`",
210
+ "tags": [
211
+ "RoomService"
212
+ ]
213
+ }
214
+ },
215
+ "/twirp/livekit.RoomService/ListRooms": {
216
+ "post": {
217
+ "operationId": "RoomService.ListRooms",
218
+ "summary": "List rooms that are active on the server",
219
+ "tags": [
220
+ "RoomService"
221
+ ]
222
+ }
223
+ },
224
+ "/twirp/livekit.RoomService/MoveParticipant": {
225
+ "post": {
226
+ "operationId": "RoomService.MoveParticipant",
227
+ "summary": "Cloud-only Move a connected participant to a different room",
228
+ "tags": [
229
+ "RoomService"
230
+ ]
231
+ }
232
+ },
233
+ "/twirp/livekit.RoomService/MutePublishedTrack": {
234
+ "post": {
235
+ "operationId": "RoomService.MutePublishedTrack",
236
+ "summary": "Mute/unmute a participant's track, Requires `roomAdmin`",
237
+ "tags": [
238
+ "RoomService"
239
+ ]
240
+ }
241
+ },
242
+ "/twirp/livekit.RoomService/PerformRpc": {
243
+ "post": {
244
+ "operationId": "RoomService.PerformRpc",
245
+ "summary": "",
246
+ "tags": [
247
+ "RoomService"
248
+ ]
249
+ }
250
+ },
251
+ "/twirp/livekit.RoomService/RemoveParticipant": {
252
+ "post": {
253
+ "operationId": "RoomService.RemoveParticipant",
254
+ "summary": "Removes a participant from room",
255
+ "tags": [
256
+ "RoomService"
257
+ ]
258
+ }
259
+ },
260
+ "/twirp/livekit.RoomService/SendData": {
261
+ "post": {
262
+ "operationId": "RoomService.SendData",
263
+ "summary": "Send data over data channel to participants in a room, Requires `roomAdmin`",
264
+ "tags": [
265
+ "RoomService"
266
+ ]
267
+ }
268
+ },
269
+ "/twirp/livekit.RoomService/UpdateParticipant": {
270
+ "post": {
271
+ "operationId": "RoomService.UpdateParticipant",
272
+ "summary": "Update participant metadata, will cause updates to be broadcasted to everyone in the room",
273
+ "tags": [
274
+ "RoomService"
275
+ ]
276
+ }
277
+ },
278
+ "/twirp/livekit.RoomService/UpdateRoomMetadata": {
279
+ "post": {
280
+ "operationId": "RoomService.UpdateRoomMetadata",
281
+ "summary": "Update room metadata, will cause updates to be broadcasted to everyone in the room, Requires `roomAdmin`",
282
+ "tags": [
283
+ "RoomService"
284
+ ]
285
+ }
286
+ },
287
+ "/twirp/livekit.RoomService/UpdateSubscriptions": {
288
+ "post": {
289
+ "operationId": "RoomService.UpdateSubscriptions",
290
+ "summary": "Subscribes or unsubscribe a participant from tracks",
291
+ "tags": [
292
+ "RoomService"
293
+ ]
294
+ }
295
+ },
296
+ "/twirp/livekit.SIP/CreateSIPDispatchRule": {
297
+ "post": {
298
+ "operationId": "SIP.CreateSIPDispatchRule",
299
+ "summary": "",
300
+ "tags": [
301
+ "SIP"
302
+ ]
303
+ }
304
+ },
305
+ "/twirp/livekit.SIP/CreateSIPInboundTrunk": {
306
+ "post": {
307
+ "operationId": "SIP.CreateSIPInboundTrunk",
308
+ "summary": "",
309
+ "tags": [
310
+ "SIP"
311
+ ]
312
+ }
313
+ },
314
+ "/twirp/livekit.SIP/CreateSIPOutboundTrunk": {
315
+ "post": {
316
+ "operationId": "SIP.CreateSIPOutboundTrunk",
317
+ "summary": "",
318
+ "tags": [
319
+ "SIP"
320
+ ]
321
+ }
322
+ },
323
+ "/twirp/livekit.SIP/CreateSIPParticipant": {
324
+ "post": {
325
+ "operationId": "SIP.CreateSIPParticipant",
326
+ "summary": "",
327
+ "tags": [
328
+ "SIP"
329
+ ]
330
+ }
331
+ },
332
+ "/twirp/livekit.SIP/DeleteSIPDispatchRule": {
333
+ "post": {
334
+ "operationId": "SIP.DeleteSIPDispatchRule",
335
+ "summary": "",
336
+ "tags": [
337
+ "SIP"
338
+ ]
339
+ }
340
+ },
341
+ "/twirp/livekit.SIP/DeleteSIPTrunk": {
342
+ "post": {
343
+ "operationId": "SIP.DeleteSIPTrunk",
344
+ "summary": "",
345
+ "tags": [
346
+ "SIP"
347
+ ]
348
+ }
349
+ },
350
+ "/twirp/livekit.SIP/GetSIPInboundTrunk": {
351
+ "post": {
352
+ "operationId": "SIP.GetSIPInboundTrunk",
353
+ "summary": "",
354
+ "tags": [
355
+ "SIP"
356
+ ]
357
+ }
358
+ },
359
+ "/twirp/livekit.SIP/GetSIPOutboundTrunk": {
360
+ "post": {
361
+ "operationId": "SIP.GetSIPOutboundTrunk",
362
+ "summary": "",
363
+ "tags": [
364
+ "SIP"
365
+ ]
366
+ }
367
+ },
368
+ "/twirp/livekit.SIP/ListSIPDispatchRule": {
369
+ "post": {
370
+ "operationId": "SIP.ListSIPDispatchRule",
371
+ "summary": "",
372
+ "tags": [
373
+ "SIP"
374
+ ]
375
+ }
376
+ },
377
+ "/twirp/livekit.SIP/ListSIPInboundTrunk": {
378
+ "post": {
379
+ "operationId": "SIP.ListSIPInboundTrunk",
380
+ "summary": "",
381
+ "tags": [
382
+ "SIP"
383
+ ]
384
+ }
385
+ },
386
+ "/twirp/livekit.SIP/ListSIPOutboundTrunk": {
387
+ "post": {
388
+ "operationId": "SIP.ListSIPOutboundTrunk",
389
+ "summary": "",
390
+ "tags": [
391
+ "SIP"
392
+ ]
393
+ }
394
+ },
395
+ "/twirp/livekit.SIP/ListSIPTrunk": {
396
+ "post": {
397
+ "operationId": "SIP.ListSIPTrunk",
398
+ "summary": "",
399
+ "tags": [
400
+ "SIP"
401
+ ],
402
+ "deprecated": true
403
+ }
404
+ },
405
+ "/twirp/livekit.SIP/TransferSIPParticipant": {
406
+ "post": {
407
+ "operationId": "SIP.TransferSIPParticipant",
408
+ "summary": "",
409
+ "tags": [
410
+ "SIP"
411
+ ]
412
+ }
413
+ },
414
+ "/twirp/livekit.SIP/UpdateSIPDispatchRule": {
415
+ "post": {
416
+ "operationId": "SIP.UpdateSIPDispatchRule",
417
+ "summary": "",
418
+ "tags": [
419
+ "SIP"
420
+ ]
421
+ }
422
+ },
423
+ "/twirp/livekit.SIP/UpdateSIPInboundTrunk": {
424
+ "post": {
425
+ "operationId": "SIP.UpdateSIPInboundTrunk",
426
+ "summary": "",
427
+ "tags": [
428
+ "SIP"
429
+ ]
430
+ }
431
+ },
432
+ "/twirp/livekit.SIP/UpdateSIPOutboundTrunk": {
433
+ "post": {
434
+ "operationId": "SIP.UpdateSIPOutboundTrunk",
435
+ "summary": "",
436
+ "tags": [
437
+ "SIP"
438
+ ]
439
+ }
440
+ }
441
+ }
442
+ }
@@ -0,0 +1,82 @@
1
+ // Copyright 2026 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package livekit;
18
+
19
+ option go_package = "github.com/livekit/protocol/livekit";
20
+ option csharp_namespace = "LiveKit.Proto";
21
+ option ruby_package = "LiveKit::Proto";
22
+
23
+ import "google/protobuf/empty.proto";
24
+ import "livekit_egress.proto";
25
+ import "livekit_models.proto";
26
+ import "logger/options.proto";
27
+
28
+ service Replay {
29
+ // List replays
30
+ rpc ListReplays(ListReplaysRequest) returns (ListReplaysResponse);
31
+
32
+ // Playback controls
33
+ rpc Playback(PlaybackRequest) returns (PlaybackResponse);
34
+ rpc Seek(SeekRequest) returns (google.protobuf.Empty);
35
+ rpc Close(ClosePlaybackRequest) returns (google.protobuf.Empty);
36
+
37
+ // Export a stored replay using egress
38
+ rpc Export(ExportReplayRequest) returns (EgressInfo);
39
+
40
+ // Delete all stored data
41
+ rpc DeleteReplay(DeleteReplayRequest) returns (google.protobuf.Empty);
42
+ }
43
+
44
+ message ListReplaysRequest {
45
+ string room_name = 1; // optional
46
+ livekit.TokenPagination page_token = 2;
47
+ }
48
+
49
+ message ListReplaysResponse {
50
+ repeated ReplayInfo replays = 1;
51
+ livekit.TokenPagination next_page_token = 2;
52
+ }
53
+
54
+ message ReplayInfo {
55
+ string replay_id = 1 [(logger.name) = "replayID"];
56
+ string room_name = 2;
57
+ int64 start_time = 3;
58
+ int64 duration_ms = 4;
59
+ }
60
+
61
+ message PlaybackRequest {
62
+ string replay_id = 1 [(logger.name) = "replayID"];
63
+ string playback_room = 2; // name of room to play into
64
+ int64 seek_offset_ms = 3; // initial timestamp (ms)
65
+ }
66
+
67
+ message PlaybackResponse {
68
+ string playback_id = 1 [(logger.name) = "playbackID"];
69
+ }
70
+
71
+ message SeekRequest {
72
+ string playback_id = 1 [(logger.name) = "playbackID"];
73
+ int64 seek_offset_ms = 2; // timestamp (ms)
74
+ }
75
+
76
+ message ClosePlaybackRequest {
77
+ string playback_id = 1 [(logger.name) = "playbackID"];
78
+ }
79
+
80
+ message DeleteReplayRequest {
81
+ string replay_id = 1 [(logger.name) = "replayID"];
82
+ }
@@ -0,0 +1,185 @@
1
+ // Copyright 2023 LiveKit, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package livekit;
18
+ option go_package = "github.com/livekit/protocol/livekit";
19
+ option csharp_namespace = "LiveKit.Proto";
20
+ option ruby_package = "LiveKit::Proto";
21
+
22
+ import "livekit_models.proto";
23
+ import "logger/options.proto";
24
+
25
+ message Job {
26
+ string id = 1;
27
+ string dispatch_id = 9 [(logger.name) = "dispatchID"];
28
+ JobType type = 2;
29
+ Room room = 3;
30
+ optional ParticipantInfo participant = 4;
31
+ string namespace = 5 [deprecated = true];
32
+ string metadata = 6 [(logger.sensitivity) = SENSITIVITY_PII];
33
+ string agent_name = 7;
34
+ JobState state = 8;
35
+ bool enable_recording = 10;
36
+ string deployment = 11;
37
+ map<string, string> attributes = 12 [(logger.sensitivity) = SENSITIVITY_PII];
38
+ bool enable_redaction = 13;
39
+ }
40
+
41
+ message JobState {
42
+ JobStatus status = 1;
43
+ string error = 2;
44
+ int64 started_at = 3;
45
+ int64 ended_at = 4;
46
+ int64 updated_at = 5;
47
+ string participant_identity = 6;
48
+ string worker_id = 7 [(logger.name) = "workerID"];
49
+ string agent_id = 8 [(logger.name) = "agentID"];
50
+ }
51
+
52
+ // from Worker to Server
53
+ message WorkerMessage {
54
+ oneof message {
55
+ // agent workers need to register themselves with the server first
56
+ RegisterWorkerRequest register = 1;
57
+ // worker confirms to server that it's available for a job, or declines it
58
+ AvailabilityResponse availability = 2;
59
+
60
+ // worker can update its status to the server, including taking itself out of the pool
61
+ UpdateWorkerStatus update_worker = 3;
62
+ // job can send status updates to the server, useful for tracking progress
63
+ UpdateJobStatus update_job = 4;
64
+
65
+ WorkerPing ping = 5;
66
+ SimulateJobRequest simulate_job = 6;
67
+ MigrateJobRequest migrate_job = 7;
68
+ };
69
+ }
70
+
71
+ // from Server to Worker
72
+ message ServerMessage {
73
+ oneof message {
74
+ // server confirms the registration, from this moment on, the worker is considered active
75
+ RegisterWorkerResponse register = 1;
76
+ // server asks worker to confirm availability for a job
77
+ AvailabilityRequest availability = 2;
78
+ JobAssignment assignment = 3;
79
+ JobTermination termination = 5;
80
+ WorkerPong pong = 4;
81
+ }
82
+ }
83
+
84
+ enum JobType {
85
+ JT_ROOM = 0;
86
+ JT_PUBLISHER = 1;
87
+ JT_PARTICIPANT = 2;
88
+ }
89
+
90
+ enum WorkerStatus {
91
+ WS_AVAILABLE = 0;
92
+ WS_FULL = 1;
93
+ }
94
+
95
+ enum JobStatus {
96
+ JS_PENDING = 0;
97
+ JS_RUNNING = 1;
98
+ JS_SUCCESS = 2;
99
+ JS_FAILED = 3;
100
+ }
101
+
102
+ message SimulateJobRequest {
103
+ JobType type = 1;
104
+ Room room = 2;
105
+ ParticipantInfo participant = 3;
106
+ }
107
+
108
+ message WorkerPing {
109
+ int64 timestamp = 1;
110
+ }
111
+
112
+ message WorkerPong {
113
+ int64 last_timestamp = 1;
114
+ int64 timestamp = 2;
115
+ }
116
+
117
+ message RegisterWorkerRequest {
118
+ JobType type = 1;
119
+ string agent_name = 8;
120
+ // string worker_id = 2;
121
+ string version = 3;
122
+ // string name = 4 [deprecated = true];
123
+ uint32 ping_interval = 5;
124
+ optional string namespace = 6;
125
+ ParticipantPermission allowed_permissions = 7;
126
+ string deployment = 9;
127
+ }
128
+
129
+ message RegisterWorkerResponse {
130
+ string worker_id = 1 [(logger.name) = "workerID"];
131
+ ServerInfo server_info = 3;
132
+ }
133
+
134
+ message MigrateJobRequest {
135
+ // string job_id = 1 [deprecated = true];
136
+ repeated string job_ids = 2;
137
+ }
138
+
139
+ message AvailabilityRequest {
140
+ Job job = 1;
141
+
142
+ // True when the job was previously assigned to another worker but has been
143
+ // migrated due to different reasons (e.g. worker failure, job migration)
144
+ bool resuming = 2;
145
+ }
146
+
147
+ message AvailabilityResponse {
148
+ string job_id = 1 [(logger.name) = "jobID"];
149
+ bool available = 2;
150
+ bool supports_resume = 3;
151
+ bool terminate = 8;
152
+
153
+ string participant_name = 4;
154
+ string participant_identity = 5;
155
+ string participant_metadata = 6;
156
+ map<string, string> participant_attributes = 7;
157
+ // NEXT_ID: 9
158
+ }
159
+
160
+ message UpdateJobStatus {
161
+ string job_id = 1 [(logger.name) = "jobID"];
162
+
163
+ // The worker can indicate the job end by either specifying SUCCESS or FAILED
164
+ JobStatus status = 2;
165
+
166
+ // metadata shown on the dashboard, useful for debugging
167
+ string error = 3;
168
+ }
169
+
170
+ message UpdateWorkerStatus {
171
+ optional WorkerStatus status = 1;
172
+ // optional string metadata = 2 [deprecated=true];
173
+ float load = 3;
174
+ uint32 job_count = 4;
175
+ }
176
+
177
+ message JobAssignment {
178
+ Job job = 1;
179
+ optional string url = 2;
180
+ string token = 3;
181
+ }
182
+
183
+ message JobTermination {
184
+ string job_id = 1 [(logger.name) = "jobID"];
185
+ }