@livekit/protocol 1.53.0 → 1.53.2

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.53.0",
3
+ "version": "1.53.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "require": "dist/index.cjs",
@@ -27,8 +27,9 @@
27
27
  "license": "Apache-2.0",
28
28
  "devDependencies": {
29
29
  "@bufbuild/protoc-gen-es": "^1.10.0",
30
+ "@typescript/typescript6": "6.0.2",
30
31
  "genversion": "^3.2.0",
31
- "typescript": "5.9.3",
32
+ "typescript": "7.0.2",
32
33
  "unbuild": "^3.6.1"
33
34
  },
34
35
  "dependencies": {
@@ -131,6 +131,46 @@ export declare enum ToolReplyStatus {
131
131
  TR_SKIPPED = 3,
132
132
  }
133
133
 
134
+ /**
135
+ * Why an agent session closed. Agent evals read it from the recording upload's session
136
+ * summary (MetricsRecordingHeader.session_summary), as the value name.
137
+ *
138
+ * @generated from enum livekit.agent.CloseReason
139
+ */
140
+ export declare enum CloseReason {
141
+ /**
142
+ * not reported, or an SDK-specific reason
143
+ *
144
+ * @generated from enum value: CR_UNKNOWN = 0;
145
+ */
146
+ CR_UNKNOWN = 0,
147
+
148
+ /**
149
+ * @generated from enum value: CR_ERROR = 1;
150
+ */
151
+ CR_ERROR = 1,
152
+
153
+ /**
154
+ * @generated from enum value: CR_JOB_SHUTDOWN = 2;
155
+ */
156
+ CR_JOB_SHUTDOWN = 2,
157
+
158
+ /**
159
+ * @generated from enum value: CR_PARTICIPANT_DISCONNECTED = 3;
160
+ */
161
+ CR_PARTICIPANT_DISCONNECTED = 3,
162
+
163
+ /**
164
+ * @generated from enum value: CR_USER_INITIATED = 4;
165
+ */
166
+ CR_USER_INITIATED = 4,
167
+
168
+ /**
169
+ * @generated from enum value: CR_COMPLETED = 5;
170
+ */
171
+ CR_COMPLETED = 5,
172
+ }
173
+
134
174
  /**
135
175
  * @generated from enum livekit.agent.AmdCategory
136
176
  */
@@ -70,6 +70,24 @@ export const ToolReplyStatus = /*@__PURE__*/ proto3.makeEnum(
70
70
  ],
71
71
  );
72
72
 
73
+ /**
74
+ * Why an agent session closed. Agent evals read it from the recording upload's session
75
+ * summary (MetricsRecordingHeader.session_summary), as the value name.
76
+ *
77
+ * @generated from enum livekit.agent.CloseReason
78
+ */
79
+ export const CloseReason = /*@__PURE__*/ proto3.makeEnum(
80
+ "livekit.agent.CloseReason",
81
+ [
82
+ {no: 0, name: "CR_UNKNOWN"},
83
+ {no: 1, name: "CR_ERROR"},
84
+ {no: 2, name: "CR_JOB_SHUTDOWN"},
85
+ {no: 3, name: "CR_PARTICIPANT_DISCONNECTED"},
86
+ {no: 4, name: "CR_USER_INITIATED"},
87
+ {no: 5, name: "CR_COMPLETED"},
88
+ ],
89
+ );
90
+
73
91
  /**
74
92
  * @generated from enum livekit.agent.AmdCategory
75
93
  */
@@ -40,6 +40,39 @@ export declare enum JobRestartPolicy {
40
40
  JRP_NEVER = 1,
41
41
  }
42
42
 
43
+ /**
44
+ * what created the dispatch
45
+ *
46
+ * @generated from enum livekit.AgentDispatchTrigger
47
+ */
48
+ export declare enum AgentDispatchTrigger {
49
+ /**
50
+ * @generated from enum value: ADT_UNSPECIFIED = 0;
51
+ */
52
+ ADT_UNSPECIFIED = 0,
53
+
54
+ /**
55
+ * a participant joining created the room, and with it the dispatch
56
+ *
57
+ * @generated from enum value: ADT_JOIN = 1;
58
+ */
59
+ ADT_JOIN = 1,
60
+
61
+ /**
62
+ * the CreateRoom API created the room, and with it the dispatch
63
+ *
64
+ * @generated from enum value: ADT_ROOM_API = 2;
65
+ */
66
+ ADT_ROOM_API = 2,
67
+
68
+ /**
69
+ * the CreateDispatch API
70
+ *
71
+ * @generated from enum value: ADT_DISPATCH_API = 3;
72
+ */
73
+ ADT_DISPATCH_API = 3,
74
+ }
75
+
43
76
  /**
44
77
  * @generated from message livekit.CreateAgentDispatchRequest
45
78
  */
