@livekit/protocol 1.12.0 → 1.13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livekit/protocol",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -12,14 +12,14 @@
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
14
 
15
- // @generated by protoc-gen-es v1.7.2 with parameter "target=js+dts"
15
+ // @generated by protoc-gen-es v1.8.0 with parameter "target=js+dts"
16
16
  // @generated from file livekit_agent.proto (package livekit, syntax proto3)
17
17
  /* eslint-disable */
18
18
  // @ts-nocheck
19
19
 
20
20
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
21
21
  import { Message, proto3 } from "@bufbuild/protobuf";
22
- import type { ParticipantInfo, Room } from "./livekit_models_pb.js";
22
+ import type { ParticipantInfo, ParticipantPermission, Room, ServerInfo } from "./livekit_models_pb.js";
23
23
 
24
24
  /**
25
25
  * @generated from enum livekit.JobType
@@ -71,6 +71,55 @@ export declare enum JobStatus {
71
71
  JS_FAILED = 2,
72
72
  }
73
73
 
74
+ /**
75
+ * @generated from message livekit.WorkerInfo
76
+ */
77
+ export declare class WorkerInfo extends Message<WorkerInfo> {
78
+ /**
79
+ * @generated from field: string id = 1;
80
+ */
81
+ id: string;
82
+
83
+ /**
84
+ * @generated from field: string namespace = 2;
85
+ */
86
+ namespace: string;
87
+
88
+ /**
89
+ * @generated from field: string version = 3;
90
+ */
91
+ version: string;
92
+
93
+ /**
94
+ * @generated from field: string name = 4;
95
+ */
96
+ name: string;
97
+
98
+ /**
99
+ * @generated from field: livekit.JobType type = 5;
100
+ */
101
+ type: JobType;
102
+
103
+ /**
104
+ * @generated from field: livekit.ParticipantPermission allowed_permissions = 6;
105
+ */
106
+ allowedPermissions?: ParticipantPermission;
107
+
108
+ constructor(data?: PartialMessage<WorkerInfo>);
109
+
110
+ static readonly runtime: typeof proto3;
111
+ static readonly typeName = "livekit.WorkerInfo";
112
+ static readonly fields: FieldList;
113
+
114
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkerInfo;
115
+
116
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkerInfo;
117
+
118
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkerInfo;
119
+
120
+ static equals(a: WorkerInfo | PlainMessage<WorkerInfo> | undefined, b: WorkerInfo | PlainMessage<WorkerInfo> | undefined): boolean;
121
+ }
122
+
74
123
  /**
75
124
  * @generated from message livekit.AgentInfo
76
125
  */
