@livekit/protocol 1.52.1 → 1.53.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/dist/index.cjs +544 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1165 -21
- package/dist/index.d.mts +1165 -21
- package/dist/index.d.ts +1165 -21
- package/dist/index.mjs +534 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/gen/agent/livekit_agent_session_pb.d.ts +9 -0
- package/src/gen/agent/livekit_agent_session_pb.js +1 -0
- package/src/gen/agent/livekit_agent_thread_pb.d.ts +653 -0
- package/src/gen/agent/livekit_agent_thread_pb.js +268 -0
- package/src/gen/livekit_agent_pb.d.ts +366 -6
- package/src/gen/livekit_agent_pb.js +153 -0
- package/src/gen/livekit_agent_simulation_pb.d.ts +12 -12
- package/src/gen/livekit_agent_simulation_pb.js +6 -6
- package/src/gen/livekit_agentdb_pb.d.ts +63 -36
- package/src/gen/livekit_agentdb_pb.js +28 -15
- package/src/gen/livekit_internal_pb.d.ts +2 -1
- package/src/gen/livekit_models_pb.d.ts +46 -2
- package/src/gen/livekit_models_pb.js +17 -1
- package/src/gen/livekit_rtc_pb.d.ts +25 -0
- package/src/gen/livekit_rtc_pb.js +13 -0
- package/src/gen/livekit_sip_pb.d.ts +7 -0
- package/src/gen/livekit_sip_pb.js +1 -0
- package/src/gen/version.js +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
|
@@ -0,0 +1,268 @@
|
|
|
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
|
+
// AgentThread: the durable conversation between an agent and a person, across
|
|
16
|
+
// channels and over time. Identified by an "AT_" id. Holds a scope, attributes,
|
|
17
|
+
// an idle TTL and the AgentDB database created with it. Served by
|
|
18
|
+
// cloud-protocol's AgentThreads. The conversation inside follows thread_schema_v1.sql, shared
|
|
19
|
+
// by the agents framework, which writes it, and the platform, which reads it.
|
|
20
|
+
|
|
21
|
+
// @generated by protoc-gen-es v1.10.1 with parameter "target=dts+js"
|
|
22
|
+
// @generated from file agent/livekit_agent_thread.proto (package livekit.agent, syntax proto3)
|
|
23
|
+
/* eslint-disable */
|
|
24
|
+
// @ts-nocheck
|
|
25
|
+
|
|
26
|
+
import { Duration, proto3, Timestamp } from "@bufbuild/protobuf";
|
|
27
|
+
import { ChatContext_ChatItem } from "./livekit_agent_session_pb.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @generated from message livekit.agent.AgentThread
|
|
31
|
+
*/
|
|
32
|
+
export const AgentThread = /*@__PURE__*/ proto3.makeMessageType(
|
|
33
|
+
"livekit.agent.AgentThread",
|
|
34
|
+
[],
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Direction of a listing. Each request documents what unset means.
|
|
39
|
+
*
|
|
40
|
+
* @generated from enum livekit.agent.AgentThread.SortOrder
|
|
41
|
+
*/
|
|
42
|
+
export const AgentThread_SortOrder = /*@__PURE__*/ proto3.makeEnum(
|
|
43
|
+
"livekit.agent.AgentThread.SortOrder",
|
|
44
|
+
[
|
|
45
|
+
{no: 0, name: "SORT_ORDER_UNSPECIFIED", localName: "UNSPECIFIED"},
|
|
46
|
+
{no: 1, name: "SORT_ORDER_ASC", localName: "ASC"},
|
|
47
|
+
{no: 2, name: "SORT_ORDER_DESC", localName: "DESC"},
|
|
48
|
+
],
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @generated from message livekit.agent.AgentThread.CreateRequest
|
|
53
|
+
*/
|
|
54
|
+
export const AgentThread_CreateRequest = /*@__PURE__*/ proto3.makeMessageType(
|
|
55
|
+
"livekit.agent.AgentThread.CreateRequest",
|
|
56
|
+
() => [
|
|
57
|
+
{ no: 1, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
58
|
+
{ no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
59
|
+
{ no: 3, name: "idle_ttl", kind: "message", T: Duration },
|
|
60
|
+
],
|
|
61
|
+
{localName: "AgentThread_CreateRequest"},
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @generated from message livekit.agent.AgentThread.GetRequest
|
|
66
|
+
*/
|
|
67
|
+
export const AgentThread_GetRequest = /*@__PURE__*/ proto3.makeMessageType(
|
|
68
|
+
"livekit.agent.AgentThread.GetRequest",
|
|
69
|
+
() => [
|
|
70
|
+
{ no: 1, name: "thread_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
71
|
+
],
|
|
72
|
+
{localName: "AgentThread_GetRequest"},
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The threads of one scope, newest first.
|
|
77
|
+
*
|
|
78
|
+
* @generated from message livekit.agent.AgentThread.ListRequest
|
|
79
|
+
*/
|
|
80
|
+
export const AgentThread_ListRequest = /*@__PURE__*/ proto3.makeMessageType(
|
|
81
|
+
"livekit.agent.AgentThread.ListRequest",
|
|
82
|
+
() => [
|
|
83
|
+
{ no: 1, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
84
|
+
{ no: 2, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
85
|
+
{ no: 3, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
86
|
+
],
|
|
87
|
+
{localName: "AgentThread_ListRequest"},
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @generated from message livekit.agent.AgentThread.ListResponse
|
|
92
|
+
*/
|
|
93
|
+
export const AgentThread_ListResponse = /*@__PURE__*/ proto3.makeMessageType(
|
|
94
|
+
"livekit.agent.AgentThread.ListResponse",
|
|
95
|
+
() => [
|
|
96
|
+
{ no: 1, name: "threads", kind: "message", T: AgentThread_Thread, repeated: true },
|
|
97
|
+
{ no: 2, name: "next_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
98
|
+
],
|
|
99
|
+
{localName: "AgentThread_ListResponse"},
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @generated from message livekit.agent.AgentThread.UpdateRequest
|
|
104
|
+
*/
|
|
105
|
+
export const AgentThread_UpdateRequest = /*@__PURE__*/ proto3.makeMessageType(
|
|
106
|
+
"livekit.agent.AgentThread.UpdateRequest",
|
|
107
|
+
() => [
|
|
108
|
+
{ no: 1, name: "thread_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
109
|
+
{ no: 2, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
110
|
+
{ no: 3, name: "idle_ttl", kind: "message", T: Duration },
|
|
111
|
+
],
|
|
112
|
+
{localName: "AgentThread_UpdateRequest"},
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @generated from message livekit.agent.AgentThread.DeleteRequest
|
|
117
|
+
*/
|
|
118
|
+
export const AgentThread_DeleteRequest = /*@__PURE__*/ proto3.makeMessageType(
|
|
119
|
+
"livekit.agent.AgentThread.DeleteRequest",
|
|
120
|
+
() => [
|
|
121
|
+
{ no: 1, name: "thread_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
122
|
+
],
|
|
123
|
+
{localName: "AgentThread_DeleteRequest"},
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @generated from message livekit.agent.AgentThread.DeleteResponse
|
|
128
|
+
*/
|
|
129
|
+
export const AgentThread_DeleteResponse = /*@__PURE__*/ proto3.makeMessageType(
|
|
130
|
+
"livekit.agent.AgentThread.DeleteResponse",
|
|
131
|
+
[],
|
|
132
|
+
{localName: "AgentThread_DeleteResponse"},
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The thread's chat items, oldest first unless sort_order says otherwise.
|
|
137
|
+
*
|
|
138
|
+
* @generated from message livekit.agent.AgentThread.GetItemsRequest
|
|
139
|
+
*/
|
|
140
|
+
export const AgentThread_GetItemsRequest = /*@__PURE__*/ proto3.makeMessageType(
|
|
141
|
+
"livekit.agent.AgentThread.GetItemsRequest",
|
|
142
|
+
() => [
|
|
143
|
+
{ no: 1, name: "thread_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
144
|
+
{ no: 2, name: "agent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
145
|
+
{ no: 3, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
146
|
+
{ no: 4, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
147
|
+
{ no: 5, name: "sort_order", kind: "enum", T: proto3.getEnumType(AgentThread_SortOrder) },
|
|
148
|
+
],
|
|
149
|
+
{localName: "AgentThread_GetItemsRequest"},
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @generated from message livekit.agent.AgentThread.GetItemsResponse
|
|
154
|
+
*/
|
|
155
|
+
export const AgentThread_GetItemsResponse = /*@__PURE__*/ proto3.makeMessageType(
|
|
156
|
+
"livekit.agent.AgentThread.GetItemsResponse",
|
|
157
|
+
() => [
|
|
158
|
+
{ no: 1, name: "items", kind: "message", T: AgentThread_Item, repeated: true },
|
|
159
|
+
{ no: 2, name: "next_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
160
|
+
],
|
|
161
|
+
{localName: "AgentThread_GetItemsResponse"},
|
|
162
|
+
);
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* One chat item of an agent. Stored as the JSON of
|
|
166
|
+
* ChatContext.ChatItem (items.payload in thread_schema_v1.sql).
|
|
167
|
+
*
|
|
168
|
+
* @generated from message livekit.agent.AgentThread.Item
|
|
169
|
+
*/
|
|
170
|
+
export const AgentThread_Item = /*@__PURE__*/ proto3.makeMessageType(
|
|
171
|
+
"livekit.agent.AgentThread.Item",
|
|
172
|
+
() => [
|
|
173
|
+
{ no: 1, name: "agent", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
174
|
+
{ no: 2, name: "seq", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
175
|
+
{ no: 3, name: "message_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
176
|
+
{ no: 4, name: "item", kind: "message", T: ChatContext_ChatItem },
|
|
177
|
+
],
|
|
178
|
+
{localName: "AgentThread_Item"},
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @generated from message livekit.agent.AgentThread.Thread
|
|
183
|
+
*/
|
|
184
|
+
export const AgentThread_Thread = /*@__PURE__*/ proto3.makeMessageType(
|
|
185
|
+
"livekit.agent.AgentThread.Thread",
|
|
186
|
+
() => [
|
|
187
|
+
{ no: 1, name: "thread_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
188
|
+
{ no: 2, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
189
|
+
{ no: 3, name: "attributes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
|
|
190
|
+
{ no: 4, name: "created_at", kind: "message", T: Timestamp },
|
|
191
|
+
{ no: 5, name: "last_active", kind: "message", T: Timestamp },
|
|
192
|
+
{ no: 6, name: "expires_at", kind: "message", T: Timestamp },
|
|
193
|
+
{ no: 7, name: "idle_ttl", kind: "message", T: Duration },
|
|
194
|
+
{ no: 8, name: "database_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
195
|
+
],
|
|
196
|
+
{localName: "AgentThread_Thread"},
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* AgentTask: background work an agent runs within a thread, such as a booking
|
|
201
|
+
* that takes minutes.
|
|
202
|
+
*
|
|
203
|
+
* @generated from message livekit.agent.AgentTask
|
|
204
|
+
*/
|
|
205
|
+
export const AgentTask = /*@__PURE__*/ proto3.makeMessageType(
|
|
206
|
+
"livekit.agent.AgentTask",
|
|
207
|
+
[],
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* A task is never UNSPECIFIED.
|
|
212
|
+
*
|
|
213
|
+
* @generated from enum livekit.agent.AgentTask.Status
|
|
214
|
+
*/
|
|
215
|
+
export const AgentTask_Status = /*@__PURE__*/ proto3.makeEnum(
|
|
216
|
+
"livekit.agent.AgentTask.Status",
|
|
217
|
+
[
|
|
218
|
+
{no: 0, name: "UNSPECIFIED"},
|
|
219
|
+
{no: 1, name: "RUNNING"},
|
|
220
|
+
{no: 2, name: "COMPLETED"},
|
|
221
|
+
{no: 3, name: "FAILED"},
|
|
222
|
+
{no: 4, name: "CANCELED"},
|
|
223
|
+
],
|
|
224
|
+
);
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* A thread's tasks, oldest first.
|
|
228
|
+
*
|
|
229
|
+
* @generated from message livekit.agent.AgentTask.GetTasksRequest
|
|
230
|
+
*/
|
|
231
|
+
export const AgentTask_GetTasksRequest = /*@__PURE__*/ proto3.makeMessageType(
|
|
232
|
+
"livekit.agent.AgentTask.GetTasksRequest",
|
|
233
|
+
() => [
|
|
234
|
+
{ no: 1, name: "thread_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
235
|
+
{ no: 2, name: "status", kind: "enum", T: proto3.getEnumType(AgentTask_Status), opt: true },
|
|
236
|
+
{ no: 3, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
237
|
+
{ no: 4, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
238
|
+
],
|
|
239
|
+
{localName: "AgentTask_GetTasksRequest"},
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* @generated from message livekit.agent.AgentTask.GetTasksResponse
|
|
244
|
+
*/
|
|
245
|
+
export const AgentTask_GetTasksResponse = /*@__PURE__*/ proto3.makeMessageType(
|
|
246
|
+
"livekit.agent.AgentTask.GetTasksResponse",
|
|
247
|
+
() => [
|
|
248
|
+
{ no: 1, name: "tasks", kind: "message", T: AgentTask_Task, repeated: true },
|
|
249
|
+
{ no: 2, name: "next_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
250
|
+
],
|
|
251
|
+
{localName: "AgentTask_GetTasksResponse"},
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @generated from message livekit.agent.AgentTask.Task
|
|
256
|
+
*/
|
|
257
|
+
export const AgentTask_Task = /*@__PURE__*/ proto3.makeMessageType(
|
|
258
|
+
"livekit.agent.AgentTask.Task",
|
|
259
|
+
() => [
|
|
260
|
+
{ no: 1, name: "task_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
261
|
+
{ no: 2, name: "thread_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
262
|
+
{ no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
263
|
+
{ no: 4, name: "status", kind: "enum", T: proto3.getEnumType(AgentTask_Status) },
|
|
264
|
+
{ no: 5, name: "updated_at", kind: "message", T: Timestamp },
|
|
265
|
+
],
|
|
266
|
+
{localName: "AgentTask_Task"},
|
|
267
|
+
);
|
|
268
|
+
|
|
@@ -344,6 +344,15 @@ export declare class ServerMessage extends Message<ServerMessage> {
|
|
|
344
344
|
*/
|
|
345
345
|
value: WorkerPong;
|
|
346
346
|
case: "pong";
|
|
347
|
+
} | {
|
|
348
|
+
/**
|
|
349
|
+
* the server is draining this control connection: re-register elsewhere,
|
|
350
|
+
* in-flight agent HTTP streams run to completion
|
|
351
|
+
*
|
|
352
|
+
* @generated from field: livekit.AgentHttp.GoAway go_away = 6;
|
|
353
|
+
*/
|
|
354
|
+
value: AgentHttp_GoAway;
|
|
355
|
+
case: "goAway";
|
|
347
356
|
} | { case: undefined; value?: undefined };
|
|
348
357
|
|
|
349
358
|
constructor(data?: PartialMessage<ServerMessage>);
|
|
@@ -463,15 +472,11 @@ export declare class RegisterWorkerRequest extends Message<RegisterWorkerRequest
|
|
|
463
472
|
agentName: string;
|
|
464
473
|
|
|
465
474
|
/**
|
|
466
|
-
* string worker_id = 2;
|
|
467
|
-
*
|
|
468
475
|
* @generated from field: string version = 3;
|
|
469
476
|
*/
|
|
470
477
|
version: string;
|
|
471
478
|
|
|
472
479
|
/**
|
|
473
|
-
* string name = 4 [deprecated = true];
|
|
474
|
-
*
|
|
475
480
|
* @generated from field: uint32 ping_interval = 5;
|
|
476
481
|
*/
|
|
477
482
|
pingInterval: number;
|
|
@@ -491,6 +496,29 @@ export declare class RegisterWorkerRequest extends Message<RegisterWorkerRequest
|
|
|
491
496
|
*/
|
|
492
497
|
deployment: string;
|
|
493
498
|
|
|
499
|
+
/**
|
|
500
|
+
* HTTP endpoints this worker serves through the data plane, in route order.
|
|
501
|
+
* Empty means the worker exposes no endpoints and needs no data connections.
|
|
502
|
+
*
|
|
503
|
+
* @generated from field: repeated livekit.AgentHttp.AgentEndpoint endpoints = 10;
|
|
504
|
+
*/
|
|
505
|
+
endpoints: AgentHttp_AgentEndpoint[];
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* random per process; a re-registration with a new instance_id supersedes the
|
|
509
|
+
* previous epoch and closes its remaining connections
|
|
510
|
+
*
|
|
511
|
+
* @generated from field: string instance_id = 11;
|
|
512
|
+
*/
|
|
513
|
+
instanceId: string;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* highest data-plane protocol version the worker supports; 0 = unsupported
|
|
517
|
+
*
|
|
518
|
+
* @generated from field: uint32 endpoint_protocol = 12;
|
|
519
|
+
*/
|
|
520
|
+
endpointProtocol: number;
|
|
521
|
+
|
|
494
522
|
constructor(data?: PartialMessage<RegisterWorkerRequest>);
|
|
495
523
|
|
|
496
524
|
static readonly runtime: typeof proto3;
|
|
@@ -520,6 +548,13 @@ export declare class RegisterWorkerResponse extends Message<RegisterWorkerRespon
|
|
|
520
548
|
*/
|
|
521
549
|
serverInfo?: ServerInfo;
|
|
522
550
|
|
|
551
|
+
/**
|
|
552
|
+
* present iff the registration carried endpoints and the server supports the data plane
|
|
553
|
+
*
|
|
554
|
+
* @generated from field: livekit.AgentHttp.AgentEndpointSettings endpoint_settings = 4;
|
|
555
|
+
*/
|
|
556
|
+
endpointSettings?: AgentHttp_AgentEndpointSettings;
|
|
557
|
+
|
|
523
558
|
constructor(data?: PartialMessage<RegisterWorkerResponse>);
|
|
524
559
|
|
|
525
560
|
static readonly runtime: typeof proto3;
|
|
@@ -702,8 +737,6 @@ export declare class UpdateWorkerStatus extends Message<UpdateWorkerStatus> {
|
|
|
702
737
|
status?: WorkerStatus;
|
|
703
738
|
|
|
704
739
|
/**
|
|
705
|
-
* optional string metadata = 2 [deprecated=true];
|
|
706
|
-
*
|
|
707
740
|
* @generated from field: float load = 3;
|
|
708
741
|
*/
|
|
709
742
|
load: number;
|
|
@@ -713,6 +746,21 @@ export declare class UpdateWorkerStatus extends Message<UpdateWorkerStatus> {
|
|
|
713
746
|
*/
|
|
714
747
|
jobCount: number;
|
|
715
748
|
|
|
749
|
+
/**
|
|
750
|
+
* worker wants no new streams; existing streams run to completion
|
|
751
|
+
*
|
|
752
|
+
* @generated from field: bool draining = 5;
|
|
753
|
+
*/
|
|
754
|
+
draining: boolean;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* monotonic per registration; status updates may interleave across connections
|
|
758
|
+
* and a stale report must not regress newer state
|
|
759
|
+
*
|
|
760
|
+
* @generated from field: uint64 seq = 6;
|
|
761
|
+
*/
|
|
762
|
+
seq: bigint;
|
|
763
|
+
|
|
716
764
|
constructor(data?: PartialMessage<UpdateWorkerStatus>);
|
|
717
765
|
|
|
718
766
|
static readonly runtime: typeof proto3;
|
|
@@ -786,3 +834,315 @@ export declare class JobTermination extends Message<JobTermination> {
|
|
|
786
834
|
static equals(a: JobTermination | PlainMessage<JobTermination> | undefined, b: JobTermination | PlainMessage<JobTermination> | undefined): boolean;
|
|
787
835
|
}
|
|
788
836
|
|
|
837
|
+
/**
|
|
838
|
+
* ----- agent HTTP endpoints data plane -----
|
|
839
|
+
*
|
|
840
|
+
* AgentHttp namespaces the data plane: workers expose HTTP endpoints served at
|
|
841
|
+
* /agents/{agent_name}/{deployment}/{path} without binding any local listener.
|
|
842
|
+
* The worker opens ONE WebTransport (QUIC) session to /agent that carries both
|
|
843
|
+
* its control stream (the same WorkerMessage/ServerMessage exchange as the
|
|
844
|
+
* WebSocket control connection, length-delimited) and every HTTP exchange: the
|
|
845
|
+
* node opens one bidirectional QUIC stream per request. QUIC provides the
|
|
846
|
+
* multiplexing and per-stream flow control, so there is no credit accounting
|
|
847
|
+
* and no attach handshake.
|
|
848
|
+
*
|
|
849
|
+
* Each exchange stream is:
|
|
850
|
+
*
|
|
851
|
+
* [len:u32be][StreamPreamble] the only LiveKit framing
|
|
852
|
+
* [ ... opaque bytes ... ] one HTTP/1.1 exchange, to FIN or RESET_STREAM
|
|
853
|
+
*
|
|
854
|
+
* After the preamble the stream is byte-transparent: the node writes a
|
|
855
|
+
* canonical HTTP/1.1 request and the worker replies with an HTTP/1.1 response,
|
|
856
|
+
* each parsed by whatever HTTP implementation the side already has. A WebSocket
|
|
857
|
+
* upgrade is therefore an ordinary request whose response is a 101, after which
|
|
858
|
+
* the stream is a byte pipe. The protocol evolves by version negotiation at
|
|
859
|
+
* registration, so the preamble carries no version of its own.
|
|
860
|
+
*
|
|
861
|
+
* Bodies use ordinary HTTP/1.1 framing, Content-Length or chunked, and are
|
|
862
|
+
* unbounded: a body may be many gigabytes and must be streamed. Request and
|
|
863
|
+
* response size limits are policy for the layer above.
|
|
864
|
+
*
|
|
865
|
+
* How one direction ends:
|
|
866
|
+
*
|
|
867
|
+
* success end of message per the body's own framing, then FIN.
|
|
868
|
+
* failed mid-body chunked trailer fields x-lk-completion and x-lk-error,
|
|
869
|
+
* in band, so the outcome cannot race the bytes it
|
|
870
|
+
* describes.
|
|
871
|
+
* failed before any RESET_STREAM carrying an HttpStreamResetCode, sound
|
|
872
|
+
* bytes only here, where nothing is in flight.
|
|
873
|
+
*
|
|
874
|
+
* FIN before the body's own framing says it is complete is truncation, and a
|
|
875
|
+
* receiver must surface it as such.
|
|
876
|
+
*
|
|
877
|
+
* The x-lk- header prefix is reserved for this signalling in both directions.
|
|
878
|
+
* A node strips it from client-supplied request headers, so a client cannot
|
|
879
|
+
* forge one, and strips it from responses, so it never reaches the end client.
|
|
880
|
+
*
|
|
881
|
+
* @generated from message livekit.AgentHttp
|
|
882
|
+
*/
|
|
883
|
+
export declare class AgentHttp extends Message<AgentHttp> {
|
|
884
|
+
constructor(data?: PartialMessage<AgentHttp>);
|
|
885
|
+
|
|
886
|
+
static readonly runtime: typeof proto3;
|
|
887
|
+
static readonly typeName = "livekit.AgentHttp";
|
|
888
|
+
static readonly fields: FieldList;
|
|
889
|
+
|
|
890
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AgentHttp;
|
|
891
|
+
|
|
892
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AgentHttp;
|
|
893
|
+
|
|
894
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AgentHttp;
|
|
895
|
+
|
|
896
|
+
static equals(a: AgentHttp | PlainMessage<AgentHttp> | undefined, b: AgentHttp | PlainMessage<AgentHttp> | undefined): boolean;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/**
|
|
900
|
+
* @generated from enum livekit.AgentHttp.AgentEndpointKind
|
|
901
|
+
*/
|
|
902
|
+
export declare enum AgentHttp_AgentEndpointKind {
|
|
903
|
+
/**
|
|
904
|
+
* @generated from enum value: AEK_HTTP = 0;
|
|
905
|
+
*/
|
|
906
|
+
AEK_HTTP = 0,
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* reserved for future text-mode endpoints
|
|
910
|
+
*
|
|
911
|
+
* @generated from enum value: AEK_TEXT = 1;
|
|
912
|
+
*/
|
|
913
|
+
AEK_TEXT = 1,
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* why a stream was reset before any HTTP bytes flowed. This travels as the
|
|
918
|
+
* QUIC RESET_STREAM / STOP_SENDING error code, so it is a number with no room
|
|
919
|
+
* for detail: the reason string is logged by the side that reset and joined
|
|
920
|
+
* to this by request_id. An outcome after bytes have flowed travels in
|
|
921
|
+
* trailers instead, where it cannot race them.
|
|
922
|
+
*
|
|
923
|
+
* @generated from enum livekit.AgentHttp.HttpStreamResetCode
|
|
924
|
+
*/
|
|
925
|
+
export declare enum AgentHttp_HttpStreamResetCode {
|
|
926
|
+
/**
|
|
927
|
+
* no information. The ordinary cancel code, sent whenever a stream is torn
|
|
928
|
+
* down without a specific outcome, so it must stay the zero value and must
|
|
929
|
+
* not imply that anything was or was not applied.
|
|
930
|
+
*
|
|
931
|
+
* @generated from enum value: HSR_ABORT = 0;
|
|
932
|
+
*/
|
|
933
|
+
HSR_ABORT = 0,
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* the worker aborted before any application code observed the request, so
|
|
937
|
+
* nothing was applied and the exchange is safe to retry. Requires that the
|
|
938
|
+
* application was never entered; a 404 it returned is an ordinary response.
|
|
939
|
+
*
|
|
940
|
+
* @generated from enum value: HSR_REFUSED = 1;
|
|
941
|
+
*/
|
|
942
|
+
HSR_REFUSED = 1,
|
|
943
|
+
|
|
944
|
+
/**
|
|
945
|
+
* the application was entered and then failed before producing a response
|
|
946
|
+
* head; side effects may already have happened, so this is not safe to
|
|
947
|
+
* retry.
|
|
948
|
+
*
|
|
949
|
+
* @generated from enum value: HSR_INTERNAL = 2;
|
|
950
|
+
*/
|
|
951
|
+
HSR_INTERNAL = 2,
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* the deadline elapsed before a response head was produced
|
|
955
|
+
*
|
|
956
|
+
* @generated from enum value: HSR_TIMEOUT = 3;
|
|
957
|
+
*/
|
|
958
|
+
HSR_TIMEOUT = 3,
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* the peer's bytes were not valid HTTP/1.1
|
|
962
|
+
*
|
|
963
|
+
* @generated from enum value: HSR_PROTOCOL = 4;
|
|
964
|
+
*/
|
|
965
|
+
HSR_PROTOCOL = 4,
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* @generated from message livekit.AgentHttp.AgentEndpoint
|
|
970
|
+
*/
|
|
971
|
+
export declare class AgentHttp_AgentEndpoint extends Message<AgentHttp_AgentEndpoint> {
|
|
972
|
+
/**
|
|
973
|
+
* starlette-style path template rooted at '/': {name} (one segment, default),
|
|
974
|
+
* {name:int}, {name:float}, {name:uuid} (constrained single segments),
|
|
975
|
+
* {name:path} (multi-segment). Custom converters are rejected.
|
|
976
|
+
*
|
|
977
|
+
* @generated from field: string path = 1;
|
|
978
|
+
*/
|
|
979
|
+
path: string;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* uppercase, exactly as the application routes them (FastAPI does not imply
|
|
983
|
+
* HEAD from GET)
|
|
984
|
+
*
|
|
985
|
+
* @generated from field: repeated string methods = 2;
|
|
986
|
+
*/
|
|
987
|
+
methods: string[];
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* @generated from field: livekit.AgentHttp.AgentEndpointKind kind = 3;
|
|
991
|
+
*/
|
|
992
|
+
kind: AgentHttp_AgentEndpointKind;
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* reachable without a project token
|
|
996
|
+
*
|
|
997
|
+
* @generated from field: bool public = 4;
|
|
998
|
+
*/
|
|
999
|
+
public: boolean;
|
|
1000
|
+
|
|
1001
|
+
constructor(data?: PartialMessage<AgentHttp_AgentEndpoint>);
|
|
1002
|
+
|
|
1003
|
+
static readonly runtime: typeof proto3;
|
|
1004
|
+
static readonly typeName = "livekit.AgentHttp.AgentEndpoint";
|
|
1005
|
+
static readonly fields: FieldList;
|
|
1006
|
+
|
|
1007
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AgentHttp_AgentEndpoint;
|
|
1008
|
+
|
|
1009
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AgentHttp_AgentEndpoint;
|
|
1010
|
+
|
|
1011
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AgentHttp_AgentEndpoint;
|
|
1012
|
+
|
|
1013
|
+
static equals(a: AgentHttp_AgentEndpoint | PlainMessage<AgentHttp_AgentEndpoint> | undefined, b: AgentHttp_AgentEndpoint | PlainMessage<AgentHttp_AgentEndpoint> | undefined): boolean;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* registration-level settings negotiated on the control connection, returned
|
|
1018
|
+
* in RegisterWorkerResponse when the worker declares endpoints and the server
|
|
1019
|
+
* supports the data plane.
|
|
1020
|
+
*
|
|
1021
|
+
* @generated from message livekit.AgentHttp.AgentEndpointSettings
|
|
1022
|
+
*/
|
|
1023
|
+
export declare class AgentHttp_AgentEndpointSettings extends Message<AgentHttp_AgentEndpointSettings> {
|
|
1024
|
+
/**
|
|
1025
|
+
* the negotiated data-plane protocol version; the worker speaks exactly this
|
|
1026
|
+
* or closes the session
|
|
1027
|
+
*
|
|
1028
|
+
* @generated from field: uint32 protocol = 1;
|
|
1029
|
+
*/
|
|
1030
|
+
protocol: number;
|
|
1031
|
+
|
|
1032
|
+
constructor(data?: PartialMessage<AgentHttp_AgentEndpointSettings>);
|
|
1033
|
+
|
|
1034
|
+
static readonly runtime: typeof proto3;
|
|
1035
|
+
static readonly typeName = "livekit.AgentHttp.AgentEndpointSettings";
|
|
1036
|
+
static readonly fields: FieldList;
|
|
1037
|
+
|
|
1038
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AgentHttp_AgentEndpointSettings;
|
|
1039
|
+
|
|
1040
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AgentHttp_AgentEndpointSettings;
|
|
1041
|
+
|
|
1042
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AgentHttp_AgentEndpointSettings;
|
|
1043
|
+
|
|
1044
|
+
static equals(a: AgentHttp_AgentEndpointSettings | PlainMessage<AgentHttp_AgentEndpointSettings> | undefined, b: AgentHttp_AgentEndpointSettings | PlainMessage<AgentHttp_AgentEndpointSettings> | undefined): boolean;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* the first thing on every exchange stream, node -> worker. It carries only
|
|
1049
|
+
* what the worker cannot derive from the HTTP bytes that follow and what it
|
|
1050
|
+
* must not infer from client-supplied headers - identity above all.
|
|
1051
|
+
*
|
|
1052
|
+
* @generated from message livekit.AgentHttp.StreamPreamble
|
|
1053
|
+
*/
|
|
1054
|
+
export declare class AgentHttp_StreamPreamble extends Message<AgentHttp_StreamPreamble> {
|
|
1055
|
+
/**
|
|
1056
|
+
* what the bytes after this preamble are. A field rather than a framing
|
|
1057
|
+
* tag, so a new stream semantic costs no new mechanism.
|
|
1058
|
+
*
|
|
1059
|
+
* @generated from field: livekit.AgentHttp.AgentEndpointKind kind = 1;
|
|
1060
|
+
*/
|
|
1061
|
+
kind: AgentHttp_AgentEndpointKind;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* @generated from field: string request_id = 2;
|
|
1065
|
+
*/
|
|
1066
|
+
requestId: string;
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* the caller holds agent-endpoint call permission for this agent and
|
|
1070
|
+
* deployment. Always true on a non-public route.
|
|
1071
|
+
*
|
|
1072
|
+
* @generated from field: bool authorized = 3;
|
|
1073
|
+
*/
|
|
1074
|
+
authorized: boolean;
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* the manifest template that matched, e.g. "/items/{id}"
|
|
1078
|
+
*
|
|
1079
|
+
* @generated from field: string route = 4;
|
|
1080
|
+
*/
|
|
1081
|
+
route: string;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* relative, because node and worker clocks are not synchronized. 0 imposes
|
|
1085
|
+
* no deadline.
|
|
1086
|
+
*
|
|
1087
|
+
* @generated from field: uint32 timeout_ms = 5;
|
|
1088
|
+
*/
|
|
1089
|
+
timeoutMs: number;
|
|
1090
|
+
|
|
1091
|
+
/**
|
|
1092
|
+
* end client address, host only
|
|
1093
|
+
*
|
|
1094
|
+
* @generated from field: string client_addr = 6;
|
|
1095
|
+
*/
|
|
1096
|
+
clientAddr: string;
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* "http" or "https" as the end client saw it; not derivable worker-side
|
|
1100
|
+
*
|
|
1101
|
+
* NEXT_ID: 8
|
|
1102
|
+
*
|
|
1103
|
+
* @generated from field: string scheme = 7;
|
|
1104
|
+
*/
|
|
1105
|
+
scheme: string;
|
|
1106
|
+
|
|
1107
|
+
constructor(data?: PartialMessage<AgentHttp_StreamPreamble>);
|
|
1108
|
+
|
|
1109
|
+
static readonly runtime: typeof proto3;
|
|
1110
|
+
static readonly typeName = "livekit.AgentHttp.StreamPreamble";
|
|
1111
|
+
static readonly fields: FieldList;
|
|
1112
|
+
|
|
1113
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AgentHttp_StreamPreamble;
|
|
1114
|
+
|
|
1115
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AgentHttp_StreamPreamble;
|
|
1116
|
+
|
|
1117
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AgentHttp_StreamPreamble;
|
|
1118
|
+
|
|
1119
|
+
static equals(a: AgentHttp_StreamPreamble | PlainMessage<AgentHttp_StreamPreamble> | undefined, b: AgentHttp_StreamPreamble | PlainMessage<AgentHttp_StreamPreamble> | undefined): boolean;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* the server is draining: the worker should re-register elsewhere; in-flight
|
|
1124
|
+
* HTTP exchanges run to completion
|
|
1125
|
+
*
|
|
1126
|
+
* @generated from message livekit.AgentHttp.GoAway
|
|
1127
|
+
*/
|
|
1128
|
+
export declare class AgentHttp_GoAway extends Message<AgentHttp_GoAway> {
|
|
1129
|
+
/**
|
|
1130
|
+
* @generated from field: string reason = 1;
|
|
1131
|
+
*/
|
|
1132
|
+
reason: string;
|
|
1133
|
+
|
|
1134
|
+
constructor(data?: PartialMessage<AgentHttp_GoAway>);
|
|
1135
|
+
|
|
1136
|
+
static readonly runtime: typeof proto3;
|
|
1137
|
+
static readonly typeName = "livekit.AgentHttp.GoAway";
|
|
1138
|
+
static readonly fields: FieldList;
|
|
1139
|
+
|
|
1140
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AgentHttp_GoAway;
|
|
1141
|
+
|
|
1142
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AgentHttp_GoAway;
|
|
1143
|
+
|
|
1144
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AgentHttp_GoAway;
|
|
1145
|
+
|
|
1146
|
+
static equals(a: AgentHttp_GoAway | PlainMessage<AgentHttp_GoAway> | undefined, b: AgentHttp_GoAway | PlainMessage<AgentHttp_GoAway> | undefined): boolean;
|
|
1147
|
+
}
|
|
1148
|
+
|