@@ -306,6 +339,11 @@ export declare class AgentDispatchState extends Message<AgentDispatchState> {
306
339
  */
307
340
  deletedAt: bigint;
308
341
 
342
+ /**
343
+ * @generated from field: livekit.AgentDispatchTrigger trigger = 4;
344
+ */
345
+ trigger: AgentDispatchTrigger;
346
+
309
347
  constructor(data?: PartialMessage<AgentDispatchState>);
310
348
 
311
349
  static readonly runtime: typeof proto3;
@@ -31,6 +31,21 @@ export const JobRestartPolicy = /*@__PURE__*/ proto3.makeEnum(
31
31
  ],
32
32
  );
33
33
 
34
+ /**
35
+ * what created the dispatch
36
+ *
37
+ * @generated from enum livekit.AgentDispatchTrigger
38
+ */
39
+ export const AgentDispatchTrigger = /*@__PURE__*/ proto3.makeEnum(
40
+ "livekit.AgentDispatchTrigger",
41
+ [
42
+ {no: 0, name: "ADT_UNSPECIFIED"},
43
+ {no: 1, name: "ADT_JOIN"},
44
+ {no: 2, name: "ADT_ROOM_API"},
45
+ {no: 3, name: "ADT_DISPATCH_API"},
46
+ ],
47
+ );
48
+
34
49
  /**
35
50
  * @generated from message livekit.CreateAgentDispatchRequest
36
51
  */