@@ -129,6 +178,11 @@ export declare class Job extends Message<Job> {
129
178
  */
130
179
  participant?: ParticipantInfo;
131
180
 
181
+ /**
182
+ * @generated from field: string namespace = 5;
183
+ */
184
+ namespace: string;
185
+
132
186
  constructor(data?: PartialMessage<Job>);
133
187
 
134
188
  static readonly runtime: typeof proto3;
@@ -173,16 +227,36 @@ export declare class WorkerMessage extends Message<WorkerMessage> {
173
227
  /**
174
228
  * worker can update its status to the server, including taking itself out of the pool
175
229
  *
176
- * @generated from field: livekit.UpdateWorkerStatus status = 3;
230
+ * @generated from field: livekit.UpdateWorkerStatus update_worker = 3;
177
231
  */
178
232
  value: UpdateWorkerStatus;
179
- case: "status";
233
+ case: "updateWorker";
234
+ } | {
235
+ /**
236
+ * job can send status updates to the server, useful for tracking progress
237
+ *
238
+ * @generated from field: livekit.UpdateJobStatus update_job = 4;
239
+ */
240
+ value: UpdateJobStatus;
241
+ case: "updateJob";
242
+ } | {
243
+ /**
244
+ * @generated from field: livekit.WorkerPing ping = 5;
245
+ */
246
+ value: WorkerPing;
247
+ case: "ping";
248
+ } | {
249
+ /**
250
+ * @generated from field: livekit.SimulateJobRequest simulate_job = 6;
251
+ */
252
+ value: SimulateJobRequest;
253
+ case: "simulateJob";
180
254
  } | {
181
255
  /**
182
- * @generated from field: livekit.JobStatusUpdate job_update = 4;
256
+ * @generated from field: livekit.MigrateJobRequest migrate_job = 7;
183
257
  */
184
- value: JobStatusUpdate;
185
- case: "jobUpdate";
258
+ value: MigrateJobRequest;
259
+ case: "migrateJob";
186
260
  } | { case: undefined; value?: undefined };
187
261
 
188
262
  constructor(data?: PartialMessage<WorkerMessage>);
@@ -231,6 +305,12 @@ export declare class ServerMessage extends Message<ServerMessage> {
231
305
  */
232
306
  value: JobAssignment;
233
307
  case: "assignment";
308
+ } | {
309
+ /**
310
+ * @generated from field: livekit.WorkerPong pong = 4;
311
+ */
312
+ value: WorkerPong;
313
+ case: "pong";
234
314
  } | { case: undefined; value?: undefined };
235
315
 
236
316
  constructor(data?: PartialMessage<ServerMessage>);
@@ -249,20 +329,104 @@ export declare class ServerMessage extends Message<ServerMessage> {
249
329
  }
250
330
 
251
331
  /**
252
- * @generated from message livekit.RegisterWorkerRequest
332
+ * @generated from message livekit.SimulateJobRequest
253
333
  */
254
- export declare class RegisterWorkerRequest extends Message<RegisterWorkerRequest> {
334
+ export declare class SimulateJobRequest extends Message<SimulateJobRequest> {
255
335
  /**
256
336
  * @generated from field: livekit.JobType type = 1;
257
337
  */
258
338
  type: JobType;
259
339
 
260
340
  /**
261
- * @generated from field: string worker_id = 2;
341
+ * @generated from field: livekit.Room room = 2;
262
342
  */
263
- workerId: string;
343
+ room?: Room;
344
+
345
+ /**
346
+ * @generated from field: livekit.ParticipantInfo participant = 3;
347
+ */
348
+ participant?: ParticipantInfo;
349
+
350
+ constructor(data?: PartialMessage<SimulateJobRequest>);
351
+
352
+ static readonly runtime: typeof proto3;
353
+ static readonly typeName = "livekit.SimulateJobRequest";
354
+ static readonly fields: FieldList;
355
+
356
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SimulateJobRequest;
357
+
358
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SimulateJobRequest;
359
+
360
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SimulateJobRequest;
361
+
362
+ static equals(a: SimulateJobRequest | PlainMessage<SimulateJobRequest> | undefined, b: SimulateJobRequest | PlainMessage<SimulateJobRequest> | undefined): boolean;
363
+ }
364
+
365
+ /**
366
+ * @generated from message livekit.WorkerPing
367
+ */
368
+ export declare class WorkerPing extends Message<WorkerPing> {
369
+ /**
370
+ * @generated from field: int64 timestamp = 1;
371
+ */
372
+ timestamp: bigint;
373
+
374
+ constructor(data?: PartialMessage<WorkerPing>);
375
+
376
+ static readonly runtime: typeof proto3;
377
+ static readonly typeName = "livekit.WorkerPing";
378
+ static readonly fields: FieldList;
379
+
380
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkerPing;
381
+
382
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkerPing;
383
+
384
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkerPing;
385
+
386
+ static equals(a: WorkerPing | PlainMessage<WorkerPing> | undefined, b: WorkerPing | PlainMessage<WorkerPing> | undefined): boolean;
387
+ }
388
+
389
+ /**
390
+ * @generated from message livekit.WorkerPong
391
+ */
392
+ export declare class WorkerPong extends Message<WorkerPong> {
393
+ /**
394
+ * @generated from field: int64 last_timestamp = 1;
395
+ */
396
+ lastTimestamp: bigint;
397
+
398
+ /**
399
+ * @generated from field: int64 timestamp = 2;
400
+ */
401
+ timestamp: bigint;
402
+
403
+ constructor(data?: PartialMessage<WorkerPong>);
404
+
405
+ static readonly runtime: typeof proto3;
406
+ static readonly typeName = "livekit.WorkerPong";
407
+ static readonly fields: FieldList;
408
+
409
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkerPong;
410
+
411
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkerPong;
412
+
413
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkerPong;
414
+
415
+ static equals(a: WorkerPong | PlainMessage<WorkerPong> | undefined, b: WorkerPong | PlainMessage<WorkerPong> | undefined): boolean;
416
+ }
264
417
 
418
+ /**
419
+ * @generated from message livekit.RegisterWorkerRequest
420
+ */
421
+ export declare class RegisterWorkerRequest extends Message<RegisterWorkerRequest> {
265
422
  /**
423
+ * @generated from field: livekit.JobType type = 1;
424
+ */
425
+ type: JobType;
426
+
427
+ /**
428
+ * string worker_id = 2;
429
+ *
266
430
  * @generated from field: string version = 3;
267
431
  */
268
432
  version: string;
@@ -272,6 +436,21 @@ export declare class RegisterWorkerRequest extends Message<RegisterWorkerRequest
272
436
  */
273
437
  name: string;
274
438
 
439
+ /**
440
+ * @generated from field: uint32 ping_interval = 5;
441
+ */
442
+ pingInterval: number;
443
+
444
+ /**
445
+ * @generated from field: optional string namespace = 6;
446
+ */
447
+ namespace?: string;
448
+
449
+ /**
450
+ * @generated from field: livekit.ParticipantPermission allowed_permissions = 7;
451
+ */
452
+ allowedPermissions?: ParticipantPermission;
453
+
275
454
  constructor(data?: PartialMessage<RegisterWorkerRequest>);
276
455
 
277
456
  static readonly runtime: typeof proto3;
@@ -297,9 +476,9 @@ export declare class RegisterWorkerResponse extends Message<RegisterWorkerRespon
297
476
  workerId: string;
298
477
 
299
478
  /**
300
- * @generated from field: string server_version = 2;
479
+ * @generated from field: livekit.ServerInfo server_info = 3;
301
480
  */
302
- serverVersion: string;
481
+ serverInfo?: ServerInfo;
303
482
 
304
483
  constructor(data?: PartialMessage<RegisterWorkerResponse>);
305
484
 
@@ -316,6 +495,30 @@ export declare class RegisterWorkerResponse extends Message<RegisterWorkerRespon
316
495
  static equals(a: RegisterWorkerResponse | PlainMessage<RegisterWorkerResponse> | undefined, b: RegisterWorkerResponse | PlainMessage<RegisterWorkerResponse> | undefined): boolean;
317
496
  }
318
497
 
498
+ /**
499
+ * @generated from message livekit.MigrateJobRequest
500
+ */
501
+ export declare class MigrateJobRequest extends Message<MigrateJobRequest> {
502
+ /**
503
+ * @generated from field: string job_id = 1;
504
+ */
505
+ jobId: string;
506
+
507
+ constructor(data?: PartialMessage<MigrateJobRequest>);
508
+
509
+ static readonly runtime: typeof proto3;
510
+ static readonly typeName = "livekit.MigrateJobRequest";
511
+ static readonly fields: FieldList;
512
+
513
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MigrateJobRequest;
514
+
515
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MigrateJobRequest;
516
+
517
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MigrateJobRequest;
518
+
519
+ static equals(a: MigrateJobRequest | PlainMessage<MigrateJobRequest> | undefined, b: MigrateJobRequest | PlainMessage<MigrateJobRequest> | undefined): boolean;
520
+ }
521
+
319
522
  /**
320
523
  * @generated from message livekit.AvailabilityRequest
321
524
  */
@@ -325,6 +528,14 @@ export declare class AvailabilityRequest extends Message<AvailabilityRequest> {
325
528
  */
326
529
  job?: Job;
327
530
 
531
+ /**
532
+ * True when the job was previously assigned to another worker but has been
533
+ * migrated due to different reasons (e.g. worker failure, job migration)
534
+ *
535
+ * @generated from field: bool resuming = 2;
536
+ */
537
+ resuming: boolean;
538
+
328
539
  constructor(data?: PartialMessage<AvailabilityRequest>);
329
540
 
330
541
  static readonly runtime: typeof proto3;
@@ -354,6 +565,26 @@ export declare class AvailabilityResponse extends Message<AvailabilityResponse>
354
565
  */
355
566
  available: boolean;
356
567
 
568
+ /**
569
+ * @generated from field: bool supports_resume = 3;
570
+ */
571
+ supportsResume: boolean;
572
+
573
+ /**
574
+ * @generated from field: string participant_name = 4;
575
+ */
576
+ participantName: string;
577
+
578
+ /**
579
+ * @generated from field: string participant_identity = 5;
580
+ */
581
+ participantIdentity: string;
582
+
583
+ /**
584
+ * @generated from field: string participant_metadata = 6;
585
+ */
586
+ participantMetadata: string;
587
+
357
588
  constructor(data?: PartialMessage<AvailabilityResponse>);
358
589
 
359
590
  static readonly runtime: typeof proto3;
@@ -370,89 +601,122 @@ export declare class AvailabilityResponse extends Message<AvailabilityResponse>
370
601
  }
371
602
 
372
603
  /**
373
- * @generated from message livekit.JobStatusUpdate
604
+ * @generated from message livekit.UpdateJobStatus
374
605
  */
375
- export declare class JobStatusUpdate extends Message<JobStatusUpdate> {
606
+ export declare class UpdateJobStatus extends Message<UpdateJobStatus> {
376
607
  /**
377
608
  * @generated from field: string job_id = 1;
378
609
  */
379
610
  jobId: string;
380
611
 
381
612
  /**
382
- * @generated from field: livekit.JobStatus status = 2;
613
+ * The worker can indicate the job end by either specifying SUCCESS or FAILED
614
+ *
615
+ * @generated from field: optional livekit.JobStatus status = 2;
383
616
  */
384
- status: JobStatus;
617
+ status?: JobStatus;
385
618
 
386
619
  /**
620
+ * metadata shown on the dashboard, useful for debugging
621
+ *
387
622
  * @generated from field: string error = 3;
388
623
  */
389
624
  error: string;
390
625
 
391
626
  /**
392
- * @generated from field: string user_data = 4;
627
+ * the metadata can be updated multiple times
628
+ *
629
+ * @generated from field: optional string metadata = 4;
630
+ */
631
+ metadata?: string;
632
+
633
+ /**
634
+ * The load that the job currently has on the worker
635
+ *
636
+ * @generated from field: float load = 5;
393
637
  */
394
- userData: string;
638
+ load: number;
395
639
 
396
- constructor(data?: PartialMessage<JobStatusUpdate>);
640
+ constructor(data?: PartialMessage<UpdateJobStatus>);
397
641
 
398
642
  static readonly runtime: typeof proto3;
399
- static readonly typeName = "livekit.JobStatusUpdate";
643
+ static readonly typeName = "livekit.UpdateJobStatus";
400
644
  static readonly fields: FieldList;
401
645
 
402
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JobStatusUpdate;
646
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateJobStatus;
403
647
 
404
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): JobStatusUpdate;
648
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateJobStatus;
405
649
 
406
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): JobStatusUpdate;
650
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateJobStatus;
407
651
 
408
- static equals(a: JobStatusUpdate | PlainMessage<JobStatusUpdate> | undefined, b: JobStatusUpdate | PlainMessage<JobStatusUpdate> | undefined): boolean;
652
+ static equals(a: UpdateJobStatus | PlainMessage<UpdateJobStatus> | undefined, b: UpdateJobStatus | PlainMessage<UpdateJobStatus> | undefined): boolean;
409
653
  }
410
654
 
411
655
  /**
412
- * @generated from message livekit.JobAssignment
656
+ * @generated from message livekit.UpdateWorkerStatus
413
657
  */
414
- export declare class JobAssignment extends Message<JobAssignment> {
658
+ export declare class UpdateWorkerStatus extends Message<UpdateWorkerStatus> {
415
659
  /**
416
- * @generated from field: livekit.Job job = 1;
660
+ * @generated from field: optional livekit.WorkerStatus status = 1;
417
661
  */
418
- job?: Job;
662
+ status?: WorkerStatus;
419
663
 
420
- constructor(data?: PartialMessage<JobAssignment>);
664
+ /**
665
+ * @generated from field: optional string metadata = 2;
666
+ */
667
+ metadata?: string;
668
+
669
+ /**
670
+ * @generated from field: float load = 3;
671
+ */
672
+ load: number;
673
+
674
+ constructor(data?: PartialMessage<UpdateWorkerStatus>);
421
675
 
422
676
  static readonly runtime: typeof proto3;
423
- static readonly typeName = "livekit.JobAssignment";
677
+ static readonly typeName = "livekit.UpdateWorkerStatus";
424
678
  static readonly fields: FieldList;
425
679
 
426
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JobAssignment;
680
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateWorkerStatus;
427
681
 
428
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): JobAssignment;
682
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateWorkerStatus;
429
683
 
430
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): JobAssignment;
684
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateWorkerStatus;
431
685
 
432
- static equals(a: JobAssignment | PlainMessage<JobAssignment> | undefined, b: JobAssignment | PlainMessage<JobAssignment> | undefined): boolean;
686
+ static equals(a: UpdateWorkerStatus | PlainMessage<UpdateWorkerStatus> | undefined, b: UpdateWorkerStatus | PlainMessage<UpdateWorkerStatus> | undefined): boolean;
433
687
  }