@@ -118,6 +133,7 @@ export const AgentDispatchState = /*@__PURE__*/ proto3.makeMessageType(
118
133
  { no: 1, name: "jobs", kind: "message", T: Job, repeated: true },
119
134
  { no: 2, name: "created_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
120
135
  { no: 3, name: "deleted_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
136
+ { no: 4, name: "trigger", kind: "enum", T: proto3.getEnumType(AgentDispatchTrigger) },
121
137
  ],
122
138
  );
123
139
 
@@ -79,6 +79,51 @@ export declare enum JobStatus {
79
79
  * @generated from enum value: JS_FAILED = 3;
80
80
  */
81
81
  JS_FAILED = 3,
82
+
83
+ /**
84
+ * the job ended before it was assigned to an agent
85
+ *
86
+ * @generated from enum value: JS_CANCELLED = 4;
87
+ */
88
+ JS_CANCELLED = 4,
89
+ }
90
+
91
+ /**
92
+ * @generated from enum livekit.JobStateReason
93
+ */
94
+ export declare enum JobStateReason {
95
+ /**
96
+ * @generated from enum value: JSR_UNSPECIFIED = 0;
97
+ */
98
+ JSR_UNSPECIFIED = 0,
99
+
100
+ /**
101
+ * no agent was available to accept the job
102
+ *
103
+ * @generated from enum value: JSR_NO_CAPACITY = 1;
104
+ */
105
+ JSR_NO_CAPACITY = 1,
106
+
107
+ /**
108
+ * the room closed before an agent was assigned
109
+ *
110
+ * @generated from enum value: JSR_ROOM_CLOSED = 2;
111
+ */
112
+ JSR_ROOM_CLOSED = 2,
113
+
114
+ /**
115
+ * the dispatch was deleted before an agent was assigned
116
+ *
117
+ * @generated from enum value: JSR_DISPATCH_DELETED = 3;
118
+ */
119
+ JSR_DISPATCH_DELETED = 3,
120
+
121
+ /**
122
+ * the job failed and is being dispatched again
123
+ *
124
+ * @generated from enum value: JSR_RETRYING = 4;
125
+ */
126
+ JSR_RETRYING = 4,
82
127
  }
83
128
 
84
129
  /**
@@ -151,6 +196,13 @@ export declare class Job extends Message<Job> {
151
196
  */
152
197
  enableRedaction: boolean;
153
198
 
199
+ /**
200
+ * when the server created the job, in Unix nanoseconds
201
+ *
202
+ * @generated from field: int64 created_at = 14;
203
+ */
204
+ createdAt: bigint;
205
+
154
206
  constructor(data?: PartialMessage<Job>);
155
207
 
156
208
  static readonly runtime: typeof proto3;
@@ -210,6 +262,27 @@ export declare class JobState extends Message<JobState> {
210
262
  */
211
263
  agentId: string;
212
264
 
265
+ /**
266
+ * why the job has no agent, for JS_PENDING and JS_CANCELLED jobs
267
+ *
268
+ * @generated from field: livekit.JobStateReason reason = 9;
269
+ */
270
+ reason: JobStateReason;
271
+
272
+ /**
273
+ * when the server received the worker's accept for this attempt, in Unix nanoseconds
274
+ *
275
+ * @generated from field: int64 accepted_at = 10;
276
+ */
277
+ acceptedAt: bigint;
278
+
279
+ /**
280
+ * when the server sent the assignment for this attempt, in Unix nanoseconds
281
+ *
282
+ * @generated from field: int64 assigned_at = 11;
283
+ */
284
+ assignedAt: bigint;
285
+
213
286
  constructor(data?: PartialMessage<JobState>);
214
287
 
215
288
  static readonly runtime: typeof proto3;
@@ -581,6 +654,14 @@ export declare class MigrateJobRequest extends Message<MigrateJobRequest> {
581
654
  */
582
655
  jobIds: string[];
583
656
 
657
+ /**
658
+ * the jobs in job_ids as they were assigned, with state.participant_identity
659
+ * set to the identity the worker accepted them with
660
+ *
661
+ * @generated from field: repeated livekit.Job jobs = 3;
662
+ */
663
+ jobs: Job[];
664
+
584
665
  constructor(data?: PartialMessage<MigrateJobRequest>);
585
666
 
586
667
  static readonly runtime: typeof proto3;
@@ -712,6 +793,13 @@ export declare class UpdateJobStatus extends Message<UpdateJobStatus> {
712
793
  */
713
794
  error: string;
714
795
 
796
+ /**
797
+ * set once the agent has connected to the room
798
+ *
799
+ * @generated from field: livekit.JobJoinTiming join_timing = 4;
800
+ */
801
+ joinTiming?: JobJoinTiming;
802
+
715
803
  constructor(data?: PartialMessage<UpdateJobStatus>);
716
804
 
717
805
  static readonly runtime: typeof proto3;
@@ -727,6 +815,85 @@ export declare class UpdateJobStatus extends Message<UpdateJobStatus> {
727
815
  static equals(a: UpdateJobStatus | PlainMessage<UpdateJobStatus> | undefined, b: UpdateJobStatus | PlainMessage<UpdateJobStatus> | undefined): boolean;
728
816
  }
729
817
 
818
+ /**
819
+ * Instants of one agent join on the worker host's monotonic clock, in microseconds. The
820
+ * clock origin is arbitrary, so only differences between these values carry meaning on
821
+ * their own. The worker and its job processes share this clock.
822
+ *
823
+ * @generated from message livekit.JobJoinTiming
824
+ */
825
+ export declare class JobJoinTiming extends Message<JobJoinTiming> {
826
+ /**
827
+ * availability request received
828
+ *
829
+ * @generated from field: int64 offer_received_us = 1;
830
+ */
831
+ offerReceivedUs: bigint;
832
+
833
+ /**
834
+ * request handler accepted the job
835
+ *
836
+ * @generated from field: int64 accepted_us = 2;
837
+ */
838
+ acceptedUs: bigint;
839
+
840
+ /**
841
+ * job assignment received
842
+ *
843
+ * @generated from field: int64 assignment_received_us = 3;
844
+ */
845
+ assignmentReceivedUs: bigint;
846
+
847
+ /**
848
+ * a job process was handed the job
849
+ *
850
+ * @generated from field: int64 launched_us = 4;
851
+ */
852
+ launchedUs: bigint;
853
+
854
+ /**
855
+ * an idle process took the job; false means one was spawned
856
+ *
857
+ * @generated from field: bool launch_warm = 5;
858
+ */
859
+ launchWarm: boolean;
860
+
861
+ /**
862
+ * the agent's entrypoint started
863
+ *
864
+ * @generated from field: int64 entrypoint_started_us = 6;
865
+ */
866
+ entrypointStartedUs: bigint;
867
+
868
+ /**
869
+ * the agent called room connect
870
+ *
871
+ * @generated from field: int64 connect_called_us = 7;
872
+ */
873
+ connectCalledUs: bigint;
874
+
875
+ /**
876
+ * the agent's primary transport connected
877
+ *
878
+ * @generated from field: int64 connected_us = 8;
879
+ */
880
+ connectedUs: bigint;
881
+
882
+ constructor(data?: PartialMessage<JobJoinTiming>);
883
+
884
+ static readonly runtime: typeof proto3;
885
+ static readonly typeName = "livekit.JobJoinTiming";
886
+ static readonly fields: FieldList;
887
+
888
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): JobJoinTiming;
889
+
890
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): JobJoinTiming;
891
+
892
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): JobJoinTiming;
893
+
894
+ static equals(a: JobJoinTiming | PlainMessage<JobJoinTiming> | undefined, b: JobJoinTiming | PlainMessage<JobJoinTiming> | undefined): boolean;
895
+ }
896
+
730
897
  /**
731
898
  * @generated from message livekit.UpdateWorkerStatus
732
899
  */
@@ -53,6 +53,21 @@ export const JobStatus = /*@__PURE__*/ proto3.makeEnum(
53
53
  {no: 1, name: "JS_RUNNING"},
54
54
  {no: 2, name: "JS_SUCCESS"},
55
55
  {no: 3, name: "JS_FAILED"},
56
+ {no: 4, name: "JS_CANCELLED"},
57
+ ],
58
+ );
59
+
60
+ /**
61
+ * @generated from enum livekit.JobStateReason
62
+ */
63
+ export const JobStateReason = /*@__PURE__*/ proto3.makeEnum(
64
+ "livekit.JobStateReason",
65
+ [
66
+ {no: 0, name: "JSR_UNSPECIFIED"},
67
+ {no: 1, name: "JSR_NO_CAPACITY"},
68
+ {no: 2, name: "JSR_ROOM_CLOSED"},
69
+ {no: 3, name: "JSR_DISPATCH_DELETED"},
70
+ {no: 4, name: "JSR_RETRYING"},
56
71
  ],
57
72
  );
58
73
 
@@ -75,6 +90,7 @@ export const Job = /*@__PURE__*/ proto3.makeMessageType(
75
90
  { no: 11, name: "deployment", kind: "scalar", T: 9 /* ScalarType.STRING */ },
76
91
  { no: 12, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
77
92
  { no: 13, name: "enable_redaction", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
93
+ { no: 14, name: "created_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
78
94
  ],
79
95
  );
80
96
 
@@ -92,6 +108,9 @@ export const JobState = /*@__PURE__*/ proto3.makeMessageType(
92
108
  { no: 6, name: "participant_identity", kind: "scalar", T: 9 /* ScalarType.STRING */ },
93
109
  { no: 7, name: "worker_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
94
110
  { no: 8, name: "agent_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
111
+ { no: 9, name: "reason", kind: "enum", T: proto3.getEnumType(JobStateReason) },
112
+ { no: 10, name: "accepted_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
113
+ { no: 11, name: "assigned_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
95
114
  ],
96
115
  );
97
116
 
@@ -201,6 +220,7 @@ export const MigrateJobRequest = /*@__PURE__*/ proto3.makeMessageType(
201
220
  "livekit.MigrateJobRequest",
202
221
  () => [
203
222
  { no: 2, name: "job_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
223
+ { no: 3, name: "jobs", kind: "message", T: Job, repeated: true },
204
224
  ],
205
225
  );
206
226
 
@@ -241,6 +261,28 @@ export const UpdateJobStatus = /*@__PURE__*/ proto3.makeMessageType(
241
261
  { no: 1, name: "job_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
242
262
  { no: 2, name: "status", kind: "enum", T: proto3.getEnumType(JobStatus) },
243
263
  { no: 3, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
264
+ { no: 4, name: "join_timing", kind: "message", T: JobJoinTiming },
265
+ ],
266
+ );
267
+
268
+ /**
269
+ * Instants of one agent join on the worker host's monotonic clock, in microseconds. The
270
+ * clock origin is arbitrary, so only differences between these values carry meaning on
271
+ * their own. The worker and its job processes share this clock.
272
+ *
273
+ * @generated from message livekit.JobJoinTiming
274
+ */
275
+ export const JobJoinTiming = /*@__PURE__*/ proto3.makeMessageType(
276
+ "livekit.JobJoinTiming",
277
+ () => [
278
+ { no: 1, name: "offer_received_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
279
+ { no: 2, name: "accepted_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
280
+ { no: 3, name: "assignment_received_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
281
+ { no: 4, name: "launched_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
282
+ { no: 5, name: "launch_warm", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
283
+ { no: 6, name: "entrypoint_started_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
284
+ { no: 7, name: "connect_called_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
285
+ { no: 8, name: "connected_us", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
244
286
  ],
245
287
  );
246
288