434
688
 
435
689
  /**
436
- * @generated from message livekit.UpdateWorkerStatus
690
+ * @generated from message livekit.JobAssignment
437
691
  */
438
- export declare class UpdateWorkerStatus extends Message<UpdateWorkerStatus> {
692
+ export declare class JobAssignment extends Message<JobAssignment> {
439
693
  /**
440
- * @generated from field: livekit.WorkerStatus status = 1;
694
+ * @generated from field: livekit.Job job = 1;
441
695
  */
442
- status: WorkerStatus;
696
+ job?: Job;
443
697
 
444
- constructor(data?: PartialMessage<UpdateWorkerStatus>);
698
+ /**
699
+ * @generated from field: optional string url = 2;
700
+ */
701
+ url?: string;
702
+
703
+ /**
704
+ * @generated from field: string token = 3;
705
+ */
706
+ token: string;
707
+
708
+ constructor(data?: PartialMessage<JobAssignment>);
445
709
 
446
710
  static readonly runtime: typeof proto3;
447
- static readonly typeName = "livekit.UpdateWorkerStatus";
711
+ static readonly typeName = "livekit.JobAssignment";
448
712
  static readonly fields: FieldList;
449
713
 
450
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateWorkerStatus;
714
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JobAssignment;
451
715
 
452
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateWorkerStatus;
716
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): JobAssignment;
453
717
 
454
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateWorkerStatus;
718
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): JobAssignment;
455
719
 
456
- static equals(a: UpdateWorkerStatus | PlainMessage<UpdateWorkerStatus> | undefined, b: UpdateWorkerStatus | PlainMessage<UpdateWorkerStatus> | undefined): boolean;
720
+ static equals(a: JobAssignment | PlainMessage<JobAssignment> | undefined, b: JobAssignment | PlainMessage<JobAssignment> | undefined): boolean;
457
721
  }
458
722